From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Re: [bug] latex export ignores org-export-latex-default-packages-alist? Date: Wed, 26 Jan 2011 16:34:13 +0000 Message-ID: <87d3njaaka.fsf@ucl.ac.uk> References: <87sjwfd6i5.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=55142 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pi8KK-0006cp-DH for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 11:34:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pi8K7-0004e0-CO for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 11:34:27 -0500 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:36541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pi8K7-0004dO-6w for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 11:34:23 -0500 In-Reply-To: (Lawrence Mitchell's message of "Wed, 26 Jan 2011 16:01:52 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Lawrence Mitchell Cc: emacs-orgmode@gnu.org Lawrence Mitchell 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... 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)