org.el (org-format-latex-header): Put DEFAULT-PACKAGES before PACKAGES

* lisp/org.el (org-format-latex-header): Put DEFAULT-PACKAGES before
PACKAGES, as per org-latex-packages-alist's documentation.

`org-format-latex-header' is mostly used to generate in-buffer images
from LaTeX fragments.  For LaTeX document export, the header is
generated by `org-splice-latex-header' ond `org-latex-classes' instead
and the default and documented behaviour is to insert DEFAULT-PACKAGES
before PACKAGES.

See also
https://list.orgmode.org/877d5gg5rt.fsf@localhost/T/#m2ad2f3b1509e1af72016e8e6fad3557ff3083046
This commit is contained in:
Sébastien Miquel 2022-06-13 11:04:34 +02:00 committed by Ihor Radchenko
parent 811deae32d
commit 9fb9a2bdfb
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -3248,8 +3248,8 @@ images at the same place."
(defcustom org-format-latex-header "\\documentclass{article}
\\usepackage[usenames]{color}
\[PACKAGES]
\[DEFAULT-PACKAGES]
\[PACKAGES]
\\pagestyle{empty} % do not remove
% The settings below are copied from fullpage.sty
\\setlength{\\textwidth}{\\paperwidth}