The purpose of this document is to provide advice if you want to convert a LATEX document from using the obsolete glossary package to the replacement glossaries package.
The glossary package started out as an example in a tutorial, but I decided that I may as well package it up and upload it to CTAN. Unfortunately it was fairly rigid and unable to adapt well to the wide variation in glossary styles. Users began making requests for enhancements, but with each enhancement the code became more complicated and bugs crept in. Each x in one place seemed to cause another problem elsewhere. In the end, it was taking up too much of my time to maintain, so I decided to replace it with a much better designed package. With the new glossaries package:
When converting a document that currently uses the obsolete glossary package to the replacement glossaries package, it should be fairly obvious that the rst thing you need to do is replace \usepackage{glossary} with \usepackage{glossaries}, however some of the package options are di erent, so you may need to change those as well. Table 1 shows the mappings from the glossary to the glossaries package options.
glossary option | glossaries option |
style=list | style=list |
style=altlist | style=altlist |
style=long,header=none,border=none,cols=2 | style=long |
style=long,header=plain,border=none,cols=2 | style=longheader |
style=long,header=none,border=plain,cols=2 | style=longborder |
style=long,header=plain,border=plain,cols=2 | style=longheaderborder |
style=long,header=none,border=none,cols=3 | style=long3col |
style=long,header=plain,border=none,cols=3 | style=long3colheader |
style=long,header=none,border=plain,cols=3 | style=long3colborder |
style=long,header=plain,border=plain,cols=3 | style=long3colheaderborder |
style=super,header=none,border=none,cols=2 | style=super |
style=super,header=plain,border=none,cols=2 | style=superheader |
style=super,header=none,border=plain,cols=2 | style=superborder |
style=super,header=plain,border=plain,cols=2 | style=superheaderborder |
style=super,header=none,border=none,cols=3 | style=super3col |
style=super,header=plain,border=none,cols=3 | style=super3colheader |
style=super,header=none,border=plain,cols=3 | style=super3colborder |
style=super,header=plain,border=plain,cols=3 | style=super3colheaderborder |
number=none | nonumberlist |
number=hcounter namei | counter=hcounter namei |
toc | toc |
hypertoc | toc |
hyper | no corresponding option |
section=true | section |
section=false | no corresponding option |
acronym | acronym |
global | no corresponding option |
If you have created new glossary types, you will need to replace all instances of
The hold style listi optional argument can be converted to hnew stylei using the same mapping given in Table 1.
For example, if your document contains the following:
You will need to replace the above two lines with:
in the preamble and
immediately prior to displaying this glossary. Alternatively, you can specify the style using the style key in the optional argument of \printglossary. For example:
Note that the glossary title is no longer speci ed using \hglossary-typeiname (except for \glossaryname and \acronymname) but is instead speci ed in the htitlei argument of \newglossary. The short title which is speci ed in the glossary package by the command \shorthglossary-nameiname is now speci ed using the toctitle key in the optional argument to \printglossary.
All instances of \makehglossary namei (e.g. \makeglossary and \makeacronym) should be replaced by the single command \makeglossaries. For example, if your document contained the following:
then you should replace both lines with the single line:
With the old glossary package you could optionally store glossary information for later use, or you could simply use \glossary whenever you wanted to add information to the glossary. With the new glossaries package, the latter option is no longer available.3 If you have stored all the glossary information using \storeglosentry, then you will need to convert these commands into the equivalent \newglossaryentry. If you have only used \glossary, then see