2

\LaTeX seems to remember earlier stated options. How can I reset this?

    ! LaTeX Error: Option clash for package glossaries.
    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help.
    ...
    l.14
    The package glossaries has already been loaded with options        
    [nonumberlist,toc,acronym,xindy]
    There has now been an attempt to load it with options
    [ nonumberlist, acronym, toc, section]
    Adding the global options:
    nonumberlist,toc,acronym,xindy, nonumberlist, acronym, toc, section
    to your \documentclass declaration may fix this.
    Try typing <return> to proceed.
  • 3
    You can not reset it, the package is not reloaded a second time, you just need to load the package earlier with the combined option list – David Carlisle Sep 16 '13 at 16:37

2 Answers2

1

As David mentioned in his comment, you can't reload a package (\usepackage will skip any packages that have already been loaded), but with glossaries it's possible to change some of the options after the package has been loaded using \setupglossaries (described in the Setting Options After the Package is Loaded section of the user manual). So you can, for example, do:

\setupglossaries{nonumberlist,toc,section}

But the acronym and xindy/makeindex options (along with some others) can't be changed after the package has been loaded.

Nicola Talbot
  • 41,153
  • Old question and no longer relevant for me, but thx for answering. The problem was caused by an included config file I overlooked. That file had already included those packages. – Eriksore May 03 '14 at 22:10
1

With the command \PassOptionsToPackage, you can choose options before loading the package for the first time: if necessary even before your \documentclass preamble, in case that is where the package is loaded.

Example:

\PassOptionsToPackage[nonumberlist, acronym, toc, section]{glossaries}
\documentclass{article}

To my understanding, it adds to the option list, it does not override further options.

More info here

ggll
  • 153