From 288b7a34a38e9ddb9e922faa48c3efddbde0a944 Mon Sep 17 00:00:00 2001
From: Karl Berry
- Abstract The purpose of this document is to provide advice if you want to convert a
- LAT
+ Abstract 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
+class="cmr-9">EX document from using the obsolete glossary package to the
glossaries package.
+class="cmr-9">replacement glossaries package.
+
Upgrading from the glossary package to the
glossaries package
+class="cmr-12">Nicola L.C. Talbot
Contents
2 Package Options
+href="#packageoptions" id="QQ2-1-3">Package Options
3 De ning new glossary types
+href="#definingnewglossarytypes" id="QQ2-1-5">Defining new glossary types
4 \make
5 Storing glossary information
+href="#storingglossaryinformation" id="QQ2-1-7">Storing glossary information
6 Adding an entry to the glossary
+href="#addinganentrytotheglossary" id="QQ2-1-8">Adding an entry to the glossary
6.1 \useglosentry
+class="cmtt-10">\useglosentry
6.2 \useGlosentry
+class="cmtt-10">\useGlosentry
6.3 \gls
+class="cmtt-10">\gls
6.4 \glossary
-
7 Acronyms
+class="cmtt-10">\glossary
+
7 Acronyms
7.1 \acrln and \acrsh
+class="cmtt-10">\acrln and \acrsh
7.2 \ifacronymfirstuse
+class="cmtt-10">\ifacronymfirstuse
7.3 \resetacronym and \unsetacronym
+class="cmtt-10">\resetacronym and \unsetacronym
8 Displaying the glossary
+href="#displayingtheglossary" id="QQ2-1-17">Displaying the glossary
9 Processing Your Document
+href="#processingyourdocument" id="QQ2-1-18">Processing Your Document
10 Troubleshooting
+href="#troubleshooting" id="QQ2-1-19">Troubleshooting
Index
+href="#index">Index
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: +
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 fix 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 +
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 +class="cmss-10">glossaries package, it should be fairly obvious that the first thing you need +to do is replace \usepackage{glossary} with \usepackage{glossaries}, however +some of the package options are different, so you may need to change those as +well. Table 1 shows the mappings from the glossary to the glossaries package options.
+
If you have created new glossary types, you will need to replace all instances of -
If you have created new glossary types, you will need to replace all instances +of +
The
For example, if your document contains the following: +
The <old style list> optional argument can be converted to <new style> using the +same mapping given in Table 1. +
For example, if your document contains the following:
@@ -596,7 +616,7 @@ href="#x1-30011">1.
\newglossarytype[nlg]{notation}{not}{ntn}[style=long,header]
\newcommand{\notationname}{Index of Notation}
You will need to replace the above two lines with: +
You will need to replace the above two lines with: @@ -604,7 +624,7 @@ href="#x1-30011">1.
in the preamble and +
in the preamble and @@ -612,12 +632,13 @@ href="#x1-30011">1.
immediately prior to displaying this glossary. Alternatively, you can specify the style using
-the style immediately prior to displaying this glossary. Alternatively, you can specify the
+style using the style key in the optional argument of \printglossary. For example:
+class="cmtt-10">\printglossary. For
+example:
@@ -625,48 +646,58 @@ class="ec-lmtt-10">\printglossary
\printglossary[type=notation,style=longheader]
-
Note that the glossary title is no longer speci ed using \
+ Note that the glossary title is no longer specified using \<glossary-type>name
+(except for \glossaryname and \acronymname) but is instead speci ed in the
+
All instances of \make
All instances of \make<glossary name> (e.g. \makeglossary and \makeacronym) should be
-replaced by the single command \makeglossaries. For example, if your document
-contained the following:
+class="cmtt-10">\makeacronym)
+should be replaced by the single command \makeglossaries. For example, if your
+document contained the following:
@@ -675,7 +706,7 @@ contained the following:
\makeglossary
\makeacronym
then you should replace both lines with the single line: +
then you should replace both lines with the single line: @@ -683,112 +714,138 @@ contained the following:
-
+
+
-
With the old glossary package you could optionally store glossary information for later use, -or you could simply use \glossary
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 +class="cmss-10">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\storeglosentry, then you will +need to convert these commands into the equivalent \newglossaryentry. If you have +only used \glossary, then see