I have been working with bookdown to draft a report. I am using
bookdown::pdf_document2 as output and using the last version of Rstudio (1.4.1103) with R 4.0.2.
In some sections I need to cross-reference figures and add citations in the same parenthesis but I encounter the following issue:
When using the visual editor:
[Figure @ref(fig:figure-1); @citation1; @citation2]will produce and output in the knitted pdf with square brackets
[Figure 1; citation1; citation2]instead of round brackets
(Figure 1; citation1; citation2).
A way that I could make this work was not using the visual editor and escaping the first
[Figure \@ref(fig:figure-1)\; @citation1; @citation2], which produce the reference with parenthesis. However, if I turn on the visual editor, the escaped
\;is converted into a
;and causing the problem again.
is there any form to escape characters directly from the visual editor ?