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

Org reader: specification of latex compiler does not work #5480

Closed
atbest opened this issue May 4, 2019 · 11 comments
Closed

Org reader: specification of latex compiler does not work #5480

atbest opened this issue May 4, 2019 · 11 comments

Comments

@atbest
Copy link

atbest commented May 4, 2019

In the LaTeX specific export settings, there is an option ( LATEX_COMPILER) to specify the latex compiler, pdflatex, xelatex or lualatex. However, this option is ignored and Pandoc always uses pdflatex as default engine. This is annoying if non-ASCII characters or special characters exist in the org files. For example, \Delta is parsed to Δ symbol and the document has to be converted to pdf using xelatex because pdflatex cannot process non-ASCII characters directly. It will be great if Pandoc can recognize LATEX_COMPILER or provide a mechanism to set xelatex as default pdf-engine for Windows users.

@jgm
Copy link
Owner

jgm commented May 4, 2019

Use --pdf-engine=xelatex (or whatever).

This setting is controlled by writer options, not by document metadata. So there's no way for the org reader to affect it, currently.

@jgm
Copy link
Owner

jgm commented May 4, 2019

If #4627 were implemented, then we could do this.

@atbest
Copy link
Author

atbest commented May 4, 2019

I am curious why you choose pdflatex as the default engine. It does not support unicode charecters and produces larger files compared to xelatex.
The only reason I can imagine is backward compatibility. However, this option has been changed from latex-engine to pdf-engine. Thus backward compatibility is not sufficient to explain the decision.

@jgm
Copy link
Owner

jgm commented May 4, 2019

@atbest Remember that pandoc is a 13 year old project. When we started, it wasn't a given that people would have xelatex installed, and xelatex didn't work as well as it did now. The decision could be rethought.

I think there are two issues to consider:

  1. Are there going to be people who only have pdflatex and not xelatex? (I imagine this is now rare.)
  2. pdflatex is still significantly faster in my experience.

Another sensible option would be to default to xelatex if the latex intermediary contains non-ascii characters.

@jgm
Copy link
Owner

jgm commented May 4, 2019

However, I think it would be better to raise this issue on the pandoc-discuss mailing list. This is not the best place to discuss it.

@jgm jgm closed this as completed May 4, 2019
@atbest
Copy link
Author

atbest commented May 10, 2019

This setting is controlled by writer options, not by document metadata. So there's no way for the org reader to affect it, currently.

OK, even if this option does not affect the writer settings, it should be omitted in the pdf file in consistence with Emacs. However, Pandoc converts #+OPTIONS: pdf-engine:xelatex to pdf-engine:xelatex directly.

@atbest
Copy link
Author

atbest commented May 10, 2019

I guess it's better to print unrecognoized options to stderr instead of retaining them in the final output.

@jgm
Copy link
Owner

jgm commented May 10, 2019

@tarleb do you agree that the unrecognized options should be omitted, perhaps along with a warning?

@tarleb
Copy link
Collaborator

tarleb commented May 10, 2019

Wholeheartedly agree, the current behavior is not good. I'll look into it.

@jgm
Copy link
Owner

jgm commented May 10, 2019

I'll re-open this issue then to keep track.

@tarleb
Copy link
Collaborator

tarleb commented May 13, 2019

Unknown options are now ignored with a warning (00ef038)

@tarleb tarleb closed this as completed May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants