[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] PATCH: New options for latex src code export
From: |
Bastien |
Subject: |
Re: [Orgmode] PATCH: New options for latex src code export |
Date: |
Wed, 16 Feb 2011 12:12:27 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi Dan,
Dan Davison <address@hidden> writes:
> My questions are
>
> 1. It would be nice if users didn't have to worry about step 4. Can
> anyone suggest a sensible way to have the "-shell-escape" option
> passed to pdflatex under the appropriate circumstances? These
> conditions include:
> 1. minted is being used for export
> 2. pdflatex is being used, a.o.t. e.g. rubber or some other latex
> make tool.
A bit hackish, but maybe the attached patch would do?
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index c558043..f9b2c1c 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -984,7 +984,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
--
Bastien