emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] latex command for org-preview-latex-fragment


From: Nick Dokos
Subject: Re: [O] latex command for org-preview-latex-fragment
Date: Fri, 30 Dec 2011 11:37:36 -0500

Ista Zahn <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]