Open jooyoungseo opened 1 year ago
Thanks for the PR. Have you tried using the pdf-engine
option for this? https://quarto.org/docs/output-formats/pdf-engine.html
I was trying to use $pdf-engine$
variable like below:
% !TEX program = $if(pdf-engine)$$pdf-engine$$else$xelatex$endif$
For some reason, it does not pick up the pdf-engine
value from the YAML metadata when specified. Maybe, I have missed something?
FYI, I proposed to auto-insert this tex directive by using pdf-engine
. Unfortunately, it had to be closed in the upstream issue:
Ah, I understand what's happening. Pandoc behaves slightly differently from quarto when it comes to latex-vs-pdf rendering. I wonder if we can change something in quarto to make sure that the pdf-engine
option is available in the latex
writer, etc.
Yes, that would be great! Maybe, we can also pass other metadata to tex tex directives, such as text encoding, root, etc. We may want to apply this to other templates later.
Let me try to figure out how this stuff works and get back to you in a couple of days.
Add tex-program metadata in templates to support most of the tex editors. Default is xelatex. See https://tex.stackexchange.com/questions/78101/when-and-why-should-i-use-tex-ts-program-and-tex-encoding