5

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.

1 Answer 1

4

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"))
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.