In trying to find a way in Rmarkdown for cross-referencing chapters which were auto-numbering and/or by its named to do something like
"As I explained hundred pages ago in \ref{ch:Chapter_Label}....."
and then the generated pdf document produced has something like:
"As I explained hundred pages ago in Chapter 3....."
or
"As I explained hundred pages ago in <Chapter Name> ....."
I was thinking in some mechanism like:
\chapter{My_Title} \label{ch:1}
And then everywhere inside the text I use \ref{ch:1}
I would get either the "My_Title" or the "Chapter 1" (or whatever auto-numbering it got) embedded by the text.
Seemed the hyperref package is not working by Rmarkdown or I'm missing something.
Does anybody can help me?
This issue has been solved in bookdown and documented in Section 2.5. Basically you use the syntax \@ref(label)
, and label
is your chapter identifier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With