6

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

5

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
  • thanks. is there a way I could change the variable on a per buffer basis?
    – user20304
    Commented Jan 28, 2019 at 15:39
  • Probably. See gnu.org/software/emacs/manual/html_node/emacs/… Commented Jan 29, 2019 at 2:15
  • Very helpful. Thanks again.
    – user20304
    Commented Jan 29, 2019 at 17:55

Your Answer

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