emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Run latex more than once for LaTeX src block evaluation


From: Michael
Subject: Re: [PATCH] Run latex more than once for LaTeX src block evaluation
Date: Thu, 04 Apr 2024 17:00:38 -0700
User-agent: mu4e 1.6.10; emacs 30.0.50


Ihor Radchenko <yantar92@posteo.net> writes:

Michael <sp1ff@runbox.com> writes:

Should we perhaps have different variables for preview & Org
source block evaluation?

Likely yes.

In fact, ob-latex is making use of `org-preview-latex-process-alist' only in a single cond branch in `org-babel-execute:latex' - when we have
:file foo.png

However, that branch assumes that `org-preview-latex-default-process' is 'dvipng (the default value). If one changes it to, say dvisvgm, the
generated image will not be a .png image:

(setq org-preview-latex-default-process 'dvisvgm)

#+begin_src latex :results file link :file test.png
x^2
#+end_src

#+RESULTS:
[[attachment:test.png]]

^ This is actually an svg image, renamed to "test.png".

So, it makes sense for `org-babel-execute:latex' to override
`org-preview-latex-default-process' temporarily, to something actually
generating .png file.

Sorry-- got sidetracked by something else. I see what you
mean. OK, so the proposal is: change the ".png" branch in
`org-babel-execute:latex' to override `org-preview-process-alist'
with something that will:

 - actually produce a PNG formatted file
 - by default, run latex more than once, tho this could of
 - course be customized

--
Michael <mherstine@pobox.com>



reply via email to

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