Skip to content

Fix #22: Add tex-program metadata#23

Open
jooyoungseo wants to merge 2 commits into
quarto-journals:mainfrom
jooyoungseo:jooyoungseo/issue22
Open

Fix #22: Add tex-program metadata#23
jooyoungseo wants to merge 2 commits into
quarto-journals:mainfrom
jooyoungseo:jooyoungseo/issue22

Conversation

@jooyoungseo

Copy link
Copy Markdown

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

@jooyoungseo jooyoungseo changed the title Add tex-program metadata Fix #22: Add tex-program metadata Jul 5, 2023
@cscheid

cscheid commented Jul 5, 2023

Copy link
Copy Markdown
Collaborator

Thanks for the PR. Have you tried using the pdf-engine option for this? https://quarto.org/docs/output-formats/pdf-engine.html

@jooyoungseo

jooyoungseo commented Jul 5, 2023

Copy link
Copy Markdown
Author

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?

@jooyoungseo

Copy link
Copy Markdown
Author

FYI, I proposed to auto-insert this tex directive by using pdf-engine. Unfortunately, it had to be closed in the upstream issue:

jgm/pandoc#8524

@cscheid

cscheid commented Jul 5, 2023

Copy link
Copy Markdown
Collaborator

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.

@jooyoungseo

Copy link
Copy Markdown
Author

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.

@cscheid

cscheid commented Jul 5, 2023

Copy link
Copy Markdown
Collaborator

Let me try to figure out how this stuff works and get back to you in a couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants