emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] latex export ignores org-export-latex-default-packages-alist?
@ 2011-01-26 15:33 Eric S Fraga
  2011-01-26 16:01 ` Lawrence Mitchell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Eric S Fraga @ 2011-01-26 15:33 UTC (permalink / raw)
  To: Emacs Org mode mailing list

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:

--8<---------------cut here---------------start------------->8---
org-export-latex-default-packages-alist is a variable defined in `org.el'.
Its value is shown below.

Documentation:
Alist of default packages to be inserted in the header.
Change this only if one of the packages here causes an incompatibility
with another package you are using.
The packages in this list are needed by one part or another of Org-mode
to function properly.

- inputenc, fontenc:  for basic font and character selection
- textcomp, marvosymb, wasysym, latexsym, amssym: for various symbols used
  for interpreting the entities in `org-entities'.  You can skip some of these
  packages if you don't use any of the symbols in it.
- graphicx: for including images
- float, wrapfig: for figure placement
- longtable: for long tables
- hyperref: for cross references

Therefore you should not modify this variable unless you know what you
are doing.  The one reason to change it anyway is that you might be loading
some other package that conflicts with one of the default packages.
Each cell is of the format ( "options" "package" snippet-flag).
If SNIPPET-FLAG is t, the package also needs to be included when
compiling LaTeX snippets into images for inclusion into HTML.

You can customize this variable.

Value: (("AUTO" "inputenc" t)
 ("T1" "fontenc" t)
 ("" "fixltx2e" nil)
 ("" "graphicx" t)
 ("" "longtable" nil)
 ("" "float" nil)
 ("" "wrapfig" nil)
 ("" "soul" t)
 ("" "textcomp" t)
 ("" "marvosym" t)
 ("" "wasysym" nil)
 ("" "latexsym" t)
 ("" "amssymb" t)
 ("" "hyperref" nil)
 "\\tolerance=1000")

Original value was 
(("AUTO" "inputenc" t)
 ("T1" "fontenc" t)
 ("" "fixltx2e" nil)
 ("" "graphicx" t)
 ("" "longtable" nil)
 ("" "float" nil)
 ("" "wrapfig" nil)
 ("" "soul" t)
 ("" "textcomp" t)
 ("" "marvosym" t)
 ("" "wasysym" t)
 ("" "latexsym" t)
 ("" "amssymb" t)
 ("" "hyperref" nil)
 "\\tolerance=1000")
--8<---------------cut here---------------end--------------->8---

Note that wasysym is turned off in the setting I have.  However, when I
export my org file, I find.

,----
| ...
| \usepackage{marvosym}
| \usepackage{wasysym}
| \usepackage{latexsym}
| ...
`----

I am confused.  I was trying to avoid setting the full export
information manually but I may have to.

Any suggestions?  Am I doing something incredibly silly?

Thanks,
Eric

-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug] latex export ignores org-export-latex-default-packages-alist?
  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
  2011-01-26 16:06 ` Sébastien Vauban
  2011-01-26 16:27 ` Eric S Fraga
  2 siblings, 1 reply; 6+ messages in thread
From: Lawrence Mitchell @ 2011-01-26 16:01 UTC (permalink / raw)
  To: emacs-orgmode

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.

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.

[...]

Cheers,
Lawrence

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug] latex export ignores org-export-latex-default-packages-alist?
  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:06 ` Sébastien Vauban
  2011-01-26 17:28   ` Eric S Fraga
  2011-01-26 16:27 ` Eric S Fraga
  2 siblings, 1 reply; 6+ messages in thread
From: Sébastien Vauban @ 2011-01-26 16:06 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

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.
>
> [...]
>
> You can customize this variable.
>
> Value: (("AUTO" "inputenc" t)
>  ("T1" "fontenc" t)
>  ("" "fixltx2e" nil)
>  ("" "graphicx" t)
>  ("" "longtable" nil)
>  ("" "float" nil)
>  ("" "wrapfig" nil)
>  ("" "soul" t)
>  ("" "textcomp" t)
>  ("" "marvosym" t)
>  ("" "wasysym" nil)
>  ("" "latexsym" t)
>  ("" "amssymb" t)
>  ("" "hyperref" nil)
>  "\\tolerance=1000")
>
> Original value was 
> (("AUTO" "inputenc" t)
>  ("T1" "fontenc" t)
>  ("" "fixltx2e" nil)
>  ("" "graphicx" t)
>  ("" "longtable" nil)
>  ("" "float" nil)
>  ("" "wrapfig" nil)
>  ("" "soul" t)
>  ("" "textcomp" t)
>  ("" "marvosym" t)
>  ("" "wasysym" t)
>  ("" "latexsym" t)
>  ("" "amssymb" t)
>  ("" "hyperref" nil)
>  "\\tolerance=1000")
>
> Note that wasysym is turned off in the setting I have.  However, when I
> export my org file, I find.
>
> ,----
> | ...
> | \usepackage{marvosym}
> | \usepackage{wasysym}
> | \usepackage{latexsym}
> | ...
> `----

For test purpose, a silly workaround: what about removing the line?  That way,
we could see if either:

- the nil option is not respected,
- the t option comes from somewhere else..

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug] latex export ignores org-export-latex-default-packages-alist?
  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:06 ` Sébastien Vauban
@ 2011-01-26 16:27 ` Eric S Fraga
  2 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2011-01-26 16:27 UTC (permalink / raw)
  To: Emacs Org mode mailing list

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> 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.

[...]

I forgot to state what version of org I was using; see my signature
below.  Thanks again.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: [bug] latex export ignores org-export-latex-default-packages-alist?
  2011-01-26 16:01 ` Lawrence Mitchell
@ 2011-01-26 16:34   ` Eric S Fraga
  0 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2011-01-26 16:34 UTC (permalink / raw)
  To: Lawrence Mitchell; +Cc: emacs-orgmode

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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: [bug] latex export ignores org-export-latex-default-packages-alist?
  2011-01-26 16:06 ` Sébastien Vauban
@ 2011-01-26 17:28   ` Eric S Fraga
  0 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2011-01-26 17:28 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Hi Eric,
>

[...]

> For test purpose, a silly workaround: what about removing the line?  That way,
> we could see if either:
>
> - the nil option is not respected,
> - the t option comes from somewhere else..
>
> Best regards,
>   Seb

No need. the problem was my lack of careful reading of the documentation
and assuming that the third argument indicated whether the package
should be included or not; in fact, it indicates whether it should be
used for latex snippets.

Thanks,
eric

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-26 17:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2011-01-26 16:06 ` Sébastien Vauban
2011-01-26 17:28   ` Eric S Fraga
2011-01-26 16:27 ` Eric S Fraga

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).