From: Bastien <bastien.guerry@wikimedia.fr>
To: Dan Davison <dandavison7@gmail.com>
Cc: emacs org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: PATCH: New options for latex src code export
Date: Wed, 16 Feb 2011 12:12:27 +0100 [thread overview]
Message-ID: <87hbc4teqs.fsf@gnu.org> (raw)
In-Reply-To: <m1ipx2rzo2.fsf@gmail.com> (Dan Davison's message of "Wed, 02 Feb 2011 19:42:37 +0000")
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Hi Dan,
Dan Davison <dandavison7@gmail.com> 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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-latex-add-shell-escape-pdflatex.patch --]
[-- Type: text/x-patch, Size: 779 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
[-- Attachment #4: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2011-02-16 16:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 19:42 PATCH: New options for latex src code export Dan Davison
2011-02-16 11:12 ` Bastien [this message]
2011-06-11 20:48 ` Dan Davison
2011-02-17 14:20 ` Mike McLean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hbc4teqs.fsf@gnu.org \
--to=bastien.guerry@wikimedia.fr \
--cc=dandavison7@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).