emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Lawrence Mitchell <wence@gmx.li>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: [bug] latex export ignores org-export-latex-default-packages-alist?
Date: Wed, 26 Jan 2011 16:34:13 +0000	[thread overview]
Message-ID: <87d3njaaka.fsf@ucl.ac.uk> (raw)
In-Reply-To: <m362tbac27.fsf@e4300lm.epcc.ed.ac.uk> (Lawrence Mitchell's message of "Wed, 26 Jan 2011 16:01:52 +0000")

Lawrence Mitchell <wence@gmx.li> writes:

> Eric S Fraga wrote:
>
>> I need to use the amsmath package for a paper I am writing.  This
>> conflicts, unfortunately, with the wasysym package which is loaded by
>> default in the org-latex exporter.
>
>> Checking the documentation for org-export-latex-classes, I find:
>
>> ,----
>> | - Calls to \usepackage for all packages mentioned in the variables
>> |   `org-export-latex-default-packages-alist' and
>> |   `org-export-latex-packages-alist'.  Thus, your header definitions should
>> |   avoid to also request these packages.
>> `----
>
>> I then checked out the first of these lists and customised it (first, by
>> hand, then by emacs's own customisation method) to turn off the
>> inclusion of wasysym.  The value of the variable, upon restarting emacs
>> just to make sure, is:
>
> [...]
>
>> If SNIPPET-FLAG is t, the package also needs to be included when
>> compiling LaTeX snippets into images for inclusion into HTML.
>
> You've set SNIPPET-FLAG to nil for wasysym, but this means
> that wasysym will not be included for compiling latex snippets.
> When producing the whole document it will still be included.

Ahhh, I missed this.  Too much reading today and I obviously didn't
concentrate enough on this bit... <blush>

I guess I should have simply deleted that entry from the list now that I
better understand (I think ;-) the settings in this variable.

> To use wasysym along with amsmath, you need to pass the
> "integrals" option to wasysym.
>
> To do this, customize the options list of the wasysym entry to be
>  ("integrals" "wasysym" t)
>
> rather than
>  ("" "wasysym" t)
>
> This is what I do to use amsmath in Org exports:
>
> | (add-to-list 'org-export-latex-packages-alist '("" "amsmath" t))
> | (setcar (rassoc '("wasysym" t) org-export-latex-default-packages-alist)
> |         "integrals")
>
> The latter has to be done after loading org-latex.

Perfect!  A bit "magical incantation" at first glance but it makes
sense.  I've done this and it works like a charm.

Many thanks.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.239.g65ac.dirty)

  reply	other threads:[~2011-01-26 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 15:33 [bug] latex export ignores org-export-latex-default-packages-alist? Eric S Fraga
2011-01-26 16:01 ` Lawrence Mitchell
2011-01-26 16:34   ` Eric S Fraga [this message]
2011-01-26 16:06 ` Sébastien Vauban
2011-01-26 17:28   ` Eric S Fraga
2011-01-26 16:27 ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3njaaka.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=wence@gmx.li \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).