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: Ihor Radchenko
Subject: Re: [PATCH] Run latex more than once for LaTeX src block evaluation
Date: Thu, 28 Mar 2024 12:17:08 +0000

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.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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