* latex command for org-preview-latex-fragment
@ 2011-12-30 15:24 Ista Zahn
2011-12-30 16:06 ` Nick Dokos
2011-12-30 16:37 ` Nick Dokos
0 siblings, 2 replies; 3+ messages in thread
From: Ista Zahn @ 2011-12-30 15:24 UTC (permalink / raw)
To: Emacs-orgmode
Hello all,
I'm having troubel getting org-preview-latex-fragment to work when using
minted for exported code highlighting. Checking the log files in
/tmp/orgtex<...>.log I find that tex fails with the error message "Package
minted Error: You must invoke LaTeX with the -shell-escape flag". OK, that's
helpful, except that I can't figure out where/how to change the tex command
called by org-preview-latex-fragment. Is this configurable in org-mode
settings? Or does it depend on some option in the auctex or preview packages?
Thanks for any help,
Ista
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: latex command for org-preview-latex-fragment
2011-12-30 15:24 latex command for org-preview-latex-fragment Ista Zahn
@ 2011-12-30 16:06 ` Nick Dokos
2011-12-30 16:37 ` Nick Dokos
1 sibling, 0 replies; 3+ messages in thread
From: Nick Dokos @ 2011-12-30 16:06 UTC (permalink / raw)
To: Ista Zahn; +Cc: nicholas.dokos, Emacs-orgmode
Ista Zahn <istazahn@gmail.com> wrote:
> Hello all,
>
> I'm having troubel getting org-preview-latex-fragment to work when using
> minted for exported code highlighting. Checking the log files in
> /tmp/orgtex<...>.log I find that tex fails with the error message "Package
> minted Error: You must invoke LaTeX with the -shell-escape flag". OK, that's
> helpful, except that I can't figure out where/how to change the tex command
> called by org-preview-latex-fragment. Is this configurable in org-mode
> settings? Or does it depend on some option in the auctex or preview packages?
>
I remember flailing about to get everything to work with minted and I
now find out that I did not take notes of what worked :-( However,
looking at my customizations, I find that I have included -shell-escape
in two places:
o org-mode specific: org-latex-to-pdf-process - my setting is the
default of calling pdflatex three times, so I added the -shell-escape
option to each of the three elements in that list. If you are using
texi2dvi, you'll have to do something different: not sure whether you
can pass it as an option, or whether you will need to modify the script
itself.
o auctex specific: TeX-expand-list - I customized an entry in that list to read
,----
| ...
| ("%(mode)"
| (lambda nil
| (if TeX-interactive-mode "" " --shell-escape -interaction=nonstopmode")))
| ...
`----
AFAIK, those are the only changes needed.
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: latex command for org-preview-latex-fragment
2011-12-30 15:24 latex command for org-preview-latex-fragment Ista Zahn
2011-12-30 16:06 ` Nick Dokos
@ 2011-12-30 16:37 ` Nick Dokos
1 sibling, 0 replies; 3+ messages in thread
From: Nick Dokos @ 2011-12-30 16:37 UTC (permalink / raw)
To: Ista Zahn; +Cc: nicholas.dokos, Emacs-orgmode
Ista Zahn <istazahn@gmail.com> wrote:
> I'm having troubel getting org-preview-latex-fragment to work when using
> minted for exported code highlighting. Checking the log files in
> /tmp/orgtex<...>.log I find that tex fails with the error message "Package
> minted Error: You must invoke LaTeX with the -shell-escape flag". OK, that's
> helpful, except that I can't figure out where/how to change the tex command
> called by org-preview-latex-fragment. Is this configurable in org-mode
> settings? Or does it depend on some option in the auctex or preview packages?
>
You might have to do one more thing: if you are going through dvipng,
in org-create-formula-image, there is an explicit call to latex that
might be the one causing you problems. There is no way to deal with this
other than by modifying the function, so if that's indeed what causes your
problem, you should probably submit a bug report.
The call is around line 16927 in org.el and looks like this:
,----
| (condition-case nil
| (progn
| (cd tmpdir)
| (call-process "latex" nil nil nil texfile))
| (error nil))
`----
I think you'd need to modify it to say:
...
(call-process "latex" nil nil nil "-shell-escape" texfile))
...
instead.
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-30 16:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-30 15:24 latex command for org-preview-latex-fragment Ista Zahn
2011-12-30 16:06 ` Nick Dokos
2011-12-30 16:37 ` Nick Dokos
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).