Reputation: 396
Using latexmk
I've tested the following setup
(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.
Is there any easy way to fix this issue? E.g. set org-latex-pdf-process
based on a the selection of the LATEX_COMPILER
using a hook?
Upvotes: 1
Views: 2183
Reputation: 396
I found the following solution, which works for me
(setq org-latex-pdf-process (list "latexmk -pdflatex='%latex -shell-escape -interaction nonstopmode' -pdf -output-directory=%o %f"))
Upvotes: 1