adletaw / captioner

an R package for generating figure/table numbers and captions, especially for Rmd docs
Other
105 stars 22 forks source link

Greek letters in captions #38

Open nguinasso opened 6 years ago

nguinasso commented 6 years ago

I am using rStudio to prepare a pdf document. If I try to use $\sigma$ in a caption, it gives an error. Is there any way to escape the \ ? Two backlashes dont't give an error but doesn't display as latex, Any latex seems to not work in the caption. My example shows results with 2 and 4 backslashes.

10/31/2018 I have in posted the tex file from my example. The captions from captioner are apparently inserted as a verbatim comment which prevents them from being interpreted as tex.

Is there an easy way to fix this?

caption.example1.pdf caption.example1.pdf caption.example1.tex.txt

GegznaV commented 6 years ago

Does double backslash ("$\\sigma$") solve your issue? Sometimes 4 backslases are needed to represent a single slash (\\\\). Othervise show us an exact piece of code you use.