From 0887c6f2b1a0b1727a1643ca172ddc574d750358 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 26 Jul 2006 22:34:14 +0000 Subject: glossary 2.4 (26jul06) git-svn-id: svn://tug.org/texlive/trunk@1927 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/glossary/CHANGES | 18 + Master/texmf-dist/doc/latex/glossary/README | 4 +- Master/texmf-dist/doc/latex/glossary/glossary.pdf | Bin 321727 -> 418573 bytes Master/texmf-dist/doc/latex/glossary/makeglos.pl | 16 +- Master/texmf-dist/doc/latex/glossary/manual.html | 2008 ++++++++++-------- Master/texmf-dist/doc/latex/glossary/sample.tex | 36 +- .../texmf-dist/doc/latex/glossary/sample4col.tex | 12 +- Master/texmf-dist/doc/latex/glossary/sampleAcr.tex | 23 +- Master/texmf-dist/doc/latex/glossary/sampleEq.tex | 173 +- .../texmf-dist/doc/latex/glossary/sampleEqPg.tex | 192 +- Master/texmf-dist/doc/latex/glossary/sampleNtn.tex | 18 +- .../texmf-dist/doc/latex/glossary/sampleNtn2.tex | 28 +- Master/texmf-dist/doc/latex/glossary/sampleSec.tex | 30 +- .../texmf-dist/source/latex/glossary/glossary.dtx | 2239 +++++++++++++------- .../texmf-dist/source/latex/glossary/glossary.ins | 2 +- Master/texmf-dist/tex/latex/glossary/glossary.sty | 685 +++--- Master/texmf-dist/tpm/glossary.tpm | 10 +- 17 files changed, 3228 insertions(+), 2266 deletions(-) diff --git a/Master/texmf-dist/doc/latex/glossary/CHANGES b/Master/texmf-dist/doc/latex/glossary/CHANGES index d3b795cf21f..05691178dea 100644 --- a/Master/texmf-dist/doc/latex/glossary/CHANGES +++ b/Master/texmf-dist/doc/latex/glossary/CHANGES @@ -1,5 +1,23 @@ glossary.sty history: + * Version 2.4: fixed problems caused by \@sanitize. + Extended package option "number" to be used with + any counter (not just page or section). Added + number key to \setglossarystyle. Removed + some redundant code. Fixed problems caused with + hyperlinks when using a mixture of counters for + individual entries. Added extra \hyper page + formats. Added hook to provide a sub header when + using a tabular style glossary. Added means of + specifying a column header for page list column. + Added facility to insert text between groups. + Fixed bug in documentation when omitting \OnlyDescription + + *** Note that if you update to version 2.4, it *** + *** is advisable to delete your .gls etc files *** + *** before recompiling. *** + + * Version 2.38: fixed by where inappropriate spaces are inserted when using xspace package. diff --git a/Master/texmf-dist/doc/latex/glossary/README b/Master/texmf-dist/doc/latex/glossary/README index 976a19f6743..77fea0e17b2 100644 --- a/Master/texmf-dist/doc/latex/glossary/README +++ b/Master/texmf-dist/doc/latex/glossary/README @@ -1,6 +1,6 @@ -LaTeX Package : glossary v 2.38 +LaTeX Package : glossary v 2.4 -Last Modified : 9th July 2006 +Last Modified : 20th July 2006 Author : Nicola Talbot diff --git a/Master/texmf-dist/doc/latex/glossary/glossary.pdf b/Master/texmf-dist/doc/latex/glossary/glossary.pdf index b9251bbad73..e74d20b2161 100644 Binary files a/Master/texmf-dist/doc/latex/glossary/glossary.pdf and b/Master/texmf-dist/doc/latex/glossary/glossary.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossary/makeglos.pl b/Master/texmf-dist/doc/latex/glossary/makeglos.pl index 456001bc7fb..0b3cb56f008 100644 --- a/Master/texmf-dist/doc/latex/glossary/makeglos.pl +++ b/Master/texmf-dist/doc/latex/glossary/makeglos.pl @@ -2,7 +2,7 @@ # File : makeglos # Author : Nicola Talbot -# Version : 1.4 (2005/11/19) +# Version : 1.5 (2006/07/20) # Description: simple Perl script that calls makeindex. # Intended for use with "glossary.sty" (saves having to remember # all the various switches) @@ -40,7 +40,10 @@ else $name = @ARGV[0]; } +$istfile = "$name.ist"; + # check log file for other glossary types +# and for ist file name if (open AUXFILE, "$name.aux") { @@ -57,6 +60,11 @@ if (open AUXFILE, "$name.aux") print "added glossary type '$2' ($3,$4,$1)\n"; } } + + if (m/\\\@istfilename\s*{([^}]*)}/) + { + $istfile = $1; + } } close AUXFILE; @@ -105,11 +113,7 @@ unless ($opt_p eq "") $mkidxopts .= " -p $opt_p"; } -if ($opt_s eq "") -{ - $istfile = "$name.ist"; -} -else +unless ($opt_s eq "") { $istfile = $opt_s; } diff --git a/Master/texmf-dist/doc/latex/glossary/manual.html b/Master/texmf-dist/doc/latex/glossary/manual.html index 2f01d8d2b57..5cd4cdb85d9 100644 --- a/Master/texmf-dist/doc/latex/glossary/manual.html +++ b/Master/texmf-dist/doc/latex/glossary/manual.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -glossary.sty v 2.38: LaTeX2e Package to Assist Generating Glossaries - +glossary.sty v 2.4: LaTeX2e Package to Assist Generating Glossaries + @@ -23,11 +23,11 @@ original version by: Nikos Drakos, CBLU, University of Leeds

-

glossary.sty v 2.38: LaTeX2e Package to Assist Generating Glossaries

+

glossary.sty v 2.4: LaTeX2e Package to Assist Generating Glossaries

Nicola L.C. Talbot

-

9th July 2006

+

20th July 2006


@@ -37,57 +37,57 @@ Contents @@ -97,7 +97,7 @@ Contents Introduction - The glossary package is provided to assist + The glossary package is provided to assist generating a glossary. It has a certain amount of flexibility, allowing the user to customize the format of the glossary, and define new glossary-style objects. @@ -130,11 +130,13 @@ makeglos.bat along with several sample files. The file glossary.sty should be placed somewhere in the LaTeX path, e.g. -texmf/tex/latex/glossary/. The file -glossary.perl is a LaTeX2HTML style file, and should -be placed in the LaTeX2HTML style file directory (usually +texmf/tex/latex/glossary/ or +localtexmf/tex/latex/glossary/. Remember to update the +TEX database if you are installing this package for the first time. +The file glossary.perl is a LaTeX2HTML style file, and +should be placed in the LaTeX2HTML style file directory (usually latex2html/styles/). The file makeglos.pl -is a Perl script which calls makeindex. If you are +is a Perl script which calls makeindex. If you are using UNIX or Linux, you will need to set the permissions so that you can execute the file:
@@ -142,11 +144,11 @@ chmod a+x makeglos.pl
 
You should then place this file somewhere on your path. (You may also need to edit the first line of -this file, if perl is located in a directory other than /usr/bin/1.) +this file, if perl is located in a directory other than /usr/bin/1.)

-If you are not using UNIX or Linux, you may have to explicitly +If you are not using UNIX or Linux etc, you may have to explicitly load the file into Perl, so you would need to do perl makeglos.pl instead of just makeglos.pl. If you are using Windows, a batch file, makeglos.bat @@ -154,12 +156,12 @@ is provided which will run Perl on makeglos.pl. Both makeglos.pl and makeglos.bat should be placed somewhere specified by the PATH environment variable. (For example, put them both in the same -directory as makeindex, which will probably +directory as makeindex, which will probably be in \texmf\miktex\bin\).

If you don't have Perl installed on your system, you can just use -makeindex, only you will have to remember all the +makeindex, only you will have to remember all the command line switches, and you won't be able to merge entries that have the same name, but different descriptions. @@ -189,19 +191,24 @@ available:

- + + + + - - + + - - + + - - + + - - + +
Key ValueValue
name The entry name
name The entry name
description A description about the entry
description A description about the entry
sort How to sort the entry. (Entry name used if sort omitted)
sort How to sort the entry. (Entry name used if sort omitted)
format How to format the page number
format How to format the page number
number Override the page number with a different +counter. The value should be the name of a counter (e.g. +number=section).
@@ -217,9 +224,18 @@ For example: description={The universal set}, sort=U} -The page format for individual entries can be changed using the -format key. This should be the name of a LaTeX -formatting command without the preceding \ (as with the +Note that you should always use the sort +key if the name key contains commands, this is particularly +important if you are using hyperlinks, as the target is constructed +from the name key if the sort key is omitted. + +

+In the glossary, each entry is followed by a list of page numbers +that correspond to the pages where the relevant \glossary +command is placed. By default the numbers are formatted in the +current font, but the page number format for individual entries can be +changed using the format key. This should be the name of a +LaTeX formatting command without the preceding \ (as with the | operator in \index.) For example:

 \glossary{name={$\mathbb{R}$},
@@ -231,29 +247,71 @@ In addition, the following formats are also available:
 
 
- + - + - + - + - + + + + + + + + + + + + + + + +
hyperrm
hyperrm The number is a hyper link in roman
hypersf
hypersf The number is a hyper link in sans-serif
hypertt
hypertt The number is a hyper link in typewriter font
hyperbf
hyperbf The number is a hyper link in bold
hyperit
hypermdThe number is a hyper link in medium weight
hyperit The number is a hyper link in italic
hyperslThe number is a hyper link in slanted font
hyperupThe number is a hyper link in upright font
hyperscThe number is a hyper link in small caps
hyperemThe number is a hyper link using \emph
-If the hyper option has not been set, -hyperrm etc are equivalent to textrm etc. -You should use \hyperrm instead of -\hyperpage, as \hyperpage won't +If the hyper option has not been set, +hyperem is equivalent to emph, and the remaining +hyperrm etc are equivalent to textrm etc. +Note that it is important the you use hyperrm instead of +hyperpage, as the \hyperpage command won't work on a list or range of numbers in the glossary2. + HREF="#foot1559">2. If you want to define your +own command that uses hyper links, it must be defined in an +analogous manner to \hyperrm. For example, if you want +to display a page number in a bold italic format, that contains a +hyperlink to the appropriate page, you would need to define it as +follows: +
+\newcommand{\hyperbfit}[2][\gls@number]{%
+\textbf{\itshape\glshyper{#1}{#2}}}
+
+As can be seen from the definition, all the \hyperxx +commands have an optional argument. This argument is the name of the +counter being used. You do not need to worry about this argument if +you only use these commands within the \glossary command. +So the previous example can simply be rewritten as: +
+\glossary{name={$\mathbb{R}$},
+          description={The set of real numbers},
+          sort=R,
+          format=hyperbf}
+
+ +

+Note: although the numbers in the glossary are referred to +as ``page'' numbers in this manual, they may in fact refer to some +other counter, such as the section counter, depending on +whether the number key has been used.

As with the \index command, care must be taken if you @@ -276,8 +334,8 @@ As from version 2.14, there is an additional command available:

This is equivalent to -text\glossary{gls-entry}, -where text will be made a hyperlink to the +text\glossary{gls-entry}, +where text will be made a hyper link to the relevant entry in the glossary, if hyper links are supported. @@ -287,6 +345,16 @@ links are supported. Storing Glossary Information +

+It is very cumbersome having to use the \glossary command +throughout your document, every time you use a term that you want in +your glossary. This is particularly true for terms with a long +description. The glossary package provides a means +of storing the glossary information at the beginning of the document, +and then using it whenever required. It is strongly recommended +that you use this approach, rather than explicity using the +\glossary command. +

The following command:
@@ -294,22 +362,24 @@ The following command:

-can be used to store glossary information. That information +can be used to store glossary information, where label is +a unique label assigned to this entry. The information can then be used later with any of the following commands: -
-
\useglosentry[ opt]{ label} +
+ +\useglosentry[ opt]{ label}
\useGlosentry[
opt]{ label}{ text}
\gls[
opt]{ label}
-
\useglosentry adds the stored glossary entry -gls-entry to the appropriate glossary, -\useGlosentry adds the stored glossary entry, and +
\useglosentry adds the glossary entry whose label is given by +label to the appropriate glossary, +\useGlosentry adds the glossary entry, and makes text a hyperlink to that entry (if hyperlinks are supported). The third command, \gls, is like \useGlosentry, but forms text from the name -given in gls-entry. +given in the glossary entry.

Returning to an earlier example, instead of typing: @@ -322,13 +392,13 @@ every time you want to add this entry to the glossary, you can instead store the information:

-\storeglosentry{glos:U}{name={$\protect\mathcal{U}$},
+\storeglosentry{glos:U}{name={$\mathcal{U}$},
           description={The universal set},
           sort=U}
 
-(Note the use of \protect.) Now, instead of continually -copying and pasting the glossary command for this entry (which -can have quite a large description field), you can use either: +Now, instead of continually copying and pasting the glossary command +for this entry (which can have quite a large description +field), you can use either:
 \useglosentry{glos:U}
 
@@ -358,13 +428,40 @@ which is equivalent to: description={The universal set}, sort=U}{$\mathcal{U}$}
-The optional argument gls-type indicates the glossary -type (see later to find out how to define new +If you want to use glossary entries in an equation, it is better +to use \ensuremath instead of $...$. +For example: +
+\storeglosentry{Gamma}{name=\ensuremath{\Gamma(z)},
+description=Gamma function,
+sort=Gamma}
+
+You can then use this entry in either text or math mode: +
+The \useGlosentry{Gamma}{Gamma function} is defined as
+\begin{equation}
+\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt
+\end{equation}
+
+If you are using hyper links, and you want to use +\useGlosentry within math mode, you must use +\ensuremath: +
+\begin{equation}
+\useGlosentry{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x)
+\end{equation}
+
+ +

+The optional argument to \storeglosentry (gls-type) +indicates the glossary type (see +later to find out how to define new glossary types). If omitted, the standard glossary is used.

-The optional argument opt allows you to add additional -information to the glossary entry, for example: +The optional argument to \useglosentry, +\useGlosentry and \gls (opt) allows you to +add additional information to the glossary entry, for example:

 \useglosentry[format=textbf]{glos:U}
 
@@ -375,10 +472,10 @@ is equivalent to: sort=U, format=textbf} -The identifying label, label, should not contain any -special characters, and since \storeglosentry is -fragile, care should be taken when using commands within its -argument. If in doubt, use \protect. +Since version 2.4, \storeglosentry is robust, and +\protect should no longer be needed, however +the identifying label, label, should not +contain any special characters.

As from version 2.36, if you want to use all glossary entries @@ -393,80 +490,86 @@ makeglos.pl

-The glossary information (as given by the commands -\glossary and \xglossary) is saved in the file -with the extension glo (unless the -\makeglossary command is omitted, in which case the -glossary information is simply ignored.) A makeindex -style file -(ist) is also created, which is customized for the -document, and can be passed to makeindex. +Whenever a glossary entry is used, either explicity using +\glossary or \xglossary or implicitly using +\useglosentry, \useGlosentry and \gls, +the information is saved in a file with the extension glo +(unless the \makeglossary command is omitted, in which case +the glossary information is simply ignored.) A makeindex +style file +(ist) is also created, which is customized for the +document, and can be passed to makeindex.

For example, suppose your document is called mydoc.tex, the glossary will be saved in the file -mydoc.glo, and the makeindex style -file mydoc.ist will be created. - These files can then be passed to makeindex as follows: +mydoc.glo, and the makeindex style +file mydoc.ist will be created. + These files can then be passed to makeindex as follows:

 makeindex -s mydoc.ist -t mydoc.glg -o mydoc.gls mydoc.glo
 
-which generates the output file mydoc.gls, +which generates the output file mydoc.gls, with transcript written to -mydoc.glg. +mydoc.glg.

-The Perl script makeglos.pl provided with this package -allows you to use makeindex without having to remember +The Perl script makeglos.pl provided with this package +allows you to use makeindex without having to remember all the command line options. The command

-makeglos.pl mydoc.glo
+makeglos.pl mydoc
 
will perform the command:
 makeindex -s mydoc.ist -t mydoc.glg -o mydoc.gls mydoc.glo
 
-The glo extension may be omitted. In addition, -makeglos.pl also takes the option +In addition, makeglos.pl also takes the option -m which can be used to collate entries where the same name has multiple descriptions.

-makeglos.pl has the following syntax: +makeglos.pl has the following syntax:

 makeglos.pl [-ilqrgm] [-s sty] [-o gls] [-t log] [-p num] <filename>
 
where all switches, apart from -m are the same as -those for makeindex. In addition, if the extension -to the input file name is omitted, glo will be -assumed. If there are multiple glossary types (see +those for makeindex. If there are multiple glossary types +(see later) -and the file extension is omitted, makeglos.pl will -iterate through each glossary type. +and the file extension is omitted, makeglos.pl will +iterate through each glossary type (it will pick up the relevant +information from the auxiliary file).

-The name of the ist file can be changed by redefining -the command \istfilename. +The name of the ist file can be changed by redefining +the command \istfilename +before \makeglossary. For example:

 \renewcommand{\istfilename}{foo.ist}
+\makeglossary
 
-However, you will need to explicitly pass the name of this -file to makeglos.pl using the -s switch. +Only one ist file will be created per document, even if +you have multiple glossaries with different styles. The only +circumstance where you will need multiple ist files for +a single document is when you have multiple glossaries that use +different counters with different compositors, but this is rarely +likely to occur.

-Creation of the ist file can be suppressed by issuing +Creation of the ist file can be suppressed by issuing the command \noist before -\makeglossary. It will also be suppressed when the -command \nofiles is used, or if the command -\makeglossary is omitted. +\makeglossary. It will also be suppressed when the +command \nofiles is used, or if the command +\makeglossary is omitted.

It should be noted that there are a few packages that can -cause problems with the creation of the ist file, -for example ngerman. If you encounter problems -when LaTeX is processing the \makeglossary command, -or if you get errors from makeindex complaining about +cause problems with the creation of the ist file, +for example ngerman. If you encounter problems +when LaTeX is processing the \makeglossary command, +or if you get errors from makeindex complaining about the style file, this is the most probable cause. See later for information on how to fix this. @@ -478,12 +581,12 @@ Displaying the Glossary

-Once the gls file has been created by -makeindex (as described in the previous +Once the gls file has been created by +makeindex (as described in the previous section) the glossary can then be included in the document with the command \printglossary. If chapters are defined, the glossary will start -with +with

 \chapter*{\glossaryname}
 
@@ -506,25 +609,25 @@ Package Options The package options must be specified as a comma-separated list of key=value pairs. Available options are:
-
style
+
style
The glossary style. Values: - +
-
list
+
list
use description environment in the glossary
-
altlist
+
altlist
modified -version of style=list. The description starts on the +version of style=list. The description starts on the line following the name of the term being defined.
-
super
+
super
use supertabular environment in the glossary
-
long
+
long
use longtable environment in the glossary (Default)
@@ -532,15 +635,15 @@ line following the name of the term being defined.

-
header
-
Glossary +
header
+
Glossary header. Values:
-
none
+
none
The glossary doesn't have a heading (Default)
-
plain
+
plain
The glossary has a heading
@@ -548,15 +651,15 @@ has a heading

-
border
-
Glossary +
border
+
Glossary border. Values:
-
none
+
none
The glossary doesn't have a border (Default)
-
plain
+
plain
Border around the main body of the glossary
@@ -564,16 +667,16 @@ around the main body of the glossary

-
cols
-
Number of +
cols
+
Number of columns. Values:
-
2
+
2
The entry name and description are in two separate columns with the associated page numbers in the same column as the description. (Default)
-
3
+
3
The entry name, description and associated page numbers are in three separate columns.
@@ -582,34 +685,23 @@ are in three separate columns.

-
number
-
Associated number corresponding to each entry. Values: -
-
page
-
Each entry has the corresponding page number(s) where the -entry is defined. (Default) -
-
section
-
Each entry has the corresponding section number(s) where -the entry is defined. -
-
none
-
The corresponding numbers are -suppressed. -
-
+
number
+
Associated number corresponding to each entry. +This may either be the keyword none indicating that +the corresponding numbers should be suppressed, or it can be the +name of a LaTeX counter. The default is number=page.

-
toc
-
+
toc
+
Boolean variable:
-
true
+
true
Add glossary to table of contents
-
false
+
false
Omit glossary from table of contents (Default)
@@ -618,50 +710,50 @@ LaTeX twice after generating the glossary.

-
hypertoc
+
hypertoc
Boolean variable. This is similar to the package option -toc, but if you are using the hyperref -package, hypertoc will generate a link to the -beginning of the page, whereas toc will have -a hyperlink to jst after the glossary title. Note -that you can not use both toc=true and -hypertoc=true. Default value: -hypertoc=false. +toc, but if you are using the hyperref +package, hypertoc will generate a link to the +point immediately before the glossary title, whereas toc will +have a hyperlink to just after the glossary title. Note +that you can not use both toc=true and +hypertoc=true. Default value: +hypertoc=false.

-
hyper
+
hyper
Boolean variable:
-
true
+
true
Make associated numbers in the glossary a hypertext link, and also make acronyms, and the text -given by \xglossary have a hyperlink to their +given by \xglossary have a hyperlink to their corresponding entries in the glossary.
-
false
+
false
Don't make associated numbers a hypertext link
-If the hyperref or html package has +If the hyperref or html package has been loaded prior to loading glossary.sty, -hyper=true is set, otherwise -the default is hyper=false. Note that this package -option now encompasses the old hyperacronym option. +hyper=true is set, otherwise +the default is hyper=false. Note that this package +option now encompasses the old hyperacronym option.

-
section
+
section
Boolean variable:
-
true
+
true
Make the glossary an unnumbered section, even if chapters are defined
-
false
+
false
Only make glossary an unnumbered section if chapters are not defined (default).
@@ -669,17 +761,17 @@ unnumbered section if chapters are not defined (default).

-
acronym
+
acronym
Boolean variable:
-
true
+
true
Make the list of acronyms separate from the main glossary.

-
false
+
false
The acronyms will all be placed in the main glossary. (Default)
@@ -687,42 +779,42 @@ be placed in the main glossary. (Default)

-
global
+
global
Boolean variable:
-
false
+
false
Acronym commands only have a local effect. (Default)
-
true
+
true
Acronym commands have a global effect.
- The border, header and cols options -should not be used in conjunction with style=list -or style=altlist, as they only make sense with one of + The border, header and cols options +should not be used in conjunction with style=list +or style=altlist, as they only make sense with one of the tabular-style options. The value for the boolean variables can be omitted if they are to be set. For example - toc is equivalent to toc=true. Note that the -altlist style is better suited to + toc is equivalent to toc=true. Note that the +altlist style is better suited to glossaries with long entry names.

You can set up your own preferred defaults in a configuration -file. -The file must be called glossary.cfg and +file. +The file must be called glossary.cfg and should be placed somewhere on the TEX path. In this file you can use the command \glossarypackageoptions{option-list} where option-list is a comma-separated list of key=value pairs, as passed to the -glossary +glossary package. Note that this command may only be used in the configuration file. @@ -751,8 +843,8 @@ A new type of glossary can be defined using the command:
For example, suppose you want your document to have a separate index of terms and index of notation, -you could use \makeglossary, \glossary, -\xglossary and \printglossary for the first +you could use \makeglossary, \glossary, +\xglossary and \printglossary for the first glossary, and define a new type of glossary called say, notation, using

@@ -770,7 +862,7 @@ be a comma separated list of key=value pairs
 that can be used to specify the style of the new glossary.
 If omitted, the new glossary will have the same format
 as the main glossary. The following options are available:
-style, header, border and
+number, style, header, border and
 cols. These can take the same values as those
 given in the package options (described in section 6).
 
@@ -784,18 +876,18 @@ same format as their ``glossary'' counter-parts.
 

The glossary information will be saved to a file with the extension given by out-ext (analogous to -glo), which can then be passed to makeindex -either directly or via makeglos.pl, +glo), which can then be passed to makeindex +either directly or via makeglos.pl, and the file to be read in (i.e. the file created by -makeindex) will have the extension in-ext -(analogous to gls). +makeindex) will have the extension in-ext +(analogous to gls).

The optional argument log-ext indicates -the extension for the makeindex log file, if omitted the -extension glg is used. This is not used by LaTeX, -however makeglos.pl reads in this information from -the LaTeX auxiliary file and passes it to makeindex. +the extension for the makeindex log file, if omitted the +extension glg is used. This is not used by LaTeX, +however makeglos.pl reads in this information from +the LaTeX auxiliary file and passes it to makeindex.

For the above notation @@ -808,7 +900,7 @@ latex mydoc

(You may need to do an extra latex mydoc to get cross-references up-to-date.) Note that if you don't specify the -file extension when using makeglos.pl, it will +file extension when using makeglos.pl, it will check the transcript file from the LaTeX run to determine all the glossary types, so, for this example,
@@ -819,14 +911,14 @@ is equivalent to:
 makeglos.pl mydoc.glo
 makeglos.pl mydoc.not
 
-since makeglos.pl has read in the information +since makeglos.pl has read in the information for the notation glossary type from the file mydoc.log.

If you don't have Perl installed on your system, or for any other reason are unable to use -makeglos.pl, you can call makeindex +makeglos.pl, you can call makeindex explicitly:

 latex mydoc
@@ -837,7 +929,7 @@ latex mydoc
 
 

Note that you can use the command -\printglossary[name] +\printglossary[name] instead of \printname. These two commands have the same effect when using LaTeX, however, they have a slightly different effect when @@ -847,7 +939,7 @@ using LaTeX2HTML (see later). If the command \glossary-typename is defined, (e.g. \notationname in the above example) this will be used as the title for the specified -glossary. If this command is not defined, \glossaryname +glossary. If this command is not defined, \glossaryname will be used instead. If the command \shortglossary-typename is defined, (e.g. \shortnotationname in the above @@ -868,7 +960,7 @@ Acronyms

-The glossary package provides the command: +The glossary package provides the command:

\newacronym[ cmd-name]{ acronym}{ long}{ glossary entry} @@ -877,7 +969,7 @@ The glossary package provides the command: which can be used to define acronyms. The argument long is the full name, the argument acronym is the acronym for long and glossary entry is the glossary information -in the form used by the \glossary command. If the +in the form used by the \glossary command. If the optional argument cmd-name is missing, \newacronym will create a command called \acronym, otherwise it will create a command @@ -885,12 +977,12 @@ called \cmd-name (henceforth denoted \acr-na This command can then be used throughout the text. The first instance of this command is equivalent to:
-
long (\xacronym{name=long (acronym),glossary entry}{acronym}) +
long (\xacronym{name=long (acronym),glossary entry}{acronym})

subsequent instances will be equivalent to:
-
\xacronym{name=long (acronym),glossary entry}{acronym} +
\xacronym{name=long (acronym),glossary entry}{acronym}

The command \acr-name also has a starred @@ -901,7 +993,7 @@ uppercase (for use at the start of a sentence). Note that if you want to change the format of the acronym, for example, if you want the acronym to appear in small caps, you will need to not only use the optional argument, but you -will also need to use the sort key, otherwise you +will also need to use the sort key, otherwise you will get an error. For example:

 \newacronym[SVM]{\textsc{svm}}{Support Vector Machine}%
@@ -910,18 +1002,20 @@ technique,sort=svm}
 

-If the package option acronym is not set (default) -\xacronym, is a synonym for \xglossary. -If the package option acronym=true is specified, a +If the package option acronym is not set (default) +\xacronym, is a synonym for \xglossary, and +the acronyms will appear in the main glossary (remember to +specify \makeglossary and \printglossary). +If the package option acronym=true is specified, a new glossary type called acronym will be defined as:

 \newglossarytype[alg]{acronym}{acr}{acn}
 \providecommand{\acronymname}{List of Acronyms}
 
-You will then need to use the commands \makeacronym -and \printacronym to make the list of acronyms appear. -You will also need to run the acr file through -makeindex (or makeglos.pl). For example: +You will then need to use the commands \makeacronym +and \printacronym to make the list of acronyms appear. +You will also need to run the acr file through +makeindex (or makeglos.pl). For example:
 makeindex -s mydoc.ist -t mydoc.alg -o mydoc.acn mydoc.acr
 
@@ -929,12 +1023,12 @@ alternatively:
 makeglos.pl mydoc
 
-Note that the package option acronym=true is only +Note that the package option acronym=true is only appropriate if you want both a glossary and a separate list of acronyms. If you do not write in English, you can set up your own language definition for \acronymname in the configuration file -glossarycfg. For example: +glossarycfg. For example:
 \newcommand{\acronymname}{Akronyme}
 
@@ -943,7 +1037,7 @@ appropriate definition of \acronymname, and save it to the same directory as glossary.sty.)

-The name key is not used in glossary +The name key does not need to appear in glossary entry, as it is constructed from long and acronym. By default this will be in the form: long (acronym), however the format can be @@ -955,8 +1049,8 @@ command:
Within format the following commands may be used to represent long and acronym: -\glolong and -\gloshort. For example, +\glolong and +\gloshort. For example, suppose you just want the acronym to appear in the glossary entry, and not its full length name, then you would need to do:

@@ -970,11 +1064,11 @@ key is formatted for acronyms using:
 
\setacronymdescfmt{format}

-Within format you may use the commands \glolong -and \gloshort (as above), and you can also use -the command \glodesc which is the description as -specified by the description key in -\newacronym. This means that if you are using +Within format you may use the commands \glolong +and \gloshort (as above), and you can also use +the command \glodesc which is the description as +specified by the description key in +\newacronym. This means that if you are using a tabular style glossary, you can have the abbreviated form in one column and the long form in the second column with the description. For example, the following: @@ -989,7 +1083,7 @@ will generate a glossary entry of the form: \glossary{name=svm,description=support vector machine: Statistical pattern recognition technique}
-Note that if you omit \glodesc from +Note that if you omit \glodesc from \setacronymdescfmt the description specified in \newacronym will be ignored. So
@@ -1003,6 +1097,16 @@ will generate a glossary entry of the form:
 \glossary{name=svm,description=support vector machine}
 
+

+You will need to specify the name key explicitly if +the name contains a makeindex special character. +For example: +

+\newacronym{RNA}{Ribonukleins\"aure}{name={Ribonukleins\""aure (RNA)}}
+
+Note that this will override any formatting specified by +\setacronymnamefmt. +

Given an acronym named acr-name (the command name associated with the acronym as defined in @@ -1079,22 +1183,22 @@ The other two commands, simply contain long and

Note that since these four commands do not generate glossary entries they will therefore not contain any hyperlinks, even if -you have specified the hyper package option. They are +you have specified the hyper package option. They are provided for use in situations where the associated glossary -command may cause problems (e.g. in the table of contents entry.) +command may cause problems (e.g. in a sectioning command.)

Note that, as with all LaTeX commands, spaces following command names are ignored so if, for example, you defined -a new acronym called, say, SVM, then the \SVM will +a new acronym called, say, SVM, then the command \SVM will ignore any spaces following it. To force a space, you can either place an empty set of braces after the command name (e.g. \SVM{}) or use \_ i.e. a backslash followed by a space (e.g. \SVM\ ). Alternatively, as from -version 2.22, if you load the xspace package -before loading the glossary package, spaces will -be put in automatically using \xspace. +version 2.22, if you load the xspace package +before loading the glossary package, spaces will +be put in automatically using \xspace.

If you want the acronym to appear in a particular font, @@ -1186,7 +1290,7 @@ techniques are widely used ...(Assuming this is the first use of either \SVM or \SVM*.)

-Alternatively, \useacronym{SVM} can be used instead of +Alternatively, \useacronym{SVM} can be used instead of \SVM. For example:

 \useacronym*[s]{SVM} are widely used in the area of pattern 
@@ -1211,7 +1315,7 @@ SVMs are widely used in the area of pattern recognition.
 

Customizing the Glossary

-The glossary package provides commands which can be redefined to customize the +The glossary package provides commands which can be redefined to customize the glossary. The following name commands are defined by this package:
@@ -1232,6 +1336,16 @@ glossary. The following name commands are defined by this package:
+The commands \entryname and \descriptionname +are put in the first two columns of the header row if you +are using one of the tabular glossary styles together with a +header row (as specified by the header=true package option). +If you are using cols=3, the command +\glspageheader will be +put in the third column of the header row. By default, this command +does nothing. + +

The command \shortglossaryname is used for the page headers and table of contents entry. Any text required before or after the glossary can be added @@ -1264,7 +1378,7 @@ second glossary, but not the first.

Individual glossaries can have their styles changed either by setting the style in the final optional argument -to \newglossarystyle (see +to \newglossarystyle (see earlier) or using the command:
@@ -1284,16 +1398,16 @@ can be used to modify some of the glossary settings. The argument key-val list is a comma-separated list of key=value pairs. Available keys are:

-
type
+
type
This is the glossary type. If it is omitted, the standard glossary is assumed.

-
glsnumformat
+
glsnumformat
This is the name of the command, without the preceding backslash3, to format the + HREF="#foot1613">3, to format the entry numbers. For example, to make all the entry numbers italic, do:
@@ -1306,19 +1420,19 @@ To suppress numbering altogether, you can do:
 
 

-
glodelim
+
glodelim
This specifies what to do after the entry description and -before the page numbers. The default value is a comma, unless the cols=3 option is specified, +before the page numbers. The default value is a comma, unless the cols=3 option is specified, in which case it has the value &, or if -style=altlist, +style=altlist, in which case it is simply a space4. If the package option number=none is -specified, glodelim will have an empty value (unless -cols=3 is specified, + HREF="#foot1614">4. If the package option number=none is +specified, glodelim will have an empty value (unless +cols=3 is specified, where, again, it will have the value &.) -This setting corresponds to the delim_0 key in the -makeindex style file. +This setting corresponds to the delim_0 key in the +makeindex style file.

Note that if you want a new line between the description @@ -1330,51 +1444,51 @@ and the list of page numbers you will need to use

-
delimN
+
delimN
The delimiter to be inserted between two page numbers for the same entry. (This corresponds to the -delim_n key in the makeindex style file.) +delim_n key in the makeindex style file.) By default, this has the value ,_ (comma followed by a space). If the -package option number=none is chosen, the value is set +package option number=none is chosen, the value is set to empty.

-
delimR
+
delimR
The delimiter to be inserted between the starting and ending page number range for the same entry. (This corresponds to the -delim_r key in the makeindex style file.) +delim_r key in the makeindex style file.) By default, this has the value --. If the -package option number=none is chosen, the value is set +package option number=none is chosen, the value is set to empty.

-
gloskip
+
gloskip
This specifies what to do between groups. -If style=list or style=altlist this has the -value \indexspace, otherwise it creates a blank line +If style=list or style=altlist this has the +value \indexspace, otherwise it creates a blank row in the longtable or supertabular environment. -This command corresponds to the group_skip key in -the makeindex style file. +This command corresponds to the group_skip key in +the makeindex style file. Note that as from version 2.3, you should no longer redefine the command \gloskip.

-
delimT
+
delimT
The text to be inserted after the list of page numbers for an entry. (This corresponds to the -delim_t key in the makeindex style file.) +delim_t key in the makeindex style file.) The default value depends on the glossary style. It does nothing for the list-type styles, and has the value \\ for the tabular-type styles. Note that -delimT is separate from \glsafternum. +delimT is separate from \glsafternum.

For example, if you are using a 2 column tabular style, @@ -1383,7 +1497,9 @@ after every group) you can do the following:

 \setglossary{delimT={\cr & \cr},gloskip={}}
 
-Note the use of \cr instead of \\. +Note the use of \cr instead of \\ and +gloskip is set to nothing otherwise there would be +a double space between groups.
Note that: @@ -1396,49 +1512,26 @@ is equivalent to

-The number associated with each entry is, by default, the page number where - that entry was defined. If the package option -number=section has been chosen, this - will be the section number instead. You can choose a different counter - by changing the value of the command \theglossarynum. -For example, suppose you have the following code: -

-\begin{equation}
-\Gamma(z) = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt
-\end{equation}
-\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma}
-
-and you want the glossary to refer to the equation number, instead of the -page or section number, this can be done by redefining \theglossarynum -as follows: -
-\renewcommand{\theglossarynum}{\theequation}
-
-If the equation number depends on another counter (such as -chapter) -you will need to specify that the number is in the form NUM.num - (e.g. 3.24). This can be done by redefining the \pagecompositor command: +As from version 2.4, +you can insert text between groups by redefining the +commands \glogroupSymbols, +\glogroupNumbers, \glogroupA ... \glogroupZ. For example, if you are using one +of the list styles, the following will print the appropriate +heading in bold, followed by a gap:
-\renewcommand{\pagecompositor}{.}
+\renewcommand{\glogroupSymbols}{\textbf{Symbols}\indexspace}
+\renewcommand{\glogroupNumbers}{\textbf{Numbers}\indexspace}
+\renewcommand{\glogroupA}{\textbf{A}\indexspace}
+....% similar lines omitted
+\renewcommand{\glosgroupZ}{\textbf{Z}\indexspace}
 
-(By default this value is -, unless the package option -number=section has -been chosen, in which case this command has the value . -(full stop), as in the example above). -The \pagecompositor command must be -redefined before \makeglossary for it to have any effect. -If the package option number=none is used, -the numbering will be suppressed, regardless -of the value of \theglossarynum. -This command corresponds to the page_compositor key -in the makeindex style file.

The start and end of the main body of the glossary is given by the commands: \beforeglossary and \afterglossary. -If the style=list -or style=altlist +If the style=list +or style=altlist package options are chosen these commands simply begin and end the description environment, otherwise these commands begin and end the @@ -1446,27 +1539,27 @@ environment, otherwise these commands begin and end the supertabular environment with argument specified by \glossaryalignment5. + HREF="#foot1148">5.

-The glossary package no longer conflicts with the array +The glossary package no longer conflicts with the array package. Changes can now be made to \glossaryalignment -regardless of whether or not the array +regardless of whether or not the array package has been used.

The command \gloitem indicates what to do at the start of each glossary entry. -This command takes one argument, which will be the text specified by the name key -in the \glossary command. In the case of the -style=list option, +This command takes one argument, which will be the text specified by the name key +in the \glossary command. In the case of the +style=list option, \gloitem{text} will do

\item[text]

-or if style=altlist: +or if style=altlist:

\item[text]\mbox{}\par
@@ -1476,29 +1569,57 @@ otherwise it will do
text &

-This command corresponds to the item_0 key in the -makeindex style file. +This command corresponds to the item_0 key in the +makeindex style file.

-The command \glossaryheader (if style=long or style=super is selected) -indicates what to do at the start of the longtable or -supertabular environment. If border=none, it -is defined as: +If the glossary has a tabular style with a header row +(header=true and either style=long or +style=super), then the header row for cols=2 +will be given by:

 \bfseries\entryname & \bfseries \descriptionname\\
 
-So, if you want the \descriptionname to be centred, you could do: +and the header row for cols=3 will be given by:
-\renewcommand{\glossaryheader}{\bfseries\entryname & 
+\bfseries\entryname & \bfseries\descriptionname & 
+\bfseries\glspageheader\\
+
+(It may also contain \hline\hline if the +border key is set.) + +

+If you want to override this, you need to define the command +\glossaryheader6. + +

+For example, if you are using a tabular style with cols=2, +and you want the \descriptionname to be centred, you could +do: +

+\newcommand{\glossaryheader}{\bfseries\entryname & 
  \hfil\bfseries\descriptionname\\}
 
+ +

+If you want an extra row below the header row, you can define +the command\glossarysubheader + +For example, if you are using cols=3, and you want an +extra row after the header row, you can do: +

+\newcommand{\glossarysubheader}{ & & \\}
+
+ +

The command \glosstail indicates what to do at the end of the longtable or supertabular environment.

The width of the second column for the tabular-type styles is given by the length \descriptionwidth. This value can be changed using -the \setlength command (the default value is 0.6\textwidth). +the \setlength command (the default value is 0.6\linewidth).

@@ -1509,10 +1630,10 @@ This package comes with the following sample documents:

  • sampleSec.tex -- This document uses the options: -style=altlist, toc and -number=section. It also loads the -hyperref package before loading the -glossary package, so the glossary has hyperlinks +style=altlist, toc and +number=section. It also loads the +hyperref package before loading the +glossary package, so the glossary has hyperlinks to the section numbers. Experimenting with different package options, will illustrate the different glossary styles. You will need to do: @@ -1522,7 +1643,7 @@ makeglos.pl sampleSec pdflatex sampleSec pdflatex sampleSec
-If you don't want to use makeglos.pl, you will need +If you don't want to use makeglos.pl, you will need to do
 makeindex -s sampleSec.ist -t sampleSec.glg -o sampleSec.gls sampleSec.glo
@@ -1541,7 +1662,7 @@ makeglos.pl sampleNtn
 latex sampleNtn
 latex sampleNtn
 
-If you don't want to use makeglos.pl, you will need +If you don't want to use makeglos.pl, you will need to do
 makeindex -s sampleNtn.ist -t sampleNtn.glg -o sampleNtn.gls sampleNtn.glo
@@ -1551,22 +1672,23 @@ makeindex -s sampleNtn.ist -t sampleNtn.nlg -o sampleNtn.ntn sampleNtn.not
 

  • sampleNtn2.tex --This is similar to -sampleNtn.tex, but uses \storeglosentry. +sampleNtn.tex, but uses \storeglosentry.

  • sampleEq.tex -- This has a glossary where the numbers in the glossary refer to the equation number rather than -the page number. The \pagecompositor, -\theglossarynum, \glossaryname and -\glossaryheader are all redefined to customize the +the page number (achieved with the package option +number=equation). The \entryname, +\descriptionname, \glossaryname and +\glspageheader are all redefined to customize the glossary. You will need to do:
     latex sampleEq
     makeglos.pl sampleEq
     latex sampleEq
     
    -If you don't want to use makeglos.pl, you will need +If you don't want to use makeglos.pl, you will need to do
     makeindex -s sampleEq.ist -t sampleEq.glg -o sampleEq.gls sampleEq.glo
    @@ -1584,7 +1706,7 @@ latex sampleEqPg
     makeglos.pl sampleEqPg
     latex sampleEqPg
     
    -If you don't want to use makeglos.pl, you will need +If you don't want to use makeglos.pl, you will need to do
     makeindex -s sampleEqPg.ist -t sampleEqPg.glg -o sampleEqPg.gls sampleEqPg.glo
    @@ -1593,9 +1715,9 @@ makeindex -s sampleEqPg.ist -t sampleEqPg.glg -o sampleEqPg.gls sampleEqPg.glo
     

  • sampleAcr.tex -- This has a glossary containing -acronyms. It uses the style altlist as this is better +acronyms. It uses the style altlist as this is better suited to glossaries with long names. It also uses the -hyperref package, so the page numbers in the +hyperref package, so the page numbers in the glossary will automatically be hyperlinks, and the acronyms within the text will have hyperlinks to their corresponding entry in the glossary. You will need to do: @@ -1605,7 +1727,7 @@ makeglos.pl sampleAcr pdflatex sampleAcr pdflatex sampleAcr
  • -If you don't want to use makeglos.pl, you will need +If you don't want to use makeglos.pl, you will need to do
     makeindex -s sampleAcr.ist -t sampleAcr.glg -o sampleAcr.gls sampleAcr.glo
    @@ -1615,9 +1737,9 @@ makeindex -s sampleAcr.ist -t sampleAcr.glg -o sampleAcr.gls sampleAcr.glo
     
     
  • sample.tex -- This has a glossary entry with two different definitions of the same name. -If you just use makeindex, the two entries +If you just use makeindex, the two entries will be treated separately, however, if you want them -concatenated, you can use makeglos.pl with +concatenated, you can use makeglos.pl with the -m switch. You will need to do:
     pdflatex sample
    @@ -1627,16 +1749,17 @@ pdflatex sample
     
    (Depending on the configuration of your system, you may have to do perl makeglos.pl instead of -just makeglos.pl) +just makeglos.pl)

    -If you don't want to use makeglos.pl, you will need +If you don't want to use makeglos.pl, you will need to do

     makeindex -s sample.ist -t sample.glg -o sample.gls sample.glo
     
    however, the entries with the same name but multiple descriptions -will not be merged. +will not be merged. You will also have to given them different sort +keys otherwise you will get duplicate hyper targets.

  • @@ -1662,10 +1785,10 @@ LaTeX2HTML Style File

    -A LaTeX2HTML Perl script, glossary.perl, is +A LaTeX2HTML Perl script, glossary.perl, is provided with this package for those wishing to use the glossary package with the LaTeX2HTML translator. -The file glossary.perl should be extracted +The file glossary.perl should be extracted along with glossary.sty when you run the installation script (glossary.ins) through LaTeX. @@ -1679,8 +1802,8 @@ Limitations

    • The only package options supported are: -style=altlist, hyper=true, toc=true, -acronym=true and acronym=false. +style=altlist, hyper=true, toc=true, +acronym=true and acronym=false.

    • @@ -1693,18 +1816,18 @@ as the primary glossary if you use the command

      -

    • The command \setglossary must be +
    • The command \setglossary must be placed in the preamble to have an effect.

    • -
    • The \storeglosentry commands must be in +
    • The \storeglosentry commands must be in the document environment to have an effect. (They don't seem to work in the preamble, I don't know why.)

    • -
    • If you place a \glossary command +
    • If you place a \glossary command inside an environment not translated by LaTeX2HTML (for example, inside a mathematics environment), it will not be entered into the glossary. @@ -1715,7 +1838,7 @@ it will not be entered into the glossary. and "@ will be correctly translated, unless they occur within a maths environment. This is because the maths environment is translated before being -passed to \glossary. You can overcome this +passed to \glossary. You can overcome this by doing, e.g.:
      \begin{latexonly}
      \glossary{name=$"|\mathcal{S}"|$,description=cardinality of set @@ -1738,12 +1861,6 @@ set $\mathcal{S}$,sort=cardinality}
    • Glossary items with the same names but different definitions will not be merged. -

      -

    • -
    • The command \theglossarynum is ignored -by LaTeX2HTML, as page numbers have no meaning within -HTML files. -

    • The configuration file glossary.cfg is ignored. @@ -1762,7 +1879,7 @@ Troubleshooting

      This is a list of common problems, for a more up-to-date FAQ, see -http://theoval.cmp.uea.ac.uk/~nlct/packages/faq/.

      @@ -1774,37 +1891,37 @@ This is a list of common problems, for a more up-to-date FAQ, see Check the following:

        -
      • Have you included the command \makeglossary +
      • Have you included the command \makeglossary in the preamble?

      • -
      • Have you put the command \printglossary where +
      • Have you put the command \printglossary where you want the glossary to appear?

      • -
      • Have you used makeglos.pl or makeindex, -and if you did, did it successfully create the gls -file? (Check the transcript glg file.) +
      • Have you used makeglos.pl or makeindex, +and if you did, did it successfully create the gls +file? (Check the transcript glg file.)

          -
        • If you used makeindex directly, did you specify -the ist file created by \makeglossary, +
        • If you used makeindex directly, did you specify +the ist file created by \makeglossary, and did you remember to specify the output file with the extension -gls? +gls?

        • -
        • When makeindex scans the ist file, +
        • When makeindex scans the ist file, it should generate the message:
           9 attributes redefined, 0 ignored
           
          If you have a number other than 0 ignored, then there is something -wrong with the ist file. Some packages can cause +wrong with the ist file. Some packages can cause problems with the creation of this file, see item 16 below.
        • @@ -1813,17 +1930,17 @@ item 16 below.

        • Have you remembered to LaTeX your document again -after using makeglos.pl or makeindex? +after using makeglos.pl or makeindex?

        • -
        • Have you used \glossary or \xglossary? +
        • Have you used \glossary or \xglossary?

        • -
        • If you have used \storeglosentry, have you also -used \useglosentry, \useGlosentry or -\gls? +
        • If you have used \storeglosentry, have you also +used \useglosentry, \useGlosentry or +\gls?
        @@ -1836,9 +1953,9 @@ all the analogous commands to the above?
      • My list of acronyms hasn't appeared.

        -Have you used the acronym=true package option? If no, +Have you used the acronym=true package option? If no, check the answers to the previous item, if yes, make sure -you have used \makeacronym and \printacronym. +you have used \makeacronym and \printacronym. Have you used any of the acronyms you have defined? Remember that \acrsh, \acrln, \acr-nameshort and @@ -1854,17 +1971,17 @@ name of an acronym command. By default, if any of your acronym commands occur within a group (this includes environments which form implicit grouping) the effect will be local to that group. You can either unset -the acronym outside the group, or use the global +the acronym outside the group, or use the global package option.

      • I get an error when using the command -\saveglosentry. +\saveglosentry.

        Don't use this command it's obsolete, use -\storeglosentry instead. +\storeglosentry instead.

      • @@ -1874,14 +1991,14 @@ Don't use this command it's obsolete, use Check the following
          -
        • If you defined the entry using \storeglosentry -have you used either \useglosentry, -\useGlosentry or \gls? +
        • If you defined the entry using \storeglosentry +have you used either \useglosentry, +\useGlosentry or \gls?

        • -
        • Have you remembered to \protect commands -such as \mathcal within \storeglosentry? +
        • Have you remembered to \protect commands +such as \mathcal within \storeglosentry?

        • @@ -1892,7 +2009,7 @@ with a double quote character?

        -Check the makeindex log file to see if there are +Check the makeindex log file to see if there are any error messages.

        @@ -1900,7 +2017,7 @@ any error messages.

      • My glossary has duplicate entries on separate lines.

        -LaTeX treats multiple spaces equivalent to a single space, but makeindex +LaTeX treats multiple spaces equivalent to a single space, but makeindex takes spaces into account when determining whether two entries are identical. For example:

        @@ -1912,28 +2029,28 @@ and
         \glossary{name=Identity  matrix,
         description=diagonal matrix with 1's along the diagonal}
         
        -will be treated as different entries by makeindex, +will be treated as different entries by makeindex, because the first has only one space between `Identity' and `matrix' and the second has two. The easiest way to ensure consistency is to use -\storeglosentry together with \useglosentry, -\useGlosentry or \gls. +\storeglosentry together with \useglosentry, +\useGlosentry or \gls.

      • I had an error, fixed it, but I keep getting the same error message.

        -Suppose you've made an error in the \glossary command. For example: +Suppose you've made an error in the \glossary command. For example:

         \glossary{name=Java,description=A programming language,format=texbf}
         
        -In this case textbf has been mis-spelt. This error will be copied to the glo file, -which in turn will be copied to the gls file by -makeindex. A subsequent run of LaTeX will +In this case textbf has been mis-spelt. This error will be copied to the glo file, +which in turn will be copied to the gls file by +makeindex. A subsequent run of LaTeX will read this error in. If you fix the error in your main document, the error will still be read in from -the gls file. The best thing to do is to delete the -gls file, and try again. +the gls file. The best thing to do is to delete the +gls file, and try again.

      • @@ -1941,11 +2058,11 @@ the gls file. The best thing to do is to delete the

        This may occur if you have long entry names, and you are using -either the style=long or style=super +either the style=long or style=super options. The width of the description column is proportional to -the text width (in fact, it's 0.6\textwidth) +the line width (in fact, it's 0.6\linewidth) but the first column is as wide as the widest entry name. You -can either redefine \glossaryalignment to change the +can either redefine \glossaryalignment to change the column specifications, or use one of the list-type styles.

        @@ -1954,23 +2071,25 @@ column specifications, or use one of the list-type styles. was defined.

        -You may need to LaTeX your document again (just as you have to do with \tableofcontents, \listoffigures etc). +You may need to LaTeX your document again (just as you have to do +with \tableofcontents, \listoffigures etc).

        -

      • I'm getting a keyval error. +
      • I'm getting a keyval error.

        -The glossary package uses the keyval +The glossary package uses the keyval package to extract the information from key=value -comma separated lists. You need to make sure the syntax is correct. If your value contains a -comma, you will need to enclose value in curly braces. See the keyval documentation for -further information6. +comma separated lists. You need to make sure the syntax is correct. +If your value contains a +comma, you will need to enclose value in curly braces. See the keyval documentation for +further information7.

      • -
      • I've used the hyper option, but nothing happens +
      • I've used the hyper option, but nothing happens when I click on the numbers in the glossary.

        @@ -1980,32 +2099,32 @@ Check the following:

      • Have you remembered to use PDFLaTeX instead of LaTeX, or used a driver that understands hyperlinks?
      • -
      • Have you remembered to use the hyperref or -html package? +
      • Have you remembered to use the hyperref or +html package?
      • -
      • Have you remembered to use a formatting command which uses \hyperlink? (E.g. using hyperbf instead -of textbf)? Remember to check the format key -in your \glossary commands, and the -glsnumformat key in the \setglossary +
      • Have you remembered to use a formatting command which uses \hyperlink? (E.g. using hyperbf instead +of textbf)? Remember to check the format key +in your \glossary commands, and the +glsnumformat key in the \setglossary command.
      • What application are you using to view the PDF file? Ghostview can display a PDF file, but ignores the links. If you are using Windows, try -using Adobe's Acrobat Reader, or if you are using UNIX or Linux, try using xpdf or acroread. +using Adobe's Acrobat Reader, or if you are using UNIX or Linux, try using xpdf or acroread.
      • -

      • The glossary package conflicts with the -datetime package. +
      • The glossary package conflicts with the +datetime package.

        This has been fixed in version 2.01.

      • -
      • I get an error when using certain commands, such as \cite or ~ in \newacronym. +
      • I get an error when using certain commands, such as \cite or ~ in \newacronym.

        This has been fixed in version 2.1. @@ -2018,11 +2137,11 @@ This has been fixed in version 2.1.

    -The glossary package used to conflict with the -array package. This was fixed in version 2.1. +The glossary package used to conflict with the +array package. This was fixed in version 2.1. As from version 2.3, it doesn't matter whether you load -the glossary package before or after the -array package. +the glossary package before or after the +array package.

    @@ -2061,19 +2180,19 @@ or if you are using PDFLaTeX:

    -

  • The glossary package conflicts with -ngerman. +
  • The glossary package conflicts with +ngerman.

    -This problem is caused by the fact that ngerman +This problem is caused by the fact that ngerman redefines the effect of the double quote character, but this character is used in the creation of the -ist makeindex style file. +ist makeindex style file. Try one of the following methods:

      -
    1. Include the ngerman package after the -\makeglossary command: +
    2. Include the ngerman package after the +\makeglossary command:
       \usepackage{glossary}
       \makeglossary
      @@ -2082,11 +2201,11 @@ Try one of the following methods:
       
       

    3. -
    4. First omit the ngerman package and include -\makeglossary then LaTeX your document. -This will create the ist file. Then include the -ngerman package, and insert \noist before -the \makeglossary command, this will prevent further attempts to generate the ist file. +
    5. First omit the ngerman package and include +\makeglossary then LaTeX your document. +This will create the ist file. Then include the +ngerman package, and insert \noist before +the \makeglossary command, this will prevent further attempts to generate the ist file.
       \usepackage{ngerman}
       \usepackage{glossary}
      @@ -2095,8 +2214,8 @@ the \makeglossary command, this will prevent fur
       
       

    6. -
    7. Use \noist, as above, and create the -ist file +
    8. Use \noist, as above, and create the +ist file in an ordinary text editor. The file should contain the following lines:
      @@ -2117,15 +2236,15 @@ also cause a problem, if so, try any of the above.
       
       

    9. -
    10. makeglos.pl gives the following error message: +
    11. makeglos.pl gives the following error message:
       unable to extract name from glossary item:
       

      -You are using an old version of makeglos.pl with a -new version of the glossary package. You will need -to update your version makeglos.pl. +You are using an old version of makeglos.pl with a +new version of the glossary package. You will need +to update your version makeglos.pl.

    Let me know if you encounter any other problems or if you have any comments regarding this package. @@ -2143,35 +2262,33 @@ use is deprecated.

    -\saveglosentry{ name}{description} +\saveglosentry{ name}{description}
    This command has now been replaced by \storeglosentry.

    -The command \glsprimaryfmt is no longer used in \newacronym as you can end up with duplicate -page numbers, however the command is currently still defined (although it - may be removed in future versions.) +The command \glsprimaryfmt has now been removed.

    -The package option hyperacronym is now superseded by the package option -hyper. This option was implemented prior to the -introduction of the command \xglossary. Since the -acronyms now use \xglossary, there is no difference -between the hyperacronym and hyper options. +The package option hyperacronym is now superseded by the package option +hyper. This option was implemented prior to the +introduction of the command \xglossary. Since the +acronyms now use \xglossary, there is no difference +between the hyperacronym and hyper options. This option has a boolean value:

    -
    true
    +
    true
    Make acronyms link to their corresponding entry in the glossary
    -
    false
    +
    false
    Acronyms don't have a hyperlink.
    -If the hyperref package has been loaded prior to -loading glossary.sty or if hyper=true is set, -hyperacronym=true otherwise -hyperacronym=false. +If the hyperref package has been loaded prior to +loading glossary.sty or if hyper=true is set, +hyperacronym=true otherwise +hyperacronym=false.

    @@ -2187,7 +2304,7 @@ University of East Anglia Norwich. Norfolk
    NR4 7TJ. United Kingdom. -
    http://theoval.cmp.uea.ac.uk/~nlct/

    @@ -2208,92 +2325,99 @@ and pointed out bugs. Index

    acroread -
    Troubleshooting +
    Troubleshooting
    array -
    Customizing the Glossary - | Customizing the Glossary - | Troubleshooting - | Troubleshooting +
    Customizing the Glossary + | Customizing the Glossary + | Troubleshooting + | Troubleshooting
    datetime -
    Troubleshooting +
    Troubleshooting
    \descriptionname -
    Customizing the Glossary +
    Customizing the Glossary + | Sample Documents +
    \entryname +
    Sample Documents
    file types
    acr -
    Acronyms +
    Acronyms
    cfg -
    Package Options - | Acronyms +
    Package Options + | Acronyms
    glg -
    makeglos.pl - | Defining New Glossary Types - | Troubleshooting +
    makeglos.pl + | Defining New Glossary Types + | Troubleshooting
    glo -
    makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | Defining New Glossary Types - | Troubleshooting +
    makeglos.pl + | makeglos.pl + | Defining New Glossary Types + | Troubleshooting
    gls -
    makeglos.pl - | Displaying the Glossary - | Defining New Glossary Types - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    makeglos.pl + | Displaying the Glossary + | Defining New Glossary Types + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    ist -
    makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    perl -
    LaTeX2HTML Style File - | LaTeX2HTML Style File +
    LaTeX2HTML Style File + | LaTeX2HTML Style File
    \glodesc -
    Acronyms - | Acronyms +
    Acronyms + | Acronyms
    \glolong -
    Acronyms - | Acronyms +
    Acronyms + | Acronyms
    \gloshort -
    Acronyms - | Acronyms +
    Acronyms + | Acronyms
    glossary -
    Introduction - | Generating Glossary Information - | Package Options - | Examples - | Defining New Glossary Types - | Acronyms - | Acronyms - | Acronyms - | Customizing the Glossary - | Customizing the Glossary - | Sample Documents - | Limitations - | Limitations - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    Introduction + | Generating Glossary Information + | Generating Glossary Information + | Storing Glossary Information + | Storing Glossary Information + | Storing Glossary Information + | Package Options + | Examples + | Defining New Glossary Types + | Acronyms + | Acronyms + | Acronyms + | Customizing the Glossary + | Customizing the Glossary + | Sample Documents + | Limitations + | Limitations + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    glossary border
    see package options, border
    glossary columns @@ -2303,565 +2427,607 @@ Index
    \glossary keys
    description -
    Generating Glossary Information - | Storing Glossary Information - | Acronyms +
    Generating Glossary Information + | Storing Glossary Information + | Acronyms
    format -
    Generating Glossary Information - | Generating Glossary Information - | Troubleshooting +
    Generating Glossary Information + | Generating Glossary Information + | Troubleshooting
    hyperbf -
    Generating Glossary Information - | Troubleshooting +
    Generating Glossary Information + | Troubleshooting +
    hyperem +
    Generating Glossary Information + | Generating Glossary Information
    hyperit -
    Generating Glossary Information +
    Generating Glossary Information +
    hypermd +
    Generating Glossary Information
    hyperrm -
    Generating Glossary Information - | Generating Glossary Information +
    Generating Glossary Information + | Generating Glossary Information +
    hypersc +
    Generating Glossary Information
    hypersf -
    Generating Glossary Information +
    Generating Glossary Information +
    hypersl +
    Generating Glossary Information
    hypertt -
    Generating Glossary Information +
    Generating Glossary Information +
    hyperup +
    Generating Glossary Information
    name -
    Generating Glossary Information - | Acronyms - | Acronyms - | Acronyms - | Customizing the Glossary +
    Generating Glossary Information + | Generating Glossary Information + | Generating Glossary Information + | Acronyms + | Acronyms + | Acronyms + | Acronyms + | Customizing the Glossary +
    number +
    Generating Glossary Information + | Generating Glossary Information
    sort -
    Generating Glossary Information - | Acronyms +
    Generating Glossary Information + | Generating Glossary Information + | Generating Glossary Information + | Acronyms
    glossary style
    see package options, style
    glossary.cfg
    see file type, cfg
    \glossaryalignment -
    Troubleshooting -
    \glossaryheader -
    Sample Documents +
    Troubleshooting
    \glossaryname -
    Displaying the Glossary - | Defining New Glossary Types - | Sample Documents +
    Displaying the Glossary + | Defining New Glossary Types + | Sample Documents
    \gls -
    Troubleshooting - | Troubleshooting - | Troubleshooting +
    Storing Glossary Information + | Troubleshooting + | Troubleshooting + | Troubleshooting +
    \glspageheader +
    Sample Documents
    html -
    Package Options - | Troubleshooting +
    Package Options + | Troubleshooting
    hyperref -
    Package Options - | Package Options - | Sample Documents - | Sample Documents - | Troubleshooting - | Obsolete Commands +
    Package Options + | Package Options + | Sample Documents + | Sample Documents + | Troubleshooting + | Obsolete Commands
    \hyperrm -
    Generating Glossary Information +
    Generating Glossary Information
    keyval -
    Troubleshooting - | Troubleshooting - | Troubleshooting +
    Troubleshooting + | Troubleshooting + | Troubleshooting
    \makeacronym -
    Acronyms - | Troubleshooting +
    Acronyms + | Troubleshooting
    makeglos.pl -
    makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | Defining New Glossary Types - | Defining New Glossary Types - | Defining New Glossary Types - | Defining New Glossary Types - | Defining New Glossary Types - | Acronyms - | Sample Documents - | Sample Documents - | Sample Documents - | Sample Documents - | Sample Documents - | Sample Documents - | Sample Documents - | Sample Documents - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | Defining New Glossary Types + | Defining New Glossary Types + | Defining New Glossary Types + | Defining New Glossary Types + | Defining New Glossary Types + | Acronyms + | Sample Documents + | Sample Documents + | Sample Documents + | Sample Documents + | Sample Documents + | Sample Documents + | Sample Documents + | Sample Documents + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    \makeglossary -
    makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | Defining New Glossary Types - | Customizing the Glossary - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | Defining New Glossary Types + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    makeindex -
    Installation - | Installation - | Installation - | makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | makeglos.pl - | Displaying the Glossary - | Defining New Glossary Types - | Defining New Glossary Types - | Defining New Glossary Types - | Defining New Glossary Types - | Defining New Glossary Types - | Acronyms - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Sample Documents - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    Installation + | Installation + | Installation + | makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | makeglos.pl + | Displaying the Glossary + | Defining New Glossary Types + | Defining New Glossary Types + | Defining New Glossary Types + | Defining New Glossary Types + | Defining New Glossary Types + | Acronyms + | Acronyms + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Sample Documents + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    makeindex key
    delim_0 -
    Customizing the Glossary +
    Customizing the Glossary
    delim_n -
    Customizing the Glossary +
    Customizing the Glossary
    delim_r -
    Customizing the Glossary +
    Customizing the Glossary
    delim_t -
    Customizing the Glossary +
    Customizing the Glossary
    group_skip -
    Customizing the Glossary +
    Customizing the Glossary
    item_0 -
    Customizing the Glossary -
    page_compositor -
    Customizing the Glossary +
    Customizing the Glossary
    makeindex style file (.ist)
    see file types, ist
    \newacronym -
    Acronyms - | Troubleshooting - | Obsolete Commands +
    Acronyms + | Troubleshooting
    \newglossarystyle -
    Customizing the Glossary +
    Customizing the Glossary
    ngerman -
    makeglos.pl - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    makeglos.pl + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    \nofiles -
    makeglos.pl +
    makeglos.pl
    \noist -
    Troubleshooting - | Troubleshooting +
    Troubleshooting + | Troubleshooting
    package options
    +
    ,
    +
    none +
    Package Options +
    acronym -
    Package Options - | Package Options - | Acronyms - | Acronyms - | Acronyms - | Acronyms - | Limitations - | Limitations - | Troubleshooting +
    Package Options + | Package Options + | Acronyms + | Acronyms + | Acronyms + | Acronyms + | Limitations + | Limitations + | Troubleshooting
    false -
    Package Options - | Limitations +
    Package Options + | Limitations
    true -
    Package Options - | Acronyms - | Acronyms - | Limitations - | Troubleshooting +
    Package Options + | Acronyms + | Acronyms + | Limitations + | Troubleshooting
    border -
    Package Options - | Package Options - | Package Options - | Package Options - | Examples - | Examples - | Examples - | Examples - | Customizing the Glossary +
    Package Options + | Package Options + | Package Options + | Package Options + | Examples + | Examples + | Examples + | Examples + | Customizing the Glossary + | Customizing the Glossary
    none -
    Package Options - | Examples - | Examples - | Customizing the Glossary +
    Package Options + | Examples + | Examples
    plain -
    Package Options - | Examples - | Examples +
    Package Options + | Examples + | Examples
    cols -
    Package Options - | Package Options - | Package Options - | Package Options - | Examples - | Customizing the Glossary - | Customizing the Glossary +
    Package Options + | Package Options + | Package Options + | Package Options + | Examples + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary
    2 -
    Package Options +
    Package Options + | Customizing the Glossary + | Customizing the Glossary
    3 -
    Package Options - | Examples - | Customizing the Glossary - | Customizing the Glossary +
    Package Options + | Examples + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary
    global -
    Package Options - | Package Options - | Troubleshooting - | Troubleshooting +
    Package Options + | Package Options + | Troubleshooting + | Troubleshooting
    false -
    Package Options +
    Package Options
    true -
    Package Options +
    Package Options
    header -
    Package Options - | Package Options - | Package Options - | Package Options - | Examples - | Examples - | Examples - | Examples +
    Package Options + | Package Options + | Package Options + | Package Options + | Examples + | Examples + | Examples + | Examples + | Customizing the Glossary + | Customizing the Glossary
    none -
    Package Options - | Examples - | Examples +
    Package Options + | Examples + | Examples
    plain -
    Package Options - | Examples - | Examples +
    Package Options + | Examples + | Examples +
    true +
    Customizing the Glossary + | Customizing the Glossary
    hyper -
    Generating Glossary Information - | Generating Glossary Information - | Package Options - | Package Options - | Package Options - | Package Options - | Acronyms - | Acronyms - | Limitations - | Troubleshooting - | Troubleshooting - | Obsolete Commands - | Obsolete Commands - | Obsolete Commands - | Obsolete Commands - | Obsolete Commands +
    Generating Glossary Information + | Generating Glossary Information + | Package Options + | Package Options + | Package Options + | Package Options + | Acronyms + | Acronyms + | Limitations + | Troubleshooting + | Troubleshooting + | Obsolete Commands + | Obsolete Commands + | Obsolete Commands + | Obsolete Commands + | Obsolete Commands
    false -
    Package Options - | Package Options +
    Package Options + | Package Options
    true -
    Package Options - | Package Options - | Limitations - | Obsolete Commands +
    Package Options + | Package Options + | Limitations + | Obsolete Commands
    hyperacronym -
    Package Options - | Package Options - | Obsolete Commands - | Obsolete Commands - | Obsolete Commands - | Obsolete Commands - | Obsolete Commands - | Obsolete Commands +
    Package Options + | Package Options + | Obsolete Commands + | Obsolete Commands + | Obsolete Commands + | Obsolete Commands + | Obsolete Commands + | Obsolete Commands
    false -
    Obsolete Commands - | Obsolete Commands +
    Obsolete Commands + | Obsolete Commands
    true -
    Obsolete Commands - | Obsolete Commands +
    Obsolete Commands + | Obsolete Commands
    hypertoc -
    Package Options - | Package Options - | Package Options - | Package Options - | Package Options - | Package Options +
    Package Options + | Package Options + | Package Options + | Package Options + | Package Options + | Package Options
    false -
    Package Options +
    Package Options
    true -
    Package Options +
    Package Options
    number -
    Package Options - | Package Options - | Examples - | Examples - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Sample Documents +
    Package Options + | Package Options + | Package Options + | Examples + | Examples + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Sample Documents + | Sample Documents
    +
    equation +
    Sample Documents
    none -
    Package Options - | Examples - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary +
    Examples + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary
    page -
    Package Options - | Examples +
    Package Options + | Examples
    section -
    Package Options - | Customizing the Glossary - | Customizing the Glossary - | Sample Documents +
    Sample Documents
    section -
    Package Options - | Package Options +
    Package Options + | Package Options
    false -
    Package Options +
    Package Options
    true -
    Package Options +
    Package Options
    style -
    Package Options - | Package Options - | Package Options - | Package Options - | Package Options - | Examples - | Examples - | Examples - | Examples - | Examples - | Examples - | Examples - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Sample Documents - | Limitations - | Troubleshooting - | Troubleshooting +
    Package Options + | Package Options + | Package Options + | Package Options + | Package Options + | Examples + | Examples + | Examples + | Examples + | Examples + | Examples + | Examples + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Sample Documents + | Limitations + | Troubleshooting + | Troubleshooting
    altlist -
    Package Options - | Package Options - | Package Options - | Examples - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary - | Sample Documents - | Sample Documents - | Limitations +
    Package Options + | Package Options + | Package Options + | Examples + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary + | Sample Documents + | Sample Documents + | Limitations
    list -
    Package Options - | Package Options - | Package Options - | Examples - | Examples - | Customizing the Glossary - | Customizing the Glossary - | Customizing the Glossary +
    Package Options + | Package Options + | Package Options + | Examples + | Examples + | Customizing the Glossary + | Customizing the Glossary + | Customizing the Glossary
    long -
    Package Options - | Examples - | Examples - | Examples - | Examples - | Customizing the Glossary - | Troubleshooting +
    Package Options + | Examples + | Examples + | Examples + | Examples + | Customizing the Glossary + | Troubleshooting
    super -
    Package Options - | Customizing the Glossary - | Troubleshooting +
    Package Options + | Customizing the Glossary + | Troubleshooting
    toc -
    Package Options - | Package Options - | Package Options - | Package Options - | Package Options - | Package Options - | Package Options - | Package Options - | Package Options - | Package Options - | Sample Documents - | Sample Documents - | Limitations +
    Package Options + | Package Options + | Package Options + | Package Options + | Package Options + | Package Options + | Package Options + | Package Options + | Package Options + | Package Options + | Sample Documents + | Sample Documents + | Limitations
    false -
    Package Options +
    Package Options
    true -
    Package Options - | Package Options - | Package Options - | Limitations +
    Package Options + | Package Options + | Package Options + | Limitations
    page number formats
    hyperbf -
    Generating Glossary Information - | Troubleshooting +
    Generating Glossary Information + | Troubleshooting +
    hyperem +
    Generating Glossary Information + | Generating Glossary Information
    hyperit -
    Generating Glossary Information +
    Generating Glossary Information +
    hypermd +
    Generating Glossary Information
    hyperrm -
    Generating Glossary Information - | Generating Glossary Information +
    Generating Glossary Information + | Generating Glossary Information +
    hypersc +
    Generating Glossary Information
    hypersf -
    Generating Glossary Information +
    Generating Glossary Information +
    hypersl +
    Generating Glossary Information
    hypertt -
    Generating Glossary Information +
    Generating Glossary Information +
    hyperup +
    Generating Glossary Information
    -
    \pagecompositor -
    Sample Documents
    perl -
    Installation +
    Installation
    \printacronym -
    Acronyms - | Troubleshooting +
    Acronyms + | Troubleshooting
    \printglossary -
    Defining New Glossary Types - | Defining New Glossary Types - | Troubleshooting +
    Defining New Glossary Types + | Defining New Glossary Types + | Troubleshooting
    \protect -
    Troubleshooting +
    Troubleshooting
    \saveglosentry -
    Troubleshooting - | Obsolete Commands +
    Troubleshooting + | Obsolete Commands +
    \setacronymnamefmt +
    Acronyms
    \setglossary -
    Limitations - | Troubleshooting +
    Limitations + | Troubleshooting
    \setglossary keys
    delimN -
    Customizing the Glossary +
    Customizing the Glossary
    delimR -
    Customizing the Glossary +
    Customizing the Glossary
    delimT -
    Customizing the Glossary - | Customizing the Glossary +
    Customizing the Glossary + | Customizing the Glossary
    glodelim -
    Customizing the Glossary - | Customizing the Glossary +
    Customizing the Glossary + | Customizing the Glossary
    gloskip -
    Customizing the Glossary +
    Customizing the Glossary + | Customizing the Glossary
    glsnumformat -
    Customizing the Glossary - | Troubleshooting +
    Customizing the Glossary + | Troubleshooting
    type -
    Customizing the Glossary +
    Customizing the Glossary
    \storeglosentry -
    Sample Documents - | Limitations - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    Storing Glossary Information + | Storing Glossary Information + | Sample Documents + | Limitations + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    table of contents, adding to
    see package options, toc -
    \theglossarynum -
    Customizing the Glossary - | Sample Documents - | Limitations
    \useacronym -
    Examples +
    Examples
    \useGlosentry -
    Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting - | Troubleshooting +
    Storing Glossary Information + | Storing Glossary Information + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting + | Troubleshooting
    \xacronym -
    Acronyms - | Acronyms - | Acronyms +
    Acronyms + | Acronyms + | Acronyms
    \xglossary -
    Package Options - | Defining New Glossary Types - | Acronyms - | Troubleshooting - | Obsolete Commands - | Obsolete Commands +
    Package Options + | Defining New Glossary Types + | Acronyms + | Troubleshooting + | Obsolete Commands + | Obsolete Commands
    xpdf -
    Troubleshooting +
    Troubleshooting
    \xspace -
    Acronyms - | Acronyms +
    Acronyms + | Acronyms



    Footnotes

    -
    ... /usr/bin/... /usr/bin/1
    and you can also remove the .pl extension which isn't to everyone's liking.
    -
    ... glossary... glossary2
    This is because the list and number ranges are delimited using \delimR and \delimN instead of explicitly using a comma or en-dash.
    -
    ... backslash... backslash3
    Note, you should no longer try redefining the command \glsnumformat, as @@ -2869,21 +3035,27 @@ this now takes an optional argument, allowing for different glossary types
    -
    ... space... space4
    This is because the altlist style is intended for use with long descriptions that will look better ending with a full stop which the user can add if desired.
    -
    ...\glossaryalignment...\glossaryalignment5
    This isn't quite true anymore, see the documented code for clarification
    -
    ... information6
    +
    ...\glossaryheader6
    +
    Note that as from version 2.4, +you must use \newcommand not \renewcommand + +
    +
    ... information7
    This should be in the directory texmf/doc/latex/graphics/ @@ -2891,7 +3063,7 @@ anymore, see the documented code for clarification


    -Nicola L. C. Talbot. School of Computing Sciences. University of East Anglia. Last Modified: 2006-07-09 +Nicola L. C. Talbot. School of Computing Sciences. University of East Anglia. Last Modified: 2006-07-25
    diff --git a/Master/texmf-dist/doc/latex/glossary/sample.tex b/Master/texmf-dist/doc/latex/glossary/sample.tex index adb2f94af49..5d3a245a346 100644 --- a/Master/texmf-dist/doc/latex/glossary/sample.tex +++ b/Master/texmf-dist/doc/latex/glossary/sample.tex @@ -33,6 +33,21 @@ \makeglossary + +\storeglosentry{glossary1}{name=glossary, +description=1) list of technical words} + +\storeglosentry{glossary2}{name=glossary, +description=2) collection of glosses} + +\storeglosentry{Perl}{name=\texttt{Perl}, +sort=Perl, % need a sort key because name contains a command +description=A scripting language} + +\storeglosentry{pagelist}{name=page list, +description={a list of individual pages or page ranges, +e.g.\ 1,2,4,7-9}} + \begin{document} \title{Sample Document Using glossary Package} @@ -46,10 +61,8 @@ \chapter{Introduction} \pagenumbering{arabic} -A \xglossary{name=glossary,description=1) list of technical -words}{glossary} is a very useful addition to any -technical document, although a \xglossary{name=glossary, -description=2) collection of glosses}{glossary} can +A \gls{glossary1} is a very useful addition to any +technical document, although a \gls{glossary2} can also simply be a collection of glosses, which is another thing entirely. @@ -61,23 +74,18 @@ of an \texttt{.ind} file, and change the name of the log file so that it doesn't overwrite the index log file (if you have an index for your document). Rather than having to remember all the command line -switches, you can call the \xglossary{name=\texttt{Perl}, -sort=Perl,description=A scripting language}{Perl} script +switches, you can call the \gls{Perl} script \texttt{makeglos.pl} which provides a convenient wrapper. If you have two terms with different meanings in your -\xglossary{name=glossary,description=1) list of technical -words}{glossary}, -\texttt{makeindex} will of course treat them as two +\gls{glossary1}, \texttt{makeindex} will of course treat them as two separate entries, however, some people prefer to -merge them. This can be done using -\texttt{makeglos.pl}, and passing the option -\texttt{-m}. +merge them. This can be done using \texttt{makeglos.pl}, and +passing the option \texttt{-m}. If a comma appears within the name or description, grouping -must be used: \xglossary{name=page list,description={a list -of individual pages or page ranges, e.g.\ 1,2,4,7-9}}{page list} +must be used: \gls{pagelist}. \printglossary diff --git a/Master/texmf-dist/doc/latex/glossary/sample4col.tex b/Master/texmf-dist/doc/latex/glossary/sample4col.tex index 2d3ee56f266..e99457a0d0f 100644 --- a/Master/texmf-dist/doc/latex/glossary/sample4col.tex +++ b/Master/texmf-dist/doc/latex/glossary/sample4col.tex @@ -28,22 +28,24 @@ %% Right brace \} Tilde \~} \documentclass[a4paper]{article} -\usepackage[style=long,cols=3]{glossary} +\usepackage[style=long,cols=3]{glossary}[2006/07/20] \renewcommand{\glossaryalignment}{llll} -\renewcommand{\glossaryheader}{% + +\newcommand{\glossaryheader}{% \bfseries Name & \bfseries Description & \bfseries Unit & \bfseries Page} \makeglossary +\storeglosentry{w}{name={$w$},sort=w,description={width&m}} +\storeglosentry{M}{name={$M$},sort=M,description={mass&kg}} + \begin{document} \printglossary -The width\glossary{name={$w$},sort=w,description={width&m}}, $w$, is -measured in meters. The -mass\glossary{name={$M$},sort=M,description={mass&kg}}, $M$ is +The width, \gls{w}, is measured in meters. The mass, \gls{M} is measured in kilograms. \end{document} diff --git a/Master/texmf-dist/doc/latex/glossary/sampleAcr.tex b/Master/texmf-dist/doc/latex/glossary/sampleAcr.tex index 7199904b0b6..26e77a8f508 100644 --- a/Master/texmf-dist/doc/latex/glossary/sampleAcr.tex +++ b/Master/texmf-dist/doc/latex/glossary/sampleAcr.tex @@ -28,34 +28,35 @@ %% Right brace \} Tilde \~} \documentclass[a4paper]{report} -\usepackage{xspace} \usepackage[colorlinks,plainpages=false]{hyperref} -\usepackage[style=altlist,hypertoc,number=none,acronym]{glossary} +\usepackage[style=altlist,hypertoc,acronym]{glossary} \makeacronym +\newacronym{svm}{support vector machine}{% +description=Statistical pattern recognition +technique~\cite{svm}} - -\newacronym{svm}{support vector machine}{description=Statistical pattern recognition technique~\cite{svm}} - -\newacronym[ksvm]{k-svm}{kernel support vector machine}{description={Statistical pattern recognition technique using -the ``kernel trick'' (see also SVM)}} +\newacronym[ksvm]{k-svm}{kernel support vector machine}{% +description={Statistical pattern recognition technique +using the ``kernel trick'' (see also SVM)}} \begin{document} \tableofcontents \chapter{Support Vector Machines} -The \svm is used widely in the area of pattern recognition. +The \svm\ is used widely in the area of pattern recognition. \useacronym*[s]{svm} are \ldots -This is the long version: \svmlong or alternatively: +This is the long version: \svmlong\ or alternatively: \acrln*{svm}. -Abbreviation: \svmshort or \acrsh*{svm}. +Abbreviation: \svmshort\ or \acrsh*{svm}. \chapter{Kernel Support Vector Machines} -The \ksvm\ is \ifacronymfirstuse{svm}{a}{an} \svm\ that uses the so called ``kernel trick''. +The \ksvm\ is \ifacronymfirstuse{svm}{a}{an} \svm\ that uses +the so called ``kernel trick''. \resetallacronyms \useacronym*[s]{ksvm} \ldots diff --git a/Master/texmf-dist/doc/latex/glossary/sampleEq.tex b/Master/texmf-dist/doc/latex/glossary/sampleEq.tex index 03edb3092a0..dc8b2a4e21b 100644 --- a/Master/texmf-dist/doc/latex/glossary/sampleEq.tex +++ b/Master/texmf-dist/doc/latex/glossary/sampleEq.tex @@ -29,23 +29,85 @@ \documentclass[a4paper,12pt]{report} \usepackage{amsmath} -\usepackage[header,border=none,cols=3]{glossary} +\usepackage[colorlinks]{hyperref} +\usepackage[header,border=none,cols=3,number=equation]{glossary}[2006/07/20] \newcommand{\erf}{\operatorname{erf}} \newcommand{\erfc}{\operatorname{erfc}} -\renewcommand{\theglossarynum}{\theequation} -\renewcommand{\pagecompositor}{.} +\makeglossary -\renewcommand{\glossaryname}{Index of Special Functions and Notations} -\renewcommand{\glossaryheader}{\bfseries Notation & -\multicolumn{2}{c}{\bfseries -\begin{tabular}{c}Name of the Function and\\the number of -the formula\end{tabular}}\\} +\renewcommand{\glossaryname}{Index of Special Functions +and Notations} -\makeglossary + +\renewcommand{\entryname}{Notation} + +\renewcommand{\descriptionname}{Function Name} + +\renewcommand{\glspageheader}{Number of Formula} + +\newcommand{\glossarysubheader}{ & & \\} + + +\storeglosentry{Gamma}{name=\ensuremath{\Gamma(z)}, +description=Gamma function,sort=Gamma} + +\storeglosentry{gamma}{name={\ensuremath{\gamma(\alpha,x)}}, +description=Incomplete gamma function,sort=gamma} + +\storeglosentry{iGamma}{name={\ensuremath{\Gamma(\alpha,x)}}, +description=Incomplete gamma function,sort=Gamma} + +\storeglosentry{psi}{name=\ensuremath{\psi(x)}, +description=Psi function,sort=psi} + +\storeglosentry{erf}{name=\ensuremath{\erf(x)}, +description=Error function,sort=erf} + +\storeglosentry{erfc}{name=\ensuremath{\erfc}, +description=Complementary error function,sort=erfc} + +\storeglosentry{B}{name={\ensuremath{B(x,y)}}, +description=Beta function,sort=B} + +\storeglosentry{Bx}{name={\ensuremath{B_x(p,q)}}, +description=Incomplete beta function,sort=Bx} + +\storeglosentry{Tn}{name=\ensuremath{T_n(x)}, +description=Chebyshev's polynomials of the first kind,sort=Tn} + +\storeglosentry{Un}{name=\ensuremath{U_n(x)}, +description=Chebyshev's polynomials of the second kind,sort=Un} + +\storeglosentry{Hn}{name=\ensuremath{H_n(x)}, +description=Hermite polynomials,sort=Hn} + +\storeglosentry{Ln}{name=\ensuremath{L_n^\alpha(x)}, +description=Laguerre polynomials,sort=Lna} + +\storeglosentry{Znu}{name=\ensuremath{Z_\nu(z)}, +description=Bessel functions,sort=Z} + +\storeglosentry{Phi}{name={\ensuremath{\Phi(\alpha,\gamma;z)}}, +description=confluent hypergeometric function,sort=Pagz} + +\storeglosentry{knu}{name=\ensuremath{k_\nu(x)}, +description=Bateman's function,sort=kv} + +\storeglosentry{Dp}{name=\ensuremath{D_p(z)}, +description=Parabolic cylinder functions,sort=Dp} + +\storeglosentry{F}{name={\ensuremath{F(\phi,k)}}, +description=Elliptical integral of the first kind,sort=Fpk} + +\storeglosentry{C}{name=\ensuremath{C}, +description=Euler's constant,sort=C} + +\storeglosentry{G}{name=\ensuremath{G}, +description=Catalan's constant,sort=G} \begin{document} \title{A Sample Document Using glossary.sty} @@ -57,14 +119,9 @@ This is a sample document illustrating the use of the \textsf{glossary} package. The functions here have been taken from ``Tables of Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik. The glossary is a list of special functions, so -the equation number has been used rather than the page number. This can be -done by defining \verb|\theglossarynum| to be \verb|\theequation|. -The equation numbers are a composite number made up of the chapter number -and number of equation within the chapter. The two parts of the page -number are separated by a fullstop. The default compositor is -a dash \verb|-|, so it needs to be set to a dot by redefining the command -\verb|\pagecompositor|. (This needs to be done \emph{before} the command -\verb|\makeglossary|.) +the equation number has been used rather than the page number. This +can be done using the \texttt{number=equation} package +option. \end{abstract} \printglossary @@ -72,129 +129,113 @@ a dash \verb|-|, so it needs to be set to a dot by redefining the command \chapter{Gamma Functions} \begin{equation} -\Gamma(z) = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} +\verb|\ensuremath| is only required here if using +hyperlinks. \begin{equation} -\Gamma(x+1) = x\Gamma(x) +\useGlosentry{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\gamma(\alpha, x) = \int_0^x e^{-t}t^{\alpha-1}\,dt +\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt \end{equation} -\glossary{name={$\gamma(\alpha,x)$},description=Incomplete gamma function,sort=gamma} \begin{equation} -\Gamma(\alpha, x) = \int_x^\infty e^{-t}t^{\alpha-1}\,dt +\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt \end{equation} -\glossary{name={$\Gamma(\alpha,x)$},description=Incomplete gamma function,sort=Gamma} \newpage \begin{equation} -\Gamma(\alpha) = \Gamma(\alpha, x) + \gamma(\alpha, x) +\gls{Gamma} = \Gamma(\alpha, x) + \gamma(\alpha, x) \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\psi(x) = \frac{d}{dx}\ln\Gamma(x) +\gls{psi} = \frac{d}{dx}\ln\Gamma(x) \end{equation} -\glossary{name=$\psi(x)$,description=Psi function,sort=psi} \chapter{Error Functions} \begin{equation} -\erf(x) = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt +\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt \end{equation} -\glossary{name=$\erf(x)$,description=Error function,sort=erf} \begin{equation} -\erfc(x) = 1 - \erf(x) +\gls{erfc} = 1 - \erf(x) \end{equation} -\glossary{name=$\erfc(x)$,description=Complementary error function,sort=erfc} \chapter{Beta Function} \begin{equation} -B(x,y) = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt +\gls{B} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} Alternatively: \begin{equation} -B(x,y) = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi +\gls{B} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} \begin{equation} -B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) +\gls{B} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} \begin{equation} -B_x(p,q) = \int_0^x t^{p-1}(1-t)^{q-1}\,dt +\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt \end{equation} -\glossary{name={$B_x(p,q)$},description=Incomplete beta function,sort=Bx} \chapter{Polynomials} \section{Chebyshev's polynomials} \begin{equation} -T_n(x) = \cos(n\arccos x) +\gls{Tn} = \cos(n\arccos x) \end{equation} -\glossary{name=$T_n(x)$,description=Chebyshev's polynomials of the first kind,sort=Tn} \begin{equation} -U_n(x) = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} +\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} \end{equation} -\glossary{name=$U_n(x)$,description=Chebyshev's polynomials of the second kind,sort=Un} \section{Hermite polynomials} \begin{equation} -H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) +\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) \end{equation} -\glossary{name=$H_n(x)$,description=Hermite polynomials,sort=Hn} \section{Laguerre polynomials} \begin{equation} -L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} \frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) +L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} +\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) \end{equation} -\glossary{name=$L_n^\alpha(x)$,description=Laguerre polynomials,sort=Lna} \chapter{Bessel Functions} -Bessel functions $Z_\nu(z)$ are solutions of +Bessel functions $Z_\nu$ are solutions of \begin{equation} +\useglosentry{Znu} \frac{d^2Z_\nu}{dz^2} + \frac{1}{z}\,\frac{dZ_\nu}{dz} + -\left( -1-\frac{\nu^2}{z^2}Z_\nu = 0 -\right) +\left( 1-\frac{\nu^2}{z^2}Z_\nu = 0 \right) \end{equation} -\glossary{name=$Z_\nu(z)$,description=Bessel functions,sort=Z} \chapter{Confluent hypergeometric function} \begin{equation} -\Phi(\alpha,\gamma;z) = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} +\gls{Phi} = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} + \frac{\alpha(\alpha+1)}{\gamma(\gamma+1)}\,\frac{z^2}{2!} -+\frac{\alpha(\alpha+1)(\alpha+2)}{\gamma(\gamma+1)(\gamma+2)}\,\frac{z^3}{3!} -+ \cdots ++\frac{\alpha(\alpha+1)(\alpha+2)}{\gamma(\gamma+1)(\gamma+2)}\, +\frac{z^3}{3!} + \cdots \end{equation} -\glossary{name={$\Phi(\alpha,\gamma;z)$},description=confluent hypergeometric function,sort=Pagz} \begin{equation} -k_\nu(x) = \frac{2}{\pi}\int_0^{\pi/2}\cos(x \tan\theta - \nu\theta)\,d\theta +\gls{knu} = \frac{2}{\pi}\int_0^{\pi/2} +\cos(x \tan\theta - \nu\theta)\,d\theta \end{equation} -\glossary{name=$k_\nu(x)$,description=Bateman's function,sort=kv} \chapter{Parabolic cylinder functions} \begin{equation} -D_p(z) = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} +\gls{Dp} = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} \left\{ \frac{\surd\pi}{\Gamma\left(\frac{1-p}{2}\right)} \Phi\left(-\frac{p}{2},\frac{1}{2};\frac{z^2}{2}\right) @@ -202,26 +243,22 @@ D_p(z) = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} \Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) \right\} \end{equation} -\glossary{name=$D_p(z)$,description=Parabolic cylinder functions,sort=Dp} \chapter{Elliptical Integral of the First Kind} \begin{equation} -F(\phi, k) = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} +\gls{F} = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} \end{equation} -\glossary{name={$F(\phi,k)$},description=Elliptical integral of the first kind,sort=Fpk} \chapter{Constants} \begin{equation} -C = 0.577\,215\,664\,901\ldots +\gls{C} = 0.577\,215\,664\,901\ldots \end{equation} -\glossary{name=$C$,description=Euler's constant,sort=C} \begin{equation} -G = 0.915\,965\,594\ldots +\gls{G} = 0.915\,965\,594\ldots \end{equation} -\glossary{name=$G$,description=Catalan's constant,sort=G} \end{document} \endinput diff --git a/Master/texmf-dist/doc/latex/glossary/sampleEqPg.tex b/Master/texmf-dist/doc/latex/glossary/sampleEqPg.tex index 08449db253c..f5ca353ec4f 100644 --- a/Master/texmf-dist/doc/latex/glossary/sampleEqPg.tex +++ b/Master/texmf-dist/doc/latex/glossary/sampleEqPg.tex @@ -29,25 +29,85 @@ \documentclass[a4paper,12pt]{report} \usepackage{amsmath} -\usepackage[header,toc,border=none,cols=3]{glossary} +\usepackage[colorlinks]{hyperref} +\usepackage[header,toc,border=none,cols=3, + number=equation]{glossary}[2006/07/20] \newcommand{\erf}{\operatorname{erf}} \newcommand{\erfc}{\operatorname{erfc}} -\renewcommand{\theglossarynum}{\theequation} -\renewcommand{\pagecompositor}{.} - \renewcommand{\glossaryname}{Index of Special Functions and Notations} \renewcommand{\glossarypreamble}{Numbers in italic indicate the equation number, numbers in bold indicate page numbers where the main definition occurs.\par} -\setglossary{glsnumformat=textit} +\setglossary{glsnumformat=hyperit} + +\renewcommand{\entryname}{Notation} + +\renewcommand{\descriptionname}{Function Name} + +\newcommand{\glossarysubheader}{ & & \\} + + +\storeglosentry{Gamma}{name=\ensuremath{\Gamma(z)}, +description=Gamma function,sort=Gamma} + +\storeglosentry{gamma}{name=\ensuremath{\gamma(\alpha,x)}, +description=Incomplete gamma function,sort=gamma} + +\storeglosentry{iGamma}{name=\ensuremath{\Gamma(\alpha,x)}, +description=Incomplete gamma function,sort=Gamma} + +\storeglosentry{psi}{name=\ensuremath{\psi(x)}, +description=Psi function,sort=psi} + +\storeglosentry{erf}{name=\ensuremath{\erf(x)}, +description=Error function,sort=erf} + +\storeglosentry{erfc}{name=\ensuremath{\erfc(x)}, +description=Complementary error function,sort=erfc} + +\storeglosentry{beta}{name=\ensuremath{B(x,y)}, +description=Beta function,sort=B} + +\storeglosentry{Bx}{name=\ensuremath{B_x(p,q)}, +description=Incomplete beta function,sort=Bx} -\renewcommand{\glossaryheader}{\bfseries Notation & -\multicolumn{2}{c}{\bfseries -\begin{tabular}{c}Name of the Function and\\the number of -the formula\end{tabular}}\\} +\storeglosentry{Tn}{name=\ensuremath{T_n(x)}, +description=Chebyshev's polynomials of the first kind, +sort=Tn} + +\storeglosentry{Un}{name=\ensuremath{U_n(x)}, +description=Chebyshev's polynomials of the second kind, +sort=Un} + +\storeglosentry{Hn}{name=\ensuremath{H_n(x)}, +description=Hermite polynomials,sort=Hn} + +\storeglosentry{Lna}{name=\ensuremath{L_n^\alpha(x)}, +description=Laguerre polynomials,sort=Lna} + +\storeglosentry{Znu}{name=\ensuremath{Z_\nu(z)}, +description=Bessel functions,sort=Z} + +\storeglosentry{Pagz}{name=\ensuremath{\Phi(\alpha,\gamma;z)}, +description=confluent hypergeometric function,sort=Pagz} + +\storeglosentry{kv}{name=\ensuremath{k_\nu(x)}, +description=Bateman's function,sort=kv} + +\storeglosentry{Dp}{name=\ensuremath{D_p(z)}, +description=Parabolic cylinder functions,sort=Dp} + +\storeglosentry{Fpk}{name=\ensuremath{F(\phi,k)}, +description=Elliptical integral of the first kind,sort=Fpk} + +\storeglosentry{C}{name=\ensuremath{C}, +description=Euler's constant,sort=C} + +\storeglosentry{G}{name=\ensuremath{G}, +description=Catalan's constant,sort=G} \renewcommand{\shortglossaryname}{Special Functions} @@ -66,13 +126,18 @@ This is a sample document illustrating the use of the \textsf{glossary} package. The functions here have been taken from ``Tables of Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik. -The glossary lists both page number and equation numbers. Since the -equation numbers depend on chapter numbers, the page compositor needs -to be redefined. (Note that this example will only work where the -page number and equation number compositor is the same. So it won't work -if, say, the page numbers are of the form 2-4 and the equation numbers -are of the form 4.6) As most of the glossary entries should have an italic -format, it is easiest to set the default format to italic. +The glossary lists both page numbers and equation numbers. +Since the majority of the entries use the equation number, +\texttt{number=equation} was used as a package option. +The entries that should refer to the page number instead +use the \texttt{number=equation} glossary key. +Note that this example will only work where the +page number and equation number compositor is the same. So +it won't work if, say, the page numbers are of the form +2-4 and the equation numbers are of the form 4.6. +As most of the glossary entries should have an italic +format, it is easiest to set the default format to +italic. \end{abstract} @@ -80,115 +145,88 @@ format, it is easiest to set the default format to italic. \printglossary -\newcommand{\myglossary}[2]{% -\renewcommand{\theglossarynum}{#1}\glossary{#2}} - -\newcommand{\glossarypage}[1]{% -\renewcommand{\theglossarynum}{\thepage}\glossary{#1,format=textbf}} -\newcommand{\glossaryequation}[1]{% -\renewcommand{\theglossarynum}{\theequation}\glossary{#1}} - \chapter{Gamma Functions} -The gamma function is defined as -\renewcommand{\theglossarynum}{\thepage} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma,format=textbf} -\renewcommand{\theglossarynum}{\theequation} +The \useGlosentry[number=page,format=hyperbf]{Gamma}{gamma function} is +defined as \begin{equation} -\Gamma(z) = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\Gamma(x+1) = x\Gamma(x) +\useGlosentry{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\gamma(\alpha, x) = \int_0^x e^{-t}t^{\alpha-1}\,dt +\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt \end{equation} -\glossary{name={$\gamma(\alpha,x)$},description=Incomplete gamma function,sort=gamma} \begin{equation} -\Gamma(\alpha, x) = \int_x^\infty e^{-t}t^{\alpha-1}\,dt +\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt \end{equation} -\glossary{name={$\Gamma(\alpha,x)$},description=Incomplete gamma function,sort=Gamma} \newpage \begin{equation} -\Gamma(\alpha) = \Gamma(\alpha, x) + \gamma(\alpha, x) +\useGlosentry{Gamma}{\ensuremath{\Gamma(\alpha)}} = \Gamma(\alpha, x) + \gamma(\alpha, x) \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\psi(x) = \frac{d}{dx}\ln\Gamma(x) +\gls{psi} = \frac{d}{dx}\ln\Gamma(x) \end{equation} -\glossary{name=$\psi(x)$,description=Psi function,sort=psi} \chapter{Error Functions} -The error function is defined as: -\renewcommand{\theglossarynum}{\thepage} -\glossary{name=$\erf(x)$,description=Error function,sort=erf,format=textbf} -\renewcommand{\theglossarynum}{\theequation} +The \useGlosentry[number=page,format=hyperbf]{erf}{error +function} is defined as: \begin{equation} -\erf(x) = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt +\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt \end{equation} -\glossary{name=$\erf(x)$,description=Error function,sort=erf} \begin{equation} -\erfc(x) = 1 - \erf(x) +\gls{erfc} = 1 - \erf(x) \end{equation} -\glossary{name=$\erfc(x)$,description=Complementary error function,sort=erfc} \chapter{Beta Function} \begin{equation} -B(x,y) = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt +\gls{beta} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} Alternatively: \begin{equation} -B(x,y) = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi +\gls{beta} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} \begin{equation} -B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) +\gls{beta} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} \begin{equation} -B_x(p,q) = \int_0^x t^{p-1}(1-t)^{q-1}\,dt +\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt \end{equation} -\glossary{name={$B_x(p,q)$},description=Incomplete beta function,sort=Bx} \chapter{Chebyshev's polynomials} \begin{equation} -T_n(x) = \cos(n\arccos x) +\gls{Tn} = \cos(n\arccos x) \end{equation} -\glossary{name=$T_n(x)$,description=Chebyshev's polynomials of the first kind,sort=Tn} \begin{equation} -U_n(x) = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} +\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} \end{equation} -\glossary{name=$U_n(x)$,description=Chebyshev's polynomials of the second kind,sort=Un} \chapter{Hermite polynomials} \begin{equation} -H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) +\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) \end{equation} -\glossary{name=$H_n(x)$,description=Hermite polynomials,sort=Hn} \chapter{Laguerre polynomials} \begin{equation} -L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} \frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) +\gls{Lna} = \frac{1}{n!}e^x x^{-\alpha} +\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) \end{equation} -\glossary{name=$L_n^\alpha(x)$,description=Laguerre polynomials,sort=Lna} \chapter{Bessel Functions} @@ -199,27 +237,28 @@ Bessel functions $Z_\nu(z)$ are solutions of 1-\frac{\nu^2}{z^2}Z_\nu = 0 \right) \end{equation} -\glossary{name=$Z_\nu(z)$,description=Bessel functions,sort=Z} +\useglosentry{Znu} \chapter{Confluent hypergeometric function} \begin{equation} -\Phi(\alpha,\gamma;z) = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} +\gls{Pagz} = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} + \frac{\alpha(\alpha+1)}{\gamma(\gamma+1)}\,\frac{z^2}{2!} -+\frac{\alpha(\alpha+1)(\alpha+2)}{\gamma(\gamma+1)(\gamma+2)}\,\frac{z^3}{3!} ++\frac{\alpha(\alpha+1)(\alpha+2)} + {\gamma(\gamma+1)(\gamma+2)} +\,\frac{z^3}{3!} + \cdots \end{equation} -\glossary{name={$\Phi(\alpha,\gamma;z)$},description=confluent hypergeometric function,sort=Pagz} \begin{equation} -k_\nu(x) = \frac{2}{\pi}\int_0^{\pi/2}\cos(x \tan\theta - \nu\theta)\,d\theta +\gls{kv} = \frac{2}{\pi}\int_0^{\pi/2} +\cos(x \tan\theta - \nu\theta)\,d\theta \end{equation} -\glossary{name=$k_\nu(x)$,description=Bateman's function,sort=kv} \chapter{Parabolic cylinder functions} \begin{equation} -D_p(z) = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} +\gls{Dp} = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} \left\{ \frac{\surd\pi}{\Gamma\left(\frac{1-p}{2}\right)} \Phi\left(-\frac{p}{2},\frac{1}{2};\frac{z^2}{2}\right) @@ -227,26 +266,23 @@ D_p(z) = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} \Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) \right\} \end{equation} -\glossary{name=$D_p(z)$,description=Parabolic cylinder functions,sort=Dp} \chapter{Elliptical Integral of the First Kind} \begin{equation} -F(\phi, k) = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} +\gls{Fpk} = \int_0^\phi +\frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} \end{equation} -\glossary{name={$F(\phi,k)$},description=Elliptical integral of the first kind,sort=Fpk} \chapter{Constants} \begin{equation} -C = 0.577\,215\,664\,901\ldots +\gls{C} = 0.577\,215\,664\,901\ldots \end{equation} -\glossary{name=$C$,description=Euler's constant,sort=C} \begin{equation} -G = 0.915\,965\,594\ldots +\gls{G} = 0.915\,965\,594\ldots \end{equation} -\glossary{name=$G$,description=Catalan's constant,sort=G} \end{document} \endinput diff --git a/Master/texmf-dist/doc/latex/glossary/sampleNtn.tex b/Master/texmf-dist/doc/latex/glossary/sampleNtn.tex index 4873151ab9f..d8bbaac6f9a 100644 --- a/Master/texmf-dist/doc/latex/glossary/sampleNtn.tex +++ b/Master/texmf-dist/doc/latex/glossary/sampleNtn.tex @@ -37,6 +37,7 @@ \newglossarytype{notation}{not}{ntn}[style=long,cols=2,border,header] \newcommand{\notationname}{Notation} +\setglossary{type=notation,glsnumformat=ignore,glodelim={.}} \makenotation @@ -48,7 +49,7 @@ \maketitle \begin{abstract} -\pagenumbering{Alph}%stop hyperref complaining about duplicate page identifiers +\pagenumbering{Alph} This is a sample document illustrating the use of the \textsf{glossary} package. In this example, a new glossary type called \texttt{notation} is defined, so that the document can have a @@ -72,17 +73,20 @@ are denoted by a caligraphic font e.g.\ $\mathcal{S}$% \notation{name=$\mathcal{S}$,description=A set,sort=S}. -Let $\mathcal{U}$ denote the universal set\notation{name=$\mathcal{U}$,description={The universal set},sort=U}. +Let $\mathcal{U}$ denote the universal set\notation{ +name=$\mathcal{U}$,description={The universal set},sort=U}. -The cardinality\glossary{name=cardinality,description=The number of elements in the specified set} of a set $\mathcal{S}$ is denoted -$|\mathcal{S}|$% -\notation{name=$\mid\mathcal{S}\mid$,description=cardinality of $\mathcal{S}$,sort=cardinality} +The cardinality\glossary{name=cardinality, +description=The number of elements in the specified set} of +a set $\mathcal{S}$ is denoted $|\mathcal{S}|$% +\notation{name=$\mid\mathcal{S}\mid$, +description=cardinality of $\mathcal{S}$,sort=cardinality} \chapter{Next} Now for a hyperlink: -\xnotation{name=$\mathcal{U}$,description={The universal -set},sort=U}{$\mathcal{U}$}. +\xnotation{name=$\mathcal{U}$, description={The universal +set}, sort=U}{$\mathcal{U}$}. \end{document} \endinput diff --git a/Master/texmf-dist/doc/latex/glossary/sampleNtn2.tex b/Master/texmf-dist/doc/latex/glossary/sampleNtn2.tex index 9d44b0e8a9a..b92fa57ac10 100644 --- a/Master/texmf-dist/doc/latex/glossary/sampleNtn2.tex +++ b/Master/texmf-dist/doc/latex/glossary/sampleNtn2.tex @@ -30,29 +30,33 @@ \usepackage[plainpages=false,colorlinks]{hyperref} \usepackage{html} -\usepackage[toc]{glossary} +\usepackage[toc]{glossary}[2006/07/20] \makeglossary -\newglossarytype{notation}{not}{ntn} +\newglossarytype[nlg]{notation}{not}{ntn}[number=none] \newcommand{\notationname}{Notation} -\setglossary{type=notation,glsnumformat=ignore,% -glodelim={.}} \makenotation \begin{document} -\storeglosentry[notation]{not:set}{name={$\protect\mathcal{S}$},description=A set,sort=S} +\storeglosentry[notation]{not:set}{name={$\mathcal{S}$}, +description=A set,sort=S} -\storeglosentry[notation]{not:U}{name=$\protect\mathcal{U}$,description={The universal set},sort=U} +\storeglosentry[notation]{not:U}{name=$\mathcal{U}$, +description={The universal set},sort=U} -\storeglosentry[notation]{not:card}{name=$\mid\protect\mathcal{S}\mid$,description=cardinality of $\protect\mathcal{S}$,sort=cardinality} +\storeglosentry[notation]{not:card}{name=$\mid\mathcal{S}\mid$, +description=cardinality of $\mathcal{S}$, +sort=cardinality} -\storeglosentry{glos:set}{name=set,description=A collection of distinct objects} +\storeglosentry{glos:set}{name=set,description=A collection of +distinct objects} -\storeglosentry{glos:card}{name=cardinality,description=The number of elements in the specified set} +\storeglosentry{glos:card}{name=cardinality,description=The number of +elements in the specified set} \title{Sample Document using glossary Package} \author{Nicola Talbot} @@ -60,7 +64,7 @@ glodelim={.}} \maketitle \begin{abstract} -\pagenumbering{Alph}%stop hyperref complaining about duplicate page identifiers +\pagenumbering{Alph} This is a sample document illustrating the use of the \textsf{glossary} package. In this example, a new glossary type called \texttt{notation} is defined, so that the document can have a @@ -88,6 +92,10 @@ Let \gls{not:U} denote the universal set. The \gls{glos:card} of a set $\mathcal{S}$ is denoted \gls{not:card}. +\chapter{Another Chapter} + +Another mention of the universal set \gls{not:U}. + \end{document} \endinput %% diff --git a/Master/texmf-dist/doc/latex/glossary/sampleSec.tex b/Master/texmf-dist/doc/latex/glossary/sampleSec.tex index 4fdd0de8a82..dc1b3a07770 100644 --- a/Master/texmf-dist/doc/latex/glossary/sampleSec.tex +++ b/Master/texmf-dist/doc/latex/glossary/sampleSec.tex @@ -33,10 +33,16 @@ \makeglossary - -\storeglosentry{glos:I}{name=identity matrix,description=diagonal +\storeglosentry{ident}{name=identity matrix,description=diagonal matrix with 1s along the leading diagonal} +\storeglosentry{diag}{name=diagonal matrix, +description=matrix whose only non-zero entries are along +the leading diagonal} + +\storeglosentry{sing}{name=singular matrix, +description=matrix with zero determinant} + \begin{document} \pagenumbering{roman} @@ -51,27 +57,23 @@ This is a sample document illustrating the use of the \chapter{Diagonal matrices} -A diagonal matrix\glossary{name=diagonal matrix, -description=matrix whose only non-zero entries are along the leading diagonal,format=hyperit} -is a matrix where all elements not on the leading diagonal are zero. This is the +A \gls[format=hyperit]{diag} is a matrix where all elements not on the +leading diagonal are zero. This is the primary definition, so an italic font is used for the page number. \newpage \section{Identity matrix} -The identity matrix\glossary{name=identity matrix, -description=diagonal matrix with 1s along the leading diagonal} -\ldots +The \gls[format=hyperit]{ident} is a \gls{diag} whose leading +diagonal elements are all equal to 1. -Here is another entry for a diagonal matrix\glossary{name=diagonal matrix, -description=matrix whose only non-zero entries are along the leading diagonal} +Here is another entry for a \gls{diag}. \chapter{Singular Matrices} -A singular matrix\glossary{name=singular matrix, -description=matrix with zero determinant} -\ldots +A \gls{sing} is a matrix with zero determinant. +\useGlosentry{sing}{Singular matrices} are non-invertible. -Another \useGlosentry{glos:I}{identity matrix} entry. +Another \gls{ident} entry. \end{document} \endinput diff --git a/Master/texmf-dist/source/latex/glossary/glossary.dtx b/Master/texmf-dist/source/latex/glossary/glossary.dtx index 3c50320922c..6d31a8d363b 100644 --- a/Master/texmf-dist/source/latex/glossary/glossary.dtx +++ b/Master/texmf-dist/source/latex/glossary/glossary.dtx @@ -1,8 +1,9 @@ %\iffalse -% glossary.dtx generated using /nlctltpc/home/nlct/bin/makedtx version 0.9b (c) Nicola Talbot +% glossary.dtx generated using makedtx version 0.91b (c) Nicola Talbot % Command line args: % -macrocode ".*\.p.*l" % -macrocode ".*\.bat" +% -macrocode ".*\.tex" % -setambles ".*\.p.*l=>\nopreamble\nopostamble" % -setambles ".*\.bat=>\nopreamble\nopostamble" % -src "(.+)\.(sty)\Z=>\1.\2" @@ -12,9 +13,10 @@ % -src "(.+)\.(tex)\Z=>\1.\2" % -doc "manual.tex" % -author "Nicola Talbot" +% -prefinale "\\fi" % -dir "source" % glossary -% Created on 2006/7/9 16:01 +% Created on 2006/7/25 18:13 %\fi %\iffalse %<*package> @@ -64,7 +66,7 @@ \makeatother \RecordChanges \PageIndex -\OnlyDescription + %\OnlyDescription \newcommand{\cmdname}[1]{\texttt{\symbol{92}#1}} @@ -82,7 +84,7 @@ \texttt{#2=#1}\index{package options>#2>#1|hyperpage}}} \newcommand{\pkgoptval}[2]{\texttt{#1}\index{package options>#2>#1|hyperpage}} \newcommand{\filetype}[1]{\texttt{#1}\index{file types>#1|hyperpage}} -\newcommand{\stynamefmt}[1]{\textsf{#1}\index{#1=\textsf{#1}|hyperpage}} +\newcommand{\styname}[1]{\textsf{#1}\index{#1=\textsf{#1}|hyperpage}} \newcommand{\envname}[1]{\textsf{#1}} @@ -94,15 +96,15 @@ %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{glossary.sty v 2.38: \LaTeXe\ Package to Assist Generating Glossaries} +% \title{glossary.sty v 2.4: \LaTeXe\ Package to Assist Generating Glossaries} % \author{Nicola L.C. Talbot} -% \date{9th July 2006} +% \date{20th July 2006} % \maketitle %\tableofcontents % % \section{Introduction} % \changes{1.0}{2004 July 29}{Initial version} -% The \stynamefmt{glossary} package is provided to assist +% The \styname{glossary} package is provided to assist %generating a glossary. It has a certain amount of flexibility, %allowing the user to customize the format of the glossary, and %define new glossary-style objects. @@ -130,9 +132,11 @@ %\end{verbatim} %along with several sample files. The file \texttt{glossary.sty} %should be placed somewhere in the \LaTeX\ path, e.g.\ -%\texttt{texmf/tex/latex/glossary/}. The file -%\texttt{glossary.perl} is a \LaTeX2HTML\ style file, and should -%be placed in the \LaTeX2HTML\ style file directory (usually +%\texttt{texmf/tex/latex/glossary/} or +%\texttt{localtexmf/tex/latex/glossary/}. Remember to update the +%\TeX\ database if you are installing this package for the first time. +%The file \texttt{glossary.perl} is a \LaTeX2HTML\ style file, and +%should be placed in the \LaTeX2HTML\ style file directory (usually %\texttt{latex2html/styles/}). The file \texttt{makeglos.pl} %is a Perl script which calls \appname{makeindex}. If you are %using UNIX or Linux, you will need to set the permissions so @@ -145,7 +149,7 @@ %this file, if \appname{perl} is located in a directory other than \verb"/usr/bin/"\footnote{and you can also remove the \texttt{.pl} %extension which isn't to everyone's liking.}.) % -%If you are not using UNIX or Linux, you may have to explicitly +%If you are not using UNIX or Linux etc, you may have to explicitly %load the file into Perl, so you would need to do %\texttt{perl makeglos.pl} instead of just \texttt{makeglos.pl}. %If you are using Windows, a batch file, \texttt{makeglos.bat} @@ -180,12 +184,15 @@ %list of \meta{key}=\meta{value} pairs. The following keys are %available: %\begin{center} -%\begin{tabular}{ll} +%\begin{tabular}{lp{0.8\linewidth}} %\bfseries Key & \bfseries Value\\ %\ttfamily \gloskey{name} & The entry name\\ %\ttfamily \gloskey{description} & A description about the entry\\ %\ttfamily \gloskey{sort} & How to sort the entry. (Entry name used if sort omitted)\\ -%\ttfamily \gloskey{format} & How to format the page number +%\ttfamily \gloskey{format} & How to format the page number\\ +%\ttfamily \gloskey{number} & Override the page number with a different +%counter. The value should be the name of a counter (e.g.\ +%\texttt{number=section}). %\end{tabular} %\end{center} % For example: @@ -200,9 +207,17 @@ % description={The universal set}, % sort=U} %\end{verbatim} -%The page format for individual entries can be changed using the -%\gloskey{format} key. This should be the name of a \LaTeX\ -%formatting command without the preceding \verb'\' (as with the +%Note that you should always use the \gloskey{sort} +%key if the \gloskey{name} key contains commands, this is particularly +%important if you are using hyperlinks, as the target is constructed +%from the \gloskey{name} key if the \gloskey{sort} key is omitted. +% +%In the glossary, each entry is followed by a list of page numbers +%that correspond to the pages where the relevant \cmdname{glossary} +%command is placed. By default the numbers are formatted in the +%current font, but the page number format for individual entries can be +%changed using the \gloskey{format} key. This should be the name of a +%\LaTeX\ formatting command without the preceding \verb'\' (as with the %\verb'|' operator in \cmdname{index}.) For example: %\begin{verbatim} %\glossary{name={$\mathbb{R}$}, @@ -216,23 +231,56 @@ %\texttt{'hyperbf}} %\changes{2.12}{2004 November 1}{Hyper page format: %\texttt{'hyperrm}} +%\changes{2.4}{2006 July 20}{Hyper page formats updated to take two +%arguments. Additional formats also provided} %\begin{center} %\begin{tabular}{ll} %\glsnumfmt{hyperrm} & The number is a hyper link in roman \\ %\glsnumfmt{hypersf} & The number is a hyper link in sans-serif \\ %\glsnumfmt{hypertt} & The number is a hyper link in typewriter font \\ %\glsnumfmt{hyperbf} & The number is a hyper link in bold \\ -%\glsnumfmt{hyperit} & The number is a hyper link in italic +%\glsnumfmt{hypermd} & The number is a hyper link in medium weight \\ +%\glsnumfmt{hyperit} & The number is a hyper link in italic\\ +%\glsnumfmt{hypersl} & The number is a hyper link in slanted font\\ +%\glsnumfmt{hyperup} & The number is a hyper link in upright font\\ +%\glsnumfmt{hypersc} & The number is a hyper link in small caps\\ +%\glsnumfmt{hyperem} & The number is a hyper link using \cmdname{emph} %\end{tabular} %\end{center} %If the \pkgopt{hyper} option has not been set, +%\glsnumfmt{hyperem} is equivalent to \texttt{emph}, and the remaining %\glsnumfmt{hyperrm} etc are equivalent to \texttt{textrm} etc. -%You should use \icmdname{hyperrm} instead of -%\cmdname{hyperpage}, as \cmdname{hyperpage} won't +%Note that it is important the you use \texttt{hyperrm} instead of +%\texttt{hyperpage}, as the \cmdname{hyperpage} command won't %work on a list or range of numbers in the glossary% %\footnote{This is because the list and number ranges are %delimited using \cmdname{delimR} and \cmdname{delimN} instead of -%explicitly using a comma or en-dash.}. +%explicitly using a comma or en-dash.}. If you want to define your +%own command that uses hyper links, it must be defined in an +%analogous manner to \icmdname{hyperrm}. For example, if you want +%to display a page number in a bold italic format, that contains a +%hyperlink to the appropriate page, you would need to define it as +%follows: +%\begin{verbatim} +%\newcommand{\hyperbfit}[2][\gls@number]{% +%\textbf{\itshape\glshyper{#1}{#2}}} +%\end{verbatim} +%As can be seen from the definition, all the \cmdname{hyper}\meta{xx} +%commands have an optional argument. This argument is the name of the +%counter being used. You do not need to worry about this argument if +%you only use these commands within the \icmdname{glossary} command. +%So the previous example can simply be rewritten as: +%\begin{verbatim} +%\glossary{name={$\mathbb{R}$}, +% description={The set of real numbers}, +% sort=R, +% format=hyperbf} +%\end{verbatim} +% +%\textbf{Note:} although the numbers in the glossary are referred to +%as ``page'' numbers in this manual, they may in fact refer to some +%other counter, such as the \texttt{section} counter, depending on +%whether the \gloskey{number} key has been used. % %As with the \cmdname{index} command, care must be taken if you %want to use the special characters: \verb'@' \verb/|/ \verb+"+ and @@ -251,38 +299,45 @@ %\par\vspace{10pt}\noindent\cmdname{xglossary}\verb'{'\meta{gls-entry}% %\verb'}{'\meta{text}\verb"}" %\par\vspace{10pt}\noindent This is equivalent to\meta{text}\icmdname{glossary}\verb'{'\meta{gls-entry}\verb"}", -%where \meta{text} will be made a hyperlink to the +%where \meta{text} will be made a hyper link to the %relevant entry in the glossary, if hyper %links are supported. % %\subsection{Storing Glossary Information} % +%It is very cumbersome having to use the \icmdname{glossary} command +%throughout your document, every time you use a term that you want in +%your glossary. This is particularly true for terms with a long +%description. The \styname{glossary} package provides a means +%of storing the glossary information at the beginning of the document, +%and then using it whenever required. It is strongly recommended +%that you use this approach, rather than explicity using the +%\icmdname{glossary} command. +% %\changes{2.17}{2005 June 28}{'storeglosentry added} %\DescribeMacro{\storeglosentry} %The following command:\\[10pt] %\begin{ttfamily} %\cmdname{storeglosentry}[\textrm{\meta{gls-type}}]\{\textrm{\meta{label}}\}\{\textrm{\meta{gls-entry}}\} %\end{ttfamily}\\[10pt] -%can be used to store glossary information. That information -%can then be used later with any of the following commands: +%can be used to store glossary information, where \meta{label} is +%a unique label assigned to this entry. The information +%can then be used later with any of the following commands:\\[10pt] %\changes{2.14}{2005 May 28}{'useglosentry added} %\changes{2.14}{2005 May 28}{'useGlosentry added} %\changes{2.18}{2005 July 5}{'gls added} -%\DescribeMacro{\useglosentry} -%\DescribeMacro{\useGlosentry} -%\DescribeMacro{\gls}\\[10pt] %\begin{ttfamily} -%\cmdname{useglosentry}[\textrm{\meta{opt}}]\{\textrm{\meta{label}}\}\\ -%\cmdname{useGlosentry}[\textrm{\meta{opt}}]\{\textrm{\meta{label}}\}\{\textrm{\meta{text}}\}\\ -%\cmdname{gls}[\textrm{\meta{opt}}]\{\textrm{\meta{label}}\} +%\cmdname{useglosentry}[\textrm{\meta{opt}}]\{\textrm{\meta{label}}\}\DescribeMacro{\useglosentry}\\ +%\cmdname{useGlosentry}[\textrm{\meta{opt}}]\{\textrm{\meta{label}}\}\{\textrm{\meta{text}}\}\DescribeMacro{\useGlosentry}\\ +%\cmdname{gls}[\textrm{\meta{opt}}]\{\textrm{\meta{label}}\}\DescribeMacro{\gls} %\end{ttfamily}\\[10pt] -%\cmdname{useglosentry} adds the stored glossary entry -%\meta{gls-entry} to the appropriate glossary, -%\cmdname{useGlosentry} adds the stored glossary entry, and +%\cmdname{useglosentry} adds the glossary entry whose label is given by +%\meta{label} to the appropriate glossary, +%\cmdname{useGlosentry} adds the glossary entry, and %makes \meta{text} a hyperlink to that entry (if hyperlinks are %supported). The third command, \cmdname{gls}, is like %\cmdname{useGlosentry}, but forms \meta{text} from the name -%given in \meta{gls-entry}. +%given in the glossary entry. % %Returning to an earlier example, instead of typing: %\begin{verbatim} @@ -294,13 +349,13 @@ %can instead store the information: %\changes{2.19}{2005 July 8}{fixed bug in 'storeglosentry} %\begin{verbatim} -%\storeglosentry{glos:U}{name={$\protect\mathcal{U}$}, +%\storeglosentry{glos:U}{name={$\mathcal{U}$}, % description={The universal set}, % sort=U} %\end{verbatim} -%(Note the use of \cmdname{protect}.) Now, instead of continually -%copying and pasting the glossary command for this entry (which -%can have quite a large \gloskey{description} field), you can use either: +%Now, instead of continually copying and pasting the glossary command +%for this entry (which can have quite a large \gloskey{description} +%field), you can use either: %\begin{verbatim} %\useglosentry{glos:U} %\end{verbatim} @@ -330,12 +385,38 @@ % description={The universal set}, % sort=U}{$\mathcal{U}$} %\end{verbatim} -%The optional argument \meta{gls-type} indicates the glossary -%type (see \autoref{sec:newglostype} to find out how to define new +%If you want to use glossary entries in an equation, it is better +%to use \cmdname{ensuremath} instead of \verb|$|\ldots\verb'$'. +%For example: +%\begin{verbatim} +%\storeglosentry{Gamma}{name=\ensuremath{\Gamma(z)}, +%description=Gamma function, +%sort=Gamma} +%\end{verbatim} +%You can then use this entry in either text or math mode: +%\begin{verbatim} +%The \useGlosentry{Gamma}{Gamma function} is defined as +%\begin{equation} +%\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +%\end{equation} +%\end{verbatim} +%If you are using hyper links, and you want to use +%\cmdname{useGlosentry} within math mode, you must use +%\cmdname{ensuremath}: +%\begin{verbatim} +%\begin{equation} +%\useGlosentry{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) +%\end{equation} +%\end{verbatim} +% +%The optional argument to \icmdname{storeglosentry} (\meta{gls-type}) +%indicates the glossary type (see +%\autoref{sec:newglostype} to find out how to define new %glossary types). If omitted, the standard glossary is used. % -%The optional argument \meta{opt} allows you to add additional -%information to the glossary entry, for example: +%The optional argument to \icmdname{useglosentry}, +%\icmdname{useGlosentry} and \icmdname{gls} (\meta{opt}) allows you to +%add additional information to the glossary entry, for example: %\begin{verbatim} %\useglosentry[format=textbf]{glos:U} %\end{verbatim} @@ -346,10 +427,10 @@ % sort=U, % format=textbf} %\end{verbatim} -%The identifying label, \meta{label}, should not contain any -%special characters, and since \cmdname{storeglosentry} is -%fragile, care should be taken when using commands within its -%argument. If in doubt, use \cmdname{protect}. +%Since version 2.4, \icmdname{storeglosentry} is robust, and +%\cmdname{protect} should no longer be needed, however +%the identifying label, \meta{label}, should not +%contain any special characters. % %As from version 2.36, if you want to use all glossary entries %which have been defined using \cmdname{storeglosentry}, do: @@ -358,11 +439,12 @@ % %\section{makeglos.pl} % -%The glossary information (as given by the commands -%\cmdname{glossary} and \cmdname{xglossary}) is saved in the file -%with the extension \filetype{glo} (unless the -%\icmdname{makeglossary} command is omitted, in which case the -%glossary information is simply ignored.) A \appname{makeindex} +%Whenever a glossary entry is used, either explicity using +%\cmdname{glossary} or \cmdname{xglossary} or implicitly using +%\cmdname{useglosentry}, \cmdname{useGlosentry} and \cmdname{gls}, +%the information is saved in a file with the extension \filetype{glo} +%(unless the \icmdname{makeglossary} command is omitted, in which case +%the glossary information is simply ignored.) A \appname{makeindex} %style file\index{makeindex style file (.ist)|see{file types, ist}} %(\filetype{ist}) is also created, which is customized for the %document, and can be passed to \appname{makeindex}. @@ -383,14 +465,13 @@ %allows you to use \appname{makeindex} without having to remember %all the command line options. The command %\begin{verbatim} -%makeglos.pl mydoc.glo +%makeglos.pl mydoc %\end{verbatim} %will perform the command: %\begin{verbatim} %makeindex -s mydoc.ist -t mydoc.glg -o mydoc.gls mydoc.glo %\end{verbatim} -%The \filetype{glo} extension may be omitted. In addition, -%\appname{makeglos.pl} also takes the option +%In addition, \appname{makeglos.pl} also takes the option %\texttt{-m} which can be used to collate entries where the %same name has multiple descriptions. %\changes{2.14}{2005 May 28}{makeglos -m switch added} @@ -400,20 +481,26 @@ %makeglos.pl [-ilqrgm] [-s sty] [-o gls] [-t log] [-p num] %\end{verbatim} %where all switches, apart from \texttt{-m} are the same as -%those for \appname{makeindex}. In addition, if the extension -%to the input file name is omitted, \filetype{glo} will be -%assumed. If there are multiple glossary types (see +%those for \appname{makeindex}. If there are multiple glossary types +%(see %\autoref{sec:newglostype}) and the file extension is omitted, \appname{makeglos.pl} will -%iterate through each glossary type. +%iterate through each glossary type (it will pick up the relevant +%information from the auxiliary file). % %The name of the \filetype{ist} file can be changed by redefining -%the command \cmdname{istfilename}\DescribeMacro{\istfilename}. +%the command \cmdname{istfilename}\DescribeMacro{\istfilename} +%\emph{before} \cmdname{makeglossary}. %For example: %\begin{verbatim} %\renewcommand{\istfilename}{foo.ist} +%\makeglossary %\end{verbatim} -%However, you will need to explicitly pass the name of this -%file to \appname{makeglos.pl} using the \texttt{-s} switch. +%Only one \filetype{ist} file will be created per document, even if +%you have multiple glossaries with different styles. The only +%circumstance where you will need multiple \filetype{ist} files for +%a single document is when you have multiple glossaries that use +%different counters with different compositors, but this is rarely +%likely to occur. % %Creation of the \filetype{ist} file can be suppressed by issuing %the command \cmdname{noist}\DescribeMacro{\noist}\ before @@ -423,7 +510,7 @@ % %It should be noted that there are a few packages that can %cause problems with the creation of the \filetype{ist} file, -%for example \stynamefmt{ngerman}. If you encounter problems +%for example \styname{ngerman}. If you encounter problems %when \LaTeX\ is processing the \icmdname{makeglossary} command, %or if you get errors from \appname{makeindex} complaining about %the style file, this is the most probable cause. @@ -499,18 +586,13 @@ %\end{description} % % \changes{1.1}{2004 August 14}{Package option \texttt{number}} +% \changes{2.4}{2006 July 20}{Package option \texttt{number} modified +%so that any counter can be used} %\item[\pkgopt{number}] -% Associated number corresponding to each entry. Values: -%\begin{description} -%\item[\pkgoptval{page}{number}] -%Each entry has the corresponding page number(s) where the -%entry is defined. (Default) -%\item[\pkgoptval{section}{number}] -%Each entry has the corresponding section number(s) where -%the entry is defined. -%\item[\pkgoptval{none}{number}] The corresponding numbers are -%suppressed. -%\end{description} +% Associated number corresponding to each entry. +%This may either be the keyword \pkgoptval{none}, indicating that +%the corresponding numbers should be suppressed, or it can be the +%name of a \LaTeX\ counter. The default is \pkgopt[page]{number}. % %\item[\pkgopt{toc}]\index{table of contents, adding to|see{package options, toc}} %Boolean variable: @@ -524,10 +606,10 @@ % %\item[\pkgopt{hypertoc}] %Boolean variable. This is similar to the package option -%\pkgopt{toc}, but if you are using the \stynamefmt{hyperref} +%\pkgopt{toc}, but if you are using the \styname{hyperref} %package, \pkgopt{hypertoc} will generate a link to the -%beginning of the page, whereas \pkgopt{toc} will have -%a hyperlink to jst after the glossary title. Note +%point immediately before the glossary title, whereas \pkgopt{toc} will +%have a hyperlink to just after the glossary title. Note %that you can not use both \pkgopt[true]{toc} and %\pkgopt[true]{hypertoc}. Default value: %\pkgopt[false]{hypertoc}. @@ -543,7 +625,7 @@ %corresponding entries in the glossary. %\item[\pkgoptval{false}{hyper}] Don't make associated numbers a hypertext link %\end{description} -%If the \stynamefmt{hyperref} or \stynamefmt{html} package has +%If the \styname{hyperref} or \styname{html} package has %been loaded prior to loading \texttt{glossary.sty}, %\pkgopt[true]{hyper} is set, otherwise %the default is \pkgopt[false]{hyper}. Note that this package @@ -599,7 +681,7 @@ %\noindent %where \meta{option-list} is a comma-separated list of %\meta{key}=\meta{value} pairs, as passed to the -%\stynamefmt{glossary} +%\styname{glossary} %package. Note that this command may only be used in the %configuration file. % @@ -725,14 +807,14 @@ %and \cmdname{printnotation} which can be used for the second %glossary. % -%\changes{2.3}{2005 Nov 18}{Added extra optional argument to'newglosarytype} +%\changes{2.3}{2005 Nov 18}{Added extra optional argument to 'newglosarytype} %As from version 2.3, \cmdname{newglossarytype} now has an %additional optional argument \meta{style list}. This should %be a comma separated list of \meta{key}=\meta{value} pairs %that can be used to specify the style of the new glossary. %If omitted, the new glossary will have the same format %as the main glossary. The following options are available: -%\texttt{style}, \texttt{header}, \texttt{border} and +%\texttt{number}, \texttt{style}, \texttt{header}, \texttt{border} and %\texttt{cols}. These can take the same values as those %given in the package options (described in section~\ref{sec:options}). % @@ -819,7 +901,7 @@ %\section{Acronyms} % %\changes{2.0}{2004 September 21}{Acronyms} -%The \stynamefmt{glossary} package provides the command\DescribeMacro{\newacronym}:\\[5pt] +%The \styname{glossary} package provides the command\DescribeMacro{\newacronym}:\\[5pt] %\begin{ttfamily} %\cmdname{newacronym}[\textrm{\meta{cmd-name}}]\{\textrm{\meta{acronym}}\}\{\textrm{\meta{long}}\}\{\textrm{\meta{glossary entry}}\} %\end{ttfamily}\\[5pt] @@ -852,7 +934,9 @@ %\end{verbatim} % %If the package option \pkgopt{acronym} is not set (default) -%\icmdname{xacronym}, is a synonym for \icmdname{xglossary}. +%\icmdname{xacronym}, is a synonym for \icmdname{xglossary}, and +%the acronyms will appear in the main glossary (remember to +%specify \cmdname{makeglossary} and \cmdname{printglossary}). %If the package option \pkgopt[true]{acronym} is specified, a %new glossary type called \texttt{acronym} will be defined as: %\begin{verbatim} @@ -885,7 +969,7 @@ % %\changes{2.1}{2004 October 25}{name field can be omitted in %\texttt{'newacronym}} -%The \gloskey{name} key is not used in \meta{glossary +%The \gloskey{name} key does not need to appear in \meta{glossary %entry}, as it is constructed from \meta{long} and %\meta{acronym}. By default this will be in the form: %\meta{long} (\meta{acronym}), however the format can be @@ -939,6 +1023,15 @@ %\glossary{name=svm,description=support vector machine} %\end{verbatim} % +%You will need to specify the \gloskey{name} key explicitly if +%the name contains a \appname{makeindex} special character. +%For example: +%\begin{verbatim} +%\newacronym{RNA}{Ribonukleins\"aure}{name={Ribonukleins\""aure (RNA)}} +%\end{verbatim} +%Note that this will override any formatting specified by +%\icmdname{setacronymnamefmt}. +% %Given an acronym named \meta{acr-name} (the command name %associated with the acronym as defined in %\cmdname{newacronym} without the preceding backslash), @@ -1004,18 +1097,18 @@ %entries they will therefore not contain any hyperlinks, even if %you have specified the \pkgopt{hyper} package option. They are %provided for use in situations where the associated glossary -%command may cause problems (e.g.\ in the table of contents entry.) +%command may cause problems (e.g.\ in a sectioning command.) % %Note that, as with all \LaTeX\ commands, spaces following %command names are ignored so if, for example, you defined -%a new acronym called, say, SVM, then the \verb/\SVM/ will +%a new acronym called, say, SVM, then the command \verb/\SVM/ will %ignore any spaces following it. To force a space, you %can either place an empty set of braces after the command %name (e.g.\ \verb/\SVM{}/) or use %\cmdname{\textvisiblespace} i.e.\ a backslash followed by %a space (e.g.\ \verb/\SVM\ /). Alternatively, as from -%version 2.22, if you load the \stynamefmt{xspace} package -%before loading the \stynamefmt{glossary} package, spaces will +%version 2.22, if you load the \styname{xspace} package +%before loading the \styname{glossary} package, spaces will %be put in automatically using \icmdname{xspace}. %\changes{2.22}{2005 Sept 16}{Added provision for 'xspace} %\changes{2.23}{2005 Sept 17}{Fixed minor bug with hyperlinks and 'glsxspace} @@ -1112,7 +1205,7 @@ %SVMs are widely used in the area of pattern recognition. % %\section{Customizing the Glossary} -%The \stynamefmt{glossary} package provides commands which can be redefined to customize the +%The \styname{glossary} package provides commands which can be redefined to customize the %glossary. The following name commands are defined by this package: %\begin{center}\DescribeMacro{\glossaryname}\DescribeMacro{\entryname}\DescribeMacro{\descriptionname}\relax %\begin{tabular}{ll} @@ -1123,6 +1216,15 @@ %\cmdname{descriptionname} & Description %\end{tabular} %\end{center} +%The commands \cmdname{entryname} and \cmdname{descriptionname} +%are put in the first two columns of the header row if you +%are using one of the tabular glossary styles together with a +%header row (as specified by the \pkgopt[true]{header} package option). +%If you are using \pkgopt[3]{cols}, the command +%\cmdname{glspageheader}\DescribeMacro{\glspageheader}\ will be +%put in the third column of the header row. By default, this command +%does nothing.\changes{2.4}{2006 July 20}{'glspageheader added} +% %\changes{2.2}{2005 July 15}{'glossaryname now defined using 'providecommand instead of 'newcommand} % \changes{2.15}{2005 June 5}{'shortglossaryname} %\changes{2.16}{2005 June 8}{fixed bug preventing changes @@ -1244,7 +1346,7 @@ %\changes{2.3}{2005 Nov 18}{'gloskip} %This specifies what to do between groups. %If \pkgopt[list]{style} or \pkgopt[altlist]{style} this has the -%value \cmdname{indexspace}, otherwise it creates a blank line +%value \cmdname{indexspace}, otherwise it creates a blank row % in the \envname{longtable} or \envname{supertabular} environment. %This command corresponds to the \istkey{group\_skip} key in %the \appname{makeindex} style file. @@ -1267,7 +1369,9 @@ %\begin{verbatim} %\setglossary{delimT={\cr & \cr},gloskip={}} %\end{verbatim} -%Note the use of \cmdname{cr} instead of \verb/\\/. +%Note the use of \cmdname{cr} instead of \verb/\\/ and +%\setglos{gloskip} is set to nothing otherwise there would be +%a double space between groups. %\end{description} %Note that: %\begin{verbatim} @@ -1278,42 +1382,20 @@ %\setglossary{glsnumformat=ignore,delimN={},delimR={}} %\end{verbatim} % -%The number associated with each entry is, by default, the page number where -% that entry was defined. If the package option -%\pkgopt[section]{number} has been chosen, this -% will be the section number instead. You can choose a different counter -% by changing the value of the command \cmdname{theglossarynum}\DescribeMacro{\theglossarynum}. -%For example, suppose you have the following code: +%As from version 2.4\changes{2.4}{2006 July 20}{Added facility to insert text between groups}, +%you can insert text between groups by redefining the +%commands \cmdname{glogroupSymbols}, +%\cmdname{glogroupNumbers}, \cmdname{glogroupA} \ldots\ +%\cmdname{glogroupZ}. For example, if you are using one +%of the list styles, the following will print the appropriate +%heading in bold, followed by a gap: %\begin{verbatim} -%\begin{equation} -%\Gamma(z) = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt -%\end{equation} -%\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} +%\renewcommand{\glogroupSymbols}{\textbf{Symbols}\indexspace} +%\renewcommand{\glogroupNumbers}{\textbf{Numbers}\indexspace} +%\renewcommand{\glogroupA}{\textbf{A}\indexspace} +%....% similar lines omitted +%\renewcommand{\glosgroupZ}{\textbf{Z}\indexspace} %\end{verbatim} -%and you want the glossary to refer to the equation number, instead of the -%page or section number, this can be done by redefining \cmdname{theglossarynum} -%as follows: -%\begin{verbatim} -%\renewcommand{\theglossarynum}{\theequation} -%\end{verbatim} -%If the equation number depends on another counter (such as -%\texttt{chapter}) -%you will need to specify that the number is in the form \meta{NUM}.\meta{num} -% (e.g.\ 3.24). This can be done by redefining the \cmdname{pagecompositor}\DescribeMacro{\pagecompositor}\ command: -%\begin{verbatim} -%\renewcommand{\pagecompositor}{.} -%\end{verbatim} -%(By default this value is \texttt{-}, unless the package option -%\pkgopt[section]{number} has -%been chosen, in which case this command has the value \texttt{.}\ -%(full stop), as in the example above). -%The \cmdname{pagecompositor} command must be -%redefined before \icmdname{makeglossary} for it to have any effect. -%If the package option \pkgopt[none]{number} is used, -%the numbering will be suppressed, regardless -%of the value of \icmdname{theglossarynum}. -%This command corresponds to the \istkey{page\_compositor} key -%in the \appname{makeindex} style file. % %The start and end of the main body of the glossary is given by the commands: %\cmdname{beforeglossary}\DescribeMacro{\beforeglossary}{} and @@ -1331,9 +1413,9 @@ % %\changes{2.1}{2004 October 25}{made glossary compatible with array package} %\changes{2.3}{2005 Nov 18}{made glossary compatible with array package} -%The glossary package no longer conflicts with the \stynamefmt{array} +%The glossary package no longer conflicts with the \styname{array} %package. Changes can now be made to \cmdname{glossaryalignment} -%regardless of whether or not the \stynamefmt{array} +%regardless of whether or not the \styname{array} %package has been used. % %The command \cmdname{gloitem}\DescribeMacro{\gloitem}\ indicates @@ -1351,24 +1433,49 @@ %This command corresponds to the \istkey{item\_0} key in the %\appname{makeindex} style file. % -%The command \cmdname{glossaryheader}\DescribeMacro{\glossaryheader}\ (if \pkgopt[long]{style} or \pkgopt[super]{style} is selected) -%indicates what to do at the start of the \envname{longtable} or -%\envname{supertabular} environment. If \pkgopt[none]{border}, it -%is defined as: +%If the glossary has a tabular style with a header row +%(\pkgopt[true]{header} and either \pkgopt[long]{style} or +%\pkgopt[super]{style}), then the header row for \pkgopt[2]{cols} +%will be given by: %\begin{verbatim} %\bfseries\entryname & \bfseries \descriptionname\\ %\end{verbatim} -%So, if you want the \icmdname{descriptionname} to be centred, you could do: +%and the header row for \pkgopt[3]{cols} will be given by: +%\begin{verbatim} +%\bfseries\entryname & \bfseries\descriptionname & +%\bfseries\glspageheader\\ +%\end{verbatim} +%(It may also contain \cmdname{hline}\cmdname{hline} if the +%\pkgopt{border} key is set.) +% +%If you want to override this, you need to define the command +%\cmdname{glossaryheader}\footnote{Note that as from version~2.4, +%you must use \cmdname{newcommand} \emph{not} \cmdname{renewcommand}}% +%\DescribeMacro{\glossaryheader}. +% +%For example, if you are using a tabular style with \pkgopt[2]{cols}, +%and you want the \icmdname{descriptionname} to be centred, you could +%do: %\begin{verbatim} -%\renewcommand{\glossaryheader}{\bfseries\entryname & +%\newcommand{\glossaryheader}{\bfseries\entryname & % \hfil\bfseries\descriptionname\\} %\end{verbatim} +% +%If you want an extra row below the header row, you can define +%the command\cmdname{glossarysubheader}\DescribeMacro{\glossarysubheader} +%\changes{2.4}{2006 July 20}{provision for 'glossarysubheader added} +%For example, if you are using \pkgopt[3]{cols}, and you want an +%extra row after the header row, you can do: +%\begin{verbatim} +%\newcommand{\glossarysubheader}{ & & \\} +%\end{verbatim} +% %The command \cmdname{glosstail}\DescribeMacro{\glosstail}\ indicates what to do at the end of %the \envname{longtable} or \envname{supertabular} environment. % %The width of the second column for the tabular-type styles is given by the length %\cmdname{descriptionwidth}\DescribeMacro{\descriptionwidth}. This value can be changed using -%the \cmdname{setlength} command (the default value is \verb"0.6\textwidth"). +%the \cmdname{setlength} command (the default value is \verb"0.6\linewidth"). % %\section{Sample Documents} %This package comes with the following sample documents: @@ -1376,8 +1483,8 @@ %\item \texttt{sampleSec.tex} --- This document uses the options: %\pkgopt[altlist]{style}, \pkgopt{toc} and %\pkgopt[section]{number}. It also loads the -%\stynamefmt{hyperref} package before loading the -%\stynamefmt{glossary} package, so the glossary has hyperlinks +%\styname{hyperref} package before loading the +%\styname{glossary} package, so the glossary has hyperlinks %to the section numbers. Experimenting with different package %options, will illustrate the different glossary styles. %You will need to do: @@ -1416,9 +1523,10 @@ % %\item \texttt{sampleEq.tex} --- This has a glossary where the %numbers in the glossary refer to the equation number rather than -%the page number. The \icmdname{pagecompositor}, -%\icmdname{theglossarynum}, \icmdname{glossaryname} and -%\icmdname{glossaryheader} are all redefined to customize the +%the page number (achieved with the package option +%\pkgopt[equation]{number}). The \icmdname{entryname}, +%\icmdname{descriptionname}, \icmdname{glossaryname} and +%\icmdname{glspageheader} are all redefined to customize the %glossary. You will need to do: %\begin{verbatim} %latex sampleEq @@ -1450,7 +1558,7 @@ %\item \texttt{sampleAcr.tex} --- This has a glossary containing %acronyms. It uses the style \pkgoptval{altlist}{style} as this is better %suited to glossaries with long names. It also uses the -%\stynamefmt{hyperref} package, so the page numbers in the +%\styname{hyperref} package, so the page numbers in the %glossary will automatically be hyperlinks, and the acronyms %within the text will have hyperlinks to their corresponding entry %in the glossary. You will need to do: @@ -1489,7 +1597,8 @@ %makeindex -s sample.ist -t sample.glg -o sample.gls sample.glo %\end{verbatim} %however, the entries with the same name but multiple descriptions -%will not be merged. +%will not be merged. You will also have to given them different sort +%keys otherwise you will get duplicate hyper targets. % %\item \texttt{sample4col.tex}---This illustrates how to %modify the glossary style so that it has 4 columns. You @@ -1562,10 +1671,6 @@ %\item Glossary items with the same names but different %definitions will not be merged. % -%\item The command \icmdname{theglossarynum} is ignored -%by \LaTeX2HTML, as page numbers have no meaning within -%HTML files. -% %\item The configuration file \texttt{glossary.cfg} is ignored. % %\end{itemize} @@ -1706,7 +1811,7 @@ %This may occur if you have long entry names, and you are using %either the \pkgopt[long]{style} or \pkgopt[super]{style} %options. The width of the description column is proportional to -%the text width (in fact, it's \verb"0.6\textwidth") +%the line width (in fact, it's \verb"0.6\linewidth") %but the first column is as wide as the widest entry name. You %can either redefine \icmdname{glossaryalignment} to change the %column specifications, or use one of the list-type styles. @@ -1714,14 +1819,16 @@ %\item The page numbers in my glossary don't match up with the actual page numbers where the entry %was defined. % -%You may need to \LaTeX\ your document again (just as you have to do with \cmdname{tableofcontents}, \cmdname{listoffigures} etc). +%You may need to \LaTeX\ your document again (just as you have to do +%with \cmdname{tableofcontents}, \cmdname{listoffigures} etc). % %\item I'm getting a \appname{keyval} error. % -%The \stynamefmt{glossary} package uses the \stynamefmt{keyval} +%The \styname{glossary} package uses the \styname{keyval} %package to extract the information from \meta{key}=\meta{value} -%comma separated lists. You need to make sure the syntax is correct. If your \meta{value} contains a -%comma, you will need to enclose \meta{value} in curly braces. See the \stynamefmt{keyval} documentation for +%comma separated lists. You need to make sure the syntax is correct. +%If your \meta{value} contains a +%comma, you will need to enclose \meta{value} in curly braces. See the \styname{keyval} documentation for %further information\footnote{This should be in the directory %\texttt{texmf/doc/latex/graphics/}}. % @@ -1732,8 +1839,8 @@ %\begin{enumerate} %\item Have you remembered to use PDF\LaTeX\ instead of \LaTeX, %or used a driver that understands hyperlinks? -%\item Have you remembered to use the \stynamefmt{hyperref} or -%\stynamefmt{html} package? +%\item Have you remembered to use the \styname{hyperref} or +%\styname{html} package? %\item Have you remembered to use a formatting command which uses \cmdname{hyperlink}? (E.g.\ using \glsnumfmt{hyperbf} instead %of \texttt{textbf})? Remember to check the \gloskey{format} key %in your \icmdname{glossary} commands, and the @@ -1744,8 +1851,8 @@ %using Adobe's Acrobat Reader, or if you are using UNIX or Linux, try using \appname{xpdf} or \appname{acroread}. %\end{enumerate} % -%\item The \stynamefmt{glossary} package conflicts with the -%\stynamefmt{datetime} package. +%\item The \styname{glossary} package conflicts with the +%\styname{datetime} package. %\changes{2.01}{21 Oct 2004}{Fixed conflict with datetime package} % %This has been fixed in version 2.01. @@ -1759,11 +1866,11 @@ %! Package array Error: Illegal pream-token (\glossaryalignment): `c' used. %\end{verbatim} % -%The \stynamefmt{glossary} package used to conflict with the -%\stynamefmt{array} package. This was fixed in version 2.1. +%The \styname{glossary} package used to conflict with the +%\styname{array} package. This was fixed in version 2.1. %As from version 2.3, it doesn't matter whether you load -%the \stynamefmt{glossary} package before or after the -%\stynamefmt{array} package. +%the \styname{glossary} package before or after the +%\styname{array} package. % %\item\label{itm:fragile} I get the following error: %\begin{verbatim} @@ -1796,16 +1903,16 @@ %\chapter{Introduction to \texorpdfstring{\protect\KSVM}{KSVM}} %\end{verbatim} % -%\item\label{itm:ngerman} The \stynamefmt{glossary} package conflicts with -%\stynamefmt{ngerman}. +%\item\label{itm:ngerman} The \styname{glossary} package conflicts with +%\styname{ngerman}. % -%This problem is caused by the fact that \stynamefmt{ngerman} +%This problem is caused by the fact that \styname{ngerman} %redefines the effect of the double quote %character, but this character is used in the creation of the %\filetype{ist} \appname{makeindex} style file. %Try one of the following methods: %\begin{enumerate} -%\item Include the \stynamefmt{ngerman} package after the +%\item Include the \styname{ngerman} package after the %\icmdname{makeglossary} command: %\begin{verbatim} %\usepackage{glossary} @@ -1813,10 +1920,10 @@ %\usepackage{ngerman} %\end{verbatim} % -%\item First omit the \stynamefmt{ngerman} package and include +%\item First omit the \styname{ngerman} package and include %\icmdname{makeglossary} then \LaTeX\ your document. %This will create the \filetype{ist} file. Then include the -%\stynamefmt{ngerman} package, and insert \icmdname{noist} before +%\styname{ngerman} package, and insert \icmdname{noist} before %the \icmdname{makeglossary} command, this will prevent further attempts to generate the \filetype{ist} file. %\begin{verbatim} %\usepackage{ngerman} @@ -1849,7 +1956,7 @@ %\end{verbatim} % %You are using an old version of \appname{makeglos.pl} with a -%new version of the \stynamefmt{glossary} package. You will need +%new version of the \styname{glossary} package. You will need %to update your version \appname{makeglos.pl}. %\end{enumerate} %Let me know if you encounter any other problems or if you have any comments regarding this package. @@ -1869,10 +1976,10 @@ %\texttt{'glsprimaryfmt}} %\changes{2.12}{2004 November 1}{primary acronym number format %\texttt{'glsprimaryfmt} no longer used} +%\changes{2.4}{2006 July 20}{primary acronym number format +%\texttt{'glsprimaryfmt} has been removed} %\DescribeMacro{\glsprimaryfmt}% -%The command \cmdname{glsprimaryfmt} is no longer used in \icmdname{newacronym} as you can end up with duplicate -%page numbers, however the command is currently still defined (although it -% may be removed in future versions.) +%The command \cmdname{glsprimaryfmt} has now been removed. % %The package option \pkgopt{hyperacronym} is now superseded by the package option %\pkgopt{hyper}. This option was implemented prior to the @@ -1885,7 +1992,7 @@ %\item[\pkgoptval{true}{hyperacronym}] Make acronyms link to their corresponding entry in the glossary %\item[\pkgoptval{false}{hyperacronym}] Acronyms don't have a hyperlink. %\end{description} -%If the \stynamefmt{hyperref} package has been loaded prior to +%If the \styname{hyperref} package has been loaded prior to %loading \texttt{glossary.sty} or if \pkgopt[true]{hyper} is set, %\pkgopt[true]{hyperacronym} otherwise %\pkgopt[false]{hyperacronym}.% @@ -1916,7 +2023,7 @@ % \subsection{Package Definition} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary}[2006/07/09 2.38 (NLCT)] +\ProvidesPackage{glossary}[2006/07/20 2.4 (NLCT)] % \end{macrocode} % Load packages needed by glossary.sty: % \begin{macrocode} @@ -1925,81 +2032,136 @@ % \end{macrocode} % The package options are in the form of a comma-separated list of % \meta{key}=\meta{value} pairs. First need to set up the keys. +% +% The \pkgopt{style} key. This may be one of \pkgoptval{list}{style}, +% \pkgoptval{altlist}{style} (use \envname{description} environment), +% \pkgoptval{super}{style} (use \envname{supertabular} environment) or +% \pkgoptval{long}{style} (use \envname{longtable} environment). % \begin{macrocode} \define@key{gloss} - {style} - {\ifthenelse{\equal{#1}{list} \or \equal{#1}{altlist} \or \equal{#1}{super} \or \equal{#1}{long}} - {\def\gls@style{#1}} - {\PackageError{glossary} - {Unknown glossary style '#1'} - {Available styles are: list, altlist, super and long}}} - +{style} +{\ifthenelse{\equal{#1}{list} \or \equal{#1}{altlist} +\or \equal{#1}{super} \or \equal{#1}{long}} +{\def\gls@style{#1}} +{\PackageError{glossary} +{Unknown glossary style '#1'} +{Available styles are: list, altlist, super and long}}} +% \end{macrocode} +% The \pkgopt{header} key. This can either be \pkgoptval{none}{header} +% or \pkgoptval{plain}{header}. Should only be used in conjunction +% with \pkgopt[style]{super} or \pkgopt[long]{style}. +% \begin{macrocode} \define@key{gloss} - {header}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} - {\def\gls@header{#1}} - {\PackageError{glossary} - {Unknown glossary style '#1'} - {Available styles are: none and plain}}} - +{header}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} +{\def\gls@header{#1}} +{\PackageError{glossary} +{Unknown glossary style '#1'} +{Available styles are: none and plain}}} +% \end{macrocode} +% The \pkgopt{border} key. This can either be \pkgoptval{none}{border} +% or \pkgoptval{plain}{border}. Should only be used in conjunction +% with \pkgopt[super]{style} or \pkgopt[long]{style}. +% \begin{macrocode} \define@key{gloss} - {border}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} - {\def\gls@border{#1}} - {\PackageError{glossary} - {Unknown glossary border '#1'} - {Available styles are: none and plain}}} +{border}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} +{\def\gls@border{#1}} +{\PackageError{glossary} +{Unknown glossary border '#1'} +{Available styles are: none and plain}}} +% \end{macrocode} +% Number of columns (either \pkgoptval{2}{cols} or +% \pkgoptval{3}{cols}). Should only be used in conjunction with +% \pkgopt[super]{style} or \pkgopt[long]{style}. +% \begin{macrocode} \newcount\gls@cols \define@key{gloss}{cols}{\gls@cols=#1\relax \ifthenelse{\gls@cols<2 \or \gls@cols>3} - {\PackageError{glossary} - {invalid number of columns} - {The cols option can only be 2 or 3}} - {}} - +{\PackageError{glossary} +{invalid number of columns} +{The cols option can only be 2 or 3}} +{}} +% \end{macrocode} +% The number key may either be \pkgoptval{none}{number} or the name of +% a counter. +% \begin{macrocode} \define@key{gloss} - {number} - {\ifthenelse{\equal{#1}{none}\or\equal{#1}{page}\or\equal{#1}{section}} - {\def\gls@number{#1}} - {\PackageError{glossary} - {Unknown glossary number style '#1'} - {Available styles are: none, page and section}}} - +{number} +{\ifthenelse{\equal{#1}{none}} +{\def\gls@glossary@number{#1}} +{\@ifundefined{c@#1}{ +\PackageError{glossary} +{Unknown glossary number style '#1'} +{You may either specify "none" or the name of a counter, +e.g. "section"}\def\gls@glossary@number{page}}{\def\gls@glossary@number{#1}}}} +% \end{macrocode} +% The \pkgopt{toc} key. If set, adds the glossary to the table of +% contents +% \begin{macrocode} \newif\ifgls@toc -\define@key{gloss}{toc}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname gls@toc#1\endcsname} - {\PackageError{glossary}{Glossary option 'toc' is boolean} - {The value of 'toc' can only be set to 'true' or 'false'}}} - +\define@key{gloss}{toc}[true]{\ifthenelse{\equal{#1}{true} +\or \equal{#1}{false}} +{\csname gls@toc#1\endcsname} +{\PackageError{glossary}{Glossary option 'toc' is boolean} +{The value of 'toc' can only be set to 'true' or 'false'}}} +% \end{macrocode} +% The \pkgopt{hypertoc} key. Like \pkgopt{toc}, but puts the anchor +% before the section heading. Should only be used if the +% \styname{hyperref} package is used (because it uses +% \icmdname{phantomsection}). +% \begin{macrocode} \newif\ifgls@hypertoc - \define@key{gloss}{hypertoc}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname gls@hypertoc#1\endcsname} - {\PackageError{glossary}{Glossary option 'hypertoc' is boolean} - {The value of 'hypertoc' can only be set to 'true' or 'false'}}} - +\define@key{gloss}{hypertoc}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\csname gls@hypertoc#1\endcsname} +{\PackageError{glossary}{Glossary option 'hypertoc' is boolean} +{The value of 'hypertoc' can only be set to 'true' or 'false'}}} +% \end{macrocode} +% The \pkgopt{section} key. This will put the glossary in an unnumbered +% section, even if chapters are defined. +% \begin{macrocode} \newif\ifgls@section -\define@key{gloss}{section}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname gls@section#1\endcsname} - {\PackageError{glossary}{Glossary option 'section' is boolean} - {The value of 'section' can only be set to 'true' or 'false'}}} +\define@key{gloss}{section}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\csname gls@section#1\endcsname} +{\PackageError{glossary}{Glossary option 'section' is boolean} +{The value of 'section' can only be set to 'true' or 'false'}}} \gls@sectionfalse - - +% \end{macrocode} +% Enable hyperlinks. If \styname{hyperref} or \styname{html} +% packages loaded, \pkgopt[true]{hyper} is the default. +% \begin{macrocode} \newif\ifglshyper \newif\ifglshyperacronym -\define@key{gloss}{hyper}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname glshyper#1\endcsname\glshyperacronymtrue} - {\PackageError{glossary}{Glossary option 'hyper' is boolean} - {The value of 'hyper' can only be set to 'true' or 'false'}}} - -\define@key{gloss}{hyperacronym}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname glshyperacronym#1\endcsname} - {\PackageError{glossary}{Glossary option 'hyperacronym' is boolean} - {The value of 'hyperacronym' can only be set to 'true' or 'false'}}} - +\define@key{gloss}{hyper}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\csname glshyper#1\endcsname\glshyperacronymtrue} +{\PackageError{glossary}{Glossary option 'hyper' is boolean} +{The value of 'hyper' can only be set to 'true' or 'false'}}} +% \end{macrocode} +% Enable hyperlinks for acronyms. Deprecated: use \pkgopt{hyper} +% instead. +% \begin{macrocode} +\define@key{gloss}{hyperacronym}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\csname glshyperacronym#1\endcsname} +{\PackageError{glossary}{Glossary option 'hyperacronym' is boolean} +{The value of 'hyperacronym' can only be set to 'true' or 'false'}}} +% \end{macrocode} +% The \pkgopt{acronym} key. If set, the acronyms will be separate from +% main glossary entries. Remember to use \icmdname{makeacronym} +% and \icmdname{printacronym} if \pkgoptval{true}{acronym}. +% \begin{macrocode} \newif\ifglsacronym -\define@key{gloss}{acronym}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}}{\setboolean{glsacronym}{#1}}{% +\define@key{gloss}{acronym}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\setboolean{glsacronym}{#1}}{% \PackageError{glossary}{Glossary option 'acronym' is boolean}{The value of 'acronym' can only be set to 'true' or 'false'}}} - +% \end{macrocode} +% The \pkgopt{global} key. If not set, any acronyms expanded in a +% group will be treated as unused once outside of the group. +% Set \pkgopt[true]{global} to prevent this. +% \begin{macrocode} \newif\ifglsglobal \define@key{gloss}{global}[true]{\ifthenelse{\equal{#1}{true}\or \equal{#1}{false}}{\setboolean{glsglobal}{#1}}{% @@ -2011,11 +2173,19 @@ value of 'global' can only be set to 'true' or 'false'}}} \def\gls@style{long} \def\gls@header{none} \def\gls@border{none} -\def\gls@number{page} +\def\gls@glossary@number{page} \gls@cols=2\relax \gls@tocfalse -\@ifundefined{hyperpage}{\glshyperfalse\glshyperacronymfalse}{\glshypertrue\glshyperacronymtrue} - +% \end{macrocode} +% If \icmdname{hyperpage} is defined, then assume hyperlinks required +% \begin{macrocode} +\@ifundefined{hyperpage}{\glshyperfalse\glshyperacronymfalse}{% +\glshypertrue\glshyperacronymtrue} +% \end{macrocode} +% If \icmdname{hypertarget} defined, then \icmdname{glosslabel} will make a +% target ("#1") and \icmdname{glossref} will make a hyperlink (to "#1"). +% Otherwise will simply print the second argument. +% \begin{macrocode} \@ifundefined{hypertarget}{ % no hyperlinks \newcommand{\glosslabel}[2]{#2}% @@ -2025,14 +2195,14 @@ value of 'global' can only be set to 'true' or 'false'}}} \newcommand{\glossref}[2]{\hyperlink{#1}{#2}} } % \end{macrocode} -% If the xspace package has been loaded, use \verb/\xspace/ +% If the \styname{xspace} package has been loaded, use \icmdname{xspace} % in acronyms. % \begin{macrocode} \@ifundefined{xspace}{% \let\glsxspace\relax}{% \let\glsxspace\xspace} % \end{macrocode} -% Set "\glossaryalignment" to "\relax" before loading +% Set \icmdname{glossaryalignment} to "\relax" before loading % configuration file. % \begin{macrocode} \let\glossaryalignment\relax @@ -2047,11 +2217,15 @@ value of 'global' can only be set to 'true' or 'false'}}} \PackageError{glossary}{Command \string\glossarypackageoptions ^^Jcan only be used in configuration file}{}} % \end{macrocode} -% Process options +% Set up the options so that they are treated as a +% \meta{key}=\meta{value} list. % \begin{macrocode} -\DeclareOption*{\edef\@pkg@ptions{\noexpand\setkeys{gloss}{\CurrentOption}} +\DeclareOption*{\edef\@pkg@ptions{\noexpand +\setkeys{gloss}{\CurrentOption}} \ifthenelse{\equal{\CurrentOption}{}}{}{\@pkg@ptions}} - +% \end{macrocode} +% Process options +% \begin{macrocode} \ProcessOptions % \end{macrocode} %Check to make sure that the options don't conflict. @@ -2062,8 +2236,8 @@ value of 'global' can only be set to 'true' or 'false'}}} \or \gls@cols=3\)} {\PackageError{glossary}{You can't have option 'style=list' or 'style=altlist' in combination with any of the other style -options} -{The 'list' and 'altlist' options don't have a header, border or number of columns option.}} +options}{The 'list' and 'altlist' options don't have a header, +border or number of columns option.}} {} % \end{macrocode} % Can't have both toc and hypertoc. Make it a warning rather @@ -2074,66 +2248,135 @@ options} 'hypertoc', ignoring 'toc' option} \ifgls@hypertoc\gls@tocfalse\fi}{} % \end{macrocode} -%\subsection{Redefining \texttt{\symbol{92}glossary} format} -% The glossary is going to be redefined so that it accepts \meta{key}=\meta{value} -% information, so need to define the keys (see keyval documentation for further details -% on how to do this) +%\subsection{Redefining \texorpdfstring{\texttt{\symbol{92}glossary}}{\textbackslash glossary} format} +% The glossary is going to be redefined so that it accepts +% \meta{key}=\meta{value} information, so need to define the keys (see +% keyval documentation for further details +% on how to do this.) Added "\@onelevel@sanitize" at the recommendation +% of Dan~Luecking and Ulrich~Diez. % \begin{macrocode} -\define@key{wrgloss}{name}{\gdef\@glo@n@me{#1}} -\define@key{wrgloss}{description}{\def\@descr{#1}} -\define@key{wrgloss}{sort}{\gdef\@s@rt{#1}} +\define@key{wrgloss}{name}{% +\def\@glo@n@me{#1}% +\@onelevel@sanitize\@glo@n@me% +\global\let\@glo@n@me\@glo@n@me} +\define@key{wrgloss}{description}{% +\def\@descr{#1}% +\@onelevel@sanitize\@descr} +\define@key{wrgloss}{sort}{% +\def\@s@rt{#1}% +\@onelevel@sanitize\@s@rt +\global\let\@s@rt\@s@rt} \define@key{wrgloss}{format}{\def\@f@rm@t{#1}} +\define@key{wrgloss}{number}{\def\@glo@num{#1}} % \end{macrocode} % Redefine "\@wrglossary" so that it separates out the entry name and -% entry description. Substitute "\thepage" for "\theglossarynum" which -% the user can redefine to be "\theequation" etc, +% entry description. This was rewritten in version 2.4. It is now +% used for both the main glossary, and user-defined glossaries. +% The command "\@@wrglossary" is called at the end of "\@wrglossary", +% by default this does nothing, but some commands temporarily +% redefine it. % \begin{macrocode} \newcommand{\@@wrglossary}{} +% \end{macrocode} +% The label for each entry is usually made up of the glossary prefix +% followed by the sort value, this can be over-ridden by redefining +% \cmdname{@glo@l@bel}. (This is done if the optional argument to +% \icmdname{glossary} is used.) By default this does nothing. +% \begin{macrocode} \newcommand{\@glo@l@bel}{} - -\renewcommand{\@wrglossary}[1]{\relax -\gdef\@glo@n@me{}\def\@descr{}\def\@s@rt{}\def\@f@rm@t{}\relax - \setkeys{wrgloss}{#1}\relax +% \end{macrocode} +% Define the prefix for the principle glossary. (Added to version +% 2.4.) +% \begin{macrocode} +\newcommand{\@gls@glossary@type}{glo} +% \end{macrocode} +% The optional first argument was added in version 2.4. This +% is the name of the glossary type. +% \begin{macrocode} +\renewcommand{\@wrglossary}[2][glossary]{\relax +\gdef\@glo@n@me{}\def\@descr{}\def\@s@rt{}\def\@f@rm@t{}% +\edef\@glo@num{\csname gls@#1@number\endcsname}\relax +\xdef\@pr@fix{\csname @gls@#1@type\endcsname}% + \setkeys{wrgloss}{#2}\relax +\ifthenelse{\equal{\@glo@num}{none}}{\def\@@glo@num{\thepage}}{% +\@ifundefined{c@\@glo@num}{\PackageError{glossary}{% +Not such counter '\@glo@num'}{The value of the 'number' key +must be the name of a counter or the word "none"}% +\def\@@glo@num{\thepage}}{% +\edef\@@glo@num{\csname the\@glo@num\endcsname}}}% \ifthenelse{\equal{\@s@rt}{}}{\gdef\@s@rt{\@glo@n@me}}{}% -\ifthenelse{\equal{\@glo@l@bel}{}}{\gdef\@glo@l@bel{GGG:\@s@rt}}{}% +\ifthenelse{\equal{\@glo@l@bel}{}}{% +\gdef\@glo@l@bel{\@pr@fix:\@s@rt}}{}% +% \end{macrocode} +% User has not specified a format, so use default +% \begin{macrocode} \ifthenelse{\equal{\@f@rm@t}{}} - {\protected@write\@glossaryfile{}% +{\expandafter\protected@write\csname @#1file\endcsname{}% +{\string\glossaryentry{\@s@rt @{% +\string\glosslabel{\@glo@l@bel}{\@glo@n@me}}\@descr +\string\relax|glsnumformat}{\@@glo@num}}} +% \end{macrocode} +% User has specified a format. If it is one of the +% "\hyper"\meta{xx} types, append the required counter. +% This is needed if the glossary contains a mixture of +% counters used (as in "sampleEqPg.tex"). +% \begin{macrocode} +{\ifthenelse{\equal{\@f@rm@t}{hyperrm} \or +\equal{\@f@rm@t}{hypersf} \or \equal{\@f@rm@t}{hypertt} +\or \equal{\@f@rm@t}{hypermd} \or \equal{\@f@rm@t}{hyperbf} +\or \equal{\@f@rm@t}{hyperit} \or \equal{\@f@rm@t}{hyperem} +\or \equal{\@f@rm@t}{hypersl} \or \equal{\@f@rm@t}{hyperup} +\or \equal{\@f@rm@t}{hypersc}} +{\expandafter\protected@write\csname @#1file\endcsname{}% {\string\glossaryentry{\@s@rt @{% \string\glosslabel{\@glo@l@bel}{\@glo@n@me}}\@descr - \string\relax|glsnumformat}{\theglossarynum}}} - {\protected@write\@glossaryfile{}% + \string\relax|\@f@rm@t[\@glo@num]}{\@@glo@num}}} +{\expandafter\protected@write\csname @#1file\endcsname{}% {\string\glossaryentry{\@s@rt @{% \string\glosslabel{\@glo@l@bel}{\@glo@n@me}}\@descr - \string\relax|\@f@rm@t}{\theglossarynum}}}\relax + \string\relax|\@f@rm@t}{\@@glo@num}}}}\relax \endgroup\@esphack \@@wrglossary } % \end{macrocode} -% Command to extract name key from glossary entry. +% Command to extract name key from glossary entry. This shouldn't +% be sanitized, so define a new key for this +% \begin{macrocode} +\define@key{wrnsgloss}{name}{\def\@glo@n@me{#1}} +\define@key{wrnsgloss}{description}{\def\@descr{#1}} +\define@key{wrnsgloss}{sort}{\def\@s@rt{#1}} +\define@key{wrnsgloss}{format}{\def\@f@rm@t{#1}} +\define@key{wrnsgloss}{number}{\def\@glo@num{#1}} +% \end{macrocode} +% Extract name from key-value list. Name stored in "\@glo@n@me". % \begin{macrocode} -\newcommand{\@gls@getn@me}[1]{\@bsphack\begingroup\@sanitize -\gdef\@glo@n@me{}\setkeys{wrgloss}{#1}\relax -\endgroup\@esphack} +\newcommand{\@gls@getn@me}[1]{% +\def\@glo@n@me{}\setkeys{wrnsgloss}{#1}% +} % \end{macrocode} % Command to extract description key from glossary entry. % \begin{macrocode} \newcommand{\@gls@getdescr}[1]{% -\@bsphack\begingroup\@sanitize -\protected@edef\@gls@dos@tk@y{\noexpand\setkeys{wrgloss}{#1}}% -\def\@descr{}\@gls@dos@tk@y\relax +\@bsphack\begingroup +\def\@descr{}% +\setkeys{wrgloss}{#1}% \global\let\@glo@desc\@descr \endgroup\@esphack } % \end{macrocode} -% Now do macro so you can have a hyperlink that takes +% Now define \icmdname{xglossary} so you can have a hyperlink that takes % you to the entry in the glossary % \begin{macrocode} \newcommand{\xglossary}{\renewcommand{\@@wrglossary}[1]{% \glossref{\@glo@l@bel}{##1}\renewcommand{\@@wrglossary}{}}% \glossary} % \end{macrocode} -% Save a bit of typing. The following command is new to v2.17 -% (New to version 2.36: store label in a list) +%\subsection{Storing Glossary Entries} +% Provide a means to store glossary information to save typing +% and ensure consistency (new to v2.17). +% +% Store label in list (new to version 2.36) so that all +% entries can be added to the glossary with a single command. % \begin{macrocode} \newcommand*{\@glo@label@list}{} \toksdef\gls@ta=0 \toksdef\gls@tb=2 @@ -2141,7 +2384,9 @@ options} \gls@ta={{#1}}\gls@tb=\expandafter{\@glo@label@list}% \xdef\@glo@label@list{\the\gls@ta,\the\gls@tb}} % \end{macrocode} -% First define command to store details: +% First define command to store details (don't allow a label +% consisting solely of a "*" as this represents all entries +% when passed to \icmdname{useglosentry}.) % \begin{macrocode} \newcommand*{\storeglosentry}[3][glossary]{% \ifthenelse{\equal{#2}{*}}{% @@ -2169,10 +2414,14 @@ defined}{There already exists a glossary entry with the label '#2'}}}% to define the entry using \string\storeglosentry\space before using it.}}{{% \edef\@glostype{\csname glo@#2@type\endcsname}% +\@glo@tb=\expandafter\expandafter\expandafter +{\csname glo@#2@entry\endcsname}% \ifx#1\relax -\protected@edef\@glo@cmd{\expandafter\noexpand\csname \@glostype\endcsname{\csname glo@#2@entry\endcsname}}% +\edef\@glo@cmd{\expandafter\noexpand +\csname\@glostype\endcsname{\the\@glo@tb}}% \else -\protected@edef\@glo@cmd{\expandafter\noexpand\csname \@glostype{\csname glo@#2@entry\endcsname,#1}}% +\edef\@glo@cmd{\expandafter\noexpand +\csname\@glostype\endcsname{\the\@glo@tb,#1}}% \fi \@glo@cmd }}}} @@ -2187,65 +2436,100 @@ using it.}}{{% to define the entry using \string\storeglosentry\space before using it.}}{{% \edef\@glostype{x\csname glo@#2@type\endcsname}% +\@glo@tb=\expandafter\expandafter\expandafter +{\csname glo@#2@entry\endcsname}% \ifx#1\relax -\protected@edef\@glo@cmd{\expandafter\noexpand\csname \@glostype\endcsname{\csname glo@#2@entry\endcsname}}% +\edef\@glo@cmd{\expandafter\noexpand +\csname\@glostype\endcsname{\the\@glo@tb}}% \else -\protected@edef\@glo@cmd{\expandafter\noexpand\csname \@glostype\endcsname{\csname glo@#2@entry\endcsname,#1}}% +\edef\@glo@cmd{\expandafter\noexpand +\csname\@glostype\endcsname{\the\@glo@tb,#1}}% \fi \@glo@cmd{#3}% }}} % \end{macrocode} % As above, but the text displayed in the document is constructed from -% the name key. +% the \gloskey{name} key. % \begin{macrocode} -\newcommand{\gls}[2][\relax]{\useGlosentry[#1]{#2}{\csname glo@#2@name\endcsname}} +\newcommand{\gls}[2][\relax]{% +\useGlosentry[#1]{#2}{% +\csname glo@#2@name\endcsname}} % \end{macrocode} % This command was defined in earlier verions, but doesn't % work very well, currently retained for backwards compatibility, % but may well be removed at a later date. % \begin{macrocode} \providecommand{\saveglosentry}[3][glossary]{% +\PackageWarning{glossary}{\string\saveglosentry\space is obsolete, +please use \string\storeglosentry\space instead}% \expandafter\def\csname glo@#2@type\endcsname{#1}% -\expandafter\def\csname glo@#2@entry\endcsname{name={#2},description={#3}} +\expandafter\def\csname glo@#2@entry\endcsname{% +name={#2},description={#3}}} +% \end{macrocode} +%Set up default number formats, dependent on the package \pkgopt{number} +% option. Define default page compositor. Any redefinition of the +% page compositor will need to come before the ".ist" file is +% written. The other commands can be redefined at any point before +% \icmdname{printglossary}. +% +% Define a command to set up the glossary counter. +% The optional argument specifies the glossary type +% (defaults to the main glossary). The mandatory +% command is the name of the counter, or "none". +% \begin{macrocode} +\newcommand*{\@gls@setnumbering}[2][glossary]{% +% \end{macrocode} +% If no numbering (\pkgopt[none]{number}): +% \begin{macrocode} +\ifthenelse{\equal{#2}{none}}{% +\def\pagecompositor{-} +\expandafter\def\csname @#1@delimN\endcsname{} +\expandafter\def\csname @#1@delimR\endcsname{} +\expandafter\def\csname glsX#1Xnumformat\endcsname##1{}}{% +% \end{macrocode} +% If "number=page", set the page compositor to +% "-" (dash) otherwise set it to "." (dot). +% \begin{macrocode} +\ifthenelse{\equal{#2}{page}}{% +\def\pagecompositor{-}}{% +\def\pagecompositor{.}} +% \end{macrocode} +% Set up delimiters and formats +% \begin{macrocode} +\expandafter\def\csname @#1@delimN\endcsname{, } +\expandafter\def\csname @#1@delimR\endcsname{--} +\ifglshyper +\expandafter\def\csname glsX#1Xnumformat\endcsname##1{% +\hyperrm[#2]{##1}}% +\else +\expandafter\def\csname glsX#1Xnumformat\endcsname##1{##1}\fi } - % \end{macrocode} -%Set up default number formats, dependent on the package "number" option. -%Define default page compositor. Any redefinition of the page compositor -%will need to come before the ".ist" file is written. The other commands -%can be redefined at any point before "\printglossary" -% \begin{macrocode} -\ifthenelse{\equal{\gls@number}{page}}{ - \newcommand{\theglossarynum}{\thepage} - \newcommand{\pagecompositor}{-} - \newcommand{\@glossary@delimN}{, } - \newcommand{\@glossary@delimR}{--} - \ifglshyper - \newcommand{\glsXglossaryXnumformat}[1]{\hyperrm{#1}}% - \else - \newcommand{\glsXglossaryXnumformat}[1]{#1}\fi} - {\ifthenelse{\equal{\gls@number}{section}} - {\newcommand{\theglossarynum}{\thesection} - \newcommand{\pagecompositor}{.} - \newcommand{\@glossary@delimN}{, } - \newcommand{\@glossary@delimR}{--} - \ifglshyper - \newcommand{\glsXglossaryXnumformat}[1]{\hyperrm{#1}}% - \else - \newcommand{\glsXglossaryXnumformat}[1]{#1}% - \fi} - {\newcommand{\theglossarynum}{\thepage} - \newcommand{\pagecompositor}{-} - \newcommand{\@glossary@delimN}{} - \newcommand{\@glossary@delimR}{} - \newcommand{\glsXglossaryXnumformat}[1]{}}} - -\newcommand{\glsnumformat}[2][glossary]{% -\@ifundefined{glsX#1Xnumformat}{% -\PackageError{glossary}{Glossary type '#1' undefined}{}}{% -\csname glsX#1Xnumformat\endcsname{#2}}} - +% End of "\@gls@setnumbering" definition: +% \begin{macrocode} +} +% \end{macrocode} +% Now call it to set up current numbering: +% \begin{macrocode} +\@gls@setnumbering{\gls@glossary@number} +% \end{macrocode} +% Provide a means of changing the page number format for a +% given glossary type. +% \begin{macrocode} +\newcommand{\glsnumformat}[1]{% +\@ifundefined{\@glostype}{\def\@glostype{glossary}}{}% +\@ifundefined{glsX\@glostype Xnumformat}{% +\PackageError{glossary}{Glossary type '\@glostype' undefined}{}}{% +\csname glsX\@glostype Xnumformat\endcsname{#1}}} +% \end{macrocode} +% Set the default glossary type +% \begin{macrocode} \def\@glostype{glossary} +% \end{macrocode} +% Make the delimiters etc depend on the glossary type. +% "\@glostype" should be set to the appropriate glossary type +% before using any of these commands. +% \begin{macrocode} \newcommand{\delimN}{\csname @\@glostype @delimN\endcsname} \newcommand{\delimR}{\csname @\@glostype @delimR\endcsname} \newcommand{\gloitem}{\csname @\@glostype @gloitem\endcsname} @@ -2254,7 +2538,38 @@ using it.}}{{% \csname @\@glostype @delimT\endcsname} \newcommand{\glodelim}{\csname @\@glostype @glodelim\endcsname \glsbeforenum} - +% \end{macrocode} +% Add facility to insert text between groups. By default these do +% nothing. +% \begin{macrocode} +\newcommand{\glogroupSymbols}{} +\newcommand{\glogroupNumbers}{} +\newcommand{\glogroupA}{} +\newcommand{\glogroupB}{} +\newcommand{\glogroupC}{} +\newcommand{\glogroupD}{} +\newcommand{\glogroupE}{} +\newcommand{\glogroupF}{} +\newcommand{\glogroupG}{} +\newcommand{\glogroupH}{} +\newcommand{\glogroupI}{} +\newcommand{\glogroupJ}{} +\newcommand{\glogroupK}{} +\newcommand{\glogroupL}{} +\newcommand{\glogroupM}{} +\newcommand{\glogroupN}{} +\newcommand{\glogroupO}{} +\newcommand{\glogroupP}{} +\newcommand{\glogroupQ}{} +\newcommand{\glogroupR}{} +\newcommand{\glogroupS}{} +\newcommand{\glogroupT}{} +\newcommand{\glogroupU}{} +\newcommand{\glogroupV}{} +\newcommand{\glogroupW}{} +\newcommand{\glogroupX}{} +\newcommand{\glogroupY}{} +\newcommand{\glogroupZ}{} % \end{macrocode} % Allow user to change number format for different % glossary types. @@ -2266,8 +2581,15 @@ using it.}}{{% \define@key{glossnum}{delimT}{\def\@delimT{#1}} \define@key{glossnum}{gloskip}{\def\@gloskip{#1}} \define@key{glossnum}{glodelim}{\def\@glodelim{#1}} - +% \end{macrocode} +% Define a command that will ignore its argument. This is used +% when suppressing the page numbers. +% \begin{macrocode} \providecommand{\ignore}[1]{} +% \end{macrocode} +% Define command that allows the user to modify the style for a +% given glossary type. +% \begin{macrocode} \newcommand{\setglossary}[1]{% \def\@glsnumformat{}% \def\@glsnumtype{glossary}% @@ -2312,9 +2634,17 @@ Glossary type '\@glsnumtype' has not been defined} }% }} % \end{macrocode} -% Now define the command "\printglossary" which will print the contents of the glossary file. +% Now define the command \icmdname{printglossary} which will print the +% contents of the glossary file. Define the file extension for the main +% glossary: % \begin{macrocode} \newcommand{\@gls@glossary@inext}{gls} +% \end{macrocode} +% The optional argument is the glossary type, the default is the +% main glossary. This sets "\gls@number" to "\gls@#1@number" +% before reading in the file. This ensures that \icmdname{hyperrm} etc +% use the correct counter in the target name. +% \begin{macrocode} \newcommand\printglossary[1][glossary]{% \def\@glostype{#1}% \@ifundefined{#1name}{% @@ -2323,6 +2653,7 @@ Glossary type '\@glsnumtype' has not been defined} \@ifundefined{short#1name}{% \renewcommand{\@shortglossaryname}{\@glossaryname}}{% \renewcommand{\@shortglossaryname}{\csname short#1name\endcsname}}% +\expandafter\let\expandafter\gls@number\csname gls@#1@number\endcsname \@input@{\jobname.\csname @gls@#1@inext\endcsname}} % \end{macrocode} % Define contextual names. Changed \verb/\newcommand/ @@ -2336,63 +2667,105 @@ Glossary type '\@glsnumtype' has not been defined} \def\@glossaryname{\glossaryname} \def\@shortglossaryname{\shortglossaryname} % \end{macrocode} +% Version 2.4 also writes ist filename to aux file. This +% is only used by makeglos.pl, so ignore. +% \begin{macrocode} +\newcommand{\@istfilename}[1]{} +% \end{macrocode} % Define command to generate glossary title (new to % version 2.24) % \begin{macrocode} \providecommand{\glossarytitle}{% \@ifundefined{chapter}% -% \chapter not defined +% \end{macrocode} +% "\chapter" not defined, use "\section*" +% \begin{macrocode} {% \ifgls@hypertoc -% hypertoc option used -\phantomsection% add anchor before \section* +% \end{macrocode} +% \pkgopt{hypertoc} option used, so use "\phantomsection" to add +% anchor \emph{before} "\section*" +% \begin{macrocode} +\phantomsection \@glosaddtoc{section}% \section*{\@glossaryname}\relax \else -% hypertoc=false +% \end{macrocode} +% \pkgopt[false]{hypertoc}: add to toc after "\section*" +% \begin{macrocode} \section*{\@glossaryname}\relax +% \end{macrocode} % only add contentsline if toc=true +% \begin{macrocode} \ifgls@toc\@glosaddtoc{section}\fi \fi}% -{% \chapter defined +% \end{macrocode} +% "\chapter" defined, but has user requested "\section" instead? +% \begin{macrocode} +{% \ifthenelse{\boolean{gls@section}}% -{% user requested \section +{% +% \end{macrocode} +% user requested "\section" +% \begin{macrocode} \ifgls@hypertoc -% hypertoc=true -\phantomsection% add anchor before \section* +% \end{macrocode} +% User request \pkgopt[true]{hypertoc}, so add anchor \emph{before} +% "\section": +% \begin{macrocode} +\phantomsection \@glosaddtoc{section}% \section*{\@glossaryname}\relax \else -%hypertoc=false +% \end{macrocode} +% \pkgopt[false]{hypertoc} so add contentsline (if applicable) after +% "\section" +% \begin{macrocode} \section*{\@glossaryname}\relax -% only add contentsline if toc=true \ifgls@toc\@glosaddtoc{section}\fi \fi}% -{% use \chapter +{% +% \end{macrocode} +% User has not requested "\section", so use "\chapter" +% \begin{macrocode} \ifgls@hypertoc -% hypertoc=true -% chapters usually start a new page, so to ensure +% \end{macrocode} +% User has requested \pkgopt[true]{hypertoc}. +% Chapters usually start a new page, so to ensure % anchor is at the top of the correct page, issue -% a \clearpage (or \cleardoublepage) to place the -% anchor at the correct place +% a "\clearpage" (or "\cleardoublepage") to place the +% anchor at the correct place. +% \begin{macrocode} \@ifundefined{if@twoside}{% -% If document class doesn't support twosided documents -% just do \clearpage +% \end{macrocode} +% Document class doesn't support twosided documents so +% just do "\clearpage" +% \begin{macrocode} \clearpage}{% \if@twoside +% \end{macrocode} % Document is two-sided -% If \cleardoublepage is defined, use that -% otherwise just do \clearpage +% If "\cleardoublepage" is defined, use that +% otherwise just do "\clearpage" +% \begin{macrocode} \@ifundefined{cleardoublepage}{\clearpage}{\cleardoublepage}% \else -% One-sided document, just do \clearpage +% \end{macrocode} +% One-sided document, just do "\clearpage" +% \begin{macrocode} \clearpage \fi}% -\phantomsection% add anchor before \chapter +% \end{macrocode} +% add anchor before "\chapter" +% \begin{macrocode} +\phantomsection \@glosaddtoc{chapter}% \fi \chapter*{\@glossaryname}\relax -% only add contentsline if toc=true +% \end{macrocode} +% both \pkgopt[true]{hypertoc} and \pkgopt[true]{toc}, so won't get +% toc entry twice.) +% \begin{macrocode} \ifgls@toc\@glosaddtoc{chapter}\fi}} \markboth{\@shortglossaryname}{\@shortglossaryname}% } @@ -2403,8 +2776,6 @@ Glossary type '\@glsnumtype' has not been defined} \@ifundefined{theglossary}{% \newenvironment{theglossary}{}{}}{% \PackageWarning{glossary}{Redefining 'theglossary' environment}} -% \end{macrocode} -% \begin{macrocode} \renewenvironment{theglossary}{% \glossarytitle \glossarypreamble\@bef@reglos}{\@ftergl@s\glossarypostamble} @@ -2421,10 +2792,10 @@ Glossary type '\@glsnumtype' has not been defined} \addcontentsline{toc}{#1}{\@shortglossaryname} } % \end{macrocode} -% Set up switch to determine whether the item is the first item in the -% glossary (in the event that a special case is needed for the first item) +% Set up switch to determine whether the item is the first item in +% the glossary (in the event that a special case is needed for the +% first item) % \begin{macrocode} - \newif\ifgloitemfirst \newcommand{\@bef@reglos}{\global\gloitemfirsttrue\beforeglossary} \newcommand{\@ftergl@s}{\afterglossary\global\gloitemfirstfalse} @@ -2459,7 +2830,7 @@ type '\@glostype'}{}}{% \newcommand{\@glossary@gloitem}[1]{#1} % \end{macrocode} % Now define what to do depending on which style has been selected. -% First define command to switch to "list" style: +% First define command to switch to \pkgopt{list} style: % \begin{macrocode} \newcommand{\gls@setlist}[1][glossary]{% \expandafter\def\csname @gls@beforeglos@#1\endcsname{% @@ -2467,13 +2838,14 @@ type '\@glostype'}{}}{% \expandafter\def\csname @gls@afterglos@#1\endcsname{% \end{description}}% \expandafter\def\csname @#1@gloskip\endcsname{\indexspace}% -\expandafter\def\csname @#1@glodelim\endcsname{, }% +\ifthenelse{\equal{\csname gls@#1@number\endcsname}{none}}{% +\expandafter\def\csname @#1@glodelim\endcsname{}}{% +\expandafter\def\csname @#1@glodelim\endcsname{, }}% \expandafter\def\csname @#1@gloitem\endcsname##1{\item[##1]}% -\expandafter\def\csname @#1@glodelim\endcsname{, }% \expandafter\def\csname @#1@delimT\endcsname{} } % \end{macrocode} -% Next define command to switch to "altlist" style: +% Next define command to switch to \pkgopt{altlist} style: % \begin{macrocode} \newcommand{\gls@setaltlist}[1][glossary]{% \expandafter\def\csname @gls@beforeglos@#1\endcsname{% @@ -2481,47 +2853,47 @@ type '\@glostype'}{}}{% \expandafter\def\csname @gls@afterglos@#1\endcsname{% \end{description}}% \expandafter\def\csname @#1@gloskip\endcsname{\indexspace}% -\expandafter\def\csname @#1@gloitem\endcsname##1{\item[##1]\mbox{}\nopagebreak\par\nopagebreak}% +\expandafter\def\csname @#1@gloitem\endcsname##1{% +\item[##1]\mbox{}\nopagebreak\par\nopagebreak}% \expandafter\def\csname @#1@glodelim\endcsname{ }% \expandafter\def\csname @#1@delimT\endcsname{} } % \end{macrocode} -%Now deal with the other styles. I orginally used a "tabular" environment, -%but obviously this doesn't work for a glossary longer than one page. -%Nick van Foreest recommended the "supertabular" environment. The -% "longtable" environment also works, so have both options, and leave it to +%Now deal with the other styles. I orginally used a \envname{tabular} +% environment, but obviously this doesn't work for a glossary longer +% than one page (this package started out as a simple example +% accompanying one of my tutorials). Nick van Foreest recommended +% the \envname{supertabular} environment. The \envname{longtable} environment also +% works, so have both options, and leave it to % the user. % \begin{macrocode} \ifthenelse{\equal{\gls@style}{super}}{ \IfFileExists{supertab.sty}{\RequirePackage{supertab}} {\IfFileExists{supertabular.sty}{\RequirePackage{supertabular}} -{\PackageError{glossary}{Option "super" chosen, but can't find "supertab" package} -{If you want the "super" option, you have to have the "supertab" package installed.}}} -} +{\PackageError{glossary}{Option "super" chosen, but can't find +"supertab" package}{If you want the "super" option, you have to have +the "supertab" package installed.}}}} {\RequirePackage{longtable}} % \end{macrocode} % Define new length specifying the width of the description field. % \begin{macrocode} \newlength{\descriptionwidth} -\setlength{\descriptionwidth}{0.6\textwidth} -% \end{macrocode} -% Initalise header to nothing. If this command is redefined it -% will override the default header. This enables the user to -% redesign the header by changing the definition of -% "\glossaryheader" (thus providing backward compatibility.) -% \begin{macrocode} -\newcommand*{\glossaryheader}{\relax} +\setlength{\descriptionwidth}{0.6\linewidth} % \end{macrocode} +% If user has defined the command \icmdname{glossaryheader}, use it +% otherwise use header as specified by glossary style. +% Added \icmdname{glossarysubheader} in version 2.4. This is provided +% to add a sub heading, or to add a bit of space between +% the header row and the table. % \begin{macrocode} \newcommand{\@glossaryheader}{% -\ifx\glossaryheader\relax -\csname @\@glostype @header\endcsname -\else -\glossaryheader -\fi +\@ifundefined{glossaryheader}{\csname @\@glostype @header\endcsname} +{\glossaryheader}% +\@ifundefined{glossarysubheader}{}{\glossarysubheader}% } % \end{macrocode} -% Define command to set header style. +% Define command to set header style. Added \icmdname{glspageheader} in +% version 2.4. (Third column header) % \begin{macrocode} \newcommand{\gls@setheader}[1][glossary]{% \ifthenelse{\equal{\gls@header}{none}}% @@ -2543,14 +2915,20 @@ type '\@glostype'}{}}{% \ifthenelse{\equal{\gls@border}{none}} {% \expandafter\def\csname @#1@header\endcsname{% -\bfseries\entryname & \bfseries \descriptionname & \\}}% +\bfseries\entryname & \bfseries \descriptionname & +\bfseries \glspageheader \\}}% {% \expandafter\def\csname @#1@header\endcsname{% \hline\bfseries\entryname &\bfseries\descriptionname & -\\\hline\hline}}% +\bfseries \glspageheader \\\hline\hline}}% \fi }} % \end{macrocode} +% Define \icmdname{glspageheader} to do nothing, to keep it compatible +% with earlier versions: +% \begin{macrocode} +\newcommand*{\glspageheader}{} +% \end{macrocode} % Define command to set glossary alignment and borders % \begin{macrocode} \newcommand{\gls@setalignment}[1][glossary]{% @@ -2583,7 +2961,9 @@ type '\@glostype'}{}}{% % \ifnum\gls@cols=2\relax \expandafter\def\csname @#1@gloskip\endcsname{& \\}% -\expandafter\def\csname @#1@glodelim\endcsname{, }% +\ifthenelse{\equal{\csname gls@#1@number\endcsname}{none}}{% +\expandafter\def\csname @#1@glodelim\endcsname{}}{% +\expandafter\def\csname @#1@glodelim\endcsname{, }}% \else \expandafter\def\csname @#1@gloskip\endcsname{& & \\}% \expandafter\def\csname @#1@glodelim\endcsname{& }% @@ -2591,8 +2971,8 @@ type '\@glostype'}{}}{% \expandafter\def\csname @#1@gloitem\endcsname##1{##1 &}% } % \end{macrocode} -% Need a way to avoid conflict with the array package. In an -% earlier version I defined a new column type if the array +% Need a way to avoid conflict with the \styname{array} package. In an +% earlier version I defined a new column type if the \styname{array} % package was being used, however this restricts the ability % to have multiple glossaries with different column alignments. % \begin{macrocode} @@ -2601,7 +2981,7 @@ type '\@glostype'}{}}{% \edef\@st@rtglost@ble{\the\gls@ta{\the\gls@tb}} \@st@rtglost@ble} % \end{macrocode} -% Define command to switch to "super" style: +% Define command to switch to \pkgopt{super} style: % \begin{macrocode} \newcommand{\gls@setsuper}[1][glossary]{% \gls@setalignment[#1]% @@ -2610,7 +2990,8 @@ type '\@glostype'}{}}{% \expandafter\def\csname @gls@beforeglos@#1\endcsname{% \tablehead{\@glossaryheader}\tabletail{\glosstail}% \if\glossaryalignment\relax -\expandafter\let\expandafter\@glossaryalignment\csname @gls@align@#1\endcsname +\expandafter\let\expandafter\@glossaryalignment +\csname @gls@align@#1\endcsname \else \let\@glossaryalignment\glossaryalignment \fi @@ -2620,7 +3001,7 @@ type '\@glostype'}{}}{% \end{supertabular}}% } % \end{macrocode} -% Define command to switch to "long" style: +% Define command to switch to \pkgopt{long} style: % \begin{macrocode} \newcommand{\gls@setlong}[1][glossary]{% \gls@setalignment[#1]% @@ -2628,13 +3009,13 @@ type '\@glostype'}{}}{% % \expandafter\def\csname @gls@beforeglos@#1\endcsname{% \if\relax\glossaryalignment -\expandafter\let\expandafter\@glossaryalignment\csname @gls@align@#1\endcsname +\expandafter\let\expandafter\@glossaryalignment +\csname @gls@align@#1\endcsname \else \let\@glossaryalignment\glossaryalignment \fi \@st@rtglostable{longtable}{\@glossaryalignment} \@glossaryheader\endhead\glosstail\endfoot} - % \expandafter\def\csname @gls@afterglos@#1\endcsname{% \end{longtable}}% @@ -2645,44 +3026,80 @@ type '\@glostype'}{}}{% \newcommand{\@setglossarystyle}[1][glossary]{% \@ifundefined{gls@set\gls@style}{% \PackageError{glossary}{Glossary style '\gls@style' undefined}{}}{% +\ifthenelse{\equal{\gls@number}{}}{}{% +\expandafter\edef\csname gls@#1@number\endcsname{\gls@number}% +\@gls@setnumbering[#1]{\gls@number}% +}% \csname gls@set\gls@style\endcsname[#1]}} % \end{macrocode} -% Set glossary style +% Set main glossary style as per package options % \begin{macrocode} +\let\gls@number\gls@glossary@number \@setglossarystyle % \end{macrocode} -% Define keys to change glossary style +% Define keys to change glossary style. The \pkgopt{style} key sets +% the basic style. % \begin{macrocode} \define@key{glosstyle} - {style} - {\ifthenelse{\equal{#1}{list} \or \equal{#1}{altlist} \or \equal{#1}{super} \or \equal{#1}{long}} - {\def\gls@style{#1}} - {\PackageError{glossary} - {Unknown glossary style '#1'} - {Available styles are: list, altlist, super and long}}} - +{style} +{\ifthenelse{\equal{#1}{list} \or \equal{#1}{altlist} +\or \equal{#1}{super} \or \equal{#1}{long}} +{\def\gls@style{#1}} +{\PackageError{glossary} +{Unknown glossary style '#1'} +{Available styles are: list, altlist, super and long}}} +% \end{macrocode} +% The \pkgopt{header} key should only be used in conjunction with +% one of the tabular-type styles. If set to \pkgoptval{plain}{header}, a +% header row will be used. +% \begin{macrocode} \define@key{glosstyle} - {header}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} - {\def\gls@header{#1}} - {\PackageError{glossary} - {Unknown glossary style '#1'} - {Available styles are: none and plain}}} - +{header}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} +{\def\gls@header{#1}} +{\PackageError{glossary} +{Unknown glossary style '#1'} +{Available styles are: none and plain}}} +% \end{macrocode} +% The \pkgopt{border} key should only be used in conjunction with one +% of the tabular-type styles. If set to \pkgoptval{plain}{border}, a border will +% be placed around the glossary. +% \begin{macrocode} \define@key{glosstyle} - {border}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} - {\def\gls@border{#1}} - {\PackageError{glossary} - {Unknown glossary border '#1'} - {Available styles are: none and plain}}} +{border}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} +{\def\gls@border{#1}} +{\PackageError{glossary} +{Unknown glossary border '#1'} +{Available styles are: none and plain}}} +% \end{macrocode} +% The \pkgopt{cols} key should only be used in conjunction with one of +% the tabular-type styles. If set to \pkgoptval{2}{cols}, the description and page +% list will both be placed in the second column, if set to \pkgoptval{3}{cols}, +% the description will go in the second column, and the page list +% will go in the third column. +% \begin{macrocode} \define@key{glosstyle}{cols}{\gls@cols=#1\relax \ifthenelse{\gls@cols<2 \or \gls@cols>3} - {\PackageError{glossary} - {invalid number of columns} - {The cols option can only be 2 or 3}} - {}} +{\PackageError{glossary} +{invalid number of columns} +{The cols option can only be 2 or 3}} +{}} +% \end{macrocode} +% The \pkgopt{number} key may either be \pkgoptval{none}{number} or the name of a counter. +% \begin{macrocode} +\define@key{glosstyle} +{number} +{\ifthenelse{\equal{#1}{none}} +{\def\gls@number{#1}} +{\@ifundefined{c@#1}{ +\PackageError{glossary} +{Unknown glossary number style '#1'} +{You may either specify "none" or the name of a counter, +e.g. "section"}\def\gls@number{page}}{\def\gls@number{#1}}}} % \end{macrocode} +% Provide a means of setting the style for a given glossary type. % \begin{macrocode} \newcommand{\setglossarystyle}[2][glossary]{% +\def\gls@number{}% \setkeys{glosstyle}{#2}% \@setglossarystyle[#1]% } @@ -2690,75 +3107,100 @@ type '\@glostype'}{}}{% % Set the delimiter for the case where there is no numbering % and there aren't 3 columns. % \begin{macrocode} -\ifthenelse{\equal{\gls@number}{none} \and \gls@cols<3}{% +\ifthenelse{\equal{\gls@glossary@number}{none} \and \gls@cols<3}{% \renewcommand{\@glossary@glodelim}{}}{} % \end{macrocode} % \subsection{Makeindex style file} %This is the code to generate the ".ist" file. +% First define a switch that governs whether or not to write the +% ist file. % \begin{macrocode} \newif\ifist \let\noist=\istfalse \if@filesw\isttrue\else\istfalse\fi - +% \end{macrocode} +% Provide a command to write the ist file. This will cause +% a problem with \styname{ngerman} because the behaviour +% of the double quote character changes. Any packages that modify +% this character should be loaded after the ".ist" file is written. +% \begin{macrocode} \newwrite\istfile \catcode`\%11\relax \newcommand{\writeist}{ +\protected@write\@auxout{}{\protect\@istfilename{\istfilename}} \openout\istfile=\istfilename \write\istfile{% makeindex style file created by LaTeX for document "\jobname" on \the\year-\the\month-\the\day} \write\istfile{keyword "\string\\glossaryentry"} \write\istfile{preamble "\string\\begin{theglossary}"} \write\istfile{postamble "\string\n\string\\end{theglossary}\string\n"} \write\istfile{group_skip "\string\\gloskip "} -\write\istfile{item_0 "\string\n\string\\gloitem "} +\write\istfile{item_0 "\string\n\string\n\string\\gloitem "} \write\istfile{delim_0 "\string\n\string\\glodelim "} \write\istfile{page_compositor "\pagecompositor"} \write\istfile{delim_n "\string\\delimN "} \write\istfile{delim_r "\string\\delimR "} \write\istfile{delim_t "\string\\delimT "} +\write\istfile{headings_flag 1} +\write\istfile{heading_prefix "\string\\glogroup"} +\write\istfile{symhead_positive "Symbols"} +\write\istfile{numhead_positive "Numbers"} \closeout\istfile } \catcode`\%14\relax % \end{macrocode} -%Redefine "\makeglossary" so that it creates the ".ist" file. Once it is -% created, the "\ifist" flag is set to false to prevent repeated creation of -% the file in the event that another glossary-style type is created. If a -% different ".ist" file is desired for each glossary type, you will need -% to precede each "\make"\meta{type} with "\isttrue" and changed the definition -% of "\istfilename". (This is unlikely to occur unless more than one type -% of page compositor is required.) -% The "\glossary" command has been modified to allow for -% an optional argument to modify the label. +%Redefine \icmdname{makeglossary} so that it creates the ".ist" file. +% Once it is created, the \icmdname{ifist} flag is set to false to prevent +% repeated creation of the file in the event that another +% glossary-style type is created. If a different ".ist" file is +% desired for each glossary type, you will need to precede each +% "\make"\meta{type} with \icmdname{isttrue} and changed the definition +% of \icmdname{istfilename}. (This is unlikely to occur unless more than +% one type of page compositor is required.) If you do this, remember +% to pass the correct ist file to makeindex. I have removed +% "\@sanitize" at the +% recommendation of Ulrich~Diez. % \begin{macrocode} \renewcommand{\makeglossary}{ \newwrite\@glossaryfile \immediate\openout\@glossaryfile=\jobname.glo \renewcommand{\glossary}[1][]{\gdef\@glo@l@bel{##1}% -\@bsphack \begingroup \@sanitize \@wrglossary } +\@bsphack \begingroup \@wrglossary } \typeout {Writing glossary file \jobname .glo } \let \makeglossary \@empty \ifist\writeist\fi \noist} - +% \end{macrocode} +% The \icmdname{glossary} command has been modified to allow for an optional +% argument to modify the label. This is the default definition of +% \icmdname{glossary}, it doesn't write anything to the ".glo" file. +% It doesn't use "\setkeys", so "\@sanitize" is used here. +% Use \icmdname{makeglossary} to redefine it so that entries are written +% to the ".glo" file. +% \begin{macrocode} \renewcommand{\glossary}[1][]{% \@bsphack\begingroup\@sanitize\@index} % \end{macrocode} -%\subsection{Defining new glossary type} +%\subsection{Defining a new glossary type} % First parameter (optional) is the extension of the log file -% (information used by makeglos.pl but not \LaTeX). +% (information used by "makeglos.pl" but not \LaTeX). % Second parameter is the name of new glossary type % e.g.\ "notation". Third parameter is the extension of output % file (equivalent to "ind" or "glo". Fourth parameter % is the extension of input file (equivalent to "idx" or "gls"). % The fifth parameter (optional) is the format. % \begin{macrocode} -\newcommand{\@newglossarytype}[4][glg]{} \newcommand{\newglossarytype}[4][glg]{ \@ifundefined{#2}{% \protected@write\@auxout{}{\@newglossarytype[#1]{#2}{#3}{#4}}% \def\@glstype{#2}\def\@glsout{#3}\def\@glsin{#4}% -\expandafter\gdef\csname glsX\@glstype Xnumformat\endcsname{\glsXglossaryXnumformat}% -\expandafter\gdef\csname @\@glstype @delimN\endcsname{\@glossary@delimN}% -\expandafter\gdef\csname @\@glstype @delimR\endcsname{\@glossary@delimR}% +\expandafter\edef\csname gls@\@glstype @number\endcsname{% +\gls@glossary@number}% +\expandafter\gdef\csname glsX\@glstype Xnumformat\endcsname{% +\glsXglossaryXnumformat}% +\expandafter\gdef\csname @\@glstype @delimN\endcsname{% +\@glossary@delimN}% +\expandafter\gdef\csname @\@glstype @delimR\endcsname{% +\@glossary@delimR}% \expandafter\gdef\csname @gls@\@glstype @inext\endcsname{#4}% \expandafter\def\csname @gls@#2@type\endcsname{#4}% \expandafter\edef\csname make\@glstype\endcsname{% @@ -2767,20 +3209,8 @@ type '\@glostype'}{}}{% \noexpand\@gl@ss@ary{\@glstype}} \expandafter\edef\csname x\@glstype\endcsname{% \noexpand\@Gl@ss@ary{\@glstype}} -\expandafter\edef\csname print\@glstype\endcsname{% -\noexpand\def\noexpand\@glostype{\@glstype}% -\noexpand\@ifundefined{\@glstype name}{% -\noexpand\def\noexpand\@glossaryname{\noexpand\glossaryname}% -}{% -\noexpand\def\noexpand\@glossaryname{% -\noexpand\csname\@glstype name\noexpand\endcsname}}% -% -\noexpand\@ifundefined{short\@glstype name}{% -\noexpand\def\noexpand\@shortglossaryname{\noexpand\@glossaryname}% -}{% -\noexpand\edef\noexpand\@shortglossaryname{% -\noexpand\csname short\@glstype name\noexpand\endcsname}}% -\noexpand\@prntgl@ss@ry{\@glsin}}% +\@namedef{print\@glstype}{% +\printglossary[#2]}% }{\PackageError{glossary}{Command \expandafter\string\csname #2\endcsname \space already defined}{% You can't call your new glossary type '#2' because there already @@ -2789,12 +3219,17 @@ exists a command with this name}}% \newcommand{\@@n@wglostype}[1][]{% \setglossarystyle[\@glstype]{#1}} % \end{macrocode} -% Define equivalent of "\makeglossary": +% The command "\@newglossarytype" is written to the auxiliary file +% and is only used by makeglos.pl. \LaTeX\ should ignore it. +% \begin{macrocode} +\newcommand{\@newglossarytype}[4][glg]{} +% \end{macrocode} +% Define equivalent of \icmdname{makeglossary}: % \begin{macrocode} -\newcommand\@m@kegl@ss[2]{ +\newcommand\@m@kegl@ss[2]{% \expandafter\newwrite\csname @#1file\endcsname \expandafter\immediate\expandafter - \openout\csname @#1file\endcsname=\jobname.#2 +\openout\csname @#1file\endcsname=\jobname.#2 \typeout {Writing #1 file \jobname .#2 } \expandafter\let \csname make#1\endcsname \@empty \ifist\writeist\fi @@ -2802,52 +3237,26 @@ exists a command with this name}}% \noist } % \end{macrocode} -% Define equivalent of "\@wrglossary": -% \begin{macrocode} -\newcommand{\@wrgl@ss@ry}[2]{\relax -\gdef\@glo@n@me{}\def\@descr{}\def\@s@rt{}\def\@f@rm@t{}\relax -\xdef\@pr@fix{\csname @gls@#1@type\endcsname}% -\ifthenelse{\equal{\@s@rt}{}}{\gdef\@s@rt{\@glo@n@me}}{}% -\ifthenelse{\equal{\@glo@l@bel}{}}{\gdef\@glo@l@bel{\@pr@fix:\@s@rt}}{}% -\setkeys{wrgloss}{#2}\relax - \ifthenelse{\equal{\@f@rm@t}{}} - {\expandafter\protected@write\csname @#1file\endcsname{}{% -\string\glossaryentry{\@s@rt @{% -\string\glosslabel{\@glo@l@bel}{\@glo@n@me}}% -\@descr\string\relax|glsnumformat[#1]}{\csname the#1num\endcsname}}} - {\expandafter\protected@write\csname @#1file\endcsname{}{% -\string\glossaryentry{\@s@rt @{% -\string\glosslabel{\@glo@l@bel}{\@glo@n@me}}% -\@descr\string\relax|\@f@rm@t}{\csname the#1num\endcsname}}}\relax -\endgroup\@esphack -\@@wrgl@ss@ry -} - -\newcommand{\@@wrgl@ss@ry}{} -% \end{macrocode} -% Define the equivalent of "\glossary". +% Define the equivalent of \icmdname{glossary}. % \begin{macrocode} \newcommand\@gl@ss@ary[2][]{\@ifundefined{@#2file}{% -\@bsphack\begingroup \@sanitize \@index}{% +\@bsphack\begingroup\@sanitize \@index}{% \gdef\@glo@l@bel{#1}% -\@bsphack \begingroup \@sanitize \@wrgl@ss@ry{#2}}} +\@bsphack \begingroup \@wrglossary[#2]}} % \end{macrocode} -% Define the equivalent of "\xglossary". +% Define the equivalent of \icmdname{xglossary}. % \begin{macrocode} \newcommand{\@Gl@ss@ary}{% -\renewcommand{\@@wrgl@ss@ry}[1]{% -\glossref{\@glo@l@bel}{##1}\renewcommand{\@@wrgl@ss@ry}{}}% +\renewcommand{\@@wrglossary}[1]{% +\glossref{\@glo@l@bel}{##1}\renewcommand{\@@wrglossary}{}}% \@gl@ss@ary} % \end{macrocode} -% Define equivalent of "\printglossary". -% \begin{macrocode} -\newcommand\@prntgl@ss@ry[1]{\@input@{\jobname.#1}} -% \end{macrocode} -% The command "\newglossarytype" should only be used in the preamble. +% The command \icmdname{newglossarytype} should only be used in the preamble. % \begin{macrocode} \@onlypreamble{\newglossarytype} % \end{macrocode} -% Define "\newacronym"[\meta{cmd-name}]\{\meta{abbrv}\}\{\meta{long name}\}\{\meta{glos entry}\} +%\subsection{Acronyms} +% Define \icmdname{newacronym}[\meta{cmd-name}]\{\meta{abbrv}\}\{\meta{long name}\}\{\meta{glos entry}\} % \begin{macrocode} \newcommand\@acrnmsh{} \newcommand\@sacrnmsh{} @@ -2869,10 +3278,6 @@ exists a command with this name}}% \@glo@tb=\expandafter{\@acr@list}% \edef\@acr@list{\the\@glo@tb,\@glo@ta}}} % \end{macrocode} -% This should no longer be used -% \begin{macrocode} -\newcommand{\glsprimaryfmt}[1]{\textbf{\glsnumformat{#1}}} -% \end{macrocode} % Specify how to control the way the name key is % set for acronyms. % \begin{macrocode} @@ -2894,46 +3299,58 @@ exists a command with this name}}% % This command has been restructured as from v2.17 % \begin{macrocode} \newcommand{\newacronym}[4][]{% -\ifthenelse{\equal{#1}{}}{\renewcommand\@acrnmcmd{#2}}{\renewcommand\@acrnmcmd{#1}} +\ifthenelse{\equal{#1}{}}{\renewcommand\@acrnmcmd{#2}}{% +\renewcommand\@acrnmcmd{#1}} \@ifundefined{\@acrnmcmd}{% -\expandafter\newcommand\csname\@acrnmcmd short\endcsname{#2\protect\glsxspace} +\expandafter\newcommand\csname\@acrnmcmd short\endcsname{% +#2\protect\glsxspace} \expandafter\newcommand\csname\@acrnmcmd @nx@short\endcsname{#2} -\expandafter\newcommand\csname\@acrnmcmd long\endcsname{#3\protect\glsxspace} +\expandafter\newcommand\csname\@acrnmcmd long\endcsname{% +#3\protect\glsxspace} \expandafter\newcommand\csname\@acrnmcmd @nx@long\endcsname{#3} -\def\@acrn@entry{#4} -{ +\def\@acrn@entry{#4}% +{% % extract description -\@gls@getdescr{\@acrn@entry}% +\expandafter\@gls@getdescr\expandafter{\@acrn@entry}% \let\glodesc\@glo@desc% \def\glolong{#3}% +\@onelevel@sanitize\glolong \def\gloshort{\noexpand\acronymfont{#2}}% +\@onelevel@sanitize\gloshort \expandafter\protected@xdef\expandafter\@acrnamefmt{\@acronymnamefmt} \expandafter\protected@xdef\expandafter\@acrdesc{\@acronymdescfmt} -} +}% \@acr@addtolist{\@acrnmcmd} -\protected@edef\@acr@glsentry{name={\@acrnamefmt},format=glsnumformat,sort={\@acrnmcmd},\@acrn@entry,description={\@acrdesc}} +\@glo@tb=\expandafter{\@acrn@entry}% +\protected@edef\@acr@glsentry{name={\@acrnamefmt},% +format=glsnumformat,sort={\@acrnmcmd},\the\@glo@tb,% +description={\@acrdesc}}% +\@glo@tb=\expandafter{\@acr@glsentry}% \newboolean{\@acrnmcmd first}\setboolean{\@acrnmcmd first}{true} -\expandafter\protected@edef\csname \@acrnmcmd\endcsname{\noexpand\@ifstar{\csname @s@\@acrnmcmd\endcsname}{\csname @\@acrnmcmd\endcsname}} +\expandafter\protected@edef\csname \@acrnmcmd\endcsname{% +\noexpand\@ifstar{\csname @s@\@acrnmcmd\endcsname}{% +\csname @\@acrnmcmd\endcsname}} \ifglshyperacronym % hyperlinks % unstarred version \expandafter\protected@edef\csname @\@acrnmcmd\endcsname{% \noexpand\ifthenelse{\noexpand\boolean{\@acrnmcmd first}}{% \csname\@acrnmcmd @nx@long\endcsname\noexpand\@acrnmins\ -(\noexpand\xacronym{\@acr@glsentry}{% +(\noexpand\xacronym{\the\@glo@tb}{% \noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% })\noexpand\unsetacronym{\@acrnmcmd}% -}{\noexpand\xacronym{\@acr@glsentry}{% -\noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}\noexpand\@acrnmins}}\noexpand\glsxspace} +}{\noexpand\xacronym{\the\@glo@tb}{% +\noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% +\noexpand\@acrnmins}}\noexpand\glsxspace} % starred version \expandafter\protected@edef\csname @s@\@acrnmcmd\endcsname{% \noexpand\ifthenelse{\noexpand\boolean{\@acrnmcmd first}}{% \noexpand\expandafter\noexpand\MakeUppercase \csname\@acrnmcmd @nx@long\endcsname\noexpand\@acrnmins\ -(\noexpand\xacronym{\@acr@glsentry}{% +(\noexpand\xacronym{\the\@glo@tb}{% \noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% })% \noexpand\unsetacronym{\@acrnmcmd}}{% -\noexpand\xacronym{\@acr@glsentry}{% +\noexpand\xacronym{\the\@glo@tb}{% \noexpand\acronymfont{\noexpand\expandafter\noexpand\MakeUppercase \csname\@acrnmcmd @nx@short\endcsname}% \noexpand\@acrnmins}}\noexpand\glsxspace} @@ -2942,11 +3359,12 @@ exists a command with this name}}% \expandafter\protected@edef\csname @\@acrnmcmd\endcsname{% \noexpand\ifthenelse{\noexpand\boolean{\@acrnmcmd first}}{% \csname\@acrnmcmd @nx@long\endcsname\noexpand\@acrnmins\ -(\noexpand\acronym{\@acr@glsentry}{% +(\noexpand\acronym{\the\@glo@tb}{% \noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% })\noexpand\unsetacronym{\@acrnmcmd}% -}{\noexpand\acronym{\@acr@glsentry}{% -\noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}\noexpand\@acrnmins}}% +}{\noexpand\acronym{\the\@glo@tb}{% +\noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% +\noexpand\@acrnmins}}% \noexpand\glsxspace} % starred version \expandafter\protected@edef\csname @s@\@acrnmcmd\endcsname{% @@ -2954,19 +3372,22 @@ exists a command with this name}}% \noexpand\expandafter \noexpand\MakeUppercase \csname\@acrnmcmd @nx@long\endcsname\noexpand\@acrnmins\ -(\noexpand\acronym{\@acr@glsentry}{% +(\noexpand\acronym{\the\@glo@tb}{% \noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% })% \noexpand\unsetacronym{\@acrnmcmd}}{% -\noexpand\acronym{\@acr@glsentry}{% +\noexpand\acronym{\the\@glo@tb}{% \noexpand\acronymfont{\noexpand\expandafter\noexpand\MakeUppercase \csname\@acrnmcmd @nx@short\endcsname}% \noexpand\@acrnmins}}\noexpand\glsxspace} \fi }{% -\PackageError{glossary}{Command '\expandafter\string\csname\@acrnmcmd\endcsname' already defined}{ - The command name specified by \string\newacronym already exists.}}} - +\PackageError{glossary}{Command '\expandafter\string +\csname\@acrnmcmd\endcsname' already defined}{% +The command name specified by \string\newacronym already exists.}}} +% \end{macrocode} +% Define a command to use a given acronym. +% \begin{macrocode} \newcommand{\useacronym}{\@ifstar\@suseacronym\@useacronym} \newcommand{\@suseacronym}[2][]{{\let\glsxspace\relax \def\@acrnmins{#1}\csname @s@#2\endcsname}% @@ -2974,34 +3395,55 @@ exists a command with this name}}% \newcommand{\@useacronym}[2][]{{\let\glsxspace\relax \def\@acrnmins{#1}\csname @#2\endcsname}% \setboolean{#2first}{false}} - +% \end{macrocode} +% Define a command to use the long form of an acronym without +% generating a glossary entry. The starred form makes the first +% character uppercase. +% \begin{macrocode} \newcommand{\acrln}{\@ifstar\@sacrln\@acrln} - +% \end{macrocode} +% Unstarred form: +% \begin{macrocode} \newcommand{\@acrln}[1]{\@ifundefined{#1long}{% \PackageError{glossary}{Acronym '#1' has not been defined}{}}{% \csname#1@nx@long\endcsname}} - +% \end{macrocode} +% Starred form: +% \begin{macrocode} \newcommand{\@sacrln}[1]{\@ifundefined{#1long}{% \PackageError{glossary}{Acronym '#1' has not been defined}{}}{% \expandafter\expandafter\expandafter \MakeUppercase\csname#1@nx@long\endcsname}} - +% \end{macrocode} +% As above, but for the short form. +% \begin{macrocode} \newcommand{\acrsh}{\@ifstar\@sacrsh\@acrsh} - +% \end{macrocode} +% Unstarred form: +% \begin{macrocode} \newcommand{\@acrsh}[1]{\@ifundefined{#1short}{% \PackageError{glossary}{Acronym '#1' has not been defined}{}}{% \acronymfont{\csname#1@nx@short\endcsname}}} - +% \end{macrocode} +% Starred form: +% \begin{macrocode} \newcommand{\@sacrsh}[1]{\@ifundefined{#1short}{% \PackageError{glossary}{Acronym '#1' has not been defined}{}}{% \acronymfont{\expandafter\expandafter\expandafter \MakeUppercase\csname#1@nx@short\endcsname}}} - +% \end{macrocode} +% Define a means of determining whether an acronym has been +% used or not. This was mainly included for use with LaTeX2HTML +% which currently has no \styname{ifthen} style. +% \begin{macrocode} \newcommand{\ifacronymfirstuse}[3]{% \@ifundefined{if#1first}{% \PackageError{glossary}{Acronym '#1' not defined}{}}{% \ifthenelse{\boolean{#1first}}{#2}{#3}}} - +% \end{macrocode} +% Provide a means of resetting an acronym so that it is expanded +% next time it is used. +% \begin{macrocode} \newcommand{\resetacronym}[1]{% \@ifundefined{if#1first}{% \PackageError{glossary}{Acronym '#1' not defined}{}}{% @@ -3010,7 +3452,9 @@ exists a command with this name}}% \else \setboolean{#1first}{true}% \fi}} - +% \end{macrocode} +% Reverse of the above. +% \begin{macrocode} \newcommand{\unsetacronym}[1]{% \@ifundefined{if#1first}{% \PackageError{glossary}{Acronym '#1' not defined}{}}{% @@ -3019,94 +3463,135 @@ exists a command with this name}}% \else \setboolean{#1first}{false}% \fi}} - +% \end{macrocode} +% Reset all acronyms so that they will all be expanded when next +% used. +% \begin{macrocode} \newcommand{\resetallacronyms}{% \@for\@acr:=\@acr@list\do{\resetacronym{\@acr}}} - +% \end{macrocode} +% Ensure that all acronyms are not expanded, even if they haven't +% yet been used. +% \begin{macrocode} \newcommand{\unsetallacronyms}{% \@for\@acr:=\@acr@list\do{\unsetacronym{\@acr}}} % \end{macrocode} -%These commands are provided to make it easier change the page number format to bf, sf, tt and it -%if you are using hyperlinks +% Check to see if acronyms should be separate from glossary +% \begin{macrocode} +\ifglsacronym +\newglossarytype[alg]{acronym}{acr}{acn} +\providecommand{\acronymname}{List of Acronyms} +\else +\let\acronym=\glossary +\let\xacronym=\xglossary +\fi +% \end{macrocode} +%\subsection{Glossary Hyperlinks} +% This section deals with commands that are used to make the +% numbers in the glossary have hyperlinks, if hyperlinks are +% supported. +% +% The command \icmdname{glshyper} is a modification of \styname{hyperref}'s +% \icmdname{hyperpage} command, but it uses \icmdname{delimR} instead of a dash, and +% \icmdname{delimN} instead of a comma. The command was originally called +% \icmdname{glshyperpage} but was modified in version 2.4 to +% enable "page" to be substituted with some arbitrary counter +% (which should be specified as the first argument). % \begin{macrocode} \ifglshyper -% this is modified from definition of "\hyperpage" in "hyperref.sty" -\def\glshyperpage#1{\@glshyperpage#1\delimR \delimR \\} -\def\@glshyperpage#1\delimR #2\delimR #3\\{% - \ifx\\#2\\% - \@delimNhyperpage{#1}% - \else - \@ifundefined{hyperlink}{#1\delimR #2}{\hyperlink{page.#1}{#1}\delimR \hyperlink{page.#2}{#2}}% - \fi -} - -\def\@delimNhyperpage#1{\@@delimNhyperpage#1\delimN \delimN\\} -\def\@@delimNhyperpage#1\delimN #2\delimN #3\\{% - \ifx\\#2\\% - \@ifundefined{hyperlink}{#1}{\hyperlink{page.#1}{#1}}% - \else - \@ifundefined{hyperlink}{#1\delimN #2}{\hyperlink{page.#1}{#1}\delimN \hyperlink{page.#2}{#2}}% - \fi -} - -\def\glshypersection#1{\@glshypersection#1\delimR \delimR \\} -\def\@glshypersection#1\delimR #2\delimR #3\\{% - \ifx\\#2\\% - \@delimNhypersection{#1}% - \else - \@ifundefined{hyperlink}{#1\delimR #2}{\hyperlink{section.#1}{#1}\delimR \hyperlink{section.#2}{#2}}% - \fi +\def\glshyper#1#2{\@glshyper{#1}#2\delimR \delimR \\} +\def\@glshyper#1#2\delimR #3\delimR #4\\{% +\ifx\\#3\\% +\@delimNhyper{#1}{#2}% +\else +\@ifundefined{hyperlink}{#2\delimR #3}{% +\hyperlink{#1.#2}{#2}\delimR \hyperlink{#1.#3}{#3}}% +\fi } - -\def\@delimNhypersection#1{\@@delimNhypersection#1\delimN \delimN\\} -\def\@@delimNhypersection#1\delimN #2\delimN #3\\{% - \ifx\\#2\\% - \@ifundefined{hyperlink}{#1}{\hyperlink{section.#1}{#1}}% +% \end{macrocode} +% For a list of individual pages instead of a range: +% \begin{macrocode} +\def\@delimNhyper#1#2{\@@delimNhyper{#1}#2\delimN \delimN\\} +\def\@@delimNhyper#1#2\delimN #3\delimN #4\\{% + \ifx\\#3\\% + \@ifundefined{hyperlink}{#2}{\hyperlink{#1.#2}{#2}}% \else - \@ifundefined{hyperlink}{#1\delimN #2}{\hyperlink{section.#1}{#1}\delimN \hyperlink{section.#2}{#2}}% + \@ifundefined{hyperlink}{#2\delimN #3}{% +\hyperlink{#1.#2}{#2}\delimN \hyperlink{#1.#3}{#3}}% \fi } - -\ifthenelse{\equal{\gls@number}{section}}{ -\ifglshyper +% \end{macrocode} +% To maintain backwards compatibility, define \icmdname{glshyperpage} +% and \icmdname{glshypersection}. These commands may be removed at a +% later date, so don't use them. +% \begin{macrocode} +\newcommand\glshyperpage[1]{\glshyper{page}{#1}} +\newcommand\glshypersection[1]{\glshyper{section}{#1}} +% \end{macrocode} +% If chapters are defined, modify "\@chapter" so that is adds +% a "section."\meta{n}".0" target (otherwise it gets too complicated +% if you have to work out whether to use the chapter or section +% counter---there's more than enough conditional code in this +% package already!) +% \begin{macrocode} \@ifundefined{chapter} - {} - {\let\@gls@old@chapter\@chapter - \def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}\@ifundefined{hyperdef}{}{\hyperdef{section}{\thechapter.0}{}}}} -\fi - -\providecommand\hyperrm[1]{\textrm{\glshypersection{#1}}} -\providecommand\hypersf[1]{\textsf{\glshypersection{#1}}} -\providecommand\hypertt[1]{\texttt{\glshypersection{#1}}} -\providecommand\hyperbf[1]{\textbf{\glshypersection{#1}}} -\providecommand\hyperit[1]{\textit{\glshypersection{#1}}} -} -{ -\providecommand\hyperrm[1]{\textrm{\glshyperpage{#1}}} -\providecommand\hypersf[1]{\textsf{\glshyperpage{#1}}} -\providecommand\hypertt[1]{\texttt{\glshyperpage{#1}}} -\providecommand\hyperbf[1]{\textbf{\glshyperpage{#1}}} -\providecommand\hyperit[1]{\textit{\glshyperpage{#1}}} -} -\else -\providecommand\hyperrm[1]{\textsf{#1}} -\providecommand\hypersf[1]{\textsf{#1}} -\providecommand\hypertt[1]{\texttt{#1}} -\providecommand\hyperbf[1]{\textbf{#1}} -\providecommand\hyperit[1]{\textit{#1}} -\fi +{} +{\let\@gls@old@chapter\@chapter +\def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}% +\@ifundefined{hyperdef}{}{\hyperdef{section}{\thesection}{}}}} % \end{macrocode} -% Check to see if acronyms should be separate from glossary +% Provide "\hyper"\meta{xx} to make it easier to change the page +% number format to "bf", "sf", "tt" and "it" if you are using +% hyperlinks. +% The optional first argument (new to version 2.4) specifies +% the counter being used. +% \begin{macrocode} +\providecommand\hyperrm[2][\gls@number]{% +\textrm{\glshyper{#1}{#2}}} +\providecommand\hypersf[2][\gls@number]{% +\textsf{\glshyper{#1}{#2}}} +\providecommand\hypertt[2][\gls@number]{% +\texttt{\glshyper{#1}{#2}}} +\providecommand\hyperbf[2][\gls@number]{% +\textbf{\glshyper{#1}{#2}}} +\providecommand\hyperit[2][\gls@number]{% +\textit{\glshyper{#1}{#2}}} +% \end{macrocode} +% The following were added in version 2.4: +% \begin{macrocode} +\providecommand\hyperem[2][\gls@number]{% +\emph{\glshyper{#1}{#2}}} +\providecommand\hyperup[2][\gls@number]{% +\textup{\glshyper{#1}{#2}}} +\providecommand\hypersl[2][\gls@number]{% +\textsl{\glshyper{#1}{#2}}} +\providecommand\hypersc[2][\gls@number]{% +\textsc{\glshyper{#1}{#2}}} +\providecommand\hypermd[2][\gls@number]{% +\textmd{\glshyper{#1}{#2}}} +% \end{macrocode} +% Hyperlinks not enabled. % \begin{macrocode} -\ifglsacronym -\newglossarytype[alg]{acronym}{acr}{acn} -\providecommand{\acronymname}{List of Acronyms} \else -\let\acronym=\glossary -\let\xacronym=\xglossary +\providecommand\hyperrm[2][]{\textrm{#2}} +\providecommand\hypersf[2][]{\textsf{#2}} +\providecommand\hypertt[2][]{\texttt{#2}} +\providecommand\hypermd[2][]{\textmd{#2}} +\providecommand\hyperbf[2][]{\textbf{#2}} +\providecommand\hyperit[2][]{\textit{#2}} +\providecommand\hypersl[2][]{\textsl{#2}} +\providecommand\hyperup[2][]{\textup{#2}} +\providecommand\hypersc[2][]{\textsc{#2}} +\providecommand\hyperem[2][]{\emph{#2}} \fi % \end{macrocode} -%\subsection{makeglos code} +%\iffalse +%\subsection{Additional Files} +% The remainder of this document simply lists the contents +% of all the additional files that accompany the \styname{glossary} +% package. There is no further documentation. Some lines may not +% fit on the page. If you like, you can comment out this section +% using "\iffalse" and "\fi". % \begin{macrocode} % % \end{macrocode} @@ -3118,7 +3603,7 @@ exists a command with this name}}% # File : makeglos # Author : Nicola Talbot -# Version : 1.4 (2005/11/19) +# Version : 1.5 (2006/07/20) # Description: simple Perl script that calls makeindex. # Intended for use with "glossary.sty" (saves having to remember # all the various switches) @@ -3156,7 +3641,10 @@ else $name = @ARGV[0]; } +$istfile = "$name.ist"; + # check log file for other glossary types +# and for ist file name if (open AUXFILE, "$name.aux") { @@ -3173,6 +3661,11 @@ if (open AUXFILE, "$name.aux") print "added glossary type '$2' ($3,$4,$1)\n"; } } + + if (m/\\\@istfilename\s*{([^}]*)}/) + { + $istfile = $1; + } } close AUXFILE; @@ -3221,11 +3714,7 @@ unless ($opt_p eq "") $mkidxopts .= " -p $opt_p"; } -if ($opt_s eq "") -{ - $istfile = "$name.ist"; -} -else +unless ($opt_s eq "") { $istfile = $opt_s; } @@ -4495,6 +4984,7 @@ _IGNORED_CMDS_ % \begin{macrocode} %<*sample.tex> % \end{macrocode} +% \begin{macrocode} \documentclass[a4paper]{report} \usepackage[plainpages=false,colorlinks]{hyperref} @@ -4502,6 +4992,29 @@ _IGNORED_CMDS_ \makeglossary +% You need to use the -m switch with makeglos.pl to concatenate +% entries with the same name but different descriptions +% If you don't, and you use PDFLaTeX you will get a warning +% about duplicate labels. To prevent this, set a different +% sort key for each entry, e.g. sort=glossary1 for the first +% entry and sort=glossary2 for the second entry + +\storeglosentry{glossary1}{name=glossary, +description=1) list of technical words} + +\storeglosentry{glossary2}{name=glossary, +description=2) collection of glosses} + +\storeglosentry{Perl}{name=\texttt{Perl}, +sort=Perl, % need a sort key because name contains a command +description=A scripting language} + +\storeglosentry{pagelist}{name=page list, +% description value has to be enclosed in braces +% because it contains commas +description={a list of individual pages or page ranges, +e.g.\ 1,2,4,7-9}} + \begin{document} \title{Sample Document Using glossary Package} @@ -4515,10 +5028,8 @@ _IGNORED_CMDS_ \chapter{Introduction} \pagenumbering{arabic} -A \xglossary{name=glossary,description=1) list of technical -words}{glossary} is a very useful addition to any -technical document, although a \xglossary{name=glossary, -description=2) collection of glosses}{glossary} can +A \gls{glossary1} is a very useful addition to any +technical document, although a \gls{glossary2} can also simply be a collection of glosses, which is another thing entirely. @@ -4530,101 +5041,102 @@ of an \texttt{.ind} file, and change the name of the log file so that it doesn't overwrite the index log file (if you have an index for your document). Rather than having to remember all the command line -switches, you can call the \xglossary{name=\texttt{Perl}, -sort=Perl,description=A scripting language}{Perl} script +switches, you can call the \gls{Perl} script \texttt{makeglos.pl} which provides a convenient wrapper. If you have two terms with different meanings in your -\xglossary{name=glossary,description=1) list of technical -words}{glossary}, -\texttt{makeindex} will of course treat them as two +\gls{glossary1}, \texttt{makeindex} will of course treat them as two separate entries, however, some people prefer to -merge them. This can be done using -\texttt{makeglos.pl}, and passing the option -\texttt{-m}. +merge them. This can be done using \texttt{makeglos.pl}, and +passing the option \texttt{-m}. If a comma appears within the name or description, grouping -must be used: \xglossary{name=page list,description={a list -of individual pages or page ranges, e.g.\ 1,2,4,7-9}}{page list} +must be used: \gls{pagelist}. \printglossary \end{document} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \begin{macrocode} %<*sample4col.tex> % \end{macrocode} +% \begin{macrocode} \documentclass[a4paper]{article} % start out with 3 column format to make it easier to modify -\usepackage[style=long,cols=3]{glossary} +\usepackage[style=long,cols=3]{glossary}[2006/07/20] % make glossary have 4 columns all left aligned % (this assumes entries can fit onto a single line -% otherwise use p specifier instead of l) +% otherwise use p{} specifier instead of l) \renewcommand{\glossaryalignment}{llll} -% Header row -\renewcommand{\glossaryheader}{% + +% Define header row +\newcommand{\glossaryheader}{% \bfseries Name & \bfseries Description & \bfseries Unit & \bfseries Page} \makeglossary +\storeglosentry{w}{name={$w$},sort=w,description={width&m}} +\storeglosentry{M}{name={$M$},sort=M,description={mass&kg}} + \begin{document} \printglossary -The width\glossary{name={$w$},sort=w,description={width&m}}, $w$, is -measured in meters. The -mass\glossary{name={$M$},sort=M,description={mass&kg}}, $M$ is +The width, \gls{w}, is measured in meters. The mass, \gls{M} is measured in kilograms. \end{document} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \begin{macrocode} %<*sampleAcr.tex> % \end{macrocode} +% \begin{macrocode} \documentclass[a4paper]{report} -\usepackage{xspace} \usepackage[colorlinks,plainpages=false]{hyperref} -\usepackage[style=altlist,hypertoc,number=none,acronym]{glossary} -%\usepackage[style=long,toc,number=none]{glossary} +\usepackage[style=altlist,hypertoc,acronym]{glossary} +% use \makeglossary if using package option +% acronym=false %\makeglossary +% use \makeacronym if using package option +% acronym=true \makeacronym -%\renewcommand{\acronymfont}[1]{\textmd{\scshape #1}} - -%\setacronymnamefmt{\gloshort: \expandafter\MakeUppercase\glolong} -%\setacronymnamefmt{\gloshort} -%\setacronymdescfmt{\expandafter\MakeUppercase\glolong: \glodesc} - -\newacronym{svm}{support vector machine}{description=Statistical pattern recognition technique~\cite{svm}} +\newacronym{svm}{support vector machine}{% +description=Statistical pattern recognition +technique~\cite{svm}} -\newacronym[ksvm]{k-svm}{kernel support vector machine}{description={Statistical pattern recognition technique using -the ``kernel trick'' (see also SVM)}} +\newacronym[ksvm]{k-svm}{kernel support vector machine}{% +description={Statistical pattern recognition technique +using the ``kernel trick'' (see also SVM)}} \begin{document} \tableofcontents \chapter{Support Vector Machines} -The \svm is used widely in the area of pattern recognition. +The \svm\ is used widely in the area of pattern recognition. \useacronym*[s]{svm} are \ldots -This is the long version: \svmlong or alternatively: +This is the long version: \svmlong\ or alternatively: \acrln*{svm}. -Abbreviation: \svmshort or \acrsh*{svm}. +Abbreviation: \svmshort\ or \acrsh*{svm}. \chapter{Kernel Support Vector Machines} -The \ksvm\ is \ifacronymfirstuse{svm}{a}{an} \svm\ that uses the so called ``kernel trick''. +The \ksvm\ is \ifacronymfirstuse{svm}{a}{an} \svm\ that uses +the so called ``kernel trick''. %\resetacronym{ksvm} \resetallacronyms @@ -4639,34 +5151,103 @@ The \ksvm\ is \ifacronymfirstuse{svm}{a}{an} \svm\ that uses the so called ``ker \printacronym \end{document} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \begin{macrocode} %<*sampleEq.tex> % \end{macrocode} +% \begin{macrocode} \documentclass[a4paper,12pt]{report} \usepackage{amsmath} -\usepackage[header,border=none,cols=3]{glossary} +\usepackage[colorlinks]{hyperref} +\usepackage[header,border=none,cols=3,number=equation]{glossary}[2006/07/20] \newcommand{\erf}{\operatorname{erf}} \newcommand{\erfc}{\operatorname{erfc}} -\renewcommand{\theglossarynum}{\theequation} -\renewcommand{\pagecompositor}{.} +\makeglossary -% The following will put a blank line between every entry +% Uncomment the following line to put a blank line between +% every entry: %\setglossary{delimT={\cr & \cr},gloskip={}} -\renewcommand{\glossaryname}{Index of Special Functions and Notations} +% Change the glossary title: -\renewcommand{\glossaryheader}{\bfseries Notation & -\multicolumn{2}{c}{\bfseries -\begin{tabular}{c}Name of the Function and\\the number of -the formula\end{tabular}}\\} +\renewcommand{\glossaryname}{Index of Special Functions +and Notations} -\makeglossary +% Change the glossary headings + +\renewcommand{\entryname}{Notation} + +\renewcommand{\descriptionname}{Function Name} + +\renewcommand{\glspageheader}{Number of Formula} + +% Add a blank row after the header row +\newcommand{\glossarysubheader}{ & & \\} + +% Store entries for later use + +\storeglosentry{Gamma}{name=\ensuremath{\Gamma(z)}, +description=Gamma function,sort=Gamma} + +\storeglosentry{gamma}{name={\ensuremath{\gamma(\alpha,x)}}, +description=Incomplete gamma function,sort=gamma} + +\storeglosentry{iGamma}{name={\ensuremath{\Gamma(\alpha,x)}}, +description=Incomplete gamma function,sort=Gamma} + +\storeglosentry{psi}{name=\ensuremath{\psi(x)}, +description=Psi function,sort=psi} + +\storeglosentry{erf}{name=\ensuremath{\erf(x)}, +description=Error function,sort=erf} + +\storeglosentry{erfc}{name=\ensuremath{\erfc}, +description=Complementary error function,sort=erfc} + +\storeglosentry{B}{name={\ensuremath{B(x,y)}}, +description=Beta function,sort=B} + +\storeglosentry{Bx}{name={\ensuremath{B_x(p,q)}}, +description=Incomplete beta function,sort=Bx} + +\storeglosentry{Tn}{name=\ensuremath{T_n(x)}, +description=Chebyshev's polynomials of the first kind,sort=Tn} + +\storeglosentry{Un}{name=\ensuremath{U_n(x)}, +description=Chebyshev's polynomials of the second kind,sort=Un} + +\storeglosentry{Hn}{name=\ensuremath{H_n(x)}, +description=Hermite polynomials,sort=Hn} + +\storeglosentry{Ln}{name=\ensuremath{L_n^\alpha(x)}, +description=Laguerre polynomials,sort=Lna} + +\storeglosentry{Znu}{name=\ensuremath{Z_\nu(z)}, +description=Bessel functions,sort=Z} + +\storeglosentry{Phi}{name={\ensuremath{\Phi(\alpha,\gamma;z)}}, +description=confluent hypergeometric function,sort=Pagz} + +\storeglosentry{knu}{name=\ensuremath{k_\nu(x)}, +description=Bateman's function,sort=kv} + +\storeglosentry{Dp}{name=\ensuremath{D_p(z)}, +description=Parabolic cylinder functions,sort=Dp} + +\storeglosentry{F}{name={\ensuremath{F(\phi,k)}}, +description=Elliptical integral of the first kind,sort=Fpk} + +\storeglosentry{C}{name=\ensuremath{C}, +description=Euler's constant,sort=C} + +\storeglosentry{G}{name=\ensuremath{G}, +description=Catalan's constant,sort=G} \begin{document} \title{A Sample Document Using glossary.sty} @@ -4678,14 +5259,9 @@ This is a sample document illustrating the use of the \textsf{glossary} package. The functions here have been taken from ``Tables of Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik. The glossary is a list of special functions, so -the equation number has been used rather than the page number. This can be -done by defining \verb|\theglossarynum| to be \verb|\theequation|. -The equation numbers are a composite number made up of the chapter number -and number of equation within the chapter. The two parts of the page -number are separated by a fullstop. The default compositor is -a dash \verb|-|, so it needs to be set to a dot by redefining the command -\verb|\pagecompositor|. (This needs to be done \emph{before} the command -\verb|\makeglossary|.) +the equation number has been used rather than the page number. This +can be done using the \texttt{number=equation} package +option. \end{abstract} \printglossary @@ -4693,129 +5269,114 @@ a dash \verb|-|, so it needs to be set to a dot by redefining the command \chapter{Gamma Functions} \begin{equation} -\Gamma(z) = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} +\verb|\ensuremath| is only required here if using +hyperlinks. \begin{equation} -\Gamma(x+1) = x\Gamma(x) +\useGlosentry{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) +%\useGlosentry{Gamma}{\Gamma(x+1)} = x\Gamma(x) \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\gamma(\alpha, x) = \int_0^x e^{-t}t^{\alpha-1}\,dt +\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt \end{equation} -\glossary{name={$\gamma(\alpha,x)$},description=Incomplete gamma function,sort=gamma} \begin{equation} -\Gamma(\alpha, x) = \int_x^\infty e^{-t}t^{\alpha-1}\,dt +\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt \end{equation} -\glossary{name={$\Gamma(\alpha,x)$},description=Incomplete gamma function,sort=Gamma} \newpage \begin{equation} -\Gamma(\alpha) = \Gamma(\alpha, x) + \gamma(\alpha, x) +\gls{Gamma} = \Gamma(\alpha, x) + \gamma(\alpha, x) \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\psi(x) = \frac{d}{dx}\ln\Gamma(x) +\gls{psi} = \frac{d}{dx}\ln\Gamma(x) \end{equation} -\glossary{name=$\psi(x)$,description=Psi function,sort=psi} \chapter{Error Functions} \begin{equation} -\erf(x) = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt +\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt \end{equation} -\glossary{name=$\erf(x)$,description=Error function,sort=erf} \begin{equation} -\erfc(x) = 1 - \erf(x) +\gls{erfc} = 1 - \erf(x) \end{equation} -\glossary{name=$\erfc(x)$,description=Complementary error function,sort=erfc} \chapter{Beta Function} \begin{equation} -B(x,y) = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt +\gls{B} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} Alternatively: \begin{equation} -B(x,y) = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi +\gls{B} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} \begin{equation} -B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) +\gls{B} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} \begin{equation} -B_x(p,q) = \int_0^x t^{p-1}(1-t)^{q-1}\,dt +\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt \end{equation} -\glossary{name={$B_x(p,q)$},description=Incomplete beta function,sort=Bx} \chapter{Polynomials} \section{Chebyshev's polynomials} \begin{equation} -T_n(x) = \cos(n\arccos x) +\gls{Tn} = \cos(n\arccos x) \end{equation} -\glossary{name=$T_n(x)$,description=Chebyshev's polynomials of the first kind,sort=Tn} \begin{equation} -U_n(x) = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} +\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} \end{equation} -\glossary{name=$U_n(x)$,description=Chebyshev's polynomials of the second kind,sort=Un} \section{Hermite polynomials} \begin{equation} -H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) +\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) \end{equation} -\glossary{name=$H_n(x)$,description=Hermite polynomials,sort=Hn} \section{Laguerre polynomials} \begin{equation} -L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} \frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) +L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} +\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) \end{equation} -\glossary{name=$L_n^\alpha(x)$,description=Laguerre polynomials,sort=Lna} \chapter{Bessel Functions} -Bessel functions $Z_\nu(z)$ are solutions of +Bessel functions $Z_\nu$ are solutions of \begin{equation} +\useglosentry{Znu} \frac{d^2Z_\nu}{dz^2} + \frac{1}{z}\,\frac{dZ_\nu}{dz} + -\left( -1-\frac{\nu^2}{z^2}Z_\nu = 0 -\right) +\left( 1-\frac{\nu^2}{z^2}Z_\nu = 0 \right) \end{equation} -\glossary{name=$Z_\nu(z)$,description=Bessel functions,sort=Z} \chapter{Confluent hypergeometric function} \begin{equation} -\Phi(\alpha,\gamma;z) = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} +\gls{Phi} = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} + \frac{\alpha(\alpha+1)}{\gamma(\gamma+1)}\,\frac{z^2}{2!} -+\frac{\alpha(\alpha+1)(\alpha+2)}{\gamma(\gamma+1)(\gamma+2)}\,\frac{z^3}{3!} -+ \cdots ++\frac{\alpha(\alpha+1)(\alpha+2)}{\gamma(\gamma+1)(\gamma+2)}\, +\frac{z^3}{3!} + \cdots \end{equation} -\glossary{name={$\Phi(\alpha,\gamma;z)$},description=confluent hypergeometric function,sort=Pagz} \begin{equation} -k_\nu(x) = \frac{2}{\pi}\int_0^{\pi/2}\cos(x \tan\theta - \nu\theta)\,d\theta +\gls{knu} = \frac{2}{\pi}\int_0^{\pi/2} +\cos(x \tan\theta - \nu\theta)\,d\theta \end{equation} -\glossary{name=$k_\nu(x)$,description=Bateman's function,sort=kv} \chapter{Parabolic cylinder functions} \begin{equation} -D_p(z) = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} +\gls{Dp} = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} \left\{ \frac{\surd\pi}{\Gamma\left(\frac{1-p}{2}\right)} \Phi\left(-\frac{p}{2},\frac{1}{2};\frac{z^2}{2}\right) @@ -4823,57 +5384,121 @@ D_p(z) = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} \Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) \right\} \end{equation} -\glossary{name=$D_p(z)$,description=Parabolic cylinder functions,sort=Dp} \chapter{Elliptical Integral of the First Kind} \begin{equation} -F(\phi, k) = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} +\gls{F} = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} \end{equation} -\glossary{name={$F(\phi,k)$},description=Elliptical integral of the first kind,sort=Fpk} \chapter{Constants} \begin{equation} -C = 0.577\,215\,664\,901\ldots +\gls{C} = 0.577\,215\,664\,901\ldots \end{equation} -\glossary{name=$C$,description=Euler's constant,sort=C} \begin{equation} -G = 0.915\,965\,594\ldots +\gls{G} = 0.915\,965\,594\ldots \end{equation} -\glossary{name=$G$,description=Catalan's constant,sort=G} \end{document} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \begin{macrocode} %<*sampleEqPg.tex> % \end{macrocode} +% \begin{macrocode} \documentclass[a4paper,12pt]{report} \usepackage{amsmath} -\usepackage[header,toc,border=none,cols=3]{glossary} - +\usepackage[colorlinks]{hyperref} +\usepackage[header,toc,border=none,cols=3, + number=equation]{glossary}[2006/07/20] \newcommand{\erf}{\operatorname{erf}} \newcommand{\erfc}{\operatorname{erfc}} -\renewcommand{\theglossarynum}{\theequation} -\renewcommand{\pagecompositor}{.} - \renewcommand{\glossaryname}{Index of Special Functions and Notations} \renewcommand{\glossarypreamble}{Numbers in italic indicate the equation number, numbers in bold indicate page numbers where the main definition occurs.\par} -\setglossary{glsnumformat=textit} +% set the default glossary numbers to italic +% hyperit is used instead of textit because +% the hyperref package is being used. +\setglossary{glsnumformat=hyperit} + +% 1st column heading +\renewcommand{\entryname}{Notation} + +% 2nd column heading +\renewcommand{\descriptionname}{Function Name} + +% Add a blank row after the header +\newcommand{\glossarysubheader}{ & & \\} + +% store glossary entries for later use + +\storeglosentry{Gamma}{name=\ensuremath{\Gamma(z)}, +description=Gamma function,sort=Gamma} + +\storeglosentry{gamma}{name=\ensuremath{\gamma(\alpha,x)}, +description=Incomplete gamma function,sort=gamma} + +\storeglosentry{iGamma}{name=\ensuremath{\Gamma(\alpha,x)}, +description=Incomplete gamma function,sort=Gamma} + +\storeglosentry{psi}{name=\ensuremath{\psi(x)}, +description=Psi function,sort=psi} + +\storeglosentry{erf}{name=\ensuremath{\erf(x)}, +description=Error function,sort=erf} + +\storeglosentry{erfc}{name=\ensuremath{\erfc(x)}, +description=Complementary error function,sort=erfc} + +\storeglosentry{beta}{name=\ensuremath{B(x,y)}, +description=Beta function,sort=B} + +\storeglosentry{Bx}{name=\ensuremath{B_x(p,q)}, +description=Incomplete beta function,sort=Bx} + +\storeglosentry{Tn}{name=\ensuremath{T_n(x)}, +description=Chebyshev's polynomials of the first kind, +sort=Tn} + +\storeglosentry{Un}{name=\ensuremath{U_n(x)}, +description=Chebyshev's polynomials of the second kind, +sort=Un} + +\storeglosentry{Hn}{name=\ensuremath{H_n(x)}, +description=Hermite polynomials,sort=Hn} -\renewcommand{\glossaryheader}{\bfseries Notation & -\multicolumn{2}{c}{\bfseries -\begin{tabular}{c}Name of the Function and\\the number of -the formula\end{tabular}}\\} +\storeglosentry{Lna}{name=\ensuremath{L_n^\alpha(x)}, +description=Laguerre polynomials,sort=Lna} + +\storeglosentry{Znu}{name=\ensuremath{Z_\nu(z)}, +description=Bessel functions,sort=Z} + +\storeglosentry{Pagz}{name=\ensuremath{\Phi(\alpha,\gamma;z)}, +description=confluent hypergeometric function,sort=Pagz} + +\storeglosentry{kv}{name=\ensuremath{k_\nu(x)}, +description=Bateman's function,sort=kv} + +\storeglosentry{Dp}{name=\ensuremath{D_p(z)}, +description=Parabolic cylinder functions,sort=Dp} + +\storeglosentry{Fpk}{name=\ensuremath{F(\phi,k)}, +description=Elliptical integral of the first kind,sort=Fpk} + +\storeglosentry{C}{name=\ensuremath{C}, +description=Euler's constant,sort=C} + +\storeglosentry{G}{name=\ensuremath{G}, +description=Catalan's constant,sort=G} \renewcommand{\shortglossaryname}{Special Functions} @@ -4892,13 +5517,18 @@ This is a sample document illustrating the use of the \textsf{glossary} package. The functions here have been taken from ``Tables of Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik. -The glossary lists both page number and equation numbers. Since the -equation numbers depend on chapter numbers, the page compositor needs -to be redefined. (Note that this example will only work where the -page number and equation number compositor is the same. So it won't work -if, say, the page numbers are of the form 2-4 and the equation numbers -are of the form 4.6) As most of the glossary entries should have an italic -format, it is easiest to set the default format to italic. +The glossary lists both page numbers and equation numbers. +Since the majority of the entries use the equation number, +\texttt{number=equation} was used as a package option. +The entries that should refer to the page number instead +use the \texttt{number=equation} glossary key. +Note that this example will only work where the +page number and equation number compositor is the same. So +it won't work if, say, the page numbers are of the form +2-4 and the equation numbers are of the form 4.6. +As most of the glossary entries should have an italic +format, it is easiest to set the default format to +italic. \end{abstract} @@ -4906,123 +5536,88 @@ format, it is easiest to set the default format to italic. \printglossary -%It's a bit cumbersome having to keep redefining \theglossarynum. It -%would probably be easier to define a new command which sets \theglossarynum -%and then calls \glossary -%For example: -\newcommand{\myglossary}[2]{% -\renewcommand{\theglossarynum}{#1}\glossary{#2}} -%You can then do something like, say -%\myglossary{\thepage}{name=$\Gamma(z)$,description=Gamma function,sort=Gamma,format=textbf} - -%or, alternatively, you could define -\newcommand{\glossarypage}[1]{% -\renewcommand{\theglossarynum}{\thepage}\glossary{#1,format=textbf}} -%and -\newcommand{\glossaryequation}[1]{% -\renewcommand{\theglossarynum}{\theequation}\glossary{#1}} - \chapter{Gamma Functions} -The gamma function is defined as -\renewcommand{\theglossarynum}{\thepage} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma,format=textbf} -\renewcommand{\theglossarynum}{\theequation} +The \useGlosentry[number=page,format=hyperbf]{Gamma}{gamma function} is +defined as \begin{equation} -\Gamma(z) = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\Gamma(x+1) = x\Gamma(x) +\useGlosentry{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\gamma(\alpha, x) = \int_0^x e^{-t}t^{\alpha-1}\,dt +\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt \end{equation} -\glossary{name={$\gamma(\alpha,x)$},description=Incomplete gamma function,sort=gamma} \begin{equation} -\Gamma(\alpha, x) = \int_x^\infty e^{-t}t^{\alpha-1}\,dt +\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt \end{equation} -\glossary{name={$\Gamma(\alpha,x)$},description=Incomplete gamma function,sort=Gamma} \newpage \begin{equation} -\Gamma(\alpha) = \Gamma(\alpha, x) + \gamma(\alpha, x) +\useGlosentry{Gamma}{\ensuremath{\Gamma(\alpha)}} = \Gamma(\alpha, x) + \gamma(\alpha, x) \end{equation} -\glossary{name=$\Gamma(z)$,description=Gamma function,sort=Gamma} \begin{equation} -\psi(x) = \frac{d}{dx}\ln\Gamma(x) +\gls{psi} = \frac{d}{dx}\ln\Gamma(x) \end{equation} -\glossary{name=$\psi(x)$,description=Psi function,sort=psi} \chapter{Error Functions} -The error function is defined as: -\renewcommand{\theglossarynum}{\thepage} -\glossary{name=$\erf(x)$,description=Error function,sort=erf,format=textbf} -\renewcommand{\theglossarynum}{\theequation} +The \useGlosentry[number=page,format=hyperbf]{erf}{error +function} is defined as: \begin{equation} -\erf(x) = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt +\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt \end{equation} -\glossary{name=$\erf(x)$,description=Error function,sort=erf} \begin{equation} -\erfc(x) = 1 - \erf(x) +\gls{erfc} = 1 - \erf(x) \end{equation} -\glossary{name=$\erfc(x)$,description=Complementary error function,sort=erfc} \chapter{Beta Function} \begin{equation} -B(x,y) = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt +\gls{beta} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} Alternatively: \begin{equation} -B(x,y) = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi +\gls{beta} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} \begin{equation} -B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) +\gls{beta} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) \end{equation} -\glossary{name={$B(x,y)$},description=Beta function,sort=B} \begin{equation} -B_x(p,q) = \int_0^x t^{p-1}(1-t)^{q-1}\,dt +\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt \end{equation} -\glossary{name={$B_x(p,q)$},description=Incomplete beta function,sort=Bx} \chapter{Chebyshev's polynomials} \begin{equation} -T_n(x) = \cos(n\arccos x) +\gls{Tn} = \cos(n\arccos x) \end{equation} -\glossary{name=$T_n(x)$,description=Chebyshev's polynomials of the first kind,sort=Tn} \begin{equation} -U_n(x) = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} +\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} \end{equation} -\glossary{name=$U_n(x)$,description=Chebyshev's polynomials of the second kind,sort=Un} \chapter{Hermite polynomials} \begin{equation} -H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) +\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) \end{equation} -\glossary{name=$H_n(x)$,description=Hermite polynomials,sort=Hn} \chapter{Laguerre polynomials} \begin{equation} -L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} \frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) +\gls{Lna} = \frac{1}{n!}e^x x^{-\alpha} +\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) \end{equation} -\glossary{name=$L_n^\alpha(x)$,description=Laguerre polynomials,sort=Lna} \chapter{Bessel Functions} @@ -5033,27 +5628,28 @@ Bessel functions $Z_\nu(z)$ are solutions of 1-\frac{\nu^2}{z^2}Z_\nu = 0 \right) \end{equation} -\glossary{name=$Z_\nu(z)$,description=Bessel functions,sort=Z} +\useglosentry{Znu} \chapter{Confluent hypergeometric function} \begin{equation} -\Phi(\alpha,\gamma;z) = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} +\gls{Pagz} = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} + \frac{\alpha(\alpha+1)}{\gamma(\gamma+1)}\,\frac{z^2}{2!} -+\frac{\alpha(\alpha+1)(\alpha+2)}{\gamma(\gamma+1)(\gamma+2)}\,\frac{z^3}{3!} ++\frac{\alpha(\alpha+1)(\alpha+2)} + {\gamma(\gamma+1)(\gamma+2)} +\,\frac{z^3}{3!} + \cdots \end{equation} -\glossary{name={$\Phi(\alpha,\gamma;z)$},description=confluent hypergeometric function,sort=Pagz} \begin{equation} -k_\nu(x) = \frac{2}{\pi}\int_0^{\pi/2}\cos(x \tan\theta - \nu\theta)\,d\theta +\gls{kv} = \frac{2}{\pi}\int_0^{\pi/2} +\cos(x \tan\theta - \nu\theta)\,d\theta \end{equation} -\glossary{name=$k_\nu(x)$,description=Bateman's function,sort=kv} \chapter{Parabolic cylinder functions} \begin{equation} -D_p(z) = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} +\gls{Dp} = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} \left\{ \frac{\surd\pi}{\Gamma\left(\frac{1-p}{2}\right)} \Phi\left(-\frac{p}{2},\frac{1}{2};\frac{z^2}{2}\right) @@ -5061,34 +5657,33 @@ D_p(z) = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} \Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) \right\} \end{equation} -\glossary{name=$D_p(z)$,description=Parabolic cylinder functions,sort=Dp} \chapter{Elliptical Integral of the First Kind} \begin{equation} -F(\phi, k) = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} +\gls{Fpk} = \int_0^\phi +\frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} \end{equation} -\glossary{name={$F(\phi,k)$},description=Elliptical integral of the first kind,sort=Fpk} \chapter{Constants} \begin{equation} -C = 0.577\,215\,664\,901\ldots +\gls{C} = 0.577\,215\,664\,901\ldots \end{equation} -\glossary{name=$C$,description=Euler's constant,sort=C} \begin{equation} -G = 0.915\,965\,594\ldots +\gls{G} = 0.915\,965\,594\ldots \end{equation} -\glossary{name=$G$,description=Catalan's constant,sort=G} \end{document} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \begin{macrocode} %<*sampleNtn.tex> % \end{macrocode} +% \begin{macrocode} \documentclass{report} \usepackage[plainpages=false,colorlinks]{hyperref} @@ -5098,13 +5693,15 @@ G = 0.915\,965\,594\ldots \makeglossary +% Define a new glossary type called notation \newglossarytype{notation}{not}{ntn}[style=long,cols=2,border,header] % Set up notation style \newcommand{\notationname}{Notation} % Don't display numbers, remove commas and number hyphens -% for notation entries -%\setglossary{type=notation,glsnumformat=ignore,glodelim={.}} +% for notation entries, and put a full stop after the +% deescription: +\setglossary{type=notation,glsnumformat=ignore,glodelim={.}} \makenotation @@ -5116,7 +5713,8 @@ G = 0.915\,965\,594\ldots \maketitle \begin{abstract} -\pagenumbering{Alph}%stop hyperref complaining about duplicate page identifiers +%stop hyperref complaining about duplicate page identifiers +\pagenumbering{Alph} This is a sample document illustrating the use of the \textsf{glossary} package. In this example, a new glossary type called \texttt{notation} is defined, so that the document can have a @@ -5145,56 +5743,65 @@ are denoted by a caligraphic font e.g.\ $\mathcal{S}$% \notation{name=$\mathcal{S}$,description=A set,sort=S}. -Let $\mathcal{U}$ denote the universal set\notation{name=$\mathcal{U}$,description={The universal set},sort=U}. +Let $\mathcal{U}$ denote the universal set\notation{ +name=$\mathcal{U}$,description={The universal set},sort=U}. -The cardinality\glossary{name=cardinality,description=The number of elements in the specified set} of a set $\mathcal{S}$ is denoted -$|\mathcal{S}|$% -\notation{name=$\mid\mathcal{S}\mid$,description=cardinality of $\mathcal{S}$,sort=cardinality} +The cardinality\glossary{name=cardinality, +description=The number of elements in the specified set} of +a set $\mathcal{S}$ is denoted $|\mathcal{S}|$% +\notation{name=$\mid\mathcal{S}\mid$, +description=cardinality of $\mathcal{S}$,sort=cardinality} \chapter{Next} Now for a hyperlink: -\xnotation{name=$\mathcal{U}$,description={The universal -set},sort=U}{$\mathcal{U}$}. +\xnotation{name=$\mathcal{U}$, description={The universal +set}, sort=U}{$\mathcal{U}$}. \end{document} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \begin{macrocode} %<*sampleNtn2.tex> % \end{macrocode} +% \begin{macrocode} \documentclass{report} \usepackage[plainpages=false,colorlinks]{hyperref} \usepackage{html} -\usepackage[toc]{glossary} +\usepackage[toc]{glossary}[2006/07/20] \makeglossary -\newglossarytype{notation}{not}{ntn} +% Define a new glossary type called notation +% Suppress the page numbering in the list of notation +\newglossarytype[nlg]{notation}{not}{ntn}[number=none] % Set up notation style \newcommand{\notationname}{Notation} -% Don't display numbers, remove commas and number hyphens -% for notation entries -\setglossary{type=notation,glsnumformat=ignore,% -glodelim={.}} \makenotation \begin{document} % Save details for later use (note the use of \protect): -\storeglosentry[notation]{not:set}{name={$\protect\mathcal{S}$},description=A set,sort=S} +\storeglosentry[notation]{not:set}{name={$\mathcal{S}$}, +description=A set,sort=S} -\storeglosentry[notation]{not:U}{name=$\protect\mathcal{U}$,description={The universal set},sort=U} +\storeglosentry[notation]{not:U}{name=$\mathcal{U}$, +description={The universal set},sort=U} -\storeglosentry[notation]{not:card}{name=$\mid\protect\mathcal{S}\mid$,description=cardinality of $\protect\mathcal{S}$,sort=cardinality} +\storeglosentry[notation]{not:card}{name=$\mid\mathcal{S}\mid$, +description=cardinality of $\mathcal{S}$, +sort=cardinality} -\storeglosentry{glos:set}{name=set,description=A collection of distinct objects} +\storeglosentry{glos:set}{name=set,description=A collection of +distinct objects} -\storeglosentry{glos:card}{name=cardinality,description=The number of elements in the specified set} +\storeglosentry{glos:card}{name=cardinality,description=The number of +elements in the specified set} \title{Sample Document using glossary Package} \author{Nicola Talbot} @@ -5202,7 +5809,8 @@ glodelim={.}} \maketitle \begin{abstract} -\pagenumbering{Alph}%stop hyperref complaining about duplicate page identifiers +%stop hyperref complaining about duplicate page identifiers: +\pagenumbering{Alph} This is a sample document illustrating the use of the \textsf{glossary} package. In this example, a new glossary type called \texttt{notation} is defined, so that the document can have a @@ -5235,13 +5843,19 @@ Let \gls{not:U} denote the universal set. The \gls{glos:card} of a set $\mathcal{S}$ is denoted \gls{not:card}. +\chapter{Another Chapter} + +Another mention of the universal set \gls{not:U}. + \end{document} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} % \begin{macrocode} %<*sampleSec.tex> % \end{macrocode} +% \begin{macrocode} \documentclass{report} \usepackage[plainpages=false,colorlinks]{hyperref} @@ -5249,11 +5863,16 @@ The \gls{glos:card} of a set $\mathcal{S}$ is denoted \makeglossary -% This just saves a bit of typing - -\storeglosentry{glos:I}{name=identity matrix,description=diagonal +\storeglosentry{ident}{name=identity matrix,description=diagonal matrix with 1s along the leading diagonal} +\storeglosentry{diag}{name=diagonal matrix, +description=matrix whose only non-zero entries are along +the leading diagonal} + +\storeglosentry{sing}{name=singular matrix, +description=matrix with zero determinant} + \begin{document} \pagenumbering{roman} @@ -5268,31 +5887,29 @@ This is a sample document illustrating the use of the \chapter{Diagonal matrices} -A diagonal matrix\glossary{name=diagonal matrix, -description=matrix whose only non-zero entries are along the leading diagonal,format=hyperit} -is a matrix where all elements not on the leading diagonal are zero. This is the +A \gls[format=hyperit]{diag} is a matrix where all elements not on the +leading diagonal are zero. This is the primary definition, so an italic font is used for the page number. \newpage \section{Identity matrix} -The identity matrix\glossary{name=identity matrix, -description=diagonal matrix with 1s along the leading diagonal} -\ldots +The \gls[format=hyperit]{ident} is a \gls{diag} whose leading +diagonal elements are all equal to 1. -Here is another entry for a diagonal matrix\glossary{name=diagonal matrix, -description=matrix whose only non-zero entries are along the leading diagonal} +Here is another entry for a \gls{diag}. \chapter{Singular Matrices} -A singular matrix\glossary{name=singular matrix, -description=matrix with zero determinant} -\ldots +A \gls{sing} is a matrix with zero determinant. +\useGlosentry{sing}{Singular matrices} are non-invertible. -Another \useGlosentry{glos:I}{identity matrix} entry. +Another \gls{ident} entry. \end{document} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} +%\fi %\Finale \endinput diff --git a/Master/texmf-dist/source/latex/glossary/glossary.ins b/Master/texmf-dist/source/latex/glossary/glossary.ins index 1091023f1c1..6359e0d0d00 100644 --- a/Master/texmf-dist/source/latex/glossary/glossary.ins +++ b/Master/texmf-dist/source/latex/glossary/glossary.ins @@ -1,4 +1,4 @@ -% glossary.ins generated using /nlctltpc/home/nlct/bin/makedtx version 0.9b 2006/7/9 16:01 +% glossary.ins generated using makedtx version 0.91b 2006/7/25 18:13 \input docstrip \preamble diff --git a/Master/texmf-dist/tex/latex/glossary/glossary.sty b/Master/texmf-dist/tex/latex/glossary/glossary.sty index 828fab35f26..2f6c12aaf52 100644 --- a/Master/texmf-dist/tex/latex/glossary/glossary.sty +++ b/Master/texmf-dist/tex/latex/glossary/glossary.sty @@ -27,82 +27,82 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary}[2006/07/09 2.38 (NLCT)] +\ProvidesPackage{glossary}[2006/07/20 2.4 (NLCT)] \RequirePackage{ifthen} \RequirePackage{keyval} \define@key{gloss} - {style} - {\ifthenelse{\equal{#1}{list} \or \equal{#1}{altlist} \or \equal{#1}{super} \or \equal{#1}{long}} - {\def\gls@style{#1}} - {\PackageError{glossary} - {Unknown glossary style '#1'} - {Available styles are: list, altlist, super and long}}} - +{style} +{\ifthenelse{\equal{#1}{list} \or \equal{#1}{altlist} +\or \equal{#1}{super} \or \equal{#1}{long}} +{\def\gls@style{#1}} +{\PackageError{glossary} +{Unknown glossary style '#1'} +{Available styles are: list, altlist, super and long}}} \define@key{gloss} - {header}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} - {\def\gls@header{#1}} - {\PackageError{glossary} - {Unknown glossary style '#1'} - {Available styles are: none and plain}}} - +{header}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} +{\def\gls@header{#1}} +{\PackageError{glossary} +{Unknown glossary style '#1'} +{Available styles are: none and plain}}} \define@key{gloss} - {border}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} - {\def\gls@border{#1}} - {\PackageError{glossary} - {Unknown glossary border '#1'} - {Available styles are: none and plain}}} +{border}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} +{\def\gls@border{#1}} +{\PackageError{glossary} +{Unknown glossary border '#1'} +{Available styles are: none and plain}}} \newcount\gls@cols \define@key{gloss}{cols}{\gls@cols=#1\relax \ifthenelse{\gls@cols<2 \or \gls@cols>3} - {\PackageError{glossary} - {invalid number of columns} - {The cols option can only be 2 or 3}} - {}} - +{\PackageError{glossary} +{invalid number of columns} +{The cols option can only be 2 or 3}} +{}} \define@key{gloss} - {number} - {\ifthenelse{\equal{#1}{none}\or\equal{#1}{page}\or\equal{#1}{section}} - {\def\gls@number{#1}} - {\PackageError{glossary} - {Unknown glossary number style '#1'} - {Available styles are: none, page and section}}} - +{number} +{\ifthenelse{\equal{#1}{none}} +{\def\gls@glossary@number{#1}} +{\@ifundefined{c@#1}{ +\PackageError{glossary} +{Unknown glossary number style '#1'} +{You may either specify "none" or the name of a counter, +e.g. "section"}\def\gls@glossary@number{page}}{\def\gls@glossary@number{#1}}}} \newif\ifgls@toc -\define@key{gloss}{toc}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname gls@toc#1\endcsname} - {\PackageError{glossary}{Glossary option 'toc' is boolean} - {The value of 'toc' can only be set to 'true' or 'false'}}} - +\define@key{gloss}{toc}[true]{\ifthenelse{\equal{#1}{true} +\or \equal{#1}{false}} +{\csname gls@toc#1\endcsname} +{\PackageError{glossary}{Glossary option 'toc' is boolean} +{The value of 'toc' can only be set to 'true' or 'false'}}} \newif\ifgls@hypertoc - \define@key{gloss}{hypertoc}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname gls@hypertoc#1\endcsname} - {\PackageError{glossary}{Glossary option 'hypertoc' is boolean} - {The value of 'hypertoc' can only be set to 'true' or 'false'}}} - +\define@key{gloss}{hypertoc}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\csname gls@hypertoc#1\endcsname} +{\PackageError{glossary}{Glossary option 'hypertoc' is boolean} +{The value of 'hypertoc' can only be set to 'true' or 'false'}}} \newif\ifgls@section -\define@key{gloss}{section}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname gls@section#1\endcsname} - {\PackageError{glossary}{Glossary option 'section' is boolean} - {The value of 'section' can only be set to 'true' or 'false'}}} +\define@key{gloss}{section}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\csname gls@section#1\endcsname} +{\PackageError{glossary}{Glossary option 'section' is boolean} +{The value of 'section' can only be set to 'true' or 'false'}}} \gls@sectionfalse - \newif\ifglshyper \newif\ifglshyperacronym -\define@key{gloss}{hyper}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname glshyper#1\endcsname\glshyperacronymtrue} - {\PackageError{glossary}{Glossary option 'hyper' is boolean} - {The value of 'hyper' can only be set to 'true' or 'false'}}} - -\define@key{gloss}{hyperacronym}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} - {\csname glshyperacronym#1\endcsname} - {\PackageError{glossary}{Glossary option 'hyperacronym' is boolean} - {The value of 'hyperacronym' can only be set to 'true' or 'false'}}} - +\define@key{gloss}{hyper}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\csname glshyper#1\endcsname\glshyperacronymtrue} +{\PackageError{glossary}{Glossary option 'hyper' is boolean} +{The value of 'hyper' can only be set to 'true' or 'false'}}} +\define@key{gloss}{hyperacronym}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\csname glshyperacronym#1\endcsname} +{\PackageError{glossary}{Glossary option 'hyperacronym' is boolean} +{The value of 'hyperacronym' can only be set to 'true' or 'false'}}} \newif\ifglsacronym -\define@key{gloss}{acronym}[true]{\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}}{\setboolean{glsacronym}{#1}}{% +\define@key{gloss}{acronym}[true]{% +\ifthenelse{\equal{#1}{true} \or \equal{#1}{false}} +{\setboolean{glsacronym}{#1}}{% \PackageError{glossary}{Glossary option 'acronym' is boolean}{The value of 'acronym' can only be set to 'true' or 'false'}}} - \newif\ifglsglobal \define@key{gloss}{global}[true]{\ifthenelse{\equal{#1}{true}\or \equal{#1}{false}}{\setboolean{glsglobal}{#1}}{% @@ -111,11 +111,11 @@ value of 'global' can only be set to 'true' or 'false'}}} \def\gls@style{long} \def\gls@header{none} \def\gls@border{none} -\def\gls@number{page} +\def\gls@glossary@number{page} \gls@cols=2\relax \gls@tocfalse -\@ifundefined{hyperpage}{\glshyperfalse\glshyperacronymfalse}{\glshypertrue\glshyperacronymtrue} - +\@ifundefined{hyperpage}{\glshyperfalse\glshyperacronymfalse}{% +\glshypertrue\glshyperacronymtrue} \@ifundefined{hypertarget}{ \newcommand{\glosslabel}[2]{#2}% \newcommand{\glossref}[2]{#2}% @@ -134,9 +134,9 @@ value of 'global' can only be set to 'true' or 'false'}}} \renewcommand{\glossarypackageoptions}[1]{% \PackageError{glossary}{Command \string\glossarypackageoptions ^^Jcan only be used in configuration file}{}} -\DeclareOption*{\edef\@pkg@ptions{\noexpand\setkeys{gloss}{\CurrentOption}} +\DeclareOption*{\edef\@pkg@ptions{\noexpand +\setkeys{gloss}{\CurrentOption}} \ifthenelse{\equal{\CurrentOption}{}}{}{\@pkg@ptions}} - \ProcessOptions \ifthenelse{\(\equal{\gls@style}{list} \or \equal{\gls@style}{altlist}\) \and @@ -144,44 +144,77 @@ value of 'global' can only be set to 'true' or 'false'}}} \or \gls@cols=3\)} {\PackageError{glossary}{You can't have option 'style=list' or 'style=altlist' in combination with any of the other style -options} -{The 'list' and 'altlist' options don't have a header, border or number of columns option.}} +options}{The 'list' and 'altlist' options don't have a header, +border or number of columns option.}} {} \ifthenelse{\boolean{gls@hypertoc} \and \boolean{gls@toc}}{% \PackageWarning{glossary}{Can't have both 'toc' and 'hypertoc', ignoring 'toc' option} \ifgls@hypertoc\gls@tocfalse\fi}{} -\define@key{wrgloss}{name}{\gdef\@glo@n@me{#1}} -\define@key{wrgloss}{description}{\def\@descr{#1}} -\define@key{wrgloss}{sort}{\gdef\@s@rt{#1}} +\define@key{wrgloss}{name}{% +\def\@glo@n@me{#1}% +\@onelevel@sanitize\@glo@n@me% +\global\let\@glo@n@me\@glo@n@me} +\define@key{wrgloss}{description}{% +\def\@descr{#1}% +\@onelevel@sanitize\@descr} +\define@key{wrgloss}{sort}{% +\def\@s@rt{#1}% +\@onelevel@sanitize\@s@rt +\global\let\@s@rt\@s@rt} \define@key{wrgloss}{format}{\def\@f@rm@t{#1}} +\define@key{wrgloss}{number}{\def\@glo@num{#1}} \newcommand{\@@wrglossary}{} \newcommand{\@glo@l@bel}{} - -\renewcommand{\@wrglossary}[1]{\relax -\gdef\@glo@n@me{}\def\@descr{}\def\@s@rt{}\def\@f@rm@t{}\relax - \setkeys{wrgloss}{#1}\relax +\newcommand{\@gls@glossary@type}{glo} +\renewcommand{\@wrglossary}[2][glossary]{\relax +\gdef\@glo@n@me{}\def\@descr{}\def\@s@rt{}\def\@f@rm@t{}% +\edef\@glo@num{\csname gls@#1@number\endcsname}\relax +\xdef\@pr@fix{\csname @gls@#1@type\endcsname}% + \setkeys{wrgloss}{#2}\relax +\ifthenelse{\equal{\@glo@num}{none}}{\def\@@glo@num{\thepage}}{% +\@ifundefined{c@\@glo@num}{\PackageError{glossary}{% +Not such counter '\@glo@num'}{The value of the 'number' key +must be the name of a counter or the word "none"}% +\def\@@glo@num{\thepage}}{% +\edef\@@glo@num{\csname the\@glo@num\endcsname}}}% \ifthenelse{\equal{\@s@rt}{}}{\gdef\@s@rt{\@glo@n@me}}{}% -\ifthenelse{\equal{\@glo@l@bel}{}}{\gdef\@glo@l@bel{GGG:\@s@rt}}{}% +\ifthenelse{\equal{\@glo@l@bel}{}}{% +\gdef\@glo@l@bel{\@pr@fix:\@s@rt}}{}% \ifthenelse{\equal{\@f@rm@t}{}} - {\protected@write\@glossaryfile{}% +{\expandafter\protected@write\csname @#1file\endcsname{}% +{\string\glossaryentry{\@s@rt @{% +\string\glosslabel{\@glo@l@bel}{\@glo@n@me}}\@descr +\string\relax|glsnumformat}{\@@glo@num}}} +{\ifthenelse{\equal{\@f@rm@t}{hyperrm} \or +\equal{\@f@rm@t}{hypersf} \or \equal{\@f@rm@t}{hypertt} +\or \equal{\@f@rm@t}{hypermd} \or \equal{\@f@rm@t}{hyperbf} +\or \equal{\@f@rm@t}{hyperit} \or \equal{\@f@rm@t}{hyperem} +\or \equal{\@f@rm@t}{hypersl} \or \equal{\@f@rm@t}{hyperup} +\or \equal{\@f@rm@t}{hypersc}} +{\expandafter\protected@write\csname @#1file\endcsname{}% {\string\glossaryentry{\@s@rt @{% \string\glosslabel{\@glo@l@bel}{\@glo@n@me}}\@descr - \string\relax|glsnumformat}{\theglossarynum}}} - {\protected@write\@glossaryfile{}% + \string\relax|\@f@rm@t[\@glo@num]}{\@@glo@num}}} +{\expandafter\protected@write\csname @#1file\endcsname{}% {\string\glossaryentry{\@s@rt @{% \string\glosslabel{\@glo@l@bel}{\@glo@n@me}}\@descr - \string\relax|\@f@rm@t}{\theglossarynum}}}\relax + \string\relax|\@f@rm@t}{\@@glo@num}}}}\relax \endgroup\@esphack \@@wrglossary } -\newcommand{\@gls@getn@me}[1]{\@bsphack\begingroup\@sanitize -\gdef\@glo@n@me{}\setkeys{wrgloss}{#1}\relax -\endgroup\@esphack} +\define@key{wrnsgloss}{name}{\def\@glo@n@me{#1}} +\define@key{wrnsgloss}{description}{\def\@descr{#1}} +\define@key{wrnsgloss}{sort}{\def\@s@rt{#1}} +\define@key{wrnsgloss}{format}{\def\@f@rm@t{#1}} +\define@key{wrnsgloss}{number}{\def\@glo@num{#1}} +\newcommand{\@gls@getn@me}[1]{% +\def\@glo@n@me{}\setkeys{wrnsgloss}{#1}% +} \newcommand{\@gls@getdescr}[1]{% -\@bsphack\begingroup\@sanitize -\protected@edef\@gls@dos@tk@y{\noexpand\setkeys{wrgloss}{#1}}% -\def\@descr{}\@gls@dos@tk@y\relax +\@bsphack\begingroup +\def\@descr{}% +\setkeys{wrgloss}{#1}% \global\let\@glo@desc\@descr \endgroup\@esphack } @@ -215,10 +248,14 @@ defined}{There already exists a glossary entry with the label '#2'}}}% to define the entry using \string\storeglosentry\space before using it.}}{{% \edef\@glostype{\csname glo@#2@type\endcsname}% +\@glo@tb=\expandafter\expandafter\expandafter +{\csname glo@#2@entry\endcsname}% \ifx#1\relax -\protected@edef\@glo@cmd{\expandafter\noexpand\csname \@glostype\endcsname{\csname glo@#2@entry\endcsname}}% +\edef\@glo@cmd{\expandafter\noexpand +\csname\@glostype\endcsname{\the\@glo@tb}}% \else -\protected@edef\@glo@cmd{\expandafter\noexpand\csname \@glostype{\csname glo@#2@entry\endcsname,#1}}% +\edef\@glo@cmd{\expandafter\noexpand +\csname\@glostype\endcsname{\the\@glo@tb,#1}}% \fi \@glo@cmd }}}} @@ -228,49 +265,50 @@ using it.}}{{% to define the entry using \string\storeglosentry\space before using it.}}{{% \edef\@glostype{x\csname glo@#2@type\endcsname}% +\@glo@tb=\expandafter\expandafter\expandafter +{\csname glo@#2@entry\endcsname}% \ifx#1\relax -\protected@edef\@glo@cmd{\expandafter\noexpand\csname \@glostype\endcsname{\csname glo@#2@entry\endcsname}}% +\edef\@glo@cmd{\expandafter\noexpand +\csname\@glostype\endcsname{\the\@glo@tb}}% \else -\protected@edef\@glo@cmd{\expandafter\noexpand\csname \@glostype\endcsname{\csname glo@#2@entry\endcsname,#1}}% +\edef\@glo@cmd{\expandafter\noexpand +\csname\@glostype\endcsname{\the\@glo@tb,#1}}% \fi \@glo@cmd{#3}% }}} -\newcommand{\gls}[2][\relax]{\useGlosentry[#1]{#2}{\csname glo@#2@name\endcsname}} +\newcommand{\gls}[2][\relax]{% +\useGlosentry[#1]{#2}{% +\csname glo@#2@name\endcsname}} \providecommand{\saveglosentry}[3][glossary]{% +\PackageWarning{glossary}{\string\saveglosentry\space is obsolete, +please use \string\storeglosentry\space instead}% \expandafter\def\csname glo@#2@type\endcsname{#1}% -\expandafter\def\csname glo@#2@entry\endcsname{name={#2},description={#3}} +\expandafter\def\csname glo@#2@entry\endcsname{% +name={#2},description={#3}}} +\newcommand*{\@gls@setnumbering}[2][glossary]{% +\ifthenelse{\equal{#2}{none}}{% +\def\pagecompositor{-} +\expandafter\def\csname @#1@delimN\endcsname{} +\expandafter\def\csname @#1@delimR\endcsname{} +\expandafter\def\csname glsX#1Xnumformat\endcsname##1{}}{% +\ifthenelse{\equal{#2}{page}}{% +\def\pagecompositor{-}}{% +\def\pagecompositor{.}} +\expandafter\def\csname @#1@delimN\endcsname{, } +\expandafter\def\csname @#1@delimR\endcsname{--} +\ifglshyper +\expandafter\def\csname glsX#1Xnumformat\endcsname##1{% +\hyperrm[#2]{##1}}% +\else +\expandafter\def\csname glsX#1Xnumformat\endcsname##1{##1}\fi } - -\ifthenelse{\equal{\gls@number}{page}}{ - \newcommand{\theglossarynum}{\thepage} - \newcommand{\pagecompositor}{-} - \newcommand{\@glossary@delimN}{, } - \newcommand{\@glossary@delimR}{--} - \ifglshyper - \newcommand{\glsXglossaryXnumformat}[1]{\hyperrm{#1}}% - \else - \newcommand{\glsXglossaryXnumformat}[1]{#1}\fi} - {\ifthenelse{\equal{\gls@number}{section}} - {\newcommand{\theglossarynum}{\thesection} - \newcommand{\pagecompositor}{.} - \newcommand{\@glossary@delimN}{, } - \newcommand{\@glossary@delimR}{--} - \ifglshyper - \newcommand{\glsXglossaryXnumformat}[1]{\hyperrm{#1}}% - \else - \newcommand{\glsXglossaryXnumformat}[1]{#1}% - \fi} - {\newcommand{\theglossarynum}{\thepage} - \newcommand{\pagecompositor}{-} - \newcommand{\@glossary@delimN}{} - \newcommand{\@glossary@delimR}{} - \newcommand{\glsXglossaryXnumformat}[1]{}}} - -\newcommand{\glsnumformat}[2][glossary]{% -\@ifundefined{glsX#1Xnumformat}{% -\PackageError{glossary}{Glossary type '#1' undefined}{}}{% -\csname glsX#1Xnumformat\endcsname{#2}}} - +} +\@gls@setnumbering{\gls@glossary@number} +\newcommand{\glsnumformat}[1]{% +\@ifundefined{\@glostype}{\def\@glostype{glossary}}{}% +\@ifundefined{glsX\@glostype Xnumformat}{% +\PackageError{glossary}{Glossary type '\@glostype' undefined}{}}{% +\csname glsX\@glostype Xnumformat\endcsname{#1}}} \def\@glostype{glossary} \newcommand{\delimN}{\csname @\@glostype @delimN\endcsname} \newcommand{\delimR}{\csname @\@glostype @delimR\endcsname} @@ -280,7 +318,34 @@ using it.}}{{% \csname @\@glostype @delimT\endcsname} \newcommand{\glodelim}{\csname @\@glostype @glodelim\endcsname \glsbeforenum} - +\newcommand{\glogroupSymbols}{} +\newcommand{\glogroupNumbers}{} +\newcommand{\glogroupA}{} +\newcommand{\glogroupB}{} +\newcommand{\glogroupC}{} +\newcommand{\glogroupD}{} +\newcommand{\glogroupE}{} +\newcommand{\glogroupF}{} +\newcommand{\glogroupG}{} +\newcommand{\glogroupH}{} +\newcommand{\glogroupI}{} +\newcommand{\glogroupJ}{} +\newcommand{\glogroupK}{} +\newcommand{\glogroupL}{} +\newcommand{\glogroupM}{} +\newcommand{\glogroupN}{} +\newcommand{\glogroupO}{} +\newcommand{\glogroupP}{} +\newcommand{\glogroupQ}{} +\newcommand{\glogroupR}{} +\newcommand{\glogroupS}{} +\newcommand{\glogroupT}{} +\newcommand{\glogroupU}{} +\newcommand{\glogroupV}{} +\newcommand{\glogroupW}{} +\newcommand{\glogroupX}{} +\newcommand{\glogroupY}{} +\newcommand{\glogroupZ}{} \define@key{glossnum}{glsnumformat}{\def\@glsnumformat{#1}} \define@key{glossnum}{type}{\def\@glsnumtype{#1}} \define@key{glossnum}{delimN}{\def\@delimN{#1}} @@ -288,7 +353,6 @@ using it.}}{{% \define@key{glossnum}{delimT}{\def\@delimT{#1}} \define@key{glossnum}{gloskip}{\def\@gloskip{#1}} \define@key{glossnum}{glodelim}{\def\@glodelim{#1}} - \providecommand{\ignore}[1]{} \newcommand{\setglossary}[1]{% \def\@glsnumformat{}% @@ -337,6 +401,7 @@ Glossary type '\@glsnumtype' has not been defined} \@ifundefined{short#1name}{% \renewcommand{\@shortglossaryname}{\@glossaryname}}{% \renewcommand{\@shortglossaryname}{\csname short#1name\endcsname}}% +\expandafter\let\expandafter\gls@number\csname gls@#1@number\endcsname \@input@{\jobname.\csname @gls@#1@inext\endcsname}} \providecommand{\glossaryname}{Glossary} \newcommand{\shortglossaryname}{\glossaryname} @@ -345,29 +410,30 @@ Glossary type '\@glsnumtype' has not been defined} \newcommand{\istfilename}{\jobname.ist} \def\@glossaryname{\glossaryname} \def\@shortglossaryname{\shortglossaryname} +\newcommand{\@istfilename}[1]{} \providecommand{\glossarytitle}{% \@ifundefined{chapter}% {% \ifgls@hypertoc -\phantomsection% add anchor before \section* +\phantomsection \@glosaddtoc{section}% \section*{\@glossaryname}\relax \else \section*{\@glossaryname}\relax \ifgls@toc\@glosaddtoc{section}\fi \fi}% -{% \chapter defined +{% \ifthenelse{\boolean{gls@section}}% -{% user requested \section +{% \ifgls@hypertoc -\phantomsection% add anchor before \section* +\phantomsection \@glosaddtoc{section}% \section*{\@glossaryname}\relax \else \section*{\@glossaryname}\relax \ifgls@toc\@glosaddtoc{section}\fi \fi}% -{% use \chapter +{% \ifgls@hypertoc \@ifundefined{if@twoside}{% \clearpage}{% @@ -376,7 +442,7 @@ Glossary type '\@glsnumtype' has not been defined} \else \clearpage \fi}% -\phantomsection% add anchor before \chapter +\phantomsection \@glosaddtoc{chapter}% \fi \chapter*{\@glossaryname}\relax @@ -394,7 +460,6 @@ Glossary type '\@glsnumtype' has not been defined} \newcommand{\@glosaddtoc}[1]{% \addcontentsline{toc}{#1}{\@shortglossaryname} } - \newif\ifgloitemfirst \newcommand{\@bef@reglos}{\global\gloitemfirsttrue\beforeglossary} \newcommand{\@ftergl@s}{\afterglossary\global\gloitemfirstfalse} @@ -430,9 +495,10 @@ type '\@glostype'}{}}{% \expandafter\def\csname @gls@afterglos@#1\endcsname{% \end{description}}% \expandafter\def\csname @#1@gloskip\endcsname{\indexspace}% -\expandafter\def\csname @#1@glodelim\endcsname{, }% +\ifthenelse{\equal{\csname gls@#1@number\endcsname}{none}}{% +\expandafter\def\csname @#1@glodelim\endcsname{}}{% +\expandafter\def\csname @#1@glodelim\endcsname{, }}% \expandafter\def\csname @#1@gloitem\endcsname##1{\item[##1]}% -\expandafter\def\csname @#1@glodelim\endcsname{, }% \expandafter\def\csname @#1@delimT\endcsname{} } \newcommand{\gls@setaltlist}[1][glossary]{% @@ -441,26 +507,24 @@ type '\@glostype'}{}}{% \expandafter\def\csname @gls@afterglos@#1\endcsname{% \end{description}}% \expandafter\def\csname @#1@gloskip\endcsname{\indexspace}% -\expandafter\def\csname @#1@gloitem\endcsname##1{\item[##1]\mbox{}\nopagebreak\par\nopagebreak}% +\expandafter\def\csname @#1@gloitem\endcsname##1{% +\item[##1]\mbox{}\nopagebreak\par\nopagebreak}% \expandafter\def\csname @#1@glodelim\endcsname{ }% \expandafter\def\csname @#1@delimT\endcsname{} } \ifthenelse{\equal{\gls@style}{super}}{ \IfFileExists{supertab.sty}{\RequirePackage{supertab}} {\IfFileExists{supertabular.sty}{\RequirePackage{supertabular}} -{\PackageError{glossary}{Option "super" chosen, but can't find "supertab" package} -{If you want the "super" option, you have to have the "supertab" package installed.}}} -} +{\PackageError{glossary}{Option "super" chosen, but can't find +"supertab" package}{If you want the "super" option, you have to have +the "supertab" package installed.}}}} {\RequirePackage{longtable}} \newlength{\descriptionwidth} -\setlength{\descriptionwidth}{0.6\textwidth} -\newcommand*{\glossaryheader}{\relax} +\setlength{\descriptionwidth}{0.6\linewidth} \newcommand{\@glossaryheader}{% -\ifx\glossaryheader\relax -\csname @\@glostype @header\endcsname -\else -\glossaryheader -\fi +\@ifundefined{glossaryheader}{\csname @\@glostype @header\endcsname} +{\glossaryheader}% +\@ifundefined{glossarysubheader}{}{\glossarysubheader}% } \newcommand{\gls@setheader}[1][glossary]{% \ifthenelse{\equal{\gls@header}{none}}% @@ -482,13 +546,15 @@ type '\@glostype'}{}}{% \ifthenelse{\equal{\gls@border}{none}} {% \expandafter\def\csname @#1@header\endcsname{% -\bfseries\entryname & \bfseries \descriptionname & \\}}% +\bfseries\entryname & \bfseries \descriptionname & +\bfseries \glspageheader \\}}% {% \expandafter\def\csname @#1@header\endcsname{% \hline\bfseries\entryname &\bfseries\descriptionname & -\\\hline\hline}}% +\bfseries \glspageheader \\\hline\hline}}% \fi }} +\newcommand*{\glspageheader}{} \newcommand{\gls@setalignment}[1][glossary]{% \ifthenelse{\equal{\gls@border}{none}} { @@ -515,7 +581,9 @@ type '\@glostype'}{}}{% \expandafter\def\csname @#1@delimT\endcsname{\\} \ifnum\gls@cols=2\relax \expandafter\def\csname @#1@gloskip\endcsname{& \\}% -\expandafter\def\csname @#1@glodelim\endcsname{, }% +\ifthenelse{\equal{\csname gls@#1@number\endcsname}{none}}{% +\expandafter\def\csname @#1@glodelim\endcsname{}}{% +\expandafter\def\csname @#1@glodelim\endcsname{, }}% \else \expandafter\def\csname @#1@gloskip\endcsname{& & \\}% \expandafter\def\csname @#1@glodelim\endcsname{& }% @@ -532,7 +600,8 @@ type '\@glostype'}{}}{% \expandafter\def\csname @gls@beforeglos@#1\endcsname{% \tablehead{\@glossaryheader}\tabletail{\glosstail}% \if\glossaryalignment\relax -\expandafter\let\expandafter\@glossaryalignment\csname @gls@align@#1\endcsname +\expandafter\let\expandafter\@glossaryalignment +\csname @gls@align@#1\endcsname \else \let\@glossaryalignment\glossaryalignment \fi @@ -545,73 +614,91 @@ type '\@glostype'}{}}{% \gls@setheader[#1]% \expandafter\def\csname @gls@beforeglos@#1\endcsname{% \if\relax\glossaryalignment -\expandafter\let\expandafter\@glossaryalignment\csname @gls@align@#1\endcsname +\expandafter\let\expandafter\@glossaryalignment +\csname @gls@align@#1\endcsname \else \let\@glossaryalignment\glossaryalignment \fi \@st@rtglostable{longtable}{\@glossaryalignment} \@glossaryheader\endhead\glosstail\endfoot} - \expandafter\def\csname @gls@afterglos@#1\endcsname{% \end{longtable}}% } \newcommand{\@setglossarystyle}[1][glossary]{% \@ifundefined{gls@set\gls@style}{% \PackageError{glossary}{Glossary style '\gls@style' undefined}{}}{% +\ifthenelse{\equal{\gls@number}{}}{}{% +\expandafter\edef\csname gls@#1@number\endcsname{\gls@number}% +\@gls@setnumbering[#1]{\gls@number}% +}% \csname gls@set\gls@style\endcsname[#1]}} +\let\gls@number\gls@glossary@number \@setglossarystyle \define@key{glosstyle} - {style} - {\ifthenelse{\equal{#1}{list} \or \equal{#1}{altlist} \or \equal{#1}{super} \or \equal{#1}{long}} - {\def\gls@style{#1}} - {\PackageError{glossary} - {Unknown glossary style '#1'} - {Available styles are: list, altlist, super and long}}} - +{style} +{\ifthenelse{\equal{#1}{list} \or \equal{#1}{altlist} +\or \equal{#1}{super} \or \equal{#1}{long}} +{\def\gls@style{#1}} +{\PackageError{glossary} +{Unknown glossary style '#1'} +{Available styles are: list, altlist, super and long}}} \define@key{glosstyle} - {header}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} - {\def\gls@header{#1}} - {\PackageError{glossary} - {Unknown glossary style '#1'} - {Available styles are: none and plain}}} - +{header}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} +{\def\gls@header{#1}} +{\PackageError{glossary} +{Unknown glossary style '#1'} +{Available styles are: none and plain}}} \define@key{glosstyle} - {border}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} - {\def\gls@border{#1}} - {\PackageError{glossary} - {Unknown glossary border '#1'} - {Available styles are: none and plain}}} +{border}[plain]{\ifthenelse{\equal{#1}{none} \or \equal{#1}{plain}} +{\def\gls@border{#1}} +{\PackageError{glossary} +{Unknown glossary border '#1'} +{Available styles are: none and plain}}} \define@key{glosstyle}{cols}{\gls@cols=#1\relax \ifthenelse{\gls@cols<2 \or \gls@cols>3} - {\PackageError{glossary} - {invalid number of columns} - {The cols option can only be 2 or 3}} - {}} +{\PackageError{glossary} +{invalid number of columns} +{The cols option can only be 2 or 3}} +{}} +\define@key{glosstyle} +{number} +{\ifthenelse{\equal{#1}{none}} +{\def\gls@number{#1}} +{\@ifundefined{c@#1}{ +\PackageError{glossary} +{Unknown glossary number style '#1'} +{You may either specify "none" or the name of a counter, +e.g. "section"}\def\gls@number{page}}{\def\gls@number{#1}}}} \newcommand{\setglossarystyle}[2][glossary]{% +\def\gls@number{}% \setkeys{glosstyle}{#2}% \@setglossarystyle[#1]% } -\ifthenelse{\equal{\gls@number}{none} \and \gls@cols<3}{% +\ifthenelse{\equal{\gls@glossary@number}{none} \and \gls@cols<3}{% \renewcommand{\@glossary@glodelim}{}}{} \newif\ifist \let\noist=\istfalse \if@filesw\isttrue\else\istfalse\fi - \newwrite\istfile \catcode`\%11\relax \newcommand{\writeist}{ +\protected@write\@auxout{}{\protect\@istfilename{\istfilename}} \openout\istfile=\istfilename \write\istfile{% makeindex style file created by LaTeX for document "\jobname" on \the\year-\the\month-\the\day} \write\istfile{keyword "\string\\glossaryentry"} \write\istfile{preamble "\string\\begin{theglossary}"} \write\istfile{postamble "\string\n\string\\end{theglossary}\string\n"} \write\istfile{group_skip "\string\\gloskip "} -\write\istfile{item_0 "\string\n\string\\gloitem "} +\write\istfile{item_0 "\string\n\string\n\string\\gloitem "} \write\istfile{delim_0 "\string\n\string\\glodelim "} \write\istfile{page_compositor "\pagecompositor"} \write\istfile{delim_n "\string\\delimN "} \write\istfile{delim_r "\string\\delimR "} \write\istfile{delim_t "\string\\delimT "} +\write\istfile{headings_flag 1} +\write\istfile{heading_prefix "\string\\glogroup"} +\write\istfile{symhead_positive "Symbols"} +\write\istfile{numhead_positive "Numbers"} \closeout\istfile } \catcode`\%14\relax @@ -619,22 +706,25 @@ type '\@glostype'}{}}{% \newwrite\@glossaryfile \immediate\openout\@glossaryfile=\jobname.glo \renewcommand{\glossary}[1][]{\gdef\@glo@l@bel{##1}% -\@bsphack \begingroup \@sanitize \@wrglossary } +\@bsphack \begingroup \@wrglossary } \typeout {Writing glossary file \jobname .glo } \let \makeglossary \@empty \ifist\writeist\fi \noist} - \renewcommand{\glossary}[1][]{% \@bsphack\begingroup\@sanitize\@index} -\newcommand{\@newglossarytype}[4][glg]{} \newcommand{\newglossarytype}[4][glg]{ \@ifundefined{#2}{% \protected@write\@auxout{}{\@newglossarytype[#1]{#2}{#3}{#4}}% \def\@glstype{#2}\def\@glsout{#3}\def\@glsin{#4}% -\expandafter\gdef\csname glsX\@glstype Xnumformat\endcsname{\glsXglossaryXnumformat}% -\expandafter\gdef\csname @\@glstype @delimN\endcsname{\@glossary@delimN}% -\expandafter\gdef\csname @\@glstype @delimR\endcsname{\@glossary@delimR}% +\expandafter\edef\csname gls@\@glstype @number\endcsname{% +\gls@glossary@number}% +\expandafter\gdef\csname glsX\@glstype Xnumformat\endcsname{% +\glsXglossaryXnumformat}% +\expandafter\gdef\csname @\@glstype @delimN\endcsname{% +\@glossary@delimN}% +\expandafter\gdef\csname @\@glstype @delimR\endcsname{% +\@glossary@delimR}% \expandafter\gdef\csname @gls@\@glstype @inext\endcsname{#4}% \expandafter\def\csname @gls@#2@type\endcsname{#4}% \expandafter\edef\csname make\@glstype\endcsname{% @@ -643,19 +733,8 @@ type '\@glostype'}{}}{% \noexpand\@gl@ss@ary{\@glstype}} \expandafter\edef\csname x\@glstype\endcsname{% \noexpand\@Gl@ss@ary{\@glstype}} -\expandafter\edef\csname print\@glstype\endcsname{% -\noexpand\def\noexpand\@glostype{\@glstype}% -\noexpand\@ifundefined{\@glstype name}{% -\noexpand\def\noexpand\@glossaryname{\noexpand\glossaryname}% -}{% -\noexpand\def\noexpand\@glossaryname{% -\noexpand\csname\@glstype name\noexpand\endcsname}}% -\noexpand\@ifundefined{short\@glstype name}{% -\noexpand\def\noexpand\@shortglossaryname{\noexpand\@glossaryname}% -}{% -\noexpand\edef\noexpand\@shortglossaryname{% -\noexpand\csname short\@glstype name\noexpand\endcsname}}% -\noexpand\@prntgl@ss@ry{\@glsin}}% +\@namedef{print\@glstype}{% +\printglossary[#2]}% }{\PackageError{glossary}{Command \expandafter\string\csname #2\endcsname \space already defined}{% You can't call your new glossary type '#2' because there already @@ -663,45 +742,25 @@ exists a command with this name}}% \@@n@wglostype} \newcommand{\@@n@wglostype}[1][]{% \setglossarystyle[\@glstype]{#1}} -\newcommand\@m@kegl@ss[2]{ +\newcommand{\@newglossarytype}[4][glg]{} +\newcommand\@m@kegl@ss[2]{% \expandafter\newwrite\csname @#1file\endcsname \expandafter\immediate\expandafter - \openout\csname @#1file\endcsname=\jobname.#2 +\openout\csname @#1file\endcsname=\jobname.#2 \typeout {Writing #1 file \jobname .#2 } \expandafter\let \csname make#1\endcsname \@empty \ifist\writeist\fi \expandafter\def\csname the#1num\endcsname{\thepage} \noist } -\newcommand{\@wrgl@ss@ry}[2]{\relax -\gdef\@glo@n@me{}\def\@descr{}\def\@s@rt{}\def\@f@rm@t{}\relax -\xdef\@pr@fix{\csname @gls@#1@type\endcsname}% -\ifthenelse{\equal{\@s@rt}{}}{\gdef\@s@rt{\@glo@n@me}}{}% -\ifthenelse{\equal{\@glo@l@bel}{}}{\gdef\@glo@l@bel{\@pr@fix:\@s@rt}}{}% -\setkeys{wrgloss}{#2}\relax - \ifthenelse{\equal{\@f@rm@t}{}} - {\expandafter\protected@write\csname @#1file\endcsname{}{% -\string\glossaryentry{\@s@rt @{% -\string\glosslabel{\@glo@l@bel}{\@glo@n@me}}% -\@descr\string\relax|glsnumformat[#1]}{\csname the#1num\endcsname}}} - {\expandafter\protected@write\csname @#1file\endcsname{}{% -\string\glossaryentry{\@s@rt @{% -\string\glosslabel{\@glo@l@bel}{\@glo@n@me}}% -\@descr\string\relax|\@f@rm@t}{\csname the#1num\endcsname}}}\relax -\endgroup\@esphack -\@@wrgl@ss@ry -} - -\newcommand{\@@wrgl@ss@ry}{} \newcommand\@gl@ss@ary[2][]{\@ifundefined{@#2file}{% -\@bsphack\begingroup \@sanitize \@index}{% +\@bsphack\begingroup\@sanitize \@index}{% \gdef\@glo@l@bel{#1}% -\@bsphack \begingroup \@sanitize \@wrgl@ss@ry{#2}}} +\@bsphack \begingroup \@wrglossary[#2]}} \newcommand{\@Gl@ss@ary}{% -\renewcommand{\@@wrgl@ss@ry}[1]{% -\glossref{\@glo@l@bel}{##1}\renewcommand{\@@wrgl@ss@ry}{}}% +\renewcommand{\@@wrglossary}[1]{% +\glossref{\@glo@l@bel}{##1}\renewcommand{\@@wrglossary}{}}% \@gl@ss@ary} -\newcommand\@prntgl@ss@ry[1]{\@input@{\jobname.#1}} \@onlypreamble{\newglossarytype} \newcommand\@acrnmsh{} \newcommand\@sacrnmsh{} @@ -716,50 +775,61 @@ exists a command with this name}}% \edef\@acr@list{\@glo@ta}}{% \@glo@tb=\expandafter{\@acr@list}% \edef\@acr@list{\the\@glo@tb,\@glo@ta}}} -\newcommand{\glsprimaryfmt}[1]{\textbf{\glsnumformat{#1}}} \newcommand{\@acronymnamefmt}{\glolong\ (\gloshort)} \newcommand{\setacronymnamefmt}[1]{\def\@acronymnamefmt{#1}} \newcommand{\@acronymdescfmt}{\glodesc} \newcommand{\setacronymdescfmt}[1]{\def\@acronymdescfmt{#1}} \newcommand{\acronymfont}[1]{#1} \newcommand{\newacronym}[4][]{% -\ifthenelse{\equal{#1}{}}{\renewcommand\@acrnmcmd{#2}}{\renewcommand\@acrnmcmd{#1}} +\ifthenelse{\equal{#1}{}}{\renewcommand\@acrnmcmd{#2}}{% +\renewcommand\@acrnmcmd{#1}} \@ifundefined{\@acrnmcmd}{% -\expandafter\newcommand\csname\@acrnmcmd short\endcsname{#2\protect\glsxspace} +\expandafter\newcommand\csname\@acrnmcmd short\endcsname{% +#2\protect\glsxspace} \expandafter\newcommand\csname\@acrnmcmd @nx@short\endcsname{#2} -\expandafter\newcommand\csname\@acrnmcmd long\endcsname{#3\protect\glsxspace} +\expandafter\newcommand\csname\@acrnmcmd long\endcsname{% +#3\protect\glsxspace} \expandafter\newcommand\csname\@acrnmcmd @nx@long\endcsname{#3} -\def\@acrn@entry{#4} -{ -\@gls@getdescr{\@acrn@entry}% +\def\@acrn@entry{#4}% +{% +\expandafter\@gls@getdescr\expandafter{\@acrn@entry}% \let\glodesc\@glo@desc% \def\glolong{#3}% +\@onelevel@sanitize\glolong \def\gloshort{\noexpand\acronymfont{#2}}% +\@onelevel@sanitize\gloshort \expandafter\protected@xdef\expandafter\@acrnamefmt{\@acronymnamefmt} \expandafter\protected@xdef\expandafter\@acrdesc{\@acronymdescfmt} -} +}% \@acr@addtolist{\@acrnmcmd} -\protected@edef\@acr@glsentry{name={\@acrnamefmt},format=glsnumformat,sort={\@acrnmcmd},\@acrn@entry,description={\@acrdesc}} +\@glo@tb=\expandafter{\@acrn@entry}% +\protected@edef\@acr@glsentry{name={\@acrnamefmt},% +format=glsnumformat,sort={\@acrnmcmd},\the\@glo@tb,% +description={\@acrdesc}}% +\@glo@tb=\expandafter{\@acr@glsentry}% \newboolean{\@acrnmcmd first}\setboolean{\@acrnmcmd first}{true} -\expandafter\protected@edef\csname \@acrnmcmd\endcsname{\noexpand\@ifstar{\csname @s@\@acrnmcmd\endcsname}{\csname @\@acrnmcmd\endcsname}} +\expandafter\protected@edef\csname \@acrnmcmd\endcsname{% +\noexpand\@ifstar{\csname @s@\@acrnmcmd\endcsname}{% +\csname @\@acrnmcmd\endcsname}} \ifglshyperacronym % hyperlinks \expandafter\protected@edef\csname @\@acrnmcmd\endcsname{% \noexpand\ifthenelse{\noexpand\boolean{\@acrnmcmd first}}{% \csname\@acrnmcmd @nx@long\endcsname\noexpand\@acrnmins\ -(\noexpand\xacronym{\@acr@glsentry}{% +(\noexpand\xacronym{\the\@glo@tb}{% \noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% })\noexpand\unsetacronym{\@acrnmcmd}% -}{\noexpand\xacronym{\@acr@glsentry}{% -\noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}\noexpand\@acrnmins}}\noexpand\glsxspace} +}{\noexpand\xacronym{\the\@glo@tb}{% +\noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% +\noexpand\@acrnmins}}\noexpand\glsxspace} \expandafter\protected@edef\csname @s@\@acrnmcmd\endcsname{% \noexpand\ifthenelse{\noexpand\boolean{\@acrnmcmd first}}{% \noexpand\expandafter\noexpand\MakeUppercase \csname\@acrnmcmd @nx@long\endcsname\noexpand\@acrnmins\ -(\noexpand\xacronym{\@acr@glsentry}{% +(\noexpand\xacronym{\the\@glo@tb}{% \noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% })% \noexpand\unsetacronym{\@acrnmcmd}}{% -\noexpand\xacronym{\@acr@glsentry}{% +\noexpand\xacronym{\the\@glo@tb}{% \noexpand\acronymfont{\noexpand\expandafter\noexpand\MakeUppercase \csname\@acrnmcmd @nx@short\endcsname}% \noexpand\@acrnmins}}\noexpand\glsxspace} @@ -767,30 +837,31 @@ exists a command with this name}}% \expandafter\protected@edef\csname @\@acrnmcmd\endcsname{% \noexpand\ifthenelse{\noexpand\boolean{\@acrnmcmd first}}{% \csname\@acrnmcmd @nx@long\endcsname\noexpand\@acrnmins\ -(\noexpand\acronym{\@acr@glsentry}{% +(\noexpand\acronym{\the\@glo@tb}{% \noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% })\noexpand\unsetacronym{\@acrnmcmd}% -}{\noexpand\acronym{\@acr@glsentry}{% -\noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}\noexpand\@acrnmins}}% +}{\noexpand\acronym{\the\@glo@tb}{% +\noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% +\noexpand\@acrnmins}}% \noexpand\glsxspace} \expandafter\protected@edef\csname @s@\@acrnmcmd\endcsname{% \noexpand\ifthenelse{\noexpand\boolean{\@acrnmcmd first}}{% \noexpand\expandafter \noexpand\MakeUppercase \csname\@acrnmcmd @nx@long\endcsname\noexpand\@acrnmins\ -(\noexpand\acronym{\@acr@glsentry}{% +(\noexpand\acronym{\the\@glo@tb}{% \noexpand\acronymfont{\csname\@acrnmcmd @nx@short\endcsname}% })% \noexpand\unsetacronym{\@acrnmcmd}}{% -\noexpand\acronym{\@acr@glsentry}{% +\noexpand\acronym{\the\@glo@tb}{% \noexpand\acronymfont{\noexpand\expandafter\noexpand\MakeUppercase \csname\@acrnmcmd @nx@short\endcsname}% \noexpand\@acrnmins}}\noexpand\glsxspace} \fi }{% -\PackageError{glossary}{Command '\expandafter\string\csname\@acrnmcmd\endcsname' already defined}{ +\PackageError{glossary}{Command '\expandafter\string +\csname\@acrnmcmd\endcsname' already defined}{% The command name specified by \string\newacronym already exists.}}} - \newcommand{\useacronym}{\@ifstar\@suseacronym\@useacronym} \newcommand{\@suseacronym}[2][]{{\let\glsxspace\relax \def\@acrnmins{#1}\csname @s@#2\endcsname}% @@ -798,34 +869,26 @@ The command name specified by \string\newacronym already exists.}}} \newcommand{\@useacronym}[2][]{{\let\glsxspace\relax \def\@acrnmins{#1}\csname @#2\endcsname}% \setboolean{#2first}{false}} - \newcommand{\acrln}{\@ifstar\@sacrln\@acrln} - \newcommand{\@acrln}[1]{\@ifundefined{#1long}{% \PackageError{glossary}{Acronym '#1' has not been defined}{}}{% \csname#1@nx@long\endcsname}} - \newcommand{\@sacrln}[1]{\@ifundefined{#1long}{% \PackageError{glossary}{Acronym '#1' has not been defined}{}}{% \expandafter\expandafter\expandafter \MakeUppercase\csname#1@nx@long\endcsname}} - \newcommand{\acrsh}{\@ifstar\@sacrsh\@acrsh} - \newcommand{\@acrsh}[1]{\@ifundefined{#1short}{% \PackageError{glossary}{Acronym '#1' has not been defined}{}}{% \acronymfont{\csname#1@nx@short\endcsname}}} - \newcommand{\@sacrsh}[1]{\@ifundefined{#1short}{% \PackageError{glossary}{Acronym '#1' has not been defined}{}}{% \acronymfont{\expandafter\expandafter\expandafter \MakeUppercase\csname#1@nx@short\endcsname}}} - \newcommand{\ifacronymfirstuse}[3]{% \@ifundefined{if#1first}{% \PackageError{glossary}{Acronym '#1' not defined}{}}{% \ifthenelse{\boolean{#1first}}{#2}{#3}}} - \newcommand{\resetacronym}[1]{% \@ifundefined{if#1first}{% \PackageError{glossary}{Acronym '#1' not defined}{}}{% @@ -834,7 +897,6 @@ The command name specified by \string\newacronym already exists.}}} \else \setboolean{#1first}{true}% \fi}} - \newcommand{\unsetacronym}[1]{% \@ifundefined{if#1first}{% \PackageError{glossary}{Acronym '#1' not defined}{}}{% @@ -843,83 +905,74 @@ The command name specified by \string\newacronym already exists.}}} \else \setboolean{#1first}{false}% \fi}} - \newcommand{\resetallacronyms}{% \@for\@acr:=\@acr@list\do{\resetacronym{\@acr}}} - \newcommand{\unsetallacronyms}{% \@for\@acr:=\@acr@list\do{\unsetacronym{\@acr}}} +\ifglsacronym +\newglossarytype[alg]{acronym}{acr}{acn} +\providecommand{\acronymname}{List of Acronyms} +\else +\let\acronym=\glossary +\let\xacronym=\xglossary +\fi \ifglshyper -\def\glshyperpage#1{\@glshyperpage#1\delimR \delimR \\} -\def\@glshyperpage#1\delimR #2\delimR #3\\{% - \ifx\\#2\\% - \@delimNhyperpage{#1}% - \else - \@ifundefined{hyperlink}{#1\delimR #2}{\hyperlink{page.#1}{#1}\delimR \hyperlink{page.#2}{#2}}% - \fi -} - -\def\@delimNhyperpage#1{\@@delimNhyperpage#1\delimN \delimN\\} -\def\@@delimNhyperpage#1\delimN #2\delimN #3\\{% - \ifx\\#2\\% - \@ifundefined{hyperlink}{#1}{\hyperlink{page.#1}{#1}}% - \else - \@ifundefined{hyperlink}{#1\delimN #2}{\hyperlink{page.#1}{#1}\delimN \hyperlink{page.#2}{#2}}% - \fi -} - -\def\glshypersection#1{\@glshypersection#1\delimR \delimR \\} -\def\@glshypersection#1\delimR #2\delimR #3\\{% - \ifx\\#2\\% - \@delimNhypersection{#1}% - \else - \@ifundefined{hyperlink}{#1\delimR #2}{\hyperlink{section.#1}{#1}\delimR \hyperlink{section.#2}{#2}}% - \fi +\def\glshyper#1#2{\@glshyper{#1}#2\delimR \delimR \\} +\def\@glshyper#1#2\delimR #3\delimR #4\\{% +\ifx\\#3\\% +\@delimNhyper{#1}{#2}% +\else +\@ifundefined{hyperlink}{#2\delimR #3}{% +\hyperlink{#1.#2}{#2}\delimR \hyperlink{#1.#3}{#3}}% +\fi } - -\def\@delimNhypersection#1{\@@delimNhypersection#1\delimN \delimN\\} -\def\@@delimNhypersection#1\delimN #2\delimN #3\\{% - \ifx\\#2\\% - \@ifundefined{hyperlink}{#1}{\hyperlink{section.#1}{#1}}% +\def\@delimNhyper#1#2{\@@delimNhyper{#1}#2\delimN \delimN\\} +\def\@@delimNhyper#1#2\delimN #3\delimN #4\\{% + \ifx\\#3\\% + \@ifundefined{hyperlink}{#2}{\hyperlink{#1.#2}{#2}}% \else - \@ifundefined{hyperlink}{#1\delimN #2}{\hyperlink{section.#1}{#1}\delimN \hyperlink{section.#2}{#2}}% + \@ifundefined{hyperlink}{#2\delimN #3}{% +\hyperlink{#1.#2}{#2}\delimN \hyperlink{#1.#3}{#3}}% \fi } - -\ifthenelse{\equal{\gls@number}{section}}{ -\ifglshyper +\newcommand\glshyperpage[1]{\glshyper{page}{#1}} +\newcommand\glshypersection[1]{\glshyper{section}{#1}} \@ifundefined{chapter} - {} - {\let\@gls@old@chapter\@chapter - \def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}\@ifundefined{hyperdef}{}{\hyperdef{section}{\thechapter.0}{}}}} -\fi - -\providecommand\hyperrm[1]{\textrm{\glshypersection{#1}}} -\providecommand\hypersf[1]{\textsf{\glshypersection{#1}}} -\providecommand\hypertt[1]{\texttt{\glshypersection{#1}}} -\providecommand\hyperbf[1]{\textbf{\glshypersection{#1}}} -\providecommand\hyperit[1]{\textit{\glshypersection{#1}}} -} -{ -\providecommand\hyperrm[1]{\textrm{\glshyperpage{#1}}} -\providecommand\hypersf[1]{\textsf{\glshyperpage{#1}}} -\providecommand\hypertt[1]{\texttt{\glshyperpage{#1}}} -\providecommand\hyperbf[1]{\textbf{\glshyperpage{#1}}} -\providecommand\hyperit[1]{\textit{\glshyperpage{#1}}} -} -\else -\providecommand\hyperrm[1]{\textsf{#1}} -\providecommand\hypersf[1]{\textsf{#1}} -\providecommand\hypertt[1]{\texttt{#1}} -\providecommand\hyperbf[1]{\textbf{#1}} -\providecommand\hyperit[1]{\textit{#1}} -\fi -\ifglsacronym -\newglossarytype[alg]{acronym}{acr}{acn} -\providecommand{\acronymname}{List of Acronyms} +{} +{\let\@gls@old@chapter\@chapter +\def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}% +\@ifundefined{hyperdef}{}{\hyperdef{section}{\thesection}{}}}} +\providecommand\hyperrm[2][\gls@number]{% +\textrm{\glshyper{#1}{#2}}} +\providecommand\hypersf[2][\gls@number]{% +\textsf{\glshyper{#1}{#2}}} +\providecommand\hypertt[2][\gls@number]{% +\texttt{\glshyper{#1}{#2}}} +\providecommand\hyperbf[2][\gls@number]{% +\textbf{\glshyper{#1}{#2}}} +\providecommand\hyperit[2][\gls@number]{% +\textit{\glshyper{#1}{#2}}} +\providecommand\hyperem[2][\gls@number]{% +\emph{\glshyper{#1}{#2}}} +\providecommand\hyperup[2][\gls@number]{% +\textup{\glshyper{#1}{#2}}} +\providecommand\hypersl[2][\gls@number]{% +\textsl{\glshyper{#1}{#2}}} +\providecommand\hypersc[2][\gls@number]{% +\textsc{\glshyper{#1}{#2}}} +\providecommand\hypermd[2][\gls@number]{% +\textmd{\glshyper{#1}{#2}}} \else -\let\acronym=\glossary -\let\xacronym=\xglossary +\providecommand\hyperrm[2][]{\textrm{#2}} +\providecommand\hypersf[2][]{\textsf{#2}} +\providecommand\hypertt[2][]{\texttt{#2}} +\providecommand\hypermd[2][]{\textmd{#2}} +\providecommand\hyperbf[2][]{\textbf{#2}} +\providecommand\hyperit[2][]{\textit{#2}} +\providecommand\hypersl[2][]{\textsl{#2}} +\providecommand\hyperup[2][]{\textup{#2}} +\providecommand\hypersc[2][]{\textsc{#2}} +\providecommand\hyperem[2][]{\emph{#2}} \fi \endinput %% diff --git a/Master/texmf-dist/tpm/glossary.tpm b/Master/texmf-dist/tpm/glossary.tpm index 9d0dd4ab420..f04fba7195a 100644 --- a/Master/texmf-dist/tpm/glossary.tpm +++ b/Master/texmf-dist/tpm/glossary.tpm @@ -3,7 +3,7 @@ glossary Package - 2006/07/10 22:34:35 + 2006/07/26 22:34:00 2.19 rahtz Create a glossary @@ -16,13 +16,13 @@ one type of glossary in your document. [description copied from TeX Catalogue] Nicola Talbot - 658249 + 713408 - + texmf-dist/tex/latex/glossary/glossary.sty texmf-dist/tpm/glossary.tpm - + texmf-dist/doc/latex/glossary/CHANGES texmf-dist/doc/latex/glossary/README texmf-dist/doc/latex/glossary/glossary.pdf @@ -39,7 +39,7 @@ texmf-dist/doc/latex/glossary/sampleNtn.tex texmf-dist/doc/latex/glossary/sampleNtn2.tex texmf-dist/doc/latex/glossary/sampleSec.tex - + texmf-dist/source/latex/glossary/glossary.dtx texmf-dist/source/latex/glossary/glossary.ins -- cgit v1.2.3