I have a small patch for `org-preview-latex-process-alist'
making
the default setting for LaTeX source block evaluation be
running
latex three times (instead of the current one). It is sometimes
necessary to run latex more than once to produce the final
document, a phenomenom described in the docstring for
`org-latex-pdf-process' which itself runs latex three times by
default. This patch just brings the former variable into parity
with the latter.
Thanks for the patch!
May you please describe a use case when it is necessary to run
latex
multiple times for previews?
Sure: it's required whenever you have LaTeX that refers to
other document elements whose positions are only known after
they've been typeset. This often comes up with bibliographies; to
quote the docstring for `org-latex-pdf-process': "The reason why
this is a list is that it usually takes several runs of
‘pdflatex’, maybe mixed with a call to ‘bibtex’."
I personally encountered it when using the tikzmark library from
the tikzpicture package to draw annotations on a table (LaTeX
needed to be run once to typeset the table & only then did it
"know" where the arrows needed to be drawn).
Oh-- and it's not just previews (sorry if I gave that
impression)-- it's also required for "evaluating" LaTeX source
blocks.
CCing Timothy and Kathik - I see that
https://code.tecosaur.net/tec/org-mode/src/branch/dev/lisp/org-latex-preview.el#L102
still uses a single compiler invocation.
--
Michael <mherst...@pobox.com>