diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index b2e113cc7..4b0b77ca8 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -18,16 +18,23 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org. # require user action for most Org mode users. # Sorted from most important to least important. +** New features + +# We list the most important features, and the features that may +# require user action to be used. + ** New and changed options # Chanes deadling with changing default values of customizations, # adding new customizations, or changing the interpretation of the # existing customizations. -** New features +*** The default value of ~org-babel-latex-process-alist~ is no longer taken from ~org-preview-latex-process-alist~ -# We list the most important features, and the features that may -# require user action to be used. +The default value used to be pulled from =dvipng= process type from +~org-preview-latex-process-alist~. Now, it defaults to using +=latexmk= (when available), or running =latex= multiple times, so that +all the references are resolved in the generated png. ** New functions and changes in function arguments diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el index 58051fae1..b72ca0625 100644 --- a/lisp/ob-latex.el +++ b/lisp/ob-latex.el @@ -130,14 +130,26 @@ exporting the literal LaTeX source." :type '(repeat (string))) (defcustom org-babel-latex-process-alist - `(,(cons 'png (alist-get 'dvipng org-preview-latex-process-alist))) + `((png :programs ("latex" "dvipng") :description "dvi > png" + :message + "you need to install the programs: latex and dvipng." + :image-input-type "dvi" :image-output-type "png" + :image-size-adjust (1.0 . 1.0) :latex-compiler + ,(if (executable-find "latexmk") + '("latexmk -f -pdf -latex -interaction=nonstopmode -output-directory=%o %f") + '("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"))) "Definitions of external processes for LaTeX result generation. See `org-preview-latex-process-alist' for more details. The following process symbols are recognized: - `png' :: Process used to produce .png output." :group 'org-babel - :package-version '(Org . "9.7") + :package-version '(Org . "9.8") :type '(alist :tag "LaTeX to image backends" :value-type (plist)))