all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Run latex more than once for LaTeX src block evaluation
@ 2024-03-21 22:55 Michael
  2024-03-22 12:56 ` Ihor Radchenko
  2024-03-24  8:04 ` Max Nikulin
  0 siblings, 2 replies; 18+ messages in thread
From: Michael @ 2024-03-21 22:55 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-06-10 14:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 22:55 [PATCH] Run latex more than once for LaTeX src block evaluation Michael
2024-03-22 12:56 ` 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.