0

I would like to add a switch when invoking the org-export dispatcher interface for latex-pdf exports. I'm trying to render an SVG image but the *Org PDF LaTeX Output* buffer errors out because of a missing commandline switch --shell-escape during pdflatex compilation. The result is a PDF that does not render my SVG image. So, how can I add this switch to my pdflatex compilation when exporting from Org Mode?

Package svg Warning: You didn't enable `shell escape' (or `write18')
(svg)                so it wasn't possible to launch the Inkscape export
(svg)                for `svg-sequence1.svg' on input line 107.


! Package svg Error: File `svg-sequence1_svg-tex.pdf' is missing.

See the svg package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.107 ...udesvg[width=.9\linewidth]{svg-sequence1}


! Package svg Error: File `svg-sequence1_svg-tex.pdf_tex' is missing.

See the svg package documentation for explanation.
Type  H <return>  for immediate help.
0

Something like this in your init file should do the trick.

(setq org-latex-pdf-process
      '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
    "bibtex %b"
    "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
    "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.