Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #22: Add tex-program metadata #23

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jooyoungseo
Copy link

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
Copy link
Collaborator

cscheid commented Jul 5, 2023

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

@jooyoungseo
Copy link
Author

jooyoungseo commented Jul 5, 2023

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
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
Copy link
Collaborator

cscheid commented Jul 5, 2023

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
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
Copy link
Collaborator

cscheid commented Jul 5, 2023

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