I am looking to add cross-referencing to single words in an R Markdown document so as to not have to manually update the relevant words when changes are made to them. More specifically, I have a number of references throughout the document to criteria which are called "QUANT1", "QUANT2", etc. The numbering can change depending on their placement in a table contained elsewhere in the document.
Reading chapter 2.2.4 of the bookdown book, it seems possible to add cross-references to single words (or even sentences).
Specifically, the book states (at the end of the chapter) that "[t]ext references can be used anywhere in the document (not limited to figure captions). It can also be useful if you want to reuse a fragment of text in multiple places."
Let's say I have a reference like this:
The reference is generated as expected (i.e. it is not shown in the text after rendering). However, I cannot figure out how to make a reference to it in running text (i.e. not in a figure, table or other caption). I have tried several methods of referencing this in the running text, none of which work:
(ref:quant1) `(ref:quant1)` "(ref:quant1)" \@ref(quant1)
Does anyone know how to make use of references created as outlined above in running text?