Is there a way to not have Quarto include escape character '\' before _ in template? #3098
-
I created a template for myself and am having this issue where, when taking a file name that I provide in the yaml section of my Quarto document, it automatically places the \ escape character before an underscore symbol that I use for the file name in my LaTeX file. I'm not sure how clear this is coming across. So here's some examples: In my quarto document, I have this:
I am then sending this through a .TeX template that takes the bibliography information and pastes it in:
When I look at the intermediary TeX file it creates, somewhere along the line, Quarto automatically added the \ escape character before the underscore symbol in my file name. This, of course, makes it so that TinyTeX is unable to find that file.
Do I need to make an adjustment to my template tex file or is there some way to set this up in my Quarto document? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
This is a LaTeX constraint about underscores (at least for most of LaTeX). Does your tex file compile if you remove the |
Beta Was this translation helpful? Give feedback.
-
I put this here in case anybody finds this like I did. I finally found that if the variable is defined under the title: "Example extension"
author: ""
version: 1.1.0
contributes:
format:
pdf:
variables:
path-to-resource: "path/to/resource/" You can then use the |
Beta Was this translation helpful? Give feedback.
This is a LaTeX constraint about underscores (at least for most of LaTeX).
Quarto is only fixing the wrongly not escaped underscores.
Does your tex file compile if you remove the
\
?If yes, then maybe Quarto is trying too hard to be smart, thus it might need to be fixed.