emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] customizing preamble for org-preview-latex-fragment


From: Nick Dokos
Subject: Re: [O] customizing preamble for org-preview-latex-fragment
Date: Sun, 15 Sep 2013 17:56:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Julien Cubizolles <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]