[英]Emacs org-mode latex - simply switch between pdflatex, xelatex and lualatex
Using latexmk
I've tested the following setup使用latexmk
我已经测试了以下设置
(setq org-latex-pdf-process '("latexmk %f -output-directory=%o -%latex"))
using the example below使用下面的例子
#+TITLE: My Paper
#+AUTHOR: Jane Doe
#+DATE:
#+OPTIONS: toc:nil num:nil
#+LATEX_COMPILER: xelatex
#+LATEX_HEADER: \usepackage{fontspec}
#+LATEX_HEADER: \setsansfont{Acme}
* Title
- Text
and it works for xelatex
und lualatex
, but not for pdflatex
because latexmk
fails with the option -pdflatex
, which would require a string.它适用于xelatex
和lualatex
,但不适用于pdflatex
因为latexmk
使用选项-pdflatex
失败,这将需要一个字符串。
Is there any easy way to fix this issue?有什么简单的方法可以解决这个问题吗? Eg set org-latex-pdf-process
based on a the selection of the LATEX_COMPILER
using a hook?例如,基于使用钩子选择的LATEX_COMPILER
设置org-latex-pdf-process
?
我找到了以下解决方案,这对我有用
(setq org-latex-pdf-process (list "latexmk -pdflatex='%latex -shell-escape -interaction nonstopmode' -pdf -output-directory=%o %f"))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.