Julien Cubizolles <j.cubizol...@free.fr> writes:

> How can I change the default packages used in the latex file generated
> by org-preview-latex-fragment ?
>

They are produced by the function org-create-formula--latex-header,
which uses  the variables

      org-latex-default-packages-alist
      org-latex-packages-alist

to construct the header of the latex file. These two have the same
format: they are both lists of three-element sublists, where each
sublist is of the form:

    ("options" "package" snippet-flag)

Note the snippet-flag. See the docstrings of the variables for
more details.

If the package you want to include is missing completely from these two
lists, then add it to the second variable above with a snippet-flag
setting of ``t'':

--8<---------------cut here---------------start------------->8---
(add-to-list 'org-latex-packages-alist
             '("options" "package" t))
--8<---------------cut here---------------end--------------->8---

If the package is included in one of them (probably the default list)
but has been banned from being included in a snippet (by setting its
snippet-flag to nil), then unban it by setting the flag to ``t''. It's
probably best to do that through the customize interface.

Untested, but I can't imagine anything going wrong - famous last words
:-) ...

-- 
Nick


Reply via email to