summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2011-06-11 13:40:14 -0700
committerDan Davison <dandavison7@gmail.com>2011-06-11 13:40:14 -0700
commit3ed5915f01ac5647db5f2204dc695519653b1190 (patch)
treebb7f879dacd23107324c1cbfd26c5c3a1dc26698
parentc4737ae48b84308e1ac201531aca392a81529974 (diff)
downloadorg-mode-3ed5915f01ac5647db5f2204dc695519653b1190.tar.gz
Automatically use pdflatex -shell-escape for minted export
Patch by Bastien * lisp/org-latex.el: Add -shell-escape to pdflatex commands
-rw-r--r--lisp/org-latex.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index e2c74ae..ef8b2b1 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -986,7 +986,13 @@ when PUB-DIR is set, use this as the publishing directory."
(file (buffer-file-name lbuf))
(base (file-name-sans-extension (buffer-file-name lbuf)))
(pdffile (concat base ".pdf"))
- (cmds org-latex-to-pdf-process)
+ (cmds (if (eq org-export-latex-listings 'minted)
+ ;; automatically add -shell-escape when needed
+ (mapcar (lambda (cmd)
+ (replace-regexp-in-string
+ "pdflatex " "pdflatex -shell-escape " cmd))
+ org-latex-to-pdf-process)
+ org-latex-to-pdf-process))
(outbuf (get-buffer-create "*Org PDF LaTeX Output*"))
(bibtex-p (with-current-buffer lbuf
(save-excursion