From: Michael <sp1ff@runbox.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Run latex more than once for LaTeX src block evaluation
Date: Thu, 21 Mar 2024 15:55:12 -0700 [thread overview]
Message-ID: <868r2bw5qh.fsf@runbox.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
Hello,
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: lisp/org.el (org-preview-latex-process-alist): Run latex multiple times --]
[-- Type: text/x-patch, Size: 2852 bytes --]
From 7b297f61ee6dfb74e64c9b2a706982638a69e7f0 Mon Sep 17 00:00:00 2001
From: Michael Herstine <sp1ff@pobox.com>
Date: Thu, 21 Mar 2024 15:50:27 -0700
Subject: [PATCH] lisp/org.el (org-preview-latex-process-alist): Run latex
multiple times
* lisp/org.el (org-preview-latex-process-alist): Run latex three
times by default
It is sometimes necessary to run latex more than once against a
given .tex file; something ably explained in the docstring for
`org-latex-pdf-process', which exports LaTeX by running latex
three times (by default). This patch brings
`org-preview-latex-process-alist' into parity with that variable,
running latex three times by default when previewing LaTeX.
---
lisp/org.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index caddf22a1..73b6a1e0a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3300,7 +3300,9 @@ All available processes and theirs documents can be found in
:image-input-type "dvi"
:image-output-type "png"
:image-size-adjust (1.0 . 1.0)
- :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
+ :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f"
+ "latex -interaction nonstopmode -output-directory %o %f"
+ "latex -interaction nonstopmode -output-directory %o %f")
:image-converter ("dvipng -D %D -T tight -o %O %f")
:transparent-image-converter
("dvipng -D %D -T tight -bg Transparent -o %O %f"))
@@ -3311,7 +3313,9 @@ All available processes and theirs documents can be found in
:image-input-type "dvi"
:image-output-type "svg"
:image-size-adjust (1.7 . 1.5)
- :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
+ :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f"
+ "latex -interaction nonstopmode -output-directory %o %f"
+ "latex -interaction nonstopmode -output-directory %o %f")
:image-converter ("dvisvgm %f --no-fonts --exact-bbox --scale=%S --output=%O"))
(imagemagick
:programs ("latex" "convert")
@@ -3320,7 +3324,9 @@ All available processes and theirs documents can be found in
:image-input-type "pdf"
:image-output-type "png"
:image-size-adjust (1.0 . 1.0)
- :latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
+ :latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f"
+ "pdflatex -interaction nonstopmode -output-directory %o %f"
+ "pdflatex -interaction nonstopmode -output-directory %o %f")
:image-converter
("convert -density %D -trim -antialias %f -quality 100 %O")))
"Definitions of external processes for LaTeX previewing.
--
2.44.0
[-- Attachment #3: Type: text/plain, Size: 32 bytes --]
--
Michael <sp1ff@runbox.com>
next reply other threads:[~2024-03-22 10:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 22:55 Michael [this message]
2024-03-22 12:56 ` [PATCH] Run latex more than once for LaTeX src block evaluation Ihor Radchenko
2024-03-22 17:23 ` Michael
2024-03-23 14:42 ` Ihor Radchenko
2024-04-05 6:41 ` Karthik Chikmagalur
2024-03-24 8:04 ` Max Nikulin
2024-03-24 8:58 ` Ihor Radchenko
2024-03-26 12:13 ` Max Nikulin
2024-03-27 19:34 ` Michael
2024-03-28 12:17 ` Ihor Radchenko
2024-04-05 0:00 ` Michael
2024-04-29 9:24 ` Ihor Radchenko
2024-06-03 14:35 ` Ihor Radchenko
2024-06-09 13:55 ` Michael
2024-06-09 16:59 ` Ihor Radchenko
2024-06-10 14:27 ` Michael
2024-04-05 0:04 ` Michael
2024-05-05 10:44 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=868r2bw5qh.fsf@runbox.com \
--to=sp1ff@runbox.com \
--cc=emacs-orgmode@gnu.org \
--cc=mherstine@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).