From d49526563e8a66d6774a086ad2a91fbf249b35b3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 4 Apr 2011 23:19:17 +0000 Subject: glossaries 3.0 (4apr11) git-svn-id: svn://tug.org/texlive/trunk@21968 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/glossaries/CHANGES | 100 +- Master/texmf-dist/doc/latex/glossaries/INSTALL | 4 +- Master/texmf-dist/doc/latex/glossaries/README | 5 +- .../doc/latex/glossaries/glossaries-manual.html | 14622 ------------- .../doc/latex/glossaries/glossaries-manual.tex | 5076 ----- .../doc/latex/glossaries/glossaries-user.html | 17650 +++++++++++++++ .../doc/latex/glossaries/glossaries-user.tex | 5841 +++++ .../texmf-dist/doc/latex/glossaries/glossaries.pdf | Bin 1661540 -> 1178825 bytes .../doc/latex/glossaries/glossariesbegin.html | 226 +- .../doc/latex/glossaries/glossariesbegin.pdf | Bin 109916 -> 110251 bytes .../doc/latex/glossaries/glossariesbegin.tex | 83 +- .../doc/latex/glossaries/glossary2glossaries.html | 561 +- .../doc/latex/glossaries/glossary2glossaries.pdf | Bin 324374 -> 338575 bytes .../doc/latex/glossaries/glossary2glossaries.tex | 26 +- .../doc/latex/glossaries/mfirstuc-manual.html | 400 + .../doc/latex/glossaries/mfirstuc-manual.tex | 114 + .../doc/latex/glossaries/samples/database2.tex | 2 +- .../doc/latex/glossaries/samples/minimalgls.pdf | Bin 0 -> 37449 bytes .../doc/latex/glossaries/samples/minimalgls.tex | 2 + .../latex/glossaries/samples/sample-crossref.pdf | Bin 0 -> 58460 bytes .../latex/glossaries/samples/sample-crossref.tex | 31 + .../glossaries/samples/sample-custom-acronym.pdf | Bin 0 -> 82678 bytes .../glossaries/samples/sample-custom-acronym.tex | 11 +- .../doc/latex/glossaries/samples/sample-dual.pdf | Bin 0 -> 38192 bytes .../doc/latex/glossaries/samples/sample-dual.tex | 29 + .../doc/latex/glossaries/samples/sample.pdf | Bin 0 -> 116456 bytes .../doc/latex/glossaries/samples/sample.tex | 42 +- .../doc/latex/glossaries/samples/sample4col.pdf | Bin 0 -> 45565 bytes .../doc/latex/glossaries/samples/sample4col.tex | 1 + .../doc/latex/glossaries/samples/sampleAcr.pdf | Bin 0 -> 79256 bytes .../doc/latex/glossaries/samples/sampleAcr.tex | 50 +- .../doc/latex/glossaries/samples/sampleAcrDesc.pdf | Bin 0 -> 74238 bytes .../doc/latex/glossaries/samples/sampleAcrDesc.tex | 24 +- .../doc/latex/glossaries/samples/sampleDB.pdf | Bin 0 -> 51086 bytes .../doc/latex/glossaries/samples/sampleDB.tex | 1 + .../doc/latex/glossaries/samples/sampleDesc.pdf | Bin 0 -> 55522 bytes .../doc/latex/glossaries/samples/sampleDesc.tex | 3 + .../doc/latex/glossaries/samples/sampleEq.pdf | Bin 0 -> 168163 bytes .../doc/latex/glossaries/samples/sampleEq.tex | 3 +- .../doc/latex/glossaries/samples/sampleEqPg.pdf | Bin 0 -> 202690 bytes .../doc/latex/glossaries/samples/sampleEqPg.tex | 2 + .../doc/latex/glossaries/samples/sampleNtn.pdf | Bin 0 -> 109487 bytes .../doc/latex/glossaries/samples/sampleNtn.tex | 3 +- .../doc/latex/glossaries/samples/sampleSec.pdf | Bin 0 -> 75689 bytes .../doc/latex/glossaries/samples/sampleSec.tex | 1 + .../doc/latex/glossaries/samples/sampleaccsupp.pdf | Bin 0 -> 48285 bytes .../doc/latex/glossaries/samples/sampleaccsupp.tex | 10 +- .../latex/glossaries/samples/sampleacronyms.pdf | Bin 0 -> 67704 bytes .../latex/glossaries/samples/sampleacronyms.tex | 1 + .../doc/latex/glossaries/samples/sampletree.pdf | Bin 0 -> 74333 bytes .../doc/latex/glossaries/samples/sampletree.tex | 1 + .../doc/latex/glossaries/samples/sampleutf8.pdf | Bin 0 -> 47388 bytes .../doc/latex/glossaries/samples/sampleutf8.tex | 1 + .../glossaries/samples/samplexdy-compatible207.pdf | Bin 0 -> 175034 bytes .../glossaries/samples/samplexdy-compatible207.tex | 232 + .../doc/latex/glossaries/samples/samplexdy-mc.xdy | 423 +- .../latex/glossaries/samples/samplexdy-mc207.xdy | 591 + .../doc/latex/glossaries/samples/samplexdy.pdf | Bin 0 -> 191487 bytes .../doc/latex/glossaries/samples/samplexdy.tex | 34 +- .../doc/latex/glossaries/samples/samplexdy2.pdf | Bin 0 -> 74992 bytes .../doc/latex/glossaries/samples/samplexdy2.tex | 66 + .../texmf-dist/scripts/glossaries/makeglossaries | 417 +- .../source/latex/glossaries/glossaries.dtx | 21432 +++++++++---------- .../source/latex/glossaries/glossaries.ins | 13 +- .../tex/latex/glossaries/base/glossaries-babel.sty | 4 +- .../glossaries/base/glossaries-compatible-207.sty | 328 + .../glossaries/base/glossaries-polyglossia.sty | 4 +- .../tex/latex/glossaries/base/glossaries.sty | 1912 +- .../tex/latex/glossaries/base/mfirstuc.sty | 15 +- .../dict/glossaries-dictionary-Brazilian.dict | 4 +- .../dict/glossaries-dictionary-Danish.dict | 4 +- .../dict/glossaries-dictionary-Dutch.dict | 4 +- .../dict/glossaries-dictionary-English.dict | 4 +- .../dict/glossaries-dictionary-French.dict | 4 +- .../dict/glossaries-dictionary-German.dict | 4 +- .../dict/glossaries-dictionary-Irish.dict | 4 +- .../dict/glossaries-dictionary-Italian.dict | 4 +- .../dict/glossaries-dictionary-Magyar.dict | 4 +- .../dict/glossaries-dictionary-Polish.dict | 4 +- .../dict/glossaries-dictionary-Serbian.dict | 4 +- .../dict/glossaries-dictionary-Spanish.dict | 4 +- .../latex/glossaries/expl/glossaries-accsupp.sty | 233 +- .../latex/glossaries/styles/glossary-hypernav.sty | 4 +- .../tex/latex/glossaries/styles/glossary-list.sty | 27 +- .../tex/latex/glossaries/styles/glossary-long.sty | 24 +- .../glossaries/styles/glossary-longragged.sty | 24 +- .../tex/latex/glossaries/styles/glossary-super.sty | 24 +- .../glossaries/styles/glossary-superragged.sty | 24 +- .../tex/latex/glossaries/styles/glossary-tree.sty | 24 +- 89 files changed, 38612 insertions(+), 32217 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/glossaries/glossaries-manual.html delete mode 100644 Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex create mode 100644 Master/texmf-dist/doc/latex/glossaries/glossaries-user.html create mode 100644 Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex create mode 100644 Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.html create mode 100644 Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/minimalgls.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sample-crossref.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sample-crossref.tex create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sample-custom-acronym.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sample-dual.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sample-dual.tex create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sample.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sample4col.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleAcr.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleDB.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleDesc.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleEq.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleEqPg.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleNtn.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleSec.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleaccsupp.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleacronyms.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampletree.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/sampleutf8.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-compatible207.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-compatible207.tex create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-mc207.xdy create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/samplexdy.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex create mode 100644 Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-207.sty (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/glossaries/CHANGES b/Master/texmf-dist/doc/latex/glossaries/CHANGES index 2b871bf5843..ccf7c9631e4 100644 --- a/Master/texmf-dist/doc/latex/glossaries/CHANGES +++ b/Master/texmf-dist/doc/latex/glossaries/CHANGES @@ -1,5 +1,103 @@ glossaries change log: +v3.0 (Major changes): + + * Documentation has been restructured: + + - glossaries-user: main user manual + - glossariesbegin: cut-down introduction for beginners + - mfirstuc-manual: user manual for mfirstuc package + - glossaries.pdf: documented code for advanced users + - glossary2glossaries: upgrading from glossary.sty to glossaries.sty + + * Added new package options: + + - entrycounter : number main (level 0) entries in the glossary. + + - counterwithin : set parent counter for the entry counter. + + - subentrycounter : number level 1 entries in the glossary. + + - sort : set the sort order to + - standard alphabetical (sort=standard), + - order of definition (sort=def) + - order of use (sort=use) + + - seeautonumberlist : automatically activates the number list + for entries that use the "see" key. + + - savewrites : minimise number of \newwrite + + - compatible-2.07 : + + bug fixes in v3.0 have cause compatibility problems. This + package option will restore the old behaviour but bugs will + remain. (Should mostly only effect documents that used + \noist with a custom Xindy style file.) + + * \printglossary sets \currentglossary to the current glossary's + label. (Allows custom glossary styles access to the glossary + type.) + + * Modified internal workings of acronyms and: + + - Added starred versions of \acrshort etc. + + - Added "long", "short", "longplural" and "shortplural" keys + (Reserved for use with \newacronym.) + + - Added analogous "longaccess", "shortaccess", "longpluralaccess" + and "shortpluralaccess" keys for \newacronym in + glossaries-accsupp.sty + + * Added \glsseeitemformat to customise the text given in the link + created by \glsseeitem. + + * \newglossaryentry key "nonumberlist" now boolean. + + * added debugging commands \showgloname etc. + + * now loads etoolbox: + + - replaced \DeclareRobustCommand with \newrobustcmd + + - replaced \@ifundefined with \ifcsundef + + - replaced \let...\undefined with \undef... + + * Bug Fixes: + + - now works with equation counter in amsmath's align + environment. + + - Mixed counters now work with xindy option. + + - Fixed hyperlinks in location numbers where \theH + has a prefix not present in \the. + + - If title specified in \printglossary but toctitle hasn't + been specified, make toctitle same as supplied title. + + - \newglossaryentry "see" key and \glssee now sanitize and escape + special characters before writing to output file. (Allows + user to redefine \seename any point before \printglossary or + \printglossaries.) + + - \glshyperlink: Changed the default value of the optional argument + to \glsentrytext instead of \glsentryname. + + * mfirstuc.sty (v1.05): + + - added \glsmakefirstuc (replaces \@gls@makefirstuc) to make + it easier to customise. + + makeglossaries (v2.02): + + * now displays version number on startup unless -q + + * added more diagnostics to give more helpful messages than + those supplied by xindy or makeindex. + v2.07: * Fixed bug that ignored format key in \glsadd @@ -100,7 +198,7 @@ v2.01: * Moved \@do@wrglossary before term is displayed to prevent unwanted whatsit -v2.0 (1.2): +v2.0 (1.20): * Fixed ngerman caption bug in glossaries-babel.sty v1.19: diff --git a/Master/texmf-dist/doc/latex/glossaries/INSTALL b/Master/texmf-dist/doc/latex/glossaries/INSTALL index 87a687e7dac..e9acdea0050 100644 --- a/Master/texmf-dist/doc/latex/glossaries/INSTALL +++ b/Master/texmf-dist/doc/latex/glossaries/INSTALL @@ -83,7 +83,9 @@ Move the sample files (*.tex) to TEXMF/doc/latex/glossaries/sample/ Move the documentation (*.pdf) to TEXMF/doc/latex/glossaries/ -Move glossaries.sty, glossaries-babel.sty and mfirstuc.sty to +Move glossaries.sty, glossaries-babel.sty, +glossaries-polyglossia.sty, glossaries-compatible-207.sty and +mfirstuc.sty to TEXMF/tex/latex/glossaries/base/ Move glossaries-accsupp.sty to diff --git a/Master/texmf-dist/doc/latex/glossaries/README b/Master/texmf-dist/doc/latex/glossaries/README index 62ebf04398c..f8cf784be5a 100644 --- a/Master/texmf-dist/doc/latex/glossaries/README +++ b/Master/texmf-dist/doc/latex/glossaries/README @@ -1,6 +1,6 @@ -LaTeX Package : glossaries v2.07 +LaTeX Package : glossaries v3.0 -Last Modified : 2010-07-10 +Last Modified : 2011-04-02 Author : Nicola Talbot @@ -42,6 +42,7 @@ ifthen xkeyval *at least version 2.5f (2006/11/18)* xfor amsgen +etoolbox longtable (unless you use the nolong or nostyles package options) If the supertabular package is installed, it will also be loaded diff --git a/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.html b/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.html deleted file mode 100644 index 723df427412..00000000000 --- a/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.html +++ /dev/null @@ -1,14622 +0,0 @@ - - - - -glossaries.sty v2.07: LaTeX2εPackage to Assist Generating Glossaries - - - - - - - - - -
- - - - - - - -

glossaries.sty v2.07: LATEX2ε Package to Assist -Generating Glossaries

-
Nicola L.C. Talbot -
School of Computing Sciences -
University of East Anglia -
Norwich. Norfolk -
NR4 7TJ. United Kingdom. -
http://theoval.cmp.uea.ac.uk/~nlct/

-
2010-07-10
-
-

This is the user manual for the glossaries package. Other documents accompanying -this manual:

- -

See the file INSTALL for installation instructions. Related web resources:

- - - - -

Contents

-
- 1 Introduction -
 1.1 Sample Documents -
 1.2 Multi-Lingual Support -
  1.2.1 Changing the Fixed Names -
 1.3 Generating the Associated Glossary Files -
  1.3.1 Using the makeglossaries Perl Script -
  1.3.2 Using xindy explicitly -
  1.3.3 Using makeindex explicitly -
  1.3.4 Note to Front-End and Script Developers -
 1.4 Troubleshooting -
2 Overview of Main User Commands -
 2.1 Package Options -
 2.2 Defining Glossary Entries -
  2.2.1 Plurals -
  2.2.2 Sub-Entries -
  2.2.3 Loading Entries From a File -
 2.3 Number lists -
 2.4 Links to Glossary Entries -
  2.4.1 Changing the format of the link text -
  2.4.2 Enabling and disabling hyperlinks to glossary entries -
 2.5 Adding an Entry to the Glossary Without Generating Text -
 2.6 Cross-Referencing Entries -
 2.7 Using Glossary Terms Without Links -
 2.8 Displaying a glossary -
  2.8.1 Changing the way the entry name appears in the glossary -
  2.8.2 Xindy -
 2.9 Defining New Glossaries -
 2.10 Acronyms -
  2.10.1 Defining A Custom Acronym Style -
  2.10.2 Upgrading From the glossary Package -
 2.11 Unsetting and Resetting Entry Flags -
 2.12 Glossary Styles -
  2.12.1 List Styles -
  2.12.2 Longtable Styles -
  2.12.3 Longtable Styles (Ragged Right) -
  2.12.4 Supertabular Styles -
  2.12.5 Supertabular Styles (Ragged Right) -
  2.12.6 Tree-Like Styles -
 2.13 Defining your own glossary style -
  2.13.1 Example: creating a completely new style -
  2.13.2 Example: creating a new glossary style based on an existing style -
  2.13.3 Example: creating a glossary style that uses the user1, …, user6 keys -
 2.14 Accessibility Support - - - -
3 Mfirstuc Package -
Index -
-

-

-

1 Introduction

- -

The glossaries package is provided to assist generating glossaries. It has a certain -amount of flexibility, allowing the user to customize the format of the glossary and -define multiple glossaries. It also supports acronyms and glossary styles that -include symbols (in addition to a name and description) for glossary entries. -There is provision for loading a database of glossary terms. Only those terms -used1 -in the document will be added to the glossary. -

This package replaces the glossary package which is now obsolete. Please -see the document “Upgrading from the glossary package to the glossaries package” for -assistance in upgrading. -

One of the strengths of this package is its flexibility, however the drawback of this is -the necessity of having a large manual that can cover all the various settings. If you are -daunted by the size of the manual, try starting off with the much shorter guide for -beginners. -

The glossaries package comes with a Perl script called makeglossaries. This -provides a convenient interface to makeindex or xindy. It is strongly recommended that -you use this script, but it is not essential. If you are reluctant to install Perl, or for any -other reason you don’t want to use makeglossaries, you can called makeindex or -xindy explicitly. See §1.3 Generating the Associated Glossary Files for further details. -
-

-

This manual is structured as follows:

- -

The PDF version of this manual also describes more advanced commands in the -documented code section (such as determining if an entry or a glossary exists and -commands that iterate through defined terms or glossaries). -

The remainder of this introductory section covers the following:

- - - - -

-

-

Top

1.1 Sample Documents

-

The glossaries package is provided with some sample documents that illustrate the -various functions. These should be located in the samples subdirectory (folder) of -the glossaries documentation directory. This location varies according to your -operating system and TEX distribution. You can use texdoc to locate the main -glossaries documentation. For example, in a terminal or command prompt, type: - -
texdoc -l glossaries
-

-This should display the full pathname of the file glossaries.pdf. View the contents of -that directory and see if it contains the samples subdirectory. -

If you can’t find the sample files, they are available in the subdirectory -doc/latex/glossaries/samples/ in the glossaries.tds.zip archive which can be -downloaded from CTAN. -

The sample documents are as follows: -

-minimalgls.tex
This document is a minimal working example. You can test your - installation using this file. To create the complete document you will need to do - the following steps: -
    -
  1. Run minimalgls.tex through LATEX either by typing -
    latex minimalgls
    -

    - in a terminal or by using the relevant button or menu item in your text - editor or front-end. This will create the required associated files but you will - - - - not see the glossary. If you use PDFLATEX you will also get warnings about - non-existent references. These warnings may be ignored on the first - run. -

    If you get a Missing \begin{document} error, then it’s most likely that - your version of xkeyval is out of date. Check the log file for a warning of - that nature. If this is the case, you will need to update the xkeyval - package. -

  2. -
  3. Run makeglossaries on the document. This can be done on a terminal - either by typing -
    makeglossaries minimalgls
    -

    - or by typing -
    perl makeglossaries minimalgls
    -

    - If your system doesn’t recognise the command perl then it’s likely you don’t - have Perl installed. In which case you will need to use makeindex - directly. You can do this in a terminal by typing (all on one line): - -
    makeindex -s minimalgls.ist -t minimalgls.glg -o minimalgls.gls - minimalgls.glo
    -

    - (See §1.3.3 Using makeindex explicitly for further details on using makeindex - explicitly.) -

    Note that if you need to specify the full path and the path contains - spaces, you will need to delimit the file names with the double-quote - character. -

  4. -
  5. Run minimalgls.tex through LATEX again (as step 1)
-

You should now have a complete document. The number following each entry in - the glossary is the location number. By default, this is the page number where the - entry was referenced. -

-sample4col.tex
This document illustrates a four column glossary where the entries - have a symbol in addition to the name and description. To create the complete - document, you need to do: -
latex sample4col -
makeglossaries sample4col -
latex sample4col
-

- As before, if you don’t have Perl installed, you will need to use makeindex directly - - - - instead of using makeglossaries. The vertical gap between entries is the gap - created at the start of each group. This can be suppressed by redefining - \glsgroupskip after the glossary style has been set: - - - -

-
- \renewcommand*{\glsgroupskip}{} -
-

-

-sampleAcr.tex
This document has some sample acronyms. It also adds the glossary - to the table of contents, so an extra run through LATEX is required to ensure - the document is up to date: -
latex sampleAcr -
makeglossaries sampleAcr -
latex sampleAcr -
latex sampleAcr
-

-

-sampleAcrDesc.tex
This is similar to the previous example, except that the - acronyms have an associated description. As with the previous example, the - glossary is added to the table of contents, so an extra run through LATEX is - required: -
latex sampleAcrDesc -
makeglossaries sampleAcrDesc -
latex sampleAcrDesc -
latex sampleAcrDesc
-

-

-sampleDesc.tex
This is similar to the previous example, except that it defines the - acronyms using \newglossaryentry instead of \newacronym. As with the - previous example, the glossary is added to the table of contents, so an extra run - through LATEX is required: -
latex sampleDesc -
makeglossaries sampleDesc -
latex sampleDesc -
latex sampleDesc
-

- - - -

-sample-custom-acronym.tex
This document illustrates how to define your - own acronym style if the predefined styles don’t suit your requirements. - -
latex sample-custom-acronym -
makeglossaries sample-custom-acronym -
latex sample-custom-acronym
-

-

-sampleDB.tex
This document illustrates how to load external files containing the - glossary definitions. It also illustrates how to define a new glossary type. This - document has the number list suppressed and uses \glsaddall to add all the - entries to the glossaries without referencing each one explicitly. To create the - document do: -
latex sampleDB -
makeglossaries sampleDB -
latex sampleDB
-

- The glossary definitions are stored in the accompanying files database1.tex and - database2.tex. Note that if you don’t have Perl installed, you will need to use - makeindex twice instead of a single call to makeglossaries: -

    -
  1. Create the main glossary: -
    makeindex -s sampleDB.ist -t sampleDB.glg -o sampleDB.gls - sampleDB.glo
    -

    -

  2. -
  3. Create the secondary glossary: -
    makeindex -s sampleDB.ist -t sampleDB.nlg -o sampleDB.not - sampleDB.ntn
    -

    -

-
-sampleEq.tex
This document illustrates how to change the location to something - other than the page number. In this case, the equation counter is used since all - glossary entries appear inside an equation environment. To create the document - do: -
latex sampleEq - - - -
makeglossaries sampleEq -
latex sampleEq
-

-

-sampleEqPg.tex
This is similar to the previous example, but the number lists are a - mixture of page numbers and equation numbers. This example adds the - glossary to the table of contents, so an extra LATEX run is required: - -
latex sampleEqPg -
makeglossaries sampleEqPg -
latex sampleEqPg -
latex sampleEqPg
-

-

-sampleSec.tex
This document also illustrates how to change the location to - something other than the page number. In this case, the section counter is used. - This example adds the glossary to the table of contents, so an extra LATEX run - is required: -
latex sampleSec -
makeglossaries sampleSec -
latex sampleSec -
latex sampleSec
-

-

-sampleNtn.tex
This document illustrates how to create an additional glossary type. - This example adds the glossary to the table of contents, so an extra LATEX run - is required: -
latex sampleNtn -
makeglossaries sampleNtn -
latex sampleNtn -
latex sampleNtn
-

- Note that if you don’t have Perl installed, you will need to use makeindex twice - instead of a single call to makeglossaries: - - - -

    -
  1. Create the main glossary: -
    makeindex -s sampleNtn.ist -t sampleNtn.glg -o sampleNtn.gls - sampleNtn.glo
    -

    -

  2. -
  3. Create the secondary glossary: -
    makeindex -s sampleNtn.ist -t sampleNtn.nlg -o sampleNtn.not - sampleNtn.ntn
    -

    -

-
-sample.tex
This document illustrates some of the basics, including how to create - child entries that use the same name as the parent entry. This example adds the - glossary to the table of contents, so an extra LATEX run is required: - -
latex sample -
makeglossaries sample -
latex sample -
latex sample
-

- You can see the difference between word and letter ordering if you substitute - order=word with order=letter. (Note that this will only have an effect if you use - makeglossaries. If you use makeindex explicitly, you will need to use the -l - switch to indicate letter ordering.) -

-sampletree.tex
This document illustrates a hierarchical glossary structure where - child entries have different names to their corresponding parent entry. To create - the document do: -
latex sampletree -
makeglossaries sampletree -
latex sampletree
-

-

-samplexdy.tex
This document illustrates how to use the glossaries package with - xindy instead of makeindex. The document uses UTF8 encoding (with the - inputenc package). The encoding is picked up by makeglossaries. By default, this - document will create a xindy style file called samplexdy.xdy, but if you - uncomment the lines - - - -
- \setStyleFile{samplexdy-mc} -  
\noist -  
\GlsSetXdyLanguage{} -
-

it will set the style file to samplexdy-mc.xdy instead. This provides an additional - letter group for entries starting with “Mc” or “Mac”. If you use makeglossaries, - you don’t need to supply any additional information. If you don’t use - makeglossaries, you will need to specify the required information. Note that if - you set the style file to samplexdy-mc.xdy you must also specify \noist, - otherwise the glossaries package will overwrite samplexdy-mc.xdy and you will - lose the “Mc” letter group. -

To create the document do: -
latex samplexdy -
makeglossaries samplexdy -
latex samplexdy
-

- If you don’t have Perl installed, you will have to call xindy explicitly instead of - using makeglossaries. If you are using the default style file samplexdy.xdy, then - do (no line breaks): -
xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o - samplexdy.gls samplexdy.glo
-

- otherwise, if you are using samplexdy-mc.xdy, then do (no line breaks): - -
xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls - samplexdy.glo
-

-

-sampleutf8.tex
This is another example that uses xindy. Unlike makeindex, xindy - can cope with accented or non-Latin characters. This document uses UTF8 - encoding. To create the document do: -
latex sampleutf8 -
makeglossaries sampleutf8 -
latex sampleutf8
-

- If you don’t have Perl installed, you will have to call xindy explicitly instead of - using makeglossaries (no line breaks): - - - -
xindy -L english -C utf8 -I xindy -M sampleutf8 -t sampleutf8.glg -o - sampleutf8.gls sampleutf8.glo
-

-

If you remove the xindy option from sampleutf8.tex and do: -
latex sampleutf8 -
makeglossaries sampleutf8 -
latex sampleutf8
-

- you will see that the entries that start with a non-Latin character now appear in - the symbols group, and the word “manœuvre” is now after “manor” instead of - before it. If you are unable to use makeglossaries, the call to makeindex is as - follows (no line breaks): -
makeindex -s sampleutf8.ist -t sampleutf8.glg -o sampleutf8.gls - sampleutf8.glo
-

-

-sampleaccsupp.tex
This document uses the experimental glossaries-accsupp package. - The symbol is set to the replacement text. Note that some PDF viewers don’t use - the accessibility support. Information about the glossaries-accsupp package can be - found in §2.14 Accessibility Support. -
-

-

-

Top

1.2 Multi-Lingual Support

-

As from version 1.17, the glossaries package can now be used with xindy as well as -makeindex. If you are writing in a language that uses accented characters or non-Latin -characters it is recommended that you use xindy as makeindex is hard-coded for -Latin languages. This means that you are not restricted to the A, …, Z letter -groups. If you want to use xindy, remember to use the xindy package option. For -example: - - - -

-
-\documentclass[frenchb]{article} - 
\usepackage[utf8]{inputenc} - 
\usepackage[T1]{fontenc} - 
\usepackage{babel} - 
\usepackage[xindy]{glossaries} -
-

-

If you use an accented or other expandable character at the start of an entry name, -you must place it in a group, or it will cause a problem for commands that -convert the first letter to uppercase (e.g. \Gls) due to expansion issues. For -example: - - - -

-
-\newglossaryentry{elite}{name={{é}lite}, - 
description={select group or class}} -
-

-

-

If you use the inputenc package, makeglossaries will pick up the encoding from the -auxiliary file. If you use xindy explicitly instead of via makeglossaries, you may need -to specify the encoding using the -C option. Read the xindy manual for further -details. -

-

-

Top

1.2.1 Changing the Fixed Names
-

As from version 1.08, the glossaries package now has limited multi-lingual support, -thanks to all the people who have sent me the relevant translations either via email or -via comp.text.tex. However you must load babel or polyglossia before glossaries to -enable this. Note that if babel is loaded and the translator package is detected on TEX’s -path, then the translator package will be loaded automatically. However, it may not pick -up on the required languages so, if the predefined text is not translated, you may -need to explicitly load the translator package with the required languages. For -example: - - - -

-
-\usepackage[spanish]{babel} - 
\usepackage[spanish]{translator} - 
\usepackage{glossaries} -
-

Alternatively, specify the language as a class option rather than a package option. For -example: - - - -

-
-\documentclass[spanish]{report} - 
\usepackage{babel} - 
\usepackage{glossaries} -
-

-

If you want to use ngerman or german instead of babel, you will need to include the -translator package to provide the translations. For example: - - - -

-
-\documentclass[ngerman]{article} - 
\usepackage{ngerman} - 
\usepackage{translator} - 
\usepackage{glossaries} -
-

-

The languages are currently supported by the glossaries package are listed in -table 1. -

-
- - - -


- - - -
Table 1: Supported Languages
-
-

-

-
- - - - - - - - - - -
Language As from version
Brazilian Portuguese 1.17
Danish 1.08
Dutch 1.08
English 1.08
French 1.08
German 1.08
Irish 1.08
Italian 1.08
Hungarian 1.08
Polish 1.13
Serbian 2.06
Spanish 1.08
-
- - - -

-
-

The language dependent commands and translator keys used by the glossaries -package are listed in table 2. -

-
- - - -


- - - -
Table 2: Customised Text
-
-

-

-
- - - - - - - - -
Command Name Translator Key Word

Purpose

\glossaryname Glossary

Title of the main glossary.

\acronymname Acronyms

Title of the list of acronyms -(when used with package option -acronym).

\entryname Notation (glossaries)

Header for first column in the -glossary (for 2, 3 or 4 column -glossaries that support headers).

\descriptionname Description (glossaries)

Header for second column in the -glossary (for 2, 3 or 4 column -glossaries that support headers).

\symbolname Symbol (glossaries)

Header for symbol column in the -glossary for glossary styles that -support this option.

\pagelistname Page List (glossaries)

Header for page list column in -the glossary for glossaries that -support this option.

\glssymbolsgroupnameSymbols (glossaries)

Header for symbols section of the -glossary for glossary styles that -support this option.

\glsnumbersgroupnameNumbers (glossaries)

Header for numbers section of -the glossary for glossary styles -that support this option.

- - - -

-
-

Due to the varied nature of glossaries, it’s likely that the predefined translations -may not be appropriate. If you are using the babel package and do not have the -translator package installed, you need to be familiar with the advice given in -changing the words babel uses. If you have the translator package installed, -then you can provide your own dictionary with the necessary modifications -(using \deftranslation) and load it using \usedictionary. Note that the -dictionaries are loaded at the beginning of the document, so it won’t have -any effect if you put \deftranslation in the preamble. It should be put in -your personal dictionary instead. See the translator documentation for further -details. -

If you are using babel and don’t want to use the translator interface, you can -suppress it using the package option translate=false, and either load glossaries-babel -after glossaries or specify you’re own translations. For example: - - - -

-
-\documentclass[british]{article} - 
\usepackage{babel} - 
\usepackage[translate=false]{glossaries} - 
\usepackage{glossaries-babel} -
-

or: - - - -

-
-\documentclass[british]{article} - 
\usepackage{babel} - 
\usepackage[translate=false]{glossaries} - 
\addto\captionsbritish{% - 
    \renewcommand*{\glossaryname}{List of Terms}% - 
    \renewcommand*{\acronymname}{List of Acronyms}% - 
    \renewcommand*{\entryname}{Notation}% - 
    \renewcommand*{\descriptionname}{Description}% - 
    \renewcommand*{\symbolname}{Symbol}% - 
    \renewcommand*{\pagelistname}{Page List}% - 
    \renewcommand*{\glssymbolsgroupname}{Symbols}% - 
    \renewcommand*{\glsnumbersgroupname}{Numbers}% - 
} -
-

-

If you are using polyglossia instead of babel, glossaries-polyglossia will automatically -be loaded unless you specify the package option translate=false. -

Note that xindy provides much better multi-lingual support than makeindex, so it’s -recommended that you use xindy if you have glossary entries that contain diacritics or -non-Roman letters. See §2.8.2 Xindy for further details. -

-

Top

1.3 Generating the Associated Glossary Files

-

In order to generate a sorted glossary with compact location lists, it is necessary to use -an external indexing application as an intermediate step. It is this application that -creates the file containing the code that typesets the glossary. If this step is omitted, the -glossaries will not appear in your document. The two indexing applications that are -most commonly used with LATEX are makeindex and xindy. As from version 1.17, -the glossaries package can be used with either of these applications. Previous versions -were designed to be used with makeindex only. Note that xindy has much better -multi-lingual support than makeindex, so xindy is recommended if you’re not writing -in English. Commands that only have an effect when xindy is used are described in -§2.8.2 Xindy. -

The glossaries package comes with the Perl script makeglossaries which will run -makeindex or xindy on all the glossary files using a customized style file (which is -created by \makeglossaries). See §1.3.1 Using the makeglossaries Perl Script for -further details. Perl is stable, cross-platform, open source software that is used by -a number of TEX-related applications. Further information is available at -http://www.perl.org/about.html. However, whilst it is strongly recommended that - - - -you use the makeglossaries script, it is possible to use the glossaries package without -having Perl installed. In which case, if you have used the xindy package option, you will -need to use xindy (see §1.3.2 Using xindy explicitly), otherwise you will need to use -makeindex (see §1.3.3 Using makeindex explicitly). Note that some commands and -package options have no effect if you don’t use makeglossaries. These are listed in -table 3. -

Note that if any of your entries use an entry that is not referenced outside the -glossary, you will need to do an additional makeglossaries, makeindex or -xindy run, as appropriate. For example, suppose you have defined the following -entries: - - - -

-
-\newglossaryentry{citrusfruit}{name={citrus fruit}, - 
description={fruit of any citrus tree. (See also - 
\gls{orange})}} - 
\newglossaryentry{orange}{name={orange}, - 
description={an orange coloured fruit.}} -
-

and suppose you have \gls{citrusfruit} in your document but don’t reference the -orange entry, then the orange entry won’t appear in your glossary until you first -create the glossary and then do another run of makeglossaries, makeindex or -xindy. For example, if the document is called myDoc.tex, then you must do: - -
latex myDoc -
makeglossaries myDoc -
latex myDoc -
makeglossaries myDoc -
latex myDoc
-

-

Likewise, an additional makeglossaries and LATEX run may be required if the -document pages shift with re-runs. For example, if the page numbering is not reset after -the table of contents, the insertion of the table of contents on the second LATEX run -may push glossary entries across page boundaries, which means that the number lists in -the glossary may need updating. -

The examples in this document assume that you are accessing makeglossaries, xindy -or makeindex via a terminal. Windows users can use the MSDOS Prompt which is -usually accessed via the Start->All Programs menu or Start->All Programs->Accessories -menu. -

Alternatively, your text editor may have the facility to create a function that will -call the required application. The article “Glossaries, Nomenclature, List of Symbols -and Acronyms” in the LATEX Community’s Know How section describes how to -do this for TeXnicCenter, and the thread “Executing Glossaries’ makeindex -from a WinEdt macro” on the comp.text.tex newsgroup describes how to -do it for WinEdt. For other editors see the editor’s user manual for further -details. -

If any problems occur, remember to check the transcript files (e.g. .glg or .alg) for -messages. -

-
- - - -


- - - -
Table 3: Commands and package options that have no effect when using xindy -or makeindex explicitly
-
- - - - -
Command or Package Option makeindexxindy
order=letter use -l use -M ord/letorder
order=word default default
xindy={language=lang,codename=code}N/A use -L lang-C code
\GlsSetXdyLanguage{lang} N/A use -L lang
\GlsSetXdyCodePage{code} N/A use -C code
-
- - - -

-
-

Top

1.3.1 Using the makeglossaries Perl Script
-

The makeglossaries script picks up the relevant information from the auxiliary (.aux) -file and will either call xindy or makeindex, depending on the supplied information. -Therefore, you only need to pass the document’s name without the extension to -makeglossaries. For example, if your document is called myDoc.tex, type the -following in your terminal: -
latex myDoc -
makeglossaries myDoc -
latex myDoc
-

-You may need to explicitly load makeglossaries into Perl: -
perl makeglossaries myDoc
-

-There is a batch file called makeglossaries.bat which does this for Windows users, -but you must have Perl installed to be able to use it. -

The makeglossaries script contains POD (Plain Old Documentation). If you want, -you can create a man page for makeglossaries using pod2man and move the resulting -file onto the man path. -

-

-

Top

1.3.2 Using xindy explicitly
-

If you want to use xindy to process the glossary files, you must make sure you have -used the xindy package option: - - - -

-
-\usepackage[xindy]{glossaries} -
-

This is required regardless of whether you use xindy explicitly or whether it’s called -implicitly via makeglossaries. This causes the glossary entries to be written in raw -xindy format, so you need to use -I xindy not -I tex. -

To run xindy type the following in your terminal (all on one line): -
xindy -L language-C encoding-I xindy -M style-t base.glg -o -base.gls base.glo
-

-where languageis the required language name, encodingis the encoding, baseis -the name of the document without the .tex extension and styleis the name of -the xindy style file without the .xdy extension. The default name for this -style file is base.xdy but can be changed via \setStyleFile{style}. You -may need to specify the full path name depending on the current working -directory. If any of the file names contain spaces, you must delimit them using -double-quotes. -

For example, if your document is called myDoc.tex and you are using UTF8 -encoding in English, then type the following in your terminal: -
xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.glg -o myDoc.gls -myDoc.glo
-

-

Note that this just creates the main glossary. You need to do the same for each of -the other glossaries (including the list of acronyms if you have used the acronym -package option), substituting .glg, .gls and .glo with the relevant extensions. For -example, if you have used the acronym package option, then you would need to do: - -
xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.alg -o myDoc.acr -myDoc.acn
-

-For additional glossaries, the extensions are those supplied when you created the -glossary with \newglossary. -

Note that if you use makeglossaries instead, you can replace all those calls to -xindy with just one call to makeglossaries: -
makeglossaries myDoc
-

-Note also that some commands and package options have no effect if you use xindy -explicitly instead of using makeglossaries. These are listed in table 3. -

- - - -

-

Top

1.3.3 Using makeindex explicitly
-

If you want to use makeindex explicitly, you must make sure that you haven’t used the -xindy package option or the glossary entries will be written in the wrong format. To run -makeindex, type the following in your terminal: -
makeindex -s style.ist -t base.glg -o base.gls base.glo
-

-where baseis the name of your document without the .tex extension and -style.ist is the name of the makeindex style file. By default, this is base.ist, -but may be changed via \setStyleFile{style}. Note that there are other -options, such as -l (letter ordering). See the makeindex manual for further -details. -

For example, if your document is called myDoc.tex, then type the following at the -terminal: -
makeindex -s myDoc.ist -t myDoc.glg -o myDoc.gls myDoc.glo
-

-Note that this only creates the main glossary. If you have additional glossaries (for -example, if you have used the acronym package option) then you must call makeindex -for each glossary, substituting .glg, .gls and .glo with the relevant extensions. For -example, if you have used the acronym package option, then you need to type the -following in your terminal: -
makeindex -s myDoc.ist -t myDoc.alg -o myDoc.acr myDoc.acn
-

-For additional glossaries, the extensions are those supplied when you created the -glossary with \newglossary. -

Note that if you use makeglossaries instead, you can replace all those calls to -makeindex with just one call to makeglossaries: -
makeglossaries myDoc
-

-Note also that some commands and package options have no effect if you use -makeindex explicitly instead of using makeglossaries. These are listed in -table 3. -

-

-

Top

1.3.4 Note to Front-End and Script Developers
-

The information needed to determine whether to use xindy or makeindex and the -information needed to call those applications is stored in the auxiliary file. This -information can be gathered by a front-end, editor or script to make the glossaries -where appropriate. This section describes how the information is stored in the auxiliary -file. -

The file extensions used by each defined glossary are given by -


\@newglossary  \@newglossary{label}{log}{out-ext}{in-ext}

-

- - - -where in-extis the extension of the indexing application’s input file (the output file -from the glossaries package’s point of view), out-extis the extension of the indexing -application’s output file (the input file from the glossaries package’s point of view) and -logis the extension of the indexing application’s transcript file. The label for the -glossary is also given for information purposes only, but is not required by the indexing -applications. For example, the information for the main glossary is written -as: - - - -

-
-\@newglossary{main}{glg}{gls}{glo} -
-

-

The indexing application’s style file is specified by -


\@istfilename  \@istfilename{filename}

-

-The file extension indicates whether to use makeindex (.ist) or xindy (.xdy). Note -that the glossary information is formatted differently depending on which -indexing application is supposed to be used, so it’s important to call the correct -one. -

Word or letter ordering is specified by: -


\@glsorder  \@glsorder{order}

-

-where ordercan be either word or letter. -

If xindy should be used, the language and code page for each glossary is specified -by -


\@xdylanguage \@gls@codepage  \@xdylanguage{label}{language}
\@gls@codepage{label}{code}

-

-where labelidentifies the glossary, languageis the root language (e.g. english) and -codeis the encoding (e.g. utf8). These commands are omitted if makeindex should -be used. -

-

-

Top

1.4 Troubleshooting

-

The glossaries package comes with a minimal file called minimalgls.tex which can be -used for testing. This should be located in the samples subdirectory (folder) of the -glossaries documentation directory. The location varies according to your operating -system and TEX installation. For example, on my Linux partition it can be -found in /usr/local/texlive/2008/texmf-dist/doc/latex/glossaries/. -Further information on debugging LATEX code is available at -http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/. -

Below is a list of the most frequently asked questions. For other queries, consult the glossaries -FAQ at http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html. -

-

    -
  1. Q. I get the error message: - - - -
    - Missing \begin{document} -
    -

    -

    A. Check you are using an up to date version of the xkeyval package. -

  2. -
  3. Q. I’ve used the smallcaps option, but the acronyms are displayed in normal sized - upper case letters. -

    A. The smallcaps package option uses \textsc to typeset the acronyms. This - command converts lower case letters to small capitals, while upper case letters - remain their usual size. Therefore you need to specify the acronym in lower case - letters. -

  4. -
  5. Q. My acronyms won’t break across a line when they’re expanded. -

    A. PDFLATEX can break hyperlinks across a line, but LATEX can’t. If you - can’t use PDFLATEX then disable the first use links using the package option - hyperfirst=false. -

  6. -
  7. Q. How do I change the font that the acronyms are displayed in? -

    A. The easiest way to do this is to specify the smaller package option and redefine - \acronymfont to use the required typesetting command. For example, suppose - you would like the acronyms displayed in a sans-serif font, then you can - do: - - - -

    -
    - \usepackage[smaller]{glossaries} -  
    \renewcommand*{\acronymfont}[1]{\textsf{#1}} -
    -

    -

  8. -
  9. Q. How do I change the font that the acronyms are displayed in on first - use? -

    A. The easiest way to do this is to specify the smaller package option and redefine - \firstacronymfont to use the required command. Note that if you don’t want - the acronym on subsequent use to use \textsmaller, you will also need to - redefine \acronymfont, as above. For example to make the acronym emphasized - on first use, but use the surrounding font for subsequent use, you can - do: - - - -

    -
    - \usepackage[smaller]{glossaries} -  
    \renewcommand*{\firstacronymfont}[1]{\emph{#1}} -  
    \renewcommand*{\acronymfont}[1]{#1} -
    -

    -

  10. -
  11. Q. I don’t have Perl installed, do I have to use makeglossaries? -

    A. Although it is strongly recommended that you use makeglossaries, you don’t - have to use it. For further details, read §1.3.2 Using xindy explicitly or §1.3.3 - Using makeindex explicitly, depending on whether you want to use xindy or - makeindex. -

  12. -
  13. Q. I’m used to using the glossary package: are there any instructions on migrating - from the glossary package to the glossaries package? -

    A. Read “Upgrading from the glossary package to the glossaries package” which - should be available from the same location as this document. -

  14. -
  15. Q. I’m using babel but the fixed names haven’t been translated. -

    A. The glossaries package currently only supports the following languages: - Brazilian Portuguese, Danish, Dutch, English, French, German, Irish, Italian, - Hungarian, Polish, Serbian and Spanish. If you want to add another language, - send me the translations, and I’ll add them to the next version. -

    If you are using one of the above languages, but the text hasn’t been translated, - try adding the translator package with the required languages explicitly (before - you load the glossaries package). For example: - - - -

    -
    - \usepackage[ngerman]{babel} -  
    \usepackage[ngerman]{translator} -  
    \usepackage{glossaries} -
    -

    Alternatively, you can add the language as a global option to the class file. Check - the translator package documentation for further details. -

  16. -
  17. Q. My acronyms contain strange characters when I use commands like - \acrlong. -

    A. Switch off the sanitization: - - - -

    -
    - \usepackage[sanitize=none]{glossaries} -
    -

    and protect fragile commands. -

  18. -
  19. Q. My glossaries haven’t appeared. -

    A. Remember to do the following:

    - -

    Check the log files (.log, .glg etc) for any warnings. -

  20. -
  21. Q. It is possible to change the rules used to sort the glossary entries? -

    A. If it’s for an individual entry, then you can use the entry’s sort key to sort it - according to a different term. If it’s for the entire alphabet, then you will - need to use xindy (instead of makeindex) and use an appropriate xindy - language module. Writing xindy modules or styles is beyond the scope - of this manual. Further information about xindy can be found at the - Xindy Web Site. There is also a link to the xindy mailing list from that - site. -

    -
- - - -

-

-

Top

2 Overview of Main User Commands

- -

This section is an overview of the main user commands and package options. If you find -this too complicated, try starting out with the guide for beginners. -

-

-

Top

2.1 Package Options

-

The glossaries package options are as follows: -

-nowarn
This suppresses all warnings generated by the glossaries package. -
-nomain
This suppresses the creation of the main glossary. Note that if you use - this option, you must create another glossary in which to put all your entries - (either via the acronym package option described below or via \newglossary - described in §2.9 Defining New Glossaries). -
-toc
Add the glossaries to the table of contents. Note that an extra LATEX run is - required with this option. Alternatively, you can switch this function on and off - using -


\glstoctrue  \glstoctrue

-

- and -


\glstocfalse  \glstocfalse

-

-

-numberline
When used with toc, this will add \numberline{} in the final - argument of \addcontentsline. This will align the table of contents - entry with the numbered section titles. Note that this option has no - effect if the toc option is omitted. If toc is used without numberline, the - title will be aligned with the section numbers rather than the section - titles. -
-acronym
This creates a new glossary with the label acronym. This is equivalent - to: - - - -
- \newglossary[alg]{acronym}{acr}{acn}{\acronymname} -
-

If the acronym package option is used, \acronymtype is set to acronym otherwise it is set - to main.2 - Entries that are defined using \newacronym are placed in the glossary whose - label is given by \acronymtype, unless another glossary is explicitly - specified. -

-acronymlists
By default, only the acronym glossary is considered to be a list of - acronyms. If you have other lists of acronyms, you can specify them - as a comma-separated list in the value of acronymlists. For example, if - you want the main glossary to also contain a list of acronyms, you can - do: - - - -
- \usepackage[acronym,acronymlists={main}]{glossaries} -
-

No check is performed to determine if the listed glossaries exist, so you can add - glossaries you haven’t defined yet. For example: - - - -

-
- \usepackage[acronym,acronymlists={main,acronym2}]{glossaries} -  
\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms} -
-

-

-section
This is a key=valueoption. Its value should be the name of a sectional unit - (e.g. chapter). This will make the glossaries appear in the named sectional - unit, otherwise each glossary will appear in a chapter, if chapters exist, - otherwise in a section. Unnumbered sectional units will be used by default. - Example: - - - -
- \usepackage[section=subsection]{glossaries} -
-

You can omit the value if you want to use sections, i.e.  - - - -

-
- \usepackage[section]{glossaries} -
-

is equivalent to - - - -

-
- \usepackage[section=section]{glossaries} -
-

You can change this value later in the document using -


\setglossarysection  \setglossarysection{name}

-

- where nameis the sectional unit. -

The start of each glossary adds information to the page header via -


\glossarymark  \glossarymark{glossary title}

-

- This defaults to \@mkboth, but you may need to redefine it. For example, to only - change the right header: - - - -

-
- \renewcommand{\glossarymark}[1]{\markright{#1}} -
-

or to prevent it from changing the headers: - - - -

-
- \renewcommand{\glossarymark}[1]{} -
-

-

Occasionally you may find that another package defines \cleardoublepage when - it is not required. This may cause an unwanted blank page to appear before each - glossary. This can be fixed by redefining \glsclearpage: - - - -

-
- \renewcommand*{\glsclearpage}{\clearpage} -
-

-

-numberedsection
The glossaries are placed in unnumbered sectional units by - default, but this can be changed using numberedsection. This option - can take three possible values: false (no number, i.e. use starred form), - nolabel (numbered, i.e. unstarred form, but not labelled) and autolabel - (numbered with automatic labelling). If numberedsection=autolabel is used, - each glossary is given a label that matches the glossary type, so the - main (default) glossary is labelled main, the list of acronyms is labelled - acronym3 - and additional glossaries are labelled using the value specified in the first - mandatory argument to \newglossary. For example, if you load glossaries - using: - - - -
- \usepackage[section,numberedsection=autolabel]{glossaries} -
-

then each glossary will appear in a numbered section, and can be referenced using - something like: - - - -

-
- The main glossary is in section~\ref{main} and the list of -  
acronyms is in section~\ref{acronym}. -
-

If you can’t decide whether to have the acronyms in the main glossary or a - separate list of acronyms, you can use \acronymtype which is set to main if the - acronym option is not used and is set to acronym if the acronym option is used. - For example: - - - -

-
- The list of acronyms is in section~\ref{\acronymtype}. -
-

-

As from version 1.14, you can add a prefix to the label by redefining -


\glsautoprefix  \glsautoprefix

-

- For example: - - - -

-
- \renewcommand*{\glsautoprefix}{glo:} -
-

will add glo: to the automatically generated label, so you can then, for example, - refer to the list of acronyms as follows: - - - -

-
- The list of acronyms is in section~\ref{glo:\acronymtype}. -
-

Or, if you are undecided on a prefix: - - - -

-
- The list of acronyms is in section~\ref{\glsautoprefix\acronymtype}. -
-

-

-style
This is a key=valueoption. Its value should be the name of the glossary style - to use. Predefined glossary styles are listed in §2.12 Glossary Styles. -
-nolong
This prevents the glossaries package from automatically loading glossary-long - (which means that the longtable package also won’t be loaded). This reduces - overhead by not defining unwanted styles and commands. Note that if you use - this option, you won’t be able to use any of the glossary styles defined in the - glossary-long package. -
-nosuper
This prevents the glossaries package from automatically loading glossary-super - (which means that the supertabular package also won’t be loaded). This reduces - overhead by not defining unwanted styles and commands. Note that if you use - this option, you won’t be able to use any of the glossary styles defined in the - glossary-super package. -
-nolist
This prevents the glossaries package from automatically loading glossary-list. - This reduces overhead by not defining unwanted styles. Note that if - you use this option, you won’t be able to use any of the glossary styles - defined in the glossary-list package. Note that since the default style is list, - you will also need to use the style option to set the style to something - else. -
-notree
This prevents the glossaries package from automatically loading glossary-tree. - This reduces overhead by not defining unwanted styles. Note that if you use this - option, you won’t be able to use any of the glossary styles defined in the - glossary-tree package. -
-nostyles
This prevents all the predefined styles from being loaded. This option is - provided in the event that the user has custom styles that are not dependent on - the styles provided by the glossaries package. Note that if you use this - option, you can’t use the style package option. Instead you must either use - \glossarystyle{style} or the style key in the optional argument to - \printglossary. - - - -
-nonumberlist
This option will suppress the associated number lists in the glossaries - (see also §2.3 Number lists). -
-counter
This is a key=valueoption. The value should be the name of the default - counter to use in the number lists. -

-

-sanitize
This is a key=valueoption whose value is also a key=valuelist. By - default, the glossaries package sanitizes the values of the name, description and - symbol keys used when defining a new glossary entry. This means that you can use - fragile commands in those keys, but it may lead to unexpected results if you try - to display these values within the document text. This sanitization can be - switched off using the sanitize package option. For example, to switch off the - sanitization for the description and name keys, but not for the symbol key, - do: - - - -
- \usepackage[sanitize={name=false,description=false,% -  
symbol=true}]{glossaries} -
-

You can use sanitize=none as a shortcut for
sanitize={name=false,description=false,symbol=false}. -

Note: this sanitization only applies to the name, description and symbol keys. It - doesn’t apply to any of the other keys (except the sort key which is always - sanitized) so fragile commands contained in the value of the other keys must - always be protected using \protect. Since the value of the text key is obtained - from the name key, you will still need to protect fragile commands in the name key - if you don’t use the text key.
-

-

-description
This option changes the definition of \newacronym to allow a description. - See §2.10 Acronyms for further details. -
-footnote
This option changes the definition of \newacronym and the way that - acronyms are displayed. See §2.10 Acronyms for further details. -
-smallcaps
This option changes the definition of \newacronym and the way that - acronyms are displayed. See §2.10 Acronyms for further details. -
-smaller
This option changes the definition of \newacronym and the way that acronyms - are displayed. If you use this option, you will need to include the relsize package or - otherwise define \textsmaller or redefine \acronymfont. See §2.10 Acronyms for - further details. -
-dua
This option changes the definition of \newacronym so that acronyms are always - expanded. See §2.10 Acronyms for further details. -
-shortcuts
This option provides shortcut commands for acronyms. See §2.10 Acronyms - for further details. -
-makeindex
(Default) The glossary information and indexing style file will be written in - makeindex format. If you use makeglossaries, it will automatically detect that it - - - - needs to call makeindex. If you don’t use makeglossaries, you need to remember - to use makeindex not xindy. The indexing style file will been given a .ist - extension. -
-xindy
The glossary information and indexing style file will be written in xindy format. - If you use makeglossaries, it will automatically detect that it needs to call - xindy. If you don’t use makeglossaries, you need to remember to use - xindy not makeindex. The indexing style file will been given a .xdy - extension. -

The xindy package option may additionally have a value that is a key=value - comma-separated list to override the language and codepage. For example: - - - -

-
- \usepackage[xindy={language=english,codepage=utf8}]{glossaries} -
-

You can also specify whether you want a number group in the glossary. This - defaults to true, but can be suppressed. For example: - - - -

-
- \usepackage[xindy={glsnumbers=false}]{glossaries} -
-

See §2.8.2 Xindy for further details on using xindy with the glossaries - package. -

-order
This may take two values: word or letter. The default is word ordering. Note that - this option has no effect if you don’t use makeglossaries. -
-translate
This is a boolean option. The default is true if babel, polyglossia or translator - have been loaded, otherwise the default value is false. -

-

- translate=true
If babel has been loaded and the translator package is - installed, translator will be loaded and the translations will be provided - by the translator package interface. You can modify the translations by - providing your own dictionary. If the translator package isn’t installed - and babel is loaded, the glossaries-babel package will be loaded and the - translations will be provided using babel’s \addto\captionlanguage - mechanism. If polyglossia has been loaded, glossaries-polyglossia will be - loaded. -
- translate=false
Don’t provide translations, even if babel or polyglossia has - been loaded. You can then provide you’re own translations or explicitly - load glossaries-babel or glossaries-polyglossia.
-

See §1.2.1 Changing the Fixed Names for further details. -

-hyperfirst
This is a boolean option that specifies whether each term has a hyperlink on - first use. The default is hyperfirst=true (terms on first use have a hyperlink, - unless explicitly suppressed using starred versions of commands such as - \gls*). -
- - - -

-

-

Top

2.2 Defining Glossary Entries

-

All glossary entries must be defined before they are used, so it is better to define them in the preamble -to ensure this.4 -However only those entries that occur in the document (using any of the commands -described in §2.4 Links to Glossary Entries, §2.5 Adding an Entry to the Glossary -Without Generating Text or §2.6 Cross-Referencing Entries) will appear in the glossary. -Each time an entry is used in this way, a line is added to an associated glossary file -(.glo), which then needs to be converted into a corresponding .gls file which contains -the typeset glossary which is input by \printglossary or \printglossaries. The Perl -script makeglossaries can be used to call makeindex or xindy, using a customised -indexing style file, for each of the glossaries that are defined in the document. Note -that there should be no need for you to explicitly edit or input any of these -external files. See §1.3 Generating the Associated Glossary Files for further -details. -

The command -


\makeglossaries  \makeglossaries

-

-must be placed in the preamble in order to create the customised makeindex (.ist) or -xindy (.xdy) style file and to ensure that glossary entries are written to the -appropriate output files. If you omit \makeglossaries none of the glossaries will be -created. -

Note that some of the commands provided by the glossaries package must be placed -before \makeglossaries as they are required when creating the customised style file. If -you attempt to use those commands after \makeglossaries you will generate an error. -
-

-

You can suppress the creation of the customised xindy or makeindex style file -using -


\noist  \noist

-

-Note that this command must be used before \makeglossaries. -

The default name for the customised style file is given by \jobname.ist -(for makeindex) or \jobname.xdy (for xindy). This name may be changed -using: -


\setStyleFile  \setStyleFile{name}

-

-where nameis the name of the style file without the extension. Note that this -command must be used before \makeglossaries. -

Each glossary entry is assigned a number list that lists all the locations in the -document where that entry was used. By default, the location refers to the page number -but this may be overridden using the counter package option. The default form of -the location number assumes a full stop compositor (e.g. 1.2), but if your -location numbers use a different compositor (e.g. 1-2) you need to set this - - - -using -


\glsSetCompositor  \glsSetCompositor{symbol}

-

-For example: - - - -

-
-\glsSetCompositor{-} -
-

Note that this command must be used before \makeglossaries. -

If you use xindy, you can have a different compositor for page numbers starting -with an uppercase alphabetical character using: -


\glsSetAlphaCompositor  \glsSetAlphaCompositor{symbol}

-

-Note that this command has no effect if you haven’t used the xindy package option. For -example, if you want number lists containing a mixture of A-1 and 2.3 style formats, -then do: - - - -

-
-\glsSetCompositor{.} \glsSetAlphaCompositor{-} -
-

See §2.3 Number lists for further information about number lists. -

New glossary entries are defined using the command: -


\newglossaryentry  \newglossaryentry{label}{key-val list}

-

-The first argument, label, must be a unique label with which to identify this entry. -The second argument, key-val list, is a key=valuelist that supplies the relevant -information about this entry. There are two required fields: description and either name -or parent. Available fields are listed below: -

-

-name
The name of the entry (as it will appear in the glossary). If this key is - omitted and the parent key is supplied, this value will be the same as the - parent’s name. -
-description
A brief description of this term (to appear in the glossary). Within this - value, you can use -


\nopostdesc  \nopostdesc

-

- to suppress the description terminator for this entry. For example, if this - entry is a parent entry that doesn’t require a description, you can do - description={\nopostdesc}. If you want a paragraph break in the description - use -


\glspar  \glspar

-

- However, note that not all glossary styles support multi-line descriptions. If you - are using one of the tabular-like glossary styles that permit multi-line - descriptions, use \newline not \\ if you want to force a line break. -

-parent
The label of the parent entry. Note that the parent entry must be defined before - its sub-entries. See §2.2.2 Sub-Entries for further details. -
-descriptionplural
The plural form of the description (as passed to \glsdisplay and - \glsdisplayfirst by \glspl, \Glspl and \GLSpl). If omitted, the value is set to - the same as the description key. - - - -
-text
How this entry will appear in the document text when using \gls (or one of its - uppercase variants). If this field is omitted, the value of the name key is - used. -
-first
How the entry will appear in the document text the first time it is used with - \gls (or one of its uppercase variants). If this field is omitted, the value of the - text key is used. -
-plural
How the entry will appear in the document text when using \glspl (or one of its - uppercase variants). If this field is omitted, the value is obtained by appending - \glspluralsuffix to the value of the text field. The default value of - \glspluralsuffix is the letter “s”. -
-firstplural
How the entry will appear in the document text the first time it is used with - \glspl (or one of its uppercase variants). If this field is omitted, the - value is obtained from the plural key, if the first key is omitted, or by - appending \glspluralsuffix to the value of the first field, if the first field is - present. -

Note: prior to version 1.13, the default value of firstplural was always taken by - appending “s” to the first key, which meant that you had to specify both plural and - firstplural, even if you hadn’t used the first key. -

-symbol
This field is provided to allow the user to specify an associated symbol. If - omitted, the value is set to \relax. Note that not all glossary styles display the - symbol. -
-symbolplural
This is the plural form of the symbol (as passed to \glsdisplay and - \glsdisplayfirst by \glspl, \Glspl and \GLSpl). If omitted, the value is set to - the same as the symbol key. -
-sort
This value indicates how makeindex or xindy should sort this entry. If omitted, - the value is given by the name field. -
-type
This specifies the label of the glossary in which this entry belongs. If omitted, the - default glossary is assumed. The list of acronyms type is given by \acronymtype - which will either be main or acronym, depending on whether the acronym package - option was used. -
-user1, …, user6
Six additional keys provided for any additional information the user - - - - may want to specify. (For example, an associated dimension or an alternative - plural.) -
-nonumberlist
Suppress the number list for this entry. -
-see
Cross-reference another entry. Using the see key will automatically add this entry - to the glossary, but will not automatically add the cross-referenced entry. The - referenced entry should be supplied as the value to this key. If you want to - override the “see” tag, you can supply the new tag in square brackets before the - label. For example see=[see also]{anotherlabel}. For further details, see §2.6 - Cross-Referencing Entries. -
-

Note that if the name starts with an accented letter or non-Latin character, you must -group the accented letter, otherwise it will cause a problem for commands like \Gls and -\Glspl. For example: - - - -

-
-\newglossaryentry{elite}{name={{\’e}lite}, - 
description={select group or class}} -
-

Note that the same applies if you are using the inputenc package: - - - -

-
-\newglossaryentry{elite}{name={{é}lite}, - 
description={select group or class}} -
-

Note that in both of the above examples, you will also need to supply the sort key if -you are using makeindex whereas xindy is usually able to sort accented letters -correctly. -

-

-

Top

2.2.1 Plurals
-

You may have noticed from above that you can specify the plural form when you define -a term. If you omit this, the plural will be obtained by appending -


\glspluralsuffix  \glspluralsuffix

-

-to the singular form. This command defaults to the letter “s”. For example: - - - -

-
-\newglossaryentry{cow}{name=cow,description={a fully grown - 
female of any bovine animal}} -
-

defines a new entry whose singular form is “cow” and plural form is “cows”. However, if -you are writing in archaic English, you may want to use “kine” as the plural form, in -which case you would have to do: - - - -

-
-\newglossaryentry{cow}{name=cow,plural=kine, - 
description={a fully grown female of any bovine animal}} -
-

-

If you are writing in a language that supports multiple plurals (for a given term) -then use the plural key for one of them and one of the user keys to specify the other -plural form. For example: - - - -

-
-\newglossaryentry{cow}{name=cow,description={a fully grown - 
female of any bovine animal (plural cows, archaic plural kine)}, - 
user1={kine}} -
-

You can then use \glspl{cow} to produce “cows” and \glsuseri{cow} to -produce “kine”. You can, of course, define an easy to remember synonym. For -example: - - - -

-
-\let\glsaltpl\glsuseri -
-

Then you don’t have to remember which key you used to store the alternative -plural. -

If you are using a language that usually forms plurals by appending a different -letter, or sequence of letters, you can redefine \glspluralsuffix as required. However, -this must be done before the entries are defined. For languages that don’t form plurals -by simply appending a suffix, all the plural forms must be specified using the plural key -(and the firstplural key where necessary). -

-

-

Top

2.2.2 Sub-Entries
-

As from version 1.17, it is possible to specify sub-entries. These may be used to order -the glossary into categories, in which case the sub-entry will have a different name to its -parent entry, or it may be used to distinguish different definitions for the same word, -in which case the sub-entries will have the same name as the parent entry. -Note that not all glossary styles support hierarchical entries and may display -all the entries in a flat format. Of the styles that support sub-entries, some -display the sub-entry’s name whilst others don’t. Therefore you need to ensure -that you use a suitable style. See §2.12 Glossary Styles for a list of predefined -styles. -

Note that the parent entry will automatically be added to the glossary if any of its -child entries are used in the document. If the parent entry is not referenced in the -document, it will not have a number list. -

-

Top -

Hierarchical Categories - To arrange a glossary with hierarchical categories, you need to first define the -category and then define the sub-entries using the relevant category entry as the value -of the parent key. For example, suppose I want a glossary of mathematical symbols that -are divided into Greek letters and Roman letters. Then I can define the categories as -follows: - - - -

-
-\newglossaryentry{greekletter}{name={Greek letters}, - 
description={\nopostdesc}} - 
\newglossaryentry{romanletter}{name={Roman letters}, - 
description={\nopostdesc}} -
-

-

Note that in this example, the category entries don’t need a description so I have set -the descriptions to \nopostdesc. This gives a blank description and suppresses the -description terminator. -

I can now define my sub-entries as follows: - - - -

-
-\newglossaryentry{pi}{name={pi}, - 
description={ratio of the circumference of a circle to the diameter}, - 
parent=greekletter} - 
\newglossaryentry{C}{name=C, - 
description={Euler’s constant}, - 
parent=romanletter} -
-

-

-

Top -

Homographs - Sub-entries that have the same name as the parent entry, don’t need to have the -name key. For example, the word “glossary” can mean a list of technical words or a -collection of glosses. In both cases the plural is “glossaries”. So first define the parent -entry: - - - -

-
-\newglossaryentry{glossary}{name=glossary, - 
description={\nopostdesc}, - 
plural={glossaries}} -
-

Again, the parent entry has no description, so the description terminator needs to be -suppressed using \nopostdesc. -

Now define the two different meanings of the word: - - - -

-
-\newglossaryentry{glossarylist}{ - 
description={1) list of technical words}, - 
sort={1}, - 
parent={glossary}} - 
\newglossaryentry{glossarycol}{ - 
description={2) collection of glosses}, - 
sort={2}, - 
parent={glossary}} -
-

Note that if I reference the parent entry, the location will be added to the parent’s -number list, whereas if I reference any of the child entries, the location will be added to -the child entry’s number list. Note also that since the sub-entries have the same name, -the sort key is required. -

In the above example, the plural form for both of the child entries is the same as the -parent entry, so the plural key was not required for the child entries. However, -if the sub-entries have different plurals, they will need to be specified. For -example: - - - -

-
-\newglossaryentry{bravo}{name={bravo}, - 
description={\nopostdesc}} - 
\newglossaryentry{bravocry}{description={1) cry of approval (pl.\ bravos)}, - 
sort={1}, - 
plural={bravos}, - 
parent=bravo} - 
\newglossaryentry{bravoruffian}{description={2) hired ruffian or - 
killer (pl.\ bravoes)}, - 
sort={2}, - 
plural={bravoes}, - 
parent=bravo} -
-

-

-

-

Top

2.2.3 Loading Entries From a File
-

You can store all your glossary entry definitions in another file and use: -


\loadglsentries  \loadglsentries[type]{filename}

-

-where filenameis the name of the file containing all the \newglossaryentry -commands. The optional argument typeis the name of the glossary to which those -entries should belong, for those entries where the type key has been omitted (or, more -specifically, for those entries whose type has been specified by \glsdefaulttype, which -is what \newglossaryentry uses by default). For example, suppose I have a file called -myentries.tex which contains: - - - -

-
-\newglossaryentry{perl}{type=main, - 
name={Perl}, - 
description={A scripting language}} - 
\newglossaryentry{tex}{name={\TeX}, - 
description={A typesetting language},sort={TeX}} - 
\newglossaryentry{html}{type=\glsdefaulttype, - 
name={html}, - 
description={A mark up language}} -
-

and suppose in my document preamble I use the command: - - - -

-
-\loadglsentries[languages]{myentries} -
-

then this will add the entries tex and html to the glossary whose type is given by -languages, but the entry perl will be added to the main glossary, since it explicitly -sets the type to main. -

Note: if you use \newacronym (see §2.10 Acronyms) the type is set as -type=\acronymtype unless you explicitly override it. For example, if my file -myacronyms.tex contains: - - - -

-
-\newacronym{aca}{aca}{a contrived acronym} -
-

then (supposing I have defined a new glossary type called altacronym) - - - -

-
-\loadglsentries[altacronym]{myacronyms} -
-

will add aca to the glossary type acronym, if the package option acronym has been specified, -or will add aca to the glossary type altacronym, if the package option acronym is not -specified.5 -In this instance, it is better to change myacronyms.tex to: - - - -

-
-\newacronym[type=\glsdefaulttype]{aca}{aca}{a contrived acronym} -
-

and now - - - -

-
-\loadglsentries[altacronym]{myacronyms} -
-

will add aca to the glossary type altacronym, regardless of whether or not the package -option acronym is used. -

Note that only those entries that have been used in the text will appear in the -relevant glossaries. Note also that \loadglsentries may only be used in the -preamble. -

-

-

Top

2.3 Number lists

-

Each entry in the glossary has an associated number list. By default, these numbers -refer to the pages on which that entry has been used (using any of the commands -described in §2.4 Links to Glossary Entries and §2.5 Adding an Entry to the Glossary -Without Generating Text). The number list can be suppressed using the nonumberlist -package option, or an alternative counter can be set as the default using the -counter package option. The number list is also referred to as the location -list. -

Both makeindex and xindy concatenate a sequence of 3 or more consecutive pages -into a range. With xindy you can vary the minimum sequence length using -\GlsSetXdyMinRangeLength{n} where nis either an integer or the keyword none -which indicates that there should be no range formation. -

Note that \GlsSetXdyMinRangeLength must be used before \makeglossaries and -has no effect if \noist is used.
-

-

With both makeindex and xindy, you can replace the separator and the closing -number in the range using: -


\glsSetSuffixF  \glsSetSuffixF{suffix}

-

-


\glsSetSuffixFF  \glsSetSuffixFF{suffix}

-

-where the former command specifies the suffix to use for a 2 page list and the latter -specifies the suffix to use for longer lists. For example: - - - -

-
-\glsSetSuffixF{f.} - 
\glsSetSuffixFF{ff.} -
-

Note that if you use xindy, you will also need to set the minimum range length to 1 if -you want to change these suffixes: - - - -

-
-\GlsSetXdyMinRangeLength{1} -
-

Note that if you use the hyperref package, you will need to use \nohyperpage in the -suffix to ensure that the hyperlinks work correctly. For example: - - - -

-
-\glsSetSuffixF{\nohyperpage{f.}} - 
\glsSetSuffixFF{\nohyperpage{ff.}} -
-

-

Note that \glsSetSuffixF and \glsSetSuffixFF must be used before -\makeglossaries and have no effect if \noist is used.
-

-

-

-

Top

2.4 Links to Glossary Entries

-

Once you have defined a glossary entry using \newglossaryentry, you can refer to that -entry in the document using one of the commands listed in this section. The text which -appears at that point in the document when using one of these commands is referred to -as the link text (even if there are no hyperlinks). The commands in this section also add -a line to an external file that is used by makeindex or xindy to generate the relevant -entry in the glossary. This information includes an associated location that -is added to the number list for that entry. By default, the location refers to -the page number. For further information on number lists, see §2.3 Number -lists. -

It is strongly recommended that you don’t use the commands defined in this section -in the arguments of sectioning or caption commands.
-

-

The above warning is particularly important if you are using the glossaries package -in conjunction with the hyperref package. Instead, use one of the commands listed in -§2.7 Using Glossary Terms Without Links (such as \glsentrytext) or provide an -alternative via the optional argument to the sectioning/caption command. -Examples: - - - -

-
-\section{An overview of \glsentrytext{perl}} - 
\section[An overview of Perl]{An overview of \gls{perl}} -
-

-

The way the link text is displayed depends on -


\glstextformat  \glstextformat{text}

-

-For example, to make all link text appear in a sans-serif font, do: - - - -

-
-\renewcommand*{\glstextformat}[1]{\textsf{#1}} -
-

-

Each entry has an associated conditional referred to as the first use flag. This -determines whether \gls, \glspl (and their uppercase variants) should use -the value of the first or text keys. Note that an entry can be used without -affecting the first use flag (for example, when used with \glslink). See §2.11 -Unsetting and Resetting Entry Flags for commands that unset or reset this -conditional. -

The command: -


\glslink  \glslink[options]{label}{text}

-

-will place \glstextformat{text} in the document at that point and add a line into -the associated glossary file for the glossary entry given by label. If hyperlinks are -supported, textwill be a hyperlink to the relevant line in the glossary. (Note that this -command doesn’t affect the first use flag: use \glsdisp instead.) The optional -argument optionsmust be a key=valuelist which can take any of the following -keys: -

-

-format
This specifies how to format the associated location number for this entry in - the glossary. This value is equivalent to the makeindex encap value, - and (as with \index) the value needs to be the name of a command - without the initial backslash. As with \index, the characters ( and ) can - also be used to specify the beginning and ending of a number range. - Again as with \index, the command should be the name of a command - which takes an argument (which will be the associated location). Be - careful not to use a declaration (such as bfseries) instead of a text block - command (such as textbf) as the effect is not guaranteed to be localised. If - you want to apply more than one style to a given entry (e.g. bold and - italic) you will need to create a command that applies both formats, - e.g.  - - - -
- \newcommand*{\textbfem}[1]{\textbf{\emph{#1}}} -
-

and use that command. -

In this document, the standard formats refer to the standard text block - commands such as \textbf or \emph or any of the commands listed in - table 4. -

If you use xindy instead of makeindex, you must specify any non-standard formats - that you want to use with the format key using \GlsAddXdyAttribute{name}. - So if you use xindy with the above example, you would need to add: - - - -

-
- \GlsAddXdyAttribute{textbfem} -
-

-

-

Note that unlike \index, you can’t have anything following the command name, - such as an asterisk or arguments. If you want to cross-reference another entry, - either use the see key when you define the entry or use \glssee (described in §2.6 - Cross-Referencing Entries). -

If you are using hyperlinks and you want to change the font of the hyperlinked - location, don’t use \hyperpage (provided by the hyperref package) as the - locations may not refer to a page number. Instead, the glossaries package provides - number formats listed in table 4. -

-
-


-
Table 4: Predefined Hyperlinked Location Formats
-
- - - - - - - - -
hyperrm serif hyperlink
hypersf sans-serif hyperlink
hypertt monospaced hyperlink
hyperbf bold hyperlink
hypermd medium weight hyperlink
hyperit italic hyperlink
hypersl slanted hyperlink
hyperup upright hyperlink
hypersc small caps hyperlink
hyperemphemphasized hyperlink
-
-

-
-

Note that if the \hyperlink command hasn’t been defined, the hyperxx - formats are equivalent to the analogous textxxfont commands (and hyperemph - is equivalent to emph). If you want to make a new format, you will need to define - a command which takes one argument and use that. For example, if you want the - location number to be in a bold sans-serif font, you can define a command called, - say, \hyperbsf: - - - -

-
- \newcommand{\hyperbsf}[1]{\textbf{\hypersf{#1}}} -
-

and then use hyperbsf as the value for the format key. Remember that if you use - xindy, you will need to add this to the list of location attributes: - - - -

-
- \GlsAddXdyAttribute{hyperbsf} -
-

-

-counter
This specifies which counter to use for this location. This overrides the default - counter used by this entry. (See also §2.3 Number lists.) -
-hyper
This is a boolean key which can be used to enable/disable the hyperlink to - the relevant entry in the glossary. (Note that setting hyper=true will - have no effect if \hyperlink has not been defined.) The default value is - hyper=true. -
-

There is also a starred version: -


\glslink*  \glslink*[options]{label}{text}

-

-which is equivalent to \glslink, except it sets hyper=false. Similarly, all the following -commands described in this section also have a starred version that disables the -hyperlink. -

The command: -


\gls  \gls[options]{label}[insert]

-

-is the same as \glslink, except that the link text is determined from the values of the -text and first keys supplied when the entry was defined using \newglossaryentry. If -the entry has been marked as having been used, the value of the text key will be used, -otherwise the value of the first key will be used. On completion, \gls will mark the -entry’s first use flag as used. -

There are two uppercase variants: -


\Gls  \Gls[options]{label}[insert]

-

-and -


\GLS  \GLS[options]{label}[insert]

-

-which make the first letter of the link text or all the link text uppercase, respectively. -

The final optional argument insert, allows you to insert some additional -text into the link text. By default, this will append insertat the end of the -link text, but this can be changed (see §2.4.1 Changing the format of the link -text). - - - -

The first optional argument optionsis the same as the optional argument to -\glslink. As with \glslink, these commands also have a starred version that disable -the hyperlink. -

There are also analogous plural forms: -


\glspl  \glspl[options]{label}[insert]

-

-


\Glspl  \Glspl[options]{label}[insert]

-

-


\GLSpl  \GLSpl[options]{label}[insert]

-

-These determine the link text from the plural and firstplural keys supplied when the -entry was first defined. As before, these commands also have a starred version that -disable the hyperlink. -

Note that \glslink doesn’t use or affect the first use flag, nor does it use -\glsdisplay or \glsdisplayfirst (see §2.4.1 Changing the format of the link text). -Instead, you can use: -


\glsdisp  \glsdisp[options]{label}{link text}

-

-This behaves in the same way as \gls, except that it uses link textinstead of the -value of the first or text key. (Note that this command always sets insertto -nothing.) This command affects the first use flag, and uses \glsdisplay or -\glsdisplayfirst. -

The command: -


\glstext  \glstext[options]{label}[insert]

-

-is similar to \gls except that it always uses the value of the text key and -does not affect the first use flag. Unlike \gls, the inserted text insertis -always appended to the link text since \glstext doesn’t use \glsdisplay or -\glsdisplayfirst. (The same is true for all the following commands described in this -section.) -

There are also analogous commands: -


\Glstext  \Glstext[options]{text}[insert]

-

-


\GLStext  \GLStext[options]{text}[insert]

-

-As before, these commands also have a starred version that disable the hyperlink. -

The command: -


\glsfirst  \glsfirst[options]{label}[insert]

-

-is similar to \glstext except that it always uses the value of the first key. Again, -insertis always appended to the end of the link text and does not affect the first use -flag. -

There are also analogous commands: - - - -


\Glsfirst  \Glsfirst[options]{text}[insert]

-

-


\GLSfirst  \GLSfirst[options]{text}[insert]

-

-As before, these commands also have a starred version that disable the hyperlink. -

The command: -


\glsplural  \glsplural[options]{label}[insert]

-

-is similar to \glstext except that it always uses the value of the plural key. Again, -insertis always appended to the end of the link text and does not mark the entry as -having been used. -

There are also analogous commands: -


\Glsplural  \Glsplural[options]{text}[insert]

-

-


\GLSplural  \GLSplural[options]{text}[insert]

-

-As before, these commands also have a starred version that disable the hyperlink. -

The command: -


\glsfirstplural  \glsfirstplural[options]{label}[insert]

-

-is similar to \glstext except that it always uses the value of the firstplural key. Again, -insertis always appended to the end of the link text and does not mark the entry as -having been used. -

There are also analogous commands: -


\Glsfirstplural  \Glsfirstplural[options]{text}[insert]

-

-


\GLSfirstplural  \GLSfirstplural[options]{text}[insert]

-

-As before, these commands also have a starred version that disable the hyperlink. -

The command: -


\glsname  \glsname[options]{label}[insert]

-

-is similar to \glstext except that it always uses the value of the name key. Again, -insertis always appended to the end of the link text and does not mark the entry as -having been used. Note: if you want to use this command and the name key contains -commands, you will have to disable the sanitization of the name key and protect fragile -commands. -

There are also analogous commands: -


\Glsname  \Glsname[options]{text}[insert]

-

-


\GLSname  \GLSname[options]{text}[insert]

- - - -

-As before, these commands also have a starred version that disable the hyperlink. -

The command: -


\glssymbol  \glssymbol[options]{label}[insert]

-

-is similar to \glstext except that it always uses the value of the symbol key. Again, -insertis always appended to the end of the link text and does not mark the entry as -having been used. Note: if you want to use this command and the symbol key contains -commands, you will have to disable the sanitization of the symbol key and protect -fragile commands. -

There are also analogous commands: -


\Glssymbol  \Glssymbol[options]{text}[insert]

-

-


\GLSsymbol  \GLSsymbol[options]{text}[insert]

-

-As before, these commands also have a starred version that disable the hyperlink. -

The command: -


\glsdesc  \glsdesc[options]{label}[insert]

-

-is similar to \glstext except that it always uses the value of the description key. Again, -insertis always appended to the end of the link text and does not mark the entry as -having been used. Note: if you want to use this command and the description key -contains commands, you will have to disable the sanitization of the description key and -protect fragile commands. -

There are also analogous commands: -


\Glsdesc  \Glsdesc[options]{text}[insert]

-

-


\GLSdesc  \GLSdesc[options]{text}[insert]

-

-As before, these commands also have a starred version that disable the hyperlink. -

The command: -


\glsuseri  \glsuseri[options]{label}[insert]

-

-is similar to \glstext except that it always uses the value of the user1 key. Again, -insertis always appended to the end of the link text and does not mark the entry as -having been used. -

There are also analogous commands: -


\Glsuseri  \Glsuseri[options]{text}[insert]

-

-


\GLSuseri  \GLSuseri[options]{text}[insert]

-

-As before, these commands also have a starred version that disable the hyperlink. -Similarly for the other user keys: - - - -


\glsuserii  \glsuserii[options]{text}[insert]

-

-


\Glsuserii  \Glsuserii[options]{text}[insert]

-

-


\GLSuserii  \GLSuserii[options]{text}[insert]

-

-


\glsuseriii  \glsuseriii[options]{text}[insert]

-

-


\Glsuseriii  \Glsuseriii[options]{text}[insert]

-

-


\GLSuseriii  \GLSuseriii[options]{text}[insert]

-

-


\glsuseriv  \glsuseriv[options]{text}[insert]

-

-


\Glsuseriv  \Glsuseriv[options]{text}[insert]

-

-


\GLSuseriv  \GLSuseriv[options]{text}[insert]

-

-


\glsuserv  \glsuserv[options]{text}[insert]

-

-


\Glsuserv  \Glsuserv[options]{text}[insert]

-

-


\GLSuserv  \GLSuserv[options]{text}[insert]

-

-


\glsuservi  \glsuservi[options]{text}[insert]

-

-


\Glsuservi  \Glsuservi[options]{text}[insert]

-

-


\GLSuservi  \GLSuservi[options]{text}[insert]

-

- - - -

-

-

Top

2.4.1 Changing the format of the link text
-

The format of the link text for \gls, \glspl and their uppercase variants is governed -by two commands: -


\glsdisplayfirst  \glsdisplayfirst{first/first plural}{description}{symbol}{insert} -

-

-which is used the first time a glossary entry is used in the text and -


\glsdisplay  \glsdisplay{text/plural}{description}{symbol}{insert} -

-

-which is used subsequently. Both commands take four arguments: the first is either the -singular or plural form given by the text, plural, first or firstplural keys (set when the -term was defined) depending on context; the second argument is the term’s -description (as supplied by the description or descriptionplural keys); the third -argument is the symbol associated with the term (as supplied by the symbol or -symbolplural keys) and the fourth argument is the additional text supplied in the final -optional argument to \gls or \glspl (or their uppercase variants). The default -definitions of \glsdisplay and \glsdisplayfirst simply print the first argument -immediately followed by the fourth argument. The remaining arguments are -ignored. -

If required, you can access the label for the given entry via -


\glslabel  \glslabel

-

-so it is possible to use this label in the definition of \glsdisplay or \glsdisplayfirst -to supply additional information using any of the commands described in §2.7 Using -Glossary Terms Without Links, if required. -

Note that \glsdisplay and \glsdisplayfirst are not used by \glslink. If you -want to supply your own link text, you need to use \glsdisp instead. -

For example, suppose you want a glossary of measurements and units, you can use -the symbol key to store the unit: - - - -

-
-\newglossaryentry{distance}{name=distance, - 
description={The length between two points}, - 
symbol={km}} -
-

and now suppose you want \gls{distance} to produce “distance (km)” on first use, -then you can redefine \glsdisplayfirst as follows: - - - -

-
-\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} -
-

Note that the additional text is placed after #1, so \gls{distance}[’s] will -produce “distance’s (km)” rather than “distance (km)’s” which looks a bit -odd (even though it may be in the context of “the distance (km) is measured -between the two points” — but in this instance it would be better not to use a -contraction). -

Note also that all of the link text will be formatted according to \glstextformat -(described earlier). So if you do, say: - - - -

-
-\renewcommand{\glstextformat}[1]{\textbf{#1}} - 
\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} -
-

then \gls{distance} will produce “distance (km)”. -

If you have multiple glossaries, changing \glsdisplayfirst and \glsdisplay will -change the way entries for all of the glossaries appear when using the commands \gls, -\glspl, their uppercase variants and \glsdisp. If you only want the change to affect -entries for a given glossary, then you need to use -


\defglsdisplay  \defglsdisplay[type]{definition}

-

-and -


\defglsdisplayfirst  \defglsdisplayfirst[type]{definition}

-

-instead of redefining \glsdisplay and \glsdisplayfirst. -

Both \defglsdisplay and \defglsdisplayfirst take -two arguments: the first (which is optional) is the glossary’s -label6 -and the second is how the term should be displayed when it is invoked using commands -\gls, \glspl, their uppercase variants and \glsdisp. This is similar to the way -\glsdisplayfirst was redefined above. -

For example, suppose you have created a new glossary called notation and you -want to change the way the entry is displayed on first use so that it includes the -symbol, you can do: - - - -

-
-\defglsdisplayfirst[notation]{#1#4 (denoted #3)} -
-

Now suppose you have defined an entry as follows: - - - -

-
-\newglossaryentry{set}{type=notation, - 
  name=set, - 
  description={A collection of objects}, - 
  symbol={$S$} - 
} -
-

The first time you reference this entry it will be displayed as: “set (denoted S)” -(assuming \gls was used). -

Remember that if you use the symbol key, you need to use a glossary style that -displays the symbol, as many of the styles ignore it. In addition, if you want either the -description or symbol to appear in the link text, you will have to disable the -sanitization of these keys and protect fragile commands. -

-

-

Top

2.4.2 Enabling and disabling hyperlinks to glossary entries
-

If you load the hyperref or html packages prior to loading the glossaries package, -commands such as \glslink and \gls, described above, will automatically have -hyperlinks to the relevant glossary entry, unless the hyper option has been set to false. -You can disable or enable links using: -


\glsdisablehyper  \glsdisablehyper

-

-and -


\glsenablehyper  \glsenablehyper

-

-respectively. The effect can be localised by placing the commands within a group. Note -that you should only use \glsenablehyper if the commands \hyperlink and -\hypertarget have been defined (for example, by the hyperref package). -

You can disable just the first use links using the package option hyperfirst=false. -Note that this option only affects commands that recognise the first use flag, for -example \gls, \glspl and \glsdisp but not \glslink. -

-

-

Top

2.5 Adding an Entry to the Glossary Without Generating Text

-

It is possible to add a line in the glossary file without generating any text at that point -in the document using: -


\glsadd  \glsadd[options]{label}

- - - -

-This is similar to \glslink, only it doesn’t produce any text (so therefore, -there is no hyper key available in optionsbut all the other options that can -be used with \glslink can be passed to \glsadd). For example, to add a -page range to the glossary number list for the entry whose label is given by -set: - - - -

-
-\glsadd[format=(]{set} - 
Lots of text about sets spanning many pages. - 
\glsadd[format=)]{set} -
-

-

To add all entries that have been defined, use: -


\glsaddall  \glsaddall[options]

-

-The optional argument is the same as for \glsadd, except there is also a key -types which can be used to specify which glossaries to use. This should be a -comma separated list. For example, if you only want to add all the entries -belonging to the list of acronyms (specified by the glossary type \acronymtype) -and a list of notation (specified by the glossary type notation) then you can -do: - - - -

-
-\glsaddall[types={\acronymtype,notation}] -
-

-

-

-

Top

2.6 Cross-Referencing Entries

-

There are several ways of cross-referencing entries in the glossary: -

-

    -
  1. You can use commands such as \gls in the entries description. For example: - - - -
    - \newglossaryentry{apple}{name=apple, -  
    description={firm, round fruit. See also \gls{pear}}} -
    -

    Note that with this method, if you don’t use the cross-referenced term in the - glossary, you will need two runs of makeglossaries: -
    latex filename -
    makeglossaries filename -
    latex filename -
    makeglossaries filename -
    latex filename
    -

    -

  2. -
  3. As described in §2.2 Defining Glossary Entries, you can use the see key when you - define the entry. For example: - - - -
    - \newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, -  
    description={Series expansion}, see={TaylorsTheorem}} -
    -

    Note that in this case, the entry with the see key will automatically be added to - the glossary, but the cross-referenced entry won’t. You therefore need to ensure - that you use the cross-referenced term with the commands described in §2.4 Links - to Glossary Entries or §2.5 Adding an Entry to the Glossary Without Generating - Text. -

    You can optionally override the “see” tag using square brackets at the start of the - see value. For example: - - - -

    -
    - \newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, -  
    description={Series expansion}, -  
    see=[see also]{TaylorsTheorem}} -
    -

    -

  4. -
  5. After you have defined the entry, use -


    \glssee  \glssee[tag]{label}{xr label list}

    -

    - where xr label listis a comma-separated list of entry labels to be cross-referenced, - labelis the label of the entry doing the cross-referencing and tagis the “see” - tag. For example: - - - -

    -
    - \glssee[see also]{series}{FourierSeries,TaylorsTheorem} -
    -

    Note that this automatically adds the entry given by labelto the glossary but - doesn’t add the cross-referenced entries (specified by xr label list) to the - glossary.

-

In both cases 2 and 3 above, the cross-referenced information appears in the -number list, whereas in case 1, the cross-referenced information appears in the -description. In cases 2 and 3, the default text for the “see” tag is given by -\seename. -

-

-

Top

2.7 Using Glossary Terms Without Links

-

The commands described in this section display entry details without adding any -information to the glossary. They don’t use \glstextformat, they don’t have any -optional arguments, they don’t affect the first use flag and, apart from \glshyperlink, -they don’t produce hyperlinks. -


\glsentryname  \glsentryname{label}

-

-


\Glsentryname  \Glsentryname{label}

-

-These commands display the name of the glossary entry given by label, as specified by -the name key. \Glsentryname makes the first letter uppercase. -


\glsentrytext  \glsentrytext{label}

-

-


\Glsentrytext  \Glsentrytext{label}

-

-These commands display the subsequent use text for the glossary entry given -by label, as specified by the text key. \Glsentrytext makes the first letter -uppercase. -


\glsentryplural  \glsentryplural{label}

-

-


\Glsentryplural  \Glsentryplural{label}

-

-These commands display the subsequent use plural text for the glossary entry given by - - - -label, as specified by the plural key. \Glsentryplural makes the first letter -uppercase. -


\glsentryfirst  \glsentryfirst{label}

-

-


\Glsentryfirst  \Glsentryfirst{label}

-

-These commands display the first use text for the glossary entry given by -label, as specified by the first key. \Glsentryfirst makes the first letter -uppercase. -


\glsentryfirstplural  \glsentryfirstplural{label}

-

-


\Glsentryfirstplural  \Glsentryfirstplural{label}

-

-These commands display the plural form of the first use text for the glossary entry -given by label, as specified by the firstplural key. \Glsentryfirstplural makes the -first letter uppercase. -


\glsentrydesc  \glsentrydesc{label}

-

-


\Glsentrydesc  \Glsentrydesc{label}

-

-These commands display the description for the glossary entry given by label. -\Glsentrydesc makes the first letter uppercase. -


\glsentrydescplural  \glsentrydescplural{label}

-

-


\Glsentrydescplural  \Glsentrydescplural{label}

-

-These commands display the plural description for the glossary entry given by label. -\Glsentrydescplural makes the first letter uppercase. -


\glsentrysymbol  \glsentrysymbol{label}

-

-


\Glsentrysymbol  \Glsentrysymbol{label}

-

-These commands display the symbol for the glossary entry given by label. -\Glsentrysymbol makes the first letter uppercase. -


\glsentrysymbolplural  \glsentrysymbolplural{label}

-

-


\Glsentrysymbolplural  \Glsentrysymbolplural{label}

-

-These commands display the plural symbol for the glossary entry given by label. -\Glsentrysymbolplural makes the first letter uppercase. - - - -


\glsentryuseri  \glsentryuseri{label}

-

-


\Glsentryuseri  \Glsentryuseri{label}

-

-


\glsentryuserii  \glsentryuserii{label}

-

-


\Glsentryuserii  \Glsentryuserii{label}

-

-


\glsentryuseriii  \glsentryuseriii{label}

-

-


\Glsentryuseriii  \Glsentryuseriii{label}

-

-


\glsentryuseriv  \glsentryuseriv{label}

-

-


\Glsentryuseriv  \Glsentryuseriv{label}

-

-


\glsentryuserv  \glsentryuserv{label}

-

-


\Glsentryuserv  \Glsentryuserv{label}

-

-


\glsentryuservi  \glsentryuservi{label}

-

-


\Glsentryuservi  \Glsentryuservi{label}

-

-These commands display the value of the user keys for the glossary entry given by -label. -


\glshyperlink  \glshyperlink[link text]{label}

-

-This command provides a hyperlink to the glossary entry given by labelbut does -not add any information to the glossary file. The link text is given by -\glsentryname{label} by default, but can be overridden using the optional -argument. -

If you use \glshyperlink, you need to ensure that the relevant entry has been -added to the glossary using any of the commands described in §2.4 Links to Glossary -Entries or §2.5 Adding an Entry to the Glossary Without Generating Text otherwise - - - -you will end up with a broken link.
-

-

For further information see the section “Displaying entry details without adding -information to the glossary” in the document glossaries.pdf. -

-

-

Top

2.8 Displaying a glossary

-

The command -


\printglossaries  \printglossaries

-

-will display all the glossaries in the order in which they were defined. Note that no -glossaries will appear until you have either used the Perl script makeglossaries or have -directly used makeindex or xindy (as described in §1.3 Generating the Associated -Glossary Files). If the glossary still does not appear after you re-LATEX your -document, check the makeindex/xindy log files to see if there is a problem. Remember -that you also need to use the command \makeglossaries in the preamble to enable the -glossaries. -

An individual glossary can be displayed using: -


\printglossary  \printglossary[options]

-

-where optionsis a key=valuelist of options. The following keys are available: -

-type
The value of this key specifies which glossary to print. If omitted, the default - glossary is assumed. For example, to print the list of acronyms: - - - -
- \printglossary[type=\acronymtype] -
-

-

-title
This is the glossary’s title (overriding the title specified when the glossary was - defined). -
-toctitle
This is the title to use for the table of contents (if the toc package option has - been used). It may also be used for the page header, depending on the page style. - If omitted, the glossary title is used. -
-style
This specifies which glossary style to use for this glossary, overriding the effect of - the style package option or \glossarystyle. -
-numberedsection
This specifies whether to use a numbered section for this glossary, - overriding the effect of the numberedsection package option. This key has the same - syntax as the numberedsection package option, described in §2.1 Package - Options. -
-nonumberlist
Unlike the package option of the same name, this key is a boolean key. If - true (nonumberlist=true) the numberlist is suppressed for this glossary. If false - (nonumberlist=false) the numberlist is displayed for this glossary. If no value is - supplied, true is assumed. -
-

By default, the glossary is started either by \chapter* or by \section*, depending -on whether or not \chapter is defined. This can be overridden by the section package -option or the \setglossarysection command. Numbered sectional units can be -obtained using the numberedsection package option. Each glossary sets the page header -via the command \glossarymark. If this mechanism is unsuitable for your -chosen class file or page style package, you will need to redefine \glossarymark. -Further information about these options and commands is given in §2.1 Package -Options. -

Information can be added to the start of the glossary (after the title and before the -main body of the glossary) by redefining -


\glossarypreamble  \glossarypreamble

-

-For example: - - - -

-
-\renewcommand{\glossarypreamble}{Numbers in italic indicate - 
primary definitions.} -
-

This needs to be done before the glossary is displayed using \printglossaries or -\printglossary. Note that if you want a different preamble for each glossary, you will -need to use a separate \printglossary for each glossary and change the definition of -\glossarypreamble between each glossary. For example: - - - -

-
-\renewcommand{\glossarypreamble}{Numbers in italic indicate - 
primary definitions.} - 
\printglossary - 
\renewcommand{\glossarypreamble}{} - 
\printglossary[type=acronym] -
-

Alternatively, you can do something like: - - - -

-
-\renewcommand{\glossarypreamble}{Numbers in italic indicate - 
primary definitions.\gdef\glossarypreamble{}} - 
\printglossaries -
-

which will print the preamble text for the first glossary and change the preamble to do -nothing for subsequent glossaries. (Note that \gdef is required as the glossary is placed -within a group.) -

There is an analogous command called -


\glossarypostamble  \glossarypostamble

-

-which is placed at the end of each glossary. -

-

-

Top

2.8.1 Changing the way the entry name appears in the glossary
-

Within each glossary, each entry name is formatted according to -


\glsnamefont  \glsnamefont{name}

-

-which takes one argument: the entry name. This command is always used regardless of -the glossary style. By default, \glsnamefont simply displays its argument in whatever -the surrounding font happens to be. This means that in the list-like glossary styles -(defined in the glossary-list style file) the name will appear in bold, since the name is -placed in the optional argument of \item, whereas in the tabular styles (defined in the -glossary-long and glossary-super style files) the name will appear in the normal font. The -hierarchical glossary styles (defined in the glossary-tree style file) also set the name in -bold. -

For example, suppose you want all the entry names to appear in medium weight -small caps, then you can do: - - - -

-
-\renewcommand{\glsnamefont}[1]{\textsc{\mdseries #1}} -
-

-

-

-

Top

2.8.2 Xindy
-

If you want to use xindy to sort the glossary, you must use the package option -xindy: - - - -

-
-\usepackage[xindy]{glossaries} -
-

This ensures that the glossary information is written in xindy syntax. -

§1.3 Generating the Associated Glossary Files covers how to use the external -indexing application. This section covers the commands provided by the glossaries -package that allow you to adjust the xindy style file (.xdy) and parameters. -

To assist writing information to the xindy style file, the glossaries package provides -the following commands: -


\glsopenbrace  \glsopenbrace

-

-


\glsclosebrace  \glsclosebrace

-

-which produce an open and closing brace. (This is needed because \{ and \} don’t -expand to a simple brace character when written to a file.) -

In addition, if you are using a package that makes the double quote character active -(e.g. ngerman) you can use: -


\glsquote  \glsquote{text}

-

-which will produce "text". Alternatively, you can use \string" to write the -double-quote character. This document assumes that the double quote character has -not been made active, so the examples just use " for clarity. -

If you want greater control over the xindy style file than is available through the -LATEX commands provided by the glossaries package, you will need to edit the xindy -style file. In which case, you must use \noist to prevent the style file from being -overwritten by the glossaries package. For additional information about xindy, read the -xindy documentation. -

-

Top -

Language and Encodings - When you use xindy, you need to specify the language and encoding used -(unless you have written your own custom xindy style file that defines the -relevant alphabet and sort rules). If you use makeglossaries, this information is -obtained from the document’s auxiliary (.aux) file. The glossaries package -attempts to find the root language, but in the event that it gets it wrong or -if xindy doesn’t support that language, then you can specify the language -using: -


\GlsSetXdyLanguage  \GlsSetXdyLanguage[glossary type]{language} -

- - - -

-where languageis the name of the language. The optional argument can be used if -you have multiple glossaries in different languages. If glossary typeis omitted, it will -be applied to all glossaries, otherwise the language setting will only be applied to the -glossary given by glossary type. -

If the inputenc package is used, the encoding will be obtained from the -value of \inputencodingname. Alternatively, you can specify the encoding -using: -


\GlsSetXdyCodePage  \GlsSetXdyCodePage{code}

-

-where codeis the name of the encoding. For example: - - - -

-
-\GlsSetXdyCodePage{utf8} -
-

-

Note that you can also specify the language and encoding using the package option -xindy={language=lang,codepage=code}. For example: - - - -

-
-\usepackage[xindy={language=english,codepage=utf8}]{glossaries} -
-

-

If you write your own custom xindy style file that includes the language settings, -you need to set the language to nothing: - - - -

-
-\GlsSetXdyLanguage{} -
-

(and remember to use \noist to prevent the style file from being overwritten). -

The commands \GlsSetXdyLanguage and \GlsSetXdyCodePage have no effect if -you don’t use makeglossaries. If you call xindy without makeglossaries you need to -remember to set the language and encoding using the -L and -C switches. -
-

-

-

Top -

Locations and Number lists - The most likely attributes used in the format key (textrm, hyperrm etc) are -automatically added to the xindy style file, but if you want to use another attribute, -you need to add it using: -


\GlsAddXdyAttribute  \GlsAddXdyAttribute{name}

-

-where nameis the name of the attribute, as used in the format key. For example, -suppose I want a bold, italic, hyperlinked location. I first need to define a command -that will do this: - - - -

-
-\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} -
-

but with xindy, I also need to add this as an allowed attribute: - - - -

-
-\GlsAddXdyAttribute{hyperbfit} -
-

-

Note that \GlsAddXdyAttribute has no effect if \noist is used or if -\makeglossaries is omitted. -

\GlsAddXdyAttribute must be used before \makeglossaries.

-

-

If the location numbers don’t get expanded to a simple Arabic or Roman number or -a letter from a, …, z or A, …, Z, then you need to add a location style in the appropriate -format. -

For example, suppose you want the page numbers written as words rather than -digits and you use the fmtcount package to do this. You can redefine \thepage as -follows: - - - -

-
-\renewcommand*{\thepage}{\Numberstring{page}} -
-

This gets expanded to \protect \Numberstringnum {n} where nis the Arabic -page number. This means that you need to define a new location that has that -form: - - - -

-
-\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space - 
  \string\Numberstringnum\space\glsopenbrace" - 
  "arabic-numbers" :sep "\glsclosebrace"} -
-

Note that it’s necessary to use \space to indicate that spaces also appear -in the format, since, unlike TEX, xindy doesn’t ignore spaces after control -sequences. -

Note that \GlsAddXdyLocation has no effect if \noist is used or if \makeglossaries -is omitted. -

\GlsAddXdyLocation must be used before \makeglossaries.

-

-

In the number list, the locations are sorted according to type. The default ordering is: -roman-page-numbers (e.g. i), arabic-page-numbers (e.g. 1), arabic-section-numbers -(e.g. 1.1 if the compositor is a full stop or 1-1 if the compositor is a -hyphen7), -alpha-page-numbers (e.g. a), Roman-page-numbers (e.g. I), -Alpha-page-numbers (e.g. A), Appendix-page-numbers (e.g. A.1 if -the Alpha compositor is a full stop or A-1 if the Alpha compositor is a -hyphen8), -user defined location names (as specified by \GlsAddXdyLocation in the order in which -they were defined), see (cross-referenced entries). This ordering can be changed -using: -


\GlsSetXdyLocationClassOrder  \GlsSetXdyLocationClassOrder{location -names}

-

-where each location name is delimited by double quote marks and separated by white -space. For example: - - - -

-
-\GlsSetXdyLocationClassOrder{ - 
  "arabic-page-numbers" - 
  "arabic-section-numbers" - 
  "roman-page-numbers" - 
  "Roman-page-numbers" - 
  "alpha-page-numbers" - 
  "Alpha-page-numbers" - 
  "Appendix-page-numbers" - 
  "see" - 
} -
-

-

Note that \GlsSetXdyLocationClassOrder has no effect if \noist is used or if -\makeglossaries is omitted. -

\GlsSetXdyLocationClassOrder must be used before \makeglossaries. -

-

-

If a number list consists of a sequence of consecutive numbers, the range will be -concatenated. The number of consecutive locations that causes a range formation -defaults to 2, but can be changed using: -


\GlsSetXdyMinRangeLength  \GlsSetXdyMinRangeLength{n}

-

-For example: - - - -

-
-\GlsSetXdyMinRangeLength{3} -
-

The argument may also be the keyword none, to indicate that there should -be no range formations. See the xindy manual for further details on range -formations. -

Note that \GlsSetXdyMinRangeLength has no effect if \noist is used or if -\makeglossaries is omitted. -

\GlsSetXdyMinRangeLength must be used before \makeglossaries.

-

-

See §2.3 Number lists for further details. -

-

Top -

Glossary Groups - The glossary is divided into groups according to the first letter of the sort key. The -glossaries package also adds a number group by default, unless you suppress it in the -xindy package option. For example: - - - -

-
-\usepackage[xindy={glsnumbers=false}]{glossaries} -
-

Any entry that doesn’t go in one of the letter groups or the number group is placed in -the default group. -

If you have a number group, the default behaviour is to locate it before the “A” -letter group. If you are not using a Roman alphabet, you can change this -using
\GlsSetXdyFirstLetterAfterDigits{letter} -

Note that \GlsSetXdyFirstLetterAfterDigits has no effect if \noist is used or -if \makeglossaries is omitted. -

\GlsSetXdyFirstLetterAfterDigits must be used before \makeglossaries. -

-

-

-

-

Top

2.9 Defining New Glossaries

-

A new glossary can be defined using: -


\newglossary  \newglossary[log-ext]{name}{in-ext}{out-ext}{title}[counter] -

-

-where nameis the label to assign to this glossary. The arguments in-extand -out-extspecify the extensions to give to the input and output files for that -glossary, titleis the default title for this new glossary and the final optional -argument counterspecifies which counter to use for the associated number -lists (see also §2.3 Number lists). The first optional argument specifies the -extension for the makeindex or xindy transcript file (this information is only -used by makeglossaries which picks up the information from the auxiliary -file). -

Note that the main (default) glossary is automatically created as: - - - -

-
-\newglossary{main}{gls}{glo}{\glossaryname} -
-

so it can be identified by the label main (unless the nomain package option is used). -Using the acronym package option is equivalent to: - - - -

-
-\newglossary[alg]{acronym}{acr}{acn}{\acronymname} -
-

so it can be identified by the label acronym. If you are not sure whether the acronym -option has been used, you can identify the list of acronyms by the command -\acronymtype \acronymtype which is set to acronym, if the acronym option has been -used, otherwise it is set to main. Note that if you are using the main glossary as your -list of acronyms, you need to declare it as a list of acronyms using the package option -acronymlists. -

All glossaries must be defined before \makeglossaries to ensure that the relevant -output files are opened.
-

-

-

-

Top

2.10 Acronyms

-

You may have noticed in §2.2 Defining Glossary Entries that when you specify a new -entry, you can specify alternate text to use when the term is first used in the document. -This provides a useful means to define acronyms. For convenience, the glossaries package -defines the command: -


\newacronym  \newacronym[key-val list]{label}{abbrv}{long}

-

-By default, this is equivalent to: -
\newglossaryentry{label}{type=\acronymtype, -
name={abbrv}, -
description={long}, -
text={abbrv}, -
first={long(abbrv)}, -
plural={abbrv\glspluralsuffix}, -
firstplural={long\glspluralsuffix\space (abbrv\glspluralsuffix)}, -
key-val list} -
-As mentioned in the previous section, the command \acronymtype is the name of the -glossary in which the acronyms should appear. If the acronym package option has been -used, this will be acronym, otherwise it will be main. The acronyms can then be used in -exactly the same way as any other glossary entry. If you want more than one list of -acronyms, you must identify the others using the package options acronymlists. This -ensures that options such as footnote and smallcaps work for the additional lists of -acronyms. - - - -

Note: since \newacronym sets type=\acronymtype, if you want to load a file -containing acronym definitions using \loadglsentries[type]{filename}, the -optional argument typewill not have an effect unless you explicitly set the type as -type=\glsdefaulttype in the optional argument to \newacronym. See §2.2.3 Loading -Entries From a File.
-

-

For example, the following defines the acronym IDN: - - - -

-
-\newacronym{idn}{IDN}{identification number} -
-

This is equivalent to: - - - -

-
-\newglossaryentry{idn}{type=\acronymtype, - 
name={IDN}, - 
description={identification number}, - 
text={IDN}, - 
first={identification number (IDN)}, - 
plural={IDNs}, - 
firstplural={identification numbers (IDNs)}} -
-

so \gls{idn} will produce “identification number (IDN)” on first use and “IDN” on -subsequent uses. -

This section describes acronyms that have been defined using \newacronym. -If you prefer to define your acronyms using \newglossaryentry explicitly, -then you should skip this section and ignore the package options: smallcaps, -smaller, description, dua and footnote, as these options change the definition of -\newacronym for common acronym formats as well as the way that the link text -is displayed (see §2.4.1 Changing the format of the link text). Likewise you -should ignore the package option shortcuts and the new commands described in -this section, such as \acrshort, as they vary according to the definition of -\newacronym. -

If you want to define your own custom acronym style, see §2.10.1 Defining A -Custom Acronym Style. -

If you try using \newglossaryentry for entries in a designated list of -acronyms in combination with any of the above named package options you are -likely to get unexpected results such as empty brackets or empty footnotes. -
-

-

If you use any of the package options smallcaps, smaller, description or footnote, the -acronyms will be displayed in the document using: -


\acronymfont  \acronymfont{text}

-

-and -


\firstacronymfont  \firstacronymfont{text}

-

-where \firstacronymfont is applied on first use and \acronymfont is applied on -subsequent use. Note that if you don’t use any of the above package options, changing -the definition of \acronymfont or \firstacronymfont will have no effect. In this case, -the recommended route is to use either the smaller or the smallcaps package option and -redefine \acronymfont and \firstacronymfont as required. (The smallcaps option sets -the default plural suffix in an upright font to cancel the effect of \textsc, -whereas smaller sets the suffix in the surrounding font.) For example, if you want -acronyms in a normal font on first use and emphasized on subsequent use, - - - -do: - - - -

-
-\usepackage[smaller]{glossaries} - 
\renewcommand*{\firstacronymfont}[1]{#1} - 
\renewcommand*{\acronymfont}[1]{\emph{#1}} -
-

(Note that it is for this reason that the relsize package is not automatically loaded -when selecting the smaller package option.) -

Table 5 lists the package options that govern the acronym styles and how -the \newglossaryentry keys are used to store long(the long form) and -abbrv(the short form). Note that the smallcaps option redefines \acronymfont -so that it sets its argument using \textsc (so you should use lower case -characters in abbrv) and the smaller option redefines \acronymfont to use -\textsmaller,9 otherwise -\acronymfont simply displays its argument in the surrounding font. -

-
- - - -


- - - -
Table 5: Package options governing \newacronym and how the information is -stored in the keys for \newglossaryentry
-
-

-

-
- - - - - - - -
Package Optionfirst key text keydescription keysymbol key
description,footnoteabbrvabbrvuser supplied long
description,dua longlonguser supplied abbrv
description longabbrvuser supplied abbrv
footnote abbrvabbrvlong
smallcaps longabbrvlongabbrv
smaller longabbrvlongabbrv
dua longlonglongabbrv
None of the above long(abbrv)abbrvlong
-
- - - -

-
-

In case you can’t remember which key stores the long or short forms (or their -plurals) the glossaries package provides the commands:

-
    -
  • \glsshortkey \glsshortkey The key used to store the short form. -
  • -
  • \glsshortpluralkey \glsshortpluralkey The key used to store the plural - version of the short form. -
  • -
  • \glslongkey \glslongkey The key used to store the long form. -
  • -
  • \glslongpluralkey \glslongpluralkey The key used to store the plural - version of the long form.
-

These can be used in the optional argument of \newacronym to override the defaults. For -example: - - - -

-
-\newacronym[\glslongpluralkey={diagonal matrices}]{dm}{DM}{diagonal - 
matrix} -
-

If the first use uses the plural form, \glspl{dm} will display: diagonal matrices -(DMs). -

Each of the package options smallcaps, smaller, footnote, dua and description use -\defglsdisplay and \defglsdisplayfirst (described in §2.4.1 Changing the format -of the link text) to change the way the link text is displayed. This means that these -package options only work for the glossary type given by \acronymtype. If you have -multiple lists of acronyms, you will need to make the appropriate changes for each -additional glossary type. -

-description,footnote
When these two package options are used together, the first - use displays the entry as: -
\firstacronymfont{abbrv}insert\footnote{long} -
- while subsequent use displays the entry as: -
\acronymfont{abbrv}insert -
- where insertindicates the text supplied in the final optional argument to \gls, - \glspl or their uppercase variants. -

In this case, the long form is stored in the symbol key. This means that the long - form will not be displayed in the list of acronyms unless you use a glossary style - that displays the entry’s symbol (for example, the index style). Entries will be - sorted according to the short form. -

Note also that when these two package options are used (in the given order), - the glossaries package additionally implements the sanitize option using - sanitize={description=false,symbol=false}, so remember to protect fragile - commands when defining acronyms. -

-dua
The dua package option always displays the expanded form and so may not be - used with footnote, smaller or smallcaps. Both first use and subsequent use - displays the entry in the form: -
long⟩⟨insert -
- - - -

If the description package option is also used, the name key is set to the long form, - otherwise the name key is set to the short form and the description key is set to - the long form. In both cases the symbol is set to the short form. Therefore, if you - use the description package option and you want the short form to appear in the - list of acronyms, you will need to use a glossary style that displays the entry’s - symbol (for example, the index style). Entries will be sorted according to the long - form if the description option is used, otherwise they will be sorted according to - the short form (unless overridden by the sort key in the optional argument of - \newacronym). -

-description
This package option displays the entry on first use as: -
long⟩⟨insert(\firstacronymfont{abbrv}) -
- while subsequent use displays the entry as: -
\acronymfont{abbrv}insert -
- Note also that if this package option is used, the glossaries package additionally - implements the option sanitize={symbol=false}, so remember to protect fragile - commands when defining acronyms. -

Note that with this option, you need to specify the description using the - description key in the optional argument of \newacronym. When this option is - used without the footnote or dua options, the name field is specified - as -


\acrnameformat  \acrnameformat{short}{long}

-

- This defaults to \acronymfont{short}, which means that the long form will not - appear in the list of acronyms by default. To change this, you need to redefine - \acrnameformat as appropriate. For example, to display the long form followed - by the short form in parentheses do: - - - -

-
- \renewcommand*{\acrnameformat}[2]{#2 (\acronymfont{#1})} -
-

Note that even if you redefine \acrnameformat, the entries will be sorted - according to the short form, unless you override this using the sort key in the - optional argument to \newacronym. -

-footnote
This package option displays the entry on first use as: -
\firstacronymfont{abbrv}insert\footnote{long} -
- while subsequent use displays the entry as: -
\acronymfont{abbrv}insert -
- Acronyms will be sorted according to the short form. -

Note also that if this package option is used, the glossaries package additionally - implements the option sanitize={description=false}, so remember to protect - fragile commands when defining acronyms. -

Note that on first use, it is the long form in the footnote that links to - the relevant glossary entry (where hyperlinks are enabled), whereas on - subsequent use, the acronym links to the relevant glossary entry. It is - possible to change this to make the acronym on first use have the hyperlink - instead of the footnote, but since the footnote marker will also be a - hyperlink, you will have two hyperlinks in immediate succession. This can be - ambiguous where the hyperlinks are coloured rather than boxed. The code - required to change the first use to make the acronym a hyperlink is as - follows: - - - -

-
-  \defglsdisplayfirst[\acronymtype]{% -  
 \noexpand\protect\noexpand -  
    \glslink[\@gls@link@opts]{\@gls@link@label}{\firstacronymfont{#1}#4}% -  
    \noexpand\protect\noexpand\footnote{#2}}% -
-

Note that this involves using internal commands (i.e. commands whose name - contains an @ character), so if this code is place in a .tex file it needs to be placed - within a \makeatletter … \makeatother pair. (See \@ and @ in macro names for - further details.) -

-smallcaps
If neither the footnote nor description options have been set, this option - displays the entry on first use as: -
long⟩⟨insert(\firstacronymfont{abbrv}) -
- while subsequent use displays the entry as: -
\acronymfont{abbrv}insert -
- where \acronymfont is set to \textsc{#1}. -

Note that since the acronym is displayed using \textsc, the short form, abbrv, - should be specified in lower case.
-

-

Note also that if this package option is used, the glossaries package additionally - implements the option sanitize={symbol=false}, so remember to protect fragile - commands when defining acronyms. -

-smaller
If neither the footnote nor description options have been set, this option - displays the entry on first use as: -
long⟩⟨insert(\firstacronymfont{abbrv}) -
- while subsequent use displays the entry as: -
\acronymfont{abbrv}insert -
- where \acronymfont is set to - \textsmaller{#1}.10 - The entries will be sorted according to the short form. - - - -

Remember to load a package that defines \textsmaller (such as relsize) if you - want to use this option, unless you want to redefine \acronymfont to use some - other formatting command.
-

-

Note also that if this package option is used, the glossaries package additionally - implements the option sanitize={symbol=false}, so remember to protect fragile - commands when defining acronyms. -

-None of the above
If none of the package options smallcaps, smaller, footnote, - dua or description are used, then on first use the entry is displayed as: - -
long(abbrv)insert -
- while subsequent use displays the entry as: -
abbrv⟩⟨insert -
- Entries will be sorted according to the short form. Note that if none of the - acronym-related package options are used, the sanitize option will not be - affected.
-

Recall from §2.4 Links to Glossary Entries that you can access the values of -individual keys using commands like \glstext, so it is possible to use these commands -to print just the long form or just the abbreviation without affecting the flag that -determines whether the entry has been used. However the keys that store the long and -short form vary depending on the acronym style, so the glossaries package -provides commands that are set according to the package options. These are as -follows: -


\acrshort  \acrshort[options]{label}[insert]

-

-


\Acrshort  \ACRshort[options]{label}[insert]

-

-


\ACRshort  \ACRshort[options]{label}[insert]

-

-Print the abbreviated version with (if required) a hyperlink to the relevant entry in the -glossary. This is usually equivalent to \glstext (or its uppercase variants) but may -additionally put the link text within the argument to \acronymfont. -


\acrlong  \acrlong[options]{label}[insert]

-

-


\Acrlong  \ACRlong[options]{label}[insert]

- - - -

-


\ACRlong  \ACRlong[options]{label}[insert]

-

-Print the long version with (if required) a hyperlink to the relevant entry in the -glossary. This is may be equivalent to \glsdesc, \glssymbol or \glsfirst (or their -uppercase variants), depending on package options. -


\acrfull  \acrfull[options]{label}[insert]

-

-


\Acrfull  \ACRfull[options]{label}[insert]

-

-


\ACRfull  \ACRfull[options]{label}[insert]

-

-Print the long version followed by the abbreviation in brackets with (if required) a -hyperlink to the relevant entry in the glossary. -

Note that if any of the above commands produce unexpected output and you -haven’t used any of the acronym-related package options, you will need to switch off the -sanitization. For example: - - - -

-
-\usepackage[sanitize=none]{glossaries} -
-

However, if you do this, you must remember to protect fragile commands when defining -acronyms or glossary entries.

-

-

Note that if you change the definition of \newacronym, you may additionally need to -change the above commands as well as changing the way the text is displayed using -\defglsdisplay and \defglsdisplayfirst. -

The package option shortcuts provides the synonyms listed in table 6. If any of -those commands generate an “undefined control sequence” error message, check -that you have enabled the shortcuts using the shortcuts package option. Note -that there are no shortcuts for the commands that produce all upper case -text. -

-
- - - -


- - - -
Table 6: Synonyms provided by the package option shortcuts
-
-

-

-
- - - - - - - - - - - - - - - -
Shortcut CommandEquivalent Command
\acs \acrshort
\Acs \Acrshort
\acsp \acrshortpl
\Acsp \Acrshortpl
\acl \acrlong
\Acl \Acrlong
\aclp \acrlongpl
\Aclp \Acrlongpl
\acf \acrfull
\Acf \Acrfull
\acfp \acrfullpl
\Acfp \Acrfullpl
\ac \gls
\Ac \Gls
\acp \glspl
\Acp \Glspl
-
- - - -

-
-

Top

2.10.1 Defining A Custom Acronym Style
-

You may find that the predefined acronyms styles that come with the glossaries package -don’t suit your requirements. In this case you can define your own style. This is done by -redefining the following commands: -


\CustomAcronymFields  \CustomAcronymFields

-

-This command sets up the keys for \newglossaryentry when you define an acronym -using \newacronym. Within the definition of \CustomAcronymFields, you may use -\the\glslongtok to access the long form, \the\glsshorttok to access the short form -and \the\glslabeltok to access the label. This command is typically used to set the -name, first, firstplural, text and plural keys. It may also be used to set the symbol or -description keys depending on your requirements. -


\SetCustomDisplayStyle  \SetCustomDisplayStyle{type}

-

-This is used to set up the display style for the glossary given by type. This should -typically just use \defglsdisplayfirst and \defglsdisplay. -

Once you have redefined \CustomAcronymFields and \SetCustomDisplayStyle, -you must then switch to this style using -


\SetCustomStyle  \SetCustomStyle

-

-Note that you may still use the shortcuts package option with your custom -style. -

If you omit \SetCustomStyle, or use it before you redefine \CustomAcronymFields -and \SetCustomDisplayStyle, your new style won’t be correctly implemented. You -must set up the custom style before defining new acronyms. The acronyms must be -defined using \newacronym not \newglossaryentry.
-

-

As an example, suppose I want my acronym on first use to have the short form in -the text and the long form with the description in a footnote. Suppose also that I want -the short form to be put in small caps in the main body of the document, but I want -it in normal capitals in the list of acronyms. In my list of acronyms, I want -the long form as the name with the short form in brackets followed by the -description. -

First, I need to redefine \CustomAcronymFields so that \newacronym will correctly -set the name, text and plural keys. I want the long form to be stored in the -name and the short form to be stored in text. In addition, I’m going to set the -symbol to the short form in upper case so that it will appear in the list of -acronyms. - - - -

-
-\renewcommand*{\CustomAcronymFields}{% - 
  name={\the\glslongtok},% - 
  symbol={\MakeUppercase{\the\glsshorttok}},% - 
  text={\textsc{\the\glsshorttok}},% - 
  plural={\textsc{\the\glsshorttok}s}% - 
} -
-

-

Note that in this case I haven’t bothered with \acrpluralsuffix and have just -inserted an “s”. -

When I use the custom acronym style, the short form is stored in user1, -the plural short form is stored in user2, the long form is stored in user3 and -the plural long form is stored in user4. So when I use \defglsdisplayfirst -and \defglsdisplay, I can use \glsentryuseriii to access the long form. -Recall from §2.4.1 Changing the format of the link text, that the optional -argument to \defglsdisplayfirst and \defglsdisplay indicates the glossary -type. This is passed to \SetCustomDisplayStyle. The mandatory argument -sets up the definition of \glsdisplayfirst and \glsdisplay for the given -glossary, where the first argument corresponds to the first, firstplural, text or -plural, as appropriate, the second argument corresponds to the description, -the third corresponds to the symbol and the fourth argument is the inserted -text. - - - -

-
-\renewcommand*{\SetCustomDisplayStyle}[1]{% - 
  \defglsdisplayfirst[#1]{##1##4\protect\footnote{% - 
    \glsentryuseriii{\glslabel}: ##2% - 
  }} - 
  \defglsdisplay[#1]{##1##4}% - 
} -
-

-

Since we have a definition inside a definition, #1 refers to the argument of -\SetCustomDisplayStyle, and ##1, …, ##4, refer to the arguments of \glsdisplayfirst -and \glsdisplay. -

Now that I’ve redefined \CustomAcronymFields and \SetCustomDisplayStyle, I -can set this style using - - - -

-
-\SetCustomStyle -
-

and now I can define my acronyms: - - - -

-
-\newacronym[description={set of tags for use in developing hypertext - 
documents}]{html}{html}{Hyper Text Markup Language} - 
\newacronym[description={language used to describe the layout of a - 
document written in a markup language}]{css}{css}{Cascading Style - 
Sheet} -
-

-

Note that since I’ve used the description in the main body of the text, I need to -switch off the sanitization otherwise any commands within the description won’t get -interpreted. Also I want to use the hyperref package, but this will cause a problem on -first use as I’ll get nested hyperlinks, so I need to switch off the hyperlinks on first use. -In addition, I want to use a glossary style that displays the symbol. Therefore, in my -preamble I have: - - - -

-
-\usepackage[colorlinks]{hyperref} - 
\usepackage[acronym,         % create list of acronyms - 
            nomain,          % don’t need main glossary for this example - 
            style=tree,      % need a style that displays the symbol - 
            hyperfirst=false,% don’t hyperlink first use - 
            sanitize=none    % switch off sanitization as description - 
                             % will be used in the main text - 
            ]{glossaries} -
-

-

Note that I haven’t used the description or footnote package options. -

-

-

Top

2.10.2 Upgrading From the glossary Package
-

Users of the obsolete glossary package may recall that the syntax used to define new -acronyms has changed with the replacement glossaries package. In addition, the old -glossary package created the command \acr-namewhen defining the acronym -acr-name. -

In order to facilitate migrating from the old package to the new one, the glossaries -package11 -provides the command: -


\oldacronym  \oldacronym[label]{abbrv}{long}{key-val list}

-

-This uses the same syntax as the glossary package’s method of defining acronyms. It is -equivalent to:
\newacronym[key-val list]{label}{abbrv}{long}
In addition, \oldacronym also defines the commands \label, which is equivalent to -\gls{label}, and \label*, which is equivalent to \Gls{label}. If labelis omitted, -abbrvis used. Since commands names must consist only of alphabetical characters, -labelmust also only consist of alphabetical characters. Note that \labeldoesn’t -allow you to use the first optional argument of \gls or \Gls — you will need to -explicitly use \gls or \Gls to change the settings. -

Recall that, in general, LATEX ignores spaces following command names -consisting of alphabetical characters. This is also true for \labelunless you -additionally load the xspace package.
-

- - - -

The glossaries package doesn’t load the xspace package since there are both -advantages and disadvantages to using \xspace in \label. If you don’t use the xspace -package you need to explicitly force a space using \␣ (backslash space) however you can -follow \labelwith additional text in square brackets (the final optional argument to -\gls). If you use the xspace package you don’t need to escape the spaces but you -can’t use the optional argument to insert text (you will have to explicitly use -\gls). -

To illustrate this, suppose I define the acronym “abc” as follows: - - - -

-
-\oldacronym{abc}{example acronym}{} -
-

This will create the command \abc and its starred version \abc*. Table 7 illustrates -the effect of \abc (on subsequent use) according to whether or not the xspace package -has been loaded. As can be seen from the final row in the table, the xspace package -prevents the optional argument from being recognised. -

-
- - - -


- - - -
Table 7: The effect of using xspace with \oldacronym
-
- - - - -
Code With xspaceWithout xspace
\abc. abc. abc.
\abc xyz abc xyz abcxyz
\abc\ xyz abc xyz abc xyz
\abc* xyz Abc xyz Abc xyz
\abc[’s] xyzabc [’s] xyz abc’s xyz
-
- - - -

-
-

Top

2.11 Unsetting and Resetting Entry Flags

-

When using \gls, \glspl and their uppercase variants it is possible that you may want -to use the value given by the first key, even though you have already used the glossary -entry. Conversely, you may want to use the value given by the text key, even though you -haven’t used the glossary entry. The former can be achieved by one of the following -commands: -


\glsreset  \glsreset{label}

-

-


\glslocalreset  \glslocalreset{label}

-

-while the latter can be achieved by one of the following commands: -


\glsunset  \glsunset{label}

-

-


\glslocalunset  \glslocalunset{label}

-

-You can also reset or unset all entries for a given glossary or list of glossaries -using: -


\glsresetall  \glsresetall[glossary list]

-

-


\glslocalresetall  \glslocalresetall[glossary list]

-

-


\glsunsetall  \glsunsetall[glossary list]

-

-


\glslocalunsetall  \glslocalunsetall[glossary list]

-

-where glossary listis a comma-separated list of glossary labels. If omitted, all defined -glossaries are assumed. For example, to reset all entries in the main glossary and the list -of acronyms: - - - -

-
-\glsresetall[main,acronym] -
-

-

You can determine whether an entry’s first use flag is set using: -


\ifglsused  \ifglsused{label}{true part}{false part}

-

-where labelis the label of the required entry. If the entry has been used, true part -will be done, otherwise false partwill be done. -

-

-

Top

2.12 Glossary Styles

-

The glossaries package comes with some pre-defined glossary styles. Note that the styles -are suited to different types of glossaries: some styles ignore the associated symbol; -some styles are not designed for hierarchical entries, so they display sub-entries in -the same way as they display top level entries; some styles are designed for -homographs, so they ignore the name for sub-entries. You should therefore pick a style -that suits your type of glossary. See table 8 for a summary of the available -styles. -

-
- - - -


- - - -
Table 8: Glossary Styles. An asterisk in the style name indicates anything that -matches that doesn’t match any previously listed style (e.g. long3col* matches -long3col, long3colheader, long3colborder and long3colheaderborder). A maximum -level of 0 indicates a flat glossary (sub-entries are displayed in the same way as -main entries). Where the maximum level is given as — there is no limit, but -note that makeindex imposes a limit of 2 sub-levels. If the homograph column is -checked, then the name is not displayed for sub-entries. If the symbol column is -checked, then the symbol will be displayed if it has been defined.
-
- - - - - - - - - - - - -
Style Maximum LevelHomographSymbol
listdotted 0
sublistdotted 1
list* 1
altlist* 1 -
long*3col* 1 -
long4col* 1
altlong*4col* 1
long* 1
super*3col* 1
super4col* 1
altsuper*4col* 1
super* 1
index* 2
treenoname*
tree*
alttree*
- - - -

-
-

The glossary style can be set using the style key in the optional argument to -\printglossary or using the command: -


\glossarystyle  \glossarystyle{style-name}

-

-Some of the glossary styles may also be set using the style package option, it depends if -the package in which they are defined is automatically loaded by the glossaries -package. -

The tabular-like styles that allow multi-line descriptions and page lists use the -length \glsdescwidth \glsdescwidth to set the width of the description column and -the length \glspagelistwidth \glspagelistwidth to set the width of the page list -column.12 -These will need to be changed using \setlength if the glossary is too wide. Note that -the long4col and super4col styles (and their header and border variations) don’t use -these lengths as they are designed for single line entries. Instead you should use the -analogous altlong4col and altsuper4col styles. If you want to explicitly create a line-break -within a multi-line description in a tabular-like style you should use \newline instead -of \\. -

Note that if you use the style key in the optional argument to \printglossary, it -will override any previous style settings for the given glossary, so if, for example, you -do - - - -

-
-\renewcommand*{\glsgroupskip}{} - 
\printglossary[style=long] -
-

then the new definition of \glsgroupskip will not have an affect for this glossary, as -\glsgroupskip is redefined by style=long. Likewise, \glossarystyle will also -override any previous style definitions, so, again - - - -

-
-\renewcommand*{\glsgroupskip}{} - 
\glossarystyle{long} -
-

will reset \glsgroupskip back to its default definition for the named glossary style -(long in this case). If you want to modify the styles, either use \newglossarystyle -(described in the next section) or make the modifications after \glossarystyle, -e.g.: - - - -

-
-\glossarystyle{long} - 
\renewcommand*{\glsgroupskip}{} -
-

- -

All the styles except for the three- and four-column styles and the listdotted style use -the command -


\glspostdescription  \glspostdescription

-

-after the description. This simply displays a full stop by default. To eliminate this -full stop (or replace it with something else, say, a comma) you will need to -redefine \glspostdescription before the glossary is displayed. Alternatively, -you can suppress it for a given entry by placing \nopostdesc in the entry’s -description. -

-

Top

2.12.1 List Styles
-

The styles described in this section are all defined in the package glossary-list. Since they -all use the description environment, they are governed by the same parameters as that -environment. These styles all ignore the entry’s symbol. Note that these styles -will automatically be available unless you use the nolist or nostyles package -options. -

-

-list
The list style uses the description environment. The entry name is placed in - the optional argument of the \item command (so it will appear in bold by - default). The description follows, and then the associated number list for that - entry. The symbol is ignored. If the entry has child entries, the description - and number list follows (but not the name) for each child entry. Groups are - separated using \indexspace. -
-listgroup
The listgroup style is like list but the glossary groups have headings. -
-listhypergroup
The listhypergroup style is like listgroup but has a navigation line at - the start of the glossary with links to each group that is present in the glossary. - This requires an additional run through LATEX to ensure the group - information is up to date. In the navigation line, each group is separated - by - - - -


\glshypernavsep  \glshypernavsep

-

- which defaults to a vertical bar with a space on either side. For example, to - simply have a space separating each group, do: - - - -

-
- \renewcommand*{\glshypernavsep}{\space} -
-

-

Note that the hyper-navigation line is now (as from version 1.14) set inside the - optional argument to \item instead of after it to prevent a spurious - space at the start. This can be changed by redefining \glossaryheader, - but note that this needs to be done after the glossary style has been - set. -

-altlist
The altlist style is like list but the description starts on the line following the - name. (As with the list style, the symbol is ignored.) Each child entry starts a new - line, but as with the list style, the name associated with each child entry is - ignored. -
-altlistgroup
The altlistgroup style is like altlist but the glossary groups have - headings. -
-altlisthypergroup
The altlisthypergroup style is like altlistgroup but has a set of links - to the glossary groups. The navigation line is the same as that for listhypergroup, - described above. -
-listdotted
This style uses the description - environment.13 - Each entry starts with \item[], followed by the name followed by a dotted line, - followed by the description. Note that this style ignores both the number list and - the symbol. The length -


\glslistdottedwidth  \glslistdottedwidth

-

- governs where the description should start. This is a flat style, so child entries are - formatted in the same way as the parent entries. -

-sublistdotted
This is a variation on the listdotted style designed for hierarchical - glossaries. The main entries have just the name displayed. The sub entries are - displayed in the same manner as listdotted.
- - - -

-

-

Top

2.12.2 Longtable Styles
-

The styles described in this section are all defined in the package glossary-long. Since -they all use the longtable environment, they are governed by the same parameters -as that environment. Note that these styles will automatically be available -unless you use the nolong or nostyles package options. These styles fully justify -the description and page list columns. If you want ragged right formatting -instead, use the analogous styles described in §2.12.3 Longtable Styles (Ragged -Right). -

-

-long
The long style uses the longtable environment (defined by the longtable - package). It has two columns: the first column contains the entry’s name and - the second column contains the description followed by the number list. The - entry’s symbol is ignored. Sub groups are separated with a blank row. The - width of the first column is governed by the widest entry in that column. - The width of the second column is governed by the length \glsdescwidth. - Child entries have a similar format to the parent entries except that their - name is suppressed. -
-longborder
The longborder style is like long but has horizontal and vertical lines - around it. -
-longheader
The longheader style is like long but has a header row. -
-longheaderborder
The longheaderborder style is like longheader but has - horizontal and vertical lines around it. -
-long3col
The long3col style is like long but has three columns. The first column - contains the entry’s name, the second column contains the description and - the third column contains the number list. The entry’s symbol is ignored. The - width of the first column is governed by the widest entry in that column, the - width of the second column is governed by the length \glsdescwidth, and - the width of the third column is governed by the length \glspagelistwidth. -
-long3colborder
The long3colborder style is like the long3col style but has - horizontal and vertical lines around it. -
-long3colheader
The long3colheader style is like long3col but has a header row. - - - -
-long3colheaderborder
The long3colheaderborder style is like long3colheader but - has horizontal and vertical lines around it. -
-long4col
The long4col style is like long3col but has an additional column in which - the entry’s associated symbol appears. This style is used for brief single line - descriptions. The column widths are governed by the widest entry in the - given column. Use altlong4col for multi-line descriptions. -
-long4colborder
The long4colborder style is like the long4col style but has - horizontal and vertical lines around it. -
-long4colheader
The long4colheader style is like long4col but has a header row. -
-long4colheaderborder
The long4colheaderborder style is like long4colheader but - has horizontal and vertical lines around it. -
-altlong4col
The altlong4col style is like long4col but allows multi-line descriptions - and page lists. The width of the description column is governed by the length - \glsdescwidth and the width of the page list column is governed by the - length \glspagelistwidth. The widths of the name and symbol columns - are governed by the widest entry in the given column. -
-altlong4colborder
The altlong4colborder style is like the long4colborder but - allows multi-line descriptions and page lists. -
-altlong4colheader
The altlong4colheader style is like long4colheader but allows - multi-line descriptions and page lists. -
-altlong4colheaderborder
The altlong4colheaderborder - style is like long4colheaderborder but allows multi-line descriptions and page - lists.
-

-

-

Top

2.12.3 Longtable Styles (Ragged Right)
-

The styles described in this section are all defined in the package glossary-longragged. -These styles are analogous to those defined in glossary-long but the multiline -columns are left justified instead of fully justified. Since these styles all use - - - -the longtable environment, they are governed by the same parameters as that -environment. The glossary-longragged package additionally requires the array -package. Note that these styles will only be available if you explicitly load -glossary-longragged: - - - -

-
-\usepackage{glossaries} - 
\usepackage{glossary-longragged} -
-

Note that you can’t set these styles using the style package option since the styles -aren’t defined until after the glossaries package has been loaded. -

-

-longragged
The longragged style has two columns: the first column contains the - entry’s name and the second column contains the (left-justified) description - followed by the number list. The entry’s symbol is ignored. Sub groups are - separated with a blank row. The width of the first column is governed by the - widest entry in that column. The width of the second column is governed by - the length \glsdescwidth. Child entries have a similar format to the parent - entries except that their name is suppressed. -
-longraggedborder
The longraggedborder style is like longragged but has - horizontal and vertical lines around it. -
-longraggedheader
The longraggedheader style is like longragged but has a header - row. -
-longraggedheaderborder
The - longraggedheaderborder style is like longraggedheader but has horizontal and - vertical lines around it. -
-longragged3col
The longragged3col style is like longragged but has three - columns. The first column contains the entry’s name, the second column - contains the (left justified) description and the third column contains the - (left justified) number list. The entry’s symbol is ignored. The width of the - first column is governed by the widest entry in that column, the width of - the second column is governed by the length \glsdescwidth, and the width - of the third column is governed by the length \glspagelistwidth. -
-longragged3colborder
The longragged3colborder style is like the longragged3col - style but has horizontal and vertical lines around it. -
-longragged3colheader
The longragged3colheader style is like longragged3col but - has a header row. - - - -
-longragged3colheaderborder
The longragged3colheaderborder style is like - longragged3colheader but has horizontal and vertical lines around it. -
-altlongragged4col
The altlongragged4col style is like longragged3col but has an - additional column in which the entry’s associated symbol appears. The width - of the description column is governed by the length \glsdescwidth and the - width of the page list column is governed by the length \glspagelistwidth. - The widths of the name and symbol columns are governed by the widest - entry in the given column. -
-altlongragged4colborder
The - altlongragged4colborder style is like the altlongragged4col but has horizontal - and vertical lines around it. -
-altlongragged4colheader
The altlongragged4colheader style is like - altlongragged4col but has a header row. -
-altlongragged4colheaderborder
The altlongragged4colheaderborder style is like - altlongragged4colheader but has horizontal and vertical lines around it. -
-

-

-

Top

2.12.4 Supertabular Styles
-

The styles described in this section are all defined in the package glossary-super. Since -they all use the supertabular environment, they are governed by the same parameters -as that environment. Note that these styles will automatically be available -unless you use the nosuper or nostyles package options. In general, the longtable -environment is better, but there are some circumstances where it is better to use -supertabular.14 -These styles fully justify the description and page list columns. If you want ragged right -formatting instead, use the analogous styles described in §2.12.5 Supertabular Styles -(Ragged Right). -

-

-super
The super style uses the supertabular environment (defined by the - supertabular package). It has two columns: the first column contains the - entry’s name and the second column contains the description followed by the - number list. The entry’s symbol is ignored. Sub groups are separated with - - - - a blank row. The width of the first column is governed by the widest entry - in that column. The width of the second column is governed by the length - \glsdescwidth. Child entries have a similar format to the parent entries - except that their name is suppressed. -
-superborder
The superborder style is like super but has horizontal and vertical - lines around it. -
-superheader
The superheader style is like super but has a header row. -
-superheaderborder
The superheaderborder style is like superheader but has - horizontal and vertical lines around it. -
-super3col
The super3col style is like super but has three columns. The - first column contains the entry’s name, the second column contains the - description and the third column contains the number list. The entry’s - symbol is ignored. The width of the first column is governed by the widest - entry in that column. The width of the second column is governed by the - length \glsdescwidth. The width of the third column is governed by the - length \glspagelistwidth. -
-super3colborder
The super3colborder style is like the super3col style but has - horizontal and vertical lines around it. -
-super3colheader
The super3colheader style is like super3col but has a header - row. -
-super3colheaderborder
The super3colheaderborder style is like super3colheader - but has horizontal and vertical lines around it. -
-super4col
The super4col style is like super3col but has an additional column in - which the entry’s associated symbol appears. This style is designed for entries - with brief single line descriptions. The column widths are governed by the - widest entry in the given column. Use altsuper4col for multi-line descriptions. -
-super4colborder
The super4colborder style is like the super4col style but has - horizontal and vertical lines around it. -
-super4colheader
The super4colheader style is like super4col but has a header - row. - - - -
-super4colheaderborder
The super4colheaderborder style is like super4colheader - but has horizontal and vertical lines around it. -
-altsuper4col
The altsuper4col style is like super4col but allows multi-line - descriptions and page lists. The width of the description column is governed - by the length \glsdescwidth and the width of the page list column is - governed by the length \glspagelistwidth. The width of the name and - symbol columns is governed by the widest entry in the given column. -
-altsuper4colborder
The altsuper4colborder style is like the super4colborder style - but allows multi-line descriptions and page lists. -
-altsuper4colheader
The altsuper4colheader style is like super4colheader but - allows multi-line descriptions and page lists. -
-altsuper4colheaderborder
The altsuper4colheaderborder style is like - super4colheaderborder but allows multi-line descriptions and page lists.
-

-

-

Top

2.12.5 Supertabular Styles (Ragged Right)
-

The styles described in this section are all defined in the package glossary-superragged. -These styles are analogous to those defined in glossary-super but the multiline -columns are left justified instead of fully justified. Since these styles all use the -supertabular environment, they are governed by the same parameters as that -environment. The glossary-superragged package additionally requires the array -package. Note that these styles will only be available if you explicitly load -glossary-superragged: - - - -

-
-\usepackage{glossaries} - 
\usepackage{glossary-superragged} -
-

Note that you can’t set these styles using the style package option since the styles -aren’t defined until after the glossaries package has been loaded. -

-

-superragged
The superragged style uses the supertabular environment (defined by - the supertabular package). It has two columns: the first column contains the - entry’s name and the second column contains the (left justified) description - followed by the number list. The entry’s symbol is ignored. Sub groups are - separated with a blank row. The width of the first column is governed by the - widest entry in that column. The width of the second column is governed by - the length \glsdescwidth. Child entries have a similar format to the parent - entries except that their name is suppressed. -
-superraggedborder
The superraggedborder style is like superragged but has - horizontal and vertical lines around it. -
-superraggedheader
The superraggedheader style is like superragged but has a - header row. -
-superraggedheaderborder
The superraggedheaderborder style is like - superraggedheader but has horizontal and vertical lines around it. -
-superragged3col
The superragged3col style is like superragged but has three - columns. The first column contains the entry’s name, the second column - contains the (left justified) description and the third column contains the - (left justified) number list. The entry’s symbol is ignored. The width of the - first column is governed by the widest entry in that column. The width of - the second column is governed by the length \glsdescwidth. The width of - the third column is governed by the length \glspagelistwidth. -
-superragged3colborder
The superragged3colborder style - is like the superragged3col style but has horizontal and vertical lines around - it. - - - -
-superragged3colheader
The superragged3colheader style is like superragged3col - but has a header row. -
-superragged3colheaderborder
The superragged3colheaderborder style is like - superragged3colheader but has horizontal and vertical lines around it. -
-altsuperragged4col
The altsuperragged4col style is like superragged3col but has - an additional column in which the entry’s associated symbol appears. The - column widths for the name and symbol column are governed by the widest - entry in the given column. -
-altsuperragged4colborder
The altsuperragged4colborder style is like the - altsuperragged4col style but has horizontal and vertical lines around it. -
-altsuperragged4colheader
The altsuperragged4colheader style is like - altsuperragged4col but has a header row. -
-altsuperragged4colheaderborder
The altsuperragged4colheaderborder style is - like altsuperragged4colheader but has horizontal and vertical lines around it. -
-

-

-

Top

2.12.6 Tree-Like Styles
-

The styles described in this section are all defined in the package glossary-tree. These -styles are designed for hierarchical glossaries but can also be used with glossaries that -don’t have sub-entries. These styles will display the entry’s symbol if it exists. Note that -these styles will automatically be available unless you use the notree or nostyles package -options. -

-

-index
The index style is similar to the way indices are usually formatted in that - it has a hierarchical structure up to three levels (the main level plus two - sub-levels). The name is typeset in bold, and if the symbol is present it is - set in parentheses after the name and before the description. Sub-entries are - indented and also include the name, the symbol in brackets (if present) and - the description. Groups are separated using \indexspace. - - - -
-indexgroup
The indexgroup style is similar to the index style except that each - group has a heading. -
-indexhypergroup
The indexhypergroup style is like indexgroup but has a set of - links to the glossary groups. The navigation line is the same as that for - listhypergroup, described above. -
-tree
The tree style is similar to the index style except that it can have arbitrary - levels. (Note that makeindex is limited to three levels, so you will need to - use xindy if you want more than three levels.) Each sub-level is indented by - \glstreeindent \glstreeindent. Note that the name, symbol (if present) - and description are placed in the same paragraph block. If you want the - name to be apart from the description, use the alttree style instead. (See - below.) -
-treegroup
The treegroup style is similar to the tree style except that each group - has a heading. -
-treehypergroup
The treehypergroup style is like treegroup but has a set of links to - the glossary groups. The navigation line is the same as that for listhypergroup, - described above. -
-treenoname
The treenoname style is like the tree style except that the name for - each sub-entry is ignored. -
-treenonamegroup
The treenonamegroup style is similar to the treenoname style - except that each group has a heading. -
-treenonamehypergroup
The treenonamehypergroup - style is like treenonamegroup but has a set of links to the glossary groups. - The navigation line is the same as that for listhypergroup, described above. -
-alttree
The alttree style is similar to the tree style except that the indentation for each - level is determined by the width of the text specified by -


\glssetwidest  \glssetwidest[level]{text}

-

- The optional argument levelindicates the level, where 0 indicates the top-most - level, 1 indicates the first level sub-entries, etc. If \glssetwidest hasn’t been - used for a given sub-level, the level 0 widest text is used instead. If levelis - omitted, 0 is assumed. - - - -

For each level, the name is placed to the left of the paragraph block containing the - symbol (optional) and the description. If the symbol is present, it is placed in - parentheses before the description. -

-alttreegroup
The alttreegroup is like the alttree style except that each group has a - heading. -
-alttreehypergroup
The alttreehypergroup style is like alttreegroup but has a set of - links to the glossary groups. The navigation line is the same as that for - listhypergroup, described above. -
-

-

-

Top

2.13 Defining your own glossary style

-

If the predefined styles don’t fit your requirements, you can define your own style -using: -


\newglossarystyle  \newglossarystyle{name}{definitions}

-

-where nameis the name of the new glossary style (to be used in \glossarystyle). -The second argument definitionsneeds to redefine all of the following: -


theglossary  theglossary

-

-This environment defines how the main body of the glossary should be typeset. Note -that this does not include the section heading, the glossary preamble (defined by -\glossarypreamble) or the glossary postamble (defined by \glossarypostamble). For -example, the list style uses the description environment, so the theglossary environment -is simply redefined to begin and end the description environment. -


\glossaryheader  \glossaryheader

-

-This macro indicates what to do at the start of the main body of the glossary. Note -that this is not the same as \glossarypreamble, which should not be affected by -changes in the glossary style. The list glossary style redefines \glossaryheader to do -nothing, whereas the longheader glossary style redefines \glossaryheader to do a -header row. -


\glsgroupheading  \glsgroupheading{label}

-

-This macro indicates what to do at the start of each logical block within the main body -of the glossary. If you use makeindex the glossary is sub-divided into a maximum of -twenty-eight logical blocks that are determined by the first character of the sort key (or -name key if the sort key is omitted). The sub-divisions are in the following order: -symbols, numbers, A, …, Z. If you use xindy, the sub-divisions depend on the language - - - -settings. -

Note that the argument to \glsgroupheading is a label not the group title. The -group title can be obtained via -


\glsgetgrouptitle  \glsgetgrouptitle{label}

-

-This obtains the title as follows: if \labelgroupname exists, this is taken to be the title, -otherwise the title is just label. -

A navigation hypertarget can be created using -


\glsnavhypertarget  \glsnavhypertarget{label}{text}

-

-For further details about \glsnavhypertarget, see the documented code of -glossary-hypernav in glossaries.pdf. -

Most of the predefined glossary styles redefine \glsgroupheading to simply -ignore its argument. The listhypergroup style redefines \glsgroupheading as -follows: - - - -

-
-\renewcommand*{\glsgroupheading}[1]{% - 
\item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]} -
-

See also \glsgroupskip below. (Note that command definitions within -\newglossarystyle must use ##1 instead of #1 etc.) -


\glsgroupskip  \glsgroupskip

-

-This macro determines what to do after one logical group but before the header for the -next logical group. The list glossary style simply redefines \glsgroupskip to be -\indexspace, whereas the tabular-like styles redefine \glsgroupskip to produce a -blank row. -


\glossaryentryfield  \glossaryentryfield{label}{formatted -name}{description}{symbol} {number list}

-

-This macro indicates what to do for a given glossary entry. Note that formatted name -will always be in the form \glsnamefont{name}. This allows the user to set a given -font for the entry name, regardless of the glossary style used. Note that labelis the -label used when the glossary entry was defined via either \newglossaryentry or -\newacronym. -

Each time you use a glossary entry it creates a hyperlink (if hyperlinks are enabled) -to the relevant line in the glossary. Your new glossary style must therefore -redefine \glossaryentryfield to set the appropriate target. This is done -using -


\glstarget  \glstarget{label}{text}

-

-where labelis the entry’s label. Note that you don’t need to worry about whether the -hyperref package has been loaded, as \glstarget won’t create a target if \hypertarget -hasn’t been defined. -

For example, the list style defines \glossaryentryfield as follows: - - - -

-
-\renewcommand*{\glossaryentryfield}[5]{% - 
\item[\glstarget{##1}{##2}] ##3\glspostdescription\space ##5} -
-

-

Note also that number listwill always be of the form
\glossaryentrynumbers{\relax
\setentrycounter{counter name}\glsnumberformat{number(s)}}
where number(s)may contain \delimN (to delimit individual numbers) and/or -\delimR (to indicate a range of numbers). There may be multiple occurrences of -\setentrycounter{counter name}\glsnumberformat{number(s)}, but note that -the entire number list is enclosed within the argument to \glossaryentrynumbers. The -user can redefine this to change the way the entire number list is formatted, regardless -of the glossary style. However the most common use of \glossaryentrynumbers is to -provide a means of suppressing the number list altogether. (In fact, the nonumberlist -option redefines \glossaryentrynumbers to ignore its argument.) Therefore, when you -define a new glossary style, you don’t need to worry about whether the user has -specified the nonumberlist package option. -


\glossarysubentryfield  \glossarysubentryfield{level}{label}{formatted -name}{description}{symbol} {number list}

-

-This is new to version 1.17, and is used to display sub-entries. The first argument, -level, indicates the sub-entry level. This must be an integer from 1 (first sub-level) -onwards. The remaining arguments are analogous to those for \glossaryentryfield -described above. -

For further details of these commands, see the documented code in -glossaries.pdf. -

-

-

Top

2.13.1 Example: creating a completely new style
-

If you want a completely new style, you will need to redefine all of the commands and -the environment listed above. -

For example, suppose you want each entry to start with a bullet point. This means -that the glossary should be placed in the itemize environment, so theglossary should -start and end that environment. Let’s also suppose that you don’t want anything -between the glossary groups (so \glsgroupheading and \glsgroupskip should do -nothing) and suppose you don’t want anything to appear immediately after - - - -\begin{theglossary} (so \glossaryheader should do nothing). In addition, let’s -suppose the symbol should appear in brackets after the name, followed by the -description and last of all the number list should appear within square brackets at -the end. Then you can create this new glossary style, called, say, mylist, as -follows: - - - -

-
- \newglossarystyle{mylist}{% - 
 % put the glossary in the itemize environment: - 
 \renewenvironment{theglossary}{\begin{itemize}}{\end{itemize}}% - 
 % have nothing after \begin{theglossary}: - 
 \renewcommand*{\glossaryheader}{}% - 
 % have nothing between glossary groups: - 
 \renewcommand*{\glsgroupheading}[1]{}% - 
 \renewcommand*{\glsgroupskip}{}% - 
 % set how each entry should appear: - 
 \renewcommand*{\glossaryentryfield}[5]{% - 
 \item % bullet point - 
 \glstarget{##1}{##2}% the entry name - 
 \space (##4)% the symbol in brackets - 
 \space ##3% the description - 
 \space [##5]% the number list in square brackets - 
 }% - 
 % set how sub-entries appear: - 
 \renewcommand*{\glossarysubentryfield}[6]{% - 
   \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% - 
 } -
-

Note that this style creates a flat glossary, where sub-entries are displayed in exactly -the same way as the top level entries. -

-

-

Top

2.13.2 Example: creating a new glossary style based on an existing style
- -

If you want to define a new style that is a slightly modified version of an existing style, -you can use \glossarystyle within the second argument of \newglossarystyle -followed by whatever alterations you require. For example, suppose you want a style like -the list style but you don’t want the extra vertical space created by \indexspace -between groups, then you can create a new glossary style called, say, mylist as -follows: - - - -

-
-\newglossarystyle{mylist}{% - 
\glossarystyle{list}% base this style on the list style - 
\renewcommand{\glsgroupskip}{}% make nothing happen between groups - 
} -
-

-

-

-

Top

2.13.3 Example: creating a glossary style that uses the user1, …, user6 -keys
-

Since \glossaryentryfield and \glossarysubentryfield provide the label for the -entry, it’s also possible to access the values of the generic user keys, such as user1. For -example, suppose each entry not only has an associated symbol, but also units (stored -in user1) and dimension (stored in user2). Then you can define a glossary style that -displays each entry in a longtable as follows: - - - -

-
-\newglossarystyle{long6col}{% - 
 % put the glossary in a longtable environment: - 
 \renewenvironment{theglossary}% - 
  {\begin{longtable}{lp{\glsdescwidth}cccp{\glspagelistwidth}}}% - 
  {\end{longtable}}% - 
 % Set the table’s header: - 
 \renewcommand*{\glossaryheader}{% - 
  \bfseries Term & \bfseries Description & \bfseries Symbol & - 
  \bfseries Units & \bfseries Dimensions & \bfseries Page List - 
  \\\endhead}% - 
 % No heading between groups: - 
  \renewcommand*{\glsgroupheading}[1]{}% - 
 % Main (level 0) entries displayed in a row: - 
  \renewcommand*{\glossaryentryfield}[5]{% - 
    \glstarget{##1}{##2}% Name - 
    & ##3% Description - 
    & ##4% Symbol - 
    & \glsentryuseri{##1}% Units - 
    & \glsentryuserii{##1}% Dimensions - 
    & ##5% Page list - 
    \\% end of row - 
  }% - 
 % Sub entries treated the same as level 0 entries: - 
 \renewcommand*{\glossarysubentryfield}[6]{% - 
  \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% - 
 % Nothing between groups: - 
 \renewcommand*{\glsgroupskip}{}% - 
} -
-

-

-

-

Top

2.14 Accessibility Support

-

Limited accessibility support is provided by the accompanying glossaries-accsupp -package, but note that this package is experimental and it requires the accsupp package -which is also listed as experimental. This package defines additional keys that may be -used when defining glossary entries. The keys are as follows: -

-access
The replacement text corresponding to the name key. -
-textaccess
The replacement text corresponding to the text key. - - - -
-firstaccess
The replacement text corresponding to the first key. -
-pluralaccess
The replacement text corresponding to the plural key. -
-firstpluralaccess
The replacement text corresponding to the firstplural key. -
-symbolaccess
The replacement text corresponding to the symbol key. -
-symbolpluralaccess
The replacement text corresponding to the symbolplural key. -
-descriptionaccess
The replacement text corresponding to the description key. -
-descriptionpluralaccess
The replacement text corresponding to the - descriptionplural key. -
-

For example: - - - -

-
-\newglossaryentry{tex}{name={\TeX},description={Document preparation - 
language},access={TeX}} -
-

Now \gls{tex} will be equivalent to - - - -

-
-\BeginAccSupp{ActualText=TeX}\TeX\EndAccSupp{} -
-

See the section “glossaries-accsupp code” in the document glossaries.pdf for further -details. It is recommended that you also read the accsupp documentation. -

-

-

Top

3 Mfirstuc Package

-

The glossaries bundle is supplied with the package mfirstuc which provides the -command: -


\makefirstuc  \makefirstuc{stuff }

-

-which makes the first object of stuff uppercase unless stuff starts with a control -sequence followed by a non-empty group, in which case the first object in the group is -converted to uppercase. Examples:

-
    -
  • \makefirstuc{abc} produces Abc -
  • -
  • \makefirstuc{\emph{abc}} produces Abc (\MakeUppercase has been - applied to the letter “a” rather than \emph.) Note however that - \makefirstuc{{\em abc}} produces ABC and {\makefirstuc{\em abc}} - produces abc. -
  • -
  • \makefirstuc{{\’a}bc} produces Ábc -
  • -
  • \makefirstuc{\ae bc} produces Æbc -
  • -
  • \makefirstuc{{\ae}bc} produces Æbc -
  • -
  • \makefirstuc{{ä}bc} produces Äbc -
-

Note that non-Latin or accented characters appearing at the start of the text must be -placed in a group (even if you are using the inputenc package) due to expansion -issues. - - - -

In version 1.02 of mfirstuc, a bug fix resulted in a change in output if the first -object is a control sequence followed by an empty group. Prior to version 1.02, -\makefirstuc{\ae{}bc} produced æBc. However as from version 1.02, it now produces -Æbc.
-

-

Note also that - - - -

-
-\newcommand{\abc}{abc} - 
\makefirstuc{\abc} -
-

produces: ABC. This is because the first object in the argument of \makefirstuc is -\abc, so it does \MakeUppercase\abc. Whereas: - - - -

-
-\newcommand{\abc}{abc} - 
\expandafter\makefirstuc\expandafter{\abc} -
-

produces: Abc. There is a short cut command which will do this:
-


\xmakefirstuc  \xmakefirstuc{stuff }

-

-This is equivalent to \expandafter\makefirstuc\expandafter{stuff }. -So - - - -

-
-\newcommand{\abc}{abc} - 
\xmakefirstuc{\abc} -
-

produces: Abc. -

If you want to use an alternative command to convert to uppercase, for example -\MakeTextUppercase,15 -you can redefine the internal command \@gls@makefirstuc. For example: - - - -

-
-\renewcommand{\@gls@makefirstuc}[1]{\MakeTextUppercase #1} -
-

(Remember that command names that contain the @ character must either be placed -in packages or be placed between \makeatletter and \makeatother.) - - - -

-

-

Top

Index

-

Symbols -

-
\@gls@codepage  1
-\@glsorder  2
-\@istfilename  3
-\@newglossary  4
-\@xdylanguage  5
-

A -\Ac  6
-\ac  7
-accsupp package  8, 9
-\Acf  10
-\acf  11
-\Acfp  12
-\acfp  13
-\Acl  14
-\acl  15
-\Aclp  16
-\aclp  17
-\Acp  18
-\acp  19
-\ACRfull  20
-\Acrfull  21, 22
-\acrfull  23, 24
-\Acrfullpl  25
-\acrfullpl  26
-\ACRlong  27
-\Acrlong  28, 29
-\acrlong  30, 31, 32
-\Acrlongpl  33
-\acrlongpl  34
-\acrnameformat  35, 36, 37
-\acronymfont  38, 39, 40, 41, 42
-\acronymname  43
-\acronymtype  44, 45, 46, 47, 48, 49, 50, 51
-\acrpluralsuffix  52
-\ACRshort  53
- - - -\Acrshort  54, 55
-\acrshort  56, 57, 58
-\Acrshortpl  59
-\acrshortpl  60
-\Acs  61
-\acs  62
-\Acsp  63
-\acsp  64
-array package  65, 66
-

B -babel package  67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
-

C -\CustomAcronymFields  78, 79, 80
-

D -\defglsdisplay  81, 82, 83, 84, 85, 86
-\defglsdisplayfirst  87, 88, 89, 90, 91, 92
-description (environment)  93, 94, 95, 96, 97
-\descriptionname  98
-

E -\emph  99
-\entryname  100
-environments:
-    description  101, 102, 103, 104, 105
-    equation  106
-    itemize  107
-    longtable  108, 109, 110, 111, 112
-    supertabular  113, 114, 115, 116, 117
-    theglossary  118, 119, 120, 121
-equation (environment)  122
-

F -file types
-    .alg  123
-    .aux  124, 125
-    .glg  126, 127, 128, 129
-    .glo  130, 131, 132
-    .gls  133, 134, 135
- - - -    .ist  136, 137, 138, 139, 140, 141
-    .log  142
-    .tex  143, 144
-    .xdy  145, 146, 147, 148, 149, 150, 151
-first use  152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173
-    flag  174, 175, 176, 177, 178, 179, 180, 181, 182, 183
-    text  184, 185, 186, 187
-\firstacronymfont  188
-flowfram package  189
-fmtcount package  190
-

G -german package  191
-glossaries-accsupp package  192, 193
-glossaries-babel package  194, 195, 196
-glossaries-polyglossia package  197, 198, 199
-glossary package  200, 201, 202, 203, 204
-glossary styles:
-    altlist  205, 206
-    altlistgroup  207, 208
-    altlisthypergroup  209
-    altlong4col  210, 211, 212
-    altlong4colborder  213
-    altlong4colheader  214
-    altlong4colheaderborder  215
-    altlongragged4col  216, 217, 218
-    altlongragged4colborder  219
-    altlongragged4colheader  220, 221
-    altlongragged4colheaderborder  222
-    altsuper4col  223, 224, 225
-    altsuper4colborder  226
-    altsuper4colheader  227
-    altsuper4colheaderborder  228
-    altsuperragged4col  229, 230, 231
-    altsuperragged4colborder  232
-    altsuperragged4colheader  233, 234
-    altsuperragged4colheaderborder  235
-    alttree  236, 237, 238
-    alttreegroup  239, 240
-    alttreehypergroup  241
-    index  242, 243, 244, 245, 246
-    indexgroup  247, 248
-    indexhypergroup  249
-    list  250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260
-    listdotted  261, 262, 263
- - - -    listgroup  264, 265
-    listhypergroup  266, 267, 268, 269, 270, 271, 272
-    long  273, 274, 275, 276, 277
-    long3col  278, 279, 280, 281, 282
-    long3colborder  283, 284
-    long3colheader  285, 286, 287
-    long3colheaderborder  288, 289
-    long4col  290, 291, 292, 293, 294
-    long4colborder  295, 296
-    long4colheader  297, 298, 299
-    long4colheaderborder  300, 301
-    longborder  302
-    longheader  303, 304, 305
-    longheaderborder  306
-    longragged  307, 308, 309, 310
-    longragged3col  311, 312, 313, 314
-    longragged3colborder  315
-    longragged3colheader  316, 317
-    longragged3colheaderborder  318
-    longraggedborder  319
-    longraggedheader  320, 321
-    longraggedheaderborder  322
-    super  323, 324, 325, 326
-    super3col  327, 328, 329, 330
-    super3colborder  331
-    super3colheader  332, 333
-    super3colheaderborder  334
-    super4col  335, 336, 337, 338, 339
-    super4colborder  340, 341
-    super4colheader  342, 343, 344
-    super4colheaderborder  345, 346
-    superborder  347
-    superheader  348, 349
-    superheaderborder  350
-    superragged  351, 352, 353, 354
-    superragged3col  355, 356, 357, 358
-    superragged3colborder  359
-    superragged3colheader  360, 361
-    superragged3colheaderborder  362
-    superraggedborder  363
-    superraggedheader  364, 365
-    superraggedheaderborder  366
-    tree  367, 368, 369, 370
-    treegroup  371, 372
-    treehypergroup  373
-    treenoname  374, 375
- - - -    treenonamegroup  376, 377
-    treenonamehypergroup  378
-glossary-hypernav package  379
-glossary-list package  380, 381, 382
-glossary-long package  383, 384, 385, 386
-glossary-longragged package  387, 388, 389
-glossary-super package  390, 391, 392, 393
-glossary-superragged package  394, 395, 396
-glossary-tree package  397, 398, 399
-\glossaryentryfield  400, 401, 402
-\glossaryentrynumbers  403
-\glossaryheader  404, 405, 406
-\glossarymark  407, 408, 409
-\glossaryname  410
-\glossarypostamble  411
-\glossarypreamble  412
-\glossarystyle  413, 414, 415, 416, 417
-\glossarysubentryfield  418, 419
-\GLS  420
-\Gls  421, 422, 423, 424, 425, 426
-\gls  427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444
-\glsadd  445
-\glsaddall  446, 447
-\glsaddall options
-    types  448
-\GlsAddXdyAttribute  449, 450
-\GlsAddXdyLocation  451
-\glsautoprefix  452
-\glsclearpage  453
-\glsclosebrace  454
-\glsdefaulttype  455, 456
-\GLSdesc  457
-\Glsdesc  458
-\glsdesc  459, 460
-\glsdescwidth  461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472
-\glsdisablehyper  473
-\glsdisp  474, 475, 476, 477, 478
-\glsdisplay  479, 480, 481, 482, 483, 484, 485, 486
-\glsdisplayfirst  487, 488, 489, 490, 491, 492, 493, 494
-\glsenablehyper  495
-\Glsentrydesc  496
-\glsentrydesc  497
-\Glsentrydescplural  498
-\glsentrydescplural  499
-\Glsentryfirst  500
-\glsentryfirst  501
- - - -\Glsentryfirstplural  502
-\glsentryfirstplural  503
-\Glsentryname  504
-\glsentryname  505, 506
-\Glsentryplural  507
-\glsentryplural  508
-\Glsentrysymbol  509
-\glsentrysymbol  510
-\Glsentrysymbolplural  511
-\glsentrysymbolplural  512
-\Glsentrytext  513
-\glsentrytext  514
-\Glsentryuseri  515
-\glsentryuseri  516
-\Glsentryuserii  517
-\glsentryuserii  518
-\Glsentryuseriii  519
-\glsentryuseriii  520, 521
-\Glsentryuseriv  522
-\glsentryuseriv  523
-\Glsentryuserv  524
-\glsentryuserv  525
-\Glsentryuservi  526
-\glsentryuservi  527
-\GLSfirst  528
-\Glsfirst  529
-\glsfirst  530, 531
-\GLSfirstplural  532
-\Glsfirstplural  533
-\glsfirstplural  534
-\glsgetgrouptitle  535
-\glsgroupheading  536, 537
-\glsgroupskip  538, 539, 540, 541
-\glshyperlink  542, 543
-\glshypernavsep  544
-\glslabel  545
-\glslabeltok  546
-\glslink  547, 548, 549, 550, 551, 552
-\glslink options
-    counter  553
-    format  554, 555, 556, 557
-    hyper  558, 559, 560
-\glslink*  561
-\glslistdottedwidth  562
-\glslocalreset  563
-\glslocalresetall  564
- - - -\glslocalunset  565
-\glslocalunsetall  566
-\glslongkey  567
-\glslongpluralkey  568
-\glslongtok  569
-\GLSname  570
-\Glsname  571
-\glsname  572
-\glsnamefont  573
-\glsnavhypertarget  574
-\glsnumbersgroupname  575
-\glsopenbrace  576
-\glspagelistwidth  577, 578, 579, 580, 581, 582, 583, 584
-\glspar  585
-\GLSpl  586, 587, 588
-\Glspl  589, 590, 591, 592
-\glspl  593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603
-\GLSplural  604
-\Glsplural  605
-\glsplural  606
-\glspluralsuffix  607, 608, 609
-\glspostdescription  610
-\glsquote  611
-\glsreset  612
-\glsresetall  613
-\glssee  614, 615, 616
-\glsSetAlphaCompositor  617
-\glsSetCompositor  618
-\glsSetSuffixF  619
-\glsSetSuffixFF  620
-\glssetwidest  621
-\GlsSetXdyCodePage  622, 623
-\GlsSetXdyLanguage  624, 625
-\GlsSetXdyLocationClassOrder  626
-\GlsSetXdyMinRangeLength  627, 628
-\glsshortkey  629
-\glsshortpluralkey  630
-\glsshorttok  631
-\GLSsymbol  632
-\Glssymbol  633
-\glssymbol  634, 635
-\glssymbolsgroupname  636
-\glstarget  637
-\GLStext  638
-\Glstext  639
-\glstext  640, 641, 642, 643, 644, 645, 646, 647, 648, 649
- - - -\glstextformat  650, 651
-\glstocfalse  652
-\glstoctrue  653
-\glstreeindent  654
-\glsunset  655
-\glsunsetall  656
-\GLSuseri  657
-\Glsuseri  658
-\glsuseri  659
-\GLSuserii  660
-\Glsuserii  661
-\glsuserii  662
-\GLSuseriii  663
-\Glsuseriii  664
-\glsuseriii  665
-\GLSuseriv  666
-\Glsuseriv  667
-\glsuseriv  668
-\GLSuserv  669
-\Glsuserv  670
-\glsuserv  671
-\GLSuservi  672
-\Glsuservi  673
-\glsuservi  674
-

H -html package  675
-\hyperbf  676
-\hyperemph  677
-\hyperit  678
-\hyperlink  679, 680
-\hypermd  681
-\hyperpage  682
-hyperref package  683, 684, 685, 686, 687, 688, 689
-\hyperrm  690, 691
-\hypersc  692
-\hypersf  693
-\hypersl  694
-\hypertarget  695
-\hypertt  696
-\hyperup  697
-

I -\ifglsused  698
- - - -\indexspace  699
-inputenc package  700, 701, 702, 703, 704
-\inputencodingname  705
-itemize (environment)  706
-

J -\jobname  707, 708
-

L -link text  709, 710, 711, 712, 713, 714, 715
-\loadglsentries  716
-location list  see number list
-longtable (environment)  718, 719, 720, 721, 722
-longtable package  723, 724
-

M -\makefirstuc  725, 726
-makeglossaries  727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776
-\makeglossaries  777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793
-makeindex  794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850
-\MakeUppercase  851
-mfirstuc package  852
-

N -\newacronym  853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872
-\newglossary  873, 874, 875, 876
-\newglossaryentry  877, 878, 879, 880, 881, 882, 883, 884, 885
-\newglossaryentry options
-    access  886
-    description  887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902
-    descriptionaccess  903
-    descriptionplural  904, 905, 906
-    descriptionpluralaccess  907
-    first  908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925
-    firstaccess  926
-    firstplural  927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937
-    firstpluralaccess  938
-    format  939
-    name  940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960
-    nonumberlist  961
- - - -    parent  962, 963, 964, 965
-    plural  966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979
-    pluralaccess  980
-    see  981, 982, 983, 984, 985, 986, 987
-    sort  988, 989, 990, 991, 992, 993, 994, 995, 996
-    symbol  997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014
-    symbolaccess  1015
-    symbolplural  1016, 1017, 1018
-    symbolpluralaccess  1019
-    text  1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038
-    textaccess  1039
-    type  1040, 1041
-    user1  1042, 1043, 1044, 1045, 1046, 1047, 1048
-    user2  1049, 1050
-    user3  1051
-    user4  1052
-    user6  1053, 1054, 1055
-\newglossarystyle  1056, 1057
-\newline  1058, 1059
-ngerman package  1060, 1061
-\nohyperpage  1062
-\noist  1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073
-\nopostdesc  1074, 1075, 1076, 1077
-number list  1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105
-

O -\oldacronym  1106, 1107
-

P -package options:
-    acronym  1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128
-    acronymlists  1129, 1130, 1131, 1132
-    counter  1133, 1134, 1135
-    description  1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151
-    dua  1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160
-    footnote  1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175
-    hyperfirst  1176
-        false  1177, 1178
-        true  1179
-    makeindex  1180
-    nolist  1181, 1182
- - - -    nolong  1183, 1184, 1185
-    nomain  1186, 1187
-    nonumberlist  1188, 1189, 1190, 1191
-    nostyles  1192, 1193, 1194, 1195, 1196, 1197
-    nosuper  1198, 1199, 1200
-    notree  1201, 1202
-    nowarn  1203
-    numberedsection  1204, 1205, 1206, 1207, 1208
-        autolabel  1209, 1210
-        false  1211
-        nolabel  1212
-    numberline  1213, 1214
-    order  1215
-        letter  1216, 1217, 1218
-        word  1219, 1220, 1221
-    sanitize  1222, 1223, 1224, 1225, 1226
-        description  1227, 1228
-        none  1229
-        symbol  1230, 1231, 1232, 1233
-    section  1234, 1235
-    shortcuts  1236, 1237, 1238, 1239, 1240, 1241
-    smallcaps  1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255
-    smaller  1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269
-    style  1270, 1271, 1272, 1273, 1274, 1275, 1276
-    toc  1277, 1278, 1279, 1280, 1281
-    translate  1282
-        false  1283, 1284, 1285, 1286
-        true  1287, 1288
-    xindy  1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299
-\pagelistname  1300
-pod2man  1301
-polyglossia package  1302, 1303, 1304, 1305, 1306
-\printglossaries  1307, 1308, 1309
-\printglossary  1310, 1311, 1312, 1313, 1314, 1315
-\printglossary options
-    nonumberlist  1316
-    numberedsection  1317
-    style  1318, 1319, 1320, 1321
-    title  1322
-    toctitle  1323
-    type  1324
-

R -relsize package  1325, 1326, 1327
-

S - - - -\seename  1328
-\setAlphaCompositor  1329
-\setCompositor  1330
-\SetCustomDisplayStyle  1331, 1332, 1333, 1334
-\SetCustomStyle  1335
-\setglossarysection  1336
-\setStyleFile  1337, 1338, 1339
-\smaller  1340
-supertabular (environment)  1341, 1342, 1343, 1344, 1345
-supertabular package  1346, 1347, 1348
-\symbolname  1349
-

T -\textbf  1350
-\textrm  1351
-\textsc  1352
-\textsmaller  1353, 1354, 1355
-theglossary (environment)  1356, 1357, 1358, 1359
-\thepage  1360
-translator package  1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375
-

X -xindy  1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459
-xkeyval package  1460, 1461
-\xmakefirstuc  1462
-\xspace  1463
-xspace package  1464, 1465, 1466, 1467, 1468, 1469
-

-

Top -

- - - -

1that is, if the term has been referenced using any of the commands described in §2.4 Links to -Glossary Entries, §2.5 Adding an Entry to the Glossary Without Generating Text or via \glssee (or -the see key)

-

2Actually it sets \acronymtype to \glsdefaulttype if the acronym package option is not used, but -\glsdefaulttype usually has the value main.

-

3if the acronym option is used, otherwise the list of acronyms is the main glossary

-

4The only preamble restriction on \newglossaryentry and \newacronym was removed in version -1.13, but the restriction remains for \loadglsentries.

-

5This is because \acronymtype is set to \glsdefaulttype if the acronym package option is not -used.

-

6main for the main (default) glossary, \acronymtype for the list of acronyms, or the name -supplied in the first mandatory argument to \newglossary for additional glossaries.

-

7see \setCompositor described in §2.2 Defining Glossary Entries

-

8see \setAlphaCompositor described in §2.2 Defining Glossary Entries

-

9you will need to load a package, such as relsize, that defines \textsmaller if you use this -option.

-

10not that this was change from using \smaller to \textsmaller as declarations cause a problem for -\makefirstuc.

-

11as from version 1.18

12these lengths will not be available if you use both the nolong and nosuper package -options or if you use the nostyles package option unless you explicitly load the relevant -package.

-

13This style was supplied by Axel Menzel.

-

14e.g. with the flowfram package.

-

15defined in the textcase package

- - - - - - diff --git a/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex b/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex deleted file mode 100644 index fe43fadfd68..00000000000 --- a/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex +++ /dev/null @@ -1,5076 +0,0 @@ -\documentclass{nlctdoc} - -\usepackage{alltt} -\usepackage{pifont} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage[colorlinks, - bookmarks, - hyperindex=false, - pdfauthor={Nicola L.C. Talbot}, - pdftitle={glossaries.sty: LaTeX2e Package to Assist Generating Glossaries}, - pdfkeywords={LaTeX,package,glossary,acronyms}]{hyperref} - -\doxitem{Option}{option}{package options} -\doxitem{GlsKey}{key}{glossary keys} -\doxitem{Style}{style}{glossary styles} - -\setcounter{IndexColumns}{2} - -\CheckSum{11106} - -\newcommand*{\tick}{\ding{51}} - -\newcommand*{\ifirstuse}{\iterm{first use}} -\newcommand*{\firstuse}{first use\ifirstuse} -\newcommand*{\firstuseflag}{first use flag\ifirstuseflag} -\newcommand*{\firstusetext}{first use text\ifirstusetext} - -\newcommand*{\ifirstuseflag}{\iterm{first use>flag}} -\newcommand*{\ifirstusetext}{\iterm{first use>text}} - -\newcommand*{\istkey}[1]{\appfmt{#1}\index{makeindex=\appfmt{makeindex}>#1=\texttt{#1}|hyperpage}} -\newcommand*{\locfmt}[1]{\texttt{#1}\SpecialMainIndex{#1}} -\newcommand*{\mkidxspch}{\index{makeindex=\appfmt{makeindex}>special characters|hyperpage}} - -\newcommand*{\igloskey}[2][newglossaryentry]{\icsopt{#1}{#2}} -\newcommand*{\gloskey}[2][newglossaryentry]{\csopt{#1}{#2}} - -\newcommand*{\glostyle}[1]{\textsf{#1}\index{glossary styles:>#1={\protect\ttfamily#1}|main}} - - -\begin{document} -\MakeShortVerb{"} -\DeleteShortVerb{\|} - - \title{glossaries.sty v2.07: - \LaTeXe\ Package to Assist Generating Glossaries} - \author{Nicola L.C. Talbot\\[10pt] -School of Computing Sciences\\ -University of East Anglia\\ -Norwich. Norfolk\\ -NR4 7TJ. United Kingdom.\\ -\url{http://theoval.cmp.uea.ac.uk/~nlct/}} - - \date{2010-07-10} - \maketitle - -This is the user manual for the \styfmt{glossaries} package. Other -documents accompanying this manual: -\begin{itemize} -\item \qtdocref{The glossaries package: a guide for beginners}{glossariesbegin} -\item \qtdocref{Upgrading from the glossary package to the -glossaries package}{glossary2glossaries} -\end{itemize} -See the file \texttt{INSTALL} for installation instructions. -Related web resources: -\begin{itemize} -\item -\urlfootref{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html}{The glossaries FAQ} - -\item -\urlfootref{http://www.latex-community.org/index.php?option=com_content&view=article&id=263&Itemid=114}{Glossaries, -Nomenclature, Lists of Symbols and Acronyms } -\end{itemize} - -\clearpage -\tableofcontents - - \section{Introduction} - - \changes{1.0}{2007 May 16}{Initial version} -The \styfmt{glossaries} package is provided to assist generating -glossaries. It has a certain amount of flexibility, allowing the -user to customize the format of the glossary and define multiple -glossaries. It also supports acronyms and glossary styles that -include symbols (in addition to a name and description) for glossary -entries. There is provision for loading a database of glossary -terms. Only those terms used\footnote{that is, if the term has been -referenced using any of the commands described in -\sectionref{sec:glslink}, \sectionref{sec:glsadd} or via -\ics{glssee} (or the \gloskey{see} key)} in the document will be -added to the glossary. - -\textbf{This package replaces the \sty{glossary} package which is -now obsolete.} Please see the document \qtdocref{Upgrading from the -glossary package to the glossaries package}{glossary2glossaries} for -assistance in upgrading. - -One of the strengths of this package is its flexibility, however -the drawback of this is the necessity of having a large manual -that can cover all the various settings. If you are daunted by the -size of the manual, try starting off with the much shorter -\docref{guide for beginners}{glossariesbegin}. - -\begin{important} -The \styfmt{glossaries} package comes with a -\href{http://www.perl.org/about.html}{Perl} script called -\app{makeglossaries}. This provides a convenient interface to -\app{makeindex} or \app{xindy}. It is strongly recommended -that you use this script, but \emph{it is not essential}. If you are -reluctant to install Perl, or for any other reason you don't want to -use \app{makeglossaries}, you can called \app{makeindex} or -\app{xindy} explicitly. See \sectionref{sec:makeglossaries} for -further details. -\end{important} - -This manual is structured as follows: -\begin{itemize} -\item \sectionref{sec:overview} gives an overview of the main user -commands and their syntax. - -\item \sectionref{sec:mfirstuc} describes the associated -\styfmt{mfirstuc} package. - -\ifpdf - \item \sectionref{sec:code} contains the documented source code for - those who want to know more about how the package works. This - describes more advanced commands, such as determining if an entry or - a glossary exists and commands that iterate through defined terms or - glossaries. - - \item \sectionref{sec:code:mfirstuc} contains the documented code for - the \styfmt{mfirstuc} package. -\fi -\end{itemize} -\ifpdf -\else - The \href{glossaries.pdf}{PDF version} of this manual also describes - more advanced commands in the documented code section (such as - determining if an entry or a glossary exists and commands that - iterate through defined terms or glossaries). -\fi - -\noindent The remainder of this introductory section covers the -following: -\begin{itemize} -\item \sectionref{sec:samples} lists the sample documents provided -with this package. - -\item \sectionref{sec:languages} provides information for users who -wish to write in a language other than English. - -\item \sectionref{sec:makeglossaries} describes how to use a -post-processor to create the sorted glossaries for your document. - -\item \sectionref{sec:trouble} provides some assistance in the event -that you encounter a problem. -\end{itemize} - - -\subsection{Sample Documents} -\label{sec:samples} - -The \styfmt{glossaries} package is provided with some sample -documents that illustrate the various functions. These should -be located in the \texttt{samples} subdirectory (folder) of the -\styfmt{glossaries} documentation directory. This location varies -according to your operating system and \TeX\ distribution. You -can use \texttt{texdoc} to locate the main glossaries documentation. -For example, in a terminal or command prompt, type: -\begin{prompt} -texdoc -l glossaries -\end{prompt} -This should display the full pathname of the file -\texttt{glossaries.pdf}. View the contents of that directory and -see if it contains the \texttt{samples} subdirectory. - -If you can't find the sample files, they are available in the -subdirectory \texttt{doc/latex/glossaries/samples/} in the -\texttt{glossaries.tds.zip} archive which can be downloaded from -\href{http://tug.ctan.org/tex-archive/macros/latex/contrib/glossaries/}{CTAN}. - - -The sample documents are as follows: -\begin{description} -\item[minimalgls.tex]\label{ex:minimalgls} This document is a -minimal working example. You can test your installation using this -file. To create the complete document you will need to do the -following steps: - \begin{enumerate} - \item Run \texttt{minimalgls.tex} through \LaTeX\ either by - typing -\begin{prompt} -latex minimalgls -\end{prompt} - in a terminal or by using the relevant button or menu item in - your text editor or front-end. This will create the required - associated files but you will not see the glossary. If you use - PDF\LaTeX\ you will also get warnings about non-existent - references. These warnings may be ignored on the first run. - - If you get a \verb"Missing \begin{document}" error, then - it's most likely that your version of \sty{xkeyval} is - out of date. Check the log file for a warning of that nature. - If this is the case, you will need to update the \styfmt{xkeyval} - package. - - \item Run \app{makeglossaries} on the document. This can - be done on a terminal either by typing -\begin{prompt} -makeglossaries minimalgls -\end{prompt} - or by typing -\begin{prompt} -perl makeglossaries minimalgls -\end{prompt} - If your system doesn't recognise the command \texttt{perl} then - it's likely you don't have Perl installed. In which case you - will need to use \app{makeindex} directly. You can do this - in a terminal by typing (all on one line): -\begin{prompt} -makeindex -s minimalgls.ist -t minimalgls.glg -o minimalgls.gls minimalgls.glo -\end{prompt} - (See \sectionref{sec:makeindexapp} for further details on using - \app{makeindex} explicitly.) - - Note that if you need to specify the full path and the path - contains spaces, you will need to delimit the file names with - the double-quote character. - - \item Run \texttt{minimalgls.tex} through \LaTeX\ again (as step~1) - \end{enumerate} -You should now have a complete document. The number following -each entry in the glossary is the location number. By default, this -is the page number where the entry was referenced. - -\item[sample4col.tex]\label{ex:sample4col} This document illustrates -a four column glossary where the entries have a symbol in addition -to the name and description. To create the complete document, you -need to do: -\begin{prompt} -latex sample4col -makeglossaries sample4col -latex sample4col -\end{prompt} -As before, if you don't have Perl installed, you will need to use -\app{makeindex} directly instead of using -\app{makeglossaries}. The vertical gap between entries is the -gap created at the start of each group. This can be suppressed by -redefining \ics{glsgroupskip} after the glossary style has been set: -\begin{verbatim} -\renewcommand*{\glsgroupskip}{} -\end{verbatim} - -\item[sampleAcr.tex]\label{ex:sampleAcr} This document has some -sample acronyms. It also adds the glossary to the table of contents, -so an extra run through \LaTeX\ is required to ensure the document -is up to date: -\begin{prompt} -latex sampleAcr -makeglossaries sampleAcr -latex sampleAcr -latex sampleAcr -\end{prompt} - -\item[sampleAcrDesc.tex]\label{ex:sampleAcrDesc} This is similar to -the previous example, except that the acronyms have an associated -description. As with the previous example, the glossary is added to -the table of contents, so an extra run through \LaTeX\ is required: -\begin{prompt} -latex sampleAcrDesc -makeglossaries sampleAcrDesc -latex sampleAcrDesc -latex sampleAcrDesc -\end{prompt} - -\item[sampleDesc.tex]\label{ex:sampleDesc} This is similar to the -previous example, except that it defines the acronyms using -\ics{newglossaryentry} instead of \ics{newacronym}. As with the -previous example, the glossary is added to the table of contents, so -an extra run through \LaTeX\ is required: -\begin{prompt} -latex sampleDesc -makeglossaries sampleDesc -latex sampleDesc -latex sampleDesc -\end{prompt} - -\item[sample-custom-acronym.tex]\label{ex:sample-custom-acronym} -This document illustrates how to define your own acronym style if -the predefined styles don't suit your requirements. -\begin{prompt} -latex sample-custom-acronym -makeglossaries sample-custom-acronym -latex sample-custom-acronym -\end{prompt} - -\item[sampleDB.tex]\label{ex:sampleDB} This document illustrates how -to load external files containing the glossary definitions. It also -illustrates how to define a new glossary type. This document has the -\term{number list} suppressed and uses \ics{glsaddall} to add all -the entries to the glossaries without referencing each one -explicitly. To create the document do: -\begin{prompt} -latex sampleDB -makeglossaries sampleDB -latex sampleDB -\end{prompt} -The glossary definitions are stored in the accompanying files -\texttt{database1.tex} and \texttt{database2.tex}. Note that if you -don't have Perl installed, you will need to use \app{makeindex} -twice instead of a single call to \app{makeglossaries}: -\begin{enumerate} -\item Create the main glossary: -\begin{prompt} -makeindex -s sampleDB.ist -t sampleDB.glg -o sampleDB.gls sampleDB.glo -\end{prompt} -\item Create the secondary glossary: -\begin{prompt} -makeindex -s sampleDB.ist -t sampleDB.nlg -o sampleDB.not sampleDB.ntn -\end{prompt} -\end{enumerate} - -\item[sampleEq.tex]\label{ex:sampleEq} This document illustrates how -to change the location to something other than the page number. In -this case, the \texttt{equation} counter is used since all glossary -entries appear inside an \env{equation} environment. To create -the document do: -\begin{prompt} -latex sampleEq -makeglossaries sampleEq -latex sampleEq -\end{prompt} - -\item[sampleEqPg.tex]\label{ex:sampleEqPg} This is similar to the -previous example, but the number lists\iterm{number list} are a -mixture of page numbers and equation numbers. This example adds the -glossary to the table of contents, so an extra \LaTeX\ run is -required: -\begin{prompt} -latex sampleEqPg -makeglossaries sampleEqPg -latex sampleEqPg -latex sampleEqPg -\end{prompt} - -\item[sampleSec.tex]\label{ex:sampleSec} This document also -illustrates how to change the location to something other than the -page number. In this case, the \texttt{section} counter is used. -This example adds the glossary to the table of contents, so an extra -\LaTeX\ run is required: -\begin{prompt} -latex sampleSec -makeglossaries sampleSec -latex sampleSec -latex sampleSec -\end{prompt} - -\item[sampleNtn.tex]\label{ex:sampleNtn} This document illustrates -how to create an additional glossary type. This example adds the -glossary to the table of contents, so an extra \LaTeX\ run is -required: -\begin{prompt} -latex sampleNtn -makeglossaries sampleNtn -latex sampleNtn -latex sampleNtn -\end{prompt} -Note that if you don't have Perl installed, you will need to use -\app{makeindex} twice instead of a single call to -\app{makeglossaries}: -\begin{enumerate} -\item Create the main glossary: -\begin{prompt} -makeindex -s sampleNtn.ist -t sampleNtn.glg -o sampleNtn.gls sampleNtn.glo -\end{prompt} -\item Create the secondary glossary: -\begin{prompt} -makeindex -s sampleNtn.ist -t sampleNtn.nlg -o sampleNtn.not sampleNtn.ntn -\end{prompt} -\end{enumerate} - -\item[sample.tex]\label{ex:sample} This document illustrates some of -the basics, including how to create child entries that use the same -name as the parent entry. This example adds the glossary to the -table of contents, so an extra \LaTeX\ run is required: -\begin{prompt} -latex sample -makeglossaries sample -latex sample -latex sample -\end{prompt} -You can see the difference between word and letter ordering if you -substitute \pkgopt[word]{order} with \pkgopt[letter]{order}. (Note -that this will only have an effect if you use -\app{makeglossaries}. If you use \app{makeindex} explicitly, -you will need to use the \texttt{-l} switch to indicate letter -ordering.) - -\item[sampletree.tex]\label{ex:sampletree} This document illustrates -a hierarchical glossary structure where child entries have different -names to their corresponding parent entry. To create the document -do: -\begin{prompt} -latex sampletree -makeglossaries sampletree -latex sampletree -\end{prompt} - -\item[samplexdy.tex]\label{ex:samplexdy} This document illustrates -how to use the \styfmt{glossaries} package with \app{xindy} instead -of \app{makeindex}. The document uses UTF8 encoding (with the -\sty{inputenc} package). The encoding is picked up by -\app{makeglossaries}. By default, this document will create a -\app{xindy} style file called \texttt{samplexdy.xdy}, but if you -uncomment the lines -\begin{verbatim} -\setStyleFile{samplexdy-mc} -\noist -\GlsSetXdyLanguage{} -\end{verbatim} -it will set the style file to \texttt{samplexdy-mc.xdy} instead. -This provides an additional letter group for entries starting with -\qt{Mc} or \qt{Mac}. If you use \app{makeglossaries}, you don't -need to supply any additional information. If you don't use -\app{makeglossaries}, you will need to specify the required -information. Note that if you set the style file to -\texttt{samplexdy-mc.xdy} you must also specify \ics{noist}, -otherwise the \styfmt{glossaries} package will overwrite -\texttt{samplexdy-mc.xdy} and you will lose the \qt{Mc} letter -group. - -To create the document do: -\begin{prompt} -latex samplexdy -makeglossaries samplexdy -latex samplexdy -\end{prompt} -If you don't have Perl installed, you will have to call -\app{xindy} explicitly instead of using \app{makeglossaries}. -If you are using the default style file \texttt{samplexdy.xdy}, then -do (no line breaks): -\begin{prompt} -xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo -\end{prompt} -otherwise, if you are using \texttt{samplexdy-mc.xdy}, then do -(no line breaks): -\begin{prompt} -xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo -\end{prompt} - -\item[sampleutf8.tex]\label{ex:sampleutf8} This is another example -that uses \app{xindy}. Unlike \app{makeindex}, -\app{xindy} can cope with accented or non-Latin characters. This -document uses UTF8 encoding. To create the document do: -\begin{prompt} -latex sampleutf8 -makeglossaries sampleutf8 -latex sampleutf8 -\end{prompt} -If you don't have Perl installed, you will have to call -\app{xindy} explicitly instead of using \app{makeglossaries} -(no line breaks): -\begin{prompt} -xindy -L english -C utf8 -I xindy -M sampleutf8 -t sampleutf8.glg -o sampleutf8.gls sampleutf8.glo -\end{prompt} - -If you remove the \pkgopt{xindy} option from \texttt{sampleutf8.tex} -and do: -\begin{prompt} -latex sampleutf8 -makeglossaries sampleutf8 -latex sampleutf8 -\end{prompt} -you will see that the entries that start with a non-Latin character -now appear in the symbols group, and the word \qt{man\oe uvre} is now -after \qt{manor} instead of before it. If you are unable to use -\app{makeglossaries}, the call to \app{makeindex} is as -follows (no line breaks): -\begin{prompt} -makeindex -s sampleutf8.ist -t sampleutf8.glg -o sampleutf8.gls sampleutf8.glo -\end{prompt} - -\item[sampleaccsupp.tex]\label{ex:sampleaccsupp} This document -uses the experimental \sty{glossaries-accsupp} package. The -symbol is set to the replacement text. Note that some PDF -viewers don't use the accessibility support. Information -about the \styfmt{glossaries-accsupp} package can be found in -\sectionref{sec:accsupp}. - -\end{description} - - -\subsection{Multi-Lingual Support} -\label{sec:languages} - -As from version 1.17, the \styfmt{glossaries} package can now be -used with \app{xindy} as well as \app{makeindex}. If you -are writing in a language that uses accented characters or -non-Latin characters it is recommended that you use \app{xindy} -as \app{makeindex} is hard-coded for Latin languages. This -means that you are not restricted to the A, \ldots, Z letter groups. -If you want to use \app{xindy}, remember to use the -\pkgopt{xindy} package option. For example: -\begin{verbatim} -\documentclass[frenchb]{article} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{babel} -\usepackage[xindy]{glossaries} -\end{verbatim} - -\begin{important} -If you use an accented or other expandable character at the start of -an entry name, you must place it in a group, or it will cause -a problem for commands that convert the first letter to uppercase -(e.g.\ \ics{Gls}) due to expansion issues. For example: -\begin{verbatim} -\newglossaryentry{elite}{name={{é}lite}, -description={select group or class}} -\end{verbatim} -\end{important} - -If you use the \sty{inputenc} package, \app{makeglossaries} -will pick up the encoding from the auxiliary file. If you use -\app{xindy} explicitly instead of via \app{makeglossaries}, -you may need to specify the encoding using the \texttt{-C} -option. Read the \app{xindy} manual for further details. - -\subsubsection{Changing the Fixed Names} -\label{sec:fixednames} - -As from version 1.08, the \styfmt{glossaries} package now has -limited multi-lingual support, thanks to all the people who have sent -me the relevant translations either via email or via -\texttt{comp.text.tex}. -However you must load \sty{babel} or \sty{polyglossia} \emph{before} -\styfmt{glossaries} to enable this. Note that if \sty{babel} is loaded -and the \sty{translator} package is detected on \TeX's path, then the -\sty{translator} package will be loaded automatically. However, -it may not pick up on the required languages so, if the predefined -text is not translated, you may need to explicitly load the -\sty{translator} package with the required languages. For example: -\begin{verbatim} -\usepackage[spanish]{babel} -\usepackage[spanish]{translator} -\usepackage{glossaries} -\end{verbatim} -Alternatively, specify the language as a class option rather -than a package option. For example: -\begin{verbatim} -\documentclass[spanish]{report} - -\usepackage{babel} -\usepackage{glossaries} -\end{verbatim} - -If you want to use \sty{ngerman} or \sty{german} instead -of \sty{babel}, you will need to include the \sty{translator} package -to provide the translations. For example: -\begin{verbatim} -\documentclass[ngerman]{article} -\usepackage{ngerman} -\usepackage{translator} -\usepackage{glossaries} -\end{verbatim} - -The languages are currently supported by the -\styfmt{glossaries} package are listed in -\tableref{tab:supportedlanguages}. - -\begin{table}[htbp] -\caption{Supported Languages} -\label{tab:supportedlanguages} -\begin{center} -\begin{tabular}{lc} -\bfseries Language & \bfseries As from version\\ -Brazilian Portuguese & 1.17\\ -Danish & 1.08\\ -Dutch & 1.08\\ -English & 1.08\\ -French & 1.08\\ -German & 1.08\\ -Irish & 1.08\\ -Italian & 1.08\\ -Hungarian & 1.08\\ -Polish & 1.13\\ -Serbian & 2.06\\ -Spanish & 1.08 -\end{tabular} -\end{center} -\end{table} - -The language dependent commands and \sty{translator} keys used by the -glossaries package are listed in \tableref{tab:predefinednames}. - -\begin{table}[htbp] -\caption{Customised Text} -\label{tab:predefinednames} -\begin{center} -\begin{tabular}{@{}llp{0.4\linewidth}@{}} -\bfseries Command Name & \bfseries Translator Key Word & -\bfseries Purpose\\ -\ics{glossaryname} & \texttt{Glossary} & Title of the main glossary.\\ -\ics{acronymname} & \texttt{Acronyms} & Title of the list of acronyms -(when used with package option \pkgopt{acronym}).\\ -\ics{entryname} & \texttt{Notation (glossaries)} & -Header for first column in the glossary (for 2, 3 or 4 column glossaries -that support headers).\\ -\ics{descriptionname} & \texttt{Description (glossaries)} & -Header for second column in the glossary (for 2, 3 or 4 column glossaries -that support headers).\\ -\ics{symbolname} & \texttt{Symbol (glossaries)} & Header for symbol -column in the glossary for glossary styles that support this option.\\ -\ics{pagelistname} & \texttt{Page List (glossaries)} & -Header for page list column in the glossary for glossaries that support -this option.\\ -\ics{glssymbolsgroupname} & \texttt{Symbols (glossaries)} & -Header for symbols section of the glossary for glossary styles that -support this option.\\ -\ics{glsnumbersgroupname} & \texttt{Numbers (glossaries)} & Header for -numbers section of the glossary for glossary styles that support -this option. -\end{tabular} -\end{center} -\end{table} - -Due to the varied nature of glossaries, it's likely that the -predefined translations may not be appropriate. If you are using the -\sty{babel} package and do not have the \sty{translator} package -installed, you need to be familiar with the advice given in -\urlref{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords}{changing -the words babel uses}. If you have the \sty{translator} package -installed, then you can provide your own dictionary with the -necessary modifications (using \cs{deftranslation}) and load it -using \cs{usedictionary}. Note that the dictionaries are loaded at -the beginning of the document, so it won't have any effect if you -put \cs{deftranslation} in the preamble. It should be put in your -personal dictionary instead. See the \sty{translator} documentation -for further details. - -If you are using \sty{babel} and don't want to use the -\sty{translator} interface, you can suppress it using the package -option \pkgopt[false]{translate}, and either load -\sty{glossaries-babel} after \styfmt{glossaries} or specify you're own -translations. For example: -\begin{verbatim} -\documentclass[british]{article} - -\usepackage{babel} -\usepackage[translate=false]{glossaries} -\usepackage{glossaries-babel} -\end{verbatim} -or: -\begin{verbatim} -\documentclass[british]{article} - -\usepackage{babel} -\usepackage[translate=false]{glossaries} - -\addto\captionsbritish{% - \renewcommand*{\glossaryname}{List of Terms}% - \renewcommand*{\acronymname}{List of Acronyms}% - \renewcommand*{\entryname}{Notation}% - \renewcommand*{\descriptionname}{Description}% - \renewcommand*{\symbolname}{Symbol}% - \renewcommand*{\pagelistname}{Page List}% - \renewcommand*{\glssymbolsgroupname}{Symbols}% - \renewcommand*{\glsnumbersgroupname}{Numbers}% -} -\end{verbatim} - -If you are using \sty{polyglossia} instead of \sty{babel}, -\sty{glossaries-polyglossia} will automatically be loaded unless -you specify the package option \pkgopt[false]{translate}. - -Note that \app{xindy} provides much better multi-lingual support -than \app{makeindex}, so it's recommended that you use \app{xindy} -if you have glossary entries that contain diacritics or -non-Roman letters. See \sectionref{sec:xindy} for further -details. - -\subsection{Generating the Associated Glossary Files} -\label{sec:makeglossaries} - -In order to generate a sorted glossary with compact location lists, -it is necessary to use an external indexing application as an -intermediate step. It is this application that creates the file -containing the code that typesets the glossary. If this step is -omitted, the glossaries will not appear in your document. The two -indexing applications that are most commonly used with \LaTeX\ are -\app{makeindex} and \app{xindy}. As from version 1.17, the -\styfmt{glossaries} package can be used with either of these -applications. Previous versions were designed to be used with -\app{makeindex} only. Note that \app{xindy} has much better -multi-lingual support than \app{makeindex}, so \app{xindy} is -recommended if you're not writing in English. Commands that only -have an effect when \app{xindy} is used are described in -\sectionref{sec:xindy}. - - -The \styfmt{glossaries} package comes with the Perl script -\app{makeglossaries} which will run \app{makeindex} or \app{xindy} -on all the glossary files using a customized style file (which is -created by \ics{makeglossaries}). See -\sectionref{sec:makeglossariesapp} for further -details. Perl is stable, cross-platform, open source software that -is used by a number of \TeX-related applications. Further -information is available at \url{http://www.perl.org/about.html}. -However, whilst it is strongly recommended that you use the -\app{makeglossaries} script, it is possible to use the -\styfmt{glossaries} package without having Perl installed. In which -case, if you have used the \pkgopt{xindy} package option, you will -need to use \app{xindy} (see \sectionref{sec:xindyapp}), otherwise -you will need to use \app{makeindex} (see -\sectionref{sec:makeindexapp}). Note that some commands and package -options have no effect if you don't use \app{makeglossaries}. These -are listed in \tableref{tab:makeglossariesCmds}. - -Note that if any of your entries use an entry -that is not referenced outside the glossary, you will need to -do an additional \app{makeglossaries}, \app{makeindex} -or \app{xindy} run, as appropriate. For example, -suppose you have defined the following entries: -\begin{verbatim} -\newglossaryentry{citrusfruit}{name={citrus fruit}, -description={fruit of any citrus tree. (See also -\gls{orange})}} - -\newglossaryentry{orange}{name={orange}, -description={an orange coloured fruit.}} -\end{verbatim} -and suppose you have \verb|\gls{citrusfruit}| in your document -but don't reference the \texttt{orange} entry, then the -\texttt{orange} entry won't appear in your glossary until -you first create the glossary and then do another run -of \app{makeglossaries}, \app{makeindex} or \app{xindy}. -For example, if the document is called \texttt{myDoc.tex}, then -you must do: -\begin{prompt} -latex myDoc -makeglossaries myDoc -latex myDoc -makeglossaries myDoc -latex myDoc -\end{prompt} - -Likewise, an additional \app{makeglossaries} and \LaTeX\ run -may be required if the document pages shift with re-runs. For -example, if the page numbering is not reset after the table of -contents, the insertion of the table of contents on the second -\LaTeX\ run may push glossary entries across page boundaries, which -means that the number lists\iterm{number list} in the glossary may -need updating. - -The examples in this document assume that you are accessing -\app{makeglossaries}, \app{xindy} or \app{makeindex} via a terminal. -Windows users can use the MSDOS Prompt which is usually accessed via -the \menu{Start}\submenu{All Programs} menu or -\menu{Start}\submenu{All Programs}\submenu{Accessories} menu. - -Alternatively, your text editor may have the facility to create a -function that will call the required application. The article -\href{http://www.latex-community.org/index.php?option=com_content&view=article\&id=263:glossaries-nomenclature-lists-of-symbols-and-acronyms&catid=55:latex-general&Itemid=114}{\qt{Glossaries, Nomenclature, List of Symbols and -Acronyms}} -in the \urlfootref{http://www.latex-community.org/}{\LaTeX\ -Community's} Know How section -describes how to do this for TeXnicCenter, and the thread -\href{http://groups.google.com/group/comp.text.tex/browse_thread/thread/edd83831b81b0759?hl=en}{\qt{Executing Glossaries' makeindex from a WinEdt -macro}} on the \texttt{comp.text.tex} newsgroup -describes how to do it for WinEdt. For other editors see the editor's -user manual for further details. - -If any problems occur, remember to check the transcript files -(e.g.\ \filetype{.glg} or \filetype{.alg}) for messages. - -\begin{table}[htbp] -\caption{Commands and package options that have no effect when -using \texttt{xindy} or \texttt{makeindex} explicitly} -\label{tab:makeglossariesCmds} -\vskip\baselineskip -\begin{tabular}{@{}lll@{}} -\bfseries Command or Package Option & \app{makeindex} & -\app{xindy}\\ -\pkgopt[letter]{order} & use \texttt{-l} & - use \texttt{-M ord/letorder}\\ -\pkgopt[word]{order} & default & default\\ -\pkgopt{xindy}=\{\pkgoptfmt{language=}\meta{lang}\pkgoptfmt{,codename=}\meta{code}\} & -N/A & use \texttt{-L} \meta{lang} \texttt{-C} \meta{code}\\ -\ics{GlsSetXdyLanguage}\marg{lang} & N/A & -use \texttt{-L} \meta{lang}\\ -\ics{GlsSetXdyCodePage}\marg{code} & N/A & -use \texttt{-C} \meta{code} -\end{tabular} -\par -\end{table} - - -\subsubsection{Using the makeglossaries Perl Script} -\label{sec:makeglossariesapp} - -The \app{makeglossaries} script picks up the relevant information -from the auxiliary (\filetype{.aux}) file and will either call -\app{xindy} or \app{makeindex}, depending on the supplied -information. Therefore, you only need to pass the document's name -without the extension to \app{makeglossaries}. For example, if your -document is called \texttt{myDoc.tex}, type the following in your -terminal: -\begin{prompt} -latex myDoc -makeglossaries myDoc -latex myDoc -\end{prompt} -You may need to explicitly load \app{makeglossaries} into Perl: -\begin{prompt} -perl makeglossaries myDoc -\end{prompt} -There is a batch file called \texttt{makeglossaries.bat} which does -this for Windows users, but you must have Perl installed to be able -to use it. - -The \app{makeglossaries} script contains POD (Plain Old -Documentation). If you want, you can create a man page for -\app{makeglossaries} using \app{pod2man} and move the -resulting file onto the man path. - - -\subsubsection{Using xindy explicitly} -\label{sec:xindyapp} - -If you want to use \app{xindy} to process the glossary -files, you must make sure you have used the -\pkgopt{xindy} package option: -\begin{verbatim} -\usepackage[xindy]{glossaries} -\end{verbatim} -This is required regardless of whether you use \app{xindy} -explicitly or whether it's called implicitly via -\app{makeglossaries}. This causes the glossary -entries to be written in raw \app{xindy} format, so you need to -use \texttt{-I xindy} \emph{not} \texttt{-I tex}. - -To run \app{xindy} type the following in your terminal -(all on one line): -\begin{prompt} -xindy -L \meta{language} -C \meta{encoding} -I xindy -M \meta{style} -t \meta{base}.glg -o \meta{base}.gls \meta{base}.glo -\end{prompt} -where \meta{language} is the required language name, \meta{encoding} -is the encoding, \meta{base} is the name of the document without the -\filetype{.tex} extension and \meta{style} is the name of the -\app{xindy} style file without the \filetype{.xdy} extension. -The default name for this style file is \meta{base}\filetype{.xdy} -but can be changed via \ics{setStyleFile}\marg{style}. You may need -to specify the full path name depending on the current working -directory. If any of the file names contain spaces, you must delimit -them using double-quotes. - -For example, if your document is called \texttt{myDoc.tex} and -you are using UTF8 encoding in English, then type the -following in your terminal: -\begin{prompt} -xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.glg -o myDoc.gls myDoc.glo -\end{prompt} - -Note that this just creates the main glossary. You need to do -the same for each of the other glossaries (including the -list of acronyms if you have used the \pkgopt{acronym} -package option), substituting \filetype{.glg}, \filetype{.gls} -and \filetype{.glo} with the relevant extensions. For example, -if you have used the \pkgopt{acronym} package option, then -you would need to do: -\begin{prompt} -xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.alg -o myDoc.acr myDoc.acn -\end{prompt} -For additional glossaries, the extensions are those supplied -when you created the glossary with \ics{newglossary}. - -Note that if you use \app{makeglossaries} instead, you can -replace all those calls to \app{xindy} with just one call -to \app{makeglossaries}: -\begin{prompt} -makeglossaries myDoc -\end{prompt} -Note also that some commands and package options have no effect if -you use \app{xindy} explicitly instead of using -\app{makeglossaries}. These are listed in -\tableref{tab:makeglossariesCmds}. - - -\subsubsection{Using makeindex explicitly} -\label{sec:makeindexapp} - -If you want to use \app{makeindex} explicitly, you must -make sure that you haven't used the \pkgopt{xindy} package -option or the glossary entries will be written in the wrong -format. To run \app{makeindex}, type the following in -your terminal: -\begin{prompt} -makeindex -s \meta{style}.ist -t \meta{base}.glg -o \meta{base}.gls \meta{base}.glo -\end{prompt} -where \meta{base} is the name of your document without the -\filetype{.tex} extension and \meta{style}\filetype{.ist} is the -name of the \app{makeindex} style file. By default, this is -\meta{base}\filetype{.ist}, but may be changed via -\ics{setStyleFile}\marg{style}. Note that there are other options, -such as \texttt{-l} (letter ordering). See the \app{makeindex} -manual for further details. - -For example, if your document is called \texttt{myDoc.tex}, then -type the following at the terminal: -\begin{prompt} -makeindex -s myDoc.ist -t myDoc.glg -o myDoc.gls myDoc.glo -\end{prompt} -Note that this only creates the main glossary. If you have -additional glossaries (for example, if you have used the -\pkgopt{acronym} package option) then you must call -\app{makeindex} for each glossary, substituting -\filetype{.glg}, \filetype{.gls} and \filetype{.glo} with the -relevant extensions. For example, if you have used the -\pkgopt{acronym} package option, then you need to type the -following in your terminal: -\begin{prompt} -makeindex -s myDoc.ist -t myDoc.alg -o myDoc.acr myDoc.acn -\end{prompt} -For additional glossaries, the extensions are those supplied -when you created the glossary with \ics{newglossary}. - -Note that if you use \app{makeglossaries} instead, you can -replace all those calls to \app{makeindex} with just one call -to \app{makeglossaries}: -\begin{prompt} -makeglossaries myDoc -\end{prompt} -Note also that some commands and package options have no effect if -you use \app{makeindex} explicitly instead of using -\app{makeglossaries}. These are listed in -\tableref{tab:makeglossariesCmds}. - - -\subsubsection{Note to Front-End and Script Developers} - -The information needed to determine whether to use \app{xindy} -or \app{makeindex} and the information needed to call those -applications is stored in the auxiliary file. This information can -be gathered by a front-end, editor or script to make the glossaries -where appropriate. This section describes how the information is -stored in the auxiliary file. - -The file extensions used by each defined glossary are given by -\begin{definition}[\DescribeMacro{\@newglossary}] -\cs{@newglossary}\marg{label}\marg{log}\marg{out-ext}\marg{in-ext} -\end{definition} -where \meta{in-ext} is the extension of the \emph{indexing -application's} input file (the output file from the \styfmt{glossaries} -package's point of view), \meta{out-ext} is the extension of the -\emph{indexing application's} output file (the input file from -the \styfmt{glossaries} package's point of view) and \meta{log} is the -extension of the indexing application's transcript file. The label -for the glossary is also given for information purposes only, but -is not required by the indexing applications. For example, the -information for the main glossary is written as: -\begin{verbatim} -\@newglossary{main}{glg}{gls}{glo} -\end{verbatim} - -The indexing application's style file is specified by -\begin{definition}[\DescribeMacro{\@istfilename}] -\cs{@istfilename}\marg{filename} -\end{definition} -The file extension indicates whether to use \app{makeindex} -(\filetype{.ist}) or \app{xindy} (\filetype{.xdy}). Note that -the glossary information is formatted differently depending on -which indexing application is supposed to be used, so it's -important to call the correct one. - -Word or letter ordering is specified by: -\begin{definition}[\DescribeMacro{\@glsorder}] -\cs{@glsorder}\marg{order} -\end{definition} -where \meta{order} can be either \texttt{word} or \texttt{letter}. - -If \app{xindy} should be used, the language and code page -for each glossary is specified by -\begin{definition}[\DescribeMacro{\@xdylanguage}\DescribeMacro{\@gls@codepage}] -\cs{@xdylanguage}\marg{label}\marg{language}\\ -\cs{@gls@codepage}\marg{label}\marg{code} -\end{definition} -where \meta{label} identifies the glossary, \meta{language} is -the root language (e.g.\ \texttt{english}) and \meta{code} -is the encoding (e.g.\ \texttt{utf8}). These commands are omitted -if \app{makeindex} should be used. - - -\subsection{Troubleshooting} -\label{sec:trouble} - -The \styfmt{glossaries} package comes with a minimal file called -\texttt{minimalgls.tex} which can be used for testing. This -should be located in the \texttt{samples} subdirectory (folder) -of the \styfmt{glossaries} documentation directory. The location -varies according to your operating system and \TeX\ installation. -For example, on my Linux partition it can be found in -\texttt{/usr/local/texlive/2008/texmf-dist/doc/latex/glossaries/}. -Further information on debugging \LaTeX\ code is available at -\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/}. - -Below is a list of the most frequently asked questions. For -other queries, consult the \styfmt{glossaries} FAQ at -\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html}. - -\begin{enumerate} -\item \textbf{Q.} I get the error message: -\begin{verbatim} -Missing \begin{document} -\end{verbatim} - -\textbf{A.} Check you are using an up to date version of the \sty{xkeyval} -package. - -\item \textbf{Q.} I've used the \pkgopt{smallcaps} option, but the acronyms -are displayed in normal sized upper case letters. - -\textbf{A.} The \pkgopt{smallcaps} package option uses \cs{textsc} to typeset -the acronyms. This command converts lower case letters to small -capitals, while upper case letters remain their usual size. Therefore -you need to specify the acronym in lower case letters. - -\item \textbf{Q.} My acronyms won't break across a line when they're -expanded. - -\textbf{A.} PDF\LaTeX\ can break hyperlinks across a line, but -\LaTeX\ can't. If you can't use PDF\LaTeX\ then disable the first use -links using the package option \pkgopt[false]{hyperfirst}. - -\item \textbf{Q.} How do I change the font that the acronyms are displayed in? - -\textbf{A.} The easiest way to do this is to specify the \pkgopt{smaller} package -option and redefine \cs{acronymfont} to use the required typesetting -command. For example, suppose you would like the acronyms displayed in -a sans-serif font, then you can do: -\begin{verbatim} -\usepackage[smaller]{glossaries} -\renewcommand*{\acronymfont}[1]{\textsf{#1}} -\end{verbatim} - -\item \textbf{Q.} How do I change the font that the acronyms are displayed in -on \firstuse? - -\textbf{A.} The easiest way to do this is to specify the \pkgopt{smaller} package -option and redefine \cs{firstacronymfont} to use the required -command. Note that if you don't want the acronym on subsequent use -to use \cs{textsmaller}, you will also need to redefine \cs{acronymfont}, -as above. For example to make the acronym emphasized on -\firstuse, but use the surrounding font for subsequent use, you can do: -\begin{verbatim} -\usepackage[smaller]{glossaries} -\renewcommand*{\firstacronymfont}[1]{\emph{#1}} -\renewcommand*{\acronymfont}[1]{#1} -\end{verbatim} - -\item \textbf{Q.} I don't have Perl installed, do I have to use -\app{makeglossaries}? - -\textbf{A.} Although it is strongly recommended that you use -\app{makeglossaries}, you don't have to use it. For further details, -read \sectionref{sec:xindyapp} or \sectionref{sec:makeindexapp}, -depending on whether you want to use \app{xindy} or \app{makeindex}. - -\item \textbf{Q.} I'm used to using the \styfmt{glossary} package: are there any -instructions on migrating from the \sty{glossary} package to the -\styfmt{glossaries} package? - -\textbf{A.} Read \qtdocref{Upgrading from the glossary package to -the glossaries package}{glossary2glossaries} which should be -available from the same location as this document. - -\item \textbf{Q.} I'm using \sty{babel} but the fixed names haven't -been translated. - -\textbf{A.} The \styfmt{glossaries} package currently only supports -the following languages: Brazilian Portuguese, Danish, Dutch, -English, French, German, Irish, Italian, Hungarian, Polish, Serbian and -Spanish. If you want to add another language, send me the -translations, and I'll add them to the next version. - -If you are using one of the above languages, but the text hasn't been -translated, try adding the \sty{translator} package with the -required languages explicitly (before you load the \styfmt{glossaries} -package). For example: -\begin{verbatim} -\usepackage[ngerman]{babel} -\usepackage[ngerman]{translator} -\usepackage{glossaries} -\end{verbatim} -Alternatively, you can add the language as a global option -to the class file. Check the \styfmt{translator} package documentation -for further details. - -\item \textbf{Q.} My acronyms contain strange characters when I use commands -like \ics{acrlong}. - -\textbf{A.} Switch off the sanitization: -\begin{verbatim} -\usepackage[sanitize=none]{glossaries} -\end{verbatim} -and protect fragile commands. - -\item \textbf{Q.} My glossaries haven't appeared. - -\textbf{A.} Remember to do the following: -\begin{itemize} -\item Add \ics{makeglossaries} to the document preamble. - -\item Use either \ics{printglossary} for each glossary that has -been defined or \ics{printglossaries}. - -\item Use the commands listed in \sectionref{sec:glslink}, -\sectionref{sec:glsadd} or \sectionref{sec:crossref} for each entry -that you want to appear in the glossary. - -\item Run \LaTeX\ on your document, then run \app{makeglossaries}, -then run \LaTeX\ on your document again. If you want the glossaries -to appear in the table of contents, you will need an extra \LaTeX\ -run. If any of your entries cross-reference an entry that's not -referenced in the main body of the document, you will need to run -\app{makeglossaries} (see \sectionref{sec:makeglossaries}) after the -second \LaTeX\ run, followed by another \LaTeX\ run. -\end{itemize} - -Check the log files (\filetype{.log}, \filetype{.glg} etc) for any -warnings. - -\item \textbf{Q.} It is possible to change the rules used to sort -the glossary entries? - -\textbf{A.} If it's for an individual entry, then you can use the -entry's \gloskey{sort} key to sort it according to a different term. -If it's for the entire alphabet, then you will need to use -\app{xindy} (instead of \app{makeindex}) and use an appropriate -\app{xindy} language module. Writing \app{xindy} modules or styles -is beyond the scope of this manual. Further information about -\app{xindy} can be found at the -\urlfootref{http://xindy.sourceforge.net/}{Xindy Web Site}. There is -also a link to the \app{xindy} mailing list from that site. - -\end{enumerate} - - -\section{Overview of Main User Commands}\label{sec:overview} - \changes{1.02}{2007 May 25}{added overview section} - -This section is an overview of the main user commands and package -options. If you find this too complicated, try starting out with the -\docref{guide for beginners}{glossariesbegin}. - -\subsection{Package Options} -\label{sec:pkgopts} - -The \styfmt{glossaries} package options are as follows: -\begin{description} -\item[\pkgopt{nowarn}] This suppresses all warnings generated by -the \styfmt{glossaries} package. - -\item[\pkgopt{nomain}] This suppresses the creation of the main -glossary. Note that if you use this option, you must create another -glossary in which to put all your entries (either via the -\pkgopt{acronym} package option described below or via -\ics{newglossary} described in \sectionref{sec:newglossary}). - -\item[\pkgopt{toc}] Add the glossaries to the table of contents. -Note that an extra \LaTeX\ run is required with this option. -Alternatively, you can switch this function on and off using -\begin{definition}[\DescribeMacro{\glstoctrue}] -\cs{glstoctrue} -\end{definition} -and -\begin{definition}[\DescribeMacro{\glstocfalse}] -\cs{glstocfalse} -\end{definition} - -\item[\pkgopt{numberline}] When used with \pkgopt{toc}, this will -add \cs{numberline}\verb|{}| in the final argument of -\cs{addcontentsline}. This will align the table of contents entry -with the numbered section titles. Note that this option has no -effect if the \pkgopt{toc} option is omitted. If \pkgopt{toc} is -used without \pkgopt{numberline}, the title will be aligned with -the section numbers rather than the section titles. - -\item[\pkgopt{acronym}] This creates a new glossary with the -label \texttt{acronym}. This is equivalent to: -\begin{verbatim} -\newglossary[alg]{acronym}{acr}{acn}{\acronymname} -\end{verbatim} -If the \pkgopt{acronym} package option is used, \ics{acronymtype} -is set to \texttt{acronym} otherwise it is set to -\texttt{main}.\footnote{Actually it sets \ics{acronymtype} to -\ics{glsdefaulttype} if the \pkgopt{acronym} package option is -not used, but \ics{glsdefaulttype} usually has the value -\texttt{main}.} -Entries that are defined using \ics{newacronym} are placed in -the glossary whose label is given by \ics{acronymtype}, unless -another glossary is explicitly specified. - -\item[\pkgopt{acronymlists}] By default, only the \texttt{acronym} -glossary is considered to be a list of acronyms. If you have other -lists of acronyms, you can specify them as a comma-separated list -in the value of \pkgopt{acronymlists}. For example, if you want -the \texttt{main} glossary to also contain a list of acronyms, you -can do: -\begin{verbatim} -\usepackage[acronym,acronymlists={main}]{glossaries} -\end{verbatim} -No check is performed to determine if the listed glossaries exist, -so you can add glossaries you haven't defined yet. For example: -\begin{verbatim} -\usepackage[acronym,acronymlists={main,acronym2}]{glossaries} -\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms} -\end{verbatim} - -\item[\pkgopt{section}] This is a \meta{key}=\meta{value} option. Its -value should be the name of a sectional unit (e.g.\ chapter). -This will make the glossaries appear in the named sectional unit, -otherwise each glossary will appear in a chapter, if chapters -exist, otherwise in a section. Unnumbered sectional units will be used -by default. Example: -\begin{verbatim} -\usepackage[section=subsection]{glossaries} -\end{verbatim} -You can omit the value if you want to use sections, i.e.\ -\begin{verbatim} -\usepackage[section]{glossaries} -\end{verbatim} -is equivalent to -\begin{verbatim} -\usepackage[section=section]{glossaries} -\end{verbatim} -You can change this value later in the document using -\begin{definition}[\DescribeMacro{\setglossarysection}] -\cs{setglossarysection}\marg{name} -\end{definition} -where \meta{name} is the sectional unit. - -The start of each glossary adds information to the page header via -\begin{definition}[\DescribeMacro{\glossarymark}] -\cs{glossarymark}\marg{glossary title} -\end{definition} -This defaults to \cs{@mkboth}, but you may need to redefine it. -For example, to only change the right header: -\begin{verbatim} -\renewcommand{\glossarymark}[1]{\markright{#1}} -\end{verbatim} -or to prevent it from changing the headers: -\begin{verbatim} -\renewcommand{\glossarymark}[1]{} -\end{verbatim} - -Occasionally you may find that another package defines -\cs{cleardoublepage} when it is not required. This may cause an -unwanted blank page to appear before each glossary. This can -be fixed by redefining \ics{glsclearpage}: -\begin{verbatim} -\renewcommand*{\glsclearpage}{\clearpage} -\end{verbatim} - -\item[\pkgopt{numberedsection}] -The glossaries are placed in unnumbered sectional units by default, -but this can be changed using \pkgopt{numberedsection}. This option can take -three possible values: \pkgoptval{false}{numberedsection} (no -number, i.e.\ use starred form), \pkgoptval{nolabel}{numberedsection} -(numbered, i.e.\ unstarred form, but not labelled) and -\pkgoptval{autolabel}{numberedsection} (numbered with automatic -labelling). If \pkgopt[autolabel]{numberedsection} is used, each -glossary is given a label that matches the glossary type, so the -main (default) glossary is labelled \texttt{main}, the list of -acronyms is labelled \texttt{acronym}\footnote{if the -\pkgopt{acronym} option is used, otherwise the list of -acronyms is the main glossary} and additional glossaries are labelled -using the value specified in the first mandatory argument to -\cs{newglossary}. For example, if you load \styfmt{glossaries} -using: -\begin{verbatim} -\usepackage[section,numberedsection=autolabel]{glossaries} -\end{verbatim} -then each glossary will appear in a numbered section, and can -be referenced using something like: -\begin{verbatim} -The main glossary is in section~\ref{main} and the list of -acronyms is in section~\ref{acronym}. -\end{verbatim} -If you can't decide whether to have the acronyms in the main -glossary or a separate list of acronyms, you can use -\ics{acronymtype} which is set to \texttt{main} if the -\pkgopt{acronym} option is not used and is set to \texttt{acronym} -if the \pkgopt{acronym} option is used. For example: -\begin{verbatim} -The list of acronyms is in section~\ref{\acronymtype}. -\end{verbatim} - -As from version 1.14, you can add a prefix to the label by -redefining -\begin{definition}[\DescribeMacro{\glsautoprefix}] -\cs{glsautoprefix} -\end{definition} -For example: -\begin{verbatim} -\renewcommand*{\glsautoprefix}{glo:} -\end{verbatim} -will add \texttt{glo:} to the automatically generated label, so -you can then, for example, refer to the list of acronyms as follows: -\begin{verbatim} -The list of acronyms is in section~\ref{glo:\acronymtype}. -\end{verbatim} -Or, if you are undecided on a prefix: -\begin{verbatim} -The list of acronyms is in section~\ref{\glsautoprefix\acronymtype}. -\end{verbatim} - - -\item[\pkgopt{style}] This is a \meta{key}=\meta{value} option. Its -value should be the name of the glossary style to use. Predefined -glossary styles are listed in \sectionref{sec:styles}. - -\item[\pkgopt{nolong}] This prevents the \styfmt{glossaries} package -from automatically loading \sty{glossary-long} (which means that -the \sty{longtable} package also won't be loaded). This reduces -overhead by not defining unwanted styles and commands. Note that if -you use this option, you won't be able to use any of the -glossary styles defined in the \styfmt{glossary-long} package. - -\item[\pkgopt{nosuper}] This prevents the \styfmt{glossaries} package -from automatically loading \sty{glossary-super} (which means that -the \sty{supertabular} package also won't be loaded). This reduces -overhead by not defining unwanted styles and commands. Note that if -you use this option, you won't be able to use any of the -glossary styles defined in the \styfmt{glossary-super} package. - -\item[\pkgopt{nolist}] This prevents the \styfmt{glossaries} package -from automatically loading \sty{glossary-list}. This reduces -overhead by not defining unwanted styles. Note that if -you use this option, you won't be able to use any of the -glossary styles defined in the \styfmt{glossary-list} package. -Note that since the default style is \glostyle{list}, you will -also need to use the \pkgopt{style} option to set the style to -something else. - -\item[\pkgopt{notree}] This prevents the \styfmt{glossaries} package -from automatically loading \sty{glossary-tree}. This reduces -overhead by not defining unwanted styles. Note that if -you use this option, you won't be able to use any of the -glossary styles defined in the \styfmt{glossary-tree} package. - -\item[\pkgopt{nostyles}] This prevents all the predefined styles -from being loaded. This option is provided in the event that the -user has custom styles that are not dependent on the styles -provided by the \styfmt{glossaries} package. Note that if you use -this option, you can't use the \pkgopt{style} package option. Instead -you must either use \ics{glossarystyle}\marg{style} or -the \gloskey[printglossary]{style} key in the -optional argument to \ics{printglossary}. - -\item[\pkgopt{nonumberlist}] This option will suppress the -associated number lists\iterm{number list} in the glossaries (see also -\sectionref{sec:numberlists}). - -\item[\pkgopt{counter}] This is a \meta{key}=\meta{value} option. The -value should be the name of the default counter to use in the number -lists\iterm{number list}. - -\hypertarget{sanitize}{}\relax \item[\pkgopt{sanitize}] This is a -\meta{key}=\meta{value} option whose value is also a -\meta{key}=\meta{value} list. By default, the \styfmt{glossaries} -package sanitizes the values of the \gloskey{name}, -\gloskey{description} and \gloskey{symbol} keys used when defining a -new glossary entry. This means that you can use fragile commands in -those keys, but it may lead to unexpected results if you try to -display these values within the document text. This sanitization can -be switched off using the \pkgopt{sanitize} package option. \ifpdf -(See \sectionref{sec:pkgopt} and \sectionref{sec:newentry} for -further details.) \fi For example, to switch off the sanitization -for the \gloskey{description} and \gloskey{name} keys, but not for -the \gloskey{symbol} key, do: -\begin{verbatim} -\usepackage[sanitize={name=false,description=false,% -symbol=true}]{glossaries} -\end{verbatim} -You can use \pkgopt[none]{sanitize} as a shortcut for\newline -\pkgoptfmt{sanitize=\{name=false,description=false,symbol=false\}}. - -\begin{important}% -\textbf{Note}: this sanitization only applies to the \gloskey{name}, -\gloskey{description} and \gloskey{symbol} keys. It doesn't apply -to any of the other keys (except the \gloskey{sort} key which is -always sanitized) so fragile commands contained in the value of -the other keys must always be protected using \cs{protect}. -Since the value of the \gloskey{text} key is obtained from the -\gloskey{name} key, you will still need to protect fragile commands -in the \gloskey{name} key if you don't use the \gloskey{text} key. -\end{important} - -\item[\pkgopt{description}] This option changes the definition of -\ics{newacronym} to allow a description. See \sectionref{sec:acronyms} -for further details. - -\item[\pkgopt{footnote}] This option changes the definition of -\ics{newacronym} and the way that acronyms are displayed. See -\sectionref{sec:acronyms} for further details. - -\item[\pkgopt{smallcaps}] This option changes the definition of -\ics{newacronym} and the way that acronyms are displayed. See -\sectionref{sec:acronyms} for further details. - -\item[\pkgopt{smaller}] This option changes the definition of -\ics{newacronym} and the way that acronyms are displayed. -If you use this option, you will need to include the \sty{relsize} -package or otherwise define \ics{textsmaller} or redefine -\ics{acronymfont}. See \sectionref{sec:acronyms} for further details. - -\item[\pkgopt{dua}] This option changes the definition of -\ics{newacronym} so that acronyms are always expanded. -See \sectionref{sec:acronyms} for further details. - -\item[\pkgopt{shortcuts}] This option provides shortcut commands -for acronyms. See \sectionref{sec:acronyms} for further details. - -\item[\pkgopt{makeindex}] (Default) The glossary information and -indexing style file will be written in \app{makeindex} format. If -you use \app{makeglossaries}, it will automatically detect that it -needs to call \app{makeindex}. If you don't use -\app{makeglossaries}, you need to remember to use \app{makeindex} -not \app{xindy}. The indexing style file will been given a -\filetype{.ist} extension. - -\item[\pkgopt{xindy}] The glossary information and indexing style -file will be written in \app{xindy} format. If you use -\app{makeglossaries}, it will automatically detect that it needs to -call \app{xindy}. If you don't use \app{makeglossaries}, you need to -remember to use \app{xindy} not \app{makeindex}. The indexing style -file will been given a \filetype{.xdy} extension. - -The \pkgopt{xindy} package option may additionally have a value that -is a \meta{key}=\meta{value} comma-separated list to override the -language and codepage. For example: -\begin{verbatim} -\usepackage[xindy={language=english,codepage=utf8}]{glossaries} -\end{verbatim} -You can also specify whether you want a number group in the -glossary. This defaults to true, but can be suppressed. For example: -\begin{verbatim} -\usepackage[xindy={glsnumbers=false}]{glossaries} -\end{verbatim} -See \sectionref{sec:xindy} for further details on using \app{xindy} -with the \styfmt{glossaries} package. - -\item[\pkgopt{order}] This may take two values: -\pkgoptval{word}{order} or \pkgoptval{letter}{order}. The default -is word ordering. Note that this option has no effect if you -don't use \app{makeglossaries}. - -\item[\pkgopt{translate}] This is a boolean option. The default is -\pkgoptval{true}{translate} if \sty{babel}, \sty{polyglossia} or -\sty{translator} have been loaded, otherwise the default value is -\pkgoptval{false}{translate}. - - \begin{description} - \item[{\pkgopt[true]{translate}}] If \sty{babel} has been loaded - and the \sty{translator} package is installed, \sty{translator} - will be loaded and the translations will be provided by the - \sty{translator} package interface. You can modify the - translations by providing your own dictionary. If the - \sty{translator} package isn't installed and \sty{babel} is - loaded, the \sty{glossaries-babel} package will - be loaded and the translations will be provided using \styfmt{babel}'s - \cs{addto}\cs{caption}\meta{language} mechanism. If - \sty{polyglossia} has been loaded, \sty{glossaries-polyglossia} - will be loaded. - - \item[{\pkgopt[false]{translate}}] Don't provide translations, even - if \sty{babel} or \sty{polyglossia} has been loaded. You can - then provide you're own translations or explicitly load - \sty{glossaries-babel} or \sty{glossaries-polyglossia}. - \end{description} - -See \sectionref{sec:fixednames} for further details. - -\item[\pkgopt{hyperfirst}] This is a boolean option that specifies -whether each term has a hyperlink on \firstuse. The default is -\pkgopt[true]{hyperfirst} (terms on first use have a hyperlink, -unless explicitly suppressed using starred versions of commands -such as \cs{gls*}). - -\end{description} - -\subsection{Defining Glossary Entries} -\label{sec:newglosentry} - -All glossary entries must be defined before they are used, so it is -better to define them in the preamble to ensure this.\footnote{The -only preamble restriction on \cs{newglossaryentry} and -\cs{newacronym} was removed in version 1.13, but the restriction -remains for \cs{loadglsentries}.} However only those entries that -occur in the document (using any of the commands described in -\sectionref{sec:glslink}, \sectionref{sec:glsadd} or -\sectionref{sec:crossref}) will appear in the glossary. Each time an -entry is used in this way, a line is added to an associated glossary -file (\filetype{.glo}), which then needs to be converted into a -corresponding \filetype{.gls} file which contains the typeset -glossary which is input by \ics{printglossary} or -\ics{printglossaries}. The Perl script \app{makeglossaries} can be -used to call \app{makeindex} or \app{xindy}, using a customised -indexing style file, for each of the glossaries that are defined in -the document. Note that there should be no need for you to -explicitly edit or input any of these external files. See -\sectionref{sec:makeglossaries} for further details. - -The command -\begin{definition}[\DescribeMacro{\makeglossaries}] -\cs{makeglossaries} -\end{definition} -must be placed in the preamble in order to create the customised -\app{makeindex} (\filetype{.ist}) or \app{xindy} (\filetype{.xdy}) -style file and to ensure that glossary entries are written to the -appropriate output files. If you omit \cs{makeglossaries} none of -the glossaries will be created. - -\begin{important} -Note that some of the commands provided by the \styfmt{glossaries} -package must be placed before \cs{makeglossaries} as they are -required when creating the customised style file. If you attempt -to use those commands after \cs{makeglossaries} you will generate -an error. -\end{important} - -You can suppress the creation of the customised \app{xindy} -or \app{makeindex} style file using -\begin{definition}[\DescribeMacro{\noist}] -\cs{noist} -\end{definition} -Note that this command must be used before \cs{makeglossaries}. - -The default name for the customised style file is given by -\ics{jobname}\filetype{.ist} (for \app{makeindex}) or -\ics{jobname}\filetype{.xdy} (for \app{xindy}). This name may be -changed using: -\begin{definition}[\DescribeMacro{\setStyleFile}] -\cs{setStyleFile}\marg{name} -\end{definition} -where \meta{name} is the name of the style file without the -extension. Note that this command must be used before -\cs{makeglossaries}. - -Each glossary entry is assigned a \term{number list} that lists all -the locations in the document where that entry was used. By default, -the location refers to the page number but this may be overridden -using the \pkgopt{counter} package option. The default form of -the location number assumes a full stop compositor (e.g.\ 1.2), -but if your location numbers use a different compositor (e.g. 1-2) -you need to set this using -\begin{definition}[\DescribeMacro{\glsSetCompositor}] -\cs{glsSetCompositor}\marg{symbol} -\end{definition} -For example: -\begin{verbatim} -\glsSetCompositor{-} -\end{verbatim} -Note that this command must be used before \cs{makeglossaries}. - -If you use \app{xindy}, you can have a different compositor for page -numbers starting with an uppercase alphabetical character using: -\begin{definition}[\DescribeMacro{\glsSetAlphaCompositor}] -\cs{glsSetAlphaCompositor}\marg{symbol} -\end{definition} -Note that this command has no effect if you haven't used the -\pkgopt{xindy} package option. For example, if you want number -lists\iterm{number list} containing a mixture of A-1 and 2.3 style -formats, then do: -\begin{verbatim} -\glsSetCompositor{.} \glsSetAlphaCompositor{-} -\end{verbatim} -See \sectionref{sec:numberlists} for further information about -number lists\iterm{number list}. - -New glossary entries are defined using the command: -\begin{definition}[\DescribeMacro{\newglossaryentry}] -\cs{newglossaryentry}\marg{label}\marg{key-val list} -\end{definition} -The first argument, \meta{label}, must be a unique label with which -to identify this entry. The second argument, \meta{key-val list}, is -a \meta{key}=\meta{value} list that supplies the relevant -information about this entry. There are two required fields: -\gloskey{description} and either \gloskey{name} or \gloskey{parent}. -Available fields are listed below: - -\begin{description} -\item[{\gloskey{name}}] The name of the entry (as it will appear in -the glossary). If this key is omitted and the \gloskey{parent} -key is supplied, this value will be the same as the parent's name. - -\item[{\gloskey{description}}] A brief description of this term (to -appear in the glossary). Within this value, you can use -\begin{definition}[\DescribeMacro{\nopostdesc}] -\cs{nopostdesc} -\end{definition} -to suppress the -description terminator for this entry. For example, if this -entry is a parent entry that doesn't require a description, you -can do \verb|description={\nopostdesc}|. If you want a paragraph -break in the description use -\begin{definition}[\DescribeMacro{\glspar}] -\cs{glspar} -\end{definition} -However, note that not all glossary styles support multi-line -descriptions. If you are using one of the tabular-like glossary -styles that permit multi-line descriptions, use \ics{newline} -not \verb"\\" if you want to force a line break. - -\item[{\gloskey{parent}}] The label of the parent entry. Note that -the parent entry must be defined before its sub-entries. -See \sectionref{sec:subentries} for further details. - -\item[{\gloskey{descriptionplural}}] The plural form of the -description (as passed to \ics{glsdisplay} and \ics{glsdisplayfirst} -by \ics{glspl}, \ics{Glspl} and \ics{GLSpl}). If omitted, the value -is set to the same as the \gloskey{description} key. - -\item[{\gloskey{text}}] How this entry will appear in the document text -when using \ics{gls} (or one of its uppercase variants). If this -field is omitted, the value of the \gloskey{name} key is used. - -\item[{\gloskey{first}}] How the entry will appear in the document text -the first time it is used with \ics{gls}\ifirstusetext\ (or one of its uppercase -variants). If this field is omitted, the value of the \gloskey{text} -key is used. - -\item[{\gloskey{plural}}] How the entry will appear in the document text -when using \ics{glspl} (or one of its uppercase variants). -If this field is omitted, the value is obtained by appending -\ics{glspluralsuffix} to the value of the \gloskey{text} field. -The default value of \cs{glspluralsuffix} is the letter -\qt{s}. - -\item[{\gloskey{firstplural}}] How the entry will appear in the -document text the first time it is used with \ics{glspl}\ifirstusetext\ (or one of its -uppercase variants). If this field is omitted, the value is obtained -from the \gloskey{plural} key, if the \gloskey{first} key is omitted, -or by appending \ics{glspluralsuffix} to the value of the -\gloskey{first} field, if the \gloskey{first} field is present. - -\textbf{Note:} prior to version 1.13, the default value of -\gloskey{firstplural} was always taken by appending \qt{s} to the -\gloskey{first} key, which meant that you had to specify both -\gloskey{plural} and \gloskey{firstplural}, even if you hadn't -used the \gloskey{first} key. - -\item[{\gloskey{symbol}}] This field is provided to allow the user to -specify an associated symbol. If omitted, the value is set to -\cs{relax}. Note that not all glossary styles display the -symbol. - -\item[{\gloskey{symbolplural}}] This is the plural form of the -symbol (as passed to \ics{glsdisplay} and \ics{glsdisplayfirst} -by \ics{glspl}, \ics{Glspl} and \ics{GLSpl}). If omitted, the value -is set to the same as the \gloskey{symbol} key. - -\item[{\gloskey{sort}}] This value indicates how \app{makeindex} -or \app{xindy} should sort this entry. If omitted, the value is -given by the \gloskey{name} field. - -\item[{\gloskey{type}}] This specifies the label of the glossary in -which this entry belongs. If omitted, the default glossary is -assumed. The list of acronyms type is given by -\ics{acronymtype} which will either be \texttt{main} or -\texttt{acronym}, depending on whether the \pkgopt{acronym} package -option was used. - -\item[{\gloskey{user1}, \ldots, \gloskey{user6}}] Six additional -keys provided for any additional information the user may want -to specify. (For example, an associated dimension or an alternative -plural.) - -\item[{\gloskey{nonumberlist}}] Suppress the \term{number list} for -this entry. - -\item[{\gloskey{see}}] Cross-reference another entry. Using the -\gloskey{see} key will automatically add this entry to the -glossary, but will not automatically add the cross-referenced entry. -The referenced entry should be supplied as the value to this key. -If you want to override the \qt{see} tag, you can supply the new -tag in square brackets before the label. For example -\verb|see=[see also]{anotherlabel}|. For further details, -see \sectionref{sec:crossref}. - -\end{description} -Note that if the name starts with an accented letter or non-Latin -character, you must group the accented letter, otherwise it will -cause a problem for commands like \cs{Gls} and \cs{Glspl}. -For example: -\begin{verbatim} -\newglossaryentry{elite}{name={{\'e}lite}, -description={select group or class}} -\end{verbatim} -Note that the same applies if you are using the \sty{inputenc} -package: -\begin{verbatim} -\newglossaryentry{elite}{name={{é}lite}, -description={select group or class}} -\end{verbatim} -Note that in both of the above examples, you will also need to -supply the \gloskey{sort} key if you are using \app{makeindex} -whereas \app{xindy} is usually able to sort accented letters -correctly. - - - -\subsubsection{Plurals} -You may have noticed from above that you can specify the plural form -when you define a term. If you omit this, the plural will be -obtained by appending -\begin{definition}[\DescribeMacro{\glspluralsuffix}] -\cs{glspluralsuffix} -\end{definition} -to the singular form. This command defaults to the letter \qt{s}. -For example: -\begin{verbatim} -\newglossaryentry{cow}{name=cow,description={a fully grown -female of any bovine animal}} -\end{verbatim} -defines a new entry whose singular form is \qt{cow} and plural form -is \qt{cows}. However, if you are writing in archaic English, you -may want to use \qt{kine} as the plural form, in which case you -would have to do: -\begin{verbatim} -\newglossaryentry{cow}{name=cow,plural=kine, -description={a fully grown female of any bovine animal}} -\end{verbatim} - -If you are writing in a language that supports -multiple plurals (for a given term) then use the \gloskey{plural} key -for one of them and one of the user keys to specify the -other plural form. For example: -\begin{verbatim} -\newglossaryentry{cow}{name=cow,description={a fully grown -female of any bovine animal (plural cows, archaic plural kine)}, -user1={kine}} -\end{verbatim} -You can then use \verb|\glspl{cow}| to produce \qt{cows} and -\verb|\glsuseri{cow}| to produce \qt{kine}. You can, of course, -define an easy to remember synonym. For example: -\begin{verbatim} -\let\glsaltpl\glsuseri -\end{verbatim} -Then you don't have to remember which key you used to store the -alternative plural. - -If you are using a language that usually forms plurals -by appending a different letter, or sequence of letters, you can -redefine \cs{glspluralsuffix} as required. However, this must be -done \emph{before} the entries are defined. For languages that don't -form plurals by simply appending a suffix, all the plural forms must be -specified using the \gloskey{plural} key (and the \gloskey{firstplural} -key where necessary). - - -\subsubsection{Sub-Entries} -\label{sec:subentries} - -As from version 1.17, it is possible to specify sub-entries. These -may be used to order the glossary into categories, in which case -the sub-entry will have a different name to its parent entry, or -it may be used to distinguish different definitions for the same -word, in which case the sub-entries will have the same name as -the parent entry. Note that not all glossary styles support -hierarchical entries and may display all the entries in a flat -format. Of the styles that support sub-entries, some display the -sub-entry's name whilst others don't. Therefore you need to -ensure that you use a suitable style. See \sectionref{sec:styles} -for a list of predefined styles. - -Note that the parent entry will automatically be added to the -glossary if any of its child entries are used in the document. -If the parent entry is not referenced in the document, it will not -have a \term{number list}. - - -\paragraph{Hierarchical Categories} To arrange a glossary -with hierarchical categories, you need to first define the -category and then define the sub-entries using the relevant -category entry as the value of the \gloskey{parent} key. For -example, suppose I want a glossary of mathematical symbols that -are divided into Greek letters and Roman letters. Then I can -define the categories as follows: -\begin{verbatim} -\newglossaryentry{greekletter}{name={Greek letters}, -description={\nopostdesc}} - -\newglossaryentry{romanletter}{name={Roman letters}, -description={\nopostdesc}} -\end{verbatim} - -Note that in this example, the category entries don't need a -description so I have set the descriptions to \ics{nopostdesc}. -This gives a blank description and suppresses the -description terminator. - -I can now define my sub-entries as follows: -\begin{verbatim} -\newglossaryentry{pi}{name={pi}, -description={ratio of the circumference of a circle to the diameter}, -parent=greekletter} - -\newglossaryentry{C}{name=C, -description={Euler's constant}, -parent=romanletter} -\end{verbatim} - - -\paragraph{Homographs} Sub-entries that have the same name as -the parent entry, don't need to have the \gloskey{name} key. -For example, the word \qt{glossary} can mean a list of technical -words or a collection of glosses. In both cases the plural is -\qt{glossaries}. So first define the parent entry: -\begin{verbatim} -\newglossaryentry{glossary}{name=glossary, -description={\nopostdesc}, -plural={glossaries}} -\end{verbatim} -Again, the parent entry has no description, so the description -terminator needs to be suppressed using \ics{nopostdesc}. - -Now define the two different meanings of the word: -\begin{verbatim} -\newglossaryentry{glossarylist}{ -description={1) list of technical words}, -sort={1}, -parent={glossary}} - -\newglossaryentry{glossarycol}{ -description={2) collection of glosses}, -sort={2}, -parent={glossary}} -\end{verbatim} -Note that if I reference the parent entry, the location will be -added to the parent's \term{number list}, whereas if I reference -any of the child entries, the location will be added to the child -entry's number list. Note also that since the sub-entries have the -same name, the \gloskey{sort} key is required. - -In the above example, the plural form for both of the child entries -is the same as the parent entry, so the \gloskey{plural} key was -not required for the child entries. However, if the sub-entries -have different plurals, they will need to be specified. For example: -\begin{verbatim} -\newglossaryentry{bravo}{name={bravo}, -description={\nopostdesc}} - -\newglossaryentry{bravocry}{description={1) cry of approval (pl.\ bravos)}, -sort={1}, -plural={bravos}, -parent=bravo} - -\newglossaryentry{bravoruffian}{description={2) hired ruffian or -killer (pl.\ bravoes)}, -sort={2}, -plural={bravoes}, -parent=bravo} -\end{verbatim} - - -\subsubsection{Loading Entries From a File} -\label{sec:loadglsentries} - -You can store all your glossary entry definitions in another -file and use: -\begin{definition}[\DescribeMacro{\loadglsentries}] -\cs{loadglsentries}\oarg{type}\marg{filename} -\end{definition} -where \meta{filename} is the name of the file containing all the -\cs{newglossaryentry} commands. The optional argument -\meta{type} is the name of the glossary to which those entries -should belong, for those entries where the \gloskey{type} key has -been omitted (or, more specifically, for those entries whose -type has been specified by \cs{glsdefaulttype}, which is what -\cs{newglossaryentry} uses by default). For example, suppose I have -a file called \texttt{myentries.tex} which contains: -\begin{verbatim} -\newglossaryentry{perl}{type=main, -name={Perl}, -description={A scripting language}} - -\newglossaryentry{tex}{name={\TeX}, -description={A typesetting language},sort={TeX}} - -\newglossaryentry{html}{type=\glsdefaulttype, -name={html}, -description={A mark up language}} -\end{verbatim} -and suppose in my document preamble I use the command: -\begin{verbatim} -\loadglsentries[languages]{myentries} -\end{verbatim} -then this will add the entries \texttt{tex} and \texttt{html} -to the glossary whose type is given by \texttt{languages}, but -the entry \texttt{perl} will be added to the main glossary, since -it explicitly sets the type to \texttt{main}. - -\textbf{Note:} if you use \cs{newacronym} (see -\sectionref{sec:acronyms}) the type is set as -\verb|type=\acronymtype| unless you explicitly override it. For -example, if my file \texttt{myacronyms.tex} contains: -\begin{verbatim} -\newacronym{aca}{aca}{a contrived acronym} -\end{verbatim} -then (supposing I have defined a new glossary type called -\texttt{altacronym}) -\begin{verbatim} -\loadglsentries[altacronym]{myacronyms} -\end{verbatim} -will add \texttt{aca} to the glossary type \texttt{acronym}, if the -package option \pkgopt{acronym} has been specified, or will add -\texttt{aca} to the glossary type \texttt{altacronym}, if the -package option \pkgopt{acronym} is not specified.\footnote{This is -because \cs{acronymtype} is set to \cs{glsdefaulttype} if the -\pkgopt{acronym} package option is not used.} In this instance, it -is better to change \texttt{myacronyms.tex} to: -\begin{verbatim} -\newacronym[type=\glsdefaulttype]{aca}{aca}{a contrived acronym} -\end{verbatim} -and now -\begin{verbatim} -\loadglsentries[altacronym]{myacronyms} -\end{verbatim} -will add \texttt{aca} to the glossary type \texttt{altacronym}, -regardless of whether or not the package option \pkgopt{acronym} is -used. - -Note that only those entries that have been used -in the text will appear in the relevant glossaries. -Note also that \cs{loadglsentries} may only be used in the -preamble. - -\subsection{Number lists} -\label{sec:numberlists} - -Each entry in the glossary has an associated \termdef{number list}. -By default, -these numbers refer to the pages on which that entry has been used -(using any of the commands described in \sectionref{sec:glslink} -and \sectionref{sec:glsadd}). The number list can be suppressed using -the \pkgopt{nonumberlist} package option, or an alternative counter -can be set as the default using the \pkgopt{counter} package option. -The number list is also referred to as the location -list\index{location list|see{number list}}. - -Both \app{makeindex} and \app{xindy} concatenate a -sequence of 3 or more consecutive pages into a range. With -\app{xindy} you can vary the minimum sequence length using -\ics{GlsSetXdyMinRangeLength}\marg{n} where \meta{n} is either -an integer or the keyword \texttt{none} which indicates that there -should be no range formation. - -\begin{important} -Note that \cs{GlsSetXdyMinRangeLength} must be used before -\ics{makeglossaries} and has no effect if \ics{noist} is used. -\end{important} - -With both \app{makeindex} and \app{xindy}, you can replace -the separator and the closing number in the range using: -\begin{definition}[\DescribeMacro{\glsSetSuffixF}] -\cs{glsSetSuffixF}\marg{suffix} -\end{definition} -\begin{definition}[\DescribeMacro{\glsSetSuffixFF}] -\cs{glsSetSuffixFF}\marg{suffix} -\end{definition} -where the former command specifies the suffix to use for a 2 page -list and the latter specifies the suffix to use for longer lists. -For example: -\begin{verbatim} -\glsSetSuffixF{f.} -\glsSetSuffixFF{ff.} -\end{verbatim} -Note that if you use \app{xindy}, you will also need to -set the minimum range length to 1 if you want to change these -suffixes: -\begin{verbatim} -\GlsSetXdyMinRangeLength{1} -\end{verbatim} -Note that if you use the \sty{hyperref} package, you will need -to use \ics{nohyperpage} in the suffix to ensure that the hyperlinks -work correctly. For example: -\begin{verbatim} -\glsSetSuffixF{\nohyperpage{f.}} -\glsSetSuffixFF{\nohyperpage{ff.}} -\end{verbatim} - -\begin{important} -Note that \cs{glsSetSuffixF} and \cs{glsSetSuffixFF} must be used -before \ics{makeglossaries} and have no effect if \ics{noist} is -used. -\end{important} - - -\subsection{Links to Glossary Entries} -\label{sec:glslink} - -Once you have defined a glossary entry using \ics{newglossaryentry}, -you can refer to that entry in the document using one of the -commands listed in this section. The text which appears at that -point in the document when using one of these commands is referred -to as the \termdef{link text} (even if there are no hyperlinks). The -commands in this section also add a line to an external file that is -used by \app{makeindex} or \app{xindy} to generate the relevant -entry in the glossary. This information includes an associated -location that is added to the \term{number list} for that entry. By -default, the location refers to the page number. For further -information on number lists, see \sectionref{sec:numberlists}. - -\begin{important} -It is strongly recommended that you don't use the commands -defined in this section in the arguments of sectioning or caption -commands. -\end{important} - -The above warning is particularly important if you are using the -\styfmt{glossaries} package in conjunction with the \sty{hyperref} -package. Instead, use one of the commands listed in -\sectionref{sec:glsnolink} (such as \cs{glsentrytext}) or provide an -alternative via the optional argument to the sectioning/caption -command. Examples: -\begin{verbatim} -\section{An overview of \glsentrytext{perl}} -\section[An overview of Perl]{An overview of \gls{perl}} -\end{verbatim} - -The way the \term{link text} is displayed depends on -\begin{definition}[\DescribeMacro{\glstextformat}] -\cs{glstextformat}\marg{text} -\end{definition} -For example, to make all \term{link text} appear in a sans-serif -font, do: -\begin{verbatim} -\renewcommand*{\glstextformat}[1]{\textsf{#1}} -\end{verbatim} - -Each entry has an associated conditional referred to as the -\firstuseflag. This determines whether \ics{gls}, -\ics{glspl} (and their uppercase variants) should use the -value of the \gloskey{first} or \gloskey{text} keys. Note that an -entry can be used without affecting the \firstuseflag\ (for example, -when used with \cs{glslink}). See \sectionref{sec:glsunset} for -commands that unset or reset this conditional. - -The command: -\begin{definition}[\DescribeMacro{\glslink}] -\cs{glslink}\oarg{options}\marg{label}\marg{text} -\end{definition} -will place \cs{glstextformat}\marg{text} in the document at that -point and add a line into the associated glossary file for the -glossary entry given by \meta{label}. If hyperlinks are supported, -\meta{text} will be a hyperlink to the relevant line in the -glossary. (Note that this command doesn't affect the \firstuseflag: -use \ics{glsdisp} instead.) The optional argument \meta{options} -must be a \meta{key}=\meta{value} list which can take any of the -following keys: - -\begin{description} -\item[{\gloskey[glslink]{format}}] This specifies how to format the -associated location number for this entry in the glossary. This -value is equivalent to the \app{makeindex} encap value, and (as -with \cs{index}) the value needs to be the name of a command -\emph{without} the initial backslash. As with \cs{index}, the -characters \verb"(" and \verb")" can also be used to specify the -beginning and ending of a number range. Again as with \cs{index}, -the command should be the name of a command which takes an argument -(which will be the associated location). Be careful not to use a -declaration (such as \texttt{bfseries}) instead of a text block command -(such as \texttt{textbf}) as the effect is not guaranteed to be -localised. If you want to apply more than one style to a given entry -(e.g.\ \textbf{bold} and \emph{italic}) you will need to create a -command that applies both formats, e.g.\ -\begin{verbatim} -\newcommand*{\textbfem}[1]{\textbf{\emph{#1}}} -\end{verbatim} -and use that command. - -In this document, the standard formats refer to the standard text -block commands such as \ics{textbf} or \ics{emph} or any of the -commands listed in \tableref{tab:hyperxx}. - -\begin{important} -If you use \app{xindy} instead of \app{makeindex}, you -must specify any non-standard formats that you want to use -with the \gloskey[glslink]{format} key using -\ics{GlsAddXdyAttribute}\marg{name}. So if you use -\app{xindy} with the above example, you would need to add: -\begin{verbatim} -\GlsAddXdyAttribute{textbfem} -\end{verbatim} -\end{important} - -Note that unlike \cs{index}, you can't have anything following the -command name, such as an asterisk or arguments. If you want to -cross-reference another entry, either use the \gloskey{see} key when -you define the entry or use \ics{glssee} (described in -\sectionref{sec:crossref}). - - -If you are using hyperlinks and you want to change the font of the -hyperlinked location, don't use \ics{hyperpage} (provided by the -\sty{hyperref} package) as the locations may not refer to a page -number. Instead, the \styfmt{glossaries} package provides number -formats listed in \tableref{tab:hyperxx}. - -\begin{table}[htbp] -\caption{Predefined Hyperlinked Location Formats} -\label{tab:hyperxx} -\centering -\vskip\baselineskip -\begin{tabular}{ll} -\locfmt{hyperrm} & serif hyperlink\\ -\locfmt{hypersf} & sans-serif hyperlink\\ -\locfmt{hypertt} & monospaced hyperlink\\ -\locfmt{hyperbf} & bold hyperlink\\ -\locfmt{hypermd} & medium weight hyperlink\\ -\locfmt{hyperit} & italic hyperlink\\ -\locfmt{hypersl} & slanted hyperlink\\ -\locfmt{hyperup} & upright hyperlink\\ -\locfmt{hypersc} & small caps hyperlink\\ -\locfmt{hyperemph} & emphasized hyperlink -\end{tabular} -\par -\end{table} - -Note that if the \ics{hyperlink} command hasn't been defined, -the \texttt{hyper}\meta{xx} formats are equivalent to the -analogous \texttt{text}\meta{xx} font commands (and \texttt{hyperemph} -is equivalent to \texttt{emph}). If you want to -make a new format, you will need to define a command which takes -one argument and use that. For example, if you want the location -number to be in a bold sans-serif font, you can define a -command called, say, \cs{hyperbsf}: -\begin{verbatim} -\newcommand{\hyperbsf}[1]{\textbf{\hypersf{#1}}} -\end{verbatim} -and then use \texttt{hyperbsf} as the value for the \gloskey{format} -key. \ifpdf (See also \sectionref{sec:code:printglos}.) \fi -Remember that if you use \app{xindy}, you will need to add -this to the list of location attributes: -\begin{verbatim} -\GlsAddXdyAttribute{hyperbsf} -\end{verbatim} - -\item[{\gloskey[glslink]{counter}}] This specifies which counter -to use for this location. This overrides the default counter -used by this entry. (See also \sectionref{sec:numberlists}.) - -\item[{\gloskey[glslink]{hyper}}] This is a boolean key which can -be used to enable/disable the hyperlink to the relevant entry -in the glossary. (Note that setting \texttt{hyper=true} will have no -effect if \cs{hyperlink} has not been defined.) The default -value is \texttt{hyper=true}. - -\end{description} -There is also a starred version: -\begin{definition}[\DescribeMacro{\glslink*}] -\cs{glslink*}\oarg{options}\marg{label}\marg{text} -\end{definition} -which is equivalent to \cs{glslink}, except it sets -\texttt{hyper=false}. Similarly, all the following commands -described in this section also have a starred version that disables -the hyperlink. - -The command: -\begin{definition}[\DescribeMacro{\gls}] -\cs{gls}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is the same as \cs{glslink}, except that the \term{link text} -is determined from the values of the \gloskey{text} and -\gloskey{first} keys supplied when the entry was defined using -\ics{newglossaryentry}. If the entry has been marked as having -been used\ifirstuseflag, the value of the \gloskey{text} key will be used, otherwise -the value of the \gloskey{first} key will be used. -On completion, \cs{gls} will mark the entry's first use flag\ifirstuseflag\ as -used. - -There are two uppercase variants: -\begin{definition}[\DescribeMacro{\Gls}] -\cs{Gls}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -and -\begin{definition}[\DescribeMacro{\GLS}] -\cs{GLS}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -which make the first letter of the link text or all the link text -uppercase, respectively. - -The final optional argument \meta{insert}, allows you to insert -some additional text into the link text. By default, this will -append \meta{insert} at the end of the link text, but this -can be changed (see \sectionref{sec:glsdisplay}). - - -The first optional argument \meta{options} is the same as the optional -argument to \ics{glslink}. As with \cs{glslink}, these commands also -have a starred version that disable the hyperlink. - -There are also analogous plural forms: -\begin{definition}[\DescribeMacro{\glspl}] -\cs{glspl}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Glspl}] -\cs{Glspl}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSpl}] -\cs{GLSpl}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -These determine the link text from the \gloskey{plural} and -\gloskey{firstplural} keys supplied when the entry was first -defined. As before, these commands also have -a starred version that disable the hyperlink. - -Note that \cs{glslink} doesn't use or affect the \firstuseflag, -nor does it use \ics{glsdisplay} or \ics{glsdisplayfirst} (see -\sectionref{sec:glsdisplay}). Instead, you can use: -\begin{definition}[\DescribeMacro{\glsdisp}] -\cs{glsdisp}\oarg{options}\marg{label}\marg{link text} -\end{definition} -This behaves in the same way as \cs{gls}, except that it uses -\meta{link text} instead of the value of the \gloskey{first} -or \gloskey{text} key. (Note that this command always sets -\meta{insert} to nothing.) This command affects the \firstuseflag, -and uses \ics{glsdisplay} or \ics{glsdisplayfirst}. - -The command: -\begin{definition}[\DescribeMacro{\glstext}] -\cs{glstext}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is similar to \ics{gls} except that it always uses the value -of the \gloskey{text} key and does not affect the -\firstuseflag. -Unlike \cs{gls}, the inserted text \meta{insert} -is always appended to the link text since \cs{glstext} doesn't -use \ics{glsdisplay} or \ics{glsdisplayfirst}. (The same is -true for all the following commands described in this section.) - -There are also analogous commands: -\begin{definition}[\DescribeMacro{\Glstext}] -\cs{Glstext}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLStext}] -\cs{GLStext}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -As before, these commands also have a starred version that disable -the hyperlink. - -The command: -\begin{definition}[\DescribeMacro{\glsfirst}] -\cs{glsfirst}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is similar to \ics{glstext} except that it always uses the value -of the \gloskey{first} key. Again, \meta{insert} is always appended -to the end of the link text and does not affect the -\firstuseflag. - -There are also analogous commands: -\begin{definition}[\DescribeMacro{\Glsfirst}] -\cs{Glsfirst}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSfirst}] -\cs{GLSfirst}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -As before, these commands also have a starred version that disable -the hyperlink. - -The command: -\begin{definition}[\DescribeMacro{\glsplural}] -\cs{glsplural}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is similar to \ics{glstext} except that it always uses the value -of the \gloskey{plural} key. Again, \meta{insert} is always appended -to the end of the link text and does not mark the entry as having -been used. - -There are also analogous commands: -\begin{definition}[\DescribeMacro{\Glsplural}] -\cs{Glsplural}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSplural}] -\cs{GLSplural}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -As before, these commands also have a starred version that disable -the hyperlink. - -The command: -\begin{definition}[\DescribeMacro{\glsfirstplural}] -\cs{glsfirstplural}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is similar to \ics{glstext} except that it always uses the value -of the \gloskey{firstplural} key. Again, \meta{insert} is always -appended to the end of the link text and does not mark the entry as -having been used. - -There are also analogous commands: -\begin{definition}[\DescribeMacro{\Glsfirstplural}] -\cs{Glsfirstplural}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSfirstplural}] -\cs{GLSfirstplural}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -As before, these commands also have a starred version that disable -the hyperlink. - -The command: -\begin{definition}[\DescribeMacro{\glsname}] -\cs{glsname}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is similar to \ics{glstext} except that it always uses the value of -the \gloskey{name} key. Again, \meta{insert} is always appended to -the end of the link text and does not mark the entry as having been -used. Note: if you want to use this command and the \gloskey{name} -key contains commands, you will have to disable the -\hyperlink{sanitize}{sanitization} of the \gloskey{name} key and -protect fragile commands. - -There are also analogous commands: -\begin{definition}[\DescribeMacro{\Glsname}] -\cs{Glsname}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSname}] -\cs{GLSname}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -As before, these commands also have a starred version that disable -the hyperlink. - -The command: -\begin{definition}[\DescribeMacro{\glssymbol}] -\cs{glssymbol}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is similar to \ics{glstext} except that it always uses the value of -the \gloskey{symbol} key. Again, \meta{insert} is always appended to -the end of the link text and does not mark the entry as having been -used. Note: if you want to use this command and the \gloskey{symbol} -key contains commands, you will have to disable the -\hyperlink{sanitize}{sanitization} of the \gloskey{symbol} key and -protect fragile commands. - -There are also analogous commands: -\begin{definition}[\DescribeMacro{\Glssymbol}] -\cs{Glssymbol}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSsymbol}] -\cs{GLSsymbol}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -As before, these commands also have a starred version that disable -the hyperlink. - -The command: -\begin{definition}[\DescribeMacro{\glsdesc}] -\cs{glsdesc}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is similar to \ics{glstext} except that it always uses the value of -the \gloskey{description} key. Again, \meta{insert} is always -appended to the end of the link text and does not mark the entry as -having been used. Note: if you want to use this command and the -\gloskey{description} key contains commands, you will have to -disable the \hyperlink{sanitize}{sanitization} of the -\gloskey{description} key and protect fragile commands. - -There are also analogous commands: -\begin{definition}[\DescribeMacro{\Glsdesc}] -\cs{Glsdesc}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSdesc}] -\cs{GLSdesc}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -As before, these commands also have a starred version that disable -the hyperlink. - -The command: -\begin{definition}[\DescribeMacro{\glsuseri}] -\cs{glsuseri}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -is similar to \ics{glstext} except that it always uses the value -of the \gloskey{user1} key. Again, \meta{insert} is always -appended to the end of the link text and does not mark the entry as -having been used. - -There are also analogous commands: -\begin{definition}[\DescribeMacro{\Glsuseri}] -\cs{Glsuseri}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSuseri}] -\cs{GLSuseri}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -As before, these commands also have a starred version that disable -the hyperlink. Similarly for the other user keys: -\begin{definition}[\DescribeMacro{\glsuserii}] -\cs{glsuserii}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsuserii}] -\cs{Glsuserii}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSuserii}] -\cs{GLSuserii}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\glsuseriii}] -\cs{glsuseriii}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsuseriii}] -\cs{Glsuseriii}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSuseriii}] -\cs{GLSuseriii}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\glsuseriv}] -\cs{glsuseriv}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsuseriv}] -\cs{Glsuseriv}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSuseriv}] -\cs{GLSuseriv}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\glsuserv}] -\cs{glsuserv}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsuserv}] -\cs{Glsuserv}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSuserv}] -\cs{GLSuserv}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\glsuservi}] -\cs{glsuservi}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsuservi}] -\cs{Glsuservi}\oarg{options}\marg{text}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\GLSuservi}] -\cs{GLSuservi}\oarg{options}\marg{text}\oarg{insert} -\end{definition} - - - -\subsubsection{Changing the format of the link text} -\label{sec:glsdisplay} - -The format of the \term{link text} for \ics{gls}, \ics{glspl} -and their uppercase variants is governed by two commands: -\begin{definition}[\DescribeMacro{\glsdisplayfirst}] -\cs{glsdisplayfirst}\marg{first/first plural}\marg{description}\marg{symbol}\marg{insert} -\end{definition} -which is used the -first time a glossary entry is used\ifirstuse\ in the text and -\begin{definition}[\DescribeMacro{\glsdisplay}] -\cs{glsdisplay}\marg{text/plural}\marg{description}\marg{symbol}\marg{insert} -\end{definition} -which is used subsequently. -Both commands take four arguments: the first is either the singular or -plural form given by the \gloskey{text}, \gloskey{plural}, -\gloskey{first} or \gloskey{firstplural} keys (set when the term was -defined) depending on context; the second argument is the term's -description (as supplied by the \gloskey{description} or -\gloskey{descriptionplural} keys); the third -argument is the symbol associated with the term (as supplied by the -\gloskey{symbol} or \gloskey{symbolplural} keys) and the fourth argument is the additional text -supplied in the final optional argument to \cs{gls} or -\cs{glspl} (or their uppercase variants). The default definitions -of \cs{glsdisplay} and \cs{glsdisplayfirst} simply -print the first argument immediately followed by the fourth argument. -The remaining arguments are ignored. - -If required, you can access the label for the given entry via -\begin{definition}[\DescribeMacro{\glslabel}] -\cs{glslabel} -\end{definition} -so it is possible to use this label in the definition of -\cs{glsdisplay} or \cs{glsdisplayfirst} to supply additional -information using any of the commands described in -\sectionref{sec:glsnolink}, if required. - -Note that \cs{glsdisplay} and \cs{glsdisplayfirst} are not used -by \ics{glslink}. If you want to supply your own link text, you -need to use \ics{glsdisp} instead. - -For example, suppose you want a glossary of measurements and -units, you can use the \gloskey{symbol} key to store the unit: -\begin{verbatim} -\newglossaryentry{distance}{name=distance, -description={The length between two points}, -symbol={km}} -\end{verbatim} -and now suppose you want \verb|\gls{distance}| to produce -\qt{distance (km)} on \firstuse, then you can redefine -\cs{glsdisplayfirst} as follows: -\begin{verbatim} -\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} -\end{verbatim} -Note that the additional text is placed after \verb|#1|, so -\verb|\gls{distance}['s]| will produce \qt{distance's (km)} -rather than \qt{distance (km)'s} which looks a bit odd (even though -it may be in the context of \qt{the distance (km) is measured between -the two points} --- but in this instance it would be better not to -use a contraction). - -Note also that all of the \term{link text} will be formatted according -to \ics{glstextformat} (described earlier). So if you do, say: -\begin{verbatim} -\renewcommand{\glstextformat}[1]{\textbf{#1}} -\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} -\end{verbatim} -then \verb|\gls{distance}| will produce \qt{\textbf{distance (km)}}. - -If you have multiple glossaries, changing \cs{glsdisplayfirst} and -\cs{glsdisplay} will change the way entries for all of the -glossaries appear when using the commands \ics{gls}, \ics{glspl}, their -uppercase variants and \ics{glsdisp}. If you only -want the change to affect entries for a given glossary, then you need -to use -\begin{definition}[\DescribeMacro{\defglsdisplay}] -\cs{defglsdisplay}\oarg{type}\marg{definition} -\end{definition} -and -\begin{definition}[\DescribeMacro{\defglsdisplayfirst}] -\cs{defglsdisplayfirst}\oarg{type}\marg{definition} -\end{definition} -instead of redefining \cs{glsdisplay} and \cs{glsdisplayfirst}. - -Both \cs{defglsdisplay} and \cs{defglsdisplayfirst} take two arguments: -the first (which is optional) is the glossary's label\footnote{\texttt{main} for the main -(default) glossary, \cs{acronymtype} for the list of acronyms, or the -name supplied in the first mandatory argument to \cs{newglossary} for -additional glossaries.} and the second is how the term should be -displayed when it is invoked using commands \cs{gls}, -\cs{glspl}, their uppercase variants and \cs{glsdisp}. This is similar to the way \cs{glsdisplayfirst} was -redefined above. - -For example, suppose you have created a new glossary called -\texttt{notation} and you want to change the way the entry is -displayed on \firstuse\ so that it includes the symbol, you can do: -\begin{verbatim} -\defglsdisplayfirst[notation]{#1#4 (denoted #3)} -\end{verbatim} -Now suppose you have defined an entry as follows: -\begin{verbatim} -\newglossaryentry{set}{type=notation, - name=set, - description={A collection of objects}, - symbol={$S$} -} -\end{verbatim} -The first time you reference this entry it will be displayed as: -\qt{set (denoted $S$)} (assuming \ics{gls} was used). - -Remember that if you use the \gloskey{symbol} key, you need to use a -glossary style that displays the symbol, as many of the styles -ignore it. In addition, if you want either the description or symbol -to appear in the \term{link text}, you will have to disable the -\hyperlink{sanitize}{sanitization} of these keys and protect fragile -commands. - -\subsubsection{Enabling and disabling hyperlinks to glossary entries} - -If you load the \sty{hyperref} or \sty{html} packages prior to -loading the \styfmt{glossaries} package, commands such as \ics{glslink} -and \ics{gls}, described above, will automatically have hyperlinks -to the relevant glossary entry, unless the \gloskey[glslink]{hyper} -option has been set to \texttt{false}. You can disable or enable links using: -\begin{definition}[\DescribeMacro{\glsdisablehyper}] -\cs{glsdisablehyper} -\end{definition} -and -\begin{definition}[\DescribeMacro{\glsenablehyper}] -\cs{glsenablehyper} -\end{definition} -respectively. The effect can be localised by placing the commands -within a group. Note that you should only use \cs{glsenablehyper} -if the commands \ics{hyperlink} and \ics{hypertarget} have been -defined (for example, by the \sty{hyperref} package). - -You can disable just the first use links using the package -option \pkgopt[false]{hyperfirst}. Note that this option only -affects commands that recognise the \firstuse\ flag, for example -\ics{gls}, \ics{glspl} and \ics{glsdisp} but not \ics{glslink}. - - -\subsection{Adding an Entry to the Glossary Without Generating Text} -\label{sec:glsadd} - -It is possible to add a line in the glossary file without -generating any text at that point in the document using: -\begin{definition}[\DescribeMacro{\glsadd}] -\cs{glsadd}\oarg{options}\marg{label} -\end{definition} -This is similar to \ics{glslink}, only it doesn't produce -any text (so therefore, there is no \gloskey[glslink]{hyper} key -available in \meta{options} but all the other options that can -be used with \cs{glslink} can be passed to \cs{glsadd}). -For example, to add a page range to the glossary number list for the -entry whose label is given by \texttt{set}: -\begin{verbatim} -\glsadd[format=(]{set} -Lots of text about sets spanning many pages. -\glsadd[format=)]{set} -\end{verbatim} - -To add all entries that have been defined, use: -\begin{definition}[\DescribeMacro{\glsaddall}] -\cs{glsaddall}\oarg{options} -\end{definition} -The optional argument is the same as for \cs{glsadd}, except -there is also a key \gloskey[glsaddall]{types} which can be -used to specify which glossaries to use. This should be a -comma separated list. For example, if you only want to add -all the entries belonging to the list of acronyms (specified by -the glossary type \cs{acronymtype}) and a list of -notation (specified by the glossary type \texttt{notation}) then you can -do: -\begin{verbatim} -\glsaddall[types={\acronymtype,notation}] -\end{verbatim} - - -\subsection{Cross-Referencing Entries} -\label{sec:crossref} - -There are several ways of cross-referencing entries in the -glossary: - -\begin{enumerate} -\item You can use commands such as \ics{gls} in the -entries description. For example: -\begin{verbatim} -\newglossaryentry{apple}{name=apple, -description={firm, round fruit. See also \gls{pear}}} -\end{verbatim} -Note that with this method, if you don't use the -cross-referenced term in the glossary, you will need two runs of -\app{makeglossaries}: -\begin{prompt} -latex filename -makeglossaries filename -latex filename -makeglossaries filename -latex filename -\end{prompt} - -\item As described in \sectionref{sec:newglosentry}, you can use the -\gloskey{see} key when you define the entry. For example: -\begin{verbatim} -\newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, -description={Series expansion}, see={TaylorsTheorem}} -\end{verbatim} -Note that in this case, the entry with the \gloskey{see} key will -automatically be added to the glossary, but the cross-referenced -entry won't. You therefore need to ensure that you use the -cross-referenced term with the commands described in -\sectionref{sec:glslink} or \sectionref{sec:glsadd}. - -You can optionally override the \qt{see} tag using square brackets -at the start of the \gloskey{see} value. For example: -\begin{verbatim} -\newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, -description={Series expansion}, -see=[see also]{TaylorsTheorem}} -\end{verbatim} - -\item After you have defined the entry, use -\begin{definition}[\DescribeMacro{\glssee}] -\cs{glssee}\oarg{tag}\marg{label}\marg{xr label list} -\end{definition} -where \meta{xr label list} is a comma-separated list of entry -labels to be cross-referenced, \meta{label} is the label of the -entry doing the cross-referencing and \meta{tag} is the \qt{see} tag. -For example: -\begin{verbatim} -\glssee[see also]{series}{FourierSeries,TaylorsTheorem} -\end{verbatim} -Note that this automatically adds the entry given by \meta{label} to -the glossary but doesn't add the cross-referenced entries (specified -by \meta{xr label list}) to the glossary. -\end{enumerate} - -In both cases~2 and 3 above, the cross-referenced information appears -in the \term{number list}, whereas in case~1, the cross-referenced -information appears in the description. In cases~2 and~3, the -default text for the \qt{see} tag is given by \ics{seename}. - - -\subsection{Using Glossary Terms Without Links} -\label{sec:glsnolink} - -The commands described in this section display entry details without -adding any information to the glossary. They don't use -\cs{glstextformat}, they don't have any optional arguments, they -don't affect the \firstuseflag\ and, apart from \ics{glshyperlink}, -they don't produce hyperlinks. -\begin{definition}[\DescribeMacro{\glsentryname}] -\cs{glsentryname}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryname}] -\cs{Glsentryname}\marg{label} -\end{definition} -These commands display the name of the glossary entry given by -\meta{label}, as specified by the \gloskey{name} key. -\cs{Glsentryname} makes the first letter uppercase. -\begin{definition}[\DescribeMacro{\glsentrytext}] -\cs{glsentrytext}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentrytext}] -\cs{Glsentrytext}\marg{label} -\end{definition} -These commands display the subsequent use text for the glossary -entry given by \meta{label}, as specified by the \gloskey{text} key. -\cs{Glsentrytext} makes the first letter uppercase. -\begin{definition}[\DescribeMacro{\glsentryplural}] -\cs{glsentryplural}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryplural}] -\cs{Glsentryplural}\marg{label} -\end{definition} -These commands display the subsequent use plural text for the -glossary entry given by \meta{label}, as specified by the -\gloskey{plural} key. \cs{Glsentryplural} makes the first letter -uppercase. -\begin{definition}[\DescribeMacro{\glsentryfirst}] -\cs{glsentryfirst}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryfirst}] -\cs{Glsentryfirst}\marg{label} -\end{definition} -These commands display the \firstusetext\ for the glossary entry -given by \meta{label}, as specified by the \gloskey{first} key. -\cs{Glsentryfirst} makes the first letter uppercase. -\begin{definition}[\DescribeMacro{\glsentryfirstplural}] -\cs{glsentryfirstplural}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryfirstplural}] -\cs{Glsentryfirstplural}\marg{label} -\end{definition} -These commands display the plural form of the \firstusetext\ for the -glossary entry given by \meta{label}, as specified by the -\gloskey{firstplural} key. \cs{Glsentryfirstplural} makes the first -letter uppercase. -\begin{definition}[\DescribeMacro{\glsentrydesc}] -\cs{glsentrydesc}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentrydesc}] -\cs{Glsentrydesc}\marg{label} -\end{definition} -These commands display the description for the glossary entry given -by \meta{label}. \cs{Glsentrydesc} makes the first letter uppercase. -\begin{definition}[\DescribeMacro{\glsentrydescplural}] -\cs{glsentrydescplural}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentrydescplural}] -\cs{Glsentrydescplural}\marg{label} -\end{definition} -These commands display the plural description for the glossary entry -given by \meta{label}. \cs{Glsentrydescplural} makes the first -letter uppercase. -\begin{definition}[\DescribeMacro{\glsentrysymbol}] -\cs{glsentrysymbol}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentrysymbol}] -\cs{Glsentrysymbol}\marg{label} -\end{definition} -These commands display the symbol for the glossary entry given by -\meta{label}. \cs{Glsentrysymbol} makes the first letter uppercase. -\begin{definition}[\DescribeMacro{\glsentrysymbolplural}] -\cs{glsentrysymbolplural}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentrysymbolplural}] -\cs{Glsentrysymbolplural}\marg{label} -\end{definition} -These commands display the plural symbol for the glossary entry -given by \meta{label}. \cs{Glsentrysymbolplural} makes the first -letter uppercase. -\begin{definition}[\DescribeMacro{\glsentryuseri}] -\cs{glsentryuseri}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryuseri}] -\cs{Glsentryuseri}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\glsentryuserii}] -\cs{glsentryuserii}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryuserii}] -\cs{Glsentryuserii}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\glsentryuseriii}] -\cs{glsentryuseriii}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryuseriii}] -\cs{Glsentryuseriii}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\glsentryuseriv}] -\cs{glsentryuseriv}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryuseriv}] -\cs{Glsentryuseriv}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\glsentryuserv}] -\cs{glsentryuserv}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryuserv}] -\cs{Glsentryuserv}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\glsentryuservi}] -\cs{glsentryuservi}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\Glsentryuservi}] -\cs{Glsentryuservi}\marg{label} -\end{definition} -These commands display the value of the user keys for the glossary -entry given by \meta{label}. -\begin{definition}[\DescribeMacro{\glshyperlink}] -\cs{glshyperlink}\oarg{link text}\marg{label} -\end{definition} -This command provides a hyperlink to the glossary entry given by -\meta{label} \textbf{but does not add any information to the -glossary file}. The link text is given by -\ics{glsentryname}\marg{label} by default, but can be overridden -using the optional argument. -\begin{important} -If you use \cs{glshyperlink}, you need to ensure that the relevant -entry has been added to the glossary using any of the commands -described in \sectionref{sec:glslink} or \sectionref{sec:glsadd} -otherwise you will end up with a broken link. -\end{important} - -For further information see \ifpdf -\sectionref{sec:code:glsnolink}\else the section \qt{Displaying -entry details without adding information to the glossary} in the -document \url{glossaries.pdf}\fi. - - -\subsection{Displaying a glossary} -\label{sec:printglossary} - -The command -\begin{definition}[\DescribeMacro{\printglossaries}] -\cs{printglossaries} -\end{definition} -will display all the glossaries in the order in which they were -defined. Note that no glossaries will appear until you have either -used the Perl script \app{makeglossaries} or have directly used -\app{makeindex} or \app{xindy} (as described in -\sectionref{sec:makeglossaries}). If the glossary -still does not appear after you re-\LaTeX\ your document, check the -\app{makeindex}/\app{xindy} log files to see if there is a problem. -Remember that you also need to use the command \ics{makeglossaries} -in the preamble to enable the glossaries. - -An individual glossary can be displayed using: -\begin{definition}[\DescribeMacro{\printglossary}] -\cs{printglossary}\oarg{options} -\end{definition} -where \meta{options} is a \meta{key}=\meta{value} list of options. -The following keys are available: -\begin{description} -\item[{\gloskey[printglossary]{type}}] The value of this key -specifies which glossary to print. If omitted, the default -glossary is assumed. For example, to print the list of acronyms: -\begin{verbatim} -\printglossary[type=\acronymtype] -\end{verbatim} - -\item[{\gloskey[printglossary]{title}}] This is the glossary's -title (overriding the title specified when the glossary was -defined). - -\item[{\gloskey[printglossary]{toctitle}}] This is the title -to use for the table of contents (if the \pkgopt{toc} package -option has been used). It may also be used for the page header, -depending on the page style. If omitted, the glossary title is used. - -\item[{\gloskey[printglossary]{style}}] This specifies which -glossary style to use for this glossary, overriding the effect -of the \pkgopt{style} package option or \ics{glossarystyle}. - -\item[{\gloskey[printglossary]{numberedsection}}] This specifies -whether to use a numbered section for this glossary, overriding -the effect of the \pkgopt{numberedsection} package option. This -key has the same syntax as the \pkgopt{numberedsection} package -option, described in \sectionref{sec:pkgopts}. - -\item[{\gloskey[printglossary]{nonumberlist}}] Unlike the package option -of the same name, this key is a boolean key. If true (\verb|nonumberlist=true|) the numberlist -is suppressed for this glossary. If false (\verb|nonumberlist=false|) the numberlist is -displayed for this glossary. If no value is supplied, true is -assumed. - -\end{description} - -By default, the glossary is started either by \cs{chapter*} or by -\cs{section*}, depending on whether or not \cs{chapter} is defined. -This can be overridden by the \pkgopt{section} package option or the -\cs{setglossarysection} command. Numbered sectional units can be -obtained using the \pkgopt{numberedsection} package option. Each -glossary sets the page header via the command \ics{glossarymark}. If -this mechanism is unsuitable for your chosen class file or page -style package, you will need to redefine \ics{glossarymark}. Further -information about these options and commands is given in -\sectionref{sec:pkgopts}. - -Information can be added to the start of the glossary (after the -title and before the main body of the glossary) by redefining -\begin{definition}[\DescribeMacro{\glossarypreamble}] -\cs{glossarypreamble} -\end{definition} -For example: -\begin{verbatim} -\renewcommand{\glossarypreamble}{Numbers in italic indicate -primary definitions.} -\end{verbatim} -This needs to be done before the glossary is displayed using -\cs{printglossaries} or \cs{printglossary}. Note that if you -want a different preamble for each glossary, you will need to -use a separate \cs{printglossary} for each glossary and change -the definition of \cs{glossarypreamble} between each glossary. -For example: -\begin{verbatim} -\renewcommand{\glossarypreamble}{Numbers in italic indicate -primary definitions.} -\printglossary -\renewcommand{\glossarypreamble}{} -\printglossary[type=acronym] -\end{verbatim} -Alternatively, you can do something like: -\begin{verbatim} -\renewcommand{\glossarypreamble}{Numbers in italic indicate -primary definitions.\gdef\glossarypreamble{}} -\printglossaries -\end{verbatim} -which will print the preamble text for the first glossary and -change the preamble to do nothing for subsequent glossaries. -(Note that \cs{gdef} is required as the glossary is placed within -a group.) - -There is an analogous command called -\begin{definition}[\DescribeMacro{\glossarypostamble}] -\cs{glossarypostamble} -\end{definition} -which is placed at the end of each glossary. - -\subsubsection{Changing the way the entry name appears in the glossary} -\label{sec:glsnamefont} - -Within each glossary, each entry name is formatted according to -\begin{definition}[\DescribeMacro{\glsnamefont}] -\cs{glsnamefont}\marg{name} -\end{definition} -which takes one argument: the entry name. This command is always -used regardless of the glossary style. By default, \cs{glsnamefont} -simply displays its argument in whatever the surrounding font -happens to be. This means that in the list-like glossary styles -(defined in the \sty{glossary-list} style file) the name will appear -in bold, since the name is placed in the optional argument of -\cs{item}, whereas in the tabular styles (defined in the -\sty{glossary-long} and \sty{glossary-super} style files) the name -will appear in the normal font. The hierarchical glossary styles -(defined in the \sty{glossary-tree} style file) also set the name in -bold. - -For example, suppose you want all the entry names to appear in -medium weight small caps, then you can do: -\begin{verbatim} -\renewcommand{\glsnamefont}[1]{\textsc{\mdseries #1}} -\end{verbatim} - - -\subsubsection{Xindy} -\label{sec:xindy} - -If you want to use \app{xindy} to sort the glossary, you -must use the package option \pkgopt{xindy}: -\begin{verbatim} -\usepackage[xindy]{glossaries} -\end{verbatim} -This ensures that the glossary information is written in -\app{xindy} syntax. - -\sectionref{sec:makeglossaries} covers how to use the external -indexing application. This section covers the commands provided -by the \styfmt{glossaries} package that allow you to adjust the -\app{xindy} style file (\filetype{.xdy}) and parameters. - -To assist writing information to the \app{xindy} style -file, the \styfmt{glossaries} package provides the following -commands: -\begin{definition}[\DescribeMacro{\glsopenbrace}] -\cs{glsopenbrace} -\end{definition} -\begin{definition}[\DescribeMacro{\glsclosebrace}] -\cs{glsclosebrace} -\end{definition} -which produce an open and closing brace. (This is needed because -\verb|\{| and \verb|\}| don't expand to a simple brace character -when written to a file.) - -In addition, if you are using a package that makes the double -quote character active (e.g. \sty{ngerman}) you can use: -\begin{definition}[\DescribeMacro{\glsquote}] -\cs{glsquote}\marg{text} -\end{definition} -which will produce \verb|"|\meta{text}\verb|"|. Alternatively, -you can use \verb|\string"| to write the double-quote character. -This document assumes that the double quote character has not been -made active, so the examples just use \verb|"| for clarity. - -If you want greater control over the \app{xindy} style file than is -available through the \LaTeX\ commands provided by the -\styfmt{glossaries} package, you will need to edit the \app{xindy} -style file. In which case, you must use \ics{noist} to prevent the -style file from being overwritten by the \styfmt{glossaries} -package. For additional information about \app{xindy}, read the -\app{xindy} documentation. - -\paragraph{Language and Encodings} -When you use \app{xindy}, you need to specify the language -and encoding used (unless you have written your own custom -\app{xindy} style file that defines the relevant alphabet -and sort rules). If you use \app{makeglossaries}, -this information is obtained from the document's auxiliary -(\filetype{.aux}) file. The \styfmt{glossaries} package attempts to -find the root language, but in the event that it gets it wrong or if -\app{xindy} doesn't support that language, then you can -specify the language using: -\begin{definition}[\DescribeMacro{\GlsSetXdyLanguage}] -\cs{GlsSetXdyLanguage}\oarg{glossary type}\marg{language} -\end{definition} -where \meta{language} is the name of the language. The -optional argument can be used if you have multiple glossaries -in different languages. If \meta{glossary type} is omitted, it -will be applied to all glossaries, otherwise the language -setting will only be applied to the glossary given by -\meta{glossary type}. - -If the \sty{inputenc} package is used, the encoding will be -obtained from the value of \ics{inputencodingname}. -Alternatively, you can specify the encoding using: -\begin{definition}[\DescribeMacro{\GlsSetXdyCodePage}] -\cs{GlsSetXdyCodePage}\marg{code} -\end{definition} -where \meta{code} is the name of the encoding. For example: -\begin{verbatim} -\GlsSetXdyCodePage{utf8} -\end{verbatim} - -Note that you can also specify the language and encoding using -the package option -\verb|xindy={language=|\meta{lang}\verb|,codepage=|\meta{code}\verb|}|. -For example: -\begin{verbatim} -\usepackage[xindy={language=english,codepage=utf8}]{glossaries} -\end{verbatim} - -If you write your own custom \app{xindy} style file that -includes the language settings, you need to set the language -to nothing: -\begin{verbatim} -\GlsSetXdyLanguage{} -\end{verbatim} -(and remember to use \ics{noist} to prevent the style file from -being overwritten). - -\begin{important} -The commands \cs{GlsSetXdyLanguage} and \cs{GlsSetXdyCodePage} -have no effect if you don't use \app{makeglossaries}. If -you call \app{xindy} without \app{makeglossaries} you -need to remember to set the language and encoding using the -\texttt{-L} and \texttt{-C} switches. -\end{important} - - -\paragraph{Locations and Number lists} - -The most likely attributes used in the \gloskey[glslink]{format} -key (\locfmt{textrm}, \locfmt{hyperrm} etc) are automatically added -to the \app{xindy} style file, but if you want to use another -attribute, you need to add it using: -\begin{definition}[\DescribeMacro{\GlsAddXdyAttribute}] -\cs{GlsAddXdyAttribute}\marg{name} -\end{definition} -where \meta{name} is the name of the attribute, as used in -the \gloskey[glslink]{format} key. For example, suppose I want a -bold, italic, hyperlinked location. I first need to define a -command that will do this: -\begin{verbatim} -\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} -\end{verbatim} -but with \app{xindy}, I also need to add this as an allowed -attribute: -\begin{verbatim} -\GlsAddXdyAttribute{hyperbfit} -\end{verbatim} - -\begin{important} -Note that \cs{GlsAddXdyAttribute} has no effect if \ics{noist} is -used or if \ics{makeglossaries} is omitted. - -\cs{GlsAddXdyAttribute} must be used before \ics{makeglossaries}. -\end{important} - -If the location numbers don't get expanded to a simple Arabic or -Roman number or a letter from a, \ldots, z or A, \ldots, Z, then -you need to add a location style in the appropriate format. - -For example, suppose you want the page numbers written as words -rather than digits and you use the \sty{fmtcount} package to -do this. You can redefine \ics{thepage} as follows: -\begin{verbatim} -\renewcommand*{\thepage}{\Numberstring{page}} -\end{verbatim} -This gets expanded to \verb|\protect \Numberstringnum |\marg{n} -where \meta{n} is the Arabic page number. This means that you need to -define a new location that has that form: -\begin{verbatim} -\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space - \string\Numberstringnum\space\glsopenbrace" - "arabic-numbers" :sep "\glsclosebrace"} -\end{verbatim} -Note that it's necessary to use \cs{space} to indicate that -spaces also appear in the format, since, unlike \TeX, -\app{xindy} doesn't ignore spaces after control sequences. - -\begin{important} -Note that \cs{GlsAddXdyLocation} has no effect if \ics{noist} is -used or if \ics{makeglossaries} is omitted. - -\cs{GlsAddXdyLocation} must be used before \ics{makeglossaries}. -\end{important} - -In the \term{number list}, the locations are sorted according to -type. The default ordering is: \texttt{roman-page-numbers} (e.g.\ -i), \texttt{arabic-page-numbers} (e.g.\ 1), -\texttt{arabic-section-numbers} (e.g.\ 1.1 if the compositor is a -full stop or 1-1 if the compositor is a hyphen\footnote{see -\ics{setCompositor} described in \sectionref{sec:newglosentry}}), -\texttt{alpha-page-numbers} (e.g.\ a), \texttt{Roman-page-numbers} -(e.g.\ I), \texttt{Alpha-page-numbers} (e.g.\ A), -\texttt{Appendix-page-numbers} (e.g.\ A.1 if the Alpha compositor is -a full stop or A-1 if the Alpha compositor is a hyphen\footnote{see -\ics{setAlphaCompositor} described in -\sectionref{sec:newglosentry}}), user defined location names (as -specified by \ics{GlsAddXdyLocation} in the order in which they were -defined), \texttt{see} (cross-referenced entries). This ordering can -be changed using: -\begin{definition}[\DescribeMacro{\GlsSetXdyLocationClassOrder}] -\cs{GlsSetXdyLocationClassOrder}\marg{location names} -\end{definition} -where each location name is delimited by double quote marks and -separated by white space. For example: -\begin{verbatim} -\GlsSetXdyLocationClassOrder{ - "arabic-page-numbers" - "arabic-section-numbers" - "roman-page-numbers" - "Roman-page-numbers" - "alpha-page-numbers" - "Alpha-page-numbers" - "Appendix-page-numbers" - "see" -} -\end{verbatim} - -\begin{important} -Note that \cs{GlsSetXdyLocationClassOrder} has no effect if -\ics{noist} is used or if \ics{makeglossaries} is omitted. - -\cs{GlsSetXdyLocationClassOrder} must be used before -\ics{makeglossaries}. -\end{important} - -If a \term{number list} consists of a sequence of consecutive -numbers, the range will be concatenated. The -number of consecutive locations that causes a range formation -defaults to 2, but can be changed using: -\begin{definition}[\DescribeMacro{\GlsSetXdyMinRangeLength}] -\cs{GlsSetXdyMinRangeLength}\marg{n} -\end{definition} -For example: -\begin{verbatim} -\GlsSetXdyMinRangeLength{3} -\end{verbatim} -The argument may also be the keyword \texttt{none}, to indicate that -there should be no range formations. See the \app{xindy} -manual for further details on range formations. - -\begin{important} -Note that \cs{GlsSetXdyMinRangeLength} has no effect if \ics{noist} -is used or if \ics{makeglossaries} is omitted. - -\cs{GlsSetXdyMinRangeLength} must be used before -\ics{makeglossaries}. -\end{important} - -See \sectionref{sec:numberlists} for further details. - - -\paragraph{Glossary Groups} -The glossary is divided into groups according to the first -letter of the sort key. The \styfmt{glossaries} package also adds -a number group by default, unless you suppress it in the -\pkgopt{xindy} package option. For example: -\begin{verbatim} -\usepackage[xindy={glsnumbers=false}]{glossaries} -\end{verbatim} -Any entry that doesn't go in one of the letter groups or the -number group is placed in the default group. - -If you have a number group, the default behaviour is to locate -it before the \qt{A} letter group. If you are not using a -Roman alphabet, you can change this using\\[10pt] -\cs{GlsSetXdyFirstLetterAfterDigits}\marg{letter} - -\begin{important} -Note that \cs{GlsSetXdyFirstLetterAfterDigits} has no effect if -\ics{noist} is used or if \ics{makeglossaries} is omitted. - -\cs{GlsSetXdyFirstLetterAfterDigits} must be used before -\ics{makeglossaries}. -\end{important} - - -\subsection{Defining New Glossaries} -\label{sec:newglossary} - -A new glossary can be defined using: -\begin{definition}[\DescribeMacro{\newglossary}] -\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}\marg{title}\oarg{counter} -\end{definition} -where \meta{name} is the label to assign to this glossary. The -arguments \meta{in-ext} and \meta{out-ext} specify the extensions to -give to the input and output files for that glossary, \meta{title} -is the default title for this new glossary and the final optional -argument \meta{counter} specifies which counter to use for the -associated number lists\iterm{number list} (see also -\sectionref{sec:numberlists}). The first optional argument specifies -the extension for the \app{makeindex} or \app{xindy} transcript file -(this information is only used by \app{makeglossaries} which picks -up the information from the auxiliary file). - -Note that the main (default) glossary is automatically created as: -\begin{verbatim} -\newglossary{main}{gls}{glo}{\glossaryname} -\end{verbatim} -so it can be identified by the label \texttt{main} (unless the -\pkgopt{nomain} package option is used). Using the -\pkgopt{acronym} package option is equivalent to: -\begin{verbatim} -\newglossary[alg]{acronym}{acr}{acn}{\acronymname} -\end{verbatim} -so it can be identified by the label \texttt{acronym}. If you are -not sure whether the \pkgopt{acronym} option has been used, you -can identify the list of acronyms by the command -\DescribeMacro{\acronymtype}\cs{acronymtype} which is set to -\texttt{acronym}, if the \pkgopt{acronym} option has been used, -otherwise it is set to \texttt{main}. Note that if you are using -the main glossary as your list of acronyms, you need to declare -it as a list of acronyms using the package option -\pkgopt{acronymlists}. - -\begin{important} -All glossaries must be defined before \ics{makeglossaries} to -ensure that the relevant output files are opened. -\end{important} - - -\subsection{Acronyms} -\label{sec:acronyms} - -You may have noticed in \sectionref{sec:newglosentry} that when you -specify a new entry, you can specify alternate text to use when the -term is first used\ifirstuse\ in the document. This provides a -useful means to define acronyms. For convenience, the -\styfmt{glossaries} package defines the command: -\begin{definition}[\DescribeMacro{\newacronym}] -\cs{newacronym}\oarg{key-val -list}\marg{label}\marg{abbrv}\marg{long} -\end{definition} -By default, this is equivalent to: -\begin{display}\ttfamily -\cs{newglossaryentry}\textrm{\marg{label}}\{type=\ics{acronymtype}, -name=\textrm{\marg{abbrv}}, -description=\textrm{\marg{long}}, -text=\textrm{\marg{abbrv}}, -first=\{\textrm{\meta{long}} (\textrm{\meta{abbrv}})\}, -plural=\{\textrm{\meta{abbrv}}\cs{glspluralsuffix}\}, -firstplural=\{\textrm{\meta{long}}\cs{glspluralsuffix}\cs{space} (\textrm{\meta{abbrv}}\cs{glspluralsuffix})\}, -\textrm{\meta{key-val list}}\} -\end{display} -As mentioned in the previous section, the command -\ics{acronymtype} is the name of the glossary in which the acronyms -should appear. If the \pkgopt{acronym} package option has been used, -this will be \texttt{acronym}, otherwise it will be \texttt{main}. -The acronyms can then be used in exactly the same way as any other -glossary entry. If you want more than one list of acronyms, you must -identify the others using the package options \pkgopt{acronymlists}. -This ensures that options such as \pkgopt{footnote} and -\pkgopt{smallcaps} work for the additional lists of acronyms. - -\begin{important}% -\textbf{Note:} since \cs{newacronym} sets \verb|type=\acronymtype|, -if you want to load a file containing acronym definitions using -\cs{loadglsentries}\oarg{type}\marg{filename}, the optional argument -\meta{type} will not have an effect unless you explicitly set the -type as \verb|type=\glsdefaulttype| in the optional argument to -\ics{newacronym}. See \sectionref{sec:loadglsentries}. -\end{important} - -For example, the following defines the acronym IDN: -\begin{verbatim} -\newacronym{idn}{IDN}{identification number} -\end{verbatim} -This is equivalent to: -\begin{verbatim} -\newglossaryentry{idn}{type=\acronymtype, -name={IDN}, -description={identification number}, -text={IDN}, -first={identification number (IDN)}, -plural={IDNs}, -firstplural={identification numbers (IDNs)}} -\end{verbatim} -so \verb|\gls{idn}| will produce \qt{identification number (IDN)} on -\firstuse\ and \qt{IDN} on subsequent uses. - -This section describes acronyms that have been defined using -\ics{newacronym}. If you prefer to define your acronyms using -\ics{newglossaryentry} explicitly, then you should skip this section -and ignore the package options: \pkgopt{smallcaps}, -\pkgopt{smaller}, \pkgopt{description}, \pkgopt{dua} and -\pkgopt{footnote}, as these options change the definition of -\ics{newacronym} for common acronym formats as well as the way that -the link text is displayed (see \sectionref{sec:glsdisplay}). -Likewise you should ignore the package option \pkgopt{shortcuts} and -the new commands described in this section, such as \ics{acrshort}, -as they vary according to the definition of \ics{newacronym}. - -If you want to define your own custom acronym style, see -\sectionref{sec:customacronym}. - -\begin{important} -If you try using \ics{newglossaryentry} for entries in a designated -list of acronyms in combination with any of the above named package -options you are likely to get unexpected results such as empty -brackets or empty footnotes. -\end{important} - -If you use any of the package options \pkgopt{smallcaps}, -\pkgopt{smaller}, \pkgopt{description} or -\pkgopt{footnote}, the acronyms will be displayed in the document -using: -\begin{definition}[\DescribeMacro{\acronymfont}] -\cs{acronymfont}\marg{text} -\end{definition} -and -\begin{definition}[\DescribeMacro{\firstacronymfont}] -\cs{firstacronymfont}\marg{text} -\end{definition} -where \cs{firstacronymfont} is applied on \firstuse\ and -\cs{acronymfont} is applied on subsequent use. Note that if you -don't use any of the above package options, changing the definition -of \cs{acronymfont} or \cs{firstacronymfont} will have no effect. In -this case, the recommended route is to use either the -\pkgopt{smaller} or the \pkgopt{smallcaps} package option and -redefine \cs{acronymfont} and \cs{firstacronymfont} as required. -(The \pkgopt{smallcaps} option sets the default plural suffix in an -upright font to cancel the effect of \cs{textsc}, whereas -\pkgopt{smaller} sets the suffix in the surrounding font.) -For example, if you want acronyms in a normal font on first use and -emphasized on subsequent use, do: -\begin{verbatim} -\usepackage[smaller]{glossaries} -\renewcommand*{\firstacronymfont}[1]{#1} -\renewcommand*{\acronymfont}[1]{\emph{#1}} -\end{verbatim} -(Note that it is for this reason that the \sty{relsize} package -is not automatically loaded when selecting the -\pkgopt{smaller} package option.) - -\Tableref{tab:acronymsettings} lists the package options that govern -the acronym styles and how the \ics{newglossaryentry} keys are used -to store \meta{long} (the long form) and \meta{abbrv} (the short -form). Note that the \pkgopt{smallcaps} option redefines -\cs{acronymfont} so that it sets its argument using \cs{textsc} (so -you should use lower case characters in \meta{abbrv}) and the -\pkgopt{smaller} option redefines \cs{acronymfont} to use -\cs{textsmaller},\footnote{you will need to load a package, such as -\styfmt{relsize}, that defines \cs{textsmaller} if you use this -option.}\ otherwise \cs{acronymfont} simply displays its argument in -the surrounding font. - -\begin{table}[htbp] -\caption{Package options governing \cs{newacronym} and how the -information is stored in the keys for \cs{newglossaryentry}} -\label{tab:acronymsettings} -\begin{center} -\begin{tabular}{lllll} -\bfseries Package Option & -\gloskey{first} key & -\gloskey{text} key & -\gloskey{description} key & -\gloskey{symbol} key\\ -\pkgopt{description},\pkgopt{footnote} & -\meta{abbrv} & -\meta{abbrv} & -user supplied & -\meta{long}\\ -\pkgopt{description},\pkgopt{dua} & -\meta{long} & -\meta{long} & -user supplied & -\meta{abbrv}\\ -\pkgopt{description} & -\meta{long} & -\meta{abbrv} & -user supplied & -\meta{abbrv}\\ -\pkgopt{footnote} & -\meta{abbrv} & -\meta{abbrv} & -\meta{long} & - \\ -\pkgopt{smallcaps} & -\meta{long} & -\meta{abbrv} & -\meta{long} & -\meta{abbrv}\\ -\pkgopt{smaller} & -\meta{long} & -\meta{abbrv} & -\meta{long} & -\meta{abbrv}\\ -\pkgopt{dua} & -\meta{long} & -\meta{long} & -\meta{long} & -\meta{abbrv}\\ -None of the above& -\meta{long} (\meta{abbrv}) & -\meta{abbrv} & -\meta{long} & -\end{tabular} -\end{center} -\end{table} - -In case you can't remember which key stores the long or short forms -(or their plurals) the \styfmt{glossaries} package provides the -commands: -\begin{itemize} -\item\DescribeMacro{\glsshortkey}\cs{glsshortkey} -The key used to store the short form. -\item\DescribeMacro{\glsshortpluralkey}\cs{glsshortpluralkey} -The key used to store the plural version of the short form. -\item\DescribeMacro{\glslongkey}\cs{glslongkey} -The key used to store the long form. -\item\DescribeMacro{\glslongpluralkey}\cs{glslongpluralkey} -The key used to store the plural version of the long form. -\end{itemize} -These can be used in the optional argument of \cs{newacronym} -to override the defaults. For example: -\begin{verbatim} -\newacronym[\glslongpluralkey={diagonal matrices}]{dm}{DM}{diagonal -matrix} -\end{verbatim} -If the \firstuse\ uses the plural form, \verb|\glspl{dm}| will -display: diagonal matrices (DMs). - -Each of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, -\pkgopt{footnote}, \pkgopt{dua} and \pkgopt{description} use -\ics{defglsdisplay} and \ics{defglsdisplayfirst} (described in -\sectionref{sec:glsdisplay}) to change the way the link text is -displayed. This means that these package options only work for the -glossary type given by \cs{acronymtype}. If you have multiple lists -of acronyms, you will need to make the appropriate changes for each -additional glossary type. - -\begin{description} -\item[\pkgopt{description},\pkgopt{footnote}]\ifpdf\mbox{}\par\fi -When these two package options are used together, the \firstuse\ displays -the entry as: -\begin{display} -\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} -\end{display} -while subsequent use displays the entry as: -\begin{display} -\cs{acronymfont}\marg{abbrv}\meta{insert} -\end{display} -where \meta{insert} indicates the text supplied in the final -optional argument to \cs{gls}, \cs{glspl} or their uppercase -variants. - -In this case, the long form is stored in the \gloskey{symbol} key. -This means that the long form will not be displayed in the list of -acronyms unless you use a glossary style that displays the entry's -symbol (for example, the \glostyle{index} style). Entries will -be sorted according to the short form. - -Note also that when these two package options are used (in the -given order), the \styfmt{glossaries} package additionally implements the -\pkgopt{sanitize} option using -\ipkgopt[description]{sanitize}\ipkgopt[symbol]{sanitize}\verb|sanitize={description=false,symbol=false}|, so -remember to protect fragile commands when defining acronyms. - -\item[\pkgopt{dua}]\ifpdf\mbox{}\par\fi -The \pkgopt{dua} package option always displays the expanded -form and so may not be used with \pkgopt{footnote}, \pkgopt{smaller} or -\pkgopt{smallcaps}. Both \firstuse\ and subsequent use displays the -entry in the form: -\begin{display} -\meta{long}\meta{insert} -\end{display} - -If the \pkgopt{description} package option is also used, the -\gloskey{name} key is set to the long form, otherwise the -\gloskey{name} key is set to the short form and the -\gloskey{description} key is set to the long form. In both -cases the \gloskey{symbol} is set to the short form. Therefore, -if you use the \pkgopt{description} package option and you want -the short form to appear in the list of acronyms, you will need -to use a glossary style that displays the entry's symbol (for -example, the \glostyle{index} style). Entries will be sorted -according to the long form if the \pkgopt{description} option -is used, otherwise they will be sorted according to the -short form (unless overridden by the \gloskey{sort} key in -the optional argument of \ics{newacronym}). - -\item[\pkgopt{description}]\ifpdf\mbox{}\par\fi -This package option displays the entry on \firstuse\ as: -\begin{display} -\meta{long}\meta{insert} (\cs{firstacronymfont}\marg{abbrv}) -\end{display} -while subsequent use displays the entry as: -\begin{display} -\cs{acronymfont}\marg{abbrv}\meta{insert} -\end{display} -Note also that if this package option is used, the \styfmt{glossaries} -package additionally implements the option -\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so -remember to protect fragile commands when defining acronyms. - -Note that with this option, you need to specify the description -using the \gloskey{description} key in the optional argument -of \ics{newacronym}. When this option is used without -the \pkgopt{footnote} or \pkgopt{dua} options, the name field -is specified as -\begin{definition}[\DescribeMacro{\acrnameformat}] -\cs{acrnameformat}\marg{short}\marg{long} -\end{definition} -This defaults to \ics{acronymfont}\marg{short}, which means that the -long form will not appear in the list of acronyms by default. -To change this, you need to redefine \ics{acrnameformat} as -appropriate. For example, to display the long form followed -by the short form in parentheses do: -\begin{verbatim} -\renewcommand*{\acrnameformat}[2]{#2 (\acronymfont{#1})} -\end{verbatim} -Note that even if you redefine \ics{acrnameformat}, the -entries will be sorted according to the short form, unless you -override this using the \gloskey{sort} key in the optional -argument to \ics{newacronym}. - -\item[\pkgopt{footnote}]\ifpdf\mbox{}\par\fi -This package option displays the entry on \firstuse\ as: -\begin{display} -\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} -\end{display} -while subsequent use displays the entry as: -\begin{display} -\cs{acronymfont}\marg{abbrv}\meta{insert} -\end{display} -Acronyms will be sorted according to the short form. - -Note also that if this package option is used, the \styfmt{glossaries} -package additionally implements the option -\ipkgopt[description]{sanitize}\verb|sanitize={description=false}|, so -remember to protect fragile commands when defining acronyms. - -Note that on \firstuse, it is the long form in the footnote that -links to the relevant glossary entry (where hyperlinks are enabled), -whereas on subsequent use, the acronym links to the relevant -glossary entry. It is possible to change this to make the acronym on -\firstuse\ have the hyperlink instead of the footnote, but since the -footnote marker will also be a hyperlink, you will have two -hyperlinks in immediate succession. This can be ambiguous where the -hyperlinks are coloured rather than boxed. The code required to -change the \firstuse\ to make the acronym a hyperlink is as follows: -\begin{verbatim} - \defglsdisplayfirst[\acronymtype]{% - \noexpand\protect\noexpand - \glslink[\@gls@link@opts]{\@gls@link@label}{\firstacronymfont{#1}#4}% - \noexpand\protect\noexpand\footnote{#2}}% -\end{verbatim} -\textbf{Note} that this involves using internal commands (i.e.\ -commands whose name contains an \verb|@| character), so if this code -is place in a \texttt{.tex} file it needs to be placed within a -\cs{makeatletter} \ldots\ \cs{makeatother} pair. (See -\urlref{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=atsigns}{\cs{@} -and \texttt{@} in macro names} for further details.) - -\item[\pkgopt{smallcaps}]\ifpdf\mbox{}\par\fi -If neither the \pkgopt{footnote} nor \pkgopt{description} options -have been set, this option displays the entry on \firstuse\ as: -\begin{display} -\meta{long}\meta{insert} (\cs{firstacronymfont}\marg{abbrv}) -\end{display} -while subsequent use displays the entry as: -\begin{display} -\cs{acronymfont}\marg{abbrv}\meta{insert} -\end{display} -where \cs{acronymfont} is set to \verb|\textsc{#1}|. - -\begin{important} -Note that since the acronym is displayed using \ics{textsc}, -the short form, \meta{abbrv}, should be specified in lower case. -\ifpdf(Recall that "\textsc{abc}" produces \textsc{abc} whereas -"\textsc{ABC}" produces \textsc{ABC}.)\fi -\end{important} - -Note also that if this package option is used, the \styfmt{glossaries} -package additionally implements the option -\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so -remember to protect fragile commands when defining acronyms. - -\item[\pkgopt{smaller}]\ifpdf\mbox{}\par\fi -If neither the \pkgopt{footnote} nor \pkgopt{description} options -have been set, this option displays the entry on \firstuse\ as: -\begin{display} -\meta{long}\meta{insert} (\cs{firstacronymfont}\marg{abbrv}) -\end{display} -while subsequent use displays the entry as: -\begin{display} -\cs{acronymfont}\marg{abbrv}\meta{insert} -\end{display} -where \cs{acronymfont} is set to -\verb|\textsmaller{#1}|.\footnote{not that this was change from -using \ics{smaller} to \ics{textsmaller} as declarations -cause a problem for \ics{makefirstuc}.} -The entries will be sorted according to the short form. - -\begin{important} -Remember to load a package that defines \ics{textsmaller} (such as -\sty{relsize}) if you want to use this option, unless you want -to redefine \ics{acronymfont} to use some other formatting command. -\end{important} - -Note also that if this package option is used, the \styfmt{glossaries} -package additionally implements the option -\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so -remember to protect fragile commands when defining acronyms. - -\item[None of the above]\ifpdf \mbox{}\par\fi -If none of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, -\pkgopt{footnote}, \pkgopt{dua} or \pkgopt{description} are used, -then on \firstuse\ the entry is displayed as: -\begin{display} -\meta{long} (\meta{abbrv})\meta{insert} -\end{display} -while subsequent use displays the entry as: -\begin{display} -\meta{abbrv}\meta{insert} -\end{display} -Entries will be sorted according to the short form. -Note that if none of the acronym-related package options are used, -the \pkgopt{sanitize} option will not be affected. -\end{description} - -Recall from \sectionref{sec:glslink} that you can access the values -of individual keys using commands like \ics{glstext}, so it is -possible to use these commands to print just the long form or just -the abbreviation without affecting the flag that determines whether -the entry has been used. However the keys that store the long and -short form vary depending on the acronym style, so the -\styfmt{glossaries} package provides commands that are set according -to the package options. These are as follows: -\begin{definition}[\DescribeMacro{\acrshort}] -\cs{acrshort}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Acrshort}] -\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\ACRshort}] -\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -Print the abbreviated version with (if required) a hyperlink to the -relevant entry in the glossary. This is usually equivalent to -\ics{glstext} (or its uppercase variants) but may additionally put -the link text within the argument to \ics{acronymfont}. -\begin{definition}[\DescribeMacro{\acrlong}] -\cs{acrlong}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Acrlong}] -\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\ACRlong}] -\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -Print the long version with (if required) a hyperlink to the -relevant entry in the glossary. This is may be equivalent to -\ics{glsdesc}, \ics{glssymbol} or \ics{glsfirst} (or their uppercase -variants), depending on package options. -\begin{definition}[\DescribeMacro{\acrfull}] -\cs{acrfull}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\Acrfull}] -\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -\begin{definition}[\DescribeMacro{\ACRfull}] -\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -Print the long version followed by the abbreviation in brackets with -(if required) a hyperlink to the relevant entry in the glossary. - -\begin{important} -Note that if any of the above commands produce unexpected output -and you haven't used any of the acronym-related package options, -you will need to switch off the sanitization\ipkgopt{sanitize}. -For example: -\begin{verbatim} -\usepackage[sanitize=none]{glossaries} -\end{verbatim} -However, if you do this, you must remember to protect fragile -commands when defining acronyms or glossary entries. -\end{important} - -Note that if you change the definition of \ics{newacronym}, you -may additionally need to change the above commands as well as -changing the way the text is displayed using \ics{defglsdisplay} -and \ics{defglsdisplayfirst}. - -The package option \pkgopt{shortcuts} provides the synonyms listed -in \tableref{tab:shortcuts}. If any of those commands generate -an \qt{undefined control sequence} error message, check that you -have enabled the shortcuts using the \pkgopt{shortcuts} package -option. Note that there are no shortcuts for the commands that -produce all upper case text. - -\begin{table}[htbp] -\caption[Synonyms provided by the package option shortcuts]{Synonyms provided by the package option \pkgopt{shortcuts}} -\label{tab:shortcuts} -\begin{center} -\begin{tabular}{ll} -\bfseries Shortcut Command & \bfseries Equivalent Command\\ -\ics{acs} & \ics{acrshort}\\ -\ics{Acs} & \ics{Acrshort}\\ -\ics{acsp} & \ics{acrshortpl}\\ -\ics{Acsp} & \ics{Acrshortpl}\\ -\ics{acl} & \ics{acrlong}\\ -\ics{Acl} & \ics{Acrlong}\\ -\ics{aclp} & \ics{acrlongpl}\\ -\ics{Aclp} & \ics{Acrlongpl}\\ -\ics{acf} & \ics{acrfull}\\ -\ics{Acf} & \ics{Acrfull}\\ -\ics{acfp} & \ics{acrfullpl}\\ -\ics{Acfp} & \ics{Acrfullpl}\\ -\ics{ac} & \ics{gls}\\ -\ics{Ac} & \ics{Gls}\\ -\ics{acp} & \ics{glspl}\\ -\ics{Acp} & \ics{Glspl} -\end{tabular} -\end{center} -\end{table} - -\subsubsection{Defining A Custom Acronym Style} -\label{sec:customacronym} - -You may find that the predefined acronyms styles that come with the -\styfmt{glossaries} package don't suit your requirements. In this -case you can define your own style. This is done by redefining the -following commands: -\begin{definition}[\DescribeMacro{\CustomAcronymFields}] -\cs{CustomAcronymFields} -\end{definition} -This command sets up the keys for \ics{newglossaryentry} when -you define an acronym using \ics{newacronym}. Within the definition -of \cs{CustomAcronymFields}, you may use \cs{the}\ics{glslongtok} to -access the long form, \cs{the}\ics{glsshorttok} to access the short -form and \cs{the}\ics{glslabeltok} to access the label. This command -is typically used to set the \gloskey{name}, \gloskey{first}, -\gloskey{firstplural}, \gloskey{text} and \gloskey{plural} keys. It -may also be used to set the \gloskey{symbol} or -\gloskey{description} keys depending on your requirements. - -\begin{definition}[\DescribeMacro{\SetCustomDisplayStyle}] -\cs{SetCustomDisplayStyle}\marg{type} -\end{definition} -This is used to set up the display style for the glossary given by -\meta{type}. This should typically just use \ics{defglsdisplayfirst} -and \ics{defglsdisplay}. - -Once you have redefined \cs{CustomAcronymFields} and -\cs{SetCustomDisplayStyle}, you must then switch to this style using -\begin{definition}[\DescribeMacro{\SetCustomStyle}] -\cs{SetCustomStyle} -\end{definition} -Note that you may still use the \pkgopt{shortcuts} package option -with your custom style. - -\begin{important} -If you omit \cs{SetCustomStyle}, or use it before you redefine -\cs{CustomAcronymFields} and \cs{SetCustomDisplayStyle}, your new -style won't be correctly implemented. You must set up the custom style -before defining new acronyms. The acronyms must be defined using -\ics{newacronym} not \ics{newglossaryentry}. -\end{important} - -As an example, suppose I want my acronym on first use to have the -short form in the text and the long form with the description in a -footnote. Suppose also that I want the short form to be put in small -caps in the main body of the document, but I want it in normal -capitals in the list of acronyms. In my list of acronyms, I want the -long form as the name with the short form in brackets followed by -the description. - -First, I need to redefine \ics{CustomAcronymFields} so that -\ics{newacronym} will correctly set the \gloskey{name}, -\gloskey{text} and \gloskey{plural} keys. I want the long form to be -stored in the \gloskey{name} and the short form to be stored in -\gloskey{text}. In addition, I'm going to set the \gloskey{symbol} -to the short form in upper case so that it will appear in the list -of acronyms. - -\begin{verbatim} -\renewcommand*{\CustomAcronymFields}{% - name={\the\glslongtok},% - symbol={\MakeUppercase{\the\glsshorttok}},% - text={\textsc{\the\glsshorttok}},% - plural={\textsc{\the\glsshorttok}s}% -} -\end{verbatim} - -Note that in this case I haven't bothered with \ics{acrpluralsuffix} -and have just inserted an \qt{s}. - -When I use the custom acronym style, the short form is stored in -\gloskey{user1}, the plural short form is stored in \gloskey{user2}, -the long form is stored in \gloskey{user3} and the plural long form -is stored in \gloskey{user4}. So when I use \ics{defglsdisplayfirst} -and \ics{defglsdisplay}, I can use \ics{glsentryuseriii} to access -the long form. Recall from \sectionref{sec:glsdisplay}, that the -optional argument to \ics{defglsdisplayfirst} and \ics{defglsdisplay} -indicates the glossary type. This is passed to -\ics{SetCustomDisplayStyle}. The mandatory argument sets up the -definition of \ics{glsdisplayfirst} and \ics{glsdisplay} for the -given glossary, where the first argument corresponds to the -\gloskey{first}, \gloskey{firstplural}, \gloskey{text} or -\gloskey{plural}, as appropriate, the second argument corresponds to -the \gloskey{description}, the third corresponds to the -\gloskey{symbol} and the fourth argument is the inserted text. - -\begin{verbatim} -\renewcommand*{\SetCustomDisplayStyle}[1]{% - \defglsdisplayfirst[#1]{##1##4\protect\footnote{% - \glsentryuseriii{\glslabel}: ##2% - }} - \defglsdisplay[#1]{##1##4}% -} -\end{verbatim} - -Since we have a definition inside a definition, \verb|#1| refers to -the argument of \ics{SetCustomDisplayStyle}, and \verb|##1|, \ldots, -\verb|##4|, refer to the arguments of \ics{glsdisplayfirst} and -\ics{glsdisplay}. - -Now that I've redefined \ics{CustomAcronymFields} and -\ics{SetCustomDisplayStyle}, I can set this style using -\begin{verbatim} -\SetCustomStyle -\end{verbatim} -and now I can define my acronyms: -\begin{verbatim} -\newacronym[description={set of tags for use in developing hypertext -documents}]{html}{html}{Hyper Text Markup Language} - -\newacronym[description={language used to describe the layout of a -document written in a markup language}]{css}{css}{Cascading Style -Sheet} -\end{verbatim} - -Note that since I've used the description in the main body of the -text, I need to switch off the sanitization otherwise any commands -within the description won't get interpreted. Also I want to use the -\sty{hyperref} package, but this will cause a problem on first use -as I'll get nested hyperlinks, so I need to switch off the -hyperlinks on first use. In addition, I want to use a glossary style -that displays the symbol. Therefore, in my preamble I have: - -\begin{verbatim} -\usepackage[colorlinks]{hyperref} -\usepackage[acronym, % create list of acronyms - nomain, % don't need main glossary for this example - style=tree, % need a style that displays the symbol - hyperfirst=false,% don't hyperlink first use - sanitize=none % switch off sanitization as description - % will be used in the main text - ]{glossaries} -\end{verbatim} - -Note that I haven't used the \pkgopt{description} or -\pkgopt{footnote} package options. - -\subsubsection{Upgrading From the glossary Package} -\label{sec:oldacronym} -Users of the obsolete \sty{glossary} package may recall that -the syntax used to define new acronyms has changed with the -replacement \styfmt{glossaries} package. In addition, the old -\sty{glossary} package created the command -\cs{}\meta{acr-name} when defining the acronym \meta{acr-name}. - -In order to facilitate migrating from the old package to the new -one, the \styfmt{glossaries} package\footnote{as from version 1.18} -provides the command: -\begin{definition}[\DescribeMacro{\oldacronym}] -\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list} -\end{definition} -This uses the same syntax as the \sty{glossary} package's -method of defining acronyms. It is equivalent to:\\[10pt] -\ics{newacronym}\oarg{key-val list}\marg{label}\marg{abbrv}\marg{long}\\[10pt] -In addition, \ics{oldacronym} also defines the commands -\cs{}\meta{label}, which is equivalent to \ics{gls}\marg{label}, -and \cs{}\meta{label}\texttt{*}, which is equivalent to -\ics{Gls}\marg{label}. If \meta{label} is omitted, \meta{abbrv} -is used. Since commands names must consist only of alphabetical -characters, \meta{label} must also only consist of alphabetical -characters. Note that \cs{}\meta{label} doesn't allow you to use -the first optional argument of \ics{gls} or \ics{Gls} --- you will -need to explicitly use \ics{gls} or \ics{Gls} to change the -settings. - -\begin{important} -Recall that, in general, \LaTeX\ ignores spaces following command -names consisting of alphabetical characters. This is also true for -\cs{}\meta{label} unless you additionally load the -\sty{xspace} package. -\end{important} - -The \styfmt{glossaries} package doesn't load the \sty{xspace} package -since there are both advantages and disadvantages to using -\ics{xspace} in \cs{}\meta{label}. If you don't use the -\sty{xspace} package you need to explicitly force a space using -\verb*|\ | (backslash space) however you can follow \cs{}\meta{label} -with additional text in square brackets (the final optional -argument to \ics{gls}). If you use the \sty{xspace} package -you don't need to escape the spaces but you can't use -the optional argument to insert text (you will have to explicitly -use \ics{gls}). - -To illustrate this, suppose I define the acronym \qt{abc} as -follows: -\begin{verbatim} -\oldacronym{abc}{example acronym}{} -\end{verbatim} -This will create the command \cs{abc} and its starred version -\cs{abc*}. \Tableref{tab:xspace} illustrates the effect of -\cs{abc} (on subsequent use) according to whether or not the -\sty{xspace} package has been loaded. As can be seen from the -final row in the table, the \sty{xspace} package prevents the -optional argument from being recognised. - -\begin{table}[htbp] -\caption[The effect of using xspace]{The effect of using -\styfmt{xspace} with \cs{oldacronym}} -\label{tab:xspace} -\vskip\baselineskip -\centering -\begin{tabular}{lll} -\bfseries Code & \bfseries With \styfmt{xspace} & -\bfseries Without \styfmt{xspace}\\ -\verb|\abc.| & abc. & abc.\\ -\verb|\abc xyz| & abc xyz & abcxyz\\ -\verb|\abc\ xyz| & abc xyz & abc xyz\\ -\verb|\abc* xyz| & Abc xyz & Abc xyz\\ -\verb|\abc['s] xyz| & abc ['s] xyz & abc's xyz -\end{tabular} -\par -\end{table} - - - -\subsection{Unsetting and Resetting Entry Flags} -\label{sec:glsunset} - -When using \ics{gls}, \ics{glspl} and their uppercase variants it is -possible that you may want to use the value given by the -\gloskey{first} key, even though you have already used the glossary -entry\ifirstuse. Conversely, you may want to use the value given by the -\gloskey{text} key, even though you haven't used the glossary entry. -The former can be achieved by one of the following commands: -\begin{definition}[\DescribeMacro{\glsreset}] -\cs{glsreset}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\glslocalreset}] -\cs{glslocalreset}\marg{label} -\end{definition} -while the latter can be achieved by one of the following commands: -\begin{definition}[\DescribeMacro{\glsunset}] -\cs{glsunset}\marg{label} -\end{definition} -\begin{definition}[\DescribeMacro{\glslocalunset}] -\cs{glslocalunset}\marg{label} -\end{definition} -You can also reset or unset all entries for a given glossary or list of -glossaries using: -\begin{definition}[\DescribeMacro{\glsresetall}] -\cs{glsresetall}\oarg{glossary list} -\end{definition} -\begin{definition}[\DescribeMacro{\glslocalresetall}] -\cs{glslocalresetall}\oarg{glossary list} -\end{definition} -\begin{definition}[\DescribeMacro{\glsunsetall}] -\cs{glsunsetall}\oarg{glossary list} -\end{definition} -\begin{definition}[\DescribeMacro{\glslocalunsetall}] -\cs{glslocalunsetall}\oarg{glossary list} -\end{definition} -where \meta{glossary list} is a comma-separated list of -glossary labels. If omitted, all defined glossaries are assumed. -For example, to reset all entries in the main glossary and the -list of acronyms: -\begin{verbatim} -\glsresetall[main,acronym] -\end{verbatim} - -You can determine whether an entry's first use flag is set using: -\begin{definition}[\DescribeMacro{\ifglsused}] -\cs{ifglsused}\marg{label}\marg{true part}\marg{false part} -\end{definition} -where \meta{label} is the label of the required entry. If the -entry has been used, \meta{true part} will be done, otherwise -\meta{false part} will be done. - - -\subsection{Glossary Styles} -\label{sec:styles} -The \styfmt{glossaries} package comes with some pre-defined -glossary styles. Note that the styles are suited to different -types of glossaries: some styles ignore the associated -symbol; some styles are not designed for hierarchical entries, -so they display sub-entries in the same way as they display top -level entries; some styles are designed for homographs, so they -ignore the name for sub-entries. You should therefore pick a style -that suits your type of glossary. See \tableref{tab:styles} for -a summary of the available styles. - -\begin{table}[htbp] -\caption[Glossary Styles]{Glossary Styles. An asterisk in the style -name indicates anything that matches that doesn't match any -previously listed style (e.g.\ \texttt{long3col*} -matches \glostyle{long3col}, \glostyle{long3colheader}, -\glostyle{long3colborder} and \glostyle{long3colheaderborder}). -A maximum level of 0 indicates a flat glossary (sub-entries -are displayed in the same way as main entries). Where the maximum -level is given as --- there is no limit, but note that -\app{makeindex} imposes a limit of 2 sub-levels. If the -homograph column is checked, then the name is not displayed for -sub-entries. If the symbol column is checked, then the symbol will -be displayed if it has been defined.} -\label{tab:styles} -\vskip\baselineskip -\centering -\begin{tabular}{lccc} -\bfseries Style & \bfseries Maximum Level & -\bfseries Homograph & \bfseries Symbol\\ -\ttfamily listdotted & 0 & & \\ -\ttfamily sublistdotted & 1 & & \\ -\ttfamily list* & 1 & \tick & \\ -\ttfamily altlist* & 1 & \tick & \\ -\ttfamily long*3col* & 1 & \tick & \\ -\ttfamily long4col* & 1 & \tick & \tick \\ -\ttfamily altlong*4col* & 1 & \tick & \tick \\ -\ttfamily long* & 1 & \tick & \\ -\ttfamily super*3col* & 1 & \tick & \\ -\ttfamily super4col* & 1 & \tick & \tick \\ -\ttfamily altsuper*4col* & 1 & \tick & \tick \\ -\ttfamily super* & 1 & \tick & \\ -\ttfamily index* & 2 & & \tick\\ -\ttfamily treenoname* & --- & \tick & \tick\\ -\ttfamily tree* & --- & & \tick\\ -\ttfamily alttree* & --- & & \tick -\end{tabular} -\par -\end{table} - -The glossary style can be set using the \gloskey[printglossary]{style} key in the optional -argument to \ics{printglossary} or using the command: -\begin{definition}[\DescribeMacro{\glossarystyle}] -\cs{glossarystyle}\marg{style-name} -\end{definition} -Some of the glossary styles may also be set using the \pkgopt{style} -package option, it depends if the package in which they are defined -is automatically loaded by the \styfmt{glossaries} package. - -The tabular-like styles that allow multi-line descriptions and page -lists use the length \DescribeMacro{\glsdescwidth}\cs{glsdescwidth} -to set the width of the description column and the length -\DescribeMacro{\glspagelistwidth}\cs{glspagelistwidth} to set the -width of the page list column.\footnote{these lengths will not be -available if you use both the \pkgopt{nolong} and \pkgopt{nosuper} -package options or if you use the \pkgopt{nostyles} package option -unless you explicitly load the relevant package.} -These will need to be changed using \cs{setlength} if the glossary -is too wide. Note that the \glostyle{long4col} and -\glostyle{super4col} styles (and their header and border variations) -don't use these lengths as they are designed for single line -entries. Instead you should use the analogous \glostyle{altlong4col} -and \glostyle{altsuper4col} styles. If you want to -explicitly create a line-break within a multi-line description in -a tabular-like style you should use \ics{newline} instead of -\verb|\\|. - -Note that if you use the \gloskey[printglossary]{style} key in the -optional argument to \ics{printglossary}, it will override any -previous style settings for the given glossary, so if, for example, -you do -\begin{verbatim} -\renewcommand*{\glsgroupskip}{} -\printglossary[style=long] -\end{verbatim} -then the new definition of \ics{glsgroupskip} will not have an affect -for this glossary, as \cs{glsgroupskip} is redefined by -\verb|style=long|. Likewise, \ics{glossarystyle} will also -override any previous style definitions, so, again -\begin{verbatim} -\renewcommand*{\glsgroupskip}{} -\glossarystyle{long} -\end{verbatim} -will reset \cs{glsgroupskip} back to its default definition for the -named glossary style (\glostyle{long} in this case). If you want to -modify the styles, either use \ics{newglossarystyle} (described -in the next section) or make the modifications after -\ics{glossarystyle}, e.g.: -\begin{verbatim} -\glossarystyle{long} -\renewcommand*{\glsgroupskip}{} -\end{verbatim} - - \changes{1.03}{2007 July 4}{'glspostdescription added} -All the styles except for the three- and four-column styles and the -\glostyle{listdotted} style use the command -\begin{definition}[\DescribeMacro{\glspostdescription}] -\cs{glspostdescription} -\end{definition} -after the description. This simply displays a full stop by default. -To eliminate this full stop (or replace it with something else, say, -a comma) you will need to redefine \cs{glspostdescription} before -the glossary is displayed. Alternatively, you can suppress it for a -given entry by placing \ics{nopostdesc} in the entry's description. - -\subsubsection{List Styles} -\label{sec:liststyles} - -The styles described in this section are all defined in the package -\sty{glossary-list}. Since they all use the \env{description} -environment, they are governed by the same parameters as that -environment. These styles all ignore the entry's symbol. Note that -these styles will automatically be available unless you use the -\pkgopt{nolist} or \pkgopt{nostyles} package options. - -\begin{description} -\item[list] The \glostyle{list} style uses the \env{description} -environment. The entry name is placed in the optional argument of -the \cs{item} command (so it will appear in bold by default). The -description follows, and then the associated \term{number list} for -that entry. The symbol is ignored. If the entry has child entries, -the description and number list follows (but not the name) for each -child entry. Groups are separated using \cs{indexspace}. - -\item[listgroup] The \glostyle{listgroup} style is like -\glostyle{list} but the glossary groups have headings. - -\item[listhypergroup] The \glostyle{listhypergroup} style is like -\glostyle{listgroup} but has a navigation line at the start of the -glossary with links to each group that is present in the glossary. -This requires an additional run through \LaTeX\ to ensure the group -information is up to date. In the navigation line, each group is -separated by -\begin{definition}[\DescribeMacro{\glshypernavsep}] -\cs{glshypernavsep} -\end{definition} -which defaults to a vertical bar with a space on either side. For -example, to simply have a space separating each group, do: -\begin{verbatim} -\renewcommand*{\glshypernavsep}{\space} -\end{verbatim} - -Note that the hyper-navigation line is now (as from version 1.14) -set inside the optional argument to \cs{item} instead of after it -to prevent a spurious space at the start. This can be changed -by redefining \ics{glossaryheader}, but note that this needs to -be done \emph{after} the glossary style has been set. - -\item[altlist] The \glostyle{altlist} style is like \glostyle{list} -but the description starts on the line following the name. (As -with the \glostyle{list} style, the symbol is ignored.) Each child -entry starts a new line, but as with the \glostyle{list} style, -the name associated with each child entry is ignored. - -\item[altlistgroup] The \glostyle{altlistgroup} style is like -\glostyle{altlist} but the glossary groups have headings. - -\item[altlisthypergroup] The \glostyle{altlisthypergroup} style is like -\glostyle{altlistgroup} but has a set of links to the glossary -groups. The navigation line is the same as that for -\glostyle{listhypergroup}, described above. - -\item[listdotted] This style uses the \env{description} -environment.\footnote{This style was supplied by Axel~Menzel.} Each -entry starts with \verb|\item[]|, followed by the name followed by a -dotted line, followed by the description. Note that this style -ignores both the \term{number list} and the symbol. The length -\begin{definition}[\DescribeMacro{\glslistdottedwidth}] -\cs{glslistdottedwidth} -\end{definition} -governs where the description should start. This is a flat style, so -child entries are formatted in the same way as the parent entries. - -\item[sublistdotted] This is a variation on the \glostyle{listdotted} -style designed for hierarchical glossaries. The main entries -have just the name displayed. The sub entries are displayed in -the same manner as \glostyle{listdotted}. -\end{description} - - -\subsubsection{Longtable Styles} -\label{sec:longstyles} - -The styles described in this section are all defined in the package -\sty{glossary-long}. Since they all use the \env{longtable} -environment, they are governed by the same parameters as that -environment. Note that these styles will automatically be available -unless you use the \pkgopt{nolong} or \pkgopt{nostyles} package -options. These styles fully justify the description and page list -columns. If you want ragged right formatting instead, use the -analogous styles described in \sectionref{sec:longraggedstyles}. - - -\begin{description} -\item[long] The \glostyle{long} style uses the \env{longtable} -environment (defined by the \sty{longtable} package). It has two -columns: the first column contains the entry's name and the second -column contains the description followed by the \term{number list}. -The entry's symbol is ignored. -Sub groups are separated with a blank row. The width of the -first column is governed by the widest entry in that column. The -width of the second column is governed by the length -\ics{glsdescwidth}. Child entries have a similar format to the -parent entries except that their name is suppressed. - -\item[longborder] The \glostyle{longborder} style is like -\glostyle{long} but has horizontal and vertical lines around it. - -\item[longheader] The \glostyle{longheader} style is like -\glostyle{long} but has a header row. - -\item[longheaderborder] The \glostyle{longheaderborder} style is -like \glostyle{longheader} but has horizontal and vertical lines -around it. - -\item[long3col] The \glostyle{long3col} style is like -\glostyle{long} but has three columns. The first column contains -the entry's name, the second column contains the description -and the third column contains the \term{number list}. -The entry's symbol is ignored. The width of the -first column is governed by the widest entry in that column, the -width of the second column is governed by the length -\ics{glsdescwidth}, and the width of the third column is governed by the -length \ics{glspagelistwidth}. - -\item[long3colborder] The \glostyle{long3colborder} style is like -the \glostyle{long3col} style but has horizontal and vertical -lines around it. - -\item[long3colheader] The \glostyle{long3colheader} style is like -\glostyle{long3col} but has a header row. - -\item[long3colheaderborder] The \glostyle{long3colheaderborder} style is -like \glostyle{long3colheader} but has horizontal and vertical lines -around it. - -\item[long4col] The \glostyle{long4col} style is like -\glostyle{long3col} but has an additional column in which the -entry's associated symbol appears. This style is used for brief -single line descriptions. The column widths are governed by the -widest entry in the given column. Use \glostyle{altlong4col} for -multi-line descriptions. - -\item[long4colborder] The \glostyle{long4colborder} style is like -the \glostyle{long4col} style but has horizontal and vertical -lines around it. - -\item[long4colheader] The \glostyle{long4colheader} style is like -\glostyle{long4col} but has a header row. - -\item[long4colheaderborder] The \glostyle{long4colheaderborder} style is -like \glostyle{long4colheader} but has horizontal and vertical lines -around it. - -\item[altlong4col] The \glostyle{altlong4col} style is like -\glostyle{long4col} but allows multi-line descriptions and page -lists. The width of the description column is governed by the -length \ics{glsdescwidth} and the width of the page list column is -governed by the length \ics{glspagelistwidth}. The widths of the -name and symbol columns are governed by the widest entry in the -given column. - -\item[altlong4colborder] The \glostyle{altlong4colborder} style is like -the \glostyle{long4colborder} but allows multi-line descriptions and -page lists. - -\item[altlong4colheader] The \glostyle{altlong4colheader} style is like -\glostyle{long4colheader} but allows multi-line descriptions and -page lists. - -\item[altlong4colheaderborder] The \glostyle{altlong4colheaderborder} -style is like \glostyle{long4colheaderborder} but allows multi-line -descriptions and page lists. -\end{description} - - -\subsubsection{Longtable Styles (Ragged Right)} -\label{sec:longraggedstyles} - -The styles described in this section are all defined in the package -\sty{glossary-longragged}. These styles are analogous to those -defined in \sty{glossary-long} but the multiline columns are left -justified instead of fully justified. Since these styles all use the -\env{longtable} environment, they are governed by the same -parameters as that environment. The \sty{glossary-longragged} -package additionally requires the \sty{array} package. Note that -these styles will only be available if you explicitly load -\sty{glossary-longragged}: -\begin{verbatim} -\usepackage{glossaries} -\usepackage{glossary-longragged} -\end{verbatim} -Note that you can't set these styles using the \pkgopt{style} -package option since the styles aren't defined until after -the \styfmt{glossaries} package has been loaded. - -\begin{description} -\item[longragged] The \glostyle{longragged} style has two -columns: the first column contains the entry's name and the second -column contains the (left-justified) description followed by the -\term{number list}. The entry's symbol is ignored. -Sub groups are separated with a blank row. The width of the -first column is governed by the widest entry in that column. The -width of the second column is governed by the length -\ics{glsdescwidth}. Child entries have a similar format to the -parent entries except that their name is suppressed. - -\item[longraggedborder] The \glostyle{longraggedborder} style is like -\glostyle{longragged} but has horizontal and vertical lines around it. - -\item[longraggedheader] The \glostyle{longraggedheader} style is like -\glostyle{longragged} but has a header row. - -\item[longraggedheaderborder] The \glostyle{longraggedheaderborder} -style is like \glostyle{longraggedheader} but has horizontal and -vertical lines around it. - -\item[longragged3col] The \glostyle{longragged3col} style is like -\glostyle{longragged} but has three columns. The first column -contains the entry's name, the second column contains the (left -justified) description and the third column contains the (left -justified) \term{number list}. The entry's symbol is ignored. The -width of the first column is governed by the widest entry in that -column, the width of the second column is governed by the length -\ics{glsdescwidth}, and the width of the third column is governed by -the length \ics{glspagelistwidth}. - -\item[longragged3colborder] The \glostyle{longragged3colborder} -style is like the \glostyle{longragged3col} style but has horizontal -and vertical lines around it. - -\item[longragged3colheader] The \glostyle{longragged3colheader} style is like -\glostyle{longragged3col} but has a header row. - -\item[longragged3colheaderborder] The \glostyle{longragged3colheaderborder} style is -like \glostyle{longragged3colheader} but has horizontal and vertical lines -around it. - -\item[altlongragged4col] The \glostyle{altlongragged4col} style is -like \glostyle{longragged3col} but has an additional column in which -the entry's associated symbol appears. The width of the description -column is governed by the length \ics{glsdescwidth} and the width of -the page list column is governed by the length -\ics{glspagelistwidth}. The widths of the name and symbol columns -are governed by the widest entry in the given column. - -\item[altlongragged4colborder] The -\glostyle{altlongragged4colborder} style is like the -\glostyle{altlongragged4col} but has horizontal and vertical lines -around it. - -\item[altlongragged4colheader] The -\glostyle{altlongragged4colheader} style is like -\glostyle{altlongragged4col} but has a header row. - -\item[altlongragged4colheaderborder] The -\glostyle{altlongragged4colheaderborder} style is like -\glostyle{altlongragged4colheader} but has horizontal and vertical -lines around it. - -\end{description} - - -\subsubsection{Supertabular Styles} -\label{sec:superstyles} - -The styles described in this section are all defined in the package -\sty{glossary-super}. Since they all use the \env{supertabular} -environment, they are governed by the same parameters as that -environment. Note that these styles will automatically be available -unless you use the \pkgopt{nosuper} or \pkgopt{nostyles} package -options. In general, the \env{longtable} environment is better, -but there are some circumstances where it is better to use -\env{supertabular}.\footnote{e.g.\ with the \sty{flowfram} -package.} These styles fully justify the description and page list -columns. If you want ragged right formatting instead, use the -analogous styles described in \sectionref{sec:superraggedstyles}. - -\begin{description} -\item[super] The \glostyle{super} style uses the \env{supertabular} -environment (defined by the \sty{supertabular} package). It has two -columns: the first column contains the entry's name and the second -column contains the description followed by the \term{number list}. -The entry's symbol is ignored. -Sub groups are separated with a blank row. The width of the -first column is governed by the widest entry in that column. The -width of the second column is governed by the length -\ics{glsdescwidth}. Child entries have a similar format to the -parent entries except that their name is suppressed. - -\item[superborder] The \glostyle{superborder} style is like -\glostyle{super} but has horizontal and vertical lines around it. - -\item[superheader] The \glostyle{superheader} style is like -\glostyle{super} but has a header row. - -\item[superheaderborder] The \glostyle{superheaderborder} style is -like \glostyle{superheader} but has horizontal and vertical lines -around it. - -\item[super3col] The \glostyle{super3col} style is like -\glostyle{super} but has three columns. The first column contains -the entry's name, the second column contains the description -and the third column contains the \term{number list}. The -entry's symbol is ignored. The width of the -first column is governed by the widest entry in that column. The -width of the second column is governed by the length -\ics{glsdescwidth}. The width of the third column is governed by the -length \ics{glspagelistwidth}. - -\item[super3colborder] The \glostyle{super3colborder} style is like -the \glostyle{super3col} style but has horizontal and vertical -lines around it. - -\item[super3colheader] The \glostyle{super3colheader} style is like -\glostyle{super3col} but has a header row. - -\item[super3colheaderborder] The \glostyle{super3colheaderborder} style -is like \glostyle{super3colheader} but has horizontal and vertical -lines around it. - -\item[super4col] The \glostyle{super4col} style is like -\glostyle{super3col} but has an additional column in which the -entry's associated symbol appears. This style is designed for -entries with brief single line descriptions. The column widths are governed by the -widest entry in the given column. Use \glostyle{altsuper4col} -for multi-line descriptions. - -\item[super4colborder] The \glostyle{super4colborder} style is like -the \glostyle{super4col} style but has horizontal and vertical -lines around it. - -\item[super4colheader] The \glostyle{super4colheader} style is like -\glostyle{super4col} but has a header row. - -\item[super4colheaderborder] The \glostyle{super4colheaderborder} style -is like \glostyle{super4colheader} but has horizontal and vertical -lines around it. - -\item[altsuper4col] The \glostyle{altsuper4col} style is like -\glostyle{super4col} but allows multi-line descriptions and page -lists. -The width of the description column is governed by the length -\ics{glsdescwidth} and the width of the page list column is -governed by the length \ics{glspagelistwidth}. The width of the name -and symbol columns is governed by the widest entry in the -given column. - -\item[altsuper4colborder] The \glostyle{altsuper4colborder} style is like -the \glostyle{super4colborder} style but allows multi-line descriptions -and page lists. - -\item[altsuper4colheader] The \glostyle{altsuper4colheader} style is like -\glostyle{super4colheader} but allows multi-line descriptions and -page lists. - -\item[altsuper4colheaderborder] The \glostyle{altsuper4colheaderborder} -style is like \glostyle{super4colheaderborder} but allows multi-line -descriptions and page lists. -\end{description} - - -\subsubsection{Supertabular Styles (Ragged Right)} -\label{sec:superraggedstyles} - -The styles described in this section are all defined in the package -\sty{glossary-superragged}. These styles are analogous to those -defined in \sty{glossary-super} but the multiline columns are left -justified instead of fully justified. Since these styles all use the -\env{supertabular} environment, they are governed by the same -parameters as that environment. The \sty{glossary-superragged} -package additionally requires the \sty{array} package. Note that -these styles will only be available if you explicitly load -\sty{glossary-superragged}: -\begin{verbatim} -\usepackage{glossaries} -\usepackage{glossary-superragged} -\end{verbatim} -Note that you can't set these styles using the \pkgopt{style} -package option since the styles aren't defined until after -the \styfmt{glossaries} package has been loaded. - -\begin{description} -\item[superragged] The \glostyle{superragged} style uses the -\env{supertabular} environment (defined by the -\sty{supertabular} package). It has two columns: the first column -contains the entry's name and the second column contains the (left -justified) description followed by the \term{number list}. The -entry's symbol is ignored. Sub groups are separated with a blank -row. The width of the first column is governed by the widest entry -in that column. The width of the second column is governed by the -length \ics{glsdescwidth}. Child entries have a similar format to -the parent entries except that their name is suppressed. - -\item[superraggedborder] The \glostyle{superraggedborder} style is -like \glostyle{superragged} but has horizontal and vertical lines -around it. - -\item[superraggedheader] The \glostyle{superraggedheader} style is -like \glostyle{superragged} but has a header row. - -\item[superraggedheaderborder] The -\glostyle{superraggedheaderborder} style is like -\glostyle{superraggedheader} but has horizontal and vertical lines -around it. - -\item[superragged3col] The \glostyle{superragged3col} style is like -\glostyle{superragged} but has three columns. The first column -contains the entry's name, the second column contains the (left -justified) description and the third column contains the (left -justified) \term{number list}. The entry's symbol is ignored. The -width of the first column is governed by the widest entry in that -column. The width of the second column is governed by the length -\ics{glsdescwidth}. The width of the third column is governed by the -length \ics{glspagelistwidth}. - -\item[superragged3colborder] The \glostyle{superragged3colborder} -style is like the \glostyle{superragged3col} style but has -horizontal and vertical lines around it. - -\item[superragged3colheader] The \glostyle{superragged3colheader} -style is like \glostyle{superragged3col} but has a header row. - -\item[superragged3colheaderborder] The -\glostyle{superragged3colheaderborder} style is like -\glostyle{superragged3colheader} but has horizontal and vertical -lines around it. - -\item[altsuperragged4col] The \glostyle{altsuperragged4col} style is -like \glostyle{superragged3col} but has an additional column in -which the entry's associated symbol appears. The column widths for -the name and symbol column are governed by the widest entry in the -given column. - -\item[altsuperragged4colborder] The -\glostyle{altsuperragged4colborder} style is like the -\glostyle{altsuperragged4col} style but has horizontal and vertical -lines around it. - -\item[altsuperragged4colheader] The -\glostyle{altsuperragged4colheader} style is like -\glostyle{altsuperragged4col} but has a header row. - -\item[altsuperragged4colheaderborder] The -\glostyle{altsuperragged4colheaderborder} style is like -\glostyle{altsuperragged4colheader} but has horizontal and vertical -lines around it. - -\end{description} - - -\subsubsection{Tree-Like Styles} -\label{sec:treestyles} - -The styles described in this section are all defined in the package -\sty{glossary-tree}. These styles are designed for hierarchical -glossaries but can also be used with glossaries that don't have -sub-entries. These styles will display the entry's symbol if it -exists. Note that these styles will automatically be available -unless you use the \pkgopt{notree} or \pkgopt{nostyles} package -options. - -\begin{description} -\item[index] The \glostyle{index} style is similar to the way -indices are usually formatted in that it has a hierarchical -structure up to three levels (the main level plus two sub-levels). -The name is typeset in bold, and if the symbol is present it is set -in parentheses after the name and before the description. -Sub-entries are indented and also include the name, the symbol -in brackets (if present) and the description. Groups are separated -using \ics{indexspace}. - -\item[indexgroup] The \glostyle{indexgroup} style is similar to -the \glostyle{index} style except that each group has a heading. - -\item[indexhypergroup] The \glostyle{indexhypergroup} style is like -\glostyle{indexgroup} but has a set of links to the glossary -groups. The navigation line is the same as that for -\glostyle{listhypergroup}, described above. - -\item[tree] The \glostyle{tree} style is similar to the -\glostyle{index} style except that it can have arbitrary levels. -(Note that \app{makeindex} is limited to three levels, so -you will need to use \app{xindy} if you want more than -three levels.) Each sub-level is indented by -\DescribeMacro{\glstreeindent}\cs{glstreeindent}. Note that the -name, symbol (if present) and description are placed in the -same paragraph block. If you want the name to be apart from the -description, use the \glostyle{alttree} style instead. (See below.) - -\item[treegroup] The \glostyle{treegroup} style is similar to -the \glostyle{tree} style except that each group has a heading. - -\item[treehypergroup] The \glostyle{treehypergroup} style is like -\glostyle{treegroup} but has a set of links to the glossary -groups. The navigation line is the same as that for -\glostyle{listhypergroup}, described above. - -\item[treenoname] The \glostyle{treenoname} style is like -the \glostyle{tree} style except that the name for each sub-entry -is ignored. - -\item[treenonamegroup] The \glostyle{treenonamegroup} style is -similar to the \glostyle{treenoname} style except that each group -has a heading. - -\item[treenonamehypergroup] The \glostyle{treenonamehypergroup} -style is like \glostyle{treenonamegroup} but has a set of links to -the glossary groups. The navigation line is the same as that for -\glostyle{listhypergroup}, described above. - -\item[alttree] The \glostyle{alttree} style is similar to the -\glostyle{tree} style except that the indentation for each level -is determined by the width of the text specified by -\begin{definition}[\DescribeMacro{\glssetwidest}] -\cs{glssetwidest}\oarg{level}\marg{text} -\end{definition} -The optional argument \meta{level} indicates the level, where -0 indicates the top-most level, 1 indicates the first level -sub-entries, etc. If \cs{glssetwidest} hasn't been used for a -given sub-level, the level~0 widest text is used instead. If -\meta{level} is omitted, 0 is assumed. - -For each level, the name is placed to the left of the paragraph -block containing the symbol (optional) and the description. If the -symbol is present, it is placed in parentheses before the -description. - -\item[alttreegroup] The \glostyle{alttreegroup} is like the -\glostyle{alttree} style except that each group has a heading. - -\item[alttreehypergroup] The \glostyle{alttreehypergroup} style is -like \glostyle{alttreegroup} but has a set of links to the glossary -groups. The navigation line is the same as that for -\glostyle{listhypergroup}, described above. - -\end{description} - - - -\subsection{Defining your own glossary style} -\label{sec:newglossarystyle} - -If the predefined styles don't fit your requirements, you can -define your own style using: -\begin{definition}[\DescribeMacro{\newglossarystyle}] -\cs{newglossarystyle}\marg{name}\marg{definitions} -\end{definition} -where \meta{name} is the name of the new glossary style (to be -used in \cs{glossarystyle}). The second argument \meta{definitions} -needs to redefine all of the following: - -\begin{definition}[\DescribeEnv{theglossary}] -\env{theglossary} -\end{definition} -This environment defines how the main body of the glossary should -be typeset. Note that this does not include the section heading, -the glossary preamble (defined by \cs{glossarypreamble}) or the -glossary postamble (defined by \cs{glossarypostamble}). For example, -the \glostyle{list} style uses the \env{description} environment, -so the \env{theglossary} environment is simply redefined to begin -and end the \env{description} environment. - -\begin{definition}[\DescribeMacro{\glossaryheader}] -\cs{glossaryheader} -\end{definition} -This macro indicates what to do at the start of the main body -of the glossary. Note that this is not the same as -\cs{glossarypreamble}, which should not be affected by changes in -the glossary style. The \glostyle{list} glossary style redefines -\cs{glossaryheader} to do nothing, whereas the \glostyle{longheader} -glossary style redefines \cs{glossaryheader} to do a header row. - -\begin{definition}[\DescribeMacro{\glsgroupheading}] -\cs{glsgroupheading}\marg{label} -\end{definition} -This macro indicates -what to do at the start of each logical block within the main body -of the glossary. If you use \app{makeindex} the glossary is -sub-divided into a maximum of twenty-eight logical blocks that are -determined by the first character of the \gloskey{sort} key (or -\gloskey{name} key if the \gloskey{sort} key is omitted). The -sub-divisions are in the following order: symbols, numbers, A, -\ldots, Z\@. If you use \app{xindy}, the sub-divisions depend on -the language settings. - -Note that the argument to \cs{glsgroupheading} -is a label \emph{not} the group title. The group title can be obtained -via -\begin{definition}[\DescribeMacro{\glsgetgrouptitle}] -\cs{glsgetgrouptitle}\marg{label} -\end{definition} -This obtains the title as follows: if -\cs{}\meta{label}\texttt{groupname} exists, this is taken to be the -title, otherwise the title is just \meta{label}. - -A navigation hypertarget can be created using -\begin{definition}[\DescribeMacro{\glsnavhypertarget}] -\cs{glsnavhypertarget}\marg{label}\marg{text} -\end{definition} -For further details about \cs{glsnavhypertarget}, see -\ifpdf\sectionref{sec:code:hypernav}\else the documented code of -\sty{glossary-hypernav} in \texttt{glossaries.pdf}\fi. - - -Most of the predefined glossary styles redefine \cs{glsgroupheading} -to simply ignore its argument. The \glostyle{listhypergroup} style -redefines \cs{glsgroupheading} as follows: -\begin{verbatim} -\renewcommand*{\glsgroupheading}[1]{% -\item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]} -\end{verbatim} -See also \cs{glsgroupskip} below. (Note that command definitions within -\cs{newglossarystyle} must use \verb|##1| instead of \verb|#1| etc.) - -\begin{definition}[\DescribeMacro{\glsgroupskip}] -\cs{glsgroupskip} -\end{definition} -This macro determines what to do after one logical group but before -the header for the next logical group. The \glostyle{list} glossary -style simply redefines \cs{glsgroupskip} to be \cs{indexspace}, -whereas the tabular-like styles redefine \cs{glsgroupskip} to -produce a blank row. - -\begin{definition}[\DescribeMacro{\glossaryentryfield}] -\cs{glossaryentryfield}\marg{label}\marg{formatted -name}\marg{description}\marg{symbol} -\marg{number list} -\end{definition} -This macro indicates what to do for a given glossary entry. -Note that \meta{formatted name} will always be in the form -\cs{glsnamefont}\marg{name}. This allows the user to set a given -font for the entry name, regardless of the glossary style used. -Note that \meta{label} is the label used when the glossary entry -was defined via either \cs{newglossaryentry} or \cs{newacronym}. - -Each time you use a glossary entry it creates a hyperlink (if -hyperlinks are enabled) to the relevant line in the glossary. -Your new glossary style must therefore redefine -\cs{glossaryentryfield} to set the appropriate target. This -is done using -\begin{definition}[\DescribeMacro{\glstarget}] -\cs{glstarget}\marg{label}\marg{text} -\end{definition} -where \meta{label} is the entry's label. Note that you -don't need to worry about whether the \sty{hyperref} package has -been loaded, as \cs{glstarget} won't create a target if -\cs{hypertarget} hasn't been defined. - -For example, the -\glostyle{list} style defines \cs{glossaryentryfield} as follows: -\begin{verbatim} -\renewcommand*{\glossaryentryfield}[5]{% -\item[\glstarget{##1}{##2}] ##3\glspostdescription\space ##5} -\end{verbatim} - -Note also that \meta{number list} will always be of the form\\[10pt] -\cs{glossaryentrynumbers}\{\cs{relax}\\ -\cs{setentrycounter}\marg{counter name}\cs{glsnumberformat}\marg{number(s)}\}\\[10pt] -where \meta{number(s)} -may contain \cs{delimN} (to delimit individual numbers) and/or -\cs{delimR} (to indicate a range of numbers). There may be -multiple occurrences of -\cs{setentrycounter}\marg{counter name}\cs{glsnumberformat}\marg{number(s)}, but note -that the entire number list is enclosed within the argument -to \ics{glossaryentrynumbers}. The user can redefine this to change -the way the entire number list is formatted, regardless of -the glossary style. However the most common use of -\cs{glossaryentrynumbers} is to provide a means of suppressing the -number list altogether. (In fact, the \pkgopt{nonumberlist} option -redefines \cs{glossaryentrynumbers} to ignore its argument.) -Therefore, when you define a new glossary style, you don't need -to worry about whether the user has specified the -\pkgopt{nonumberlist} package option. - -\begin{definition}[\DescribeMacro{\glossarysubentryfield}] -\cs{glossarysubentryfield}\marg{level}\marg{label}\marg{formatted -name}\marg{description}\marg{symbol} -\marg{number list} -\end{definition} -This is new to version 1.17, and is used to display sub-entries. -The first argument, \meta{level}, indicates the sub-entry level. -This must be an integer from 1 (first sub-level) onwards. The -remaining arguments are analogous to those for -\ics{glossaryentryfield} described above. - -For further details of these commands, see -\ifpdf\sectionref{sec:code:printglos}\else the documented code in -\texttt{glossaries.pdf}\fi. - -\subsubsection{Example: creating a completely new style} - -If you want a completely new style, you will need to redefine all -of the commands and the environment listed above. - -For example, suppose you want each entry to start with a bullet point. -This means that the glossary should be placed in the \env{itemize} -environment, so \env{theglossary} should start and end that -environment. Let's also suppose that you don't want anything between -the glossary groups (so \ics{glsgroupheading} and \ics{glsgroupskip} -should do nothing) and suppose you don't want anything to appear -immediately after \verb|\begin{theglossary}| (so \ics{glossaryheader} -should do nothing). In addition, let's suppose the symbol should -appear in brackets after the name, followed by the description and -last of all the \term{number list} should appear within square brackets -at the end. Then you can create this new glossary style, called, say, -\texttt{mylist}, as follows: -\begin{verbatim} - \newglossarystyle{mylist}{% - % put the glossary in the itemize environment: - \renewenvironment{theglossary}{\begin{itemize}}{\end{itemize}}% - % have nothing after \begin{theglossary}: - \renewcommand*{\glossaryheader}{}% - % have nothing between glossary groups: - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand*{\glsgroupskip}{}% - % set how each entry should appear: - \renewcommand*{\glossaryentryfield}[5]{% - \item % bullet point - \glstarget{##1}{##2}% the entry name - \space (##4)% the symbol in brackets - \space ##3% the description - \space [##5]% the number list in square brackets - }% - % set how sub-entries appear: - \renewcommand*{\glossarysubentryfield}[6]{% - \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% - } -\end{verbatim} -Note that this style creates a flat glossary, where sub-entries -are displayed in exactly the same way as the top level entries. - - -\subsubsection{Example: creating a new glossary style based on an -existing style} - -\changes{1.11}{2008 March 1}{Fixed error in manual (glossary style -is set using \cs{glossarystyle} not \cs{setglossarystyle})}% -If you want to define a new style that is a slightly modified -version of an existing style, you can use \cs{glossarystyle} -within the second argument of \cs{newglossarystyle} followed by -whatever alterations you require. For example, suppose you want -a style like the \glostyle{list} style but you don't want the extra -vertical space created by \cs{indexspace} between groups, then you -can create a new glossary style called, say, \texttt{mylist} as -follows: -\begin{verbatim} -\newglossarystyle{mylist}{% -\glossarystyle{list}% base this style on the list style -\renewcommand{\glsgroupskip}{}% make nothing happen between groups -} -\end{verbatim} - - -\subsubsection{Example: creating a glossary style that uses the -\gloskey{user1}, \ldots, \gloskey{user6} keys} - -Since \ics{glossaryentryfield} and \ics{glossarysubentryfield} -provide the label for the entry, it's also possible to access -the values of the generic user keys, such as \gloskey{user1}. For -example, suppose each entry not only has an associated symbol, -but also units (stored in \gloskey{user1}) and dimension -(stored in \gloskey{user2}). Then you can define a glossary style -that displays each entry in a \env{longtable} as follows: -\begin{verbatim} -\newglossarystyle{long6col}{% - % put the glossary in a longtable environment: - \renewenvironment{theglossary}% - {\begin{longtable}{lp{\glsdescwidth}cccp{\glspagelistwidth}}}% - {\end{longtable}}% - % Set the table's header: - \renewcommand*{\glossaryheader}{% - \bfseries Term & \bfseries Description & \bfseries Symbol & - \bfseries Units & \bfseries Dimensions & \bfseries Page List - \\\endhead}% - % No heading between groups: - \renewcommand*{\glsgroupheading}[1]{}% - % Main (level 0) entries displayed in a row: - \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2}% Name - & ##3% Description - & ##4% Symbol - & \glsentryuseri{##1}% Units - & \glsentryuserii{##1}% Dimensions - & ##5% Page list - \\% end of row - }% - % Sub entries treated the same as level 0 entries: - \renewcommand*{\glossarysubentryfield}[6]{% - \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% - % Nothing between groups: - \renewcommand*{\glsgroupskip}{}% -} -\end{verbatim} - - -\subsection{Accessibility Support}\label{sec:accsupp} -Limited accessibility support is provided by the accompanying -\sty{glossaries-accsupp} package, but note that this package is -experimental and it requires the \sty{accsupp} package -which is also listed as experimental. This package defines -additional keys that may be used when defining glossary entries. -The keys are as follows: -\begin{description} -\item[{\gloskey{access}}] The replacement text corresponding to -the \gloskey{name} key. - -\item[{\gloskey{textaccess}}] The replacement text corresponding -to the \gloskey{text} key. - -\item[{\gloskey{firstaccess}}] The replacement text corresponding -to the \gloskey{first} key. - -\item[{\gloskey{pluralaccess}}] The replacement text corresponding -to the \gloskey{plural} key. - -\item[{\gloskey{firstpluralaccess}}] The replacement text corresponding -to the \gloskey{firstplural} key. - -\item[{\gloskey{symbolaccess}}] The replacement text corresponding -to the \gloskey{symbol} key. - -\item[{\gloskey{symbolpluralaccess}}] The replacement text corresponding -to the \gloskey{symbolplural} key. - -\item[{\gloskey{descriptionaccess}}] The replacement text corresponding -to the \gloskey{description} key. - -\item[{\gloskey{descriptionpluralaccess}}] The replacement text corresponding -to the \gloskey{descriptionplural} key. - -\end{description} - -For example: -\begin{verbatim} -\newglossaryentry{tex}{name={\TeX},description={Document preparation -language},access={TeX}} -\end{verbatim} -Now \verb|\gls{tex}| will be equivalent to -\begin{verbatim} -\BeginAccSupp{ActualText=TeX}\TeX\EndAccSupp{} -\end{verbatim} -See \ifpdf \sectionref{sec:code:accsupp} \else the section -\qt{glossaries-accsupp code} in the document \texttt{glossaries.pdf} -\fi for further details. It is recommended that you also read the -\sty{accsupp} documentation. - -\section{Mfirstuc Package} -\label{sec:mfirstuc} - -The \styfmt{glossaries} bundle is supplied with the package -\sty{mfirstuc} which provides the command: -\begin{definition}[\DescribeMacro{\makefirstuc}] -\cs{makefirstuc}\marg{stuff} -\end{definition} -which makes the first object of -\meta{stuff} uppercase unless \meta{stuff} starts with a control -sequence followed by a non-empty group, in which case the first -object in the group is converted to uppercase. Examples: -\begin{itemize} -\item \verb|\makefirstuc{abc}| produces Abc - -\item \verb|\makefirstuc{\emph{abc}}| produces \emph{Abc} -(\ics{MakeUppercase} has been applied to the letter \qt{a} rather -than \cs{emph}.) Note however that -\verb|\makefirstuc{{\em abc}}| produces \emph{ABC} and -\verb|{\makefirstuc{\em abc}}| produces abc. - -\item \verb|\makefirstuc{{\'a}bc}| produces \MakeUppercase{\'a}bc - -\item \verb|\makefirstuc{\ae bc}| produces \MakeUppercase{\ae}bc - -\item \verb|\makefirstuc{{\ae}bc}| produces \MakeUppercase{\ae}bc - -\item \verb|\makefirstuc{{ä}bc}| produces \MakeUppercase{ä}bc - -\end{itemize} -Note that non-Latin or accented characters appearing at the -start of the text must be placed in a group (even if you are -using the \sty{inputenc} package) due to expansion issues. - -\begin{important} -In version 1.02 of \styfmt{mfirstuc}, a bug fix resulted in a change -in output if the first object is a control sequence followed by -an empty group. Prior to version 1.02, \verb|\makefirstuc{\ae{}bc}| -produced \ae Bc. However as from version 1.02, it now produces -\AE bc. -\end{important} - -Note also that -\begin{verbatim} -\newcommand{\abc}{abc} -\makefirstuc{\abc} -\end{verbatim} -produces: ABC. This is because the first object in the argument of -\cs{makefirstuc} is \cs{abc}, so it does \verb|\MakeUppercase\abc|. -Whereas: -\begin{verbatim} -\newcommand{\abc}{abc} -\expandafter\makefirstuc\expandafter{\abc} -\end{verbatim} -produces: Abc. There is a short cut command which will do this:\\[10pt] -\begin{definition}[\DescribeMacro{\xmakefirstuc}] -\cs{xmakefirstuc}\marg{stuff} -\end{definition} -This is equivalent to \cs{expandafter}\cs{makefirstuc}\cs{expandafter}\marg{stuff}. So -\begin{verbatim} -\newcommand{\abc}{abc} -\xmakefirstuc{\abc} -\end{verbatim} -produces: Abc. - -If you want to use an alternative command to convert to uppercase, -for example \cs{MakeTextUppercase},\footnote{defined in the -\styfmt{textcase} package} you can redefine the internal -command \cs{@gls@makefirstuc}. For example: -\begin{verbatim} -\renewcommand{\@gls@makefirstuc}[1]{\MakeTextUppercase #1} -\end{verbatim} -(Remember that command names that contain the @ character must -either be placed in packages or be placed between \cs{makeatletter} -and \cs{makeatother}.) - - - -\StopEventually{% - \clearpage\phantomsection - \addcontentsline{toc}{section}{Index}\PrintIndex - -} - -\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries/glossaries-user.html b/Master/texmf-dist/doc/latex/glossaries/glossaries-user.html new file mode 100644 index 00000000000..b122907da37 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/glossaries-user.html @@ -0,0 +1,17650 @@ + + + + +User Manual for glossaries.sty v3.0 + + + + + + + + + +
+ + + + + + + +

User Manual for glossaries.sty v3.0

+
Nicola L.C. Talbot +
School of Computing Sciences +
University of East Anglia +
Norwich. Norfolk +
NR4 7TJ. United Kingdom. +
http://theoval.cmp.uea.ac.uk/~nlct/

+
2011-04-02
+
+

The glossaries bundle comes with the following documentation: +

+glossariesbegin.pdf
If you are a complete beginner, start with “The glossaries + package: a guide for beginners”. +
+glossary2glossaries.pdf
If you are moving over from the obsolete glossary + package, read “Upgrading from the glossary package to the glossaries + package”. +
+glossaries-user.pdf
This document is the main user guide for the glossaries + package. +
+mfirstuc-manual.pdf
The commands provided by the mfirstuc package are + briefly described in “mfirstuc.sty: uppercasing first letter”. +
+glossaries.pdf
Advanced users wishing to know more about the inner workings + of all the packages provided in the glossaries bundle should read “Documented + Code for glossaries v3.0”. This includes how to iterate over all entry labels + defined in a given glossary or how to iterate over all glossary types, as well + as the documented code for the mfirstuc package. +
+INSTALL
Installation instructions. + + + +
+CHANGES
Change log. +
+README
Package summary. +
+

If you use hyperref and glossaries, you must load hyperref first.
+

+ + + +

+

Contents

+
+ Glossary +
1 Introduction +
 1.1 Sample Documents +
 1.2 Multi-Lingual Support +
  1.2.1 Changing the Fixed Names +
 1.3 Generating the Associated Glossary Files +
  1.3.1 Using the makeglossaries Perl Script +
  1.3.2 Using xindy explicitly +
  1.3.3 Using makeindex explicitly +
  1.3.4 Note to Front-End and Script Developers +
2 Package Options +
 2.1 General Options +
 2.2 Sectioning and TOC Options +
 2.3 Glossary Appearance Options +
 2.4 Sorting Options +
 2.5 Acronym Options +
3 Setting Up +
4 Defining Glossary Entries +
 4.1 Plurals +
 4.2 Sub-Entries +
  4.2.1 Hierarchical Categories +
  4.2.2 Homographs +
 4.3 Loading Entries From a File +
5 Number lists +
6 Links to Glossary Entries +
 6.1 Changing the format of the link text +
 6.2 Enabling and disabling hyperlinks to glossary entries +
7 Adding an Entry to the Glossary Without Generating Text +
8 Cross-Referencing Entries +
 8.1 Customising Cross-reference Text +
9 Using Glossary Terms Without Links +
10 Displaying a glossary +
11 Xindy +
 11.1 Language and Encodings +
 11.2 Locations and Number lists +
 11.3 Glossary Groups +
12 Defining New Glossaries +
13 Acronyms +
 13.1 Predefined Acronym Styles +
 13.2 Displaying the List of Acronyms +
 13.3 Defining A Custom Acronym Style +
 13.4 Upgrading From the glossary Package + + + +
14 Unsetting and Resetting Entry Flags +
15 Glossary Styles +
 15.1 List Styles +
 15.2 Longtable Styles +
 15.3 Longtable Styles (Ragged Right) +
 15.4 Supertabular Styles +
 15.5 Supertabular Styles (Ragged Right) +
 15.6 Tree-Like Styles +
16 Defining your own glossary style +
 16.1 Example: creating a completely new style +
 16.2 Example: creating a new glossary style based on an existing style +
 16.3 Example: creating a glossary style that uses the user1, …, user6 keys +
17 Accessibility Support +
18 Troubleshooting +
Index +
+ + + +

+

+

Glossary

+

This glossary style was setup using:

+
\usepackage[xindy, +
+

nonumberlist,
+

seeautonumberlist,
+

toc,
+

style=altlist]{glossaries}
+

+

\renewcommand*{\glsgroupskip}{}
\renewcommand*{\glsseeformat}[3][\seename]{(\xmakefirstuc{#1}
\glsseelist{#2}.)} +

+Entry location

The location of the entry in the document. This defaults to the page number + on which the entry appears. An entry may have multiple locations.
+
+First use

The first time a glossary entry is used (from the start of the document or + after a reset) with one of the following commands: \gls, \Gls, \GLS, \glspl, + \Glspl, \GLSpl or \glsdisp. (See first use flag & first use text.)
+
+First use flag

A conditional that determines whether or not the entry has been used + according to the rules of first use. Commands to unset or reset this + conditional are described in §14 Unsetting and Resetting Entry Flags.
+
+First use text

The text that is displayed on first use, which is governed by the first and + firstplural keys of \newglossaryentry. (May be overridden by \glsdisp.)
+ + + +
+Link text

The text produced by commands such as \gls. It may or may not be a + hyperlink to the glossary.
+
+Location list

A list of entry locations. (See number list.)
+
+makeglossaries

A glossaries custom designed Perl script interface to xindy and makeindex. +
+
+makeindex

An indexing application.
+
+Number list

A list of entry locations (also called a location list). The number list can be + suppressed using the nonumberlist package option.
+
+Sanitize

Converts command names into character sequences. That is, a command + called, say, \foo, is converted into the sequence of characters: \, f, o, o. + Depending on the font, the backslash character may appear as a dash when + used in the main document text, so \foo will appear as: —foo. +

When TEX writes information to a file, fragile commands must be + protected. The name, description and symbol keys all have their values written + to a file, which means that care must be taken if those values contain fragile + commands. There are two approaches: 1) the fragile commands must be + protected using \protect; 2) the values are sanitized. Sanitizing the values + gets rid of the inconvenience of having to protect fragile commands, but at + the expense of no longer being able to use those values in the document. + Sanitization is governed by the package option sanitize described in §2.1 + General Options.
+

+xindy

An flexible indexing application with multilingual support.
+

+

+

1 Introduction

+

The glossaries package is provided to assist generating glossaries. It has a certain +amount of flexibility, allowing the user to customize the format of the glossary and +define multiple glossaries. It also supports acronyms and glossary styles that +include symbols (in addition to a name and description) for glossary entries. +There is provision for loading a database of glossary terms. Only those terms +used1 +in the document will be added to the glossary. +

This package replaces the glossary package which is now obsolete. Please +see the document “Upgrading from the glossary package to the glossaries package” for +assistance in upgrading. +

One of the strengths of this package is its flexibility, however the drawback of this is +the necessity of having a large manual that can cover all the various settings. If you are +daunted by the size of the manual, try starting off with the much shorter guide for +beginners. +

The glossaries package comes with a Perl script called makeglossaries. This +provides a convenient interface to makeindex or xindy. It is strongly recommended that +you use this script, but it is not essential. If you are reluctant to install Perl, or for any +other reason you don’t want to use makeglossaries, you can called makeindex or +xindy explicitly. See §1.3 Generating the Associated Glossary Files for further details. +
+

+

The remainder of this introductory section covers the following:

+ + + + +

+

+

Top

1.1 Sample Documents

+

The glossaries package is provided with some sample documents that illustrate the +various functions. These should be located in the samples subdirectory (folder) of +the glossaries documentation directory. This location varies according to your +operating system and TEX distribution. You can use texdoc to locate the main +glossaries documentation. For example, in a terminal or command prompt, type: + +
texdoc -l glossaries
+

+This should display the full pathname of the file glossaries.pdf. View the contents of +that directory and see if it contains the samples subdirectory. +

If you can’t find the sample files, they are available in the subdirectory +doc/latex/glossaries/samples/ in the glossaries.tds.zip archive which can be +downloaded from CTAN. +

The sample documents are as follows: +

+minimalgls.tex
This document is a minimal working example. You can test your + installation using this file. To create the complete document you will need to do + the following steps: +
    +
  1. Run minimalgls.tex through LATEX either by typing +
    latex minimalgls
    +

    + in a terminal or by using the relevant button or menu item in your text + editor or front-end. This will create the required associated files but you will + not see the glossary. If you use PDFLATEX you will also get warnings about + non-existent references. These warnings may be ignored on the first + run. +

    If you get a Missing \begin{document} error, then it’s most likely that + your version of xkeyval is out of date. Check the log file for a warning of + that nature. If this is the case, you will need to update the xkeyval + package. +

  2. +
  3. Run makeglossaries on the document. This can be done on a terminal + either by typing +
    makeglossaries minimalgls
    +

    + or by typing +
    perl makeglossaries minimalgls
    +

    + If your system doesn’t recognise the command perl then it’s likely you don’t + + + + have Perl installed. In which case you will need to use makeindex + directly. You can do this in a terminal by typing (all on one line): + +
    makeindex -s minimalgls.ist -t minimalgls.glg -o minimalgls.gls + minimalgls.glo
    +

    + (See §1.3.3 Using makeindex explicitly for further details on using makeindex + explicitly.) +

    Note that if you need to specify the full path and the path contains + spaces, you will need to delimit the file names with the double-quote + character. +

  4. +
  5. Run minimalgls.tex through LATEX again (as step 1)
+

You should now have a complete document. The number following each entry in + the glossary is the location number. By default, this is the page number where the + entry was referenced. +

+sample4col.tex
This document illustrates a four column glossary where the entries + have a symbol in addition to the name and description. To create the complete + document, you need to do: +
latex sample4col +
makeglossaries sample4col +
latex sample4col
+

+ As before, if you don’t have Perl installed, you will need to use makeindex directly + instead of using makeglossaries. The vertical gap between entries is the gap + created at the start of each group. This can be suppressed by redefining + \glsgroupskip after the glossary style has been set: + + + +

+
+ \renewcommand*{\glsgroupskip}{} +
+

+

+sampleAcr.tex
This document has some sample acronyms. It also adds the glossary + to the table of contents, so an extra run through LATEX is required to ensure + the document is up to date: +
latex sampleAcr +
makeglossaries sampleAcr +
latex sampleAcr +
latex sampleAcr
+

+

+sampleAcrDesc.tex
This is similar to the previous example, except that the + acronyms have an associated description. As with the previous example, the + glossary is added to the table of contents, so an extra run through LATEX is + required: +
latex sampleAcrDesc +
makeglossaries sampleAcrDesc +
latex sampleAcrDesc +
latex sampleAcrDesc
+

+

+sampleDesc.tex
This is similar to the previous example, except that it defines the + acronyms using \newglossaryentry instead of \newacronym. As with the + previous example, the glossary is added to the table of contents, so an extra run + through LATEX is required: +
latex sampleDesc +
makeglossaries sampleDesc +
latex sampleDesc +
latex sampleDesc
+

+ + + +

+sample-custom-acronym.tex
This document illustrates how to define your + own acronym style if the predefined styles don’t suit your requirements. + +
latex sample-custom-acronym +
makeglossaries sample-custom-acronym +
latex sample-custom-acronym
+

+

+sample-crossref.tex
This document illustrates how to cross-reference entries in the + glossary. +
latex sample-crossref +
makeglossaries sample-crossref +
latex sample-crossref
+

+

+sampleDB.tex
This document illustrates how to load external files containing the + glossary definitions. It also illustrates how to define a new glossary type. This + document has the number list suppressed and uses \glsaddall to add all the + entries to the glossaries without referencing each one explicitly. To create the + document do: +
latex sampleDB +
makeglossaries sampleDB +
latex sampleDB
+

+ The glossary definitions are stored in the accompanying files database1.tex and + database2.tex. Note that if you don’t have Perl installed, you will need to use + makeindex twice instead of a single call to makeglossaries: +

    +
  1. Create the main glossary: +
    makeindex -s sampleDB.ist -t sampleDB.glg -o sampleDB.gls + sampleDB.glo
    +

    +

  2. +
  3. Create the secondary glossary: + + + +
    makeindex -s sampleDB.ist -t sampleDB.nlg -o sampleDB.not + sampleDB.ntn
    +

    +

+
+sampleEq.tex
This document illustrates how to change the location to something + other than the page number. In this case, the equation counter is used since all + glossary entries appear inside an equation environment. To create the document + do: +
latex sampleEq +
makeglossaries sampleEq +
latex sampleEq
+

+

+sampleEqPg.tex
This is similar to the previous example, but the number lists are a + mixture of page numbers and equation numbers. This example adds the + glossary to the table of contents, so an extra LATEX run is required: + +
latex sampleEqPg +
makeglossaries sampleEqPg +
latex sampleEqPg +
latex sampleEqPg
+

+

+sampleSec.tex
This document also illustrates how to change the location to + something other than the page number. In this case, the section counter is used. + This example adds the glossary to the table of contents, so an extra LATEX run + is required: +
latex sampleSec +
makeglossaries sampleSec +
latex sampleSec +
latex sampleSec
+

+ + + +

+sampleNtn.tex
This document illustrates how to create an additional glossary type. + This example adds the glossary to the table of contents, so an extra LATEX run + is required: +
latex sampleNtn +
makeglossaries sampleNtn +
latex sampleNtn +
latex sampleNtn
+

+ Note that if you don’t have Perl installed, you will need to use makeindex twice + instead of a single call to makeglossaries: +

    +
  1. Create the main glossary: +
    makeindex -s sampleNtn.ist -t sampleNtn.glg -o sampleNtn.gls + sampleNtn.glo
    +

    +

  2. +
  3. Create the secondary glossary: +
    makeindex -s sampleNtn.ist -t sampleNtn.nlg -o sampleNtn.not + sampleNtn.ntn
    +

    +

+
+sample.tex
This document illustrates some of the basics, including how to create + child entries that use the same name as the parent entry. This example adds the + glossary to the table of contents and it also uses \glsrefentry, so an extra + LATEX run is required: +
latex sample +
makeglossaries sample +
latex sample +
latex sample
+

+ You can see the difference between word and letter ordering if you substitute + order=word with order=letter. (Note that this will only have an effect if you use + makeglossaries. If you use makeindex explicitly, you will need to use the -l + switch to indicate letter ordering.) +

+sampletree.tex
This document illustrates a hierarchical glossary structure where + child entries have different names to their corresponding parent entry. To create + the document do: + + + +
latex sampletree +
makeglossaries sampletree +
latex sampletree
+

+

+sample-dual.tex
This document illustrates how to define an entry that both appears + in the list of acronyms and in the main glossary. To create the document do: + +
latex sample-dual +
makeglossaries sample-dual +
latex sample-dual
+

+

+samplexdy.tex
This document illustrates how to use the glossaries package with + xindy instead of makeindex. The document uses UTF8 encoding (with the + inputenc package). The encoding is picked up by makeglossaries. By default, this + document will create a xindy style file called samplexdy.xdy, but if you + uncomment the lines + + + +
+ \setStyleFile{samplexdy-mc} +  
\noist +  
\GlsSetXdyLanguage{} +
+

it will set the style file to samplexdy-mc.xdy instead. This provides an additional + letter group for entries starting with “Mc” or “Mac”. If you use makeglossaries, + you don’t need to supply any additional information. If you don’t use + makeglossaries, you will need to specify the required information. Note that if + you set the style file to samplexdy-mc.xdy you must also specify \noist, + otherwise the glossaries package will overwrite samplexdy-mc.xdy and you will + lose the “Mc” letter group. +

To create the document do: +
latex samplexdy +
makeglossaries samplexdy +
latex samplexdy
+

+ If you don’t have Perl installed, you will have to call xindy explicitly instead of + using makeglossaries. If you are using the default style file samplexdy.xdy, then + do (no line breaks): +
xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o + samplexdy.gls samplexdy.glo
+

+ otherwise, if you are using samplexdy-mc.xdy, then do (no line breaks): + +
xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls + samplexdy.glo
+

+

+samplexdy2.tex
This document illustrates how to use the glossaries package where + the location numbers don’t follow a standard format. This example will only work + with xindy. To create the document do: +
pdflatex samplexdy2 +
makeglossaries samplexdy2 +
pdflatex samplexdy2
+

+ If you can’t use makeglossaries then you need to do: + + + +
xindy -L english -C utf8 -I xindy -M samplexdy2 -t samplexdy2.glg -o + samplexdy2.gls samplexdy2.glo
+

+ See §11.2 Locations and Number lists for further details. +

+sampleutf8.tex
This is another example that uses xindy. Unlike makeindex, xindy + can cope with accented or non-Latin characters. This document uses UTF8 + encoding. To create the document do: +
latex sampleutf8 +
makeglossaries sampleutf8 +
latex sampleutf8
+

+ If you don’t have Perl installed, you will have to call xindy explicitly instead of + using makeglossaries (no line breaks): +
xindy -L english -C utf8 -I xindy -M sampleutf8 -t sampleutf8.glg -o + sampleutf8.gls sampleutf8.glo
+

+

If you remove the xindy option from sampleutf8.tex and do: +
latex sampleutf8 +
makeglossaries sampleutf8 +
latex sampleutf8
+

+ you will see that the entries that start with a non-Latin character now appear in + the symbols group, and the word “manœuvre” is now after “manor” instead of + before it. If you are unable to use makeglossaries, the call to makeindex is as + follows (no line breaks): +
makeindex -s sampleutf8.ist -t sampleutf8.glg -o sampleutf8.gls + sampleutf8.glo
+

+

+sampleaccsupp.tex
This document uses the experimental glossaries-accsupp package. + The symbol is set to the replacement text. Note that some PDF viewers don’t use + the accessibility support. Information about the glossaries-accsupp package can be + found in §17 Accessibility Support. +
+ + + +

+

+

Top

1.2 Multi-Lingual Support

+

As from version 1.17, the glossaries package can now be used with xindy as well as +makeindex. If you are writing in a language that uses accented characters or non-Latin +characters it is recommended that you use xindy as makeindex is hard-coded for +Latin languages. This means that you are not restricted to the A, …, Z letter +groups. If you want to use xindy, remember to use the xindy package option. For +example: + + + +

+
+\documentclass[frenchb]{article} + 
\usepackage[utf8]{inputenc} + 
\usepackage[T1]{fontenc} + 
\usepackage{babel} + 
\usepackage[xindy]{glossaries} +
+

+

Note that although an accented character, such as é, looks like a plain character in +your tex file, it’s actually a macro and can therefore cause problems. +

+

    +
  1. If you use an accented (or other expandable) character at the start of an entry + name, you must place it in a group, or it will cause a problem for commands that + convert the first letter to uppercase (e.g. \Gls) due to expansion issues. For + example: + + + +
    + \newglossaryentry{elite}{name={{é}lite}, +  
    description={select group or class}} +
    +

    +

  2. +
  3. If you use an accented (or other expandable) character in an entry name + and you haven’t switched off the name key sanitization, you must use + commands like \glsentrytext or \glstext instead of \glsentryname or + \glsname or you will end up with strange looking characters in your + document. +
+
+

+

If you use the inputenc package, makeglossaries will pick up the encoding from the +auxiliary file. If you use xindy explicitly instead of via makeglossaries, you may need +to specify the encoding using the -C option. Read the xindy manual for further +details. +

+

+

Top

1.2.1 Changing the Fixed Names
+

As from version 1.08, the glossaries package now has limited multi-lingual support, +thanks to all the people who have sent me the relevant translations either via email or +via comp.text.tex. However you must load babel or polyglossia before glossaries to +enable this. Note that if babel is loaded and the translator package is detected on TEX’s +path, then the translator package will be loaded automatically. However, it may not pick +up on the required languages so, if the predefined text is not translated, you may +need to explicitly load the translator package with the required languages. For +example: + + + +

+
+\usepackage[spanish]{babel} + 
\usepackage[spanish]{translator} + 
\usepackage{glossaries} +
+

Alternatively, specify the language as a class option rather than a package option. For +example: + + + +

+
+\documentclass[spanish]{report} + 
\usepackage{babel} + 
\usepackage{glossaries} +
+

+

If you want to use ngerman or german instead of babel, you will need to include the +translator package to provide the translations. For example: + + + +

+
+\documentclass[ngerman]{article} + 
\usepackage{ngerman} + 
\usepackage{translator} + 
\usepackage{glossaries} +
+

+

The languages are currently supported by the glossaries package are listed in +table 1. Please note that (apart from spelling mistakes) I don’t intend to change the +default translations as it will cause compatibility problems. +

+
+ + + +


+ + + +
Table 1: Supported Languages
+
+

+

+
+ + + + + + + + + + +
Language As from version
Brazilian Portuguese 1.17
Danish 1.08
Dutch 1.08
English 1.08
French 1.08
German 1.08
Irish 1.08
Italian 1.08
Hungarian 1.08
Polish 1.13
Serbian 2.06
Spanish 1.08
+
+ + + +

+
+

The language dependent commands and translator keys used by the glossaries +package are listed in table 2. +

+
+ + + +


+ + + +
Table 2: Customised Text
+
+

+

+
+ + + + + + + + +
Command Name Translator Key Word

Purpose

\glossaryname Glossary

Title of the main glossary.

\acronymname Acronyms

Title of the list of acronyms +(when used with package option +acronym).

\entryname Notation (glossaries)

Header for first column in the +glossary (for 2, 3 or 4 column +glossaries that support headers).

\descriptionname Description (glossaries)

Header for second column in the +glossary (for 2, 3 or 4 column +glossaries that support headers).

\symbolname Symbol (glossaries)

Header for symbol column in the +glossary for glossary styles that +support this option.

\pagelistname Page List (glossaries)

Header for page list column in +the glossary for glossaries that +support this option.

\glssymbolsgroupnameSymbols (glossaries)

Header for symbols section of the +glossary for glossary styles that +support this option.

\glsnumbersgroupnameNumbers (glossaries)

Header for numbers section of +the glossary for glossary styles +that support this option.

+ + + +

+
+

Due to the varied nature of glossaries, it’s likely that the predefined translations +may not be appropriate. If you are using the babel package and do not have the +translator package installed, you need to be familiar with the advice given in changing +the words babel uses. If you have the translator package installed, then you can provide +your own dictionary with the necessary modifications (using \deftranslation) and +load it using \usedictionary. +

Note that the dictionaries are loaded at the beginning of the document, so it won’t +have any effect if you put \deftranslation in the preamble. It should be +put in your personal dictionary instead (as in the example below). See the +translator documentation for further details. (Now with beamer documentation.) +
+

+

Your custom dictionary doesn’t have to be just a translation from English to +another language. You may prefer to have a dictionary for a particular type of +document. For example, suppose your institution’s in-house reports have to have the +glossary labelled as “Nomenclature” and the page list should be labelled “Location”, +then you can create a file called, say, + + + +

+
+myinstitute-glossaries-dictionary-English.dict +
+

that contains the following: + + + +

+
+\ProvidesDictionary{myinstitute-glossaries-dictionary}{English} + 
\deftranslation{Glossary}{Nomenclature} + 
\deftranslation{Page List (glossaries)}{Location} +
+

You can now load it using: + + + +

+
+\usedictionary{myinstitute-glossaries-dictionary} +
+

(Make sure that myinstitute-glossaries-dictionary-English.dict can be found +by TEX.) If you want to share your custom dictionary, you can upload it to +CTAN. +

If you are using babel and don’t want to use the translator interface, you can +suppress it using the package option translate=false, and either load glossaries-babel +after glossaries or specify you’re own translations. For example: + + + +

+
+\documentclass[british]{article} + 
\usepackage{babel} + 
\usepackage[translate=false]{glossaries} + 
\usepackage{glossaries-babel} +
+

or: + + + +

+
+\documentclass[british]{article} + 
\usepackage{babel} + 
\usepackage[translate=false]{glossaries} + 
\addto\captionsbritish{% + 
    \renewcommand*{\glossaryname}{List of Terms}% + 
    \renewcommand*{\acronymname}{List of Acronyms}% + 
    \renewcommand*{\entryname}{Notation}% + 
    \renewcommand*{\descriptionname}{Description}% + 
    \renewcommand*{\symbolname}{Symbol}% + 
    \renewcommand*{\pagelistname}{Page List}% + 
    \renewcommand*{\glssymbolsgroupname}{Symbols}% + 
    \renewcommand*{\glsnumbersgroupname}{Numbers}% + 
} +
+

+

If you are using polyglossia instead of babel, glossaries-polyglossia will automatically +be loaded unless you specify the package option translate=false. +

Note that xindy provides much better multi-lingual support than makeindex, so it’s +recommended that you use xindy if you have glossary entries that contain diacritics or +non-Roman letters. See §11 Xindy for further details. +

+

Top

1.3 Generating the Associated Glossary Files

+

In order to generate a sorted glossary with compact location lists, it is necessary to use +an external indexing application as an intermediate step. It is this application that +creates the file containing the code that typesets the glossary. If this step is omitted, the +glossaries will not appear in your document. The two indexing applications that are +most commonly used with LATEX are makeindex and xindy. As from version 1.17, +the glossaries package can be used with either of these applications. Previous versions +were designed to be used with makeindex only. Note that xindy has much better +multi-lingual support than makeindex, so xindy is recommended if you’re not writing +in English. Commands that only have an effect when xindy is used are described in §11 +Xindy. +

The glossaries package comes with the Perl script makeglossaries which will run +makeindex or xindy on all the glossary files using a customized style file (which is +created by \makeglossaries). See §1.3.1 Using the makeglossaries Perl Script for +further details. Perl is stable, cross-platform, open source software that is used by +a number of TEX-related applications. Further information is available at +http://www.perl.org/about.html. The advantages of using makeglossaries: +

+ + + +
    +
  • It automatically detects whether to use makeindex or xindy and sets the + relevant application switches. +
  • +
  • One call of makeglossaries will run makeindex/xindy for each glossary + type. +
  • +
  • If things go wrong, makeglossaries will scan the messages from makeindex + or xindy and attempt to diagnose the problem in relation to the glossaries + package. This will hopefully provide more helpful messages in some cases. If + it can’t diagnose the problem, you will have to read the relevant transcript + file and see if you can work it out from the makeindex or xindy messages. +
+

Whilst it is strongly recommended that you use the makeglossaries script, it is +possible to use the glossaries package without having Perl installed. In which case, +if you have used the xindy package option, you will need to use xindy (see +§1.3.2 Using xindy explicitly), otherwise you will need to use makeindex (see +§1.3.3 Using makeindex explicitly). Note that some commands and package +options have no effect if you don’t use makeglossaries. These are listed in +table 3. +

Note that if any of your entries use an entry that is not referenced outside the +glossary, you will need to do an additional makeglossaries, makeindex or +xindy run, as appropriate. For example, suppose you have defined the following +entries:2 + + + +

+
+\newglossaryentry{citrusfruit}{name={citrus fruit}, + 
description={fruit of any citrus tree. (See also + 
\gls{orange})}} + 
\newglossaryentry{orange}{name={orange}, + 
description={an orange coloured fruit.}} +
+

and suppose you have \gls{citrusfruit} in your document but don’t reference the +orange entry, then the orange entry won’t appear in your glossary until you first +create the glossary and then do another run of makeglossaries, makeindex or +xindy. For example, if the document is called myDoc.tex, then you must do: + +
latex myDoc +
makeglossaries myDoc +
latex myDoc +
makeglossaries myDoc +
latex myDoc
+

+

Likewise, an additional makeglossaries and LATEX run may be required if the +document pages shift with re-runs. For example, if the page numbering is not reset after +the table of contents, the insertion of the table of contents on the second LATEX run +may push glossary entries across page boundaries, which means that the number lists in +the glossary may need updating. +

The examples in this document assume that you are accessing makeglossaries, xindy +or makeindex via a terminal. Windows users can use the MSDOS Prompt which is +usually accessed via the Start->All Programs menu or Start->All Programs->Accessories +menu. +

Alternatively, your text editor may have the facility to create a function that will +call the required application. The article “Glossaries, Nomenclature, List of Symbols +and Acronyms” in the LATEX Community’s Know How section describes how to +do this for TeXnicCenter, and the thread “Executing Glossaries’ makeindex +from a WinEdt macro” on the comp.text.tex newsgroup describes how to +do it for WinEdt. For other editors see the editor’s user manual for further +details. +

If any problems occur, remember to check the transcript files (e.g. .glg or .alg) for +messages. +

+
+ + + +


+ + + +
Table 3: Commands and package options that have no effect when using xindy +or makeindex explicitly
+
+ + + + +
Command or Package Option makeindexxindy
order=letter use -l use -M ord/letorder
order=word default default
xindy={language=lang,codename=code}N/A use -L lang-C code
\GlsSetXdyLanguage{lang} N/A use -L lang
\GlsSetXdyCodePage{code} N/A use -C code
+
+ + + +

+
+

Top

1.3.1 Using the makeglossaries Perl Script
+

The makeglossaries script picks up the relevant information from the auxiliary (.aux) +file and will either call xindy or makeindex, depending on the supplied information. +Therefore, you only need to pass the document’s name without the extension to +makeglossaries. For example, if your document is called myDoc.tex, type the +following in your terminal: +
latex myDoc +
makeglossaries myDoc +
latex myDoc
+

+You may need to explicitly load makeglossaries into Perl: +
perl makeglossaries myDoc
+

+There is a batch file called makeglossaries.bat which does this for Windows users, +but you must have Perl installed to be able to use it. +

The makeglossaries script contains POD (Plain Old Documentation). If you +want, you can create a man page for makeglossaries using pod2man and +move the resulting file onto the man path. Alternatively do makeglossaries +--help for a list of all options or makeglossaries --version for the version +number. +

When upgrading the glossaries package, make sure you also upgrade your version of +makeglossaries. The current version is 2.02.
+

+

+

+

Top

1.3.2 Using xindy explicitly
+

If you want to use xindy to process the glossary files, you must make sure you have +used the xindy package option: + + + +

+
+\usepackage[xindy]{glossaries} +
+

This is required regardless of whether you use xindy explicitly or whether it’s called +implicitly via makeglossaries. This causes the glossary entries to be written in raw +xindy format, so you need to use -I xindy not -I tex. +

To run xindy type the following in your terminal (all on one line): +
xindy -L language-C encoding-I xindy -M style-t base.glg -o +base.gls base.glo
+

+where languageis the required language name, encodingis the encoding, baseis +the name of the document without the .tex extension and styleis the name of +the xindy style file without the .xdy extension. The default name for this +style file is base.xdy but can be changed via \setStyleFile{style}. You +may need to specify the full path name depending on the current working +directory. If any of the file names contain spaces, you must delimit them using +double-quotes. +

For example, if your document is called myDoc.tex and you are using UTF8 +encoding in English, then type the following in your terminal: +
xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.glg -o myDoc.gls +myDoc.glo
+

+

Note that this just creates the main glossary. You need to do the same for each of +the other glossaries (including the list of acronyms if you have used the acronym +package option), substituting .glg, .gls and .glo with the relevant extensions. For +example, if you have used the acronym package option, then you would need to do: + +
xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.alg -o myDoc.acr +myDoc.acn
+

+For additional glossaries, the extensions are those supplied when you created the +glossary with \newglossary. +

Note that if you use makeglossaries instead, you can replace all those calls to +xindy with just one call to makeglossaries: +
makeglossaries myDoc
+

+Note also that some commands and package options have no effect if you use xindy +explicitly instead of using makeglossaries. These are listed in table 3. +

+ + + +

+

Top

1.3.3 Using makeindex explicitly
+

If you want to use makeindex explicitly, you must make sure that you haven’t used the +xindy package option or the glossary entries will be written in the wrong format. To run +makeindex, type the following in your terminal: +
makeindex -s style.ist -t base.glg -o base.gls base.glo
+

+where baseis the name of your document without the .tex extension and +style.ist is the name of the makeindex style file. By default, this is base.ist, +but may be changed via \setStyleFile{style}. Note that there are other +options, such as -l (letter ordering). See the makeindex manual for further +details. +

For example, if your document is called myDoc.tex, then type the following at the +terminal: +
makeindex -s myDoc.ist -t myDoc.glg -o myDoc.gls myDoc.glo
+

+Note that this only creates the main glossary. If you have additional glossaries (for +example, if you have used the acronym package option) then you must call makeindex +for each glossary, substituting .glg, .gls and .glo with the relevant extensions. For +example, if you have used the acronym package option, then you need to type the +following in your terminal: +
makeindex -s myDoc.ist -t myDoc.alg -o myDoc.acr myDoc.acn
+

+For additional glossaries, the extensions are those supplied when you created the +glossary with \newglossary. +

Note that if you use makeglossaries instead, you can replace all those calls to +makeindex with just one call to makeglossaries: +
makeglossaries myDoc
+

+Note also that some commands and package options have no effect if you use +makeindex explicitly instead of using makeglossaries. These are listed in +table 3. +

+

+

Top

1.3.4 Note to Front-End and Script Developers
+

The information needed to determine whether to use xindy or makeindex and the +information needed to call those applications is stored in the auxiliary file. This +information can be gathered by a front-end, editor or script to make the glossaries +where appropriate. This section describes how the information is stored in the auxiliary +file. +

The file extensions used by each defined glossary are given by +


\@newglossary  \@newglossary{label}{log}{out-ext}{in-ext}

+

+ + + +where in-extis the extension of the indexing application’s input file (the output file +from the glossaries package’s point of view), out-extis the extension of the indexing +application’s output file (the input file from the glossaries package’s point of view) and +logis the extension of the indexing application’s transcript file. The label for the +glossary is also given for information purposes only, but is not required by the indexing +applications. For example, the information for the main glossary is written +as: + + + +

+
+\@newglossary{main}{glg}{gls}{glo} +
+

+

The indexing application’s style file is specified by +


\@istfilename  \@istfilename{filename}

+

+The file extension indicates whether to use makeindex (.ist) or xindy (.xdy). Note +that the glossary information is formatted differently depending on which +indexing application is supposed to be used, so it’s important to call the correct +one. +

Word or letter ordering is specified by: +


\@glsorder  \@glsorder{order}

+

+where ordercan be either word or letter. +

If xindy should be used, the language and code page for each glossary is specified +by +


\@xdylanguage \@gls@codepage  \@xdylanguage{label}{language}
\@gls@codepage{label}{code}

+

+where labelidentifies the glossary, languageis the root language (e.g. english) and +codeis the encoding (e.g. utf8). These commands are omitted if makeindex should +be used. +

+

+

Top

2 Package Options

+

This section describes the available glossaries package options. +

+

+

Top

2.1 General Options

+

+

+nowarn
This suppresses all warnings generated by the glossaries package. +
+nomain
This suppresses the creation of the main glossary. Note that if you use + this option, you must create another glossary in which to put all your entries + + + + (either via the acronym package option described in §2.5 Acronym Options + or via \newglossary described in §12 Defining New Glossaries). +
+sanitize
This is a key=valueoption whose value is also a key=valuelist. By + default, the glossaries package sanitizes the values of the name, description and + symbol keys used when defining a new glossary entry. This means that you can use + fragile commands in those keys, but it may lead to unexpected results if you try + to display these values within the document text. This sanitization can be + switched off using the sanitize package option. For example, to switch off the + sanitization for the description and name keys, but not for the symbol key, + do: + + + +
+ \usepackage[sanitize={name=false,description=false,% +  
symbol=true}]{glossaries} +
+

You can use sanitize=none as a shortcut for
sanitize={name=false,description=false,symbol=false}. +

Note: this sanitization only applies to the name, description and symbol keys. It + doesn’t apply to any of the other keys (except the sort key which is always + sanitized if sort=standard is in effect) so fragile commands contained in the value + of the other keys must always be protected using \protect. Since the + value of the text key is obtained from the name key, you will still need to + protect fragile commands in the name key if you don’t use the text key. +
+

+

+savewrites
This is a boolean option to minimises the number of write registers used by + the glossaries package. (Default is savewrites=false.) There are only a limited + number of write registers, and if you have a large number of glossaries or if you + are using a class or other packages that create a lot of external files, you may + exceed the maximum number of available registers. If savewrites is set, the + glossary information will be stored in token registers until the end of the + document when they will be written to the external files. If you run out of token + registers, you can use etex. +

If you want to use TEX’s \write18 mechanism to call makeindex or xindy from + your document and use savewrites, you must create the external files with + \glswritefiles before you call makeindex/xindy. Also set \glswritefiles to + nothing or \relax before the end of the document to avoid rewriting the files. For + example: + + + +

+
+ \glswritefiles +  
\write18{makeindex -s \istfilename\space -t \jobname.glg +  
-o \jobname.gls \jobname} +  
\let\glswritefiles\relax +
+

+

+

+translate
This is a boolean option. The default is true if babel, polyglossia or translator + have been loaded, otherwise the default value is false. +

+

+ translate=true
If babel has been loaded and the translator package is + installed, translator will be loaded and the translations will be provided + by the translator package interface. You can modify the translations by + providing your own dictionary. If the translator package isn’t installed + and babel is loaded, the glossaries-babel package will be loaded and the + translations will be provided using babel’s \addto\captionlanguage + mechanism. If polyglossia has been loaded, glossaries-polyglossia will be + loaded. +
+ translate=false
Don’t provide translations, even if babel or polyglossia has + been loaded. You can then provide you’re own translations or explicitly + load glossaries-babel or glossaries-polyglossia.
+

See §1.2.1 Changing the Fixed Names for further details. +

+hyperfirst
This is a boolean option that specifies whether each term has a hyperlink on + first use. The default is hyperfirst=true (terms on first use have a hyperlink, + unless explicitly suppressed using starred versions of commands such as + \gls*). +
+ + + +

+

+

Top

2.2 Sectioning and TOC Options

+

+

+toc
Add the glossaries to the table of contents. Note that an extra LATEX run is + required with this option. Alternatively, you can switch this function on and off + using +


\glstoctrue  \glstoctrue

+

+ and +


\glstocfalse  \glstocfalse

+

+

+numberline
When used with toc, this will add \numberline{} in the final + argument of \addcontentsline. This will align the table of contents + entry with the numbered section titles. Note that this option has no + effect if the toc option is omitted. If toc is used without numberline, the + title will be aligned with the section numbers rather than the section + titles. +
+section
This is a key=valueoption. Its value should be the name of a sectional unit + (e.g. chapter). This will make the glossaries appear in the named sectional + unit, otherwise each glossary will appear in a chapter, if chapters exist, + otherwise in a section. Unnumbered sectional units will be used by default. + Example: + + + +
+ \usepackage[section=subsection]{glossaries} +
+

You can omit the value if you want to use sections, i.e.  + + + +

+
+ \usepackage[section]{glossaries} +
+

is equivalent to + + + +

+
+ \usepackage[section=section]{glossaries} +
+

You can change this value later in the document using +


\setglossarysection  \setglossarysection{name}

+

+ where nameis the sectional unit. +

The start of each glossary adds information to the page header via +


\glossarymark  \glossarymark{glossary title}

+

+ This defaults to \@mkboth unless memoir is loaded, but you may need to redefine + it. For example, to only change the right header: + + + +

+
+ \renewcommand{\glossarymark}[1]{\markright{#1}} +
+

or to prevent it from changing the headers: + + + +

+
+ \renewcommand{\glossarymark}[1]{} +
+

+

Occasionally you may find that another package defines \cleardoublepage when + it is not required. This may cause an unwanted blank page to appear before each + glossary. This can be fixed by redefining \glsclearpage: + + + +

+
+ \renewcommand*{\glsclearpage}{\clearpage} +
+

+

+numberedsection
The glossaries are placed in unnumbered sectional units by + default, but this can be changed using numberedsection. This option + can take three possible values: false (no number, i.e. use starred form), + nolabel (numbered, i.e. unstarred form, but not labelled) and autolabel + (numbered with automatic labelling). If numberedsection=autolabel is used, + each glossary is given a label that matches the glossary type, so the + main (default) glossary is labelled main, the list of acronyms is labelled + acronym3 + and additional glossaries are labelled using the value specified in the first + mandatory argument to \newglossary. For example, if you load glossaries + using: + + + +
+ \usepackage[section,numberedsection=autolabel]{glossaries} +
+

then each glossary will appear in a numbered section, and can be referenced using + something like: + + + +

+
+ The main glossary is in section~\ref{main} and the list of +  
acronyms is in section~\ref{acronym}. +
+

If you can’t decide whether to have the acronyms in the main glossary or a + separate list of acronyms, you can use \acronymtype which is set to main if the + acronym option is not used and is set to acronym if the acronym option is used. + For example: + + + +

+
+ The list of acronyms is in section~\ref{\acronymtype}. +
+

+

As from version 1.14, you can add a prefix to the label by redefining +


\glsautoprefix  \glsautoprefix

+

+ For example: + + + +

+
+ \renewcommand*{\glsautoprefix}{glo:} +
+

will add glo: to the automatically generated label, so you can then, for example, + refer to the list of acronyms as follows: + + + +

+
+ The list of acronyms is in section~\ref{glo:\acronymtype}. +
+

Or, if you are undecided on a prefix: + + + +

+
+ The list of acronyms is in section~\ref{\glsautoprefix\acronymtype}. +
+

+

+
+

+

+

Top

2.3 Glossary Appearance Options

+

+

+entrycounter
This is a boolean option. (Default is entrycounter=false.) If set, each + main (level 0) glossary entry will be numbered when using the standard + glossary styles. This option creates the counter glossaryentry glossaryentry. +

If you use this option, you can reference the entry number within the document + using +


\glsrefentry  \glsrefentry{label}

+

+ where labelis the label associated with that glossary entry. +

If you use \glsrefentry, you must run LATEX twice after creating the glossary + files using makeglossaries, makeindex or xindy to ensure the cross-references + are up-to-date.
+

+

+counterwithin
This is a key=valueoption where valueis the name of a counter. If + used, this option will automatically set entrycounter=true and the glossaryentry + counter will be reset every time valueis incremented. +

The glossaryentry counter isn’t automatically reset at the start of each + glossary, except when glossary section numbering is on and the counter + used by counterwithin is the same as the counter used in the glossary’s + sectioning command. If you want the counter reset at the start of each + glossary, you can redefine \glossarypreamble so that it sets glossaryentry to + zero: + + + +

+
+ \renewcommand{\glossarypreamble}{% +  
  \setcounter{glossaryentry}{0}% +  
} +
+

+

+

+subentrycounter
This is a boolean option. (Default is subentrycounter=false.) If set, + each level 1 glossary entry will be numbered when using the standard glossary + styles. This option creates the counter glossarysubentry glossarysubentry. The + counter is reset with each main (level 0) entry. Note that this package option is + independent of entrycounter. You can reference the number within the document + using \glsrefentry{label} where labelis the label associated with the + sub-entry. (See above.) +
+style
This is a key=valueoption. (Default is style=list.) Its value should be the + name of the glossary style to use. This key may only be used for styles defined in + glossary-list, glossary-long, glossary-super or glossary-tree. (See §15 Glossary + Styles.) +
+nolong
This prevents the glossaries package from automatically loading glossary-long + (which means that the longtable package also won’t be loaded). This reduces + overhead by not defining unwanted styles and commands. Note that if you use + this option, you won’t be able to use any of the glossary styles defined in the + glossary-long package. +
+nosuper
This prevents the glossaries package from automatically loading glossary-super + (which means that the supertabular package also won’t be loaded). This reduces + overhead by not defining unwanted styles and commands. Note that if you use + this option, you won’t be able to use any of the glossary styles defined in the + glossary-super package. +
+nolist
This prevents the glossaries package from automatically loading glossary-list. + This reduces overhead by not defining unwanted styles. Note that if + you use this option, you won’t be able to use any of the glossary styles + defined in the glossary-list package. Note that since the default style is list, + + + + you will also need to use the style option to set the style to something + else. +
+notree
This prevents the glossaries package from automatically loading glossary-tree. + This reduces overhead by not defining unwanted styles. Note that if you use this + option, you won’t be able to use any of the glossary styles defined in the + glossary-tree package. +
+nostyles
This prevents all the predefined styles from being loaded. This option is + provided in the event that the user has custom styles that are not dependent on + the styles provided by the glossaries package. Note that if you use this + option, you can’t use the style package option. Instead you must either use + \glossarystyle{style} or the style key in the optional argument to + \printglossary. +
+nonumberlist
This option will suppress the associated number lists in the glossaries + (see also §5 Number lists). +
+seeautonumberlist
If you suppress the number lists with nonumberlist, described above, + this will also suppress any cross-referencing information supplied by the see key in + \newglossaryentry or \glssee. If you use seeautonumberlist, the see key will + automatically implement nonumberlist=false for that entry. (Note this + doesn’t affect \glssee.) For further details see §8 Cross-Referencing + Entries. +
+counter
This is a key=valueoption. (Default is counter=page.) The value should be + the name of the default counter to use in the number lists (see §5 Number + lists). +
+

+

+

Top

2.4 Sorting Options

+

+

+sort
This is a key=valueoption where the option can only have one of the + following values: + + + +
    +
  • standard : entries are sorted according to the value of the sort key used in + \newglossaryentry (if present) or the name key (if sort key is missing); +
  • +
  • def : entries are sorted in the order in which they were defined (the sort + key in \newglossaryentry is ignored); +
  • +
  • use : entries are sorted according to the order in which they are used in + the document (the sort key in \newglossaryentry is ignored).
+

The default is sort=standard. +

+order
This may take two values: word or letter. The default is word ordering. +

Note that the order option has no effect if you don’t use makeglossaries. +
+

+

+makeindex
(Default) The glossary information and indexing style file will be written in + makeindex format. If you use makeglossaries, it will automatically detect that it + needs to call makeindex. If you don’t use makeglossaries, you need to remember + to use makeindex not xindy. The indexing style file will been given a .ist + extension. +
+xindy
The glossary information and indexing style file will be written in xindy format. + If you use makeglossaries, it will automatically detect that it needs to call + xindy. If you don’t use makeglossaries, you need to remember to use + xindy not makeindex. The indexing style file will been given a .xdy + extension. +

The xindy package option may additionally have a value that is a key=value + comma-separated list to override the language and codepage. For example: + + + +

+
+ \usepackage[xindy={language=english,codepage=utf8}]{glossaries} +
+

You can also specify whether you want a number group in the glossary. This + defaults to true, but can be suppressed. For example: + + + +

+
+ \usepackage[xindy={glsnumbers=false}]{glossaries} +
+

See §11 Xindy for further details on using xindy with the glossaries + package. +

+
+

+

+

Top

2.5 Acronym Options

+

+

+acronym
This creates a new glossary with the label acronym. This is equivalent + to: + + + +
+ \newglossary[alg]{acronym}{acr}{acn}{\acronymname} +
+

If the acronym package option is used, \acronymtype is set to acronym otherwise it is set + to main.4 + Entries that are defined using \newacronym are placed in the glossary whose + label is given by \acronymtype, unless another glossary is explicitly + specified. +

+acronymlists
By default, only the \acronymtype glossary is considered to be a list of + acronyms. If you have other lists of acronyms, you can specify them as a + comma-separated list in the value of acronymlists. For example, if you use the + acronym package option but you also want the main glossary to also contain a list + of acronyms, you can do: + + + +
+ \usepackage[acronym,acronymlists={main}]{glossaries} +
+

No check is performed to determine if the listed glossaries exist, so you can add + glossaries you haven’t defined yet. For example: + + + +

+
+ \usepackage[acronym,acronymlists={main,acronym2}]{glossaries} +  
\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms} +
+

+

+description
This option changes the definition of \newacronym to allow a description. + This option has no effect if you defined your own custom acronym style. See §13 + Acronyms for further details. +
+footnote
This option changes the definition of \newacronym and the way that + acronyms are displayed. This option has no effect if you defined your own custom + acronym style. See §13 Acronyms for further details. +
+smallcaps
This option changes the definition of \newacronym and the way that + acronyms are displayed. This option may have no effect if you defined your own + custom acronym style. See §13 Acronyms for further details. +
+smaller
This option changes the definition of \newacronym and the way that acronyms + are displayed. If you use this option, you will need to include the relsize package or + otherwise define \textsmaller or redefine \acronymfont. This option may have + no effect if you defined your own custom acronym style. See §13 Acronyms for + further details. +
+dua
This option changes the definition of \newacronym so that acronyms are always + expanded. This option has no effect if you defined your own custom acronym + style. See §13 Acronyms for further details. +
+shortcuts
This option provides shortcut commands for acronyms. See §13 Acronyms for + further details. +
+ + + +

+

+

Top

3 Setting Up

+

The command +


\makeglossaries  \makeglossaries

+

+must be placed in the preamble in order to create the customised makeindex (.ist) or +xindy (.xdy) style file and to ensure that glossary entries are written to the +appropriate output files. If you omit \makeglossaries none of the glossaries will be +created. +

Note that some of the commands provided by the glossaries package must be placed +before \makeglossaries as they are required when creating the customised style file. If +you attempt to use those commands after \makeglossaries you will generate an error. +
+

+

You can suppress the creation of the customised xindy or makeindex style file +using +


\noist  \noist

+

+Note that this command must be used before \makeglossaries. +

Note that if you have a custom .xdy file created when using glossaries version 2.07 +or below, you will need to use the compatible-2.07 package option with it. +
+

+

The default name for the customised style file is given by \jobname.ist +(for makeindex) or \jobname.xdy (for xindy). This name may be changed +using: +


\setStyleFile  \setStyleFile{name}

+

+where nameis the name of the style file without the extension. Note that this +command must be used before \makeglossaries. +

Each glossary entry is assigned a number list that lists all the locations in the +document where that entry was used. By default, the location refers to the page number +but this may be overridden using the counter package option. The default form of +the location number assumes a full stop compositor (e.g. 1.2), but if your +location numbers use a different compositor (e.g. 1-2) you need to set this +using +


\glsSetCompositor  \glsSetCompositor{symbol}

+

+For example: + + + +

+
+\glsSetCompositor{-} +
+

Note that this command must be used before \makeglossaries. +

If you use xindy, you can have a different compositor for page numbers starting +with an uppercase alphabetical character using: +


\glsSetAlphaCompositor  \glsSetAlphaCompositor{symbol}

+

+Note that this command has no effect if you haven’t used the xindy package option. For +example, if you want number lists containing a mixture of A-1 and 2.3 style formats, +then do: + + + +

+
+\glsSetCompositor{.}\glsSetAlphaCompositor{-} +
+

See §5 Number lists for further information about number lists. +

+

+

Top

4 Defining Glossary Entries

+

All glossary entries must be defined before they are used, so it is better to define them in the preamble +to ensure this.5 +However only those entries that occur in the document (using any of the commands +described in §6 Links to Glossary Entries, §7 Adding an Entry to the Glossary Without +Generating Text or §8 Cross-Referencing Entries) will appear in the glossary. Each time +an entry is used in this way, a line is added to an associated glossary file (.glo), which +then needs to be converted into a corresponding .gls file which contains the typeset +glossary which is input by \printglossary or \printglossaries. The Perl script +makeglossaries can be used to call makeindex or xindy, using a customised indexing +style file, for each of the glossaries that are defined in the document. Note that there +should be no need for you to explicitly edit or input any of these external +files.6 +See §1.3 Generating the Associated Glossary Files for further details. +

New glossary entries are defined using the command: +


\newglossaryentry  \newglossaryentry{label}{key-val list}

+

+The first argument, label, must be a unique label with which to identify this entry. +The second argument, key-val list, is a key=valuelist that supplies the relevant +information about this entry. There are two required fields: description and either name +or parent. Available fields are listed below: +

+

+name
The name of the entry (as it will appear in the glossary). If this key is + omitted and the parent key is supplied, this value will be the same as the + parent’s name. +
+description
A brief description of this term (to appear in the glossary). Within this + value, you can use +


\nopostdesc  \nopostdesc

+

+ to suppress the description terminator for this entry. For example, if this + + + + entry is a parent entry that doesn’t require a description, you can do + description={\nopostdesc}. If you want a paragraph break in the description + use +


\glspar  \glspar

+

+ However, note that not all glossary styles support multi-line descriptions. If you + are using one of the tabular-like glossary styles that permit multi-line + descriptions, use \newline not \\ if you want to force a line break. +

+parent
The label of the parent entry. Note that the parent entry must be defined before + its sub-entries. See §4.2 Sub-Entries for further details. +
+descriptionplural
The plural form of the description (as passed to \glsdisplay and + \glsdisplayfirst by \glspl, \Glspl and \GLSpl). If omitted, the value is set to + the same as the description key. (Note that if you want the description to appear + in the main body of the document, you must switch off the description + sanitization using the sanitize package option described in §2.1 General + Options.) +
+text
How this entry will appear in the document text when using \gls (or one of its + uppercase variants). If this field is omitted, the value of the name key is + used. +
+first
How the entry will appear in the document text on first use with \gls (or one of + its uppercase variants). If this field is omitted, the value of the text key is used. + Note that if you use \glspl, \Glspl, \GLSpl, \glsdisp before using \gls, the + firstplural value won’t be used with \gls. +
+plural
How the entry will appear in the document text when using \glspl (or one of its + uppercase variants). If this field is omitted, the value is obtained by appending + \glspluralsuffix to the value of the text field. The default value of + \glspluralsuffix is the letter “s”. +
+firstplural
How the entry will appear in the document text on first use with \glspl (or + one of its uppercase variants). If this field is omitted, the value is obtained from + the plural key, if the first key is omitted, or by appending \glspluralsuffix to + the value of the first field, if the first field is present. Note that if you use \gls, + \Gls, \GLS, \glsdisp before using \glspl, the firstplural value won’t be used with + \glspl. +

Note: prior to version 1.13, the default value of firstplural was always taken by + appending “s” to the first key, which meant that you had to specify both plural and + firstplural, even if you hadn’t used the first key. + + + +

+symbol
This field is provided to allow the user to specify an associated symbol. If + omitted, the value is set to \relax. Note that not all glossary styles display the + symbol. (If you want the symbol to appear in the main body of the document, you + must switch off the symbol sanitization using the sanitize package option described + in §2.1 General Options.) +
+symbolplural
This is the plural form of the symbol (as passed to \glsdisplay and + \glsdisplayfirst by \glspl, \Glspl and \GLSpl). If omitted, the value is set to + the same as the symbol key. +
+sort
This value indicates how makeindex or xindy should sort this entry. If omitted, + the value is given by the name field. In general, it’s best to use the sort key if the + name contains commands (e.g. \ensuremath{\alpha}). Note that the package + options sort=def and sort=use override the sort key in \newglossaryentry (see + §2.4 Sorting Options). +
+type
This specifies the label of the glossary in which this entry belongs. If omitted, + the default glossary is assumed unless \newacronym is used (see §13 + Acronyms). +
+user1, …, user6
Six keys provided for any additional information the user may want to + specify. (For example an associated dimension or an alternative plural or some + other grammatical construct.) +
+nonumberlist
A boolean key. If the value is missing or is true, this will suppress the + number list just for this entry. Conversely, if you have used the package option + nonumberlist, you can activate the number list just for this entry with + nonumberlist=false. (See §5 Number lists.) +
+see
Cross-reference another entry. Using the see key will automatically add this entry + to the glossary, but will not automatically add the cross-referenced entry. The + referenced entry should be supplied as the value to this key. If you want to + override the “see” tag, you can supply the new tag in square brackets before + the label. For example see=[see also]{anotherlabel}. Note that if + you have suppressed the number list, the cross-referencing information + won’t appear in the glossary. You can override this for individual glossary + entries using nonumberlist=false (see above). Alternatively, you can use the + seeautonumberlist package option. For further details, see §8 Cross-Referencing + Entries. +
+ + + +

The following keys are reserved for \newacronym (see §13 Acronyms): long, +longplural, short and shortplural. +

Note that if the name starts with an accented letter or non-Roman character, you +must group the character, otherwise it will cause a problem for commands like \Gls and +\Glspl. For example: + + + +

+
+\newglossaryentry{elite}{name={{\’e}lite}, + 
description={select group or class}} +
+

Note that the same applies if you are using the inputenc package: + + + +

+
+\newglossaryentry{elite}{name={{é}lite}, + 
description={select group or class}} +
+

Note that in both of the above examples, you will also need to supply the sort key if +you are using makeindex whereas xindy is usually able to sort accented letters +correctly. +

+

+

Top

4.1 Plurals

+

You may have noticed from above that you can specify the plural form when you define +a term. If you omit this, the plural will be obtained by appending +


\glspluralsuffix  \glspluralsuffix

+

+to the singular form. This command defaults to the letter “s”. For example: + + + +

+
+\newglossaryentry{cow}{name=cow,description={a fully grown + 
female of any bovine animal}} +
+

defines a new entry whose singular form is “cow” and plural form is “cows”. However, if +you are writing in archaic English, you may want to use “kine” as the plural form, in +which case you would have to do: + + + +

+
+\newglossaryentry{cow}{name=cow,plural=kine, + 
description={a fully grown female of any bovine animal}} +
+

+

If you are writing in a language that supports multiple plurals (for a given term) +then use the plural key for one of them and one of the user keys to specify the other +plural form. For example: + + + +

+
+\newglossaryentry{cow}{name=cow,description={a fully grown + 
female of any bovine animal (plural cows, archaic plural kine)}, + 
user1={kine}} +
+

You can then use \glspl{cow} to produce “cows” and \glsuseri{cow} to +produce “kine”. You can, of course, define an easy to remember synonym. For +example: + + + +

+
+\let\glsaltpl\glsuseri +
+

Then you don’t have to remember which key you used to store the alternative +plural. +

If you are using a language that usually forms plurals by appending a different +letter, or sequence of letters, you can redefine \glspluralsuffix as required. However, +this must be done before the entries are defined. For languages that don’t form plurals +by simply appending a suffix, all the plural forms must be specified using the plural key +(and the firstplural key where necessary). +

+

+

Top

4.2 Sub-Entries

+

As from version 1.17, it is possible to specify sub-entries. These may be used to order +the glossary into categories, in which case the sub-entry will have a different name to its +parent entry, or it may be used to distinguish different definitions for the same word, in +which case the sub-entries will have the same name as the parent entry. Note that not +all glossary styles support hierarchical entries and may display all the entries in a flat +format. Of the styles that support sub-entries, some display the sub-entry’s name whilst +others don’t. Therefore you need to ensure that you use a suitable style. (See §15 +Glossary Styles for a list of predefined styles.) As from version 3.0, level 1 +sub-entries are automatically numbered in the predefined styles if you use the +subentrycounter package option (see §2.3 Glossary Appearance Options for further +details). +

Note that the parent entry will automatically be added to the glossary if any of its +child entries are used in the document. If the parent entry is not referenced in the +document, it will not have a number list. Note also that makeindex has a restriction on +the maximum sub-entry depth. +

+

+

Top

4.2.1 Hierarchical Categories
+

To arrange a glossary with hierarchical categories, you need to first define the category +and then define the sub-entries using the relevant category entry as the value of the +parent key. For example, suppose I want a glossary of mathematical symbols that are +divided into Greek letters and Roman letters. Then I can define the categories as +follows: + + + +

+
+\newglossaryentry{greekletter}{name={Greek letters}, + 
description={\nopostdesc}} + 
\newglossaryentry{romanletter}{name={Roman letters}, + 
description={\nopostdesc}} +
+

+

Note that in this example, the category entries don’t need a description so I have set +the descriptions to \nopostdesc. This gives a blank description and suppresses the +description terminator. +

I can now define my sub-entries as follows: + + + +

+
+\newglossaryentry{pi}{name={\ensuremath{\pi}},sort={pi}, + 
description={ratio of the circumference of a circle to the diameter}, + 
parent=greekletter} + 
\newglossaryentry{C}{name={\ensuremath{C}},sort={C}, + 
description={Euler’s constant}, + 
parent=romanletter} +
+

+

+

+

Top

4.2.2 Homographs
+

Sub-entries that have the same name as the parent entry, don’t need to have the name +key. For example, the word “glossary” can mean a list of technical words or a collection +of glosses. In both cases the plural is “glossaries”. So first define the parent +entry: + + + +

+
+\newglossaryentry{glossary}{name=glossary, + 
description={\nopostdesc}, + 
plural={glossaries}} +
+

Again, the parent entry has no description, so the description terminator needs to be +suppressed using \nopostdesc. +

Now define the two different meanings of the word: + + + +

+
+\newglossaryentry{glossarylist}{ + 
description={list of technical words}, + 
sort={1}, + 
parent={glossary}} + 
\newglossaryentry{glossarycol}{ + 
description={collection of glosses}, + 
sort={2}, + 
parent={glossary}} +
+

Note that if I reference the parent entry, the location will be added to the parent’s +number list, whereas if I reference any of the child entries, the location will be added to +the child entry’s number list. Note also that since the sub-entries have the same name, +the sort key is required unless you are using the sort=use or sort=def package +options. You can use the subentrycounter package option to automatically number +the first-level child entries. See §2.3 Glossary Appearance Options for further +details. +

In the above example, the plural form for both of the child entries is the same as the +parent entry, so the plural key was not required for the child entries. However, +if the sub-entries have different plurals, they will need to be specified. For +example: + + + +

+
+\newglossaryentry{bravo}{name={bravo}, + 
description={\nopostdesc}} + 
\newglossaryentry{bravocry}{description={cry of approval (pl.\ bravos)}, + 
sort={1}, + 
plural={bravos}, + 
parent=bravo} + 
\newglossaryentry{bravoruffian}{description={hired ruffian or + 
killer (pl.\ bravoes)}, + 
sort={2}, + 
plural={bravoes}, + 
parent=bravo} +
+

+

+

+

Top

4.3 Loading Entries From a File

+

You can store all your glossary entry definitions in another file and use: +


\loadglsentries  \loadglsentries[type]{filename}

+

+where filenameis the name of the file containing all the \newglossaryentry +commands. The optional argument typeis the name of the glossary to which those +entries should belong, for those entries where the type key has been omitted (or, more +specifically, for those entries whose type has been specified by \glsdefaulttype, which +is what \newglossaryentry uses by default). For example, suppose I have a file called +myentries.tex which contains: + + + +

+
+\newglossaryentry{perl}{type=main, + 
name={Perl}, + 
description={A scripting language}} + 
\newglossaryentry{tex}{name={\TeX}, + 
description={A typesetting language},sort={TeX}} + 
\newglossaryentry{html}{type=\glsdefaulttype, + 
name={html}, + 
description={A mark up language}} +
+

and suppose in my document preamble I use the command: + + + +

+
+\loadglsentries[languages]{myentries} +
+

then this will add the entries tex and html to the glossary whose type is given by +languages, but the entry perl will be added to the main glossary, since it explicitly +sets the type to main. +

Note: if you use \newacronym (see §13 Acronyms) the type is set as +type=\acronymtype unless you explicitly override it. For example, if my file +myacronyms.tex contains: + + + +

+
+\newacronym{aca}{aca}{a contrived acronym} +
+

then (supposing I have defined a new glossary type called altacronym) + + + +

+
+\loadglsentries[altacronym]{myacronyms} +
+

will add aca to the glossary type acronym, if the package option acronym has been specified, +or will add aca to the glossary type altacronym, if the package option acronym is not +specified.7 +

If you have used the acronym package option, there are two possible solutions to this +problem: +

    +
  1. Change myacronyms.tex so that entries are defined in the form: + + + +
    + \newacronym[type=\glsdefaulttype]{aca}{aca}{a contrived acronym} +
    +

    and do: + + + +

    +
    + \loadglsentries[altacronym]{myacronyms} +
    +

    +

  2. +
  3. Temporarily change \acronymtype to the target glossary: + + + +
    + \let\orgacronymtype\acronymtype +  
    \def\acronymtype{altacronym} +  
    \loadglsentries{myacronyms} +  
    \let\acronymtype\orgacronymtype +
    +

+

Note that only those entries that have been used in the text will appear in the +relevant glossaries. Note also that \loadglsentries may only be used in the +preamble. +

+

+

Top

5 Number lists

+

Each entry in the glossary has an associated number list. By default, these numbers +refer to the pages on which that entry has been used (using any of the commands +described in §6 Links to Glossary Entries and §7 Adding an Entry to the Glossary +Without Generating Text). The number list can be suppressed using the nonumberlist +package option, or an alternative counter can be set as the default using the +counter package option. The number list is also referred to as the location +list. +

Both makeindex and xindy concatenate a sequence of 3 or more consecutive pages +into a range. With xindy you can vary the minimum sequence length using +\GlsSetXdyMinRangeLength{n} where nis either an integer or the keyword none +which indicates that there should be no range formation. +

Note that \GlsSetXdyMinRangeLength must be used before \makeglossaries and +has no effect if \noist is used.
+

+

With both makeindex and xindy, you can replace the separator and the closing +number in the range using: +


\glsSetSuffixF  \glsSetSuffixF{suffix}

+

+


\glsSetSuffixFF  \glsSetSuffixFF{suffix}

+

+where the former command specifies the suffix to use for a 2 page list and the latter +specifies the suffix to use for longer lists. For example: + + + +

+
+\glsSetSuffixF{f.} + 
\glsSetSuffixFF{ff.} +
+

Note that if you use xindy, you will also need to set the minimum range length to 1 if +you want to change these suffixes: + + + +

+
+\GlsSetXdyMinRangeLength{1} +
+

Note that if you use the hyperref package, you will need to use \nohyperpage in the +suffix to ensure that the hyperlinks work correctly. For example: + + + +

+
+\glsSetSuffixF{\nohyperpage{f.}} + 
\glsSetSuffixFF{\nohyperpage{ff.}} +
+

+

Note that \glsSetSuffixF and \glsSetSuffixFF must be used before +\makeglossaries and have no effect if \noist is used.
+

+

+

+

Top

6 Links to Glossary Entries

+

Once you have defined a glossary entry using \newglossaryentry, you can refer to that +entry in the document using one of the commands listed in this section. The text which +appears at that point in the document when using one of these commands is referred to +as the link text (even if there are no hyperlinks). The commands in this section also add +a line to an external file that is used by makeindex or xindy to generate the relevant +entry in the glossary. This information includes an associated location that +is added to the number list for that entry. By default, the location refers to +the page number. For further information on number lists, see §5 Number +lists. +

It is strongly recommended that you don’t use the commands defined in this section +in the arguments of sectioning or caption commands or any other command that has a +moving argument.
+

+

The above warning is particularly important if you are using the glossaries package +in conjunction with the hyperref package. Instead, use one of the commands listed in §9 +Using Glossary Terms Without Links (such as \glsentrytext) or provide an +alternative via the optional argument to the sectioning/caption command. +Examples: + + + +

+
+\section{An overview of \glsentrytext{perl}} + 
\section[An overview of Perl]{An overview of \gls{perl}} +
+

+

The way the link text is displayed depends on +


\glstextformat  \glstextformat{text}

+

+For example, to make all link text appear in a sans-serif font, do: + + + +

+
+\renewcommand*{\glstextformat}[1]{\textsf{#1}} +
+

+

Each entry has an associated conditional referred to as the first use flag. This +determines whether \gls, \glspl (and their uppercase variants) should use +the value of the first or text keys. Note that an entry can be used without +affecting the first use flag (for example, when used with \glslink). See §14 +Unsetting and Resetting Entry Flags for commands that unset or reset this +conditional. +

The command: +


\glslink  \glslink[options]{label}{text}

+

+will place \glstextformat{text} in the document at that point and add a line into +the associated glossary file for the glossary entry given by label. If hyperlinks are +supported, textwill be a hyperlink to the relevant line in the glossary. (Note that this +command doesn’t affect the first use flag: use \glsdisp instead.) The optional +argument optionsmust be a key=valuelist which can take any of the following +keys: +

+

+format
This specifies how to format the associated location number for this entry in + the glossary. This value is equivalent to the makeindex encap value, + and (as with \index) the value needs to be the name of a command + without the initial backslash. As with \index, the characters ( and ) can + also be used to specify the beginning and ending of a number range. + Again as with \index, the command should be the name of a command + which takes an argument (which will be the associated location). Be + careful not to use a declaration (such as bfseries) instead of a text block + command (such as textbf) as the effect is not guaranteed to be localised. If + you want to apply more than one style to a given entry (e.g. bold and + italic) you will need to create a command that applies both formats, + e.g.  + + + +
+ \newcommand*{\textbfem}[1]{\textbf{\emph{#1}}} +
+

and use that command. +

In this document, the standard formats refer to the standard text block + commands such as \textbf or \emph or any of the commands listed in + table 4. +

If you use xindy instead of makeindex, you must specify any non-standard formats + that you want to use with the format key using \GlsAddXdyAttribute{name}. + So if you use xindy with the above example, you would need to add: + + + +

+
+ \GlsAddXdyAttribute{textbfem} +
+

See §11 Xindy for further details.

+

+

Note that unlike \index, you can’t have anything following the command name, + such as an asterisk or arguments. If you want to cross-reference another entry, + either use the see key when you define the entry or use \glssee (described in §8 + Cross-Referencing Entries). +

If you are using hyperlinks and you want to change the font of the hyperlinked + location, don’t use \hyperpage (provided by the hyperref package) as the + locations may not refer to a page number. Instead, the glossaries package provides + number formats listed in table 4. +

+
+


+
Table 4: Predefined Hyperlinked Location Formats
+
+ + + + + + + + +
hyperrm serif hyperlink
hypersf sans-serif hyperlink
hypertt monospaced hyperlink
hyperbf bold hyperlink
hypermd medium weight hyperlink
hyperit italic hyperlink
hypersl slanted hyperlink
hyperup upright hyperlink
hypersc small caps hyperlink
hyperemphemphasized hyperlink
+
+

+
+

Note that if the \hyperlink command hasn’t been defined, the hyperxx + formats are equivalent to the analogous textxxfont commands (and hyperemph + is equivalent to emph). If you want to make a new format, you will need to define + a command which takes one argument and use that. For example, if you want the + location number to be in a bold sans-serif font, you can define a command called, + say, \hyperbsf: + + + +

+
+ \newcommand{\hyperbsf}[1]{\textbf{\hypersf{#1}}} +
+

and then use hyperbsf as the value for the format key. (See also “Displaying + the glossary” in the documented code, glossaries.pdf.) Remember + that if you use xindy, you will need to add this to the list of location + attributes: + + + +

+
+ \GlsAddXdyAttribute{hyperbsf} +
+

+

+counter
This specifies which counter to use for this location. This overrides the default + counter used by this entry. (See also §5 Number lists.) +
+hyper
This is a boolean key which can be used to enable/disable the hyperlink to + the relevant entry in the glossary. (Note that setting hyper=true will + have no effect if \hyperlink has not been defined.) The default value is + hyper=true. +
+

There is also a starred version: +


\glslink*  \glslink*[options]{label}{text}

+

+which is equivalent to \glslink, except it sets hyper=false. Similarly, all the following +commands described in this section also have a starred version that disables the +hyperlink. +

Don’t use commands like \glslink or \gls in the textargument of \glslink. +
+

+

The command: +


\gls  \gls[options]{label}[insert]

+

+is the same as \glslink, except that the link text is determined from the values of the +text and first keys supplied when the entry was defined using \newglossaryentry. If +the entry has been marked as having been used, the value of the text key will be used, +otherwise the value of the first key will be used. On completion, \gls will mark the +entry’s first use flag as used. +

There are two uppercase variants: +


\Gls  \Gls[options]{label}[insert]

+

+and +


\GLS  \GLS[options]{label}[insert]

+

+which make the first letter of the link text or all the link text uppercase, respectively. + + + +

The final optional argument insert, allows you to insert some additional +text into the link text. By default, this will append insertat the end of the +link text, but this can be changed (see §6.1 Changing the format of the link +text). +

The first optional argument optionsis the same as the optional argument to +\glslink. As with \glslink, these commands also have a starred version that disable +the hyperlink. +

Don’t use commands like \glslink or \gls in the insertargument of \gls and +its variants.
+

+

There are also analogous plural forms: +


\glspl  \glspl[options]{label}[insert]

+

+


\Glspl  \Glspl[options]{label}[insert]

+

+


\GLSpl  \GLSpl[options]{label}[insert]

+

+These determine the link text from the plural and firstplural keys supplied when the +entry was first defined. As before, these commands also have a starred version that +disable the hyperlink. +

Be careful when you use glossary entries in math mode especially if you are using +hyperref as it can affect the spacing of subscripts and superscripts. For example, +suppose you have defined the following entry: + + + +

+
+\newglossaryentry{Falpha}{name={F_\alpha},description=sample} +
+

and later you use it in math mode: + + + +

+
+$\gls{Falpha}^2$ +
+

This will result in Fα2 instead of Fα2. In this situation it’s best to bring the +superscript into the hyperlink using the final insertoptional argument: + + + +

+
+$\gls{Falpha}[^2]$ +
+

+

+

Note that \glslink doesn’t use or affect the first use flag, nor does it use +\glsdisplay or \glsdisplayfirst (see §6.1 Changing the format of the link text). +Instead, you can use: +


\glsdisp  \glsdisp[options]{label}{link text}

+

+This behaves in the same way as \gls, except that it uses link textinstead of the +value of the first or text key. (Note that this command always sets insertto +nothing.) This command affects the first use flag, and uses \glsdisplay or +\glsdisplayfirst. +

The command: +


\glstext  \glstext[options]{label}[insert]

+

+is similar to \gls except that it always uses the value of the text key and +does not affect the first use flag. Unlike \gls, the inserted text insertis +always appended to the link text since \glstext doesn’t use \glsdisplay or +\glsdisplayfirst. (The same is true for all the following commands described in this +section.) +

There are also analogous commands: +


\Glstext  \Glstext[options]{text}[insert]

+

+


\GLStext  \GLStext[options]{text}[insert]

+

+As before, these commands also have a starred version that disable the hyperlink. +

The command: +


\glsfirst  \glsfirst[options]{label}[insert]

+

+is similar to \glstext except that it always uses the value of the first key. Again, +insertis always appended to the end of the link text and does not affect the first use +flag. +

There are also analogous commands: +


\Glsfirst  \Glsfirst[options]{text}[insert]

+

+


\GLSfirst  \GLSfirst[options]{text}[insert]

+

+As before, these commands also have a starred version that disable the hyperlink. + + + +

The command: +


\glsplural  \glsplural[options]{label}[insert]

+

+is similar to \glstext except that it always uses the value of the plural key. Again, +insertis always appended to the end of the link text and does not mark the entry as +having been used. +

There are also analogous commands: +


\Glsplural  \Glsplural[options]{text}[insert]

+

+


\GLSplural  \GLSplural[options]{text}[insert]

+

+As before, these commands also have a starred version that disable the hyperlink. +

The command: +


\glsfirstplural  \glsfirstplural[options]{label}[insert]

+

+is similar to \glstext except that it always uses the value of the firstplural key. Again, +insertis always appended to the end of the link text and does not mark the entry as +having been used. +

There are also analogous commands: +


\Glsfirstplural  \Glsfirstplural[options]{text}[insert]

+

+


\GLSfirstplural  \GLSfirstplural[options]{text}[insert]

+

+As before, these commands also have a starred version that disable the hyperlink. +

The command: +


\glsname  \glsname[options]{label}[insert]

+

+is similar to \glstext except that it always uses the value of the name key. Again, +insertis always appended to the end of the link text and does not mark the entry as +having been used. Note: if you want to use this command and the name key contains +commands, you will have to disable the sanitization of the name key and protect fragile +commands. +

There are also analogous commands: +


\Glsname  \Glsname[options]{text}[insert]

+

+


\GLSname  \GLSname[options]{text}[insert]

+

+As before, these commands also have a starred version that disable the hyperlink. +

The command: +


\glssymbol  \glssymbol[options]{label}[insert]

+

+is similar to \glstext except that it always uses the value of the symbol key. Again, +insertis always appended to the end of the link text and does not mark the entry as + + + +having been used. Note: if you want to use this command and the symbol key contains +commands, you will have to disable the sanitization of the symbol key and protect +fragile commands. +

There are also analogous commands: +


\Glssymbol  \Glssymbol[options]{text}[insert]

+

+


\GLSsymbol  \GLSsymbol[options]{text}[insert]

+

+As before, these commands also have a starred version that disable the hyperlink. +

The command: +


\glsdesc  \glsdesc[options]{label}[insert]

+

+is similar to \glstext except that it always uses the value of the description key. Again, +insertis always appended to the end of the link text and does not mark the entry as +having been used. Note: if you want to use this command and the description key +contains commands, you will have to disable the sanitization of the description key and +protect fragile commands. +

There are also analogous commands: +


\Glsdesc  \Glsdesc[options]{text}[insert]

+

+


\GLSdesc  \GLSdesc[options]{text}[insert]

+

+As before, these commands also have a starred version that disable the hyperlink. +

The command: +


\glsuseri  \glsuseri[options]{label}[insert]

+

+is similar to \glstext except that it always uses the value of the user1 key. Again, +insertis always appended to the end of the link text and does not mark the entry as +having been used. +

There are also analogous commands: +


\Glsuseri  \Glsuseri[options]{text}[insert]

+

+


\GLSuseri  \GLSuseri[options]{text}[insert]

+

+As before, these commands also have a starred version that disable the hyperlink. +Similarly for the other user keys: +


\glsuserii  \glsuserii[options]{text}[insert]

+

+


\Glsuserii  \Glsuserii[options]{text}[insert]

+

+


\GLSuserii  \GLSuserii[options]{text}[insert]

+ + + +

+


\glsuseriii  \glsuseriii[options]{text}[insert]

+

+


\Glsuseriii  \Glsuseriii[options]{text}[insert]

+

+


\GLSuseriii  \GLSuseriii[options]{text}[insert]

+

+


\glsuseriv  \glsuseriv[options]{text}[insert]

+

+


\Glsuseriv  \Glsuseriv[options]{text}[insert]

+

+


\GLSuseriv  \GLSuseriv[options]{text}[insert]

+

+


\glsuserv  \glsuserv[options]{text}[insert]

+

+


\Glsuserv  \Glsuserv[options]{text}[insert]

+

+


\GLSuserv  \GLSuserv[options]{text}[insert]

+

+


\glsuservi  \glsuservi[options]{text}[insert]

+

+


\Glsuservi  \Glsuservi[options]{text}[insert]

+

+


\GLSuservi  \GLSuservi[options]{text}[insert]

+

+

+

+

Top

6.1 Changing the format of the link text

+

The format of the link text for \gls, \glspl and their uppercase variants is governed +by two commands: + + + +


\glsdisplayfirst  \glsdisplayfirst{first/first plural}{description}{symbol}{insert} +

+

+which is used the first time a glossary entry is used in the text and +


\glsdisplay  \glsdisplay{text/plural}{description}{symbol}{insert} +

+

+which is used subsequently. Both commands take four arguments: the first is either the +singular or plural form given by the text, plural, first or firstplural keys (set when the +term was defined) depending on context; the second argument is the term’s +description (as supplied by the description or descriptionplural keys); the third +argument is the symbol associated with the term (as supplied by the symbol or +symbolplural keys) and the fourth argument is the additional text supplied in the final +optional argument to \gls or \glspl (or their uppercase variants). The default +definitions of \glsdisplay and \glsdisplayfirst simply print the first argument +immediately followed by the fourth argument. The remaining arguments are +ignored. +

Care needs to be taken when redefining \glsdisplay and \glsdisplayfirst as +commands like \Gls will expand the displayed text before applying \makefirstuc. If +you want to use formatting commands, it’s best to define a robust version that deals +with all the formatting. For example, suppose you want the text to appear in bold +italic, it’s best to do something like: + + + +

+
+\DeclareRobustCommand{\textbfit}[1]{\emph{\bfseries #1}} + 
\renewcommand{\glsdisplay}[4]{\textbfit{#1#4}} +
+

See the mfirstuc documentation for further details on the limitations of \makefirstuc. +

+

+

If required, you can access the label for the given entry via +


\glslabel  \glslabel

+

+so it is possible to use this label in the definition of \glsdisplay or \glsdisplayfirst +to supply additional information using any of the commands described in §9 Using +Glossary Terms Without Links, if required. +

Note that \glsdisplay and \glsdisplayfirst are not used by \glslink. If you +want to supply your own link text, you need to use \glsdisp instead. +

For example, suppose you want a glossary of measurements and units, you can use +the symbol key to store the unit: + + + +

+
+\newglossaryentry{distance}{name=distance, + 
description={The length between two points}, + 
symbol={km}} +
+

and now suppose you want \gls{distance} to produce “distance (km)” on first use, +then you can redefine \glsdisplayfirst as follows: + + + +

+
+\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} +
+

Note that the additional text is placed after #1, so \gls{distance}[’s] will +produce “distance’s (km)” rather than “distance (km)’s” which looks a bit +odd (even though it may be in the context of “the distance (km) is measured +between the two points” — but in this instance it would be better not to use a +contraction). +

Note also that all of the link text will be formatted according to \glstextformat +(described earlier). So if you do, say: + + + +

+
+\renewcommand{\glstextformat}[1]{\textbf{#1}} + 
\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} +
+

then \gls{distance} will produce “distance (km)”. +

If you have multiple glossaries, changing \glsdisplayfirst and \glsdisplay will +change the way entries for all of the glossaries appear when using the commands \gls, +\glspl, their uppercase variants and \glsdisp. If you only want the change to affect +entries for a given glossary, then you need to use +


\defglsdisplay  \defglsdisplay[type]{definition}

+

+and +


\defglsdisplayfirst  \defglsdisplayfirst[type]{definition}

+

+instead of redefining \glsdisplay and \glsdisplayfirst. +

Both \defglsdisplay and \defglsdisplayfirst take +two arguments: the first (which is optional) is the glossary’s +label8 +and the second is how the term should be displayed when it is invoked using commands +\gls, \glspl, their uppercase variants and \glsdisp. This is similar to the way +\glsdisplayfirst was redefined above. +

For example, suppose you have created a new glossary called notation and you +want to change the way the entry is displayed on first use so that it includes the +symbol, you can do: + + + +

+
+\defglsdisplayfirst[notation]{#1#4 (denoted #3)} +
+

Now suppose you have defined an entry as follows: + + + +

+
+\newglossaryentry{set}{type=notation, + 
  name=set, + 
  description={A collection of objects}, + 
  symbol={$S$} + 
} +
+

The first time you reference this entry it will be displayed as: “set (denoted S)” +(assuming \gls was used). +

Remember that if you use the symbol key, you need to use a glossary style that +displays the symbol, as many of the styles ignore it. In addition, if you want either the +description or symbol to appear in the link text, you will have to disable the +sanitization of these keys and protect fragile commands. +

+

+

Top

6.2 Enabling and disabling hyperlinks to glossary entries

+

If you load the hyperref or html packages prior to loading the glossaries package, +commands such as \glslink and \gls, described above, will automatically have +hyperlinks to the relevant glossary entry, unless the hyper option has been set to false. +You can disable or enable links using: +


\glsdisablehyper  \glsdisablehyper

+

+and +


\glsenablehyper  \glsenablehyper

+

+respectively. The effect can be localised by placing the commands within a group. Note +that you should only use \glsenablehyper if the commands \hyperlink and +\hypertarget have been defined (for example, by the hyperref package). +

You can disable just the first use links using the package option hyperfirst=false. +Note that this option only affects commands that recognise the first use flag, for +example \gls, \glspl and \glsdisp but not \glslink. +

+

+

Top

7 Adding an Entry to the Glossary Without Generating Text

+

It is possible to add a line in the glossary file without generating any text at that point +in the document using: +


\glsadd  \glsadd[options]{label}

+ + + +

+This is similar to \glslink, only it doesn’t produce any text (so therefore, +there is no hyper key available in optionsbut all the other options that can +be used with \glslink can be passed to \glsadd). For example, to add a +page range to the glossary number list for the entry whose label is given by +set: + + + +

+
+\glsadd[format=(]{set} + 
Lots of text about sets spanning many pages. + 
\glsadd[format=)]{set} +
+

+

To add all entries that have been defined, use: +


\glsaddall  \glsaddall[options]

+

+The optional argument is the same as for \glsadd, except there is also a key +types which can be used to specify which glossaries to use. This should be a +comma separated list. For example, if you only want to add all the entries +belonging to the list of acronyms (specified by the glossary type \acronymtype) +and a list of notation (specified by the glossary type notation) then you can +do: + + + +

+
+\glsaddall[types={\acronymtype,notation}] +
+

+

Note that \glsadd and \glsaddall add the current location to the number list. In +the case of \glsaddall, all entries in the glossary will have the same location +in the number list. If you want to use \glsaddall, it’s best to suppress the +number list with the nonumberlist package option. (See sections 2.3 and 5.) +
+

+

The sample file sample-dual.tex makes use of \glsadd to allow for an entry that +should appear both in the main glossary and in the list of acronyms. This example sets +up the list of acronyms using the acronym package option: + + + +

+
+\usepackage[acronym]{glossaries} +
+

A new command is then defined to make it easier to define dual entries: + + + +

+
+\newcommand*{\newdualentry}[5][]{% + 
  \newglossaryentry{main-#2}{name={#4},% + 
  text={#3\protect\glsadd{#2}},% + 
  description={#5},% + 
  #1 + 
  }% + 
  \newacronym{#2}{#3\protect\glsadd{main-#2}}{#4} + 
} +
+

This has the following syntax: +


\newdualentry[options]{label}{abbrv}{long}{description}

+

+You can then define a new dual entry: + + + +

+
+\newdualentry{svm}% label + 
  {SVM}% abbreviation + 
  {support vector machine}% long form + 
  {Statistical pattern recognition technique}% description +
+

Now you can reference the acronym with \gls{svm} or you can reference the entry in +the main glossary with \gls{main-svm}. +

+

+

Top

8 Cross-Referencing Entries

+

There are several ways of cross-referencing entries in the glossary: +

+

    +
  1. You can use commands such as \gls in the entries description. For example: + + + +
    + \newglossaryentry{apple}{name=apple, +  
    description={firm, round fruit. See also \gls{pear}}} +
    +

    Note that with this method, if you don’t use the cross-referenced term in the + main part of the document, you will need two runs of makeglossaries: + + + +

    +
    + latex filename +  
    makeglossaries filename +  
    latex filename +  
    makeglossaries filename +  
    latex filename +
    +

    +

    If you switch off the description sanitization, you must protect fragile commands + like \gls: + + + +

    +
    + \newglossaryentry{apple}{name=apple, +  
    description={firm, round fruit. See also +  
    \protect\gls{pear}}} +
    +

    +

    +

  2. +
  3. As described in §4 Defining Glossary Entries, you can use the see key when you + define the entry. For example: + + + +
    + \newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, +  
    description={Series expansion}, +  
    see={TaylorsTheorem}} +
    +

    Note that in this case, the entry with the see key will automatically be added to + the glossary, but the cross-referenced entry won’t. You therefore need to ensure + that you use the cross-referenced term with the commands described in §6 Links + to Glossary Entries or §7 Adding an Entry to the Glossary Without Generating + Text. +

    The “see” tag is produce using \seename, but can be overridden in specific + instances using square brackets at the start of the see value. For example: + + + +

    +
    + \newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, +  
    description={Series expansion}, +  
    see=[see also]{TaylorsTheorem}} +
    +

    +

  4. +
  5. After you have defined the entry, use +


    \glssee  \glssee[tag]{label}{xr label list}

    +

    + where xr label listis a comma-separated list of entry labels to be + cross-referenced, labelis the label of the entry doing the cross-referencing + and tagis the “see” tag. (The default value of tagis \seename.) For + example: + + + +

    +
    + \glssee[see also]{series}{FourierSeries,TaylorsTheorem} +
    +

    Note that this automatically adds the entry given by labelto the glossary but + doesn’t add the cross-referenced entries (specified by xr label list) to the + glossary.

+

In both cases 2 and 3 above, the cross-referenced information appears in the +number list, whereas in case 1, the cross-referenced information appears in the +description. (See the sample-crossref.tex example file that comes with this package.) +This means that in cases 2 and 3, the cross-referencing information won’t appear if you +have suppressed the number list. In this case, you will need to activate the number list +for the given entries using nonumberlist=false. Alternatively, if you just use the see key +instead of \glssee, you can automatically activate the number list using the +seeautonumberlist package option. +

+

+

Top

8.1 Customising Cross-reference Text

+

When you use either the see key or the command \glssee, the cross-referencing +information will be typeset in the glossary according to: +


\glsseeformat  \glsseeformat[tag]{label-list}{location}

+

+The default definition of \glsseeformat is: +
\emph{tag} \glsseelist{label-list} +
+Note that the location is always ignored.9 +For example, if you want the tag to appear in bold, you can +do:10 + + + +

+
+\renewcommand*{\glsseeformat}[3][\seename]{\textbf{#1} \glsseelist{#2}} +
+

+

The list of labels is dealt with by \glsseelist, which iterates through the list and +typesets each entry in the label. The entries are separated by +


\glsseesep  \glsseesep

+

+or (for the last pair) +


\glsseelastsep  \glsseelastsep

+

+These default to ,\space and \space\andname\space respectively. The list entry text +is displayed using: +


\glsseeitemformat  \glsseeitemformat{label}

+

+This defaults to +\glsentrytext{label}.11 +For example, to make the cross-referenced list use small caps: + + + +

+
+\renewcommand{\glsseeitemformat}[1]{\textsc{\glsentrytext{#1}}} +
+

+

You can use \glsseeformat and \glsseelist in the main body of the text, but +they won’t automatically add the cross-referenced entries to the glossary. If you want +them added with that location, you can do: + + + +

+
+Some information (see also + 
\glsseelist{FourierSeries,TaylorsTheorem}% + 
\glsadd{FourierSeries}\glsadd{TaylorsTheorem}). +
+

+

+

+

+

Top

9 Using Glossary Terms Without Links

+

The commands described in this section display entry details without adding any +information to the glossary. They don’t use \glstextformat, they don’t have any +optional arguments, they don’t affect the first use flag and, apart from \glshyperlink, +they don’t produce hyperlinks. +


\glsentryname  \glsentryname{label}

+

+


\Glsentryname  \Glsentryname{label}

+

+These commands display the name of the glossary entry given by label, as specified by +the name key. \Glsentryname makes the first letter uppercase. +


\glsentrytext  \glsentrytext{label}

+

+


\Glsentrytext  \Glsentrytext{label}

+

+These commands display the subsequent use text for the glossary entry given +by label, as specified by the text key. \Glsentrytext makes the first letter +uppercase. +


\glsentryplural  \glsentryplural{label}

+

+


\Glsentryplural  \Glsentryplural{label}

+

+These commands display the subsequent use plural text for the glossary entry given by +label, as specified by the plural key. \Glsentryplural makes the first letter +uppercase. +


\glsentryfirst  \glsentryfirst{label}

+ + + +

+


\Glsentryfirst  \Glsentryfirst{label}

+

+These commands display the first use text for the glossary entry given by +label, as specified by the first key. \Glsentryfirst makes the first letter +uppercase. +


\glsentryfirstplural  \glsentryfirstplural{label}

+

+


\Glsentryfirstplural  \Glsentryfirstplural{label}

+

+These commands display the plural form of the first use text for the glossary entry +given by label, as specified by the firstplural key. \Glsentryfirstplural makes the +first letter uppercase. +


\glsentrydesc  \glsentrydesc{label}

+

+


\Glsentrydesc  \Glsentrydesc{label}

+

+These commands display the description for the glossary entry given by label. +\Glsentrydesc makes the first letter uppercase. +


\glsentrydescplural  \glsentrydescplural{label}

+

+


\Glsentrydescplural  \Glsentrydescplural{label}

+

+These commands display the plural description for the glossary entry given by label. +\Glsentrydescplural makes the first letter uppercase. +


\glsentrysymbol  \glsentrysymbol{label}

+

+


\Glsentrysymbol  \Glsentrysymbol{label}

+

+These commands display the symbol for the glossary entry given by label. +\Glsentrysymbol makes the first letter uppercase. +


\glsentrysymbolplural  \glsentrysymbolplural{label}

+

+


\Glsentrysymbolplural  \Glsentrysymbolplural{label}

+

+These commands display the plural symbol for the glossary entry given by label. +\Glsentrysymbolplural makes the first letter uppercase. +


\glsentryuseri  \glsentryuseri{label}

+

+ + + +


\Glsentryuseri  \Glsentryuseri{label}

+

+


\glsentryuserii  \glsentryuserii{label}

+

+


\Glsentryuserii  \Glsentryuserii{label}

+

+


\glsentryuseriii  \glsentryuseriii{label}

+

+


\Glsentryuseriii  \Glsentryuseriii{label}

+

+


\glsentryuseriv  \glsentryuseriv{label}

+

+


\Glsentryuseriv  \Glsentryuseriv{label}

+

+


\glsentryuserv  \glsentryuserv{label}

+

+


\Glsentryuserv  \Glsentryuserv{label}

+

+


\glsentryuservi  \glsentryuservi{label}

+

+


\Glsentryuservi  \Glsentryuservi{label}

+

+These commands display the value of the user keys for the glossary entry given by +label. +


\glshyperlink  \glshyperlink[link text]{label}

+

+This command provides a hyperlink to the glossary entry given by labelbut does not add +any information to the glossary file. The link text is given by \glsentrytext{label} by +default12, +but can be overridden using the optional argument. +

If you use \glshyperlink, you need to ensure that the relevant entry has been +added to the glossary using any of the commands described in §6 Links to Glossary +Entries or §7 Adding an Entry to the Glossary Without Generating Text otherwise you +will end up with an undefined link.
+

+ + + +

For further information see “Displaying entry details without adding information to +the glossary” in the documented code (glossaries.pdf). +

+

+

Top

10 Displaying a glossary

+

The command +


\printglossaries  \printglossaries

+

+will display all the glossaries in the order in which they were defined. Note that no +glossaries will appear until you have either used the Perl script makeglossaries or have +directly used makeindex or xindy (as described in §1.3 Generating the Associated +Glossary Files). If the glossary still does not appear after you re-LATEX your +document, check the makeindex/xindy log files to see if there is a problem. Remember +that you also need to use the command \makeglossaries in the preamble to enable the +glossaries. +

An individual glossary can be displayed using: +


\printglossary  \printglossary[options]

+

+where optionsis a key=valuelist of options. The following keys are available: +

+type
The value of this key specifies which glossary to print. If omitted, the default + glossary is assumed. For example, to print the list of acronyms: + + + +
+ \printglossary[type=\acronymtype] +
+

+

+title
This is the glossary’s title (overriding the title specified when the glossary was + defined). +
+toctitle
This is the title to use for the table of contents (if the toc package option has + been used). It may also be used for the page header, depending on the page style. + If omitted, the value of title is used. +
+style
This specifies which glossary style to use for this glossary, overriding the effect of + the style package option or \glossarystyle. +
+numberedsection
This specifies whether to use a numbered section for this glossary, + overriding the effect of the numberedsection package option. This key has the same + syntax as the numberedsection package option, described in §2.2 Sectioning and + TOC Options. +
+nonumberlist
This is a boolean key. If true (nonumberlist=true) the numberlist is + suppressed for this glossary. If false (nonumberlist=false) the numberlist is + displayed for this glossary. If no value is supplied, true is assumed. +
+

By default, the glossary is started either by \chapter* or by \section*, depending +on whether or not \chapter is defined. This can be overridden by the section package +option or the \setglossarysection command. Numbered sectional units can be +obtained using the numberedsection package option. Each glossary sets the page header +via the command \glossarymark. If this mechanism is unsuitable for your chosen class +file or page style package, you will need to redefine \glossarymark. Further +information about these options and commands is given in §2.2 Sectioning and TOC +Options. +

Information can be added to the start of the glossary (after the title and before the +main body of the glossary) by redefining +


\glossarypreamble  \glossarypreamble

+

+For example: + + + +

+
+\renewcommand{\glossarypreamble}{Numbers in italic indicate + 
primary definitions.} +
+

This needs to be done before the glossary is displayed using \printglossaries or +\printglossary. Note that if you want a different preamble for each glossary, you will +need to use a separate \printglossary for each glossary and change the definition of +\glossarypreamble between each glossary. For example: + + + +

+
+\renewcommand{\glossarypreamble}{Numbers in italic indicate + 
primary definitions.} + 
\printglossary + 
\renewcommand{\glossarypreamble}{} + 
\printglossary[type=acronym] +
+

Alternatively, you can do something like: + + + +

+
+\renewcommand{\glossarypreamble}{Numbers in italic indicate + 
primary definitions.\gdef\glossarypreamble{}} + 
\printglossaries +
+

which will print the preamble text for the first glossary and change the preamble to do +nothing for subsequent glossaries. (Note that \gdef is required as the glossary is placed +within a group.) +

There is an analogous command called +


\glossarypostamble  \glossarypostamble

+

+which is placed at the end of each glossary. +

For example: suppose you are using the superheaderborder +style13, +and you want the glossary to be in two columns, but after the glossary you want to +switch back to one column mode, you could do: + + + +

+
+\renewcommand*{\glossarysection}[2][]{% + 
  \twocolumn[{\section*{#2}}]% + 
  \setlength\glsdescwidth{0.6\linewidth}% + 
  \glossarymark{\glossarytoctitle}% + 
} + 
\renewcommand*{\glossarypostamble}{\onecolumn} +
+

+

Within each glossary, each entry name is formatted according to +


\glsnamefont  \glsnamefont{name}

+

+which takes one argument: the entry name. This command is always used regardless of +the glossary style. By default, \glsnamefont simply displays its argument in whatever +the surrounding font happens to be. This means that in the list-like glossary styles +(defined in the glossary-list style file) the name will appear in bold, since the name is +placed in the optional argument of \item, whereas in the tabular styles (defined in the +glossary-long and glossary-super style files) the name will appear in the normal font. The +hierarchical glossary styles (defined in the glossary-tree style file) also set the name in +bold. +

For example, suppose you want all the entry names to appear in medium weight +small caps, then you can do: + + + +

+
+\renewcommand{\glsnamefont}[1]{\textsc{\mdseries #1}} +
+

+

+

+

Top

11 Xindy

+

If you want to use xindy to sort the glossary, you must use the package option +xindy: + + + +

+
+\usepackage[xindy]{glossaries} +
+

This ensures that the glossary information is written in xindy syntax. +

§1.3 Generating the Associated Glossary Files covers how to use the external +indexing application. This section covers the commands provided by the glossaries +package that allow you to adjust the xindy style file (.xdy) and parameters. +

To assist writing information to the xindy style file, the glossaries package provides +the following commands: +


\glsopenbrace  \glsopenbrace

+

+


\glsclosebrace  \glsclosebrace

+

+which produce an open and closing brace. (This is needed because \{ and \} don’t +expand to a simple brace character when written to a file.) +

In addition, if you are using a package that makes the double quote character active +(e.g. ngerman) you can use: +


\glsquote  \glsquote{text}

+

+which will produce "text". Alternatively, you can use \string" to write the +double-quote character. This document assumes that the double quote character has +not been made active, so the examples just use " for clarity. +

If you want greater control over the xindy style file than is available through the +LATEX commands provided by the glossaries package, you will need to edit the xindy +style file. In which case, you must use \noist to prevent the style file from being +overwritten by the glossaries package. For additional information about xindy, read the +xindy documentation. +

+

+

Top

11.1 Language and Encodings

+

When you use xindy, you need to specify the language and encoding used +(unless you have written your own custom xindy style file that defines the +relevant alphabet and sort rules). If you use makeglossaries, this information is +obtained from the document’s auxiliary (.aux) file. The glossaries package +attempts to find the root language, but in the event that it gets it wrong or +if xindy doesn’t support that language, then you can specify the language +using: +


\GlsSetXdyLanguage  \GlsSetXdyLanguage[glossary type]{language} +

+ + + +

+where languageis the name of the language. The optional argument can be used if +you have multiple glossaries in different languages. If glossary typeis omitted, it will +be applied to all glossaries, otherwise the language setting will only be applied to the +glossary given by glossary type. +

If the inputenc package is used, the encoding will be obtained from the +value of \inputencodingname. Alternatively, you can specify the encoding +using: +


\GlsSetXdyCodePage  \GlsSetXdyCodePage{code}

+

+where codeis the name of the encoding. For example: + + + +

+
+\GlsSetXdyCodePage{utf8} +
+

+

Note that you can also specify the language and encoding using the package option +xindy={language=lang,codepage=code}. For example: + + + +

+
+\usepackage[xindy={language=english,codepage=utf8}]{glossaries} +
+

+

If you write your own custom xindy style file that includes the language settings, +you need to set the language to nothing: + + + +

+
+\GlsSetXdyLanguage{} +
+

(and remember to use \noist to prevent the style file from being overwritten). +

The commands \GlsSetXdyLanguage and \GlsSetXdyCodePage have no effect if +you don’t use makeglossaries. If you call xindy without makeglossaries you need to +remember to set the language and encoding using the -L and -C switches. +
+

+

+

+

Top

11.2 Locations and Number lists

+

If you use xindy, the glossaries package needs to know which counters you will be using +in the number list in order to correctly format the xindy style file. Counters specified +using the counter package option or the counteroption of \newglossary are +automatically taken care of, but if you plan to use a different counter in the counter key +for commands like \glslink, then you need to identify these counters before +\makeglossaries using: +


\GlsAddXdyCounters  \GlsAddXdyCounters{counter list}

+

+where counter listis a comma-separated list of counter names. +

The most likely attributes used in the format key (textrm, hyperrm etc) are +automatically added to the xindy style file, but if you want to use another attribute, +you need to add it using: +


\GlsAddXdyAttribute  \GlsAddXdyAttribute{name}

+

+where nameis the name of the attribute, as used in the format key. For example, +suppose I want a bold, italic, hyperlinked location. I first need to define a command +that will do this: + + + +

+
+\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} +
+

but with xindy, I also need to add this as an allowed attribute: + + + +

+
+\GlsAddXdyAttribute{hyperbfit} +
+

+

Note that \GlsAddXdyAttribute has no effect if \noist is used or if +\makeglossaries is omitted. \GlsAddXdyAttribute must be used before +\makeglossaries. Additionally, \GlsAddXdyCounters must come before +\GlsAddXdyAttribute.
+

+

If the location numbers don’t get expanded to a simple Arabic or Roman number or +a letter from a, …, z or A, …, Z, then you need to add a location style in the appropriate +format using +


\GlsAddXdyLocation  \GlsAddXdyLocation[prefix-location]{name}{definition} +

+

+where nameis the name of the format and definitionis the xindy definition. The +optional argument prefix-locationis needed if \theHcountereither isn’t defined or is +different from \thecounter. +

Note that \GlsAddXdyLocation has no effect if \noist is used or +if \makeglossaries is omitted. \GlsAddXdyLocation must be used before +\makeglossaries.
+

+

For example, suppose I decide to use a somewhat eccentric numbering system for +sections that redefines \thesection as follows: + + + +

+
+\renewcommand*{\thesection}{[\thechapter]\arabic{section}} +
+

If I haven’t done counter=section in the package option, I need to specify that the +counter will be used as a location number: + + + +

+
+\GlsAddXdyCounters{section} +
+

Next I need to add the location style (\thechapter is assumed to be the standard +\arabic{chapter}): + + + +

+
+\GlsAddXdyLocation{section}{:sep "[" "arabic-numbers" :sep "]" + 
  "arabic-numbers" + 
} +
+

Note that if I have further decided to use the hyperref package and want to redefine +\theHsection as: + + + +

+
+\renewcommand*{\theHsection}{\thepart.\thesection} + 
\renewcommand*{\thepart}{\Roman{part}} +
+

then I need to modify the \GlsAddXdyLocation code above to: + + + +

+
+\GlsAddXdyLocation["roman-numbers-uppercase"]{section}{:sep "[" + 
  "arabic-numbers" :sep "]" "arabic-numbers" + 
} +
+

Since \Roman will result in an empty string if the counter is zero, it’s a good idea to +add an extra location to catch this: + + + +

+
+\GlsAddXdyLocation{zero.section}{:sep "[" + 
  "arabic-numbers" :sep "]" "arabic-numbers" + 
} +
+

The above example is illustrated in the accompanying sample file samplexdy2.tex. +

Another example: suppose you want the page numbers written as words rather than +digits and you use the fmtcount package to do this. You can redefine \thepage as +follows: + + + +

+
+\renewcommand*{\thepage}{\Numberstring{page}} +
+

This gets expanded to \protect \Numberstringnum {n} where nis the Arabic +page number. This means that you need to define a new location that has that +form: + + + +

+
+\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space + 
  \string\Numberstringnum\space\glsopenbrace" + 
  "arabic-numbers" :sep "\glsclosebrace"} +
+

Note that it’s necessary to use \space to indicate that spaces also appear +in the format, since, unlike TEX, xindy doesn’t ignore spaces after control +sequences. +

\GlsAddXdyLocation{name}{definition} will define commands +


\glsXcounterXname{Hprefix}{location}

+

+for each counter that has been identified either by the counter package option, the +counteroption for \newglossary or in the argument of \GlsAddXdyCounters. +

The first argument Hprefixis only relevant when used with the hyperref package +and indicates that \theHcounteris given by \Hprefix.\thecounter. The sample +file samplexdy.tex, which comes with the glossaries package, uses the default page +counter for locations, and it uses the default \glsnumberformat and a custom +\hyperbfit format. A new xindy location called Numberstring, as illustrated above, is +defined to make the page numbers appear as “One”, “Two”, etc. In order for the location +numbers to hyperlink to the relevant pages, I need to redefine the necessary +\glsXcounterXformatcommands: + + + +

+
+\renewcommand{\glsXpageXglsnumberformat}[2]{% + 
 \linkpagenumber#2% + 
} + 
\renewcommand{\glsXpageXhyperbfit}[2]{% + 
 \textbf{\em\linkpagenumber#2}% + 
} + 
\newcommand{\linkpagenumber}[3]{\hyperlink{page.#3}{#1#2{#3}}} +
+

+

In the number list, the locations are sorted according to type. The default ordering is: +roman-page-numbers (e.g. i), arabic-page-numbers (e.g. 1), arabic-section-numbers +(e.g. 1.1 if the compositor is a full stop or 1-1 if the compositor is a +hyphen14), +alpha-page-numbers (e.g. a), Roman-page-numbers (e.g. I), +Alpha-page-numbers (e.g. A), Appendix-page-numbers (e.g. A.1 if +the Alpha compositor is a full stop or A-1 if the Alpha compositor is a +hyphen15), +user defined location names (as specified by \GlsAddXdyLocation in the order in which +they were defined), see (cross-referenced entries). This ordering can be changed +using: +

\GlsSetXdyLocationClassOrder  +


\GlsSetXdyLocationClassOrder{location names}

+

+where each location name is delimited by double quote marks and separated by white +space. For example: + + + +

+
+\GlsSetXdyLocationClassOrder{ + 
  "arabic-page-numbers" + 
  "arabic-section-numbers" + 
  "roman-page-numbers" + 
  "Roman-page-numbers" + 
  "alpha-page-numbers" + 
  "Alpha-page-numbers" + 
  "Appendix-page-numbers" + 
  "see" + 
} +
+

+

+

Note +that +\GlsSetXdyLocationClassOrder +has +no +effect +if +\noist +is +used +or +if +\makeglossaries +is +omitted. +\GlsSetXdyLocationClassOrder +must +be +used +before +\makeglossaries. +
+

+

If a number list consists of a sequence of consecutive numbers, the range will be +concatenated. The number of consecutive locations that causes a range formation +defaults to 2, but can be changed using: +


\GlsSetXdyMinRangeLength  \GlsSetXdyMinRangeLength{n}

+ + + +

+For example: + + + +

+
+\GlsSetXdyMinRangeLength{3} +
+

The argument may also be the keyword none, to indicate that there should +be no range formations. See the xindy manual for further details on range +formations. +

Note that \GlsSetXdyMinRangeLength has no effect if \noist is used or if +\makeglossaries is omitted. \GlsSetXdyMinRangeLength must be used before +\makeglossaries.
+

+

See §5 Number lists for further details. +

+

+

Top

11.3 Glossary Groups

+

The glossary is divided into groups according to the first letter of the sort key. The +glossaries package also adds a number group by default, unless you suppress it in the +xindy package option. For example: + + + +

+
+\usepackage[xindy={glsnumbers=false}]{glossaries} +
+

Any entry that doesn’t go in one of the letter groups or the number group is placed in +the default group. +

If you have a number group, the default behaviour is to locate it before the “A” +letter group. If you are not using a Roman alphabet, you can change this +using: +

\GlsSetXdyFirstLetterAfterDigits  +


\GlsSetXdyFirstLetterAfterDigits{letter}

+

+

+

Note +that +\GlsSetXdyFirstLetterAfterDigits +has +no +effect +if +\noist +is +used +or +if +\makeglossaries +is +omitted. +\GlsSetXdyFirstLetterAfterDigits +must +be +used +before +\makeglossaries. +
+

+

+

+ + + +

Top

12 Defining New Glossaries

+

A new glossary can be defined using: +


\newglossary  \newglossary[log-ext]{name}{in-ext}{out-ext}{title}[counter] +

+

+where nameis the label to assign to this glossary. The arguments in-ext +and out-extspecify the extensions to give to the input and output files for +that glossary, titleis the default title for this new glossary and the final +optional argument counterspecifies which counter to use for the associated +number lists (see also §5 Number lists). The first optional argument specifies the +extension for the makeindex or xindy transcript file (this information is only +used by makeglossaries which picks up the information from the auxiliary +file). +

Note that the main (default) glossary is automatically created as: + + + +

+
+\newglossary{main}{gls}{glo}{\glossaryname} +
+

so it can be identified by the label main (unless the nomain package option is used). +Using the acronym package option is equivalent to: + + + +

+
+\newglossary[alg]{acronym}{acr}{acn}{\acronymname} +
+

so it can be identified by the label acronym. If you are not sure whether the acronym +option has been used, you can identify the list of acronyms by the command +\acronymtype \acronymtype which is set to acronym, if the acronym option has been +used, otherwise it is set to main. Note that if you are using the main glossary as your +list of acronyms, you need to declare it as a list of acronyms using the package option +acronymlists. +

All glossaries must be defined before \makeglossaries to ensure that the relevant +output files are opened.
+

+

+

+

Top

13 Acronyms

+

You may have noticed in §4 Defining Glossary Entries that when you specify a new +entry, you can specify alternate text to use when the term is first used in the document. +This provides a useful means to define acronyms. For convenience, the glossaries package +defines the command: +


\newacronym  \newacronym[key-val list]{label}{abbrv}{long}

+

+

This uses \newglossaryentry to create an entry with the given label in the glossary +given by \acronymtype. Amongst other things, it sets up the first and text keys and, +depending on the acronym style, may also use \defdisplayfirst and \defdisplay +(see §6.1 Changing the format of the link text). +

The optional argument {key-val list} allows you to specify keys such as description +(when used with the description package option, described below) or you can override +plural forms of abbrvor longusing the shortplural or longplural keys. For +example: + + + +

+
+\newacronym[longplural={diagonal matrices}]{dm}{DM}{diagonal + 
matrix} +
+

If the first use uses the plural form, \glspl{dm} will display: diagonal matrices +(DMs). +

The following package options are available to change the acronym style: +

+

+description
With this package option, the description key needs to be set in the + optional argument key-val listof \newacronym. (If this package option isn’t + used, the long form longis put in the description key.) +
+footnote
With this package option, on first use the long form longis placed in a + footnote. By default the long form in the footnote will link to the relevant + entry in the glossary or list of acronyms. You can prevent this link by + doing: + + + +
+ \let\acrfootnote\acrnolinkfootnote +
+

+

+smallcaps
With this package option, the short form abbrvis typeset using + \textsc. (Recall that \textsc converts lower case characters into small + capitals and leaves upper case characters as they are. Therefore, you + need to have lower case characters in abbrvfor this option to have an + effect.) +
+smaller
This is similar to smallcaps, except that \textsmaller is used instead of + \textsc. Note that the glossaries package doesn’t define \textsmaller nor does it + load any package that does so. If you use this option, you must make sure + \textsmaller is defined (for example by loading relsize). +
+dua
This option will set both the first and text keys to the long form long.
+

If you want to define your own custom acronym style, see §13.3 Defining A Custom +Acronym Style. +

If you try using \newglossaryentry for entries in a designated list of acronyms in +combination with any of the above named package options you are likely to get +unexpected results such as empty brackets or empty footnotes. +

If you don’t intend to use \newacronym you should skip this section] and not use the +above package options.

+

+

As mentioned in §2.2 Sectioning and TOC Options, the command \acronymtype is +the name of the glossary in which the acronyms should appear. If the acronym package +option has been used, this will be acronym, otherwise it will be main. The acronyms can +then be used in exactly the same way as any other glossary entry. If you want more +than one list of acronyms, you must identify the others using the package options +acronymlists. This ensures that options such as footnote and smallcaps work for the +additional lists of acronyms. +

+

Since +\newacronym +sets +type=\acronymtype, +if + + + +you +want +to +load +a +file +containing +acronym +definitions +using +\loadglsentries[type]{filename}, +the +optional +argument +type +will +not +have +an +effect +unless +you +explicitly +set +the +type +as +type=\glsdefaulttype +in +the +optional +argument +to +\newacronym. +See +§4.3 +Loading +Entries +From +a +File. +
+

+

Since \newacronym uses \newglossaryentry, you can use commands like \gls and +\glsreset as with any other glossary entry. + + + +

For example, the following defines the acronym IDN: + + + +

+
+\newacronym{idn}{IDN}{identification number} +
+

\gls{idn} will produce “identification number (IDN)” on first use and “IDN” on +subsequent uses. If you want to use the smallcaps package option, you need to use lower +case characters for the shortened form: + + + +

+
+\newacronym{idn}{idn}{identification number} +
+

Now \gls{idn} will produce “identification number (IDN)” on first use and “IDN” on +subsequent uses. +

If you use any of the package options smallcaps, smaller, description or footnote, the +short form abbrvwill be displayed in the document using: +


\acronymfont  \acronymfont{text}

+

+and +


\firstacronymfont  \firstacronymfont{text}

+

+where \firstacronymfont is applied on first use and \acronymfont is applied on +subsequent use. Note that if you don’t use any of the above package options, changing +the definition of \acronymfont or \firstacronymfont will have no effect. In this case, +the recommended route is to use either the smaller or the smallcaps package option and +redefine \acronymfont and \firstacronymfont as required. (The smallcaps option sets +the default plural suffix in an upright font to cancel the effect of \textsc, +whereas smaller sets the suffix in the surrounding font.) For example, if you want +acronyms in a normal font on first use and emphasized on subsequent use, +do: + + + +

+
+\usepackage[smaller]{glossaries} + 
\renewcommand*{\firstacronymfont}[1]{#1} + 
\renewcommand*{\acronymfont}[1]{\emph{#1}} +
+

(Note that it is for this reason that the relsize package is not automatically loaded +when selecting the smaller package option.) +

There are commands analogous to \glstext (described in §6 Links to Glossary +Entries) that allow you to access just the short form, just the long form or the full form, +without affecting the first use flag. (Note that the full form isn’t necessarily the same as +the text produced on first use.) +


\acrshort  \acrshort[options]{label}[insert]

+

+This displays the short form for the entry given by label. The optional arguments are +the same as those for \glstext. There is also a starred version to suppress the +hyperlink. There are also analogous upper case variants: +


\Acrshort  \Acrshort[options]{label}[insert]

+

+


\ACRshort  \ACRshort[options]{label}[insert]

+

+


\acrlong  \acrlong[options]{label}[insert]

+

+This displays the long form for the entry given by label. The optional arguments are +the same as before. There is also a starred version to suppress the hyperlink. There are +also analogous upper case variants: +


\Acrlong  \Acrlong[options]{label}[insert]

+

+


\ACRshort  \ACRlong[options]{label}[insert]

+

+


\acrfull  \acrfull[options]{label}[insert]

+

+This is equivalent to: \acrfullformat \acrfullformat{\acrlong}{\acrshort}. This +defaults to long(\acronymfont{short}) regardless of the package options. There are +also analogous upper case variants: +


\Acrfull  \Acrfull[options]{label}[insert]

+

+


\ACRfull  \ACRfull[options]{label}[insert]

+ + + +

+

If you find the above commands too cumbersome to write, you can use +the shortcuts package option to activate the shorter command names listed in +table 5. +

+
+ + + +


+ + + +
Table 5: Synonyms provided by the package option shortcuts
+
+ + + + + + + + + + + + + + + +
Shortcut CommandEquivalent Command
\acs \acrshort
\Acs \Acrshort
\acsp \acrshortpl
\Acsp \Acrshortpl
\acl \acrlong
\Acl \Acrlong
\aclp \acrlongpl
\Aclp \Acrlongpl
\acf \acrfull
\Acf \Acrfull
\acfp \acrfullpl
\Acfp \Acrfullpl
\ac \gls
\Ac \Gls
\acp \glspl
\Acp \Glspl
+
+ + + +

+
+

It is also possible to access the long and short forms without adding information to +the glossary using commands analogous to \glsentrytext (described in §9 Using +Glossary Terms Without Links). +

The long form can be accessed using: +


\glsentrylong  \glsentrylong{label}

+

+or, with the first letter converted to upper case: +


\Glsentrylong  \Glsentrylong{label}

+

+Plural forms: +


\glsentrylongpl  \glsentrylongpl{label}

+

+


\Glsentrylongpl  \Glsentrylongpl{label}

+

+

Similarly, to access the short form: +


\glsentryshort  \glsentryshort{label}

+

+or, with the first letter converted to upper case: +


\Glsentryshort  \Glsentryshort{label}

+

+Plural forms: +


\glsentryshortpl  \glsentryshortpl{label}

+

+


\Glsentryshortpl  \Glsentryshortpl{label}

+

+

And the full form, long(short), can be obtained using: +


\glsentryfull  \glsentryfull{label}

+

+


\Glsentryfull  \Glsentryfull{label}

+

+


\glsentryfullpl  \glsentryfullpl{label}

+

+


\Glsentryfullpl  \Glsentryfullpl{label}

+

+ + + +

+

Top

13.1 Predefined Acronym Styles

+

Some of the acronym-related package options may be combined. Listed below are the +effects of different combinations. If you use an invalid combination, you’ll get an error +message. +

+

+description,footnote
When these two package options are used together, the first + use displays the entry as: +
\firstacronymfont{abbrv}insert\footnote{long} +
+ while subsequent use displays the entry as: +
\acronymfont{abbrv}insert +
+ where insertindicates the text supplied in the final optional argument to \gls, + \glspl or their uppercase variants. +
+dua
The dua package option always makes \gls display the expanded form and so may + not be used with footnote, smaller or smallcaps. Both first use and subsequent use + displays the entry in the form: +
long⟩⟨insert +
+ You can, however, access the short form using \acrshort and its variants. +
+description
This package option displays the entry on first use as: +
long⟩⟨insert(\firstacronymfont{abbrv}) +
+ while subsequent use displays the entry as: +
\acronymfont{abbrv}insert +
+

Note that with this option, you need to specify the description using the + description key in the optional argument of \newacronym. +

+footnote
This package option displays the entry on first use as: +
\firstacronymfont{abbrv}insert\footnote{long} +
+ while subsequent use displays the entry as: + + + +
\acronymfont{abbrv}insert +
+ Acronyms will be sorted according to the short form. +

Note that on first use, it is the long form in the footnote that links to the relevant + glossary entry (where hyperlinks are enabled), whereas on subsequent use, the + acronym links to the relevant glossary entry. You can suppress the long form link + by setting: + + + +

+
+ \let\acrfootnote\acrnolinkfootnote +
+

+

+smallcaps
If neither the footnote nor description options have been set, this option + displays the entry on first use as: +
long⟩⟨insert(\firstacronymfont{abbrv}) +
+ while subsequent use displays the entry as: +
\acronymfont{abbrv}insert +
+ where \acronymfont is set to \textsc{#1}. +

Note that since the acronym is displayed using \textsc, the short form, abbrv, + should be specified in lower case.
+

+

+smaller
If neither the footnote nor description options have been set, this option + displays the entry on first use as: +
long⟩⟨insert(\firstacronymfont{abbrv}) +
+ while subsequent use displays the entry as: +
\acronymfont{abbrv}insert +
+ where \acronymfont is set to + \textsmaller{#1}.16 + The entries will be sorted according to the short form. +

Remember to load a package that defines \textsmaller (such as relsize) if you + want to use this option, unless you want to redefine \acronymfont to use some + other formatting command.
+

+ + + +

+None of the above
If none of the package options smallcaps, smaller, footnote, + dua or description are used, then on first use the entry is displayed as: + +
long(abbrv)insert +
+ while subsequent use displays the entry as: +
abbrv⟩⟨insert +
+ Entries will be sorted according to the short form.
+

+

+

Top

13.2 Displaying the List of Acronyms

+

The list of acronyms is just like any other type of glossary and can be displayed on its +own using \printglossary[type=\acronymtype] or with all the other glossaries +using \printglossaries. However, care must be taken to choose a glossary +style that’s appropriate to your acronym style. The different acronym-related +package options store different information in the name, description and symbol +keys. +

Table 6 lists the package options that govern the acronym styles and how the +information is stored in the keys used when displaying the glossary. Note that the +description package option uses the following command in the name: +


\acrnameformat  \acrnameformat{abbrv}{long}

+

+This defaults to just \acronymfont{abbrv}. +

For example, if I use the package options description and footnote, then the name +field will contain the abbreviation and the symbol field will contain the long form. If I +then use the long4col style, each entry in the list of acronyms will appear in the form: + +
\acronymfont{abbrv} description⟩⟨long +
location list +
+Alternatively, you can define your own custom style (see §16 Defining your own glossary +style for further details). +

+
+ + + +


+ + + +
Table 6: Package options governing \newacronym and how the information is +stored
+
+

+

+
+ + + + + + + +
Package Optionname description symbol
description,footnote\acronymfont{abbrv} user suppliedlong
description,dua longuser suppliedabbrv
description \acrnameformat{abbrv}{long}user suppliedabbrv
footnote \acronymfont{abbrv} long
smallcaps \acronymfont{abbrv} longabbrv
smaller \acronymfont{abbrv} longabbrv
dua abbrvlongabbrv
None of the above abbrvlong
+
+ + + +

+
+

Top

13.3 Defining A Custom Acronym Style

+

You may find that the predefined acronyms styles that come with the glossaries package +don’t suit your requirements. In this case you can define your own style. This is done by +redefining the following commands: +


\CustomAcronymFields  \CustomAcronymFields

+

+This command sets up the keys for \newglossaryentry when you define an acronym +using \newacronym. Within the definition of \CustomAcronymFields, you may use +\the\glslongtok to access the long form, \the\glsshorttok to access the short form +and \the\glslabeltok to access the label. This command is typically used to set the +name, first, firstplural, text and plural keys. It may also be used to set the symbol or +description keys depending on your requirements. +


\SetCustomDisplayStyle  \SetCustomDisplayStyle{type}

+

+This is used to set up the display style for the glossary given by type. This should +typically just use \defglsdisplayfirst and \defglsdisplay. +

Once you have redefined \CustomAcronymFields and \SetCustomDisplayStyle, +you must then switch to this style using +


\SetCustomStyle  \SetCustomStyle

+

+Note that you may still use the shortcuts package option with your custom +style. +

If you omit \SetCustomStyle, or use it before you redefine \CustomAcronymFields +and \SetCustomDisplayStyle, your new style won’t be correctly implemented. You +must set up the custom style before defining new acronyms. The acronyms must be +defined using \newacronym not \newglossaryentry.
+

+

As an example, suppose I want my acronym on first use to have the short form in +the text and the long form with the description in a footnote. Suppose also that I want +the short form to be put in small caps in the main body of the document, but I +want it in normal capitals in the list of acronyms. In my list of acronyms, +I want the long form as the name with the short form in brackets followed +by the description. That is, in the text I want \gls on first use to display: + +
\textsc{abbrv}\footnote{long: description} +
+on subsequent use: +
\textsc{abbrv} +
+and in the list of acronyms, each entry will be displayed in the form: + + + +
long(short) description +
+

First, I need to redefine \CustomAcronymFields so that \newacronym will correctly +set the name, text and plural keys. I want the long form to be stored in the +name and the short form to be stored in text. In addition, I’m going to set the +symbol to the short form in upper case so that it will appear in the list of +acronyms. + + + +

+
+\renewcommand*{\CustomAcronymFields}{% + 
  name={\the\glslongtok},% + 
  symbol={\MakeUppercase{\the\glsshorttok}},% + 
  text={\textsc{\the\glsshorttok}},% + 
  plural={\textsc{\the\glsshorttok}\noexpand\acrpluralsuffix}% + 
} +
+

+

When using \newacronym, the short and long forms are stored in the short and long +keys, and the plural forms are stored in shortplural and longplural. So when I use +\defglsdisplayfirst and \defglsdisplay, I can use \glsentrylong to access the +long form. Recall from §6.1 Changing the format of the link text, that the optional +argument to \defglsdisplayfirst and \defglsdisplay indicates the glossary +type. This is passed to \SetCustomDisplayStyle. The mandatory argument +sets up the definition of \glsdisplayfirst and \glsdisplay for the given +glossary, where the first argument corresponds to the first, firstplural, text or +plural, as appropriate, the second argument corresponds to the description, +the third corresponds to the symbol and the fourth argument is the inserted +text. + + + +

+
+\renewcommand*{\SetCustomDisplayStyle}[1]{% + 
  \defglsdisplayfirst[#1]{##1##4\protect\footnote{% + 
    \glsentrylong{\glslabel}: ##2% + 
  }} + 
  \defglsdisplay[#1]{##1##4}% + 
} +
+

+

Since we have a definition inside a definition, #1 refers to the argument of +\SetCustomDisplayStyle, and ##1, …, ##4, refer to the arguments of \glsdisplayfirst +and \glsdisplay. +

Now that I’ve redefined \CustomAcronymFields and \SetCustomDisplayStyle, I +can set this style using + + + +

+
+\SetCustomStyle +
+

and now I can define my acronyms: + + + +

+
+\newacronym[description={set of tags for use in developing hypertext + 
documents}]{html}{html}{Hyper Text Markup Language} + 
\newacronym[description={language used to describe the layout of a + 
document written in a markup language}]{css}{css}{Cascading Style + 
Sheet} +
+

+

Note that since I’ve used the description in the main body of the text, I need to +switch off the sanitization otherwise any commands within the description won’t get +interpreted. Also I want to use the hyperref package, but this will cause a problem on +first use as I’ll get nested hyperlinks, so I need to switch off the hyperlinks on first use. +In addition, I want to use a glossary style that displays the symbol. Therefore, in my +preamble I have: + + + +

+
+\usepackage[colorlinks]{hyperref} + 
\usepackage[acronym,         % create list of acronyms + 
            nomain,          % don’t need main glossary for this example + 
            style=tree,      % need a style that displays the symbol + 
            hyperfirst=false,% don’t hyperlink first use + 
            sanitize=none    % switch off sanitization as description + 
                             % will be used in the main text + 
            ]{glossaries} +
+

+

Note that I haven’t used the description or footnote package options. +

+

+

Top

13.4 Upgrading From the glossary Package

+

Users of the obsolete glossary package may recall that the syntax used to define new +acronyms has changed with the replacement glossaries package. In addition, the old +glossary package created the command \acr-namewhen defining the acronym +acr-name. +

In order to facilitate migrating from the old package to the new one, the glossaries +package17 +provides the command: +


\oldacronym  \oldacronym[label]{abbrv}{long}{key-val list}

+

+This uses the same syntax as the glossary package’s method of defining acronyms. It is +equivalent to:
\newacronym[key-val list]{label}{abbrv}{long}
In addition, \oldacronym also defines the commands \label, which is equivalent to +\gls{label}, and \label*, which is equivalent to \Gls{label}. If labelis omitted, +abbrvis used. Since commands names must consist only of alphabetical characters, +labelmust also only consist of alphabetical characters. Note that \labeldoesn’t +allow you to use the first optional argument of \gls or \Gls — you will need to +explicitly use \gls or \Gls to change the settings. +

Recall that, in general, LATEX ignores spaces following command names +consisting of alphabetical characters. This is also true for \labelunless you +additionally load the xspace package.
+

+ + + +

The glossaries package doesn’t load the xspace package since there are both +advantages and disadvantages to using \xspace in \label. If you don’t use the xspace +package you need to explicitly force a space using \␣ (backslash space) however you can +follow \labelwith additional text in square brackets (the final optional argument to +\gls). If you use the xspace package you don’t need to escape the spaces but you +can’t use the optional argument to insert text (you will have to explicitly use +\gls). +

To illustrate this, suppose I define the acronym “abc” as follows: + + + +

+
+\oldacronym{abc}{example acronym}{} +
+

This will create the command \abc and its starred version \abc*. Table 7 illustrates +the effect of \abc (on subsequent use) according to whether or not the xspace package +has been loaded. As can be seen from the final row in the table, the xspace package +prevents the optional argument from being recognised. +

+
+ + + +


+ + + +
Table 7: The effect of using xspace with \oldacronym
+
+ + + + +
Code With xspaceWithout xspace
\abc. abc. abc.
\abc xyz abc xyz abcxyz
\abc\ xyz abc xyz abc xyz
\abc* xyz Abc xyz Abc xyz
\abc[’s] xyzabc [’s] xyz abc’s xyz
+
+ + + +

+
+

Top

14 Unsetting and Resetting Entry Flags

+

When using \gls, \glspl and their uppercase variants it is possible that you may want +to use the value given by the first key, even though you have already used the glossary +entry. Conversely, you may want to use the value given by the text key, even though you +haven’t used the glossary entry. The former can be achieved by one of the following +commands: +


\glsreset  \glsreset{label}

+

+


\glslocalreset  \glslocalreset{label}

+

+while the latter can be achieved by one of the following commands: +


\glsunset  \glsunset{label}

+

+


\glslocalunset  \glslocalunset{label}

+

+You can also reset or unset all entries for a given glossary or list of glossaries +using: +


\glsresetall  \glsresetall[glossary list]

+

+


\glslocalresetall  \glslocalresetall[glossary list]

+

+


\glsunsetall  \glsunsetall[glossary list]

+

+


\glslocalunsetall  \glslocalunsetall[glossary list]

+

+where glossary listis a comma-separated list of glossary labels. If omitted, all defined +glossaries are assumed. For example, to reset all entries in the main glossary and the list +of acronyms: + + + +

+
+\glsresetall[main,acronym] +
+

+

You can determine whether an entry’s first use flag is set using: +


\ifglsused  \ifglsused{label}{true part}{false part}

+

+where labelis the label of the required entry. If the entry has been used, true part +will be done, otherwise false partwill be done. +

+

+

Top

15 Glossary Styles

+

The glossaries package comes with some pre-defined glossary styles. Note that the styles +are suited to different types of glossaries: some styles ignore the associated symbol; +some styles are not designed for hierarchical entries, so they display sub-entries in the +same way as they display top level entries; some styles are designed for homographs, so +they ignore the name for sub-entries. You should therefore pick a style that suits your +type of glossary. See table 8 for a summary of the available styles. The predefined styles +can accommodate numbered level 0 (main) and level 1 entries. See the package options +entrycounter, counterwithin and subentrycounter described in §2.3 Glossary Appearance +Options. +

+
+ + + +


+ + + +
Table 8: Glossary Styles. An asterisk in the style name indicates anything that +matches that doesn’t match any previously listed style (e.g. long3col* matches +long3col, long3colheader, long3colborder and long3colheaderborder). A maximum +level of 0 indicates a flat glossary (sub-entries are displayed in the same way as +main entries). Where the maximum level is given as — there is no limit, but +note that makeindex imposes a limit of 2 sub-levels. If the homograph column is +checked, then the name is not displayed for sub-entries. If the symbol column is +checked, then the symbol will be displayed.
+
+ + + + + + + + + + + + +
Style Maximum LevelHomographSymbol
listdotted 0
sublistdotted 1
list* 1
altlist* 1 +
long*3col* 1 +
long4col* 1
altlong*4col* 1
long* 1
super*3col* 1
super4col* 1
altsuper*4col* 1
super* 1
index* 2
treenoname*
tree*
alttree*
+ + + +

+
+

The glossary style can be set using the style key in the optional argument to +\printglossary or using the command: +


\glossarystyle  \glossarystyle{style-name}

+

+Some of the glossary styles may also be set using the style package option, it depends if +the package in which they are defined is automatically loaded by the glossaries +package. +

The tabular-like styles that allow multi-line descriptions and page lists use the +length \glsdescwidth \glsdescwidth to set the width of the description column and +the length \glspagelistwidth \glspagelistwidth to set the width of the page list +column.18 +These will need to be changed using \setlength if the glossary is too wide. Note that +the long4col and super4col styles (and their header and border variations) don’t use +these lengths as they are designed for single line entries. Instead you should use the +analogous altlong4col and altsuper4col styles. If you want to explicitly create a line-break +within a multi-line description in a tabular-like style you should use \newline instead +of \\. +

Note that if you use the style key in the optional argument to \printglossary, it +will override any previous style settings for the given glossary, so if, for example, you +do + + + +

+
+\renewcommand*{\glsgroupskip}{} + 
\printglossary[style=long] +
+

then the new definition of \glsgroupskip will not have an affect for this glossary, as +\glsgroupskip is redefined by style=long. Likewise, \glossarystyle will also +override any previous style definitions, so, again + + + +

+
+\renewcommand*{\glsgroupskip}{} + 
\glossarystyle{long} +
+

will reset \glsgroupskip back to its default definition for the named glossary style +(long in this case). If you want to modify the styles, either use \newglossarystyle +(described in the next section) or make the modifications after \glossarystyle, +e.g.: + + + +

+
+\glossarystyle{long} + 
\renewcommand*{\glsgroupskip}{} +
+

+

All the styles except for the three- and four-column styles and the listdotted style use +the command +


\glspostdescription  \glspostdescription

+

+after the description. This simply displays a full stop by default. To eliminate this +full stop (or replace it with something else, say, a comma) you will need to +redefine \glspostdescription before the glossary is displayed. Alternatively, +you can suppress it for a given entry by placing \nopostdesc in the entry’s +description. +

+

Top

15.1 List Styles

+

The styles described in this section are all defined in the package glossary-list. Since they +all use the description environment, they are governed by the same parameters as that +environment. These styles all ignore the entry’s symbol. Note that these styles +will automatically be available unless you use the nolist or nostyles package +options. +

+

+list
The list style uses the description environment. The entry name is placed in + the optional argument of the \item command (so it will appear in bold by + default). The description follows, and then the associated number list for that + entry. The symbol is ignored. If the entry has child entries, the description + and number list follows (but not the name) for each child entry. Groups are + separated using \indexspace. +
+listgroup
The listgroup style is like list but the glossary groups have headings. +
+listhypergroup
The listhypergroup style is like listgroup but has a navigation line at + the start of the glossary with links to each group that is present in the glossary. + This requires an additional run through LATEX to ensure the group + information is up to date. In the navigation line, each group is separated + by +


\glshypernavsep  \glshypernavsep

+ + + +

+ which defaults to a vertical bar with a space on either side. For example, to + simply have a space separating each group, do: + + + +

+
+ \renewcommand*{\glshypernavsep}{\space} +
+

+

Note that the hyper-navigation line is now (as from version 1.14) set inside the + optional argument to \item instead of after it to prevent a spurious + space at the start. This can be changed by redefining \glossaryheader, + but note that this needs to be done after the glossary style has been + set. +

+altlist
The altlist style is like list but the description starts on the line following the + name. (As with the list style, the symbol is ignored.) Each child entry starts a new + line, but as with the list style, the name associated with each child entry is + ignored. +
+altlistgroup
The altlistgroup style is like altlist but the glossary groups have + headings. +
+altlisthypergroup
The altlisthypergroup style is like altlistgroup but has a set of links + to the glossary groups. The navigation line is the same as that for listhypergroup, + described above. +
+listdotted
This style uses the description + environment.19 + Each entry starts with \item[], followed by the name followed by a dotted line, + followed by the description. Note that this style ignores both the number list and + the symbol. The length +


\glslistdottedwidth  \glslistdottedwidth

+

+ governs where the description should start. This is a flat style, so child entries are + formatted in the same way as the parent entries. +

+sublistdotted
This is a variation on the listdotted style designed for hierarchical + glossaries. The main entries have just the name displayed. The sub entries are + displayed in the same manner as listdotted.
+ + + +

+

+

Top

15.2 Longtable Styles

+

The styles described in this section are all defined in the package glossary-long. Since +they all use the longtable environment, they are governed by the same parameters +as that environment. Note that these styles will automatically be available +unless you use the nolong or nostyles package options. These styles fully justify +the description and page list columns. If you want ragged right formatting +instead, use the analogous styles described in §15.3 Longtable Styles (Ragged +Right). +

+

+long
The long style uses the longtable environment (defined by the longtable + package). It has two columns: the first column contains the entry’s name and + the second column contains the description followed by the number list. The + entry’s symbol is ignored. Sub groups are separated with a blank row. The + width of the first column is governed by the widest entry in that column. + The width of the second column is governed by the length \glsdescwidth. + Child entries have a similar format to the parent entries except that their + name is suppressed. +
+longborder
The longborder style is like long but has horizontal and vertical lines + around it. +
+longheader
The longheader style is like long but has a header row. +
+longheaderborder
The longheaderborder style is like longheader but has + horizontal and vertical lines around it. +
+long3col
The long3col style is like long but has three columns. The first column + contains the entry’s name, the second column contains the description and + the third column contains the number list. The entry’s symbol is ignored. The + width of the first column is governed by the widest entry in that column, the + width of the second column is governed by the length \glsdescwidth, and + the width of the third column is governed by the length \glspagelistwidth. +
+long3colborder
The long3colborder style is like the long3col style but has + horizontal and vertical lines around it. +
+long3colheader
The long3colheader style is like long3col but has a header row. + + + +
+long3colheaderborder
The long3colheaderborder style is like long3colheader but + has horizontal and vertical lines around it. +
+long4col
The long4col style is like long3col but has an additional column in which + the entry’s associated symbol appears. This style is used for brief single line + descriptions. The column widths are governed by the widest entry in the + given column. Use altlong4col for multi-line descriptions. +
+long4colborder
The long4colborder style is like the long4col style but has + horizontal and vertical lines around it. +
+long4colheader
The long4colheader style is like long4col but has a header row. +
+long4colheaderborder
The long4colheaderborder style is like long4colheader but + has horizontal and vertical lines around it. +
+altlong4col
The altlong4col style is like long4col but allows multi-line descriptions + and page lists. The width of the description column is governed by the length + \glsdescwidth and the width of the page list column is governed by the + length \glspagelistwidth. The widths of the name and symbol columns + are governed by the widest entry in the given column. +
+altlong4colborder
The altlong4colborder style is like the long4colborder but + allows multi-line descriptions and page lists. +
+altlong4colheader
The altlong4colheader style is like long4colheader but allows + multi-line descriptions and page lists. +
+altlong4colheaderborder
The altlong4colheaderborder + style is like long4colheaderborder but allows multi-line descriptions and page + lists.
+

+

+

Top

15.3 Longtable Styles (Ragged Right)

+ + + +

The styles described in this section are all defined in the package glossary-longragged. +These styles are analogous to those defined in glossary-long but the multiline +columns are left justified instead of fully justified. Since these styles all use +the longtable environment, they are governed by the same parameters as that +environment. The glossary-longragged package additionally requires the array +package. Note that these styles will only be available if you explicitly load +glossary-longragged: + + + +

+
+\usepackage{glossaries} + 
\usepackage{glossary-longragged} +
+

Note that you can’t set these styles using the style package option since the styles +aren’t defined until after the glossaries package has been loaded. +

+

+longragged
The longragged style has two columns: the first column contains the + entry’s name and the second column contains the (left-justified) description + followed by the number list. The entry’s symbol is ignored. Sub groups are + separated with a blank row. The width of the first column is governed by the + widest entry in that column. The width of the second column is governed by + the length \glsdescwidth. Child entries have a similar format to the parent + entries except that their name is suppressed. +
+longraggedborder
The longraggedborder style is like longragged but has + horizontal and vertical lines around it. +
+longraggedheader
The longraggedheader style is like longragged but has a header + row. +
+longraggedheaderborder
The + longraggedheaderborder style is like longraggedheader but has horizontal and + vertical lines around it. +
+longragged3col
The longragged3col style is like longragged but has three + columns. The first column contains the entry’s name, the second column + contains the (left justified) description and the third column contains the + (left justified) number list. The entry’s symbol is ignored. The width of the + first column is governed by the widest entry in that column, the width of + the second column is governed by the length \glsdescwidth, and the width + of the third column is governed by the length \glspagelistwidth. +
+longragged3colborder
The longragged3colborder style is like the longragged3col + style but has horizontal and vertical lines around it. +
+longragged3colheader
The longragged3colheader style is like longragged3col but + has a header row. + + + +
+longragged3colheaderborder
The longragged3colheaderborder style is like + longragged3colheader but has horizontal and vertical lines around it. +
+altlongragged4col
The altlongragged4col style is like longragged3col but has an + additional column in which the entry’s associated symbol appears. The width + of the description column is governed by the length \glsdescwidth and the + width of the page list column is governed by the length \glspagelistwidth. + The widths of the name and symbol columns are governed by the widest + entry in the given column. +
+altlongragged4colborder
The + altlongragged4colborder style is like the altlongragged4col but has horizontal + and vertical lines around it. +
+altlongragged4colheader
The altlongragged4colheader style is like + altlongragged4col but has a header row. +
+altlongragged4colheaderborder
The altlongragged4colheaderborder style is like + altlongragged4colheader but has horizontal and vertical lines around it. +
+

+

+

Top

15.4 Supertabular Styles

+

The styles described in this section are all defined in the package glossary-super. Since +they all use the supertabular environment, they are governed by the same parameters +as that environment. Note that these styles will automatically be available +unless you use the nosuper or nostyles package options. In general, the longtable +environment is better, but there are some circumstances where it is better to use +supertabular.20 +These styles fully justify the description and page list columns. If you want ragged right +formatting instead, use the analogous styles described in §15.5 Supertabular Styles +(Ragged Right). +

+

+super
The super style uses the supertabular environment (defined by the + supertabular package). It has two columns: the first column contains the + entry’s name and the second column contains the description followed by the + number list. The entry’s symbol is ignored. Sub groups are separated with + + + + a blank row. The width of the first column is governed by the widest entry + in that column. The width of the second column is governed by the length + \glsdescwidth. Child entries have a similar format to the parent entries + except that their name is suppressed. +
+superborder
The superborder style is like super but has horizontal and vertical + lines around it. +
+superheader
The superheader style is like super but has a header row. +
+superheaderborder
The superheaderborder style is like superheader but has + horizontal and vertical lines around it. +
+super3col
The super3col style is like super but has three columns. The + first column contains the entry’s name, the second column contains the + description and the third column contains the number list. The entry’s + symbol is ignored. The width of the first column is governed by the widest + entry in that column. The width of the second column is governed by the + length \glsdescwidth. The width of the third column is governed by the + length \glspagelistwidth. +
+super3colborder
The super3colborder style is like the super3col style but has + horizontal and vertical lines around it. +
+super3colheader
The super3colheader style is like super3col but has a header + row. +
+super3colheaderborder
The super3colheaderborder style is like super3colheader + but has horizontal and vertical lines around it. +
+super4col
The super4col style is like super3col but has an additional column in + which the entry’s associated symbol appears. This style is designed for entries + with brief single line descriptions. The column widths are governed by the + widest entry in the given column. Use altsuper4col for multi-line descriptions. +
+super4colborder
The super4colborder style is like the super4col style but has + horizontal and vertical lines around it. +
+super4colheader
The super4colheader style is like super4col but has a header + row. + + + +
+super4colheaderborder
The super4colheaderborder style is like super4colheader + but has horizontal and vertical lines around it. +
+altsuper4col
The altsuper4col style is like super4col but allows multi-line + descriptions and page lists. The width of the description column is governed + by the length \glsdescwidth and the width of the page list column is + governed by the length \glspagelistwidth. The width of the name and + symbol columns is governed by the widest entry in the given column. +
+altsuper4colborder
The altsuper4colborder style is like the super4colborder style + but allows multi-line descriptions and page lists. +
+altsuper4colheader
The altsuper4colheader style is like super4colheader but + allows multi-line descriptions and page lists. +
+altsuper4colheaderborder
The altsuper4colheaderborder style is like + super4colheaderborder but allows multi-line descriptions and page lists.
+

+

+

Top

15.5 Supertabular Styles (Ragged Right)

+

The styles described in this section are all defined in the package glossary-superragged. +These styles are analogous to those defined in glossary-super but the multiline +columns are left justified instead of fully justified. Since these styles all use the +supertabular environment, they are governed by the same parameters as that +environment. The glossary-superragged package additionally requires the array +package. Note that these styles will only be available if you explicitly load +glossary-superragged: + + + +

+
+\usepackage{glossaries} + 
\usepackage{glossary-superragged} +
+

Note that you can’t set these styles using the style package option since the styles +aren’t defined until after the glossaries package has been loaded. +

+

+superragged
The superragged style uses the supertabular environment (defined by + the supertabular package). It has two columns: the first column contains the + entry’s name and the second column contains the (left justified) description + followed by the number list. The entry’s symbol is ignored. Sub groups are + separated with a blank row. The width of the first column is governed by the + widest entry in that column. The width of the second column is governed by + the length \glsdescwidth. Child entries have a similar format to the parent + entries except that their name is suppressed. +
+superraggedborder
The superraggedborder style is like superragged but has + horizontal and vertical lines around it. +
+superraggedheader
The superraggedheader style is like superragged but has a + header row. +
+superraggedheaderborder
The superraggedheaderborder style is like + superraggedheader but has horizontal and vertical lines around it. +
+superragged3col
The superragged3col style is like superragged but has three + columns. The first column contains the entry’s name, the second column + contains the (left justified) description and the third column contains the + (left justified) number list. The entry’s symbol is ignored. The width of the + first column is governed by the widest entry in that column. The width of + the second column is governed by the length \glsdescwidth. The width of + the third column is governed by the length \glspagelistwidth. +
+superragged3colborder
The superragged3colborder style + is like the superragged3col style but has horizontal and vertical lines around + it. + + + +
+superragged3colheader
The superragged3colheader style is like superragged3col + but has a header row. +
+superragged3colheaderborder
The superragged3colheaderborder style is like + superragged3colheader but has horizontal and vertical lines around it. +
+altsuperragged4col
The altsuperragged4col style is like superragged3col but has + an additional column in which the entry’s associated symbol appears. The + column widths for the name and symbol column are governed by the widest + entry in the given column. +
+altsuperragged4colborder
The altsuperragged4colborder style is like the + altsuperragged4col style but has horizontal and vertical lines around it. +
+altsuperragged4colheader
The altsuperragged4colheader style is like + altsuperragged4col but has a header row. +
+altsuperragged4colheaderborder
The altsuperragged4colheaderborder style is + like altsuperragged4colheader but has horizontal and vertical lines around it. +
+

+

+

Top

15.6 Tree-Like Styles

+

The styles described in this section are all defined in the package glossary-tree. These +styles are designed for hierarchical glossaries but can also be used with glossaries that +don’t have sub-entries. These styles will display the entry’s symbol if it exists. Note that +these styles will automatically be available unless you use the notree or nostyles package +options. +

+

+index
The index style is similar to the way indices are usually formatted in that + it has a hierarchical structure up to three levels (the main level plus two + sub-levels). The name is typeset in bold, and if the symbol is present it is + set in parentheses after the name and before the description. Sub-entries are + indented and also include the name, the symbol in brackets (if present) and + the description. Groups are separated using \indexspace. + + + +
+indexgroup
The indexgroup style is similar to the index style except that each + group has a heading. +
+indexhypergroup
The indexhypergroup style is like indexgroup but has a set of + links to the glossary groups. The navigation line is the same as that for + listhypergroup, described above. +
+tree
The tree style is similar to the index style except that it can have arbitrary + levels. (Note that makeindex is limited to three levels, so you will need to + use xindy if you want more than three levels.) Each sub-level is indented by + \glstreeindent \glstreeindent. Note that the name, symbol (if present) + and description are placed in the same paragraph block. If you want the + name to be apart from the description, use the alttree style instead. (See + below.) +
+treegroup
The treegroup style is similar to the tree style except that each group + has a heading. +
+treehypergroup
The treehypergroup style is like treegroup but has a set of links to + the glossary groups. The navigation line is the same as that for listhypergroup, + described above. +
+treenoname
The treenoname style is like the tree style except that the name for + each sub-entry is ignored. +
+treenonamegroup
The treenonamegroup style is similar to the treenoname style + except that each group has a heading. +
+treenonamehypergroup
The treenonamehypergroup + style is like treenonamegroup but has a set of links to the glossary groups. + The navigation line is the same as that for listhypergroup, described above. +
+alttree
The alttree style is similar to the tree style except that the indentation for each + level is determined by the width of the text specified by +


\glssetwidest  \glssetwidest[level]{text}

+

+ The optional argument levelindicates the level, where 0 indicates the top-most + level, 1 indicates the first level sub-entries, etc. If \glssetwidest hasn’t been + used for a given sub-level, the level 0 widest text is used instead. If levelis + omitted, 0 is assumed. + + + +

For each level, the name is placed to the left of the paragraph block containing the + symbol (optional) and the description. If the symbol is present, it is placed in + parentheses before the description. +

+alttreegroup
The alttreegroup is like the alttree style except that each group has a + heading. +
+alttreehypergroup
The alttreehypergroup style is like alttreegroup but has a set of + links to the glossary groups. The navigation line is the same as that for + listhypergroup, described above. +
+

+

+

Top

16 Defining your own glossary style

+

If the predefined styles don’t fit your requirements, you can define your own style +using: +


\newglossarystyle  \newglossarystyle{name}{definitions}

+

+where nameis the name of the new glossary style (to be used in \glossarystyle). +The second argument definitionsneeds to redefine all of the following: +


theglossary  theglossary

+

+This environment defines how the main body of the glossary should be typeset. Note +that this does not include the section heading, the glossary preamble (defined by +\glossarypreamble) or the glossary postamble (defined by \glossarypostamble). For +example, the list style uses the description environment, so the theglossary environment +is simply redefined to begin and end the description environment. +


\glossaryheader  \glossaryheader

+

+This macro indicates what to do at the start of the main body of the glossary. Note +that this is not the same as \glossarypreamble, which should not be affected by +changes in the glossary style. The list glossary style redefines \glossaryheader to do +nothing, whereas the longheader glossary style redefines \glossaryheader to do a +header row. +


\glsgroupheading  \glsgroupheading{label}

+

+This macro indicates what to do at the start of each logical block within the main body +of the glossary. If you use makeindex the glossary is sub-divided into a maximum of +twenty-eight logical blocks that are determined by the first character of the sort key (or +name key if the sort key is omitted). The sub-divisions are in the following order: +symbols, numbers, A, …, Z. If you use xindy, the sub-divisions depend on the language + + + +settings. +

Note that the argument to \glsgroupheading is a label not the group title. The +group title can be obtained via +


\glsgetgrouptitle  \glsgetgrouptitle{label}

+

+This obtains the title as follows: if \labelgroupname exists, this is taken to be the title, +otherwise the title is just label. +

A navigation hypertarget can be created using +


\glsnavhypertarget  \glsnavhypertarget{label}{text}

+

+For further details about \glsnavhypertarget, see the documented code +(glossaries.pdf). +

Most of the predefined glossary styles redefine \glsgroupheading to simply +ignore its argument. The listhypergroup style redefines \glsgroupheading as +follows: + + + +

+
+\renewcommand*{\glsgroupheading}[1]{% + 
\item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]} +
+

See also \glsgroupskip below. (Note that command definitions within +\newglossarystyle must use ##1 instead of #1 etc.) +


\glsgroupskip  \glsgroupskip

+

+This macro determines what to do after one logical group but before the header for the +next logical group. The list glossary style simply redefines \glsgroupskip to be +\indexspace, whereas the tabular-like styles redefine \glsgroupskip to produce a +blank row. +


\glossaryentryfield  \glossaryentryfield{label}{formatted name}{description} +{symbol}{number list}

+

+This macro indicates what to do for a given glossary entry. Note that formatted name +will always be in the form \glsnamefont{name}. This allows the user to set a given +font for the entry name, regardless of the glossary style used. Note that labelis the +label used when the glossary entry was defined via either \newglossaryentry or +\newacronym. +


\glsentryitem  \glsentryitem{label}

+

+This macro will increment and display the associated counter for the main (level 0) +entries if the entrycounter or counterwithin package options have been used. This macro +is typically called by \glossaryentryfield before \glstarget. The format of the +counter is controlled by the macro +


\glsentrycounterlabel  \glsentrycounterlabel

+

+

Each time you use a glossary entry it creates a hyperlink (if hyperlinks are enabled) +to the relevant line in the glossary. Your new glossary style must therefore +redefine \glossaryentryfield to set the appropriate target. This is done +using +


\glstarget  \glstarget{label}{text}

+

+where labelis the entry’s label. Note that you don’t need to worry about whether the +hyperref package has been loaded, as \glstarget won’t create a target if \hypertarget +hasn’t been defined. +

For example, the list style defines \glossaryentryfield as follows: + + + +

+
+\renewcommand*{\glossaryentryfield}[5]{% + 
\item[\glsentryitem{##1}\glstarget{##1}{##2}] + 
  ##3\glspostdescription \space ##5} +
+

+

Note also that number listwill always be of the form
+


\glossaryentrynumbers{\relax
\setentrycounter[Hprefix]{counter name}format cmd{number(s)}} +

+

+where number(s)may contain \delimN (to delimit individual numbers) and/or +\delimR (to indicate a range of numbers). There may be multiple occurrences of +\setentrycounter[Hprefix]{counter name}format cmd{number(s)}, +but note that the entire number list is enclosed within the argument of +\glossaryentrynumbers. The user can redefine this to change the way the entire +number list is formatted, regardless of the glossary style. However the most common use +of \glossaryentrynumbers is to provide a means of suppressing the number list +altogether. (In fact, the nonumberlist option redefines \glossaryentrynumbers to +ignore its argument.) Therefore, when you define a new glossary style, you don’t +need to worry about whether the user has specified the nonumberlist package +option. +


\glossarysubentryfield  \glossarysubentryfield{level}{label}{formatted +name} {description}{symbol}{number list}

+

+This is new to version 1.17, and is used to display sub-entries. The first argument, +level, indicates the sub-entry level. This must be an integer from 1 (first sub-level) +onwards. The remaining arguments are analogous to those for \glossaryentryfield +described above. +


\glssubentryitem  \glssubentryitem{label}

+

+This macro will increment and display the associated counter for the level 1 entries if +the subentrycounter package options have been used. This macro is typically called by +\glossarysubentryfield before \glstarget. The format of the counter is controlled +by the macro +


\glssubentrycounterlabel  \glssubentrycounterlabel

+

+

Note that \printglossary (which \printglossaries calls) sets +


\currentglossary  \currentglossary

+

+to the current glossary label, so it’s possible to create a glossary style that varies + + + +according to the glossary type. +

For further details of these commands, see “Displaying the glossary” in the +documented code (glossaries.pdf). +

+

+

Top

16.1 Example: creating a completely new style

+

If you want a completely new style, you will need to redefine all of the commands and +the environment listed above. +

For example, suppose you want each entry to start with a bullet point. This means +that the glossary should be placed in the itemize environment, so theglossary should +start and end that environment. Let’s also suppose that you don’t want anything +between the glossary groups (so \glsgroupheading and \glsgroupskip should do +nothing) and suppose you don’t want anything to appear immediately after +\begin{theglossary} (so \glossaryheader should do nothing). In addition, let’s +suppose the symbol should appear in brackets after the name, followed by the +description and last of all the number list should appear within square brackets at +the end. Then you can create this new glossary style, called, say, mylist, as +follows: + + + +

+
+ \newglossarystyle{mylist}{% + 
 % put the glossary in the itemize environment: + 
 \renewenvironment{theglossary}{\begin{itemize}}{\end{itemize}}% + 
 % have nothing after \begin{theglossary}: + 
 \renewcommand*{\glossaryheader}{}% + 
 % have nothing between glossary groups: + 
 \renewcommand*{\glsgroupheading}[1]{}% + 
 \renewcommand*{\glsgroupskip}{}% + 
 % set how each entry should appear: + 
 \renewcommand*{\glossaryentryfield}[5]{% + 
 \item % bullet point + 
 \glstarget{##1}{##2}% the entry name + 
 \space (##4)% the symbol in brackets + 
 \space ##3% the description + 
 \space [##5]% the number list in square brackets + 
 }% + 
 % set how sub-entries appear: + 
 \renewcommand*{\glossarysubentryfield}[6]{% + 
   \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% + 
 } +
+

Note that this style creates a flat glossary, where sub-entries are displayed in exactly +the same way as the top level entries. It also hasn’t used \glsentryitem or +\glssubentryitem so it won’t be affected by the entrycounter, counterwithin or +subentrycounter package options. +

+

+

Top

16.2 Example: creating a new glossary style based on an existing style

+

If you want to define a new style that is a slightly modified version of an existing style, +you can use \glossarystyle within the second argument of \newglossarystyle +followed by whatever alterations you require. For example, suppose you want a style like +the list style but you don’t want the extra vertical space created by \indexspace +between groups, then you can create a new glossary style called, say, mylist as +follows: + + + +

+
+\newglossarystyle{mylist}{% + 
\glossarystyle{list}% base this style on the list style + 
\renewcommand{\glsgroupskip}{}% make nothing happen between groups + 
} +
+

+

+

+

Top

16.3 Example: creating a glossary style that uses the user1, …, user6 +keys

+

Since \glossaryentryfield and \glossarysubentryfield provide the label for the +entry, it’s also possible to access the values of the generic user keys, such as user1. For +example, suppose each entry not only has an associated symbol, but also units (stored +in user1) and dimension (stored in user2). Then you can define a glossary style that +displays each entry in a longtable as follows: + + + +

+
+\newglossarystyle{long6col}{% + 
 % put the glossary in a longtable environment: + 
 \renewenvironment{theglossary}% + 
  {\begin{longtable}{lp{\glsdescwidth}cccp{\glspagelistwidth}}}% + 
  {\end{longtable}}% + 
 % Set the table’s header: + 
 \renewcommand*{\glossaryheader}{% + 
  \bfseries Term & \bfseries Description & \bfseries Symbol & + 
  \bfseries Units & \bfseries Dimensions & \bfseries Page List + 
  \\\endhead}% + 
 % No heading between groups: + 
  \renewcommand*{\glsgroupheading}[1]{}% + 
 % Main (level 0) entries displayed in a row optionally numbered: + 
  \renewcommand*{\glossaryentryfield}[5]{% + 
    \glsentryitem{##1}% Entry number if required + 
    \glstarget{##1}{##2}% Name + 
    & ##3% Description + 
    & ##4% Symbol + 
    & \glsentryuseri{##1}% Units + 
    & \glsentryuserii{##1}% Dimensions + 
    & ##5% Page list + 
    \\% end of row + 
  }% + 
 % Similarly for sub-entries (no sub-entry numbers): + 
 \renewcommand*{\glossarysubentryfield}[6]{% + 
    % ignoring first argument (sub-level) + 
    \glstarget{##2}{##3}% Name + 
    & ##4% Description + 
    & ##5% Symbol + 
    & \glsentryuseri{##2}% Units + 
    & \glsentryuserii{##2}% Dimensions + 
    & ##6% Page list + 
    \\% end of row + 
  }% + 
 % Nothing between groups: + 
 \renewcommand*{\glsgroupskip}{}% + 
} +
+

+

+

+

Top

17 Accessibility Support

+ + + +

Limited accessibility support is provided by the accompanying glossaries-accsupp +package, but note that this package is experimental and it requires the accsupp package +which is also listed as experimental. This package defines additional keys that may be +used when defining glossary entries. The keys are as follows: +

+access
The replacement text corresponding to the name key. +
+textaccess
The replacement text corresponding to the text key. +
+firstaccess
The replacement text corresponding to the first key. +
+pluralaccess
The replacement text corresponding to the plural key. +
+firstpluralaccess
The replacement text corresponding to the firstplural key. +
+symbolaccess
The replacement text corresponding to the symbol key. +
+symbolpluralaccess
The replacement text corresponding to the symbolplural key. +
+descriptionaccess
The replacement text corresponding to the description key. +
+descriptionpluralaccess
The replacement text corresponding to the + descriptionplural key. +
+longaccess
The replacement text corresponding to the long key (used by + \newacronym). +
+shortaccess
The replacement text corresponding to the short key (used by + \newacronym). +
+longpluralaccess
The replacement text corresponding to the longplural key (used + by \newacronym). +
+shortpluralaccess
The replacement text corresponding to the shortplural key (used + by \newacronym). +
+

For example: + + + +

+
+\newglossaryentry{tex}{name={\TeX},description={Document preparation + 
language},access={TeX}} +
+

Now \gls{tex} will be equivalent to + + + +

+
+\BeginAccSupp{ActualText=TeX}\TeX\EndAccSupp{} +
+

The sample file sampleaccsupp.tex illustrates the glossaries-accsupp package. +

See the documented code (glossaries.pdf) for further details. It is recommended +that you also read the accsupp documentation. +

+

+

Top

18 Troubleshooting

+

The glossaries package comes with a minimal file called minimalgls.tex which can be +used for testing. This should be located in the samples subdirectory (folder) of the +glossaries documentation directory. The location varies according to your operating +system and TEX installation. For example, on my Linux partition it can be +found in /usr/local/texlive/2008/texmf-dist/doc/latex/glossaries/. +Further information on debugging LATEX code is available at +http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/. +

Below is a list of the most frequently asked questions. For other queries, consult the glossaries +FAQ at http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html. +

+

    +
  1. Q. I get the error message: + + + +
    + Missing \begin{document} +
    +

    +

    A. Check you are using an up to date version of the xkeyval package. +

  2. +
  3. Q. When I use xindy, I get the following error message: + + + +
    + ERROR: CHAR: index 0 should be less than the length of the string +
    +

    +

    A. xindy discards all commands and braces from the sort string. If your sort + string (either specified by the sort key or the name key) only consists of + commands, this will be treated by xindy as an empty sort string, which produces + an error message in newer versions of xindy. For example, the following will cause + a problem: + + + +

    +
    + \newglossaryentry{alpha}{name={\ensuremath{\alpha}}, +  
      description=alpha} +
    +

    Either use a different sort key for the entry, for example: + + + +

    +
    + \newglossaryentry{alpha}{sort=alpha, +  
      name={\ensuremath{\alpha}}, +  
      description=alpha} +
    +

    or, if all entries are like this, you may prefer to use the sort=use or sort=def + package options. See §2.4 Sorting Options for further details of the sort + option. +

  4. +
  5. Q. I’ve used the smallcaps option, but the acronyms are displayed in normal sized + upper case letters. +

    A. The smallcaps package option uses \textsc to typeset the acronyms. This + command converts lower case letters to small capitals, while upper case letters + remain their usual size. Therefore you need to specify the acronym in lower case + letters. +

  6. +
  7. Q. My acronyms won’t break across a line when they’re expanded. +

    A. PDFLATEX can break hyperlinks across a line, but LATEX can’t. If you + can’t use PDFLATEX then disable the first use links using the package option + hyperfirst=false. +

  8. +
  9. Q. How do I change the font that the acronyms are displayed in? +

    A. The easiest way to do this is to specify the smaller package option and redefine + \acronymfont to use the required typesetting command. For example, suppose + you would like the acronyms displayed in a sans-serif font, then you can + do: + + + +

    +
    + \usepackage[smaller]{glossaries} +  
    \renewcommand*{\acronymfont}[1]{\textsf{#1}} +
    +

    +

  10. +
  11. Q. How do I change the font that the acronyms are displayed in on first + use? +

    A. The easiest way to do this is to specify the smaller package option and redefine + \firstacronymfont to use the required command. Note that if you don’t want + the acronym on subsequent use to use \textsmaller, you will also need to + redefine \acronymfont, as above. For example to make the acronym emphasized + on first use, but use the surrounding font for subsequent use, you can + do: + + + +

    +
    + \usepackage[smaller]{glossaries} +  
    \renewcommand*{\firstacronymfont}[1]{\emph{#1}} +  
    \renewcommand*{\acronymfont}[1]{#1} +
    +

    +

  12. +
  13. Q. I don’t have Perl installed, do I have to use makeglossaries? +

    A. Although it is strongly recommended that you use makeglossaries, you don’t + have to use it. For further details, read §1.3.2 Using xindy explicitly or §1.3.3 + Using makeindex explicitly, depending on whether you want to use xindy or + makeindex. +

  14. +
  15. Q. I’m used to using the glossary package: are there any instructions on migrating + from the glossary package to the glossaries package? +

    A. Read “Upgrading from the glossary package to the glossaries package” which + should be available from the same location as this document. +

  16. +
  17. Q. I’m using babel but the fixed names haven’t been translated. +

    A. The glossaries package currently only supports the following languages: + Brazilian Portuguese, Danish, Dutch, English, French, German, Irish, Italian, + Hungarian, Polish, Serbian and Spanish. If you want to add another language, + send me the translations, and I’ll add them to the next version. +

    If you are using one of the above languages, but the text hasn’t been translated, + try adding the translator package with the required languages explicitly (before + you load the glossaries package). For example: + + + +

    +
    + \usepackage[ngerman]{babel} +  
    \usepackage[ngerman]{translator} +  
    \usepackage{glossaries} +
    +

    Alternatively, you can add the language as a global option to the class file. Check + the translator package documentation for further details. +

  18. +
  19. Q. My acronyms contain strange characters when I use commands like + \acrlong. +

    A. Switch off the sanitization: + + + +

    +
    + \usepackage[sanitize=none]{glossaries} +
    +

    and protect fragile commands. +

  20. +
  21. Q. Weird characters appear when I use \glsentryname or \glsname. +

    A. Either use \glsentrytext or \glstext, respectively, or switch off the + sanitization for the name key: + + + +

    +
    + \usepackage[sanitize={name=false}]{glossaries} +
    +

    and protect fragile commands. +

  22. +
  23. Q. Weird characters appear when I try to display an entry’s description. +

    A. Switch off the sanitization for the description key: + + + +

    +
    + \usepackage[sanitize={description=false}]{glossaries} +
    +

    and protect fragile commands. +

  24. +
  25. Q. My glossaries haven’t appeared. +

    A. Remember to do the following:

    + +

    Check the log files (.log, .glg etc) for any warnings. +

  26. +
  27. Q. It is possible to change the rules used to sort the glossary entries? +

    A. If it’s for an individual entry, then you can use the entry’s sort key to sort it + according to a different term. If it’s for the entire alphabet, then you will + need to use xindy (instead of makeindex) and use an appropriate xindy + language module. Writing xindy modules or styles is beyond the scope + of this manual. Further information about xindy can be found at the + Xindy Web Site. There is also a link to the xindy mailing list from that + site. +

    If you want to sort according to order of definition or order of use, use the sort + package option described in §2.4 Sorting Options. +

    +
+ + + + + + +

+

+

Top

Index

+

Symbols +

+
\@gls@codepage  1
+\@glsorder  2
+\@istfilename  3
+\@newglossary  4
+\@xdylanguage  5
+

A +\Ac  6
+\ac  7
+accsupp package  8, 9
+\Acf  10
+\acf  11
+\Acfp  12
+\acfp  13
+\Acl  14
+\acl  15
+\Aclp  16
+\aclp  17
+\Acp  18
+\acp  19
+\ACRfull  20
+\Acrfull  21, 22
+\acrfull  23, 24
+\acrfullformat  25
+\Acrfullpl  26
+\acrfullpl  27
+\Acrlong  28, 29
+\acrlong  30, 31, 32, 33
+\Acrlongpl  34
+\acrlongpl  35
+\acrnameformat  36, 37
+\acronymfont  38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51
+\acronymname  52
+\acronymtype  53, 54, 55, 56, 57, 58, 59, 60, 61
+\ACRshort  62, 63
+\Acrshort  64, 65
+ + + +\acrshort  66, 67, 68, 69, 70
+\Acrshortpl  71
+\acrshortpl  72
+\Acs  73
+\acs  74
+\Acsp  75
+\acsp  76
+\addcontentsline  77
+\andname  78
+array package  79, 80
+

B +babel package  81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91
+beamer package  92
+

C +\chapter  93
+\chapter*  94
+\currentglossary  95
+\CustomAcronymFields  96, 97, 98
+

D +\defdisplay  99
+\defdisplayfirst  100
+\defglsdisplay  101, 102, 103, 104
+\defglsdisplayfirst  105, 106, 107, 108
+\delimN  109
+\delimR  110
+description (environment)  111, 112, 113, 114, 115
+\descriptionname  116
+

E +\emph  117
+entry location  118
+\entryname  119
+environments:
+    description  120, 121, 122, 123, 124
+    equation  125
+    itemize  126
+    longtable  127, 128, 129, 130, 131, 132
+    supertabular  133, 134, 135, 136, 137
+    theglossary  138, 139, 140, 141
+ + + +equation (environment)  142
+etex package  143
+

F +file types
+    .alg  144
+    .aux  145, 146
+    .glg  147, 148, 149, 150
+    .glo  151, 152, 153
+    .gls  154, 155, 156
+    .ist  157, 158, 159, 160, 161, 162
+    .log  163
+    .tex  164, 165
+    .xdy  166, 167, 168, 169, 170, 171, 172, 173
+first use  174
+    flag  175, 176
+    text  177
+\firstacronymfont  178, 179, 180, 181, 182
+flowfram package  183
+fmtcount package  184
+

G +german package  185
+glossaries package  186
+glossaries-accsupp package  187, 188, 189
+glossaries-babel package  190, 191, 192
+glossaries-polyglossia package  193, 194, 195
+glossary counters:
+    glossaryentry  196
+    glossarysubentry  197
+glossary package  198, 199, 200, 201, 202, 203
+glossary styles:
+    altlist  204, 205
+    altlistgroup  206, 207
+    altlisthypergroup  208
+    altlong4col  209, 210, 211
+    altlong4colborder  212
+    altlong4colheader  213
+    altlong4colheaderborder  214
+    altlongragged4col  215, 216, 217
+    altlongragged4colborder  218
+    altlongragged4colheader  219, 220
+    altlongragged4colheaderborder  221
+    altsuper4col  222, 223, 224
+ + + +    altsuper4colborder  225
+    altsuper4colheader  226
+    altsuper4colheaderborder  227
+    altsuperragged4col  228, 229, 230
+    altsuperragged4colborder  231
+    altsuperragged4colheader  232, 233
+    altsuperragged4colheaderborder  234
+    alttree  235, 236, 237
+    alttreegroup  238, 239
+    alttreehypergroup  240
+    index  241, 242, 243
+    indexgroup  244, 245
+    indexhypergroup  246
+    list  247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257
+    listdotted  258, 259, 260
+    listgroup  261, 262
+    listhypergroup  263, 264, 265, 266, 267, 268, 269
+    long  270, 271, 272, 273, 274
+    long3col  275, 276, 277, 278, 279
+    long3colborder  280, 281
+    long3colheader  282, 283, 284
+    long3colheaderborder  285, 286
+    long4col  287, 288, 289, 290, 291, 292
+    long4colborder  293, 294
+    long4colheader  295, 296, 297
+    long4colheaderborder  298, 299
+    longborder  300
+    longheader  301, 302, 303
+    longheaderborder  304, 305
+    longragged  306, 307, 308, 309
+    longragged3col  310, 311, 312, 313
+    longragged3colborder  314
+    longragged3colheader  315, 316
+    longragged3colheaderborder  317
+    longraggedborder  318
+    longraggedheader  319, 320
+    longraggedheaderborder  321
+    super  322, 323, 324, 325
+    super3col  326, 327, 328, 329
+    super3colborder  330
+    super3colheader  331, 332
+    super3colheaderborder  333
+    super4col  334, 335, 336, 337, 338
+    super4colborder  339, 340
+    super4colheader  341, 342, 343
+    super4colheaderborder  344, 345
+ + + +    superborder  346
+    superheader  347, 348
+    superheaderborder  349, 350
+    superragged  351, 352, 353, 354
+    superragged3col  355, 356, 357, 358
+    superragged3colborder  359
+    superragged3colheader  360, 361
+    superragged3colheaderborder  362
+    superraggedborder  363
+    superraggedheader  364, 365
+    superraggedheaderborder  366
+    tree  367, 368, 369, 370
+    treegroup  371, 372
+    treehypergroup  373
+    treenoname  374, 375
+    treenonamegroup  376, 377
+    treenonamehypergroup  378
+glossary-list package  379, 380, 381, 382
+glossary-long package  383, 384, 385, 386, 387
+glossary-longragged package  388, 389, 390
+glossary-super package  391, 392, 393, 394, 395
+glossary-superragged package  396, 397, 398
+glossary-tree package  399, 400, 401, 402
+glossaryentry (counter)  403
+glossaryentry counter  404, 405, 406
+\glossaryentryfield  407, 408, 409
+\glossaryentrynumbers  410, 411, 412, 413
+\glossaryheader  414, 415, 416, 417
+\glossarymark  418, 419, 420
+\glossaryname  421
+\glossarypostamble  422, 423
+\glossarypreamble  424, 425, 426, 427
+\glossarystyle  428, 429, 430, 431, 432, 433
+glossarysubentry (counter)  434
+\glossarysubentryfield  435, 436
+\GLS  437, 438, 439
+\Gls  440, 441, 442, 443, 444, 445, 446, 447, 448, 449
+\gls  450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479
+\gls*  480
+\glsadd  481
+\glsaddall  482, 483
+\glsaddall options
+    types  484
+\GlsAddXdyAttribute  485, 486
+\GlsAddXdyCounters  487, 488
+ + + +\GlsAddXdyLocation  489, 490
+\glsautoprefix  491
+\glsclearpage  492
+\glsclosebrace  493
+\glsdefaulttype  494, 495, 496, 497
+\GLSdesc  498
+\Glsdesc  499
+\glsdesc  500
+\glsdescwidth  501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512
+\glsdisablehyper  513
+\glsdisp  514, 515, 516, 517, 518, 519, 520, 521
+\glsdisplay  522, 523, 524, 525, 526, 527, 528, 529
+\glsdisplayfirst  530, 531, 532, 533, 534, 535, 536, 537
+\glsenablehyper  538
+\glsentrycounterlabel  539
+\Glsentrydesc  540
+\glsentrydesc  541
+\Glsentrydescplural  542
+\glsentrydescplural  543
+\Glsentryfirst  544
+\glsentryfirst  545
+\Glsentryfirstplural  546
+\glsentryfirstplural  547
+\Glsentryfull  548
+\glsentryfull  549
+\Glsentryfullpl  550
+\glsentryfullpl  551
+\glsentryitem  552, 553
+\Glsentrylong  554
+\glsentrylong  555, 556
+\Glsentrylongpl  557
+\glsentrylongpl  558
+\Glsentryname  559
+\glsentryname  560, 561, 562, 563
+\Glsentryplural  564
+\glsentryplural  565
+\Glsentryshort  566
+\glsentryshort  567
+\Glsentryshortpl  568
+\glsentryshortpl  569
+\Glsentrysymbol  570
+\glsentrysymbol  571
+\Glsentrysymbolplural  572
+\glsentrysymbolplural  573
+\Glsentrytext  574
+\glsentrytext  575, 576, 577, 578, 579, 580, 581
+ + + +\Glsentryuseri  582
+\glsentryuseri  583
+\Glsentryuserii  584
+\glsentryuserii  585
+\Glsentryuseriii  586
+\glsentryuseriii  587
+\Glsentryuseriv  588
+\glsentryuseriv  589
+\Glsentryuserv  590
+\glsentryuserv  591
+\Glsentryuservi  592
+\glsentryuservi  593
+\GLSfirst  594
+\Glsfirst  595
+\glsfirst  596
+\GLSfirstplural  597
+\Glsfirstplural  598
+\glsfirstplural  599
+\glsgetgrouptitle  600
+\glsgroupheading  601, 602
+\glsgroupskip  603, 604, 605, 606, 607
+\glshyperlink  608, 609
+\glshypernavsep  610
+\glslabel  611
+\glslabeltok  612
+\glslink  613, 614, 615, 616, 617, 618, 619, 620, 621, 622
+\glslink options
+    counter  623, 624
+    format  625, 626, 627, 628
+    hyper  629, 630, 631
+\glslink*  632
+\glslistdottedwidth  633
+\glslocalreset  634
+\glslocalresetall  635
+\glslocalunset  636
+\glslocalunsetall  637
+\glslongtok  638
+\GLSname  639
+\Glsname  640
+\glsname  641, 642, 643
+\glsnamefont  644, 645
+\glsnavhypertarget  646
+\glsnumberformat  647
+\glsnumbersgroupname  648
+\glsopenbrace  649
+\glspagelistwidth  650, 651, 652, 653, 654, 655, 656, 657
+ + + +\glspar  658
+\GLSpl  659, 660, 661, 662, 663
+\Glspl  664, 665, 666, 667, 668, 669, 670
+\glspl  671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687
+\GLSplural  688
+\Glsplural  689
+\glsplural  690
+\glspluralsuffix  691, 692, 693, 694
+\glspostdescription  695
+\glsquote  696
+\glsrefentry  697, 698, 699
+\glsreset  700, 701
+\glsresetall  702
+\glssee  703, 704, 705, 706, 707
+\glsseeformat  708, 709, 710
+\glsseeitemformat  711
+\glsseelastsep  712
+\glsseelist  713, 714
+\glsseesep  715
+\glsSetAlphaCompositor  716
+\glsSetCompositor  717
+\glsSetSuffixF  718
+\glsSetSuffixFF  719
+\glssetwidest  720
+\GlsSetXdyCodePage  721, 722
+\GlsSetXdyFirstLetterAfterDigits  723
+\GlsSetXdyLanguage  724, 725
+\GlsSetXdyLocationClassOrder  726
+\GlsSetXdyMinRangeLength  727, 728
+\glsshorttok  729
+\glssubentrycounterlabel  730
+\glssubentryitem  731, 732
+\GLSsymbol  733
+\Glssymbol  734
+\glssymbol  735
+\glssymbolsgroupname  736
+\glstarget  737, 738
+\GLStext  739
+\Glstext  740
+\glstext  741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751
+\glstextformat  752, 753, 754
+\glstocfalse  755
+\glstoctrue  756
+\glstreeindent  757
+\glsunset  758
+\glsunsetall  759
+ + + +\GLSuseri  760
+\Glsuseri  761
+\glsuseri  762
+\GLSuserii  763
+\Glsuserii  764
+\glsuserii  765
+\GLSuseriii  766
+\Glsuseriii  767
+\glsuseriii  768
+\GLSuseriv  769
+\Glsuseriv  770
+\glsuseriv  771
+\GLSuserv  772
+\Glsuserv  773
+\glsuserv  774
+\GLSuservi  775
+\Glsuservi  776
+\glsuservi  777
+

H +html package  778
+\hyperbf  779
+\hyperbsf  780
+\hyperemph  781
+\hyperit  782
+\hyperlink  783, 784, 785
+\hypermd  786
+\hyperpage  787
+hyperref package  788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799
+\hyperrm  800, 801
+\hypersc  802
+\hypersf  803
+\hypersl  804
+\hypertarget  805
+\hypertt  806
+\hyperup  807
+

I +\ifglsused  808
+\index  809, 810, 811, 812
+\indexspace  813, 814, 815, 816
+inputenc package  817, 818, 819, 820
+\inputencodingname  821
+\item  822, 823
+ + + +itemize (environment)  824
+

J +\jobname  825, 826
+

L +link text  827, 828, 829, 830, 831, 832, 833, 834
+\loadglsentries  835, 836, 837
+location list  see number list
+longtable (environment)  839, 840, 841, 842, 843, 844
+longtable package  845, 846
+

M +\makefirstuc  847, 848, 849
+makeglossaries  850
+makeglossaries  851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906
+\makeglossaries  907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924
+makeindex  925
+makeindex  926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992
+memoir class  993
+mfirstuc package  994, 995, 996
+

N +\newacronym  997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022
+\newdualentry  1023
+\newglossary  1024, 1025, 1026, 1027, 1028, 1029
+\newglossaryentry  1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046
+\newglossaryentry options
+    access  1047
+    description  1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069
+    descriptionaccess  1070
+    descriptionplural  1071, 1072, 1073
+    descriptionpluralaccess  1074
+    first  1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094
+    firstaccess  1095
+    firstplural  1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109
+    firstpluralaccess  1110
+ + + +    format  1111
+    long  1112, 1113, 1114
+    longaccess  1115
+    longplural  1116, 1117, 1118, 1119
+    longpluralaccess  1120
+    name  1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150
+    nonumberlist  1151
+    parent  1152, 1153, 1154, 1155
+    plural  1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169
+    pluralaccess  1170
+    see  1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182
+    short  1183, 1184, 1185
+    shortaccess  1186
+    shortplural  1187, 1188, 1189, 1190
+    shortpluralaccess  1191
+    sort  1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205
+    symbol  1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223
+    symbolaccess  1224
+    symbolplural  1225, 1226, 1227
+    symbolpluralaccess  1228
+    text  1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248
+    textaccess  1249
+    type  1250, 1251
+    user1  1252, 1253, 1254, 1255, 1256, 1257
+    user2  1258, 1259
+    user3  1260
+    user4  1261
+    user5  1262
+    user6  1263, 1264, 1265
+\newglossarystyle  1266, 1267, 1268, 1269
+\newline  1270, 1271
+ngerman package  1272, 1273
+\nohyperpage  1274
+\noist  1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286
+\nopostdesc  1287, 1288, 1289, 1290
+number list  1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327
+\numberline  1328
+

O +\oldacronym  1329, 1330
+

P + + + +package options:
+    acronym  1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352
+    acronymlists  1353, 1354, 1355, 1356
+    compatible-2.07  1357
+    counter  1358, 1359, 1360, 1361, 1362
+        page  1363
+    counterwithin  1364, 1365, 1366, 1367, 1368
+    description  1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383
+    dua  1384, 1385, 1386, 1387, 1388, 1389, 1390
+    entrycounter  1391, 1392, 1393, 1394, 1395
+        false  1396
+        true  1397
+    footnote  1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411
+    hyperfirst  1412
+        false  1413, 1414
+        true  1415
+    makeindex  1416
+    nolist  1417, 1418
+    nolong  1419, 1420, 1421
+    nomain  1422, 1423
+    nonumberlist  1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431
+    nostyles  1432, 1433, 1434, 1435, 1436, 1437
+    nosuper  1438, 1439, 1440
+    notree  1441, 1442
+    nowarn  1443
+    numberedsection  1444, 1445, 1446, 1447, 1448
+        autolabel  1449, 1450
+        false  1451
+        nolabel  1452
+    numberline  1453, 1454
+    order  1455, 1456
+        letter  1457, 1458, 1459
+        word  1460, 1461, 1462
+    sanitize  1463, 1464, 1465, 1466, 1467
+        none  1468
+    savewrites  1469, 1470, 1471
+        false  1472
+    section  1473, 1474
+    seeautonumberlist  1475, 1476, 1477, 1478
+    shortcuts  1479, 1480, 1481, 1482
+    smallcaps  1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496
+    smaller  1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508
+    sort  1509, 1510, 1511
+ + + +        def  1512, 1513, 1514, 1515
+        standard  1516, 1517, 1518
+        use  1519, 1520, 1521, 1522
+    style  1523, 1524, 1525, 1526, 1527, 1528, 1529
+        list  1530
+    subentrycounter  1531, 1532, 1533, 1534, 1535, 1536
+        false  1537
+    toc  1538, 1539, 1540, 1541, 1542
+    translate  1543
+        false  1544, 1545, 1546, 1547
+        true  1548, 1549
+    xindy  1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561
+page counter  1562
+\pagelistname  1563
+pod2man  1564
+polyglossia package  1565, 1566, 1567, 1568, 1569
+\printglossaries  1570, 1571, 1572, 1573, 1574
+\printglossary  1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582
+\printglossary options
+    nonumberlist  1583
+    numberedsection  1584
+    style  1585, 1586, 1587, 1588
+    title  1589, 1590
+    toctitle  1591
+    type  1592
+\protect  1593
+

R +relsize package  1594, 1595, 1596, 1597
+\Roman  1598
+

S +sanitize  1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612
+\section*  1613
+\seename  1614, 1615, 1616, 1617
+\setAlphaCompositor  1618
+\setCompositor  1619
+\SetCustomDisplayStyle  1620, 1621, 1622, 1623
+\SetCustomStyle  1624
+\setentrycounter  1625, 1626
+\setglossarysection  1627, 1628
+\setStyleFile  1629, 1630, 1631
+\smaller  1632
+supertabular (environment)  1633, 1634, 1635, 1636, 1637
+ + + +supertabular package  1638, 1639, 1640
+\symbolname  1641
+

T +\textbf  1642
+\textrm  1643
+\textsc  1644, 1645, 1646, 1647, 1648, 1649, 1650
+\textsmaller  1651, 1652, 1653, 1654, 1655, 1656, 1657
+theglossary (environment)  1658, 1659, 1660, 1661
+\thepage  1662
+translator package  1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677
+

W +\write18  1678
+

X +xindy  1679
+xindy  1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779
+xkeyval package  1780, 1781
+\xmakefirstuc  1782
+\xspace  1783
+xspace package  1784, 1785, 1786, 1787, 1788, 1789
+

+ + + +

1That is, if the term has been referenced using any of the commands described in §6 Links to +Glossary Entries and §7 Adding an Entry to the Glossary Without Generating Text or via \glssee (or +the see key) or commands such as \acrshort.

+

2Note that I’m assuming the sanitization has been switched on for the description key, which is +why I haven’t used \protect\gls in the description.

+

3if the acronym option is used, otherwise the list of acronyms is the main glossary

+

4Actually it sets \acronymtype to \glsdefaulttype if the acronym package option is not used, but +\glsdefaulttype usually has the value main.

+

5The only preamble restriction on \newglossaryentry and \newacronym was removed in version +1.13, but the restriction remains for \loadglsentries.

+

6Except possibly the style file but then you’ll need to use \noist to prevent your changes from +being overwritten.

+

7This is because \acronymtype is set to \glsdefaulttype if the acronym package option is not +used.

+

8main for the main (default) glossary, \acronymtype for the list of acronyms, or the name +supplied in the first mandatory argument to \newglossary for additional glossaries.

+

9makeindex will always assign a location number, even if it’s not needed, so it needs to be +discarded.

10Ifyou redefine \glsseeformat, keep the default value of the optional argument as \seename as +both see and \glssee explicitly write [\seename] in the output file if no optional argument is +given.

+

11In versions before 3.0, \glsentryname was used, but this can cause problems when the name +key is sanitized.

+

12versions before 3.0 used \glsentryname as the default, but this can cause problems when name +has been sanitized.

13you can’t use the longheaderborder style for this example as you can’t use the longtable +environment in two column mode.

14see \setCompositor described in §3 Setting Up

+

15see \setAlphaCompositor described in §3 Setting Up

+

16not that this was change from using \smaller to \textsmaller as declarations cause a problem for +\makefirstuc.

+

17as from version 1.18

18these lengths will not be available if you use both the nolong and nosuper package +options or if you use the nostyles package option unless you explicitly load the relevant +package.

+

19This style was supplied by Axel Menzel.

+

20e.g. with the flowfram package.

+ + + + + + diff --git a/Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex b/Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex new file mode 100644 index 00000000000..0c1a701352c --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex @@ -0,0 +1,5841 @@ +\documentclass{nlctdoc} + +\usepackage{alltt} +\usepackage{pifont} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\ifpdf +\usepackage{mathpazo} +\usepackage[scaled=.88]{helvet} +\usepackage{courier} +\fi +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={User Manual for glossaries.sty}, + pdfkeywords={LaTeX,package,glossary,acronyms}]{hyperref} +\usepackage{xr-hyper} +\usepackage[xindy,nonumberlist,seeautonumberlist,toc,style=altlist]{glossaries} + +\renewcommand*{\glsgroupskip}{} + +\renewcommand*{\glsseeformat}[3][\seename]{% + (\xmakefirstuc{#1} \glsseelist{#2}.)% +} + +\renewcommand*{\glossarypreamble}{% +\emph{This glossary style was setup using:} +\begin{ttfamily} +\begin{tabbing} +\cs{usepackage}[\=xindy,\\ +\+\>nonumberlist,\\ + seeautonumberlist,\\ + toc,\\ + style=altlist]\{glossaries\} +\end{tabbing} +\cs{renewcommand*}\{\ics{glsgroupskip}\}\{\}\newline +\cs{renewcommand*}\{\ics{glsseeformat}\}[3][\ics{seename}]\{(\ics{xmakefirstuc}\{\#1\} \newline +\ics{glsseelist}\{\#2\}.)\} +\end{ttfamily} +} + +\ifpdf +\else + % Need an extra line break in the html version + % (Don't have time to fiddle with cfg files!) + \renewcommand*{\glossaryentryfield}[5]{% + \item[\glsentryitem{#1}\glstarget{#1}{#2}]\mbox{}\newline + #3\glspostdescription\space #5\newline}% +\fi + +\makeglossaries + +\renewcommand*{\main}[1]{\hyperpage{#1}} +\newcommand*{\htextbf}[1]{\textbf{\hyperpage{#1}}} +\newcommand*{\itermdef}[1]{\index{#1|htextbf}} + +\IndexPrologue{} + +\newglossaryentry{xindy}{ +name={\appfmt{xindy}\index{xindy|htextbf}}, +sort={xindy}, +text={\protect\app{xindy}}, +description={An flexible indexing application with multilingual +support} +} + +\newglossaryentry{makeindex}{% +name={\appfmt{makeindex}\index{makeindex|htextbf}},% +sort={makeindex},% +text={\protect\app{makeindex}},% +description={An indexing application}, +} + +\newglossaryentry{makeglossaries}{% +name={\appfmt{makeglossaries}\index{makeglossaries|htextbf}},% +sort={makeglossaries},% +text={\protect\app{makeglossaries}},% +description={A \sty{glossaries} custom designed Perl script interface +to \gls{xindy} and \gls{makeindex}} +} + +\newglossaryentry{numberlist}{% +name={Number list\itermdef{number list}},% +sort={number list},% +text={\protect\term{number list}},% +description={A list of \glslink{entrylocation}{entry locations} (also +called a location list). The number list can be suppressed using the +\pkgopt{nonumberlist} package option} +} + +\newglossaryentry{entrylocation}{% +name={Entry location\itermdef{entry location}},% +sort={entry location},% +text={\protect\term{entry location}},% +description={The location of the entry in the document. This +defaults to the page number on which the entry appears. An entry may +have multiple locations} +} + +\newglossaryentry{locationlist}{% +name={Location list},% +sort={location list},% +description={A list of \glslink{entrylocation}{entry locations}},% +see={numberlist} +} + +\newglossaryentry{linktext}{% +name={Link text\itermdef{link text}}, +sort={link text},% +text={\protect\term{link text}}, +description={The text produced by commands such as \ics{gls}. It may +or may not be a hyperlink to the glossary} +} + +\let\glsd\glsuseri +\let\glsation\glsuserii + +\newglossaryentry{firstuse}{% +name={First use\ifirstuse}, +sort={first use},% +text={first use},% +user1={first used}, +description={The first time a glossary entry is used (from the start of the document or after a reset) with one of the +following commands: \ics{gls}, \ics{Gls}, \ics{GLS}, \ics{glspl}, +\ics{Glspl}, \ics{GLSpl} or \ics{glsdisp}. +\glsseeformat{firstuseflag,firstusetext}{}\nopostdesc}% +} + +\newglossaryentry{firstuseflag}{% +name={First use flag\ifirstuseflag}, +sort={first use flag},% +text={first use flag},% +description={A conditional that determines whether or not the entry +has been used according to the rules of \gls{firstuse}. Commands +to unset or reset this conditional are described in +\sectionref{sec:glsunset}}% +} + +\newglossaryentry{firstusetext}{% +name={First use text\ifirstusetext}, +sort={first use text},% +text={first use text},% +description={The text that is displayed on \gls{firstuse}, which is +governed by the \gloskey{first} and \gloskey{firstplural} keys of +\ics{newglossaryentry}. (May be overridden by +\ics{glsdisp}.)\nopostdesc}% +} + +\newglossaryentry{sanitize}{% +name={Sanitize\itermdef{sanitize}},% +sort={sanitize}, +text={\protect\term{sanitize}},% +user1={sanitized\protect\iterm{sanitize}},% +user2={sanitization\protect\iterm{sanitize}}, +description={Converts command names into character sequences. That is, a command called, +say, \cs{foo}, is converted into the sequence of characters: +\cs{}, \texttt{f}, \texttt{o}, \texttt{o}. Depending on the font, +the backslash character may appear as a dash when used in the +main document text, so \cs{foo} will appear as: ---foo. +\glspar +When \TeX\ writes information to a file, fragile +commands must be protected. The \gloskey{name}, \gloskey{description} +and \gloskey{symbol} keys all have their values written to a file, +which means that care must be taken if those values contain fragile +commands. There are two approaches: 1) the fragile commands must be +protected using \ics{protect}; 2) the values are sanitized. +Sanitizing the values gets rid of the inconvenience of having to +protect fragile commands, but at the expense of no longer being able +to use those values in the document. Sanitization is governed by the +package option \pkgopt{sanitize} described in \sectionref{sec:pkgopts-general}} +} + +\ifpdf +\externaldocument{glossaries} +\fi + +\doxitem{Option}{option}{package options} +\doxitem{GlsKey}{key}{glossary keys} +\doxitem{Style}{style}{glossary styles} +\doxitem{Counter}{counter}{glossary counters} + +\setcounter{IndexColumns}{2} + +\newcommand*{\tick}{\ding{51}} + +\newcommand*{\ifirstuse}{\iterm{first use}} +\newcommand*{\ifirstuseflag}{\iterm{first use>flag}} +\newcommand*{\ifirstusetext}{\iterm{first use>text}} + +\newcommand*{\firstuse}{\gls{firstuse}} +\newcommand*{\firstuseflag}{\gls{firstuseflag}} +\newcommand*{\firstusetext}{\gls{firstusetext}} + + +\newcommand*{\istkey}[1]{\appfmt{#1}\index{makeindex=\appfmt{makeindex}>#1=\texttt{#1}|hyperpage}} +\newcommand*{\locfmt}[1]{\texttt{#1}\SpecialMainIndex{#1}} +\newcommand*{\mkidxspch}{\index{makeindex=\appfmt{makeindex}>special characters|hyperpage}} + +\newcommand*{\igloskey}[2][newglossaryentry]{\icsopt{#1}{#2}} +\newcommand*{\gloskey}[2][newglossaryentry]{\csopt{#1}{#2}} + +\newcommand*{\glostyle}[1]{\textsf{#1}\index{glossary styles:>#1={\protect\ttfamily#1}|main}} + +\newcommand*{\samplefile}[1]{\hyperref[ex:sample#1]{\texttt{sample#1.tex}}} + +\ifpdf + \newcommand*{\htmldoc}[2]{\qt{#1}} +\else + \newcommand*{\htmldoc}[2]{\href{#2.html}{\qt{#1}}} +\fi + +\begin{document} +\MakeShortVerb{"} +\DeleteShortVerb{\|} + + \title{User Manual for glossaries.sty v3.0} + \author{Nicola L.C. Talbot\\[10pt] +School of Computing Sciences\\ +University of East Anglia\\ +Norwich. Norfolk\\ +NR4 7TJ. United Kingdom.\\ +\url{http://theoval.cmp.uea.ac.uk/~nlct/}} + + \date{2011-04-02} + \maketitle + +\noindent +The \styfmt{glossaries} bundle comes with the following documentation: +\begin{description} +\item[\url{glossariesbegin.pdf}] +If you are a complete beginner, start with +\htmldoc{The glossaries package: a guide for +beginners}{glossariesbegin}. + +\item[\url{glossary2glossaries.pdf}] +If you are moving over from the obsolete \sty{glossary} package, +read \htmldoc{Upgrading from the glossary package to the +glossaries package}{glossary2glossaries}. + +\item[glossaries-user.pdf] +This document is the main user guide for the \styfmt{glossaries} +package. + +\item[\url{mfirstuc-manual.pdf}] +The commands provided by the \sty{mfirstuc} package are briefly +described in \htmldoc{mfirstuc.sty: uppercasing first +letter}{mfirstuc-manual}. + +\item[\url{glossaries.pdf}] +Advanced users wishing to know more about the inner workings of all the +packages provided in the \styfmt{glossaries} bundle should read +\qt{Documented Code for glossaries v3.0}. +This includes how to iterate over all entry labels defined in a +given glossary or how to iterate over all glossary types, as well as +the documented code for the \sty{mfirstuc} package. + +\item[INSTALL] Installation instructions. + +\item[CHANGES] Change log. + +\item[README] Package summary. + +\end{description} + +\begin{important} +If you use \sty{hyperref} and \styfmt{glossaries}, you must load +\sty{hyperref} \emph{first}. +\end{important} + +\clearpage +\tableofcontents + +\clearpage +\printglossaries + + \section{Introduction} + +The \styfmt{glossaries} package is provided to assist generating +glossaries. It has a certain amount of flexibility, allowing the +user to customize the format of the glossary and define multiple +glossaries. It also supports acronyms and glossary styles that +include symbols (in addition to a name and description) for glossary +entries. There is provision for loading a database of glossary +terms. Only those terms used\footnote{That is, if the term has been +referenced using any of the commands described in +\sectionref{sec:glslink} and \sectionref{sec:glsadd} or via +\ics{glssee} (or the \gloskey{see} key) or commands such as +\ics{acrshort}.} in the document will be added to the glossary. + +\textbf{This package replaces the \sty{glossary} package which is +now obsolete.} Please see the document \qtdocref{Upgrading from the +glossary package to the glossaries package}{glossary2glossaries} for +assistance in upgrading. + +One of the strengths of this package is its flexibility, however +the drawback of this is the necessity of having a large manual +that can cover all the various settings. If you are daunted by the +size of the manual, try starting off with the much shorter +\docref{guide for beginners}{glossariesbegin}. + +\begin{important} +The \styfmt{glossaries} package comes with a +\href{http://www.perl.org/about.html}{Perl} script called +\gls{makeglossaries}. This provides a convenient interface to +\gls{makeindex} or \gls{xindy}. It is strongly recommended +that you use this script, but \emph{it is not essential}. If you are +reluctant to install Perl, or for any other reason you don't want to +use \gls*{makeglossaries}, you can called \gls*{makeindex} or +\gls*{xindy} explicitly. See \sectionref{sec:makeglossaries} for +further details. +\end{important} + +The remainder of this introductory section covers the following: +\begin{itemize} +\item \sectionref{sec:samples} lists the sample documents provided +with this package. + +\item \sectionref{sec:languages} provides information for users who +wish to write in a language other than English. + +\item \sectionref{sec:makeglossaries} describes how to use a +post-processor to create the sorted glossaries for your document. + +\end{itemize} + + +\subsection{Sample Documents} +\label{sec:samples} + +The \styfmt{glossaries} package is provided with some sample +documents that illustrate the various functions. These should +be located in the \texttt{samples} subdirectory (folder) of the +\styfmt{glossaries} documentation directory. This location varies +according to your operating system and \TeX\ distribution. You +can use \texttt{texdoc} to locate the main glossaries documentation. +For example, in a terminal or command prompt, type: +\begin{prompt} +texdoc -l glossaries +\end{prompt} +This should display the full pathname of the file +\texttt{glossaries.pdf}. View the contents of that directory and +see if it contains the \texttt{samples} subdirectory. + +If you can't find the sample files, they are available in the +subdirectory \texttt{doc/latex/glossaries/samples/} in the +\texttt{glossaries.tds.zip} archive which can be downloaded from +\href{http://tug.ctan.org/tex-archive/macros/latex/contrib/glossaries/}{CTAN}. + + +The sample documents are as follows: +\begin{description} +\item[minimalgls.tex]\label{ex:minimalgls} This document is a +minimal working example. You can test your installation using this +file. To create the complete document you will need to do the +following steps: + \begin{enumerate} + \item Run \texttt{minimalgls.tex} through \LaTeX\ either by + typing +\begin{prompt} +latex minimalgls +\end{prompt} + in a terminal or by using the relevant button or menu item in + your text editor or front-end. This will create the required + associated files but you will not see the glossary. If you use + PDF\LaTeX\ you will also get warnings about non-existent + references. These warnings may be ignored on the first run. + + If you get a \verb"Missing \begin{document}" error, then + it's most likely that your version of \sty{xkeyval} is + out of date. Check the log file for a warning of that nature. + If this is the case, you will need to update the \styfmt{xkeyval} + package. + + \item Run \gls{makeglossaries} on the document. This can + be done on a terminal either by typing +\begin{prompt} +makeglossaries minimalgls +\end{prompt} + or by typing +\begin{prompt} +perl makeglossaries minimalgls +\end{prompt} + If your system doesn't recognise the command \texttt{perl} then + it's likely you don't have Perl installed. In which case you + will need to use \gls{makeindex} directly. You can do this + in a terminal by typing (all on one line): +\begin{prompt} +makeindex -s minimalgls.ist -t minimalgls.glg -o minimalgls.gls minimalgls.glo +\end{prompt} + (See \sectionref{sec:makeindexapp} for further details on using + \gls*{makeindex} explicitly.) + + Note that if you need to specify the full path and the path + contains spaces, you will need to delimit the file names with + the double-quote character. + + \item Run \texttt{minimalgls.tex} through \LaTeX\ again (as step~1) + \end{enumerate} +You should now have a complete document. The number following +each entry in the glossary is the location number. By default, this +is the page number where the entry was referenced. + +\item[sample4col.tex]\label{ex:sample4col} This document illustrates +a four column glossary where the entries have a symbol in addition +to the name and description. To create the complete document, you +need to do: +\begin{prompt} +latex sample4col +makeglossaries sample4col +latex sample4col +\end{prompt} +As before, if you don't have Perl installed, you will need to use +\gls{makeindex} directly instead of using +\gls{makeglossaries}. The vertical gap between entries is the +gap created at the start of each group. This can be suppressed by +redefining \ics{glsgroupskip} after the glossary style has been set: +\begin{verbatim} +\renewcommand*{\glsgroupskip}{} +\end{verbatim} + +\item[sampleAcr.tex]\label{ex:sampleAcr} This document has some +sample acronyms. It also adds the glossary to the table of contents, +so an extra run through \LaTeX\ is required to ensure the document +is up to date: +\begin{prompt} +latex sampleAcr +makeglossaries sampleAcr +latex sampleAcr +latex sampleAcr +\end{prompt} + +\item[sampleAcrDesc.tex]\label{ex:sampleAcrDesc} This is similar to +the previous example, except that the acronyms have an associated +description. As with the previous example, the glossary is added to +the table of contents, so an extra run through \LaTeX\ is required: +\begin{prompt} +latex sampleAcrDesc +makeglossaries sampleAcrDesc +latex sampleAcrDesc +latex sampleAcrDesc +\end{prompt} + +\item[sampleDesc.tex]\label{ex:sampleDesc} This is similar to the +previous example, except that it defines the acronyms using +\ics{newglossaryentry} instead of \ics{newacronym}. As with the +previous example, the glossary is added to the table of contents, so +an extra run through \LaTeX\ is required: +\begin{prompt} +latex sampleDesc +makeglossaries sampleDesc +latex sampleDesc +latex sampleDesc +\end{prompt} + +\item[sample-custom-acronym.tex]\label{ex:sample-custom-acronym} +This document illustrates how to define your own acronym style if +the predefined styles don't suit your requirements. +\begin{prompt} +latex sample-custom-acronym +makeglossaries sample-custom-acronym +latex sample-custom-acronym +\end{prompt} + +\item[sample-crossref.tex]\label{ex:sample-crossref} +This document illustrates how to cross-reference entries in the +glossary. +\begin{prompt} +latex sample-crossref +makeglossaries sample-crossref +latex sample-crossref +\end{prompt} + +\item[sampleDB.tex]\label{ex:sampleDB} This document illustrates how +to load external files containing the glossary definitions. It also +illustrates how to define a new glossary type. This document has the +\gls{numberlist} suppressed and uses \ics{glsaddall} to add all +the entries to the glossaries without referencing each one +explicitly. To create the document do: +\begin{prompt} +latex sampleDB +makeglossaries sampleDB +latex sampleDB +\end{prompt} +The glossary definitions are stored in the accompanying files +\texttt{database1.tex} and \texttt{database2.tex}. Note that if you +don't have Perl installed, you will need to use \gls{makeindex} +twice instead of a single call to \gls{makeglossaries}: +\begin{enumerate} +\item Create the main glossary: +\begin{prompt} +makeindex -s sampleDB.ist -t sampleDB.glg -o sampleDB.gls sampleDB.glo +\end{prompt} +\item Create the secondary glossary: +\begin{prompt} +makeindex -s sampleDB.ist -t sampleDB.nlg -o sampleDB.not sampleDB.ntn +\end{prompt} +\end{enumerate} + +\item[sampleEq.tex]\label{ex:sampleEq} This document illustrates how +to change the location to something other than the page number. In +this case, the \texttt{equation} counter is used since all glossary +entries appear inside an \env{equation} environment. To create +the document do: +\begin{prompt} +latex sampleEq +makeglossaries sampleEq +latex sampleEq +\end{prompt} + +\item[sampleEqPg.tex]\label{ex:sampleEqPg} This is similar to the +previous example, but the \glspl{numberlist} are a +mixture of page numbers and equation numbers. This example adds the +glossary to the table of contents, so an extra \LaTeX\ run is +required: +\begin{prompt} +latex sampleEqPg +makeglossaries sampleEqPg +latex sampleEqPg +latex sampleEqPg +\end{prompt} + +\item[sampleSec.tex]\label{ex:sampleSec} This document also +illustrates how to change the location to something other than the +page number. In this case, the \texttt{section} counter is used. +This example adds the glossary to the table of contents, so an extra +\LaTeX\ run is required: +\begin{prompt} +latex sampleSec +makeglossaries sampleSec +latex sampleSec +latex sampleSec +\end{prompt} + +\item[sampleNtn.tex]\label{ex:sampleNtn} This document illustrates +how to create an additional glossary type. This example adds the +glossary to the table of contents, so an extra \LaTeX\ run is +required: +\begin{prompt} +latex sampleNtn +makeglossaries sampleNtn +latex sampleNtn +latex sampleNtn +\end{prompt} +Note that if you don't have Perl installed, you will need to use +\gls{makeindex} twice instead of a single call to +\gls{makeglossaries}: +\begin{enumerate} +\item Create the main glossary: +\begin{prompt} +makeindex -s sampleNtn.ist -t sampleNtn.glg -o sampleNtn.gls sampleNtn.glo +\end{prompt} +\item Create the secondary glossary: +\begin{prompt} +makeindex -s sampleNtn.ist -t sampleNtn.nlg -o sampleNtn.not sampleNtn.ntn +\end{prompt} +\end{enumerate} + +\item[sample.tex]\label{ex:sample} This document illustrates some of +the basics, including how to create child entries that use the same +name as the parent entry. This example adds the glossary to the +table of contents and it also uses \ics{glsrefentry}, so an extra \LaTeX\ +run is required: +\begin{prompt} +latex sample +makeglossaries sample +latex sample +latex sample +\end{prompt} +You can see the difference between word and letter ordering if you +substitute \pkgopt[word]{order} with \pkgopt[letter]{order}. (Note +that this will only have an effect if you use +\gls{makeglossaries}. If you use \gls{makeindex} explicitly, +you will need to use the \texttt{-l} switch to indicate letter +ordering.) + +\item[sampletree.tex]\label{ex:sampletree} This document illustrates +a hierarchical glossary structure where child entries have different +names to their corresponding parent entry. To create the document +do: +\begin{prompt} +latex sampletree +makeglossaries sampletree +latex sampletree +\end{prompt} + +\item[sample-dual.tex]\label{ex:sample-dual} This document +illustrates how to define an entry that both appears in the list of +acronyms and in the main glossary. To create the document do: +\begin{prompt} +latex sample-dual +makeglossaries sample-dual +latex sample-dual +\end{prompt} + +\item[samplexdy.tex]\label{ex:samplexdy} This document illustrates +how to use the \styfmt{glossaries} package with \gls{xindy} instead +of \gls{makeindex}. The document uses UTF8 encoding (with the +\sty{inputenc} package). The encoding is picked up by +\gls{makeglossaries}. By default, this document will create a +\gls{xindy} style file called \texttt{samplexdy.xdy}, but if you +uncomment the lines +\begin{verbatim} +\setStyleFile{samplexdy-mc} +\noist +\GlsSetXdyLanguage{} +\end{verbatim} +it will set the style file to \texttt{samplexdy-mc.xdy} instead. +This provides an additional letter group for entries starting with +\qt{Mc} or \qt{Mac}. If you use \gls{makeglossaries}, you don't +need to supply any additional information. If you don't use +\gls*{makeglossaries}, you will need to specify the required +information. Note that if you set the style file to +\texttt{samplexdy-mc.xdy} you must also specify \ics{noist}, +otherwise the \styfmt{glossaries} package will overwrite +\texttt{samplexdy-mc.xdy} and you will lose the \qt{Mc} letter +group. + +To create the document do: +\begin{prompt} +latex samplexdy +makeglossaries samplexdy +latex samplexdy +\end{prompt} +If you don't have Perl installed, you will have to call +\gls{xindy} explicitly instead of using \gls{makeglossaries}. +If you are using the default style file \texttt{samplexdy.xdy}, then +do (no line breaks): +\begin{prompt} +xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo +\end{prompt} +otherwise, if you are using \texttt{samplexdy-mc.xdy}, then do +(no line breaks): +\begin{prompt} +xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo +\end{prompt} + +\item[samplexdy2.tex]\label{ex:samplexdy2} This document illustrates +how to use the \styfmt{glossaries} package where the location +numbers don't follow a standard format. This example will only work +with \gls{xindy}. To create the document do: +\begin{prompt} +pdflatex samplexdy2 +makeglossaries samplexdy2 +pdflatex samplexdy2 +\end{prompt} +If you can't use \gls{makeglossaries} then you need to do: +\begin{prompt} +xindy -L english -C utf8 -I xindy -M samplexdy2 -t samplexdy2.glg -o samplexdy2.gls samplexdy2.glo +\end{prompt} +See \sectionref{sec:xindyloc} for further details. + +\item[sampleutf8.tex]\label{ex:sampleutf8} This is another example +that uses \gls{xindy}. Unlike \gls{makeindex}, +\gls{xindy} can cope with accented or non-Latin characters. This +document uses UTF8 encoding. To create the document do: +\begin{prompt} +latex sampleutf8 +makeglossaries sampleutf8 +latex sampleutf8 +\end{prompt} +If you don't have Perl installed, you will have to call +\gls{xindy} explicitly instead of using \gls{makeglossaries} +(no line breaks): +\begin{prompt} +xindy -L english -C utf8 -I xindy -M sampleutf8 -t sampleutf8.glg -o sampleutf8.gls sampleutf8.glo +\end{prompt} + +If you remove the \pkgopt{xindy} option from \texttt{sampleutf8.tex} +and do: +\begin{prompt} +latex sampleutf8 +makeglossaries sampleutf8 +latex sampleutf8 +\end{prompt} +you will see that the entries that start with a non-Latin character +now appear in the symbols group, and the word \qt{man\oe uvre} is now +after \qt{manor} instead of before it. If you are unable to use +\gls{makeglossaries}, the call to \gls{makeindex} is as +follows (no line breaks): +\begin{prompt} +makeindex -s sampleutf8.ist -t sampleutf8.glg -o sampleutf8.gls sampleutf8.glo +\end{prompt} + +\item[sampleaccsupp.tex]\label{ex:sampleaccsupp} This document +uses the experimental \sty{glossaries-accsupp} package. The +symbol is set to the replacement text. Note that some PDF +viewers don't use the accessibility support. Information +about the \styfmt{glossaries-accsupp} package can be found in +\sectionref{sec:accsupp}. + +\end{description} + + +\subsection{Multi-Lingual Support} +\label{sec:languages} + +As from version 1.17, the \styfmt{glossaries} package can now be +used with \gls{xindy} as well as \gls{makeindex}. If you +are writing in a language that uses accented characters or +non-Latin characters it is recommended that you use \gls*{xindy} +as \gls*{makeindex} is hard-coded for Latin languages. This +means that you are not restricted to the A, \ldots, Z letter groups. +If you want to use \gls*{xindy}, remember to use the +\pkgopt{xindy} package option. For example: +\begin{verbatim} +\documentclass[frenchb]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{babel} +\usepackage[xindy]{glossaries} +\end{verbatim} + +\begin{important} +Note that although an accented character, such as é, looks like a plain +character in your tex file, it's actually a macro and can therefore +cause problems. + +\begin{enumerate} +\item +If you use an accented (or other expandable) character at the start of +an entry name, you must place it in a group, or it will cause +a problem for commands that convert the first letter to uppercase +(e.g.\ \ics{Gls}) due to expansion issues. For example: +\begin{verbatim} +\newglossaryentry{elite}{name={{é}lite}, +description={select group or class}} +\end{verbatim} + +\item If you use an accented (or other expandable) character in an +entry name and you haven't switched off the \gloskey{name} key +\glsation{sanitize}, you must use commands like +\ics{glsentrytext} or \ics{glstext} instead of \ics{glsentryname} or +\ics{glsname} or you will end up with strange looking characters in +your document. + +\end{enumerate} +\end{important} + +If you use the \sty{inputenc} package, \gls{makeglossaries} +will pick up the encoding from the auxiliary file. If you use +\gls{xindy} explicitly instead of via \gls*{makeglossaries}, +you may need to specify the encoding using the \texttt{-C} +option. Read the \gls*{xindy} manual for further details. + +\subsubsection{Changing the Fixed Names} +\label{sec:fixednames} + +As from version 1.08, the \styfmt{glossaries} package now has +limited multi-lingual support, thanks to all the people who have sent +me the relevant translations either via email or via +\texttt{comp.text.tex}. +However you must load \sty{babel} or \sty{polyglossia} \emph{before} +\styfmt{glossaries} to enable this. Note that if \sty{babel} is loaded +and the \sty{translator} package is detected on \TeX's path, then the +\sty{translator} package will be loaded automatically. However, +it may not pick up on the required languages so, if the predefined +text is not translated, you may need to explicitly load the +\sty{translator} package with the required languages. For example: +\begin{verbatim} +\usepackage[spanish]{babel} +\usepackage[spanish]{translator} +\usepackage{glossaries} +\end{verbatim} +Alternatively, specify the language as a class option rather +than a package option. For example: +\begin{verbatim} +\documentclass[spanish]{report} + +\usepackage{babel} +\usepackage{glossaries} +\end{verbatim} + +If you want to use \sty{ngerman} or \sty{german} instead +of \sty{babel}, you will need to include the \sty{translator} package +to provide the translations. For example: +\begin{verbatim} +\documentclass[ngerman]{article} +\usepackage{ngerman} +\usepackage{translator} +\usepackage{glossaries} +\end{verbatim} + +The languages are currently supported by the +\styfmt{glossaries} package are listed in +\tableref{tab:supportedlanguages}. Please note that (apart from +spelling mistakes) I don't intend to change the default translations +as it will cause compatibility problems. + +\begin{table}[htbp] +\caption{Supported Languages} +\label{tab:supportedlanguages} +\begin{center} +\begin{tabular}{lc} +\bfseries Language & \bfseries As from version\\ +Brazilian Portuguese & 1.17\\ +Danish & 1.08\\ +Dutch & 1.08\\ +English & 1.08\\ +French & 1.08\\ +German & 1.08\\ +Irish & 1.08\\ +Italian & 1.08\\ +Hungarian & 1.08\\ +Polish & 1.13\\ +Serbian & 2.06\\ +Spanish & 1.08 +\end{tabular} +\end{center} +\end{table} + +The language dependent commands and \sty{translator} keys used by the +glossaries package are listed in \tableref{tab:predefinednames}. + +\begin{table}[htbp] +\caption{Customised Text} +\label{tab:predefinednames} +\begin{center} +\begin{tabular}{@{}llp{0.4\linewidth}@{}} +\bfseries Command Name & \bfseries Translator Key Word & +\bfseries Purpose\\ +\ics{glossaryname} & \texttt{Glossary} & Title of the main glossary.\\ +\ics{acronymname} & \texttt{Acronyms} & Title of the list of acronyms +(when used with package option \pkgopt{acronym}).\\ +\ics{entryname} & \texttt{Notation (glossaries)} & +Header for first column in the glossary (for 2, 3 or 4 column glossaries +that support headers).\\ +\ics{descriptionname} & \texttt{Description (glossaries)} & +Header for second column in the glossary (for 2, 3 or 4 column glossaries +that support headers).\\ +\ics{symbolname} & \texttt{Symbol (glossaries)} & Header for symbol +column in the glossary for glossary styles that support this option.\\ +\ics{pagelistname} & \texttt{Page List (glossaries)} & +Header for page list column in the glossary for glossaries that support +this option.\\ +\ics{glssymbolsgroupname} & \texttt{Symbols (glossaries)} & +Header for symbols section of the glossary for glossary styles that +support this option.\\ +\ics{glsnumbersgroupname} & \texttt{Numbers (glossaries)} & Header for +numbers section of the glossary for glossary styles that support +this option. +\end{tabular} +\end{center} +\end{table} + +Due to the varied nature of glossaries, it's likely that the +predefined translations may not be appropriate. If you are using the +\sty{babel} package and do not have the \sty{translator} package +installed, you need to be familiar with the advice given in +\urlref{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords}{changing +the words babel uses}. If you have the \sty{translator} package +installed, then you can provide your own dictionary with the +necessary modifications (using \cs{deftranslation}) and load it +using \cs{usedictionary}. + +\begin{important} +Note that the dictionaries are loaded at the beginning of the +document, so it won't have any effect if you put \cs{deftranslation} +in the preamble. It should be put in your personal dictionary +instead (as in the example below). See the \sty{translator} +documentation for further details. (Now with \sty{beamer} +documentation.) +\end{important} + +Your custom dictionary doesn't have to be just a translation from +English to another language. You may prefer to have a dictionary for +a particular type of document. For example, suppose your +institution's in-house reports have to have the glossary labelled as +\qt{Nomenclature} and the page list should be labelled +\qt{Location}, then you can create a file called, say, +\begin{verbatim} +myinstitute-glossaries-dictionary-English.dict +\end{verbatim} +that contains the following: +\begin{verbatim} +\ProvidesDictionary{myinstitute-glossaries-dictionary}{English} +\deftranslation{Glossary}{Nomenclature} +\deftranslation{Page List (glossaries)}{Location} +\end{verbatim} +You can now load it using: +\begin{verbatim} +\usedictionary{myinstitute-glossaries-dictionary} +\end{verbatim} +(Make sure that \texttt{myinstitute-glossaries-dictionary-English.dict} +can be found by \TeX.) If you want to share your custom dictionary, +you can upload it to \href{http://www.ctan.org/}{CTAN}. + +If you are using \sty{babel} and don't want to use the +\sty{translator} interface, you can suppress it using the package +option \pkgopt[false]{translate}, and either load +\sty{glossaries-babel} after \styfmt{glossaries} or specify you're own +translations. For example: +\begin{verbatim} +\documentclass[british]{article} + +\usepackage{babel} +\usepackage[translate=false]{glossaries} +\usepackage{glossaries-babel} +\end{verbatim} +or: +\begin{verbatim} +\documentclass[british]{article} + +\usepackage{babel} +\usepackage[translate=false]{glossaries} + +\addto\captionsbritish{% + \renewcommand*{\glossaryname}{List of Terms}% + \renewcommand*{\acronymname}{List of Acronyms}% + \renewcommand*{\entryname}{Notation}% + \renewcommand*{\descriptionname}{Description}% + \renewcommand*{\symbolname}{Symbol}% + \renewcommand*{\pagelistname}{Page List}% + \renewcommand*{\glssymbolsgroupname}{Symbols}% + \renewcommand*{\glsnumbersgroupname}{Numbers}% +} +\end{verbatim} + +If you are using \sty{polyglossia} instead of \sty{babel}, +\sty{glossaries-polyglossia} will automatically be loaded unless +you specify the package option \pkgopt[false]{translate}. + +Note that \gls{xindy} provides much better multi-lingual support +than \gls{makeindex}, so it's recommended that you use \gls*{xindy} +if you have glossary entries that contain diacritics or +non-Roman letters. See \sectionref{sec:xindy} for further +details. + +\subsection{Generating the Associated Glossary Files} +\label{sec:makeglossaries} + +In order to generate a sorted glossary with compact location lists, +it is necessary to use an external indexing application as an +intermediate step. It is this application that creates the file +containing the code that typesets the glossary. If this step is +omitted, the glossaries will not appear in your document. The two +indexing applications that are most commonly used with \LaTeX\ are +\gls{makeindex} and \gls{xindy}. As from version 1.17, the +\styfmt{glossaries} package can be used with either of these +applications. Previous versions were designed to be used with +\gls*{makeindex} only. Note that \gls*{xindy} has much better +multi-lingual support than \gls*{makeindex}, so \gls*{xindy} is +recommended if you're not writing in English. Commands that only +have an effect when \gls*{xindy} is used are described in +\sectionref{sec:xindy}. + +The \styfmt{glossaries} package comes with the Perl script +\gls{makeglossaries} which will run \gls{makeindex} or \gls{xindy} +on all the glossary files using a customized style file (which is +created by \ics{makeglossaries}). See +\sectionref{sec:makeglossariesapp} for further +details. Perl is stable, cross-platform, open source software that +is used by a number of \TeX-related applications. Further +information is available at \url{http://www.perl.org/about.html}. +The advantages of using \gls*{makeglossaries}: +\begin{itemize} +\item It automatically detects whether to use \gls*{makeindex} or +\gls*{xindy} and sets the relevant application switches. + +\item One call of \gls*{makeglossaries} will run +\gls*{makeindex}/\gls*{xindy} for each glossary type. + +\item If things go wrong, \gls{makeglossaries} will scan the +messages from \gls{makeindex} or \gls{xindy} and attempt to diagnose +the problem in relation to the \styfmt{glossaries} package. This +will hopefully provide more helpful messages in some cases. If it +can't diagnose the problem, you will have to read the relevant transcript +file and see if you can work it out from the \gls*{makeindex} or +\gls*{xindy} messages. + +\end{itemize} + +Whilst it is strongly recommended that you use the +\gls{makeglossaries} script, it is possible to use the +\styfmt{glossaries} package without having Perl installed. In which +case, if you have used the \pkgopt{xindy} package option, you will +need to use \gls{xindy} (see \sectionref{sec:xindyapp}), otherwise +you will need to use \gls{makeindex} (see +\sectionref{sec:makeindexapp}). Note that some commands and package +options have no effect if you don't use \gls*{makeglossaries}. These +are listed in \tableref{tab:makeglossariesCmds}. + +Note that if any of your entries use an entry +that is not referenced outside the glossary, you will need to +do an additional \gls{makeglossaries}, \gls{makeindex} +or \gls{xindy} run, as appropriate. For example, +suppose you have defined the following entries:\footnote{Note that +I'm assuming the \glsation{sanitize} has been switched on for the +\gloskey{description} key, which is why I haven't used +\cs{protect}\cs{gls} in the description.} +\begin{verbatim} +\newglossaryentry{citrusfruit}{name={citrus fruit}, +description={fruit of any citrus tree. (See also +\gls{orange})}} + +\newglossaryentry{orange}{name={orange}, +description={an orange coloured fruit.}} +\end{verbatim} +and suppose you have \verb|\gls{citrusfruit}| in your document +but don't reference the \texttt{orange} entry, then the +\texttt{orange} entry won't appear in your glossary until +you first create the glossary and then do another run +of \gls{makeglossaries}, \gls{makeindex} or \gls{xindy}. +For example, if the document is called \texttt{myDoc.tex}, then +you must do: +\begin{prompt} +latex myDoc +makeglossaries myDoc +latex myDoc +makeglossaries myDoc +latex myDoc +\end{prompt} + +Likewise, an additional \gls{makeglossaries} and \LaTeX\ run +may be required if the document pages shift with re-runs. For +example, if the page numbering is not reset after the table of +contents, the insertion of the table of contents on the second +\LaTeX\ run may push glossary entries across page boundaries, which +means that the \glspl{numberlist} in the glossary may +need updating. + +The examples in this document assume that you are accessing +\gls{makeglossaries}, \gls{xindy} or \gls{makeindex} via a terminal. +Windows users can use the MSDOS Prompt which is usually accessed via +the \menu{Start}\submenu{All Programs} menu or +\menu{Start}\submenu{All Programs}\submenu{Accessories} menu. + +Alternatively, your text editor may have the facility to create a +function that will call the required application. The article +\href{http://www.latex-community.org/index.php?option=com_content&view=article\&id=263:glossaries-nomenclature-lists-of-symbols-and-acronyms&catid=55:latex-general&Itemid=114}{\qt{Glossaries, Nomenclature, List of Symbols and +Acronyms}} +in the \urlfootref{http://www.latex-community.org/}{\LaTeX\ +Community's} Know How section +describes how to do this for TeXnicCenter, and the thread +\href{http://groups.google.com/group/comp.text.tex/browse_thread/thread/edd83831b81b0759?hl=en}{\qt{Executing Glossaries' makeindex from a WinEdt +macro}} on the \texttt{comp.text.tex} newsgroup +describes how to do it for WinEdt. For other editors see the editor's +user manual for further details. + +If any problems occur, remember to check the transcript files +(e.g.\ \filetype{.glg} or \filetype{.alg}) for messages. + +\begin{table}[htbp] +\caption{Commands and package options that have no effect when +using \texttt{xindy} or \texttt{makeindex} explicitly} +\label{tab:makeglossariesCmds} +\vskip\baselineskip +\begin{tabular}{@{}lll@{}} +\bfseries Command or Package Option & \gls{makeindex} & +\gls{xindy}\\ +\pkgopt[letter]{order} & use \texttt{-l} & + use \texttt{-M ord/letorder}\\ +\pkgopt[word]{order} & default & default\\ +\pkgopt{xindy}=\{\pkgoptfmt{language=}\meta{lang}\pkgoptfmt{,codename=}\meta{code}\} & +N/A & use \texttt{-L} \meta{lang} \texttt{-C} \meta{code}\\ +\ics{GlsSetXdyLanguage}\marg{lang} & N/A & +use \texttt{-L} \meta{lang}\\ +\ics{GlsSetXdyCodePage}\marg{code} & N/A & +use \texttt{-C} \meta{code} +\end{tabular} +\par +\end{table} + + +\subsubsection{Using the makeglossaries Perl Script} +\label{sec:makeglossariesapp} + +The \gls{makeglossaries} script picks up the relevant information +from the auxiliary (\filetype{.aux}) file and will either call +\gls{xindy} or \gls{makeindex}, depending on the supplied +information. Therefore, you only need to pass the document's name +without the extension to \gls*{makeglossaries}. For example, if your +document is called \texttt{myDoc.tex}, type the following in your +terminal: +\begin{prompt} +latex myDoc +makeglossaries myDoc +latex myDoc +\end{prompt} +You may need to explicitly load \gls{makeglossaries} into Perl: +\begin{prompt} +perl makeglossaries myDoc +\end{prompt} +There is a batch file called \texttt{makeglossaries.bat} which does +this for Windows users, but you must have Perl installed to be able +to use it. + +The \gls{makeglossaries} script contains POD (Plain Old +Documentation). If you want, you can create a man page for +\gls*{makeglossaries} using \app{pod2man} and move the +resulting file onto the man path. Alternatively do +\texttt{makeglossaries -{}-help} for a list of all options or +\texttt{makeglossaries -{}-version} for the version number. + +\begin{important} +When upgrading the \styfmt{glossaries} package, make sure you also +upgrade your version of \gls{makeglossaries}. The current version is +2.02. +\end{important} + +\subsubsection{Using xindy explicitly} +\label{sec:xindyapp} + +If you want to use \gls{xindy} to process the glossary +files, you must make sure you have used the +\pkgopt{xindy} package option: +\begin{verbatim} +\usepackage[xindy]{glossaries} +\end{verbatim} +This is required regardless of whether you use \gls{xindy} +explicitly or whether it's called implicitly via +\gls{makeglossaries}. This causes the glossary +entries to be written in raw \gls*{xindy} format, so you need to +use \texttt{-I xindy} \emph{not} \texttt{-I tex}. + +To run \gls{xindy} type the following in your terminal +(all on one line): +\begin{prompt} +xindy -L \meta{language} -C \meta{encoding} -I xindy -M \meta{style} -t \meta{base}.glg -o \meta{base}.gls \meta{base}.glo +\end{prompt} +where \meta{language} is the required language name, \meta{encoding} +is the encoding, \meta{base} is the name of the document without the +\filetype{.tex} extension and \meta{style} is the name of the +\gls{xindy} style file without the \filetype{.xdy} extension. +The default name for this style file is \meta{base}\filetype{.xdy} +but can be changed via \ics{setStyleFile}\marg{style}. You may need +to specify the full path name depending on the current working +directory. If any of the file names contain spaces, you must delimit +them using double-quotes. + +For example, if your document is called \texttt{myDoc.tex} and +you are using UTF8 encoding in English, then type the +following in your terminal: +\begin{prompt} +xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.glg -o myDoc.gls myDoc.glo +\end{prompt} + +Note that this just creates the main glossary. You need to do +the same for each of the other glossaries (including the +list of acronyms if you have used the \pkgopt{acronym} +package option), substituting \filetype{.glg}, \filetype{.gls} +and \filetype{.glo} with the relevant extensions. For example, +if you have used the \pkgopt{acronym} package option, then +you would need to do: +\begin{prompt} +xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.alg -o myDoc.acr myDoc.acn +\end{prompt} +For additional glossaries, the extensions are those supplied +when you created the glossary with \ics{newglossary}. + +Note that if you use \gls{makeglossaries} instead, you can +replace all those calls to \gls{xindy} with just one call +to \gls*{makeglossaries}: +\begin{prompt} +makeglossaries myDoc +\end{prompt} +Note also that some commands and package options have no effect if +you use \gls{xindy} explicitly instead of using +\gls*{makeglossaries}. These are listed in +\tableref{tab:makeglossariesCmds}. + + +\subsubsection{Using makeindex explicitly} +\label{sec:makeindexapp} + +If you want to use \gls{makeindex} explicitly, you must +make sure that you haven't used the \pkgopt{xindy} package +option or the glossary entries will be written in the wrong +format. To run \gls*{makeindex}, type the following in +your terminal: +\begin{prompt} +makeindex -s \meta{style}.ist -t \meta{base}.glg -o \meta{base}.gls \meta{base}.glo +\end{prompt} +where \meta{base} is the name of your document without the +\filetype{.tex} extension and \meta{style}\filetype{.ist} is the +name of the \gls{makeindex} style file. By default, this is +\meta{base}\filetype{.ist}, but may be changed via +\ics{setStyleFile}\marg{style}. Note that there are other options, +such as \texttt{-l} (letter ordering). See the \gls*{makeindex} +manual for further details. + +For example, if your document is called \texttt{myDoc.tex}, then +type the following at the terminal: +\begin{prompt} +makeindex -s myDoc.ist -t myDoc.glg -o myDoc.gls myDoc.glo +\end{prompt} +Note that this only creates the main glossary. If you have +additional glossaries (for example, if you have used the +\pkgopt{acronym} package option) then you must call +\gls{makeindex} for each glossary, substituting +\filetype{.glg}, \filetype{.gls} and \filetype{.glo} with the +relevant extensions. For example, if you have used the +\pkgopt{acronym} package option, then you need to type the +following in your terminal: +\begin{prompt} +makeindex -s myDoc.ist -t myDoc.alg -o myDoc.acr myDoc.acn +\end{prompt} +For additional glossaries, the extensions are those supplied +when you created the glossary with \ics{newglossary}. + +Note that if you use \gls{makeglossaries} instead, you can +replace all those calls to \gls{makeindex} with just one call +to \gls*{makeglossaries}: +\begin{prompt} +makeglossaries myDoc +\end{prompt} +Note also that some commands and package options have no effect if +you use \gls*{makeindex} explicitly instead of using +\gls{makeglossaries}. These are listed in +\tableref{tab:makeglossariesCmds}. + + +\subsubsection{Note to Front-End and Script Developers} + +The information needed to determine whether to use \gls{xindy} +or \gls{makeindex} and the information needed to call those +applications is stored in the auxiliary file. This information can +be gathered by a front-end, editor or script to make the glossaries +where appropriate. This section describes how the information is +stored in the auxiliary file. + +The file extensions used by each defined glossary are given by +\begin{definition}[\DescribeMacro{\@newglossary}] +\cs{@newglossary}\marg{label}\marg{log}\marg{out-ext}\marg{in-ext} +\end{definition} +where \meta{in-ext} is the extension of the \emph{indexing +application's} input file (the output file from the \styfmt{glossaries} +package's point of view), \meta{out-ext} is the extension of the +\emph{indexing application's} output file (the input file from +the \styfmt{glossaries} package's point of view) and \meta{log} is the +extension of the indexing application's transcript file. The label +for the glossary is also given for information purposes only, but +is not required by the indexing applications. For example, the +information for the main glossary is written as: +\begin{verbatim} +\@newglossary{main}{glg}{gls}{glo} +\end{verbatim} + +The indexing application's style file is specified by +\begin{definition}[\DescribeMacro{\@istfilename}] +\cs{@istfilename}\marg{filename} +\end{definition} +The file extension indicates whether to use \gls{makeindex} +(\filetype{.ist}) or \gls{xindy} (\filetype{.xdy}). Note that +the glossary information is formatted differently depending on +which indexing application is supposed to be used, so it's +important to call the correct one. + +Word or letter ordering is specified by: +\begin{definition}[\DescribeMacro{\@glsorder}] +\cs{@glsorder}\marg{order} +\end{definition} +where \meta{order} can be either \texttt{word} or \texttt{letter}. + +If \gls{xindy} should be used, the language and code page +for each glossary is specified by +\begin{definition}[\DescribeMacro{\@xdylanguage}\DescribeMacro{\@gls@codepage}] +\cs{@xdylanguage}\marg{label}\marg{language}\\ +\cs{@gls@codepage}\marg{label}\marg{code} +\end{definition} +where \meta{label} identifies the glossary, \meta{language} is +the root language (e.g.\ \texttt{english}) and \meta{code} +is the encoding (e.g.\ \texttt{utf8}). These commands are omitted +if \gls{makeindex} should be used. + + +\section{Package Options} +\label{sec:pkgopts} + +This section describes the available \styfmt{glossaries} package options. + +\subsection{General Options} +\label{sec:pkgopts-general} + +\begin{description} +\item[\pkgopt{nowarn}] This suppresses all warnings generated by +the \styfmt{glossaries} package. + +\item[\pkgopt{nomain}] This suppresses the creation of the main +glossary. Note that if you use this option, you must create another +glossary in which to put all your entries (either via the +\pkgopt{acronym} package option described in +\sectionref{sec:pkgopts-acronym} or via \ics{newglossary} described +in \sectionref{sec:newglossary}). + +\item[\pkgopt{sanitize}] This is a +\meta{key}=\meta{value} option whose value is also a +\meta{key}=\meta{value} list. By default, the \styfmt{glossaries} +package \glspl{sanitize} the values of the \gloskey{name}, +\gloskey{description} and \gloskey{symbol} keys used when defining a +new glossary entry. This means that you can use fragile commands in +those keys, but it may lead to unexpected results if you try to +display these values within the document text. This sanitization can +be switched off using the \pkgopt{sanitize} package option. +For example, to switch off the sanitization +for the \gloskey{description} and \gloskey{name} keys, but not for +the \gloskey{symbol} key, do: +\begin{verbatim} +\usepackage[sanitize={name=false,description=false,% +symbol=true}]{glossaries} +\end{verbatim} +You can use \pkgopt[none]{sanitize} as a shortcut for\newline +\pkgoptfmt{sanitize=\{name=false,description=false,symbol=false\}}. + +\begin{important}% +\textbf{Note}: this sanitization only applies to the \gloskey{name}, +\gloskey{description} and \gloskey{symbol} keys. It doesn't apply +to any of the other keys (except the \gloskey{sort} key which is +always \glsd{sanitize} if \pkgopt[standard]{sort} is in effect) so fragile commands contained in the value of +the other keys must always be protected using \cs{protect}. +Since the value of the \gloskey{text} key is obtained from the +\gloskey{name} key, you will still need to protect fragile commands +in the \gloskey{name} key if you don't use the \gloskey{text} key. +\end{important} + +\item[\pkgopt{savewrites}] This is a boolean option to minimises the +number of write registers used by the \styfmt{glossaries} package. +(Default is \pkgopt[false]{savewrites}.) There are only a limited +number of write registers, and if you have a large number of +glossaries or if you are using a class or other packages that +create a lot of external files, you may exceed the maximum number +of available registers. If \pkgopt{savewrites} is set, the glossary +information will be stored in token registers until the end of the +document when they will be written to the external files. If you run +out of token registers, you can use \sty{etex}. + +\begin{important} +If you want to use \TeX's \ics{write18} mechanism to call +\gls{makeindex} or \gls{xindy} from your document and use +\pkgopt{savewrites}, you must create the external files with +\cs{glswritefiles} before you call \gls*{makeindex}/\gls*{xindy}. Also set +\cs{glswritefiles} to nothing or \cs{relax} before the end of the +document to avoid rewriting the files. For example: +\begin{verbatim} +\glswritefiles +\write18{makeindex -s \istfilename\space -t \jobname.glg +-o \jobname.gls \jobname} +\let\glswritefiles\relax +\end{verbatim} +\end{important} + +\item[\pkgopt{translate}] This is a boolean option. The default is +\pkgoptval{true}{translate} if \sty{babel}, \sty{polyglossia} or +\sty{translator} have been loaded, otherwise the default value is +\pkgoptval{false}{translate}. + + \begin{description} + \item[{\pkgopt[true]{translate}}] If \sty{babel} has been loaded + and the \sty{translator} package is installed, \sty{translator} + will be loaded and the translations will be provided by the + \sty{translator} package interface. You can modify the + translations by providing your own dictionary. If the + \sty{translator} package isn't installed and \sty{babel} is + loaded, the \sty{glossaries-babel} package will + be loaded and the translations will be provided using \styfmt{babel}'s + \cs{addto}\cs{caption}\meta{language} mechanism. If + \sty{polyglossia} has been loaded, \sty{glossaries-polyglossia} + will be loaded. + + \item[{\pkgopt[false]{translate}}] Don't provide translations, even + if \sty{babel} or \sty{polyglossia} has been loaded. You can + then provide you're own translations or explicitly load + \sty{glossaries-babel} or \sty{glossaries-polyglossia}. + \end{description} + +See \sectionref{sec:fixednames} for further details. + +\item[\pkgopt{hyperfirst}] This is a boolean option that specifies +whether each term has a hyperlink on \firstuse. The default is +\pkgopt[true]{hyperfirst} (terms on \gls{firstuse} have a hyperlink, +unless explicitly suppressed using starred versions of commands +such as \ics{gls*}). + +\end{description} + +\subsection{Sectioning and TOC Options} +\label{sec:pkgopts-sec} + +\begin{description} +\item[\pkgopt{toc}] Add the glossaries to the table of contents. +Note that an extra \LaTeX\ run is required with this option. +Alternatively, you can switch this function on and off using +\begin{definition}[\DescribeMacro{\glstoctrue}] +\cs{glstoctrue} +\end{definition} +and +\begin{definition}[\DescribeMacro{\glstocfalse}] +\cs{glstocfalse} +\end{definition} + +\item[\pkgopt{numberline}] When used with \pkgopt{toc}, this will +add \ics{numberline}\verb|{}| in the final argument of +\ics{addcontentsline}. This will align the table of contents entry +with the numbered section titles. Note that this option has no +effect if the \pkgopt{toc} option is omitted. If \pkgopt{toc} is +used without \pkgopt{numberline}, the title will be aligned with +the section numbers rather than the section titles. + +\item[\pkgopt{section}] This is a \meta{key}=\meta{value} option. Its +value should be the name of a sectional unit (e.g.\ chapter). +This will make the glossaries appear in the named sectional unit, +otherwise each glossary will appear in a chapter, if chapters +exist, otherwise in a section. Unnumbered sectional units will be used +by default. Example: +\begin{verbatim} +\usepackage[section=subsection]{glossaries} +\end{verbatim} +You can omit the value if you want to use sections, i.e.\ +\begin{verbatim} +\usepackage[section]{glossaries} +\end{verbatim} +is equivalent to +\begin{verbatim} +\usepackage[section=section]{glossaries} +\end{verbatim} +You can change this value later in the document using +\begin{definition}[\DescribeMacro{\setglossarysection}] +\cs{setglossarysection}\marg{name} +\end{definition} +where \meta{name} is the sectional unit. + +The start of each glossary adds information to the page header via +\begin{definition}[\DescribeMacro{\glossarymark}] +\cs{glossarymark}\marg{glossary title} +\end{definition} +This defaults to \cs{@mkboth} unless \cls{memoir} is loaded, but you may +need to redefine it. +For example, to only change the right header: +\begin{verbatim} +\renewcommand{\glossarymark}[1]{\markright{#1}} +\end{verbatim} +or to prevent it from changing the headers: +\begin{verbatim} +\renewcommand{\glossarymark}[1]{} +\end{verbatim} + +Occasionally you may find that another package defines +\cs{cleardoublepage} when it is not required. This may cause an +unwanted blank page to appear before each glossary. This can +be fixed by redefining \ics{glsclearpage}: +\begin{verbatim} +\renewcommand*{\glsclearpage}{\clearpage} +\end{verbatim} + +\item[\pkgopt{numberedsection}] +The glossaries are placed in unnumbered sectional units by default, +but this can be changed using \pkgopt{numberedsection}. This option can take +three possible values: \pkgoptval{false}{numberedsection} (no +number, i.e.\ use starred form), \pkgoptval{nolabel}{numberedsection} +(numbered, i.e.\ unstarred form, but not labelled) and +\pkgoptval{autolabel}{numberedsection} (numbered with automatic +labelling). If \pkgopt[autolabel]{numberedsection} is used, each +glossary is given a label that matches the glossary type, so the +main (default) glossary is labelled \texttt{main}, the list of +acronyms is labelled \texttt{acronym}\footnote{if the +\pkgopt{acronym} option is used, otherwise the list of +acronyms is the main glossary} and additional glossaries are labelled +using the value specified in the first mandatory argument to +\cs{newglossary}. For example, if you load \styfmt{glossaries} +using: +\begin{verbatim} +\usepackage[section,numberedsection=autolabel]{glossaries} +\end{verbatim} +then each glossary will appear in a numbered section, and can +be referenced using something like: +\begin{verbatim} +The main glossary is in section~\ref{main} and the list of +acronyms is in section~\ref{acronym}. +\end{verbatim} +If you can't decide whether to have the acronyms in the main +glossary or a separate list of acronyms, you can use +\ics{acronymtype} which is set to \texttt{main} if the +\pkgopt{acronym} option is not used and is set to \texttt{acronym} +if the \pkgopt{acronym} option is used. For example: +\begin{verbatim} +The list of acronyms is in section~\ref{\acronymtype}. +\end{verbatim} + +As from version 1.14, you can add a prefix to the label by +redefining +\begin{definition}[\DescribeMacro{\glsautoprefix}] +\cs{glsautoprefix} +\end{definition} +For example: +\begin{verbatim} +\renewcommand*{\glsautoprefix}{glo:} +\end{verbatim} +will add \texttt{glo:} to the automatically generated label, so +you can then, for example, refer to the list of acronyms as follows: +\begin{verbatim} +The list of acronyms is in section~\ref{glo:\acronymtype}. +\end{verbatim} +Or, if you are undecided on a prefix: +\begin{verbatim} +The list of acronyms is in section~\ref{\glsautoprefix\acronymtype}. +\end{verbatim} + +\end{description} + +\subsection{Glossary Appearance Options} +\label{sec:pkgopts-printglos} + +\begin{description} +\item[\pkgopt{entrycounter}] This is a boolean option. (Default +is \pkgopt[false]{entrycounter}.) If set, each main (level~0) +glossary entry will be numbered when using the standard glossary +styles. This option creates the counter +\DescribeCounter{glossaryentry}\ctrfmt{glossaryentry}. + +If you use this option, you can reference the entry number +within the document using +\begin{definition}[\DescribeMacro{\glsrefentry}] +\cs{glsrefentry}\marg{label} +\end{definition} +where \meta{label} is the label associated with that glossary entry. + +\begin{important} +If you use \cs{glsrefentry}, you must run \LaTeX\ twice after +creating the glossary files using \gls{makeglossaries}, +\gls{makeindex} or \gls{xindy} to ensure the cross-references are +up-to-date. +\end{important} + +\item[\pkgopt{counterwithin}] This is a \meta{key}=\meta{value} +option where \meta{value} is the name of a counter. If used, this +option will automatically set \pkgopt[true]{entrycounter} and the +\ctr{glossaryentry} counter will be reset every time \meta{value} is +incremented. + +\begin{important} +The \ctr{glossaryentry} counter isn't automatically reset at the +start of each glossary, except when glossary section numbering is on +and the counter used by \pkgopt{counterwithin} is the same as the +counter used in the glossary's sectioning command. If you want +the counter reset at the start of each glossary, you can redefine +\ics{glossarypreamble} so that it sets \ctr{glossaryentry} to zero: +\begin{verbatim} +\renewcommand{\glossarypreamble}{% + \setcounter{glossaryentry}{0}% +} +\end{verbatim} +\end{important} + +\item[\pkgopt{subentrycounter}] This is a boolean option. (Default +is \pkgopt[false]{subentrycounter}.) If set, each level~1 +glossary entry will be numbered when using the standard glossary +styles. This option creates the counter +\DescribeCounter{glossarysubentry}\ctrfmt{glossarysubentry}. +The counter is reset with each main (level~0) entry. Note that this +package option is independent of \pkgopt{entrycounter}. You can +reference the number within the document using +\ics{glsrefentry}\marg{label} where \meta{label} is the label +associated with the sub-entry. (See above.) + +\item[\pkgopt{style}] This is a \meta{key}=\meta{value} option. +(Default is \pkgopt[list]{style}.) Its value should be the name of +the glossary style to use. This key may only be used for styles +defined in \sty{glossary-list}, \sty{glossary-long}, +\sty{glossary-super} or \sty{glossary-tree}. (See +\sectionref{sec:styles}.) + +\item[\pkgopt{nolong}] This prevents the \styfmt{glossaries} package +from automatically loading \sty{glossary-long} (which means that +the \sty{longtable} package also won't be loaded). This reduces +overhead by not defining unwanted styles and commands. Note that if +you use this option, you won't be able to use any of the +glossary styles defined in the \styfmt{glossary-long} package. + +\item[\pkgopt{nosuper}] This prevents the \styfmt{glossaries} package +from automatically loading \sty{glossary-super} (which means that +the \sty{supertabular} package also won't be loaded). This reduces +overhead by not defining unwanted styles and commands. Note that if +you use this option, you won't be able to use any of the +glossary styles defined in the \styfmt{glossary-super} package. + +\item[\pkgopt{nolist}] This prevents the \styfmt{glossaries} package +from automatically loading \sty{glossary-list}. This reduces +overhead by not defining unwanted styles. Note that if +you use this option, you won't be able to use any of the +glossary styles defined in the \styfmt{glossary-list} package. +Note that since the default style is \glostyle{list}, you will +also need to use the \pkgopt{style} option to set the style to +something else. + +\item[\pkgopt{notree}] This prevents the \styfmt{glossaries} package +from automatically loading \sty{glossary-tree}. This reduces +overhead by not defining unwanted styles. Note that if +you use this option, you won't be able to use any of the +glossary styles defined in the \styfmt{glossary-tree} package. + +\item[\pkgopt{nostyles}] This prevents all the predefined styles +from being loaded. This option is provided in the event that the +user has custom styles that are not dependent on the styles +provided by the \styfmt{glossaries} package. Note that if you use +this option, you can't use the \pkgopt{style} package option. Instead +you must either use \ics{glossarystyle}\marg{style} or +the \gloskey[printglossary]{style} key in the +optional argument to \ics{printglossary}. + +\item[\pkgopt{nonumberlist}] This option will suppress the +associated \glspl{numberlist} in the glossaries (see also +\sectionref{sec:numberlists}). + +\item[\pkgopt{seeautonumberlist}] If you suppress the +\glspl{numberlist} with \pkgopt{nonumberlist}, described above, this +will also suppress any cross-referencing information supplied by the +\gloskey{see} key in \ics{newglossaryentry} or \ics{glssee}. If you +use \pkgopt{seeautonumberlist}, the \gloskey{see} key will +automatically implement \gloskey{nonumberlist=false} for that entry. +(Note this doesn't affect \cs{glssee}.) For further details see +\sectionref{sec:crossref}. + +\item[\pkgopt{counter}] This is a \meta{key}=\meta{value} option. +(Default is \pkgopt[page]{counter}.) The value should be the name of +the default counter to use in the \glspl{numberlist} +(see \sectionref{sec:numberlists}). + +\end{description} + +\subsection{Sorting Options} +\label{sec:pkgopts-sort} + +\begin{description} +\item[\pkgopt{sort}] This is a \meta{key}=\meta{value} option where +the option can only have one of the following values: + +\begin{itemize} +\item \pkgoptval{standard}{sort} : entries are sorted according to +the value of the \gloskey{sort} key used in \ics{newglossaryentry} +(if present) or the \gloskey{name} key (if \gloskey{sort} key is +missing); + +\item \pkgoptval{def}{sort} : entries are sorted in the order in +which they were defined (the \gloskey{sort} key in +\cs{newglossaryentry} is ignored); + +\item \pkgoptval{use}{sort} : entries are sorted according to the +order in which they are used in the document (the \gloskey{sort} key +in \cs{newglossaryentry} is ignored). +\end{itemize} + +The default is \pkgopt[standard]{sort}. + +\item[\pkgopt{order}] This may take two values: +\pkgoptval{word}{order} or \pkgoptval{letter}{order}. The default +is word ordering. + +\begin{important} +Note that the \pkgopt{order} option has no effect if you don't use +\gls{makeglossaries}. +\end{important} + +\item[\pkgopt{makeindex}] (Default) The glossary information and +indexing style file will be written in \gls{makeindex} format. If +you use \gls{makeglossaries}, it will automatically detect that it +needs to call \gls*{makeindex}. If you don't use +\gls*{makeglossaries}, you need to remember to use \gls*{makeindex} +not \gls{xindy}. The indexing style file will been given a +\filetype{.ist} extension. + +\item[\pkgopt{xindy}] The glossary information and indexing style +file will be written in \gls{xindy} format. If you use +\gls{makeglossaries}, it will automatically detect that it needs to +call \gls*{xindy}. If you don't use \gls*{makeglossaries}, you need to +remember to use \gls*{xindy} not \gls{makeindex}. The indexing style +file will been given a \filetype{.xdy} extension. + +The \pkgopt{xindy} package option may additionally have a value that +is a \meta{key}=\meta{value} comma-separated list to override the +language and codepage. For example: +\begin{verbatim} +\usepackage[xindy={language=english,codepage=utf8}]{glossaries} +\end{verbatim} +You can also specify whether you want a number group in the +glossary. This defaults to true, but can be suppressed. For example: +\begin{verbatim} +\usepackage[xindy={glsnumbers=false}]{glossaries} +\end{verbatim} +See \sectionref{sec:xindy} for further details on using \gls{xindy} +with the \styfmt{glossaries} package. + +\end{description} + +\subsection{Acronym Options} +\label{sec:pkgopts-acronym} + +\begin{description} +\item[\pkgopt{acronym}] This creates a new glossary with the +label \texttt{acronym}. This is equivalent to: +\begin{verbatim} +\newglossary[alg]{acronym}{acr}{acn}{\acronymname} +\end{verbatim} +If the \pkgopt{acronym} package option is used, \ics{acronymtype} +is set to \texttt{acronym} otherwise it is set to +\texttt{main}.\footnote{Actually it sets \ics{acronymtype} to +\ics{glsdefaulttype} if the \pkgopt{acronym} package option is +not used, but \ics{glsdefaulttype} usually has the value +\texttt{main}.} +Entries that are defined using \ics{newacronym} are placed in +the glossary whose label is given by \ics{acronymtype}, unless +another glossary is explicitly specified. + +\item[\pkgopt{acronymlists}] By default, only the \cs{acronymtype} +glossary is considered to be a list of acronyms. If you have other +lists of acronyms, you can specify them as a comma-separated list +in the value of \pkgopt{acronymlists}. For example, if you use the +\pkgopt{acronym} package option but you also want the \texttt{main} +glossary to also contain a list of acronyms, you can do: +\begin{verbatim} +\usepackage[acronym,acronymlists={main}]{glossaries} +\end{verbatim} +No check is performed to determine if the listed glossaries exist, +so you can add glossaries you haven't defined yet. For example: +\begin{verbatim} +\usepackage[acronym,acronymlists={main,acronym2}]{glossaries} +\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms} +\end{verbatim} + +\item[\pkgopt{description}] This option changes the definition of +\ics{newacronym} to allow a description. This option has no effect if +you defined your own custom acronym style. See +\sectionref{sec:acronyms} for further details. + +\item[\pkgopt{footnote}] This option changes the definition of +\ics{newacronym} and the way that acronyms are displayed. This +option has no effect if you defined your own custom acronym style. See +\sectionref{sec:acronyms} for further details. + +\item[\pkgopt{smallcaps}] This option changes the definition of +\ics{newacronym} and the way that acronyms are displayed. This +option may have no effect if you defined your own custom acronym +style. See \sectionref{sec:acronyms} for further details. + +\item[\pkgopt{smaller}] This option changes the definition of +\ics{newacronym} and the way that acronyms are displayed. If you use +this option, you will need to include the \sty{relsize} package or +otherwise define \ics{textsmaller} or redefine \ics{acronymfont}. +This option may have no effect if you defined your own custom acronym +style. See \sectionref{sec:acronyms} for further details. + +\item[\pkgopt{dua}] This option changes the definition of +\ics{newacronym} so that acronyms are always expanded. This +option has no effect if you defined your own custom acronym style. +See \sectionref{sec:acronyms} for further details. + +\item[\pkgopt{shortcuts}] This option provides shortcut commands +for acronyms. See \sectionref{sec:acronyms} for further details. + +\end{description} + +\section{Setting Up} +\label{sec:setup} + +The command +\begin{definition}[\DescribeMacro{\makeglossaries}] +\cs{makeglossaries} +\end{definition} +must be placed in the preamble in order to create the customised +\gls{makeindex} (\filetype{.ist}) or \gls{xindy} (\filetype{.xdy}) +style file and to ensure that glossary entries are written to the +appropriate output files. If you omit \cs{makeglossaries} none of +the glossaries will be created. + +\begin{important} +Note that some of the commands provided by the \styfmt{glossaries} +package must be placed before \cs{makeglossaries} as they are +required when creating the customised style file. If you attempt +to use those commands after \cs{makeglossaries} you will generate +an error. +\end{important} + +You can suppress the creation of the customised \gls{xindy} +or \gls{makeindex} style file using +\begin{definition}[\DescribeMacro{\noist}] +\cs{noist} +\end{definition} +Note that this command must be used before \cs{makeglossaries}. +\begin{important} +Note that if you have a custom \filetype{.xdy} file created when using +\styfmt{glossaries} version 2.07 or below, you will need to use the +\pkgopt{compatible-2.07} package option with it. +\end{important} + +The default name for the customised style file is given by +\ics{jobname}\filetype{.ist} (for \gls{makeindex}) or +\ics{jobname}\filetype{.xdy} (for \gls{xindy}). This name may be +changed using: +\begin{definition}[\DescribeMacro{\setStyleFile}] +\cs{setStyleFile}\marg{name} +\end{definition} +where \meta{name} is the name of the style file without the +extension. Note that this command must be used before +\cs{makeglossaries}. + +Each glossary entry is assigned a \gls{numberlist} that lists all +the locations in the document where that entry was used. By default, +the location refers to the page number but this may be overridden +using the \pkgopt{counter} package option. The default form of +the location number assumes a full stop compositor (e.g.\ 1.2), +but if your location numbers use a different compositor (e.g. 1-2) +you need to set this using +\begin{definition}[\DescribeMacro{\glsSetCompositor}] +\cs{glsSetCompositor}\marg{symbol} +\end{definition} +For example: +\begin{verbatim} +\glsSetCompositor{-} +\end{verbatim} +Note that this command must be used before \cs{makeglossaries}. + +If you use \gls{xindy}, you can have a different compositor for page +numbers starting with an uppercase alphabetical character using: +\begin{definition}[\DescribeMacro{\glsSetAlphaCompositor}] +\cs{glsSetAlphaCompositor}\marg{symbol} +\end{definition} +Note that this command has no effect if you haven't used the +\pkgopt{xindy} package option. For example, if you want +\glspl{numberlist} containing a mixture of A-1 and 2.3 style +formats, then do: +\begin{verbatim} +\glsSetCompositor{.}\glsSetAlphaCompositor{-} +\end{verbatim} +See \sectionref{sec:numberlists} for further information about +\glspl{numberlist}. + +\section{Defining Glossary Entries} +\label{sec:newglosentry} + +All glossary entries must be defined before they are used, so it is +better to define them in the preamble to ensure this.\footnote{The +only preamble restriction on \ics{newglossaryentry} and +\ics{newacronym} was removed in version 1.13, but the restriction +remains for \ics{loadglsentries}.} However only those entries that +occur in the document (using any of the commands described in +\sectionref{sec:glslink}, \sectionref{sec:glsadd} or +\sectionref{sec:crossref}) will appear in the glossary. Each time an +entry is used in this way, a line is added to an associated glossary +file (\filetype{.glo}), which then needs to be converted into a +corresponding \filetype{.gls} file which contains the typeset +glossary which is input by \ics{printglossary} or +\ics{printglossaries}. The Perl script \gls{makeglossaries} can be +used to call \gls{makeindex} or \gls{xindy}, using a customised +indexing style file, for each of the glossaries that are defined in +the document. \textbf{Note that there should be no need for you to +explicitly edit or input any of these external +files.}\footnote{Except possibly the style file but then you'll need +to use \ics{noist} to prevent your changes from being +overwritten.} See +\sectionref{sec:makeglossaries} for further details. + +New glossary entries are defined using the command: +\begin{definition}[\DescribeMacro{\newglossaryentry}] +\cs{newglossaryentry}\marg{label}\marg{key-val list} +\end{definition} +The first argument, \meta{label}, must be a unique label with which +to identify this entry. The second argument, \meta{key-val list}, is +a \meta{key}=\meta{value} list that supplies the relevant +information about this entry. There are two required fields: +\gloskey{description} and either \gloskey{name} or \gloskey{parent}. +Available fields are listed below: + +\begin{description} +\item[{\gloskey{name}}] The name of the entry (as it will appear in +the glossary). If this key is omitted and the \gloskey{parent} +key is supplied, this value will be the same as the parent's name. + +\item[{\gloskey{description}}] A brief description of this term (to +appear in the glossary). Within this value, you can use +\begin{definition}[\DescribeMacro{\nopostdesc}] +\cs{nopostdesc} +\end{definition} +to suppress the +description terminator for this entry. For example, if this +entry is a parent entry that doesn't require a description, you +can do \verb|description={\nopostdesc}|. If you want a paragraph +break in the description use +\begin{definition}[\DescribeMacro{\glspar}] +\cs{glspar} +\end{definition} +However, note that not all glossary styles support multi-line +descriptions. If you are using one of the tabular-like glossary +styles that permit multi-line descriptions, use \ics{newline} +not \verb"\\" if you want to force a line break. + +\item[{\gloskey{parent}}] The label of the parent entry. Note that +the parent entry must be defined before its sub-entries. +See \sectionref{sec:subentries} for further details. + +\item[{\gloskey{descriptionplural}}] The plural form of the +description (as passed to \ics{glsdisplay} and \ics{glsdisplayfirst} +by \ics{glspl}, \ics{Glspl} and \ics{GLSpl}). If omitted, the value +is set to the same as the \gloskey{description} key. (Note that if +you want the description to appear in the main body of the document, +you must switch off the description \glsation{sanitize} using the +\pkgopt{sanitize} package option described in +\sectionref{sec:pkgopts-general}.) + +\item[{\gloskey{text}}] How this entry will appear in the document text +when using \ics{gls} (or one of its uppercase variants). If this +field is omitted, the value of the \gloskey{name} key is used. + +\item[{\gloskey{first}}] How the entry will appear in the document text +on \firstuse\ with \ics{gls} (or one of its uppercase +variants). If this field is omitted, the value of the \gloskey{text} +key is used. Note that if you use \ics{glspl}, \ics{Glspl}, +\ics{GLSpl}, \ics{glsdisp} before using \ics{gls}, the +\gloskey{firstplural} value won't be used with \ics{gls}. + +\item[{\gloskey{plural}}] How the entry will appear in the document text +when using \ics{glspl} (or one of its uppercase variants). If this +field is omitted, the value is obtained by appending +\ics{glspluralsuffix} to the value of the \gloskey{text} field. The +default value of \ics{glspluralsuffix} is the letter \qt{s}. + +\item[{\gloskey{firstplural}}] How the entry will appear in the +document text on \firstuse\ with \ics{glspl} (or one of its +uppercase variants). If this field is omitted, the value is obtained +from the \gloskey{plural} key, if the \gloskey{first} key is omitted, +or by appending \ics{glspluralsuffix} to the value of the +\gloskey{first} field, if the \gloskey{first} field is present. Note +that if you use \ics{gls}, \ics{Gls}, \ics{GLS}, \cs{glsdisp} before +using \ics{glspl}, the \gloskey{firstplural} value won't be used +with \ics{glspl}. + +\textbf{Note:} prior to version 1.13, the default value of +\gloskey{firstplural} was always taken by appending \qt{s} to the +\gloskey{first} key, which meant that you had to specify both +\gloskey{plural} and \gloskey{firstplural}, even if you hadn't +used the \gloskey{first} key. + +\item[{\gloskey{symbol}}] This field is provided to allow the user +to specify an associated symbol. If omitted, the value is set to +\cs{relax}. Note that not all glossary styles display the symbol. +(If you want the symbol to appear in the main body of the document, +you must switch off the symbol \glsation{sanitize} using the +\pkgopt{sanitize} package option described in +\sectionref{sec:pkgopts-general}.) + +\item[{\gloskey{symbolplural}}] This is the plural form of the +symbol (as passed to \ics{glsdisplay} and \ics{glsdisplayfirst} +by \ics{glspl}, \ics{Glspl} and \ics{GLSpl}). If omitted, the value +is set to the same as the \gloskey{symbol} key. + +\item[{\gloskey{sort}}] This value indicates how \gls{makeindex} or +\gls{xindy} should sort this entry. If omitted, the value is given +by the \gloskey{name} field. In general, it's best to use the +\gloskey{sort} key if the \gloskey{name} contains commands (e.g.\ +\verb|\ensuremath{\alpha}|). Note that the package options +\pkgopt[def]{sort} and \pkgopt[use]{sort} override the +\gloskey{sort} key in \ics{newglossaryentry} (see +\sectionref{sec:pkgopts-sort}). + +\item[{\gloskey{type}}] This specifies the label of the glossary in +which this entry belongs. If omitted, the default glossary is +assumed unless \ics{newacronym} is used (see +\sectionref{sec:acronyms}). + +\item[{\gloskey{user1}, \ldots, \gloskey{user6}% +\igloskey{user2}\igloskey{user3}\igloskey{user4}\igloskey{user5}}] +Six keys provided for any additional information the user may want +to specify. (For example an associated dimension or an alternative +plural or some other grammatical construct.) + +\item[{\gloskey{nonumberlist}}] A boolean key. If the value is +missing or is "true", this will suppress the \gls{numberlist} just for +this entry. Conversely, if you have used the package option +\pkgopt{nonumberlist}, you can activate the \gls*{numberlist} just +for this entry with \gloskey{nonumberlist=false}. +(See \sectionref{sec:numberlists}.) + +\item[{\gloskey{see}}] Cross-reference another entry. Using the +\gloskey{see} key will automatically add this entry to the +glossary, but will not automatically add the cross-referenced entry. +The referenced entry should be supplied as the value to this key. +If you want to override the \qt{see} tag, you can supply the new +tag in square brackets before the label. For example +\verb|see=[see also]{anotherlabel}|. Note that if you have +suppressed the \gls{numberlist}, the cross-referencing information +won't appear in the glossary. You can override this for individual +glossary entries using \gloskey{nonumberlist=false} (see above). +Alternatively, you can use the \pkgopt{seeautonumberlist} package +option. For further details, see \sectionref{sec:crossref}. + +\end{description} + +The following keys are reserved for \ics{newacronym} (see +\sectionref{sec:acronyms}): \gloskey{long}, \gloskey{longplural}, +\gloskey{short} and \gloskey{shortplural}. + +Note that if the name starts with an accented letter or non-Roman +character, you must group the character, otherwise it will +cause a problem for commands like \ics{Gls} and \ics{Glspl}. +For example: +\begin{verbatim} +\newglossaryentry{elite}{name={{\'e}lite}, +description={select group or class}} +\end{verbatim} +Note that the same applies if you are using the \sty{inputenc} +package: +\begin{verbatim} +\newglossaryentry{elite}{name={{é}lite}, +description={select group or class}} +\end{verbatim} +Note that in both of the above examples, you will also need to +supply the \gloskey{sort} key if you are using \gls{makeindex} +whereas \gls{xindy} is usually able to sort accented letters +correctly. + +\subsection{Plurals} +You may have noticed from above that you can specify the plural form +when you define a term. If you omit this, the plural will be +obtained by appending +\begin{definition}[\DescribeMacro{\glspluralsuffix}] +\cs{glspluralsuffix} +\end{definition} +to the singular form. This command defaults to the letter \qt{s}. +For example: +\begin{verbatim} +\newglossaryentry{cow}{name=cow,description={a fully grown +female of any bovine animal}} +\end{verbatim} +defines a new entry whose singular form is \qt{cow} and plural form +is \qt{cows}. However, if you are writing in archaic English, you +may want to use \qt{kine} as the plural form, in which case you +would have to do: +\begin{verbatim} +\newglossaryentry{cow}{name=cow,plural=kine, +description={a fully grown female of any bovine animal}} +\end{verbatim} + +If you are writing in a language that supports +multiple plurals (for a given term) then use the \gloskey{plural} key +for one of them and one of the user keys to specify the +other plural form. For example: +\begin{verbatim} +\newglossaryentry{cow}{name=cow,description={a fully grown +female of any bovine animal (plural cows, archaic plural kine)}, +user1={kine}} +\end{verbatim} +You can then use \verb|\glspl{cow}| to produce \qt{cows} and +\verb|\glsuseri{cow}| to produce \qt{kine}. You can, of course, +define an easy to remember synonym. For example: +\begin{verbatim} +\let\glsaltpl\glsuseri +\end{verbatim} +Then you don't have to remember which key you used to store the +alternative plural. + +If you are using a language that usually forms plurals +by appending a different letter, or sequence of letters, you can +redefine \cs{glspluralsuffix} as required. However, this must be +done \emph{before} the entries are defined. For languages that don't +form plurals by simply appending a suffix, all the plural forms must be +specified using the \gloskey{plural} key (and the \gloskey{firstplural} +key where necessary). + +\subsection{Sub-Entries} +\label{sec:subentries} + +As from version 1.17, it is possible to specify sub-entries. These +may be used to order the glossary into categories, in which case the +sub-entry will have a different name to its parent entry, or it may +be used to distinguish different definitions for the same word, in +which case the sub-entries will have the same name as the parent +entry. Note that not all glossary styles support hierarchical +entries and may display all the entries in a flat format. Of the +styles that support sub-entries, some display the sub-entry's name +whilst others don't. Therefore you need to ensure that you use a +suitable style. (See \sectionref{sec:styles} for a list of predefined +styles.) As from version 3.0, level~1 sub-entries are automatically +numbered in the predefined styles if you use the +\pkgopt{subentrycounter} package option (see +\sectionref{sec:pkgopts-printglos} for further details). + +Note that the parent entry will automatically be added to the +glossary if any of its child entries are used in the document. +If the parent entry is not referenced in the document, it will not +have a \gls{numberlist}. Note also that \gls{makeindex} has a +restriction on the maximum sub-entry depth. + +\subsubsection{Hierarchical Categories} + +To arrange a glossary with hierarchical categories, you need to +first define the category and then define the sub-entries using the +relevant category entry as the value of the \gloskey{parent} key. +For example, suppose I want a glossary of mathematical symbols that +are divided into Greek letters and Roman letters. Then I can define +the categories as follows: +\begin{verbatim} +\newglossaryentry{greekletter}{name={Greek letters}, +description={\nopostdesc}} + +\newglossaryentry{romanletter}{name={Roman letters}, +description={\nopostdesc}} +\end{verbatim} + +Note that in this example, the category entries don't need a +description so I have set the descriptions to \ics{nopostdesc}. +This gives a blank description and suppresses the +description terminator. + +I can now define my sub-entries as follows: +\begin{verbatim} +\newglossaryentry{pi}{name={\ensuremath{\pi}},sort={pi}, +description={ratio of the circumference of a circle to the diameter}, +parent=greekletter} + +\newglossaryentry{C}{name={\ensuremath{C}},sort={C}, +description={Euler's constant}, +parent=romanletter} +\end{verbatim} + + +\subsubsection{Homographs} + +Sub-entries that have the same name as the parent entry, don't need +to have the \gloskey{name} key. For example, the word \qt{glossary} +can mean a list of technical words or a collection of glosses. In +both cases the plural is \qt{glossaries}. So first define the parent +entry: +\begin{verbatim} +\newglossaryentry{glossary}{name=glossary, +description={\nopostdesc}, +plural={glossaries}} +\end{verbatim} +Again, the parent entry has no description, so the description +terminator needs to be suppressed using \ics{nopostdesc}. + +Now define the two different meanings of the word: +\begin{verbatim} +\newglossaryentry{glossarylist}{ +description={list of technical words}, +sort={1}, +parent={glossary}} + +\newglossaryentry{glossarycol}{ +description={collection of glosses}, +sort={2}, +parent={glossary}} +\end{verbatim} +Note that if I reference the parent entry, the location will be +added to the parent's \gls{numberlist}, whereas if I reference any +of the child entries, the location will be added to the child +entry's number list. Note also that since the sub-entries have the +same name, the \gloskey{sort} key is required unless you are using +the \pkgopt[use]{sort} or \pkgopt[def]{sort} package options. You +can use the \pkgopt{subentrycounter} package option to automatically +number the first-level child entries. See +\sectionref{sec:pkgopts-printglos} for further details. + +In the above example, the plural form for both of the child entries +is the same as the parent entry, so the \gloskey{plural} key was +not required for the child entries. However, if the sub-entries +have different plurals, they will need to be specified. For example: +\begin{verbatim} +\newglossaryentry{bravo}{name={bravo}, +description={\nopostdesc}} + +\newglossaryentry{bravocry}{description={cry of approval (pl.\ bravos)}, +sort={1}, +plural={bravos}, +parent=bravo} + +\newglossaryentry{bravoruffian}{description={hired ruffian or +killer (pl.\ bravoes)}, +sort={2}, +plural={bravoes}, +parent=bravo} +\end{verbatim} + + +\subsection{Loading Entries From a File} +\label{sec:loadglsentries} + +You can store all your glossary entry definitions in another +file and use: +\begin{definition}[\DescribeMacro{\loadglsentries}] +\cs{loadglsentries}\oarg{type}\marg{filename} +\end{definition} +where \meta{filename} is the name of the file containing all the +\ics{newglossaryentry} commands. The optional argument +\meta{type} is the name of the glossary to which those entries +should belong, for those entries where the \gloskey{type} key has +been omitted (or, more specifically, for those entries whose +type has been specified by \ics{glsdefaulttype}, which is what +\ics{newglossaryentry} uses by default). For example, suppose I have +a file called \texttt{myentries.tex} which contains: +\begin{verbatim} +\newglossaryentry{perl}{type=main, +name={Perl}, +description={A scripting language}} + +\newglossaryentry{tex}{name={\TeX}, +description={A typesetting language},sort={TeX}} + +\newglossaryentry{html}{type=\glsdefaulttype, +name={html}, +description={A mark up language}} +\end{verbatim} +and suppose in my document preamble I use the command: +\begin{verbatim} +\loadglsentries[languages]{myentries} +\end{verbatim} +then this will add the entries \texttt{tex} and \texttt{html} +to the glossary whose type is given by \texttt{languages}, but +the entry \texttt{perl} will be added to the main glossary, since +it explicitly sets the type to \texttt{main}. + +\textbf{Note:} if you use \ics{newacronym} (see +\sectionref{sec:acronyms}) the type is set as +\verb|type=\acronymtype| unless you explicitly override it. For +example, if my file \texttt{myacronyms.tex} contains: +\begin{verbatim} +\newacronym{aca}{aca}{a contrived acronym} +\end{verbatim} +then (supposing I have defined a new glossary type called +\texttt{altacronym}) +\begin{verbatim} +\loadglsentries[altacronym]{myacronyms} +\end{verbatim} +will add \texttt{aca} to the glossary type \texttt{acronym}, if the +package option \pkgopt{acronym} has been specified, or will add +\texttt{aca} to the glossary type \texttt{altacronym}, if the +package option \pkgopt{acronym} is not specified.\footnote{This is +because \ics{acronymtype} is set to \ics{glsdefaulttype} if the +\pkgopt{acronym} package option is not used.} + +If you have used the \pkgopt{acronym} package option, +there are two possible solutions to this problem: +\begin{enumerate} +\item Change \texttt{myacronyms.tex} so that entries are defined in +the form: +\begin{verbatim} +\newacronym[type=\glsdefaulttype]{aca}{aca}{a contrived acronym} +\end{verbatim} +and do: +\begin{verbatim} +\loadglsentries[altacronym]{myacronyms} +\end{verbatim} + +\item Temporarily change \cs{acronymtype} to the target glossary: +\begin{verbatim} +\let\orgacronymtype\acronymtype +\def\acronymtype{altacronym} +\loadglsentries{myacronyms} +\let\acronymtype\orgacronymtype +\end{verbatim} +\end{enumerate} + +Note that only those entries that have been used +in the text will appear in the relevant glossaries. +Note also that \cs{loadglsentries} may only be used in the +preamble. + +\section{Number lists} +\label{sec:numberlists} + +Each entry in the glossary has an associated \gls{numberlist}. +By default, these numbers refer to the pages on which that entry has +been used (using any of the commands described in +\sectionref{sec:glslink} and \sectionref{sec:glsadd}). The number +list can be suppressed using the \pkgopt{nonumberlist} package +option, or an alternative counter can be set as the default using +the \pkgopt{counter} package option. The number list is also +referred to as the location list\index{location list|see{number +list}}. + +Both \gls{makeindex} and \gls{xindy} concatenate a +sequence of 3 or more consecutive pages into a range. With +\gls*{xindy} you can vary the minimum sequence length using +\ics{GlsSetXdyMinRangeLength}\marg{n} where \meta{n} is either +an integer or the keyword \texttt{none} which indicates that there +should be no range formation. + +\begin{important} +Note that \cs{GlsSetXdyMinRangeLength} must be used before +\ics{makeglossaries} and has no effect if \ics{noist} is used. +\end{important} + +With both \gls{makeindex} and \gls{xindy}, you can replace +the separator and the closing number in the range using: +\begin{definition}[\DescribeMacro{\glsSetSuffixF}] +\cs{glsSetSuffixF}\marg{suffix} +\end{definition} +\begin{definition}[\DescribeMacro{\glsSetSuffixFF}] +\cs{glsSetSuffixFF}\marg{suffix} +\end{definition} +where the former command specifies the suffix to use for a 2 page +list and the latter specifies the suffix to use for longer lists. +For example: +\begin{verbatim} +\glsSetSuffixF{f.} +\glsSetSuffixFF{ff.} +\end{verbatim} +Note that if you use \gls{xindy}, you will also need to +set the minimum range length to 1 if you want to change these +suffixes: +\begin{verbatim} +\GlsSetXdyMinRangeLength{1} +\end{verbatim} +Note that if you use the \sty{hyperref} package, you will need +to use \ics{nohyperpage} in the suffix to ensure that the hyperlinks +work correctly. For example: +\begin{verbatim} +\glsSetSuffixF{\nohyperpage{f.}} +\glsSetSuffixFF{\nohyperpage{ff.}} +\end{verbatim} + +\begin{important} +Note that \cs{glsSetSuffixF} and \cs{glsSetSuffixFF} must be used +before \ics{makeglossaries} and have no effect if \ics{noist} is +used. +\end{important} + + +\section{Links to Glossary Entries} +\label{sec:glslink} + +Once you have defined a glossary entry using \ics{newglossaryentry}, +you can refer to that entry in the document using one of the +commands listed in this section. The text which appears at that +point in the document when using one of these commands is referred +to as the \gls{linktext} (even if there are no hyperlinks). The +commands in this section also add a line to an external file that is +used by \gls{makeindex} or \gls{xindy} to generate the relevant +entry in the glossary. This information includes an associated +location that is added to the \gls{numberlist} for that entry. By +default, the location refers to the page number. For further +information on number lists, see \sectionref{sec:numberlists}. + +\begin{important} +It is strongly recommended that you don't use the commands +defined in this section in the arguments of sectioning or caption +commands or any other command that has a moving argument. +\end{important} + +The above warning is particularly important if you are using the +\styfmt{glossaries} package in conjunction with the \sty{hyperref} +package. Instead, use one of the commands listed in +\sectionref{sec:glsnolink} (such as \ics{glsentrytext}) or provide an +alternative via the optional argument to the sectioning/caption +command. Examples: +\begin{verbatim} +\section{An overview of \glsentrytext{perl}} +\section[An overview of Perl]{An overview of \gls{perl}} +\end{verbatim} + +The way the \gls{linktext} is displayed depends on +\begin{definition}[\DescribeMacro{\glstextformat}] +\cs{glstextformat}\marg{text} +\end{definition} +For example, to make all \gls{linktext} appear in a sans-serif +font, do: +\begin{verbatim} +\renewcommand*{\glstextformat}[1]{\textsf{#1}} +\end{verbatim} + +Each entry has an associated conditional referred to as the +\firstuseflag. This determines whether \ics{gls}, +\ics{glspl} (and their uppercase variants) should use the +value of the \gloskey{first} or \gloskey{text} keys. Note that an +entry can be used without affecting the \firstuseflag\ (for example, +when used with \cs{glslink}). See \sectionref{sec:glsunset} for +commands that unset or reset this conditional. + +The command: +\begin{definition}[\DescribeMacro{\glslink}] +\cs{glslink}\oarg{options}\marg{label}\marg{text} +\end{definition} +will place \cs{glstextformat}\marg{text} in the document at that +point and add a line into the associated glossary file for the +glossary entry given by \meta{label}. If hyperlinks are supported, +\meta{text} will be a hyperlink to the relevant line in the +glossary. (Note that this command doesn't affect the \firstuseflag: +use \ics{glsdisp} instead.) The optional argument \meta{options} +must be a \meta{key}=\meta{value} list which can take any of the +following keys: + +\begin{description} +\item[{\gloskey[glslink]{format}}] This specifies how to format the +associated location number for this entry in the glossary. This +value is equivalent to the \gls{makeindex} encap value, and (as +with \ics{index}) the value needs to be the name of a command +\emph{without} the initial backslash. As with \ics{index}, the +characters \verb"(" and \verb")" can also be used to specify the +beginning and ending of a number range. Again as with \ics{index}, +the command should be the name of a command which takes an argument +(which will be the associated location). Be careful not to use a +declaration (such as \texttt{bfseries}) instead of a text block command +(such as \texttt{textbf}) as the effect is not guaranteed to be +localised. If you want to apply more than one style to a given entry +(e.g.\ \textbf{bold} and \emph{italic}) you will need to create a +command that applies both formats, e.g.\ +\begin{verbatim} +\newcommand*{\textbfem}[1]{\textbf{\emph{#1}}} +\end{verbatim} +and use that command. + +In this document, the standard formats refer to the standard text +block commands such as \ics{textbf} or \ics{emph} or any of the +commands listed in \tableref{tab:hyperxx}. + +\begin{important} +If you use \gls{xindy} instead of \gls{makeindex}, you +must specify any non-standard formats that you want to use +with the \gloskey[glslink]{format} key using +\ics{GlsAddXdyAttribute}\marg{name}. So if you use +\gls*{xindy} with the above example, you would need to add: +\begin{verbatim} +\GlsAddXdyAttribute{textbfem} +\end{verbatim} +See \sectionref{sec:xindy} for further details. +\end{important} + +Note that unlike \ics{index}, you can't have anything following the +command name, such as an asterisk or arguments. If you want to +cross-reference another entry, either use the \gloskey{see} key when +you define the entry or use \ics{glssee} (described in +\sectionref{sec:crossref}). + + +If you are using hyperlinks and you want to change the font of the +hyperlinked location, don't use \ics{hyperpage} (provided by the +\sty{hyperref} package) as the locations may not refer to a page +number. Instead, the \styfmt{glossaries} package provides number +formats listed in \tableref{tab:hyperxx}. + +\begin{table}[htbp] +\caption{Predefined Hyperlinked Location Formats} +\label{tab:hyperxx} +\centering +\vskip\baselineskip +\begin{tabular}{ll} +\locfmt{hyperrm} & serif hyperlink\\ +\locfmt{hypersf} & sans-serif hyperlink\\ +\locfmt{hypertt} & monospaced hyperlink\\ +\locfmt{hyperbf} & bold hyperlink\\ +\locfmt{hypermd} & medium weight hyperlink\\ +\locfmt{hyperit} & italic hyperlink\\ +\locfmt{hypersl} & slanted hyperlink\\ +\locfmt{hyperup} & upright hyperlink\\ +\locfmt{hypersc} & small caps hyperlink\\ +\locfmt{hyperemph} & emphasized hyperlink +\end{tabular} +\par +\end{table} + +Note that if the \ics{hyperlink} command hasn't been defined, the +\texttt{hyper}\meta{xx} formats are equivalent to the analogous +\texttt{text}\meta{xx} font commands (and \texttt{hyperemph} is +equivalent to \texttt{emph}). If you want to make a new format, you +will need to define a command which takes one argument and use that. +For example, if you want the location number to be in a bold +sans-serif font, you can define a command called, say, +\ics{hyperbsf}: +\begin{verbatim} +\newcommand{\hyperbsf}[1]{\textbf{\hypersf{#1}}} +\end{verbatim} +and then use \texttt{hyperbsf} as the value for the \gloskey{format} +key. (See also \ifpdf section~\ref*{sec:code:printglos} \fi +\qt{Displaying the glossary} in the documented code, +\texttt{glossaries.pdf}.) Remember that if you use \gls{xindy}, you +will need to add this to the list of location attributes: +\begin{verbatim} +\GlsAddXdyAttribute{hyperbsf} +\end{verbatim} + +\item[{\gloskey[glslink]{counter}}] This specifies which counter +to use for this location. This overrides the default counter +used by this entry. (See also \sectionref{sec:numberlists}.) + +\item[{\gloskey[glslink]{hyper}}] This is a boolean key which can +be used to enable/disable the hyperlink to the relevant entry +in the glossary. (Note that setting \texttt{hyper=true} will have no +effect if \ics{hyperlink} has not been defined.) The default +value is \texttt{hyper=true}. + +\end{description} +There is also a starred version: +\begin{definition}[\DescribeMacro{\glslink*}] +\cs{glslink*}\oarg{options}\marg{label}\marg{text} +\end{definition} +which is equivalent to \cs{glslink}, except it sets +\texttt{hyper=false}. Similarly, all the following commands +described in this section also have a starred version that disables +the hyperlink. + +\begin{important} +Don't use commands like \cs{glslink} or \cs{gls} in the \meta{text} +argument of \cs{glslink}. +\end{important} + +The command: +\begin{definition}[\DescribeMacro{\gls}] +\cs{gls}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is the same as \cs{glslink}, except that the \gls{linktext} +is determined from the values of the \gloskey{text} and +\gloskey{first} keys supplied when the entry was defined using +\ics{newglossaryentry}. If the entry has been marked as having +been used\ifirstuseflag, the value of the \gloskey{text} key will be used, otherwise +the value of the \gloskey{first} key will be used. +On completion, \cs{gls} will mark the entry's \gls{firstuseflag} as +used. + +There are two uppercase variants: +\begin{definition}[\DescribeMacro{\Gls}] +\cs{Gls}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +and +\begin{definition}[\DescribeMacro{\GLS}] +\cs{GLS}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +which make the first letter of the link text or all the link text +uppercase, respectively. + +The final optional argument \meta{insert}, allows you to insert +some additional text into the link text. By default, this will +append \meta{insert} at the end of the link text, but this +can be changed (see \sectionref{sec:glsdisplay}). + +The first optional argument \meta{options} is the same as the optional +argument to \ics{glslink}. As with \ics{glslink}, these commands also +have a starred version that disable the hyperlink. + +\begin{important} +Don't use commands like \cs{glslink} or \cs{gls} in the \meta{insert} +argument of \cs{gls} and its variants. +\end{important} + +There are also analogous plural forms: +\begin{definition}[\DescribeMacro{\glspl}] +\cs{glspl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\Glspl}] +\cs{Glspl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSpl}] +\cs{GLSpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +These determine the link text from the \gloskey{plural} and +\gloskey{firstplural} keys supplied when the entry was first +defined. As before, these commands also have +a starred version that disable the hyperlink. + +\begin{important} +Be careful when you use glossary entries in math mode especially if you +are using \sty{hyperref} as it can affect the spacing of subscripts and +superscripts. For example, suppose you have defined the following +entry: +\begin{verbatim} +\newglossaryentry{Falpha}{name={F_\alpha},description=sample} +\end{verbatim} +and later you use it in math mode: +\begin{verbatim} +$\gls{Falpha}^2$ +\end{verbatim} +This will result in $F_\alpha{}^2$ instead of $F_\alpha^2$. In this +situation it's best to bring the superscript into the hyperlink using +the final \meta{insert} optional argument: +\begin{verbatim} +$\gls{Falpha}[^2]$ +\end{verbatim} +\end{important} + +Note that \ics{glslink} doesn't use or affect the \firstuseflag, +nor does it use \ics{glsdisplay} or \ics{glsdisplayfirst} (see +\sectionref{sec:glsdisplay}). Instead, you can use: +\begin{definition}[\DescribeMacro{\glsdisp}] +\cs{glsdisp}\oarg{options}\marg{label}\marg{link text} +\end{definition} +This behaves in the same way as \ics{gls}, except that it uses +\meta{link text} instead of the value of the \gloskey{first} +or \gloskey{text} key. (Note that this command always sets +\meta{insert} to nothing.) This command affects the \firstuseflag, +and uses \ics{glsdisplay} or \ics{glsdisplayfirst}. + +The command: +\begin{definition}[\DescribeMacro{\glstext}] +\cs{glstext}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is similar to \ics{gls} except that it always uses the value +of the \gloskey{text} key and does not affect the +\firstuseflag. +Unlike \cs{gls}, the inserted text \meta{insert} +is always appended to the link text since \cs{glstext} doesn't +use \ics{glsdisplay} or \ics{glsdisplayfirst}. (The same is +true for all the following commands described in this section.) + +There are also analogous commands: +\begin{definition}[\DescribeMacro{\Glstext}] +\cs{Glstext}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLStext}] +\cs{GLStext}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +As before, these commands also have a starred version that disable +the hyperlink. + +The command: +\begin{definition}[\DescribeMacro{\glsfirst}] +\cs{glsfirst}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is similar to \cs{glstext} except that it always uses the value +of the \gloskey{first} key. Again, \meta{insert} is always appended +to the end of the link text and does not affect the +\firstuseflag. + +There are also analogous commands: +\begin{definition}[\DescribeMacro{\Glsfirst}] +\cs{Glsfirst}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSfirst}] +\cs{GLSfirst}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +As before, these commands also have a starred version that disable +the hyperlink. + +The command: +\begin{definition}[\DescribeMacro{\glsplural}] +\cs{glsplural}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is similar to \ics{glstext} except that it always uses the value +of the \gloskey{plural} key. Again, \meta{insert} is always appended +to the end of the link text and does not mark the entry as having +been used. + +There are also analogous commands: +\begin{definition}[\DescribeMacro{\Glsplural}] +\cs{Glsplural}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSplural}] +\cs{GLSplural}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +As before, these commands also have a starred version that disable +the hyperlink. + +The command: +\begin{definition}[\DescribeMacro{\glsfirstplural}] +\cs{glsfirstplural}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is similar to \ics{glstext} except that it always uses the value +of the \gloskey{firstplural} key. Again, \meta{insert} is always +appended to the end of the link text and does not mark the entry as +having been used. + +There are also analogous commands: +\begin{definition}[\DescribeMacro{\Glsfirstplural}] +\cs{Glsfirstplural}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSfirstplural}] +\cs{GLSfirstplural}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +As before, these commands also have a starred version that disable +the hyperlink. + +The command: +\begin{definition}[\DescribeMacro{\glsname}] +\cs{glsname}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is similar to \ics{glstext} except that it always uses the value of +the \gloskey{name} key. Again, \meta{insert} is always appended to +the end of the link text and does not mark the entry as having been +used. Note: if you want to use this command and the \gloskey{name} +key contains commands, you will have to disable the +\glsation{sanitize} of the \gloskey{name} key and +protect fragile commands. + +There are also analogous commands: +\begin{definition}[\DescribeMacro{\Glsname}] +\cs{Glsname}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSname}] +\cs{GLSname}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +As before, these commands also have a starred version that disable +the hyperlink. + +The command: +\begin{definition}[\DescribeMacro{\glssymbol}] +\cs{glssymbol}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is similar to \ics{glstext} except that it always uses the value of +the \gloskey{symbol} key. Again, \meta{insert} is always appended to +the end of the link text and does not mark the entry as having been +used. Note: if you want to use this command and the \gloskey{symbol} +key contains commands, you will have to disable the +\glsation{sanitize} of the \gloskey{symbol} key and +protect fragile commands. + +There are also analogous commands: +\begin{definition}[\DescribeMacro{\Glssymbol}] +\cs{Glssymbol}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSsymbol}] +\cs{GLSsymbol}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +As before, these commands also have a starred version that disable +the hyperlink. + +The command: +\begin{definition}[\DescribeMacro{\glsdesc}] +\cs{glsdesc}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is similar to \ics{glstext} except that it always uses the value of +the \gloskey{description} key. Again, \meta{insert} is always +appended to the end of the link text and does not mark the entry as +having been used. Note: if you want to use this command and the +\gloskey{description} key contains commands, you will have to +disable the \glsation{sanitize} of the +\gloskey{description} key and protect fragile commands. + +There are also analogous commands: +\begin{definition}[\DescribeMacro{\Glsdesc}] +\cs{Glsdesc}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSdesc}] +\cs{GLSdesc}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +As before, these commands also have a starred version that disable +the hyperlink. + +The command: +\begin{definition}[\DescribeMacro{\glsuseri}] +\cs{glsuseri}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +is similar to \ics{glstext} except that it always uses the value +of the \gloskey{user1} key. Again, \meta{insert} is always +appended to the end of the link text and does not mark the entry as +having been used. + +There are also analogous commands: +\begin{definition}[\DescribeMacro{\Glsuseri}] +\cs{Glsuseri}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSuseri}] +\cs{GLSuseri}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +As before, these commands also have a starred version that disable +the hyperlink. Similarly for the other user keys: +\begin{definition}[\DescribeMacro{\glsuserii}] +\cs{glsuserii}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsuserii}] +\cs{Glsuserii}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSuserii}] +\cs{GLSuserii}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\glsuseriii}] +\cs{glsuseriii}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsuseriii}] +\cs{Glsuseriii}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSuseriii}] +\cs{GLSuseriii}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\glsuseriv}] +\cs{glsuseriv}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsuseriv}] +\cs{Glsuseriv}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSuseriv}] +\cs{GLSuseriv}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\glsuserv}] +\cs{glsuserv}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsuserv}] +\cs{Glsuserv}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSuserv}] +\cs{GLSuserv}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\glsuservi}] +\cs{glsuservi}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsuservi}] +\cs{Glsuservi}\oarg{options}\marg{text}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\GLSuservi}] +\cs{GLSuservi}\oarg{options}\marg{text}\oarg{insert} +\end{definition} + +\subsection{Changing the format of the link text} +\label{sec:glsdisplay} + +The format of the \gls{linktext} for \ics{gls}, \ics{glspl} +and their uppercase variants is governed by two commands: +\begin{definition}[\DescribeMacro{\glsdisplayfirst}] +\cs{glsdisplayfirst}\marg{first/first plural}\marg{description}\marg{symbol}\marg{insert} +\end{definition} +which is used the +\glslink{firstuse}{first time} a glossary entry is used in the text and +\begin{definition}[\DescribeMacro{\glsdisplay}] +\cs{glsdisplay}\marg{text/plural}\marg{description}\marg{symbol}\marg{insert} +\end{definition} +which is used subsequently. +Both commands take four arguments: the first is either the singular or +plural form given by the \gloskey{text}, \gloskey{plural}, +\gloskey{first} or \gloskey{firstplural} keys (set when the term was +defined) depending on context; the second argument is the term's +description (as supplied by the \gloskey{description} or +\gloskey{descriptionplural} keys); the third +argument is the symbol associated with the term (as supplied by the +\gloskey{symbol} or \gloskey{symbolplural} keys) and the fourth argument is the additional text +supplied in the final optional argument to \ics{gls} or +\ics{glspl} (or their uppercase variants). The default definitions +of \cs{glsdisplay} and \cs{glsdisplayfirst} simply +print the first argument immediately followed by the fourth argument. +The remaining arguments are ignored. + +\begin{important} +Care needs to be taken when redefining \cs{glsdisplay} and +\cs{glsdisplayfirst} as commands like \ics{Gls} will expand the +displayed text before applying \ics{makefirstuc}. If you want to use +formatting commands, it's best to define a robust version that deals +with all the formatting. For example, suppose you want +the text to appear in bold italic, it's best to do something like: +\begin{verbatim} +\DeclareRobustCommand{\textbfit}[1]{\emph{\bfseries #1}} +\renewcommand{\glsdisplay}[4]{\textbfit{#1#4}} +\end{verbatim} +See the \sty{mfirstuc} documentation for further details on the +limitations of \ics{makefirstuc}. +\end{important} + +If required, you can access the label for the given entry via +\begin{definition}[\DescribeMacro{\glslabel}] +\cs{glslabel} +\end{definition} +so it is possible to use this label in the definition of +\cs{glsdisplay} or \cs{glsdisplayfirst} to supply additional +information using any of the commands described in +\sectionref{sec:glsnolink}, if required. + +Note that \cs{glsdisplay} and \cs{glsdisplayfirst} are not used +by \ics{glslink}. If you want to supply your own link text, you +need to use \ics{glsdisp} instead. + +For example, suppose you want a glossary of measurements and +units, you can use the \gloskey{symbol} key to store the unit: +\begin{verbatim} +\newglossaryentry{distance}{name=distance, +description={The length between two points}, +symbol={km}} +\end{verbatim} +and now suppose you want \verb|\gls{distance}| to produce +\qt{distance (km)} on \firstuse, then you can redefine +\cs{glsdisplayfirst} as follows: +\begin{verbatim} +\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} +\end{verbatim} +Note that the additional text is placed after \verb|#1|, so +\verb|\gls{distance}['s]| will produce \qt{distance's (km)} +rather than \qt{distance (km)'s} which looks a bit odd (even though +it may be in the context of \qt{the distance (km) is measured between +the two points} --- but in this instance it would be better not to +use a contraction). + +Note also that all of the \gls{linktext} will be formatted according +to \ics{glstextformat} (described earlier). So if you do, say: +\begin{verbatim} +\renewcommand{\glstextformat}[1]{\textbf{#1}} +\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} +\end{verbatim} +then \verb|\gls{distance}| will produce \qt{\textbf{distance (km)}}. + +If you have multiple glossaries, changing \cs{glsdisplayfirst} and +\cs{glsdisplay} will change the way entries for all of the +glossaries appear when using the commands \ics{gls}, \ics{glspl}, their +uppercase variants and \ics{glsdisp}. If you only +want the change to affect entries for a given glossary, then you need +to use +\begin{definition}[\DescribeMacro{\defglsdisplay}] +\cs{defglsdisplay}\oarg{type}\marg{definition} +\end{definition} +and +\begin{definition}[\DescribeMacro{\defglsdisplayfirst}] +\cs{defglsdisplayfirst}\oarg{type}\marg{definition} +\end{definition} +instead of redefining \cs{glsdisplay} and \cs{glsdisplayfirst}. + +Both \cs{defglsdisplay} and \cs{defglsdisplayfirst} take two arguments: +the first (which is optional) is the glossary's label\footnote{\texttt{main} for the main +(default) glossary, \cs{acronymtype} for the list of acronyms, or the +name supplied in the first mandatory argument to \cs{newglossary} for +additional glossaries.} and the second is how the term should be +displayed when it is invoked using commands \cs{gls}, +\cs{glspl}, their uppercase variants and \cs{glsdisp}. This is similar to the way \cs{glsdisplayfirst} was +redefined above. + +For example, suppose you have created a new glossary called +\texttt{notation} and you want to change the way the entry is +displayed on \firstuse\ so that it includes the symbol, you can do: +\begin{verbatim} +\defglsdisplayfirst[notation]{#1#4 (denoted #3)} +\end{verbatim} +Now suppose you have defined an entry as follows: +\begin{verbatim} +\newglossaryentry{set}{type=notation, + name=set, + description={A collection of objects}, + symbol={$S$} +} +\end{verbatim} +The \glslink{firstuse}{first time} you reference this entry it will be displayed as: +\qt{set (denoted $S$)} (assuming \ics{gls} was used). + +Remember that if you use the \gloskey{symbol} key, you need to use a +glossary style that displays the symbol, as many of the styles +ignore it. In addition, if you want either the description or symbol +to appear in the \gls{linktext}, you will have to disable the +\glsation{sanitize} of these keys and protect fragile +commands. + +\subsection{Enabling and disabling hyperlinks to glossary entries} + +If you load the \sty{hyperref} or \sty{html} packages prior to +loading the \styfmt{glossaries} package, commands such as \ics{glslink} +and \ics{gls}, described above, will automatically have hyperlinks +to the relevant glossary entry, unless the \gloskey[glslink]{hyper} +option has been set to \texttt{false}. You can disable or enable links using: +\begin{definition}[\DescribeMacro{\glsdisablehyper}] +\cs{glsdisablehyper} +\end{definition} +and +\begin{definition}[\DescribeMacro{\glsenablehyper}] +\cs{glsenablehyper} +\end{definition} +respectively. The effect can be localised by placing the commands +within a group. Note that you should only use \cs{glsenablehyper} +if the commands \ics{hyperlink} and \ics{hypertarget} have been +defined (for example, by the \sty{hyperref} package). + +You can disable just the \gls{firstuse} links using the package +option \pkgopt[false]{hyperfirst}. Note that this option only +affects commands that recognise the \firstuseflag, for example +\ics{gls}, \ics{glspl} and \ics{glsdisp} but not \ics{glslink}. + + +\section{Adding an Entry to the Glossary Without Generating Text} +\label{sec:glsadd} + +It is possible to add a line in the glossary file without +generating any text at that point in the document using: +\begin{definition}[\DescribeMacro{\glsadd}] +\cs{glsadd}\oarg{options}\marg{label} +\end{definition} +This is similar to \ics{glslink}, only it doesn't produce +any text (so therefore, there is no \gloskey[glslink]{hyper} key +available in \meta{options} but all the other options that can +be used with \ics{glslink} can be passed to \cs{glsadd}). +For example, to add a page range to the glossary number list for the +entry whose label is given by \texttt{set}: +\begin{verbatim} +\glsadd[format=(]{set} +Lots of text about sets spanning many pages. +\glsadd[format=)]{set} +\end{verbatim} + +To add all entries that have been defined, use: +\begin{definition}[\DescribeMacro{\glsaddall}] +\cs{glsaddall}\oarg{options} +\end{definition} +The optional argument is the same as for \cs{glsadd}, except +there is also a key \gloskey[glsaddall]{types} which can be +used to specify which glossaries to use. This should be a +comma separated list. For example, if you only want to add +all the entries belonging to the list of acronyms (specified by +the glossary type \ics{acronymtype}) and a list of +notation (specified by the glossary type \texttt{notation}) then you can +do: +\begin{verbatim} +\glsaddall[types={\acronymtype,notation}] +\end{verbatim} + +\begin{important} +Note that \cs{glsadd} and \cs{glsaddall} add the current location to +the number list. In the case of \cs{glsaddall}, all entries in the +glossary will have the same location in the number list. If you want +to use \cs{glsaddall}, it's best to suppress the number list with +the \pkgopt{nonumberlist} package option. (See +sections~\ref{sec:pkgopts-printglos} and~\ref{sec:numberlists}.) +\end{important} + +The sample file \samplefile{-dual} makes use of \cs{glsadd} to +allow for an entry that should appear both in the main glossary and +in the list of acronyms. This example sets up the list of acronyms +using the \pkgopt{acronym} package option: +\begin{verbatim} +\usepackage[acronym]{glossaries} +\end{verbatim} +A new command is then defined to make it easier to define dual +entries: +\begin{verbatim} +\newcommand*{\newdualentry}[5][]{% + \newglossaryentry{main-#2}{name={#4},% + text={#3\protect\glsadd{#2}},% + description={#5},% + #1 + }% + \newacronym{#2}{#3\protect\glsadd{main-#2}}{#4} +} +\end{verbatim} +This has the following syntax: +\begin{definition} +\ics{newdualentry}\oarg{options}\marg{label}\marg{abbrv}\marg{long}\marg{description} +\end{definition} +You can then define a new dual entry: +\begin{verbatim} +\newdualentry{svm}% label + {SVM}% abbreviation + {support vector machine}% long form + {Statistical pattern recognition technique}% description +\end{verbatim} +Now you can reference the acronym with \verb|\gls{svm}| or you can +reference the entry in the main glossary with \verb|\gls{main-svm}|. + +\section{Cross-Referencing Entries} +\label{sec:crossref} + +There are several ways of cross-referencing entries in the +glossary: + +\begin{enumerate} +\item You can use commands such as \ics{gls} in the +entries description. For example: +\begin{verbatim} +\newglossaryentry{apple}{name=apple, +description={firm, round fruit. See also \gls{pear}}} +\end{verbatim} +Note that with this method, if you don't use the cross-referenced term +in the main part of the document, you will need two runs of +\gls{makeglossaries}: +\begin{verbatim} +latex filename +makeglossaries filename +latex filename +makeglossaries filename +latex filename +\end{verbatim} + +\begin{important} +If you switch off the description +\glsation{sanitize}, you must protect fragile +commands like \ics{gls}: +\begin{verbatim} +\newglossaryentry{apple}{name=apple, +description={firm, round fruit. See also +\protect\gls{pear}}} +\end{verbatim} +\end{important} + +\item As described in \sectionref{sec:newglosentry}, you can use the +\gloskey{see} key when you define the entry. For example: +\begin{verbatim} +\newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, +description={Series expansion}, +see={TaylorsTheorem}} +\end{verbatim} +Note that in this case, the entry with the \gloskey{see} key will +automatically be added to the glossary, but the cross-referenced +entry won't. You therefore need to ensure that you use the +cross-referenced term with the commands described in +\sectionref{sec:glslink} or \sectionref{sec:glsadd}. + +The \qt{see} tag is produce using \ics{seename}, but can be +overridden in specific instances using square brackets +at the start of the \gloskey{see} value. For example: +\begin{verbatim} +\newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, +description={Series expansion}, +see=[see also]{TaylorsTheorem}} +\end{verbatim} + +\item After you have defined the entry, use +\begin{definition}[\DescribeMacro{\glssee}] +\cs{glssee}\oarg{tag}\marg{label}\marg{xr label list} +\end{definition} +where \meta{xr label list} is a comma-separated list of entry +labels to be cross-referenced, \meta{label} is the label of the +entry doing the cross-referencing and \meta{tag} is the \qt{see} tag. +(The default value of \meta{tag} is \ics{seename}.) +For example: +\begin{verbatim} +\glssee[see also]{series}{FourierSeries,TaylorsTheorem} +\end{verbatim} +Note that this automatically adds the entry given by \meta{label} to +the glossary but doesn't add the cross-referenced entries (specified +by \meta{xr label list}) to the glossary. +\end{enumerate} + +In both cases~2 and 3 above, the cross-referenced information +appears in the \gls{numberlist}, whereas in case~1, the +cross-referenced information appears in the description. (See the +\samplefile{-crossref} example file that comes with this package.) +This means that in cases~2 and~3, the cross-referencing information +won't appear if you have suppressed the \gls*{numberlist}. In this +case, you will need to activate the \gls*{numberlist} for the given +entries using \gloskey{nonumberlist=false}. Alternatively, if you +just use the \gloskey{see} key instead of \ics{glssee}, you can +automatically activate the \gls*{numberlist} using the +\pkgopt{seeautonumberlist} package option. + +\subsection{Customising Cross-reference Text} + +When you use either the \gloskey{see} key or the command +\cs{glssee}, the cross-referencing information will be typeset in the +glossary according to: +\begin{definition}[\DescribeMacro{\glsseeformat}] +\cs{glsseeformat}\oarg{tag}\marg{label-list}\marg{location} +\end{definition} +The default definition of \cs{glsseeformat} is: +\begin{display} +\cs{emph}\marg{tag} \cs{glsseelist}\marg{label-list} +\end{display} +Note that the location is always ignored.\footnote{\gls{makeindex} +will always assign a location number, even if it's not needed, so it +needs to be discarded.} For example, if you want the tag to appear +in bold, you can do:\footnote{If you redefine \cs{glsseeformat}, +keep the default value of the optional argument as \ics{seename} as +both \gloskey{see} and \cs{glssee} explicitly write +\texttt[\cs{seename}\texttt] in the output file if no optional +argument is given.} +\begin{verbatim} +\renewcommand*{\glsseeformat}[3][\seename]{\textbf{#1} \glsseelist{#2}} +\end{verbatim} + + +The list of labels is dealt with by \cs{glsseelist}, which iterates +through the list and typesets each entry in the label. The entries +are separated by +\begin{definition}[\DescribeMacro{\glsseesep}] +\cs{glsseesep} +\end{definition} +or (for the last pair) +\begin{definition}[\DescribeMacro{\glsseelastsep}] +\cs{glsseelastsep} +\end{definition} +These default to ",\space" and +\cs{space}\ics{andname}\cs{space} respectively. The list entry text +is displayed using: +\begin{definition}[\DescribeMacro{\glsseeitemformat}] +\cs{glsseeitemformat}\marg{label} +\end{definition} +This defaults to \ics{glsentrytext}\marg{label}.\footnote{In +versions before 3.0, \cs{glsentryname} was used, but this can cause +problems when the \gloskey{name} key is \glsd{sanitize}.} For example, to +make the cross-referenced list use small caps: +\begin{verbatim} +\renewcommand{\glsseeitemformat}[1]{\textsc{\glsentrytext{#1}}} +\end{verbatim} + +\begin{important} +You can use \ics{glsseeformat} and \ics{glsseelist} in the main body +of the text, but they won't automatically add the cross-referenced +entries to the glossary. If you want them added with that location, +you can do: +\begin{verbatim} +Some information (see also +\glsseelist{FourierSeries,TaylorsTheorem}% +\glsadd{FourierSeries}\glsadd{TaylorsTheorem}). +\end{verbatim} +\end{important} + +\section{Using Glossary Terms Without Links} +\label{sec:glsnolink} + +The commands described in this section display entry details without +adding any information to the glossary. They don't use +\ics{glstextformat}, they don't have any optional arguments, they +don't affect the \firstuseflag\ and, apart from \ics{glshyperlink}, +they don't produce hyperlinks. +\begin{definition}[\DescribeMacro{\glsentryname}] +\cs{glsentryname}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryname}] +\cs{Glsentryname}\marg{label} +\end{definition} +These commands display the name of the glossary entry given by +\meta{label}, as specified by the \gloskey{name} key. +\cs{Glsentryname} makes the first letter uppercase. +\begin{definition}[\DescribeMacro{\glsentrytext}] +\cs{glsentrytext}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentrytext}] +\cs{Glsentrytext}\marg{label} +\end{definition} +These commands display the subsequent use text for the glossary +entry given by \meta{label}, as specified by the \gloskey{text} key. +\cs{Glsentrytext} makes the first letter uppercase. +\begin{definition}[\DescribeMacro{\glsentryplural}] +\cs{glsentryplural}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryplural}] +\cs{Glsentryplural}\marg{label} +\end{definition} +These commands display the subsequent use plural text for the +glossary entry given by \meta{label}, as specified by the +\gloskey{plural} key. \cs{Glsentryplural} makes the first letter +uppercase. +\begin{definition}[\DescribeMacro{\glsentryfirst}] +\cs{glsentryfirst}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryfirst}] +\cs{Glsentryfirst}\marg{label} +\end{definition} +These commands display the \firstusetext\ for the glossary entry +given by \meta{label}, as specified by the \gloskey{first} key. +\cs{Glsentryfirst} makes the first letter uppercase. +\begin{definition}[\DescribeMacro{\glsentryfirstplural}] +\cs{glsentryfirstplural}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryfirstplural}] +\cs{Glsentryfirstplural}\marg{label} +\end{definition} +These commands display the plural form of the \firstusetext\ for the +glossary entry given by \meta{label}, as specified by the +\gloskey{firstplural} key. \cs{Glsentryfirstplural} makes the first +letter uppercase. +\begin{definition}[\DescribeMacro{\glsentrydesc}] +\cs{glsentrydesc}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentrydesc}] +\cs{Glsentrydesc}\marg{label} +\end{definition} +These commands display the description for the glossary entry given +by \meta{label}. \cs{Glsentrydesc} makes the first letter uppercase. +\begin{definition}[\DescribeMacro{\glsentrydescplural}] +\cs{glsentrydescplural}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentrydescplural}] +\cs{Glsentrydescplural}\marg{label} +\end{definition} +These commands display the plural description for the glossary entry +given by \meta{label}. \cs{Glsentrydescplural} makes the first +letter uppercase. +\begin{definition}[\DescribeMacro{\glsentrysymbol}] +\cs{glsentrysymbol}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentrysymbol}] +\cs{Glsentrysymbol}\marg{label} +\end{definition} +These commands display the symbol for the glossary entry given by +\meta{label}. \cs{Glsentrysymbol} makes the first letter uppercase. +\begin{definition}[\DescribeMacro{\glsentrysymbolplural}] +\cs{glsentrysymbolplural}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentrysymbolplural}] +\cs{Glsentrysymbolplural}\marg{label} +\end{definition} +These commands display the plural symbol for the glossary entry +given by \meta{label}. \cs{Glsentrysymbolplural} makes the first +letter uppercase. +\begin{definition}[\DescribeMacro{\glsentryuseri}] +\cs{glsentryuseri}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryuseri}] +\cs{Glsentryuseri}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\glsentryuserii}] +\cs{glsentryuserii}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryuserii}] +\cs{Glsentryuserii}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\glsentryuseriii}] +\cs{glsentryuseriii}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryuseriii}] +\cs{Glsentryuseriii}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\glsentryuseriv}] +\cs{glsentryuseriv}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryuseriv}] +\cs{Glsentryuseriv}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\glsentryuserv}] +\cs{glsentryuserv}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryuserv}] +\cs{Glsentryuserv}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\glsentryuservi}] +\cs{glsentryuservi}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryuservi}] +\cs{Glsentryuservi}\marg{label} +\end{definition} +These commands display the value of the user keys for the glossary +entry given by \meta{label}. +\begin{definition}[\DescribeMacro{\glshyperlink}] +\cs{glshyperlink}\oarg{link text}\marg{label} +\end{definition} +This command provides a hyperlink to the glossary entry given by +\meta{label} \textbf{but does not add any information to the +glossary file}. The link text is given by +\ics{glsentrytext}\marg{label} by default\footnote{versions before +3.0 used \ics{glsentryname} as the default, but this can cause +problems when \gloskey{name} has been \glsd{sanitize}.}, but can be +overridden using the optional argument. +\begin{important} +If you use \cs{glshyperlink}, you need to ensure that the relevant +entry has been added to the glossary using any of the commands +described in \sectionref{sec:glslink} or \sectionref{sec:glsadd} +otherwise you will end up with an undefined link. +\end{important} + +For further information see \ifpdf section~\ref*{sec:code:glsnolink} +\fi \qt{Displaying entry details without adding information to the +glossary} in the documented code (\texttt{glossaries.pdf}). + +\section{Displaying a glossary} +\label{sec:printglossary} + +The command +\begin{definition}[\DescribeMacro{\printglossaries}] +\cs{printglossaries} +\end{definition} +will display all the glossaries in the order in which they were +defined. Note that no glossaries will appear until you have either +used the Perl script \gls{makeglossaries} or have directly used +\gls{makeindex} or \gls{xindy} (as described in +\sectionref{sec:makeglossaries}). If the glossary +still does not appear after you re-\LaTeX\ your document, check the +\gls*{makeindex}/\gls*{xindy} log files to see if there is a problem. +Remember that you also need to use the command \ics{makeglossaries} +in the preamble to enable the glossaries. + +An individual glossary can be displayed using: +\begin{definition}[\DescribeMacro{\printglossary}] +\cs{printglossary}\oarg{options} +\end{definition} +where \meta{options} is a \meta{key}=\meta{value} list of options. +The following keys are available: +\begin{description} +\item[{\gloskey[printglossary]{type}}] The value of this key +specifies which glossary to print. If omitted, the default +glossary is assumed. For example, to print the list of acronyms: +\begin{verbatim} +\printglossary[type=\acronymtype] +\end{verbatim} + +\item[{\gloskey[printglossary]{title}}] This is the glossary's +title (overriding the title specified when the glossary was +defined). + +\item[{\gloskey[printglossary]{toctitle}}] This is the title +to use for the table of contents (if the \pkgopt{toc} package +option has been used). It may also be used for the page header, +depending on the page style. If omitted, the value of +\gloskey[printglossary]{title} is used. + +\item[{\gloskey[printglossary]{style}}] This specifies which +glossary style to use for this glossary, overriding the effect +of the \pkgopt{style} package option or \ics{glossarystyle}. + +\item[{\gloskey[printglossary]{numberedsection}}] This specifies +whether to use a numbered section for this glossary, overriding +the effect of the \pkgopt{numberedsection} package option. This +key has the same syntax as the \pkgopt{numberedsection} package +option, described in \sectionref{sec:pkgopts-sec}. + +\item[{\gloskey[printglossary]{nonumberlist}}] This is a boolean +key. If true (\verb|nonumberlist=true|) the numberlist is suppressed +for this glossary. If false (\verb|nonumberlist=false|) the +numberlist is displayed for this glossary. If no value is supplied, +true is assumed. + +\end{description} + +By default, the glossary is started either by \ics{chapter*} or by +\ics{section*}, depending on whether or not \ics{chapter} is defined. +This can be overridden by the \pkgopt{section} package option or the +\ics{setglossarysection} command. Numbered sectional units can be +obtained using the \pkgopt{numberedsection} package option. Each +glossary sets the page header via the command \ics{glossarymark}. If +this mechanism is unsuitable for your chosen class file or page +style package, you will need to redefine \ics{glossarymark}. Further +information about these options and commands is given in +\sectionref{sec:pkgopts-sec}. + +Information can be added to the start of the glossary (after the +title and before the main body of the glossary) by redefining +\begin{definition}[\DescribeMacro{\glossarypreamble}] +\cs{glossarypreamble} +\end{definition} +For example: +\begin{verbatim} +\renewcommand{\glossarypreamble}{Numbers in italic indicate +primary definitions.} +\end{verbatim} +This needs to be done before the glossary is displayed using +\cs{printglossaries} or \cs{printglossary}. Note that if you +want a different preamble for each glossary, you will need to +use a separate \cs{printglossary} for each glossary and change +the definition of \cs{glossarypreamble} between each glossary. +For example: +\begin{verbatim} +\renewcommand{\glossarypreamble}{Numbers in italic indicate +primary definitions.} +\printglossary +\renewcommand{\glossarypreamble}{} +\printglossary[type=acronym] +\end{verbatim} +Alternatively, you can do something like: +\begin{verbatim} +\renewcommand{\glossarypreamble}{Numbers in italic indicate +primary definitions.\gdef\glossarypreamble{}} +\printglossaries +\end{verbatim} +which will print the preamble text for the first glossary and +change the preamble to do nothing for subsequent glossaries. +(Note that \cs{gdef} is required as the glossary is placed within +a group.) + +There is an analogous command called +\begin{definition}[\DescribeMacro{\glossarypostamble}] +\cs{glossarypostamble} +\end{definition} +which is placed at the end of each glossary. + +For example: suppose you are using the \glostyle{superheaderborder} +style\footnote{you can't use the \glostyle{longheaderborder} style +for this example as you can't use the \env{longtable} environment in +two column mode.}, and you want the glossary to be in two columns, +but after the glossary you want to switch back to one column mode, +you could do: +\begin{verbatim} +\renewcommand*{\glossarysection}[2][]{% + \twocolumn[{\section*{#2}}]% + \setlength\glsdescwidth{0.6\linewidth}% + \glossarymark{\glossarytoctitle}% +} + +\renewcommand*{\glossarypostamble}{\onecolumn} +\end{verbatim} + +Within each glossary, each entry name is formatted according to +\begin{definition}[\DescribeMacro{\glsnamefont}] +\cs{glsnamefont}\marg{name} +\end{definition} +which takes one argument: the entry name. This command is always +used regardless of the glossary style. By default, \cs{glsnamefont} +simply displays its argument in whatever the surrounding font +happens to be. This means that in the list-like glossary styles +(defined in the \sty{glossary-list} style file) the name will appear +in bold, since the name is placed in the optional argument of +\cs{item}, whereas in the tabular styles (defined in the +\sty{glossary-long} and \sty{glossary-super} style files) the name +will appear in the normal font. The hierarchical glossary styles +(defined in the \sty{glossary-tree} style file) also set the name in +bold. + +For example, suppose you want all the entry names to appear in +medium weight small caps, then you can do: +\begin{verbatim} +\renewcommand{\glsnamefont}[1]{\textsc{\mdseries #1}} +\end{verbatim} + + +\section{Xindy} +\label{sec:xindy} + +If you want to use \gls{xindy} to sort the glossary, you +must use the package option \pkgopt{xindy}: +\begin{verbatim} +\usepackage[xindy]{glossaries} +\end{verbatim} +This ensures that the glossary information is written in +\gls*{xindy} syntax. + +\sectionref{sec:makeglossaries} covers how to use the external +indexing application. This section covers the commands provided +by the \styfmt{glossaries} package that allow you to adjust the +\gls{xindy} style file (\filetype{.xdy}) and parameters. + +To assist writing information to the \gls{xindy} style +file, the \styfmt{glossaries} package provides the following +commands: +\begin{definition}[\DescribeMacro{\glsopenbrace}] +\cs{glsopenbrace} +\end{definition} +\begin{definition}[\DescribeMacro{\glsclosebrace}] +\cs{glsclosebrace} +\end{definition} +which produce an open and closing brace. (This is needed because +\verb|\{| and \verb|\}| don't expand to a simple brace character +when written to a file.) + +In addition, if you are using a package that makes the double +quote character active (e.g. \sty{ngerman}) you can use: +\begin{definition}[\DescribeMacro{\glsquote}] +\cs{glsquote}\marg{text} +\end{definition} +which will produce \verb|"|\meta{text}\verb|"|. Alternatively, +you can use \verb|\string"| to write the double-quote character. +This document assumes that the double quote character has not been +made active, so the examples just use \verb|"| for clarity. + +If you want greater control over the \gls{xindy} style file than is +available through the \LaTeX\ commands provided by the +\styfmt{glossaries} package, you will need to edit the \gls*{xindy} +style file. In which case, you must use \ics{noist} to prevent the +style file from being overwritten by the \styfmt{glossaries} +package. For additional information about \gls*{xindy}, read the +\gls*{xindy} documentation. + +\subsection{Language and Encodings} +When you use \gls{xindy}, you need to specify the language +and encoding used (unless you have written your own custom +\gls*{xindy} style file that defines the relevant alphabet +and sort rules). If you use \gls{makeglossaries}, +this information is obtained from the document's auxiliary +(\filetype{.aux}) file. The \styfmt{glossaries} package attempts to +find the root language, but in the event that it gets it wrong or if +\gls*{xindy} doesn't support that language, then you can +specify the language using: +\begin{definition}[\DescribeMacro{\GlsSetXdyLanguage}] +\cs{GlsSetXdyLanguage}\oarg{glossary type}\marg{language} +\end{definition} +where \meta{language} is the name of the language. The +optional argument can be used if you have multiple glossaries +in different languages. If \meta{glossary type} is omitted, it +will be applied to all glossaries, otherwise the language +setting will only be applied to the glossary given by +\meta{glossary type}. + +If the \sty{inputenc} package is used, the encoding will be +obtained from the value of \ics{inputencodingname}. +Alternatively, you can specify the encoding using: +\begin{definition}[\DescribeMacro{\GlsSetXdyCodePage}] +\cs{GlsSetXdyCodePage}\marg{code} +\end{definition} +where \meta{code} is the name of the encoding. For example: +\begin{verbatim} +\GlsSetXdyCodePage{utf8} +\end{verbatim} + +Note that you can also specify the language and encoding using +the package option +\verb|xindy={language=|\meta{lang}\verb|,codepage=|\meta{code}\verb|}|. +For example: +\begin{verbatim} +\usepackage[xindy={language=english,codepage=utf8}]{glossaries} +\end{verbatim} + +If you write your own custom \gls{xindy} style file that +includes the language settings, you need to set the language +to nothing: +\begin{verbatim} +\GlsSetXdyLanguage{} +\end{verbatim} +(and remember to use \ics{noist} to prevent the style file from +being overwritten). + +\begin{important} +The commands \cs{GlsSetXdyLanguage} and \cs{GlsSetXdyCodePage} +have no effect if you don't use \gls{makeglossaries}. If +you call \gls{xindy} without \gls*{makeglossaries} you +need to remember to set the language and encoding using the +\texttt{-L} and \texttt{-C} switches. +\end{important} + + +\subsection{Locations and Number lists} +\label{sec:xindyloc} + +If you use \pkgopt{xindy}, the \styfmt{glossaries} package needs to +know which counters you will be using in the \gls{numberlist} in order to correctly format the \gls{xindy} style +file. Counters specified using the \pkgopt{counter} package option +or the \meta{counter} option of \ics{newglossary} are +automatically taken care of, but if you plan to use a different +counter in the \gloskey[glslink]{counter} key for commands like +\ics{glslink}, then you need to identify these counters \emph{before} +\ics{makeglossaries} using: +\begin{definition}[\DescribeMacro{\GlsAddXdyCounters}] +\cs{GlsAddXdyCounters}\marg{counter list} +\end{definition} +where \meta{counter list} is a comma-separated list of counter names. + +The most likely attributes used in the \gloskey[glslink]{format} +key (\locfmt{textrm}, \locfmt{hyperrm} etc) are automatically added +to the \gls{xindy} style file, but if you want to use another +attribute, you need to add it using: +\begin{definition}[\DescribeMacro{\GlsAddXdyAttribute}] +\cs{GlsAddXdyAttribute}\marg{name} +\end{definition} +where \meta{name} is the name of the attribute, as used in +the \gloskey[glslink]{format} key. For example, suppose I want a +bold, italic, hyperlinked location. I first need to define a +command that will do this: +\begin{verbatim} +\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} +\end{verbatim} +but with \gls{xindy}, I also need to add this as an allowed +attribute: +\begin{verbatim} +\GlsAddXdyAttribute{hyperbfit} +\end{verbatim} + +\begin{important} +Note that \cs{GlsAddXdyAttribute} has no effect if \ics{noist} is +used or if \ics{makeglossaries} is omitted. +\cs{GlsAddXdyAttribute} must be used before \ics{makeglossaries}. +Additionally, \cs{GlsAddXdyCounters} must come before +\cs{GlsAddXdyAttribute}. +\end{important} + +If the location numbers don't get expanded to a simple Arabic or +Roman number or a letter from a, \ldots, z or A, \ldots, Z, then +you need to add a location style in the appropriate format using +\begin{definition}[\DescribeMacro{\GlsAddXdyLocation}] +\cs{GlsAddXdyLocation}\oarg{prefix-location}\marg{name}\marg{definition} +\end{definition} +where \meta{name} is the name of the format and \meta{definition} is +the \gls{xindy} definition. The optional argument \meta{prefix-location} +is needed if \cs{theH}\meta{counter} either isn't defined or is +different from \cs{the}\meta{counter}. + +\begin{important} +Note that \cs{GlsAddXdyLocation} has no effect if \ics{noist} is +used or if \ics{makeglossaries} is omitted. +\cs{GlsAddXdyLocation} must be used before \ics{makeglossaries}. +\end{important} + +For example, suppose I decide to use a somewhat eccentric numbering +system for sections that redefines \cs{thesection} as follows: +\begin{verbatim} +\renewcommand*{\thesection}{[\thechapter]\arabic{section}} +\end{verbatim} +If I haven't done "counter=section" in the package +option, I need to specify that the counter will be used as a +location number: +\begin{verbatim} +\GlsAddXdyCounters{section} +\end{verbatim} +Next I need to add the location style (\cs{thechapter} is assumed to +be the standard \verb"\arabic{chapter}"): +\begin{verbatim} +\GlsAddXdyLocation{section}{:sep "[" "arabic-numbers" :sep "]" + "arabic-numbers" +} +\end{verbatim} +Note that if I have further decided to use the \sty{hyperref} +package and want to redefine \cs{theHsection} as: +\begin{verbatim} +\renewcommand*{\theHsection}{\thepart.\thesection} +\renewcommand*{\thepart}{\Roman{part}} +\end{verbatim} +then I need to modify the \cs{GlsAddXdyLocation} code above to: +\begin{verbatim} +\GlsAddXdyLocation["roman-numbers-uppercase"]{section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} +\end{verbatim} +Since \ics{Roman} will result in an empty string if the counter is +zero, it's a good idea to add an extra location to catch this: +\begin{verbatim} +\GlsAddXdyLocation{zero.section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} +\end{verbatim} +The above example is illustrated in the accompanying sample file +\samplefile{xdy2}. + +Another example: suppose you want the page numbers written as words +rather than digits and you use the \sty{fmtcount} package to +do this. You can redefine \ics{thepage} as follows: +\begin{verbatim} +\renewcommand*{\thepage}{\Numberstring{page}} +\end{verbatim} +This gets expanded to \verb|\protect \Numberstringnum |\marg{n} +where \meta{n} is the Arabic page number. This means that you need to +define a new location that has that form: +\begin{verbatim} +\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space + \string\Numberstringnum\space\glsopenbrace" + "arabic-numbers" :sep "\glsclosebrace"} +\end{verbatim} +Note that it's necessary to use \cs{space} to indicate that +spaces also appear in the format, since, unlike \TeX, +\gls{xindy} doesn't ignore spaces after control sequences. + +\cs{GlsAddXdyLocation}\marg{name}\marg{definition} will define commands +\begin{definition} +\cs{glsX}\meta{counter}"X"\meta{name}\marg{Hprefix}\marg{location} +\end{definition} +for each counter that has been identified either by the +\pkgopt{counter} package option, the \meta{counter} option for +\ics{newglossary} or in the argument of \ics{GlsAddXdyCounters}. + +The first argument \meta{Hprefix} is only relevant when used with +the \sty{hyperref} package and indicates that \cs{the}\meta{Hcounter} +is given by \cs{Hprefix}"."\cs{the}\meta{counter}. The sample +file \samplefile{xdy}, which comes with the \styfmt{glossaries} +package, uses the default \ctr{page} counter for locations, and it +uses the default \ics{glsnumberformat} and a custom \cs{hyperbfit} +format. A new \gls{xindy} location called \texttt{Numberstring}, as +illustrated above, is defined to make the page numbers appear as +\qt{One}, \qt{Two}, etc. In order for the location numbers to +hyperlink to the relevant pages, I need to redefine the necessary +\cs{glsX}\meta{counter}"X"\meta{format} commands: +\begin{verbatim} +\renewcommand{\glsXpageXglsnumberformat}[2]{% + \linkpagenumber#2% +} + +\renewcommand{\glsXpageXhyperbfit}[2]{% + \textbf{\em\linkpagenumber#2}% +} + +\newcommand{\linkpagenumber}[3]{\hyperlink{page.#3}{#1#2{#3}}} +\end{verbatim} + +In the \gls{numberlist}, the locations are sorted according to +type. The default ordering is: \texttt{roman-page-numbers} (e.g.\ +i), \texttt{arabic-page-numbers} (e.g.\ 1), +\texttt{arabic-section-numbers} (e.g.\ 1.1 if the compositor is a +full stop or 1-1 if the compositor is a hyphen\footnote{see +\ics{setCompositor} described in \sectionref{sec:setup}}), +\texttt{alpha-page-numbers} (e.g.\ a), \texttt{Roman-page-numbers} +(e.g.\ I), \texttt{Alpha-page-numbers} (e.g.\ A), +\texttt{Appendix-page-numbers} (e.g.\ A.1 if the Alpha compositor is +a full stop or A-1 if the Alpha compositor is a hyphen\footnote{see +\ics{setAlphaCompositor} described in +\sectionref{sec:setup}}), user defined location names (as +specified by \ics{GlsAddXdyLocation} in the order in which they were +defined), \texttt{see} (cross-referenced entries). This ordering can +be changed using: + +\DescribeMacro{\GlsSetXdyLocationClassOrder} +\begin{definition} +\cs{GlsSetXdyLocationClassOrder}\marg{location names} +\end{definition} +where each location name is delimited by double quote marks and +separated by white space. For example: +\begin{verbatim} +\GlsSetXdyLocationClassOrder{ + "arabic-page-numbers" + "arabic-section-numbers" + "roman-page-numbers" + "Roman-page-numbers" + "alpha-page-numbers" + "Alpha-page-numbers" + "Appendix-page-numbers" + "see" +} +\end{verbatim} + +\begin{important}\raggedright +Note that \cs{GlsSetXdyLocationClassOrder} has no effect if +\ics{noist} is used or if \ics{makeglossaries} is omitted. +\cs{GlsSetXdyLocationClassOrder} must be used before +\ics{makeglossaries}. +\end{important} + +If a \gls{numberlist} consists of a sequence of consecutive +numbers, the range will be concatenated. The +number of consecutive locations that causes a range formation +defaults to 2, but can be changed using: +\begin{definition}[\DescribeMacro{\GlsSetXdyMinRangeLength}] +\cs{GlsSetXdyMinRangeLength}\marg{n} +\end{definition} +For example: +\begin{verbatim} +\GlsSetXdyMinRangeLength{3} +\end{verbatim} +The argument may also be the keyword \texttt{none}, to indicate that +there should be no range formations. See the \gls{xindy} +manual for further details on range formations. + +\begin{important} +Note that \cs{GlsSetXdyMinRangeLength} has no effect if \ics{noist} +is used or if \ics{makeglossaries} is omitted. +\cs{GlsSetXdyMinRangeLength} must be used before +\ics{makeglossaries}. +\end{important} + +See \sectionref{sec:numberlists} for further details. + + +\subsection{Glossary Groups} + +The glossary is divided into groups according to the first +letter of the sort key. The \styfmt{glossaries} package also adds +a number group by default, unless you suppress it in the +\pkgopt{xindy} package option. For example: +\begin{verbatim} +\usepackage[xindy={glsnumbers=false}]{glossaries} +\end{verbatim} +Any entry that doesn't go in one of the letter groups or the +number group is placed in the default group. + +If you have a number group, the default behaviour is to locate +it before the \qt{A} letter group. If you are not using a +Roman alphabet, you can change this using: + +\DescribeMacro{\GlsSetXdyFirstLetterAfterDigits} +\begin{definition} +\cs{GlsSetXdyFirstLetterAfterDigits}\marg{letter} +\end{definition} + +\begin{important}\raggedright +Note that \cs{GlsSetXdyFirstLetterAfterDigits} has no effect if +\ics{noist} is used or if \ics{makeglossaries} is omitted. +\cs{GlsSetXdyFirstLetterAfterDigits} must be used before +\ics{makeglossaries}.\par +\end{important} + + +\section{Defining New Glossaries} +\label{sec:newglossary} + +A new glossary can be defined using: +\begin{definition}[\DescribeMacro{\newglossary}] +\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}\marg{title}\oarg{counter} +\end{definition} +where \meta{name} is the label to assign to this glossary. The +arguments \meta{in-ext} and \meta{out-ext} specify the extensions to +give to the input and output files for that glossary, \meta{title} +is the default title for this new glossary and the final optional +argument \meta{counter} specifies which counter to use for the +associated \glspl{numberlist} (see also +\sectionref{sec:numberlists}). The first optional argument specifies +the extension for the \gls{makeindex} or \gls{xindy} transcript file +(this information is only used by \gls{makeglossaries} which picks +up the information from the auxiliary file). + +Note that the main (default) glossary is automatically created as: +\begin{verbatim} +\newglossary{main}{gls}{glo}{\glossaryname} +\end{verbatim} +so it can be identified by the label \texttt{main} (unless the +\pkgopt{nomain} package option is used). Using the +\pkgopt{acronym} package option is equivalent to: +\begin{verbatim} +\newglossary[alg]{acronym}{acr}{acn}{\acronymname} +\end{verbatim} +so it can be identified by the label \texttt{acronym}. If you are +not sure whether the \pkgopt{acronym} option has been used, you +can identify the list of acronyms by the command +\DescribeMacro{\acronymtype}\cs{acronymtype} which is set to +\texttt{acronym}, if the \pkgopt{acronym} option has been used, +otherwise it is set to \texttt{main}. Note that if you are using +the main glossary as your list of acronyms, you need to declare +it as a list of acronyms using the package option +\pkgopt{acronymlists}. + +\begin{important} +All glossaries must be defined before \ics{makeglossaries} to +ensure that the relevant output files are opened. +\end{important} + + +\section{Acronyms} +\label{sec:acronyms} + +You may have noticed in \sectionref{sec:newglosentry} that when you +specify a new entry, you can specify alternate text to use when the +term is \glsd{firstuse} in the document. This provides a +useful means to define acronyms. For convenience, the +\styfmt{glossaries} package defines the command: +\begin{definition}[\DescribeMacro{\newacronym}] +\cs{newacronym}\oarg{key-val +list}\marg{label}\marg{abbrv}\marg{long} +\end{definition} + +This uses \ics{newglossaryentry} to create an entry with the given +label in the glossary given by \ics{acronymtype}. Amongst other +things, it sets up the \gloskey{first} and \gloskey{text} keys and, +depending on the acronym style, may also use \ics{defdisplayfirst} +and \ics{defdisplay} (see \sectionref{sec:glsdisplay}). + +The optional argument \marg{key-val list} allows you to specify keys +such as \gloskey{description} (when used with the +\pkgopt{description} package option, described below) or you can +override plural forms of \meta{abbrv} or \meta{long} using the +\gloskey{shortplural} or \gloskey{longplural} keys. +For example: +\begin{verbatim} +\newacronym[longplural={diagonal matrices}]{dm}{DM}{diagonal +matrix} +\end{verbatim} +If the \firstuse\ uses the plural form, \verb|\glspl{dm}| will +display: diagonal matrices (DMs). + + +The following package options are available to change the acronym +style: + +\begin{description} +\item[\pkgopt{description}] +With this package option, the \gloskey{description} key needs to be +set in the optional argument \meta{key-val list} of \cs{newacronym}. +(If this package option isn't used, the long form \meta{long} is put +in the \gloskey{description} key.) + +\item[\pkgopt{footnote}] +With this package option, on \gls{firstuse} the long form \meta{long} is +placed in a footnote. By default the long form in the footnote will +link to the relevant entry in the glossary or list of acronyms. You +can prevent this link by doing: +\begin{verbatim} +\let\acrfootnote\acrnolinkfootnote +\end{verbatim} + +\item[\pkgopt{smallcaps}] +With this package option, the short form \meta{abbrv} is typeset +using \ics{textsc}. (Recall that \cs{textsc} converts lower case +characters into small capitals and leaves upper case characters as +they are. Therefore, you need to have lower case characters in +\meta{abbrv} for this option to have an effect.) + +\item[\pkgopt{smaller}] +This is similar to \pkgopt{smallcaps}, except that \ics{textsmaller} +is used instead of \ics{textsc}. Note that the \styfmt{glossaries} +package doesn't define \ics{textsmaller} nor does it load any +package that does so. If you use this option, you must make sure +\ics{textsmaller} is defined (for example by loading \sty{relsize}). + +\item[\pkgopt{dua}] +This option will set both the \gloskey{first} and \gloskey{text} +keys to the long form \meta{long}. +\end{description} + +If you want to define your own custom acronym style, see +\sectionref{sec:customacronym}. + +\begin{important} +If you try using \ics{newglossaryentry} for entries in a designated +list of acronyms in combination with any of the above named package +options you are likely to get unexpected results such as empty +brackets or empty footnotes. + +If you don't intend to use \ics{newacronym} you should skip this section] +and not use the above package options. +\end{important} + +As mentioned in \sectionref{sec:pkgopts-sec}, the command +\ics{acronymtype} is the name of the glossary in which the acronyms +should appear. If the \pkgopt{acronym} package option has been used, +this will be \texttt{acronym}, otherwise it will be \texttt{main}. +The acronyms can then be used in exactly the same way as any other +glossary entry. If you want more than one list of acronyms, you must +identify the others using the package options \pkgopt{acronymlists}. +This ensures that options such as \pkgopt{footnote} and +\pkgopt{smallcaps} work for the additional lists of acronyms. + +\begin{important}\raggedright +Since \cs{newacronym} sets \verb|type=\acronymtype|, +if you want to load a file containing acronym definitions using +\ics{loadglsentries}\oarg{type}\marg{filename}, the optional argument +\meta{type} will not have an effect unless you explicitly set the +type as \verb|type=\glsdefaulttype| in the optional argument to +\ics{newacronym}. See \sectionref{sec:loadglsentries}. +\end{important} + +Since \ics{newacronym} uses \ics{newglossaryentry}, you can use +commands like \ics{gls} and \ics{glsreset} as with any other +glossary entry. + +For example, the following defines the acronym IDN: +\begin{verbatim} +\newacronym{idn}{IDN}{identification number} +\end{verbatim} +\verb|\gls{idn}| will produce \qt{identification number (IDN)} on +\firstuse\ and \qt{IDN} on subsequent uses. If you want to use the +\pkgopt{smallcaps} package option, you need to use lower case +characters for the shortened form: +\begin{verbatim} +\newacronym{idn}{idn}{identification number} +\end{verbatim} +Now \verb|\gls{idn}| will produce \qt{identification number +(\textsc{idn})} on \firstuse\ and \qt{\textsc{IDN}} on subsequent +uses. + +If you use any of the package options \pkgopt{smallcaps}, +\pkgopt{smaller}, \pkgopt{description} or \pkgopt{footnote}, the +short form \meta{abbrv} will be displayed in the document using: +\begin{definition}[\DescribeMacro{\acronymfont}] +\cs{acronymfont}\marg{text} +\end{definition} +and +\begin{definition}[\DescribeMacro{\firstacronymfont}] +\cs{firstacronymfont}\marg{text} +\end{definition} +where \cs{firstacronymfont} is applied on \firstuse\ and +\cs{acronymfont} is applied on subsequent use. Note that if you +don't use any of the above package options, changing the definition +of \cs{acronymfont} or \cs{firstacronymfont} will have no effect. In +this case, the recommended route is to use either the +\pkgopt{smaller} or the \pkgopt{smallcaps} package option and +redefine \cs{acronymfont} and \cs{firstacronymfont} as required. +(The \pkgopt{smallcaps} option sets the default plural suffix in an +upright font to cancel the effect of \ics{textsc}, whereas +\pkgopt{smaller} sets the suffix in the surrounding font.) For +example, if you want acronyms in a normal font on \gls{firstuse} and +emphasized on subsequent use, do: +\begin{verbatim} +\usepackage[smaller]{glossaries} +\renewcommand*{\firstacronymfont}[1]{#1} +\renewcommand*{\acronymfont}[1]{\emph{#1}} +\end{verbatim} +(Note that it is for this reason that the \sty{relsize} package is +not automatically loaded when selecting the \pkgopt{smaller} package +option.) + +There are commands analogous to \ics{glstext} (described in +\sectionref{sec:glslink}) that allow you to access just the short +form, just the long form or the full form, without affecting the +\gls{firstuseflag}. (Note that the full form isn't necessarily the same +as the text produced on \firstuse.) + +\begin{definition}[\DescribeMacro{\acrshort}] +\cs{acrshort}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +This displays the short form for the entry given by \meta{label}. +The optional arguments are the same as those for \ics{glstext}. +There is also a starred version to suppress the hyperlink. There are +also analogous upper case variants: +\begin{definition}[\DescribeMacro{\Acrshort}] +\cs{Acrshort}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\ACRshort}] +\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +\begin{definition}[\DescribeMacro{\acrlong}] +\cs{acrlong}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +This displays the long form for the entry given by \meta{label}. +The optional arguments are the same as before. There is also a starred +version to suppress the hyperlink. There are also analogous upper case +variants: +\begin{definition}[\DescribeMacro{\Acrlong}] +\cs{Acrlong}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\ACRshort}] +\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +\begin{definition}[\DescribeMacro{\acrfull}] +\cs{acrfull}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +This is equivalent to: +\DescribeMacro{\acrfullformat}\cs{acrfullformat}"{"\ics{acrlong}"}{"\ics{acrshort}"}". +This defaults to \meta{long} (\ics{acronymfont}\marg{short}) +regardless of the package options. There are also analogous upper +case variants: +\begin{definition}[\DescribeMacro{\Acrfull}] +\cs{Acrfull}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro{\ACRfull}] +\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +If you find the above commands too cumbersome to write, you can use +the \pkgopt{shortcuts} package option to activate the shorter +command names listed in \tableref{tab:shortcuts}. + +\begin{table}[htbp] +\caption[Synonyms provided by the package option shortcuts]{Synonyms provided by the package option \pkgopt{shortcuts}} +\label{tab:shortcuts} +\vskip\baselineskip +\centering +\begin{tabular}{ll} +\bfseries Shortcut Command & \bfseries Equivalent Command\\ +\ics{acs} & \ics{acrshort}\\ +\ics{Acs} & \ics{Acrshort}\\ +\ics{acsp} & \ics{acrshortpl}\\ +\ics{Acsp} & \ics{Acrshortpl}\\ +\ics{acl} & \ics{acrlong}\\ +\ics{Acl} & \ics{Acrlong}\\ +\ics{aclp} & \ics{acrlongpl}\\ +\ics{Aclp} & \ics{Acrlongpl}\\ +\ics{acf} & \ics{acrfull}\\ +\ics{Acf} & \ics{Acrfull}\\ +\ics{acfp} & \ics{acrfullpl}\\ +\ics{Acfp} & \ics{Acrfullpl}\\ +\ics{ac} & \ics{gls}\\ +\ics{Ac} & \ics{Gls}\\ +\ics{acp} & \ics{glspl}\\ +\ics{Acp} & \ics{Glspl} +\end{tabular} +\end{table} + +It is also possible to access the long and short forms without +adding information to the glossary using commands analogous to +\ics{glsentrytext} (described in \sectionref{sec:glsnolink}). + +The long form can be accessed using: +\begin{definition}[\DescribeMacro{\glsentrylong}] +\cs{glsentrylong}\marg{label} +\end{definition} +or, with the first letter converted to upper case: +\begin{definition}[\DescribeMacro{\Glsentrylong}] +\cs{Glsentrylong}\marg{label} +\end{definition} +Plural forms: +\begin{definition}[\DescribeMacro{\glsentrylongpl}] +\cs{glsentrylongpl}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentrylongpl}] +\cs{Glsentrylongpl}\marg{label} +\end{definition} + +Similarly, to access the short form: +\begin{definition}[\DescribeMacro{\glsentryshort}] +\cs{glsentryshort}\marg{label} +\end{definition} +or, with the first letter converted to upper case: +\begin{definition}[\DescribeMacro{\Glsentryshort}] +\cs{Glsentryshort}\marg{label} +\end{definition} +Plural forms: +\begin{definition}[\DescribeMacro{\glsentryshortpl}] +\cs{glsentryshortpl}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryshortpl}] +\cs{Glsentryshortpl}\marg{label} +\end{definition} + +And the full form, \meta{long} (\meta{short}), can be obtained +using: +\begin{definition}[\DescribeMacro{\glsentryfull}] +\cs{glsentryfull}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryfull}] +\cs{Glsentryfull}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\glsentryfullpl}] +\cs{glsentryfullpl}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\Glsentryfullpl}] +\cs{Glsentryfullpl}\marg{label} +\end{definition} + +\subsection{Predefined Acronym Styles} + +Some of the acronym-related package options may be combined. Listed +below are the effects of different combinations. If you use an +invalid combination, you'll get an error message. + +\begin{description} +\item[\pkgopt{description},\pkgopt{footnote}]\ifpdf\mbox{}\par\fi +When these two package options are used together, the \firstuse\ displays +the entry as: +\begin{display} +\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} +\end{display} +while subsequent use displays the entry as: +\begin{display} +\cs{acronymfont}\marg{abbrv}\meta{insert} +\end{display} +where \meta{insert} indicates the text supplied in the final +optional argument to \ics{gls}, \ics{glspl} or their uppercase +variants. + +\item[\pkgopt{dua}]\ifpdf\mbox{}\par\fi +The \pkgopt{dua} package option always makes \ics{gls} display the +expanded form and so may not be used with \pkgopt{footnote}, +\pkgopt{smaller} or \pkgopt{smallcaps}. Both \firstuse\ and subsequent +use displays the entry in the form: +\begin{display} +\meta{long}\meta{insert} +\end{display} +You can, however, access the short form using \ics{acrshort} and its +variants. + +\item[\pkgopt{description}]\ifpdf\mbox{}\par\fi +This package option displays the entry on \firstuse\ as: +\begin{display} +\meta{long}\meta{insert} (\ics{firstacronymfont}\marg{abbrv}) +\end{display} +while subsequent use displays the entry as: +\begin{display} +\cs{acronymfont}\marg{abbrv}\meta{insert} +\end{display} + +Note that with this option, you need to specify the description +using the \gloskey{description} key in the optional argument +of \ics{newacronym}. + +\item[\pkgopt{footnote}]\ifpdf\mbox{}\par\fi +This package option displays the entry on \firstuse\ as: +\begin{display} +\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} +\end{display} +while subsequent use displays the entry as: +\begin{display} +\cs{acronymfont}\marg{abbrv}\meta{insert} +\end{display} +Acronyms will be sorted according to the short form. + +Note that on \firstuse, it is the long form in the footnote that +links to the relevant glossary entry (where hyperlinks are enabled), +whereas on subsequent use, the acronym links to the relevant +glossary entry. You can suppress the long form link by setting: +\begin{verbatim} +\let\acrfootnote\acrnolinkfootnote +\end{verbatim} + +\item[\pkgopt{smallcaps}]\ifpdf\mbox{}\par\fi +If neither the \pkgopt{footnote} nor \pkgopt{description} options +have been set, this option displays the entry on \firstuse\ as: +\begin{display} +\meta{long}\meta{insert} (\ics{firstacronymfont}\marg{abbrv}) +\end{display} +while subsequent use displays the entry as: +\begin{display} +\cs{acronymfont}\marg{abbrv}\meta{insert} +\end{display} +where \ics{acronymfont} is set to \verb|\textsc{#1}|. + +\begin{important} +Note that since the acronym is displayed using \ics{textsc}, +the short form, \meta{abbrv}, should be specified in lower case. +\ifpdf(Recall that "\textsc{abc}" produces \textsc{abc} whereas +"\textsc{ABC}" produces \textsc{ABC}.)\fi +\end{important} + +\item[\pkgopt{smaller}]\ifpdf\mbox{}\par\fi +If neither the \pkgopt{footnote} nor \pkgopt{description} options +have been set, this option displays the entry on \firstuse\ as: +\begin{display} +\meta{long}\meta{insert} (\ics{firstacronymfont}\marg{abbrv}) +\end{display} +while subsequent use displays the entry as: +\begin{display} +\ics{acronymfont}\marg{abbrv}\meta{insert} +\end{display} +where \ics{acronymfont} is set to +\verb|\textsmaller{#1}|.\footnote{not that this was change from +using \ics{smaller} to \ics{textsmaller} as declarations +cause a problem for \ics{makefirstuc}.} +The entries will be sorted according to the short form. + +\begin{important} +Remember to load a package that defines \ics{textsmaller} (such as +\sty{relsize}) if you want to use this option, unless you want +to redefine \ics{acronymfont} to use some other formatting command. +\end{important} + +\item[None of the above]\ifpdf \mbox{}\par\fi +If none of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, +\pkgopt{footnote}, \pkgopt{dua} or \pkgopt{description} are used, +then on \firstuse\ the entry is displayed as: +\begin{display} +\meta{long} (\meta{abbrv})\meta{insert} +\end{display} +while subsequent use displays the entry as: +\begin{display} +\meta{abbrv}\meta{insert} +\end{display} +Entries will be sorted according to the short form. +\end{description} + +\subsection{Displaying the List of Acronyms} + +The list of acronyms is just like any other type of glossary and can +be displayed on its own using +\ics{printglossary}"[type=\acronymtype]" or with all the other +glossaries using \ics{printglossaries}. However, care must be taken +to choose a glossary style that's appropriate to your acronym style. +The different acronym-related package options store different +information in the \gloskey{name}, \gloskey{description} and +\gloskey{symbol} keys. + +\Tableref{tab:acronymsettings} lists the package options that govern +the acronym styles and how the information is stored in the keys +used when displaying the glossary. Note that the \pkgopt{description} +package option uses the following command in the \gloskey{name}: +\begin{definition}[\DescribeMacro{\acrnameformat}] +\cs{acrnameformat}\marg{abbrv}\marg{long} +\end{definition} +This defaults to just \cs{acronymfont}\marg{abbrv}. + +For example, if I use the package options \pkgopt{description} and +\pkgopt{footnote}, then the name field will contain the abbreviation +and the symbol field will contain the long form. If I then use the +\glostyle{long4col} style, each entry in the list of acronyms will +appear in the form: +\begin{display} +\ics{acronymfont}\marg{abbrv} \meta{description} \meta{long} +\meta{location list} +\end{display} +Alternatively, you can define your own custom style (see +\sectionref{sec:newglossarystyle} for further details). + +\begin{table}[htbp] +\caption{Package options governing \cs{newacronym} and how the +information is stored} +\label{tab:acronymsettings} +\begin{center} +\begin{tabular}{lllll} +\bfseries Package Option & +\gloskey{name} & +\gloskey{description} & +\gloskey{symbol}\\ +\pkgopt{description},\pkgopt{footnote} & +\ics{acronymfont}\marg{abbrv} & +user supplied & +\meta{long}\\ +\pkgopt{description},\pkgopt{dua} & +\meta{long} & +user supplied & +\meta{abbrv}\\ +\pkgopt{description} & +\ics{acrnameformat}\marg{abbrv}\marg{long} & +user supplied & +\meta{abbrv}\\ +\pkgopt{footnote} & +\ics{acronymfont}\marg{abbrv} & +\meta{long} & + \\ +\pkgopt{smallcaps} & +\ics{acronymfont}\marg{abbrv} & +\meta{long} & +\meta{abbrv}\\ +\pkgopt{smaller} & +\ics{acronymfont}\marg{abbrv} & +\meta{long} & +\meta{abbrv}\\ +\pkgopt{dua} & +\meta{abbrv} & +\meta{long} & +\meta{abbrv}\\ +None of the above& +\meta{abbrv} & +\meta{long} & +\end{tabular} +\end{center} +\end{table} + +\subsection{Defining A Custom Acronym Style} +\label{sec:customacronym} + +You may find that the predefined acronyms styles that come with the +\styfmt{glossaries} package don't suit your requirements. In this +case you can define your own style. This is done by redefining the +following commands: +\begin{definition}[\DescribeMacro{\CustomAcronymFields}] +\cs{CustomAcronymFields} +\end{definition} +This command sets up the keys for \ics{newglossaryentry} when +you define an acronym using \ics{newacronym}. Within the definition +of \cs{CustomAcronymFields}, you may use \cs{the}\ics{glslongtok} to +access the long form, \cs{the}\ics{glsshorttok} to access the short +form and \cs{the}\ics{glslabeltok} to access the label. This command +is typically used to set the \gloskey{name}, \gloskey{first}, +\gloskey{firstplural}, \gloskey{text} and \gloskey{plural} keys. It +may also be used to set the \gloskey{symbol} or +\gloskey{description} keys depending on your requirements. + +\begin{definition}[\DescribeMacro{\SetCustomDisplayStyle}] +\cs{SetCustomDisplayStyle}\marg{type} +\end{definition} +This is used to set up the display style for the glossary given by +\meta{type}. This should typically just use \ics{defglsdisplayfirst} +and \ics{defglsdisplay}. + +Once you have redefined \cs{CustomAcronymFields} and +\cs{SetCustomDisplayStyle}, you must then switch to this style using +\begin{definition}[\DescribeMacro{\SetCustomStyle}] +\cs{SetCustomStyle} +\end{definition} +Note that you may still use the \pkgopt{shortcuts} package option +with your custom style. + +\begin{important} +If you omit \cs{SetCustomStyle}, or use it before you redefine +\cs{CustomAcronymFields} and \cs{SetCustomDisplayStyle}, your new +style won't be correctly implemented. You must set up the custom style +before defining new acronyms. The acronyms must be defined using +\ics{newacronym} not \ics{newglossaryentry}. +\end{important} + +As an example, suppose I want my acronym on \gls{firstuse} to have the +short form in the text and the long form with the description in a +footnote. Suppose also that I want the short form to be put in small +caps in the main body of the document, but I want it in normal +capitals in the list of acronyms. In my list of acronyms, I want the +long form as the name with the short form in brackets followed by +the description. That is, in the text I want \ics{gls} on \gls{firstuse} +to display: +\begin{display} +\ics{textsc}\marg{abbrv}\cs{footnote}"{"\meta{long}: \meta{description}"}" +\end{display} +on subsequent use: +\begin{display} +\ics{textsc}\marg{abbrv} +\end{display} +and in the list of acronyms, each entry will be displayed in the +form: +\begin{display} +\meta{long} (\meta{short}) \meta{description} +\end{display} + +First, I need to redefine \ics{CustomAcronymFields} so that +\ics{newacronym} will correctly set the \gloskey{name}, +\gloskey{text} and \gloskey{plural} keys. I want the long form to be +stored in the \gloskey{name} and the short form to be stored in +\gloskey{text}. In addition, I'm going to set the \gloskey{symbol} +to the short form in upper case so that it will appear in the list +of acronyms. + +\begin{verbatim} +\renewcommand*{\CustomAcronymFields}{% + name={\the\glslongtok},% + symbol={\MakeUppercase{\the\glsshorttok}},% + text={\textsc{\the\glsshorttok}},% + plural={\textsc{\the\glsshorttok}\noexpand\acrpluralsuffix}% +} +\end{verbatim} + +When using \ics{newacronym}, the short and long forms are stored in +the \gloskey{short} and \gloskey{long} keys, and the plural forms +are stored in \gloskey{shortplural} and \gloskey{longplural}. +So when I use \ics{defglsdisplayfirst} +and \ics{defglsdisplay}, I can use \ics{glsentrylong} to access +the long form. Recall from \sectionref{sec:glsdisplay}, that the +optional argument to \ics{defglsdisplayfirst} and \ics{defglsdisplay} +indicates the glossary type. This is passed to +\ics{SetCustomDisplayStyle}. The mandatory argument sets up the +definition of \ics{glsdisplayfirst} and \ics{glsdisplay} for the +given glossary, where the first argument corresponds to the +\gloskey{first}, \gloskey{firstplural}, \gloskey{text} or +\gloskey{plural}, as appropriate, the second argument corresponds to +the \gloskey{description}, the third corresponds to the +\gloskey{symbol} and the fourth argument is the inserted text. + +\begin{verbatim} +\renewcommand*{\SetCustomDisplayStyle}[1]{% + \defglsdisplayfirst[#1]{##1##4\protect\footnote{% + \glsentrylong{\glslabel}: ##2% + }} + \defglsdisplay[#1]{##1##4}% +} +\end{verbatim} + +Since we have a definition inside a definition, \verb|#1| refers to +the argument of \ics{SetCustomDisplayStyle}, and \verb|##1|, \ldots, +\verb|##4|, refer to the arguments of \ics{glsdisplayfirst} and +\ics{glsdisplay}. + +Now that I've redefined \ics{CustomAcronymFields} and +\ics{SetCustomDisplayStyle}, I can set this style using +\begin{verbatim} +\SetCustomStyle +\end{verbatim} +and now I can define my acronyms: +\begin{verbatim} +\newacronym[description={set of tags for use in developing hypertext +documents}]{html}{html}{Hyper Text Markup Language} + +\newacronym[description={language used to describe the layout of a +document written in a markup language}]{css}{css}{Cascading Style +Sheet} +\end{verbatim} + +Note that since I've used the description in the main body of the +text, I need to switch off the sanitization otherwise any commands +within the description won't get interpreted. Also I want to use the +\sty{hyperref} package, but this will cause a problem on \gls{firstuse} +as I'll get nested hyperlinks, so I need to switch off the +hyperlinks on \gls{firstuse}. In addition, I want to use a glossary style +that displays the symbol. Therefore, in my preamble I have: + +\begin{verbatim} +\usepackage[colorlinks]{hyperref} +\usepackage[acronym, % create list of acronyms + nomain, % don't need main glossary for this example + style=tree, % need a style that displays the symbol + hyperfirst=false,% don't hyperlink first use + sanitize=none % switch off sanitization as description + % will be used in the main text + ]{glossaries} +\end{verbatim} + +Note that I haven't used the \pkgopt{description} or +\pkgopt{footnote} package options. + +\subsection{Upgrading From the glossary Package} +\label{sec:oldacronym} +Users of the obsolete \sty{glossary} package may recall that +the syntax used to define new acronyms has changed with the +replacement \styfmt{glossaries} package. In addition, the old +\sty{glossary} package created the command +\cs{}\meta{acr-name} when defining the acronym \meta{acr-name}. + +In order to facilitate migrating from the old package to the new +one, the \styfmt{glossaries} package\footnote{as from version 1.18} +provides the command: +\begin{definition}[\DescribeMacro{\oldacronym}] +\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list} +\end{definition} +This uses the same syntax as the \sty{glossary} package's +method of defining acronyms. It is equivalent to:\\[10pt] +\ics{newacronym}\oarg{key-val list}\marg{label}\marg{abbrv}\marg{long}\\[10pt] +In addition, \ics{oldacronym} also defines the commands +\cs{}\meta{label}, which is equivalent to \ics{gls}\marg{label}, +and \cs{}\meta{label}\texttt{*}, which is equivalent to +\ics{Gls}\marg{label}. If \meta{label} is omitted, \meta{abbrv} +is used. Since commands names must consist only of alphabetical +characters, \meta{label} must also only consist of alphabetical +characters. Note that \cs{}\meta{label} doesn't allow you to use +the first optional argument of \ics{gls} or \ics{Gls} --- you will +need to explicitly use \ics{gls} or \ics{Gls} to change the +settings. + +\begin{important} +Recall that, in general, \LaTeX\ ignores spaces following command +names consisting of alphabetical characters. This is also true for +\cs{}\meta{label} unless you additionally load the +\sty{xspace} package. +\end{important} + +The \styfmt{glossaries} package doesn't load the \sty{xspace} package +since there are both advantages and disadvantages to using +\ics{xspace} in \cs{}\meta{label}. If you don't use the +\sty{xspace} package you need to explicitly force a space using +\verb*|\ | (backslash space) however you can follow \cs{}\meta{label} +with additional text in square brackets (the final optional +argument to \ics{gls}). If you use the \sty{xspace} package +you don't need to escape the spaces but you can't use +the optional argument to insert text (you will have to explicitly +use \ics{gls}). + +To illustrate this, suppose I define the acronym \qt{abc} as +follows: +\begin{verbatim} +\oldacronym{abc}{example acronym}{} +\end{verbatim} +This will create the command \cs{abc} and its starred version +\cs{abc*}. \Tableref{tab:xspace} illustrates the effect of +\cs{abc} (on subsequent use) according to whether or not the +\sty{xspace} package has been loaded. As can be seen from the +final row in the table, the \sty{xspace} package prevents the +optional argument from being recognised. + +\begin{table}[htbp] +\caption[The effect of using xspace]{The effect of using +\styfmt{xspace} with \cs{oldacronym}} +\label{tab:xspace} +\vskip\baselineskip +\centering +\begin{tabular}{lll} +\bfseries Code & \bfseries With \styfmt{xspace} & +\bfseries Without \styfmt{xspace}\\ +\verb|\abc.| & abc. & abc.\\ +\verb|\abc xyz| & abc xyz & abcxyz\\ +\verb|\abc\ xyz| & abc xyz & abc xyz\\ +\verb|\abc* xyz| & Abc xyz & Abc xyz\\ +\verb|\abc['s] xyz| & abc ['s] xyz & abc's xyz +\end{tabular} +\par +\end{table} + + + +\section{Unsetting and Resetting Entry Flags} +\label{sec:glsunset} + +When using \ics{gls}, \ics{glspl} and their uppercase variants it is +possible that you may want to use the value given by the +\gloskey{first} key, even though you have already \glslink{firstuse}{used} the glossary +entry. Conversely, you may want to use the value given by the +\gloskey{text} key, even though you haven't used the glossary entry. +The former can be achieved by one of the following commands: +\begin{definition}[\DescribeMacro{\glsreset}] +\cs{glsreset}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\glslocalreset}] +\cs{glslocalreset}\marg{label} +\end{definition} +while the latter can be achieved by one of the following commands: +\begin{definition}[\DescribeMacro{\glsunset}] +\cs{glsunset}\marg{label} +\end{definition} +\begin{definition}[\DescribeMacro{\glslocalunset}] +\cs{glslocalunset}\marg{label} +\end{definition} +You can also reset or unset all entries for a given glossary or list of +glossaries using: +\begin{definition}[\DescribeMacro{\glsresetall}] +\cs{glsresetall}\oarg{glossary list} +\end{definition} +\begin{definition}[\DescribeMacro{\glslocalresetall}] +\cs{glslocalresetall}\oarg{glossary list} +\end{definition} +\begin{definition}[\DescribeMacro{\glsunsetall}] +\cs{glsunsetall}\oarg{glossary list} +\end{definition} +\begin{definition}[\DescribeMacro{\glslocalunsetall}] +\cs{glslocalunsetall}\oarg{glossary list} +\end{definition} +where \meta{glossary list} is a comma-separated list of +glossary labels. If omitted, all defined glossaries are assumed. +For example, to reset all entries in the main glossary and the +list of acronyms: +\begin{verbatim} +\glsresetall[main,acronym] +\end{verbatim} + +You can determine whether an entry's \gls{firstuseflag} is set using: +\begin{definition}[\DescribeMacro{\ifglsused}] +\cs{ifglsused}\marg{label}\marg{true part}\marg{false part} +\end{definition} +where \meta{label} is the label of the required entry. If the +entry has been used, \meta{true part} will be done, otherwise +\meta{false part} will be done. + + +\section{Glossary Styles} +\label{sec:styles} +The \styfmt{glossaries} package comes with some pre-defined +glossary styles. Note that the styles are suited to different +types of glossaries: some styles ignore the associated +symbol; some styles are not designed for hierarchical entries, +so they display sub-entries in the same way as they display top +level entries; some styles are designed for homographs, so they +ignore the name for sub-entries. You should therefore pick a style +that suits your type of glossary. See \tableref{tab:styles} for +a summary of the available styles. The predefined styles can +accommodate numbered level~0 (main) and level~1 entries. See the +package options \pkgopt{entrycounter}, \pkgopt{counterwithin} and +\pkgopt{subentrycounter} described in +\sectionref{sec:pkgopts-printglos}. + +\begin{table}[htbp] +\caption[Glossary Styles]{Glossary Styles. An asterisk in the style +name indicates anything that matches that doesn't match any +previously listed style (e.g.\ \texttt{long3col*} +matches \glostyle{long3col}, \glostyle{long3colheader}, +\glostyle{long3colborder} and \glostyle{long3colheaderborder}). +A maximum level of 0 indicates a flat glossary (sub-entries +are displayed in the same way as main entries). Where the maximum +level is given as --- there is no limit, but note that +\gls{makeindex} imposes a limit of 2 sub-levels. If the +homograph column is checked, then the name is not displayed for +sub-entries. If the symbol column is checked, then the symbol will +be displayed.} +\label{tab:styles} +\vskip\baselineskip +\centering +\begin{tabular}{lccc} +\bfseries Style & \bfseries Maximum Level & +\bfseries Homograph & \bfseries Symbol\\ +\ttfamily listdotted & 0 & & \\ +\ttfamily sublistdotted & 1 & & \\ +\ttfamily list* & 1 & \tick & \\ +\ttfamily altlist* & 1 & \tick & \\ +\ttfamily long*3col* & 1 & \tick & \\ +\ttfamily long4col* & 1 & \tick & \tick \\ +\ttfamily altlong*4col* & 1 & \tick & \tick \\ +\ttfamily long* & 1 & \tick & \\ +\ttfamily super*3col* & 1 & \tick & \\ +\ttfamily super4col* & 1 & \tick & \tick \\ +\ttfamily altsuper*4col* & 1 & \tick & \tick \\ +\ttfamily super* & 1 & \tick & \\ +\ttfamily index* & 2 & & \tick\\ +\ttfamily treenoname* & --- & \tick & \tick\\ +\ttfamily tree* & --- & & \tick\\ +\ttfamily alttree* & --- & & \tick +\end{tabular} +\par +\end{table} + +The glossary style can be set using the \gloskey[printglossary]{style} key in the optional +argument to \ics{printglossary} or using the command: +\begin{definition}[\DescribeMacro{\glossarystyle}] +\cs{glossarystyle}\marg{style-name} +\end{definition} +Some of the glossary styles may also be set using the \pkgopt{style} +package option, it depends if the package in which they are defined +is automatically loaded by the \styfmt{glossaries} package. + +The tabular-like styles that allow multi-line descriptions and page +lists use the length \DescribeMacro{\glsdescwidth}\cs{glsdescwidth} +to set the width of the description column and the length +\DescribeMacro{\glspagelistwidth}\cs{glspagelistwidth} to set the +width of the page list column.\footnote{these lengths will not be +available if you use both the \pkgopt{nolong} and \pkgopt{nosuper} +package options or if you use the \pkgopt{nostyles} package option +unless you explicitly load the relevant package.} +These will need to be changed using \cs{setlength} if the glossary +is too wide. Note that the \glostyle{long4col} and +\glostyle{super4col} styles (and their header and border variations) +don't use these lengths as they are designed for single line +entries. Instead you should use the analogous \glostyle{altlong4col} +and \glostyle{altsuper4col} styles. If you want to +explicitly create a line-break within a multi-line description in +a tabular-like style you should use \ics{newline} instead of +\verb|\\|. + +Note that if you use the \gloskey[printglossary]{style} key in the +optional argument to \ics{printglossary}, it will override any +previous style settings for the given glossary, so if, for example, +you do +\begin{verbatim} +\renewcommand*{\glsgroupskip}{} +\printglossary[style=long] +\end{verbatim} +then the new definition of \ics{glsgroupskip} will not have an affect +for this glossary, as \cs{glsgroupskip} is redefined by +\verb|style=long|. Likewise, \ics{glossarystyle} will also +override any previous style definitions, so, again +\begin{verbatim} +\renewcommand*{\glsgroupskip}{} +\glossarystyle{long} +\end{verbatim} +will reset \cs{glsgroupskip} back to its default definition for the +named glossary style (\glostyle{long} in this case). If you want to +modify the styles, either use \ics{newglossarystyle} (described +in the next section) or make the modifications after +\ics{glossarystyle}, e.g.: +\begin{verbatim} +\glossarystyle{long} +\renewcommand*{\glsgroupskip}{} +\end{verbatim} + +All the styles except for the three- and four-column styles and the +\glostyle{listdotted} style use the command +\begin{definition}[\DescribeMacro{\glspostdescription}] +\cs{glspostdescription} +\end{definition} +after the description. This simply displays a full stop by default. +To eliminate this full stop (or replace it with something else, say, +a comma) you will need to redefine \cs{glspostdescription} before +the glossary is displayed. Alternatively, you can suppress it for a +given entry by placing \ics{nopostdesc} in the entry's description. + +\subsection{List Styles} +\label{sec:liststyles} + +The styles described in this section are all defined in the package +\sty{glossary-list}. Since they all use the \env{description} +environment, they are governed by the same parameters as that +environment. These styles all ignore the entry's symbol. Note that +these styles will automatically be available unless you use the +\pkgopt{nolist} or \pkgopt{nostyles} package options. + +\begin{description} +\item[list] The \glostyle{list} style uses the \env{description} +environment. The entry name is placed in the optional argument of +the \ics{item} command (so it will appear in bold by default). The +description follows, and then the associated \gls{numberlist} for +that entry. The symbol is ignored. If the entry has child entries, +the description and number list follows (but not the name) for each +child entry. Groups are separated using \ics{indexspace}. + +\item[listgroup] The \glostyle{listgroup} style is like +\glostyle{list} but the glossary groups have headings. + +\item[listhypergroup] The \glostyle{listhypergroup} style is like +\glostyle{listgroup} but has a navigation line at the start of the +glossary with links to each group that is present in the glossary. +This requires an additional run through \LaTeX\ to ensure the group +information is up to date. In the navigation line, each group is +separated by +\begin{definition}[\DescribeMacro{\glshypernavsep}] +\cs{glshypernavsep} +\end{definition} +which defaults to a vertical bar with a space on either side. For +example, to simply have a space separating each group, do: +\begin{verbatim} +\renewcommand*{\glshypernavsep}{\space} +\end{verbatim} + +Note that the hyper-navigation line is now (as from version 1.14) +set inside the optional argument to \ics{item} instead of after it +to prevent a spurious space at the start. This can be changed +by redefining \ics{glossaryheader}, but note that this needs to +be done \emph{after} the glossary style has been set. + +\item[altlist] The \glostyle{altlist} style is like \glostyle{list} +but the description starts on the line following the name. (As +with the \glostyle{list} style, the symbol is ignored.) Each child +entry starts a new line, but as with the \glostyle{list} style, +the name associated with each child entry is ignored. + +\item[altlistgroup] The \glostyle{altlistgroup} style is like +\glostyle{altlist} but the glossary groups have headings. + +\item[altlisthypergroup] The \glostyle{altlisthypergroup} style is like +\glostyle{altlistgroup} but has a set of links to the glossary +groups. The navigation line is the same as that for +\glostyle{listhypergroup}, described above. + +\item[listdotted] This style uses the \env{description} +environment.\footnote{This style was supplied by Axel~Menzel.} Each +entry starts with \verb|\item[]|, followed by the name followed by a +dotted line, followed by the description. Note that this style +ignores both the \gls{numberlist} and the symbol. The length +\begin{definition}[\DescribeMacro{\glslistdottedwidth}] +\cs{glslistdottedwidth} +\end{definition} +governs where the description should start. This is a flat style, so +child entries are formatted in the same way as the parent entries. + +\item[sublistdotted] This is a variation on the \glostyle{listdotted} +style designed for hierarchical glossaries. The main entries +have just the name displayed. The sub entries are displayed in +the same manner as \glostyle{listdotted}. +\end{description} + + +\subsection{Longtable Styles} +\label{sec:longstyles} + +The styles described in this section are all defined in the package +\sty{glossary-long}. Since they all use the \env{longtable} +environment, they are governed by the same parameters as that +environment. Note that these styles will automatically be available +unless you use the \pkgopt{nolong} or \pkgopt{nostyles} package +options. These styles fully justify the description and page list +columns. If you want ragged right formatting instead, use the +analogous styles described in \sectionref{sec:longraggedstyles}. + + +\begin{description} +\item[long] The \glostyle{long} style uses the \env{longtable} +environment (defined by the \sty{longtable} package). It has two +columns: the first column contains the entry's name and the second +column contains the description followed by the \gls{numberlist}. +The entry's symbol is ignored. +Sub groups are separated with a blank row. The width of the +first column is governed by the widest entry in that column. The +width of the second column is governed by the length +\ics{glsdescwidth}. Child entries have a similar format to the +parent entries except that their name is suppressed. + +\item[longborder] The \glostyle{longborder} style is like +\glostyle{long} but has horizontal and vertical lines around it. + +\item[longheader] The \glostyle{longheader} style is like +\glostyle{long} but has a header row. + +\item[longheaderborder] The \glostyle{longheaderborder} style is +like \glostyle{longheader} but has horizontal and vertical lines +around it. + +\item[long3col] The \glostyle{long3col} style is like +\glostyle{long} but has three columns. The first column contains +the entry's name, the second column contains the description +and the third column contains the \gls{numberlist}. +The entry's symbol is ignored. The width of the +first column is governed by the widest entry in that column, the +width of the second column is governed by the length +\ics{glsdescwidth}, and the width of the third column is governed by the +length \ics{glspagelistwidth}. + +\item[long3colborder] The \glostyle{long3colborder} style is like +the \glostyle{long3col} style but has horizontal and vertical +lines around it. + +\item[long3colheader] The \glostyle{long3colheader} style is like +\glostyle{long3col} but has a header row. + +\item[long3colheaderborder] The \glostyle{long3colheaderborder} style is +like \glostyle{long3colheader} but has horizontal and vertical lines +around it. + +\item[long4col] The \glostyle{long4col} style is like +\glostyle{long3col} but has an additional column in which the +entry's associated symbol appears. This style is used for brief +single line descriptions. The column widths are governed by the +widest entry in the given column. Use \glostyle{altlong4col} for +multi-line descriptions. + +\item[long4colborder] The \glostyle{long4colborder} style is like +the \glostyle{long4col} style but has horizontal and vertical +lines around it. + +\item[long4colheader] The \glostyle{long4colheader} style is like +\glostyle{long4col} but has a header row. + +\item[long4colheaderborder] The \glostyle{long4colheaderborder} style is +like \glostyle{long4colheader} but has horizontal and vertical lines +around it. + +\item[altlong4col] The \glostyle{altlong4col} style is like +\glostyle{long4col} but allows multi-line descriptions and page +lists. The width of the description column is governed by the +length \ics{glsdescwidth} and the width of the page list column is +governed by the length \ics{glspagelistwidth}. The widths of the +name and symbol columns are governed by the widest entry in the +given column. + +\item[altlong4colborder] The \glostyle{altlong4colborder} style is like +the \glostyle{long4colborder} but allows multi-line descriptions and +page lists. + +\item[altlong4colheader] The \glostyle{altlong4colheader} style is like +\glostyle{long4colheader} but allows multi-line descriptions and +page lists. + +\item[altlong4colheaderborder] The \glostyle{altlong4colheaderborder} +style is like \glostyle{long4colheaderborder} but allows multi-line +descriptions and page lists. +\end{description} + + +\subsection{Longtable Styles (Ragged Right)} +\label{sec:longraggedstyles} + +The styles described in this section are all defined in the package +\sty{glossary-longragged}. These styles are analogous to those +defined in \sty{glossary-long} but the multiline columns are left +justified instead of fully justified. Since these styles all use the +\env{longtable} environment, they are governed by the same +parameters as that environment. The \sty{glossary-longragged} +package additionally requires the \sty{array} package. Note that +these styles will only be available if you explicitly load +\sty{glossary-longragged}: +\begin{verbatim} +\usepackage{glossaries} +\usepackage{glossary-longragged} +\end{verbatim} +Note that you can't set these styles using the \pkgopt{style} +package option since the styles aren't defined until after +the \styfmt{glossaries} package has been loaded. + +\begin{description} +\item[longragged] The \glostyle{longragged} style has two +columns: the first column contains the entry's name and the second +column contains the (left-justified) description followed by the +\gls{numberlist}. The entry's symbol is ignored. +Sub groups are separated with a blank row. The width of the +first column is governed by the widest entry in that column. The +width of the second column is governed by the length +\ics{glsdescwidth}. Child entries have a similar format to the +parent entries except that their name is suppressed. + +\item[longraggedborder] The \glostyle{longraggedborder} style is like +\glostyle{longragged} but has horizontal and vertical lines around it. + +\item[longraggedheader] The \glostyle{longraggedheader} style is like +\glostyle{longragged} but has a header row. + +\item[longraggedheaderborder] The \glostyle{longraggedheaderborder} +style is like \glostyle{longraggedheader} but has horizontal and +vertical lines around it. + +\item[longragged3col] The \glostyle{longragged3col} style is like +\glostyle{longragged} but has three columns. The first column +contains the entry's name, the second column contains the (left +justified) description and the third column contains the (left +justified) \gls{numberlist}. The entry's symbol is ignored. The +width of the first column is governed by the widest entry in that +column, the width of the second column is governed by the length +\ics{glsdescwidth}, and the width of the third column is governed by +the length \ics{glspagelistwidth}. + +\item[longragged3colborder] The \glostyle{longragged3colborder} +style is like the \glostyle{longragged3col} style but has horizontal +and vertical lines around it. + +\item[longragged3colheader] The \glostyle{longragged3colheader} style is like +\glostyle{longragged3col} but has a header row. + +\item[longragged3colheaderborder] The \glostyle{longragged3colheaderborder} style is +like \glostyle{longragged3colheader} but has horizontal and vertical lines +around it. + +\item[altlongragged4col] The \glostyle{altlongragged4col} style is +like \glostyle{longragged3col} but has an additional column in which +the entry's associated symbol appears. The width of the description +column is governed by the length \ics{glsdescwidth} and the width of +the page list column is governed by the length +\ics{glspagelistwidth}. The widths of the name and symbol columns +are governed by the widest entry in the given column. + +\item[altlongragged4colborder] The +\glostyle{altlongragged4colborder} style is like the +\glostyle{altlongragged4col} but has horizontal and vertical lines +around it. + +\item[altlongragged4colheader] The +\glostyle{altlongragged4colheader} style is like +\glostyle{altlongragged4col} but has a header row. + +\item[altlongragged4colheaderborder] The +\glostyle{altlongragged4colheaderborder} style is like +\glostyle{altlongragged4colheader} but has horizontal and vertical +lines around it. + +\end{description} + + +\subsection{Supertabular Styles} +\label{sec:superstyles} + +The styles described in this section are all defined in the package +\sty{glossary-super}. Since they all use the \env{supertabular} +environment, they are governed by the same parameters as that +environment. Note that these styles will automatically be available +unless you use the \pkgopt{nosuper} or \pkgopt{nostyles} package +options. In general, the \env{longtable} environment is better, +but there are some circumstances where it is better to use +\env{supertabular}.\footnote{e.g.\ with the \sty{flowfram} +package.} These styles fully justify the description and page list +columns. If you want ragged right formatting instead, use the +analogous styles described in \sectionref{sec:superraggedstyles}. + +\begin{description} +\item[super] The \glostyle{super} style uses the \env{supertabular} +environment (defined by the \sty{supertabular} package). It has two +columns: the first column contains the entry's name and the second +column contains the description followed by the \gls{numberlist}. +The entry's symbol is ignored. +Sub groups are separated with a blank row. The width of the +first column is governed by the widest entry in that column. The +width of the second column is governed by the length +\ics{glsdescwidth}. Child entries have a similar format to the +parent entries except that their name is suppressed. + +\item[superborder] The \glostyle{superborder} style is like +\glostyle{super} but has horizontal and vertical lines around it. + +\item[superheader] The \glostyle{superheader} style is like +\glostyle{super} but has a header row. + +\item[superheaderborder] The \glostyle{superheaderborder} style is +like \glostyle{superheader} but has horizontal and vertical lines +around it. + +\item[super3col] The \glostyle{super3col} style is like +\glostyle{super} but has three columns. The first column contains +the entry's name, the second column contains the description +and the third column contains the \gls{numberlist}. The +entry's symbol is ignored. The width of the +first column is governed by the widest entry in that column. The +width of the second column is governed by the length +\ics{glsdescwidth}. The width of the third column is governed by the +length \ics{glspagelistwidth}. + +\item[super3colborder] The \glostyle{super3colborder} style is like +the \glostyle{super3col} style but has horizontal and vertical +lines around it. + +\item[super3colheader] The \glostyle{super3colheader} style is like +\glostyle{super3col} but has a header row. + +\item[super3colheaderborder] The \glostyle{super3colheaderborder} style +is like \glostyle{super3colheader} but has horizontal and vertical +lines around it. + +\item[super4col] The \glostyle{super4col} style is like +\glostyle{super3col} but has an additional column in which the +entry's associated symbol appears. This style is designed for +entries with brief single line descriptions. The column widths are governed by the +widest entry in the given column. Use \glostyle{altsuper4col} +for multi-line descriptions. + +\item[super4colborder] The \glostyle{super4colborder} style is like +the \glostyle{super4col} style but has horizontal and vertical +lines around it. + +\item[super4colheader] The \glostyle{super4colheader} style is like +\glostyle{super4col} but has a header row. + +\item[super4colheaderborder] The \glostyle{super4colheaderborder} style +is like \glostyle{super4colheader} but has horizontal and vertical +lines around it. + +\item[altsuper4col] The \glostyle{altsuper4col} style is like +\glostyle{super4col} but allows multi-line descriptions and page +lists. +The width of the description column is governed by the length +\ics{glsdescwidth} and the width of the page list column is +governed by the length \ics{glspagelistwidth}. The width of the name +and symbol columns is governed by the widest entry in the +given column. + +\item[altsuper4colborder] The \glostyle{altsuper4colborder} style is like +the \glostyle{super4colborder} style but allows multi-line descriptions +and page lists. + +\item[altsuper4colheader] The \glostyle{altsuper4colheader} style is like +\glostyle{super4colheader} but allows multi-line descriptions and +page lists. + +\item[altsuper4colheaderborder] The \glostyle{altsuper4colheaderborder} +style is like \glostyle{super4colheaderborder} but allows multi-line +descriptions and page lists. +\end{description} + + +\subsection{Supertabular Styles (Ragged Right)} +\label{sec:superraggedstyles} + +The styles described in this section are all defined in the package +\sty{glossary-superragged}. These styles are analogous to those +defined in \sty{glossary-super} but the multiline columns are left +justified instead of fully justified. Since these styles all use the +\env{supertabular} environment, they are governed by the same +parameters as that environment. The \sty{glossary-superragged} +package additionally requires the \sty{array} package. Note that +these styles will only be available if you explicitly load +\sty{glossary-superragged}: +\begin{verbatim} +\usepackage{glossaries} +\usepackage{glossary-superragged} +\end{verbatim} +Note that you can't set these styles using the \pkgopt{style} +package option since the styles aren't defined until after +the \styfmt{glossaries} package has been loaded. + +\begin{description} +\item[superragged] The \glostyle{superragged} style uses the +\env{supertabular} environment (defined by the +\sty{supertabular} package). It has two columns: the first column +contains the entry's name and the second column contains the (left +justified) description followed by the \gls{numberlist}. The +entry's symbol is ignored. Sub groups are separated with a blank +row. The width of the first column is governed by the widest entry +in that column. The width of the second column is governed by the +length \ics{glsdescwidth}. Child entries have a similar format to +the parent entries except that their name is suppressed. + +\item[superraggedborder] The \glostyle{superraggedborder} style is +like \glostyle{superragged} but has horizontal and vertical lines +around it. + +\item[superraggedheader] The \glostyle{superraggedheader} style is +like \glostyle{superragged} but has a header row. + +\item[superraggedheaderborder] The +\glostyle{superraggedheaderborder} style is like +\glostyle{superraggedheader} but has horizontal and vertical lines +around it. + +\item[superragged3col] The \glostyle{superragged3col} style is like +\glostyle{superragged} but has three columns. The first column +contains the entry's name, the second column contains the (left +justified) description and the third column contains the (left +justified) \gls{numberlist}. The entry's symbol is ignored. The +width of the first column is governed by the widest entry in that +column. The width of the second column is governed by the length +\ics{glsdescwidth}. The width of the third column is governed by the +length \ics{glspagelistwidth}. + +\item[superragged3colborder] The \glostyle{superragged3colborder} +style is like the \glostyle{superragged3col} style but has +horizontal and vertical lines around it. + +\item[superragged3colheader] The \glostyle{superragged3colheader} +style is like \glostyle{superragged3col} but has a header row. + +\item[superragged3colheaderborder] The +\glostyle{superragged3colheaderborder} style is like +\glostyle{superragged3colheader} but has horizontal and vertical +lines around it. + +\item[altsuperragged4col] The \glostyle{altsuperragged4col} style is +like \glostyle{superragged3col} but has an additional column in +which the entry's associated symbol appears. The column widths for +the name and symbol column are governed by the widest entry in the +given column. + +\item[altsuperragged4colborder] The +\glostyle{altsuperragged4colborder} style is like the +\glostyle{altsuperragged4col} style but has horizontal and vertical +lines around it. + +\item[altsuperragged4colheader] The +\glostyle{altsuperragged4colheader} style is like +\glostyle{altsuperragged4col} but has a header row. + +\item[altsuperragged4colheaderborder] The +\glostyle{altsuperragged4colheaderborder} style is like +\glostyle{altsuperragged4colheader} but has horizontal and vertical +lines around it. + +\end{description} + +\subsection{Tree-Like Styles} +\label{sec:treestyles} + +The styles described in this section are all defined in the package +\sty{glossary-tree}. These styles are designed for hierarchical +glossaries but can also be used with glossaries that don't have +sub-entries. These styles will display the entry's symbol if it +exists. Note that these styles will automatically be available +unless you use the \pkgopt{notree} or \pkgopt{nostyles} package +options. + +\begin{description} +\item[index] The \glostyle{index} style is similar to the way +indices are usually formatted in that it has a hierarchical +structure up to three levels (the main level plus two sub-levels). +The name is typeset in bold, and if the symbol is present it is set +in parentheses after the name and before the description. +Sub-entries are indented and also include the name, the symbol +in brackets (if present) and the description. Groups are separated +using \ics{indexspace}. + +\item[indexgroup] The \glostyle{indexgroup} style is similar to +the \glostyle{index} style except that each group has a heading. + +\item[indexhypergroup] The \glostyle{indexhypergroup} style is like +\glostyle{indexgroup} but has a set of links to the glossary +groups. The navigation line is the same as that for +\glostyle{listhypergroup}, described above. + +\item[tree] The \glostyle{tree} style is similar to the +\glostyle{index} style except that it can have arbitrary levels. +(Note that \gls{makeindex} is limited to three levels, so +you will need to use \gls{xindy} if you want more than +three levels.) Each sub-level is indented by +\DescribeMacro{\glstreeindent}\cs{glstreeindent}. Note that the +name, symbol (if present) and description are placed in the +same paragraph block. If you want the name to be apart from the +description, use the \glostyle{alttree} style instead. (See below.) + +\item[treegroup] The \glostyle{treegroup} style is similar to +the \glostyle{tree} style except that each group has a heading. + +\item[treehypergroup] The \glostyle{treehypergroup} style is like +\glostyle{treegroup} but has a set of links to the glossary +groups. The navigation line is the same as that for +\glostyle{listhypergroup}, described above. + +\item[treenoname] The \glostyle{treenoname} style is like +the \glostyle{tree} style except that the name for each sub-entry +is ignored. + +\item[treenonamegroup] The \glostyle{treenonamegroup} style is +similar to the \glostyle{treenoname} style except that each group +has a heading. + +\item[treenonamehypergroup] The \glostyle{treenonamehypergroup} +style is like \glostyle{treenonamegroup} but has a set of links to +the glossary groups. The navigation line is the same as that for +\glostyle{listhypergroup}, described above. + +\item[alttree] The \glostyle{alttree} style is similar to the +\glostyle{tree} style except that the indentation for each level +is determined by the width of the text specified by +\begin{definition}[\DescribeMacro{\glssetwidest}] +\cs{glssetwidest}\oarg{level}\marg{text} +\end{definition} +The optional argument \meta{level} indicates the level, where +0 indicates the top-most level, 1 indicates the first level +sub-entries, etc. If \cs{glssetwidest} hasn't been used for a +given sub-level, the level~0 widest text is used instead. If +\meta{level} is omitted, 0 is assumed. + +For each level, the name is placed to the left of the paragraph +block containing the symbol (optional) and the description. If the +symbol is present, it is placed in parentheses before the +description. + +\item[alttreegroup] The \glostyle{alttreegroup} is like the +\glostyle{alttree} style except that each group has a heading. + +\item[alttreehypergroup] The \glostyle{alttreehypergroup} style is +like \glostyle{alttreegroup} but has a set of links to the glossary +groups. The navigation line is the same as that for +\glostyle{listhypergroup}, described above. + +\end{description} + +\section{Defining your own glossary style} +\label{sec:newglossarystyle} + +If the predefined styles don't fit your requirements, you can +define your own style using: +\begin{definition}[\DescribeMacro{\newglossarystyle}] +\cs{newglossarystyle}\marg{name}\marg{definitions} +\end{definition} +where \meta{name} is the name of the new glossary style (to be +used in \cs{glossarystyle}). The second argument \meta{definitions} +needs to redefine all of the following: + +\begin{definition}[\DescribeEnv{theglossary}] +\env{theglossary} +\end{definition} +This environment defines how the main body of the glossary should +be typeset. Note that this does not include the section heading, +the glossary preamble (defined by \ics{glossarypreamble}) or the +glossary postamble (defined by \ics{glossarypostamble}). For example, +the \glostyle{list} style uses the \env{description} environment, +so the \env{theglossary} environment is simply redefined to begin +and end the \env{description} environment. + +\begin{definition}[\DescribeMacro{\glossaryheader}] +\cs{glossaryheader} +\end{definition} +This macro indicates what to do at the start of the main body +of the glossary. Note that this is not the same as +\ics{glossarypreamble}, which should not be affected by changes in +the glossary style. The \glostyle{list} glossary style redefines +\ics{glossaryheader} to do nothing, whereas the \glostyle{longheader} +glossary style redefines \cs{glossaryheader} to do a header row. + +\begin{definition}[\DescribeMacro{\glsgroupheading}] +\cs{glsgroupheading}\marg{label} +\end{definition} +This macro indicates +what to do at the start of each logical block within the main body +of the glossary. If you use \gls{makeindex} the glossary is +sub-divided into a maximum of twenty-eight logical blocks that are +determined by the first character of the \gloskey{sort} key (or +\gloskey{name} key if the \gloskey{sort} key is omitted). The +sub-divisions are in the following order: symbols, numbers, A, +\ldots, Z\@. If you use \gls{xindy}, the sub-divisions depend on +the language settings. + +Note that the argument to \cs{glsgroupheading} +is a label \emph{not} the group title. The group title can be obtained +via +\begin{definition}[\DescribeMacro{\glsgetgrouptitle}] +\cs{glsgetgrouptitle}\marg{label} +\end{definition} +This obtains the title as follows: if +\cs{}\meta{label}\texttt{groupname} exists, this is taken to be the +title, otherwise the title is just \meta{label}. + +A navigation hypertarget can be created using +\begin{definition}[\DescribeMacro{\glsnavhypertarget}] +\cs{glsnavhypertarget}\marg{label}\marg{text} +\end{definition} +For further details about \cs{glsnavhypertarget}, see +\ifpdf section~\ref*{sec:code:hypernav} in \fi the documented code +(\texttt{glossaries.pdf}). + +Most of the predefined glossary styles redefine \cs{glsgroupheading} +to simply ignore its argument. The \glostyle{listhypergroup} style +redefines \cs{glsgroupheading} as follows: +\begin{verbatim} +\renewcommand*{\glsgroupheading}[1]{% +\item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]} +\end{verbatim} +See also \cs{glsgroupskip} below. (Note that command definitions within +\ics{newglossarystyle} must use \verb|##1| instead of \verb|#1| etc.) + +\begin{definition}[\DescribeMacro{\glsgroupskip}] +\cs{glsgroupskip} +\end{definition} +This macro determines what to do after one logical group but before +the header for the next logical group. The \glostyle{list} glossary +style simply redefines \cs{glsgroupskip} to be \ics{indexspace}, +whereas the tabular-like styles redefine \cs{glsgroupskip} to +produce a blank row. + +\begin{definition}[\DescribeMacro{\glossaryentryfield}] +\cs{glossaryentryfield}\marg{label}\marg{formatted name}\marg{description} +\marg{symbol}\marg{number list} +\end{definition} +This macro indicates what to do for a given glossary entry. +Note that \meta{formatted name} will always be in the form +\ics{glsnamefont}\marg{name}. This allows the user to set a given +font for the entry name, regardless of the glossary style used. +Note that \meta{label} is the label used when the glossary entry +was defined via either \ics{newglossaryentry} or \ics{newacronym}. + +\begin{definition}[\DescribeMacro{\glsentryitem}] +\cs{glsentryitem}\marg{label} +\end{definition} +This macro will increment and display the associated counter for the +main (level~0) entries if the \pkgopt{entrycounter} or +\pkgopt{counterwithin} package options have been used. This macro +is typically called by \cs{glossaryentryfield} before \cs{glstarget}. +The format of the counter is controlled by the macro +\begin{definition}[\DescribeMacro{\glsentrycounterlabel}] +\cs{glsentrycounterlabel} +\end{definition} + +Each time you use a glossary entry it creates a hyperlink (if +hyperlinks are enabled) to the relevant line in the glossary. +Your new glossary style must therefore redefine +\cs{glossaryentryfield} to set the appropriate target. This +is done using +\begin{definition}[\DescribeMacro{\glstarget}] +\cs{glstarget}\marg{label}\marg{text} +\end{definition} +where \meta{label} is the entry's label. Note that you +don't need to worry about whether the \sty{hyperref} package has +been loaded, as \cs{glstarget} won't create a target if +\cs{hypertarget} hasn't been defined. + +For example, the +\glostyle{list} style defines \cs{glossaryentryfield} as follows: +\begin{verbatim} +\renewcommand*{\glossaryentryfield}[5]{% +\item[\glsentryitem{##1}\glstarget{##1}{##2}] + ##3\glspostdescription \space ##5} +\end{verbatim} + +Note also that \meta{number list} will always be of the form\\ +\begin{definition} +\ics{glossaryentrynumbers}\{\cs{relax}\\ +\ics{setentrycounter}\oarg{Hprefix}\marg{counter name}\meta{format cmd}\marg{number(s)}\} +\end{definition} +where \meta{number(s)} +may contain \ics{delimN} (to delimit individual numbers) and/or +\ics{delimR} (to indicate a range of numbers). There may be +multiple occurrences of +\ics{setentrycounter}\oarg{Hprefix}\marg{counter name}\meta{format cmd}\marg{number(s)}, but note +that the entire number list is enclosed within the argument +of \linebreak\ics{glossaryentrynumbers}. The user can redefine this to change +the way the entire number list is formatted, regardless of +the glossary style. However the most common use of +\ics{glossaryentrynumbers} is to provide a means of suppressing the +number list altogether. (In fact, the \pkgopt{nonumberlist} option +redefines \ics{glossaryentrynumbers} to ignore its argument.) +Therefore, when you define a new glossary style, you don't need +to worry about whether the user has specified the +\pkgopt{nonumberlist} package option. + +\begin{definition}[\DescribeMacro{\glossarysubentryfield}] +\cs{glossarysubentryfield}\marg{level}\marg{label}\marg{formatted name} +\marg{description}\marg{symbol}\marg{number list} +\end{definition} +This is new to version 1.17, and is used to display sub-entries. +The first argument, \meta{level}, indicates the sub-entry level. +This must be an integer from 1 (first sub-level) onwards. The +remaining arguments are analogous to those for +\ics{glossaryentryfield} described above. + +\begin{definition}[\DescribeMacro{\glssubentryitem}] +\cs{glssubentryitem}\marg{label} +\end{definition} +This macro will increment and display the associated counter for the +level~1 entries if the \pkgopt{subentrycounter} package options have +been used. This macro is typically called by \cs{glossarysubentryfield} +before \ics{glstarget}. The format of the counter is controlled by +the macro +\begin{definition}[\DescribeMacro{\glssubentrycounterlabel}] +\cs{glssubentrycounterlabel} +\end{definition} + +Note that \ics{printglossary} (which \ics{printglossaries} calls) +sets +\begin{definition}[\DescribeMacro{\currentglossary}] +\cs{currentglossary} +\end{definition} +to the current glossary label, so it's possible to create a glossary +style that varies according to the glossary type. + +For further details of these commands, see \ifpdf +section~\ref*{sec:code:printglos} \fi \qt{Displaying the glossary} +in the documented code (\texttt{glossaries.pdf}). + +\subsection{Example: creating a completely new style} + +If you want a completely new style, you will need to redefine all +of the commands and the environment listed above. + +For example, suppose you want each entry to start with a bullet point. +This means that the glossary should be placed in the \env{itemize} +environment, so \env{theglossary} should start and end that +environment. Let's also suppose that you don't want anything between +the glossary groups (so \ics{glsgroupheading} and \ics{glsgroupskip} +should do nothing) and suppose you don't want anything to appear +immediately after \verb|\begin{theglossary}| (so \ics{glossaryheader} +should do nothing). In addition, let's suppose the symbol should +appear in brackets after the name, followed by the description and +last of all the \gls{numberlist} should appear within square brackets +at the end. Then you can create this new glossary style, called, say, +\texttt{mylist}, as follows: +\begin{verbatim} + \newglossarystyle{mylist}{% + % put the glossary in the itemize environment: + \renewenvironment{theglossary}{\begin{itemize}}{\end{itemize}}% + % have nothing after \begin{theglossary}: + \renewcommand*{\glossaryheader}{}% + % have nothing between glossary groups: + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand*{\glsgroupskip}{}% + % set how each entry should appear: + \renewcommand*{\glossaryentryfield}[5]{% + \item % bullet point + \glstarget{##1}{##2}% the entry name + \space (##4)% the symbol in brackets + \space ##3% the description + \space [##5]% the number list in square brackets + }% + % set how sub-entries appear: + \renewcommand*{\glossarysubentryfield}[6]{% + \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% + } +\end{verbatim} +Note that this style creates a flat glossary, where sub-entries +are displayed in exactly the same way as the top level entries. +It also hasn't used \ics{glsentryitem} or \ics{glssubentryitem} so +it won't be affected by the \pkgopt{entrycounter}, +\pkgopt{counterwithin} or \pkgopt{subentrycounter} package options. + +\subsection{Example: creating a new glossary style based on an +existing style} + +If you want to define a new style that is a slightly modified +version of an existing style, you can use \ics{glossarystyle} +within the second argument of \ics{newglossarystyle} followed by +whatever alterations you require. For example, suppose you want +a style like the \glostyle{list} style but you don't want the extra +vertical space created by \ics{indexspace} between groups, then you +can create a new glossary style called, say, \texttt{mylist} as +follows: +\begin{verbatim} +\newglossarystyle{mylist}{% +\glossarystyle{list}% base this style on the list style +\renewcommand{\glsgroupskip}{}% make nothing happen between groups +} +\end{verbatim} + +\subsection{Example: creating a glossary style that uses the +\texorpdfstring{\gloskey{user1}}{user1}, \ldots, +\texorpdfstring{\gloskey{user6}}{user6} keys} + +Since \ics{glossaryentryfield} and \ics{glossarysubentryfield} +provide the label for the entry, it's also possible to access +the values of the generic user keys, such as \gloskey{user1}. For +example, suppose each entry not only has an associated symbol, +but also units (stored in \gloskey{user1}) and dimension +(stored in \gloskey{user2}). Then you can define a glossary style +that displays each entry in a \env{longtable} as follows: +\begin{verbatim} +\newglossarystyle{long6col}{% + % put the glossary in a longtable environment: + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}cccp{\glspagelistwidth}}}% + {\end{longtable}}% + % Set the table's header: + \renewcommand*{\glossaryheader}{% + \bfseries Term & \bfseries Description & \bfseries Symbol & + \bfseries Units & \bfseries Dimensions & \bfseries Page List + \\\endhead}% + % No heading between groups: + \renewcommand*{\glsgroupheading}[1]{}% + % Main (level 0) entries displayed in a row optionally numbered: + \renewcommand*{\glossaryentryfield}[5]{% + \glsentryitem{##1}% Entry number if required + \glstarget{##1}{##2}% Name + & ##3% Description + & ##4% Symbol + & \glsentryuseri{##1}% Units + & \glsentryuserii{##1}% Dimensions + & ##5% Page list + \\% end of row + }% + % Similarly for sub-entries (no sub-entry numbers): + \renewcommand*{\glossarysubentryfield}[6]{% + % ignoring first argument (sub-level) + \glstarget{##2}{##3}% Name + & ##4% Description + & ##5% Symbol + & \glsentryuseri{##2}% Units + & \glsentryuserii{##2}% Dimensions + & ##6% Page list + \\% end of row + }% + % Nothing between groups: + \renewcommand*{\glsgroupskip}{}% +} +\end{verbatim} + + +\section{Accessibility Support}\label{sec:accsupp} +Limited accessibility support is provided by the accompanying +\sty{glossaries-accsupp} package, but note that this package is +experimental and it requires the \sty{accsupp} package +which is also listed as experimental. This package defines +additional keys that may be used when defining glossary entries. +The keys are as follows: +\begin{description} +\item[{\gloskey{access}}] The replacement text corresponding to +the \gloskey{name} key. + +\item[{\gloskey{textaccess}}] The replacement text corresponding +to the \gloskey{text} key. + +\item[{\gloskey{firstaccess}}] The replacement text corresponding +to the \gloskey{first} key. + +\item[{\gloskey{pluralaccess}}] The replacement text corresponding +to the \gloskey{plural} key. + +\item[{\gloskey{firstpluralaccess}}] The replacement text corresponding +to the \gloskey{firstplural} key. + +\item[{\gloskey{symbolaccess}}] The replacement text corresponding +to the \gloskey{symbol} key. + +\item[{\gloskey{symbolpluralaccess}}] The replacement text corresponding +to the \gloskey{symbolplural} key. + +\item[{\gloskey{descriptionaccess}}] The replacement text corresponding +to the \gloskey{description} key. + +\item[{\gloskey{descriptionpluralaccess}}] The replacement text corresponding +to the \gloskey{descriptionplural} key. + +\item[{\gloskey{longaccess}}] The replacement text corresponding to +the \gloskey{long} key (used by \ics{newacronym}). + +\item[{\gloskey{shortaccess}}] The replacement text corresponding to +the \gloskey{short} key (used by \ics{newacronym}). + +\item[{\gloskey{longpluralaccess}}] The replacement text corresponding to +the \gloskey{longplural} key (used by \ics{newacronym}). + +\item[{\gloskey{shortpluralaccess}}] The replacement text corresponding to +the \gloskey{shortplural} key (used by \ics{newacronym}). + +\end{description} +For example: +\begin{verbatim} +\newglossaryentry{tex}{name={\TeX},description={Document preparation +language},access={TeX}} +\end{verbatim} +Now \verb|\gls{tex}| will be equivalent to +\begin{verbatim} +\BeginAccSupp{ActualText=TeX}\TeX\EndAccSupp{} +\end{verbatim} +The sample file \samplefile{accsupp} illustrates the +\sty{glossaries-accsupp} package. + +See \ifpdf section~\ref*{sec:code:accsupp} in \fi the documented code +(\texttt{glossaries.pdf}) for further details. It is recommended +that you also read the \sty{accsupp} documentation. + +\section{Troubleshooting} +\label{sec:trouble} + +The \styfmt{glossaries} package comes with a minimal file called +\texttt{minimalgls.tex} which can be used for testing. This +should be located in the \texttt{samples} subdirectory (folder) +of the \styfmt{glossaries} documentation directory. The location +varies according to your operating system and \TeX\ installation. +For example, on my Linux partition it can be found in +\texttt{/usr/local/texlive/2008/texmf-dist/doc/latex/glossaries/}. +Further information on debugging \LaTeX\ code is available at +\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/}. + +Below is a list of the most frequently asked questions. For +other queries, consult the \styfmt{glossaries} FAQ at +\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html}. + +\begin{enumerate} +\item \textbf{Q.} I get the error message: +\begin{verbatim} +Missing \begin{document} +\end{verbatim} + +\textbf{A.} Check you are using an up to date version of the \sty{xkeyval} +package. + +\item \textbf{Q.} When I use \gls{xindy}, I get the following error +message: +\begin{verbatim} +ERROR: CHAR: index 0 should be less than the length of the string +\end{verbatim} + +\textbf{A.} \gls{xindy} discards all commands and braces from the +sort string. If your sort string (either specified by the \gloskey{sort} +key or the \gloskey{name} key) only consists of commands, this will +be treated by \gls*{xindy} as an empty sort string, which produces an +error message in newer versions of \gls*{xindy}. For example, the +following will cause a problem: +\begin{verbatim} +\newglossaryentry{alpha}{name={\ensuremath{\alpha}}, + description=alpha} +\end{verbatim} +Either use a different sort key for the entry, for example: +\begin{verbatim} +\newglossaryentry{alpha}{sort=alpha, + name={\ensuremath{\alpha}}, + description=alpha} +\end{verbatim} +or, if all entries are like this, you may prefer to use the +\pkgopt[use]{sort} or \pkgopt[def]{sort} package options. See +\sectionref{sec:pkgopts-sort} for further details of the \pkgopt{sort} +option. + +\item \textbf{Q.} I've used the \pkgopt{smallcaps} option, but the acronyms +are displayed in normal sized upper case letters. + +\textbf{A.} The \pkgopt{smallcaps} package option uses \ics{textsc} to typeset +the acronyms. This command converts lower case letters to small +capitals, while upper case letters remain their usual size. Therefore +you need to specify the acronym in lower case letters. + +\item \textbf{Q.} My acronyms won't break across a line when they're +expanded. + +\textbf{A.} PDF\LaTeX\ can break hyperlinks across a line, but +\LaTeX\ can't. If you can't use PDF\LaTeX\ then disable the \gls{firstuse} +links using the package option \pkgopt[false]{hyperfirst}. + +\item \textbf{Q.} How do I change the font that the acronyms are displayed in? + +\textbf{A.} The easiest way to do this is to specify the \pkgopt{smaller} package +option and redefine \ics{acronymfont} to use the required typesetting +command. For example, suppose you would like the acronyms displayed in +a sans-serif font, then you can do: +\begin{verbatim} +\usepackage[smaller]{glossaries} +\renewcommand*{\acronymfont}[1]{\textsf{#1}} +\end{verbatim} + +\item \textbf{Q.} How do I change the font that the acronyms are displayed in +on \firstuse? + +\textbf{A.} The easiest way to do this is to specify the \pkgopt{smaller} package +option and redefine \ics{firstacronymfont} to use the required +command. Note that if you don't want the acronym on subsequent use +to use \ics{textsmaller}, you will also need to redefine \ics{acronymfont}, +as above. For example to make the acronym emphasized on +\firstuse, but use the surrounding font for subsequent use, you can do: +\begin{verbatim} +\usepackage[smaller]{glossaries} +\renewcommand*{\firstacronymfont}[1]{\emph{#1}} +\renewcommand*{\acronymfont}[1]{#1} +\end{verbatim} + +\item \textbf{Q.} I don't have Perl installed, do I have to use +\gls{makeglossaries}? + +\textbf{A.} Although it is strongly recommended that you use +\gls{makeglossaries}, you don't have to use it. For further details, +read \sectionref{sec:xindyapp} or \sectionref{sec:makeindexapp}, +depending on whether you want to use \gls{xindy} or \gls{makeindex}. + +\item \textbf{Q.} I'm used to using the \styfmt{glossary} package: are there any +instructions on migrating from the \sty{glossary} package to the +\styfmt{glossaries} package? + +\textbf{A.} Read \qtdocref{Upgrading from the glossary package to +the glossaries package}{glossary2glossaries} which should be +available from the same location as this document. + +\item \textbf{Q.} I'm using \sty{babel} but the fixed names haven't +been translated. + +\textbf{A.} The \styfmt{glossaries} package currently only supports +the following languages: Brazilian Portuguese, Danish, Dutch, +English, French, German, Irish, Italian, Hungarian, Polish, Serbian and +Spanish. If you want to add another language, send me the +translations, and I'll add them to the next version. + +If you are using one of the above languages, but the text hasn't been +translated, try adding the \sty{translator} package with the +required languages explicitly (before you load the \styfmt{glossaries} +package). For example: +\begin{verbatim} +\usepackage[ngerman]{babel} +\usepackage[ngerman]{translator} +\usepackage{glossaries} +\end{verbatim} +Alternatively, you can add the language as a global option +to the class file. Check the \styfmt{translator} package documentation +for further details. + +\item \textbf{Q.} My acronyms contain strange characters when I use commands +like \ics{acrlong}. + +\textbf{A.} Switch off the sanitization: +\begin{verbatim} +\usepackage[sanitize=none]{glossaries} +\end{verbatim} +and protect fragile commands. + +\item \textbf{Q.} Weird characters appear when I use +\ics{glsentryname} or \ics{glsname}. + +\textbf{A.} Either use \ics{glsentrytext} or \ics{glstext}, +respectively, or switch off the sanitization for the \gloskey{name} +key: +\begin{verbatim} +\usepackage[sanitize={name=false}]{glossaries} +\end{verbatim} +and protect fragile commands. + +\item \textbf{Q.} Weird characters appear when I try to display an +entry's description. + +\textbf{A.} Switch off the sanitization for the \gloskey{description} +key: +\begin{verbatim} +\usepackage[sanitize={description=false}]{glossaries} +\end{verbatim} +and protect fragile commands. + +\item \textbf{Q.} My glossaries haven't appeared. + +\textbf{A.} Remember to do the following: +\begin{itemize} +\item Add \ics{makeglossaries} to the document preamble. + +\item Use either \ics{printglossary} for each glossary that has +been defined or \ics{printglossaries}. + +\item Use the commands listed in \sectionref{sec:glslink}, +\sectionref{sec:glsadd} or \sectionref{sec:crossref} for each entry +that you want to appear in the glossary. + +\item Run \LaTeX\ on your document, then run \gls{makeglossaries}, +then run \LaTeX\ on your document again. If you want the glossaries +to appear in the table of contents, you will need an extra \LaTeX\ +run. If any of your entries cross-reference an entry that's not +referenced in the main body of the document, you will need to run +\gls*{makeglossaries} (see \sectionref{sec:makeglossaries}) after the +second \LaTeX\ run, followed by another \LaTeX\ run. +\end{itemize} + +Check the log files (\filetype{.log}, \filetype{.glg} etc) for any +warnings. + +\item \textbf{Q.} It is possible to change the rules used to sort +the glossary entries? + +\textbf{A.} If it's for an individual entry, then you can use the +entry's \gloskey{sort} key to sort it according to a different term. +If it's for the entire alphabet, then you will need to use +\gls{xindy} (instead of \gls{makeindex}) and use an appropriate +\gls*{xindy} language module. Writing \gls*{xindy} modules or styles +is beyond the scope of this manual. Further information about +\gls*{xindy} can be found at the +\urlfootref{http://xindy.sourceforge.net/}{Xindy Web Site}. There is +also a link to the \gls*{xindy} mailing list from that site. + +If you want to sort according to order of definition or order of +use, use the \pkgopt{sort} package option described in +\sectionref{sec:pkgopts-sort}. + +\end{enumerate} + + +\clearpage\phantomsection +\addcontentsline{toc}{section}{Index}\PrintIndex + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries/glossaries.pdf b/Master/texmf-dist/doc/latex/glossaries/glossaries.pdf index 0ace931cbf6..0ecffe0a406 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries/glossaries.pdf and b/Master/texmf-dist/doc/latex/glossaries/glossaries.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html b/Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html index d416448d693..785571cdd77 100644 --- a/Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html +++ b/Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html @@ -11,7 +11,7 @@ - + + +
+ + + + + + + +

mfirstuc.sty v1.05: uppercasing first letter

+
Nicola L.C. Talbot +
School of Computing Sciences +
University of East Anglia +
Norwich. Norfolk +
NR4 7TJ. United Kingdom. +
http://theoval.cmp.uea.ac.uk/~nlct/

+
2011-04-02
+
+

The glossaries bundle is supplied with the package mfirstuc which provides the +command: +


\makefirstuc  \makefirstuc{stuff }

+

+This makes the first object of stuff uppercase unless stuff starts with a control +sequence followed by a non-empty group, in which case the first object in the group is +converted to uppercase. Examples:

+
    +
  • \makefirstuc{abc} produces Abc. +
  • +
  • \makefirstuc{\emph{abc}} produces Abc (\MakeUppercase has been applied to + the letter “a” rather than \emph). Note however that + + + +
    + \makefirstuc{{\em abc}} +
    +

    produces ABC (first object is {\em abc} so equivalent to \MakeUppercase{\em abc}), + and + + + +

    +
    + {\makefirstuc{\em abc}} +
    +

    produces abc (\em doesn’t have an argument therefore first object is \em so + equivalent to {\MakeUppercase{\em}abc}). +

  • +
  • \makefirstuc{{\’a}bc} produces Ábc. +
  • +
  • \makefirstuc{\ae bc} produces Æbc. +
  • +
  • \makefirstuc{{\ae}bc} produces Æbc. +
  • +
  • \makefirstuc{{ä}bc} produces Äbc. +
+

Note that non-Latin or accented characters appearing at the start of the text must be +placed in a group (even if you are using the inputenc package) due to expansion +issues. +

In version 1.02 of mfirstuc, a bug fix resulted in a change in output if the first +object is a control sequence followed by an empty group. Prior to version 1.02, +\makefirstuc{\ae{}bc} produced æBc. However as from version 1.02, it now produces +Æbc.
+

+

Note also that + + + +

+
+\newcommand{\abc}{abc} + 
\makefirstuc{\abc} +
+

produces: ABC. This is because the first object in the argument of \makefirstuc is +\abc, so it does \MakeUppercase{\abc}. Whereas: + + + +

+
+\newcommand{\abc}{abc} + 
\expandafter\makefirstuc\expandafter{\abc} +
+

produces: Abc. There is a short cut command which will do this: +


\xmakefirstuc  \xmakefirstuc{stuff }

+

+This is equivalent to \expandafter\makefirstuc\expandafter{stuff }. +So + + + +

+
+\newcommand{\abc}{abc} + 
\xmakefirstuc{\abc} +
+

produces: Abc. +

\xmakefirstuc only performs one level expansion on the first object in its +argument. It does not fully expand the entire argument.
+

+

If you want to use an alternative command to convert to uppercase, for example +\MakeTextUppercase,1 +you can redefine \glsmakefirstuc. For example: + + + +

+
+\renewcommand{\glsmakefirstuc}[1]{\MakeTextUppercase #1} +
+

+

+

1defined in the textcase package

+ + + + + + diff --git a/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex b/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex new file mode 100644 index 00000000000..d01adf94f70 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/mfirstuc-manual.tex @@ -0,0 +1,114 @@ +\documentclass{nlctdoc} + +\usepackage{alltt} +\usepackage{mfirstuc} +\usepackage{pifont} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={mfirstuc.sty: uppercasing first letter}, + pdfkeywords={LaTeX,package,uppercase}]{hyperref} + +\begin{document} + \title{mfirstuc.sty v1.05: uppercasing first letter} + \author{Nicola L.C. Talbot\\[10pt] +School of Computing Sciences\\ +University of East Anglia\\ +Norwich. Norfolk\\ +NR4 7TJ. United Kingdom.\\ +\url{http://theoval.cmp.uea.ac.uk/~nlct/}} + + \date{2011-04-02} + \maketitle + +The \styfmt{glossaries} bundle is supplied with the package +\sty{mfirstuc} which provides the command: +\begin{definition}[\DescribeMacro{\makefirstuc}] +\cs{makefirstuc}\marg{stuff} +\end{definition} +This makes the first object of +\meta{stuff} uppercase unless \meta{stuff} starts with a control +sequence followed by a non-empty group, in which case the first +object in the group is converted to uppercase. Examples: +\begin{itemize} +\item |\makefirstuc{abc}| produces \makefirstuc{abc}. + +\item |\makefirstuc{\emph{abc}}| produces \makefirstuc{\emph{abc}} +(\ics{MakeUppercase} has been applied to the letter \qt{a} rather +than \cs{emph}). Note however that +\begin{verbatim} +\makefirstuc{{\em abc}} +\end{verbatim} +produces \makefirstuc{{\em abc}} (first object is |{\em abc}| so +equivalent to |\MakeUppercase{\em abc}|), and +\begin{verbatim} +{\makefirstuc{\em abc}} +\end{verbatim} +produces {\makefirstuc{\em abc}} (|\em| doesn't have an argument +therefore first object is |\em| so equivalent to +|{\MakeUppercase{\em}abc}|). + +\item |\makefirstuc{{\'a}bc}| produces \makefirstuc{{\'a}bc}. + +\item |\makefirstuc{\ae bc}| produces \makefirstuc{\ae bc}. + +\item |\makefirstuc{{\ae}bc}| produces \makefirstuc{{\ae}bc}. + +\item |\makefirstuc{{ä}bc}| produces \makefirstuc{{ä}bc}. + +\end{itemize} +Note that non-Latin or accented characters appearing at the +start of the text must be placed in a group (even if you are +using the \sty{inputenc} package) due to expansion issues. + +\begin{important} +In version 1.02 of \styfmt{mfirstuc}, a bug fix resulted in a change +in output if the first object is a control sequence followed by +an empty group. Prior to version 1.02, |\makefirstuc{\ae{}bc}| +produced \ae Bc. However as from version 1.02, it now produces +\AE bc. +\end{important} + +Note also that +\begin{verbatim} +\newcommand{\abc}{abc} +\makefirstuc{\abc} +\end{verbatim} +produces: ABC. This is because the first object in the argument of +\cs{makefirstuc} is \cs{abc}, so it does |\MakeUppercase{\abc}|. +Whereas: +\begin{verbatim} +\newcommand{\abc}{abc} +\expandafter\makefirstuc\expandafter{\abc} +\end{verbatim} +produces: Abc. There is a short cut command which will do this: +\begin{definition}[\DescribeMacro{\xmakefirstuc}] +\cs{xmakefirstuc}\marg{stuff} +\end{definition} +This is equivalent to \cs{expandafter}\cs{makefirstuc}\cs{expandafter}\marg{stuff}. So +\begin{verbatim} +\newcommand{\abc}{abc} +\xmakefirstuc{\abc} +\end{verbatim} +produces: +\newcommand{\abc}{abc}% +\xmakefirstuc{\abc}. + +\begin{important} +\cs{xmakefirstuc} only performs one level expansion on the first +object in its argument. It does not fully expand the entire +argument. +\end{important} + +If you want to use an alternative command to convert to uppercase, +for example \cs{MakeTextUppercase},\footnote{defined in the +\styfmt{textcase} package} you can redefine \cs{glsmakefirstuc}. +For example: +\begin{verbatim} +\renewcommand{\glsmakefirstuc}[1]{\MakeTextUppercase #1} +\end{verbatim} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/database2.tex b/Master/texmf-dist/doc/latex/glossaries/samples/database2.tex index 1fb3042e36b..55bc08a1c47 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/database2.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/database2.tex @@ -14,7 +14,7 @@ description={the ``at'' symbol}} \newglossaryentry{excl}{name={!}, description={the exclamation mark symbol}} -\newglossaryentry{bar}{name={$|$}, +\newglossaryentry{bar}{name={\ensuremath{|}}, description={the vertical bar symbol}} \newglossaryentry{hash}{name={\#}, diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/minimalgls.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/minimalgls.pdf new file mode 100644 index 00000000000..cf3b7b30f64 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/minimalgls.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/minimalgls.tex b/Master/texmf-dist/doc/latex/glossaries/samples/minimalgls.tex index db5a04d7f77..d2e575aaec8 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/minimalgls.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/minimalgls.tex @@ -1,3 +1,5 @@ + % This file is public domain. + % % This is a minimal file for testing and debugging % the glossaries package. Change the class file as % desired, and add the relevant package options to diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample-crossref.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sample-crossref.pdf new file mode 100644 index 00000000000..85a7fb542f6 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sample-crossref.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample-crossref.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sample-crossref.tex new file mode 100644 index 00000000000..1dbf3154bfa --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sample-crossref.tex @@ -0,0 +1,31 @@ +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage[sanitize={description=false}]{glossaries} + +\makeglossaries + +\renewcommand{\glsseeitemformat}[1]{\textsc{\glsentryname{#1}}} + +\newglossaryentry{pear}{name=pear, +description={an oddly shaped fruit}} + +\newglossaryentry{apple}{name=apple, +description={firm, round fruit}, +see=[see also]{pear}} + +\newglossaryentry{banana}{name=banana, +description={a yellow fruit with an even odder shape than +a \protect\gls{pear}}} + +\newglossaryentry{fruit}{name=fruit, +description={sweet, fleshy product of plant containing seed}} + +\glssee{fruit}{pear,apple,banana} + +\begin{document} +\gls{pear}, \gls{apple} and \gls{banana}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample-custom-acronym.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sample-custom-acronym.pdf new file mode 100644 index 00000000000..57008b6f803 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sample-custom-acronym.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample-custom-acronym.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sample-custom-acronym.tex index bd63d817500..a0de228a23f 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sample-custom-acronym.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sample-custom-acronym.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass{report} \usepackage[colorlinks]{hyperref} @@ -38,14 +39,14 @@ % ##3 corresponds to the 'symbol' key % ##4 is the inserted text given by the final optional argument to % commands like \gls - % The short form can be obtained via \glsentryuseri{\glslabel} + % The short form can be obtained via \glsentryshort{\glslabel} % The plural short form can be obtained via - % \glsentryuserii{\glslabel} - % The long form can be obtained via \glsentryuseriii{\glslabel} + % \glsentryshortplural{\glslabel} + % The long form can be obtained via \glsentrylong{\glslabel} % The plural long form can be obtained via - % \glsentryuseriv{\glslabel} + % \glsentrylongplural{\glslabel} \defglsdisplayfirst[#1]{##1##4\protect\footnote{% - \glsentryuseriii{\glslabel}: ##2}}% + \glsentrylong{\glslabel}: ##2}}% % ##1 corresponds to the 'text' key % the rest as above \defglsdisplay[#1]{##1##4}% diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample-dual.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sample-dual.pdf new file mode 100644 index 00000000000..408f4315c72 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sample-dual.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample-dual.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sample-dual.tex new file mode 100644 index 00000000000..0da681150ed --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sample-dual.tex @@ -0,0 +1,29 @@ + % This file is public domain +\documentclass{article} + +\usepackage[acronym]{glossaries} + + % \newdualentry[main options]{label}{short}{long}{description} + +\newcommand*{\newdualentry}[5][]{% + \newglossaryentry{main-#2}{name={#4},% + text={#3\protect\glsadd{#2}},% + description={#5},% + #1 + }% + \newacronym{#2}{#3\protect\glsadd{main-#2}}{#4} +} + +\newdualentry{svm}% label + {SVM}% abbreviation + {support vector machine}% long form + {Statistical pattern recognition technique}% description + +\makeglossaries + +\begin{document} + +\gls{svm}. + +\printglossaries +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sample.pdf new file mode 100644 index 00000000000..82cc6a96a6a Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sample.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sample.tex index bfea39f9672..86b299ab7a4 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sample.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sample.tex @@ -1,27 +1,28 @@ + % This file is public domain \documentclass[a4paper]{report} \usepackage[plainpages=false,colorlinks]{hyperref} -\usepackage[toc,style=treenoname,order=word,acronym]{glossaries} +\usepackage[toc,style=treenoname,order=word,subentrycounter]{glossaries} \makeglossaries +\newglossaryentry{Perl}{name=\texttt{Perl}, +sort=Perl, % need a sort key because name contains a command +description=A scripting language} + \newglossaryentry{glossary}{name=glossary, description={\nopostdesc}, plural={glossaries}} -\newglossaryentry{glossarylist}{ -description={1) list of technical words}, -sort={1}, -parent={glossary}} - \newglossaryentry{glossarycol}{ -description={2) collection of glosses}, +description={collection of glosses}, sort={2}, parent={glossary}} -\newglossaryentry{Perl}{name=\texttt{Perl}, -sort=Perl, % need a sort key because name contains a command -description=A scripting language} +\newglossaryentry{glossarylist}{ +description={list of technical words}, +sort={1}, +parent={glossary}} \newglossaryentry{pagelist}{name=page list, % description value has to be enclosed in braces @@ -54,12 +55,12 @@ female of any bovine animal}} \newglossaryentry{bravo}{name={bravo}, description={\nopostdesc}} -\newglossaryentry{bravo1}{description={1) cry of approval (pl.\ bravos)}, +\newglossaryentry{bravo1}{description={cry of approval (pl.\ bravos)}, sort={1}, plural={bravos}, parent=bravo} -\newglossaryentry{bravo2}{description={2) hired ruffian or killer (pl.\ bravoes)}, +\newglossaryentry{bravo2}{description={hired ruffian or killer (pl.\ bravoes)}, sort={2}, plural={bravoes}, parent=bravo} @@ -83,11 +84,11 @@ description={large seal}} \chapter{Introduction} \pagenumbering{arabic} -A \gls{glossarylist} is a very useful addition to any -technical document, although a \gls{glossarycol} can -also simply be a collection of glosses, which is -another thing entirely. Some documents have -multiple \glspl{glossarylist}. +A \gls{glossarylist} (definition~\glsrefentry{glossarylist}) is a +very useful addition to any technical document, although a +\gls{glossarycol} (definition~\glsrefentry{glossarycol}) can also +simply be a collection of glosses, which is another thing entirely. +Some documents have multiple \glspl{glossarylist}. Once you have run your document through \LaTeX, you will then need to run the \texttt{.glo} file through @@ -115,9 +116,10 @@ explicitly specify the alternative form using \verb|\glslink|. \Glspl{seal} and \glspl{sealion} have regular plural forms. \Gls{bravo} is a homograph, but the plural forms are spelt -differently. The plural of \gls{bravo1}, a cry of approval, -is \glspl{bravo1}, whereas the plural of \gls{bravo2}, a hired -ruffian or killer, is \glspl{bravo2}. +differently. The plural of \gls{bravo1}, a cry of approval +(definition~\glsrefentry{bravo1}), is \glspl{bravo1}, whereas the +plural of \gls{bravo2}, a hired ruffian or killer +(definition~\glsrefentry{bravo2}), is \glspl{bravo2}. \Glspl{par} can cause a problem in commands, so care is needed when having a paragraph break in a \gls{glossarylist} entry. diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample4col.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sample4col.pdf new file mode 100644 index 00000000000..5f6a43ba02c Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sample4col.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample4col.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sample4col.tex index 8467841b6e3..846a5056571 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sample4col.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sample4col.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass[a4paper]{article} \usepackage[style=long4colheaderborder]{glossaries} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcr.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcr.pdf new file mode 100644 index 00000000000..c7a5f27ad9b Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcr.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcr.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcr.tex index 3addc9d8a47..9dcd5f69e84 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcr.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcr.tex @@ -1,7 +1,11 @@ + % This file is public domain \documentclass[a4paper]{report} \usepackage[colorlinks,plainpages=false]{hyperref} -\usepackage[style=long,toc]{glossaries} +\usepackage[style=long,% use 'long' style for the glossary + toc,% add glossary to table of contents + smallcaps% Use small caps for acronyms + ]{glossaries} \makeglossaries @@ -19,29 +23,59 @@ \chapter{Support Vector Machines} \Glspl{svm} are used widely in the area of pattern recognition. +Subsequent use: \gls{svm}. -This is the text produced without a link: \glsentrytext{svm}. -This is the text produced on first use without a link: -\glsentryfirst{svm}. This is the entry's description without -a link: \glsentrydesc{svm}. +Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full +version: \acrfull{svm}. Description: \glsentrydesc{svm}. This is the entry in uppercase: \GLS{svm}. \chapter{Kernel Support Vector Machines} The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses -the so called ``kernel trick''. Plural: \glspl{ksvm}. +the so called ``kernel trick''. Plural: \glspl{ksvm}. Resetting +acronyms. \glsresetall Possessive: \gls{ksvm}['s]. Make the glossary entry number bold for this -one \gls[format=hyperbf]{svm}. +one \gls[format=hyperbf]{ksvm}. + +\chapter{Short, Long and Full Forms} + +These commands don't affect the first use flag: + +\begin{center} +\begin{tabular}{lll} + & Unstarred & Starred\\ +acrshort & \acrshort{svm} & \acrshort*{svm}\\ +Acrshort & \Acrshort{svm} & \Acrshort*{svm}\\ +ACRshort & \ACRshort{svm} & \ACRshort*{svm}\\ +acrlong & \acrlong{svm} & \acrlong*{svm}\\ +Acrlong & \Acrlong{svm} & \Acrlong*{svm}\\ +ACRlong & \ACRlong{svm} & \ACRlong*{svm}\\ +acrfull & \acrfull{svm} & \acrfull*{svm}\\ +Acrfull & \Acrfull{svm} & \Acrfull*{svm}\\ +ACRfull & \ACRfull{svm} & \ACRfull*{svm}\\ +\\ +& Insert Unstarred & Insert Starred\\ +acrshort & \acrshort{svm}['s] & \acrshort*{svm}['s]\\ +Acrshort & \Acrshort{svm}['s] & \Acrshort*{svm}['s]\\ +ACRshort & \ACRshort{svm}['s] & \ACRshort*{svm}['s]\\ +acrlong & \acrlong{svm}['s] & \acrlong*{svm}['s]\\ +Acrlong & \Acrlong{svm}['s] & \Acrlong*{svm}['s]\\ +ACRlong & \ACRlong{svm}['s] & \ACRlong*{svm}['s]\\ +acrfull & \acrfull{svm}['s] & \acrfull*{svm}['s]\\ +Acrfull & \Acrfull{svm}['s] & \Acrfull*{svm}['s]\\ +ACRfull & \ACRfull{svm}['s] & \ACRfull*{svm}['s] +\end{tabular} +\end{center} \chapter{Another chapter} You don't need to worry about makeindex's special characters: \gls{rna}. -\printglossary[title={Acronyms}] +\printglossary[title={List of Acronyms}] \end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.pdf new file mode 100644 index 00000000000..858149b703c Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.tex index 3ff8cd0ad83..e57550ce872 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.tex @@ -1,23 +1,33 @@ + % This file is public domain \documentclass[a4paper]{report} \usepackage[colorlinks,plainpages=false]{hyperref} -\usepackage[style=altlist, % use altlist style +\usepackage[acronym,% create 'acronym' glossary type + nomain,% 'main' glossary not needed as using 'acronym' + style=altlist, % use altlist style toc, % add the glossary to the table of contents sanitize={description=false},% want to use description in main document + smallcaps,% description% acronyms have a user-supplied description ]{glossaries} \makeglossaries +\renewcommand*{\glsseeitemformat}[1]{\acronymfont{\glsentrytext{#1}}} + +\renewcommand*{\acrnameformat}[2]{\acronymfont{#1} (#2)} + + +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} + \newacronym[description={Statistical pattern recognition technique~\protect\cite{svm}}, % acronym's description -name={Support vector machine (svm)}% change the default way of displaying the entry name in the list of acronyms ]{svm}{svm}{support vector machine} \newacronym[description={Statistical pattern recognition technique -using the ``kernel trick'' (see also \glshyperlink[SVM]{svm})},% acronym's description -name={Kernel support vector machine (ksvm)}% change the default way of displaying the entry name in the list of acronyms +using the ``kernel trick''},% acronym's description +see={[see also]{svm}}, ]{ksvm}{ksvm}{kernel support vector machine} @@ -30,10 +40,8 @@ The \gls{svm} is used widely in the area of pattern recognition. % plural form with initial letter in uppercase: \Glspl{svm} are \ldots -This is the text produced without a link: \glsentrytext{svm}. -This is the text produced on first use without a link: -\glsentryfirst{svm}. This is the entry's description without -a link: \glsentrydesc{svm}. +Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full +version: \acrfull{svm}. Description: \glsentrydesc{svm}. This is the entry in uppercase: \GLS{svm}. diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleDB.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleDB.pdf new file mode 100644 index 00000000000..82e40cd570c Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleDB.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleDB.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleDB.tex index 651e4694551..a19501afad7 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleDB.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleDB.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass{article} \usepackage[colorlinks,plainpages=false]{hyperref} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleDesc.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleDesc.pdf new file mode 100644 index 00000000000..9327d851c54 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleDesc.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleDesc.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleDesc.tex index 8802d88d1b9..c1a3aadc015 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleDesc.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleDesc.tex @@ -1,3 +1,6 @@ + % This file is public domain + % + % See also sampleAcrDesc.tex \documentclass[a4paper]{report} \usepackage[colorlinks,plainpages=false]{hyperref} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleEq.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleEq.pdf new file mode 100644 index 00000000000..02e0d7db571 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleEq.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleEq.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleEq.tex index d7f43bc7952..53b84ddc551 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleEq.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleEq.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass[a4paper,12pt]{report} \usepackage{amsmath} @@ -12,7 +13,7 @@ % redefine the way hyperref creates the target for equations % so that the glossary links to equation numbers work -\renewcommand*\theHequation{\thechapter.\arabic{equation}} + \renewcommand*\theHequation{\theHchapter.\arabic{equation}} % Change the glossary headings diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleEqPg.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleEqPg.pdf new file mode 100644 index 00000000000..73eb8983d61 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleEqPg.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleEqPg.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleEqPg.tex index c29175f5416..63af21a2bc9 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleEqPg.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleEqPg.tex @@ -1,3 +1,5 @@ + % This file is public domain + % % To ensure that the page numbers are up-to-date: % % latex sampleEqPg diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleNtn.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleNtn.pdf new file mode 100644 index 00000000000..7fe700a622d Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleNtn.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleNtn.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleNtn.tex index 9901c7ab61d..cd682b4e230 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleNtn.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleNtn.tex @@ -1,8 +1,9 @@ + % This file is public domain \documentclass{report} \usepackage[plainpages=false,colorlinks]{hyperref} \usepackage{html} -\usepackage[toc]{glossaries} +\usepackage[toc,savewrites,xindy]{glossaries} % Define a new glossary type called notation \newglossary[nlg]{notation}{not}{ntn}{Notation} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleSec.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleSec.pdf new file mode 100644 index 00000000000..fb906f8b3da Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleSec.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleSec.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleSec.tex index ccefe8c19e1..e6d5a11cce0 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleSec.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleSec.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass{report} \usepackage[plainpages=false,colorlinks]{hyperref} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleaccsupp.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleaccsupp.pdf new file mode 100644 index 00000000000..33d606336b2 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleaccsupp.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleaccsupp.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleaccsupp.tex index 0ebf51dbe5a..b22b08fbe5d 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleaccsupp.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleaccsupp.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass{article} \usepackage[acronym,smallcaps]{glossaries-accsupp} @@ -6,7 +7,7 @@ \newglossaryentry{dr}{name=Dr,description={Doctor},access={Doctor}} -\newacronym[\glsshortaccesskey=S V M]{svm}{svm}{support vector machine} +\newacronym[shortaccess=S V M]{svm}{svm}{support vector machine} \newacronym{eg}{e.g.}{for example} @@ -14,9 +15,12 @@ \gls{dr}~Jones. \gls{dr}~Jones. -\Gls{eg}, \gls{eg} +\Gls{eg}, \gls{eg}, \acrshort{eg}, \acrlong{eg}, \acrfull{eg}. -\gls{svm}. \gls{svm}. +\Acrshort{eg}, \ACRshort{eg}. \Acrlong{eg}, \ACRlong{eg}. +\Acrfull{eg}, \ACRfull{eg}. + +\gls{svm}. \gls{svm}, \acrshort{svm}, \acrlong{svm}, \acrfull{svm}. \printglossaries \end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleacronyms.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleacronyms.pdf new file mode 100644 index 00000000000..145ebedbf99 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleacronyms.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleacronyms.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleacronyms.tex index bd6219b8519..fd7099e1dbf 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleacronyms.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleacronyms.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass{article} \usepackage[acronym,footnote,acronymlists={main,acronym2}]{glossaries} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampletree.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampletree.pdf new file mode 100644 index 00000000000..2906295efc4 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampletree.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampletree.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampletree.tex index 529e19baa42..98d667d7ca9 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampletree.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampletree.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass{report} \usepackage[colorlinks]{hyperref} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleutf8.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/sampleutf8.pdf new file mode 100644 index 00000000000..af383ebc00b Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/sampleutf8.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sampleutf8.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sampleutf8.tex index 7f885e678b2..e249fee0214 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/sampleutf8.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sampleutf8.tex @@ -1,3 +1,4 @@ + % This file is public domain \documentclass{article} \usepackage[utf8]{inputenc} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-compatible207.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-compatible207.pdf new file mode 100644 index 00000000000..bd668751104 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-compatible207.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-compatible207.tex b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-compatible207.tex new file mode 100644 index 00000000000..de97247c19f --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-compatible207.tex @@ -0,0 +1,232 @@ + % This file is public domain. + % + % This is a sample document illustrating how to use the + % glossaries package with xindy using the compatibility option. + % To create the document: + % + % latex samplexdy-compatible207 + % makeglossaries samplexdy-compatible207 + % latex samplexdy-compatible207 + % + % If you don't have Perl installed, then use one of the + % following instead of makeglossaries: + % + % If you want to have a separate "Mc" letter group do: + % + % xindy -I xindy -M samplexdy-mc207 -t samplexdy-compatible207.glg -o samplexdy-compatible207.gls samplexdy-compatible207.glo + % + % Otherwise do: + % + % xindy -L english -C utf8 -I xindy -M samplexdy-compatible207 -t samplexdy-compatible207.glg -o samplexdy-compatible207.gls samplexdy-compatible207.glo + % +\documentclass{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{fmtcount} + + % remove redefinition of \thepage below if you want to uncomment + % the following line: + % \usepackage[colorlinks]{hyperref} + +\usepackage[xindy,compatible-2.07,style=altlistgroup]{glossaries} + + % Define a new command to do bold italic (it uses \hyperbf + % rather than \textbf in case I later introduce hyperlinks + % - although I would have to remove the fancy page numbering + % if I wanted to do that): + +\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} + + % Need to add this to the list of attributes in order + % to use it with xindy: + % (This command will have no effect if \noist is used) + +\GlsAddXdyAttribute{hyperbfit} + + % Redefine the page numbers so that they appear as a word: + + \renewcommand*{\thepage}{\Numberstring{page}} + + % Need to add this to the list of location styles. + % \Numberstring{page} gets expanded to + % \protect \Numberstringnum {} (where is the page number) + % so need to define the location in that format: + % (This command will have no effect if \noist is used) + +\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space + \string\Numberstringnum\space\glsopenbrace" + "arabic-numbers" :sep "\glsclosebrace"} + + % To have Mc as a separate group uncomment the following three + % lines: + + \setStyleFile{samplexdy-mc207} % note no extension + \noist + \GlsSetXdyLanguage{} + + % The above three lines specify to use samplexdy-mc.xdy (supplied + % with this file) and don't overwrite it. The language is + % unset using \GlsSetXdyLanguage{} as all the language + % dependent information is contained in samplexdy-mc.xdy + % Note that using \noist means that commands like + % \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have + % an effect. + + % Write the style file (if \noist isn't used) + % and activate glossary entries + +\makeglossaries + + % Define glossary entries + % \glshyperlink is used instead of \gls to prevent the glossary + % page numbers also appear in the locations, however I need + % to ensure that the referenced entries are added to the + % glossary via commands that use \glslink, \glsadd or \glssee + +\newglossaryentry{mcadam}{name={McAdam, John Loudon}, +first={John Loudon McAdam},text={McAdam}, +description={Scottish engineer}} + +\newglossaryentry{maclaurin}{name={Maclaurin, Colin}, +first={Colin Maclaurin},text={Maclaurin}, +description={Scottish mathematician best known for the +\gls{maclaurinseries}}} + +\newglossaryentry{maclaurinseries}{name={Maclaurin series}, +description={Series expansion},see={taylorstheorem}} + +\newglossaryentry{taylorstheorem}{name={Taylor's theorem}, +description={Theorem expressing a function $f(x)$ as the sum of +a polynomial and a remainder: +\[f(x) = f(a)+f'(a)(x-a)+f''(a)(x-a^2)/2!+\cdots+R_n\] +If $n\to\infty$ the expansion is a \glshyperlink{taylorseries} +and if $a=0$, the series is called a +\gls{maclaurinseries}}} + +\newglossaryentry{taylorseries}{name={Taylor series}, +description={Series expansion},see={taylorstheorem}} + +\newglossaryentry{taylor}{name={Taylor, Brook}, +first={Brook Taylor},text={Taylor}, +description={English mathematician}} + +\newglossaryentry{mcnemar}{name={McNemar, Quinn}, +first={Quinn McNemar},text={McNemar}, +description={Mathematician who introduced +\gls{mcnemarstest}. This entry has the number list +suppressed},nonumberlist} + +\newglossaryentry{mcnemarstest}{name={McNemar's test}, +description={A nonparametric test introduced by +\gls{mcnemar} in 1947}} + +\newglossaryentry{mach}{name={Mach, Ernst}, +first={Ernst Mach},text={Mach}, + % if using samplexdy-mc.xdy, the following line is needed + % to prevent this entry being put in the "Mc" group +sort={mach, Ernst}, +description={Czech/Austrian physicist and philosopher}} + +\newglossaryentry{machnumber}{name={Mach number}, + % if using samplexdy-mc.xdy, the following line is needed + % to prevent this entry being put in the "Mc" group +sort={mach number}, +description={Ratio of the speed of a body in a fluid to the +speed of sound in that fluid named after \gls{mach}}} + +\newglossaryentry{malthus}{name={Malthus, Thomas Robert}, +first={Thomas Robert Malthus},text={Malthus}, +description={English mathematician, sociologist and classicist}} + +\newglossaryentry{ampereandre}{name={Ampère, André-Marie}, +first={André-Marie Ampère},text={Ampère}, +description={French mathematician and physicist}} + +\newglossaryentry{ampere}{name={ampere}, +description={SI unit of electric current named after +\gls{ampereandre}}} + +\newglossaryentry{archimedes}{name={Archimedes of Syracuse}, +first={Archimedes of Syracuse},text={Archimedes}, +description={Greek mathematician}} + +\newglossaryentry{archimedesprinciple}{name={Archemedes' principle}, +description={Principle that if a body is submerged in a fluid +it experiences upthrust equal to the weight of the displaced +fluid. Named after \gls{archimedes}}} + +\newglossaryentry{galton}{name={Galton, Sir Francis}, +first={Sir Francis Galton},text={Galton}, +description={English anthropologist}} + +\newglossaryentry{gauss}{name={Gauss, Karl Friedrich}, +first={Karl Friedrich Gauss},text={Gauss}, +description={German mathematician}} + +\newglossaryentry{gaussianint}{name={Gaussian integer}, +description={Complex number where both real and imaginary +parts are integers}} + +\newglossaryentry{peano}{name={Peano, Giuseppe}, +first={Giuseppe Peano},text={Peano}, +description={Italian mathematician}} + +\newglossaryentry{peanoscurve}{name={Peano's curve}, +description={A space-filling curve discovered by +\gls{peano}}} + +\newglossaryentry{pearson}{name={Pearson, Karl}, +first={Karl Pearson},text={Pearson}, +description={English mathematician}} + +\newglossaryentry{pearspmcc}{name={Pearson's product moment +correlation coefficient},description={Product moment correlation +coefficient named after \gls{pearson}}} + +\begin{document} +\title{Sample Document Using the Glossaries Package With Xindy} +\author{Nicola Talbot} +\maketitle + +\section{\glsentryfirst{gauss}} + +This is a section on \gls[format=(]{gauss}. This section spans +several pages. + +\newpage + +This page talks about \glspl[format=hyperbfit]{gaussianint}. Since +it's the principle definition, the user-defined hyperbfit format is +used. + +\newpage + +The section on \gls[format=)]{gauss} ends here. + +\section{Series Expansions} + +This section is about series expansions. It mentions +\gls{maclaurin} and \gls{taylor}. It also discusses +\gls{taylorstheorem} which is related to the \gls{taylorseries}. +The \gls{maclaurinseries} is a special case of the +\gls{taylorseries}. + +\section{\glsentryname{archimedesprinciple}} + +This section discusses \gls{archimedesprinciple} which was +introduced by \gls{archimedes}. + +\section{Another section} + +This section covers \gls{mach} who introduced the \gls{machnumber}. +It also mentions \gls{ampereandre} after whom the +SI unit \gls{ampere} is named. It then discusses \gls{galton} +and \gls{malthus}. Finally it mentions \gls{mcadam}. + +\newpage +This page discusses \gls{mcnemar} who introduced +\gls{mcnemarstest} and \gls{peano} who discovered \gls{peanoscurve}. + +\printglossaries +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-mc.xdy b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-mc.xdy index 7c8d2b9e484..22f392f9aa9 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-mc.xdy +++ b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-mc.xdy @@ -414,53 +414,286 @@ ; list of allowed attributes (number formats) (define-attributes (("default" + "hyperbfit" + "pagehyperbfit" "glsnumberformat" + "pageglsnumberformat" "textrm" + "pagetextrm" "textsf" + "pagetextsf" "texttt" + "pagetexttt" "textbf" + "pagetextbf" "textmd" + "pagetextmd" "textit" + "pagetextit" "textup" + "pagetextup" "textsl" + "pagetextsl" "textsc" + "pagetextsc" "emph" + "pageemph" "glshypernumber" + "pageglshypernumber" "hyperrm" + "pagehyperrm" "hypersf" + "pagehypersf" "hypertt" + "pagehypertt" "hyperbf" + "pagehyperbf" "hypermd" + "pagehypermd" "hyperit" + "pagehyperit" "hyperup" + "pagehyperup" "hypersl" + "pagehypersl" "hypersc" + "pagehypersc" "hyperemph" - "hyperbfit"))) + "pagehyperemph"))) ; user defined alphabets ; location class definitions (define-location-class "roman-page-numbers" - ("roman-numbers-lowercase")) + ( :sep "{}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-roman-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-roman-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-roman-page-numbers" + ( :sep "{" "alpha" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-roman-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-roman-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) (define-location-class "Roman-page-numbers" - ("roman-numbers-uppercase")) + ( :sep "{}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Roman-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Roman-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Roman-page-numbers" + ( :sep "{" "alpha" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Roman-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Roman-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) (define-location-class "arabic-page-numbers" - ("arabic-numbers")) + ( :sep "{}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-arabic-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-arabic-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-arabic-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-arabic-page-numbers" + ( :sep "{" "alpha" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-arabic-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-arabic-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-arabic-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) (define-location-class "alpha-page-numbers" - ("alpha")) + ( :sep "{}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-alpha-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-alpha-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-alpha-page-numbers" + ( :sep "{" "alpha" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) (define-location-class "Alpha-page-numbers" - ("ALPHA")) + ( :sep "{}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Alpha-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Alpha-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Alpha-page-numbers" + ( :sep "{" "alpha" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) (define-location-class "Appendix-page-numbers" - ("ALPHA" :sep "." "arabic-numbers")) + ( :sep "{}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Appendix-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Appendix-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Appendix-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Appendix-page-numbers" + ( :sep "{" "alpha" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Appendix-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Appendix-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Appendix-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) (define-location-class "arabic-section-numbers" - ("arabic-numbers" :sep "." "arabic-numbers")) + ( :sep "{}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-arabic-section-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-arabic-section-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-arabic-section-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-arabic-section-numbers" + ( :sep "{" "alpha" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-arabic-section-numbers" + ( :sep "{" "ALPHA" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-arabic-section-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-arabic-section-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) ; user defined location classes (define-location-class "Numberstring" - (:sep "\protect \Numberstringnum {" "arabic-numbers" :sep "}")) + (:sep "{}{" :sep "\protect \Numberstringnum {" "arabic-numbers" :sep "}" :sep "}")) ; define cross-reference class @@ -482,11 +715,35 @@ ; define the glossary markup (markup-index - :open "\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble~n\begin{theglossary}\glossaryheader~n" - :close "~n\end{theglossary}~n\glossarypostamble~n" + :open "\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble +\providecommand*\glsXpageXhyperbfit[2]{\setentrycounter[#1]{page}\hyperbfit{#2}} +\providecommand*\glsXpageXglsnumberformat[2]{\setentrycounter[#1]{page}\glsnumberformat{#2}} +\providecommand*\glsXpageXtextrm[2]{\setentrycounter[#1]{page}\textrm{#2}} +\providecommand*\glsXpageXtextsf[2]{\setentrycounter[#1]{page}\textsf{#2}} +\providecommand*\glsXpageXtexttt[2]{\setentrycounter[#1]{page}\texttt{#2}} +\providecommand*\glsXpageXtextbf[2]{\setentrycounter[#1]{page}\textbf{#2}} +\providecommand*\glsXpageXtextmd[2]{\setentrycounter[#1]{page}\textmd{#2}} +\providecommand*\glsXpageXtextit[2]{\setentrycounter[#1]{page}\textit{#2}} +\providecommand*\glsXpageXtextup[2]{\setentrycounter[#1]{page}\textup{#2}} +\providecommand*\glsXpageXtextsl[2]{\setentrycounter[#1]{page}\textsl{#2}} +\providecommand*\glsXpageXtextsc[2]{\setentrycounter[#1]{page}\textsc{#2}} +\providecommand*\glsXpageXemph[2]{\setentrycounter[#1]{page}\emph{#2}} +\providecommand*\glsXpageXglshypernumber[2]{\setentrycounter[#1]{page}\glshypernumber{#2}} +\providecommand*\glsXpageXhyperrm[2]{\setentrycounter[#1]{page}\hyperrm{#2}} +\providecommand*\glsXpageXhypersf[2]{\setentrycounter[#1]{page}\hypersf{#2}} +\providecommand*\glsXpageXhypertt[2]{\setentrycounter[#1]{page}\hypertt{#2}} +\providecommand*\glsXpageXhyperbf[2]{\setentrycounter[#1]{page}\hyperbf{#2}} +\providecommand*\glsXpageXhypermd[2]{\setentrycounter[#1]{page}\hypermd{#2}} +\providecommand*\glsXpageXhyperit[2]{\setentrycounter[#1]{page}\hyperit{#2}} +\providecommand*\glsXpageXhyperup[2]{\setentrycounter[#1]{page}\hyperup{#2}} +\providecommand*\glsXpageXhypersl[2]{\setentrycounter[#1]{page}\hypersl{#2}} +\providecommand*\glsXpageXhypersc[2]{\setentrycounter[#1]{page}\hypersc{#2}} +\providecommand*\glsXpageXhyperemph[2]{\setentrycounter[#1]{page}\hyperemph{#2}} +\begin{theglossary}\glossaryheader~n" + :close "%~n\end{theglossary}\glossarypostamble~n" :tree) (markup-letter-group-list :sep "\glsgroupskip~n") -(markup-indexentry :open "~n" :depth 0) +(markup-indexentry :open "\relax\glsresetentrylist~n") (markup-locclass-list :open "{\glossaryentrynumbers{\relax " :sep ", " :close "}}") (markup-locref-list :sep "\delimN ") @@ -494,75 +751,75 @@ ; define format to use for locations -(markup-locref :open "~n\setentrycounter{page}\glsnumberformat{" - :close "}" - :attr "glsnumberformat") -(markup-locref :open "~n\setentrycounter{page}\textrm{" - :close "}" - :attr "textrm") -(markup-locref :open "~n\setentrycounter{page}\textsf{" - :close "}" - :attr "textsf") -(markup-locref :open "~n\setentrycounter{page}\texttt{" - :close "}" - :attr "texttt") -(markup-locref :open "~n\setentrycounter{page}\textbf{" - :close "}" - :attr "textbf") -(markup-locref :open "~n\setentrycounter{page}\textmd{" - :close "}" - :attr "textmd") -(markup-locref :open "~n\setentrycounter{page}\textit{" - :close "}" - :attr "textit") -(markup-locref :open "~n\setentrycounter{page}\textup{" - :close "}" - :attr "textup") -(markup-locref :open "~n\setentrycounter{page}\textsl{" - :close "}" - :attr "textsl") -(markup-locref :open "~n\setentrycounter{page}\textsc{" - :close "}" - :attr "textsc") -(markup-locref :open "~n\setentrycounter{page}\emph{" - :close "}" - :attr "emph") -(markup-locref :open "~n\setentrycounter{page}\glshypernumber{" - :close "}" - :attr "glshypernumber") -(markup-locref :open "~n\setentrycounter{page}\hyperrm{" - :close "}" - :attr "hyperrm") -(markup-locref :open "~n\setentrycounter{page}\hypersf{" - :close "}" - :attr "hypersf") -(markup-locref :open "~n\setentrycounter{page}\hypertt{" - :close "}" - :attr "hypertt") -(markup-locref :open "~n\setentrycounter{page}\hyperbf{" - :close "}" - :attr "hyperbf") -(markup-locref :open "~n\setentrycounter{page}\hypermd{" - :close "}" - :attr "hypermd") -(markup-locref :open "~n\setentrycounter{page}\hyperit{" - :close "}" - :attr "hyperit") -(markup-locref :open "~n\setentrycounter{page}\hyperup{" - :close "}" - :attr "hyperup") -(markup-locref :open "~n\setentrycounter{page}\hypersl{" - :close "}" - :attr "hypersl") -(markup-locref :open "~n\setentrycounter{page}\hypersc{" - :close "}" - :attr "hypersc") -(markup-locref :open "~n\setentrycounter{page}\hyperemph{" - :close "}" - :attr "hyperemph") -(markup-locref :open "~n\setentrycounter{page}\hyperbfit{" - :close "}" - :attr "hyperbfit") +(markup-locref :open "~n\glsXpageXhyperbfit" + :close "" + :attr "pagehyperbfit") +(markup-locref :open "~n\glsXpageXglsnumberformat" + :close "" + :attr "pageglsnumberformat") +(markup-locref :open "~n\glsXpageXtextrm" + :close "" + :attr "pagetextrm") +(markup-locref :open "~n\glsXpageXtextsf" + :close "" + :attr "pagetextsf") +(markup-locref :open "~n\glsXpageXtexttt" + :close "" + :attr "pagetexttt") +(markup-locref :open "~n\glsXpageXtextbf" + :close "" + :attr "pagetextbf") +(markup-locref :open "~n\glsXpageXtextmd" + :close "" + :attr "pagetextmd") +(markup-locref :open "~n\glsXpageXtextit" + :close "" + :attr "pagetextit") +(markup-locref :open "~n\glsXpageXtextup" + :close "" + :attr "pagetextup") +(markup-locref :open "~n\glsXpageXtextsl" + :close "" + :attr "pagetextsl") +(markup-locref :open "~n\glsXpageXtextsc" + :close "" + :attr "pagetextsc") +(markup-locref :open "~n\glsXpageXemph" + :close "" + :attr "pageemph") +(markup-locref :open "~n\glsXpageXglshypernumber" + :close "" + :attr "pageglshypernumber") +(markup-locref :open "~n\glsXpageXhyperrm" + :close "" + :attr "pagehyperrm") +(markup-locref :open "~n\glsXpageXhypersf" + :close "" + :attr "pagehypersf") +(markup-locref :open "~n\glsXpageXhypertt" + :close "" + :attr "pagehypertt") +(markup-locref :open "~n\glsXpageXhyperbf" + :close "" + :attr "pagehyperbf") +(markup-locref :open "~n\glsXpageXhypermd" + :close "" + :attr "pagehypermd") +(markup-locref :open "~n\glsXpageXhyperit" + :close "" + :attr "pagehyperit") +(markup-locref :open "~n\glsXpageXhyperup" + :close "" + :attr "pagehyperup") +(markup-locref :open "~n\glsXpageXhypersl" + :close "" + :attr "pagehypersl") +(markup-locref :open "~n\glsXpageXhypersc" + :close "" + :attr "pagehypersc") +(markup-locref :open "~n\glsXpageXhyperemph" + :close "" + :attr "pagehyperemph") ; define letter group list format @@ -573,10 +830,14 @@ (markup-letter-group :open-head "\glsgroupheading{" :close-head "}") +; additional letter groups + (define-letter-group "glsnumbers" :prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") :before "A") +; additional sort rules + ; The following is copied from xindy/lang/english/utf8-lang.xdy (define-sort-rule-orientations (forward backward forward forward)) diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-mc207.xdy b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-mc207.xdy new file mode 100644 index 00000000000..7c8d2b9e484 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy-mc207.xdy @@ -0,0 +1,591 @@ +;; xindy style file for samplexdy.tex that has Mc letter group + +(define-letter-group "A" :prefixes ("€")) +(define-letter-group "B" :after "A" :prefixes ("„")) +(define-letter-group "C" :after "B" :prefixes ("†")) +(define-letter-group "D" :after "C" :prefixes ("Â")) +(define-letter-group "E" :after "D" :prefixes ("—")) +(define-letter-group "F" :after "E" :prefixes ("Âœ")) +(define-letter-group "G" :after "F" :prefixes ("Â")) +(define-letter-group "H" :after "G" :prefixes ("¤")) +(define-letter-group "I" :after "H" :prefixes ("¨")) +(define-letter-group "J" :after "I" :prefixes ("¬")) +(define-letter-group "K" :after "J" :prefixes ("®")) +(define-letter-group "L" :after "K" :prefixes ("´")) +(define-letter-group "Mc" :after "L" :prefixes ("Ƞ")) +(define-letter-group "M" :after "Mc" :prefixes ("»")) +(define-letter-group "N" :after "M" :prefixes ("¼")) +(define-letter-group "O" :after "N" :prefixes ("Ã")) +(define-letter-group "P" :after "O" :prefixes ("È")) +(define-letter-group "Q" :after "P" :prefixes ("Ê")) +(define-letter-group "R" :after "Q" :prefixes ("Ë")) +(define-letter-group "S" :after "R" :prefixes ("Ã")) +(define-letter-group "T" :after "S" :prefixes ("Ú")) +(define-letter-group "U" :after "T" :prefixes ("à")) +(define-letter-group "V" :after "U" :prefixes ("Ã¥")) +(define-letter-group "W" :after "V" :prefixes ("æ")) +(define-letter-group "X" :after "W" :prefixes ("ë")) +(define-letter-group "Y" :after "X" :prefixes ("í")) +(define-letter-group "Ȝ" :after "Y" :prefixes ("ï")) +(define-letter-group "Z" :after "Ȝ" :prefixes ("ð")) +(define-letter-group "Þ" :after "Z" :prefixes ("ö")) +(define-letter-group "Æ¿" :after "Þ" :prefixes ("÷")) + +(define-rule-set "en-alphabetize" + + :rules (("à" "€" :string) + ("À" "€" :string) + ("Æ" "€—" :string) + ("æ" "€—" :string) + ("Ç" "†" :string) + ("ç" "†" :string) + ("ð" "Â" :string) + ("ÃÂ" "Â" :string) + ("É" "—" :string) + ("Ê" "—" :string) + ("È" "—" :string) + ("Ë" "—" :string) + ("è" "—" :string) + ("ë" "—" :string) + ("ê" "—" :string) + ("é" "—" :string) + ("ÃÂ" "¨" :string) + ("ï" "¨" :string) + ("Ñ" "¼" :string) + ("ñ" "¼" :string) + ("Ö" "Ã" :string) + ("Ô" "Ã" :string) + ("ô" "Ã" :string) + ("ö" "Ã" :string) + ("œ" "×" :string) + ("Ã…Â’" "×" :string) + ("ÈÂ" "ï" :string) + ("Ȝ" "ï" :string) + ("þ" "ö" :string) + ("Þ" "ö" :string) + ("Ç·" "÷" :string) + ("Æ¿" "÷" :string) + ("a" "€" :string) + ("A" "€" :string) + ("b" "„" :string) + ("B" "„" :string) + ("C" "†" :string) + ("c" "†" :string) + ("d" "Â" :string) + ("D" "Â" :string) + ("E" "—" :string) + ("e" "—" :string) + ("F" "Âœ" :string) + ("f" "Âœ" :string) + ("g" "Â" :string) + ("G" "Â" :string) + ("H" "¤" :string) + ("h" "¤" :string) + ("I" "¨" :string) + ("i" "¨" :string) + ("J" "¬" :string) + ("j" "¬" :string) + ("K" "®" :string) + ("k" "®" :string) + ("L" "´" :string) + ("l" "´" :string) + ("Mc" "Ƞ" :string) + ("Mac" "Ƞ" :string) + ("M" "»" :string) + ("m" "»" :string) + ("N" "¼" :string) + ("n" "¼" :string) + ("O" "Ã" :string) + ("o" "Ã" :string) + ("P" "È" :string) + ("p" "È" :string) + ("q" "Ê" :string) + ("Q" "Ê" :string) + ("r" "Ë" :string) + ("R" "Ë" :string) + ("S" "Ã" :string) + ("s" "Ã" :string) + ("T" "Ú" :string) + ("t" "Ú" :string) + ("u" "à" :string) + ("U" "à" :string) + ("v" "Ã¥" :string) + ("V" "Ã¥" :string) + ("w" "æ" :string) + ("W" "æ" :string) + ("X" "ë" :string) + ("x" "ë" :string) + ("Y" "í" :string) + ("y" "í" :string) + ("z" "ð" :string) + ("Z" "ð" :string) + )) + +(define-rule-set "en-resolve-diacritics" + + :rules (("ÈÂ" "¢" :string) + ("þ" "¢" :string) + ("Ç·" "¢" :string) + ("Þ" "¢" :string) + ("Ȝ" "¢" :string) + ("Æ¿" "¢" :string) + ("Ö" "£" :string) + ("Ñ" "£" :string) + ("ð" "£" :string) + ("Ç" "£" :string) + ("É" "£" :string) + ("ÃÂ" "£" :string) + ("ï" "£" :string) + ("ö" "£" :string) + ("ñ" "£" :string) + ("ç" "£" :string) + ("à" "£" :string) + ("À" "£" :string) + ("é" "£" :string) + ("ÃÂ" "£" :string) + ("Ô" "¤" :string) + ("ô" "¤" :string) + ("È" "¤" :string) + ("è" "¤" :string) + ("Ë" "Â¥" :string) + ("ë" "Â¥" :string) + ("Ê" "¦" :string) + ("ê" "¦" :string) + ("œ" "ÿ" :string) + ("Æ" "ÿ" :string) + ("Ã…Â’" "ÿ" :string) + ("æ" "ÿ" :string) + ("S" "¢" :string) + ("K" "¢" :string) + ("d" "¢" :string) + ("Y" "¢" :string) + ("E" "¢" :string) + ("y" "¢" :string) + ("g" "¢" :string) + ("e" "¢" :string) + ("J" "¢" :string) + ("q" "¢" :string) + ("D" "¢" :string) + ("b" "¢" :string) + ("z" "¢" :string) + ("w" "¢" :string) + ("Q" "¢" :string) + ("M" "¢" :string) + ("C" "¢" :string) + ("L" "¢" :string) + ("X" "¢" :string) + ("P" "¢" :string) + ("T" "¢" :string) + ("a" "¢" :string) + ("N" "¢" :string) + ("j" "¢" :string) + ("Z" "¢" :string) + ("u" "¢" :string) + ("k" "¢" :string) + ("t" "¢" :string) + ("W" "¢" :string) + ("v" "¢" :string) + ("s" "¢" :string) + ("B" "¢" :string) + ("H" "¢" :string) + ("c" "¢" :string) + ("I" "¢" :string) + ("G" "¢" :string) + ("U" "¢" :string) + ("F" "¢" :string) + ("r" "¢" :string) + ("x" "¢" :string) + ("V" "¢" :string) + ("h" "¢" :string) + ("f" "¢" :string) + ("i" "¢" :string) + ("A" "¢" :string) + ("O" "¢" :string) + ("n" "¢" :string) + ("m" "¢" :string) + ("l" "¢" :string) + ("p" "¢" :string) + ("R" "¢" :string) + ("o" "¢" :string) + )) + +(define-rule-set "en-resolve-case" + + :rules (("Ö" "8" :string) + ("Ñ" "8" :string) + ("Ô" "8" :string) + ("Ç" "8" :string) + ("É" "8" :string) + ("ÃÂ" "8" :string) + ("Ê" "8" :string) + ("È" "8" :string) + ("Ë" "8" :string) + ("Ç·" "8" :string) + ("À" "8" :string) + ("Þ" "8" :string) + ("Ȝ" "8" :string) + ("ÃÂ" "8" :string) + ("Æ" "89" :string) + ("Ã…Â’" "89" :string) + ("ð" "9" :string) + ("ô" "9" :string) + ("ÈÂ" "9" :string) + ("ï" "9" :string) + ("ö" "9" :string) + ("ñ" "9" :string) + ("ç" "9" :string) + ("à" "9" :string) + ("þ" "9" :string) + ("è" "9" :string) + ("ë" "9" :string) + ("ê" "9" :string) + ("é" "9" :string) + ("Æ¿" "9" :string) + ("œ" "99" :string) + ("æ" "99" :string) + ("S" "8" :string) + ("K" "8" :string) + ("Y" "8" :string) + ("E" "8" :string) + ("J" "8" :string) + ("D" "8" :string) + ("Q" "8" :string) + ("M" "8" :string) + ("C" "8" :string) + ("L" "8" :string) + ("X" "8" :string) + ("P" "8" :string) + ("T" "8" :string) + ("N" "8" :string) + ("Z" "8" :string) + ("W" "8" :string) + ("B" "8" :string) + ("H" "8" :string) + ("I" "8" :string) + ("G" "8" :string) + ("U" "8" :string) + ("F" "8" :string) + ("V" "8" :string) + ("A" "8" :string) + ("O" "8" :string) + ("R" "8" :string) + ("d" "9" :string) + ("y" "9" :string) + ("g" "9" :string) + ("e" "9" :string) + ("q" "9" :string) + ("b" "9" :string) + ("z" "9" :string) + ("w" "9" :string) + ("a" "9" :string) + ("j" "9" :string) + ("u" "9" :string) + ("k" "9" :string) + ("t" "9" :string) + ("v" "9" :string) + ("s" "9" :string) + ("c" "9" :string) + ("r" "9" :string) + ("x" "9" :string) + ("h" "9" :string) + ("f" "9" :string) + ("i" "9" :string) + ("n" "9" :string) + ("m" "9" :string) + ("l" "9" :string) + ("p" "9" :string) + ("o" "9" :string) + )) + +(define-rule-set "en-ignore-special" + + :rules (("-" "" :string) + ("!" "" :string) + ("{" "" :string) + ("'" "" :string) + ("}" "" :string) + ("?" "" :string) + ("." "" :string) + )) + +(define-rule-set "en-resolve-special" + + :rules (("Ö" "¤" :string) + ("Ñ" "¤" :string) + ("ð" "¤" :string) + ("Ô" "¤" :string) + ("Ç" "¤" :string) + ("É" "¤" :string) + ("ô" "¤" :string) + ("ÃÂ" "¤" :string) + ("ÈÂ" "¤" :string) + ("ï" "¤" :string) + ("Ê" "¤" :string) + ("ö" "¤" :string) + ("ñ" "¤" :string) + ("È" "¤" :string) + ("ç" "¤" :string) + ("Ë" "¤" :string) + ("à" "¤" :string) + ("þ" "¤" :string) + ("Ç·" "¤" :string) + ("è" "¤" :string) + ("À" "¤" :string) + ("ë" "¤" :string) + ("Þ" "¤" :string) + ("ê" "¤" :string) + ("é" "¤" :string) + ("Ȝ" "¤" :string) + ("Æ¿" "¤" :string) + ("ÃÂ" "¤" :string) + ("œ" "¤¤" :string) + ("Æ" "¤¤" :string) + ("Ã…Â’" "¤¤" :string) + ("æ" "¤¤" :string) + ("?" "¡" :string) + ("!" "¢" :string) + ("." "£" :string) + ("S" "¤" :string) + ("K" "¤" :string) + ("d" "¤" :string) + ("Y" "¤" :string) + ("E" "¤" :string) + ("y" "¤" :string) + ("g" "¤" :string) + ("e" "¤" :string) + ("J" "¤" :string) + ("q" "¤" :string) + ("D" "¤" :string) + ("b" "¤" :string) + ("z" "¤" :string) + ("w" "¤" :string) + ("Q" "¤" :string) + ("M" "¤" :string) + ("C" "¤" :string) + ("L" "¤" :string) + ("X" "¤" :string) + ("P" "¤" :string) + ("T" "¤" :string) + ("a" "¤" :string) + ("N" "¤" :string) + ("j" "¤" :string) + ("Z" "¤" :string) + ("u" "¤" :string) + ("k" "¤" :string) + ("t" "¤" :string) + ("W" "¤" :string) + ("v" "¤" :string) + ("s" "¤" :string) + ("B" "¤" :string) + ("H" "¤" :string) + ("c" "¤" :string) + ("I" "¤" :string) + ("G" "¤" :string) + ("U" "¤" :string) + ("F" "¤" :string) + ("r" "¤" :string) + ("x" "¤" :string) + ("V" "¤" :string) + ("h" "¤" :string) + ("f" "¤" :string) + ("i" "¤" :string) + ("A" "¤" :string) + ("O" "¤" :string) + ("n" "¤" :string) + ("m" "¤" :string) + ("l" "¤" :string) + ("p" "¤" :string) + ("R" "¤" :string) + ("o" "¤" :string) + ("-" "Â¥" :string) + ("'" "¦" :string) + ("{" "§" :string) + ("}" "¨" :string) + )) + +; The following section is customised for samplexdy.tex +; (copied from samplexdy.xdy automatically generated by +; samplexdy.tex) + +; required styles + +(require "tex.xdy") + +; list of allowed attributes (number formats) + +(define-attributes (("default" + "glsnumberformat" + "textrm" + "textsf" + "texttt" + "textbf" + "textmd" + "textit" + "textup" + "textsl" + "textsc" + "emph" + "glshypernumber" + "hyperrm" + "hypersf" + "hypertt" + "hyperbf" + "hypermd" + "hyperit" + "hyperup" + "hypersl" + "hypersc" + "hyperemph" + "hyperbfit"))) + +; user defined alphabets + +; location class definitions + +(define-location-class "roman-page-numbers" + ("roman-numbers-lowercase")) +(define-location-class "Roman-page-numbers" + ("roman-numbers-uppercase")) +(define-location-class "arabic-page-numbers" + ("arabic-numbers")) +(define-location-class "alpha-page-numbers" + ("alpha")) +(define-location-class "Alpha-page-numbers" + ("ALPHA")) +(define-location-class "Appendix-page-numbers" + ("ALPHA" :sep "." "arabic-numbers")) +(define-location-class "arabic-section-numbers" + ("arabic-numbers" :sep "." "arabic-numbers")) + +; user defined location classes + +(define-location-class "Numberstring" + (:sep "\protect \Numberstringnum {" "arabic-numbers" :sep "}")) + +; define cross-reference class + +(define-crossref-class "see" :unverified ) +(markup-crossref-list :class "see" + :open "\glsseeformat" :close "{}") + +; define the order of the location classes +(define-location-class-order ( + "roman-page-numbers" + "arabic-page-numbers" + "arabic-section-numbers" + "alpha-page-numbers" + "Roman-page-numbers" + "Alpha-page-numbers" + "Appendix-page-numbers" + "see" )) + +; define the glossary markup + +(markup-index + :open "\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble~n\begin{theglossary}\glossaryheader~n" + :close "~n\end{theglossary}~n\glossarypostamble~n" + :tree) +(markup-letter-group-list :sep "\glsgroupskip~n") +(markup-indexentry :open "~n" :depth 0) +(markup-locclass-list :open "{\glossaryentrynumbers{\relax " + :sep ", " :close "}}") +(markup-locref-list :sep "\delimN ") +(markup-range :sep "\delimR ") + +; define format to use for locations + +(markup-locref :open "~n\setentrycounter{page}\glsnumberformat{" + :close "}" + :attr "glsnumberformat") +(markup-locref :open "~n\setentrycounter{page}\textrm{" + :close "}" + :attr "textrm") +(markup-locref :open "~n\setentrycounter{page}\textsf{" + :close "}" + :attr "textsf") +(markup-locref :open "~n\setentrycounter{page}\texttt{" + :close "}" + :attr "texttt") +(markup-locref :open "~n\setentrycounter{page}\textbf{" + :close "}" + :attr "textbf") +(markup-locref :open "~n\setentrycounter{page}\textmd{" + :close "}" + :attr "textmd") +(markup-locref :open "~n\setentrycounter{page}\textit{" + :close "}" + :attr "textit") +(markup-locref :open "~n\setentrycounter{page}\textup{" + :close "}" + :attr "textup") +(markup-locref :open "~n\setentrycounter{page}\textsl{" + :close "}" + :attr "textsl") +(markup-locref :open "~n\setentrycounter{page}\textsc{" + :close "}" + :attr "textsc") +(markup-locref :open "~n\setentrycounter{page}\emph{" + :close "}" + :attr "emph") +(markup-locref :open "~n\setentrycounter{page}\glshypernumber{" + :close "}" + :attr "glshypernumber") +(markup-locref :open "~n\setentrycounter{page}\hyperrm{" + :close "}" + :attr "hyperrm") +(markup-locref :open "~n\setentrycounter{page}\hypersf{" + :close "}" + :attr "hypersf") +(markup-locref :open "~n\setentrycounter{page}\hypertt{" + :close "}" + :attr "hypertt") +(markup-locref :open "~n\setentrycounter{page}\hyperbf{" + :close "}" + :attr "hyperbf") +(markup-locref :open "~n\setentrycounter{page}\hypermd{" + :close "}" + :attr "hypermd") +(markup-locref :open "~n\setentrycounter{page}\hyperit{" + :close "}" + :attr "hyperit") +(markup-locref :open "~n\setentrycounter{page}\hyperup{" + :close "}" + :attr "hyperup") +(markup-locref :open "~n\setentrycounter{page}\hypersl{" + :close "}" + :attr "hypersl") +(markup-locref :open "~n\setentrycounter{page}\hypersc{" + :close "}" + :attr "hypersc") +(markup-locref :open "~n\setentrycounter{page}\hyperemph{" + :close "}" + :attr "hyperemph") +(markup-locref :open "~n\setentrycounter{page}\hyperbfit{" + :close "}" + :attr "hyperbfit") + +; define letter group list format + +(markup-letter-group-list :sep "\glsgroupskip~n") + +; letter group headings + +(markup-letter-group :open-head "\glsgroupheading{" + :close-head "}") + +(define-letter-group "glsnumbers" + :prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") + :before "A") + +; The following is copied from xindy/lang/english/utf8-lang.xdy + +(define-sort-rule-orientations (forward backward forward forward)) +(use-rule-set :run 0 + :rule-set ("en-alphabetize" "en-ignore-special")) +(use-rule-set :run 1 + :rule-set ("en-resolve-diacritics" "en-ignore-special")) +(use-rule-set :run 2 + :rule-set ("en-resolve-case" "en-ignore-special")) +(use-rule-set :run 3 + :rule-set ("en-resolve-special")) + diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy.pdf new file mode 100644 index 00000000000..518290e3a2f Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy.tex b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy.tex index 548c8021198..faa5efb4ace 100644 --- a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy.tex +++ b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy.tex @@ -1,3 +1,5 @@ + % This file is public domain. + % % This is a sample document illustrating how to use the % glossaries package with xindy. To create the document: % @@ -22,16 +24,10 @@ \usepackage[T1]{fontenc} \usepackage{fmtcount} - % remove redefinition of \thepage below if you want to uncomment - % the following line: - % \usepackage[colorlinks]{hyperref} - +\usepackage[colorlinks,plainpages]{hyperref} \usepackage[xindy,style=altlistgroup]{glossaries} - % Define a new command to do bold italic (it uses \hyperbf - % rather than \textbf in case I later introduce hyperlinks - % - although I would have to remove the fancy page numbering - % if I wanted to do that): + % Define a new command to do bold italic: \newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} @@ -55,6 +51,10 @@ \string\Numberstringnum\space\glsopenbrace" "arabic-numbers" :sep "\glsclosebrace"} + % (Need to redefine \glsXpageXhyperbfit and + % \glsXpageXglsnumberformat after \makeglossaries to get the + % hyperlinks working correctly.) + % To have Mc as a separate group uncomment the following three % lines: @@ -75,6 +75,24 @@ \makeglossaries + % Each page location will be specified in the form: + % + % "\glsXpageXglsnumberformat{}{\protect \Numberstringnum "\marg{n}"}" + % or + % "\glsXpageXhyperbfit{}{\protect \Numberstringnum "\marg{n}"}" + % + % Redefine to allow hyperlinks: + +\renewcommand{\glsXpageXglsnumberformat}[2]{% + \linkpagenumber#2% +} + +\renewcommand{\glsXpageXhyperbfit}[2]{% + \textbf{\em\linkpagenumber#2}% +} + +\newcommand{\linkpagenumber}[3]{\hyperlink{page.#3}{#1#2{#3}}} + % Define glossary entries % \glshyperlink is used instead of \gls to prevent the glossary % page numbers also appear in the locations, however I need diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.pdf b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.pdf new file mode 100644 index 00000000000..3078c980405 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex new file mode 100644 index 00000000000..d6d12d8087d --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex @@ -0,0 +1,66 @@ + % This file is public domain + % + % This is a sample document illustrating how to use the + % glossaries package with xindy. To create the document: + % + % pdflatex samplexdy2 + % makeglossaries samplexdy2 + % pdflatex samplexdy2 + % + % This sample file won't work with makeindex + % +\documentclass{report} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage[xindy,counter=section]{glossaries} + + % Set up somewhat eccentric section numbering system: + +\renewcommand*{\thesection}{[\thechapter]\arabic{section}} + +\renewcommand*{\theHsection}{\thepart.\thesection} +\renewcommand*{\thepart}{\Roman{part}} + +\GlsAddXdyLocation["roman-numbers-uppercase"]{section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} + + % If part is 0, then \thepart will be empty, so add an extra + % case to catch this: + +\GlsAddXdyLocation{zero.section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} + + % (Note that the above will stop xindy giving a warning, but the + % location hyper links will be invalid if no \part is used.) + +\makeglossaries + +\newglossaryentry{sample}{name=sample,description={an example}} +\newglossaryentry{sample2}{name=sample2,description={another example}} + +\begin{document} +This is a sample document illustrating Xindy specific commands in +the glossaries package. + +\part{First Part} + +\chapter{Sample Chapter} + +\section{First Section} + +\gls{sample}. \gls{sample2}. + +\section{Second Section} + +\gls{sample2}. + +\section{Third Section} + +\gls{sample}. \gls{sample2}. + +\printglossaries +\end{document} diff --git a/Master/texmf-dist/scripts/glossaries/makeglossaries b/Master/texmf-dist/scripts/glossaries/makeglossaries index fcb3dfef031..51cf7780c12 100755 --- a/Master/texmf-dist/scripts/glossaries/makeglossaries +++ b/Master/texmf-dist/scripts/glossaries/makeglossaries @@ -2,7 +2,7 @@ # File : makeglossaries # Author : Nicola Talbot -# Version : 1.9 (2010/06/14) +# Version : 2.02 (2011/04/02) # Description: simple Perl script that calls makeindex or xindy. # Intended for use with "glossaries.sty" (saves having to remember # all the various switches) @@ -27,9 +27,14 @@ # glossary-super.sty, glossaries.perl. # Also makeglossaries and makeglossaries. -my $version="2.0 (2010-06-30)"; +my $version="2.02 (2011-04-02)"; # History: +# v2.02 (2011-04-2): +# * Prints version number at start of run unless -q +# * Added more diagnostics. +# v2.01 (2010-09-29): +# * Added 'use warnings' # v2.0 (2010-06-30) : # * Made file handle local in &scan_aux # v1.9 (2010-06-14) : @@ -65,6 +70,8 @@ my $version="2.0 (2010-06-30)"; use Getopt::Std; use strict; +# v2.01 added the following line +use warnings; use vars qw($opt_q $opt_t $opt_o $opt_s $opt_p $opt_g $opt_c $opt_r $opt_l $opt_i $opt_L $opt_n $opt_C); @@ -79,9 +86,17 @@ getopts('s:o:t:p:L:C:ilqrcgn'); unless ($#ARGV == 0) { - die "makeglossaries: Need exactly one file argument.\nUse `makeglossaries --help' for help.\n"; + die "makeglossaries: Need exactly one file argument.\n", + "Use `makeglossaries --help' for help.\n"; } +# v2.02: added: +print "makeglossaries version $version\n" unless ($opt_q); + +# v2.02: added: +my $xdynotist = 1; +my $needcompatibilitymode=2; + # define known extensions # v1.6: removed adding main glossary here as there's no guarantee @@ -116,6 +131,13 @@ if (length($ARGV[0]) > 3 and substr($ARGV[0],-4,1) eq ".") } } +# v2.01 add check to see if aux file exists + +unless (-e "$name.aux") +{ + die "Auxiliary file '$name.aux' doesn't exist. Have you run LaTeX?\n"; +} + my $istfile = ""; # should letter ordering be used? (v1.5 added) @@ -140,7 +162,8 @@ unless ($istfile) my $xdyopts = ''; -unless ($opt_L eq "") +# v2.01 replaced 'unless ($opt_L eq "")' with 'if ($opt_L)' +if ($opt_L) { $xdyopts .= " -L $opt_L"; } @@ -162,8 +185,10 @@ if ($letterordering) if ($opt_q) { - $mkidxopts .= " -q"; - $xdyopts .= " -q"; +# v2.01 removed following lines. (This script now deals with +# printing messages to STDOUT.) + #$mkidxopts .= " -q"; + #$xdyopts .= " -q"; } if ($opt_r) @@ -181,21 +206,52 @@ if ($opt_g) $mkidxopts .= " -g"; } -unless ($opt_p eq "") +# v2.01 replaced 'unless ($opt_p eq "")' with 'if ($opt_p)' +if ($opt_p) { $mkidxopts .= " -p $opt_p"; } -unless ($opt_s eq "") +# v2.01 replaced 'unless ($opt_s eq "")' with 'if ($opt_s)' +if ($opt_s) { + # v2.01 check if user has specified -s .ist but aux file + # indicates .xdy ought to be used and vice-versa. Also check if + # requested style file exists + + unless (-e $opt_s) + { + die "\n", + "Requested style file '$opt_s' doesn't exist.\n\n"; + } + + if ($istfile=~/\.xdy$/ and $opt_s!~/\.xdy$/) + { + die "\n", + "The auxiliary file indicates that you should be using xindy,\n", + "but you have specified makeindex style file '$opt_s'\n", + "Make sure you don't specify 'xindy' as a package option if\n", + "you want to use makeindex.\n\n", + "\\usepackage[makeindex]{glossaries}\n\n"; + } + elsif ($istfile!~/\.xdy$/ and $opt_s=~/\.xdy$/) + { + die "\n", + "The auxiliary file indicates that you should be using\n", + "makeindex, but you have specified xindy style file '$opt_s'.\n", + "Make sure you specify 'xindy' as a package option if you\n", + "want to use xindy.\n\n", + "\\usepackage[xindy]{glossaries}\n\n"; + } + $istfile = $opt_s; } # Use xindy if style file ends with .xdy otherwise use makeindex -my $usexindy = $istfile=~m/\.xdy\Z/; +my $usexindy = ($istfile=~m/\.xdy\Z/); -if ($ext ne '') +if ($ext) { # an extension has been specified, so only process # the specified file @@ -223,7 +279,8 @@ if ($ext ne '') # v1.6 If %thistype hasn't been defined, then the given # extension doesn't correspond to any known glossary type - unless (defined %thistype) + # v2.01 replaced deprecated 'defined(%thistype)' with %thistype + unless (%thistype) { die "The file extension '$ext' doesn't correspond to any\n", "known glossary extension. Try running makeglossaries\n", @@ -232,7 +289,8 @@ if ($ext ne '') my $outfile; - if ($opt_o eq "") +# v2.01 replaced 'if ($opt_o eq "")' with 'unless ($opt_o)' + unless ($opt_o) { $outfile = "$name.$thistype{out}"; } @@ -243,7 +301,8 @@ if ($ext ne '') my $transcript; - if ($opt_t eq "") +# v2.01 replaced 'if ($opt_t eq "")' with 'unless ($opt_t)' + unless ($opt_t) { $transcript = "$name.$thistype{'log'}"; } @@ -252,6 +311,13 @@ if ($ext ne '') $transcript = $opt_t; } +# v2.01 remove old transcript file + + unless ($opt_n) + { + unlink($transcript); + } + if ($usexindy) { &xindy("$name.$ext", $outfile, $transcript,$istfile, @@ -275,7 +341,8 @@ else my $outfile; - if ($opt_o eq "") +# v2.01 changed 'if ($opt_o eq "")' with 'unless ($opt_o)' + unless ($opt_o) { $outfile = "$name.$thistype{out}"; } @@ -324,7 +391,8 @@ else my $transcript; - if ($opt_t eq "") +# v2.01 changed 'if ($opt_t eq "")' with 'unless ($opt)' + unless ($opt_t) { $transcript = "$name.$thistype{'log'}"; } @@ -333,6 +401,13 @@ else $transcript = $opt_t; } +# v2.01 remove old transcript file + + unless ($opt_n) + { + unlink($transcript); + } + if ($usexindy) { &xindy($inputfile,$outfile,$transcript,$istfile, @@ -414,7 +489,7 @@ sub scan_aux{ else { print STDERR - "Unknown ordering '$letterordering'\n", + "Unknown ordering '$ordering'\n", "Assuming word ordering\n"; $letterordering = 0; } @@ -430,62 +505,138 @@ sub scan_aux{ } } -sub makeindex{ - my($in,$out,$trans,$ist,$rest,$quiet,$dontexec) = @_; - my($name,$cmdstr,$buffer,$n,$i,$j); - my(@stuff,@item); +# v2.01 new subroutine run_app added +sub run_app{ + my($appname, $appargs, $trans, $quiet, $dontexec) = @_; - $cmdstr = "$rest -s \"$ist\" -t \"$trans\" -o \"$out\" \"$in\""; + local(*STATUS); - unless ($quiet) - { - print "makeindex $cmdstr\n"; - } + my $status = ''; + my $warnings = ''; + my $errno = 0; + my $log = ''; - unless ($dontexec) - { - open STATUS, "makeindex $cmdstr 2>&1 |" - or die "Can't fork: $!\n"; + print "$appname $appargs\n" if ($dontexec or not $quiet); - my $status = ''; + return if ($dontexec); + if (open (STATUS, "$appname $appargs 2>&1 |")) + { while () { - $status .= $_; + print unless ($quiet); + + $warnings .= $_ if (/WARNING:/); + + $status .= $_ unless (/^[\w]+ing/ or /^Finished/ or /^Usage:/); + + $log .= $_; } close STATUS; + } + else + { + $warnings = "WARNING: Unable to fork $appname: $!\n"; + + print STDERR $warnings, "Retrying without redirection.\n"; + + $status = `$appname $appargs`; + + $log = $status; + + print $status unless ($quiet); + } - if ($?) + if ($?) + { + $errno = $?; + + if (open LOGFILE, ">>$trans") + { + print LOGFILE "\n\n*** Unable to execute: '$appname $appargs' ***\n\n"; + print LOGFILE "Status report:\n\n"; + print LOGFILE "$log"; + close LOGFILE; + } + else { - my $errno = $?; + print STDERR "Unable to open '$trans' $!\n"; + } + } - if (open LOGFILE, ">>$trans") - { - print LOGFILE "\n$status"; - close LOGFILE; - } - else + if ($log=~/\(0 entries accepted,/) + { + # Attempt to diagnose what's gone wrong + + if (open TRANS, $trans) + { + while () { - print STDERR "Unable to open '$trans' $!\n"; + if (/Unknown specifier ;/) + { + $errno = $xdynotist; + + last; + } } - die "Call to makeindex failed (errno=$errno):\n", $status; + close TRANS; } - print $status; + } + + return ($status, $warnings, $errno); +} + +sub makeindex{ + my($in,$out,$trans,$ist,$rest,$quiet,$dontexec) = @_; + + my $args = "$rest -s \"$ist\" -t \"$trans\" -o \"$out\" \"$in\""; + +# v2.01 replaced code with call to &run_app + + my ($status, $warnings, $errno) + = &run_app('makeindex', $args, $trans, $quiet, $dontexec); + + return if ($dontexec); + + if ($errno) + { + my $diagnostic = ''; + + if ($errno = $xdynotist) + { + $diagnostic = + "Style name indicates makeindex, but may be in xindy format.\n" + . "Remember to use \\setStyleFile to specify the name\n" + . "of the style file rather than redefining \\istfilename\n" + . "explicitly."; + } + + die "\n***Call to makeindex failed***\n", + ($diagnostic ? + "\nPossible cause of problem:\n\n". $diagnostic . "\n\n": + "\n" + ), + "Check '$trans' for details\n"; } } sub xindy{ my($in,$out,$trans,$ist,$language,$codepage,$rest,$quiet, $dontexec) = @_; - my($cmdstr, $langparam, $main); + my($args, $langparam, $main, $retry); my($module); $module = $ist; $module=~s/\.xdy\Z//; + unless (defined($language)) + { + $language = ''; + } + # map babel names to xindy names if ($language eq "frenchb") { @@ -543,7 +694,8 @@ sub xindy{ # and supply a default. (For all other cases, it's up to the # user to supply a codepage.) - if ($codepage eq '') +# v2.01 changed 'if ($codepage eq "")' to 'unless ($codepage)' + unless ($codepage) { if ($language eq 'dutch') { @@ -601,121 +753,127 @@ sub xindy{ "-o \"$out\"", "\"$in\""); - $cmdstr = join(' ', $rest, $langparam, $codepageparam, $main); + $args = join(' ', $rest, $langparam, $codepageparam, $main); - unless ($quiet) - { - print "xindy $cmdstr\n"; - } +# v2.01 replaced code with call to &run_app - unless ($dontexec) - { - open STATUS, "xindy $cmdstr 2>&1 |" or die "Can't fork: $!\n"; + my ($status, $warnings, $errno) + = &run_app('xindy', $args, $trans, $quiet, $dontexec); - my $status = ''; - my $warnings = ""; - my $retry =""; + return if ($dontexec); - while () + if ($status=~/Cannot locate xindy module for language ([^\s]+) in codepage ([^\s]+)/) + { + $args = join(' ', $rest, $langparam, $main); + + unless ($quiet) { - $status .= $_; + my $message = "$&\nRetrying using default codepage.\n"; - $warnings .= $_ if /WARNING:/; + print STDERR $message; + + $retry .= $message; } - close STATUS; + ($status, $warnings, $errno) + = &run_app('xindy', $args, $trans, $quiet, $dontexec); - if ($status=~/Cannot locate xindy module for language ([^\s]+) in codepage ([^\s]+)/) - { - $cmdstr = join(' ', $rest, $langparam, $main); + } - unless ($quiet) - { - my $message = "$&\nRetrying using default codepage.\n"; + if ($status=~/Cannot locate xindy module for language ([^\s]+)/ + and $1 ne 'general') + { + $args = join(' ', $rest, "-L general", $main); - print STDERR $message; + unless ($quiet) + { + my $message = "$&\nRetrying with -L general\n"; - $retry .= $message; + print STDERR $message; + $retry .= $message; + } - print "xindy $cmdstr\n"; - } + ($status, $warnings, $errno) + = &run_app('xindy', $args, $trans, $quiet, $dontexec); - open STATUS, "xindy $cmdstr 2>&1 |" - or die "Can't fork: $!\n"; + } - $status = ''; + if ($errno) + { + # attempt further diagnostic - while () - { - $status .= $_; - } + my $diagnostic = ''; - close STATUS; + if ($status=~/index 0 should be less than the length of the string/m) + { + $diagnostic = + "Sort key required for entries only containing command names"; } - - if ($status=~/Cannot locate xindy module for language ([^\s]+)/ - and $1 ne 'general') + elsif ($status=~/variable % has no value/m) { - $cmdstr = join(' ', $rest, "-L general", $main); - - unless ($quiet) - { - my $message = "$&\nRetrying with -L general\n"; - - print STDERR $message; - $retry .= $message; + $diagnostic = + "Style name has xdy extension, but may be in makeindex format.\n" + . "Remember to use \\setStyleFile to specify the name\n" + . "of the style file rather than redefining \\istfilename\n" + . "explicitly."; + } + elsif ($status=~/Possible read-error due to ill-formed string " :sep/m) + { + $diagnostic = + "You may have missed a \" character in a command such as \\GlsAddXdyLocation"; + } + elsif (not $language) + { + # If the language hasn't been set, then it may be + # because the document doesn't contain + # \printglossaries/\printglossary or it may be + # because the user has a customized style file that + # contains the language settings. + + $diagnostic = + "No language detected.". + "\nHave you remembered to use \\printglossary\n". + "or \\printglossaries in your document?"; + } - print "xindy $cmdstr\n"; - } + die "\n***Call to xindy failed***\n", + ($diagnostic ? + "\nPossible cause of problem:\n\n". $diagnostic . "\n\n": + "\n"), + "Check '$trans' for details\n"; + } - open STATUS, "xindy $cmdstr 2>&1 |" - or die "Can't fork: $!\n"; + # Check xindy warnings - $status = ''; + if ($status=~/^WARNING:/m) + { + my $diagwarn = ''; - while () - { - $status .= $_; - } + if ($status=~/did not match any location-class/m) + { + $diagwarn = "You may have forgotten to add a location \n" + . "class with \\GlsAddLocation or you may have \n" + . "the format incorrect.\n"; - close STATUS; } - if ($?) + if ($status=~/unknown attribute `pageglsnumberformat'/m) { - my $errno = $?; + $diagwarn .= "You may need to add 'compatible-2.07' package " + . "option.\n"; + } - if (open LOGFILE, ">>$trans") - { - print LOGFILE "\n$status"; - close LOGFILE; - } - else - { - print STDERR "Unable to open '$trans' $!\n"; - } + if ($diagwarn) + { + warn "\n**Warning:**\n\n", $diagwarn, "\n"; - if ($language) - { - die "Call to xindy failed (errno=$errno):\n", $status; - } - else - { - # If the language hasn't been set, then it may be - # because the document doesn't contain - # \printglossaries/\printglossary or it may be - # because the user has a customized style file that - # contains the language settings. - - die "Call to xindy failed (errno=$errno):\n", $status, - "\n\nNo language detected.", - "\nHave you remembered to use \\printglossary\n", - "or \\printglossaries in your document?\n\n"; - } + $warnings .= "\nmakeglossaries diagnostic messages:\n\n" + . $diagwarn; } + } - print $status; - + if ($retry or $warnings) + { if (open LOGFILE, ">>$trans") { print LOGFILE "\n$warnings"; @@ -731,7 +889,6 @@ sub xindy{ { print STDERR "Unable to open '$trans' $!\n"; } - } } @@ -747,6 +904,8 @@ sub HELP_MESSAGE{ print "-q\t\tQuiet mode\n"; print "-s \tEmploy as the style file\n"; print "-t \tEmploy as the transcript file\n"; + print "-n\tPrint the command that would normally be executed,\n", + "\tbut don't execute it\n"; print "\n Xindy Options:\n"; print "-L \tUse .\n"; diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index 43a001e0367..6de6f15c633 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -13,20 +13,21 @@ % -src "glossaries.sty\Z=>glossaries.sty" % -src "mfirstuc.sty\Z=>mfirstuc.sty" % -src "(glossary-.+)\.(sty)\Z=>\1.\2" +% -src "(glossaries-compatible-207)\.(sty)\Z=>\1.\2" % -src "(glossaries-accsupp)\.(sty)\Z=>\1.\2" % -src "(glossaries-babel)\.(sty)\Z=>\1.\2" % -src "(glossaries-polyglossia)\.(sty)\Z=>\1.\2" % -src "(glossaries-dictionary-.+)\.(dict)\Z=>\1.\2" % -src "(minimalgls\.tex)\Z=>\1" % -src "(sample.*\.tex)\Z=>\1" -% -src "(samplexdy-mc\.xdy)\Z=>\1" +% -src "(samplexdy-mc.*\.xdy)\Z=>\1" % -src "(database.*\.tex)\Z=>\1" % -src "(glossaries\.perl)\Z=>\1" % -doc "glossaries-manual.tex" % -author "Nicola Talbot" -% -codetitle "Glossaries Documented Code" +% -codetitle "Main Package Code" % glossaries -% Created on 2010/7/10 12:21 +% Created on 2011/4/3 22:26 %\fi %\iffalse %<*package> @@ -49,12 +50,17 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2010 Nicola Talbot, all rights reserved. +% Copyright (C) 2011 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> \documentclass{nlctdoc} +\iffalse +glossaries-manual.tex is a stub file used by makedtx to create +glossaries.dtx +\fi + \usepackage{alltt} \usepackage{pifont} \usepackage[utf8]{inputenc} @@ -69,12 +75,11 @@ \doxitem{Option}{option}{package options} \doxitem{GlsKey}{key}{glossary keys} \doxitem{Style}{style}{glossary styles} +\doxitem{Counter}{counter}{glossary counters} \setcounter{IndexColumns}{2} -\CheckSum{11106} - -\newcommand*{\tick}{\ding{51}} +\CheckSum{13110} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{first use\ifirstuse} @@ -102,8 +107,7 @@ %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{glossaries.sty v2.07: -% \LaTeXe\ Package to Assist Generating Glossaries} +% \title{Documented Code For glossaries v3.0} % \author{Nicola L.C. Talbot\\[10pt] %School of Computing Sciences\\ %University of East Anglia\\ @@ -111,9136 +115,5347 @@ %NR4 7TJ. United Kingdom.\\ %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % -% \date{2010-07-10} +% \date{2011-04-02} % \maketitle % -%This is the user manual for the \styfmt{glossaries} package. Other -%documents accompanying this manual: -%\begin{itemize} -%\item \qtdocref{The glossaries package: a guide for beginners}{glossariesbegin} -%\item \qtdocref{Upgrading from the glossary package to the -%glossaries package}{glossary2glossaries} -%\end{itemize} -%See the file \texttt{INSTALL} for installation instructions. -%Related web resources: -%\begin{itemize} -%\item -%\urlfootref{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html}{The glossaries FAQ} -% -%\item -%\urlfootref{http://www.latex-community.org/index.php?option=com_content&view=article&id=263&Itemid=114}{Glossaries, -%Nomenclature, Lists of Symbols and Acronyms } -%\end{itemize} -% -%\clearpage -%\tableofcontents -% -% \section{Introduction} -% -% \changes{1.0}{2007 May 16}{Initial version} -%The \styfmt{glossaries} package is provided to assist generating -%glossaries. It has a certain amount of flexibility, allowing the -%user to customize the format of the glossary and define multiple -%glossaries. It also supports acronyms and glossary styles that -%include symbols (in addition to a name and description) for glossary -%entries. There is provision for loading a database of glossary -%terms. Only those terms used\footnote{that is, if the term has been -%referenced using any of the commands described in -%\sectionref{sec:glslink}, \sectionref{sec:glsadd} or via -%\ics{glssee} (or the \gloskey{see} key)} in the document will be -%added to the glossary. -% -%\textbf{This package replaces the \sty{glossary} package which is -%now obsolete.} Please see the document \qtdocref{Upgrading from the -%glossary package to the glossaries package}{glossary2glossaries} for -%assistance in upgrading. -% -%One of the strengths of this package is its flexibility, however -%the drawback of this is the necessity of having a large manual -%that can cover all the various settings. If you are daunted by the -%size of the manual, try starting off with the much shorter -%\docref{guide for beginners}{glossariesbegin}. -% -%\begin{important} -%The \styfmt{glossaries} package comes with a -%\href{http://www.perl.org/about.html}{Perl} script called -%\app{makeglossaries}. This provides a convenient interface to -%\app{makeindex} or \app{xindy}. It is strongly recommended -%that you use this script, but \emph{it is not essential}. If you are -%reluctant to install Perl, or for any other reason you don't want to -%use \app{makeglossaries}, you can called \app{makeindex} or -%\app{xindy} explicitly. See \sectionref{sec:makeglossaries} for -%further details. -%\end{important} -% -%This manual is structured as follows: -%\begin{itemize} -%\item \sectionref{sec:overview} gives an overview of the main user -%commands and their syntax. -% -%\item \sectionref{sec:mfirstuc} describes the associated -%\styfmt{mfirstuc} package. -% -%\ifpdf -% \item \sectionref{sec:code} contains the documented source code for -% those who want to know more about how the package works. This -% describes more advanced commands, such as determining if an entry or -% a glossary exists and commands that iterate through defined terms or -% glossaries. -% -% \item \sectionref{sec:code:mfirstuc} contains the documented code for -% the \styfmt{mfirstuc} package. -%\fi -%\end{itemize} -%\ifpdf -%\else -% The \href{glossaries.pdf}{PDF version} of this manual also describes -% more advanced commands in the documented code section (such as -% determining if an entry or a glossary exists and commands that -% iterate through defined terms or glossaries). -%\fi -% -%\noindent The remainder of this introductory section covers the -%following: -%\begin{itemize} -%\item \sectionref{sec:samples} lists the sample documents provided -%with this package. -% -%\item \sectionref{sec:languages} provides information for users who -%wish to write in a language other than English. -% -%\item \sectionref{sec:makeglossaries} describes how to use a -%post-processor to create the sorted glossaries for your document. -% -%\item \sectionref{sec:trouble} provides some assistance in the event -%that you encounter a problem. -%\end{itemize} -% -% -%\subsection{Sample Documents} -%\label{sec:samples} -% -%The \styfmt{glossaries} package is provided with some sample -%documents that illustrate the various functions. These should -%be located in the \texttt{samples} subdirectory (folder) of the -%\styfmt{glossaries} documentation directory. This location varies -%according to your operating system and \TeX\ distribution. You -%can use \texttt{texdoc} to locate the main glossaries documentation. -%For example, in a terminal or command prompt, type: -%\begin{prompt} -%texdoc -l glossaries -%\end{prompt} -%This should display the full pathname of the file -%\texttt{glossaries.pdf}. View the contents of that directory and -%see if it contains the \texttt{samples} subdirectory. -% -%If you can't find the sample files, they are available in the -%subdirectory \texttt{doc/latex/glossaries/samples/} in the -%\texttt{glossaries.tds.zip} archive which can be downloaded from -%\href{http://tug.ctan.org/tex-archive/macros/latex/contrib/glossaries/}{CTAN}. -% -% -%The sample documents are as follows: +%This is the documented code for the \styfmt{glossaries} package. +%This bundle comes with the following documentation: %\begin{description} -%\item[minimalgls.tex]\label{ex:minimalgls} This document is a -%minimal working example. You can test your installation using this -%file. To create the complete document you will need to do the -%following steps: -% \begin{enumerate} -% \item Run \texttt{minimalgls.tex} through \LaTeX\ either by -% typing -%\begin{prompt} -%latex minimalgls -%\end{prompt} -% in a terminal or by using the relevant button or menu item in -% your text editor or front-end. This will create the required -% associated files but you will not see the glossary. If you use -% PDF\LaTeX\ you will also get warnings about non-existent -% references. These warnings may be ignored on the first run. -% -% If you get a \verb"Missing \begin{document}" error, then -% it's most likely that your version of \sty{xkeyval} is -% out of date. Check the log file for a warning of that nature. -% If this is the case, you will need to update the \styfmt{xkeyval} -% package. -% -% \item Run \app{makeglossaries} on the document. This can -% be done on a terminal either by typing -%\begin{prompt} -%makeglossaries minimalgls -%\end{prompt} -% or by typing -%\begin{prompt} -%perl makeglossaries minimalgls -%\end{prompt} -% If your system doesn't recognise the command \texttt{perl} then -% it's likely you don't have Perl installed. In which case you -% will need to use \app{makeindex} directly. You can do this -% in a terminal by typing (all on one line): -%\begin{prompt} -%makeindex -s minimalgls.ist -t minimalgls.glg -o minimalgls.gls minimalgls.glo -%\end{prompt} -% (See \sectionref{sec:makeindexapp} for further details on using -% \app{makeindex} explicitly.) -% -% Note that if you need to specify the full path and the path -% contains spaces, you will need to delimit the file names with -% the double-quote character. -% -% \item Run \texttt{minimalgls.tex} through \LaTeX\ again (as step~1) -% \end{enumerate} -%You should now have a complete document. The number following -%each entry in the glossary is the location number. By default, this -%is the page number where the entry was referenced. -% -%\item[sample4col.tex]\label{ex:sample4col} This document illustrates -%a four column glossary where the entries have a symbol in addition -%to the name and description. To create the complete document, you -%need to do: -%\begin{prompt} -%latex sample4col -%makeglossaries sample4col -%latex sample4col -%\end{prompt} -%As before, if you don't have Perl installed, you will need to use -%\app{makeindex} directly instead of using -%\app{makeglossaries}. The vertical gap between entries is the -%gap created at the start of each group. This can be suppressed by -%redefining \ics{glsgroupskip} after the glossary style has been set: -%\begin{verbatim} -%\renewcommand*{\glsgroupskip}{} -%\end{verbatim} +%\item[\url{glossariesbegin.pdf}] +%If you are a complete beginner, start with \qt{The glossaries +%package: a guide for beginners}. % -%\item[sampleAcr.tex]\label{ex:sampleAcr} This document has some -%sample acronyms. It also adds the glossary to the table of contents, -%so an extra run through \LaTeX\ is required to ensure the document -%is up to date: -%\begin{prompt} -%latex sampleAcr -%makeglossaries sampleAcr -%latex sampleAcr -%latex sampleAcr -%\end{prompt} -% -%\item[sampleAcrDesc.tex]\label{ex:sampleAcrDesc} This is similar to -%the previous example, except that the acronyms have an associated -%description. As with the previous example, the glossary is added to -%the table of contents, so an extra run through \LaTeX\ is required: -%\begin{prompt} -%latex sampleAcrDesc -%makeglossaries sampleAcrDesc -%latex sampleAcrDesc -%latex sampleAcrDesc -%\end{prompt} -% -%\item[sampleDesc.tex]\label{ex:sampleDesc} This is similar to the -%previous example, except that it defines the acronyms using -%\ics{newglossaryentry} instead of \ics{newacronym}. As with the -%previous example, the glossary is added to the table of contents, so -%an extra run through \LaTeX\ is required: -%\begin{prompt} -%latex sampleDesc -%makeglossaries sampleDesc -%latex sampleDesc -%latex sampleDesc -%\end{prompt} -% -%\item[sample-custom-acronym.tex]\label{ex:sample-custom-acronym} -%This document illustrates how to define your own acronym style if -%the predefined styles don't suit your requirements. -%\begin{prompt} -%latex sample-custom-acronym -%makeglossaries sample-custom-acronym -%latex sample-custom-acronym -%\end{prompt} -% -%\item[sampleDB.tex]\label{ex:sampleDB} This document illustrates how -%to load external files containing the glossary definitions. It also -%illustrates how to define a new glossary type. This document has the -%\term{number list} suppressed and uses \ics{glsaddall} to add all -%the entries to the glossaries without referencing each one -%explicitly. To create the document do: -%\begin{prompt} -%latex sampleDB -%makeglossaries sampleDB -%latex sampleDB -%\end{prompt} -%The glossary definitions are stored in the accompanying files -%\texttt{database1.tex} and \texttt{database2.tex}. Note that if you -%don't have Perl installed, you will need to use \app{makeindex} -%twice instead of a single call to \app{makeglossaries}: -%\begin{enumerate} -%\item Create the main glossary: -%\begin{prompt} -%makeindex -s sampleDB.ist -t sampleDB.glg -o sampleDB.gls sampleDB.glo -%\end{prompt} -%\item Create the secondary glossary: -%\begin{prompt} -%makeindex -s sampleDB.ist -t sampleDB.nlg -o sampleDB.not sampleDB.ntn -%\end{prompt} -%\end{enumerate} -% -%\item[sampleEq.tex]\label{ex:sampleEq} This document illustrates how -%to change the location to something other than the page number. In -%this case, the \texttt{equation} counter is used since all glossary -%entries appear inside an \env{equation} environment. To create -%the document do: -%\begin{prompt} -%latex sampleEq -%makeglossaries sampleEq -%latex sampleEq -%\end{prompt} -% -%\item[sampleEqPg.tex]\label{ex:sampleEqPg} This is similar to the -%previous example, but the number lists\iterm{number list} are a -%mixture of page numbers and equation numbers. This example adds the -%glossary to the table of contents, so an extra \LaTeX\ run is -%required: -%\begin{prompt} -%latex sampleEqPg -%makeglossaries sampleEqPg -%latex sampleEqPg -%latex sampleEqPg -%\end{prompt} -% -%\item[sampleSec.tex]\label{ex:sampleSec} This document also -%illustrates how to change the location to something other than the -%page number. In this case, the \texttt{section} counter is used. -%This example adds the glossary to the table of contents, so an extra -%\LaTeX\ run is required: -%\begin{prompt} -%latex sampleSec -%makeglossaries sampleSec -%latex sampleSec -%latex sampleSec -%\end{prompt} -% -%\item[sampleNtn.tex]\label{ex:sampleNtn} This document illustrates -%how to create an additional glossary type. This example adds the -%glossary to the table of contents, so an extra \LaTeX\ run is -%required: -%\begin{prompt} -%latex sampleNtn -%makeglossaries sampleNtn -%latex sampleNtn -%latex sampleNtn -%\end{prompt} -%Note that if you don't have Perl installed, you will need to use -%\app{makeindex} twice instead of a single call to -%\app{makeglossaries}: -%\begin{enumerate} -%\item Create the main glossary: -%\begin{prompt} -%makeindex -s sampleNtn.ist -t sampleNtn.glg -o sampleNtn.gls sampleNtn.glo -%\end{prompt} -%\item Create the secondary glossary: -%\begin{prompt} -%makeindex -s sampleNtn.ist -t sampleNtn.nlg -o sampleNtn.not sampleNtn.ntn -%\end{prompt} -%\end{enumerate} -% -%\item[sample.tex]\label{ex:sample} This document illustrates some of -%the basics, including how to create child entries that use the same -%name as the parent entry. This example adds the glossary to the -%table of contents, so an extra \LaTeX\ run is required: -%\begin{prompt} -%latex sample -%makeglossaries sample -%latex sample -%latex sample -%\end{prompt} -%You can see the difference between word and letter ordering if you -%substitute \pkgopt[word]{order} with \pkgopt[letter]{order}. (Note -%that this will only have an effect if you use -%\app{makeglossaries}. If you use \app{makeindex} explicitly, -%you will need to use the \texttt{-l} switch to indicate letter -%ordering.) -% -%\item[sampletree.tex]\label{ex:sampletree} This document illustrates -%a hierarchical glossary structure where child entries have different -%names to their corresponding parent entry. To create the document -%do: -%\begin{prompt} -%latex sampletree -%makeglossaries sampletree -%latex sampletree -%\end{prompt} -% -%\item[samplexdy.tex]\label{ex:samplexdy} This document illustrates -%how to use the \styfmt{glossaries} package with \app{xindy} instead -%of \app{makeindex}. The document uses UTF8 encoding (with the -%\sty{inputenc} package). The encoding is picked up by -%\app{makeglossaries}. By default, this document will create a -%\app{xindy} style file called \texttt{samplexdy.xdy}, but if you -%uncomment the lines -%\begin{verbatim} -%\setStyleFile{samplexdy-mc} -%\noist -%\GlsSetXdyLanguage{} -%\end{verbatim} -%it will set the style file to \texttt{samplexdy-mc.xdy} instead. -%This provides an additional letter group for entries starting with -%\qt{Mc} or \qt{Mac}. If you use \app{makeglossaries}, you don't -%need to supply any additional information. If you don't use -%\app{makeglossaries}, you will need to specify the required -%information. Note that if you set the style file to -%\texttt{samplexdy-mc.xdy} you must also specify \ics{noist}, -%otherwise the \styfmt{glossaries} package will overwrite -%\texttt{samplexdy-mc.xdy} and you will lose the \qt{Mc} letter -%group. -% -%To create the document do: -%\begin{prompt} -%latex samplexdy -%makeglossaries samplexdy -%latex samplexdy -%\end{prompt} -%If you don't have Perl installed, you will have to call -%\app{xindy} explicitly instead of using \app{makeglossaries}. -%If you are using the default style file \texttt{samplexdy.xdy}, then -%do (no line breaks): -%\begin{prompt} -%xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo -%\end{prompt} -%otherwise, if you are using \texttt{samplexdy-mc.xdy}, then do -%(no line breaks): -%\begin{prompt} -%xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo -%\end{prompt} -% -%\item[sampleutf8.tex]\label{ex:sampleutf8} This is another example -%that uses \app{xindy}. Unlike \app{makeindex}, -%\app{xindy} can cope with accented or non-Latin characters. This -%document uses UTF8 encoding. To create the document do: -%\begin{prompt} -%latex sampleutf8 -%makeglossaries sampleutf8 -%latex sampleutf8 -%\end{prompt} -%If you don't have Perl installed, you will have to call -%\app{xindy} explicitly instead of using \app{makeglossaries} -%(no line breaks): -%\begin{prompt} -%xindy -L english -C utf8 -I xindy -M sampleutf8 -t sampleutf8.glg -o sampleutf8.gls sampleutf8.glo -%\end{prompt} -% -%If you remove the \pkgopt{xindy} option from \texttt{sampleutf8.tex} -%and do: -%\begin{prompt} -%latex sampleutf8 -%makeglossaries sampleutf8 -%latex sampleutf8 -%\end{prompt} -%you will see that the entries that start with a non-Latin character -%now appear in the symbols group, and the word \qt{man\oe uvre} is now -%after \qt{manor} instead of before it. If you are unable to use -%\app{makeglossaries}, the call to \app{makeindex} is as -%follows (no line breaks): -%\begin{prompt} -%makeindex -s sampleutf8.ist -t sampleutf8.glg -o sampleutf8.gls sampleutf8.glo -%\end{prompt} -% -%\item[sampleaccsupp.tex]\label{ex:sampleaccsupp} This document -%uses the experimental \sty{glossaries-accsupp} package. The -%symbol is set to the replacement text. Note that some PDF -%viewers don't use the accessibility support. Information -%about the \styfmt{glossaries-accsupp} package can be found in -%\sectionref{sec:accsupp}. +%\item[\url{glossary2glossaries.pdf}] +%If you are moving over from the obsolete \sty{glossary} package, +%read \qt{Upgrading from the glossary package to the +%glossaries package}. % -%\end{description} +%\item[\url{glossaries-user.pdf}] +%For the main user guide, read \qt{glossaries.sty v3.0: +%\LaTeX2e\ Package to Assist Generating Glossaries}. % +%\item[\url{mfirstuc-manual.pdf}] +%The commands provided by the \sty{mfirstuc} package are briefly +%described in \qt{mfirstuc.sty: uppercasing first letter}. % -%\subsection{Multi-Lingual Support} -%\label{sec:languages} +%\item[glossaries.pdf] +%This document is for advanced users wishing to know more about the +%inner workings of the \styfmt{glossaries} package. % -%As from version 1.17, the \styfmt{glossaries} package can now be -%used with \app{xindy} as well as \app{makeindex}. If you -%are writing in a language that uses accented characters or -%non-Latin characters it is recommended that you use \app{xindy} -%as \app{makeindex} is hard-coded for Latin languages. This -%means that you are not restricted to the A, \ldots, Z letter groups. -%If you want to use \app{xindy}, remember to use the -%\pkgopt{xindy} package option. For example: -%\begin{verbatim} -%\documentclass[frenchb]{article} -%\usepackage[utf8]{inputenc} -%\usepackage[T1]{fontenc} -%\usepackage{babel} -%\usepackage[xindy]{glossaries} -%\end{verbatim} +%\item[INSTALL] Installation instructions. % -%\begin{important} -%If you use an accented or other expandable character at the start of -%an entry name, you must place it in a group, or it will cause -%a problem for commands that convert the first letter to uppercase -%(e.g.\ \ics{Gls}) due to expansion issues. For example: -%\begin{verbatim} -%\newglossaryentry{elite}{name={{é}lite}, -%description={select group or class}} -%\end{verbatim} -%\end{important} -% -%If you use the \sty{inputenc} package, \app{makeglossaries} -%will pick up the encoding from the auxiliary file. If you use -%\app{xindy} explicitly instead of via \app{makeglossaries}, -%you may need to specify the encoding using the \texttt{-C} -%option. Read the \app{xindy} manual for further details. -% -%\subsubsection{Changing the Fixed Names} -%\label{sec:fixednames} -% -%As from version 1.08, the \styfmt{glossaries} package now has -%limited multi-lingual support, thanks to all the people who have sent -%me the relevant translations either via email or via -%\texttt{comp.text.tex}. -%However you must load \sty{babel} or \sty{polyglossia} \emph{before} -%\styfmt{glossaries} to enable this. Note that if \sty{babel} is loaded -%and the \sty{translator} package is detected on \TeX's path, then the -%\sty{translator} package will be loaded automatically. However, -%it may not pick up on the required languages so, if the predefined -%text is not translated, you may need to explicitly load the -%\sty{translator} package with the required languages. For example: -%\begin{verbatim} -%\usepackage[spanish]{babel} -%\usepackage[spanish]{translator} -%\usepackage{glossaries} -%\end{verbatim} -%Alternatively, specify the language as a class option rather -%than a package option. For example: -%\begin{verbatim} -%\documentclass[spanish]{report} +%\item[CHANGES] Change log. % -%\usepackage{babel} -%\usepackage{glossaries} -%\end{verbatim} +%\item[README] Package summary. % -%If you want to use \sty{ngerman} or \sty{german} instead -%of \sty{babel}, you will need to include the \sty{translator} package -%to provide the translations. For example: -%\begin{verbatim} -%\documentclass[ngerman]{article} -%\usepackage{ngerman} -%\usepackage{translator} -%\usepackage{glossaries} -%\end{verbatim} +%\end{description} % -%The languages are currently supported by the -%\styfmt{glossaries} package are listed in -%\tableref{tab:supportedlanguages}. -% -%\begin{table}[htbp] -%\caption{Supported Languages} -%\label{tab:supportedlanguages} -%\begin{center} -%\begin{tabular}{lc} -%\bfseries Language & \bfseries As from version\\ -%Brazilian Portuguese & 1.17\\ -%Danish & 1.08\\ -%Dutch & 1.08\\ -%English & 1.08\\ -%French & 1.08\\ -%German & 1.08\\ -%Irish & 1.08\\ -%Italian & 1.08\\ -%Hungarian & 1.08\\ -%Polish & 1.13\\ -%Serbian & 2.06\\ -%Spanish & 1.08 -%\end{tabular} -%\end{center} -%\end{table} -% -%The language dependent commands and \sty{translator} keys used by the -%glossaries package are listed in \tableref{tab:predefinednames}. -% -%\begin{table}[htbp] -%\caption{Customised Text} -%\label{tab:predefinednames} -%\begin{center} -%\begin{tabular}{@{}llp{0.4\linewidth}@{}} -%\bfseries Command Name & \bfseries Translator Key Word & -%\bfseries Purpose\\ -%\ics{glossaryname} & \texttt{Glossary} & Title of the main glossary.\\ -%\ics{acronymname} & \texttt{Acronyms} & Title of the list of acronyms -%(when used with package option \pkgopt{acronym}).\\ -%\ics{entryname} & \texttt{Notation (glossaries)} & -%Header for first column in the glossary (for 2, 3 or 4 column glossaries -%that support headers).\\ -%\ics{descriptionname} & \texttt{Description (glossaries)} & -%Header for second column in the glossary (for 2, 3 or 4 column glossaries -%that support headers).\\ -%\ics{symbolname} & \texttt{Symbol (glossaries)} & Header for symbol -%column in the glossary for glossary styles that support this option.\\ -%\ics{pagelistname} & \texttt{Page List (glossaries)} & -%Header for page list column in the glossary for glossaries that support -%this option.\\ -%\ics{glssymbolsgroupname} & \texttt{Symbols (glossaries)} & -%Header for symbols section of the glossary for glossary styles that -%support this option.\\ -%\ics{glsnumbersgroupname} & \texttt{Numbers (glossaries)} & Header for -%numbers section of the glossary for glossary styles that support -%this option. -%\end{tabular} -%\end{center} -%\end{table} -% -%Due to the varied nature of glossaries, it's likely that the -%predefined translations may not be appropriate. If you are using the -%\sty{babel} package and do not have the \sty{translator} package -%installed, you need to be familiar with the advice given in -%\urlref{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords}{changing -%the words babel uses}. If you have the \sty{translator} package -%installed, then you can provide your own dictionary with the -%necessary modifications (using \cs{deftranslation}) and load it -%using \cs{usedictionary}. Note that the dictionaries are loaded at -%the beginning of the document, so it won't have any effect if you -%put \cs{deftranslation} in the preamble. It should be put in your -%personal dictionary instead. See the \sty{translator} documentation -%for further details. -% -%If you are using \sty{babel} and don't want to use the -%\sty{translator} interface, you can suppress it using the package -%option \pkgopt[false]{translate}, and either load -%\sty{glossaries-babel} after \styfmt{glossaries} or specify you're own -%translations. For example: -%\begin{verbatim} -%\documentclass[british]{article} +%\clearpage +%\tableofcontents % -%\usepackage{babel} -%\usepackage[translate=false]{glossaries} -%\usepackage{glossaries-babel} -%\end{verbatim} -%or: -%\begin{verbatim} -%\documentclass[british]{article} -% -%\usepackage{babel} -%\usepackage[translate=false]{glossaries} -% -%\addto\captionsbritish{% -% \renewcommand*{\glossaryname}{List of Terms}% -% \renewcommand*{\acronymname}{List of Acronyms}% -% \renewcommand*{\entryname}{Notation}% -% \renewcommand*{\descriptionname}{Description}% -% \renewcommand*{\symbolname}{Symbol}% -% \renewcommand*{\pagelistname}{Page List}% -% \renewcommand*{\glssymbolsgroupname}{Symbols}% -% \renewcommand*{\glsnumbersgroupname}{Numbers}% +%\StopEventually{% +% \clearpage\phantomsection +% \addcontentsline{toc}{section}{Index}\PrintIndex +% %} -%\end{verbatim} -% -%If you are using \sty{polyglossia} instead of \sty{babel}, -%\sty{glossaries-polyglossia} will automatically be loaded unless -%you specify the package option \pkgopt[false]{translate}. -% -%Note that \app{xindy} provides much better multi-lingual support -%than \app{makeindex}, so it's recommended that you use \app{xindy} -%if you have glossary entries that contain diacritics or -%non-Roman letters. See \sectionref{sec:xindy} for further -%details. -% -%\subsection{Generating the Associated Glossary Files} -%\label{sec:makeglossaries} -% -%In order to generate a sorted glossary with compact location lists, -%it is necessary to use an external indexing application as an -%intermediate step. It is this application that creates the file -%containing the code that typesets the glossary. If this step is -%omitted, the glossaries will not appear in your document. The two -%indexing applications that are most commonly used with \LaTeX\ are -%\app{makeindex} and \app{xindy}. As from version 1.17, the -%\styfmt{glossaries} package can be used with either of these -%applications. Previous versions were designed to be used with -%\app{makeindex} only. Note that \app{xindy} has much better -%multi-lingual support than \app{makeindex}, so \app{xindy} is -%recommended if you're not writing in English. Commands that only -%have an effect when \app{xindy} is used are described in -%\sectionref{sec:xindy}. -% -% -%The \styfmt{glossaries} package comes with the Perl script -%\app{makeglossaries} which will run \app{makeindex} or \app{xindy} -%on all the glossary files using a customized style file (which is -%created by \ics{makeglossaries}). See -%\sectionref{sec:makeglossariesapp} for further -%details. Perl is stable, cross-platform, open source software that -%is used by a number of \TeX-related applications. Further -%information is available at \url{http://www.perl.org/about.html}. -%However, whilst it is strongly recommended that you use the -%\app{makeglossaries} script, it is possible to use the -%\styfmt{glossaries} package without having Perl installed. In which -%case, if you have used the \pkgopt{xindy} package option, you will -%need to use \app{xindy} (see \sectionref{sec:xindyapp}), otherwise -%you will need to use \app{makeindex} (see -%\sectionref{sec:makeindexapp}). Note that some commands and package -%options have no effect if you don't use \app{makeglossaries}. These -%are listed in \tableref{tab:makeglossariesCmds}. -% -%Note that if any of your entries use an entry -%that is not referenced outside the glossary, you will need to -%do an additional \app{makeglossaries}, \app{makeindex} -%or \app{xindy} run, as appropriate. For example, -%suppose you have defined the following entries: -%\begin{verbatim} -%\newglossaryentry{citrusfruit}{name={citrus fruit}, -%description={fruit of any citrus tree. (See also -%\gls{orange})}} -% -%\newglossaryentry{orange}{name={orange}, -%description={an orange coloured fruit.}} -%\end{verbatim} -%and suppose you have \verb|\gls{citrusfruit}| in your document -%but don't reference the \texttt{orange} entry, then the -%\texttt{orange} entry won't appear in your glossary until -%you first create the glossary and then do another run -%of \app{makeglossaries}, \app{makeindex} or \app{xindy}. -%For example, if the document is called \texttt{myDoc.tex}, then -%you must do: -%\begin{prompt} -%latex myDoc -%makeglossaries myDoc -%latex myDoc -%makeglossaries myDoc -%latex myDoc -%\end{prompt} -% -%Likewise, an additional \app{makeglossaries} and \LaTeX\ run -%may be required if the document pages shift with re-runs. For -%example, if the page numbering is not reset after the table of -%contents, the insertion of the table of contents on the second -%\LaTeX\ run may push glossary entries across page boundaries, which -%means that the number lists\iterm{number list} in the glossary may -%need updating. -% -%The examples in this document assume that you are accessing -%\app{makeglossaries}, \app{xindy} or \app{makeindex} via a terminal. -%Windows users can use the MSDOS Prompt which is usually accessed via -%the \menu{Start}\submenu{All Programs} menu or -%\menu{Start}\submenu{All Programs}\submenu{Accessories} menu. -% -%Alternatively, your text editor may have the facility to create a -%function that will call the required application. The article -%\href{http://www.latex-community.org/index.php?option=com_content&view=article\&id=263:glossaries-nomenclature-lists-of-symbols-and-acronyms&catid=55:latex-general&Itemid=114}{\qt{Glossaries, Nomenclature, List of Symbols and -%Acronyms}} -%in the \urlfootref{http://www.latex-community.org/}{\LaTeX\ -%Community's} Know How section -%describes how to do this for TeXnicCenter, and the thread -%\href{http://groups.google.com/group/comp.text.tex/browse_thread/thread/edd83831b81b0759?hl=en}{\qt{Executing Glossaries' makeindex from a WinEdt -%macro}} on the \texttt{comp.text.tex} newsgroup -%describes how to do it for WinEdt. For other editors see the editor's -%user manual for further details. -% -%If any problems occur, remember to check the transcript files -%(e.g.\ \filetype{.glg} or \filetype{.alg}) for messages. -% -%\begin{table}[htbp] -%\caption{Commands and package options that have no effect when -%using \texttt{xindy} or \texttt{makeindex} explicitly} -%\label{tab:makeglossariesCmds} -%\vskip\baselineskip -%\begin{tabular}{@{}lll@{}} -%\bfseries Command or Package Option & \app{makeindex} & -%\app{xindy}\\ -%\pkgopt[letter]{order} & use \texttt{-l} & -% use \texttt{-M ord/letorder}\\ -%\pkgopt[word]{order} & default & default\\ -%\pkgopt{xindy}=\{\pkgoptfmt{language=}\meta{lang}\pkgoptfmt{,codename=}\meta{code}\} & -%N/A & use \texttt{-L} \meta{lang} \texttt{-C} \meta{code}\\ -%\ics{GlsSetXdyLanguage}\marg{lang} & N/A & -%use \texttt{-L} \meta{lang}\\ -%\ics{GlsSetXdyCodePage}\marg{code} & N/A & -%use \texttt{-C} \meta{code} -%\end{tabular} -%\par -%\end{table} -% -% -%\subsubsection{Using the makeglossaries Perl Script} -%\label{sec:makeglossariesapp} -% -%The \app{makeglossaries} script picks up the relevant information -%from the auxiliary (\filetype{.aux}) file and will either call -%\app{xindy} or \app{makeindex}, depending on the supplied -%information. Therefore, you only need to pass the document's name -%without the extension to \app{makeglossaries}. For example, if your -%document is called \texttt{myDoc.tex}, type the following in your -%terminal: -%\begin{prompt} -%latex myDoc -%makeglossaries myDoc -%latex myDoc -%\end{prompt} -%You may need to explicitly load \app{makeglossaries} into Perl: -%\begin{prompt} -%perl makeglossaries myDoc -%\end{prompt} -%There is a batch file called \texttt{makeglossaries.bat} which does -%this for Windows users, but you must have Perl installed to be able -%to use it. -% -%The \app{makeglossaries} script contains POD (Plain Old -%Documentation). If you want, you can create a man page for -%\app{makeglossaries} using \app{pod2man} and move the -%resulting file onto the man path. -% -% -%\subsubsection{Using xindy explicitly} -%\label{sec:xindyapp} -% -%If you want to use \app{xindy} to process the glossary -%files, you must make sure you have used the -%\pkgopt{xindy} package option: -%\begin{verbatim} -%\usepackage[xindy]{glossaries} -%\end{verbatim} -%This is required regardless of whether you use \app{xindy} -%explicitly or whether it's called implicitly via -%\app{makeglossaries}. This causes the glossary -%entries to be written in raw \app{xindy} format, so you need to -%use \texttt{-I xindy} \emph{not} \texttt{-I tex}. -% -%To run \app{xindy} type the following in your terminal -%(all on one line): -%\begin{prompt} -%xindy -L \meta{language} -C \meta{encoding} -I xindy -M \meta{style} -t \meta{base}.glg -o \meta{base}.gls \meta{base}.glo -%\end{prompt} -%where \meta{language} is the required language name, \meta{encoding} -%is the encoding, \meta{base} is the name of the document without the -%\filetype{.tex} extension and \meta{style} is the name of the -%\app{xindy} style file without the \filetype{.xdy} extension. -%The default name for this style file is \meta{base}\filetype{.xdy} -%but can be changed via \ics{setStyleFile}\marg{style}. You may need -%to specify the full path name depending on the current working -%directory. If any of the file names contain spaces, you must delimit -%them using double-quotes. -% -%For example, if your document is called \texttt{myDoc.tex} and -%you are using UTF8 encoding in English, then type the -%following in your terminal: -%\begin{prompt} -%xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.glg -o myDoc.gls myDoc.glo -%\end{prompt} -% -%Note that this just creates the main glossary. You need to do -%the same for each of the other glossaries (including the -%list of acronyms if you have used the \pkgopt{acronym} -%package option), substituting \filetype{.glg}, \filetype{.gls} -%and \filetype{.glo} with the relevant extensions. For example, -%if you have used the \pkgopt{acronym} package option, then -%you would need to do: -%\begin{prompt} -%xindy -L english -C utf8 -I xindy -M myDoc -t myDoc.alg -o myDoc.acr myDoc.acn -%\end{prompt} -%For additional glossaries, the extensions are those supplied -%when you created the glossary with \ics{newglossary}. -% -%Note that if you use \app{makeglossaries} instead, you can -%replace all those calls to \app{xindy} with just one call -%to \app{makeglossaries}: -%\begin{prompt} -%makeglossaries myDoc -%\end{prompt} -%Note also that some commands and package options have no effect if -%you use \app{xindy} explicitly instead of using -%\app{makeglossaries}. These are listed in -%\tableref{tab:makeglossariesCmds}. -% -% -%\subsubsection{Using makeindex explicitly} -%\label{sec:makeindexapp} -% -%If you want to use \app{makeindex} explicitly, you must -%make sure that you haven't used the \pkgopt{xindy} package -%option or the glossary entries will be written in the wrong -%format. To run \app{makeindex}, type the following in -%your terminal: -%\begin{prompt} -%makeindex -s \meta{style}.ist -t \meta{base}.glg -o \meta{base}.gls \meta{base}.glo -%\end{prompt} -%where \meta{base} is the name of your document without the -%\filetype{.tex} extension and \meta{style}\filetype{.ist} is the -%name of the \app{makeindex} style file. By default, this is -%\meta{base}\filetype{.ist}, but may be changed via -%\ics{setStyleFile}\marg{style}. Note that there are other options, -%such as \texttt{-l} (letter ordering). See the \app{makeindex} -%manual for further details. -% -%For example, if your document is called \texttt{myDoc.tex}, then -%type the following at the terminal: -%\begin{prompt} -%makeindex -s myDoc.ist -t myDoc.glg -o myDoc.gls myDoc.glo -%\end{prompt} -%Note that this only creates the main glossary. If you have -%additional glossaries (for example, if you have used the -%\pkgopt{acronym} package option) then you must call -%\app{makeindex} for each glossary, substituting -%\filetype{.glg}, \filetype{.gls} and \filetype{.glo} with the -%relevant extensions. For example, if you have used the -%\pkgopt{acronym} package option, then you need to type the -%following in your terminal: -%\begin{prompt} -%makeindex -s myDoc.ist -t myDoc.alg -o myDoc.acr myDoc.acn -%\end{prompt} -%For additional glossaries, the extensions are those supplied -%when you created the glossary with \ics{newglossary}. -% -%Note that if you use \app{makeglossaries} instead, you can -%replace all those calls to \app{makeindex} with just one call -%to \app{makeglossaries}: -%\begin{prompt} -%makeglossaries myDoc -%\end{prompt} -%Note also that some commands and package options have no effect if -%you use \app{makeindex} explicitly instead of using -%\app{makeglossaries}. These are listed in -%\tableref{tab:makeglossariesCmds}. -% -% -%\subsubsection{Note to Front-End and Script Developers} -% -%The information needed to determine whether to use \app{xindy} -%or \app{makeindex} and the information needed to call those -%applications is stored in the auxiliary file. This information can -%be gathered by a front-end, editor or script to make the glossaries -%where appropriate. This section describes how the information is -%stored in the auxiliary file. -% -%The file extensions used by each defined glossary are given by -%\begin{definition}[\DescribeMacro{\@newglossary}] -%\cs{@newglossary}\marg{label}\marg{log}\marg{out-ext}\marg{in-ext} -%\end{definition} -%where \meta{in-ext} is the extension of the \emph{indexing -%application's} input file (the output file from the \styfmt{glossaries} -%package's point of view), \meta{out-ext} is the extension of the -%\emph{indexing application's} output file (the input file from -%the \styfmt{glossaries} package's point of view) and \meta{log} is the -%extension of the indexing application's transcript file. The label -%for the glossary is also given for information purposes only, but -%is not required by the indexing applications. For example, the -%information for the main glossary is written as: -%\begin{verbatim} -%\@newglossary{main}{glg}{gls}{glo} -%\end{verbatim} -% -%The indexing application's style file is specified by -%\begin{definition}[\DescribeMacro{\@istfilename}] -%\cs{@istfilename}\marg{filename} -%\end{definition} -%The file extension indicates whether to use \app{makeindex} -%(\filetype{.ist}) or \app{xindy} (\filetype{.xdy}). Note that -%the glossary information is formatted differently depending on -%which indexing application is supposed to be used, so it's -%important to call the correct one. -% -%Word or letter ordering is specified by: -%\begin{definition}[\DescribeMacro{\@glsorder}] -%\cs{@glsorder}\marg{order} -%\end{definition} -%where \meta{order} can be either \texttt{word} or \texttt{letter}. -% -%If \app{xindy} should be used, the language and code page -%for each glossary is specified by -%\begin{definition}[\DescribeMacro{\@xdylanguage}\DescribeMacro{\@gls@codepage}] -%\cs{@xdylanguage}\marg{label}\marg{language}\\ -%\cs{@gls@codepage}\marg{label}\marg{code} -%\end{definition} -%where \meta{label} identifies the glossary, \meta{language} is -%the root language (e.g.\ \texttt{english}) and \meta{code} -%is the encoding (e.g.\ \texttt{utf8}). These commands are omitted -%if \app{makeindex} should be used. -% -% -%\subsection{Troubleshooting} -%\label{sec:trouble} -% -%The \styfmt{glossaries} package comes with a minimal file called -%\texttt{minimalgls.tex} which can be used for testing. This -%should be located in the \texttt{samples} subdirectory (folder) -%of the \styfmt{glossaries} documentation directory. The location -%varies according to your operating system and \TeX\ installation. -%For example, on my Linux partition it can be found in -%\texttt{/usr/local/texlive/2008/texmf-dist/doc/latex/glossaries/}. -%Further information on debugging \LaTeX\ code is available at -%\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/}. -% -%Below is a list of the most frequently asked questions. For -%other queries, consult the \styfmt{glossaries} FAQ at -%\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html}. -% -%\begin{enumerate} -%\item \textbf{Q.} I get the error message: -%\begin{verbatim} -%Missing \begin{document} -%\end{verbatim} -% -%\textbf{A.} Check you are using an up to date version of the \sty{xkeyval} -%package. -% -%\item \textbf{Q.} I've used the \pkgopt{smallcaps} option, but the acronyms -%are displayed in normal sized upper case letters. -% -%\textbf{A.} The \pkgopt{smallcaps} package option uses \cs{textsc} to typeset -%the acronyms. This command converts lower case letters to small -%capitals, while upper case letters remain their usual size. Therefore -%you need to specify the acronym in lower case letters. % -%\item \textbf{Q.} My acronyms won't break across a line when they're -%expanded. % -%\textbf{A.} PDF\LaTeX\ can break hyperlinks across a line, but -%\LaTeX\ can't. If you can't use PDF\LaTeX\ then disable the first use -%links using the package option \pkgopt[false]{hyperfirst}. % -%\item \textbf{Q.} How do I change the font that the acronyms are displayed in? -% -%\textbf{A.} The easiest way to do this is to specify the \pkgopt{smaller} package -%option and redefine \cs{acronymfont} to use the required typesetting -%command. For example, suppose you would like the acronyms displayed in -%a sans-serif font, then you can do: -%\begin{verbatim} -%\usepackage[smaller]{glossaries} -%\renewcommand*{\acronymfont}[1]{\textsf{#1}} -%\end{verbatim} -% -%\item \textbf{Q.} How do I change the font that the acronyms are displayed in -%on \firstuse? +%\section{Main Package Code} +%\iffalse +% \begin{macrocode} +%<*glossaries.sty> +% \end{macrocode} +%\fi +%\label{sec:code} +% \subsection{Package Definition} +% This package requires \LaTeXe. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries}[2011/04/02 v3.0 (NLCT)] +% \end{macrocode} +% Required packages: +% \begin{macrocode} +\RequirePackage{ifthen} +\RequirePackage{xkeyval}[2006/11/18] +\RequirePackage{mfirstuc} +\RequirePackage{xfor} +% \end{macrocode} +%\changes{1.1}{2008 Feb 22}{amsgen now loaded (\cs{new@ifnextchar} needed)} +% Need to use \cs{new@ifnextchar} instead of \cs{@ifnextchar} in +% commands that have a final optional argument (such as \ics{gls}) +% so require \isty{amsgen}. +% Thanks to Morten~H\o gholm for suggesting this. (This has +% replaced using the \sty{xspace} package.) +% \begin{macrocode} +\RequirePackage{amsgen} +% \end{macrocode} +%\changes{3.0}{2011/04/02}{etoolbox now loaded} +% As from v3.0, now loading \sty{etoolbox}: +% \begin{macrocode} +\RequirePackage{etoolbox} +% \end{macrocode} % -%\textbf{A.} The easiest way to do this is to specify the \pkgopt{smaller} package -%option and redefine \cs{firstacronymfont} to use the required -%command. Note that if you don't want the acronym on subsequent use -%to use \cs{textsmaller}, you will also need to redefine \cs{acronymfont}, -%as above. For example to make the acronym emphasized on -%\firstuse, but use the surrounding font for subsequent use, you can do: -%\begin{verbatim} -%\usepackage[smaller]{glossaries} -%\renewcommand*{\firstacronymfont}[1]{\emph{#1}} -%\renewcommand*{\acronymfont}[1]{#1} -%\end{verbatim} +% \subsection{Package Options}\label{sec:pkgopt} +%\begin{option}{toc} +% The \pkgopt{toc} package option will add the glossaries +% to the table of contents. This is a boolean key, if the +% value is omitted it is taken to be true. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{toc}[true]{} +% \end{macrocode} +%\end{option} +%\begin{option}{numberline} +%\changes{1.1}{2008 Feb 22}{numberline option added} +% The \pkgopt{numberline} package option adds \cs{numberline} to +% \cs{addcontentsline}. Note that this option only has an effect +% if used in with \pkgopt[true]{toc}. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{numberline}[true]{} +% \end{macrocode} +%\end{option} % -%\item \textbf{Q.} I don't have Perl installed, do I have to use -%\app{makeglossaries}? +%\begin{macro}{\@@glossarysec} +% The sectional unit used to start the glossary is stored in +% \cs{@@glossarysec}. If chapters are defined, this +% is initialised to \texttt{chapter}, otherwise it is +% initialised to \texttt{section}. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} +% \begin{macrocode} +\ifcsundef{chapter}% + {\newcommand*{\@@glossarysec}{section}}% + {\newcommand*{\@@glossarysec}{chapter}} +% \end{macrocode} +%\end{macro} % -%\textbf{A.} Although it is strongly recommended that you use -%\app{makeglossaries}, you don't have to use it. For further details, -%read \sectionref{sec:xindyapp} or \sectionref{sec:makeindexapp}, -%depending on whether you want to use \app{xindy} or \app{makeindex}. +%\begin{option}{section} +% The \pkgopt{section} key can be used to set the sectional unit. +% If no unit is specified, use \texttt{section} as the default. +% The starred form of the named sectional unit will be used. +% If you want some other way to start the glossary section (e.g.\ +% a numbered section) you will have to redefined +% \ics{glossarysection}. +% \begin{macrocode} +\define@choicekey{glossaries.sty}{section}{part,chapter,section,% +subsection,subsubsection,paragraph,subparagraph}[section]{% + \renewcommand*{\@@glossarysec}{#1}} +% \end{macrocode} +%\end{option} % -%\item \textbf{Q.} I'm used to using the \styfmt{glossary} package: are there any -%instructions on migrating from the \sty{glossary} package to the -%\styfmt{glossaries} package? +% Determine whether or not to use numbered sections. +%\begin{macro}{\@@glossarysecstar} +% \begin{macrocode} +\newcommand*{\@@glossarysecstar}{*} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@glossaryseclabel} +% \begin{macrocode} +\newcommand*{\@@glossaryseclabel}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsautoprefix} +% Prefix to add before label if automatically generated: +%\changes{1.14}{2008 June 17}{new} +% \begin{macrocode} +\newcommand*{\glsautoprefix}{} +% \end{macrocode} +%\end{macro} +%\begin{option}{numberedsection} +%\changes{1.1}{2008 Feb 22}{numberedsection package option added} +% \begin{macrocode} +\define@choicekey{glossaries.sty}{numberedsection}[\val\nr]{% +false,nolabel,autolabel}[nolabel]{% + \ifcase\nr\relax + \renewcommand*{\@@glossarysecstar}{*}% + \renewcommand*{\@@glossaryseclabel}{}% + \or + \renewcommand*{\@@glossarysecstar}{}% + \renewcommand*{\@@glossaryseclabel}{}% + \or + \renewcommand*{\@@glossarysecstar}{}% + \renewcommand*{\@@glossaryseclabel}{% + \label{\glsautoprefix\@glo@type}}% + \fi +} +% \end{macrocode} +%\end{option} % -%\textbf{A.} Read \qtdocref{Upgrading from the glossary package to -%the glossaries package}{glossary2glossaries} which should be -%available from the same location as this document. +% The default glossary style is stored in +% \cs{@glossary@default@style}. This is initialised to +% \texttt{list}. (The \glostyle{list} style is +% defined in the accompanying \isty{glossary-list} package +% described in \autoref{sec:code:styles}.) +%\begin{macro}{\@glossary@default@style} +% \begin{macrocode} +\newcommand*{\@glossary@default@style}{list} +% \end{macrocode} +%\end{macro} % -%\item \textbf{Q.} I'm using \sty{babel} but the fixed names haven't -%been translated. +%\begin{option}{style} +% The default glossary style can be changed using the \pkgopt{style} +% package option. The value can be the name of any +% defined glossary style. The glossary style is set at the beginning +% of the document, so you can still use the \pkgopt{style} key to +% set a style that is defined in another package. This package comes +% with some predefined styles that are defined in +% \autoref{sec:code:styles}. +% \begin{macrocode} +\define@key{glossaries.sty}{style}{% +\renewcommand*{\@glossary@default@style}{#1}} +% \end{macrocode} +%\end{option} % -%\textbf{A.} The \styfmt{glossaries} package currently only supports -%the following languages: Brazilian Portuguese, Danish, Dutch, -%English, French, German, Irish, Italian, Hungarian, Polish, Serbian and -%Spanish. If you want to add another language, send me the -%translations, and I'll add them to the next version. +% Each entry within a given glossary will have an associated +% number list. By default, this refers to the page numbers on +% which that entry has been used, but it can also refer to any counter +% used in the document (such as the section or equation counters). +% The default number list format displays the number list ``as is'': +%\begin{macro}{\glossaryentrynumbers} +% \begin{macrocode} +\newcommand*{\glossaryentrynumbers}[1]{#1} +% \end{macrocode} +%\end{macro} +%\begin{option}{nonumberlist} +% Note that the entire number list for a given entry will be +% passed to \cs{glossaryentrynumbers} so any font changes +% will also be applied to the delimiters. +% The \pkgopt{nonumberlist} package option suppresses the +% number lists (this simply redefines +% \cs{glossaryentrynumbers} to ignores its argument). +% \begin{macrocode} +\DeclareOptionX{nonumberlist}{% +\renewcommand*{\glossaryentrynumbers}[1]{}} +% \end{macrocode} +%\end{option} % -%If you are using one of the above languages, but the text hasn't been -%translated, try adding the \sty{translator} package with the -%required languages explicitly (before you load the \styfmt{glossaries} -%package). For example: -%\begin{verbatim} -%\usepackage[ngerman]{babel} -%\usepackage[ngerman]{translator} -%\usepackage{glossaries} -%\end{verbatim} -%Alternatively, you can add the language as a global option -%to the class file. Check the \styfmt{translator} package documentation -%for further details. +%\begin{macro}{\@glo@seeautonumberlist} +% \begin{macrocode} +\newcommand*\@glo@seeautonumberlist{} +% \end{macrocode} +%\end{macro} % -%\item \textbf{Q.} My acronyms contain strange characters when I use commands -%like \ics{acrlong}. +%\begin{option}{seeautonumberlist} +% Automatically activates number list for entries containing the +% \gloskey{see} key. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\DeclareOptionX{seeautonumberlist}{% + \renewcommand*{\@glo@seeautonumberlist}{% + \def\@glo@prefix{\glsnextpages}% + }% +} +% \end{macrocode} +%\end{option} +%\begin{macro}{\@gls@loadlong} +%\changes{1.18}{2009 January 14}{new} +% \begin{macrocode} +\newcommand*{\@gls@loadlong}{\RequirePackage{glossary-long}} +% \end{macrocode} +%\end{macro} +%\begin{option}{nolong} +%\changes{1.18}{2009 January 14}{new} +% This option prevents \isty{glossary-long} from being loaded. +% This means that the glossary styles that use the +% \env{longtable} environment will not be available. This option +% is provided to reduce overhead caused by loading unrequired +% packages. +% \begin{macrocode} +\DeclareOptionX{nolong}{\renewcommand*{\@gls@loadlong}{}} +% \end{macrocode} +%\end{option} % -%\textbf{A.} Switch off the sanitization: -%\begin{verbatim} -%\usepackage[sanitize=none]{glossaries} -%\end{verbatim} -%and protect fragile commands. -% -%\item \textbf{Q.} My glossaries haven't appeared. -% -%\textbf{A.} Remember to do the following: -%\begin{itemize} -%\item Add \ics{makeglossaries} to the document preamble. -% -%\item Use either \ics{printglossary} for each glossary that has -%been defined or \ics{printglossaries}. -% -%\item Use the commands listed in \sectionref{sec:glslink}, -%\sectionref{sec:glsadd} or \sectionref{sec:crossref} for each entry -%that you want to appear in the glossary. -% -%\item Run \LaTeX\ on your document, then run \app{makeglossaries}, -%then run \LaTeX\ on your document again. If you want the glossaries -%to appear in the table of contents, you will need an extra \LaTeX\ -%run. If any of your entries cross-reference an entry that's not -%referenced in the main body of the document, you will need to run -%\app{makeglossaries} (see \sectionref{sec:makeglossaries}) after the -%second \LaTeX\ run, followed by another \LaTeX\ run. -%\end{itemize} -% -%Check the log files (\filetype{.log}, \filetype{.glg} etc) for any -%warnings. -% -%\item \textbf{Q.} It is possible to change the rules used to sort -%the glossary entries? -% -%\textbf{A.} If it's for an individual entry, then you can use the -%entry's \gloskey{sort} key to sort it according to a different term. -%If it's for the entire alphabet, then you will need to use -%\app{xindy} (instead of \app{makeindex}) and use an appropriate -%\app{xindy} language module. Writing \app{xindy} modules or styles -%is beyond the scope of this manual. Further information about -%\app{xindy} can be found at the -%\urlfootref{http://xindy.sourceforge.net/}{Xindy Web Site}. There is -%also a link to the \app{xindy} mailing list from that site. -% -%\end{enumerate} -% -% -%\section{Overview of Main User Commands}\label{sec:overview} -% \changes{1.02}{2007 May 25}{added overview section} -% -%This section is an overview of the main user commands and package -%options. If you find this too complicated, try starting out with the -%\docref{guide for beginners}{glossariesbegin}. -% -%\subsection{Package Options} -%\label{sec:pkgopts} -% -%The \styfmt{glossaries} package options are as follows: -%\begin{description} -%\item[\pkgopt{nowarn}] This suppresses all warnings generated by -%the \styfmt{glossaries} package. -% -%\item[\pkgopt{nomain}] This suppresses the creation of the main -%glossary. Note that if you use this option, you must create another -%glossary in which to put all your entries (either via the -%\pkgopt{acronym} package option described below or via -%\ics{newglossary} described in \sectionref{sec:newglossary}). -% -%\item[\pkgopt{toc}] Add the glossaries to the table of contents. -%Note that an extra \LaTeX\ run is required with this option. -%Alternatively, you can switch this function on and off using -%\begin{definition}[\DescribeMacro{\glstoctrue}] -%\cs{glstoctrue} -%\end{definition} -%and -%\begin{definition}[\DescribeMacro{\glstocfalse}] -%\cs{glstocfalse} -%\end{definition} -% -%\item[\pkgopt{numberline}] When used with \pkgopt{toc}, this will -%add \cs{numberline}\verb|{}| in the final argument of -%\cs{addcontentsline}. This will align the table of contents entry -%with the numbered section titles. Note that this option has no -%effect if the \pkgopt{toc} option is omitted. If \pkgopt{toc} is -%used without \pkgopt{numberline}, the title will be aligned with -%the section numbers rather than the section titles. +%\begin{macro}{\@gls@loadsuper} +%\changes{1.18}{2009 January 14}{new} +% The \isty{glossary-super} package isn't loaded if +% \isty{supertabular} isn't installed. +% \begin{macrocode} +\IfFileExists{supertabular.sty}{% + \newcommand*{\@gls@loadsuper}{\RequirePackage{glossary-super}}}{% + \newcommand*{\@gls@loadsuper}{}} +% \end{macrocode} +%\end{macro} +%\begin{option}{nosuper} +%\changes{1.18}{2009 January 14}{new} +% This option prevents \isty{glossary-super} from being loaded. +% This means that the glossary styles that use the +% \env{supertabular} environment will not be available. This option +% is provided to reduce overhead caused by loading unrequired +% packages. +% \begin{macrocode} +\DeclareOptionX{nosuper}{\renewcommand*{\@gls@loadsuper}{}} +% \end{macrocode} +%\end{option} % -%\item[\pkgopt{acronym}] This creates a new glossary with the -%label \texttt{acronym}. This is equivalent to: -%\begin{verbatim} -%\newglossary[alg]{acronym}{acr}{acn}{\acronymname} -%\end{verbatim} -%If the \pkgopt{acronym} package option is used, \ics{acronymtype} -%is set to \texttt{acronym} otherwise it is set to -%\texttt{main}.\footnote{Actually it sets \ics{acronymtype} to -%\ics{glsdefaulttype} if the \pkgopt{acronym} package option is -%not used, but \ics{glsdefaulttype} usually has the value -%\texttt{main}.} -%Entries that are defined using \ics{newacronym} are placed in -%the glossary whose label is given by \ics{acronymtype}, unless -%another glossary is explicitly specified. -% -%\item[\pkgopt{acronymlists}] By default, only the \texttt{acronym} -%glossary is considered to be a list of acronyms. If you have other -%lists of acronyms, you can specify them as a comma-separated list -%in the value of \pkgopt{acronymlists}. For example, if you want -%the \texttt{main} glossary to also contain a list of acronyms, you -%can do: -%\begin{verbatim} -%\usepackage[acronym,acronymlists={main}]{glossaries} -%\end{verbatim} -%No check is performed to determine if the listed glossaries exist, -%so you can add glossaries you haven't defined yet. For example: -%\begin{verbatim} -%\usepackage[acronym,acronymlists={main,acronym2}]{glossaries} -%\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms} -%\end{verbatim} +%\begin{macro}{\@gls@loadlist} +%\changes{1.18}{2009 January 14}{new} +% \begin{macrocode} +\newcommand*{\@gls@loadlist}{\RequirePackage{glossary-list}} +% \end{macrocode} +%\end{macro} +%\begin{option}{nolist} +%\changes{1.18}{2009 January 14}{new} +% This option prevents \isty{glossary-list} from being loaded +% (to reduce overheads if required). Naturally, the styles defined +% in \isty{glossary-list} will not be available if this option +% is used. +% \begin{macrocode} +\DeclareOptionX{nolist}{\renewcommand*{\@gls@loadlist}{}} +% \end{macrocode} +%\end{option} % -%\item[\pkgopt{section}] This is a \meta{key}=\meta{value} option. Its -%value should be the name of a sectional unit (e.g.\ chapter). -%This will make the glossaries appear in the named sectional unit, -%otherwise each glossary will appear in a chapter, if chapters -%exist, otherwise in a section. Unnumbered sectional units will be used -%by default. Example: -%\begin{verbatim} -%\usepackage[section=subsection]{glossaries} -%\end{verbatim} -%You can omit the value if you want to use sections, i.e.\ -%\begin{verbatim} -%\usepackage[section]{glossaries} -%\end{verbatim} -%is equivalent to -%\begin{verbatim} -%\usepackage[section=section]{glossaries} -%\end{verbatim} -%You can change this value later in the document using -%\begin{definition}[\DescribeMacro{\setglossarysection}] -%\cs{setglossarysection}\marg{name} -%\end{definition} -%where \meta{name} is the sectional unit. +%\begin{macro}{\@gls@loadtree} +%\changes{1.18}{2009 January 14}{new} +% \begin{macrocode} +\newcommand*{\@gls@loadtree}{\RequirePackage{glossary-tree}} +% \end{macrocode} +%\end{macro} +%\begin{option}{notree} +%\changes{1.18}{2009 January 14}{new} +% This option prevents \isty{glossary-tree} from being loaded +% (to reduce overheads if required). Naturally, the styles defined +% in \isty{glossary-tree} will not be available if this option +% is used. +% \begin{macrocode} +\DeclareOptionX{notree}{\renewcommand*{\@gls@loadtree}{}} +% \end{macrocode} +%\end{option} % -%The start of each glossary adds information to the page header via -%\begin{definition}[\DescribeMacro{\glossarymark}] -%\cs{glossarymark}\marg{glossary title} -%\end{definition} -%This defaults to \cs{@mkboth}, but you may need to redefine it. -%For example, to only change the right header: -%\begin{verbatim} -%\renewcommand{\glossarymark}[1]{\markright{#1}} -%\end{verbatim} -%or to prevent it from changing the headers: -%\begin{verbatim} -%\renewcommand{\glossarymark}[1]{} -%\end{verbatim} +%\begin{option}{nostyles} +%\changes{1.18}{2009 January 14}{new} +% Provide an option to suppress all the predefined styles (in the +% event that the user has custom styles that are not dependent +% on the predefined styles). +% \begin{macrocode} +\DeclareOptionX{nostyles}{% + \renewcommand*{\@gls@loadlong}{}% + \renewcommand*{\@gls@loadsuper}{}% + \renewcommand*{\@gls@loadlist}{}% + \renewcommand*{\@gls@loadtree}{}% + \let\@glossary@default@style\relax +} +% \end{macrocode} +%\end{option} % -%Occasionally you may find that another package defines -%\cs{cleardoublepage} when it is not required. This may cause an -%unwanted blank page to appear before each glossary. This can -%be fixed by redefining \ics{glsclearpage}: -%\begin{verbatim} -%\renewcommand*{\glsclearpage}{\clearpage} -%\end{verbatim} +%\begin{option}{entrycounter} +% Defines a counter that can be used in the standard glossary styles +% to number each (main) entry. If true, this will define a counter called +% \ctr{glossaryentry}. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{entrycounter}[true]{} +\glsentrycounterfalse +% \end{macrocode} +%\end{option} % -%\item[\pkgopt{numberedsection}] -%The glossaries are placed in unnumbered sectional units by default, -%but this can be changed using \pkgopt{numberedsection}. This option can take -%three possible values: \pkgoptval{false}{numberedsection} (no -%number, i.e.\ use starred form), \pkgoptval{nolabel}{numberedsection} -%(numbered, i.e.\ unstarred form, but not labelled) and -%\pkgoptval{autolabel}{numberedsection} (numbered with automatic -%labelling). If \pkgopt[autolabel]{numberedsection} is used, each -%glossary is given a label that matches the glossary type, so the -%main (default) glossary is labelled \texttt{main}, the list of -%acronyms is labelled \texttt{acronym}\footnote{if the -%\pkgopt{acronym} option is used, otherwise the list of -%acronyms is the main glossary} and additional glossaries are labelled -%using the value specified in the first mandatory argument to -%\cs{newglossary}. For example, if you load \styfmt{glossaries} -%using: -%\begin{verbatim} -%\usepackage[section,numberedsection=autolabel]{glossaries} -%\end{verbatim} -%then each glossary will appear in a numbered section, and can -%be referenced using something like: -%\begin{verbatim} -%The main glossary is in section~\ref{main} and the list of -%acronyms is in section~\ref{acronym}. -%\end{verbatim} -%If you can't decide whether to have the acronyms in the main -%glossary or a separate list of acronyms, you can use -%\ics{acronymtype} which is set to \texttt{main} if the -%\pkgopt{acronym} option is not used and is set to \texttt{acronym} -%if the \pkgopt{acronym} option is used. For example: -%\begin{verbatim} -%The list of acronyms is in section~\ref{\acronymtype}. -%\end{verbatim} +%\begin{option}{entrycounterwithin} +% This option can be used to set a parent counter for +% \ctr{glossaryentry}. This option automatically sets +% \pkgopt[true]{entrycounter}. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\define@key{glossaries.sty}{counterwithin}{% + \renewcommand*{\@gls@counterwithin}{#1}% + \glsentrycountertrue +} +% \end{macrocode} +%\end{option} +%\begin{macro}{\@gls@counterwithin} +%\changes{3.0}{2011/04/02}{new} +% The default value is no parent counter: +% \begin{macrocode} +\newcommand*{\@gls@counterwithin}{} +% \end{macrocode} +%\end{macro} % -%As from version 1.14, you can add a prefix to the label by -%redefining -%\begin{definition}[\DescribeMacro{\glsautoprefix}] -%\cs{glsautoprefix} -%\end{definition} -%For example: -%\begin{verbatim} -%\renewcommand*{\glsautoprefix}{glo:} -%\end{verbatim} -%will add \texttt{glo:} to the automatically generated label, so -%you can then, for example, refer to the list of acronyms as follows: -%\begin{verbatim} -%The list of acronyms is in section~\ref{glo:\acronymtype}. -%\end{verbatim} -%Or, if you are undecided on a prefix: -%\begin{verbatim} -%The list of acronyms is in section~\ref{\glsautoprefix\acronymtype}. -%\end{verbatim} +%\begin{option}{subentrycounter} +% Define a counter that can be used in the standard glossary styles +% to number each level~1 entry. If true, this will define a counter called +% \ctr{glossarysubentry}. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{subentrycounter}[true]{} +\glssubentrycounterfalse +% \end{macrocode} +%\end{option} % +%\begin{option}{sort} +%\changes{3.0}{2011/04/02}{new} +% Define the sort method: \pkgopt[standard]{sort} (default), +% \pkgopt[def]{sort} (order of definition) or +% \pkgopt[use]{sort} (order of use). +% \begin{macrocode} +\define@choicekey{glossaries.sty}{sort}{standard,def,use}{% + \csname @gls@setupsort@#1\endcsname +} +% \end{macrocode} +%\end{option} +%\begin{macro}{\@gls@setupsort@standard} +%\changes{3.0}{2011/04/02}{new} +% Set up the macros for default sorting. +% \begin{macrocode} +\newcommand*{\@gls@setupsort@standard}{% +% \end{macrocode} +% Store entry information when it's defined. +% \begin{macrocode} + \def\do@glo@storeentry{\@glo@storeentry}% +% \end{macrocode} +% No count register required for standard sort. +% \begin{macrocode} + \def\@gls@defsortcount##1{}% +% \end{macrocode} +% Sort according to sort key (\cs{@glo@sort}) if provided otherwise +% sort according to the entry's name (\cs{@glo@name}). +% \begin{macrocode} + \def\@gls@defsort##1##2{% + \ifx\@glo@sort\@glsdefaultsort + \let\@glo@sort\@glo@name + \fi + \@onelevel@sanitize\@glo@sort + \expandafter\protected@xdef\csname glo@##2@sort\endcsname{\@glo@sort}% + }% +% \end{macrocode} +% Don't need to do anything when the entry is used. +% \begin{macrocode} + \def\@gls@setsort##1{}% +} +% \end{macrocode} +% Set standard sort as the default: +% \begin{macrocode} +\@gls@setupsort@standard +% \end{macrocode} +%\end{macro} % -%\item[\pkgopt{style}] This is a \meta{key}=\meta{value} option. Its -%value should be the name of the glossary style to use. Predefined -%glossary styles are listed in \sectionref{sec:styles}. -% -%\item[\pkgopt{nolong}] This prevents the \styfmt{glossaries} package -%from automatically loading \sty{glossary-long} (which means that -%the \sty{longtable} package also won't be loaded). This reduces -%overhead by not defining unwanted styles and commands. Note that if -%you use this option, you won't be able to use any of the -%glossary styles defined in the \styfmt{glossary-long} package. -% -%\item[\pkgopt{nosuper}] This prevents the \styfmt{glossaries} package -%from automatically loading \sty{glossary-super} (which means that -%the \sty{supertabular} package also won't be loaded). This reduces -%overhead by not defining unwanted styles and commands. Note that if -%you use this option, you won't be able to use any of the -%glossary styles defined in the \styfmt{glossary-super} package. -% -%\item[\pkgopt{nolist}] This prevents the \styfmt{glossaries} package -%from automatically loading \sty{glossary-list}. This reduces -%overhead by not defining unwanted styles. Note that if -%you use this option, you won't be able to use any of the -%glossary styles defined in the \styfmt{glossary-list} package. -%Note that since the default style is \glostyle{list}, you will -%also need to use the \pkgopt{style} option to set the style to -%something else. -% -%\item[\pkgopt{notree}] This prevents the \styfmt{glossaries} package -%from automatically loading \sty{glossary-tree}. This reduces -%overhead by not defining unwanted styles. Note that if -%you use this option, you won't be able to use any of the -%glossary styles defined in the \styfmt{glossary-tree} package. -% -%\item[\pkgopt{nostyles}] This prevents all the predefined styles -%from being loaded. This option is provided in the event that the -%user has custom styles that are not dependent on the styles -%provided by the \styfmt{glossaries} package. Note that if you use -%this option, you can't use the \pkgopt{style} package option. Instead -%you must either use \ics{glossarystyle}\marg{style} or -%the \gloskey[printglossary]{style} key in the -%optional argument to \ics{printglossary}. -% -%\item[\pkgopt{nonumberlist}] This option will suppress the -%associated number lists\iterm{number list} in the glossaries (see also -%\sectionref{sec:numberlists}). -% -%\item[\pkgopt{counter}] This is a \meta{key}=\meta{value} option. The -%value should be the name of the default counter to use in the number -%lists\iterm{number list}. -% -%\hypertarget{sanitize}{}\relax \item[\pkgopt{sanitize}] This is a -%\meta{key}=\meta{value} option whose value is also a -%\meta{key}=\meta{value} list. By default, the \styfmt{glossaries} -%package sanitizes the values of the \gloskey{name}, -%\gloskey{description} and \gloskey{symbol} keys used when defining a -%new glossary entry. This means that you can use fragile commands in -%those keys, but it may lead to unexpected results if you try to -%display these values within the document text. This sanitization can -%be switched off using the \pkgopt{sanitize} package option. \ifpdf -%(See \sectionref{sec:pkgopt} and \sectionref{sec:newentry} for -%further details.) \fi For example, to switch off the sanitization -%for the \gloskey{description} and \gloskey{name} keys, but not for -%the \gloskey{symbol} key, do: -%\begin{verbatim} -%\usepackage[sanitize={name=false,description=false,% -%symbol=true}]{glossaries} -%\end{verbatim} -%You can use \pkgopt[none]{sanitize} as a shortcut for\newline -%\pkgoptfmt{sanitize=\{name=false,description=false,symbol=false\}}. -% -%\begin{important}% -%\textbf{Note}: this sanitization only applies to the \gloskey{name}, -%\gloskey{description} and \gloskey{symbol} keys. It doesn't apply -%to any of the other keys (except the \gloskey{sort} key which is -%always sanitized) so fragile commands contained in the value of -%the other keys must always be protected using \cs{protect}. -%Since the value of the \gloskey{text} key is obtained from the -%\gloskey{name} key, you will still need to protect fragile commands -%in the \gloskey{name} key if you don't use the \gloskey{text} key. -%\end{important} -% -%\item[\pkgopt{description}] This option changes the definition of -%\ics{newacronym} to allow a description. See \sectionref{sec:acronyms} -%for further details. -% -%\item[\pkgopt{footnote}] This option changes the definition of -%\ics{newacronym} and the way that acronyms are displayed. See -%\sectionref{sec:acronyms} for further details. -% -%\item[\pkgopt{smallcaps}] This option changes the definition of -%\ics{newacronym} and the way that acronyms are displayed. See -%\sectionref{sec:acronyms} for further details. -% -%\item[\pkgopt{smaller}] This option changes the definition of -%\ics{newacronym} and the way that acronyms are displayed. -%If you use this option, you will need to include the \sty{relsize} -%package or otherwise define \ics{textsmaller} or redefine -%\ics{acronymfont}. See \sectionref{sec:acronyms} for further details. -% -%\item[\pkgopt{dua}] This option changes the definition of -%\ics{newacronym} so that acronyms are always expanded. -%See \sectionref{sec:acronyms} for further details. -% -%\item[\pkgopt{shortcuts}] This option provides shortcut commands -%for acronyms. See \sectionref{sec:acronyms} for further details. -% -%\item[\pkgopt{makeindex}] (Default) The glossary information and -%indexing style file will be written in \app{makeindex} format. If -%you use \app{makeglossaries}, it will automatically detect that it -%needs to call \app{makeindex}. If you don't use -%\app{makeglossaries}, you need to remember to use \app{makeindex} -%not \app{xindy}. The indexing style file will been given a -%\filetype{.ist} extension. -% -%\item[\pkgopt{xindy}] The glossary information and indexing style -%file will be written in \app{xindy} format. If you use -%\app{makeglossaries}, it will automatically detect that it needs to -%call \app{xindy}. If you don't use \app{makeglossaries}, you need to -%remember to use \app{xindy} not \app{makeindex}. The indexing style -%file will been given a \filetype{.xdy} extension. -% -%The \pkgopt{xindy} package option may additionally have a value that -%is a \meta{key}=\meta{value} comma-separated list to override the -%language and codepage. For example: -%\begin{verbatim} -%\usepackage[xindy={language=english,codepage=utf8}]{glossaries} -%\end{verbatim} -%You can also specify whether you want a number group in the -%glossary. This defaults to true, but can be suppressed. For example: -%\begin{verbatim} -%\usepackage[xindy={glsnumbers=false}]{glossaries} -%\end{verbatim} -%See \sectionref{sec:xindy} for further details on using \app{xindy} -%with the \styfmt{glossaries} package. -% -%\item[\pkgopt{order}] This may take two values: -%\pkgoptval{word}{order} or \pkgoptval{letter}{order}. The default -%is word ordering. Note that this option has no effect if you -%don't use \app{makeglossaries}. -% -%\item[\pkgopt{translate}] This is a boolean option. The default is -%\pkgoptval{true}{translate} if \sty{babel}, \sty{polyglossia} or -%\sty{translator} have been loaded, otherwise the default value is -%\pkgoptval{false}{translate}. -% -% \begin{description} -% \item[{\pkgopt[true]{translate}}] If \sty{babel} has been loaded -% and the \sty{translator} package is installed, \sty{translator} -% will be loaded and the translations will be provided by the -% \sty{translator} package interface. You can modify the -% translations by providing your own dictionary. If the -% \sty{translator} package isn't installed and \sty{babel} is -% loaded, the \sty{glossaries-babel} package will -% be loaded and the translations will be provided using \styfmt{babel}'s -% \cs{addto}\cs{caption}\meta{language} mechanism. If -% \sty{polyglossia} has been loaded, \sty{glossaries-polyglossia} -% will be loaded. -% -% \item[{\pkgopt[false]{translate}}] Don't provide translations, even -% if \sty{babel} or \sty{polyglossia} has been loaded. You can -% then provide you're own translations or explicitly load -% \sty{glossaries-babel} or \sty{glossaries-polyglossia}. -% \end{description} -% -%See \sectionref{sec:fixednames} for further details. -% -%\item[\pkgopt{hyperfirst}] This is a boolean option that specifies -%whether each term has a hyperlink on \firstuse. The default is -%\pkgopt[true]{hyperfirst} (terms on first use have a hyperlink, -%unless explicitly suppressed using starred versions of commands -%such as \cs{gls*}). +%\begin{macro}{\glssortnumberfmt} +%\changes{3.0}{2011/04/02}{new} +% Format the number used as the sort key by \pkgopt[def]{sort} and +% \pkgopt[use]{sort}. Defaults to six digit numbering. +% \begin{macrocode} +\newcommand*\glssortnumberfmt[1]{% + \ifnum#1<100000 0\fi + \ifnum#1<10000 0\fi + \ifnum#1<1000 0\fi + \ifnum#1<100 0\fi + \ifnum#1<10 0\fi + \number#1% +} +% \end{macrocode} +%\end{macro} % -%\end{description} +%\begin{macro}{\@gls@setupsort@def} +%\changes{3.0}{2011/04/02}{new} +% Set up the macros for order of definition sorting. +% \begin{macrocode} +\newcommand*{\@gls@setupsort@def}{% +% \end{macrocode} +% Store entry information when it's defined. +% \begin{macrocode} + \def\do@glo@storeentry{\@glo@storeentry}% +% \end{macrocode} +% Defined count register associated with the glossary. +% \begin{macrocode} + \def\@gls@defsortcount##1{% + \expandafter\global + \expandafter\newcount\csname glossary@##1@sortcount\endcsname + }% +% \end{macrocode} +% Increment count register associated with the glossary and use as +% the sort key. +% \begin{macrocode} + \def\@gls@defsort##1##2{% + \expandafter\global\expandafter + \advance\csname glossary@##1@sortcount\endcsname by 1\relax + \expandafter\protected@xdef\csname glo@##2@sort\endcsname{% + \expandafter\glssortnumberfmt + {\csname glossary@##1@sortcount\endcsname}}% + }% +% \end{macrocode} +% Don't need to do anything when the entry is used. +% \begin{macrocode} + \def\@gls@setsort##1{}% +} +% \end{macrocode} +%\end{macro} % -%\subsection{Defining Glossary Entries} -%\label{sec:newglosentry} -% -%All glossary entries must be defined before they are used, so it is -%better to define them in the preamble to ensure this.\footnote{The -%only preamble restriction on \cs{newglossaryentry} and -%\cs{newacronym} was removed in version 1.13, but the restriction -%remains for \cs{loadglsentries}.} However only those entries that -%occur in the document (using any of the commands described in -%\sectionref{sec:glslink}, \sectionref{sec:glsadd} or -%\sectionref{sec:crossref}) will appear in the glossary. Each time an -%entry is used in this way, a line is added to an associated glossary -%file (\filetype{.glo}), which then needs to be converted into a -%corresponding \filetype{.gls} file which contains the typeset -%glossary which is input by \ics{printglossary} or -%\ics{printglossaries}. The Perl script \app{makeglossaries} can be -%used to call \app{makeindex} or \app{xindy}, using a customised -%indexing style file, for each of the glossaries that are defined in -%the document. Note that there should be no need for you to -%explicitly edit or input any of these external files. See -%\sectionref{sec:makeglossaries} for further details. -% -%The command -%\begin{definition}[\DescribeMacro{\makeglossaries}] -%\cs{makeglossaries} -%\end{definition} -%must be placed in the preamble in order to create the customised -%\app{makeindex} (\filetype{.ist}) or \app{xindy} (\filetype{.xdy}) -%style file and to ensure that glossary entries are written to the -%appropriate output files. If you omit \cs{makeglossaries} none of -%the glossaries will be created. -% -%\begin{important} -%Note that some of the commands provided by the \styfmt{glossaries} -%package must be placed before \cs{makeglossaries} as they are -%required when creating the customised style file. If you attempt -%to use those commands after \cs{makeglossaries} you will generate -%an error. -%\end{important} -% -%You can suppress the creation of the customised \app{xindy} -%or \app{makeindex} style file using -%\begin{definition}[\DescribeMacro{\noist}] -%\cs{noist} -%\end{definition} -%Note that this command must be used before \cs{makeglossaries}. -% -%The default name for the customised style file is given by -%\ics{jobname}\filetype{.ist} (for \app{makeindex}) or -%\ics{jobname}\filetype{.xdy} (for \app{xindy}). This name may be -%changed using: -%\begin{definition}[\DescribeMacro{\setStyleFile}] -%\cs{setStyleFile}\marg{name} -%\end{definition} -%where \meta{name} is the name of the style file without the -%extension. Note that this command must be used before -%\cs{makeglossaries}. -% -%Each glossary entry is assigned a \term{number list} that lists all -%the locations in the document where that entry was used. By default, -%the location refers to the page number but this may be overridden -%using the \pkgopt{counter} package option. The default form of -%the location number assumes a full stop compositor (e.g.\ 1.2), -%but if your location numbers use a different compositor (e.g. 1-2) -%you need to set this using -%\begin{definition}[\DescribeMacro{\glsSetCompositor}] -%\cs{glsSetCompositor}\marg{symbol} -%\end{definition} -%For example: -%\begin{verbatim} -%\glsSetCompositor{-} -%\end{verbatim} -%Note that this command must be used before \cs{makeglossaries}. +%\begin{macro}{\@gls@setupsort@use} +%\changes{3.0}{2011/04/02}{new} +% Set up the macros for order of use sorting. +% \begin{macrocode} +\newcommand*{\@gls@setupsort@use}{% +% \end{macrocode} +% Don't store entry information when it's defined. +% \begin{macrocode} + \let\do@glo@storeentry\@gobble +% \end{macrocode} +% Defined count register associated with the glossary. +% \begin{macrocode} + \def\@gls@defsortcount##1{% + \expandafter\global + \expandafter\newcount\csname glossary@##1@sortcount\endcsname + }% +% \end{macrocode} +% Initialise the sort key to empty. +% \begin{macrocode} + \def\@gls@defsort##1##2{% + \expandafter\gdef\csname glo@##2@sort\endcsname{}% + }% +% \end{macrocode} +% If the sort key hasn't been set, increment the counter associated +% with the glossary and set the sort key. +% \begin{macrocode} + \def\@gls@setsort##1{% +% \end{macrocode} +% Get the parent, if one exists +% \begin{macrocode} + \edef\@glo@parent{\csname glo@##1@parent\endcsname}% +% \end{macrocode} +% Set the information for the parent entry if not already done. +% \begin{macrocode} + \ifx\@glo@parent\@empty + \else + \expandafter\@gls@setsort\expandafter{\@glo@parent}% + \fi +% \end{macrocode} +% Set index information for this entry +% \begin{macrocode} + \edef\@glo@type{\csname glo@##1@type\endcsname}% + \edef\@gls@tmp{\csname glo@##1@sort\endcsname}% + \ifx\@gls@tmp\@empty + \expandafter\global\expandafter + \advance\csname glossary@\@glo@type @sortcount\endcsname by 1\relax + \expandafter\protected@xdef\csname glo@##1@sort\endcsname{% + \expandafter\glssortnumberfmt + {\csname glossary@\@glo@type @sortcount\endcsname}}% + \@glo@storeentry{##1}% + \fi + }% +} +% \end{macrocode} +%\end{macro} % -%If you use \app{xindy}, you can have a different compositor for page -%numbers starting with an uppercase alphabetical character using: -%\begin{definition}[\DescribeMacro{\glsSetAlphaCompositor}] -%\cs{glsSetAlphaCompositor}\marg{symbol} -%\end{definition} -%Note that this command has no effect if you haven't used the -%\pkgopt{xindy} package option. For example, if you want number -%lists\iterm{number list} containing a mixture of A-1 and 2.3 style -%formats, then do: -%\begin{verbatim} -%\glsSetCompositor{.} \glsSetAlphaCompositor{-} -%\end{verbatim} -%See \sectionref{sec:numberlists} for further information about -%number lists\iterm{number list}. +%\begin{macro}{\glsdefmain} +%\changes{2.01}{2009 May 30}{new} +% Define the main glossary. This will be the first glossary to +% be displayed when using \ics{printglossaries}. +% \begin{macrocode} +\newcommand*{\glsdefmain}{% + \newglossary{main}{gls}{glo}{\glossaryname}% +} +% \end{macrocode} +%\end{macro} % -%New glossary entries are defined using the command: -%\begin{definition}[\DescribeMacro{\newglossaryentry}] -%\cs{newglossaryentry}\marg{label}\marg{key-val list} -%\end{definition} -%The first argument, \meta{label}, must be a unique label with which -%to identify this entry. The second argument, \meta{key-val list}, is -%a \meta{key}=\meta{value} list that supplies the relevant -%information about this entry. There are two required fields: -%\gloskey{description} and either \gloskey{name} or \gloskey{parent}. -%Available fields are listed below: +% Keep track of the default glossary. This is initialised to +% the main glossary, but can be changed if for some reason +% you want to make a secondary glossary the main glossary. This +% affects any commands that can optionally take a glossary name +% as an argument (or as the value of the +% \gloskey{type}\igloskey[printglossary]{type} key in +%a key-value list). This was mainly done so that +% \ics{loadglsentries} can temporarily change +% \cs{glsdefaulttype} while it loads a file containing +% new glossary entries (see \autoref{sec:load}). +%\begin{macro}{\glsdefaulttype} +% \begin{macrocode} +\newcommand*{\glsdefaulttype}{main} +% \end{macrocode} +%\end{macro} +% Keep track of which glossary the acronyms are in. This is +% initialised to \cs{glsdefaulttype}, but is changed by +% the \pkgopt{acronym} package option. +%\begin{macro}{\acronymtype} +% \begin{macrocode} +\newcommand*{\acronymtype}{\glsdefaulttype} +% \end{macrocode} +%\end{macro} % -%\begin{description} -%\item[{\gloskey{name}}] The name of the entry (as it will appear in -%the glossary). If this key is omitted and the \gloskey{parent} -%key is supplied, this value will be the same as the parent's name. -% -%\item[{\gloskey{description}}] A brief description of this term (to -%appear in the glossary). Within this value, you can use -%\begin{definition}[\DescribeMacro{\nopostdesc}] -%\cs{nopostdesc} -%\end{definition} -%to suppress the -%description terminator for this entry. For example, if this -%entry is a parent entry that doesn't require a description, you -%can do \verb|description={\nopostdesc}|. If you want a paragraph -%break in the description use -%\begin{definition}[\DescribeMacro{\glspar}] -%\cs{glspar} -%\end{definition} -%However, note that not all glossary styles support multi-line -%descriptions. If you are using one of the tabular-like glossary -%styles that permit multi-line descriptions, use \ics{newline} -%not \verb"\\" if you want to force a line break. -% -%\item[{\gloskey{parent}}] The label of the parent entry. Note that -%the parent entry must be defined before its sub-entries. -%See \sectionref{sec:subentries} for further details. -% -%\item[{\gloskey{descriptionplural}}] The plural form of the -%description (as passed to \ics{glsdisplay} and \ics{glsdisplayfirst} -%by \ics{glspl}, \ics{Glspl} and \ics{GLSpl}). If omitted, the value -%is set to the same as the \gloskey{description} key. -% -%\item[{\gloskey{text}}] How this entry will appear in the document text -%when using \ics{gls} (or one of its uppercase variants). If this -%field is omitted, the value of the \gloskey{name} key is used. -% -%\item[{\gloskey{first}}] How the entry will appear in the document text -%the first time it is used with \ics{gls}\ifirstusetext\ (or one of its uppercase -%variants). If this field is omitted, the value of the \gloskey{text} -%key is used. -% -%\item[{\gloskey{plural}}] How the entry will appear in the document text -%when using \ics{glspl} (or one of its uppercase variants). -%If this field is omitted, the value is obtained by appending -%\ics{glspluralsuffix} to the value of the \gloskey{text} field. -%The default value of \cs{glspluralsuffix} is the letter -%\qt{s}. -% -%\item[{\gloskey{firstplural}}] How the entry will appear in the -%document text the first time it is used with \ics{glspl}\ifirstusetext\ (or one of its -%uppercase variants). If this field is omitted, the value is obtained -%from the \gloskey{plural} key, if the \gloskey{first} key is omitted, -%or by appending \ics{glspluralsuffix} to the value of the -%\gloskey{first} field, if the \gloskey{first} field is present. -% -%\textbf{Note:} prior to version 1.13, the default value of -%\gloskey{firstplural} was always taken by appending \qt{s} to the -%\gloskey{first} key, which meant that you had to specify both -%\gloskey{plural} and \gloskey{firstplural}, even if you hadn't -%used the \gloskey{first} key. -% -%\item[{\gloskey{symbol}}] This field is provided to allow the user to -%specify an associated symbol. If omitted, the value is set to -%\cs{relax}. Note that not all glossary styles display the -%symbol. -% -%\item[{\gloskey{symbolplural}}] This is the plural form of the -%symbol (as passed to \ics{glsdisplay} and \ics{glsdisplayfirst} -%by \ics{glspl}, \ics{Glspl} and \ics{GLSpl}). If omitted, the value -%is set to the same as the \gloskey{symbol} key. -% -%\item[{\gloskey{sort}}] This value indicates how \app{makeindex} -%or \app{xindy} should sort this entry. If omitted, the value is -%given by the \gloskey{name} field. -% -%\item[{\gloskey{type}}] This specifies the label of the glossary in -%which this entry belongs. If omitted, the default glossary is -%assumed. The list of acronyms type is given by -%\ics{acronymtype} which will either be \texttt{main} or -%\texttt{acronym}, depending on whether the \pkgopt{acronym} package -%option was used. -% -%\item[{\gloskey{user1}, \ldots, \gloskey{user6}}] Six additional -%keys provided for any additional information the user may want -%to specify. (For example, an associated dimension or an alternative -%plural.) -% -%\item[{\gloskey{nonumberlist}}] Suppress the \term{number list} for -%this entry. -% -%\item[{\gloskey{see}}] Cross-reference another entry. Using the -%\gloskey{see} key will automatically add this entry to the -%glossary, but will not automatically add the cross-referenced entry. -%The referenced entry should be supplied as the value to this key. -%If you want to override the \qt{see} tag, you can supply the new -%tag in square brackets before the label. For example -%\verb|see=[see also]{anotherlabel}|. For further details, -%see \sectionref{sec:crossref}. -% -%\end{description} -%Note that if the name starts with an accented letter or non-Latin -%character, you must group the accented letter, otherwise it will -%cause a problem for commands like \cs{Gls} and \cs{Glspl}. -%For example: -%\begin{verbatim} -%\newglossaryentry{elite}{name={{\'e}lite}, -%description={select group or class}} -%\end{verbatim} -%Note that the same applies if you are using the \sty{inputenc} -%package: -%\begin{verbatim} -%\newglossaryentry{elite}{name={{é}lite}, -%description={select group or class}} -%\end{verbatim} -%Note that in both of the above examples, you will also need to -%supply the \gloskey{sort} key if you are using \app{makeindex} -%whereas \app{xindy} is usually able to sort accented letters -%correctly. +%\changes{2.01}{2009 May 30}{added nomain package option} +% The \pkgopt{nomain} option suppress the creation of the main +% glossary. +% \begin{macrocode} +\DeclareOptionX{nomain}{% + \let\glsdefaulttype\relax + \renewcommand*{\glsdefmain}{}% +} +% \end{macrocode} % +%\begin{option}{acronym} +% The \pkgopt{acronym} option sets an associated conditional +% which is used in \autoref{sec:acronym} to determine whether +% or not to define a separate glossary for acronyms. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{acronym}[true]{% + \DeclareAcronymList{acronym}% +} +% \end{macrocode} +%\end{option} +%\begin{macro}{\@glsacronymlists} +%\changes{2.04}{2009 November 10}{new} +% Comma-separated list of glossary labels indicating which +% glossaries contain acronyms. Note that \ics{SetAcronymStyle} +% must be used after adding labels to this macro. +% \begin{macrocode} +\newcommand*{\@glsacronymlists}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@addtoacronynlists} +% \begin{macrocode} +\newcommand*{\@addtoacronymlists}[1]{% + \ifx\@glsacronymlists\@empty + \protected@xdef\@glsacronymlists{#1}% + \else + \protected@xdef\@glsacronymlists{\@glsacronymlists,#1}% + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\DeclareAcronymList} +%\changes{2.04}{2009 November 10}{new}% +% Identifies the named glossary as a list of acronyms and adds +% to the list. (Doesn't check if the glossary exists, but checks +% if label already in list. Use \ics{SetAcronymStyle} after +% identifying all the acronym lists.) +% \begin{macrocode} +\newcommand*{\DeclareAcronymList}[1]{% + \glsIfListOfAcronyms{#1}{}{\@addtoacronymlists{#1}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsIfListOfAcronyms} +%\cs{glsIfListOfAcronyms}\marg{label}\marg{true part}\marg{false part}\\[10pt] +% Determines if the glossary with the given label has been identified +% as being a list of acronyms. +% \begin{macrocode} +\newcommand{\glsIfListOfAcronyms}[1]{% + \edef\@do@gls@islistofacronyms{% + \noexpand\@gls@islistofacronyms{#1}{\@glsacronymlists}}% + \@do@gls@islistofacronyms +} +% \end{macrocode} +% Internal command requires label and list to be expanded: +% \begin{macrocode} +\newcommand{\@gls@islistofacronyms}[4]{% + \def\gls@islistofacronyms##1,#1,##2\end@gls@islistofacronyms{% + \def\@before{##1}\def\@after{##2}}% + \gls@islistofacronyms,#2,#1,\@nil\end@gls@islistofacronyms + \ifx\@after\@nnil +% \end{macrocode} +% Not found +% \begin{macrocode} + #4% + \else +% \end{macrocode} +% Found +% \begin{macrocode} + #3% + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\if@glsisacronymlist} +% Convenient boolean. +% \begin{macrocode} +\newif\if@glsisacronymlist +% \end{macrocode} +%\end{macro} +%\begin{macro}{\gls@checkisacronymlist} +% Sets the above boolean if argument is a label representing +% a list of acronyms. +% \begin{macrocode} +\newcommand*{\gls@checkisacronymlist}[1]{% + \glsIfListOfAcronyms{#1}% + {\@glsisacronymlisttrue}{\@glsisacronymlistfalse}% +} +% \end{macrocode} +%\end{macro} % +%\begin{macro}{\SetAcronymLists} +%\changes{2.04}{2009 November 10}{new}% +% Sets the ``list of acronyms'' list. Argument must be a +% comma-separated list of glossary labels. (Doesn't check at this +% point if the glossaries exists.) +% \begin{macrocode} +\newcommand*{\SetAcronymLists}[1]{% + \renewcommand*{\@glsacronymlists}{#1}% +} +% \end{macrocode} +%\end{macro} +%\begin{option}{acronymlists} +%\changes{2.04}{2009 November 10}{new}% +% \begin{macrocode} +\define@key{glossaries.sty}{acronymlists}{% + \@addtoacronymlists{#1}% +} +% \end{macrocode} +%\end{option} % -%\subsubsection{Plurals} -%You may have noticed from above that you can specify the plural form -%when you define a term. If you omit this, the plural will be -%obtained by appending -%\begin{definition}[\DescribeMacro{\glspluralsuffix}] -%\cs{glspluralsuffix} -%\end{definition} -%to the singular form. This command defaults to the letter \qt{s}. -%For example: -%\begin{verbatim} -%\newglossaryentry{cow}{name=cow,description={a fully grown -%female of any bovine animal}} -%\end{verbatim} -%defines a new entry whose singular form is \qt{cow} and plural form -%is \qt{cows}. However, if you are writing in archaic English, you -%may want to use \qt{kine} as the plural form, in which case you -%would have to do: -%\begin{verbatim} -%\newglossaryentry{cow}{name=cow,plural=kine, -%description={a fully grown female of any bovine animal}} -%\end{verbatim} +% The default counter associated with the numbers in the glossary +% is stored in \cs{glscounter}. This is initialised to the +% page counter. This is used as the default counter when a +% new glossary is defined, unless a different counter is specified +% in the optional argument to \ics{newglossary} (see +% \autoref{sec:newglos}). +%\begin{macro}{\glscounter} +% \begin{macrocode} +\newcommand{\glscounter}{page} +% \end{macrocode} +%\end{macro} +%\begin{option}{counter} +% The \pkgopt{counter} option changes the default counter. (This +% just redefines \cs{glscounter}.) +% \begin{macrocode} +\define@key{glossaries.sty}{counter}{% + \renewcommand*{\glscounter}{#1}% +} +% \end{macrocode} +%\end{option} % -%If you are writing in a language that supports -%multiple plurals (for a given term) then use the \gloskey{plural} key -%for one of them and one of the user keys to specify the -%other plural form. For example: -%\begin{verbatim} -%\newglossaryentry{cow}{name=cow,description={a fully grown -%female of any bovine animal (plural cows, archaic plural kine)}, -%user1={kine}} -%\end{verbatim} -%You can then use \verb|\glspl{cow}| to produce \qt{cows} and -%\verb|\glsuseri{cow}| to produce \qt{kine}. You can, of course, -%define an easy to remember synonym. For example: -%\begin{verbatim} -%\let\glsaltpl\glsuseri -%\end{verbatim} -%Then you don't have to remember which key you used to store the -%alternative plural. -% -%If you are using a language that usually forms plurals -%by appending a different letter, or sequence of letters, you can -%redefine \cs{glspluralsuffix} as required. However, this must be -%done \emph{before} the entries are defined. For languages that don't -%form plurals by simply appending a suffix, all the plural forms must be -%specified using the \gloskey{plural} key (and the \gloskey{firstplural} -%key where necessary). -% -% -%\subsubsection{Sub-Entries} -%\label{sec:subentries} -% -%As from version 1.17, it is possible to specify sub-entries. These -%may be used to order the glossary into categories, in which case -%the sub-entry will have a different name to its parent entry, or -%it may be used to distinguish different definitions for the same -%word, in which case the sub-entries will have the same name as -%the parent entry. Note that not all glossary styles support -%hierarchical entries and may display all the entries in a flat -%format. Of the styles that support sub-entries, some display the -%sub-entry's name whilst others don't. Therefore you need to -%ensure that you use a suitable style. See \sectionref{sec:styles} -%for a list of predefined styles. -% -%Note that the parent entry will automatically be added to the -%glossary if any of its child entries are used in the document. -%If the parent entry is not referenced in the document, it will not -%have a \term{number list}. -% -% -%\paragraph{Hierarchical Categories} To arrange a glossary -%with hierarchical categories, you need to first define the -%category and then define the sub-entries using the relevant -%category entry as the value of the \gloskey{parent} key. For -%example, suppose I want a glossary of mathematical symbols that -%are divided into Greek letters and Roman letters. Then I can -%define the categories as follows: +% The glossary keys whose values are written to another file (i.e.\ +% \gloskey{sort}, \gloskey{name}, \gloskey{description} and +% \gloskey{symbol}) need to be sanitized, otherwise fragile +% commands would not be able to be used in +% \ics{newglossaryentry}. However, strange results will occur +% if you then use those fields in the document. As these fields +% are not normally used in the document, but are by default only +% used in the glossary, the default is to sanitize them. If however +% you want to use these values in the document (either by redefining +% commands like \ics{glsdisplay} or by using commands like +% \ics{glsentrydesc}) you will have to switch off the +% sanitization using the \pkgopt{sanitize} package option, but +% you will then have to use \ics{protect} to protect fragile +% commands when defining new glossary entries. +% The \pkgopt{sanitize} option +% takes a key-value list as its value, which can be used to +% switch individual values on and off. For example: %\begin{verbatim} -%\newglossaryentry{greekletter}{name={Greek letters}, -%description={\nopostdesc}} -% -%\newglossaryentry{romanletter}{name={Roman letters}, -%description={\nopostdesc}} +%\usepackage[sanitize={description,name,symbol=false}]{glossaries} %\end{verbatim} +%will switch off the sanitization for the \gloskey{symbol} key, but +% switch it on for the \gloskey{description} and \gloskey{name} keys. +% This would mean that you can use fragile commands in the +%description and name when defining a new glossary entry, but not +% for the symbol. % -%Note that in this example, the category entries don't need a -%description so I have set the descriptions to \ics{nopostdesc}. -%This gives a blank description and suppresses the -%description terminator. +% The default values are defined as: +%\begin{macro}{\@gls@sanitizedesc} +% \begin{macrocode} +\newcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@gls@sanitizename} +% \begin{macrocode} +\newcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@gls@sanitizesymbol} +% \begin{macrocode} +\newcommand*{\@gls@sanitizesymbol}{\@onelevel@sanitize\@glo@symbol} +% \end{macrocode} +%\end{macro} +% (There is no equivalent for the \gloskey{sort} key, since that +% is only provided for the benefit of \app{makeindex} or +% \app{xindy}, and so will always be sanitized.) % -%I can now define my sub-entries as follows: -%\begin{verbatim} -%\newglossaryentry{pi}{name={pi}, -%description={ratio of the circumference of a circle to the diameter}, -%parent=greekletter} +% Before defining the \pkgopt{sanitize} package option, The +% key-value list for the \pkgopt{sanitize} value needs to be defined. +% These are all boolean keys. If they are not given a value, assume +% \texttt{true}. % -%\newglossaryentry{C}{name=C, -%description={Euler's constant}, -%parent=romanletter} -%\end{verbatim} +% Firstly the \gloskey{description}. If set, it will redefine +% \cs{@gls@sanitizedesc} to use \cs{@onelevel@sanitize}, +% otherwise \cs{@gls@sanitizedesc} will do nothing. +% \begin{macrocode} +\define@boolkey[gls]{sanitize}{description}[true]{% +\ifgls@sanitize@description + \renewcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc}% +\else + \renewcommand*{\@gls@sanitizedesc}{}% +\fi +} +% \end{macrocode} +% Similarly for the \gloskey{name} key: +% \begin{macrocode} +\define@boolkey[gls]{sanitize}{name}[true]{% +\ifgls@sanitize@name + \renewcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name}% +\else + \renewcommand*{\@gls@sanitizename}{}% +\fi} +% \end{macrocode} +% and for the \gloskey{symbol} key: +% \begin{macrocode} +\define@boolkey[gls]{sanitize}{symbol}[true]{% +\ifgls@sanitize@symbol + \renewcommand*{\@gls@sanitizesymbol}{% +\@onelevel@sanitize\@glo@symbol}% +\else + \renewcommand*{\@gls@sanitizesymbol}{}% +\fi} +% \end{macrocode} % +%\begin{option}{sanitize} +% Now define the \pkgopt{sanitize} option. It can either take +% a key-val list as its value, or it can take the keyword +% \texttt{none}, which is equivalent to \texttt{description=false, +% symbol=false, name=false}: +% \begin{macrocode} +\define@key{glossaries.sty}{sanitize}[description=true,symbol=true, +name=true]{% +\ifthenelse{\equal{#1}{none}}{% +\renewcommand*{\@gls@sanitizedesc}{}% +\renewcommand*{\@gls@sanitizename}{}% +\renewcommand*{\@gls@sanitizesymbol}{}% +}{\setkeys[gls]{sanitize}{#1}}% +} +% \end{macrocode} +%\end{option} +%\begin{option}{translate} +%\changes{1.1}{2008 Feb 22}{translate option added} +% Define \pkgopt{translate} option. If false don't set up +% multi-lingual support. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{translate}[true]{} +% \end{macrocode} +%\end{option} +% Set the default value: +% \begin{macrocode} +\glstranslatefalse +\@ifpackageloaded{translator}{\glstranslatetrue}{% +\@ifpackageloaded{babel}{\glstranslatetrue}{% +\@ifpackageloaded{polyglossia}{\glstranslatetrue}{}}} +% \end{macrocode} % -%\paragraph{Homographs} Sub-entries that have the same name as -%the parent entry, don't need to have the \gloskey{name} key. -%For example, the word \qt{glossary} can mean a list of technical -%words or a collection of glosses. In both cases the plural is -%\qt{glossaries}. So first define the parent entry: -%\begin{verbatim} -%\newglossaryentry{glossary}{name=glossary, -%description={\nopostdesc}, -%plural={glossaries}} -%\end{verbatim} -%Again, the parent entry has no description, so the description -%terminator needs to be suppressed using \ics{nopostdesc}. -% -%Now define the two different meanings of the word: -%\begin{verbatim} -%\newglossaryentry{glossarylist}{ -%description={1) list of technical words}, -%sort={1}, -%parent={glossary}} -% -%\newglossaryentry{glossarycol}{ -%description={2) collection of glosses}, -%sort={2}, -%parent={glossary}} -%\end{verbatim} -%Note that if I reference the parent entry, the location will be -%added to the parent's \term{number list}, whereas if I reference -%any of the child entries, the location will be added to the child -%entry's number list. Note also that since the sub-entries have the -%same name, the \gloskey{sort} key is required. -% -%In the above example, the plural form for both of the child entries -%is the same as the parent entry, so the \gloskey{plural} key was -%not required for the child entries. However, if the sub-entries -%have different plurals, they will need to be specified. For example: -%\begin{verbatim} -%\newglossaryentry{bravo}{name={bravo}, -%description={\nopostdesc}} -% -%\newglossaryentry{bravocry}{description={1) cry of approval (pl.\ bravos)}, -%sort={1}, -%plural={bravos}, -%parent=bravo} -% -%\newglossaryentry{bravoruffian}{description={2) hired ruffian or -%killer (pl.\ bravoes)}, -%sort={2}, -%plural={bravoes}, -%parent=bravo} -%\end{verbatim} +%\begin{option}{hyperfirst} +%\changes{2.03}{2009 Sep 23}{new} +% Set whether or not terms should have a hyperlink on first use. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{hyperfirst}[true]{} +\glshyperfirsttrue +% \end{macrocode} +%\end{option} % +%\begin{option}{footnote} +% Set the long form of the acronym in footnote on first use. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[glsacr]{footnote}[true]{% +\ifthenelse{\boolean{glsacrdescription}}{}% +{\renewcommand*{\@gls@sanitizedesc}{}}% +} +% \end{macrocode} +%\end{option} +%\begin{option}{description} +% Allow acronyms to have a description (needs to be set using +% the \gloskey{description} key in the optional argument of +% \ics{newacronym}). +% \begin{macrocode} +\define@boolkey{glossaries.sty}[glsacr]{description}[true]{% + \renewcommand*{\@gls@sanitizesymbol}{}% +} +% \end{macrocode} +%\end{option} +%\begin{option}{smallcaps} +% Define \ics{newacronym} to set the short form in small capitals. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[glsacr]{smallcaps}[true]{% + \renewcommand*{\@gls@sanitizesymbol}{}% +} +% \end{macrocode} +%\end{option} +%\begin{option}{smaller} +% Define \ics{newacronym} to set the short form using \cs{smaller} +% which obviously needs to be defined by loading the appropriate +% package. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[glsacr]{smaller}[true]{% + \renewcommand*{\@gls@sanitizesymbol}{}% +} +% \end{macrocode} +%\end{option} +%\begin{option}{dua} +% Define \ics{newacronym} to always use the long forms +% (i.e.\ don't use acronyms) +% \begin{macrocode} +\define@boolkey{glossaries.sty}[glsacr]{dua}[true]{% + \renewcommand*{\@gls@sanitizesymbol}{}% +} +% \end{macrocode} +%\end{option} +%\begin{option}{shotcuts} +% Define acronym shortcuts. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[glsacr]{shortcuts}[true]{} +% \end{macrocode} +%\end{option} % -%\subsubsection{Loading Entries From a File} -%\label{sec:loadglsentries} +%\begin{macro}{\glsorder} +% Stores the glossary ordering. This may either be \qt{word} +% or \qt{letter}. This passes the relevant information to +% \app{makeglossaries}. The default is word ordering. +% \begin{macrocode} +\newcommand*{\glsorder}{word} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsorder} +% The ordering information is written to the auxiliary file +% for \app{makeglossaries}, so ignore the auxiliary +% information. +% \begin{macrocode} +\newcommand*{\@glsorder}[1]{} +% \end{macrocode} +%\end{macro} % -%You can store all your glossary entry definitions in another -%file and use: -%\begin{definition}[\DescribeMacro{\loadglsentries}] -%\cs{loadglsentries}\oarg{type}\marg{filename} -%\end{definition} -%where \meta{filename} is the name of the file containing all the -%\cs{newglossaryentry} commands. The optional argument -%\meta{type} is the name of the glossary to which those entries -%should belong, for those entries where the \gloskey{type} key has -%been omitted (or, more specifically, for those entries whose -%type has been specified by \cs{glsdefaulttype}, which is what -%\cs{newglossaryentry} uses by default). For example, suppose I have -%a file called \texttt{myentries.tex} which contains: -%\begin{verbatim} -%\newglossaryentry{perl}{type=main, -%name={Perl}, -%description={A scripting language}} +%\begin{option}{order} +%\changes{1.17}{2008 December 26}{order package option added} +% \begin{macrocode} +\define@choicekey{glossaries.sty}{order}{word,letter}{% + \def\glsorder{#1}} +% \end{macrocode} +%\end{option} % -%\newglossaryentry{tex}{name={\TeX}, -%description={A typesetting language},sort={TeX}} +%\changes{1.17}{2008 December 26}{added xindy support} +%\begin{macro}{\ifglsxindy} +%\changes{1.17}{2008 December 26}{new} +% Provide boolean to determine whether \app{xindy} or +% \app{makeindex} will be used to sort the glossaries. +% \begin{macrocode} +\newif\ifglsxindy +% \end{macrocode} +%\end{macro} +% The default is \app{makeindex}: +% \begin{macrocode} +\glsxindyfalse +% \end{macrocode} % -%\newglossaryentry{html}{type=\glsdefaulttype, -%name={html}, -%description={A mark up language}} -%\end{verbatim} -%and suppose in my document preamble I use the command: -%\begin{verbatim} -%\loadglsentries[languages]{myentries} -%\end{verbatim} -%then this will add the entries \texttt{tex} and \texttt{html} -%to the glossary whose type is given by \texttt{languages}, but -%the entry \texttt{perl} will be added to the main glossary, since -%it explicitly sets the type to \texttt{main}. -% -%\textbf{Note:} if you use \cs{newacronym} (see -%\sectionref{sec:acronyms}) the type is set as -%\verb|type=\acronymtype| unless you explicitly override it. For -%example, if my file \texttt{myacronyms.tex} contains: -%\begin{verbatim} -%\newacronym{aca}{aca}{a contrived acronym} -%\end{verbatim} -%then (supposing I have defined a new glossary type called -%\texttt{altacronym}) -%\begin{verbatim} -%\loadglsentries[altacronym]{myacronyms} -%\end{verbatim} -%will add \texttt{aca} to the glossary type \texttt{acronym}, if the -%package option \pkgopt{acronym} has been specified, or will add -%\texttt{aca} to the glossary type \texttt{altacronym}, if the -%package option \pkgopt{acronym} is not specified.\footnote{This is -%because \cs{acronymtype} is set to \cs{glsdefaulttype} if the -%\pkgopt{acronym} package option is not used.} In this instance, it -%is better to change \texttt{myacronyms.tex} to: -%\begin{verbatim} -%\newacronym[type=\glsdefaulttype]{aca}{aca}{a contrived acronym} -%\end{verbatim} -%and now -%\begin{verbatim} -%\loadglsentries[altacronym]{myacronyms} -%\end{verbatim} -%will add \texttt{aca} to the glossary type \texttt{altacronym}, -%regardless of whether or not the package option \pkgopt{acronym} is -%used. -% -%Note that only those entries that have been used -%in the text will appear in the relevant glossaries. -%Note also that \cs{loadglsentries} may only be used in the -%preamble. -% -%\subsection{Number lists} -%\label{sec:numberlists} -% -%Each entry in the glossary has an associated \termdef{number list}. -%By default, -%these numbers refer to the pages on which that entry has been used -%(using any of the commands described in \sectionref{sec:glslink} -%and \sectionref{sec:glsadd}). The number list can be suppressed using -%the \pkgopt{nonumberlist} package option, or an alternative counter -%can be set as the default using the \pkgopt{counter} package option. -%The number list is also referred to as the location -%list\index{location list|see{number list}}. -% -%Both \app{makeindex} and \app{xindy} concatenate a -%sequence of 3 or more consecutive pages into a range. With -%\app{xindy} you can vary the minimum sequence length using -%\ics{GlsSetXdyMinRangeLength}\marg{n} where \meta{n} is either -%an integer or the keyword \texttt{none} which indicates that there -%should be no range formation. -% -%\begin{important} -%Note that \cs{GlsSetXdyMinRangeLength} must be used before -%\ics{makeglossaries} and has no effect if \ics{noist} is used. -%\end{important} -% -%With both \app{makeindex} and \app{xindy}, you can replace -%the separator and the closing number in the range using: -%\begin{definition}[\DescribeMacro{\glsSetSuffixF}] -%\cs{glsSetSuffixF}\marg{suffix} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsSetSuffixFF}] -%\cs{glsSetSuffixFF}\marg{suffix} -%\end{definition} -%where the former command specifies the suffix to use for a 2 page -%list and the latter specifies the suffix to use for longer lists. -%For example: -%\begin{verbatim} -%\glsSetSuffixF{f.} -%\glsSetSuffixFF{ff.} -%\end{verbatim} -%Note that if you use \app{xindy}, you will also need to -%set the minimum range length to 1 if you want to change these -%suffixes: -%\begin{verbatim} -%\GlsSetXdyMinRangeLength{1} -%\end{verbatim} -%Note that if you use the \sty{hyperref} package, you will need -%to use \ics{nohyperpage} in the suffix to ensure that the hyperlinks -%work correctly. For example: -%\begin{verbatim} -%\glsSetSuffixF{\nohyperpage{f.}} -%\glsSetSuffixFF{\nohyperpage{ff.}} -%\end{verbatim} +% Define package option to specify that \app{makeindex} will +% be used to sort the glossaries: +% \begin{macrocode} +\DeclareOptionX{makeindex}{\glsxindyfalse} +% \end{macrocode} % -%\begin{important} -%Note that \cs{glsSetSuffixF} and \cs{glsSetSuffixFF} must be used -%before \ics{makeglossaries} and have no effect if \ics{noist} is -%used. -%\end{important} -% -% -%\subsection{Links to Glossary Entries} -%\label{sec:glslink} -% -%Once you have defined a glossary entry using \ics{newglossaryentry}, -%you can refer to that entry in the document using one of the -%commands listed in this section. The text which appears at that -%point in the document when using one of these commands is referred -%to as the \termdef{link text} (even if there are no hyperlinks). The -%commands in this section also add a line to an external file that is -%used by \app{makeindex} or \app{xindy} to generate the relevant -%entry in the glossary. This information includes an associated -%location that is added to the \term{number list} for that entry. By -%default, the location refers to the page number. For further -%information on number lists, see \sectionref{sec:numberlists}. -% -%\begin{important} -%It is strongly recommended that you don't use the commands -%defined in this section in the arguments of sectioning or caption -%commands. -%\end{important} -% -%The above warning is particularly important if you are using the -%\styfmt{glossaries} package in conjunction with the \sty{hyperref} -%package. Instead, use one of the commands listed in -%\sectionref{sec:glsnolink} (such as \cs{glsentrytext}) or provide an -%alternative via the optional argument to the sectioning/caption -%command. Examples: -%\begin{verbatim} -%\section{An overview of \glsentrytext{perl}} -%\section[An overview of Perl]{An overview of \gls{perl}} -%\end{verbatim} +% The \pkgopt{xindy} package option may have a value which in +% turn can be a key=value list. First define the keys for this +% sub-list. The boolean "glsnumbers" determines whether to +% automatically add the \texttt{glsnumbers} letter group. +% \begin{macrocode} +\define@boolkey[gls]{xindy}{glsnumbers}[true]{} +\gls@xindy@glsnumberstrue +% \end{macrocode} % -%The way the \term{link text} is displayed depends on -%\begin{definition}[\DescribeMacro{\glstextformat}] -%\cs{glstextformat}\marg{text} -%\end{definition} -%For example, to make all \term{link text} appear in a sans-serif -%font, do: -%\begin{verbatim} -%\renewcommand*{\glstextformat}[1]{\textsf{#1}} -%\end{verbatim} +%\begin{macro}{\@xdy@main@language} +% Define what language to use for each glossary type (if a +% language is not defined for a particular glossary type +% the language specified for the main glossary is used.) +% \begin{macrocode} +\def\@xdy@main@language{\rootlanguagename}% +% \end{macrocode} +%\end{macro} +% Define key to set the language +% \begin{macrocode} +\define@key[gls]{xindy}{language}{\def\@xdy@main@language{#1}} +% \end{macrocode} % -%Each entry has an associated conditional referred to as the -%\firstuseflag. This determines whether \ics{gls}, -%\ics{glspl} (and their uppercase variants) should use the -%value of the \gloskey{first} or \gloskey{text} keys. Note that an -%entry can be used without affecting the \firstuseflag\ (for example, -%when used with \cs{glslink}). See \sectionref{sec:glsunset} for -%commands that unset or reset this conditional. -% -%The command: -%\begin{definition}[\DescribeMacro{\glslink}] -%\cs{glslink}\oarg{options}\marg{label}\marg{text} -%\end{definition} -%will place \cs{glstextformat}\marg{text} in the document at that -%point and add a line into the associated glossary file for the -%glossary entry given by \meta{label}. If hyperlinks are supported, -%\meta{text} will be a hyperlink to the relevant line in the -%glossary. (Note that this command doesn't affect the \firstuseflag: -%use \ics{glsdisp} instead.) The optional argument \meta{options} -%must be a \meta{key}=\meta{value} list which can take any of the -%following keys: +%\begin{macro}{\gls@codepage} +% Define the code page. If \ics{inputencodingname} is defined +% use that, otherwise have initialise with no codepage. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} +% \begin{macrocode} +\ifcsundef{inputencodingname}{% + \def\gls@codepage{}}{% + \def\gls@codepage{\inputencodingname} +} +% \end{macrocode} +% Define a key to set the code page. +% \begin{macrocode} +\define@key[gls]{xindy}{codepage}{\def\gls@codepage{#1}} +% \end{macrocode} +%\end{macro} % -%\begin{description} -%\item[{\gloskey[glslink]{format}}] This specifies how to format the -%associated location number for this entry in the glossary. This -%value is equivalent to the \app{makeindex} encap value, and (as -%with \cs{index}) the value needs to be the name of a command -%\emph{without} the initial backslash. As with \cs{index}, the -%characters \verb"(" and \verb")" can also be used to specify the -%beginning and ending of a number range. Again as with \cs{index}, -%the command should be the name of a command which takes an argument -%(which will be the associated location). Be careful not to use a -%declaration (such as \texttt{bfseries}) instead of a text block command -%(such as \texttt{textbf}) as the effect is not guaranteed to be -%localised. If you want to apply more than one style to a given entry -%(e.g.\ \textbf{bold} and \emph{italic}) you will need to create a -%command that applies both formats, e.g.\ -%\begin{verbatim} -%\newcommand*{\textbfem}[1]{\textbf{\emph{#1}}} -%\end{verbatim} -%and use that command. -% -%In this document, the standard formats refer to the standard text -%block commands such as \ics{textbf} or \ics{emph} or any of the -%commands listed in \tableref{tab:hyperxx}. -% -%\begin{important} -%If you use \app{xindy} instead of \app{makeindex}, you -%must specify any non-standard formats that you want to use -%with the \gloskey[glslink]{format} key using -%\ics{GlsAddXdyAttribute}\marg{name}. So if you use -%\app{xindy} with the above example, you would need to add: -%\begin{verbatim} -%\GlsAddXdyAttribute{textbfem} -%\end{verbatim} -%\end{important} -% -%Note that unlike \cs{index}, you can't have anything following the -%command name, such as an asterisk or arguments. If you want to -%cross-reference another entry, either use the \gloskey{see} key when -%you define the entry or use \ics{glssee} (described in -%\sectionref{sec:crossref}). -% -% -%If you are using hyperlinks and you want to change the font of the -%hyperlinked location, don't use \ics{hyperpage} (provided by the -%\sty{hyperref} package) as the locations may not refer to a page -%number. Instead, the \styfmt{glossaries} package provides number -%formats listed in \tableref{tab:hyperxx}. -% -%\begin{table}[htbp] -%\caption{Predefined Hyperlinked Location Formats} -%\label{tab:hyperxx} -%\centering -%\vskip\baselineskip -%\begin{tabular}{ll} -%\locfmt{hyperrm} & serif hyperlink\\ -%\locfmt{hypersf} & sans-serif hyperlink\\ -%\locfmt{hypertt} & monospaced hyperlink\\ -%\locfmt{hyperbf} & bold hyperlink\\ -%\locfmt{hypermd} & medium weight hyperlink\\ -%\locfmt{hyperit} & italic hyperlink\\ -%\locfmt{hypersl} & slanted hyperlink\\ -%\locfmt{hyperup} & upright hyperlink\\ -%\locfmt{hypersc} & small caps hyperlink\\ -%\locfmt{hyperemph} & emphasized hyperlink -%\end{tabular} -%\par -%\end{table} -% -%Note that if the \ics{hyperlink} command hasn't been defined, -%the \texttt{hyper}\meta{xx} formats are equivalent to the -%analogous \texttt{text}\meta{xx} font commands (and \texttt{hyperemph} -%is equivalent to \texttt{emph}). If you want to -%make a new format, you will need to define a command which takes -%one argument and use that. For example, if you want the location -%number to be in a bold sans-serif font, you can define a -%command called, say, \cs{hyperbsf}: -%\begin{verbatim} -%\newcommand{\hyperbsf}[1]{\textbf{\hypersf{#1}}} -%\end{verbatim} -%and then use \texttt{hyperbsf} as the value for the \gloskey{format} -%key. \ifpdf (See also \sectionref{sec:code:printglos}.) \fi -%Remember that if you use \app{xindy}, you will need to add -%this to the list of location attributes: -%\begin{verbatim} -%\GlsAddXdyAttribute{hyperbsf} -%\end{verbatim} +% Define package option to specify that \app{xindy} will be +% used to sort the glossaries: +% \begin{macrocode} +\define@key{glossaries.sty}{xindy}[]{% + \glsxindytrue + \setkeys[gls]{xindy}{#1}% +} +% \end{macrocode} % -%\item[{\gloskey[glslink]{counter}}] This specifies which counter -%to use for this location. This overrides the default counter -%used by this entry. (See also \sectionref{sec:numberlists}.) +%\begin{option}{savewrites} +%\changes{3.0}{2011/04/02}{new} +% The \pkgopt{savewrites} package option is provided to save on +% the number of write registers. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{savewrites}[true]{} +% \end{macrocode} +%\end{option} +% Set default: +% \begin{macrocode} +\glssavewritesfalse +% \end{macrocode} % -%\item[{\gloskey[glslink]{hyper}}] This is a boolean key which can -%be used to enable/disable the hyperlink to the relevant entry -%in the glossary. (Note that setting \texttt{hyper=true} will have no -%effect if \cs{hyperlink} has not been defined.) The default -%value is \texttt{hyper=true}. +%\begin{macro}{\GlossariesWarning} +% Prints a warning message. +% \begin{macrocode} +\newcommand*{\GlossariesWarning}[1]{% + \PackageWarning{glossaries}{#1}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\GlossariesWarningNoLine} +% Prints a warning message without the line number. +% \begin{macrocode} +\newcommand*{\GlossariesWarningNoLine}[1]{% + \PackageWarningNoLine{glossaries}{#1}% +} +% \end{macrocode} +%\end{macro} +% Define package option to suppress warnings +% \begin{macrocode} +\DeclareOptionX{nowarn}{% + \renewcommand*{\GlossariesWarning}[1]{}% + \renewcommand*{\GlossariesWarningNoLine}[1]{}% +} +% \end{macrocode} +%\begin{option}{compatible-2.07} +%\changes{3.0}{2011/04/02}{compatible-2.07 option added} +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{compatible-2.07}[true]{} +\csname glscompatible-2.07false\endcsname +% \end{macrocode} +%\end{option} % -%\end{description} -%There is also a starred version: -%\begin{definition}[\DescribeMacro{\glslink*}] -%\cs{glslink*}\oarg{options}\marg{label}\marg{text} -%\end{definition} -%which is equivalent to \cs{glslink}, except it sets -%\texttt{hyper=false}. Similarly, all the following commands -%described in this section also have a starred version that disables -%the hyperlink. -% -%The command: -%\begin{definition}[\DescribeMacro{\gls}] -%\cs{gls}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is the same as \cs{glslink}, except that the \term{link text} -%is determined from the values of the \gloskey{text} and -%\gloskey{first} keys supplied when the entry was defined using -%\ics{newglossaryentry}. If the entry has been marked as having -%been used\ifirstuseflag, the value of the \gloskey{text} key will be used, otherwise -%the value of the \gloskey{first} key will be used. -%On completion, \cs{gls} will mark the entry's first use flag\ifirstuseflag\ as -%used. -% -%There are two uppercase variants: -%\begin{definition}[\DescribeMacro{\Gls}] -%\cs{Gls}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%and -%\begin{definition}[\DescribeMacro{\GLS}] -%\cs{GLS}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%which make the first letter of the link text or all the link text -%uppercase, respectively. % -%The final optional argument \meta{insert}, allows you to insert -%some additional text into the link text. By default, this will -%append \meta{insert} at the end of the link text, but this -%can be changed (see \sectionref{sec:glsdisplay}). +% Process package options: +% \begin{macrocode} +\ProcessOptionsX +% \end{macrocode} +% If \isty{babel} package is loaded, check to see if +% \isty{translator} is installed, but only if translation is +% required. +%\changes{2.02}{2009 July 13}{translate=false will prevent +% automatic loading of translator package} +% \begin{macrocode} +\ifglstranslate + \@ifpackageloaded{babel}{\IfFileExists{translator.sty}{% + \RequirePackage{translator}}{}}{} +\fi +% \end{macrocode} % +% If chapters are defined and the user has requested the +% section counter as a package option, \cs{@chapter} will +% be modified so +% that it adds a \texttt{section.}\meta{n}\texttt{.0} target, +% otherwise entries placed before the first section of a chapter +% will have undefined links. % -%The first optional argument \meta{options} is the same as the optional -%argument to \ics{glslink}. As with \cs{glslink}, these commands also -%have a starred version that disable the hyperlink. -% -%There are also analogous plural forms: -%\begin{definition}[\DescribeMacro{\glspl}] -%\cs{glspl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glspl}] -%\cs{Glspl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSpl}] -%\cs{GLSpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%These determine the link text from the \gloskey{plural} and -%\gloskey{firstplural} keys supplied when the entry was first -%defined. As before, these commands also have -%a starred version that disable the hyperlink. -% -%Note that \cs{glslink} doesn't use or affect the \firstuseflag, -%nor does it use \ics{glsdisplay} or \ics{glsdisplayfirst} (see -%\sectionref{sec:glsdisplay}). Instead, you can use: -%\begin{definition}[\DescribeMacro{\glsdisp}] -%\cs{glsdisp}\oarg{options}\marg{label}\marg{link text} -%\end{definition} -%This behaves in the same way as \cs{gls}, except that it uses -%\meta{link text} instead of the value of the \gloskey{first} -%or \gloskey{text} key. (Note that this command always sets -%\meta{insert} to nothing.) This command affects the \firstuseflag, -%and uses \ics{glsdisplay} or \ics{glsdisplayfirst}. -% -%The command: -%\begin{definition}[\DescribeMacro{\glstext}] -%\cs{glstext}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is similar to \ics{gls} except that it always uses the value -%of the \gloskey{text} key and does not affect the -%\firstuseflag. -%Unlike \cs{gls}, the inserted text \meta{insert} -%is always appended to the link text since \cs{glstext} doesn't -%use \ics{glsdisplay} or \ics{glsdisplayfirst}. (The same is -%true for all the following commands described in this section.) -% -%There are also analogous commands: -%\begin{definition}[\DescribeMacro{\Glstext}] -%\cs{Glstext}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLStext}] -%\cs{GLStext}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%As before, these commands also have a starred version that disable -%the hyperlink. -% -%The command: -%\begin{definition}[\DescribeMacro{\glsfirst}] -%\cs{glsfirst}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is similar to \ics{glstext} except that it always uses the value -%of the \gloskey{first} key. Again, \meta{insert} is always appended -%to the end of the link text and does not affect the -%\firstuseflag. -% -%There are also analogous commands: -%\begin{definition}[\DescribeMacro{\Glsfirst}] -%\cs{Glsfirst}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSfirst}] -%\cs{GLSfirst}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%As before, these commands also have a starred version that disable -%the hyperlink. -% -%The command: -%\begin{definition}[\DescribeMacro{\glsplural}] -%\cs{glsplural}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is similar to \ics{glstext} except that it always uses the value -%of the \gloskey{plural} key. Again, \meta{insert} is always appended -%to the end of the link text and does not mark the entry as having -%been used. -% -%There are also analogous commands: -%\begin{definition}[\DescribeMacro{\Glsplural}] -%\cs{Glsplural}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSplural}] -%\cs{GLSplural}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%As before, these commands also have a starred version that disable -%the hyperlink. -% -%The command: -%\begin{definition}[\DescribeMacro{\glsfirstplural}] -%\cs{glsfirstplural}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is similar to \ics{glstext} except that it always uses the value -%of the \gloskey{firstplural} key. Again, \meta{insert} is always -%appended to the end of the link text and does not mark the entry as -%having been used. -% -%There are also analogous commands: -%\begin{definition}[\DescribeMacro{\Glsfirstplural}] -%\cs{Glsfirstplural}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSfirstplural}] -%\cs{GLSfirstplural}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%As before, these commands also have a starred version that disable -%the hyperlink. -% -%The command: -%\begin{definition}[\DescribeMacro{\glsname}] -%\cs{glsname}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is similar to \ics{glstext} except that it always uses the value of -%the \gloskey{name} key. Again, \meta{insert} is always appended to -%the end of the link text and does not mark the entry as having been -%used. Note: if you want to use this command and the \gloskey{name} -%key contains commands, you will have to disable the -%\hyperlink{sanitize}{sanitization} of the \gloskey{name} key and -%protect fragile commands. -% -%There are also analogous commands: -%\begin{definition}[\DescribeMacro{\Glsname}] -%\cs{Glsname}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSname}] -%\cs{GLSname}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%As before, these commands also have a starred version that disable -%the hyperlink. -% -%The command: -%\begin{definition}[\DescribeMacro{\glssymbol}] -%\cs{glssymbol}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is similar to \ics{glstext} except that it always uses the value of -%the \gloskey{symbol} key. Again, \meta{insert} is always appended to -%the end of the link text and does not mark the entry as having been -%used. Note: if you want to use this command and the \gloskey{symbol} -%key contains commands, you will have to disable the -%\hyperlink{sanitize}{sanitization} of the \gloskey{symbol} key and -%protect fragile commands. -% -%There are also analogous commands: -%\begin{definition}[\DescribeMacro{\Glssymbol}] -%\cs{Glssymbol}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSsymbol}] -%\cs{GLSsymbol}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%As before, these commands also have a starred version that disable -%the hyperlink. -% -%The command: -%\begin{definition}[\DescribeMacro{\glsdesc}] -%\cs{glsdesc}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is similar to \ics{glstext} except that it always uses the value of -%the \gloskey{description} key. Again, \meta{insert} is always -%appended to the end of the link text and does not mark the entry as -%having been used. Note: if you want to use this command and the -%\gloskey{description} key contains commands, you will have to -%disable the \hyperlink{sanitize}{sanitization} of the -%\gloskey{description} key and protect fragile commands. -% -%There are also analogous commands: -%\begin{definition}[\DescribeMacro{\Glsdesc}] -%\cs{Glsdesc}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSdesc}] -%\cs{GLSdesc}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%As before, these commands also have a starred version that disable -%the hyperlink. -% -%The command: -%\begin{definition}[\DescribeMacro{\glsuseri}] -%\cs{glsuseri}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%is similar to \ics{glstext} except that it always uses the value -%of the \gloskey{user1} key. Again, \meta{insert} is always -%appended to the end of the link text and does not mark the entry as -%having been used. -% -%There are also analogous commands: -%\begin{definition}[\DescribeMacro{\Glsuseri}] -%\cs{Glsuseri}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSuseri}] -%\cs{GLSuseri}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%As before, these commands also have a starred version that disable -%the hyperlink. Similarly for the other user keys: -%\begin{definition}[\DescribeMacro{\glsuserii}] -%\cs{glsuserii}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsuserii}] -%\cs{Glsuserii}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSuserii}] -%\cs{GLSuserii}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsuseriii}] -%\cs{glsuseriii}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsuseriii}] -%\cs{Glsuseriii}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSuseriii}] -%\cs{GLSuseriii}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsuseriv}] -%\cs{glsuseriv}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsuseriv}] -%\cs{Glsuseriv}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSuseriv}] -%\cs{GLSuseriv}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsuserv}] -%\cs{glsuserv}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsuserv}] -%\cs{Glsuserv}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSuserv}] -%\cs{GLSuserv}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsuservi}] -%\cs{glsuservi}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsuservi}] -%\cs{Glsuservi}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\GLSuservi}] -%\cs{GLSuservi}\oarg{options}\marg{text}\oarg{insert} -%\end{definition} -% -% -% -%\subsubsection{Changing the format of the link text} -%\label{sec:glsdisplay} -% -%The format of the \term{link text} for \ics{gls}, \ics{glspl} -%and their uppercase variants is governed by two commands: -%\begin{definition}[\DescribeMacro{\glsdisplayfirst}] -%\cs{glsdisplayfirst}\marg{first/first plural}\marg{description}\marg{symbol}\marg{insert} -%\end{definition} -%which is used the -%first time a glossary entry is used\ifirstuse\ in the text and -%\begin{definition}[\DescribeMacro{\glsdisplay}] -%\cs{glsdisplay}\marg{text/plural}\marg{description}\marg{symbol}\marg{insert} -%\end{definition} -%which is used subsequently. -%Both commands take four arguments: the first is either the singular or -%plural form given by the \gloskey{text}, \gloskey{plural}, -%\gloskey{first} or \gloskey{firstplural} keys (set when the term was -%defined) depending on context; the second argument is the term's -%description (as supplied by the \gloskey{description} or -%\gloskey{descriptionplural} keys); the third -%argument is the symbol associated with the term (as supplied by the -%\gloskey{symbol} or \gloskey{symbolplural} keys) and the fourth argument is the additional text -%supplied in the final optional argument to \cs{gls} or -%\cs{glspl} (or their uppercase variants). The default definitions -%of \cs{glsdisplay} and \cs{glsdisplayfirst} simply -%print the first argument immediately followed by the fourth argument. -%The remaining arguments are ignored. -% -%If required, you can access the label for the given entry via -%\begin{definition}[\DescribeMacro{\glslabel}] -%\cs{glslabel} -%\end{definition} -%so it is possible to use this label in the definition of -%\cs{glsdisplay} or \cs{glsdisplayfirst} to supply additional -%information using any of the commands described in -%\sectionref{sec:glsnolink}, if required. -% -%Note that \cs{glsdisplay} and \cs{glsdisplayfirst} are not used -%by \ics{glslink}. If you want to supply your own link text, you -%need to use \ics{glsdisp} instead. -% -%For example, suppose you want a glossary of measurements and -%units, you can use the \gloskey{symbol} key to store the unit: -%\begin{verbatim} -%\newglossaryentry{distance}{name=distance, -%description={The length between two points}, -%symbol={km}} -%\end{verbatim} -%and now suppose you want \verb|\gls{distance}| to produce -%\qt{distance (km)} on \firstuse, then you can redefine -%\cs{glsdisplayfirst} as follows: -%\begin{verbatim} -%\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} -%\end{verbatim} -%Note that the additional text is placed after \verb|#1|, so -%\verb|\gls{distance}['s]| will produce \qt{distance's (km)} -%rather than \qt{distance (km)'s} which looks a bit odd (even though -%it may be in the context of \qt{the distance (km) is measured between -%the two points} --- but in this instance it would be better not to -%use a contraction). -% -%Note also that all of the \term{link text} will be formatted according -%to \ics{glstextformat} (described earlier). So if you do, say: -%\begin{verbatim} -%\renewcommand{\glstextformat}[1]{\textbf{#1}} -%\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} -%\end{verbatim} -%then \verb|\gls{distance}| will produce \qt{\textbf{distance (km)}}. -% -%If you have multiple glossaries, changing \cs{glsdisplayfirst} and -%\cs{glsdisplay} will change the way entries for all of the -%glossaries appear when using the commands \ics{gls}, \ics{glspl}, their -%uppercase variants and \ics{glsdisp}. If you only -%want the change to affect entries for a given glossary, then you need -%to use -%\begin{definition}[\DescribeMacro{\defglsdisplay}] -%\cs{defglsdisplay}\oarg{type}\marg{definition} -%\end{definition} -%and -%\begin{definition}[\DescribeMacro{\defglsdisplayfirst}] -%\cs{defglsdisplayfirst}\oarg{type}\marg{definition} -%\end{definition} -%instead of redefining \cs{glsdisplay} and \cs{glsdisplayfirst}. -% -%Both \cs{defglsdisplay} and \cs{defglsdisplayfirst} take two arguments: -%the first (which is optional) is the glossary's label\footnote{\texttt{main} for the main -%(default) glossary, \cs{acronymtype} for the list of acronyms, or the -%name supplied in the first mandatory argument to \cs{newglossary} for -%additional glossaries.} and the second is how the term should be -%displayed when it is invoked using commands \cs{gls}, -%\cs{glspl}, their uppercase variants and \cs{glsdisp}. This is similar to the way \cs{glsdisplayfirst} was -%redefined above. -% -%For example, suppose you have created a new glossary called -%\texttt{notation} and you want to change the way the entry is -%displayed on \firstuse\ so that it includes the symbol, you can do: -%\begin{verbatim} -%\defglsdisplayfirst[notation]{#1#4 (denoted #3)} -%\end{verbatim} -%Now suppose you have defined an entry as follows: -%\begin{verbatim} -%\newglossaryentry{set}{type=notation, -% name=set, -% description={A collection of objects}, -% symbol={$S$} -%} -%\end{verbatim} -%The first time you reference this entry it will be displayed as: -%\qt{set (denoted $S$)} (assuming \ics{gls} was used). -% -%Remember that if you use the \gloskey{symbol} key, you need to use a -%glossary style that displays the symbol, as many of the styles -%ignore it. In addition, if you want either the description or symbol -%to appear in the \term{link text}, you will have to disable the -%\hyperlink{sanitize}{sanitization} of these keys and protect fragile -%commands. -% -%\subsubsection{Enabling and disabling hyperlinks to glossary entries} -% -%If you load the \sty{hyperref} or \sty{html} packages prior to -%loading the \styfmt{glossaries} package, commands such as \ics{glslink} -%and \ics{gls}, described above, will automatically have hyperlinks -%to the relevant glossary entry, unless the \gloskey[glslink]{hyper} -%option has been set to \texttt{false}. You can disable or enable links using: -%\begin{definition}[\DescribeMacro{\glsdisablehyper}] -%\cs{glsdisablehyper} -%\end{definition} -%and -%\begin{definition}[\DescribeMacro{\glsenablehyper}] -%\cs{glsenablehyper} -%\end{definition} -%respectively. The effect can be localised by placing the commands -%within a group. Note that you should only use \cs{glsenablehyper} -%if the commands \ics{hyperlink} and \ics{hypertarget} have been -%defined (for example, by the \sty{hyperref} package). -% -%You can disable just the first use links using the package -%option \pkgopt[false]{hyperfirst}. Note that this option only -%affects commands that recognise the \firstuse\ flag, for example -%\ics{gls}, \ics{glspl} and \ics{glsdisp} but not \ics{glslink}. -% -% -%\subsection{Adding an Entry to the Glossary Without Generating Text} -%\label{sec:glsadd} -% -%It is possible to add a line in the glossary file without -%generating any text at that point in the document using: -%\begin{definition}[\DescribeMacro{\glsadd}] -%\cs{glsadd}\oarg{options}\marg{label} -%\end{definition} -%This is similar to \ics{glslink}, only it doesn't produce -%any text (so therefore, there is no \gloskey[glslink]{hyper} key -%available in \meta{options} but all the other options that can -%be used with \cs{glslink} can be passed to \cs{glsadd}). -%For example, to add a page range to the glossary number list for the -%entry whose label is given by \texttt{set}: -%\begin{verbatim} -%\glsadd[format=(]{set} -%Lots of text about sets spanning many pages. -%\glsadd[format=)]{set} -%\end{verbatim} -% -%To add all entries that have been defined, use: -%\begin{definition}[\DescribeMacro{\glsaddall}] -%\cs{glsaddall}\oarg{options} -%\end{definition} -%The optional argument is the same as for \cs{glsadd}, except -%there is also a key \gloskey[glsaddall]{types} which can be -%used to specify which glossaries to use. This should be a -%comma separated list. For example, if you only want to add -%all the entries belonging to the list of acronyms (specified by -%the glossary type \cs{acronymtype}) and a list of -%notation (specified by the glossary type \texttt{notation}) then you can -%do: -%\begin{verbatim} -%\glsaddall[types={\acronymtype,notation}] -%\end{verbatim} -% -% -%\subsection{Cross-Referencing Entries} -%\label{sec:crossref} -% -%There are several ways of cross-referencing entries in the -%glossary: -% -%\begin{enumerate} -%\item You can use commands such as \ics{gls} in the -%entries description. For example: -%\begin{verbatim} -%\newglossaryentry{apple}{name=apple, -%description={firm, round fruit. See also \gls{pear}}} -%\end{verbatim} -%Note that with this method, if you don't use the -%cross-referenced term in the glossary, you will need two runs of -%\app{makeglossaries}: -%\begin{prompt} -%latex filename -%makeglossaries filename -%latex filename -%makeglossaries filename -%latex filename -%\end{prompt} -% -%\item As described in \sectionref{sec:newglosentry}, you can use the -%\gloskey{see} key when you define the entry. For example: -%\begin{verbatim} -%\newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, -%description={Series expansion}, see={TaylorsTheorem}} -%\end{verbatim} -%Note that in this case, the entry with the \gloskey{see} key will -%automatically be added to the glossary, but the cross-referenced -%entry won't. You therefore need to ensure that you use the -%cross-referenced term with the commands described in -%\sectionref{sec:glslink} or \sectionref{sec:glsadd}. -% -%You can optionally override the \qt{see} tag using square brackets -%at the start of the \gloskey{see} value. For example: -%\begin{verbatim} -%\newglossaryentry{MaclaurinSeries}{name={Maclaurin series}, -%description={Series expansion}, -%see=[see also]{TaylorsTheorem}} -%\end{verbatim} -% -%\item After you have defined the entry, use -%\begin{definition}[\DescribeMacro{\glssee}] -%\cs{glssee}\oarg{tag}\marg{label}\marg{xr label list} -%\end{definition} -%where \meta{xr label list} is a comma-separated list of entry -%labels to be cross-referenced, \meta{label} is the label of the -%entry doing the cross-referencing and \meta{tag} is the \qt{see} tag. -%For example: -%\begin{verbatim} -%\glssee[see also]{series}{FourierSeries,TaylorsTheorem} -%\end{verbatim} -%Note that this automatically adds the entry given by \meta{label} to -%the glossary but doesn't add the cross-referenced entries (specified -%by \meta{xr label list}) to the glossary. -%\end{enumerate} -% -%In both cases~2 and 3 above, the cross-referenced information appears -%in the \term{number list}, whereas in case~1, the cross-referenced -%information appears in the description. In cases~2 and~3, the -%default text for the \qt{see} tag is given by \ics{seename}. -% -% -%\subsection{Using Glossary Terms Without Links} -%\label{sec:glsnolink} -% -%The commands described in this section display entry details without -%adding any information to the glossary. They don't use -%\cs{glstextformat}, they don't have any optional arguments, they -%don't affect the \firstuseflag\ and, apart from \ics{glshyperlink}, -%they don't produce hyperlinks. -%\begin{definition}[\DescribeMacro{\glsentryname}] -%\cs{glsentryname}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryname}] -%\cs{Glsentryname}\marg{label} -%\end{definition} -%These commands display the name of the glossary entry given by -%\meta{label}, as specified by the \gloskey{name} key. -%\cs{Glsentryname} makes the first letter uppercase. -%\begin{definition}[\DescribeMacro{\glsentrytext}] -%\cs{glsentrytext}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentrytext}] -%\cs{Glsentrytext}\marg{label} -%\end{definition} -%These commands display the subsequent use text for the glossary -%entry given by \meta{label}, as specified by the \gloskey{text} key. -%\cs{Glsentrytext} makes the first letter uppercase. -%\begin{definition}[\DescribeMacro{\glsentryplural}] -%\cs{glsentryplural}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryplural}] -%\cs{Glsentryplural}\marg{label} -%\end{definition} -%These commands display the subsequent use plural text for the -%glossary entry given by \meta{label}, as specified by the -%\gloskey{plural} key. \cs{Glsentryplural} makes the first letter -%uppercase. -%\begin{definition}[\DescribeMacro{\glsentryfirst}] -%\cs{glsentryfirst}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryfirst}] -%\cs{Glsentryfirst}\marg{label} -%\end{definition} -%These commands display the \firstusetext\ for the glossary entry -%given by \meta{label}, as specified by the \gloskey{first} key. -%\cs{Glsentryfirst} makes the first letter uppercase. -%\begin{definition}[\DescribeMacro{\glsentryfirstplural}] -%\cs{glsentryfirstplural}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryfirstplural}] -%\cs{Glsentryfirstplural}\marg{label} -%\end{definition} -%These commands display the plural form of the \firstusetext\ for the -%glossary entry given by \meta{label}, as specified by the -%\gloskey{firstplural} key. \cs{Glsentryfirstplural} makes the first -%letter uppercase. -%\begin{definition}[\DescribeMacro{\glsentrydesc}] -%\cs{glsentrydesc}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentrydesc}] -%\cs{Glsentrydesc}\marg{label} -%\end{definition} -%These commands display the description for the glossary entry given -%by \meta{label}. \cs{Glsentrydesc} makes the first letter uppercase. -%\begin{definition}[\DescribeMacro{\glsentrydescplural}] -%\cs{glsentrydescplural}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentrydescplural}] -%\cs{Glsentrydescplural}\marg{label} -%\end{definition} -%These commands display the plural description for the glossary entry -%given by \meta{label}. \cs{Glsentrydescplural} makes the first -%letter uppercase. -%\begin{definition}[\DescribeMacro{\glsentrysymbol}] -%\cs{glsentrysymbol}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentrysymbol}] -%\cs{Glsentrysymbol}\marg{label} -%\end{definition} -%These commands display the symbol for the glossary entry given by -%\meta{label}. \cs{Glsentrysymbol} makes the first letter uppercase. -%\begin{definition}[\DescribeMacro{\glsentrysymbolplural}] -%\cs{glsentrysymbolplural}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentrysymbolplural}] -%\cs{Glsentrysymbolplural}\marg{label} -%\end{definition} -%These commands display the plural symbol for the glossary entry -%given by \meta{label}. \cs{Glsentrysymbolplural} makes the first -%letter uppercase. -%\begin{definition}[\DescribeMacro{\glsentryuseri}] -%\cs{glsentryuseri}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryuseri}] -%\cs{Glsentryuseri}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsentryuserii}] -%\cs{glsentryuserii}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryuserii}] -%\cs{Glsentryuserii}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsentryuseriii}] -%\cs{glsentryuseriii}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryuseriii}] -%\cs{Glsentryuseriii}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsentryuseriv}] -%\cs{glsentryuseriv}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryuseriv}] -%\cs{Glsentryuseriv}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsentryuserv}] -%\cs{glsentryuserv}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryuserv}] -%\cs{Glsentryuserv}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsentryuservi}] -%\cs{glsentryuservi}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Glsentryuservi}] -%\cs{Glsentryuservi}\marg{label} -%\end{definition} -%These commands display the value of the user keys for the glossary -%entry given by \meta{label}. -%\begin{definition}[\DescribeMacro{\glshyperlink}] -%\cs{glshyperlink}\oarg{link text}\marg{label} -%\end{definition} -%This command provides a hyperlink to the glossary entry given by -%\meta{label} \textbf{but does not add any information to the -%glossary file}. The link text is given by -%\ics{glsentryname}\marg{label} by default, but can be overridden -%using the optional argument. -%\begin{important} -%If you use \cs{glshyperlink}, you need to ensure that the relevant -%entry has been added to the glossary using any of the commands -%described in \sectionref{sec:glslink} or \sectionref{sec:glsadd} -%otherwise you will end up with a broken link. -%\end{important} -% -%For further information see \ifpdf -%\sectionref{sec:code:glsnolink}\else the section \qt{Displaying -%entry details without adding information to the glossary} in the -%document \url{glossaries.pdf}\fi. -% -% -%\subsection{Displaying a glossary} -%\label{sec:printglossary} -% -%The command -%\begin{definition}[\DescribeMacro{\printglossaries}] -%\cs{printglossaries} -%\end{definition} -%will display all the glossaries in the order in which they were -%defined. Note that no glossaries will appear until you have either -%used the Perl script \app{makeglossaries} or have directly used -%\app{makeindex} or \app{xindy} (as described in -%\sectionref{sec:makeglossaries}). If the glossary -%still does not appear after you re-\LaTeX\ your document, check the -%\app{makeindex}/\app{xindy} log files to see if there is a problem. -%Remember that you also need to use the command \ics{makeglossaries} -%in the preamble to enable the glossaries. -% -%An individual glossary can be displayed using: -%\begin{definition}[\DescribeMacro{\printglossary}] -%\cs{printglossary}\oarg{options} -%\end{definition} -%where \meta{options} is a \meta{key}=\meta{value} list of options. -%The following keys are available: -%\begin{description} -%\item[{\gloskey[printglossary]{type}}] The value of this key -%specifies which glossary to print. If omitted, the default -%glossary is assumed. For example, to print the list of acronyms: -%\begin{verbatim} -%\printglossary[type=\acronymtype] -%\end{verbatim} -% -%\item[{\gloskey[printglossary]{title}}] This is the glossary's -%title (overriding the title specified when the glossary was -%defined). -% -%\item[{\gloskey[printglossary]{toctitle}}] This is the title -%to use for the table of contents (if the \pkgopt{toc} package -%option has been used). It may also be used for the page header, -%depending on the page style. If omitted, the glossary title is used. -% -%\item[{\gloskey[printglossary]{style}}] This specifies which -%glossary style to use for this glossary, overriding the effect -%of the \pkgopt{style} package option or \ics{glossarystyle}. -% -%\item[{\gloskey[printglossary]{numberedsection}}] This specifies -%whether to use a numbered section for this glossary, overriding -%the effect of the \pkgopt{numberedsection} package option. This -%key has the same syntax as the \pkgopt{numberedsection} package -%option, described in \sectionref{sec:pkgopts}. -% -%\item[{\gloskey[printglossary]{nonumberlist}}] Unlike the package option -%of the same name, this key is a boolean key. If true (\verb|nonumberlist=true|) the numberlist -%is suppressed for this glossary. If false (\verb|nonumberlist=false|) the numberlist is -%displayed for this glossary. If no value is supplied, true is -%assumed. -% -%\end{description} -% -%By default, the glossary is started either by \cs{chapter*} or by -%\cs{section*}, depending on whether or not \cs{chapter} is defined. -%This can be overridden by the \pkgopt{section} package option or the -%\cs{setglossarysection} command. Numbered sectional units can be -%obtained using the \pkgopt{numberedsection} package option. Each -%glossary sets the page header via the command \ics{glossarymark}. If -%this mechanism is unsuitable for your chosen class file or page -%style package, you will need to redefine \ics{glossarymark}. Further -%information about these options and commands is given in -%\sectionref{sec:pkgopts}. -% -%Information can be added to the start of the glossary (after the -%title and before the main body of the glossary) by redefining -%\begin{definition}[\DescribeMacro{\glossarypreamble}] -%\cs{glossarypreamble} -%\end{definition} -%For example: -%\begin{verbatim} -%\renewcommand{\glossarypreamble}{Numbers in italic indicate -%primary definitions.} -%\end{verbatim} -%This needs to be done before the glossary is displayed using -%\cs{printglossaries} or \cs{printglossary}. Note that if you -%want a different preamble for each glossary, you will need to -%use a separate \cs{printglossary} for each glossary and change -%the definition of \cs{glossarypreamble} between each glossary. -%For example: -%\begin{verbatim} -%\renewcommand{\glossarypreamble}{Numbers in italic indicate -%primary definitions.} -%\printglossary -%\renewcommand{\glossarypreamble}{} -%\printglossary[type=acronym] -%\end{verbatim} -%Alternatively, you can do something like: -%\begin{verbatim} -%\renewcommand{\glossarypreamble}{Numbers in italic indicate -%primary definitions.\gdef\glossarypreamble{}} -%\printglossaries -%\end{verbatim} -%which will print the preamble text for the first glossary and -%change the preamble to do nothing for subsequent glossaries. -%(Note that \cs{gdef} is required as the glossary is placed within -%a group.) -% -%There is an analogous command called -%\begin{definition}[\DescribeMacro{\glossarypostamble}] -%\cs{glossarypostamble} -%\end{definition} -%which is placed at the end of each glossary. -% -%\subsubsection{Changing the way the entry name appears in the glossary} -%\label{sec:glsnamefont} -% -%Within each glossary, each entry name is formatted according to -%\begin{definition}[\DescribeMacro{\glsnamefont}] -%\cs{glsnamefont}\marg{name} -%\end{definition} -%which takes one argument: the entry name. This command is always -%used regardless of the glossary style. By default, \cs{glsnamefont} -%simply displays its argument in whatever the surrounding font -%happens to be. This means that in the list-like glossary styles -%(defined in the \sty{glossary-list} style file) the name will appear -%in bold, since the name is placed in the optional argument of -%\cs{item}, whereas in the tabular styles (defined in the -%\sty{glossary-long} and \sty{glossary-super} style files) the name -%will appear in the normal font. The hierarchical glossary styles -%(defined in the \sty{glossary-tree} style file) also set the name in -%bold. -% -%For example, suppose you want all the entry names to appear in -%medium weight small caps, then you can do: -%\begin{verbatim} -%\renewcommand{\glsnamefont}[1]{\textsc{\mdseries #1}} -%\end{verbatim} -% -% -%\subsubsection{Xindy} -%\label{sec:xindy} -% -%If you want to use \app{xindy} to sort the glossary, you -%must use the package option \pkgopt{xindy}: -%\begin{verbatim} -%\usepackage[xindy]{glossaries} -%\end{verbatim} -%This ensures that the glossary information is written in -%\app{xindy} syntax. -% -%\sectionref{sec:makeglossaries} covers how to use the external -%indexing application. This section covers the commands provided -%by the \styfmt{glossaries} package that allow you to adjust the -%\app{xindy} style file (\filetype{.xdy}) and parameters. -% -%To assist writing information to the \app{xindy} style -%file, the \styfmt{glossaries} package provides the following -%commands: -%\begin{definition}[\DescribeMacro{\glsopenbrace}] -%\cs{glsopenbrace} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsclosebrace}] -%\cs{glsclosebrace} -%\end{definition} -%which produce an open and closing brace. (This is needed because -%\verb|\{| and \verb|\}| don't expand to a simple brace character -%when written to a file.) -% -%In addition, if you are using a package that makes the double -%quote character active (e.g. \sty{ngerman}) you can use: -%\begin{definition}[\DescribeMacro{\glsquote}] -%\cs{glsquote}\marg{text} -%\end{definition} -%which will produce \verb|"|\meta{text}\verb|"|. Alternatively, -%you can use \verb|\string"| to write the double-quote character. -%This document assumes that the double quote character has not been -%made active, so the examples just use \verb|"| for clarity. -% -%If you want greater control over the \app{xindy} style file than is -%available through the \LaTeX\ commands provided by the -%\styfmt{glossaries} package, you will need to edit the \app{xindy} -%style file. In which case, you must use \ics{noist} to prevent the -%style file from being overwritten by the \styfmt{glossaries} -%package. For additional information about \app{xindy}, read the -%\app{xindy} documentation. -% -%\paragraph{Language and Encodings} -%When you use \app{xindy}, you need to specify the language -%and encoding used (unless you have written your own custom -%\app{xindy} style file that defines the relevant alphabet -%and sort rules). If you use \app{makeglossaries}, -%this information is obtained from the document's auxiliary -%(\filetype{.aux}) file. The \styfmt{glossaries} package attempts to -%find the root language, but in the event that it gets it wrong or if -%\app{xindy} doesn't support that language, then you can -%specify the language using: -%\begin{definition}[\DescribeMacro{\GlsSetXdyLanguage}] -%\cs{GlsSetXdyLanguage}\oarg{glossary type}\marg{language} -%\end{definition} -%where \meta{language} is the name of the language. The -%optional argument can be used if you have multiple glossaries -%in different languages. If \meta{glossary type} is omitted, it -%will be applied to all glossaries, otherwise the language -%setting will only be applied to the glossary given by -%\meta{glossary type}. -% -%If the \sty{inputenc} package is used, the encoding will be -%obtained from the value of \ics{inputencodingname}. -%Alternatively, you can specify the encoding using: -%\begin{definition}[\DescribeMacro{\GlsSetXdyCodePage}] -%\cs{GlsSetXdyCodePage}\marg{code} -%\end{definition} -%where \meta{code} is the name of the encoding. For example: -%\begin{verbatim} -%\GlsSetXdyCodePage{utf8} -%\end{verbatim} -% -%Note that you can also specify the language and encoding using -%the package option -%\verb|xindy={language=|\meta{lang}\verb|,codepage=|\meta{code}\verb|}|. -%For example: -%\begin{verbatim} -%\usepackage[xindy={language=english,codepage=utf8}]{glossaries} -%\end{verbatim} -% -%If you write your own custom \app{xindy} style file that -%includes the language settings, you need to set the language -%to nothing: -%\begin{verbatim} -%\GlsSetXdyLanguage{} -%\end{verbatim} -%(and remember to use \ics{noist} to prevent the style file from -%being overwritten). -% -%\begin{important} -%The commands \cs{GlsSetXdyLanguage} and \cs{GlsSetXdyCodePage} -%have no effect if you don't use \app{makeglossaries}. If -%you call \app{xindy} without \app{makeglossaries} you -%need to remember to set the language and encoding using the -%\texttt{-L} and \texttt{-C} switches. -%\end{important} -% -% -%\paragraph{Locations and Number lists} -% -%The most likely attributes used in the \gloskey[glslink]{format} -%key (\locfmt{textrm}, \locfmt{hyperrm} etc) are automatically added -%to the \app{xindy} style file, but if you want to use another -%attribute, you need to add it using: -%\begin{definition}[\DescribeMacro{\GlsAddXdyAttribute}] -%\cs{GlsAddXdyAttribute}\marg{name} -%\end{definition} -%where \meta{name} is the name of the attribute, as used in -%the \gloskey[glslink]{format} key. For example, suppose I want a -%bold, italic, hyperlinked location. I first need to define a -%command that will do this: -%\begin{verbatim} -%\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} -%\end{verbatim} -%but with \app{xindy}, I also need to add this as an allowed -%attribute: -%\begin{verbatim} -%\GlsAddXdyAttribute{hyperbfit} -%\end{verbatim} -% -%\begin{important} -%Note that \cs{GlsAddXdyAttribute} has no effect if \ics{noist} is -%used or if \ics{makeglossaries} is omitted. -% -%\cs{GlsAddXdyAttribute} must be used before \ics{makeglossaries}. -%\end{important} -% -%If the location numbers don't get expanded to a simple Arabic or -%Roman number or a letter from a, \ldots, z or A, \ldots, Z, then -%you need to add a location style in the appropriate format. -% -%For example, suppose you want the page numbers written as words -%rather than digits and you use the \sty{fmtcount} package to -%do this. You can redefine \ics{thepage} as follows: -%\begin{verbatim} -%\renewcommand*{\thepage}{\Numberstring{page}} -%\end{verbatim} -%This gets expanded to \verb|\protect \Numberstringnum |\marg{n} -%where \meta{n} is the Arabic page number. This means that you need to -%define a new location that has that form: -%\begin{verbatim} -%\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space -% \string\Numberstringnum\space\glsopenbrace" -% "arabic-numbers" :sep "\glsclosebrace"} -%\end{verbatim} -%Note that it's necessary to use \cs{space} to indicate that -%spaces also appear in the format, since, unlike \TeX, -%\app{xindy} doesn't ignore spaces after control sequences. -% -%\begin{important} -%Note that \cs{GlsAddXdyLocation} has no effect if \ics{noist} is -%used or if \ics{makeglossaries} is omitted. -% -%\cs{GlsAddXdyLocation} must be used before \ics{makeglossaries}. -%\end{important} -% -%In the \term{number list}, the locations are sorted according to -%type. The default ordering is: \texttt{roman-page-numbers} (e.g.\ -%i), \texttt{arabic-page-numbers} (e.g.\ 1), -%\texttt{arabic-section-numbers} (e.g.\ 1.1 if the compositor is a -%full stop or 1-1 if the compositor is a hyphen\footnote{see -%\ics{setCompositor} described in \sectionref{sec:newglosentry}}), -%\texttt{alpha-page-numbers} (e.g.\ a), \texttt{Roman-page-numbers} -%(e.g.\ I), \texttt{Alpha-page-numbers} (e.g.\ A), -%\texttt{Appendix-page-numbers} (e.g.\ A.1 if the Alpha compositor is -%a full stop or A-1 if the Alpha compositor is a hyphen\footnote{see -%\ics{setAlphaCompositor} described in -%\sectionref{sec:newglosentry}}), user defined location names (as -%specified by \ics{GlsAddXdyLocation} in the order in which they were -%defined), \texttt{see} (cross-referenced entries). This ordering can -%be changed using: -%\begin{definition}[\DescribeMacro{\GlsSetXdyLocationClassOrder}] -%\cs{GlsSetXdyLocationClassOrder}\marg{location names} -%\end{definition} -%where each location name is delimited by double quote marks and -%separated by white space. For example: -%\begin{verbatim} -%\GlsSetXdyLocationClassOrder{ -% "arabic-page-numbers" -% "arabic-section-numbers" -% "roman-page-numbers" -% "Roman-page-numbers" -% "alpha-page-numbers" -% "Alpha-page-numbers" -% "Appendix-page-numbers" -% "see" -%} -%\end{verbatim} -% -%\begin{important} -%Note that \cs{GlsSetXdyLocationClassOrder} has no effect if -%\ics{noist} is used or if \ics{makeglossaries} is omitted. -% -%\cs{GlsSetXdyLocationClassOrder} must be used before -%\ics{makeglossaries}. -%\end{important} -% -%If a \term{number list} consists of a sequence of consecutive -%numbers, the range will be concatenated. The -%number of consecutive locations that causes a range formation -%defaults to 2, but can be changed using: -%\begin{definition}[\DescribeMacro{\GlsSetXdyMinRangeLength}] -%\cs{GlsSetXdyMinRangeLength}\marg{n} -%\end{definition} -%For example: -%\begin{verbatim} -%\GlsSetXdyMinRangeLength{3} -%\end{verbatim} -%The argument may also be the keyword \texttt{none}, to indicate that -%there should be no range formations. See the \app{xindy} -%manual for further details on range formations. -% -%\begin{important} -%Note that \cs{GlsSetXdyMinRangeLength} has no effect if \ics{noist} -%is used or if \ics{makeglossaries} is omitted. -% -%\cs{GlsSetXdyMinRangeLength} must be used before -%\ics{makeglossaries}. -%\end{important} -% -%See \sectionref{sec:numberlists} for further details. -% -% -%\paragraph{Glossary Groups} -%The glossary is divided into groups according to the first -%letter of the sort key. The \styfmt{glossaries} package also adds -%a number group by default, unless you suppress it in the -%\pkgopt{xindy} package option. For example: -%\begin{verbatim} -%\usepackage[xindy={glsnumbers=false}]{glossaries} -%\end{verbatim} -%Any entry that doesn't go in one of the letter groups or the -%number group is placed in the default group. -% -%If you have a number group, the default behaviour is to locate -%it before the \qt{A} letter group. If you are not using a -%Roman alphabet, you can change this using\\[10pt] -%\cs{GlsSetXdyFirstLetterAfterDigits}\marg{letter} -% -%\begin{important} -%Note that \cs{GlsSetXdyFirstLetterAfterDigits} has no effect if -%\ics{noist} is used or if \ics{makeglossaries} is omitted. -% -%\cs{GlsSetXdyFirstLetterAfterDigits} must be used before -%\ics{makeglossaries}. -%\end{important} -% -% -%\subsection{Defining New Glossaries} -%\label{sec:newglossary} -% -%A new glossary can be defined using: -%\begin{definition}[\DescribeMacro{\newglossary}] -%\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}\marg{title}\oarg{counter} -%\end{definition} -%where \meta{name} is the label to assign to this glossary. The -%arguments \meta{in-ext} and \meta{out-ext} specify the extensions to -%give to the input and output files for that glossary, \meta{title} -%is the default title for this new glossary and the final optional -%argument \meta{counter} specifies which counter to use for the -%associated number lists\iterm{number list} (see also -%\sectionref{sec:numberlists}). The first optional argument specifies -%the extension for the \app{makeindex} or \app{xindy} transcript file -%(this information is only used by \app{makeglossaries} which picks -%up the information from the auxiliary file). -% -%Note that the main (default) glossary is automatically created as: -%\begin{verbatim} -%\newglossary{main}{gls}{glo}{\glossaryname} -%\end{verbatim} -%so it can be identified by the label \texttt{main} (unless the -%\pkgopt{nomain} package option is used). Using the -%\pkgopt{acronym} package option is equivalent to: -%\begin{verbatim} -%\newglossary[alg]{acronym}{acr}{acn}{\acronymname} -%\end{verbatim} -%so it can be identified by the label \texttt{acronym}. If you are -%not sure whether the \pkgopt{acronym} option has been used, you -%can identify the list of acronyms by the command -%\DescribeMacro{\acronymtype}\cs{acronymtype} which is set to -%\texttt{acronym}, if the \pkgopt{acronym} option has been used, -%otherwise it is set to \texttt{main}. Note that if you are using -%the main glossary as your list of acronyms, you need to declare -%it as a list of acronyms using the package option -%\pkgopt{acronymlists}. -% -%\begin{important} -%All glossaries must be defined before \ics{makeglossaries} to -%ensure that the relevant output files are opened. -%\end{important} -% -% -%\subsection{Acronyms} -%\label{sec:acronyms} -% -%You may have noticed in \sectionref{sec:newglosentry} that when you -%specify a new entry, you can specify alternate text to use when the -%term is first used\ifirstuse\ in the document. This provides a -%useful means to define acronyms. For convenience, the -%\styfmt{glossaries} package defines the command: -%\begin{definition}[\DescribeMacro{\newacronym}] -%\cs{newacronym}\oarg{key-val -%list}\marg{label}\marg{abbrv}\marg{long} -%\end{definition} -%By default, this is equivalent to: -%\begin{display}\ttfamily -%\cs{newglossaryentry}\textrm{\marg{label}}\{type=\ics{acronymtype}, -%name=\textrm{\marg{abbrv}}, -%description=\textrm{\marg{long}}, -%text=\textrm{\marg{abbrv}}, -%first=\{\textrm{\meta{long}} (\textrm{\meta{abbrv}})\}, -%plural=\{\textrm{\meta{abbrv}}\cs{glspluralsuffix}\}, -%firstplural=\{\textrm{\meta{long}}\cs{glspluralsuffix}\cs{space} (\textrm{\meta{abbrv}}\cs{glspluralsuffix})\}, -%\textrm{\meta{key-val list}}\} -%\end{display} -%As mentioned in the previous section, the command -%\ics{acronymtype} is the name of the glossary in which the acronyms -%should appear. If the \pkgopt{acronym} package option has been used, -%this will be \texttt{acronym}, otherwise it will be \texttt{main}. -%The acronyms can then be used in exactly the same way as any other -%glossary entry. If you want more than one list of acronyms, you must -%identify the others using the package options \pkgopt{acronymlists}. -%This ensures that options such as \pkgopt{footnote} and -%\pkgopt{smallcaps} work for the additional lists of acronyms. -% -%\begin{important}% -%\textbf{Note:} since \cs{newacronym} sets \verb|type=\acronymtype|, -%if you want to load a file containing acronym definitions using -%\cs{loadglsentries}\oarg{type}\marg{filename}, the optional argument -%\meta{type} will not have an effect unless you explicitly set the -%type as \verb|type=\glsdefaulttype| in the optional argument to -%\ics{newacronym}. See \sectionref{sec:loadglsentries}. -%\end{important} -% -%For example, the following defines the acronym IDN: -%\begin{verbatim} -%\newacronym{idn}{IDN}{identification number} -%\end{verbatim} -%This is equivalent to: -%\begin{verbatim} -%\newglossaryentry{idn}{type=\acronymtype, -%name={IDN}, -%description={identification number}, -%text={IDN}, -%first={identification number (IDN)}, -%plural={IDNs}, -%firstplural={identification numbers (IDNs)}} -%\end{verbatim} -%so \verb|\gls{idn}| will produce \qt{identification number (IDN)} on -%\firstuse\ and \qt{IDN} on subsequent uses. -% -%This section describes acronyms that have been defined using -%\ics{newacronym}. If you prefer to define your acronyms using -%\ics{newglossaryentry} explicitly, then you should skip this section -%and ignore the package options: \pkgopt{smallcaps}, -%\pkgopt{smaller}, \pkgopt{description}, \pkgopt{dua} and -%\pkgopt{footnote}, as these options change the definition of -%\ics{newacronym} for common acronym formats as well as the way that -%the link text is displayed (see \sectionref{sec:glsdisplay}). -%Likewise you should ignore the package option \pkgopt{shortcuts} and -%the new commands described in this section, such as \ics{acrshort}, -%as they vary according to the definition of \ics{newacronym}. -% -%If you want to define your own custom acronym style, see -%\sectionref{sec:customacronym}. -% -%\begin{important} -%If you try using \ics{newglossaryentry} for entries in a designated -%list of acronyms in combination with any of the above named package -%options you are likely to get unexpected results such as empty -%brackets or empty footnotes. -%\end{important} -% -%If you use any of the package options \pkgopt{smallcaps}, -%\pkgopt{smaller}, \pkgopt{description} or -%\pkgopt{footnote}, the acronyms will be displayed in the document -%using: -%\begin{definition}[\DescribeMacro{\acronymfont}] -%\cs{acronymfont}\marg{text} -%\end{definition} -%and -%\begin{definition}[\DescribeMacro{\firstacronymfont}] -%\cs{firstacronymfont}\marg{text} -%\end{definition} -%where \cs{firstacronymfont} is applied on \firstuse\ and -%\cs{acronymfont} is applied on subsequent use. Note that if you -%don't use any of the above package options, changing the definition -%of \cs{acronymfont} or \cs{firstacronymfont} will have no effect. In -%this case, the recommended route is to use either the -%\pkgopt{smaller} or the \pkgopt{smallcaps} package option and -%redefine \cs{acronymfont} and \cs{firstacronymfont} as required. -%(The \pkgopt{smallcaps} option sets the default plural suffix in an -%upright font to cancel the effect of \cs{textsc}, whereas -%\pkgopt{smaller} sets the suffix in the surrounding font.) -%For example, if you want acronyms in a normal font on first use and -%emphasized on subsequent use, do: -%\begin{verbatim} -%\usepackage[smaller]{glossaries} -%\renewcommand*{\firstacronymfont}[1]{#1} -%\renewcommand*{\acronymfont}[1]{\emph{#1}} -%\end{verbatim} -%(Note that it is for this reason that the \sty{relsize} package -%is not automatically loaded when selecting the -%\pkgopt{smaller} package option.) -% -%\Tableref{tab:acronymsettings} lists the package options that govern -%the acronym styles and how the \ics{newglossaryentry} keys are used -%to store \meta{long} (the long form) and \meta{abbrv} (the short -%form). Note that the \pkgopt{smallcaps} option redefines -%\cs{acronymfont} so that it sets its argument using \cs{textsc} (so -%you should use lower case characters in \meta{abbrv}) and the -%\pkgopt{smaller} option redefines \cs{acronymfont} to use -%\cs{textsmaller},\footnote{you will need to load a package, such as -%\styfmt{relsize}, that defines \cs{textsmaller} if you use this -%option.}\ otherwise \cs{acronymfont} simply displays its argument in -%the surrounding font. -% -%\begin{table}[htbp] -%\caption{Package options governing \cs{newacronym} and how the -%information is stored in the keys for \cs{newglossaryentry}} -%\label{tab:acronymsettings} -%\begin{center} -%\begin{tabular}{lllll} -%\bfseries Package Option & -%\gloskey{first} key & -%\gloskey{text} key & -%\gloskey{description} key & -%\gloskey{symbol} key\\ -%\pkgopt{description},\pkgopt{footnote} & -%\meta{abbrv} & -%\meta{abbrv} & -%user supplied & -%\meta{long}\\ -%\pkgopt{description},\pkgopt{dua} & -%\meta{long} & -%\meta{long} & -%user supplied & -%\meta{abbrv}\\ -%\pkgopt{description} & -%\meta{long} & -%\meta{abbrv} & -%user supplied & -%\meta{abbrv}\\ -%\pkgopt{footnote} & -%\meta{abbrv} & -%\meta{abbrv} & -%\meta{long} & -% \\ -%\pkgopt{smallcaps} & -%\meta{long} & -%\meta{abbrv} & -%\meta{long} & -%\meta{abbrv}\\ -%\pkgopt{smaller} & -%\meta{long} & -%\meta{abbrv} & -%\meta{long} & -%\meta{abbrv}\\ -%\pkgopt{dua} & -%\meta{long} & -%\meta{long} & -%\meta{long} & -%\meta{abbrv}\\ -%None of the above& -%\meta{long} (\meta{abbrv}) & -%\meta{abbrv} & -%\meta{long} & -%\end{tabular} -%\end{center} -%\end{table} -% -%In case you can't remember which key stores the long or short forms -%(or their plurals) the \styfmt{glossaries} package provides the -%commands: -%\begin{itemize} -%\item\DescribeMacro{\glsshortkey}\cs{glsshortkey} -%The key used to store the short form. -%\item\DescribeMacro{\glsshortpluralkey}\cs{glsshortpluralkey} -%The key used to store the plural version of the short form. -%\item\DescribeMacro{\glslongkey}\cs{glslongkey} -%The key used to store the long form. -%\item\DescribeMacro{\glslongpluralkey}\cs{glslongpluralkey} -%The key used to store the plural version of the long form. -%\end{itemize} -%These can be used in the optional argument of \cs{newacronym} -%to override the defaults. For example: -%\begin{verbatim} -%\newacronym[\glslongpluralkey={diagonal matrices}]{dm}{DM}{diagonal -%matrix} -%\end{verbatim} -%If the \firstuse\ uses the plural form, \verb|\glspl{dm}| will -%display: diagonal matrices (DMs). -% -%Each of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, -%\pkgopt{footnote}, \pkgopt{dua} and \pkgopt{description} use -%\ics{defglsdisplay} and \ics{defglsdisplayfirst} (described in -%\sectionref{sec:glsdisplay}) to change the way the link text is -%displayed. This means that these package options only work for the -%glossary type given by \cs{acronymtype}. If you have multiple lists -%of acronyms, you will need to make the appropriate changes for each -%additional glossary type. -% -%\begin{description} -%\item[\pkgopt{description},\pkgopt{footnote}]\ifpdf\mbox{}\par\fi -%When these two package options are used together, the \firstuse\ displays -%the entry as: -%\begin{display} -%\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} -%\end{display} -%while subsequent use displays the entry as: -%\begin{display} -%\cs{acronymfont}\marg{abbrv}\meta{insert} -%\end{display} -%where \meta{insert} indicates the text supplied in the final -%optional argument to \cs{gls}, \cs{glspl} or their uppercase -%variants. -% -%In this case, the long form is stored in the \gloskey{symbol} key. -%This means that the long form will not be displayed in the list of -%acronyms unless you use a glossary style that displays the entry's -%symbol (for example, the \glostyle{index} style). Entries will -%be sorted according to the short form. -% -%Note also that when these two package options are used (in the -%given order), the \styfmt{glossaries} package additionally implements the -%\pkgopt{sanitize} option using -%\ipkgopt[description]{sanitize}\ipkgopt[symbol]{sanitize}\verb|sanitize={description=false,symbol=false}|, so -%remember to protect fragile commands when defining acronyms. -% -%\item[\pkgopt{dua}]\ifpdf\mbox{}\par\fi -%The \pkgopt{dua} package option always displays the expanded -%form and so may not be used with \pkgopt{footnote}, \pkgopt{smaller} or -%\pkgopt{smallcaps}. Both \firstuse\ and subsequent use displays the -%entry in the form: -%\begin{display} -%\meta{long}\meta{insert} -%\end{display} -% -%If the \pkgopt{description} package option is also used, the -%\gloskey{name} key is set to the long form, otherwise the -%\gloskey{name} key is set to the short form and the -%\gloskey{description} key is set to the long form. In both -%cases the \gloskey{symbol} is set to the short form. Therefore, -%if you use the \pkgopt{description} package option and you want -%the short form to appear in the list of acronyms, you will need -%to use a glossary style that displays the entry's symbol (for -%example, the \glostyle{index} style). Entries will be sorted -%according to the long form if the \pkgopt{description} option -%is used, otherwise they will be sorted according to the -%short form (unless overridden by the \gloskey{sort} key in -%the optional argument of \ics{newacronym}). -% -%\item[\pkgopt{description}]\ifpdf\mbox{}\par\fi -%This package option displays the entry on \firstuse\ as: -%\begin{display} -%\meta{long}\meta{insert} (\cs{firstacronymfont}\marg{abbrv}) -%\end{display} -%while subsequent use displays the entry as: -%\begin{display} -%\cs{acronymfont}\marg{abbrv}\meta{insert} -%\end{display} -%Note also that if this package option is used, the \styfmt{glossaries} -%package additionally implements the option -%\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so -%remember to protect fragile commands when defining acronyms. -% -%Note that with this option, you need to specify the description -%using the \gloskey{description} key in the optional argument -%of \ics{newacronym}. When this option is used without -%the \pkgopt{footnote} or \pkgopt{dua} options, the name field -%is specified as -%\begin{definition}[\DescribeMacro{\acrnameformat}] -%\cs{acrnameformat}\marg{short}\marg{long} -%\end{definition} -%This defaults to \ics{acronymfont}\marg{short}, which means that the -%long form will not appear in the list of acronyms by default. -%To change this, you need to redefine \ics{acrnameformat} as -%appropriate. For example, to display the long form followed -%by the short form in parentheses do: -%\begin{verbatim} -%\renewcommand*{\acrnameformat}[2]{#2 (\acronymfont{#1})} -%\end{verbatim} -%Note that even if you redefine \ics{acrnameformat}, the -%entries will be sorted according to the short form, unless you -%override this using the \gloskey{sort} key in the optional -%argument to \ics{newacronym}. -% -%\item[\pkgopt{footnote}]\ifpdf\mbox{}\par\fi -%This package option displays the entry on \firstuse\ as: -%\begin{display} -%\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} -%\end{display} -%while subsequent use displays the entry as: -%\begin{display} -%\cs{acronymfont}\marg{abbrv}\meta{insert} -%\end{display} -%Acronyms will be sorted according to the short form. -% -%Note also that if this package option is used, the \styfmt{glossaries} -%package additionally implements the option -%\ipkgopt[description]{sanitize}\verb|sanitize={description=false}|, so -%remember to protect fragile commands when defining acronyms. -% -%Note that on \firstuse, it is the long form in the footnote that -%links to the relevant glossary entry (where hyperlinks are enabled), -%whereas on subsequent use, the acronym links to the relevant -%glossary entry. It is possible to change this to make the acronym on -%\firstuse\ have the hyperlink instead of the footnote, but since the -%footnote marker will also be a hyperlink, you will have two -%hyperlinks in immediate succession. This can be ambiguous where the -%hyperlinks are coloured rather than boxed. The code required to -%change the \firstuse\ to make the acronym a hyperlink is as follows: -%\begin{verbatim} -% \defglsdisplayfirst[\acronymtype]{% -% \noexpand\protect\noexpand -% \glslink[\@gls@link@opts]{\@gls@link@label}{\firstacronymfont{#1}#4}% -% \noexpand\protect\noexpand\footnote{#2}}% -%\end{verbatim} -%\textbf{Note} that this involves using internal commands (i.e.\ -%commands whose name contains an \verb|@| character), so if this code -%is place in a \texttt{.tex} file it needs to be placed within a -%\cs{makeatletter} \ldots\ \cs{makeatother} pair. (See -%\urlref{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=atsigns}{\cs{@} -%and \texttt{@} in macro names} for further details.) -% -%\item[\pkgopt{smallcaps}]\ifpdf\mbox{}\par\fi -%If neither the \pkgopt{footnote} nor \pkgopt{description} options -%have been set, this option displays the entry on \firstuse\ as: -%\begin{display} -%\meta{long}\meta{insert} (\cs{firstacronymfont}\marg{abbrv}) -%\end{display} -%while subsequent use displays the entry as: -%\begin{display} -%\cs{acronymfont}\marg{abbrv}\meta{insert} -%\end{display} -%where \cs{acronymfont} is set to \verb|\textsc{#1}|. -% -%\begin{important} -%Note that since the acronym is displayed using \ics{textsc}, -%the short form, \meta{abbrv}, should be specified in lower case. -%\ifpdf(Recall that "\textsc{abc}" produces \textsc{abc} whereas -%"\textsc{ABC}" produces \textsc{ABC}.)\fi -%\end{important} -% -%Note also that if this package option is used, the \styfmt{glossaries} -%package additionally implements the option -%\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so -%remember to protect fragile commands when defining acronyms. -% -%\item[\pkgopt{smaller}]\ifpdf\mbox{}\par\fi -%If neither the \pkgopt{footnote} nor \pkgopt{description} options -%have been set, this option displays the entry on \firstuse\ as: -%\begin{display} -%\meta{long}\meta{insert} (\cs{firstacronymfont}\marg{abbrv}) -%\end{display} -%while subsequent use displays the entry as: -%\begin{display} -%\cs{acronymfont}\marg{abbrv}\meta{insert} -%\end{display} -%where \cs{acronymfont} is set to -%\verb|\textsmaller{#1}|.\footnote{not that this was change from -%using \ics{smaller} to \ics{textsmaller} as declarations -%cause a problem for \ics{makefirstuc}.} -%The entries will be sorted according to the short form. -% -%\begin{important} -%Remember to load a package that defines \ics{textsmaller} (such as -%\sty{relsize}) if you want to use this option, unless you want -%to redefine \ics{acronymfont} to use some other formatting command. -%\end{important} -% -%Note also that if this package option is used, the \styfmt{glossaries} -%package additionally implements the option -%\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so -%remember to protect fragile commands when defining acronyms. -% -%\item[None of the above]\ifpdf \mbox{}\par\fi -%If none of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, -%\pkgopt{footnote}, \pkgopt{dua} or \pkgopt{description} are used, -%then on \firstuse\ the entry is displayed as: -%\begin{display} -%\meta{long} (\meta{abbrv})\meta{insert} -%\end{display} -%while subsequent use displays the entry as: -%\begin{display} -%\meta{abbrv}\meta{insert} -%\end{display} -%Entries will be sorted according to the short form. -%Note that if none of the acronym-related package options are used, -%the \pkgopt{sanitize} option will not be affected. -%\end{description} -% -%Recall from \sectionref{sec:glslink} that you can access the values -%of individual keys using commands like \ics{glstext}, so it is -%possible to use these commands to print just the long form or just -%the abbreviation without affecting the flag that determines whether -%the entry has been used. However the keys that store the long and -%short form vary depending on the acronym style, so the -%\styfmt{glossaries} package provides commands that are set according -%to the package options. These are as follows: -%\begin{definition}[\DescribeMacro{\acrshort}] -%\cs{acrshort}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Acrshort}] -%\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\ACRshort}] -%\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Print the abbreviated version with (if required) a hyperlink to the -%relevant entry in the glossary. This is usually equivalent to -%\ics{glstext} (or its uppercase variants) but may additionally put -%the link text within the argument to \ics{acronymfont}. -%\begin{definition}[\DescribeMacro{\acrlong}] -%\cs{acrlong}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Acrlong}] -%\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\ACRlong}] -%\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Print the long version with (if required) a hyperlink to the -%relevant entry in the glossary. This is may be equivalent to -%\ics{glsdesc}, \ics{glssymbol} or \ics{glsfirst} (or their uppercase -%variants), depending on package options. -%\begin{definition}[\DescribeMacro{\acrfull}] -%\cs{acrfull}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\Acrfull}] -%\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\begin{definition}[\DescribeMacro{\ACRfull}] -%\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Print the long version followed by the abbreviation in brackets with -%(if required) a hyperlink to the relevant entry in the glossary. -% -%\begin{important} -%Note that if any of the above commands produce unexpected output -%and you haven't used any of the acronym-related package options, -%you will need to switch off the sanitization\ipkgopt{sanitize}. -%For example: -%\begin{verbatim} -%\usepackage[sanitize=none]{glossaries} -%\end{verbatim} -%However, if you do this, you must remember to protect fragile -%commands when defining acronyms or glossary entries. -%\end{important} -% -%Note that if you change the definition of \ics{newacronym}, you -%may additionally need to change the above commands as well as -%changing the way the text is displayed using \ics{defglsdisplay} -%and \ics{defglsdisplayfirst}. -% -%The package option \pkgopt{shortcuts} provides the synonyms listed -%in \tableref{tab:shortcuts}. If any of those commands generate -%an \qt{undefined control sequence} error message, check that you -%have enabled the shortcuts using the \pkgopt{shortcuts} package -%option. Note that there are no shortcuts for the commands that -%produce all upper case text. -% -%\begin{table}[htbp] -%\caption[Synonyms provided by the package option shortcuts]{Synonyms provided by the package option \pkgopt{shortcuts}} -%\label{tab:shortcuts} -%\begin{center} -%\begin{tabular}{ll} -%\bfseries Shortcut Command & \bfseries Equivalent Command\\ -%\ics{acs} & \ics{acrshort}\\ -%\ics{Acs} & \ics{Acrshort}\\ -%\ics{acsp} & \ics{acrshortpl}\\ -%\ics{Acsp} & \ics{Acrshortpl}\\ -%\ics{acl} & \ics{acrlong}\\ -%\ics{Acl} & \ics{Acrlong}\\ -%\ics{aclp} & \ics{acrlongpl}\\ -%\ics{Aclp} & \ics{Acrlongpl}\\ -%\ics{acf} & \ics{acrfull}\\ -%\ics{Acf} & \ics{Acrfull}\\ -%\ics{acfp} & \ics{acrfullpl}\\ -%\ics{Acfp} & \ics{Acrfullpl}\\ -%\ics{ac} & \ics{gls}\\ -%\ics{Ac} & \ics{Gls}\\ -%\ics{acp} & \ics{glspl}\\ -%\ics{Acp} & \ics{Glspl} -%\end{tabular} -%\end{center} -%\end{table} -% -%\subsubsection{Defining A Custom Acronym Style} -%\label{sec:customacronym} -% -%You may find that the predefined acronyms styles that come with the -%\styfmt{glossaries} package don't suit your requirements. In this -%case you can define your own style. This is done by redefining the -%following commands: -%\begin{definition}[\DescribeMacro{\CustomAcronymFields}] -%\cs{CustomAcronymFields} -%\end{definition} -%This command sets up the keys for \ics{newglossaryentry} when -%you define an acronym using \ics{newacronym}. Within the definition -%of \cs{CustomAcronymFields}, you may use \cs{the}\ics{glslongtok} to -%access the long form, \cs{the}\ics{glsshorttok} to access the short -%form and \cs{the}\ics{glslabeltok} to access the label. This command -%is typically used to set the \gloskey{name}, \gloskey{first}, -%\gloskey{firstplural}, \gloskey{text} and \gloskey{plural} keys. It -%may also be used to set the \gloskey{symbol} or -%\gloskey{description} keys depending on your requirements. -% -%\begin{definition}[\DescribeMacro{\SetCustomDisplayStyle}] -%\cs{SetCustomDisplayStyle}\marg{type} -%\end{definition} -%This is used to set up the display style for the glossary given by -%\meta{type}. This should typically just use \ics{defglsdisplayfirst} -%and \ics{defglsdisplay}. -% -%Once you have redefined \cs{CustomAcronymFields} and -%\cs{SetCustomDisplayStyle}, you must then switch to this style using -%\begin{definition}[\DescribeMacro{\SetCustomStyle}] -%\cs{SetCustomStyle} -%\end{definition} -%Note that you may still use the \pkgopt{shortcuts} package option -%with your custom style. -% -%\begin{important} -%If you omit \cs{SetCustomStyle}, or use it before you redefine -%\cs{CustomAcronymFields} and \cs{SetCustomDisplayStyle}, your new -%style won't be correctly implemented. You must set up the custom style -%before defining new acronyms. The acronyms must be defined using -%\ics{newacronym} not \ics{newglossaryentry}. -%\end{important} -% -%As an example, suppose I want my acronym on first use to have the -%short form in the text and the long form with the description in a -%footnote. Suppose also that I want the short form to be put in small -%caps in the main body of the document, but I want it in normal -%capitals in the list of acronyms. In my list of acronyms, I want the -%long form as the name with the short form in brackets followed by -%the description. -% -%First, I need to redefine \ics{CustomAcronymFields} so that -%\ics{newacronym} will correctly set the \gloskey{name}, -%\gloskey{text} and \gloskey{plural} keys. I want the long form to be -%stored in the \gloskey{name} and the short form to be stored in -%\gloskey{text}. In addition, I'm going to set the \gloskey{symbol} -%to the short form in upper case so that it will appear in the list -%of acronyms. -% -%\begin{verbatim} -%\renewcommand*{\CustomAcronymFields}{% -% name={\the\glslongtok},% -% symbol={\MakeUppercase{\the\glsshorttok}},% -% text={\textsc{\the\glsshorttok}},% -% plural={\textsc{\the\glsshorttok}s}% -%} -%\end{verbatim} -% -%Note that in this case I haven't bothered with \ics{acrpluralsuffix} -%and have just inserted an \qt{s}. -% -%When I use the custom acronym style, the short form is stored in -%\gloskey{user1}, the plural short form is stored in \gloskey{user2}, -%the long form is stored in \gloskey{user3} and the plural long form -%is stored in \gloskey{user4}. So when I use \ics{defglsdisplayfirst} -%and \ics{defglsdisplay}, I can use \ics{glsentryuseriii} to access -%the long form. Recall from \sectionref{sec:glsdisplay}, that the -%optional argument to \ics{defglsdisplayfirst} and \ics{defglsdisplay} -%indicates the glossary type. This is passed to -%\ics{SetCustomDisplayStyle}. The mandatory argument sets up the -%definition of \ics{glsdisplayfirst} and \ics{glsdisplay} for the -%given glossary, where the first argument corresponds to the -%\gloskey{first}, \gloskey{firstplural}, \gloskey{text} or -%\gloskey{plural}, as appropriate, the second argument corresponds to -%the \gloskey{description}, the third corresponds to the -%\gloskey{symbol} and the fourth argument is the inserted text. -% -%\begin{verbatim} -%\renewcommand*{\SetCustomDisplayStyle}[1]{% -% \defglsdisplayfirst[#1]{##1##4\protect\footnote{% -% \glsentryuseriii{\glslabel}: ##2% -% }} -% \defglsdisplay[#1]{##1##4}% -%} -%\end{verbatim} -% -%Since we have a definition inside a definition, \verb|#1| refers to -%the argument of \ics{SetCustomDisplayStyle}, and \verb|##1|, \ldots, -%\verb|##4|, refer to the arguments of \ics{glsdisplayfirst} and -%\ics{glsdisplay}. -% -%Now that I've redefined \ics{CustomAcronymFields} and -%\ics{SetCustomDisplayStyle}, I can set this style using -%\begin{verbatim} -%\SetCustomStyle -%\end{verbatim} -%and now I can define my acronyms: -%\begin{verbatim} -%\newacronym[description={set of tags for use in developing hypertext -%documents}]{html}{html}{Hyper Text Markup Language} -% -%\newacronym[description={language used to describe the layout of a -%document written in a markup language}]{css}{css}{Cascading Style -%Sheet} -%\end{verbatim} -% -%Note that since I've used the description in the main body of the -%text, I need to switch off the sanitization otherwise any commands -%within the description won't get interpreted. Also I want to use the -%\sty{hyperref} package, but this will cause a problem on first use -%as I'll get nested hyperlinks, so I need to switch off the -%hyperlinks on first use. In addition, I want to use a glossary style -%that displays the symbol. Therefore, in my preamble I have: -% -%\begin{verbatim} -%\usepackage[colorlinks]{hyperref} -%\usepackage[acronym, % create list of acronyms -% nomain, % don't need main glossary for this example -% style=tree, % need a style that displays the symbol -% hyperfirst=false,% don't hyperlink first use -% sanitize=none % switch off sanitization as description -% % will be used in the main text -% ]{glossaries} -%\end{verbatim} -% -%Note that I haven't used the \pkgopt{description} or -%\pkgopt{footnote} package options. -% -%\subsubsection{Upgrading From the glossary Package} -%\label{sec:oldacronym} -%Users of the obsolete \sty{glossary} package may recall that -%the syntax used to define new acronyms has changed with the -%replacement \styfmt{glossaries} package. In addition, the old -%\sty{glossary} package created the command -%\cs{}\meta{acr-name} when defining the acronym \meta{acr-name}. -% -%In order to facilitate migrating from the old package to the new -%one, the \styfmt{glossaries} package\footnote{as from version 1.18} -%provides the command: -%\begin{definition}[\DescribeMacro{\oldacronym}] -%\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list} -%\end{definition} -%This uses the same syntax as the \sty{glossary} package's -%method of defining acronyms. It is equivalent to:\\[10pt] -%\ics{newacronym}\oarg{key-val list}\marg{label}\marg{abbrv}\marg{long}\\[10pt] -%In addition, \ics{oldacronym} also defines the commands -%\cs{}\meta{label}, which is equivalent to \ics{gls}\marg{label}, -%and \cs{}\meta{label}\texttt{*}, which is equivalent to -%\ics{Gls}\marg{label}. If \meta{label} is omitted, \meta{abbrv} -%is used. Since commands names must consist only of alphabetical -%characters, \meta{label} must also only consist of alphabetical -%characters. Note that \cs{}\meta{label} doesn't allow you to use -%the first optional argument of \ics{gls} or \ics{Gls} --- you will -%need to explicitly use \ics{gls} or \ics{Gls} to change the -%settings. -% -%\begin{important} -%Recall that, in general, \LaTeX\ ignores spaces following command -%names consisting of alphabetical characters. This is also true for -%\cs{}\meta{label} unless you additionally load the -%\sty{xspace} package. -%\end{important} -% -%The \styfmt{glossaries} package doesn't load the \sty{xspace} package -%since there are both advantages and disadvantages to using -%\ics{xspace} in \cs{}\meta{label}. If you don't use the -%\sty{xspace} package you need to explicitly force a space using -%\verb*|\ | (backslash space) however you can follow \cs{}\meta{label} -%with additional text in square brackets (the final optional -%argument to \ics{gls}). If you use the \sty{xspace} package -%you don't need to escape the spaces but you can't use -%the optional argument to insert text (you will have to explicitly -%use \ics{gls}). -% -%To illustrate this, suppose I define the acronym \qt{abc} as -%follows: -%\begin{verbatim} -%\oldacronym{abc}{example acronym}{} -%\end{verbatim} -%This will create the command \cs{abc} and its starred version -%\cs{abc*}. \Tableref{tab:xspace} illustrates the effect of -%\cs{abc} (on subsequent use) according to whether or not the -%\sty{xspace} package has been loaded. As can be seen from the -%final row in the table, the \sty{xspace} package prevents the -%optional argument from being recognised. -% -%\begin{table}[htbp] -%\caption[The effect of using xspace]{The effect of using -%\styfmt{xspace} with \cs{oldacronym}} -%\label{tab:xspace} -%\vskip\baselineskip -%\centering -%\begin{tabular}{lll} -%\bfseries Code & \bfseries With \styfmt{xspace} & -%\bfseries Without \styfmt{xspace}\\ -%\verb|\abc.| & abc. & abc.\\ -%\verb|\abc xyz| & abc xyz & abcxyz\\ -%\verb|\abc\ xyz| & abc xyz & abc xyz\\ -%\verb|\abc* xyz| & Abc xyz & Abc xyz\\ -%\verb|\abc['s] xyz| & abc ['s] xyz & abc's xyz -%\end{tabular} -%\par -%\end{table} -% -% -% -%\subsection{Unsetting and Resetting Entry Flags} -%\label{sec:glsunset} -% -%When using \ics{gls}, \ics{glspl} and their uppercase variants it is -%possible that you may want to use the value given by the -%\gloskey{first} key, even though you have already used the glossary -%entry\ifirstuse. Conversely, you may want to use the value given by the -%\gloskey{text} key, even though you haven't used the glossary entry. -%The former can be achieved by one of the following commands: -%\begin{definition}[\DescribeMacro{\glsreset}] -%\cs{glsreset}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glslocalreset}] -%\cs{glslocalreset}\marg{label} -%\end{definition} -%while the latter can be achieved by one of the following commands: -%\begin{definition}[\DescribeMacro{\glsunset}] -%\cs{glsunset}\marg{label} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glslocalunset}] -%\cs{glslocalunset}\marg{label} -%\end{definition} -%You can also reset or unset all entries for a given glossary or list of -%glossaries using: -%\begin{definition}[\DescribeMacro{\glsresetall}] -%\cs{glsresetall}\oarg{glossary list} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glslocalresetall}] -%\cs{glslocalresetall}\oarg{glossary list} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glsunsetall}] -%\cs{glsunsetall}\oarg{glossary list} -%\end{definition} -%\begin{definition}[\DescribeMacro{\glslocalunsetall}] -%\cs{glslocalunsetall}\oarg{glossary list} -%\end{definition} -%where \meta{glossary list} is a comma-separated list of -%glossary labels. If omitted, all defined glossaries are assumed. -%For example, to reset all entries in the main glossary and the -%list of acronyms: -%\begin{verbatim} -%\glsresetall[main,acronym] -%\end{verbatim} -% -%You can determine whether an entry's first use flag is set using: -%\begin{definition}[\DescribeMacro{\ifglsused}] -%\cs{ifglsused}\marg{label}\marg{true part}\marg{false part} -%\end{definition} -%where \meta{label} is the label of the required entry. If the -%entry has been used, \meta{true part} will be done, otherwise -%\meta{false part} will be done. -% -% -%\subsection{Glossary Styles} -%\label{sec:styles} -%The \styfmt{glossaries} package comes with some pre-defined -%glossary styles. Note that the styles are suited to different -%types of glossaries: some styles ignore the associated -%symbol; some styles are not designed for hierarchical entries, -%so they display sub-entries in the same way as they display top -%level entries; some styles are designed for homographs, so they -%ignore the name for sub-entries. You should therefore pick a style -%that suits your type of glossary. See \tableref{tab:styles} for -%a summary of the available styles. -% -%\begin{table}[htbp] -%\caption[Glossary Styles]{Glossary Styles. An asterisk in the style -%name indicates anything that matches that doesn't match any -%previously listed style (e.g.\ \texttt{long3col*} -%matches \glostyle{long3col}, \glostyle{long3colheader}, -%\glostyle{long3colborder} and \glostyle{long3colheaderborder}). -%A maximum level of 0 indicates a flat glossary (sub-entries -%are displayed in the same way as main entries). Where the maximum -%level is given as --- there is no limit, but note that -%\app{makeindex} imposes a limit of 2 sub-levels. If the -%homograph column is checked, then the name is not displayed for -%sub-entries. If the symbol column is checked, then the symbol will -%be displayed if it has been defined.} -%\label{tab:styles} -%\vskip\baselineskip -%\centering -%\begin{tabular}{lccc} -%\bfseries Style & \bfseries Maximum Level & -%\bfseries Homograph & \bfseries Symbol\\ -%\ttfamily listdotted & 0 & & \\ -%\ttfamily sublistdotted & 1 & & \\ -%\ttfamily list* & 1 & \tick & \\ -%\ttfamily altlist* & 1 & \tick & \\ -%\ttfamily long*3col* & 1 & \tick & \\ -%\ttfamily long4col* & 1 & \tick & \tick \\ -%\ttfamily altlong*4col* & 1 & \tick & \tick \\ -%\ttfamily long* & 1 & \tick & \\ -%\ttfamily super*3col* & 1 & \tick & \\ -%\ttfamily super4col* & 1 & \tick & \tick \\ -%\ttfamily altsuper*4col* & 1 & \tick & \tick \\ -%\ttfamily super* & 1 & \tick & \\ -%\ttfamily index* & 2 & & \tick\\ -%\ttfamily treenoname* & --- & \tick & \tick\\ -%\ttfamily tree* & --- & & \tick\\ -%\ttfamily alttree* & --- & & \tick -%\end{tabular} -%\par -%\end{table} -% -%The glossary style can be set using the \gloskey[printglossary]{style} key in the optional -%argument to \ics{printglossary} or using the command: -%\begin{definition}[\DescribeMacro{\glossarystyle}] -%\cs{glossarystyle}\marg{style-name} -%\end{definition} -%Some of the glossary styles may also be set using the \pkgopt{style} -%package option, it depends if the package in which they are defined -%is automatically loaded by the \styfmt{glossaries} package. -% -%The tabular-like styles that allow multi-line descriptions and page -%lists use the length \DescribeMacro{\glsdescwidth}\cs{glsdescwidth} -%to set the width of the description column and the length -%\DescribeMacro{\glspagelistwidth}\cs{glspagelistwidth} to set the -%width of the page list column.\footnote{these lengths will not be -%available if you use both the \pkgopt{nolong} and \pkgopt{nosuper} -%package options or if you use the \pkgopt{nostyles} package option -%unless you explicitly load the relevant package.} -%These will need to be changed using \cs{setlength} if the glossary -%is too wide. Note that the \glostyle{long4col} and -%\glostyle{super4col} styles (and their header and border variations) -%don't use these lengths as they are designed for single line -%entries. Instead you should use the analogous \glostyle{altlong4col} -%and \glostyle{altsuper4col} styles. If you want to -%explicitly create a line-break within a multi-line description in -%a tabular-like style you should use \ics{newline} instead of -%\verb|\\|. -% -%Note that if you use the \gloskey[printglossary]{style} key in the -%optional argument to \ics{printglossary}, it will override any -%previous style settings for the given glossary, so if, for example, -%you do -%\begin{verbatim} -%\renewcommand*{\glsgroupskip}{} -%\printglossary[style=long] -%\end{verbatim} -%then the new definition of \ics{glsgroupskip} will not have an affect -%for this glossary, as \cs{glsgroupskip} is redefined by -%\verb|style=long|. Likewise, \ics{glossarystyle} will also -%override any previous style definitions, so, again -%\begin{verbatim} -%\renewcommand*{\glsgroupskip}{} -%\glossarystyle{long} -%\end{verbatim} -%will reset \cs{glsgroupskip} back to its default definition for the -%named glossary style (\glostyle{long} in this case). If you want to -%modify the styles, either use \ics{newglossarystyle} (described -%in the next section) or make the modifications after -%\ics{glossarystyle}, e.g.: -%\begin{verbatim} -%\glossarystyle{long} -%\renewcommand*{\glsgroupskip}{} -%\end{verbatim} -% -% \changes{1.03}{2007 July 4}{'glspostdescription added} -%All the styles except for the three- and four-column styles and the -%\glostyle{listdotted} style use the command -%\begin{definition}[\DescribeMacro{\glspostdescription}] -%\cs{glspostdescription} -%\end{definition} -%after the description. This simply displays a full stop by default. -%To eliminate this full stop (or replace it with something else, say, -%a comma) you will need to redefine \cs{glspostdescription} before -%the glossary is displayed. Alternatively, you can suppress it for a -%given entry by placing \ics{nopostdesc} in the entry's description. -% -%\subsubsection{List Styles} -%\label{sec:liststyles} -% -%The styles described in this section are all defined in the package -%\sty{glossary-list}. Since they all use the \env{description} -%environment, they are governed by the same parameters as that -%environment. These styles all ignore the entry's symbol. Note that -%these styles will automatically be available unless you use the -%\pkgopt{nolist} or \pkgopt{nostyles} package options. -% -%\begin{description} -%\item[list] The \glostyle{list} style uses the \env{description} -%environment. The entry name is placed in the optional argument of -%the \cs{item} command (so it will appear in bold by default). The -%description follows, and then the associated \term{number list} for -%that entry. The symbol is ignored. If the entry has child entries, -%the description and number list follows (but not the name) for each -%child entry. Groups are separated using \cs{indexspace}. -% -%\item[listgroup] The \glostyle{listgroup} style is like -%\glostyle{list} but the glossary groups have headings. -% -%\item[listhypergroup] The \glostyle{listhypergroup} style is like -%\glostyle{listgroup} but has a navigation line at the start of the -%glossary with links to each group that is present in the glossary. -%This requires an additional run through \LaTeX\ to ensure the group -%information is up to date. In the navigation line, each group is -%separated by -%\begin{definition}[\DescribeMacro{\glshypernavsep}] -%\cs{glshypernavsep} -%\end{definition} -%which defaults to a vertical bar with a space on either side. For -%example, to simply have a space separating each group, do: -%\begin{verbatim} -%\renewcommand*{\glshypernavsep}{\space} -%\end{verbatim} -% -%Note that the hyper-navigation line is now (as from version 1.14) -%set inside the optional argument to \cs{item} instead of after it -%to prevent a spurious space at the start. This can be changed -%by redefining \ics{glossaryheader}, but note that this needs to -%be done \emph{after} the glossary style has been set. -% -%\item[altlist] The \glostyle{altlist} style is like \glostyle{list} -%but the description starts on the line following the name. (As -%with the \glostyle{list} style, the symbol is ignored.) Each child -%entry starts a new line, but as with the \glostyle{list} style, -%the name associated with each child entry is ignored. -% -%\item[altlistgroup] The \glostyle{altlistgroup} style is like -%\glostyle{altlist} but the glossary groups have headings. -% -%\item[altlisthypergroup] The \glostyle{altlisthypergroup} style is like -%\glostyle{altlistgroup} but has a set of links to the glossary -%groups. The navigation line is the same as that for -%\glostyle{listhypergroup}, described above. -% -%\item[listdotted] This style uses the \env{description} -%environment.\footnote{This style was supplied by Axel~Menzel.} Each -%entry starts with \verb|\item[]|, followed by the name followed by a -%dotted line, followed by the description. Note that this style -%ignores both the \term{number list} and the symbol. The length -%\begin{definition}[\DescribeMacro{\glslistdottedwidth}] -%\cs{glslistdottedwidth} -%\end{definition} -%governs where the description should start. This is a flat style, so -%child entries are formatted in the same way as the parent entries. -% -%\item[sublistdotted] This is a variation on the \glostyle{listdotted} -%style designed for hierarchical glossaries. The main entries -%have just the name displayed. The sub entries are displayed in -%the same manner as \glostyle{listdotted}. -%\end{description} -% -% -%\subsubsection{Longtable Styles} -%\label{sec:longstyles} -% -%The styles described in this section are all defined in the package -%\sty{glossary-long}. Since they all use the \env{longtable} -%environment, they are governed by the same parameters as that -%environment. Note that these styles will automatically be available -%unless you use the \pkgopt{nolong} or \pkgopt{nostyles} package -%options. These styles fully justify the description and page list -%columns. If you want ragged right formatting instead, use the -%analogous styles described in \sectionref{sec:longraggedstyles}. -% -% -%\begin{description} -%\item[long] The \glostyle{long} style uses the \env{longtable} -%environment (defined by the \sty{longtable} package). It has two -%columns: the first column contains the entry's name and the second -%column contains the description followed by the \term{number list}. -%The entry's symbol is ignored. -%Sub groups are separated with a blank row. The width of the -%first column is governed by the widest entry in that column. The -%width of the second column is governed by the length -%\ics{glsdescwidth}. Child entries have a similar format to the -%parent entries except that their name is suppressed. -% -%\item[longborder] The \glostyle{longborder} style is like -%\glostyle{long} but has horizontal and vertical lines around it. -% -%\item[longheader] The \glostyle{longheader} style is like -%\glostyle{long} but has a header row. -% -%\item[longheaderborder] The \glostyle{longheaderborder} style is -%like \glostyle{longheader} but has horizontal and vertical lines -%around it. -% -%\item[long3col] The \glostyle{long3col} style is like -%\glostyle{long} but has three columns. The first column contains -%the entry's name, the second column contains the description -%and the third column contains the \term{number list}. -%The entry's symbol is ignored. The width of the -%first column is governed by the widest entry in that column, the -%width of the second column is governed by the length -%\ics{glsdescwidth}, and the width of the third column is governed by the -%length \ics{glspagelistwidth}. -% -%\item[long3colborder] The \glostyle{long3colborder} style is like -%the \glostyle{long3col} style but has horizontal and vertical -%lines around it. -% -%\item[long3colheader] The \glostyle{long3colheader} style is like -%\glostyle{long3col} but has a header row. -% -%\item[long3colheaderborder] The \glostyle{long3colheaderborder} style is -%like \glostyle{long3colheader} but has horizontal and vertical lines -%around it. -% -%\item[long4col] The \glostyle{long4col} style is like -%\glostyle{long3col} but has an additional column in which the -%entry's associated symbol appears. This style is used for brief -%single line descriptions. The column widths are governed by the -%widest entry in the given column. Use \glostyle{altlong4col} for -%multi-line descriptions. -% -%\item[long4colborder] The \glostyle{long4colborder} style is like -%the \glostyle{long4col} style but has horizontal and vertical -%lines around it. -% -%\item[long4colheader] The \glostyle{long4colheader} style is like -%\glostyle{long4col} but has a header row. -% -%\item[long4colheaderborder] The \glostyle{long4colheaderborder} style is -%like \glostyle{long4colheader} but has horizontal and vertical lines -%around it. -% -%\item[altlong4col] The \glostyle{altlong4col} style is like -%\glostyle{long4col} but allows multi-line descriptions and page -%lists. The width of the description column is governed by the -%length \ics{glsdescwidth} and the width of the page list column is -%governed by the length \ics{glspagelistwidth}. The widths of the -%name and symbol columns are governed by the widest entry in the -%given column. -% -%\item[altlong4colborder] The \glostyle{altlong4colborder} style is like -%the \glostyle{long4colborder} but allows multi-line descriptions and -%page lists. -% -%\item[altlong4colheader] The \glostyle{altlong4colheader} style is like -%\glostyle{long4colheader} but allows multi-line descriptions and -%page lists. -% -%\item[altlong4colheaderborder] The \glostyle{altlong4colheaderborder} -%style is like \glostyle{long4colheaderborder} but allows multi-line -%descriptions and page lists. -%\end{description} -% -% -%\subsubsection{Longtable Styles (Ragged Right)} -%\label{sec:longraggedstyles} -% -%The styles described in this section are all defined in the package -%\sty{glossary-longragged}. These styles are analogous to those -%defined in \sty{glossary-long} but the multiline columns are left -%justified instead of fully justified. Since these styles all use the -%\env{longtable} environment, they are governed by the same -%parameters as that environment. The \sty{glossary-longragged} -%package additionally requires the \sty{array} package. Note that -%these styles will only be available if you explicitly load -%\sty{glossary-longragged}: -%\begin{verbatim} -%\usepackage{glossaries} -%\usepackage{glossary-longragged} -%\end{verbatim} -%Note that you can't set these styles using the \pkgopt{style} -%package option since the styles aren't defined until after -%the \styfmt{glossaries} package has been loaded. -% -%\begin{description} -%\item[longragged] The \glostyle{longragged} style has two -%columns: the first column contains the entry's name and the second -%column contains the (left-justified) description followed by the -%\term{number list}. The entry's symbol is ignored. -%Sub groups are separated with a blank row. The width of the -%first column is governed by the widest entry in that column. The -%width of the second column is governed by the length -%\ics{glsdescwidth}. Child entries have a similar format to the -%parent entries except that their name is suppressed. -% -%\item[longraggedborder] The \glostyle{longraggedborder} style is like -%\glostyle{longragged} but has horizontal and vertical lines around it. -% -%\item[longraggedheader] The \glostyle{longraggedheader} style is like -%\glostyle{longragged} but has a header row. -% -%\item[longraggedheaderborder] The \glostyle{longraggedheaderborder} -%style is like \glostyle{longraggedheader} but has horizontal and -%vertical lines around it. -% -%\item[longragged3col] The \glostyle{longragged3col} style is like -%\glostyle{longragged} but has three columns. The first column -%contains the entry's name, the second column contains the (left -%justified) description and the third column contains the (left -%justified) \term{number list}. The entry's symbol is ignored. The -%width of the first column is governed by the widest entry in that -%column, the width of the second column is governed by the length -%\ics{glsdescwidth}, and the width of the third column is governed by -%the length \ics{glspagelistwidth}. -% -%\item[longragged3colborder] The \glostyle{longragged3colborder} -%style is like the \glostyle{longragged3col} style but has horizontal -%and vertical lines around it. -% -%\item[longragged3colheader] The \glostyle{longragged3colheader} style is like -%\glostyle{longragged3col} but has a header row. -% -%\item[longragged3colheaderborder] The \glostyle{longragged3colheaderborder} style is -%like \glostyle{longragged3colheader} but has horizontal and vertical lines -%around it. -% -%\item[altlongragged4col] The \glostyle{altlongragged4col} style is -%like \glostyle{longragged3col} but has an additional column in which -%the entry's associated symbol appears. The width of the description -%column is governed by the length \ics{glsdescwidth} and the width of -%the page list column is governed by the length -%\ics{glspagelistwidth}. The widths of the name and symbol columns -%are governed by the widest entry in the given column. -% -%\item[altlongragged4colborder] The -%\glostyle{altlongragged4colborder} style is like the -%\glostyle{altlongragged4col} but has horizontal and vertical lines -%around it. -% -%\item[altlongragged4colheader] The -%\glostyle{altlongragged4colheader} style is like -%\glostyle{altlongragged4col} but has a header row. -% -%\item[altlongragged4colheaderborder] The -%\glostyle{altlongragged4colheaderborder} style is like -%\glostyle{altlongragged4colheader} but has horizontal and vertical -%lines around it. -% -%\end{description} -% -% -%\subsubsection{Supertabular Styles} -%\label{sec:superstyles} -% -%The styles described in this section are all defined in the package -%\sty{glossary-super}. Since they all use the \env{supertabular} -%environment, they are governed by the same parameters as that -%environment. Note that these styles will automatically be available -%unless you use the \pkgopt{nosuper} or \pkgopt{nostyles} package -%options. In general, the \env{longtable} environment is better, -%but there are some circumstances where it is better to use -%\env{supertabular}.\footnote{e.g.\ with the \sty{flowfram} -%package.} These styles fully justify the description and page list -%columns. If you want ragged right formatting instead, use the -%analogous styles described in \sectionref{sec:superraggedstyles}. -% -%\begin{description} -%\item[super] The \glostyle{super} style uses the \env{supertabular} -%environment (defined by the \sty{supertabular} package). It has two -%columns: the first column contains the entry's name and the second -%column contains the description followed by the \term{number list}. -%The entry's symbol is ignored. -%Sub groups are separated with a blank row. The width of the -%first column is governed by the widest entry in that column. The -%width of the second column is governed by the length -%\ics{glsdescwidth}. Child entries have a similar format to the -%parent entries except that their name is suppressed. -% -%\item[superborder] The \glostyle{superborder} style is like -%\glostyle{super} but has horizontal and vertical lines around it. -% -%\item[superheader] The \glostyle{superheader} style is like -%\glostyle{super} but has a header row. -% -%\item[superheaderborder] The \glostyle{superheaderborder} style is -%like \glostyle{superheader} but has horizontal and vertical lines -%around it. -% -%\item[super3col] The \glostyle{super3col} style is like -%\glostyle{super} but has three columns. The first column contains -%the entry's name, the second column contains the description -%and the third column contains the \term{number list}. The -%entry's symbol is ignored. The width of the -%first column is governed by the widest entry in that column. The -%width of the second column is governed by the length -%\ics{glsdescwidth}. The width of the third column is governed by the -%length \ics{glspagelistwidth}. -% -%\item[super3colborder] The \glostyle{super3colborder} style is like -%the \glostyle{super3col} style but has horizontal and vertical -%lines around it. -% -%\item[super3colheader] The \glostyle{super3colheader} style is like -%\glostyle{super3col} but has a header row. -% -%\item[super3colheaderborder] The \glostyle{super3colheaderborder} style -%is like \glostyle{super3colheader} but has horizontal and vertical -%lines around it. -% -%\item[super4col] The \glostyle{super4col} style is like -%\glostyle{super3col} but has an additional column in which the -%entry's associated symbol appears. This style is designed for -%entries with brief single line descriptions. The column widths are governed by the -%widest entry in the given column. Use \glostyle{altsuper4col} -%for multi-line descriptions. -% -%\item[super4colborder] The \glostyle{super4colborder} style is like -%the \glostyle{super4col} style but has horizontal and vertical -%lines around it. -% -%\item[super4colheader] The \glostyle{super4colheader} style is like -%\glostyle{super4col} but has a header row. -% -%\item[super4colheaderborder] The \glostyle{super4colheaderborder} style -%is like \glostyle{super4colheader} but has horizontal and vertical -%lines around it. -% -%\item[altsuper4col] The \glostyle{altsuper4col} style is like -%\glostyle{super4col} but allows multi-line descriptions and page -%lists. -%The width of the description column is governed by the length -%\ics{glsdescwidth} and the width of the page list column is -%governed by the length \ics{glspagelistwidth}. The width of the name -%and symbol columns is governed by the widest entry in the -%given column. -% -%\item[altsuper4colborder] The \glostyle{altsuper4colborder} style is like -%the \glostyle{super4colborder} style but allows multi-line descriptions -%and page lists. -% -%\item[altsuper4colheader] The \glostyle{altsuper4colheader} style is like -%\glostyle{super4colheader} but allows multi-line descriptions and -%page lists. -% -%\item[altsuper4colheaderborder] The \glostyle{altsuper4colheaderborder} -%style is like \glostyle{super4colheaderborder} but allows multi-line -%descriptions and page lists. -%\end{description} -% -% -%\subsubsection{Supertabular Styles (Ragged Right)} -%\label{sec:superraggedstyles} -% -%The styles described in this section are all defined in the package -%\sty{glossary-superragged}. These styles are analogous to those -%defined in \sty{glossary-super} but the multiline columns are left -%justified instead of fully justified. Since these styles all use the -%\env{supertabular} environment, they are governed by the same -%parameters as that environment. The \sty{glossary-superragged} -%package additionally requires the \sty{array} package. Note that -%these styles will only be available if you explicitly load -%\sty{glossary-superragged}: -%\begin{verbatim} -%\usepackage{glossaries} -%\usepackage{glossary-superragged} -%\end{verbatim} -%Note that you can't set these styles using the \pkgopt{style} -%package option since the styles aren't defined until after -%the \styfmt{glossaries} package has been loaded. -% -%\begin{description} -%\item[superragged] The \glostyle{superragged} style uses the -%\env{supertabular} environment (defined by the -%\sty{supertabular} package). It has two columns: the first column -%contains the entry's name and the second column contains the (left -%justified) description followed by the \term{number list}. The -%entry's symbol is ignored. Sub groups are separated with a blank -%row. The width of the first column is governed by the widest entry -%in that column. The width of the second column is governed by the -%length \ics{glsdescwidth}. Child entries have a similar format to -%the parent entries except that their name is suppressed. -% -%\item[superraggedborder] The \glostyle{superraggedborder} style is -%like \glostyle{superragged} but has horizontal and vertical lines -%around it. -% -%\item[superraggedheader] The \glostyle{superraggedheader} style is -%like \glostyle{superragged} but has a header row. -% -%\item[superraggedheaderborder] The -%\glostyle{superraggedheaderborder} style is like -%\glostyle{superraggedheader} but has horizontal and vertical lines -%around it. -% -%\item[superragged3col] The \glostyle{superragged3col} style is like -%\glostyle{superragged} but has three columns. The first column -%contains the entry's name, the second column contains the (left -%justified) description and the third column contains the (left -%justified) \term{number list}. The entry's symbol is ignored. The -%width of the first column is governed by the widest entry in that -%column. The width of the second column is governed by the length -%\ics{glsdescwidth}. The width of the third column is governed by the -%length \ics{glspagelistwidth}. -% -%\item[superragged3colborder] The \glostyle{superragged3colborder} -%style is like the \glostyle{superragged3col} style but has -%horizontal and vertical lines around it. -% -%\item[superragged3colheader] The \glostyle{superragged3colheader} -%style is like \glostyle{superragged3col} but has a header row. -% -%\item[superragged3colheaderborder] The -%\glostyle{superragged3colheaderborder} style is like -%\glostyle{superragged3colheader} but has horizontal and vertical -%lines around it. -% -%\item[altsuperragged4col] The \glostyle{altsuperragged4col} style is -%like \glostyle{superragged3col} but has an additional column in -%which the entry's associated symbol appears. The column widths for -%the name and symbol column are governed by the widest entry in the -%given column. -% -%\item[altsuperragged4colborder] The -%\glostyle{altsuperragged4colborder} style is like the -%\glostyle{altsuperragged4col} style but has horizontal and vertical -%lines around it. -% -%\item[altsuperragged4colheader] The -%\glostyle{altsuperragged4colheader} style is like -%\glostyle{altsuperragged4col} but has a header row. -% -%\item[altsuperragged4colheaderborder] The -%\glostyle{altsuperragged4colheaderborder} style is like -%\glostyle{altsuperragged4colheader} but has horizontal and vertical -%lines around it. -% -%\end{description} -% -% -%\subsubsection{Tree-Like Styles} -%\label{sec:treestyles} -% -%The styles described in this section are all defined in the package -%\sty{glossary-tree}. These styles are designed for hierarchical -%glossaries but can also be used with glossaries that don't have -%sub-entries. These styles will display the entry's symbol if it -%exists. Note that these styles will automatically be available -%unless you use the \pkgopt{notree} or \pkgopt{nostyles} package -%options. -% -%\begin{description} -%\item[index] The \glostyle{index} style is similar to the way -%indices are usually formatted in that it has a hierarchical -%structure up to three levels (the main level plus two sub-levels). -%The name is typeset in bold, and if the symbol is present it is set -%in parentheses after the name and before the description. -%Sub-entries are indented and also include the name, the symbol -%in brackets (if present) and the description. Groups are separated -%using \ics{indexspace}. -% -%\item[indexgroup] The \glostyle{indexgroup} style is similar to -%the \glostyle{index} style except that each group has a heading. -% -%\item[indexhypergroup] The \glostyle{indexhypergroup} style is like -%\glostyle{indexgroup} but has a set of links to the glossary -%groups. The navigation line is the same as that for -%\glostyle{listhypergroup}, described above. -% -%\item[tree] The \glostyle{tree} style is similar to the -%\glostyle{index} style except that it can have arbitrary levels. -%(Note that \app{makeindex} is limited to three levels, so -%you will need to use \app{xindy} if you want more than -%three levels.) Each sub-level is indented by -%\DescribeMacro{\glstreeindent}\cs{glstreeindent}. Note that the -%name, symbol (if present) and description are placed in the -%same paragraph block. If you want the name to be apart from the -%description, use the \glostyle{alttree} style instead. (See below.) -% -%\item[treegroup] The \glostyle{treegroup} style is similar to -%the \glostyle{tree} style except that each group has a heading. -% -%\item[treehypergroup] The \glostyle{treehypergroup} style is like -%\glostyle{treegroup} but has a set of links to the glossary -%groups. The navigation line is the same as that for -%\glostyle{listhypergroup}, described above. -% -%\item[treenoname] The \glostyle{treenoname} style is like -%the \glostyle{tree} style except that the name for each sub-entry -%is ignored. -% -%\item[treenonamegroup] The \glostyle{treenonamegroup} style is -%similar to the \glostyle{treenoname} style except that each group -%has a heading. -% -%\item[treenonamehypergroup] The \glostyle{treenonamehypergroup} -%style is like \glostyle{treenonamegroup} but has a set of links to -%the glossary groups. The navigation line is the same as that for -%\glostyle{listhypergroup}, described above. -% -%\item[alttree] The \glostyle{alttree} style is similar to the -%\glostyle{tree} style except that the indentation for each level -%is determined by the width of the text specified by -%\begin{definition}[\DescribeMacro{\glssetwidest}] -%\cs{glssetwidest}\oarg{level}\marg{text} -%\end{definition} -%The optional argument \meta{level} indicates the level, where -%0 indicates the top-most level, 1 indicates the first level -%sub-entries, etc. If \cs{glssetwidest} hasn't been used for a -%given sub-level, the level~0 widest text is used instead. If -%\meta{level} is omitted, 0 is assumed. -% -%For each level, the name is placed to the left of the paragraph -%block containing the symbol (optional) and the description. If the -%symbol is present, it is placed in parentheses before the -%description. -% -%\item[alttreegroup] The \glostyle{alttreegroup} is like the -%\glostyle{alttree} style except that each group has a heading. -% -%\item[alttreehypergroup] The \glostyle{alttreehypergroup} style is -%like \glostyle{alttreegroup} but has a set of links to the glossary -%groups. The navigation line is the same as that for -%\glostyle{listhypergroup}, described above. -% -%\end{description} -% -% -% -%\subsection{Defining your own glossary style} -%\label{sec:newglossarystyle} -% -%If the predefined styles don't fit your requirements, you can -%define your own style using: -%\begin{definition}[\DescribeMacro{\newglossarystyle}] -%\cs{newglossarystyle}\marg{name}\marg{definitions} -%\end{definition} -%where \meta{name} is the name of the new glossary style (to be -%used in \cs{glossarystyle}). The second argument \meta{definitions} -%needs to redefine all of the following: -% -%\begin{definition}[\DescribeEnv{theglossary}] -%\env{theglossary} -%\end{definition} -%This environment defines how the main body of the glossary should -%be typeset. Note that this does not include the section heading, -%the glossary preamble (defined by \cs{glossarypreamble}) or the -%glossary postamble (defined by \cs{glossarypostamble}). For example, -%the \glostyle{list} style uses the \env{description} environment, -%so the \env{theglossary} environment is simply redefined to begin -%and end the \env{description} environment. -% -%\begin{definition}[\DescribeMacro{\glossaryheader}] -%\cs{glossaryheader} -%\end{definition} -%This macro indicates what to do at the start of the main body -%of the glossary. Note that this is not the same as -%\cs{glossarypreamble}, which should not be affected by changes in -%the glossary style. The \glostyle{list} glossary style redefines -%\cs{glossaryheader} to do nothing, whereas the \glostyle{longheader} -%glossary style redefines \cs{glossaryheader} to do a header row. -% -%\begin{definition}[\DescribeMacro{\glsgroupheading}] -%\cs{glsgroupheading}\marg{label} -%\end{definition} -%This macro indicates -%what to do at the start of each logical block within the main body -%of the glossary. If you use \app{makeindex} the glossary is -%sub-divided into a maximum of twenty-eight logical blocks that are -%determined by the first character of the \gloskey{sort} key (or -%\gloskey{name} key if the \gloskey{sort} key is omitted). The -%sub-divisions are in the following order: symbols, numbers, A, -%\ldots, Z\@. If you use \app{xindy}, the sub-divisions depend on -%the language settings. -% -%Note that the argument to \cs{glsgroupheading} -%is a label \emph{not} the group title. The group title can be obtained -%via -%\begin{definition}[\DescribeMacro{\glsgetgrouptitle}] -%\cs{glsgetgrouptitle}\marg{label} -%\end{definition} -%This obtains the title as follows: if -%\cs{}\meta{label}\texttt{groupname} exists, this is taken to be the -%title, otherwise the title is just \meta{label}. -% -%A navigation hypertarget can be created using -%\begin{definition}[\DescribeMacro{\glsnavhypertarget}] -%\cs{glsnavhypertarget}\marg{label}\marg{text} -%\end{definition} -%For further details about \cs{glsnavhypertarget}, see -%\ifpdf\sectionref{sec:code:hypernav}\else the documented code of -%\sty{glossary-hypernav} in \texttt{glossaries.pdf}\fi. -% -% -%Most of the predefined glossary styles redefine \cs{glsgroupheading} -%to simply ignore its argument. The \glostyle{listhypergroup} style -%redefines \cs{glsgroupheading} as follows: -%\begin{verbatim} -%\renewcommand*{\glsgroupheading}[1]{% -%\item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]} -%\end{verbatim} -%See also \cs{glsgroupskip} below. (Note that command definitions within -%\cs{newglossarystyle} must use \verb|##1| instead of \verb|#1| etc.) -% -%\begin{definition}[\DescribeMacro{\glsgroupskip}] -%\cs{glsgroupskip} -%\end{definition} -%This macro determines what to do after one logical group but before -%the header for the next logical group. The \glostyle{list} glossary -%style simply redefines \cs{glsgroupskip} to be \cs{indexspace}, -%whereas the tabular-like styles redefine \cs{glsgroupskip} to -%produce a blank row. -% -%\begin{definition}[\DescribeMacro{\glossaryentryfield}] -%\cs{glossaryentryfield}\marg{label}\marg{formatted -%name}\marg{description}\marg{symbol} -%\marg{number list} -%\end{definition} -%This macro indicates what to do for a given glossary entry. -%Note that \meta{formatted name} will always be in the form -%\cs{glsnamefont}\marg{name}. This allows the user to set a given -%font for the entry name, regardless of the glossary style used. -%Note that \meta{label} is the label used when the glossary entry -%was defined via either \cs{newglossaryentry} or \cs{newacronym}. -% -%Each time you use a glossary entry it creates a hyperlink (if -%hyperlinks are enabled) to the relevant line in the glossary. -%Your new glossary style must therefore redefine -%\cs{glossaryentryfield} to set the appropriate target. This -%is done using -%\begin{definition}[\DescribeMacro{\glstarget}] -%\cs{glstarget}\marg{label}\marg{text} -%\end{definition} -%where \meta{label} is the entry's label. Note that you -%don't need to worry about whether the \sty{hyperref} package has -%been loaded, as \cs{glstarget} won't create a target if -%\cs{hypertarget} hasn't been defined. -% -%For example, the -%\glostyle{list} style defines \cs{glossaryentryfield} as follows: -%\begin{verbatim} -%\renewcommand*{\glossaryentryfield}[5]{% -%\item[\glstarget{##1}{##2}] ##3\glspostdescription\space ##5} -%\end{verbatim} -% -%Note also that \meta{number list} will always be of the form\\[10pt] -%\cs{glossaryentrynumbers}\{\cs{relax}\\ -%\cs{setentrycounter}\marg{counter name}\cs{glsnumberformat}\marg{number(s)}\}\\[10pt] -%where \meta{number(s)} -%may contain \cs{delimN} (to delimit individual numbers) and/or -%\cs{delimR} (to indicate a range of numbers). There may be -%multiple occurrences of -%\cs{setentrycounter}\marg{counter name}\cs{glsnumberformat}\marg{number(s)}, but note -%that the entire number list is enclosed within the argument -%to \ics{glossaryentrynumbers}. The user can redefine this to change -%the way the entire number list is formatted, regardless of -%the glossary style. However the most common use of -%\cs{glossaryentrynumbers} is to provide a means of suppressing the -%number list altogether. (In fact, the \pkgopt{nonumberlist} option -%redefines \cs{glossaryentrynumbers} to ignore its argument.) -%Therefore, when you define a new glossary style, you don't need -%to worry about whether the user has specified the -%\pkgopt{nonumberlist} package option. -% -%\begin{definition}[\DescribeMacro{\glossarysubentryfield}] -%\cs{glossarysubentryfield}\marg{level}\marg{label}\marg{formatted -%name}\marg{description}\marg{symbol} -%\marg{number list} -%\end{definition} -%This is new to version 1.17, and is used to display sub-entries. -%The first argument, \meta{level}, indicates the sub-entry level. -%This must be an integer from 1 (first sub-level) onwards. The -%remaining arguments are analogous to those for -%\ics{glossaryentryfield} described above. -% -%For further details of these commands, see -%\ifpdf\sectionref{sec:code:printglos}\else the documented code in -%\texttt{glossaries.pdf}\fi. -% -%\subsubsection{Example: creating a completely new style} -% -%If you want a completely new style, you will need to redefine all -%of the commands and the environment listed above. -% -%For example, suppose you want each entry to start with a bullet point. -%This means that the glossary should be placed in the \env{itemize} -%environment, so \env{theglossary} should start and end that -%environment. Let's also suppose that you don't want anything between -%the glossary groups (so \ics{glsgroupheading} and \ics{glsgroupskip} -%should do nothing) and suppose you don't want anything to appear -%immediately after \verb|\begin{theglossary}| (so \ics{glossaryheader} -%should do nothing). In addition, let's suppose the symbol should -%appear in brackets after the name, followed by the description and -%last of all the \term{number list} should appear within square brackets -%at the end. Then you can create this new glossary style, called, say, -%\texttt{mylist}, as follows: -%\begin{verbatim} -% \newglossarystyle{mylist}{% -% % put the glossary in the itemize environment: -% \renewenvironment{theglossary}{\begin{itemize}}{\end{itemize}}% -% % have nothing after \begin{theglossary}: -% \renewcommand*{\glossaryheader}{}% -% % have nothing between glossary groups: -% \renewcommand*{\glsgroupheading}[1]{}% -% \renewcommand*{\glsgroupskip}{}% -% % set how each entry should appear: -% \renewcommand*{\glossaryentryfield}[5]{% -% \item % bullet point -% \glstarget{##1}{##2}% the entry name -% \space (##4)% the symbol in brackets -% \space ##3% the description -% \space [##5]% the number list in square brackets -% }% -% % set how sub-entries appear: -% \renewcommand*{\glossarysubentryfield}[6]{% -% \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% -% } -%\end{verbatim} -%Note that this style creates a flat glossary, where sub-entries -%are displayed in exactly the same way as the top level entries. -% -% -%\subsubsection{Example: creating a new glossary style based on an -%existing style} -% -%\changes{1.11}{2008 March 1}{Fixed error in manual (glossary style -%is set using \cs{glossarystyle} not \cs{setglossarystyle})}% -%If you want to define a new style that is a slightly modified -%version of an existing style, you can use \cs{glossarystyle} -%within the second argument of \cs{newglossarystyle} followed by -%whatever alterations you require. For example, suppose you want -%a style like the \glostyle{list} style but you don't want the extra -%vertical space created by \cs{indexspace} between groups, then you -%can create a new glossary style called, say, \texttt{mylist} as -%follows: -%\begin{verbatim} -%\newglossarystyle{mylist}{% -%\glossarystyle{list}% base this style on the list style -%\renewcommand{\glsgroupskip}{}% make nothing happen between groups -%} -%\end{verbatim} -% -% -%\subsubsection{Example: creating a glossary style that uses the -%\gloskey{user1}, \ldots, \gloskey{user6} keys} -% -%Since \ics{glossaryentryfield} and \ics{glossarysubentryfield} -%provide the label for the entry, it's also possible to access -%the values of the generic user keys, such as \gloskey{user1}. For -%example, suppose each entry not only has an associated symbol, -%but also units (stored in \gloskey{user1}) and dimension -%(stored in \gloskey{user2}). Then you can define a glossary style -%that displays each entry in a \env{longtable} as follows: -%\begin{verbatim} -%\newglossarystyle{long6col}{% -% % put the glossary in a longtable environment: -% \renewenvironment{theglossary}% -% {\begin{longtable}{lp{\glsdescwidth}cccp{\glspagelistwidth}}}% -% {\end{longtable}}% -% % Set the table's header: -% \renewcommand*{\glossaryheader}{% -% \bfseries Term & \bfseries Description & \bfseries Symbol & -% \bfseries Units & \bfseries Dimensions & \bfseries Page List -% \\\endhead}% -% % No heading between groups: -% \renewcommand*{\glsgroupheading}[1]{}% -% % Main (level 0) entries displayed in a row: -% \renewcommand*{\glossaryentryfield}[5]{% -% \glstarget{##1}{##2}% Name -% & ##3% Description -% & ##4% Symbol -% & \glsentryuseri{##1}% Units -% & \glsentryuserii{##1}% Dimensions -% & ##5% Page list -% \\% end of row -% }% -% % Sub entries treated the same as level 0 entries: -% \renewcommand*{\glossarysubentryfield}[6]{% -% \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% -% % Nothing between groups: -% \renewcommand*{\glsgroupskip}{}% -%} -%\end{verbatim} -% -% -%\subsection{Accessibility Support}\label{sec:accsupp} -%Limited accessibility support is provided by the accompanying -%\sty{glossaries-accsupp} package, but note that this package is -%experimental and it requires the \sty{accsupp} package -%which is also listed as experimental. This package defines -%additional keys that may be used when defining glossary entries. -%The keys are as follows: -%\begin{description} -%\item[{\gloskey{access}}] The replacement text corresponding to -%the \gloskey{name} key. -% -%\item[{\gloskey{textaccess}}] The replacement text corresponding -%to the \gloskey{text} key. -% -%\item[{\gloskey{firstaccess}}] The replacement text corresponding -%to the \gloskey{first} key. -% -%\item[{\gloskey{pluralaccess}}] The replacement text corresponding -%to the \gloskey{plural} key. -% -%\item[{\gloskey{firstpluralaccess}}] The replacement text corresponding -%to the \gloskey{firstplural} key. -% -%\item[{\gloskey{symbolaccess}}] The replacement text corresponding -%to the \gloskey{symbol} key. -% -%\item[{\gloskey{symbolpluralaccess}}] The replacement text corresponding -%to the \gloskey{symbolplural} key. -% -%\item[{\gloskey{descriptionaccess}}] The replacement text corresponding -%to the \gloskey{description} key. -% -%\item[{\gloskey{descriptionpluralaccess}}] The replacement text corresponding -%to the \gloskey{descriptionplural} key. -% -%\end{description} -% -%For example: -%\begin{verbatim} -%\newglossaryentry{tex}{name={\TeX},description={Document preparation -%language},access={TeX}} -%\end{verbatim} -%Now \verb|\gls{tex}| will be equivalent to -%\begin{verbatim} -%\BeginAccSupp{ActualText=TeX}\TeX\EndAccSupp{} -%\end{verbatim} -%See \ifpdf \sectionref{sec:code:accsupp} \else the section -%\qt{glossaries-accsupp code} in the document \texttt{glossaries.pdf} -%\fi for further details. It is recommended that you also read the -%\sty{accsupp} documentation. -% -%\section{Mfirstuc Package} -%\label{sec:mfirstuc} -% -%The \styfmt{glossaries} bundle is supplied with the package -%\sty{mfirstuc} which provides the command: -%\begin{definition}[\DescribeMacro{\makefirstuc}] -%\cs{makefirstuc}\marg{stuff} -%\end{definition} -%which makes the first object of -%\meta{stuff} uppercase unless \meta{stuff} starts with a control -%sequence followed by a non-empty group, in which case the first -%object in the group is converted to uppercase. Examples: -%\begin{itemize} -%\item \verb|\makefirstuc{abc}| produces Abc -% -%\item \verb|\makefirstuc{\emph{abc}}| produces \emph{Abc} -%(\ics{MakeUppercase} has been applied to the letter \qt{a} rather -%than \cs{emph}.) Note however that -%\verb|\makefirstuc{{\em abc}}| produces \emph{ABC} and -%\verb|{\makefirstuc{\em abc}}| produces abc. -% -%\item \verb|\makefirstuc{{\'a}bc}| produces \MakeUppercase{\'a}bc -% -%\item \verb|\makefirstuc{\ae bc}| produces \MakeUppercase{\ae}bc -% -%\item \verb|\makefirstuc{{\ae}bc}| produces \MakeUppercase{\ae}bc -% -%\item \verb|\makefirstuc{{ä}bc}| produces \MakeUppercase{ä}bc -% -%\end{itemize} -%Note that non-Latin or accented characters appearing at the -%start of the text must be placed in a group (even if you are -%using the \sty{inputenc} package) due to expansion issues. -% -%\begin{important} -%In version 1.02 of \styfmt{mfirstuc}, a bug fix resulted in a change -%in output if the first object is a control sequence followed by -%an empty group. Prior to version 1.02, \verb|\makefirstuc{\ae{}bc}| -%produced \ae Bc. However as from version 1.02, it now produces -%\AE bc. -%\end{important} -% -%Note also that -%\begin{verbatim} -%\newcommand{\abc}{abc} -%\makefirstuc{\abc} -%\end{verbatim} -%produces: ABC. This is because the first object in the argument of -%\cs{makefirstuc} is \cs{abc}, so it does \verb|\MakeUppercase\abc|. -%Whereas: -%\begin{verbatim} -%\newcommand{\abc}{abc} -%\expandafter\makefirstuc\expandafter{\abc} -%\end{verbatim} -%produces: Abc. There is a short cut command which will do this:\\[10pt] -%\begin{definition}[\DescribeMacro{\xmakefirstuc}] -%\cs{xmakefirstuc}\marg{stuff} -%\end{definition} -%This is equivalent to \cs{expandafter}\cs{makefirstuc}\cs{expandafter}\marg{stuff}. So -%\begin{verbatim} -%\newcommand{\abc}{abc} -%\xmakefirstuc{\abc} -%\end{verbatim} -%produces: Abc. -% -%If you want to use an alternative command to convert to uppercase, -%for example \cs{MakeTextUppercase},\footnote{defined in the -%\styfmt{textcase} package} you can redefine the internal -%command \cs{@gls@makefirstuc}. For example: -%\begin{verbatim} -%\renewcommand{\@gls@makefirstuc}[1]{\MakeTextUppercase #1} -%\end{verbatim} -%(Remember that command names that contain the @ character must -%either be placed in packages or be placed between \cs{makeatletter} -%and \cs{makeatother}.) -% +% The same problem will also occur if a lower sectional unit is +% used, but this is less likely to happen. If it does, or if +% you change \cs{glscounter} to "section" later, you +% will have to specify a different counter for the entries +% that give rise to a \texttt{name}"{"\meta{section-level}"."\meta{n}".0}" +% non-existent warning (e.g. "\gls[counter=chapter]{label}"). +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} +% \begin{macrocode} +\ifthenelse{\equal{\glscounter}{section}}% +{% + \ifcsundef{chapter}{}% + {% + \let\@gls@old@chapter\@chapter + \def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}% + \ifcsundef{hyperdef}{}{\hyperdef{section}{\thesection}{}}}% + }% +}% +{} +% \end{macrocode} % +%\begin{macro}{\@gls@onlypremakeg} +% Some commands only have an effect when used before +% \ics{makeglossaries}. So define a list of commands that +% should be disabled after \ics{makeglossaries} +% \begin{macrocode} +\newcommand*{\@gls@onlypremakeg}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@onlypremakeg} +% Adds the specified control sequence to the list of commands that +% must be disabled after \ics{makeglossaries}. +% \begin{macrocode} +\newcommand*{\@onlypremakeg}[1]{% +\ifx\@gls@onlypremakeg\@empty + \def\@gls@onlypremakeg{#1}% +\else + \expandafter\toks@\expandafter{\@gls@onlypremakeg}% + \edef\@gls@onlypremakeg{\the\toks@,\noexpand#1}% +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@disable@onlypremakeg} +% Disable all commands listed in \cs{@gls@onlypremakeg} +% \begin{macrocode} +\newcommand*{\@disable@onlypremakeg}{% +\@for\@thiscs:=\@gls@onlypremakeg\do{% + \expandafter\@disable@premakecs\@thiscs% +}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@disable@premakecs} +% Disables the given command. +% \begin{macrocode} +\newcommand*{\@disable@premakecs}[1]{% + \def#1{\PackageError{glossaries}{\string#1\space may only be + used before \string\makeglossaries}{You can't use + \string#1\space after \string\makeglossaries}}% +} +% \end{macrocode} +%\end{macro} % -%\StopEventually{% -% \clearpage\phantomsection -% \addcontentsline{toc}{section}{Index}\PrintIndex -% -%} +%\subsection{Default values}\label{sec:predefinednames} +% This section sets up default values that are used by this +% package. Some of the names may already be defined (e.g.\ by +% \isty{babel}) so \cs{providecommand} is used. % +% Main glossary title: +%\begin{macro}{\glossaryname} +% \begin{macrocode} +\providecommand*{\glossaryname}{Glossary} +% \end{macrocode} +%\end{macro} +% The title for the "acronym" glossary type (which is defined if +% \pkgopt{acronym} package option is used) is given by +% \cs{acronymname}. If the \pkgopt{acronym} +% package option is not used, \cs{acronymname} won't be used. +%\begin{macro}{\acronymname} +% \begin{macrocode} +\providecommand*{\acronymname}{Acronyms} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glssettoctitle} +% Sets the TOC title for the given glossary. +%\changes{1.15}{2008 August 15}{new} +% \begin{macrocode} +\newcommand*{\glssettoctitle}[1]{% +\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}} +% \end{macrocode} +%\end{macro} % +% The following commands provide text for the headers used by +% some of the tabular-like glossary +% styles. Whether or not they get used in the glossary depends on +% the glossary style. +%\begin{macro}{\entryname} +% \begin{macrocode} +\providecommand*{\entryname}{Notation} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\descriptionname} +% \begin{macrocode} +\providecommand*{\descriptionname}{Description} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\symbolname} +% \begin{macrocode} +\providecommand*{\symbolname}{Symbol} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\pagelistname} +% \begin{macrocode} +\providecommand*{\pagelistname}{Page List} +% \end{macrocode} +%\end{macro} +% Labels for \app{makeindex}'s symbol and number groups: +%\begin{macro}{\glssymbolsgroupname} +% \begin{macrocode} +\providecommand*{\glssymbolsgroupname}{Symbols} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsnumbersgroupname} +% \begin{macrocode} +\providecommand*{\glsnumbersgroupname}{Numbers} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glspluralsuffix} +% The default plural is formed by appending \cs{glspluralsuffix} to +% the singular form. +% \begin{macrocode} +\newcommand*{\glspluralsuffix}{s} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\seename} +% \begin{macrocode} +\providecommand*{\seename}{see} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\andname} +% \begin{macrocode} +\providecommand*{\andname}{\&} +% \end{macrocode} +%\end{macro} +% Add multi-lingual support\changes{1.08}{2007 Oct 13}{Added +% babel support}. Thanks to everyone who contributed to the +% translations from both comp.text.tex and via email. +%\begin{macro}{\addglossarytocaptions} +% If using \isty{translator}, \ics{glossaryname} should be defined +% in terms of \ics{translate}, but if babel is also loaded, it will +% redefine \cs{glossaryname} whenever the language is set, so +% override it. (Don't use \ics{addto} as \isty{polyglossia} doesn't +% define it.) +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} +% \begin{macrocode} +\newcommand*{\addglossarytocaptions}[1]{% + \ifcsundef{captions#1}{}% + {% + \expandafter\let\expandafter\@gls@tmp\csname captions#1\endcsname + \expandafter\toks@\expandafter{\@gls@tmp + \renewcommand*{\glossaryname}{\translate{Glossary}}% + }% + \expandafter\edef\csname captions#1\endcsname{\the\toks@}% + }% +} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\ifglstranslate +% \end{macrocode} +% If \isty{translator} is not install, used standard +% \isty{babel} captions, otherwise load \isty{translator} +% dictionary. +%\changes{1.1}{2008 Feb 22}{Added support for translator package} +%\changes{1.15}{2008 August 15}{Added 'glssettoctitle} +% \begin{macrocode} + \@ifpackageloaded{translator}{% + \usedictionary{glossaries-dictionary}% + \addglossarytocaptions{portuges}% + \addglossarytocaptions{portuguese}% + \addglossarytocaptions{brazil}% + \addglossarytocaptions{brazilian}% + \addglossarytocaptions{danish}% + \addglossarytocaptions{dutch}% + \addglossarytocaptions{afrikaans}% + \addglossarytocaptions{english}% + \addglossarytocaptions{UKenglish}% + \addglossarytocaptions{USenglish}% + \addglossarytocaptions{american}% + \addglossarytocaptions{australian}% + \addglossarytocaptions{british}% + \addglossarytocaptions{canadian}% + \addglossarytocaptions{newzealand}% + \addglossarytocaptions{french}% + \addglossarytocaptions{frenchb}% + \addglossarytocaptions{francais}% + \addglossarytocaptions{acadian}% + \addglossarytocaptions{canadien}% + \addglossarytocaptions{german}% + \addglossarytocaptions{germanb}% + \addglossarytocaptions{austrian}% + \addglossarytocaptions{naustrian}% + \addglossarytocaptions{ngerman}% + \addglossarytocaptions{irish}% + \addglossarytocaptions{italian}% + \addglossarytocaptions{magyar}% + \addglossarytocaptions{hungarian}% + \addglossarytocaptions{polish}% + \addglossarytocaptions{spanish}% + \renewcommand*{\glssettoctitle}[1]{% + \ifthenelse{\equal{#1}{main}}{% + \translatelet{\glossarytoctitle}{Glossary}}{% + \ifthenelse{\equal{#1}{acronym}}{% + \translatelet{\glossarytoctitle}{Acronyms}}{% + \def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}}}% + \renewcommand*{\glossaryname}{\translate{Glossary}}% + \renewcommand*{\acronymname}{\translate{Acronyms}}% + \renewcommand*{\entryname}{\translate{Notation (glossaries)}}% + \renewcommand*{\descriptionname}{% + \translate{Description (glossaries)}}% + \renewcommand*{\symbolname}{\translate{Symbol (glossaries)}}% + \renewcommand*{\pagelistname}{% + \translate{Page List (glossaries)}}% + \renewcommand*{\glssymbolsgroupname}{% + \translate{Symbols (glossaries)}}% + \renewcommand*{\glsnumbersgroupname}{% + \translate{Numbers (glossaries)}}% + }{% + \@ifpackageloaded{babel}% + {\RequirePackage{glossaries-babel}}% + {% + \@ifpackageloaded{polyglossia}{% + \RequirePackage{glossaries-polyglossia}}{}% + }} +\fi +% \end{macrocode} +%\begin{macro}{\glspostdescription} +% The description terminator is given by \cs{glspostdescription} +% (except for the 3 and 4 column styles). This is a full stop +% by default: +% \begin{macrocode} +\newcommand*{\glspostdescription}{.} +% \end{macrocode} +%\end{macro} % -%\section{Glossaries Documented Code} -%\iffalse +%\begin{macro}{\nopostdesc} +% Provide a means to suppress description terminator for a given +% entry. (Useful for entries with no description.) Has no +% effect outside the glossaries. +%\changes{1.17}{2008 December 26}{new} % \begin{macrocode} -%<*glossaries.sty> +\newcommand*{\nopostdesc}{} % \end{macrocode} -%\fi -%\label{sec:code} -% \subsection{Package Definition} -% This package requires \LaTeXe. +%\end{macro} +%\begin{macro}{\@nopostdesc} +% Suppress next description terminator. % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2010/07/10 v2.07 (NLCT)] +\newcommand*{\@nopostdesc}{% + \let\org@glspostdescription\glspostdescription + \def\glspostdescription{% + \let\glspostdescription\org@glspostdescription}% +} % \end{macrocode} -% Required packages: +%\end{macro} +%\begin{macro}{\glspar} +% Provide means of having a paragraph break in glossary entries % \begin{macrocode} -\RequirePackage{ifthen} -\RequirePackage{xkeyval}[2006/11/18] -\RequirePackage{mfirstuc} -\RequirePackage{xfor} +\newcommand{\glspar}{\par} % \end{macrocode} -%\changes{1.1}{2008 Feb 22}{amsgen now loaded (\cs{new@ifnextchar} needed)} -% Need to use \cs{new@ifnextchar} instead of \cs{@ifnextchar} in -% commands that have a final optional argument (such as \ics{gls}) -% so require \isty{amsgen}. -% Thanks to Morten~H\o gholm for suggesting this. (This has -% replaced using the \sty{xspace} package.) +%\end{macro} +% +%\begin{macro}{\setStyleFile} +% Sets the style file. The relevent extension is appended. % \begin{macrocode} -\RequirePackage{amsgen} +\ifglsxindy + \newcommand{\setStyleFile}[1]{% + \renewcommand{\istfilename}{#1.xdy}} +\else + \newcommand{\setStyleFile}[1]{% + \renewcommand{\istfilename}{#1.ist}} +\fi +% \end{macrocode} +% This command only has an effect prior to using +% \ics{makeglossaries}. +% \begin{macrocode} +\@onlypremakeg\setStyleFile % \end{macrocode} +%\end{macro} % -% \subsection{Package Options}\label{sec:pkgopt} -%\begin{option}{toc} -% The \pkgopt{toc} package option will add the glossaries -% to the table of contents. This is a boolean key, if the -% value is omitted it is taken to be true. +% The name of the \app{makeindex} or \app{xindy} style file +% is given by \cs{istfilename}. This file is +% created by \ics{writeist} (which is used by +% \ics{makeglossaries}) so +% redefining this command will only have an effect if it is +% done \emph{before} \cs{makeglossaries}. As from v1.17, use +% \ics{setStyleFile} instead of directly redefining \cs{istfilename}. +%\begin{macro}{\istfilename} +%\changes{1.17}{2008 December 26}{added xindy support} % \begin{macrocode} -\define@boolkey{glossaries.sty}[gls]{toc}[true]{} +\ifglsxindy + \def\istfilename{\jobname.xdy} +\else + \def\istfilename{\jobname.ist} +\fi % \end{macrocode} -%\end{option} -%\begin{option}{numberline} -%\changes{1.1}{2008 Feb 22}{numberline option added} -% The \pkgopt{numberline} package option adds \cs{numberline} to -% \cs{addcontentsline}. Note that this option only has an effect -% if used in with \pkgopt[true]{toc}. +%\end{macro} +% The \app{makeglossaries} Perl script picks up this name +% from the auxiliary file. If the name ends with \filetype{.xdy} +% it calls \app{xindy} otherwise it calls \app{makeindex}. +% Since its not required by +% \LaTeX, \cs{@istfilename} ignores its argument. +%\begin{macro}{\@istfilename} % \begin{macrocode} -\define@boolkey{glossaries.sty}[gls]{numberline}[true]{} +\newcommand*{\@istfilename}[1]{} % \end{macrocode} -%\end{option} +%\end{macro} % -% The sectional unit used to start the glossary is stored in -% \cs{@@glossarysec}. If chapters are defined, this -% is initialised to \texttt{chapter}, otherwise it is -% initialised to \texttt{section}. -%\begin{macro}{\@@glossarysec} +% This command is the value of the \istkey{page\_compositor} +% \app{makeindex} key. Again, any redefinition of this command +% must take place \emph{before} \cs{writeist} otherwise it +% will have no effect. As from 1.17, use \ics{glsSetCompositor} +% instead of directly redefining \cs{glscompositor}. +%\begin{macro}{\glscompositor} % \begin{macrocode} -\@ifundefined{chapter}{\newcommand*{\@@glossarysec}{section}}{% - \newcommand*{\@@glossarysec}{chapter}} +\newcommand*{\glscompositor}{.} % \end{macrocode} %\end{macro} -% -%\begin{option}{section} -% The \pkgopt{section} key can be used to set the sectional unit. -% If no unit is specified, use \texttt{section} as the default. -% The starred form of the named sectional unit will be used. -% If you want some other way to start the glossary section (e.g.\ -% a numbered section) you will have to redefined -% \ics{glossarysection}. +%\begin{macro}{\glsSetCompositor} +% Sets the compositor. % \begin{macrocode} -\define@choicekey{glossaries.sty}{section}{part,chapter,section,% -subsection,subsubsection,paragraph,subparagraph}[section]{% - \renewcommand*{\@@glossarysec}{#1}} +\newcommand*{\glsSetCompositor}[1]{% + \renewcommand*{\glscompositor}{#1}} % \end{macrocode} -%\end{option} -% -% Determine whether or not to use numbered sections. -%\begin{macro}{\@@glossarysecstar} +% Only use before \ics{makeglossaries} % \begin{macrocode} -\newcommand*{\@@glossarysecstar}{*} +\@onlypremakeg\glsSetCompositor % \end{macrocode} %\end{macro} -%\begin{macro}{\@@glossaryseclabel} +% +% (The page compositor is usually defined as a dash when using +% \app{makeindex}, but most of the standard counters used +% by \LaTeX\ use a full stop as the compositor, which is why I +% have used it as the default.) If \app{xindy} is used +% \cs{glscompositor} only affects the \texttt{arabic-page-numbers} +% location class. +%\begin{macro}{\@glsAlphacompositor} +% This is only used by \app{xindy}. It specifies the +% compositor to use when location numbers are in the form +% \meta{letter}\meta{compositor}\meta{number}. For example, +% if \cs{@glsAlphacompositor} is set to ``.'' then it allows +% locations such as A.1 whereas if \cs{@glsAlphacompositor} is +% set to ``-'' then it allows locations such as A-1. % \begin{macrocode} -\newcommand*{\@@glossaryseclabel}{} +\newcommand*{\@glsAlphacompositor}{\glscompositor} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsautoprefix} -% Prefix to add before label if automatically generated: -%\changes{1.14}{2008 June 17}{new} +% +%\begin{macro}{\glsSetAlphaCompositor} +% Sets the alpha compositor. % \begin{macrocode} -\newcommand*{\glsautoprefix}{} +\ifglsxindy + \newcommand*\glsSetAlphaCompositor[1]{% + \renewcommand*\@glsAlphacompositor{#1}} +\else + \newcommand*\glsSetAlphaCompositor[1]{% + \glsnoxindywarning\glsSetAlphaCompositor} +\fi % \end{macrocode} -%\end{macro} -%\begin{option}{numberedsection} -%\changes{1.1}{2008 Feb 22}{numberedsection package option added} +% Can only be used before \ics{makeglossaries} % \begin{macrocode} -\define@choicekey{glossaries.sty}{numberedsection}[\val\nr]{% -false,nolabel,autolabel}[nolabel]{% - \ifcase\nr\relax - \renewcommand*{\@@glossarysecstar}{*}% - \renewcommand*{\@@glossaryseclabel}{}% - \or - \renewcommand*{\@@glossarysecstar}{}% - \renewcommand*{\@@glossaryseclabel}{}% - \or - \renewcommand*{\@@glossarysecstar}{}% - \renewcommand*{\@@glossaryseclabel}{% - \label{\glsautoprefix\@glo@type}}% - \fi -} +\@onlypremakeg\glsSetAlphaCompositor % \end{macrocode} -%\end{option} +%\end{macro} % -% The default glossary style is stored in -% \cs{@glossary@default@style}. This is initialised to -% \texttt{list}. (The \glostyle{list} style is -% defined in the accompanying \isty{glossary-list} package -% described in \autoref{sec:code:styles}.) -%\begin{macro}{\@glossary@default@style} +%\begin{macro}{\gls@suffixF} +%\changes{1.17}{2008 December 26}{new} +% Suffix to use for a two page list. This overrides the separator +% and the closing page number if set to something other than +% an empty macro. % \begin{macrocode} -\newcommand*{\@glossary@default@style}{list} +\newcommand*{\gls@suffixF}{} % \end{macrocode} %\end{macro} -% -%\begin{option}{style} -% The default glossary style can be changed using the \pkgopt{style} -% package option. The value can be the name of any -% defined glossary style. The glossary style is set at the beginning -% of the document, so you can still use the \pkgopt{style} key to -% set a style that is defined in another package. This package comes -% with some predefined styles that are defined in -% \autoref{sec:code:styles}. +%\begin{macro}{\glsSetSuffixF} +%\changes{1.17}{2008 December 26}{new} +% Sets the suffix to use for a two page list. % \begin{macrocode} -\define@key{glossaries.sty}{style}{% -\renewcommand*{\@glossary@default@style}{#1}} +\newcommand*{\glsSetSuffixF}[1]{% + \renewcommand*{\gls@suffixF}{#1}} % \end{macrocode} -%\end{option} -% -% Each entry within a given glossary will have an associated -% number list. By default, this refers to the page numbers on -% which that entry has been used, but it can also refer to any counter -% used in the document (such as the section or equation counters). -% The default number list format displays the number list ``as is'': -%\begin{macro}{\glossaryentrynumbers} +% Only has an effect when used before \ics{makeglossaries} % \begin{macrocode} -\newcommand*{\glossaryentrynumbers}[1]{#1} +\@onlypremakeg\glsSetSuffixF % \end{macrocode} %\end{macro} -%\begin{option}{nonumberlist} -% Note that the entire number list for a given entry will be -% passed to \cs{glossaryentrynumbers} so any font changes -% will also be applied to the delimiters. -% The \pkgopt{nonumberlist} package option suppresses the -% number lists (this simply redefines -% \cs{glossaryentrynumbers} to ignores its argument). -% \begin{macrocode} -\DeclareOptionX{nonumberlist}{% -\renewcommand*{\glossaryentrynumbers}[1]{}} -% \end{macrocode} -%\end{option} % -%\begin{macro}{\@gls@loadlong} -%\changes{1.18}{2009 January 14}{new} +%\begin{macro}{\gls@suffixFF} +%\changes{1.17}{2008 December 26}{new} +% Suffix to use for a three page list. This overrides the separator +% and the closing page number if set to something other than +% an empty macro. % \begin{macrocode} -\newcommand*{\@gls@loadlong}{\RequirePackage{glossary-long}} +\newcommand*{\gls@suffixFF}{} % \end{macrocode} %\end{macro} -%\begin{option}{nolong} -%\changes{1.18}{2009 January 14}{new} -% This option prevents \isty{glossary-long} from being loaded. -% This means that the glossary styles that use the -% \env{longtable} environment will not be available. This option -% is provided to reduce overhead caused by loading unrequired -% packages. +%\begin{macro}{\glsSetSuffixFF} +%\changes{1.17}{2008 December 26}{new} +% Sets the suffix to use for a three page list. % \begin{macrocode} -\DeclareOptionX{nolong}{\renewcommand*{\@gls@loadlong}{}} +\newcommand*{\glsSetSuffixFF}[1]{% + \renewcommand*{\gls@suffixFF}{#1}% +} % \end{macrocode} -%\end{option} +%\end{macro} % -%\begin{macro}{\@gls@loadsuper} -%\changes{1.18}{2009 January 14}{new} -% The \isty{glossary-super} package isn't loaded if -% \isty{supertabular} isn't installed. +%\begin{macro}{\glsnumberformat} +% The command \cs{glsnumberformat} indicates the default +% format for the page numbers in the glossary. (Note that this +% is not the same as \ics{glossaryentrynumbers}, but applies +% to individual numbers or groups of numbers within an entry's +% associated number list.) If hyperlinks are defined, it will use +% \ics{glshypernumber}, otherwise it will simply display its +% argument ``as is''. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\IfFileExists{supertabular.sty}{% - \newcommand*{\@gls@loadsuper}{\RequirePackage{glossary-super}}}{% - \newcommand*{\@gls@loadsuper}{}} +\ifcsdef{hyperlink}% +{% + \newcommand*{\glsnumberformat}[1]{#1}% +}% +{% + \newcommand*{\glsnumberformat}[1]{\glshypernumber{#1}}% +} % \end{macrocode} %\end{macro} -%\begin{option}{nosuper} -%\changes{1.18}{2009 January 14}{new} -% This option prevents \isty{glossary-super} from being loaded. -% This means that the glossary styles that use the -% \env{supertabular} environment will not be available. This option -% is provided to reduce overhead caused by loading unrequired -% packages. -% \begin{macrocode} -\DeclareOptionX{nosuper}{\renewcommand*{\@gls@loadsuper}{}} -% \end{macrocode} -%\end{option} % -%\begin{macro}{\@gls@loadlist} -%\changes{1.18}{2009 January 14}{new} +% Individual numbers in an entry's associated number list are +% delimited using \cs{delimN} (which corresponds to the +% \istkey{delim\_n} \app{makeindex} keyword). The default value +% is a comma followed by a space. +%\begin{macro}{\delimN} % \begin{macrocode} -\newcommand*{\@gls@loadlist}{\RequirePackage{glossary-list}} +\newcommand{\delimN}{, } % \end{macrocode} %\end{macro} -%\begin{option}{nolist} -%\changes{1.18}{2009 January 14}{new} -% This option prevents \isty{glossary-list} from being loaded -% (to reduce overheads if required). Naturally, the styles defined -% in \isty{glossary-list} will not be available if this option -% is used. +% A range of numbers within an entry's associated number list is +% delimited using \cs{delimR} (which corresponds to the +% \istkey{delim\_r} \app{makeindex} keyword). The default is +% an en-dash. +%\begin{macro}{\delimR} % \begin{macrocode} -\DeclareOptionX{nolist}{\renewcommand*{\@gls@loadlist}{}} +\newcommand{\delimR}{--} % \end{macrocode} -%\end{option} +%\end{macro} % -%\begin{macro}{\@gls@loadtree} -%\changes{1.18}{2009 January 14}{new} +% The glossary preamble is given by \cs{glossarypreamble}. This +% will appear after the glossary sectioning command, and before the +% \env{theglossary} environment. It is designed to allow the +% user to add information pertaining to the glossary (e.g.\ ``page +% numbers in italic indicate the primary definition'') therefore +% \cs{glossarypremable} shouldn't be affected by the glossary +% style. (So if you define your own glossary style, don't have it +% change \cs{glossarypreamble}.) The preamble is empty by +% default. If you have multiple glossaries, and you want a +% different preamble for each glossary, you will need to use +% \ics{printglossary} for each glossary type, instead of +% \ics{printglossaries}, and redefine \cs{glossarypreamble} +% before each \ics{printglossary}. +%\begin{macro}{\glossarypreamble} % \begin{macrocode} -\newcommand*{\@gls@loadtree}{\RequirePackage{glossary-tree}} +\newcommand*{\glossarypreamble}{} % \end{macrocode} %\end{macro} -%\begin{option}{notree} -%\changes{1.18}{2009 January 14}{new} -% This option prevents \isty{glossary-tree} from being loaded -% (to reduce overheads if required). Naturally, the styles defined -% in \isty{glossary-tree} will not be available if this option -% is used. +% +% The glossary postamble is given by \cs{glossarypostamble}. +% This is provided to allow the user to +% add something after the end of the \env{theglossary} +% environment (again, this shouldn't be affected by the +% glossary style). It is, of course, possible to simply add the +% text after \ics{printglossary}, but if you only want the +% postamble to appear after the first glossary, but not after +% subsequent glossaries, you can do something like: +%\begin{verbatim} +%\renewcommand{\glossarypostamble}{For a complete list of terms +%see \cite{blah}\gdef\glossarypreamble{}} +%\end{verbatim} +%\begin{macro}{\glossarypostamble} % \begin{macrocode} -\DeclareOptionX{notree}{\renewcommand*{\@gls@loadtree}{}} +\newcommand*{\glossarypostamble}{} % \end{macrocode} -%\end{option} +%\end{macro} % -%\begin{option}{nostyles} -%\changes{1.18}{2009 January 14}{new} -% Provide an option to suppress all the predefined styles (in the -% event that the user has custom styles that are not dependent -% on the predefined styles). +%\begin{macro}{\glossarysection} +% The sectioning command that starts a glossary is given by +% \cs{glossarysection}. (This does not form part of the +% glossary style, and so should not be changed by a glossary +% style.) If \ics{phantomsection} +% is defined, it uses \cs{\@p@glossarysection}, otherwise it +% uses \cs{@glossarysection}. +%\changes{1.05}{2007 Aug 10}{added '@mkboth to 'glossarysection} +%\changes{2.02}{2009 July 13}{changed '@mkboth to 'glossarymark} +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\DeclareOptionX{nostyles}{% - \renewcommand*{\@gls@loadlong}{}% - \renewcommand*{\@gls@loadsuper}{}% - \renewcommand*{\@gls@loadlist}{}% - \renewcommand*{\@gls@loadtree}{}% - \let\@glossary@default@style\relax +\newcommand*{\glossarysection}[2][\@gls@title]{% + \def\@gls@title{#2}% + \ifcsundef{phantomsection}% + {% + \@glossarysection{#1}{#2}% + }% + {% + \@p@glossarysection{#1}{#2}% + }% + \glossarymark{\glossarytoctitle}% } % \end{macrocode} -%\end{option} -% -%\begin{macro}{\glsdefmain} -%\changes{2.01}{2009 May 30}{new} -% Define the main glossary. This will be the first glossary to -% be displayed when using \ics{printglossaries}. +%\end{macro} +%\begin{macro}{\glossarymark} +%\changes{2.02}{2009 July 13}{New} +%\changes{2.03}{2009 Sep 23}{Added check to see if it's already +%defined} +% Sets the header mark for the glossary. Takes the glossary short +% (TOC) title as the argument. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\newcommand*{\glsdefmain}{% - \newglossary{main}{gls}{glo}{\glossaryname}% +\ifcsundef{glossarymark}% +{% + \newcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} +}% +{% + \GlossariesWarning{overriding \string\glossarymark}% + \@ifclassloaded{memoir}% + { + \renewcommand{\glossarymark}[1]{% + \markboth{\memUChead{#1}}{\memUChead{#1}}% + } + } + { + \renewcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} + } } % \end{macrocode} %\end{macro} % -% Keep track of the default glossary. This is initialised to -% the main glossary, but can be changed if for some reason -% you want to make a secondary glossary the main glossary. This -% affects any commands that can optionally take a glossary name -% as an argument (or as the value of the -% \gloskey{type}\igloskey[printglossary]{type} key in -%a key-value list). This was mainly done so that -% \ics{loadglsentries} can temporarily change -% \cs{glsdefaulttype} while it loads a file containing -% new glossary entries (see \autoref{sec:load}). -%\begin{macro}{\glsdefaulttype} +% The required sectional unit is given by \cs{@@glossarysec} +% which was defined by the \pkgopt{section} package option. The +% starred form of the command is chosen. If you don't want any sectional +% command, you will need to redefine \cs{glossarysection}. +% The sectional unit can be changed, if different sectional units +% are required. +%\begin{macro}{\setglossarysection} +%\changes{1.1}{2008 Feb 22}{new} % \begin{macrocode} -\newcommand*{\glsdefaulttype}{main} +\newcommand*{\setglossarysection}[1]{% +\setkeys{glossaries.sty}{section=#1}} % \end{macrocode} %\end{macro} -% Keep track of which glossary the acronyms are in. This is -% initialised to \cs{glsdefaulttype}, but is changed by -% the \pkgopt{acronym} package option. -%\begin{macro}{\acronymtype} +% +%The command \cs{@glossarysection} indicates how to start +% the glossary section if \ics{phantomsection} is not defined. +%\begin{macro}{\@glossarysection} +%\changes{1.1}{2008 Feb 22}{numbered sections and auto label added} % \begin{macrocode} -\newcommand*{\acronymtype}{\glsdefaulttype} +\newcommand*{\@glossarysection}[2]{% +\ifx\@@glossarysecstar\@empty + \csname\@@glossarysec\endcsname{#2}% +\else + \csname\@@glossarysec\endcsname*{#2}% + \@gls@toc{#1}{\@@glossarysec}% +\fi +\@@glossaryseclabel} % \end{macrocode} %\end{macro} % -%\changes{2.01}{2009 May 30}{added nomain package option} -% The \pkgopt{nomain} option suppress the creation of the main -% glossary. +% As \cs{@glossarysection}, but put in +% \ics{phantomsection}, and swap where \cs{@gls@toc} goes. +% If using chapters do a \cs{clearpage}. This ensures that +% the hyper link from the table of contents leads to the line above +% the heading, rather than the line below it. +%\begin{macro}{\@p@glossarysection} +%\changes{1.1}{2008 Feb 22}{numbered sections and auto label added} % \begin{macrocode} -\DeclareOptionX{nomain}{% - \let\glsdefaulttype\relax - \renewcommand*{\glsdefmain}{}% -} +\newcommand*{\@p@glossarysection}[2]{% +\glsclearpage +\phantomsection +\ifx\@@glossarysecstar\@empty + \csname\@@glossarysec\endcsname{#2}% +\else + \@gls@toc{#1}{\@@glossarysec}% + \csname\@@glossarysec\endcsname*{#2}% +\fi +\@@glossaryseclabel} % \end{macrocode} +%\end{macro} % -%\begin{option}{acronym} -% The \pkgopt{acronym} option sets an associated conditional -% which is used in \autoref{sec:acronym} to determine whether -% or not to define a separate glossary for acronyms. +%\begin{macro}{\gls@doclearpage} +%The \cs{gls@doclearpage} command is used to issue a +% \cs{clearpage} (or \cs{cleardoublepage}) depending +% on whether the glossary sectional unit is a chapter. If the +% sectional unit is something else, do nothing. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\define@boolkey{glossaries.sty}[gls]{acronym}[true]{% - \DeclareAcronymList{acronym}% +\newcommand*{\gls@doclearpage}{% + \ifthenelse{\equal{\@@glossarysec}{chapter}}% + {% + \ifcsundef{cleardoublepage}{\clearpage}{\cleardoublepage}% + }% + {}% } % \end{macrocode} -%\end{option} -%\begin{macro}{\@glsacronymlists} -%\changes{2.04}{2009 November 10}{new} -% Comma-separated list of glossary labels indicating which -% glossaries contain acronyms. Note that \ics{SetAcronymStyle} -% must be used after adding labels to this macro. +%\end{macro} +%\begin{macro}{\glsclearpage} +% This just calls \cs{gls@doclearpage}, but it makes it easier to +% have a user command so that the user can override it. +%\changes{1.19}{2009 Mar 2}{new} % \begin{macrocode} -\newcommand*{\@glsacronymlists}{} +\newcommand*{\glsclearpage}{\gls@doclearpage} % \end{macrocode} %\end{macro} -%\begin{macro}{\@addtoacronynlists} +% +% The glossary is added to the table of contents if glstoc flag set. +% If it is set, \cs{@gls@toc} will add a line to the +% \filetype{.toc} file, otherwise it will do nothing. +% (The first argument to \cs{@gls@toc} is the title for the +% table of contents, the second argument is the sectioning type.) +%\begin{macro}{\@gls@toc} +%\changes{1.1}{2008 Feb 22}{numberline added} % \begin{macrocode} -\newcommand*{\@addtoacronymlists}[1]{% - \ifx\@glsacronymlists\@empty - \protected@xdef\@glsacronymlists{#1}% +\newcommand*{\@gls@toc}[2]{% +\ifglstoc + \ifglsnumberline + \addcontentsline{toc}{#2}{\numberline{}#1}% \else - \protected@xdef\@glsacronymlists{\@glsacronymlists,#1}% + \addcontentsline{toc}{#2}{#1}% \fi -} +\fi} % \end{macrocode} %\end{macro} -%\begin{macro}{\DeclareAcronymList} -%\changes{2.04}{2009 November 10}{new}% -% Identifies the named glossary as a list of acronyms and adds -% to the list. (Doesn't check if the glossary exists, but checks -% if label already in list. Use \ics{SetAcronymStyle} after -% identifying all the acronym lists.) +% +%\subsection{Xindy} +% This section defines commands that only have an effect if +% \app{xindy} is used to sort the glossaries. +%\begin{macro}{\glsnoxindywarning} +% Issues a warning if \app{xindy} hasn't been specified. +% These warnings can be suppressed by redefining +% \cs{glsnoxindywarning} to ignore its argument % \begin{macrocode} -\newcommand*{\DeclareAcronymList}[1]{% - \glsIfListOfAcronyms{#1}{}{\@addtoacronymlists{#1}}% +\newcommand*{\glsnoxindywarning}[1]{% + \GlossariesWarning{Not in xindy mode --- ignoring \string#1}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsIfListOfAcronyms} -%\cs{glsIfListOfAcronyms}\marg{label}\marg{true part}\marg{false part}\\[10pt] -% Determines if the glossary with the given label has been identified -% as being a list of acronyms. +% +%\begin{macro}{\@xdyattributes} +% Define list of attributes (\cs{string} is used in case +% the double quote character has been made active) % \begin{macrocode} -\newcommand{\glsIfListOfAcronyms}[1]{% - \edef\@do@gls@islistofacronyms{% - \noexpand\@gls@islistofacronyms{#1}{\@glsacronymlists}}% - \@do@gls@islistofacronyms -} +\ifglsxindy + \edef\@xdyattributes{\string"default\string"}% +\fi % \end{macrocode} -% Internal command requires label and list to be expanded: +%\end{macro} +%\begin{macro}{\@xdyattributelist} +% Comma-separated list of attributes. +%\changes{3.0}{2011/04/02}{new} % \begin{macrocode} -\newcommand{\@gls@islistofacronyms}[4]{% - \def\gls@islistofacronyms##1,#1,##2\end@gls@islistofacronyms{% - \def\@before{##1}\def\@after{##2}}% - \gls@islistofacronyms,#2,#1,\@nil\end@gls@islistofacronyms - \ifx\@after\@nnil +\ifglsxindy + \edef\@xdyattributelist{}% +\fi % \end{macrocode} -% Not found +%\end{macro} +%\begin{macro}{\@xdylocref} +% Define list of markup location references. % \begin{macrocode} - #4% - \else +\ifglsxindy + \def\@xdylocref{} +\fi % \end{macrocode} -% Found +%\end{macro} +% +%\begin{macro}{\@gls@ifinlist} +%\changes{3.0}{2011/04/02}{new} % \begin{macrocode} - #3% - \fi +\newcommand*{\@gls@ifinlist}[4]{% + \def\@do@ifinlist##1,#1,##2\end@doifinlist{% + \def\@gls@listsuffix{##2}% + \ifx\@gls@listsuffix\@empty + #4% + \else + #3% + \fi + }% + \@do@ifinlist,#2,#1,\end@doifinlist } % \end{macrocode} %\end{macro} -%\begin{macro}{\if@glsisacronymlist} -% Convenient boolean. +% +%\begin{macro}{\GlsAddXdyCounters} +%\changes{3.0}{2011/04/02}{new} +% Need to know all the counters that will be used in location +% numbers for Xindy. Argument may be a single counter name or a +% comma-separated list of counter names. % \begin{macrocode} -\newif\if@glsisacronymlist +\ifglsxindy + \newcommand*{\@xdycounters}{\glscounter} + \newcommand*\GlsAddXdyCounters[1]{% + \@for\@gls@ctr:=#1\do{% +% \end{macrocode} +% Check if already in list before adding. +% \begin{macrocode} + \edef\@do@addcounter{% + \noexpand\@gls@ifinlist{\@gls@ctr}{\@xdycounters}{}% + {% + \noexpand\edef\noexpand\@xdycounters{\@xdycounters,% + \noexpand\@gls@ctr}% + }% + }% + \@do@addcounter + } + } +% \end{macrocode} +% Only has an effect before \ics{writeist}: +% \begin{macrocode} + \@onlypremakeg\GlsAddXdyCounters +\else + \newcommand*\GlsAddXdyCounters[1]{% + \glsnoxindywarning\GlsAddXdyAttribute + } +\fi % \end{macrocode} %\end{macro} -%\begin{macro}{\gls@checkisacronymlist} -% Sets the above boolean if argument is a label representing -% a list of acronyms. +%\begin{macro}{\@disabled@glsaddxdycounters} +% Counters must all be identified before adding attributes. % \begin{macrocode} -\newcommand*{\gls@checkisacronymlist}[1]{% - \glsIfListOfAcronyms{#1}% - {\@glsisacronymlisttrue}{\@glsisacronymlistfalse}% +\newcommand*\@disabled@glsaddxdycounters{% + \PackageError{glossaries}{\string\GlsAddXdyCounters\space + can't be used after \string\GlsAddXdyAttribute}{Move all + occurrences of \string\GlsAddXdyCounters\space before the first + instance of \string\GlsAddXdyAttribute}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\SetAcronymLists} -%\changes{2.04}{2009 November 10}{new}% -% Sets the ``list of acronyms'' list. Argument must be a -% comma-separated list of glossary labels. (Doesn't check at this -% point if the glossaries exists.) +%\begin{macro}{\GlsAddXdyAttribute} +% Adds an attribute. % \begin{macrocode} -\newcommand*{\SetAcronymLists}[1]{% - \renewcommand*{\@glsacronymlists}{#1}% -} +\ifglsxindy % \end{macrocode} -%\end{macro} -%\begin{option}{acronymlists} -%\changes{2.04}{2009 November 10}{new}% +% First define internal command that adds an attribute for a given +% counter (2nd argument is the counter): % \begin{macrocode} -\define@key{glossaries.sty}{acronymlists}{% - \@addtoacronymlists{#1}% -} + \newcommand*\@glsaddxdyattribute[2]{% % \end{macrocode} -%\end{option} -% -% The default counter associated with the numbers in the glossary -% is stored in \cs{glscounter}. This is initialised to the -% page counter. This is used as the default counter when a -% new glossary is defined, unless a different counter is specified -% in the optional argument to \ics{newglossary} (see -% \autoref{sec:newglos}). -%\begin{macro}{\glscounter} +% Add to xindy attribute list % \begin{macrocode} -\newcommand{\glscounter}{page} + \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string" ^^J + \string"#2#1\string"}% % \end{macrocode} -%\end{macro} -%\begin{option}{counter} -% The \pkgopt{counter} option changes the default counter. (This -% just redefines \cs{glscounter}.) +% Add to xindy markup location. % \begin{macrocode} -\define@key{glossaries.sty}{counter}{% - \renewcommand*{\glscounter}{#1}% -} + \expandafter\toks@\expandafter{\@xdylocref}% + \edef\@xdylocref{\the\toks@ ^^J% + (markup-locref + :open \string"\string~n% + \expandafter\string\csname glsX#2X#1\endcsname + \string" ^^J + :close \string"\string" ^^J + :attr \string"#2#1\string")}% % \end{macrocode} -%\end{option} -% -% The glossary keys whose values are written to another file (i.e.\ -% \gloskey{sort}, \gloskey{name}, \gloskey{description} and -% \gloskey{symbol}) need to be sanitized, otherwise fragile -% commands would not be able to be used in -% \ics{newglossaryentry}. However, strange results will occur -% if you then use those fields in the document. As these fields -% are not normally used in the document, but are by default only -% used in the glossary, the default is to sanitize them. If however -% you want to use these values in the document (either by redefining -% commands like \ics{glsdisplay} or by using commands like -% \ics{glsentrydesc}) you will have to switch off the -% sanitization using the \pkgopt{sanitize} package option, but -% you will then have to use \ics{protect} to protect fragile -% commands when defining new glossary entries. -% The \pkgopt{sanitize} option -% takes a key-value list as its value, which can be used to -% switch individual values on and off. For example: -%\begin{verbatim} -%\usepackage[sanitize={description,name,symbol=false}]{glossaries} -%\end{verbatim} -%will switch off the sanitization for the \gloskey{symbol} key, but -% switch it on for the \gloskey{description} and \gloskey{name} keys. -% This would mean that you can use fragile commands in the -%description and name when defining a new glossary entry, but not -% for the symbol. -% -% The default values are defined as: -%\begin{macro}{\@gls@sanitizedesc} +% Define associated attribute command +% \cs{glsX}\meta{counter}"X"\meta{attribute}\marg{Hprefix}\marg{n} % \begin{macrocode} -\newcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc} + \expandafter\gdef\csname glsX#2X#1\endcsname##1##2{% + \setentrycounter[##1]{#2}\csname #1\endcsname{##2}% + }% + } % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@sanitizename} +% High-level command: % \begin{macrocode} -\newcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name} + \newcommand*\GlsAddXdyAttribute[1]{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@sanitizesymbol} +% Add to comma-separated attribute list % \begin{macrocode} -\newcommand*{\@gls@sanitizesymbol}{\@onelevel@sanitize\@glo@symbol} + \ifx\@xdyattributelist\@empty + \edef\@xdyattributelist{#1}% + \else + \edef\@xdyattributelist{\@xdyattributelist,#1}% + \fi % \end{macrocode} -%\end{macro} -% (There is no equivalent for the \gloskey{sort} key, since that -% is only provided for the benefit of \app{makeindex} or -% \app{xindy}, and so will always be sanitized.) -% -% Before defining the \pkgopt{sanitize} package option, The -% key-value list for the \pkgopt{sanitize} value needs to be defined. -% These are all boolean keys. If they are not given a value, assume -% \texttt{true}. -% -% Firstly the \gloskey{description}. If set, it will redefine -% \cs{@gls@sanitizedesc} to use \cs{@onelevel@sanitize}, -% otherwise \cs{@gls@sanitizedesc} will do nothing. +% Iterate through all specified counters and add counter-dependent +% attributes: % \begin{macrocode} -\define@boolkey[gls]{sanitize}{description}[true]{% -\ifgls@sanitize@description - \renewcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc}% -\else - \renewcommand*{\@gls@sanitizedesc}{}% -\fi -} + \@for\@this@counter:=\@xdycounters\do{% + \protected@edef\gls@do@addxdyattribute{% + \noexpand\@glsaddxdyattribute{#1}{\@this@counter}% + } + \gls@do@addxdyattribute + }% % \end{macrocode} -% Similarly for the \gloskey{name} key: +% All occurrences of \cs{GlsAddXdyCounters} must be used before this +% command % \begin{macrocode} -\define@boolkey[gls]{sanitize}{name}[true]{% -\ifgls@sanitize@name - \renewcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name}% -\else - \renewcommand*{\@gls@sanitizename}{}% -\fi} + \let\GlsAddXdyCounters\@disabled@glsaddxdycounters + } % \end{macrocode} -% and for the \gloskey{symbol} key: +% Only has an effect before \ics{writeist}: % \begin{macrocode} -\define@boolkey[gls]{sanitize}{symbol}[true]{% -\ifgls@sanitize@symbol - \renewcommand*{\@gls@sanitizesymbol}{% -\@onelevel@sanitize\@glo@symbol}% + \@onlypremakeg\GlsAddXdyAttribute \else - \renewcommand*{\@gls@sanitizesymbol}{}% -\fi} + \newcommand*\GlsAddXdyAttribute[1]{% + \glsnoxindywarning\GlsAddXdyAttribute} +\fi % \end{macrocode} +%\end{macro} % -%\begin{option}{sanitize} -% Now define the \pkgopt{sanitize} option. It can either take -% a key-val list as its value, or it can take the keyword -% \texttt{none}, which is equivalent to \texttt{description=false, -% symbol=false, name=false}: +%\begin{macro}{\@gls@addpredefinedattributes} +% Add known attributes for all defined counters % \begin{macrocode} -\define@key{glossaries.sty}{sanitize}[description=true,symbol=true, -name=true]{% -\ifthenelse{\equal{#1}{none}}{% -\renewcommand*{\@gls@sanitizedesc}{}% -\renewcommand*{\@gls@sanitizename}{}% -\renewcommand*{\@gls@sanitizesymbol}{}% -}{\setkeys[gls]{sanitize}{#1}}% +\ifglsxindy +\newcommand*{\@gls@addpredefinedattributes}{% + \GlsAddXdyAttribute{glsnumberformat} + \GlsAddXdyAttribute{textrm} + \GlsAddXdyAttribute{textsf} + \GlsAddXdyAttribute{texttt} + \GlsAddXdyAttribute{textbf} + \GlsAddXdyAttribute{textmd} + \GlsAddXdyAttribute{textit} + \GlsAddXdyAttribute{textup} + \GlsAddXdyAttribute{textsl} + \GlsAddXdyAttribute{textsc} + \GlsAddXdyAttribute{emph} + \GlsAddXdyAttribute{glshypernumber} + \GlsAddXdyAttribute{hyperrm} + \GlsAddXdyAttribute{hypersf} + \GlsAddXdyAttribute{hypertt} + \GlsAddXdyAttribute{hyperbf} + \GlsAddXdyAttribute{hypermd} + \GlsAddXdyAttribute{hyperit} + \GlsAddXdyAttribute{hyperup} + \GlsAddXdyAttribute{hypersl} + \GlsAddXdyAttribute{hypersc} + \GlsAddXdyAttribute{hyperemph} } +\else + \let\@gls@addpredefinedattributes\relax +\fi % \end{macrocode} -%\end{option} -%\begin{option}{translate} -%\changes{1.1}{2008 Feb 22}{translate option added} -% Define \pkgopt{translate} option. If false don't set up -% multi-lingual support. +%\end{macro} +% +%\begin{macro}{\@xdyuseralphabets} +% List of additional alphabets % \begin{macrocode} -\define@boolkey{glossaries.sty}[gls]{translate}[true]{} +\def\@xdyuseralphabets{} % \end{macrocode} -%\end{option} -% Set the default value: +%\end{macro} +%\begin{macro}{\GlsAddXdyAlphabet} +% \cs{GlsAddXdyAlphabet}\marg{name}\marg{definition} +% adds a new alphabet called \meta{name}. The definition +% must use \app{xindy} syntax. % \begin{macrocode} -\glstranslatefalse -\@ifpackageloaded{translator}{\glstranslatetrue}{% -\@ifpackageloaded{babel}{\glstranslatetrue}{% -\@ifpackageloaded{polyglossia}{\glstranslatetrue}{}}} +\ifglsxindy + \newcommand*{\GlsAddXdyAlphabet}[2]{% + \edef\@xdyuseralphabets{% + \@xdyuseralphabets ^^J + (define-alphabet "#1" (#2))}} +\else + \newcommand*{\GlsAddXdyAlphabet}[2]{% + \glsnoxindywarning\GlsAddXdyAlphabet} +\fi % \end{macrocode} +%\end{macro} % -%\begin{option}{hyperfirst} -%\changes{2.03}{2009 Sep 23}{new} -% Set whether or not terms should have a hyperlink on first use. +% This code is only required for xindy: % \begin{macrocode} -\define@boolkey{glossaries.sty}[gls]{hyperfirst}[true]{} -\glshyperfirsttrue +\ifglsxindy % \end{macrocode} -%\end{option} % -%\begin{option}{footnote} -% Set the long form of the acronym in footnote on first use. -% \begin{macrocode} -\define@boolkey{glossaries.sty}[glsacr]{footnote}[true]{% -\ifthenelse{\boolean{glsacrdescription}}{}% -{\renewcommand*{\@gls@sanitizedesc}{}}% -} -% \end{macrocode} -%\end{option} -%\begin{option}{description} -% Allow acronyms to have a description (needs to be set using -% the \gloskey{description} key in the optional argument of -% \ics{newacronym}). +%\begin{macro}{\@gls@xdy@locationlist} +%\changes{3.0}{2011/04/02}{new} +% List of predefined location names. % \begin{macrocode} -\define@boolkey{glossaries.sty}[glsacr]{description}[true]{% - \renewcommand*{\@gls@sanitizesymbol}{}% -} + \newcommand*{\@gls@xdy@locationlist}{% + roman-page-numbers,% + Roman-page-numbers,% + arabic-page-numbers,% + alpha-page-numbers,% + Alpha-page-numbers,% + Appendix-page-numbers,% + arabic-section-numbers% + } % \end{macrocode} -%\end{option} -%\begin{option}{smallcaps} -% Define \ics{newacronym} to set the short form in small capitals. +%\end{macro} +% Each location class \meta{name} has the format stored in +% \cs{@gls@xdy@Lclass@}\meta{name}. Set up predefined +% formats. +% +%\begin{macro}{\@gls@xdy@Lclass@roman-page-numbers} +% Lower case Roman numerals (i, ii, \ldots). In the event that +% \ics{roman} has been redefined to produce a fancy form of +% roman numerals, attempt to work out how it will be written +% to the output file. % \begin{macrocode} -\define@boolkey{glossaries.sty}[glsacr]{smallcaps}[true]{% - \renewcommand*{\@gls@sanitizesymbol}{}% -} + \protected@edef\@gls@roman{\@roman{0\string" + \string"roman-numbers-lowercase\string" :sep \string"}}% + \@onelevel@sanitize\@gls@roman + \edef\@tmp{\string" \string"roman-numbers-lowercase\string" + :sep \string"}% + \@onelevel@sanitize\@tmp + \ifx\@tmp\@gls@roman + \expandafter + \edef\csname @gls@xdy@Lclass@roman-page-numbers\endcsname{% + \string"roman-numbers-lowercase\string"% + }% + \else + \expandafter + \edef\csname @gls@xdy@Lclass@roman-page-numbers\endcsname{ + :sep \string"\@gls@roman\string"% + }% + \fi % \end{macrocode} -%\end{option} -%\begin{option}{smaller} -% Define \ics{newacronym} to set the short form using \cs{smaller} -% which obviously needs to be defined by loading the appropriate -% package. +%\end{macro} +% +%\begin{macro}{\@gls@xdy@Lclass@Roman-page-numbers} +% Upper case Roman numerals (I, II, \ldots). % \begin{macrocode} -\define@boolkey{glossaries.sty}[glsacr]{smaller}[true]{% - \renewcommand*{\@gls@sanitizesymbol}{}% -} + \expandafter\def\csname @gls@xdy@Lclass@Roman-page-numbers\endcsname{% + \string"roman-numbers-uppercase\string"% + }% % \end{macrocode} -%\end{option} -%\begin{option}{dua} -% Define \ics{newacronym} to always use the long forms -% (i.e.\ don't use acronyms) +%\end{macro} +% +%\begin{macro}{\@gls@xdy@Lclass@arabic-page-numbers} +% Arabic numbers (1, 2, \ldots). % \begin{macrocode} -\define@boolkey{glossaries.sty}[glsacr]{dua}[true]{% - \renewcommand*{\@gls@sanitizesymbol}{}% -} + \expandafter\def\csname @gls@xdy@Lclass@arabic-page-numbers\endcsname{% + \string"arabic-numbers\string"% + }% % \end{macrocode} -%\end{option} -%\begin{option}{shotcuts} -% Define acronym shortcuts. +%\end{macro} +% +%\begin{macro}{\@gls@xdy@Lclass@alpha-page-numbers} +% Lower case alphabetical (a, b, \ldots). % \begin{macrocode} -\define@boolkey{glossaries.sty}[glsacr]{shortcuts}[true]{} + \expandafter\def\csname @gls@xdy@Lclass@alpha-page-numbers\endcsname{% + \string"alpha\string"% + }% % \end{macrocode} -%\end{option} +%\end{macro} % -%\begin{macro}{\glsorder} -% Stores the glossary ordering. This may either be \qt{word} -% or \qt{letter}. This passes the relevant information to -% \app{makeglossaries}. The default is word ordering. +%\begin{macro}{\@gls@xdy@Lclass@Alpha-page-numbers} +% Upper case alphabetical (A, B, \ldots). % \begin{macrocode} -\newcommand*{\glsorder}{word} + \expandafter\def\csname @gls@xdy@Lclass@Alpha-page-numbers\endcsname{% + \string"ALPHA\string"% + }% % \end{macrocode} %\end{macro} -%\begin{macro}{\@glsorder} -% The ordering information is written to the auxiliary file -% for \app{makeglossaries}, so ignore the auxiliary -% information. +% +%\begin{macro}{\@gls@xdy@Lclass@Appendix-page-numbers} +% Appendix style locations (e.g.\ A-1, A-2, \ldots, B-1, B-2, +% \ldots). The separator is given by \ics{@glsAlphacompositor}. % \begin{macrocode} -\newcommand*{\@glsorder}[1]{} + \expandafter\def\csname @gls@xdy@Lclass@Appendix-page-numbers\endcsname{% + \string"ALPHA\string" + :sep \string"\@glsAlphacompositor\string" + \string"arabic-numbers\string"% + } % \end{macrocode} %\end{macro} % -%\begin{option}{order} -%\changes{1.17}{2008 December 26}{order package option added} +%\begin{macro}{\@gls@xdy@Lclass@arabic-section-numbers} +% Section number style locations (e.g.\ 1.1, 1.2, \ldots). The +% compositor is given by \ics{glscompositor}. % \begin{macrocode} -\define@choicekey{glossaries.sty}{order}{word,letter}{% - \def\glsorder{#1}} + \expandafter\def\csname @gls@xdy@Lclass@arabic-section-numbers\endcsname{% + \string"arabic-numbers\string" + :sep \string"\glscompositor\string" + \string"arabic-numbers\string"% + }% % \end{macrocode} -%\end{option} +%\end{macro} % -%\changes{1.17}{2008 December 26}{added xindy support} -%\begin{macro}{\ifglsxindy} -%\changes{1.17}{2008 December 26}{new} -% Provide boolean to determine whether \app{xindy} or -% \app{makeindex} will be used to sort the glossaries. +%\begin{macro}{\@xdyuserlocationdefs} +% List of additional location definitions +% (separated by "^^J") % \begin{macrocode} -\newif\ifglsxindy + \def\@xdyuserlocationdefs{} % \end{macrocode} %\end{macro} -% The default is \app{makeindex}: +%\begin{macro}{\@xdyuserlocationnames} +% List of additional user location names % \begin{macrocode} -\glsxindyfalse + \def\@xdyuserlocationnames{} % \end{macrocode} +%\end{macro} % -% Define package option to specify that \app{makeindex} will -% be used to sort the glossaries: +% End of xindy-only block: % \begin{macrocode} -\DeclareOptionX{makeindex}{\glsxindyfalse} +\fi % \end{macrocode} % -% The \pkgopt{xindy} package option may have a value which in -% turn can be a key=value list. First define the keys for this -% sub-list. The boolean "glsnumbers" determines whether to -% automatically add the \texttt{glsnumbers} letter group. +%\begin{macro}{\GlsAddXdyLocation} +% \cs{GlsAddXdyLocation}\oarg{prefix-loc}\marg{name}\marg{definition} +% Define a new location called \meta{name}. The definition +% must use \app{xindy} syntax. (Note that this doesn't +% check to see if the location is already defined. That is left +% to \app{xindy} to complain about.) % \begin{macrocode} -\define@boolkey[gls]{xindy}{glsnumbers}[true]{} -\gls@xindy@glsnumberstrue +\ifglsxindy + \newcommand*{\GlsAddXdyLocation}[3][]{% + \def\@gls@tmp{#1}% + \ifx\@gls@tmp\@empty + \edef\@xdyuserlocationdefs{% + \@xdyuserlocationdefs ^^J% + (define-location-class \string"#2\string"^^J\space\space + \space(:sep \string"{}\glsopenbrace\string" #3 + :sep \string"\glsclosebrace\string")) + }% + \else + \edef\@xdyuserlocationdefs{% + \@xdyuserlocationdefs ^^J% + (define-location-class \string"#2\string"^^J\space\space + \space(:sep "\glsopenbrace" + #1 + :sep "\glsclosebrace\glsopenbrace" #3 + :sep "\glsclosebrace")) + }% + \fi + \edef\@xdyuserlocationnames{% + \@xdyuserlocationnames^^J\space\space\space + \string"#1\string"}% + } % \end{macrocode} -% -%\begin{macro}{\@xdy@main@language} -% Define what language to use for each glossary type (if a -% language is not defined for a particular glossary type -% the language specified for the main glossary is used.) +% Only has an effect before \ics{writeist}: % \begin{macrocode} -\def\@xdy@main@language{\rootlanguagename}% + \@onlypremakeg\GlsAddXdyLocation +\else + \newcommand*{\GlsAddXdyLocation}[2]{% + \glsnoxindywarning\GlsAddXdyLocation} +\fi % \end{macrocode} %\end{macro} -% Define key to set the language -% \begin{macrocode} -\define@key[gls]{xindy}{language}{\def\@xdy@main@language{#1}} -% \end{macrocode} % -%\begin{macro}{\gls@codepage} -% Define the code page. If \ics{inputencodingname} is defined -% use that, otherwise have initialise with no codepage. +%\begin{macro}{\@xdylocationclassorder} +% Define location class order % \begin{macrocode} -\@ifundefined{inputencodingname}{% - \def\gls@codepage{}}{% - \def\gls@codepage{\inputencodingname} -} +\ifglsxindy + \edef\@xdylocationclassorder{^^J\space\space\space + \string"roman-page-numbers\string"^^J\space\space\space + \string"arabic-page-numbers\string"^^J\space\space\space + \string"arabic-section-numbers\string"^^J\space\space\space + \string"alpha-page-numbers\string"^^J\space\space\space + \string"Roman-page-numbers\string"^^J\space\space\space + \string"Alpha-page-numbers\string"^^J\space\space\space + \string"Appendix-page-numbers\string" + \@xdyuserlocationnames^^J\space\space\space + \string"see\string" + } +\fi % \end{macrocode} -% Define a key to set the code page. +%\end{macro} +% Change the location order. +%\begin{macro}{\GlsSetXdyLocationClassOrder} % \begin{macrocode} -\define@key[gls]{xindy}{codepage}{\def\gls@codepage{#1}} +\ifglsxindy + \newcommand*\GlsSetXdyLocationClassOrder[1]{% + \def\@xdylocationclassorder{#1}} +\else + \newcommand*\GlsSetXdyLocationClassOrder[1]{% + \glsnoxindywarning\GlsSetXdyLocationClassOrder} +\fi % \end{macrocode} %\end{macro} % -% Define package option to specify that \app{xindy} will be -% used to sort the glossaries: +%\begin{macro}{\@xdysortrules} +% Define sort rules % \begin{macrocode} -\define@key{glossaries.sty}{xindy}[]{% - \glsxindytrue - \setkeys[gls]{xindy}{#1}% -} +\ifglsxindy + \def\@xdysortrules{} +\fi +% \end{macrocode} +%\end{macro} +%\begin{macro}{\GlsAddSortRule} +% Add a sort rule +% \begin{macrocode} +\ifglsxindy + \newcommand*\GlsAddSortRule[2]{% + \expandafter\toks@\expandafter{\@xdysortrules}% + \protected@edef\@xdysortrules{\the\toks@ ^^J + (sort-rule \string"#1\string" \string"#2\string")}% + } +\else + \newcommand*\GlsAddSortRule[2]{% + \glsnoxindywarning\GlsAddSortRule} +\fi % \end{macrocode} +%\end{macro} % -%\begin{macro}{\GlossariesWarning} -% Prints a warning message. +%\begin{macro}{\@xdyrequiredstyles} +% Define list of required styles (this should be a comma-separated +% list of \app{xindy} styles) % \begin{macrocode} -\newcommand*{\GlossariesWarning}[1]{% - \PackageWarning{glossaries}{#1}% -} +\ifglsxindy + \def\@xdyrequiredstyles{tex} +\fi % \end{macrocode} %\end{macro} -%\begin{macro}{\GlossariesWarningNoLine} -% Prints a warning message without the line number. +%\begin{macro}{\GlsAddXdyStyle} +% Add a \app{xindy} style to the list of required styles % \begin{macrocode} -\newcommand*{\GlossariesWarningNoLine}[1]{% - \PackageWarningNoLine{glossaries}{#1}% -} +\ifglsxindy + \newcommand*\GlsAddXdyStyle[1]{% + \edef\@xdyrequiredstyles{\@xdyrequiredstyles,#1}}% +\else + \newcommand*\GlsAddXdyStyle[1]{% + \glsnoxindywarning\GlsAddXdyStyle} +\fi % \end{macrocode} %\end{macro} -% Define package option to suppress warnings +%\begin{macro}{\GlsSetXdyStyles} +% Reset the list of required styles % \begin{macrocode} -\DeclareOptionX{nowarn}{% - \renewcommand*{\GlossariesWarning}[1]{}% - \renewcommand*{\GlossariesWarningNoLine}[1]{}% -} +\ifglsxindy + \newcommand*\GlsSetXdyStyles[1]{% + \edef\@xdyrequiredstyles{#1}} +\else + \newcommand*\GlsSetXdyStyles[1]{% + \glsnoxindywarning\GlsSetXdyStyles} +\fi % \end{macrocode} +%\end{macro} % -% Process package options: +%\begin{macro}{\findrootlanguage} +% The root language name is required by \app{xindy}. This +% information is for \app{makeglossaries} to pass to +% \app{xindy}. Since \ics{languagename} only stores the +% regional dialect rather than the root language name, some +% trickery is required to determine the root language. % \begin{macrocode} -\ProcessOptionsX +\ifglsxindy + \@ifpackageloaded{babel}{% % \end{macrocode} -% If \isty{babel} package is loaded, check to see if -% \isty{translator} is installed, but only if translation is -% required. -%\changes{2.02}{2009 July 13}{translate=false will prevent -% automatic loading of translator package} +% Need to parse \texttt{babel.sty} to determine the root language. +% This code was provided by Enrico~Gregorio. % \begin{macrocode} -\ifglstranslate - \@ifpackageloaded{babel}{\IfFileExists{translator.sty}{% - \RequirePackage{translator}}{}}{} -\fi + \def\findrootlanguage{\begingroup + \escapechar=-1\relax % \end{macrocode} -% -% If chapters are defined and the user has requested the -% section counter as a package option, \cs{@chapter} will -% be modified so -% that it adds a \texttt{section.}\meta{n}\texttt{.0} target, -% otherwise entries placed before the first section of a chapter -% will have undefined links. -% -% The same problem will also occur if a lower sectional unit is -% used, but this is less likely to happen. If it does, or if -% you change \cs{glscounter} to "section" later, you -% will have to specify a different counter for the entries -% that give rise to a \texttt{name}"{"\meta{section-level}"."\meta{n}".0}" -% non-existent warning (e.g. "\gls[counter=chapter]{label}"). +% normalize \cs{languagename} to category 12 chars % \begin{macrocode} -\ifthenelse{\equal{\glscounter}{section}}{% -\@ifundefined{chapter}{}{% -\let\@gls@old@chapter\@chapter -\def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}% -\@ifundefined{hyperdef}{}{\hyperdef{section}{\thesection}{}}}}}{} + \edef\languagename{% + \expandafter\string\csname\languagename\endcsname}% % \end{macrocode} -% -%\begin{macro}{\@gls@onlypremakeg} -% Some commands only have an effect when used before -% \ics{makeglossaries}. So define a list of commands that -% should be disabled after \ics{makeglossaries} +% disable \texttt{babel.sty} useless commands % \begin{macrocode} -\newcommand*{\@gls@onlypremakeg}{} + \def\NeedsTeXFormat##1[##2]{}% + \def\ProvidesPackage##1[##2]{}% + \let\LdfInit\relax + \def\languageattribute##1##2{}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@onlypremakeg} -% Adds the specified control sequence to the list of commands that -% must be disabled after \ics{makeglossaries}. +% change the meaning of \cs{DeclareOption} % \begin{macrocode} -\newcommand*{\@onlypremakeg}[1]{% -\ifx\@gls@onlypremakeg\@empty - \def\@gls@onlypremakeg{#1}% -\else - \expandafter\toks@\expandafter{\@gls@onlypremakeg}% - \edef\@gls@onlypremakeg{\the\toks@,\noexpand#1}% -\fi} + \def\DeclareOption##1##2{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@disable@onlypremakeg} -% Disable all commands listed in \cs{@gls@onlypremakeg} +% at \cs{DeclareOption*} we end % \begin{macrocode} -\newcommand*{\@disable@onlypremakeg}{% -\@for\@thiscs:=\@gls@onlypremakeg\do{% - \expandafter\@disable@premakecs\@thiscs% -}} + \ifx##1*\expandafter\endinput\else % \end{macrocode} -%\end{macro} -%\begin{macro}{\@disable@premakecs} -% Disables the given command. +% else we build a string with the first argument % \begin{macrocode} -\newcommand*{\@disable@premakecs}[1]{% - \def#1{\PackageError{glossaries}{\string#1\space may only be - used before \string\makeglossaries}{You can't use - \string#1\space after \string\makeglossaries}}% -} + \edef\testlanguage{\expandafter\string\csname##1\endcsname}% % \end{macrocode} -%\end{macro} -% -%\subsection{Default values}\label{sec:predefinednames} -% This section sets up default values that are used by this -% package. Some of the names may already be defined (e.g.\ by -% \isty{babel}) so \cs{providecommand} is used. -% -% Main glossary title: -%\begin{macro}{\glossaryname} +% if \cs{testlanguage} and \cs{languagename} are the same +% we execute the second argument % \begin{macrocode} -\providecommand*{\glossaryname}{Glossary} + \ifx\testlanguage\languagename##2\fi + \fi} % \end{macrocode} -%\end{macro} -% The title for the "acronym" glossary type (which is defined if -% \pkgopt{acronym} package option is used) is given by -% \cs{acronymname}. If the \pkgopt{acronym} -% package option is not used, \cs{acronymname} won't be used. -%\begin{macro}{\acronymname} +% almost all options of babel are \cs{input}"{"\meta{name}".ldf}" % \begin{macrocode} -\providecommand*{\acronymname}{Acronyms} + \def\input##1{\stripldf##1}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\glssettoctitle} -% Sets the TOC title for the given glossary. -%\changes{1.15}{2008 August 15}{new} +% we put the root language name in \ics{rootlanguagename} % \begin{macrocode} -\newcommand*{\glssettoctitle}[1]{% -\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}} + \def\stripldf##1.ldf{\gdef\rootlanguagename{##1}}% % \end{macrocode} -%\end{macro} -% -% The following commands provide text for the headers used by -% some of the tabular-like glossary -% styles. Whether or not they get used in the glossary depends on -% the glossary style. -%\begin{macro}{\entryname} +% now input babel.sty, using the primitive \cs{input} % \begin{macrocode} -\providecommand*{\entryname}{Notation} + \@@input babel.sty + \endgroup}% + }{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\descriptionname} +% \isty{babel} hasn't been loaded, so check if \isty{ngerman} has +% been loaded % \begin{macrocode} -\providecommand*{\descriptionname}{Description} + \@ifpackageloaded{ngerman}{% + \def\findrootlanguage{% + \def\rootlanguagename{german}}% + }{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\symbolname} +% Neither \sty{babel} nor \sty{ngerman} have been loaded, so +% assume the root language is English % \begin{macrocode} -\providecommand*{\symbolname}{Symbol} + \def\findrootlanguage{% + \def\rootlanguagename{english}}% + }% + }% +\fi % \end{macrocode} %\end{macro} -%\begin{macro}{\pagelistname} +%\begin{macro}{\rootlanguagename} +% Set default root language to English. % \begin{macrocode} -\providecommand*{\pagelistname}{Page List} +\def\rootlanguagename{english} % \end{macrocode} %\end{macro} -% Labels for \app{makeindex}'s symbol and number groups: -%\begin{macro}{\glssymbolsgroupname} +% +%\begin{macro}{\@xdylanguage} +% The \app{xindy} language setting is required by +% \app{makeglossaries}, so provide a command for +% \app{makeglossaries} to pick up the information +% from the auxiliary file. This command is not needed by the +% \sty{glossaries} package, so define it to ignore its arguments. % \begin{macrocode} -\providecommand*{\glssymbolsgroupname}{Symbols} +\def\@xdylanguage#1#2{} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsnumbersgroupname} +% +%\begin{macro}{\GlsSetXdyLanguage} +% Define a command that allows the user to set the language +% for a given glossary type. The first argument indicates the +% glossary type. If omitted the main glossary is assumed. % \begin{macrocode} -\providecommand*{\glsnumbersgroupname}{Numbers} +\ifglsxindy + \newcommand*\GlsSetXdyLanguage[2][\glsdefaulttype]{% + \ifglossaryexists{#1}{% + \expandafter\def\csname @xdy@#1@language\endcsname{#2}% + }{% + \PackageError{glossaries}{Can't set language type for + glossary type `#1' --- no such glossary}{% + You have specified a glossary type that doesn't exist}}} +\else + \newcommand*\GlsSetXdyLanguage[2][]{% + \glsnoxindywarning\GlsSetXdyLanguage} +\fi % \end{macrocode} %\end{macro} -%\begin{macro}{\glspluralsuffix} -% The default plural is formed by appending \cs{glspluralsuffix} to -% the singular form. +% +%\begin{macro}{\@gls@codepage} +% The \app{xindy} codepage setting is required by +% \app{makeglossaries}, so provide a command for +% \app{makeglossaries} to pick up the information +% from the auxiliary file. This command is not needed by the +% \sty{glossaries} package, so define it to ignore its arguments. % \begin{macrocode} -\newcommand*{\glspluralsuffix}{s} +\def\@gls@codepage#1#2{} % \end{macrocode} %\end{macro} -%\begin{macro}{\seename} +% +%\begin{macro}{\GlsSetXdyCodePage} +% Define command to set the code page. % \begin{macrocode} -\providecommand*{\seename}{see} +\ifglsxindy + \newcommand*{\GlsSetXdyCodePage}[1]{% + \renewcommand*{\gls@codepage}{#1}% + } +\else + \newcommand*{\GlsSetXdyCodePage}[1]{% + \glsnoxindywarning\GlsSetXdyCodePage} +\fi % \end{macrocode} %\end{macro} -%\begin{macro}{\andname} +% +%\begin{macro}{\@xdylettergroups} +% Store letter group definitions. % \begin{macrocode} -\providecommand*{\andname}{\&} +\ifglsxindy + \ifgls@xindy@glsnumbers + \def\@xdylettergroups{(define-letter-group + \string"glsnumbers\string"^^J\space\space\space + :prefixes (\string"0\string" \string"1\string" + \string"2\string" \string"3\string" \string"4\string" + \string"5\string" \string"6\string" \string"7\string" + \string"8\string" \string"9\string")^^J\space\space\space + :before \string"\@glsfirstletter\string")} + \else + \def\@xdylettergroups{} + \fi +\fi % \end{macrocode} %\end{macro} -% Add multi-lingual support\changes{1.08}{2007 Oct 13}{Added -% babel support}. Thanks to everyone who contributed to the -% translations from both comp.text.tex and via email. -%\begin{macro}{\addglossarytocaptions} -% If using \isty{translator}, \ics{glossaryname} should be defined -% in terms of \ics{translate}, but if babel is also loaded, it will -% redefine \cs{glossaryname} whenever the language is set, so -% override it. (Don't use \ics{addto} as \isty{polyglossia} doesn't -% define it.) +% +%\begin{macro}{\GlsAddLetterGroup} +% Add a new letter group. The first argument is the name +% of the letter group. The second argument is the \app{xindy} +% code specifying prefixes and ordering. % \begin{macrocode} -\newcommand*{\addglossarytocaptions}[1]{% - \@ifundefined{captions#1}{}{% - \expandafter\let\expandafter\@gls@tmp\csname captions#1\endcsname - \expandafter\toks@\expandafter{\@gls@tmp - \renewcommand*{\glossaryname}{\translate{Glossary}}% - }% - \expandafter\edef\csname captions#1\endcsname{\the\toks@}% + \newcommand*\GlsAddLetterGroup[2]{% + \expandafter\toks@\expandafter{\@xdylettergroups}% + \protected@edef\@xdylettergroups{\the\toks@^^J% + (define-letter-group \string"#1\string"^^J\space\space\space#2)}% }% -} % \end{macrocode} %\end{macro} +% +%\subsection{Loops and conditionals} +%\begin{macro}{\forallglossaries} +% To iterate through all glossaries (or comma-separated list of +% glossary names given in optional argument) use:\\[10pt] +% \cs{forallglossaries}\oarg{glossary list}\marg{cmd}\marg{code}\\[10pt] +% where \meta{cmd} is +% a control sequence which will be set to the name of the +% glossary in the current iteration. +%\changes{2.01}{2009 May 30}{replaced \cs{ifthenelse} with \cs{ifx}} % \begin{macrocode} -\ifglstranslate -% \end{macrocode} -% If \isty{translator} is not install, used standard -% \isty{babel} captions, otherwise load \isty{translator} -% dictionary. -%\changes{1.1}{2008 Feb 22}{Added support for translator package} -%\changes{1.15}{2008 August 15}{Added 'glssettoctitle} -% \begin{macrocode} - \@ifpackageloaded{translator}{% - \usedictionary{glossaries-dictionary}% - \addglossarytocaptions{portuges}% - \addglossarytocaptions{portuguese}% - \addglossarytocaptions{brazil}% - \addglossarytocaptions{brazilian}% - \addglossarytocaptions{danish}% - \addglossarytocaptions{dutch}% - \addglossarytocaptions{afrikaans}% - \addglossarytocaptions{english}% - \addglossarytocaptions{UKenglish}% - \addglossarytocaptions{USenglish}% - \addglossarytocaptions{american}% - \addglossarytocaptions{australian}% - \addglossarytocaptions{british}% - \addglossarytocaptions{canadian}% - \addglossarytocaptions{newzealand}% - \addglossarytocaptions{french}% - \addglossarytocaptions{frenchb}% - \addglossarytocaptions{francais}% - \addglossarytocaptions{acadian}% - \addglossarytocaptions{canadien}% - \addglossarytocaptions{german}% - \addglossarytocaptions{germanb}% - \addglossarytocaptions{austrian}% - \addglossarytocaptions{naustrian}% - \addglossarytocaptions{ngerman}% - \addglossarytocaptions{irish}% - \addglossarytocaptions{italian}% - \addglossarytocaptions{magyar}% - \addglossarytocaptions{hungarian}% - \addglossarytocaptions{polish}% - \addglossarytocaptions{spanish}% - \renewcommand*{\glssettoctitle}[1]{% - \ifthenelse{\equal{#1}{main}}{% - \translatelet{\glossarytoctitle}{Glossary}}{% - \ifthenelse{\equal{#1}{acronym}}{% - \translatelet{\glossarytoctitle}{Acronyms}}{% - \def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}}}% - \renewcommand*{\glossaryname}{\translate{Glossary}}% - \renewcommand*{\acronymname}{\translate{Acronyms}}% - \renewcommand*{\entryname}{\translate{Notation (glossaries)}}% - \renewcommand*{\descriptionname}{% - \translate{Description (glossaries)}}% - \renewcommand*{\symbolname}{\translate{Symbol (glossaries)}}% - \renewcommand*{\pagelistname}{% - \translate{Page List (glossaries)}}% - \renewcommand*{\glssymbolsgroupname}{% - \translate{Symbols (glossaries)}}% - \renewcommand*{\glsnumbersgroupname}{% - \translate{Numbers (glossaries)}}% - }{% - \@ifpackageloaded{babel}% - {\RequirePackage{glossaries-babel}}% - {% - \@ifpackageloaded{polyglossia}{% - \RequirePackage{glossaries-polyglossia}}{}% - }} -\fi -% \end{macrocode} -%\begin{macro}{\glspostdescription} -% The description terminator is given by \cs{glspostdescription} -% (except for the 3 and 4 column styles). This is a full stop -% by default: +\newcommand*{\forallglossaries}[3][\@glo@types]{% + \@for#2:=#1\do{\ifx#2\@empty\else#3\fi}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\forglsentries} +% To iterate through all entries in a given glossary use:\\[10pt] +%\cs{forglsentries}\oarg{type}\marg{cmd}\marg{code}\\[10pt] +%where \meta{type} is the glossary label and \meta{cmd} is a +% control sequence which will be set to the entry label in the +% current iteration. +%\changes{2.01}{2009 May 30}{replaced \cs{ifthenelse} with \cs{ifx}} % \begin{macrocode} -\newcommand*{\glspostdescription}{.} +\newcommand*{\forglsentries}[3][\glsdefaulttype]{% + \edef\@@glo@list{\csname glolist@#1\endcsname}% + \@for#2:=\@@glo@list\do{\ifx#2\@empty\else#3\fi}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\nopostdesc} -% Provide a means to suppress description terminator for a given -% entry. (Useful for entries with no description.) Has no -% effect outside the glossaries. -%\changes{1.17}{2008 December 26}{new} +%\begin{macro}{\forallglsentries} +% To iterate through all glossary entries over all glossaries listed +% in the optional argument (the default is all glossaries) use:\\[10pt] +% \cs{forallglsentries}\oarg{glossary list}\marg{cmd}\marg{code}\\[10pt] +% Within \cs{forallglsentries}, the current glossary type +% is given by \cs{@@this@glo@}. % \begin{macrocode} -\newcommand*{\nopostdesc}{} +\newcommand*{\forallglsentries}[3][\@glo@types]{% +\expandafter\forallglossaries\expandafter[#1]{\@@this@glo@}{% +\forglsentries[\@@this@glo@]{#2}{#3}}} % \end{macrocode} %\end{macro} -%\begin{macro}{\@nopostdesc} -% Suppress next description terminator. +% +%\begin{macro}{\ifglossaryexists} +% To check to see if a glossary exists use:\\[10pt] +%\cs{ifglossaryexists}\marg{type}\marg{true-text}\marg{false-text}\\[10pt] +%where \meta{type} is the glossary's label. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\newcommand*{\@nopostdesc}{% - \let\org@glspostdescription\glspostdescription - \def\glspostdescription{% - \let\glspostdescription\org@glspostdescription}% +\newcommand{\ifglossaryexists}[3]{% + \ifcsundef{@glotype@#1@out}{#3}{#2}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\glspar} -% Provide means of having a paragraph break in glossary entries +% +%\begin{macro}{\ifglsentryexists} +% To check to see if a glossary entry has been defined use:\\[10pt] +% \cs{ifglsentryexists}\marg{label}\marg{true text}\marg{false text}\\[10pt] +%where \meta{label} is the entry's label. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\newcommand{\glspar}{\par} +\newcommand{\ifglsentryexists}[3]{% + \ifcsundef{glo@#1@name}{#3}{#2}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\setStyleFile} -% Sets the style file. The relevent extension is appended. +%\begin{macro}{\ifglsused} +% To determine if given glossary entry has been +% used in the document text yet use:\\[10pt] +% \cs{ifglsused}\marg{label}\marg{true text}\marg{false text}\\[10pt] +% where \meta{label} is the entry's label. +% If true it will do \meta{true text} +% otherwise it will do \meta{false text}. % \begin{macrocode} -\ifglsxindy - \newcommand{\setStyleFile}[1]{% - \renewcommand{\istfilename}{#1.xdy}} -\else - \newcommand{\setStyleFile}[1]{% - \renewcommand{\istfilename}{#1.ist}} -\fi +\newcommand*{\ifglsused}[3]{\ifthenelse{\boolean{glo@#1@flag}}{#2}{#3}} % \end{macrocode} -% This command only has an effect prior to using -% \ics{makeglossaries}. +%\end{macro} +%The following two commands will cause an error if the given +% condition fails: +% +%\begin{macro}{\glsdoifexists} +%\cs{glsdoifexists}\marg{label}\marg{code}\par +% Generate an error if entry specified by \meta{label} doesn't +% exists, otherwise do \meta{code}. % \begin{macrocode} -\@onlypremakeg\setStyleFile +\newcommand{\glsdoifexists}[2]{% + \ifglsentryexists{#1}{#2}{% + \PackageError{glossaries}{Glossary entry `#1' has not been + defined}{You need to define a glossary entry before you + can use it.}}% +} % \end{macrocode} %\end{macro} % -% The name of the \app{makeindex} or \app{xindy} style file -% is given by \cs{istfilename}. This file is -% created by \ics{writeist} (which is used by -% \ics{makeglossaries}) so -% redefining this command will only have an effect if it is -% done \emph{before} \cs{makeglossaries}. As from v1.17, use -% \ics{setStyleFile} instead of directly redefining \cs{istfilename}. -%\begin{macro}{\istfilename} -%\changes{1.17}{2008 December 26}{added xindy support} +%\begin{macro}{\glsdoifnoexists} +%\cs{glsdoifnoexists}\marg{label}\marg{code}\par +% The opposite: only do second argument if the entry doesn't +% exists. Generate an error message if it exists. % \begin{macrocode} -\ifglsxindy - \def\istfilename{\jobname.xdy} -\else - \def\istfilename{\jobname.ist} -\fi +\newcommand{\glsdoifnoexists}[2]{% + \ifglsentryexists{#1}{% + \PackageError{glossaries}{Glossary entry `#1' has already + been defined}{}}{#2}% +} % \end{macrocode} %\end{macro} -% The \app{makeglossaries} Perl script picks up this name -% from the auxiliary file. If the name ends with \filetype{.xdy} -% it calls \app{xindy} otherwise it calls \app{makeindex}. -% Since its not required by -% \LaTeX, \cs{@istfilename} ignores its argument. -%\begin{macro}{\@istfilename} +% +%\subsection{Defining new glossaries}\label{sec:newglos} +% A comma-separated list of glossary names is stored +% in \cs{@glo@types}. When a new glossary type +% is created, its identifying name is added to this list. +% This is used by commands that iterate through all glossaries +% (such as \ics{makeglossaries} and \ics{printglossaries}). +%\begin{macro}{\@glo@types} % \begin{macrocode} -\newcommand*{\@istfilename}[1]{} +\newcommand*{\@glo@types}{,} % \end{macrocode} %\end{macro} % -% This command is the value of the \istkey{page\_compositor} -% \app{makeindex} key. Again, any redefinition of this command -% must take place \emph{before} \cs{writeist} otherwise it -% will have no effect. As from 1.17, use \ics{glsSetCompositor} -% instead of directly redefining \cs{glscompositor}. -%\begin{macro}{\glscompositor} +% A new glossary type is defined using \cs{newglossary}. +% Syntax:\\[10pt]\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}% +%\marg{title}\oarg{counter}\\[10pt]% +% where \meta{log-ext} is the extension of the \app{makeindex} +% transcript file, \meta{in-ext} is the extension of the glossary +% input file (read in by \ics{printglossary} and created by +% \app{makeindex}), \meta{out-ext} is the extension of the +% glossary output file which is read in by \app{makeindex} +% (lines are written to this file by the \ics{glossary} command), +% \meta{title} is the title of the glossary that is used in +% \ics{glossarysection} and +% \meta{counter} is the default counter to be used by entries +% belonging to this glossary. The \app{makeglossaries} Perl +% script reads in the relevant extensions from the auxiliary file, +% and passes the appropriate file names and switches to +% \app{makeindex}. +%\begin{macro}{\newglossary} % \begin{macrocode} -\newcommand*{\glscompositor}{.} +\newcommand*{\newglossary}[5][glg]{% +\ifglossaryexists{#2}{% + \PackageError{glossaries}{Glossary type `#2' already exists}{% + You can't define a new glossary called `#2' because it already + exists}% +}{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsSetCompositor} -% Sets the compositor. +% Check if default has been set % \begin{macrocode} -\newcommand*{\glsSetCompositor}[1]{% - \renewcommand*{\glscompositor}{#1}} + \ifx\glsdefaulttype\relax + \gdef\glsdefaulttype{#2}% + \fi % \end{macrocode} -% Only use before \ics{makeglossaries} +% Add this to the list of glossary types: % \begin{macrocode} -\@onlypremakeg\glsSetCompositor + \toks@{#2}\edef\@glo@types{\@glo@types\the\toks@,}% +% \end{macrocode} +% Define a comma-separated list of labels for this glossary type, +% so that all the entries for this glossary can be reset with a +% single command. When a new entry is created, its label is added +% to this list. +% \begin{macrocode} + \expandafter\gdef\csname glolist@#2\endcsname{,}% +% \end{macrocode} +% Store details of this new glossary type: +% \begin{macrocode} + \expandafter\def\csname @glotype@#2@in\endcsname{#3}% + \expandafter\def\csname @glotype@#2@out\endcsname{#4}% + \expandafter\def\csname @glotype@#2@title\endcsname{#5}% + \protected@write\@auxout{}{\string\@newglossary{#2}{#1}{#3}{#4}}% +% \end{macrocode} +% How to display this entry in the document text (uses +% \cs{glsdisplay} and \cs{glsdisplayfirst} by +% default). These can be redefined by the user later if required +% (see \ics{defglsdisplay} and \ics{defglsdisplayfirst}). These +% may already have been defined if this has been specified as +% a list of acronyms. +%\changes{2.04}{2009 November 10}{added check to determine if +% \cs{gls@\meta{type}@display} and \cs{gls@\meta{type}@displayfirst} +% have been defined.} +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} +% \begin{macrocode} + \ifcsundef{gls@#2@display}% + {% + \expandafter\gdef\csname gls@#2@display\endcsname{\glsdisplay}% + }% + {}% + \ifcsundef{gls@#2@displayfirst}% + {% + \expandafter\gdef\csname gls@#2@displayfirst\endcsname{% + \glsdisplayfirst + }% + }% + {}% +% \end{macrocode} +% Define sort counter if required: +%\changes{3.0}{2011/04/02}{added \cs{@gls@defsortcount}} +% \begin{macrocode} + \@gls@defsortcount{#2}% +% \end{macrocode} +% Find out if the final optional argument has been specified, and +% use it to set the counter associated with this glossary. (Uses +% \ics{glscounter} if no optional argument is present.) +% \begin{macrocode} + \@ifnextchar[{\@gls@setcounter{#2}}% + {\@gls@setcounter{#2}[\glscounter]}}% +} % \end{macrocode} %\end{macro} -% -% (The page compositor is usually defined as a dash when using -% \app{makeindex}, but most of the standard counters used -% by \LaTeX\ use a full stop as the compositor, which is why I -% have used it as the default.) If \app{xindy} is used -% \cs{glscompositor} only affects the \texttt{arabic-page-numbers} -% location class. -%\begin{macro}{\@glsAlphacompositor} -% This is only used by \app{xindy}. It specifies the -% compositor to use when location numbers are in the form -% \meta{letter}\meta{compositor}\meta{number}. For example, -% if \cs{@glsAlphacompositor} is set to ``.'' then it allows -% locations such as A.1 whereas if \cs{@glsAlphacompositor} is -% set to ``-'' then it allows locations such as A-1. +%\begin{macro}{\altnewglossary} +%\changes{2.06}{2010 June 14}{new} % \begin{macrocode} -\newcommand*{\@glsAlphacompositor}{\glscompositor} +\newcommand*{\altnewglossary}[3]{% + \newglossary[#2-glg]{#1}{#2-gls}{#2-glo}{#3}% +} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsSetAlphaCompositor} -% Sets the alpha compositor. +% Only define new glossaries in the preamble: % \begin{macrocode} -\ifglsxindy - \newcommand*\glsSetAlphaCompositor[1]{% - \renewcommand*\@glsAlphacompositor{#1}} -\else - \newcommand*\glsSetAlphaCompositor[1]{% - \glsnoxindywarning\glsSetAlphaCompositor} -\fi +\@onlypreamble{\newglossary} % \end{macrocode} -% Can only be used before \ics{makeglossaries} +% Only define new glossaries before \ics{makeglossaries} % \begin{macrocode} -\@onlypremakeg\glsSetAlphaCompositor +\@onlypremakeg\newglossary % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\gls@suffixF} -%\changes{1.17}{2008 December 26}{new} -% Suffix to use for a two page list. This overrides the separator -% and the closing page number if set to something other than -% an empty macro. +%\cs{@newglossary} is used to specify the file extensions +% for the \app{makeindex} input, output and transcript files. +% It is written to the auxiliary file by \ics{newglossary}. +% Since it is not used by \LaTeX, \cs{@newglossary} simply +% ignores its arguments. +%\begin{macro}{\@newglossary} % \begin{macrocode} -\newcommand*{\gls@suffixF}{} +\newcommand*{\@newglossary}[4]{} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsSetSuffixF} -%\changes{1.17}{2008 December 26}{new} -% Sets the suffix to use for a two page list. +% Store counter to be used for given glossary type (the first +% argument is the glossary label, the second argument is the name +% of the counter): +%\begin{macro}{\@gls@setcounter} % \begin{macrocode} -\newcommand*{\glsSetSuffixF}[1]{% - \renewcommand*{\gls@suffixF}{#1}} +\def\@gls@setcounter#1[#2]{% + \expandafter\def\csname @glotype@#1@counter\endcsname{#2}% % \end{macrocode} -% Only has an effect when used before \ics{makeglossaries} +% Add counter to xindy list, if not already added: % \begin{macrocode} -\@onlypremakeg\glsSetSuffixF + \ifglsxindy + \GlsAddXdyCounters{#2}% + \fi +} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\gls@suffixFF} -%\changes{1.17}{2008 December 26}{new} -% Suffix to use for a three page list. This overrides the separator -% and the closing page number if set to something other than -% an empty macro. +% Get counter associated with given glossary (the argument is +% the glossary label): +%\begin{macro}{\@gls@getcounter} % \begin{macrocode} -\newcommand*{\gls@suffixFF}{} +\newcommand*{\@gls@getcounter}[1]{% +\csname @glotype@#1@counter\endcsname} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsSetSuffixFF} -%\changes{1.17}{2008 December 26}{new} -% Sets the suffix to use for a three page list. +% +% Define the main glossary. This will be the first glossary to +% be displayed when using \ics{printglossaries}. % \begin{macrocode} -\newcommand*{\glsSetSuffixFF}[1]{% - \renewcommand*{\gls@suffixFF}{#1}} +\glsdefmain % \end{macrocode} -%\end{macro} % -% The command \cs{glsnumberformat} indicates the default -% format for the page numbers in the glossary. (Note that this -% is not the same as \ics{glossaryentrynumbers}, but applies -% to individual numbers or groups of numbers within an entry's -% associated number list.) If hyperlinks are defined, it will use -% \ics{glshypernumber}, otherwise it will simply display its -% argument ``as is''. -%\begin{macro}{\glsnumberformat} +%\subsection{Defining new entries}\label{sec:newentry} +% New glossary entries are defined using \cs{newglossaryentry}. +% This command requires a label and a key-value list that defines +% the relevant information for that entry. The definition for these +% keys follows. Note that the \gloskey{name}, +% \gloskey{description} and \gloskey{symbol} keys will be +% sanitized later, depending on the value of the package option +% \pkgopt{sanitize} (this means that if some of the keys haven't +% been defined, they can be constructed from the \gloskey{name} +% and \gloskey{description} key before they are sanitized). +% +% +%\begin{key}{name} +%The \gloskey{name} key indicates the name +% of the term being defined. This is how the term will appear in +% the glossary. The \gloskey{name} key is required when defining +% a new glossary entry. % \begin{macrocode} -\@ifundefined{hyperlink}{% -\newcommand*{\glsnumberformat}[1]{#1}}{% -\newcommand*{\glsnumberformat}[1]{\glshypernumber{#1}}} +\define@key{glossentry}{name}{% +\def\@glo@name{#1}% +} % \end{macrocode} -%\end{macro} +%\end{key} % -% Individual numbers in an entry's associated number list are -% delimited using \cs{delimN} (which corresponds to the -% \istkey{delim\_n} \app{makeindex} keyword). The default value -% is a comma followed by a space. -%\begin{macro}{\delimN} +%\begin{key}{description} +% The \gloskey{description} key is usually only used in +% the glossary, but can be made to appear in the text by redefining +% \ics{glsdisplay} and \ics{glsdisplayfirst} (or +% using \ics{defglsdisplay} and \ics{defglsdisplayfirst}), however, +% you will have to disable the sanitize option (using the +% \pkgopt{sanitize} package option, +% "sanitize={description=false}", and protect fragile +% commands). The \gloskey{description} key is required when +% defining a new glossary entry. (Be careful not to make the +% description too long, because \app{makeindex} has a limited +% buffer. \cs{@glo@desc} is defined to be a short command +% to discourage lengthy descriptions +% for this reason. If you do have a very long description, or if +% you require paragraph breaks, define a separate command that +% contains the description, and use it as the value to the +% \gloskey{description} key.) % \begin{macrocode} -\newcommand{\delimN}{, } +\define@key{glossentry}{description}{% +\def\@glo@desc{#1}% +} % \end{macrocode} -%\end{macro} -% A range of numbers within an entry's associated number list is -% delimited using \cs{delimR} (which corresponds to the -% \istkey{delim\_r} \app{makeindex} keyword). The default is -% an en-dash. -%\begin{macro}{\delimR} +%\end{key} +%\begin{key}{descriptionplural} +% \changes{1.12}{2008 Mar 8}{new} % \begin{macrocode} -\newcommand{\delimR}{--} +\define@key{glossentry}{descriptionplural}{% +\def\@glo@descplural{#1}% +} % \end{macrocode} -%\end{macro} +%\end{key} % -% The glossary preamble is given by \cs{glossarypreamble}. This -% will appear after the glossary sectioning command, and before the -% \env{theglossary} environment. It is designed to allow the -% user to add information pertaining to the glossary (e.g.\ ``page -% numbers in italic indicate the primary definition'') therefore -% \cs{glossarypremable} shouldn't be affected by the glossary -% style. (So if you define your own glossary style, don't have it -% change \cs{glossarypreamble}.) The preamble is empty by -% default. If you have multiple glossaries, and you want a -% different preamble for each glossary, you will need to use -% \ics{printglossary} for each glossary type, instead of -% \ics{printglossaries}, and redefine \cs{glossarypreamble} -% before each \ics{printglossary}. -%\begin{macro}{\glossarypreamble} +%\begin{key}{sort} +% The \gloskey{sort} key needs to be sanitized here +% (the sort key is provided for \app{makeindex}'s benefit, +% not for use in the document). The \gloskey{sort} key is optional +% when defining a new glossary entry. If omitted, the value +% is given by \meta{name} \meta{description}. +%\changes{1.18}{2009 January 14}{moved sanitization to 'newglossaryentry} % \begin{macrocode} -\newcommand*{\glossarypreamble}{} +\define@key{glossentry}{sort}{% +\def\@glo@sort{#1}} % \end{macrocode} -%\end{macro} +%\end{key} % -% The glossary postamble is given by \cs{glossarypostamble}. -% This is provided to allow the user to -% add something after the end of the \env{theglossary} -% environment (again, this shouldn't be affected by the -% glossary style). It is, of course, possible to simply add the -% text after \ics{printglossary}, but if you only want the -% postamble to appear after the first glossary, but not after -% subsequent glossaries, you can do something like: -%\begin{verbatim} -%\renewcommand{\glossarypostamble}{For a complete list of terms -%see \cite{blah}\gdef\glossarypreamble{}} -%\end{verbatim} -%\begin{macro}{\glossarypostamble} +%\begin{key}{text} +% The \gloskey{text} key determines how the term should appear when +% used in the document (i.e.\ outside of the glossary). If omitted, +% the value of the \gloskey{name} key is used instead. % \begin{macrocode} -\newcommand*{\glossarypostamble}{} +\define@key{glossentry}{text}{% +\def\@glo@text{#1}% +} % \end{macrocode} -%\end{macro} +%\end{key} % -% The sectioning command that starts a glossary is given by -% \cs{glossarysection}. (This does not form part of the -% glossary style, and so should not be changed by a glossary -% style.) If \ics{phantomsection} -% is defined, it uses \cs{\@p@glossarysection}, otherwise it -% uses \cs{@glossarysection}. -%\changes{1.05}{2007 Aug 10}{added '@mkboth to 'glossarysection} -%\changes{2.02}{2009 July 13}{changed '@mkboth to 'glossarymark} -%\begin{macro}{\glossarysection} +%\begin{key}{plural} +% The \gloskey{plural} key determines how the plural form of the term +% should be displayed in the document. If omitted, the plural is +% constructed by appending \ics{glspluralsuffix} to the value of the +% \gloskey{text} key. % \begin{macrocode} -\newcommand*{\glossarysection}[2][\@gls@title]{% - \def\@gls@title{#2}% - \@ifundefined{phantomsection}{% - \@glossarysection{#1}{#2}}{\@p@glossarysection{#1}{#2}}% - \glossarymark{\glossarytoctitle}% +\define@key{glossentry}{plural}{% +\def\@glo@plural{#1}% } % \end{macrocode} -%\end{macro} -%\begin{macro}{\glossarymark} -%\changes{2.02}{2009 July 13}{New} -%\changes{2.03}{2009 Sep 23}{Added check to see if it's already -%defined} -% Sets the header mark for the glossary. Takes the glossary short -% (TOC) title as the argument. +%\end{key} +% +%\begin{key}{first} +% The \gloskey{first} key determines how the entry should be displayed +% in the document when it is first used. If omitted, it is taken +% to be the same as the value of the \gloskey{text} key. % \begin{macrocode} -\@ifundefined{glossarymark}{% - \newcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} -}{% - \GlossariesWarning{overriding \string\glossarymark}% - \@ifclassloaded{memoir}% - { - \renewcommand{\glossarymark}[1]{% - \markboth{\memUChead{#1}}{\memUChead{#1}}% - } - } - { - \renewcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} - } +\define@key{glossentry}{first}{% +\def\@glo@first{#1}% } % \end{macrocode} -%\end{macro} +%\end{key} % -% The required sectional unit is given by \cs{@@glossarysec} -% which was defined by the \pkgopt{section} package option. The -% starred form of the command is chosen. If you don't want any sectional -% command, you will need to redefine \cs{glossarysection}. -% The sectional unit can be changed, if different sectional units -% are required. -%\begin{macro}{\setglossarysection} -%\changes{1.1}{2008 Feb 22}{new} +%\begin{key}{firstplural} +% The \gloskey{firstplural} key is used to set the plural form for +% first use, in the event that the plural is required the first +% time the term is used. If omitted, it is constructed by +% appending \ics{glspluralsuffix} to the value of the \gloskey{first} key. % \begin{macrocode} -\newcommand*{\setglossarysection}[1]{% -\setkeys{glossaries.sty}{section=#1}} +\define@key{glossentry}{firstplural}{% +\def\@glo@firstplural{#1}% +} % \end{macrocode} -%\end{macro} +%\end{key} % -%The command \cs{@glossarysection} indicates how to start -% the glossary section if \ics{phantomsection} is not defined. -%\begin{macro}{\@glossarysection} -%\changes{1.1}{2008 Feb 22}{numbered sections and auto label added} +%\begin{key}{symbol} +% The \gloskey{symbol} key is ignored by most of the predefined +% glossary styles, and defaults to \cs{relax} if omitted. +% It is provided for glossary styles that require an associated +% symbol, as well as a name and description. To make this value +% appear in the glossary, you need to redefine +% \ics{glossaryentryfield} so that it uses its fourth parameter. +% If you want this value to appear in the text when the term is used +% by commands like \ics{gls}, you will need to change +% \ics{glsdisplay} and \ics{glsdisplayfirst} (either +% explicitly for all glossaries or via \ics{defglsdisplay} +% and \ics{defglsdisplayfirst} for individual glossaries). +% \begin{macrocode} +\define@key{glossentry}{symbol}{% +\def\@glo@symbol{#1}% +} +% \end{macrocode} +%\end{key} +%\begin{key}{symbolplural} +% \changes{1.12}{2008 Mar 8}{new} +% \begin{macrocode} +\define@key{glossentry}{symbolplural}{% +\def\@glo@symbolplural{#1}% +} +% \end{macrocode} +%\end{key} +% +%\begin{key}{type} +% The \gloskey{type} key specifies to which glossary this +% entry belongs. If omitted, the default glossary is used. % \begin{macrocode} -\newcommand*{\@glossarysection}[2]{% -\ifx\@@glossarysecstar\@empty - \csname\@@glossarysec\endcsname{#2}% -\else - \csname\@@glossarysec\endcsname*{#2}% - \@gls@toc{#1}{\@@glossarysec}% -\fi -\@@glossaryseclabel} +\define@key{glossentry}{type}{% +\def\@glo@type{#1}} % \end{macrocode} -%\end{macro} +%\end{key} % -% As \cs{@glossarysection}, but put in -% \ics{phantomsection}, and swap where \cs{@gls@toc} goes. -% If using chapters do a \cs{clearpage}. This ensures that -% the hyper link from the table of contents leads to the line above -% the heading, rather than the line below it. -%\begin{macro}{\@p@glossarysection} -%\changes{1.1}{2008 Feb 22}{numbered sections and auto label added} +%\begin{key}{counter} +% The \gloskey{counter} key specifies the name of the counter +% associated with this glossary entry: +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\newcommand*{\@p@glossarysection}[2]{% -\glsclearpage -\phantomsection -\ifx\@@glossarysecstar\@empty - \csname\@@glossarysec\endcsname{#2}% -\else - \@gls@toc{#1}{\@@glossarysec}% - \csname\@@glossarysec\endcsname*{#2}% -\fi -\@@glossaryseclabel} +\define@key{glossentry}{counter}{% + \ifcsundef{c@#1}% + {% + \PackageError{glossaries}% + {There is no counter called `#1'}% + {% + The counter key should have the name of a valid counter + as its value% + }% + }% + {% + \def\@glo@counter{#1}% + }% +} % \end{macrocode} -%\end{macro} +%\end{key} % -%The \cs{gls@doclearpage} command is used to issue a -% \cs{clearpage} (or \cs{cleardoublepage}) depending -% on whether the glossary sectional unit is a chapter. If the -% sectional unit is something else, do nothing. -%\begin{macro}{\gls@doclearpage} +%\begin{key}{see} +% The \gloskey{see} key specifies a list of cross-references +% \changes{1.17}{2008 December 26}{new} +% \changes{3.0}{2011/04/02}{added \cs{@glo@seeautonumberlist}} % \begin{macrocode} -\newcommand*{\gls@doclearpage}{% -\ifthenelse{\equal{\@@glossarysec}{chapter}}{% -\@ifundefined{cleardoublepage}{\clearpage}{\cleardoublepage}}{}% +\define@key{glossentry}{see}{% + \def\@glo@see{#1}% + \@glo@seeautonumberlist } % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsclearpage} -% This just calls \cs{gls@doclearpage}, but it makes it easier to -% have a user command so that the user can override it. -%\changes{1.19}{2009 Mar 2}{new} +%\end{key} +% +%\begin{key}{parent} +% The \gloskey{parent} key specifies the parent entry, if +% required. +% \changes{1.17}{2008 December 26}{new} % \begin{macrocode} -\newcommand*{\glsclearpage}{\gls@doclearpage} +\define@key{glossentry}{parent}{% +\def\@glo@parent{#1}} % \end{macrocode} -%\end{macro} +%\end{key} % -% The glossary is added to the table of contents if glstoc flag set. -% If it is set, \cs{@gls@toc} will add a line to the -% \filetype{.toc} file, otherwise it will do nothing. -% (The first argument to \cs{@gls@toc} is the title for the -% table of contents, the second argument is the sectioning type.) -%\begin{macro}{\@gls@toc} -%\changes{1.1}{2008 Feb 22}{numberline added} +%\begin{key}{nonumberlist} +% The \gloskey{nonumberlist} key suppresses or activates the number list +% for the given entry. +% \changes{1.17}{2008 December 26}{new} +%\changes{3.0}{2011/04/02}{now boolean} % \begin{macrocode} -\newcommand*{\@gls@toc}[2]{% -\ifglstoc - \ifglsnumberline - \addcontentsline{toc}{#2}{\numberline{}#1}% +\define@choicekey{glossentry}{nonumberlist}[\val\nr]{true,false}[true]{% + \ifcase\nr\relax + \def\@glo@prefix{\glsnonextpages}% \else - \addcontentsline{toc}{#2}{#1}% + \def\@glo@prefix{\glsnextpages}% \fi -\fi} +} % \end{macrocode} -%\end{macro} +%\end{key} % -%\subsection{Xindy} -% This section defines commands that only have an effect if -% \app{xindy} is used to sort the glossaries. -%\begin{macro}{\glsnoxindywarning} -% Issues a warning if \app{xindy} hasn't been specified. -% These warnings can be suppressed by redefining -% \cs{glsnoxindywarning} to ignore its argument +% Define some generic user keys. (6 ought to be enough!) +%\begin{key}{user1} % \begin{macrocode} -\newcommand*{\glsnoxindywarning}[1]{% - \GlossariesWarning{Not in xindy mode --- ignoring \string#1}% +\define@key{glossentry}{user1}{% + \def\@glo@useri{#1}% } % \end{macrocode} -%\end{macro} +%\end{key} % -%\begin{macro}{\@xdyattributes} -% Define list of attributes (\cs{string} is used in case -% the double quote character has been made active) -% \begin{macrocode} -\ifglsxindy - \edef\@xdyattributes{\string"default\string"}% -\fi -% \end{macrocode} -%\end{macro} -%\begin{macro}{\@xdylocref} -% Define list of markup location references. +%\begin{key}{user2} % \begin{macrocode} -\ifglsxindy - \def\@xdylocref{} -\fi +\define@key{glossentry}{user2}{% + \def\@glo@userii{#1}% +} % \end{macrocode} -%\end{macro} +%\end{key} % -%\begin{macro}{\GlsAddXdyAttribute} -% Adds an attribute. -% \begin{macrocode} -\ifglsxindy - \newcommand*\GlsAddXdyAttribute[1]{% - \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string"}% - \expandafter\toks@\expandafter{\@xdylocref}% - \edef\@xdylocref{\the\toks@ ^^J% - (markup-locref - :open \string"\string~n\string\setentrycounter - {\noexpand\glscounter}% - \expandafter\string\csname#1\endcsname - \expandafter\@gobble\string\{\string" ^^J - :close \string"\expandafter\@gobble\string\}\string" ^^J - :attr \string"#1\string")}} -% \end{macrocode} -% Only has an effect before \ics{writeist}: +%\begin{key}{user3} % \begin{macrocode} - \@onlypremakeg\GlsAddXdyAttribute -\else - \newcommand*\GlsAddXdyAttribute[1]{% - \glsnoxindywarning\GlsAddXdyAttribute} -\fi +\define@key{glossentry}{user3}{% + \def\@glo@useriii{#1}% +} % \end{macrocode} -%\end{macro} -% Add known attributes: +%\end{key} +% +%\begin{key}{user4} % \begin{macrocode} -\ifglsxindy - \GlsAddXdyAttribute{glsnumberformat} - \GlsAddXdyAttribute{textrm} - \GlsAddXdyAttribute{textsf} - \GlsAddXdyAttribute{texttt} - \GlsAddXdyAttribute{textbf} - \GlsAddXdyAttribute{textmd} - \GlsAddXdyAttribute{textit} - \GlsAddXdyAttribute{textup} - \GlsAddXdyAttribute{textsl} - \GlsAddXdyAttribute{textsc} - \GlsAddXdyAttribute{emph} - \GlsAddXdyAttribute{glshypernumber} - \GlsAddXdyAttribute{hyperrm} - \GlsAddXdyAttribute{hypersf} - \GlsAddXdyAttribute{hypertt} - \GlsAddXdyAttribute{hyperbf} - \GlsAddXdyAttribute{hypermd} - \GlsAddXdyAttribute{hyperit} - \GlsAddXdyAttribute{hyperup} - \GlsAddXdyAttribute{hypersl} - \GlsAddXdyAttribute{hypersc} - \GlsAddXdyAttribute{hyperemph} -\fi +\define@key{glossentry}{user4}{% + \def\@glo@useriv{#1}% +} % \end{macrocode} +%\end{key} % -%\begin{macro}{\@xdyuseralphabets} -% List of additional alphabets +%\begin{key}{user5} % \begin{macrocode} -\def\@xdyuseralphabets{} +\define@key{glossentry}{user5}{% + \def\@glo@userv{#1}% +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\GlsAddXdyAlphabet} -% \cs{GlsAddXdyAlphabet}\marg{name}\marg{definition} -% adds a new alphabet called \meta{name}. The definition -% must use \app{xindy} syntax. +%\end{key} +% +%\begin{key}{user6} % \begin{macrocode} -\ifglsxindy - \newcommand*{\GlsAddXdyAlphabet}[2]{% - \edef\@xdyuseralphabets{% - \@xdyuseralphabets ^^J - (define-alphabet "#1" (#2))}} -\else - \newcommand*{\GlsAddXdyAlphabet}[2]{% - \glsnoxindywarning\GlsAddXdyAlphabet} -\fi +\define@key{glossentry}{user6}{% + \def\@glo@uservi{#1}% +} % \end{macrocode} -%\end{macro} +%\end{key} % -%\begin{macro}{\@xdyuserlocationdefs} -% List of additional location definitions -% (separated by "^^J") +%\begin{key}{short} +%\changes{3.0}{2011/04/02}{new} +% This key is provided for use by \ics{newacronym}. It's not +% designed for general purpose use, so isn't described in the user +% manual. % \begin{macrocode} -\def\@xdyuserlocationdefs{} +\define@key{glossentry}{short}{% + \def\@glo@short{#1}% +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@xdyuserlocationnames} -% List of additional user location names +%\end{key} +% +%\begin{key}{shortplural} +%\changes{3.0}{2011/04/02}{new} +% This key is provided for use by \ics{newacronym}. % \begin{macrocode} -\def\@xdyuserlocationnames{} +\define@key{glossentry}{shortplural}{% + \def\@glo@shortpl{#1}% +} % \end{macrocode} -%\end{macro} +%\end{key} % -%\begin{macro}{\GlsAddXdyLocation} -% \cs{GlsAddXdyLocation}\marg{name}\marg{definition} -% Define a new location called \meta{name}. The definition -% must use \app{xindy} syntax. (Note that this doesn't -% check to see if the location is already defined. That is left -% to \app{xindy} to complain about.) +%\begin{key}{long} +%\changes{3.0}{2011/04/02}{new} +% This key is provided for use by \ics{newacronym}. % \begin{macrocode} -\ifglsxindy - \newcommand*{\GlsAddXdyLocation}[2]{% - \edef\@xdyuserlocationdefs{% - \@xdyuserlocationdefs ^^J% - (define-location-class \string"#1\string"^^J\space\space - \space(#2)) - }% - \edef\@xdyuserlocationnames{% - \@xdyuserlocationnames^^J\space\space\space - \string"#1\string"}% - } +\define@key{glossentry}{long}{% + \def\@glo@long{#1}% +} % \end{macrocode} -% Only has an effect before \ics{writeist}: +%\end{key} +% +%\begin{key}{longplural} +%\changes{3.0}{2011/04/02}{new} +% This key is provided for use by \ics{newacronym}. % \begin{macrocode} - \@onlypremakeg\GlsAddXdyLocation -\else - \newcommand*{\GlsAddXdyLocation}[2]{% - \glsnoxindywarning\GlsAddXdyLocation} -\fi +\define@key{glossentry}{longplural}{% + \def\@glo@longpl{#1}% +} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@xdylocationclassorder} -% Define location class order +%\end{key} +% +%\begin{macro}{\@glsnoname} +% \changes{1.17}{2008 December 26}{new} +% Define command to generate error if \gloskey{name} key is missing. % \begin{macrocode} -\ifglsxindy - \edef\@xdylocationclassorder{^^J\space\space\space - \string"roman-page-numbers\string"^^J\space\space\space - \string"arabic-page-numbers\string"^^J\space\space\space - \string"arabic-section-numbers\string"^^J\space\space\space - \string"alpha-page-numbers\string"^^J\space\space\space - \string"Roman-page-numbers\string"^^J\space\space\space - \string"Alpha-page-numbers\string"^^J\space\space\space - \string"Appendix-page-numbers\string" - \@xdyuserlocationnames^^J\space\space\space - \string"see\string" - } -\fi +\newcommand*{\@glsnoname}{% + \PackageError{glossaries}{name key required in + \string\newglossaryentry\space for entry `\@glo@label'}{You + haven't specified the entry name}} % \end{macrocode} %\end{macro} -% Change the location order. -%\begin{macro}{\GlsSetXdyLocationClassOrder} +%\begin{macro}{\@glsdefaultplural} +% Define command to set default plural. +% \changes{1.17}{2008 December 26}{new} % \begin{macrocode} -\ifglsxindy - \newcommand*\GlsSetXdyLocationClassOrder[1]{% - \def\@xdylocationclassorder{#1}} -\else - \newcommand*\GlsSetXdyLocationClassOrder[1]{% - \glsnoxindywarning\GlsSetXdyLocationClassOrder} -\fi +\newcommand*{\@glsdefaultplural}{\@glo@text\glspluralsuffix} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@xdysortrules} -% Define sort rules +%\begin{macro}{\@glsdefaultsort} +% Define command to set default sort. +% \changes{1.17}{2008 December 26}{new} % \begin{macrocode} -\ifglsxindy - \def\@xdysortrules{} -\fi +\newcommand*{\@glsdefaultsort}{\@glo@name} % \end{macrocode} %\end{macro} -%\begin{macro}{\GlsAddSortRule} -% Add a sort rule +% +%\begin{macro}{\gls@level} +% Register to increment entry levels. % \begin{macrocode} -\ifglsxindy - \newcommand*\GlsAddSortRule[2]{% - \expandafter\toks@\expandafter{\@xdysortrules}% - \protected@edef\@xdysortrules{\the\toks@ ^^J - (sort-rule \string"#1\string" \string"#2\string")}% - } -\else - \newcommand*\GlsAddSortRule[2]{% - \glsnoxindywarning\GlsAddSortRule} -\fi +\newcount\gls@level % \end{macrocode} %\end{macro} % -%\begin{macro}{\@xdyrequiredstyles} -% Define list of required styles (this should be a comma-separated -% list of \app{xindy} styles) +%\begin{macro}{\newglossaryentry} +% Define \cs{newglossaryentry}% +% \marg{label} \marg{key-val list}. +% There are two required fields in \meta{key-val list}: +% \gloskey{name} (or \gloskey{parent}) and +% \gloskey{description}. (See above.) +%\changes{3.0}{2011/04/02}{replaced \cs{DeclareRobustCommand} with +%\cs{newrobustcmd}} % \begin{macrocode} -\ifglsxindy - \def\@xdyrequiredstyles{tex} -\fi +\newrobustcmd{\newglossaryentry}[2]{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\GlsAddXdyStyle} -% Add a \app{xindy} style to the list of required styles +% Check to see if this glossary entry has already been defined: % \begin{macrocode} -\ifglsxindy - \newcommand*\GlsAddXdyStyle[1]{% - \edef\@xdyrequiredstyles{\@xdyrequiredstyles,#1}}% -\else - \newcommand*\GlsAddXdyStyle[1]{% - \glsnoxindywarning\GlsAddXdyStyle} -\fi +\glsdoifnoexists{#1}{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\GlsSetXdyStyles} -% Reset the list of required styles +% Store label % \begin{macrocode} -\ifglsxindy - \newcommand*\GlsSetXdyStyles[1]{% - \edef\@xdyrequiredstyles{#1}} -\else - \newcommand*\GlsSetXdyStyles[1]{% - \glsnoxindywarning\GlsSetXdyStyles} -\fi +\def\@glo@label{#1}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\findrootlanguage} -% The root language name is required by \app{xindy}. This -% information is for \app{makeglossaries} to pass to -% \app{xindy}. Since \ics{languagename} only stores the -% regional dialect rather than the root language name, some -% trickery is required to determine the root language. +% Set up defaults. If the \gloskey{name} or \gloskey{description} +% keys are omitted, an error will be generated. % \begin{macrocode} -\ifglsxindy - \@ifpackageloaded{babel}{% +\let\@glo@name\@glsnoname % \end{macrocode} -% Need to parse \texttt{babel.sty} to determine the root language. -% This code was provided by Enrico~Gregorio. +%\changes{1.08}{2007 Oct 13}{Fixed error message to say ``description +%key'' rather than ``desc key''} % \begin{macrocode} - \def\findrootlanguage{\begingroup - \escapechar=-1\relax +\def\@glo@desc{\PackageError{glossaries}{description key required in +\string\newglossaryentry\space for entry `\@glo@label'}{You haven't specified the entry description}}% % \end{macrocode} -% normalize \cs{languagename} to category 12 chars +% \changes{1.12}{2008 Mar 8}{descriptionplural support added} % \begin{macrocode} - \edef\languagename{% - \expandafter\string\csname\languagename\endcsname}% +\def\@glo@descplural{\@glo@desc}% % \end{macrocode} -% disable \texttt{babel.sty} useless commands % \begin{macrocode} - \def\NeedsTeXFormat##1[##2]{}% - \def\ProvidesPackage##1[##2]{}% - \let\LdfInit\relax - \def\languageattribute##1##2{}% +\def\@glo@type{\glsdefaulttype}% +\def\@glo@symbol{\relax}% % \end{macrocode} -% change the meaning of \cs{DeclareOption} +% \changes{1.12}{2008 Mar 8}{symbolplural support added} % \begin{macrocode} - \def\DeclareOption##1##2{% +\def\@glo@symbolplural{\@glo@symbol}% % \end{macrocode} -% at \cs{DeclareOption*} we end % \begin{macrocode} - \ifx##1*\expandafter\endinput\else +\def\@glo@text{\@glo@name}% % \end{macrocode} -% else we build a string with the first argument % \begin{macrocode} - \edef\testlanguage{\expandafter\string\csname##1\endcsname}% +\let\@glo@plural\@glsdefaultplural % \end{macrocode} -% if \cs{testlanguage} and \cs{languagename} are the same -% we execute the second argument +% \changes{1.13}{2008 May 10}{Changed default first value} +% Using \cs{let} instead of \cs{def} to make later comparison +% avoid expansion issues. (Thanks to Ulrich~Diez for suggesting +% this.) +% \changes{1.16}{2008 August 27}{Changed def to let} % \begin{macrocode} - \ifx\testlanguage\languagename##2\fi - \fi} +\let\@glo@first\relax % \end{macrocode} -% almost all options of babel are \cs{input}"{"\meta{name}".ldf}" +% \changes{1.12}{2008 Mar 8}{Changed default first plural to be first +% key with s appended (was text key with s appended)} +% \changes{1.13}{2008 May 10}{Changed default firstplural value} % \begin{macrocode} - \def\input##1{\stripldf##1}% +\let\@glo@firstplural\relax % \end{macrocode} -% we put the root language name in \ics{rootlanguagename} +% Set the default sort: +%\changes{1.05}{2007 Aug 10}{Changed the default value of the sort +% key to just the value of the name key}% +%\changes{1.18}{2009 January 14}{Changed default value of sort +% to '@glsdefaultsort} % \begin{macrocode} - \def\stripldf##1.ldf{\gdef\rootlanguagename{##1}}% +\let\@glo@sort\@glsdefaultsort % \end{macrocode} -% now input babel.sty, using the primitive \cs{input} +% Set the default counter: % \begin{macrocode} - \@@input babel.sty - \endgroup}% - }{% +\def\@glo@counter{\@gls@getcounter{\@glo@type}}% % \end{macrocode} -% \isty{babel} hasn't been loaded, so check if \isty{ngerman} has -% been loaded +%\changes{1.17}{2008 December 26}{added see key} % \begin{macrocode} - \@ifpackageloaded{ngerman}{% - \def\findrootlanguage{% - \def\rootlanguagename{german}}% - }{% +\def\@glo@see{}% % \end{macrocode} -% Neither \sty{babel} nor \sty{ngerman} have been loaded, so -% assume the root language is English +%\changes{1.17}{2008 December 26}{added parent key} % \begin{macrocode} - \def\findrootlanguage{% - \def\rootlanguagename{english}}% - }% - }% -\fi +\def\@glo@parent{}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\rootlanguagename} -% Set default root language to English. +%\changes{1.17}{2008 December 26}{added nonumberlist key} % \begin{macrocode} -\def\rootlanguagename{english} +\def\@glo@prefix{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@xdylanguage} -% The \app{xindy} language setting is required by -% \app{makeglossaries}, so provide a command for -% \app{makeglossaries} to pick up the information -% from the auxiliary file. This command is not needed by the -% \sty{glossaries} package, so define it to ignore its arguments. +%\changes{2.04}{2009 November 10}{added user1-6 keys} % \begin{macrocode} -\def\@xdylanguage#1#2{} +\def\@glo@useri{}% +\def\@glo@userii{}% +\def\@glo@useriii{}% +\def\@glo@useriv{}% +\def\@glo@userv{}% +\def\@glo@uservi{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsSetXdyLanguage} -% Define a command that allows the user to set the language -% for a given glossary type. The first argument indicates the -% glossary type. If omitted the main glossary is assumed. +%\changes{3.0}{2011/04/02}{added short and long keys} % \begin{macrocode} -\ifglsxindy - \newcommand*\GlsSetXdyLanguage[2][\glsdefaulttype]{% - \ifglossaryexists{#1}{% - \expandafter\def\csname @xdy@#1@language\endcsname{#2}% - }{% - \PackageError{glossaries}{Can't set language type for - glossary type `#1' --- no such glossary}{% - You have specified a glossary type that doesn't exist}}} -\else - \newcommand*\GlsSetXdyLanguage[2][]{% - \glsnoxindywarning\GlsSetXdyLanguage} -\fi +\def\@glo@short{}% +\def\@glo@shortpl{}% +\def\@glo@long{}% +\def\@glo@longpl{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@codepage} -% The \app{xindy} codepage setting is required by -% \app{makeglossaries}, so provide a command for -% \app{makeglossaries} to pick up the information -% from the auxiliary file. This command is not needed by the -% \sty{glossaries} package, so define it to ignore its arguments. +% Add start hook in case another package wants to add extra keys. % \begin{macrocode} -\def\@gls@codepage#1#2{} + \@newglossaryentryprehook % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsSetXdyCodePage} -% Define command to set the code page. +% Extract key-val information from third parameter: % \begin{macrocode} -\ifglsxindy - \newcommand*{\GlsSetXdyCodePage}[1]{% - \renewcommand*{\gls@codepage}{#1}% - } -\else - \newcommand*{\GlsSetXdyCodePage}[1]{% - \glsnoxindywarning\GlsSetXdyCodePage} -\fi +\setkeys{glossentry}{#2}% +% \end{macrocode} +% Check to see if this glossary type has been defined, if it has, +% add this label to the relevant list, otherwise generate an error. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} +% \begin{macrocode} +\ifcsundef{glolist@\@glo@type}% +{% + \PackageError{glossaries}% + {Glossary type '\@glo@type' has not been defined}% + {You need to define a new glossary type, before making entries + in it}% +}% +{% + \protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% + \expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% +}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@xdylettergroups} -% Store letter group definitions. +% Initialise level to 0. % \begin{macrocode} -\ifglsxindy - \ifgls@xindy@glsnumbers - \def\@xdylettergroups{(define-letter-group - \string"glsnumbers\string"^^J\space\space\space - :prefixes (\string"0\string" \string"1\string" - \string"2\string" \string"3\string" \string"4\string" - \string"5\string" \string"6\string" \string"7\string" - \string"8\string" \string"9\string")^^J\space\space\space - :before \string"\@glsfirstletter\string")} - \else - \def\@xdylettergroups{} - \fi -\fi -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsAddLetterGroup} -% Add a new letter group. The first argument is the name -% of the letter group. The second argument is the \app{xindy} -% code specifying prefixes and ordering. +\gls@level=0\relax +% \end{macrocode} +% Has this entry been assigned a parent? % \begin{macrocode} - \newcommand*\GlsAddLetterGroup[2]{% - \expandafter\toks@\expandafter{\@xdylettergroups}% - \protected@edef\@xdylettergroups{\the\toks@^^J% - (define-letter-group \string"#1\string"^^J\space\space\space#2)}% - }% +\ifx\@glo@parent\@empty % \end{macrocode} -%\end{macro} -% -%\subsection{Loops and conditionals} -%\begin{macro}{\forallglossaries} -% To iterate through all glossaries (or comma-separated list of -% glossary names given in optional argument) use:\\[10pt] -% \cs{forallglossaries}\oarg{glossary list}\marg{cmd}\marg{code}\\[10pt] -% where \meta{cmd} is -% a control sequence which will be set to the name of the -% glossary in the current iteration. -%\changes{2.01}{2009 May 30}{replaced \cs{ifthenelse} with \cs{ifx}} +% Doesn't have a parent. Set \cs{glo@}\meta{label}"@parent" to +% empty. % \begin{macrocode} -\newcommand*{\forallglossaries}[3][\@glo@types]{% - \@for#2:=#1\do{\ifx#2\@empty\else#3\fi}% -} + \expandafter\gdef\csname glo@#1@parent\endcsname{}% +\else % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\forglsentries} -% To iterate through all entries in a given glossary use:\\[10pt] -%\cs{forglsentries}\oarg{type}\marg{cmd}\marg{code}\\[10pt] -%where \meta{type} is the glossary label and \meta{cmd} is a -% control sequence which will be set to the entry label in the -% current iteration. -%\changes{2.01}{2009 May 30}{replaced \cs{ifthenelse} with \cs{ifx}} +% Has a parent. Check to ensure this entry isn't its own parent. % \begin{macrocode} -\newcommand*{\forglsentries}[3][\glsdefaulttype]{% - \edef\@@glo@list{\csname glolist@#1\endcsname}% - \@for#2:=\@@glo@list\do{\ifx#2\@empty\else#3\fi}% -} + \ifthenelse{\equal{#1}{\@glo@parent}}{% + \PackageError{glossaries}{Entry `#1' can't be its own parent}{}% + \def\@glo@parent{}% + \expandafter\gdef\csname glo@#1@parent\endcsname{}% + }{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\forallglsentries} -% To iterate through all glossary entries over all glossaries listed -% in the optional argument (the default is all glossaries) use:\\[10pt] -% \cs{forallglsentries}\oarg{glossary list}\marg{cmd}\marg{code}\\[10pt] -% Within \cs{forallglsentries}, the current glossary type -% is given by \cs{@@this@glo@}. +% Check the parent exists: % \begin{macrocode} -\newcommand*{\forallglsentries}[3][\@glo@types]{% -\expandafter\forallglossaries\expandafter[#1]{\@@this@glo@}{% -\forglsentries[\@@this@glo@]{#2}{#3}}} + \ifglsentryexists{\@glo@parent}{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\ifglossaryexists} -% To check to see if a glossary exists use:\\[10pt] -%\cs{ifglossaryexists}\marg{type}\marg{true-text}\marg{false-text}\\[10pt] -%where \meta{type} is the glossary's label. +% Parent exists. Set \cs{glo@}\meta{label}"@parent". % \begin{macrocode} -\newcommand{\ifglossaryexists}[3]{% - \@ifundefined{@glotype@#1@out}{#3}{#2}% -} + \expandafter\xdef\csname glo@#1@parent\endcsname{\@glo@parent}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\ifglsentryexists} -% To check to see if a glossary entry has been defined use:\\[10pt] -% \cs{ifglsentryexists}\marg{label}\marg{true text}\marg{false text}\\[10pt] -%where \meta{label} is the entry's label. +% Determine level. % \begin{macrocode} -\newcommand{\ifglsentryexists}[3]{% -\@ifundefined{glo@#1@name}{#3}{#2}} + \gls@level=\csname glo@\@glo@parent @level\endcsname\relax + \advance\gls@level by 1\relax % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\ifglsused} -% To determine if given glossary entry has been -% used in the document text yet use:\\[10pt] -% \cs{ifglsused}\marg{label}\marg{true text}\marg{false text}\\[10pt] -% where \meta{label} is the entry's label. -% If true it will do \meta{true text} -% otherwise it will do \meta{false text}. +% If name hasn't been specified, use same as the parent name % \begin{macrocode} -\newcommand*{\ifglsused}[3]{\ifthenelse{\boolean{glo@#1@flag}}{#2}{#3}} + \ifx\@glo@name\@glsnoname + \expandafter\let\expandafter\@glo@name + \csname glo@\@glo@parent @name\endcsname % \end{macrocode} -%\end{macro} -%The following two commands will cause an error if the given -% condition fails: -% -%\begin{macro}{\glsdoifexists} -%\cs{glsdoifexists}\marg{label}\marg{code}\par -% Generate an error if entry specified by \meta{label} doesn't -% exists, otherwise do \meta{code}. +% If name and plural haven't been specified, use same as the parent % \begin{macrocode} -\newcommand{\glsdoifexists}[2]{% - \ifglsentryexists{#1}{#2}{% - \PackageError{glossaries}{Glossary entry `#1' has not been - defined}{You need to define a glossary entry before you - can use it.}}% -} + \ifx\@glo@plural\@glsdefaultplural + \expandafter\let\expandafter\@glo@plural + \csname glo@\@glo@parent @plural\endcsname + \fi + \fi + }{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsdoifnoexists} -%\cs{glsdoifnoexists}\marg{label}\marg{code}\par -% The opposite: only do second argument if the entry doesn't -% exists. Generate an error message if it exists. +% Parent doesn't exist, so issue an error message and change this +% entry to have no parent % \begin{macrocode} -\newcommand{\glsdoifnoexists}[2]{% - \ifglsentryexists{#1}{% - \PackageError{glossaries}{Glossary entry `#1' has already - been defined}{}}{#2}% -} + \PackageError{glossaries}{Invalid parent `\@glo@parent' + for entry `#1' - parent doesn't exist}{Parent entries + must be defined before their children}% + \def\@glo@parent{}% + \expandafter\gdef\csname glo@#1@parent\endcsname{}% + }% + }% +\fi % \end{macrocode} -%\end{macro} -% -%\subsection{Defining new glossaries}\label{sec:newglos} -% A comma-separated list of glossary names is stored -% in \cs{@glo@types}. When a new glossary type -% is created, its identifying name is added to this list. -% This is used by commands that iterate through all glossaries -% (such as \ics{makeglossaries} and \ics{printglossaries}). -%\begin{macro}{\@glo@types} +% Set the level for this entry % \begin{macrocode} -\newcommand*{\@glo@types}{,} +\expandafter\xdef\csname glo@#1@level\endcsname{\number\gls@level}% % \end{macrocode} -%\end{macro} -% -% A new glossary type is defined using \cs{newglossary}. -% Syntax:\\[10pt]\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}% -%\marg{title}\oarg{counter}\\[10pt]% -% where \meta{log-ext} is the extension of the \app{makeindex} -% transcript file, \meta{in-ext} is the extension of the glossary -% input file (read in by \ics{printglossary} and created by -% \app{makeindex}), \meta{out-ext} is the extension of the -% glossary output file which is read in by \app{makeindex} -% (lines are written to this file by the \ics{glossary} command), -% \meta{title} is the title of the glossary that is used in -% \ics{glossarysection} and -% \meta{counter} is the default counter to be used by entries -% belonging to this glossary. The \app{makeglossaries} Perl -% script reads in the relevant extensions from the auxiliary file, -% and passes the appropriate file names and switches to -% \app{makeindex}. -%\begin{macro}{\newglossary} +% Check if \gloskey{first} and \gloskey{firstplural} have been use. +% If \gloskey{firstplural} hasn't been specified, but \gloskey{first} +% has been specified, then form \gloskey{firstplural} by appending +% \cs{glspluralsuffix} to value of \gloskey{first} key, otherwise +% obtain the value from the \gloskey{plural} key. +% \changes{1.16}{2008 August 27}{Changed if to ifx} +% This now uses \cs{ifx} instead of \cs{if} to avoid expansion +% issues. (Thanks to Ulrich~Diez for suggesting this.) % \begin{macrocode} -\newcommand*{\newglossary}[5][glg]{% -\ifglossaryexists{#2}{% - \PackageError{glossaries}{Glossary type `#2' already exists}{% - You can't define a new glossary called `#2' because it already - exists}% -}{% +\ifx\relax\@glo@firstplural + \ifx\relax\@glo@first + \def\@glo@firstplural{\@glo@plural}% + \def\@glo@first{\@glo@text}% + \else + \def\@glo@firstplural{\@glo@first\glspluralsuffix}% + \fi +\else + \ifx\relax\@glo@first + \def\@glo@first{\@glo@text}% + \fi +\fi % \end{macrocode} -% Check if default has been set +% Define commands associated with this entry: +% \begin{macrocode} +\expandafter + \protected@xdef\csname glo@#1@text\endcsname{\@glo@text}% +\expandafter + \protected@xdef\csname glo@#1@plural\endcsname{\@glo@plural}% +\expandafter + \protected@xdef\csname glo@#1@first\endcsname{\@glo@first}% +\expandafter + \protected@xdef\csname glo@#1@firstpl\endcsname{\@glo@firstplural}% +\expandafter + \protected@xdef\csname glo@#1@type\endcsname{\@glo@type}% +\expandafter + \protected@xdef\csname glo@#1@counter\endcsname{\@glo@counter}% +\expandafter + \protected@xdef\csname glo@#1@useri\endcsname{\@glo@useri}% +\expandafter + \protected@xdef\csname glo@#1@userii\endcsname{\@glo@userii}% +\expandafter + \protected@xdef\csname glo@#1@useriii\endcsname{\@glo@useriii}% +\expandafter + \protected@xdef\csname glo@#1@useriv\endcsname{\@glo@useriv}% +\expandafter + \protected@xdef\csname glo@#1@userv\endcsname{\@glo@userv}% +\expandafter + \protected@xdef\csname glo@#1@uservi\endcsname{\@glo@uservi}% +\expandafter + \protected@xdef\csname glo@#1@short\endcsname{\@glo@short}% +\expandafter + \protected@xdef\csname glo@#1@shortpl\endcsname{\@glo@shortpl}% +\expandafter + \protected@xdef\csname glo@#1@long\endcsname{\@glo@long}% +\expandafter + \protected@xdef\csname glo@#1@longpl\endcsname{\@glo@longpl}% +\@gls@sanitizename +\expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}% +% \end{macrocode} +% The smaller and smallcaps options set the description to +% \cs{@glo@first}. Need to check for this, otherwise it won't get +% expanded if the description gets sanitized. +%\changes{1.15}{2008 August 15}{check for '@glo@first in description}% % \begin{macrocode} - \ifx\glsdefaulttype\relax - \gdef\glsdefaulttype{#2}% - \fi +\def\@glo@@desc{\@glo@first}% +\ifx\@glo@desc\@glo@@desc + \let\@glo@desc\@glo@first +\fi +\@gls@sanitizedesc +\expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}% +\expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}% % \end{macrocode} -% Add this to the list of glossary types: +%\changes{1.18}{2009 January 14}{moved sort sanitization to +% 'newglossaryentry} +%\changes{3.0}{2011/04/02}{added \cs{@gls@defsort}} +% Set the sort key for this entry: % \begin{macrocode} - \toks@{#2}\edef\@glo@types{\@glo@types\the\toks@,}% +\@gls@defsort{\@glo@type}{#1}% % \end{macrocode} -% Define a comma-separated list of labels for this glossary type, -% so that all the entries for this glossary can be reset with a -% single command. When a new entry is created, its label is added -% to this list. +%\changes{1.15}{2008 August 15}{check for '@glo@text in symbol}% % \begin{macrocode} - \expandafter\gdef\csname glolist@#2\endcsname{,}% +\def\@glo@@symbol{\@glo@text}% +\ifx\@glo@symbol\@glo@@symbol + \let\@glo@symbol\@glo@text +\fi +\@gls@sanitizesymbol +\expandafter\protected@xdef\csname glo@#1@symbol\endcsname{\@glo@symbol}% +\expandafter\protected@xdef\csname glo@#1@symbolplural\endcsname{\@glo@symbolplural}% % \end{macrocode} -% Store details of this new glossary type: +% Define an associated boolean variable to determine whether this +% entry has been used yet (needs to be defined globally): % \begin{macrocode} - \expandafter\def\csname @glotype@#2@in\endcsname{#3}% - \expandafter\def\csname @glotype@#2@out\endcsname{#4}% - \expandafter\def\csname @glotype@#2@title\endcsname{#5}% - \protected@write\@auxout{}{\string\@newglossary{#2}{#1}{#3}{#4}}% +\expandafter\gdef\csname glo@#1@flagfalse\endcsname{% +\expandafter\global\expandafter +\let\csname ifglo@#1@flag\endcsname\iffalse}% +\expandafter\gdef\csname glo@#1@flagtrue\endcsname{% +\expandafter\global\expandafter +\let\csname ifglo@#1@flag\endcsname\iftrue}% +\csname glo@#1@flagfalse\endcsname % \end{macrocode} -% How to display this entry in the document text (uses -% \cs{glsdisplay} and \cs{glsdisplayfirst} by -% default). These can be redefined by the user later if required -% (see \ics{defglsdisplay} and \ics{defglsdisplayfirst}). These -% may already have been defined if this has been specified as -% a list of acronyms. -%\changes{2.04}{2009 November 10}{added check to determine if -% \cs{gls@\meta{type}@display} and \cs{gls@\meta{type}@displayfirst} -% have been defined.} +% Sort out any cross-referencing if required. % \begin{macrocode} - \@ifundefined{gls@#2@display}{% - \expandafter\gdef\csname gls@#2@display\endcsname{% - \glsdisplay}}{}% - \@ifundefined{gls@#2@displayfirst}{% - \expandafter\gdef\csname gls@#2@displayfirst\endcsname{% - \glsdisplayfirst}}{}% +\ifx\@glo@see\@empty +\else + \protected@edef\@do@glssee{% + \noexpand\@gls@fixbraces\noexpand\@glo@list\@glo@see + \noexpand\@nil + \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{#1}}% + \@do@glssee +\fi +}% % \end{macrocode} -% Find out if the final optional argument has been specified, and -% use it to set the counter associated with this glossary. (Uses -% \ics{glscounter} if no optional argument is present.) +% Determine and store main part of the entry's index format. +%\changes{1.17}{2008 December 26}{Stored main part of entry +% format when entry +% is defined}% % \begin{macrocode} - \@ifnextchar[{\@gls@setcounter{#2}}% - {\@gls@setcounter{#2}[\glscounter]}}} + \do@glo@storeentry{#1}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\altnewglossary} -%\changes{2.06}{2010 June 14}{new} +% Add end hook in case another package wants to add extra keys. % \begin{macrocode} -\newcommand*{\altnewglossary}[3]{% - \newglossary[#2-glg]{#1}{#2-gls}{#2-glo}{#3}% + \@newglossaryentryposthook } % \end{macrocode} +%\changes{1.13}{2008 May 10}{Removed restriction on only using +% 'newglossaryentry in the preamble} %\end{macro} -% Only define new glossaries in the preamble: -% \begin{macrocode} -\@onlypreamble{\newglossary} -% \end{macrocode} -% Only define new glossaries before \ics{makeglossaries} +%\begin{macro}{\@newglossaryentryprehook} +% Allow extra information to be added to glossary entries: +%\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\@onlypremakeg\newglossary +\newcommand*{\@newglossaryentryprehook}{} % \end{macrocode} -%\cs{@newglossary} is used to specify the file extensions -% for the \app{makeindex} input, output and transcript files. -% It is written to the auxiliary file by \ics{newglossary}. -% Since it is not used by \LaTeX, \cs{@newglossary} simply -% ignores its arguments. -%\begin{macro}{\@newglossary} +%\end{macro} +%\begin{macro}{\@newglossaryentryposthook} +% Allow extra information to be added to glossary entries: +%\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\newcommand*{\@newglossary}[4]{} +\newcommand*{\@newglossaryentryposthook}{} % \end{macrocode} %\end{macro} -% Store counter to be used for given glossary type (the first -% argument is the glossary label, the second argument is the name -% of the counter): -%\begin{macro}{\@gls@setcounter} +%\begin{macro}{\@glossaryentryfield} +% Indicate what command should be used to display each entry in +% the glossary. (This enables the \sty{glossaries-accsupp} package +% to use \cs{accsuppglossaryentryfield} instead.) +%\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\def\@gls@setcounter#1[#2]{% -\expandafter\def\csname @glotype@#1@counter\endcsname{#2}% -} +\ifglsxindy + \newcommand*{\@glossaryentryfield}{\string\\glossaryentryfield} +\else + \newcommand*{\@glossaryentryfield}{\string\glossaryentryfield} +\fi % \end{macrocode} %\end{macro} -% Get counter associated with given glossary (the argument is -% the glossary label): -%\begin{macro}{\@gls@getcounter} +% +%\begin{macro}{\@glossarysubentryfield} +% Indicate what command should be used to display each subentry in +% the glossary. (This enables the \sty{glossaries-accsupp} package +% to use \cs{accsuppglossarysubentryfield} instead.) +%\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\newcommand*{\@gls@getcounter}[1]{% -\csname @glotype@#1@counter\endcsname} +\ifglsxindy + \newcommand*{\@glossarysubentryfield}{% + \string\\glossarysubentryfield} +\else + \newcommand*{\@glossarysubentryfield}{% + \string\glossarysubentryfield} +\fi % \end{macrocode} %\end{macro} % -% Define the main glossary. This will be the first glossary to -% be displayed when using \ics{printglossaries}. +%\begin{macro}{\@glo@storeentry} +%\changes{1.17}{2008 December 26}{new} +% Determine the format to write the entry in the glossary +% output (\filetype{.glo}) file. +% The argument is the entry's label. +% The result is stored in \cs{glo@}\meta{label}"@entry", where +% \meta{label} is the entry's label. (This doesn't include +% any formatting or location information.) % \begin{macrocode} -\glsdefmain +\newcommand{\@glo@storeentry}[1]{% % \end{macrocode} -% -%\subsection{Defining new entries}\label{sec:newentry} -% New glossary entries are defined using \cs{newglossaryentry}. -% This command requires a label and a key-value list that defines -% the relevant information for that entry. The definition for these -% keys follows. Note that the \gloskey{name}, -% \gloskey{description} and \gloskey{symbol} keys will be -% sanitized later, depending on the value of the package option -% \pkgopt{sanitize} (this means that if some of the keys haven't -% been defined, they can be constructed from the \gloskey{name} -% and \gloskey{description} key before they are sanitized). -% -% -%\begin{key}{name} -%The \gloskey{name} key indicates the name -% of the term being defined. This is how the term will appear in -% the glossary. The \gloskey{name} key is required when defining -% a new glossary entry. +% Get the sort string and escape any special characters % \begin{macrocode} -\define@key{glossentry}{name}{% -\def\@glo@name{#1}% -} +\protected@edef\@glo@sort{\csname glo@#1@sort\endcsname}% +\@gls@checkmkidxchars\@glo@sort % \end{macrocode} -%\end{key} -% -%\begin{key}{description} -% The \gloskey{description} key is usually only used in -% the glossary, but can be made to appear in the text by redefining -% \ics{glsdisplay} and \ics{glsdisplayfirst} (or -% using \ics{defglsdisplay} and \ics{defglsdisplayfirst}), however, -% you will have to disable the sanitize option (using the -% \pkgopt{sanitize} package option, -% "sanitize={description=false}", and protect fragile -% commands). The \gloskey{description} key is required when -% defining a new glossary entry. (Be careful not to make the -% description too long, because \app{makeindex} has a limited -% buffer. \cs{@glo@desc} is defined to be a short command -% to discourage lengthy descriptions -% for this reason. If you do have a very long description, or if -% you require paragraph breaks, define a separate command that -% contains the description, and use it as the value to the -% \gloskey{description} key.) +% Same again for the name string. % \begin{macrocode} -\define@key{glossentry}{description}{% -\def\@glo@desc{#1}% -} +\protected@edef\@@glo@name{\csname glo@#1@name\endcsname}% +\@gls@checkmkidxchars\@@glo@name % \end{macrocode} -%\end{key} -%\begin{key}{descriptionplural} -% \changes{1.12}{2008 Mar 8}{new} +% Add the font command. (The backslash needs to be escaped for +% \app{xindy}.) % \begin{macrocode} -\define@key{glossentry}{descriptionplural}{% -\def\@glo@descplural{#1}% -} +\ifglsxindy + \protected@edef\@glo@name{\string\\glsnamefont{\@@glo@name}}% +\else + \protected@edef\@glo@name{\string\glsnamefont{\@@glo@name}}% +\fi % \end{macrocode} -%\end{key} -% -%\begin{key}{sort} -% The \gloskey{sort} key needs to be sanitized here -% (the sort key is provided for \app{makeindex}'s benefit, -% not for use in the document). The \gloskey{sort} key is optional -% when defining a new glossary entry. If omitted, the value -% is given by \meta{name} \meta{description}. -%\changes{1.18}{2009 January 14}{moved sanitization to 'newglossaryentry} +% Get the description string and escape any special characters % \begin{macrocode} -\define@key{glossentry}{sort}{% -\def\@glo@sort{#1}} +\protected@edef\@glo@desc{\csname glo@#1@desc\endcsname}% +\@gls@checkmkidxchars\@glo@desc % \end{macrocode} -%\end{key} -% -%\begin{key}{text} -% The \gloskey{text} key determines how the term should appear when -% used in the document (i.e.\ outside of the glossary). If omitted, -% the value of the \gloskey{name} key is used instead. +% Same again for the symbol % \begin{macrocode} -\define@key{glossentry}{text}{% -\def\@glo@text{#1}% -} +\protected@edef\@glo@symbol{\csname glo@#1@symbol\endcsname}% +\@gls@checkmkidxchars\@glo@symbol +% \end{macrocode} +% Escape any special characters in the prefix +% \begin{macrocode} +\@gls@checkmkidxchars\@glo@prefix +% \end{macrocode} +% Get the parent, if one exists +% \begin{macrocode} +\edef\@glo@parent{\csname glo@#1@parent\endcsname}% +% \end{macrocode} +% Write the information to the glossary file. +% \begin{macrocode} +\ifglsxindy +% \end{macrocode} +% Store using \app{xindy} syntax. +% \begin{macrocode} + \ifx\@glo@parent\@empty +% \end{macrocode} +% Entry doesn't have a parent +% \begin{macrocode} + \expandafter\protected@xdef\csname glo@#1@index\endcsname{% + (\string"\@glo@sort\string" % + \string"\@glo@prefix\@glossaryentryfield{#1}{\@glo@name + }{\@glo@desc}{\@glo@symbol}\string") % + }% + \else % \end{macrocode} -%\end{key} -% -%\begin{key}{plural} -% The \gloskey{plural} key determines how the plural form of the term -% should be displayed in the document. If omitted, the plural is -% constructed by appending \ics{glspluralsuffix} to the value of the -% \gloskey{text} key. +% Entry has a parent % \begin{macrocode} -\define@key{glossentry}{plural}{% -\def\@glo@plural{#1}% -} + \expandafter\protected@xdef\csname glo@#1@index\endcsname{% + \csname glo@\@glo@parent @index\endcsname + (\string"\@glo@sort\string" % + \string"\@glo@prefix\@glossarysubentryfield% + {\csname glo@#1@level\endcsname}{#1}{\@glo@name + }{\@glo@desc}{\@glo@symbol}\string") % + }% + \fi +\else % \end{macrocode} -%\end{key} -% -%\begin{key}{first} -% The \gloskey{first} key determines how the entry should be displayed -% in the document when it is first used. If omitted, it is taken -% to be the same as the value of the \gloskey{text} key. +% Store using \app{makeindex} syntax. % \begin{macrocode} -\define@key{glossentry}{first}{% -\def\@glo@first{#1}% -} + \ifx\@glo@parent\@empty % \end{macrocode} -%\end{key} -% -%\begin{key}{firstplural} -% The \gloskey{firstplural} key is used to set the plural form for -% first use, in the event that the plural is required the first -% time the term is used. If omitted, it is constructed by -% appending \ics{glspluralsuffix} to the value of the \gloskey{first} key. +% Sanitize \cs{@glo@prefix} % \begin{macrocode} -\define@key{glossentry}{firstplural}{% -\def\@glo@firstplural{#1}% -} + \@onelevel@sanitize\@glo@prefix % \end{macrocode} -%\end{key} -% -%\begin{key}{symbol} -% The \gloskey{symbol} key is ignored by most of the predefined -% glossary styles, and defaults to \cs{relax} if omitted. -% It is provided for glossary styles that require an associated -% symbol, as well as a name and description. To make this value -% appear in the glossary, you need to redefine -% \ics{glossaryentryfield} so that it uses its fourth parameter. -% If you want this value to appear in the text when the term is used -% by commands like \ics{gls}, you will need to change -% \ics{glsdisplay} and \ics{glsdisplayfirst} (either -% explicitly for all glossaries or via \ics{defglsdisplay} -% and \ics{defglsdisplayfirst} for individual glossaries). +% Entry doesn't have a parent % \begin{macrocode} -\define@key{glossentry}{symbol}{% -\def\@glo@symbol{#1}% -} + \expandafter\protected@xdef\csname glo@#1@index\endcsname{% + \@glo@sort\@gls@actualchar\@glo@prefix + \@glossaryentryfield{#1}{\@glo@name}{\@glo@desc + }{\@glo@symbol}% + }% + \else % \end{macrocode} -%\end{key} -%\begin{key}{symbolplural} -% \changes{1.12}{2008 Mar 8}{new} +% Entry has a parent % \begin{macrocode} -\define@key{glossentry}{symbolplural}{% -\def\@glo@symbolplural{#1}% + \expandafter\protected@xdef\csname glo@#1@index\endcsname{% + \csname glo@\@glo@parent @index\endcsname\@gls@levelchar + \@glo@sort\@gls@actualchar\@glo@prefix + \@glossarysubentryfield + {\csname glo@#1@level\endcsname}{#1}{\@glo@name}{\@glo@desc + }{\@glo@symbol}% + }% + \fi +\fi } % \end{macrocode} -%\end{key} +%\end{macro} % -%\begin{key}{type} -% The \gloskey{type} key specifies to which glossary this -% entry belongs. If omitted, the default glossary is used. +%\subsection{Resetting and unsetting entry flags} +% Each glossary entry is assigned a conditional of the form +%\cs{ifglo@}\meta{label}\texttt{@flag} which determines +% whether or not the entry has been used (see also +% \ics{ifglsused} defined below). These flags can +% be set and unset using the following macros: +% +% The command \cs{glsreset}\marg{label} can be used +% to set the entry flag to indicate that it hasn't been used yet. The +% required argument is the entry label. +%\begin{macro}{\glsreset} % \begin{macrocode} -\define@key{glossentry}{type}{% -\def\@glo@type{#1}} +\newcommand*{\glsreset}[1]{% +\glsdoifexists{#1}{% +\expandafter\global\csname glo@#1@flagfalse\endcsname}} % \end{macrocode} -%\end{key} -% -%\begin{key}{counter} -% The \gloskey{counter} key specifies the name of the counter -% associated with this glossary entry: +%\end{macro} +% As above, but with only a local effect: +%\begin{macro}{\glslocalreset} % \begin{macrocode} -\define@key{glossentry}{counter}{% -\@ifundefined{c@#1}{\PackageError{glossaries}{There is no counter -called `#1'}{The counter key should have the name of a valid -counter as its value}}{% -\def\@glo@counter{#1}}} +\newcommand*{\glslocalreset}[1]{% +\glsdoifexists{#1}{% +\expandafter\let\csname ifglo@#1@flag\endcsname\iffalse}} % \end{macrocode} -%\end{key} -% -%\begin{key}{see} -% The \gloskey{see} key specifies a list of cross-references -% \changes{1.17}{2008 December 26}{new} +%\end{macro} +% The command \cs{glsunset}\marg{label} can be used to +% set the entry flag to indicate that it has been used. The required +% argument is the entry label. +%\begin{macro}{\glsunset} % \begin{macrocode} -\define@key{glossentry}{see}{% -\def\@glo@see{#1}} +\newcommand*{\glsunset}[1]{% +\glsdoifexists{#1}{% +\expandafter\global\csname glo@#1@flagtrue\endcsname}} % \end{macrocode} -%\end{key} -% -%\begin{key}{parent} -% The \gloskey{parent} key specifies the parent entry, if -% required. -% \changes{1.17}{2008 December 26}{new} +%\end{macro} +% As above, but with only a local effect: +%\begin{macro}{\glslocalunset} % \begin{macrocode} -\define@key{glossentry}{parent}{% -\def\@glo@parent{#1}} +\newcommand*{\glslocalunset}[1]{% +\glsdoifexists{#1}{% +\expandafter\let\csname ifglo@#1@flag\endcsname\iftrue}} % \end{macrocode} -%\end{key} -% -%\begin{key}{nonumberlist} -% The \gloskey{nonumberlist} key suppresses the number list -% for the given entry. -% \changes{1.17}{2008 December 26}{new} +%\end{macro} +% Reset all entries for the named glossaries (supplied in a +% comma-separated list). +% Syntax: \cs{glsresetall}\oarg{glossary-list} +%\begin{macro}{\glsresetall} % \begin{macrocode} -\define@key{glossentry}{nonumberlist}[none]{% -\def\@glo@prefix{\glsnonextpages}} +\newcommand*{\glsresetall}[1][\@glo@types]{% +\forallglsentries[#1]{\@glsentry}{% +\glsreset{\@glsentry}}} % \end{macrocode} -%\end{key} -% -% Define some generic user keys. (6 ought to be enough!) -%\begin{key}{user1} +%\end{macro} +% As above, but with only a local effect: +%\begin{macro}{\glslocalresetall} % \begin{macrocode} -\define@key{glossentry}{user1}{% - \def\@glo@useri{#1}% -} +\newcommand*{\glslocalresetall}[1][\@glo@types]{% +\forallglsentries[#1]{\@glsentry}{% +\glslocalreset{\@glsentry}}} % \end{macrocode} -%\end{key} -% -%\begin{key}{user2} +%\end{macro} +% Unset all entries for the named glossaries (supplied in a +% comma-separated list). +% Syntax: \cs{glsunsetall}\oarg{glossary-list} +%\begin{macro}{\glsunsetall} % \begin{macrocode} -\define@key{glossentry}{user2}{% - \def\@glo@userii{#1}% -} +\newcommand*{\glsunsetall}[1][\@glo@types]{% +\forallglsentries[#1]{\@glsentry}{% +\glsunset{\@glsentry}}} % \end{macrocode} -%\end{key} -% -%\begin{key}{user3} +%\end{macro} +% As above, but with only a local effect: +%\begin{macro}{\glslocalunsetall} % \begin{macrocode} -\define@key{glossentry}{user3}{% - \def\@glo@useriii{#1}% -} +\newcommand*{\glslocalunsetall}[1][\@glo@types]{% +\forallglsentries[#1]{\@glsentry}{% +\glslocalunset{\@glsentry}}} % \end{macrocode} -%\end{key} +%\end{macro} % -%\begin{key}{user4} +% \subsection{Loading files containing glossary entries} +%\label{sec:load} +% Glossary entries can be defined in an external file. +% These external files can contain \ics{newglossaryentry} +% and \ics{newacronym} commands.\footnote{and any other valid +%\LaTeX\ code that can be used in the preamble.}\\[10pt] +% \cs{loadglsentries}\oarg{type}\marg{filename}\\[10pt] +% This command will input the file using \cs{input}. +% The optional argument specifies to which glossary the +% entries should be assigned if they haven't used the \gloskey{type} +% key. If the optional argument is not specified, the default +% glossary is used. Only those entries used in the document (via +% \ics{glslink}, \ics{gls}, \ics{glspl} and uppercase +% variants or \ics{glsadd} and \ics{glsaddall} +% will appear in the glossary). The mandatory argument is +% the filename (with or without .tex extension). +%\begin{macro}{\loadglsentries} % \begin{macrocode} -\define@key{glossentry}{user4}{% - \def\@glo@useriv{#1}% -} +\newcommand*{\loadglsentries}[2][\@gls@default]{% +\let\@gls@default\glsdefaulttype +\def\glsdefaulttype{#1}\input{#2}% +\let\glsdefaulttype\@gls@default} % \end{macrocode} -%\end{key} -% -%\begin{key}{user5} +%\end{macro} +% \cs{loadglsentries} can only be used in the preamble: % \begin{macrocode} -\define@key{glossentry}{user5}{% - \def\@glo@userv{#1}% -} +\@onlypreamble{\loadglsentries} % \end{macrocode} -%\end{key} % -%\begin{key}{user6} -% \begin{macrocode} -\define@key{glossentry}{user6}{% - \def\@glo@uservi{#1}% -} +%\subsection{Using glossary entries in the text} +%\label{sec:code:glslink} +% +% Any term that has been defined using \ics{newglossaryentry} +% (or \ics{newacronym}) can be displayed in the text +% (i.e.\ outside of the glossary) using +% one of the commands defined in this section. Unless you use +% \ics{glslink}, the way the term appears in the text is +% determined by \ics{glsdisplayfirst} (if it is the first +% time the term has been used) or \ics{glsdisplay} (for +% subsequent use). Any formatting commands (such as \cs{textbf} +% is governed by \ics{glstextformat}. By default this just +% displays the \term{link text} ``as is''. +%\changes{1.04}{2007 Aug 3}{Added 'glstextformat}% +%\begin{macro}{\glstextformat} +% \begin{macrocode} +\newcommand*{\glstextformat}[1]{#1} % \end{macrocode} -%\end{key} +%\end{macro} % -%\begin{macro}{\@glsnoname} -% \changes{1.17}{2008 December 26}{new} -% Define command to generate error if \gloskey{name} key is missing. +% The first time an entry is used, the way in which it is +% displayed is governed by \cs{glsdisplayfirst}. This +% takes four parameters: \verb|#1| will be the value +% of the entry's \gloskey{first} or \gloskey{firstplural} key, +% \verb|#2| will be the value of the entry's \gloskey{description} +% key, \verb|#3| will be the value of the entry's \gloskey{symbol} +% key and \verb|#4| is additional text supplied by the final optional +% argument to commands like \ics{gls} and \ics{glspl}. +% The default is to display the first parameter followed by the +% additional text. +%\begin{macro}{\glsdisplayfirst} % \begin{macrocode} -\newcommand*{\@glsnoname}{% - \PackageError{glossaries}{name key required in - \string\newglossaryentry\space for entry `\@glo@label'}{You - haven't specified the entry name}} +\newcommand*{\glsdisplayfirst}[4]{#1#4} % \end{macrocode} %\end{macro} -%\begin{macro}{\@glsdefaultplural} -% Define command to set default plural. -% \changes{1.17}{2008 December 26}{new} +% +% After the first use, the entry is displayed according to +% the format of \cs{glsdisplay}. Again, it takes four +% parameters: \verb|#1| will be the value of the +% entry's \gloskey{text} or \gloskey{plural} key, +% \verb|#2| will be the value of the entry's \gloskey{description} +% key, \verb|#3| will be the value of the entry's \gloskey{symbol} +% key and \verb|#4| is additional text supplied by the final optional +% argument to commands like \ics{gls} and \ics{glspl}. +%\begin{macro}{\glsdisplay} % \begin{macrocode} -\newcommand*{\@glsdefaultplural}{\@glo@text\glspluralsuffix} +\newcommand*{\glsdisplay}[4]{#1#4} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsdefaultsort} -% Define command to set default sort. -% \changes{1.17}{2008 December 26}{new} +% When a new glossary is created it uses \cs{glsdisplayfirst} +% and \cs{glsdisplay} as the default way of displaying its +% entry in the text. This can be changed for the entries belonging +% to an individual glossary using +% \ics{defglsdisplay} and \ics{defglsdisplayfirst}. +%\\[10pt] +% \cs{defglsdisplay}\oarg{type}\marg{definition}\\[10pt]% +% The glossary type is given by \meta{type} (the default glossary +% if omitted) and +% \meta{definition} should have at most \verb|#1|, \verb|#2|, +% \verb|#3| and \verb|#4|. These represent the same arguments +% as those described for \ics{glsdisplay}. +%\begin{macro}{\defglsdisplay} % \begin{macrocode} -\newcommand*{\@glsdefaultsort}{\@glo@name} +\newcommand*{\defglsdisplay}[2][\glsdefaulttype]{% +\expandafter\def\csname gls@#1@display\endcsname##1##2##3##4{#2}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\gls@level} -% Register to increment entry levels. +%\vskip5pt +% \cs{defglsdisplayfirst}\oarg{type}\marg{definition}\\[10pt]% +% The glossary type is given by \meta{type} (the default glossary +% if omitted) and +% \meta{definition} should have at most \verb|#1|, \verb|#2|, +% \verb|#3| and \verb|#4|. These represent the same arguments +% as those described for \ics{glsdisplayfirst}. +%\begin{macro}{\defglsdisplayfirst} % \begin{macrocode} -\newcount\gls@level +\newcommand*{\defglsdisplayfirst}[2][\glsdefaulttype]{% +\expandafter\def\csname gls@#1@displayfirst\endcsname##1##2##3##4{#2}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\newglossaryentry} -% Define \cs{newglossaryentry}% -% \marg{label} \marg{key-val list}. -% There are two required fields in \meta{key-val list}: -% \gloskey{name} (or \gloskey{parent}) and -% \gloskey{description}. (See above.) +%\subsubsection{Links to glossary entries} +% The links to glossary entries all have a first optional +% argument that can be used to change the format and counter +% of the associated entry number. Except for \cs{glslink}, +% the commands like \cs{gls} have a final optional +% argument that can be used to insert additional text in the +% link (this will usually be appended, but can be redefined using +% \ics{defglsdisplay} and \ics{defglsdisplayfirst}). +% It goes against the \LaTeX\ norm to have an optional +% argument after the mandatory arguments, but it makes more +% sense to write, say, \verb|\gls{label}['s]| rather than, say, +% \verb|\gls[append='s]{label}|. Since these control sequences +% are defined to include the final square bracket, spaces +% will be ignored after them. This is likely to lead to +% confusion as most users would not expect, say, "\gls{"\meta{label}"}" +% to ignore following spaces, so \cs{new@ifnextchar} from the +% \isty{amsgen} package is required. +% +% The following keys can be used in the first optional +% argument. The \gloskey[glslink]{counter} key checks that the +% value is the name of a valid counter. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\DeclareRobustCommand{\newglossaryentry}[2]{% +\define@key{glslink}{counter}{% + \ifcsundef{c@#1}% + {% + \PackageError{glossaries}% + {There is no counter called `#1'}% + {% + The counter key should have the name of a valid counter + as its value% + }% + }% + {% + \def\@gls@counter{#1}% + }% +} % \end{macrocode} -% Check to see if this glossary entry has already been defined: +% The value of the \gloskey[glslink]{format} key should be the name of a +% command (without the initial backslash) that has a single mandatory +% argument which can be used to format the associated entry +% number. % \begin{macrocode} -\glsdoifnoexists{#1}{% +\define@key{glslink}{format}{% +\def\@glsnumberformat{#1}} % \end{macrocode} -% Store label +% The \gloskey[glslink]{hyper} key is a boolean key, it can either have the +% value true or false, and indicates whether or not to make a +% hyperlink to the relevant glossary entry. If hyper is false, an +% entry will still be made in the glossary, but the given text +% won't be a hyperlink. % \begin{macrocode} -\def\@glo@label{#1}% +\define@boolkey{glslink}{hyper}[true]{} % \end{macrocode} -% Set up defaults. If the \gloskey{name} or \gloskey{description} -% keys are omitted, an error will be generated. +% +%Syntax:\\[10pt] +% \cs{glslink}\oarg{options}\marg{label}\marg{text} +%\\[10pt] +% Display \meta{text} in the document, and add the entry information +% for \meta{label} into the relevant glossary. The optional +% argument should be a key value list using the \texttt{glslink} +% keys defined above. +% +% There is also a starred version:\\[10pt] +% \cs{glslink*}\oarg{options}\marg{label}\marg{text}\\[10pt] +% which is equivalent to +% \cs{glslink}"[hyper=false,"\meta{options}"]"\marg{label}\marg{text} +% +% First determine whether or not we are using the starred version: +%\begin{macro}{\glslink} % \begin{macrocode} -\let\@glo@name\@glsnoname +\newcommand{\glslink}{% +\@ifstar\@sgls@link\@gls@@link} % \end{macrocode} -%\changes{1.08}{2007 Oct 13}{Fixed error message to say ``description -%key'' rather than ``desc key''} +%\end{macro} +%\begin{macro}{\@sgls@link} +% The starred version of \cs{glslink} calls the unstarred version +% with hyperlinks disabled. % \begin{macrocode} -\def\@glo@desc{\PackageError{glossaries}{description key required in -\string\newglossaryentry\space for entry `\@glo@label'}{You haven't specified the entry description}}% +\newcommand*{\@sgls@link}[1][]{\@gls@@link[hyper=false,#1]} % \end{macrocode} -% \changes{1.12}{2008 Mar 8}{descriptionplural support added} +%\end{macro} +%\begin{macro}{\@gls@@link} +%\changes{2.03}{2009 Sep 23}{new} +% The unstarred version of \cs{glslink} checks for the existance +% of the term. The main part of the business is in \cs{@gls@link} +% which shouldn't check if the term is defined as it's called by +% \cs{gls} etc which also perform that check. % \begin{macrocode} -\def\@glo@descplural{\@glo@desc}% +\newcommand*{\@gls@@link}[3][]{% + \ifglsentryexists{#2}% + {% + \@gls@link[#1]{#2}{#3}% + }{% + \PackageError{glossaries}{Glossary entry `#2' has not been + defined}{You need to define a glossary entry before you + can use it.}% % \end{macrocode} +% Display the specified text. (The entry doesn't exist so +% there's nothing to link it to.) % \begin{macrocode} -\def\@glo@type{\glsdefaulttype}% -\def\@glo@symbol{\relax}% + \glstextformat{#3}% + }% +} % \end{macrocode} -% \changes{1.12}{2008 Mar 8}{symbolplural support added} +%\end{macro} +%\begin{macro}{\@gls@link} +%\changes{1.07}{2007 Sep 13}{fixed bug caused by \cs{theglsentrycounter} setting the page number too soon} +%\changes{1.15}{2008 August 15}{added 'glslabel} % \begin{macrocode} -\def\@glo@symbolplural{\@glo@symbol}% +\def\@gls@link[#1]#2#3{% % \end{macrocode} +%\changes{2.03}{2009 Sep 23}{Moved entry existence check to +% avoid } +%\changes{2.03}{2009 Sep 23}{added \cs{leavevmode}} +% Inserting \cs{leavevmode} suggested by Donald~Arseneau (avoids +% problem with tabularx). % \begin{macrocode} -\def\@glo@text{\@glo@name}% + \leavevmode + \def\glslabel{#2}% + \def\@glsnumberformat{glsnumberformat}% + \edef\@gls@counter{\csname glo@#2@counter\endcsname}% + \KV@glslink@hypertrue + \setkeys{glslink}{#1}% % \end{macrocode} +% Store the entry's counter in \cs{theglsentrycounter} +%\changes{3.0}{2011/04/02}{added \cs{@gls@saveentrycounter}} % \begin{macrocode} -\let\@glo@plural\@glsdefaultplural + \@gls@saveentrycounter % \end{macrocode} -% \changes{1.13}{2008 May 10}{Changed default first value} -% Using \cs{let} instead of \cs{def} to make later comparison -% avoid expansion issues. (Thanks to Ulrich~Diez for suggesting -% this.) -% \changes{1.16}{2008 August 27}{Changed def to let} +%\changes{3.0}{2011/04/02}{added \cs{@gls@setsort}} +% Define sort key if necessary: % \begin{macrocode} -\let\@glo@first\relax + \@gls@setsort{#2}% % \end{macrocode} -% \changes{1.12}{2008 Mar 8}{Changed default first plural to be first -% key with s appended (was text key with s appended)} -% \changes{1.13}{2008 May 10}{Changed default firstplural value} +%\changes{2.01}{2009 May 30}{moved \cs{@do@wrglossary} before term is displayed +% to prevent unwanted whatsit} % \begin{macrocode} -\let\@glo@firstplural\relax + \@do@wrglossary{#2}% + \ifKV@glslink@hyper + \@glslink{glo:#2}{\glstextformat{#3}}% + \else + \glstextformat{#3}\relax + \fi +} % \end{macrocode} -% Set the default sort: -%\changes{1.05}{2007 Aug 10}{Changed the default value of the sort -% key to just the value of the name key}% -%\changes{1.18}{2009 January 14}{Changed default value of sort -% to '@glsdefaultsort} +%\end{macro} +% +%\begin{macro}{\@gls@saveentrycounter} +%\changes{3.0}{2011/04/02}{new} +% Need to check if using \ctr{equation} counter in \env{align} +% environment: % \begin{macrocode} -\let\@glo@sort\@glsdefaultsort +\newcommand*{\@gls@saveentrycounter}{% + \def\@gls@Hcounter{}% % \end{macrocode} -% Set the default counter: +% Are we using \ctr{equation} counter? % \begin{macrocode} -\def\@glo@counter{\@gls@getcounter{\@glo@type}}% + \ifthenelse{\equal{\@gls@counter}{equation}}% + { % \end{macrocode} -%\changes{1.17}{2008 December 26}{added see key} +% If we in \env{align} environment, \cs{xatlevel@} will be defined. +% (Can't test for \cs{@currenvir} as may be inside an inner +% environment.) % \begin{macrocode} -\def\@glo@see{}% + \ifcsundef{xatlevel@}% + {% + \edef\theglsentrycounter{\expandafter\noexpand + \csname the\@gls@counter\endcsname}% + }% + {% + \ifx\xatlevel@\@empty + \edef\theglsentrycounter{\expandafter\noexpand + \csname the\@gls@counter\endcsname}% + \else + \savecounters@ + \advance\c@equation by 1\relax + \edef\theglsentrycounter{\csname the\@gls@counter\endcsname}% +% \end{macrocode} +% Check if hyperref version of this counter +% \begin{macrocode} + \ifcsundef{theH\@gls@counter}% + {% + \def\@gls@Hcounter{\theglsentrycounter}% + }% + {% + \def\@gls@Hcounter{\csname theH\@gls@counter\endcsname}% + }% + \protected@edef\theHglsentrycounter{\@gls@Hcounter}% + \restorecounters@ + \fi + }% + }% + {% % \end{macrocode} -%\changes{1.17}{2008 December 26}{added parent key} +% Not using \ctr{equation} counter so no special measures: % \begin{macrocode} -\def\@glo@parent{}% + \edef\theglsentrycounter{\expandafter\noexpand + \csname the\@gls@counter\endcsname}% + }% % \end{macrocode} -%\changes{1.17}{2008 December 26}{added nonumberlist key} +% Check if hyperref version of this counter % \begin{macrocode} -\def\@glo@prefix{}% + \ifx\@gls@Hcounter\@empty + \ifcsundef{theH\@gls@counter}% + {% + \def\theHglsentrycounter{\theglsentrycounter}% + }% + {% + \protected@edef\theHglsentrycounter{\expandafter\noexpand + \csname theH\@gls@counter\endcsname}% + }% + \fi +} % \end{macrocode} -%\changes{2.04}{2009 November 10}{added user1-6 keys} -% \begin{macrocode} -\def\@glo@useri{}% -\def\@glo@userii{}% -\def\@glo@useriii{}% -\def\@glo@useriv{}% -\def\@glo@userv{}% -\def\@glo@uservi{}% +%\end{macro} +% +%\changes{1.01}{2007 May 17}{Added range facility in format key}% +%\begin{macro}{\@set@glo@numformat} +% Set the formatting information in the format required by +% \app{makeindex}. The first argument is the format specified +% by the user (via the format key), the second argument is the +% name of the counter used to indicate the location, the third +% argument is a control sequence which stores the required format +% and the fourth argument (new to v3.0) is the hyper-prefix. +%\changes{3.0}{2010/03/31}{added 4th argument} +% \begin{macrocode} +\def\@set@glo@numformat#1#2#3#4{% + \expandafter\@glo@check@mkidxrangechar#3\@nil + \protected@edef#1{% + \@glo@prefix setentrycounter[#4]{#2}% + \expandafter\string\csname\@glo@suffix\endcsname + }% + \@gls@checkmkidxchars#1% +} % \end{macrocode} -% Add start hook in case another package wants to add extra keys. +%\end{macro} +% Check to see if the given string starts with a ( or ). If it +% does set \cs{@glo@prefix} to the starting character, +% and \cs{@glo@suffix} to the rest (or "glsnumberformat" +% if there is nothing else), +% otherwise set \cs{@glo@prefix} to nothing and +% \cs{@glo@suffix} to all of it. % \begin{macrocode} - \@newglossaryentryprehook +\def\@glo@check@mkidxrangechar#1#2\@nil{% +\if#1(\relax + \def\@glo@prefix{(}% + \if\relax#2\relax + \def\@glo@suffix{glsnumberformat}% + \else + \def\@glo@suffix{#2}% + \fi +\else + \if#1)\relax + \def\@glo@prefix{)}% + \if\relax#2\relax + \def\@glo@suffix{glsnumberformat}% + \else + \def\@glo@suffix{#2}% + \fi + \else + \def\@glo@prefix{}\def\@glo@suffix{#1#2}% + \fi +\fi} % \end{macrocode} -% Extract key-val information from third parameter: +% +%\begin{macro}{\@gls@escbsdq} +% Escape backslashes and double quote marks. The argument must be +% a control sequence. % \begin{macrocode} -\setkeys{glossentry}{#2}% +\newcommand*{\@gls@escbsdq}[1]{% + \def\@gls@checkedmkidx{}% + \let\gls@xdystring=#1\relax + \@onelevel@sanitize\gls@xdystring + \edef\do@gls@xdycheckbackslash{% + \noexpand\@gls@xdycheckbackslash\gls@xdystring\noexpand\@nil + \@backslashchar\@backslashchar\noexpand\null}% + \do@gls@xdycheckbackslash + \expandafter\@gls@updatechecked\@gls@checkedmkidx{\gls@xdystring}% + \def\@gls@checkedmkidx{}% + \expandafter\@gls@xdycheckquote\gls@xdystring\@nil""\null + \expandafter\@gls@updatechecked\@gls@checkedmkidx{\gls@xdystring}% + \let#1=\gls@xdystring +} % \end{macrocode} -% Check to see if this glossary type has been defined, if it has, -% add this label to the relevant list, otherwise generate an error. +%\end{macro} +% Catch special characters\mkidxspch (argument must be a +% control sequence): +%\begin{macro}{\@gls@checkmkidxchars} % \begin{macrocode} -\@ifundefined{glolist@\@glo@type}{\PackageError{glossaries}{% -Glossary type '\@glo@type' has not been defined}{% -You need to define a new glossary type, before making entries -in it}}{% -\protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% -\expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% -}% +\newcommand{\@gls@checkmkidxchars}[1]{% +\ifglsxindy + \@gls@escbsdq{#1}% +\else + \def\@gls@checkedmkidx{}% + \expandafter\@gls@checkquote#1\@nil""\null + \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% + \def\@gls@checkedmkidx{}% + \expandafter\@gls@checkescquote#1\@nil\"\"\null + \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% + \def\@gls@checkedmkidx{}% + \expandafter\@gls@checkescactual#1\@nil\?\?\null + \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% + \def\@gls@checkedmkidx{}% + \expandafter\@gls@checkactual#1\@nil??\null + \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% + \def\@gls@checkedmkidx{}% + \expandafter\@gls@checkbar#1\@nil||\null + \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% + \def\@gls@checkedmkidx{}% + \expandafter\@gls@checkescbar#1\@nil\|\|\null + \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% + \def\@gls@checkedmkidx{}% + \expandafter\@gls@checklevel#1\@nil!!\null + \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% +\fi +} % \end{macrocode} -% Initialise level to 0. +%\end{macro} +% Update the control sequence and strip trailing \cs{@nil}: +%\begin{macro}{\@gls@updatechecked} % \begin{macrocode} -\gls@level=0\relax +\def\@gls@updatechecked#1\@nil#2{\def#2{#1}} % \end{macrocode} -% Has this entry been assigned a parent? +%\end{macro} +%\begin{macro}{\@gls@tmpb} +%\changes{1.1}{2008 Feb 22}{changed \cs{toksdef} to \cs{newtoks}} +% Define temporary token % \begin{macrocode} -\ifx\@glo@parent\@empty +\newtoks\@gls@tmpb % \end{macrocode} -% Doesn't have a parent. Set \cs{glo@}\meta{label}"@parent" to -% empty. +%\end{macro} +%\begin{macro}{\@gls@checkquote} +% Replace \verb|"| with \verb|""| since \verb|"| is a makeindex +% special character\mkidxspch. % \begin{macrocode} - \expandafter\gdef\csname glo@#1@parent\endcsname{}% +\def\@gls@checkquote#1"#2"#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@checkquote{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\@gls@quotechar\@gls@quotechar\@gls@quotechar}% + \def\@@gls@checkquote{\@gls@checkquote#3\null}% + \fi \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\@gls@quotechar}% + \ifx\null#3\null + \def\@@gls@checkquote{\@gls@checkquote#2""\null}% + \else + \def\@@gls@checkquote{\@gls@checkquote#2"#3\null}% + \fi +\fi +\@@gls@checkquote} % \end{macrocode} -% Has a parent. Check to ensure this entry isn't its own parent. -% \begin{macrocode} - \ifthenelse{\equal{#1}{\@glo@parent}}{% - \PackageError{glossaries}{Entry `#1' can't be its own parent}{}% - \def\@glo@parent{}% - \expandafter\gdef\csname glo@#1@parent\endcsname{}% - }{% -% \end{macrocode} -% Check the parent exists: +%\end{macro} +%\begin{macro}{\@gls@checkescquote} +% Do the same for \verb|\"|: % \begin{macrocode} - \ifglsentryexists{\@glo@parent}{% +\def\@gls@checkescquote#1\"#2\"#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@checkescquote{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\string\"\@gls@quotechar + \@gls@quotechar\string\"\@gls@quotechar}% + \def\@@gls@checkescquote{\@gls@checkescquote#3\null}% + \fi +\else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\string\"\@gls@quotechar}% + \ifx\null#3\null + \def\@@gls@checkescquote{\@gls@checkescquote#2\"\"\null}% + \else + \def\@@gls@checkescquote{\@gls@checkescquote#2\"#3\null}% + \fi +\fi +\@@gls@checkescquote} % \end{macrocode} -% Parent exists. Set \cs{glo@}\meta{label}"@parent". +%\end{macro} +%\begin{macro}{\@gls@checkescactual} +% Similarly for \verb|\?| (which is replaces @ as +% \app{makeindex}'s special character): % \begin{macrocode} - \expandafter\xdef\csname glo@#1@parent\endcsname{\@glo@parent}% +\def\@gls@checkescactual#1\?#2\?#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@checkescactual{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\string\"\@gls@actualchar + \@gls@quotechar\string\"\@gls@actualchar}% + \def\@@gls@checkescactual{\@gls@checkescactual#3\null}% + \fi +\else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\string\"\@gls@actualchar}% + \ifx\null#3\null + \def\@@gls@checkescactual{\@gls@checkescactual#2\?\?\null}% + \else + \def\@@gls@checkescactual{\@gls@checkescactual#2\?#3\null}% + \fi +\fi +\@@gls@checkescactual} % \end{macrocode} -% Determine level. +%\end{macro} +%\begin{macro}{\@gls@checkescbar} +% Similarly for \verb"\|": % \begin{macrocode} - \gls@level=\csname glo@\@glo@parent @level\endcsname\relax - \advance\gls@level by 1\relax +\def\@gls@checkescbar#1\|#2\|#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@checkescbar{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\string\"\@gls@encapchar + \@gls@quotechar\string\"\@gls@encapchar}% + \def\@@gls@checkescbar{\@gls@checkescbar#3\null}% + \fi +\else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\string\"\@gls@encapchar}% + \ifx\null#3\null + \def\@@gls@checkescbar{\@gls@checkescbar#2\|\|\null}% + \else + \def\@@gls@checkescbar{\@gls@checkescbar#2\|#3\null}% + \fi +\fi +\@@gls@checkescbar} % \end{macrocode} -% If name hasn't been specified, use same as the parent name +%\end{macro} +%\begin{macro}{\@gls@checkesclevel} +% Similarly for \verb"\!": % \begin{macrocode} - \ifx\@glo@name\@glsnoname - \expandafter\let\expandafter\@glo@name - \csname glo@\@glo@parent @name\endcsname +\def\@gls@checkesclevel#1\!#2\!#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@checkesclevel{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\string\"\@gls@levelchar + \@gls@quotechar\string\"\@gls@levelchar}% + \def\@@gls@checkesclevel{\@gls@checkesclevel#3\null}% + \fi +\else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\string\"\@gls@levelchar}% + \ifx\null#3\null + \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!\!\null}% + \else + \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!#3\null}% + \fi +\fi +\@@gls@checkesclevel} % \end{macrocode} -% If name and plural haven't been specified, use same as the parent +%\end{macro} +%\begin{macro}{\@gls@checkbar} +% and for \verb"|": % \begin{macrocode} - \ifx\@glo@plural\@glsdefaultplural - \expandafter\let\expandafter\@glo@plural - \csname glo@\@glo@parent @plural\endcsname - \fi - \fi - }{% +\def\@gls@checkbar#1|#2|#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@checkbar{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\@gls@encapchar\@gls@quotechar\@gls@encapchar}% + \def\@@gls@checkbar{\@gls@checkbar#3\null}% + \fi +\else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\@gls@encapchar}% + \ifx\null#3\null + \def\@@gls@checkbar{\@gls@checkbar#2||\null}% + \else + \def\@@gls@checkbar{\@gls@checkbar#2|#3\null}% + \fi +\fi +\@@gls@checkbar} % \end{macrocode} -% Parent doesn't exist, so issue an error message and change this -% entry to have no parent +%\end{macro} +%\begin{macro}{\@gls@checklevel} +% and for \verb"!": % \begin{macrocode} - \PackageError{glossaries}{Invalid parent `\@glo@parent' - for entry `#1' - parent doesn't exist}{Parent entries - must be defined before their children}% - \def\@glo@parent{}% - \expandafter\gdef\csname glo@#1@parent\endcsname{}% - }% - }% +\def\@gls@checklevel#1!#2!#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@checklevel{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\@gls@levelchar\@gls@quotechar\@gls@levelchar}% + \def\@@gls@checklevel{\@gls@checklevel#3\null}% + \fi +\else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\@gls@levelchar}% + \ifx\null#3\null + \def\@@gls@checklevel{\@gls@checklevel#2!!\null}% + \else + \def\@@gls@checklevel{\@gls@checklevel#2!#3\null}% + \fi \fi +\@@gls@checklevel} % \end{macrocode} -% Set the level for this entry +%\end{macro} +%\begin{macro}{\@gls@checkactual} +% and for \verb"?": % \begin{macrocode} -\expandafter\xdef\csname glo@#1@level\endcsname{\number\gls@level}% +\def\@gls@checkactual#1?#2?#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@checkactual{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\@gls@actualchar\@gls@quotechar\@gls@actualchar}% + \def\@@gls@checkactual{\@gls@checkactual#3\null}% + \fi +\else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@gls@quotechar\@gls@actualchar}% + \ifx\null#3\null + \def\@@gls@checkactual{\@gls@checkactual#2??\null}% + \else + \def\@@gls@checkactual{\@gls@checkactual#2?#3\null}% + \fi +\fi +\@@gls@checkactual} % \end{macrocode} -% Check if \gloskey{first} and \gloskey{firstplural} have been use. -% If \gloskey{firstplural} hasn't been specified, but \gloskey{first} -% has been specified, then form \gloskey{firstplural} by appending -% \cs{glspluralsuffix} to value of \gloskey{first} key, otherwise -% obtain the value from the \gloskey{plural} key. -% \changes{1.16}{2008 August 27}{Changed if to ifx} -% This now uses \cs{ifx} instead of \cs{if} to avoid expansion -% issues. (Thanks to Ulrich~Diez for suggesting this.) +%\end{macro} +% +%\begin{macro}{\@gls@xdycheckquote} +% As before but for use with \app{xindy} % \begin{macrocode} -\ifx\relax\@glo@firstplural - \ifx\relax\@glo@first - \def\@glo@firstplural{\@glo@plural}% - \def\@glo@first{\@glo@text}% - \else - \def\@glo@firstplural{\@glo@first\glspluralsuffix}% - \fi +\def\@gls@xdycheckquote#1"#2"#3\null{% +\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% +\toks@={#1}% +\ifx\null#2\null + \ifx\null#3\null + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@gls@xdycheckquote{\relax}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \string\"\string\"}% + \def\@@gls@xdycheckquote{\@gls@xdycheckquote#3\null}% + \fi \else - \ifx\relax\@glo@first - \def\@glo@first{\@glo@text}% - \fi + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \string\"}% + \ifx\null#3\null + \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2""\null}% + \else + \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2"#3\null}% + \fi \fi +\@@gls@xdycheckquote +} % \end{macrocode} -% Define commands associated with this entry: +%\end{macro} +% +%\begin{macro}{\@gls@xdycheckbackslash} +% Need to escape all backslashes for \app{xindy}. +% Define command that will define \cs{@gls@xdycheckbackslash} % \begin{macrocode} -\expandafter - \protected@xdef\csname glo@#1@text\endcsname{\@glo@text}% -\expandafter - \protected@xdef\csname glo@#1@plural\endcsname{\@glo@plural}% -\expandafter - \protected@xdef\csname glo@#1@first\endcsname{\@glo@first}% -\expandafter - \protected@xdef\csname glo@#1@firstpl\endcsname{\@glo@firstplural}% -\expandafter - \protected@xdef\csname glo@#1@type\endcsname{\@glo@type}% -\expandafter - \protected@xdef\csname glo@#1@counter\endcsname{\@glo@counter}% -\expandafter - \protected@xdef\csname glo@#1@useri\endcsname{\@glo@useri}% -\expandafter - \protected@xdef\csname glo@#1@userii\endcsname{\@glo@userii}% -\expandafter - \protected@xdef\csname glo@#1@useriii\endcsname{\@glo@useriii}% -\expandafter - \protected@xdef\csname glo@#1@useriv\endcsname{\@glo@useriv}% -\expandafter - \protected@xdef\csname glo@#1@userv\endcsname{\@glo@userv}% -\expandafter - \protected@xdef\csname glo@#1@uservi\endcsname{\@glo@uservi}% -\@gls@sanitizename -\expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}% +\edef\def@gls@xdycheckbackslash{% + \noexpand\def\noexpand\@gls@xdycheckbackslash##1\@backslashchar + ##2\@backslashchar##3\noexpand\null{% + \noexpand\@gls@tmpb=\noexpand\expandafter + {\noexpand\@gls@checkedmkidx}% + \noexpand\toks@={##1}% + \noexpand\ifx\noexpand\null##2\noexpand\null + \noexpand\ifx\noexpand\null##3\noexpand\null + \noexpand\edef\noexpand\@gls@checkedmkidx{% + \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@}% + \noexpand\def\noexpand\@@gls@xdycheckbackslash{\relax}% + \noexpand\else + \noexpand\edef\noexpand\@gls@checkedmkidx{% + \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@ + \@backslashchar\@backslashchar\@backslashchar\@backslashchar}% + \noexpand\def\noexpand\@@gls@xdycheckbackslash{% + \noexpand\@gls@xdycheckbackslash##3\noexpand\null}% + \noexpand\fi + \noexpand\else + \noexpand\edef\noexpand\@gls@checkedmkidx{% + \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@ + \@backslashchar\@backslashchar}% + \noexpand\ifx\noexpand\null##3\noexpand\null + \noexpand\def\noexpand\@@gls@xdycheckbackslash{% + \noexpand\@gls@xdycheckbackslash##2\@backslashchar + \@backslashchar\noexpand\null}% + \noexpand\else + \noexpand\def\noexpand\@@gls@xdycheckbackslash{% + \noexpand\@gls@xdycheckbackslash##2\@backslashchar + ##3\noexpand\null}% + \noexpand\fi + \noexpand\fi + \noexpand\@@gls@xdycheckbackslash + }% +} % \end{macrocode} -% The smaller and smallcaps options set the description to -% \cs{@glo@first}. Need to check for this, otherwise it won't get -% expanded if the description gets sanitized. -%\changes{1.15}{2008 August 15}{check for '@glo@first in description}% +% Now go ahead and define \cs{@gls@xdycheckbackslash} % \begin{macrocode} -\def\@glo@@desc{\@glo@first}% -\ifx\@glo@desc\@glo@@desc - \let\@glo@desc\@glo@first -\fi -\@gls@sanitizedesc -\expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}% -\expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}% +\def@gls@xdycheckbackslash % \end{macrocode} -% Sanitize sort value: -%\changes{1.18}{2009 January 14}{moved sort sanitization to -% 'newglossaryentry} +%\end{macro} +% +%\begin{macro}{\@glslink} +% If \ics{hyperlink} is not defined \cs{@glslink} +% ignores its first argument and just does the second argument, +% otherwise it is equivalent to \ics{hyperlink}. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} +% \begin{macrocode} +\ifcsundef{hyperlink}% +{% + \gdef\@glslink#1#2{#2}% +}% +{% + \gdef\@glslink#1#2{\hyperlink{#1}{#2}}% +} +% \end{macrocode} +%\end{macro} +%\changes{1.12}{2008 Mar 8}{added check for 'hypertarget separate +% to 'hyperlink (memoir defines 'hyperlink but not 'hypertarget)} +%\begin{macro}{\@glstarget} +% If \ics{hypertarget} is not defined, \cs{@glstarget} +% ignores its first argument and just does the second argument, +% otherwise it is equivalent to \ics{hypertarget}. +%\changes{1.16}{2008 August 27}{raised the hypertarget so the target text doesn't +% scroll off the top of the page} +% \begin{macrocode} +\newlength\gls@tmplen +\ifcsundef{hypertarget}% +{% + \gdef\@glstarget#1#2{#2}% +}% +{% + \gdef\@glstarget#1#2{% + \settoheight{\gls@tmplen}{#2}% + \raisebox{\gls@tmplen}{\hypertarget{#1}{}}#2% + }% +} +% \end{macrocode} +%\end{macro} +% +% Glossary hyperlinks can be disabled using \cs{glsdisablehyper} +% (effect can be localised): +%\begin{macro}{\glsdisablehyper} % \begin{macrocode} -\ifx\@glo@sort\@glsdefaultsort - \let\@glo@sort\@glo@name -\fi -\@onelevel@sanitize\@glo@sort +\newcommand{\glsdisablehyper}{% +\renewcommand*\@glslink[2]{##2}% +\renewcommand*\@glstarget[2]{##2}} % \end{macrocode} -% Set the sort key for this entry: +%\end{macro} +% Glossary hyperlinks can be enabled using \cs{glsenablehyper} +% (effect can be localised): +%\begin{macro}{\glsenablehyper} % \begin{macrocode} -\expandafter\protected@xdef\csname glo@#1@sort\endcsname{\@glo@sort}% +\newcommand{\glsenablehyper}{% +\renewcommand*\@glslink[2]{\hyperlink{##1}{##2}}% +\renewcommand*\@glstarget[2]{% + \settoheight{\gls@tmplen}{##2}% + \raisebox{\gls@tmplen}{\hypertarget{##1}{}}##2}} % \end{macrocode} -%\changes{1.15}{2008 August 15}{check for '@glo@text in symbol}% +%\end{macro} +% +%Syntax:\\[10pt] +% \cs{gls}\oarg{options}\marg{label}\oarg{insert text}\\[10pt] +% Link to glossary entry using singular form. The link text +% is taken from the value of the \gloskey{text} or \gloskey{first} +% keys used when the entry was defined. +% +% The first optional argument is a key-value list, the same as +% \ics{glslink}\igloskey[glslink]{hyper}\igloskey[glslink]{format}\igloskey[glslink]{counter}, +% the mandatory argument is the entry label. +% After the mandatory argument, there is another optional argument +% to insert extra text in the link text (the location of the inserted +% text is governed by \ics{glsdisplay} and +% \ics{glsdisplayfirst}). As with \cs{glslink} +% there is a starred version which is the same as the unstarred +% version but with the \gloskey[glslink]{hyper} key set to \texttt{false}. +% (Additional options can also be specified +% in the first optional argument.) +% +% First determine if we are using the starred form: +%\begin{macro}{\gls} % \begin{macrocode} -\def\@glo@@symbol{\@glo@text}% -\ifx\@glo@symbol\@glo@@symbol - \let\@glo@symbol\@glo@text -\fi -\@gls@sanitizesymbol -\expandafter\protected@xdef\csname glo@#1@symbol\endcsname{\@glo@symbol}% -\expandafter\protected@xdef\csname glo@#1@symbolplural\endcsname{\@glo@symbolplural}% +\newcommand*{\gls}{\@ifstar\@sgls\@gls} % \end{macrocode} -% Define an associated boolean variable to determine whether this -% entry has been used yet (needs to be defined globally): +%\end{macro} +% Define the starred form: +%\begin{macro}{\@sgls} % \begin{macrocode} -\expandafter\gdef\csname glo@#1@flagfalse\endcsname{% -\expandafter\global\expandafter -\let\csname ifglo@#1@flag\endcsname\iffalse}% -\expandafter\gdef\csname glo@#1@flagtrue\endcsname{% -\expandafter\global\expandafter -\let\csname ifglo@#1@flag\endcsname\iftrue}% -\csname glo@#1@flagfalse\endcsname +\newcommand*{\@sgls}[1][]{\@gls[hyper=false,#1]} % \end{macrocode} -% Sort out any cross-referencing if required. +%\end{macro} +% Defined the un-starred form. Need to determine if there is +% a final optional argument +%\begin{macro}{\@gls} % \begin{macrocode} -\ifx\@glo@see\@empty -\else - \protected@edef\@do@glssee{% - \noexpand\@gls@fixbraces\noexpand\@glo@list\@glo@see - \noexpand\@nil - \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{#1}}% - \@do@glssee -\fi -}% +\newcommand*{\@gls}[2][]{% +\new@ifnextchar[{\@gls@{#1}{#2}}{\@gls@{#1}{#2}[]}} % \end{macrocode} -% Determine and store main part of the entry's index format. -%\changes{1.17}{2008 December 26}{Stored main part of entry -% format when entry -% is defined}% +%\end{macro} +%\begin{macro}{\@gls@} +% Read in the final optional argument: % \begin{macrocode} - \@glo@storeentry{#1}% +\def\@gls@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Add end hook in case another package wants to add extra keys. +% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} - \@newglossaryentryposthook -} +\def\@gls@link@opts{#1}% +\def\@gls@link@label{#2}% % \end{macrocode} -%\changes{1.13}{2008 May 10}{Removed restriction on only using -% 'newglossaryentry in the preamble} -%\end{macro} -%\begin{macro}{\@newglossaryentryprehook} -% Allow extra information to be added to glossary entries: -%\changes{2.04}{2009 November 10}{new} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) % \begin{macrocode} -\newcommand*{\@newglossaryentryprehook}{} +\ifglsused{#2}% +{% + \def\@glo@text{% + \csname gls@\@glo@type @display\endcsname + {\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}% +}% +{% + \def\@glo@text{% + \csname gls@\@glo@type @displayfirst\endcsname + {\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}% +}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@newglossaryentryposthook} -% Allow extra information to be added to glossary entries: -%\changes{2.04}{2009 November 10}{new} +% Call \cs{@gls@link}. +% If \pkgopt{footnote} package option has been used and the glossary +% type is \cs{acronymtype}, suppress +% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} +% package option is used. +%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to +%checking if footnote option has been used} +%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} +%\changes{2.04}{2009 November 10}{Changed test to check if glossary type +%has been identified as a list of acronyms} % \begin{macrocode} -\newcommand*{\@newglossaryentryposthook}{} +\ifglsused{#2}{% + \@gls@link[#1]{#2}{\@glo@text}% +}{% + \gls@checkisacronymlist\@glo@type + \ifthenelse{\(\boolean{@glsisacronymlist}\AND + \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% + \@gls@link[#1,hyper=false]{#2}{\@glo@text}% + }{% + \@gls@link[#1]{#2}{\@glo@text}% + }% +}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@glossaryentryfield} -% Indicate what command should be used to display each entry in -% the glossary. (This enables the \sty{glossaries-accsupp} package -% to use \cs{accsuppglossaryentryfield} instead.) -%\changes{2.04}{2009 November 10}{new} +% Indicate that this entry has now been used % \begin{macrocode} -\ifglsxindy - \newcommand*{\@glossaryentryfield}{\string\\glossaryentryfield} -\else - \newcommand*{\@glossaryentryfield}{\string\glossaryentryfield} -\fi +\glsunset{#2}}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glossarysubentryfield} -% Indicate what command should be used to display each subentry in -% the glossary. (This enables the \sty{glossaries-accsupp} package -% to use \cs{accsuppglossarysubentryfield} instead.) -%\changes{2.04}{2009 November 10}{new} +% \cs{Gls} behaves like \cs{gls}, but the first letter +% of the link text is converted to uppercase (note that if the +% first letter has an accent, the accented letter will need to +% be grouped when you define the entry). It is mainly intended +% for terms that start a sentence: +%\begin{macro}{\Gls} % \begin{macrocode} -\ifglsxindy - \newcommand*{\@glossarysubentryfield}{% - \string\\glossarysubentryfield} -\else - \newcommand*{\@glossarysubentryfield}{% - \string\glossarysubentryfield} -\fi +\newcommand*{\Gls}{\@ifstar\@sGls\@Gls} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@glo@storeentry} -%\changes{1.17}{2008 December 26}{new} -% Determine the format to write the entry in the glossary -% output (\filetype{.glo}) file. -% The argument is the entry's label. -% The result is stored in \cs{glo@}\meta{label}"@entry", where -% \meta{label} is the entry's label. (This doesn't include -% any formatting or location information.) -% \begin{macrocode} -\newcommand{\@glo@storeentry}[1]{% -% \end{macrocode} -% Get the sort string and escape any special characters +% Define the starred form: % \begin{macrocode} -\protected@edef\@glo@sort{\csname glo@#1@sort\endcsname}% -\@gls@checkmkidxchars\@glo@sort +\newcommand*{\@sGls}[1][]{\@Gls[hyper=false,#1]} % \end{macrocode} -% Same again for the name string. +% Defined the un-starred form. Need to determine if there is +% a final optional argument % \begin{macrocode} -\protected@edef\@@glo@name{\csname glo@#1@name\endcsname}% -\@gls@checkmkidxchars\@@glo@name +\newcommand*{\@Gls}[2][]{% +\new@ifnextchar[{\@Gls@{#1}{#2}}{\@Gls@{#1}{#2}[]}} % \end{macrocode} -% Add the font command. (The backslash needs to be escaped for -% \app{xindy}.) +%\begin{macro}{\@Gls@} +% Read in the final optional argument: % \begin{macrocode} -\ifglsxindy - \protected@edef\@glo@name{\string\\glsnamefont{\@@glo@name}}% -\else - \protected@edef\@glo@name{\string\glsnamefont{\@@glo@name}}% -\fi +\def\@Gls@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Get the description string and escape any special characters +% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} -\protected@edef\@glo@desc{\csname glo@#1@desc\endcsname}% -\@gls@checkmkidxchars\@glo@desc +\def\@gls@link@opts{#1}% +\def\@gls@link@label{#2}% +\def\glslabel{#2}% % \end{macrocode} -% Same again for the symbol +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@symbol{\csname glo@#1@symbol\endcsname}% -\@gls@checkmkidxchars\@glo@symbol +\ifglsused{#2}% +{% + \protected@edef\@glo@text{% + \csname gls@\@glo@type @display\endcsname + {\glsentrytext{#2}}{\glsentrydesc{#2}}% + {\glsentrysymbol{#2}}{#3}}% +}% +{% + \protected@edef\@glo@text{% + \csname gls@\@glo@type @displayfirst\endcsname + {\glsentryfirst{#2}}{\glsentrydesc{#2}}% + {\glsentrysymbol{#2}}{#3}}% +}% % \end{macrocode} -% Escape any special characters in the prefix +% Call \cs{@gls@link} +% If \pkgopt{footnote} package option has been used and the glossary +% type is \cs{acronymtype}, suppress +% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} +% package option is used. +%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to +%checking if footnote option has been used} +%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} +%\changes{2.04}{2009 November 10}{Changed test to check if glossary type +%has been identified as a list of acronyms} % \begin{macrocode} -\@gls@checkmkidxchars\@glo@prefix +\ifglsused{#2}{% + \@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}}% +}{% + \gls@checkisacronymlist\@glo@type + \ifthenelse{\(\boolean{@glsisacronymlist}\AND + \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% + \@gls@link[#1,hyper=false]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}}% + }{% + \@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}}% + }% +}% % \end{macrocode} -% Get the parent, if one exists +% Indicate that this entry has now been used % \begin{macrocode} -\edef\@glo@parent{\csname glo@#1@parent\endcsname}% +\glsunset{#2}}% +} % \end{macrocode} -% Write the information to the glossary file. +%\end{macro} +% +% \cs{GLS} behaves like \ics{gls}, but the link +% text is converted to uppercase: +%\begin{macro}{\GLS} % \begin{macrocode} -\ifglsxindy +\newcommand*{\GLS}{\@ifstar\@sGLS\@GLS} % \end{macrocode} -% Store using \app{xindy} syntax. +%\end{macro} +% Define the starred form: % \begin{macrocode} - \ifx\@glo@parent\@empty +\newcommand*{\@sGLS}[1][]{\@GLS[hyper=false,#1]} % \end{macrocode} -% Entry doesn't have a parent +% Defined the un-starred form. Need to determine if there is +% a final optional argument % \begin{macrocode} - \expandafter\protected@xdef\csname glo@#1@index\endcsname{% - (\string"\@glo@sort\string" % - \string"\@glo@prefix\@glossaryentryfield{#1}{\@glo@name - }{\@glo@desc}{\@glo@symbol}\string") % - }% - \else +\newcommand*{\@GLS}[2][]{% +\new@ifnextchar[{\@GLS@{#1}{#2}}{\@GLS@{#1}{#2}[]}} % \end{macrocode} -% Entry has a parent +%\begin{macro}{\@GLS@} +% Read in the final optional argument: % \begin{macrocode} - \expandafter\protected@xdef\csname glo@#1@index\endcsname{% - \csname glo@\@glo@parent @index\endcsname - (\string"\@glo@sort\string" % - \string"\@glo@prefix\@glossarysubentryfield% - {\csname glo@#1@level\endcsname}{#1}{\@glo@name - }{\@glo@desc}{\@glo@symbol}\string") % - }% - \fi -\else +\def\@GLS@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Store using \app{makeindex} syntax. +% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} - \ifx\@glo@parent\@empty +\def\@gls@link@opts{#1}% +\def\@gls@link@label{#2}% % \end{macrocode} -% Sanitize \cs{@glo@prefix} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}). % \begin{macrocode} - \@onelevel@sanitize\@glo@prefix +\ifglsused{#2}{\def\@glo@text{% +\csname gls@\@glo@type @display\endcsname +{\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}}{% +\def\@glo@text{% +\csname gls@\@glo@type @displayfirst\endcsname +{\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}}% % \end{macrocode} -% Entry doesn't have a parent +% Call \cs{@gls@link} +% If \pkgopt{footnote} package option has been used and the glossary +% type is \cs{acronymtype}, suppress +% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} +% package option is used. +%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to +%checking if footnote option has been used} +%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} +%\changes{2.04}{2009 November 10}{Changed test to check if glossary type +%has been identified as a list of acronyms} % \begin{macrocode} - \expandafter\protected@xdef\csname glo@#1@index\endcsname{% - \@glo@sort\@gls@actualchar\@glo@prefix - \@glossaryentryfield{#1}{\@glo@name}{\@glo@desc - }{\@glo@symbol}% - }% - \else +\ifglsused{#2}{% + \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +}{% + \gls@checkisacronymlist\@glo@type + \ifthenelse{\(\boolean{@glsisacronymlist}\AND + \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% + \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% + }{% + \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% + }% +}% % \end{macrocode} -% Entry has a parent +% Indicate that this entry has now been used % \begin{macrocode} - \expandafter\protected@xdef\csname glo@#1@index\endcsname{% - \csname glo@\@glo@parent @index\endcsname\@gls@levelchar - \@glo@sort\@gls@actualchar\@glo@prefix - \@glossarysubentryfield - {\csname glo@#1@level\endcsname}{#1}{\@glo@name}{\@glo@desc - }{\@glo@symbol}% - }% - \fi -\fi +\glsunset{#2}}% } % \end{macrocode} %\end{macro} % -%\subsection{Resetting and unsetting entry flags} -% Each glossary entry is assigned a conditional of the form -%\cs{ifglo@}\meta{label}\texttt{@flag} which determines -% whether or not the entry has been used (see also -% \ics{ifglsused} defined below). These flags can -% be set and unset using the following macros: -% -% The command \cs{glsreset}\marg{label} can be used -% to set the entry flag to indicate that it hasn't been used yet. The -% required argument is the entry label. -%\begin{macro}{\glsreset} -% \begin{macrocode} -\newcommand*{\glsreset}[1]{% -\glsdoifexists{#1}{% -\expandafter\global\csname glo@#1@flagfalse\endcsname}} -% \end{macrocode} -%\end{macro} -% As above, but with only a local effect: -%\begin{macro}{\glslocalreset} -% \begin{macrocode} -\newcommand*{\glslocalreset}[1]{% -\glsdoifexists{#1}{% -\expandafter\let\csname ifglo@#1@flag\endcsname\iffalse}} -% \end{macrocode} -%\end{macro} -% The command \cs{glsunset}\marg{label} can be used to -% set the entry flag to indicate that it has been used. The required -% argument is the entry label. -%\begin{macro}{\glsunset} -% \begin{macrocode} -\newcommand*{\glsunset}[1]{% -\glsdoifexists{#1}{% -\expandafter\global\csname glo@#1@flagtrue\endcsname}} -% \end{macrocode} -%\end{macro} -% As above, but with only a local effect: -%\begin{macro}{\glslocalunset} -% \begin{macrocode} -\newcommand*{\glslocalunset}[1]{% -\glsdoifexists{#1}{% -\expandafter\let\csname ifglo@#1@flag\endcsname\iftrue}} -% \end{macrocode} -%\end{macro} -% Reset all entries for the named glossaries (supplied in a -% comma-separated list). -% Syntax: \cs{glsresetall}\oarg{glossary-list} -%\begin{macro}{\glsresetall} +% \cs{glspl} behaves in the same way as \ics{gls} except +% it uses the plural form. +%\begin{macro}{\glspl} % \begin{macrocode} -\newcommand*{\glsresetall}[1][\@glo@types]{% -\forallglsentries[#1]{\@glsentry}{% -\glsreset{\@glsentry}}} +\newcommand*{\glspl}{\@ifstar\@sglspl\@glspl} % \end{macrocode} %\end{macro} -% As above, but with only a local effect: -%\begin{macro}{\glslocalresetall} +% Define the starred form: % \begin{macrocode} -\newcommand*{\glslocalresetall}[1][\@glo@types]{% -\forallglsentries[#1]{\@glsentry}{% -\glslocalreset{\@glsentry}}} +\newcommand*{\@sglspl}[1][]{\@glspl[hyper=false,#1]} % \end{macrocode} -%\end{macro} -% Unset all entries for the named glossaries (supplied in a -% comma-separated list). -% Syntax: \cs{glsunsetall}\oarg{glossary-list} -%\begin{macro}{\glsunsetall} +% Defined the un-starred form. Need to determine if there is +% a final optional argument % \begin{macrocode} -\newcommand*{\glsunsetall}[1][\@glo@types]{% -\forallglsentries[#1]{\@glsentry}{% -\glsunset{\@glsentry}}} +\newcommand*{\@glspl}[2][]{% +\new@ifnextchar[{\@glspl@{#1}{#2}}{\@glspl@{#1}{#2}[]}} % \end{macrocode} -%\end{macro} -% As above, but with only a local effect: -%\begin{macro}{\glslocalunsetall} +%\begin{macro}{\@glspl@} +% Read in the final optional argument: % \begin{macrocode} -\newcommand*{\glslocalunsetall}[1][\@glo@types]{% -\forallglsentries[#1]{\@glsentry}{% -\glslocalunset{\@glsentry}}} +\def\@glspl@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -%\end{macro} -% -% \subsection{Loading files containing glossary entries} -%\label{sec:load} -% Glossary entries can be defined in an external file. -% These external files can contain \ics{newglossaryentry} -% and \ics{newacronym} commands.\footnote{and any other valid -%\LaTeX\ code that can be used in the preamble.}\\[10pt] -% \cs{loadglsentries}\oarg{type}\marg{filename}\\[10pt] -% This command will input the file using \cs{input}. -% The optional argument specifies to which glossary the -% entries should be assigned if they haven't used the \gloskey{type} -% key. If the optional argument is not specified, the default -% glossary is used. Only those entries used in the document (via -% \ics{glslink}, \ics{gls}, \ics{glspl} and uppercase -% variants or \ics{glsadd} and \ics{glsaddall} -% will appear in the glossary). The mandatory argument is -% the filename (with or without .tex extension). -%\begin{macro}{\loadglsentries} +% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} -\newcommand*{\loadglsentries}[2][\@gls@default]{% -\let\@gls@default\glsdefaulttype -\def\glsdefaulttype{#1}\input{#2}% -\let\glsdefaulttype\@gls@default} +\def\@gls@link@opts{#1}% +\def\@gls@link@label{#2}% % \end{macrocode} -%\end{macro} -% \cs{loadglsentries} can only be used in the preamble: +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and +% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} % \begin{macrocode} -\@onlypreamble{\loadglsentries} +\ifglsused{#2}% +{% + \def\@glo@text{% + \csname gls@\@glo@type @display\endcsname + {\glsentryplural{#2}}{\glsentrydescplural{#2}}% + {\glsentrysymbolplural{#2}}{#3}}% +}% +{% + \def\@glo@text{% + \csname gls@\@glo@type @displayfirst\endcsname + {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}% + {\glsentrysymbolplural{#2}}{#3}}% +}% % \end{macrocode} -% -%\subsection{Using glossary entries in the text} -%\label{sec:code:glslink} -% -% Any term that has been defined using \ics{newglossaryentry} -% (or \ics{newacronym}) can be displayed in the text -% (i.e.\ outside of the glossary) using -% one of the commands defined in this section. Unless you use -% \ics{glslink}, the way the term appears in the text is -% determined by \ics{glsdisplayfirst} (if it is the first -% time the term has been used) or \ics{glsdisplay} (for -% subsequent use). Any formatting commands (such as \cs{textbf} -% is governed by \ics{glstextformat}. By default this just -% displays the \term{link text} ``as is''. -%\changes{1.04}{2007 Aug 3}{Added 'glstextformat}% -%\begin{macro}{\glstextformat} +% Call \cs{@gls@link}. +% If \pkgopt{footnote} package option has been used and the glossary +% type is \cs{acronymtype}, suppress +% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} +% package option is used. +%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to +%checking if footnote option has been used} +%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} +%\changes{2.04}{2009 November 10}{Changed test to check if glossary type +%has been identified as a list of acronyms} % \begin{macrocode} -\newcommand*{\glstextformat}[1]{#1} +\ifglsused{#2}{% + \@gls@link[#1]{#2}{\@glo@text}% +}{% + \gls@checkisacronymlist\@glo@type + \ifthenelse{\(\boolean{@glsisacronymlist}\AND + \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% + \@gls@link[#1,hyper=false]{#2}{\@glo@text}% + }{% + \@gls@link[#1]{#2}{\@glo@text}% + }% +}% % \end{macrocode} -%\end{macro} -% -% The first time an entry is used, the way in which it is -% displayed is governed by \cs{glsdisplayfirst}. This -% takes four parameters: \verb|#1| will be the value -% of the entry's \gloskey{first} or \gloskey{firstplural} key, -% \verb|#2| will be the value of the entry's \gloskey{description} -% key, \verb|#3| will be the value of the entry's \gloskey{symbol} -% key and \verb|#4| is additional text supplied by the final optional -% argument to commands like \ics{gls} and \ics{glspl}. -% The default is to display the first parameter followed by the -% additional text. -%\begin{macro}{\glsdisplayfirst} +% Indicate that this entry has now been used % \begin{macrocode} -\newcommand*{\glsdisplayfirst}[4]{#1#4} +\glsunset{#2}}% +} % \end{macrocode} %\end{macro} % -% After the first use, the entry is displayed according to -% the format of \cs{glsdisplay}. Again, it takes four -% parameters: \verb|#1| will be the value of the -% entry's \gloskey{text} or \gloskey{plural} key, -% \verb|#2| will be the value of the entry's \gloskey{description} -% key, \verb|#3| will be the value of the entry's \gloskey{symbol} -% key and \verb|#4| is additional text supplied by the final optional -% argument to commands like \ics{gls} and \ics{glspl}. -%\begin{macro}{\glsdisplay} +% \cs{Glspl} behaves in the same way as \ics{glspl}, except +% that the first letter of the link text is converted to uppercase +% (as with \ics{Gls}, if the first letter has an accent, it +% will need to be grouped). +%\begin{macro}{\Glspl} % \begin{macrocode} -\newcommand*{\glsdisplay}[4]{#1#4} +\newcommand*{\Glspl}{\@ifstar\@sGlspl\@Glspl} % \end{macrocode} %\end{macro} -% -% When a new glossary is created it uses \cs{glsdisplayfirst} -% and \cs{glsdisplay} as the default way of displaying its -% entry in the text. This can be changed for the entries belonging -% to an individual glossary using -% \ics{defglsdisplay} and \ics{defglsdisplayfirst}. -%\\[10pt] -% \cs{defglsdisplay}\oarg{type}\marg{definition}\\[10pt]% -% The glossary type is given by \meta{type} (the default glossary -% if omitted) and -% \meta{definition} should have at most \verb|#1|, \verb|#2|, -% \verb|#3| and \verb|#4|. These represent the same arguments -% as those described for \ics{glsdisplay}. -%\begin{macro}{\defglsdisplay} +% Define the starred form: % \begin{macrocode} -\newcommand*{\defglsdisplay}[2][\glsdefaulttype]{% -\expandafter\def\csname gls@#1@display\endcsname##1##2##3##4{#2}} +\newcommand*{\@sGlspl}[1][]{\@Glspl[hyper=false,#1]} % \end{macrocode} -%\end{macro} -%\vskip5pt -% \cs{defglsdisplayfirst}\oarg{type}\marg{definition}\\[10pt]% -% The glossary type is given by \meta{type} (the default glossary -% if omitted) and -% \meta{definition} should have at most \verb|#1|, \verb|#2|, -% \verb|#3| and \verb|#4|. These represent the same arguments -% as those described for \ics{glsdisplayfirst}. -%\begin{macro}{\defglsdisplayfirst} +% Defined the un-starred form. Need to determine if there is +% a final optional argument % \begin{macrocode} -\newcommand*{\defglsdisplayfirst}[2][\glsdefaulttype]{% -\expandafter\def\csname gls@#1@displayfirst\endcsname##1##2##3##4{#2}} +\newcommand*{\@Glspl}[2][]{% +\new@ifnextchar[{\@Glspl@{#1}{#2}}{\@Glspl@{#1}{#2}[]}} % \end{macrocode} -%\end{macro} -% -%\subsubsection{Links to glossary entries} -% The links to glossary entries all have a first optional -% argument that can be used to change the format and counter -% of the associated entry number. Except for \cs{glslink}, -% the commands like \cs{gls} have a final optional -% argument that can be used to insert additional text in the -% link (this will usually be appended, but can be redefined using -% \ics{defglsdisplay} and \ics{defglsdisplayfirst}). -% It goes against the \LaTeX\ norm to have an optional -% argument after the mandatory arguments, but it makes more -% sense to write, say, \verb|\gls{label}['s]| rather than, say, -% \verb|\gls[append='s]{label}|. Since these control sequences -% are defined to include the final square bracket, spaces -% will be ignored after them. This is likely to lead to -% confusion as most users would not expect, say, "\gls{"\meta{label}"}" -% to ignore following spaces, so \cs{new@ifnextchar} from the -% \isty{amsgen} package is required. -% -% The following keys can be used in the first optional -% argument. The \gloskey[glslink]{counter} key checks that the -% value is the name of a valid counter. +%\begin{macro}{\@Glspl@} +% Read in the final optional argument: % \begin{macrocode} -\define@key{glslink}{counter}{% -\@ifundefined{c@#1}{\PackageError{glossaries}{There is no counter -called `#1'}{The counter key should have the name of a valid -counter as its value}}{% -\def\@gls@counter{#1}}} +\def\@Glspl@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% The value of the \gloskey[glslink]{format} key should be the name of a -% command (without the initial backslash) that has a single mandatory -% argument which can be used to format the associated entry -% number. +% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} -\define@key{glslink}{format}{% -\def\@glsnumberformat{#1}} +\def\@gls@link@opts{#1}% +\def\@gls@link@label{#2}% +\def\glslabel{#2}% % \end{macrocode} -% The \gloskey[glslink]{hyper} key is a boolean key, it can either have the -% value true or false, and indicates whether or not to make a -% hyperlink to the relevant glossary entry. If hyper is false, an -% entry will still be made in the glossary, but the given text -% won't be a hyperlink. +% Determine what the link text should be (this is stored in +% \cs{@glo@text}). This needs to be expanded so that the +% \cs{@glo@text} can be passed to \cs{xmakefirstuc}. +%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and +% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} % \begin{macrocode} -\define@boolkey{glslink}{hyper}[true]{} +\ifglsused{#2}% +{% + \protected@edef\@glo@text{% + \csname gls@\@glo@type @display\endcsname + {\glsentryplural{#2}}{\glsentrydescplural{#2}}% + {\glsentrysymbolplural{#2}}{#3}}% +}% +{% + \protected@edef\@glo@text{% + \csname gls@\@glo@type @displayfirst\endcsname + {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}% + {\glsentrysymbolplural{#2}}{#3}}% +}% % \end{macrocode} -% -%Syntax:\\[10pt] -% \cs{glslink}\oarg{options}\marg{label}\marg{text} -%\\[10pt] -% Display \meta{text} in the document, and add the entry information -% for \meta{label} into the relevant glossary. The optional -% argument should be a key value list using the \texttt{glslink} -% keys defined above. -% -% There is also a starred version:\\[10pt] -% \cs{glslink*}\oarg{options}\marg{label}\marg{text}\\[10pt] -% which is equivalent to -% \cs{glslink}"[hyper=false,"\meta{options}"]"\marg{label}\marg{text} -% -% First determine whether or not we are using the starred version: -%\begin{macro}{\glslink} +% Call \cs{@gls@link}. +% If \pkgopt{footnote} package option has been used and the glossary +% type is \cs{acronymtype}, suppress +% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} +% package option is used. +%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to +%checking if footnote option has been used} +%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} +%\changes{2.04}{2009 November 10}{Changed test to check if glossary type +%has been identified as a list of acronyms} % \begin{macrocode} -\newcommand{\glslink}{% -\@ifstar\@sgls@link\@gls@@link} +\ifglsused{#2}{% + \@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}}% +}{% + \gls@checkisacronymlist\@glo@type + \ifthenelse{\(\boolean{@glsisacronymlist}\AND + \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% + \@gls@link[#1,hyper=false]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}}% + }{% + \@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}}% + }% +}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@sgls@link} -% The starred version of \cs{glslink} calls the unstarred version -% with hyperlinks disabled. +% Indicate that this entry has now been used % \begin{macrocode} -\newcommand*{\@sgls@link}[1][]{\@gls@@link[hyper=false,#1]} +\glsunset{#2}}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\@gls@@link} -%\changes{2.03}{2009 Sep 23}{new} -% The unstarred version of \cs{glslink} checks for the existance -% of the term. The main part of the business is in \cs{@gls@link} -% which shouldn't check if the term is defined as it's called by -% \cs{gls} etc which also perform that check. +% +% \cs{GLSpl} behaves like \ics{glspl} except that all the +% link text is converted to uppercase. +%\begin{macro}{\GLSpl} % \begin{macrocode} -\newcommand*{\@gls@@link}[3][]{% - \ifglsentryexists{#2}% - {% - \@gls@link[#1]{#2}{#3}% - }{% - \PackageError{glossaries}{Glossary entry `#2' has not been - defined}{You need to define a glossary entry before you - can use it.}% +\newcommand*{\GLSpl}{\@ifstar\@sGLSpl\@GLSpl} % \end{macrocode} -% Display the specified text. (The entry doesn't exist so -% there's nothing to link it to.) +%\end{macro} +% Define the starred form: % \begin{macrocode} - \glstextformat{#3}% - }% -} +\newcommand*{\@sGLSpl}[1][]{\@GLSpl[hyper=false,#1]} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@link} -%\changes{1.07}{2007 Sep 13}{fixed bug caused by \cs{theglsentrycounter} setting the page number too soon} -%\changes{1.15}{2008 August 15}{added 'glslabel} +% Defined the un-starred form. Need to determine if there is +% a final optional argument % \begin{macrocode} -\def\@gls@link[#1]#2#3{% +\newcommand*{\@GLSpl}[2][]{% +\new@ifnextchar[{\@GLSpl@{#1}{#2}}{\@GLSpl@{#1}{#2}[]}} % \end{macrocode} -%\changes{2.03}{2009 Sep 23}{Moved entry existance check to -% avoid } -%\changes{2.03}{2009 Sep 23}{added \cs{leavevmode}} -% Inserting \cs{leavevmode} suggested by Donald~Arseneau (avoids -% problem with tabularx). +%\begin{macro}{\@GLSpl} +% Read in the final optional argument: % \begin{macrocode} - \leavevmode - \def\glslabel{#2}% - \def\@glsnumberformat{glsnumberformat}% - \edef\@gls@counter{\csname glo@#2@counter\endcsname}% - \KV@glslink@hypertrue - \setkeys{glslink}{#1}% - \edef\theglsentrycounter{\expandafter\noexpand - \csname the\@gls@counter\endcsname}% +\def\@GLSpl@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -%\changes{2.01}{2009 May 30}{moved \cs{@do@wrglossary} before term is displayed -% to prevent unwanted whatsit} +% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} - \@do@wrglossary{#2}% - \ifKV@glslink@hyper - \@glslink{glo:#2}{\glstextformat{#3}}% - \else - \glstextformat{#3}\relax - \fi -} +\def\@gls@link@opts{#1}% +\def\@gls@link@label{#2}% % \end{macrocode} -%\end{macro} -%\changes{1.01}{2007 May 17}{Added range facility in format key}% -% Set the formatting information in the format required by -% \app{makeindex}. The first argument is the format specified -% by the user (via the format key), the second argument is the -% name of the counter used to indicate the location and the third -% argument is a control sequence which stores the required format. -%\begin{macro}{\@set@glo@numformat} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and +% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} % \begin{macrocode} -\def\@set@glo@numformat#1#2#3{% -\expandafter\@glo@check@mkidxrangechar#3\@nil -\protected@edef#1{\@glo@prefix setentrycounter{#2}% -\expandafter\string\csname\@glo@suffix\endcsname}% -\@gls@checkmkidxchars#1} +\ifglsused{#2}{\def\@glo@text{% +\csname gls@\@glo@type @display\endcsname +{\glsentryplural{#2}}{\glsentrydescplural{#2}}{% +\glsentrysymbolplural{#2}}{#3}}}{% +\def\@glo@text{% +\csname gls@\@glo@type @displayfirst\endcsname +{\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}{% +\glsentrysymbolplural{#2}}{#3}}}% % \end{macrocode} -%\end{macro} -% Check to see if the given string starts with a ( or ). If it -% does set \cs{@glo@prefix} to the starting character, -% and \cs{@glo@suffix} to the rest (or "glsnumberformat" -% if there is nothing else), -% otherwise set \cs{@glo@prefix} to nothing and -% \cs{@glo@suffix} to all of it. +% Call \cs{@gls@link}. +% If \pkgopt{footnote} package option has been used and the glossary +% type is \cs{acronymtype}, suppress +% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} +% package option is used. +%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to +%checking if footnote option has been used} +%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} +%\changes{2.04}{2009 November 10}{Changed test to check if glossary type +%has been identified as a list of acronyms} % \begin{macrocode} -\def\@glo@check@mkidxrangechar#1#2\@nil{% -\if#1(\relax - \def\@glo@prefix{(}% - \if\relax#2\relax - \def\@glo@suffix{glsnumberformat}% - \else - \def\@glo@suffix{#2}% - \fi -\else - \if#1)\relax - \def\@glo@prefix{)}% - \if\relax#2\relax - \def\@glo@suffix{glsnumberformat}% - \else - \def\@glo@suffix{#2}% - \fi - \else - \def\@glo@prefix{}\def\@glo@suffix{#1#2}% - \fi -\fi} +\ifglsused{#2}{% + \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +}{% + \gls@checkisacronymlist\@glo@type + \ifthenelse{\(\boolean{@glsisacronymlist}\AND + \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% + \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% + }{% + \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% + }% +}% % \end{macrocode} -% -%\begin{macro}{\@gls@escbsdq} -% Escape backslashes and double quote marks. The argument must be -% a control sequence. +% Indicate that this entry has now been used % \begin{macrocode} -\newcommand*{\@gls@escbsdq}[1]{% - \def\@gls@checkedmkidx{}% - \let\gls@xdystring=#1\relax - \@onelevel@sanitize\gls@xdystring - \edef\do@gls@xdycheckbackslash{% - \noexpand\@gls@xdycheckbackslash\gls@xdystring\noexpand\@nil - \@backslashchar\@backslashchar\noexpand\null}% - \do@gls@xdycheckbackslash - \expandafter\@gls@updatechecked\@gls@checkedmkidx{\gls@xdystring}% - \def\@gls@checkedmkidx{}% - \expandafter\@gls@xdycheckquote\gls@xdystring\@nil""\null - \expandafter\@gls@updatechecked\@gls@checkedmkidx{\gls@xdystring}% - \let#1=\gls@xdystring +\glsunset{#2}}% } % \end{macrocode} %\end{macro} -% Catch special characters\mkidxspch (argument must be a -% control sequence): -%\begin{macro}{\@gls@checkmkidxchars} +% +%\begin{macro}{\glsdisp} +%\changes{1.19}{2009 Mar 2}{new} +%\cs{glsdisp}\oarg{options}\marg{label}\marg{text} +% This is like \cs{gls} except that the link text is provided. +% This differs from \cs{glslink} in that it uses +% \cs{glsdisplay} or \cs{glsdisplayfirst} and unsets the first use +% flag. +% +% First determine if we are using the starred form: % \begin{macrocode} -\newcommand{\@gls@checkmkidxchars}[1]{% -\ifglsxindy - \@gls@escbsdq{#1}% -\else - \def\@gls@checkedmkidx{}% - \expandafter\@gls@checkquote#1\@nil""\null - \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% - \def\@gls@checkedmkidx{}% - \expandafter\@gls@checkescquote#1\@nil\"\"\null - \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% - \def\@gls@checkedmkidx{}% - \expandafter\@gls@checkescactual#1\@nil\?\?\null - \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% - \def\@gls@checkedmkidx{}% - \expandafter\@gls@checkactual#1\@nil??\null - \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% - \def\@gls@checkedmkidx{}% - \expandafter\@gls@checkbar#1\@nil||\null - \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% - \def\@gls@checkedmkidx{}% - \expandafter\@gls@checkescbar#1\@nil\|\|\null - \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% - \def\@gls@checkedmkidx{}% - \expandafter\@gls@checklevel#1\@nil!!\null - \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% -\fi -} +\newcommand*{\glsdisp}{\@ifstar\@sglsdisp\@glsdisp} % \end{macrocode} %\end{macro} -% Update the control sequence and strip trailing \cs{@nil}: -%\begin{macro}{\@gls@updatechecked} +% Define the starred form: +%\begin{macro}{\@sgls} % \begin{macrocode} -\def\@gls@updatechecked#1\@nil#2{\def#2{#1}} +\newcommand*{\@sglsdisp}[1][]{\@glsdisp[hyper=false,#1]} % \end{macrocode} %\end{macro} -%\begin{macro}{\@gls@tmpb} -%\changes{1.1}{2008 Feb 22}{changed \cs{toksdef} to \cs{newtoks}} -% Define temporary token +% Defined the un-starred form. +%\begin{macro}{\@glsdisp} % \begin{macrocode} -\newtoks\@gls@tmpb +\newcommand*{\@glsdisp}[3][]{% + \glsdoifexists{#2}{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@checkquote} -% Replace \verb|"| with \verb|""| since \verb|"| is a makeindex -% special character\mkidxspch. +%\changes{2.05}{2010 Feb 6}{Added closing brace. Patch provided by Sergiu Dotenco} % \begin{macrocode} -\def\@gls@checkquote#1"#2"#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@checkquote{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\@gls@quotechar\@gls@quotechar\@gls@quotechar}% - \def\@@gls@checkquote{\@gls@checkquote#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\@gls@quotechar}% - \ifx\null#3\null - \def\@@gls@checkquote{\@gls@checkquote#2""\null}% - \else - \def\@@gls@checkquote{\@gls@checkquote#2"#3\null}% - \fi -\fi -\@@gls@checkquote} + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@checkescquote} -% Do the same for \verb|\"|: +% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} -\def\@gls@checkescquote#1\"#2\"#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@checkescquote{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\string\"\@gls@quotechar - \@gls@quotechar\string\"\@gls@quotechar}% - \def\@@gls@checkescquote{\@gls@checkescquote#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\string\"\@gls@quotechar}% - \ifx\null#3\null - \def\@@gls@checkescquote{\@gls@checkescquote#2\"\"\null}% - \else - \def\@@gls@checkescquote{\@gls@checkescquote#2\"#3\null}% - \fi -\fi -\@@gls@checkescquote} + \def\@gls@link@opts{#1}% + \def\@gls@link@label{#2}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@checkescactual} -% Similarly for \verb|\?| (which is replaces @ as -% \app{makeindex}'s special character): +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) % \begin{macrocode} -\def\@gls@checkescactual#1\?#2\?#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@checkescactual{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\string\"\@gls@actualchar - \@gls@quotechar\string\"\@gls@actualchar}% - \def\@@gls@checkescactual{\@gls@checkescactual#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\string\"\@gls@actualchar}% - \ifx\null#3\null - \def\@@gls@checkescactual{\@gls@checkescactual#2\?\?\null}% - \else - \def\@@gls@checkescactual{\@gls@checkescactual#2\?#3\null}% - \fi -\fi -\@@gls@checkescactual} + \ifglsused{#2}% + {% + \def\@glo@text{% + \csname gls@\@glo@type @display\endcsname + {#3}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{}}% + }% + {% + \def\@glo@text{% + \csname gls@\@glo@type @displayfirst\endcsname + {#3}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{}}% + }% +% \end{macrocode} +% Call \cs{@gls@link}. +% If \pkgopt{footnote} package option has been used and the glossary +% type is \cs{acronymtype}, suppress +% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} +% package option is used. +%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to +%checking if footnote option has been used} +%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} +%\changes{2.04}{2009 November 10}{Changed test to check if glossary type +%has been identified as a list of acronyms} +% \begin{macrocode} + \ifglsused{#2}% + {% + \@gls@link[#1]{#2}{\@glo@text}% + }% + {% + \gls@checkisacronymlist\@glo@type + \ifthenelse{\(\boolean{@glsisacronymlist}\AND + \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}% + {% + \@gls@link[#1,hyper=false]{#2}{\@glo@text}% + }% + {% + \@gls@link[#1]{#2}{\@glo@text}% + }% + }% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@checkescbar} -% Similarly for \verb"\|": +% Indicate that this entry has now been used +%\changes{2.05}{2010 Feb 6}{Removed spurious brace. Patch provided by Sergiu Dotenco} % \begin{macrocode} -\def\@gls@checkescbar#1\|#2\|#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@checkescbar{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\string\"\@gls@encapchar - \@gls@quotechar\string\"\@gls@encapchar}% - \def\@@gls@checkescbar{\@gls@checkescbar#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\string\"\@gls@encapchar}% - \ifx\null#3\null - \def\@@gls@checkescbar{\@gls@checkescbar#2\|\|\null}% - \else - \def\@@gls@checkescbar{\@gls@checkescbar#2\|#3\null}% - \fi -\fi -\@@gls@checkescbar} + \glsunset{#2}% + }% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\@gls@checkesclevel} -% Similarly for \verb"\!": +% +% \cs{glstext} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{text} key and it doesn't mark the entry as +% used. +%\begin{macro}{\glstext} % \begin{macrocode} -\def\@gls@checkesclevel#1\!#2\!#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@checkesclevel{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\string\"\@gls@levelchar - \@gls@quotechar\string\"\@gls@levelchar}% - \def\@@gls@checkesclevel{\@gls@checkesclevel#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\string\"\@gls@levelchar}% - \ifx\null#3\null - \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!\!\null}% - \else - \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!#3\null}% - \fi -\fi -\@@gls@checkesclevel} +\newcommand*{\glstext}{\@ifstar\@sglstext\@glstext} % \end{macrocode} %\end{macro} -%\begin{macro}{\@gls@checkbar} -% and for \verb"|": +% Define the starred form: % \begin{macrocode} -\def\@gls@checkbar#1|#2|#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@checkbar{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\@gls@encapchar\@gls@quotechar\@gls@encapchar}% - \def\@@gls@checkbar{\@gls@checkbar#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\@gls@encapchar}% - \ifx\null#3\null - \def\@@gls@checkbar{\@gls@checkbar#2||\null}% - \else - \def\@@gls@checkbar{\@gls@checkbar#2|#3\null}% - \fi -\fi -\@@gls@checkbar} +\newcommand*{\@sglstext}[1][]{\@glstext[hyper=false,#1]} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@checklevel} -% and for \verb"!": +% Defined the un-starred form. Need to determine if there is +% a final optional argument % \begin{macrocode} -\def\@gls@checklevel#1!#2!#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@checklevel{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\@gls@levelchar\@gls@quotechar\@gls@levelchar}% - \def\@@gls@checklevel{\@gls@checklevel#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\@gls@levelchar}% - \ifx\null#3\null - \def\@@gls@checklevel{\@gls@checklevel#2!!\null}% - \else - \def\@@gls@checklevel{\@gls@checklevel#2!#3\null}% - \fi -\fi -\@@gls@checklevel} +\newcommand*{\@glstext}[2][]{% +\new@ifnextchar[{\@glstext@{#1}{#2}}{\@glstext@{#1}{#2}[]}} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@checkactual} -% and for \verb"?": +% Read in the final optional argument: % \begin{macrocode} -\def\@gls@checkactual#1?#2?#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@checkactual{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\@gls@actualchar\@gls@quotechar\@gls@actualchar}% - \def\@@gls@checkactual{\@gls@checkactual#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \@gls@quotechar\@gls@actualchar}% - \ifx\null#3\null - \def\@@gls@checkactual{\@gls@checkactual#2??\null}% - \else - \def\@@gls@checkactual{\@gls@checkactual#2?#3\null}% - \fi -\fi -\@@gls@checkactual} +\def\@glstext@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@xdycheckquote} -% As before but for use with \app{xindy} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('glstext shouldn't use +% 'gls@\meta{type}@display)} % \begin{macrocode} -\def\@gls@xdycheckquote#1"#2"#3\null{% -\@gls@tmpb=\expandafter{\@gls@checkedmkidx}% -\toks@={#1}% -\ifx\null#2\null - \ifx\null#3\null - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% - \def\@@gls@xdycheckquote{\relax}% - \else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \string\"\string\"}% - \def\@@gls@xdycheckquote{\@gls@xdycheckquote#3\null}% - \fi -\else - \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ - \string\"}% - \ifx\null#3\null - \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2""\null}% - \else - \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2"#3\null}% - \fi -\fi -\@@gls@xdycheckquote +\protected@edef\@glo@text{\glsentrytext{#2}}% +% \end{macrocode} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} +% \begin{macrocode} +\@gls@link[#1]{#2}{\@glo@text#3}% +}% } % \end{macrocode} -%\end{macro} % -%\begin{macro}{\@gls@xdycheckbackslash} -% Need to escape all backslashes for \app{xindy}. -% Define command that will define \cs{@gls@xdycheckbackslash} +% \cs{GLStext} behaves like \cs{glstext} except the text is converted +% to uppercase. +%\begin{macro}{\GLStext} % \begin{macrocode} -\edef\def@gls@xdycheckbackslash{% - \noexpand\def\noexpand\@gls@xdycheckbackslash##1\@backslashchar - ##2\@backslashchar##3\noexpand\null{% - \noexpand\@gls@tmpb=\noexpand\expandafter - {\noexpand\@gls@checkedmkidx}% - \noexpand\toks@={##1}% - \noexpand\ifx\noexpand\null##2\noexpand\null - \noexpand\ifx\noexpand\null##3\noexpand\null - \noexpand\edef\noexpand\@gls@checkedmkidx{% - \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@}% - \noexpand\def\noexpand\@@gls@xdycheckbackslash{\relax}% - \noexpand\else - \noexpand\edef\noexpand\@gls@checkedmkidx{% - \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@ - \@backslashchar\@backslashchar\@backslashchar\@backslashchar}% - \noexpand\def\noexpand\@@gls@xdycheckbackslash{% - \noexpand\@gls@xdycheckbackslash##3\noexpand\null}% - \noexpand\fi - \noexpand\else - \noexpand\edef\noexpand\@gls@checkedmkidx{% - \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@ - \@backslashchar\@backslashchar}% - \noexpand\ifx\noexpand\null##3\noexpand\null - \noexpand\def\noexpand\@@gls@xdycheckbackslash{% - \noexpand\@gls@xdycheckbackslash##2\@backslashchar - \@backslashchar\noexpand\null}% - \noexpand\else - \noexpand\def\noexpand\@@gls@xdycheckbackslash{% - \noexpand\@gls@xdycheckbackslash##2\@backslashchar - ##3\noexpand\null}% - \noexpand\fi - \noexpand\fi - \noexpand\@@gls@xdycheckbackslash - }% -} +\newcommand*{\GLStext}{\@ifstar\@sGLStext\@GLStext} % \end{macrocode} -% Now go ahead and define \cs{@gls@xdycheckbackslash} +%\end{macro} +% Define the starred form: % \begin{macrocode} -\def@gls@xdycheckbackslash +\newcommand*{\@sGLStext}[1][]{\@GLStext[hyper=false,#1]} +% \end{macrocode} +% Defined the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\@GLStext}[2][]{% +\new@ifnextchar[{\@GLStext@{#1}{#2}}{\@GLStext@{#1}{#2}[]}} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@GLStext@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('GLStext shouldn't use +% 'gls@\meta{type}@display)} +% \begin{macrocode} +\protected@edef\@glo@text{\glsentrytext{#2}}% +% \end{macrocode} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} +% \begin{macrocode} +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% +}% +} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\@glslink} -% If \ics{hyperlink} is not defined \cs{@glslink} -% ignores its first argument and just does the second argument, -% otherwise it is equivalent to \ics{hyperlink}. +% \cs{Glstext} behaves like \cs{glstext} except that the first letter +% of the text is converted to uppercase. +%\begin{macro}{\Glstext} % \begin{macrocode} -\@ifundefined{hyperlink}{% - \gdef\@glslink#1#2{#2}% -}{% - \gdef\@glslink#1#2{\hyperlink{#1}{#2}}% -} +\newcommand*{\Glstext}{\@ifstar\@sGlstext\@Glstext} % \end{macrocode} %\end{macro} -%\changes{1.12}{2008 Mar 8}{added check for 'hypertarget separate -% to 'hyperlink (memoir defines 'hyperlink but not 'hypertarget)} -%\begin{macro}{\@glstarget} -% If \ics{hypertarget} is not defined, \cs{@glstarget} -% ignores its first argument and just does the second argument, -% otherwise it is equivalent to \ics{hypertarget}. -%\changes{1.16}{2008 August 27}{raised the hypertarget so the target text doesn't -% scroll off the top of the page} +% Define the starred form: % \begin{macrocode} -\newlength\gls@tmplen -\@ifundefined{hypertarget}{% - \gdef\@glstarget#1#2{#2}% -}{% - \gdef\@glstarget#1#2{% - \settoheight{\gls@tmplen}{#2}% - \raisebox{\gls@tmplen}{\hypertarget{#1}{}}#2}% -} +\newcommand*{\@sGlstext}[1][]{\@Glstext[hyper=false,#1]} % \end{macrocode} -%\end{macro} -% -% Glossary hyperlinks can be disabled using \cs{glsdisablehyper} -% (effect can be localised): -%\begin{macro}{\glsdisablehyper} +% Defined the un-starred form. Need to determine if there is +% a final optional argument % \begin{macrocode} -\newcommand{\glsdisablehyper}{% -\renewcommand*\@glslink[2]{##2}% -\renewcommand*\@glstarget[2]{##2}} +\newcommand*{\@Glstext}[2][]{% +\new@ifnextchar[{\@Glstext@{#1}{#2}}{\@Glstext@{#1}{#2}[]}} % \end{macrocode} -%\end{macro} -% Glossary hyperlinks can be enabled using \cs{glsenablehyper} -% (effect can be localised): -%\begin{macro}{\glsenablehyper} +% Read in the final optional argument: % \begin{macrocode} -\newcommand{\glsenablehyper}{% -\renewcommand*\@glslink[2]{\hyperlink{##1}{##2}}% -\renewcommand*\@glstarget[2]{% - \settoheight{\gls@tmplen}{##2}% - \raisebox{\gls@tmplen}{\hypertarget{##1}{}}##2}} +\def\@Glstext@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('Glstext shouldn't use +% 'gls@\meta{type}@display)} +% \begin{macrocode} +\protected@edef\@glo@text{\glsentrytext{#2}}% +% \end{macrocode} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} +% \begin{macrocode} +\@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% +}% +} % \end{macrocode} -%\end{macro} -% -%Syntax:\\[10pt] -% \cs{gls}\oarg{options}\marg{label}\oarg{insert text}\\[10pt] -% Link to glossary entry using singular form. The link text -% is taken from the value of the \gloskey{text} or \gloskey{first} -% keys used when the entry was defined. -% -% The first optional argument is a key-value list, the same as -% \ics{glslink}\igloskey[glslink]{hyper}\igloskey[glslink]{format}\igloskey[glslink]{counter}, -% the mandatory argument is the entry label. -% After the mandatory argument, there is another optional argument -% to insert extra text in the link text (the location of the inserted -% text is governed by \ics{glsdisplay} and -% \ics{glsdisplayfirst}). As with \cs{glslink} -% there is a starred version which is the same as the unstarred -% version but with the \gloskey[glslink]{hyper} key set to \texttt{false}. -% (Additional options can also be specified -% in the first optional argument.) % -% First determine if we are using the starred form: -%\begin{macro}{\gls} +% \cs{glsfirst} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{first} key and it doesn't mark the entry as +% used. +%\begin{macro}{\glsfirst} % \begin{macrocode} -\newcommand*{\gls}{\@ifstar\@sgls\@gls} +\newcommand*{\glsfirst}{\@ifstar\@sglsfirst\@glsfirst} % \end{macrocode} %\end{macro} % Define the starred form: -%\begin{macro}{\@sgls} % \begin{macrocode} -\newcommand*{\@sgls}[1][]{\@gls[hyper=false,#1]} +\newcommand*{\@sglsfirst}[1][]{\@glsfirst[hyper=false,#1]} % \end{macrocode} -%\end{macro} % Defined the un-starred form. Need to determine if there is % a final optional argument -%\begin{macro}{\@gls} % \begin{macrocode} -\newcommand*{\@gls}[2][]{% -\new@ifnextchar[{\@gls@{#1}{#2}}{\@gls@{#1}{#2}[]}} +\newcommand*{\@glsfirst}[2][]{% +\new@ifnextchar[{\@glsfirst@{#1}{#2}}{\@glsfirst@{#1}{#2}[]}} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@} % Read in the final optional argument: % \begin{macrocode} -\def\@gls@#1#2[#3]{% +\def\@glsfirst@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} -\def\@gls@link@opts{#1}% -\def\@gls@link@label{#2}% -% \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('glsfirst shouldn't use +% 'gls@\meta{type}@display)} % \begin{macrocode} -\ifglsused{#2}% -{% - \def\@glo@text{% - \csname gls@\@glo@type @display\endcsname - {\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}% -}% -{% - \def\@glo@text{% - \csname gls@\@glo@type @displayfirst\endcsname - {\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}% -}% +\protected@edef\@glo@text{\glsentryfirst{#2}}% % \end{macrocode} -% Call \cs{@gls@link}. -% If \pkgopt{footnote} package option has been used and the glossary -% type is \cs{acronymtype}, suppress -% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} -% package option is used. -%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to -%checking if footnote option has been used} -%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} -%\changes{2.04}{2009 November 10}{Changed test to check if glossary type -%has been identified as a list of acronyms} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\ifglsused{#2}{% - \@gls@link[#1]{#2}{\@glo@text}% -}{% - \gls@checkisacronymlist\@glo@type - \ifthenelse{\(\boolean{@glsisacronymlist}\AND - \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }{% - \@gls@link[#1]{#2}{\@glo@text}% - }% +\@gls@link[#1]{#2}{\@glo@text#3}% }% -% \end{macrocode} -% Indicate that this entry has now been used -% \begin{macrocode} -\glsunset{#2}}% } % \end{macrocode} -%\end{macro} % -% \cs{Gls} behaves like \cs{gls}, but the first letter -% of the link text is converted to uppercase (note that if the -% first letter has an accent, the accented letter will need to -% be grouped when you define the entry). It is mainly intended -% for terms that start a sentence: -%\begin{macro}{\Gls} +% \cs{Glsfirst} behaves like \ics{glsfirst} except it displays the +% first letter in uppercase. +%\begin{macro}{\Glsfirst} % \begin{macrocode} -\newcommand*{\Gls}{\@ifstar\@sGls\@Gls} +\newcommand*{\Glsfirst}{\@ifstar\@sGlsfirst\@Glsfirst} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGls}[1][]{\@Gls[hyper=false,#1]} +\newcommand*{\@sGlsfirst}[1][]{\@Glsfirst[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Gls}[2][]{% -\new@ifnextchar[{\@Gls@{#1}{#2}}{\@Gls@{#1}{#2}[]}} +\newcommand*{\@Glsfirst}[2][]{% +\new@ifnextchar[{\@Glsfirst@{#1}{#2}}{\@Glsfirst@{#1}{#2}[]}} % \end{macrocode} -%\begin{macro}{\@Gls@} % Read in the final optional argument: % \begin{macrocode} -\def\@Gls@#1#2[#3]{% +\def\@Glsfirst@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} -\def\@gls@link@opts{#1}% -\def\@gls@link@label{#2}% -\def\glslabel{#2}% -% \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsfirst shouldn't use +% 'gls@\meta{type}@display)} % \begin{macrocode} -\ifglsused{#2}% -{% - \protected@edef\@glo@text{% - \csname gls@\@glo@type @display\endcsname - {\glsentrytext{#2}}{\glsentrydesc{#2}}% - {\glsentrysymbol{#2}}{#3}}% -}% -{% - \protected@edef\@glo@text{% - \csname gls@\@glo@type @displayfirst\endcsname - {\glsentryfirst{#2}}{\glsentrydesc{#2}}% - {\glsentrysymbol{#2}}{#3}}% -}% +\protected@edef\@glo@text{\glsentryfirst{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% If \pkgopt{footnote} package option has been used and the glossary -% type is \cs{acronymtype}, suppress -% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} -% package option is used. -%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to -%checking if footnote option has been used} -%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} -%\changes{2.04}{2009 November 10}{Changed test to check if glossary type -%has been identified as a list of acronyms} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\ifglsused{#2}{% - \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% -}{% - \gls@checkisacronymlist\@glo@type - \ifthenelse{\(\boolean{@glsisacronymlist}\AND - \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% - \@gls@link[#1,hyper=false]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% - }{% - \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% - }% +\@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% +} % \end{macrocode} -% Indicate that this entry has now been used +% +% \cs{GLSfirst} behaves like \ics{Glsfirst} except it displays the +% text in uppercase. +%\begin{macro}{\GLSfirst} +% \begin{macrocode} +\newcommand*{\GLSfirst}{\@ifstar\@sGLSfirst\@GLSfirst} +% \end{macrocode} +%\end{macro} +% Define the starred form: +% \begin{macrocode} +\newcommand*{\@sGLSfirst}[1][]{\@GLSfirst[hyper=false,#1]} +% \end{macrocode} +% Defined the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\@GLSfirst}[2][]{% +\new@ifnextchar[{\@GLSfirst@{#1}{#2}}{\@GLSfirst@{#1}{#2}[]}} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@GLSfirst@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSfirst shouldn't use +% 'gls@\meta{type}@display)} +% \begin{macrocode} +\protected@edef\@glo@text{\glsentryfirst{#2}}% +% \end{macrocode} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\glsunset{#2}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% +}% } % \end{macrocode} -%\end{macro} % -% \cs{GLS} behaves like \ics{gls}, but the link -% text is converted to uppercase: -%\begin{macro}{\GLS} +% \cs{glsplural} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{plural} key and it doesn't mark the entry as +% used. +%\begin{macro}{\glsplural} % \begin{macrocode} -\newcommand*{\GLS}{\@ifstar\@sGLS\@GLS} +\newcommand*{\glsplural}{\@ifstar\@sglsplural\@glsplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLS}[1][]{\@GLS[hyper=false,#1]} +\newcommand*{\@sglsplural}[1][]{\@glsplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLS}[2][]{% -\new@ifnextchar[{\@GLS@{#1}{#2}}{\@GLS@{#1}{#2}[]}} +\newcommand*{\@glsplural}[2][]{% +\new@ifnextchar[{\@glsplural@{#1}{#2}}{\@glsplural@{#1}{#2}[]}} % \end{macrocode} -%\begin{macro}{\@GLS@} % Read in the final optional argument: % \begin{macrocode} -\def\@GLS@#1#2[#3]{% +\def\@glsplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} -\def\@gls@link@opts{#1}% -\def\@gls@link@label{#2}% -% \end{macrocode} % Determine what the link text should be (this is stored in -% \cs{@glo@text}). +% \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('glsplural shouldn't use +% 'gls@\meta{type}@display)} % \begin{macrocode} -\ifglsused{#2}{\def\@glo@text{% -\csname gls@\@glo@type @display\endcsname -{\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}}{% -\def\@glo@text{% -\csname gls@\@glo@type @displayfirst\endcsname -{\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}}% +\protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% If \pkgopt{footnote} package option has been used and the glossary -% type is \cs{acronymtype}, suppress -% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} -% package option is used. -%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to -%checking if footnote option has been used} -%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} -%\changes{2.04}{2009 November 10}{Changed test to check if glossary type -%has been identified as a list of acronyms} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\ifglsused{#2}{% - \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% -}{% - \gls@checkisacronymlist\@glo@type - \ifthenelse{\(\boolean{@glsisacronymlist}\AND - \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% - \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% - }{% - \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% - }% +\@gls@link[#1]{#2}{\@glo@text#3}% }% -% \end{macrocode} -% Indicate that this entry has now been used -% \begin{macrocode} -\glsunset{#2}}% } % \end{macrocode} -%\end{macro} % -% \cs{glspl} behaves in the same way as \ics{gls} except -% it uses the plural form. -%\begin{macro}{\glspl} +% \cs{Glsplural} behaves like \ics{glsplural} except that the first +% letter is converted to uppercase. +%\begin{macro}{\Glsplural} % \begin{macrocode} -\newcommand*{\glspl}{\@ifstar\@sglspl\@glspl} +\newcommand*{\Glsplural}{\@ifstar\@sGlsplural\@Glsplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglspl}[1][]{\@glspl[hyper=false,#1]} +\newcommand*{\@sGlsplural}[1][]{\@Glsplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glspl}[2][]{% -\new@ifnextchar[{\@glspl@{#1}{#2}}{\@glspl@{#1}{#2}[]}} +\newcommand*{\@Glsplural}[2][]{% +\new@ifnextchar[{\@Glsplural@{#1}{#2}}{\@Glsplural@{#1}{#2}[]}} % \end{macrocode} -%\begin{macro}{\@glspl@} % Read in the final optional argument: % \begin{macrocode} -\def\@glspl@#1#2[#3]{% +\def\@Glsplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} -\def\@gls@link@opts{#1}% -\def\@gls@link@label{#2}% -% \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and -% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} +% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsplural shouldn't use +% 'gls@\meta{type}@display)} % \begin{macrocode} -\ifglsused{#2}% -{% - \def\@glo@text{% - \csname gls@\@glo@type @display\endcsname - {\glsentryplural{#2}}{\glsentrydescplural{#2}}% - {\glsentrysymbolplural{#2}}{#3}}% -}% -{% - \def\@glo@text{% - \csname gls@\@glo@type @displayfirst\endcsname - {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}% - {\glsentrysymbolplural{#2}}{#3}}% -}% +\protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} -% Call \cs{@gls@link}. -% If \pkgopt{footnote} package option has been used and the glossary -% type is \cs{acronymtype}, suppress -% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} -% package option is used. -%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to -%checking if footnote option has been used} -%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} -%\changes{2.04}{2009 November 10}{Changed test to check if glossary type -%has been identified as a list of acronyms} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\ifglsused{#2}{% - \@gls@link[#1]{#2}{\@glo@text}% -}{% - \gls@checkisacronymlist\@glo@type - \ifthenelse{\(\boolean{@glsisacronymlist}\AND - \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }{% - \@gls@link[#1]{#2}{\@glo@text}% - }% +\@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% -% \end{macrocode} -% Indicate that this entry has now been used -% \begin{macrocode} -\glsunset{#2}}% } % \end{macrocode} -%\end{macro} % -% \cs{Glspl} behaves in the same way as \ics{glspl}, except -% that the first letter of the link text is converted to uppercase -% (as with \ics{Gls}, if the first letter has an accent, it -% will need to be grouped). -%\begin{macro}{\Glspl} +% \cs{GLSplural} behaves like \ics{glsplural} except that the +% text is converted to uppercase. +%\begin{macro}{\GLSplural} % \begin{macrocode} -\newcommand*{\Glspl}{\@ifstar\@sGlspl\@Glspl} +\newcommand*{\GLSplural}{\@ifstar\@sGLSplural\@GLSplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlspl}[1][]{\@Glspl[hyper=false,#1]} +\newcommand*{\@sGLSplural}[1][]{\@GLSplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glspl}[2][]{% -\new@ifnextchar[{\@Glspl@{#1}{#2}}{\@Glspl@{#1}{#2}[]}} +\newcommand*{\@GLSplural}[2][]{% +\new@ifnextchar[{\@GLSplural@{#1}{#2}}{\@GLSplural@{#1}{#2}[]}} % \end{macrocode} -%\begin{macro}{\@Glspl@} % Read in the final optional argument: % \begin{macrocode} -\def\@Glspl@#1#2[#3]{% +\def\@GLSplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSplural shouldn't use +% 'gls@\meta{type}@display)} % \begin{macrocode} -\def\@gls@link@opts{#1}% -\def\@gls@link@label{#2}% -\def\glslabel{#2}% +\protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} -% Determine what the link text should be (this is stored in -% \cs{@glo@text}). This needs to be expanded so that the -% \cs{@glo@text} can be passed to \cs{xmakefirstuc}. -%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and -% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\ifglsused{#2}% -{% - \protected@edef\@glo@text{% - \csname gls@\@glo@type @display\endcsname - {\glsentryplural{#2}}{\glsentrydescplural{#2}}% - {\glsentrysymbolplural{#2}}{#3}}% -}% -{% - \protected@edef\@glo@text{% - \csname gls@\@glo@type @displayfirst\endcsname - {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}% - {\glsentrysymbolplural{#2}}{#3}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% +} % \end{macrocode} -% Call \cs{@gls@link}. -% If \pkgopt{footnote} package option has been used and the glossary -% type is \cs{acronymtype}, suppress -% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} -% package option is used. -%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to -%checking if footnote option has been used} -%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} -%\changes{2.04}{2009 November 10}{Changed test to check if glossary type -%has been identified as a list of acronyms} +% +% \cs{glsfirstplural} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{firstplural} key and it doesn't mark the entry as +% used. +%\begin{macro}{\glsfirstplural} % \begin{macrocode} -\ifglsused{#2}{% - \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% -}{% - \gls@checkisacronymlist\@glo@type - \ifthenelse{\(\boolean{@glsisacronymlist}\AND - \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% - \@gls@link[#1,hyper=false]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% - }{% - \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% - }% -}% +\newcommand*{\glsfirstplural}{\@ifstar\@sglsfirstplural\@glsfirstplural} % \end{macrocode} -% Indicate that this entry has now been used +%\end{macro} +% Define the starred form: % \begin{macrocode} -\glsunset{#2}}% +\newcommand*{\@sglsfirstplural}[1][]{\@glsfirstplural[hyper=false,#1]} +% \end{macrocode} +% Defined the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\@glsfirstplural}[2][]{% +\new@ifnextchar[{\@glsfirstplural@{#1}{#2}}{\@glsfirstplural@{#1}{#2}[]}} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@glsfirstplural@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('glsfirstplural shouldn't use +% 'gls@\meta{type}@display)} +% \begin{macrocode} +\protected@edef\@glo@text{\glsentryfirstplural{#2}}% +% \end{macrocode} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} +% \begin{macrocode} +\@gls@link[#1]{#2}{\@glo@text#3}% +}% } % \end{macrocode} -%\end{macro} % -% \cs{GLSpl} behaves like \ics{glspl} except that all the -% link text is converted to uppercase. -%\begin{macro}{\GLSpl} +% \cs{Glsfirstplural} behaves like \ics{glsfirstplural} except that the +% first letter is converted to uppercase. +%\begin{macro}{\Glsfirstplural} % \begin{macrocode} -\newcommand*{\GLSpl}{\@ifstar\@sGLSpl\@GLSpl} +\newcommand*{\Glsfirstplural}{\@ifstar\@sGlsfirstplural\@Glsfirstplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSpl}[1][]{\@GLSpl[hyper=false,#1]} +\newcommand*{\@sGlsfirstplural}[1][]{\@Glsfirstplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSpl}[2][]{% -\new@ifnextchar[{\@GLSpl@{#1}{#2}}{\@GLSpl@{#1}{#2}[]}} +\newcommand*{\@Glsfirstplural}[2][]{% +\new@ifnextchar[{\@Glsfirstplural@{#1}{#2}}{\@Glsfirstplural@{#1}{#2}[]}} % \end{macrocode} -%\begin{macro}{\@GLSpl} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSpl@#1#2[#3]{% +\def\@Glsfirstplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} -\def\@gls@link@opts{#1}% -\def\@gls@link@label{#2}% -% \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and -% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} +% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsfirstplural shouldn't use +% 'gls@\meta{type}@display)} % \begin{macrocode} -\ifglsused{#2}{\def\@glo@text{% -\csname gls@\@glo@type @display\endcsname -{\glsentryplural{#2}}{\glsentrydescplural{#2}}{% -\glsentrysymbolplural{#2}}{#3}}}{% -\def\@glo@text{% -\csname gls@\@glo@type @displayfirst\endcsname -{\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}{% -\glsentrysymbolplural{#2}}{#3}}}% +\protected@edef\@glo@text{\glsentryfirstplural{#2}}% % \end{macrocode} -% Call \cs{@gls@link}. -% If \pkgopt{footnote} package option has been used and the glossary -% type is \cs{acronymtype}, suppress -% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} -% package option is used. -%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to -%checking if footnote option has been used} -%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} -%\changes{2.04}{2009 November 10}{Changed test to check if glossary type -%has been identified as a list of acronyms} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\ifglsused{#2}{% - \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% -}{% - \gls@checkisacronymlist\@glo@type - \ifthenelse{\(\boolean{@glsisacronymlist}\AND - \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% - \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% - }{% - \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% - }% +\@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% -% \end{macrocode} -% Indicate that this entry has now been used -% \begin{macrocode} -\glsunset{#2}}% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsdisp} -%\changes{1.19}{2009 Mar 2}{new} -%\cs{glsdisp}\oarg{options}\marg{label}\marg{text} -% This is like \cs{gls} except that the link text is provided. -% This differs from \cs{glslink} in that it uses -% \cs{glsdisplay} or \cs{glsdisplayfirst} and unsets the first use -% flag. % -% First determine if we are using the starred form: +% \cs{GLSfirstplural} behaves like \ics{glsfirstplural} except that the +% link text is converted to uppercase. +%\begin{macro}{\GLSfirstplural} % \begin{macrocode} -\newcommand*{\glsdisp}{\@ifstar\@sglsdisp\@glsdisp} +\newcommand*{\GLSfirstplural}{\@ifstar\@sGLSfirstplural\@GLSfirstplural} % \end{macrocode} %\end{macro} % Define the starred form: -%\begin{macro}{\@sgls} -% \begin{macrocode} -\newcommand*{\@sglsdisp}[1][]{\@glsdisp[hyper=false,#1]} -% \end{macrocode} -%\end{macro} -% Defined the un-starred form. -%\begin{macro}{\@glsdisp} % \begin{macrocode} -\newcommand*{\@glsdisp}[3][]{% - \glsdoifexists{#2}{% +\newcommand*{\@sGLSfirstplural}[1][]{\@GLSfirstplural[hyper=false,#1]} % \end{macrocode} -%\changes{2.05}{2010 Feb 6}{Added closing brace. Patch provided by Sergiu Dotenco} +% Defined the un-starred form. Need to determine if there is +% a final optional argument % \begin{macrocode} - \edef\@glo@type{\glsentrytype{#2}}% +\newcommand*{\@GLSfirstplural}[2][]{% +\new@ifnextchar[{\@GLSfirstplural@{#1}{#2}}{\@GLSfirstplural@{#1}{#2}[]}} % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} +% Read in the final optional argument: % \begin{macrocode} - \def\@gls@link@opts{#1}% - \def\@gls@link@label{#2}% +\def\@GLSfirstplural@#1#2[#3]{% +\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) +% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSfirstplural shouldn't use +% 'gls@\meta{type}@display)} % \begin{macrocode} - \ifglsused{#2}% - {% - \def\@glo@text{% - \csname gls@\@glo@type @display\endcsname - {#3}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{}}% - }% - {% - \def\@glo@text{% - \csname gls@\@glo@type @displayfirst\endcsname - {#3}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{}}% - }% -% \end{macrocode} -% Call \cs{@gls@link}. -% If \pkgopt{footnote} package option has been used and the glossary -% type is \cs{acronymtype}, suppress -% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} -% package option is used. -%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to -%checking if footnote option has been used} -%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} -%\changes{2.04}{2009 November 10}{Changed test to check if glossary type -%has been identified as a list of acronyms} -% \begin{macrocode} - \ifglsused{#2}% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - {% - \gls@checkisacronymlist\@glo@type - \ifthenelse{\(\boolean{@glsisacronymlist}\AND - \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}% - {% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - }% +\protected@edef\@glo@text{\glsentryfirstplural{#2}}% % \end{macrocode} -% Indicate that this entry has now been used -%\changes{2.05}{2010 Feb 6}{Removed spurious brace. Patch provided by Sergiu Dotenco} +% Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} - \glsunset{#2}% - }% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% +}% } % \end{macrocode} -%\end{macro} % -% \cs{glstext} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{text} key and it doesn't mark the entry as +% \cs{glsname} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{name} key and it doesn't mark the entry as % used. -%\begin{macro}{\glstext} +%\begin{macro}{\glsname} % \begin{macrocode} -\newcommand*{\glstext}{\@ifstar\@sglstext\@glstext} +\newcommand*{\glsname}{\@ifstar\@sglsname\@glsname} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglstext}[1][]{\@glstext[hyper=false,#1]} +\newcommand*{\@sglsname}[1][]{\@glsname[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glstext}[2][]{% -\new@ifnextchar[{\@glstext@{#1}{#2}}{\@glstext@{#1}{#2}[]}} +\newcommand*{\@glsname}[2][]{% +\new@ifnextchar[{\@glsname@{#1}{#2}}{\@glsname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glstext@#1#2[#3]{% +\def\@glsname@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glstext shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('glsname shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrytext{#2}}% +\protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9250,110 +5465,110 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{GLStext} behaves like \cs{glstext} except the text is converted -% to uppercase. -%\begin{macro}{\GLStext} +% \cs{Glsname} behaves like \ics{glsname} except that the +% first letter is converted to uppercase. +%\begin{macro}{\Glsname} % \begin{macrocode} -\newcommand*{\GLStext}{\@ifstar\@sGLStext\@GLStext} +\newcommand*{\Glsname}{\@ifstar\@sGlsname\@Glsname} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLStext}[1][]{\@GLStext[hyper=false,#1]} +\newcommand*{\@sGlsname}[1][]{\@Glsname[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLStext}[2][]{% -\new@ifnextchar[{\@GLStext@{#1}{#2}}{\@GLStext@{#1}{#2}[]}} +\newcommand*{\@Glsname}[2][]{% +\new@ifnextchar[{\@Glsname@{#1}{#2}}{\@Glsname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLStext@#1#2[#3]{% +\def\@Glsname@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('GLStext shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('glsname shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrytext{#2}}% +\protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% +\@gls@link[#1]{#2}{% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % -% \cs{Glstext} behaves like \cs{glstext} except that the first letter -% of the text is converted to uppercase. -%\begin{macro}{\Glstext} +% \cs{GLSname} behaves like \ics{glsname} except that the +% link text is converted to uppercase. +%\begin{macro}{\GLSname} % \begin{macrocode} -\newcommand*{\Glstext}{\@ifstar\@sGlstext\@Glstext} +\newcommand*{\GLSname}{\@ifstar\@sGLSname\@GLSname} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlstext}[1][]{\@Glstext[hyper=false,#1]} +\newcommand*{\@sGLSname}[1][]{\@GLSname[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glstext}[2][]{% -\new@ifnextchar[{\@Glstext@{#1}{#2}}{\@Glstext@{#1}{#2}[]}} +\newcommand*{\@GLSname}[2][]{% +\new@ifnextchar[{\@GLSname@{#1}{#2}}{\@GLSname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glstext@#1#2[#3]{% +\def\@GLSname@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('Glstext shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSname shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrytext{#2}}% +\protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % -% \cs{glsfirst} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{first} key and it doesn't mark the entry as -% used. -%\begin{macro}{\glsfirst} +% \cs{glsdesc} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{description} key and it doesn't mark the entry +% as used. +%\begin{macro}{\glsdesc} % \begin{macrocode} -\newcommand*{\glsfirst}{\@ifstar\@sglsfirst\@glsfirst} +\newcommand*{\glsdesc}{\@ifstar\@sglsdesc\@glsdesc} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsfirst}[1][]{\@glsfirst[hyper=false,#1]} +\newcommand*{\@sglsdesc}[1][]{\@glsdesc[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsfirst}[2][]{% -\new@ifnextchar[{\@glsfirst@{#1}{#2}}{\@glsfirst@{#1}{#2}[]}} +\newcommand*{\@glsdesc}[2][]{% +\new@ifnextchar[{\@glsdesc@{#1}{#2}}{\@glsdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsfirst@#1#2[#3]{% +\def\@glsdesc@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glsfirst shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('glsdesc shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryfirst{#2}}% +\protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9363,72 +5578,72 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{Glsfirst} behaves like \ics{glsfirst} except it displays the -% first letter in uppercase. -%\begin{macro}{\Glsfirst} +% \cs{Glsdesc} behaves like \ics{glsdesc} except that the +% first letter is converted to uppercase. +%\begin{macro}{\Glsdesc} % \begin{macrocode} -\newcommand*{\Glsfirst}{\@ifstar\@sGlsfirst\@Glsfirst} +\newcommand*{\Glsdesc}{\@ifstar\@sGlsdesc\@Glsdesc} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsfirst}[1][]{\@Glsfirst[hyper=false,#1]} +\newcommand*{\@sGlsdesc}[1][]{\@Glsdesc[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsfirst}[2][]{% -\new@ifnextchar[{\@Glsfirst@{#1}{#2}}{\@Glsfirst@{#1}{#2}[]}} +\newcommand*{\@Glsdesc}[2][]{% +\new@ifnextchar[{\@Glsdesc@{#1}{#2}}{\@Glsdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsfirst@#1#2[#3]{% +\def\@Glsdesc@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsfirst shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsdesc shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryfirst{#2}}% +\protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % -% \cs{GLSfirst} behaves like \ics{Glsfirst} except it displays the -% text in uppercase. -%\begin{macro}{\GLSfirst} +% \cs{GLSdesc} behaves like \ics{glsdesc} except that the +% link text is converted to uppercase. +%\begin{macro}{\GLSdesc} % \begin{macrocode} -\newcommand*{\GLSfirst}{\@ifstar\@sGLSfirst\@GLSfirst} +\newcommand*{\GLSdesc}{\@ifstar\@sGLSdesc\@GLSdesc} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSfirst}[1][]{\@GLSfirst[hyper=false,#1]} +\newcommand*{\@sGLSdesc}[1][]{\@GLSdesc[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSfirst}[2][]{% -\new@ifnextchar[{\@GLSfirst@{#1}{#2}}{\@GLSfirst@{#1}{#2}[]}} +\newcommand*{\@GLSdesc}[2][]{% +\new@ifnextchar[{\@GLSdesc@{#1}{#2}}{\@GLSdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSfirst@#1#2[#3]{% +\def\@GLSdesc@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSfirst shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSdesc shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryfirst{#2}}% +\protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9438,35 +5653,33 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{glsplural} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{plural} key and it doesn't mark the entry as -% used. -%\begin{macro}{\glsplural} +% \cs{glsdescplural} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{descriptionplural} key and it doesn't mark the entry +% as used. +%\begin{macro}{\glsdescplural} % \begin{macrocode} -\newcommand*{\glsplural}{\@ifstar\@sglsplural\@glsplural} +\newcommand*{\glsdescplural}{\@ifstar\@sglsdescplural\@glsdescplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsplural}[1][]{\@glsplural[hyper=false,#1]} +\newcommand*{\@sglsdescplural}[1][]{\@glsdescplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsplural}[2][]{% -\new@ifnextchar[{\@glsplural@{#1}{#2}}{\@glsplural@{#1}{#2}[]}} +\newcommand*{\@glsdescplural}[2][]{% +\new@ifnextchar[{\@glsdescplural@{#1}{#2}}{\@glsdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsplural@#1#2[#3]{% +\def\@glsdescplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glsplural shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryplural{#2}}% +\protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9476,72 +5689,68 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{Glsplural} behaves like \ics{glsplural} except that the first -% letter is converted to uppercase. -%\begin{macro}{\Glsplural} +% \cs{Glsdescplural} behaves like \ics{glsdescplural} except that the +% first letter is converted to uppercase. +%\begin{macro}{\Glsdescplural} % \begin{macrocode} -\newcommand*{\Glsplural}{\@ifstar\@sGlsplural\@Glsplural} +\newcommand*{\Glsdescplural}{\@ifstar\@sGlsdescplural\@Glsdescplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsplural}[1][]{\@Glsplural[hyper=false,#1]} +\newcommand*{\@sGlsdescplural}[1][]{\@Glsdescplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsplural}[2][]{% -\new@ifnextchar[{\@Glsplural@{#1}{#2}}{\@Glsplural@{#1}{#2}[]}} +\newcommand*{\@Glsdescplural}[2][]{% +\new@ifnextchar[{\@Glsdescplural@{#1}{#2}}{\@Glsdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsplural@#1#2[#3]{% +\def\@Glsdescplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsplural shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryplural{#2}}% +\protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % -% \cs{GLSplural} behaves like \ics{glsplural} except that the -% text is converted to uppercase. -%\begin{macro}{\GLSplural} +% \cs{GLSdescplural} behaves like \ics{glsdescplural} except that the +% link text is converted to uppercase. +%\begin{macro}{\GLSdescplural} % \begin{macrocode} -\newcommand*{\GLSplural}{\@ifstar\@sGLSplural\@GLSplural} +\newcommand*{\GLSdescplural}{\@ifstar\@sGLSdescplural\@GLSdescplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSplural}[1][]{\@GLSplural[hyper=false,#1]} +\newcommand*{\@sGLSdescplural}[1][]{\@GLSdescplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSplural}[2][]{% -\new@ifnextchar[{\@GLSplural@{#1}{#2}}{\@GLSplural@{#1}{#2}[]}} +\newcommand*{\@GLSdescplural}[2][]{% +\new@ifnextchar[{\@GLSdescplural@{#1}{#2}}{\@GLSdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSplural@#1#2[#3]{% +\def\@GLSdescplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSplural shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryplural{#2}}% +\protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9551,35 +5760,35 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{glsfirstplural} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{firstplural} key and it doesn't mark the entry as +% \cs{glssymbol} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{symbol} key and it doesn't mark the entry as % used. -%\begin{macro}{\glsfirstplural} +%\begin{macro}{\glssymbol} % \begin{macrocode} -\newcommand*{\glsfirstplural}{\@ifstar\@sglsfirstplural\@glsfirstplural} +\newcommand*{\glssymbol}{\@ifstar\@sglssymbol\@glssymbol} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsfirstplural}[1][]{\@glsfirstplural[hyper=false,#1]} +\newcommand*{\@sglssymbol}[1][]{\@glssymbol[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsfirstplural}[2][]{% -\new@ifnextchar[{\@glsfirstplural@{#1}{#2}}{\@glsfirstplural@{#1}{#2}[]}} +\newcommand*{\@glssymbol}[2][]{% +\new@ifnextchar[{\@glssymbol@{#1}{#2}}{\@glssymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsfirstplural@#1#2[#3]{% +\def\@glssymbol@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glsfirstplural shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('glssymbol shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryfirstplural{#2}}% +\protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9589,72 +5798,72 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{Glsfirstplural} behaves like \ics{glsfirstplural} except that the +% \cs{Glssymbol} behaves like \ics{glssymbol} except that the % first letter is converted to uppercase. -%\begin{macro}{\Glsfirstplural} +%\begin{macro}{\Glssymbol} % \begin{macrocode} -\newcommand*{\Glsfirstplural}{\@ifstar\@sGlsfirstplural\@Glsfirstplural} +\newcommand*{\Glssymbol}{\@ifstar\@sGlssymbol\@Glssymbol} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsfirstplural}[1][]{\@Glsfirstplural[hyper=false,#1]} +\newcommand*{\@sGlssymbol}[1][]{\@Glssymbol[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsfirstplural}[2][]{% -\new@ifnextchar[{\@Glsfirstplural@{#1}{#2}}{\@Glsfirstplural@{#1}{#2}[]}} +\newcommand*{\@Glssymbol}[2][]{% +\new@ifnextchar[{\@Glssymbol@{#1}{#2}}{\@Glssymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsfirstplural@#1#2[#3]{% +\def\@Glssymbol@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsfirstplural shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('Glssymbol shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryfirstplural{#2}}% +\protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % -% \cs{GLSfirstplural} behaves like \ics{glsfirstplural} except that the +% \cs{GLSsymbol} behaves like \ics{glssymbol} except that the % link text is converted to uppercase. -%\begin{macro}{\GLSfirstplural} +%\begin{macro}{\GLSsymbol} % \begin{macrocode} -\newcommand*{\GLSfirstplural}{\@ifstar\@sGLSfirstplural\@GLSfirstplural} +\newcommand*{\GLSsymbol}{\@ifstar\@sGLSsymbol\@GLSsymbol} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSfirstplural}[1][]{\@GLSfirstplural[hyper=false,#1]} +\newcommand*{\@sGLSsymbol}[1][]{\@GLSsymbol[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSfirstplural}[2][]{% -\new@ifnextchar[{\@GLSfirstplural@{#1}{#2}}{\@GLSfirstplural@{#1}{#2}[]}} +\newcommand*{\@GLSsymbol}[2][]{% +\new@ifnextchar[{\@GLSsymbol@{#1}{#2}}{\@GLSsymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSfirstplural@#1#2[#3]{% +\def\@GLSsymbol@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSfirstplural shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSsymbol shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryfirstplural{#2}}% +\protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9664,35 +5873,35 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{glsname} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{name} key and it doesn't mark the entry as +% \cs{glssymbolplural} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{symbolplural} key and it doesn't mark the entry as % used. -%\begin{macro}{\glsname} +%\begin{macro}{\glssymbolplural} % \begin{macrocode} -\newcommand*{\glsname}{\@ifstar\@sglsname\@glsname} +\newcommand*{\glssymbolplural}{\@ifstar\@sglssymbolplural\@glssymbolplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsname}[1][]{\@glsname[hyper=false,#1]} +\newcommand*{\@sglssymbolplural}[1][]{\@glssymbolplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsname}[2][]{% -\new@ifnextchar[{\@glsname@{#1}{#2}}{\@glsname@{#1}{#2}[]}} +\newcommand*{\@glssymbolplural}[2][]{% +\new@ifnextchar[{\@glssymbolplural@{#1}{#2}}{\@glssymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsname@#1#2[#3]{% +\def\@glssymbolplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glsname shouldn't use +% \changes{1.12}{2008 Mar 8}{fixed bug ('glssymbolplural shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryname{#2}}% +\protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9702,72 +5911,68 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{Glsname} behaves like \ics{glsname} except that the +% \cs{Glssymbolplural} behaves like \ics{glssymbolplural} except that the % first letter is converted to uppercase. -%\begin{macro}{\Glsname} +%\begin{macro}{\Glssymbolplural} % \begin{macrocode} -\newcommand*{\Glsname}{\@ifstar\@sGlsname\@Glsname} +\newcommand*{\Glssymbolplural}{\@ifstar\@sGlssymbolplural\@Glssymbolplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsname}[1][]{\@Glsname[hyper=false,#1]} +\newcommand*{\@sGlssymbolplural}[1][]{\@Glssymbolplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsname}[2][]{% -\new@ifnextchar[{\@Glsname@{#1}{#2}}{\@Glsname@{#1}{#2}[]}} +\newcommand*{\@Glssymbolplural}[2][]{% +\new@ifnextchar[{\@Glssymbolplural@{#1}{#2}}{\@Glssymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsname@#1#2[#3]{% +\def\@Glssymbolplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glsname shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryname{#2}}% +\protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % -% \cs{GLSname} behaves like \ics{glsname} except that the +% \cs{GLSsymbolplural} behaves like \ics{glssymbolplural} except that the % link text is converted to uppercase. -%\begin{macro}{\GLSname} +%\begin{macro}{\GLSsymbolplural} % \begin{macrocode} -\newcommand*{\GLSname}{\@ifstar\@sGLSname\@GLSname} +\newcommand*{\GLSsymbolplural}{\@ifstar\@sGLSsymbolplural\@GLSsymbolplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSname}[1][]{\@GLSname[hyper=false,#1]} +\newcommand*{\@sGLSsymbolplural}[1][]{\@GLSsymbolplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSname}[2][]{% -\new@ifnextchar[{\@GLSname@{#1}{#2}}{\@GLSname@{#1}{#2}[]}} +\newcommand*{\@GLSsymbolplural}[2][]{% +\new@ifnextchar[{\@GLSsymbolplural@{#1}{#2}}{\@GLSsymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSname@#1#2[#3]{% +\def\@GLSsymbolplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSname shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentryname{#2}}% +\protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} @@ -9777,75 +5982,69 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{glsdesc} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{description} key and it doesn't mark the entry +% \cs{glsuseri} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{user1} key and it doesn't mark the entry % as used. -%\begin{macro}{\glsdesc} +%\begin{macro}{\glsuseri} % \begin{macrocode} -\newcommand*{\glsdesc}{\@ifstar\@sglsdesc\@glsdesc} +\newcommand*{\glsuseri}{\@ifstar\@sglsuseri\@glsuseri} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsdesc}[1][]{\@glsdesc[hyper=false,#1]} +\newcommand*{\@sglsuseri}[1][]{\@glsuseri[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsdesc}[2][]{% -\new@ifnextchar[{\@glsdesc@{#1}{#2}}{\@glsdesc@{#1}{#2}[]}} +\newcommand*{\@glsuseri}[2][]{% +\new@ifnextchar[{\@glsuseri@{#1}{#2}}{\@glsuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsdesc@#1#2[#3]{% +\def\@glsuseri@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glsdesc shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrydesc{#2}}% +\protected@edef\@glo@text{\glsentryuseri{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % -% \cs{Glsdesc} behaves like \ics{glsdesc} except that the +% \cs{Glsuseri} behaves like \ics{glsuseri} except that the % first letter is converted to uppercase. -%\begin{macro}{\Glsdesc} +%\begin{macro}{\Glsuseri} % \begin{macrocode} -\newcommand*{\Glsdesc}{\@ifstar\@sGlsdesc\@Glsdesc} +\newcommand*{\Glsuseri}{\@ifstar\@sGlsuseri\@Glsuseri} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsdesc}[1][]{\@Glsdesc[hyper=false,#1]} +\newcommand*{\@sGlsuseri}[1][]{\@Glsuseri[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsdesc}[2][]{% -\new@ifnextchar[{\@Glsdesc@{#1}{#2}}{\@Glsdesc@{#1}{#2}[]}} +\newcommand*{\@Glsuseri}[2][]{% +\new@ifnextchar[{\@Glsuseri@{#1}{#2}}{\@Glsuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsdesc@#1#2[#3]{% +\def\@Glsuseri@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsdesc shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrydesc{#2}}% +\protected@edef\@glo@text{\glsentryuseri{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% @@ -9853,108 +6052,103 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{GLSdesc} behaves like \ics{glsdesc} except that the +% \cs{GLSuseri} behaves like \ics{glsuseri} except that the % link text is converted to uppercase. -%\begin{macro}{\GLSdesc} +%\begin{macro}{\GLSuseri} % \begin{macrocode} -\newcommand*{\GLSdesc}{\@ifstar\@sGLSdesc\@GLSdesc} +\newcommand*{\GLSuseri}{\@ifstar\@sGLSuseri\@GLSuseri} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSdesc}[1][]{\@GLSdesc[hyper=false,#1]} +\newcommand*{\@sGLSuseri}[1][]{\@GLSuseri[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSdesc}[2][]{% -\new@ifnextchar[{\@GLSdesc@{#1}{#2}}{\@GLSdesc@{#1}{#2}[]}} +\newcommand*{\@GLSuseri}[2][]{% +\new@ifnextchar[{\@GLSuseri@{#1}{#2}}{\@GLSuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSdesc@#1#2[#3]{% +\def\@GLSuseri@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSdesc shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrydesc{#2}}% +\protected@edef\@glo@text{\glsentryuseri{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % -% \cs{glsdescplural} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{descriptionplural} key and it doesn't mark the entry +% \cs{glsuserii} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{user2} key and it doesn't mark the entry % as used. -%\begin{macro}{\glsdescplural} +%\begin{macro}{\glsuserii} % \begin{macrocode} -\newcommand*{\glsdescplural}{\@ifstar\@sglsdescplural\@glsdescplural} +\newcommand*{\glsuserii}{\@ifstar\@sglsuserii\@glsuserii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsdescplural}[1][]{\@glsdescplural[hyper=false,#1]} +\newcommand*{\@sglsuserii}[1][]{\@glsuserii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsdescplural}[2][]{% -\new@ifnextchar[{\@glsdescplural@{#1}{#2}}{\@glsdescplural@{#1}{#2}[]}} +\newcommand*{\@glsuserii}[2][]{% +\new@ifnextchar[{\@glsuserii@{#1}{#2}}{\@glsuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsdescplural@#1#2[#3]{% +\def\@glsuserii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentrydescplural{#2}}% +\protected@edef\@glo@text{\glsentryuserii{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % -% \cs{Glsdescplural} behaves like \ics{glsdescplural} except that the +% \cs{Glsuserii} behaves like \ics{glsuserii} except that the % first letter is converted to uppercase. -%\begin{macro}{\Glsdescplural} +%\begin{macro}{\Glsuserii} % \begin{macrocode} -\newcommand*{\Glsdescplural}{\@ifstar\@sGlsdescplural\@Glsdescplural} +\newcommand*{\Glsuserii}{\@ifstar\@sGlsuserii\@Glsuserii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsdescplural}[1][]{\@Glsdescplural[hyper=false,#1]} +\newcommand*{\@sGlsuserii}[1][]{\@Glsuserii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsdescplural}[2][]{% -\new@ifnextchar[{\@Glsdescplural@{#1}{#2}}{\@Glsdescplural@{#1}{#2}[]}} +\newcommand*{\@Glsuserii}[2][]{% +\new@ifnextchar[{\@Glsuserii@{#1}{#2}}{\@Glsuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsdescplural@#1#2[#3]{% +\def\@Glsuserii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentrydescplural{#2}}% +\protected@edef\@glo@text{\glsentryuserii{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% @@ -9962,290 +6156,275 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{GLSdescplural} behaves like \ics{glsdescplural} except that the +% \cs{GLSuserii} behaves like \ics{glsuserii} except that the % link text is converted to uppercase. -%\begin{macro}{\GLSdescplural} +%\begin{macro}{\GLSuserii} % \begin{macrocode} -\newcommand*{\GLSdescplural}{\@ifstar\@sGLSdescplural\@GLSdescplural} +\newcommand*{\GLSuserii}{\@ifstar\@sGLSuserii\@GLSuserii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSdescplural}[1][]{\@GLSdescplural[hyper=false,#1]} +\newcommand*{\@sGLSuserii}[1][]{\@GLSuserii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSdescplural}[2][]{% -\new@ifnextchar[{\@GLSdescplural@{#1}{#2}}{\@GLSdescplural@{#1}{#2}[]}} +\newcommand*{\@GLSuserii}[2][]{% +\new@ifnextchar[{\@GLSuserii@{#1}{#2}}{\@GLSuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSdescplural@#1#2[#3]{% +\def\@GLSuserii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentrydescplural{#2}}% +\protected@edef\@glo@text{\glsentryuserii{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % -% \cs{glssymbol} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{symbol} key and it doesn't mark the entry as -% used. -%\begin{macro}{\glssymbol} +% \cs{glsuseriii} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{user3} key and it doesn't mark the entry +% as used. +%\begin{macro}{\glsuseriii} % \begin{macrocode} -\newcommand*{\glssymbol}{\@ifstar\@sglssymbol\@glssymbol} +\newcommand*{\glsuseriii}{\@ifstar\@sglsuseriii\@glsuseriii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglssymbol}[1][]{\@glssymbol[hyper=false,#1]} +\newcommand*{\@sglsuseriii}[1][]{\@glsuseriii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glssymbol}[2][]{% -\new@ifnextchar[{\@glssymbol@{#1}{#2}}{\@glssymbol@{#1}{#2}[]}} +\newcommand*{\@glsuseriii}[2][]{% +\new@ifnextchar[{\@glsuseriii@{#1}{#2}}{\@glsuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glssymbol@#1#2[#3]{% +\def\@glsuseriii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glssymbol shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrysymbol{#2}}% +\protected@edef\@glo@text{\glsentryuseriii{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % -% \cs{Glssymbol} behaves like \ics{glssymbol} except that the +% \cs{Glsuseriii} behaves like \ics{glsuseriii} except that the % first letter is converted to uppercase. -%\begin{macro}{\Glssymbol} +%\begin{macro}{\Glsuseriii} % \begin{macrocode} -\newcommand*{\Glssymbol}{\@ifstar\@sGlssymbol\@Glssymbol} +\newcommand*{\Glsuseriii}{\@ifstar\@sGlsuseriii\@Glsuseriii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlssymbol}[1][]{\@Glssymbol[hyper=false,#1]} +\newcommand*{\@sGlsuseriii}[1][]{\@Glsuseriii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glssymbol}[2][]{% -\new@ifnextchar[{\@Glssymbol@{#1}{#2}}{\@Glssymbol@{#1}{#2}[]}} +\newcommand*{\@Glsuseriii}[2][]{% +\new@ifnextchar[{\@Glsuseriii@{#1}{#2}}{\@Glsuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glssymbol@#1#2[#3]{% +\def\@Glsuseriii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('Glssymbol shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrysymbol{#2}}% +\protected@edef\@glo@text{\glsentryuseriii{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % -% \cs{GLSsymbol} behaves like \ics{glssymbol} except that the +% \cs{GLSuseriii} behaves like \ics{glsuseriii} except that the % link text is converted to uppercase. -%\begin{macro}{\GLSsymbol} +%\begin{macro}{\GLSuseriii} % \begin{macrocode} -\newcommand*{\GLSsymbol}{\@ifstar\@sGLSsymbol\@GLSsymbol} +\newcommand*{\GLSuseriii}{\@ifstar\@sGLSuseriii\@GLSuseriii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSsymbol}[1][]{\@GLSsymbol[hyper=false,#1]} +\newcommand*{\@sGLSuseriii}[1][]{\@GLSuseriii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSsymbol}[2][]{% -\new@ifnextchar[{\@GLSsymbol@{#1}{#2}}{\@GLSsymbol@{#1}{#2}[]}} +\newcommand*{\@GLSuseriii}[2][]{% +\new@ifnextchar[{\@GLSuseriii@{#1}{#2}}{\@GLSuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSsymbol@#1#2[#3]{% +\def\@GLSuseriii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSsymbol shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrysymbol{#2}}% +\protected@edef\@glo@text{\glsentryuseriii{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % -% \cs{glssymbolplural} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{symbolplural} key and it doesn't mark the entry as -% used. -%\begin{macro}{\glssymbolplural} +% \cs{glsuseriv} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{user4} key and it doesn't mark the entry +% as used. +%\begin{macro}{\glsuseriv} % \begin{macrocode} -\newcommand*{\glssymbolplural}{\@ifstar\@sglssymbolplural\@glssymbolplural} +\newcommand*{\glsuseriv}{\@ifstar\@sglsuseriv\@glsuseriv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglssymbolplural}[1][]{\@glssymbolplural[hyper=false,#1]} +\newcommand*{\@sglsuseriv}[1][]{\@glsuseriv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glssymbolplural}[2][]{% -\new@ifnextchar[{\@glssymbolplural@{#1}{#2}}{\@glssymbolplural@{#1}{#2}[]}} +\newcommand*{\@glsuseriv}[2][]{% +\new@ifnextchar[{\@glsuseriv@{#1}{#2}}{\@glsuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glssymbolplural@#1#2[#3]{% +\def\@glsuseriv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) -% \changes{1.12}{2008 Mar 8}{fixed bug ('glssymbolplural shouldn't use -% 'gls@\meta{type}@display)} % \begin{macrocode} -\protected@edef\@glo@text{\glsentrysymbolplural{#2}}% +\protected@edef\@glo@text{\glsentryuseriv{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % -% \cs{Glssymbolplural} behaves like \ics{glssymbolplural} except that the +% \cs{Glsuseriv} behaves like \ics{glsuseriv} except that the % first letter is converted to uppercase. -%\begin{macro}{\Glssymbolplural} +%\begin{macro}{\Glsuseriv} % \begin{macrocode} -\newcommand*{\Glssymbolplural}{\@ifstar\@sGlssymbolplural\@Glssymbolplural} +\newcommand*{\Glsuseriv}{\@ifstar\@sGlsuseriv\@Glsuseriv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlssymbolplural}[1][]{\@Glssymbolplural[hyper=false,#1]} +\newcommand*{\@sGlsuseriv}[1][]{\@Glsuseriv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glssymbolplural}[2][]{% -\new@ifnextchar[{\@Glssymbolplural@{#1}{#2}}{\@Glssymbolplural@{#1}{#2}[]}} +\newcommand*{\@Glsuseriv}[2][]{% +\new@ifnextchar[{\@Glsuseriv@{#1}{#2}}{\@Glsuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glssymbolplural@#1#2[#3]{% +\def\@Glsuseriv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentrysymbolplural{#2}}% +\protected@edef\@glo@text{\glsentryuseriv{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % -% \cs{GLSsymbolplural} behaves like \ics{glssymbolplural} except that the +% \cs{GLSuseriv} behaves like \ics{glsuseriv} except that the % link text is converted to uppercase. -%\begin{macro}{\GLSsymbolplural} +%\begin{macro}{\GLSuseriv} % \begin{macrocode} -\newcommand*{\GLSsymbolplural}{\@ifstar\@sGLSsymbolplural\@GLSsymbolplural} +\newcommand*{\GLSuseriv}{\@ifstar\@sGLSuseriv\@GLSuseriv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSsymbolplural}[1][]{\@GLSsymbolplural[hyper=false,#1]} +\newcommand*{\@sGLSuseriv}[1][]{\@GLSuseriv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSsymbolplural}[2][]{% -\new@ifnextchar[{\@GLSsymbolplural@{#1}{#2}}{\@GLSsymbolplural@{#1}{#2}[]}} +\newcommand*{\@GLSuseriv}[2][]{% +\new@ifnextchar[{\@GLSuseriv@{#1}{#2}}{\@GLSuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSsymbolplural@#1#2[#3]{% +\def\@GLSuseriv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentrysymbolplural{#2}}% +\protected@edef\@glo@text{\glsentryuseriv{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % -% \cs{glsuseri} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{user1} key and it doesn't mark the entry +% \cs{glsuserv} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{user5} key and it doesn't mark the entry % as used. -%\begin{macro}{\glsuseri} +%\begin{macro}{\glsuserv} % \begin{macrocode} -\newcommand*{\glsuseri}{\@ifstar\@sglsuseri\@glsuseri} +\newcommand*{\glsuserv}{\@ifstar\@sglsuserv\@glsuserv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsuseri}[1][]{\@glsuseri[hyper=false,#1]} +\newcommand*{\@sglsuserv}[1][]{\@glsuserv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsuseri}[2][]{% -\new@ifnextchar[{\@glsuseri@{#1}{#2}}{\@glsuseri@{#1}{#2}[]}} +\newcommand*{\@glsuserv}[2][]{% +\new@ifnextchar[{\@glsuserv@{#1}{#2}}{\@glsuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsuseri@#1#2[#3]{% +\def\@glsuserv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseri{#2}}% +\protected@edef\@glo@text{\glsentryuserv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} @@ -10254,32 +6433,32 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{Glsuseri} behaves like \ics{glsuseri} except that the +% \cs{Glsuserv} behaves like \ics{glsuserv} except that the % first letter is converted to uppercase. -%\begin{macro}{\Glsuseri} +%\begin{macro}{\Glsuserv} % \begin{macrocode} -\newcommand*{\Glsuseri}{\@ifstar\@sGlsuseri\@Glsuseri} +\newcommand*{\Glsuserv}{\@ifstar\@sGlsuserv\@Glsuserv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsuseri}[1][]{\@Glsuseri[hyper=false,#1]} +\newcommand*{\@sGlsuserv}[1][]{\@Glsuserv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsuseri}[2][]{% -\new@ifnextchar[{\@Glsuseri@{#1}{#2}}{\@Glsuseri@{#1}{#2}[]}} +\newcommand*{\@Glsuserv}[2][]{% +\new@ifnextchar[{\@Glsuserv@{#1}{#2}}{\@Glsuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsuseri@#1#2[#3]{% +\def\@Glsuserv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseri{#2}}% +\protected@edef\@glo@text{\glsentryuserv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} @@ -10289,32 +6468,32 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{GLSuseri} behaves like \ics{glsuseri} except that the +% \cs{GLSuserv} behaves like \ics{glsuserv} except that the % link text is converted to uppercase. -%\begin{macro}{\GLSuseri} +%\begin{macro}{\GLSuserv} % \begin{macrocode} -\newcommand*{\GLSuseri}{\@ifstar\@sGLSuseri\@GLSuseri} +\newcommand*{\GLSuserv}{\@ifstar\@sGLSuserv\@GLSuserv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSuseri}[1][]{\@GLSuseri[hyper=false,#1]} +\newcommand*{\@sGLSuserv}[1][]{\@GLSuserv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSuseri}[2][]{% -\new@ifnextchar[{\@GLSuseri@{#1}{#2}}{\@GLSuseri@{#1}{#2}[]}} +\newcommand*{\@GLSuserv}[2][]{% +\new@ifnextchar[{\@GLSuserv@{#1}{#2}}{\@GLSuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSuseri@#1#2[#3]{% +\def\@GLSuserv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseri{#2}}% +\protected@edef\@glo@text{\glsentryuserv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} @@ -10323,33 +6502,33 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{glsuserii} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{user2} key and it doesn't mark the entry +% \cs{glsuservi} behaves like \ics{gls} except it always uses the value +% given by the \gloskey{user6} key and it doesn't mark the entry % as used. -%\begin{macro}{\glsuserii} +%\begin{macro}{\glsuservi} % \begin{macrocode} -\newcommand*{\glsuserii}{\@ifstar\@sglsuserii\@glsuserii} +\newcommand*{\glsuservi}{\@ifstar\@sglsuservi\@glsuservi} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsuserii}[1][]{\@glsuserii[hyper=false,#1]} +\newcommand*{\@sglsuservi}[1][]{\@glsuservi[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsuserii}[2][]{% -\new@ifnextchar[{\@glsuserii@{#1}{#2}}{\@glsuserii@{#1}{#2}[]}} +\newcommand*{\@glsuservi}[2][]{% +\new@ifnextchar[{\@glsuservi@{#1}{#2}}{\@glsuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsuserii@#1#2[#3]{% +\def\@glsuservi@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuserii{#2}}% +\protected@edef\@glo@text{\glsentryuservi{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} @@ -10358,32 +6537,32 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{Glsuserii} behaves like \ics{glsuserii} except that the +% \cs{Glsuservi} behaves like \ics{glsuservi} except that the % first letter is converted to uppercase. -%\begin{macro}{\Glsuserii} +%\begin{macro}{\Glsuservi} % \begin{macrocode} -\newcommand*{\Glsuserii}{\@ifstar\@sGlsuserii\@Glsuserii} +\newcommand*{\Glsuservi}{\@ifstar\@sGlsuservi\@Glsuservi} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsuserii}[1][]{\@Glsuserii[hyper=false,#1]} +\newcommand*{\@sGlsuservi}[1][]{\@Glsuservi[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsuserii}[2][]{% -\new@ifnextchar[{\@Glsuserii@{#1}{#2}}{\@Glsuserii@{#1}{#2}[]}} +\newcommand*{\@Glsuservi}[2][]{% +\new@ifnextchar[{\@Glsuservi@{#1}{#2}}{\@Glsuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsuserii@#1#2[#3]{% +\def\@Glsuservi@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuserii{#2}}% +\protected@edef\@glo@text{\glsentryuservi{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} @@ -10393,32 +6572,32 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{GLSuserii} behaves like \ics{glsuserii} except that the +% \cs{GLSuservi} behaves like \ics{glsuservi} except that the % link text is converted to uppercase. -%\begin{macro}{\GLSuserii} +%\begin{macro}{\GLSuservi} % \begin{macrocode} -\newcommand*{\GLSuserii}{\@ifstar\@sGLSuserii\@GLSuserii} +\newcommand*{\GLSuservi}{\@ifstar\@sGLSuservi\@GLSuservi} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSuserii}[1][]{\@GLSuserii[hyper=false,#1]} +\newcommand*{\@sGLSuservi}[1][]{\@GLSuservi[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSuserii}[2][]{% -\new@ifnextchar[{\@GLSuserii@{#1}{#2}}{\@GLSuserii@{#1}{#2}[]}} +\newcommand*{\@GLSuservi}[2][]{% +\new@ifnextchar[{\@GLSuservi@{#1}{#2}}{\@GLSuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSuserii@#1#2[#3]{% +\def\@GLSuservi@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuserii{#2}}% +\protected@edef\@glo@text{\glsentryuservi{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} @@ -10427,419 +6606,474 @@ counter as its value}}{% } % \end{macrocode} % -% \cs{glsuseriii} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{user3} key and it doesn't mark the entry -% as used. -%\begin{macro}{\glsuseriii} +% Now deal with acronym related keys. First the short form: +%\begin{macro}{\acrshort} % \begin{macrocode} -\newcommand*{\glsuseriii}{\@ifstar\@sglsuseriii\@glsuseriii} +\newcommand*{\acrshort}{\@ifstar\s@acrshort\ns@acrshort} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsuseriii}[1][]{\@glsuseriii[hyper=false,#1]} +\newcommand*{\s@acrshort}[2][]{% + \new@ifnextchar[{\@acrshort{hyper=false,#1}{#2}}% + {\@acrshort{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsuseriii}[2][]{% -\new@ifnextchar[{\@glsuseriii@{#1}{#2}}{\@glsuseriii@{#1}{#2}[]}} +\newcommand*{\ns@acrshort}[2][]{% + \new@ifnextchar[{\@acrshort{#1}{#2}}{\@acrshort{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsuseriii@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseriii{#2}}% + \protected@edef\@glo@text{\glsentryshort{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text#3}% -}% + \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% + }% } % \end{macrocode} % -% \cs{Glsuseriii} behaves like \ics{glsuseriii} except that the -% first letter is converted to uppercase. -%\begin{macro}{\Glsuseriii} +%\begin{macro}{\Acrshort} % \begin{macrocode} -\newcommand*{\Glsuseriii}{\@ifstar\@sGlsuseriii\@Glsuseriii} +\newcommand*{\Acrshort}{\@ifstar\s@Acrshort\ns@Acrshort} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsuseriii}[1][]{\@Glsuseriii[hyper=false,#1]} +\newcommand*{\s@Acrshort}[2][]{% + \new@ifnextchar[{\@Acrshort{hyper=false,#1}{#2}}% + {\@Acrshort{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsuseriii}[2][]{% -\new@ifnextchar[{\@Glsuseriii@{#1}{#2}}{\@Glsuseriii@{#1}{#2}[]}} +\newcommand*{\ns@Acrshort}[2][]{% + \new@ifnextchar[{\@Acrshort{#1}{#2}}{\@Acrshort{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsuseriii@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@Acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseriii{#2}}% + \protected@edef\@glo@text{\glsentryshort{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% -}% + \@gls@link[#1]{#2}% + {% + \acronymfont{\expandafter\makefirstuc\expandafter{\@glo@text}}#3% + }% + }% } % \end{macrocode} % -% \cs{GLSuseriii} behaves like \ics{glsuseriii} except that the -% link text is converted to uppercase. -%\begin{macro}{\GLSuseriii} +%\begin{macro}{\ACRshort} % \begin{macrocode} -\newcommand*{\GLSuseriii}{\@ifstar\@sGLSuseriii\@GLSuseriii} +\newcommand*{\ACRshort}{\@ifstar\s@ACRshort\ns@ACRshort} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSuseriii}[1][]{\@GLSuseriii[hyper=false,#1]} +\newcommand*{\s@ACRshort}[2][]{% + \new@ifnextchar[{\@ACRshort{hyper=false,#1}{#2}}% + {\@ACRshort{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSuseriii}[2][]{% -\new@ifnextchar[{\@GLSuseriii@{#1}{#2}}{\@GLSuseriii@{#1}{#2}[]}} +\newcommand*{\ns@ACRshort}[2][]{% + \new@ifnextchar[{\@ACRshort{#1}{#2}}{\@ACRshort{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSuseriii@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@ACRshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseriii{#2}}% + \protected@edef\@glo@text{\glsentryshort{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% -}% + \@gls@link[#1]{#2}{\acronymfont{\MakeUppercase{\@glo@text#3}}}% + }% } % \end{macrocode} % -% \cs{glsuseriv} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{user4} key and it doesn't mark the entry -% as used. -%\begin{macro}{\glsuseriv} +% Short plural: +%\begin{macro}{\acrshortpl} % \begin{macrocode} -\newcommand*{\glsuseriv}{\@ifstar\@sglsuseriv\@glsuseriv} +\newcommand*{\acrshortpl}{\@ifstar\s@acrshortpl\ns@acrshortpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsuseriv}[1][]{\@glsuseriv[hyper=false,#1]} +\newcommand*{\s@acrshortpl}[2][]{% + \new@ifnextchar[{\@acrshortpl{hyper=false,#1}{#2}}% + {\@acrshortpl{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsuseriv}[2][]{% -\new@ifnextchar[{\@glsuseriv@{#1}{#2}}{\@glsuseriv@{#1}{#2}[]}} +\newcommand*{\ns@acrshortpl}[2][]{% + \new@ifnextchar[{\@acrshortpl{#1}{#2}}{\@acrshortpl{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsuseriv@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@acrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseriv{#2}}% + \protected@edef\@glo@text{\glsentryshortpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text#3}% -}% + \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% + }% } % \end{macrocode} % -% \cs{Glsuseriv} behaves like \ics{glsuseriv} except that the -% first letter is converted to uppercase. -%\begin{macro}{\Glsuseriv} +%\begin{macro}{\Acrshortpl} % \begin{macrocode} -\newcommand*{\Glsuseriv}{\@ifstar\@sGlsuseriv\@Glsuseriv} +\newcommand*{\Acrshortpl}{\@ifstar\s@Acrshortpl\ns@Acrshortpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsuseriv}[1][]{\@Glsuseriv[hyper=false,#1]} +\newcommand*{\s@Acrshortpl}[2][]{% + \new@ifnextchar[{\@Acrshortpl{hyper=false,#1}{#2}}% + {\@Acrshortpl{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsuseriv}[2][]{% -\new@ifnextchar[{\@Glsuseriv@{#1}{#2}}{\@Glsuseriv@{#1}{#2}[]}} +\newcommand*{\ns@Acrshortpl}[2][]{% + \new@ifnextchar[{\@Acrshortpl{#1}{#2}}{\@Acrshortpl{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsuseriv@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@Acrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseriv{#2}}% + \protected@edef\@glo@text{\glsentryshortpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% -}% + \@gls@link[#1]{#2}% + {% + \acronymfont{\expandafter\makefirstuc\expandafter{\@glo@text}}#3% + }% + }% } % \end{macrocode} % -% \cs{GLSuseriv} behaves like \ics{glsuseriv} except that the -% link text is converted to uppercase. -%\begin{macro}{\GLSuseriv} +%\begin{macro}{\ACRshortpl} % \begin{macrocode} -\newcommand*{\GLSuseriv}{\@ifstar\@sGLSuseriv\@GLSuseriv} +\newcommand*{\ACRshortpl}{\@ifstar\s@ACRshortpl\ns@ACRshortpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSuseriv}[1][]{\@GLSuseriv[hyper=false,#1]} +\newcommand*{\s@ACRshortpl}[2][]{% + \new@ifnextchar[{\@ACRshortpl{hyper=false,#1}{#2}}% + {\@ACRshortpl{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSuseriv}[2][]{% -\new@ifnextchar[{\@GLSuseriv@{#1}{#2}}{\@GLSuseriv@{#1}{#2}[]}} +\newcommand*{\ns@ACRshortpl}[2][]{% + \new@ifnextchar[{\@ACRshortpl{#1}{#2}}{\@ACRshortpl{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSuseriv@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@ACRshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuseriv{#2}}% + \protected@edef\@glo@text{\glsentryshortpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% -}% + \@gls@link[#1]{#2}{\acronymfont{\MakeUppercase{\@glo@text#3}}}% + }% } % \end{macrocode} % -% \cs{glsuserv} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{user5} key and it doesn't mark the entry -% as used. -%\begin{macro}{\glsuserv} +%\begin{macro}{\acrlong} % \begin{macrocode} -\newcommand*{\glsuserv}{\@ifstar\@sglsuserv\@glsuserv} +\newcommand*{\acrlong}{\@ifstar\s@acrlong\ns@acrlong} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsuserv}[1][]{\@glsuserv[hyper=false,#1]} +\newcommand*{\s@acrlong}[2][]{% + \new@ifnextchar[{\@acrlong{hyper=false,#1}{#2}}% + {\@acrlong{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsuserv}[2][]{% -\new@ifnextchar[{\@glsuserv@{#1}{#2}}{\@glsuserv@{#1}{#2}[]}} +\newcommand*{\ns@acrlong}[2][]{% + \new@ifnextchar[{\@acrlong{#1}{#2}}{\@acrlong{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsuserv@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuserv{#2}}% + \protected@edef\@glo@text{\glsentrylong{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text#3}% -}% + \@gls@link[#1]{#2}{\@glo@text#3}% + }% } % \end{macrocode} % -% \cs{Glsuserv} behaves like \ics{glsuserv} except that the -% first letter is converted to uppercase. -%\begin{macro}{\Glsuserv} +%\begin{macro}{\Acrlong} % \begin{macrocode} -\newcommand*{\Glsuserv}{\@ifstar\@sGlsuserv\@Glsuserv} +\newcommand*{\Acrlong}{\@ifstar\s@Acrlong\ns@Acrlong} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsuserv}[1][]{\@Glsuserv[hyper=false,#1]} +\newcommand*{\s@Acrlong}[2][]{% + \new@ifnextchar[{\@Acrlong{hyper=false,#1}{#2}}% + {\@Acrlong{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsuserv}[2][]{% -\new@ifnextchar[{\@Glsuserv@{#1}{#2}}{\@Glsuserv@{#1}{#2}[]}} +\newcommand*{\ns@Acrlong}[2][]{% + \new@ifnextchar[{\@Acrlong{#1}{#2}}{\@Acrlong{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsuserv@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@Acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuserv{#2}}% + \protected@edef\@glo@text{\glsentrylong{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% -}% + \@gls@link[#1]{#2}% + {% + \expandafter\makefirstuc\expandafter{\@glo@text}#3% + }% + }% } % \end{macrocode} % -% \cs{GLSuserv} behaves like \ics{glsuserv} except that the -% link text is converted to uppercase. -%\begin{macro}{\GLSuserv} +%\begin{macro}{\ACRlong} % \begin{macrocode} -\newcommand*{\GLSuserv}{\@ifstar\@sGLSuserv\@GLSuserv} +\newcommand*{\ACRlong}{\@ifstar\s@ACRlong\ns@ACRlong} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSuserv}[1][]{\@GLSuserv[hyper=false,#1]} +\newcommand*{\s@ACRlong}[2][]{% + \new@ifnextchar[{\@ACRlong{hyper=false,#1}{#2}}% + {\@ACRlong{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSuserv}[2][]{% -\new@ifnextchar[{\@GLSuserv@{#1}{#2}}{\@GLSuserv@{#1}{#2}[]}} +\newcommand*{\ns@ACRlong}[2][]{% + \new@ifnextchar[{\@ACRlong{#1}{#2}}{\@ACRlong{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSuserv@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@ACRlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuserv{#2}}% + \protected@edef\@glo@text{\glsentrylong{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% -}% + \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% + }% } % \end{macrocode} % -% \cs{glsuservi} behaves like \ics{gls} except it always uses the value -% given by the \gloskey{user6} key and it doesn't mark the entry -% as used. -%\begin{macro}{\glsuservi} +% Short plural: +%\begin{macro}{\acrlongpl} % \begin{macrocode} -\newcommand*{\glsuservi}{\@ifstar\@sglsuservi\@glsuservi} +\newcommand*{\acrlongpl}{\@ifstar\s@acrlongpl\ns@acrlongpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sglsuservi}[1][]{\@glsuservi[hyper=false,#1]} +\newcommand*{\s@acrlongpl}[2][]{% + \new@ifnextchar[{\@acrlongpl{hyper=false,#1}{#2}}% + {\@acrlongpl{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@glsuservi}[2][]{% -\new@ifnextchar[{\@glsuservi@{#1}{#2}}{\@glsuservi@{#1}{#2}[]}} +\newcommand*{\ns@acrlongpl}[2][]{% + \new@ifnextchar[{\@acrlongpl{#1}{#2}}{\@acrlongpl{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@glsuservi@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@acrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuservi{#2}}% + \protected@edef\@glo@text{\glsentrylongpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text#3}% -}% + \@gls@link[#1]{#2}{\@glo@text#3}% + }% } % \end{macrocode} % -% \cs{Glsuservi} behaves like \ics{glsuservi} except that the -% first letter is converted to uppercase. -%\begin{macro}{\Glsuservi} +%\begin{macro}{\Acrlongpl} % \begin{macrocode} -\newcommand*{\Glsuservi}{\@ifstar\@sGlsuservi\@Glsuservi} +\newcommand*{\Acrlongpl}{\@ifstar\s@Acrlongpl\ns@Acrlongpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGlsuservi}[1][]{\@Glsuservi[hyper=false,#1]} +\newcommand*{\s@Acrlongpl}[2][]{% + \new@ifnextchar[{\@Acrlongpl{hyper=false#1}{#2}}% + {\@Acrlongpl{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@Glsuservi}[2][]{% -\new@ifnextchar[{\@Glsuservi@{#1}{#2}}{\@Glsuservi@{#1}{#2}[]}} +\newcommand*{\ns@Acrlongpl}[2][]{% + \new@ifnextchar[{\@Acrlongpl{#1}{#2}}{\@Acrlongpl{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@Glsuservi@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@Acrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuservi{#2}}% + \protected@edef\@glo@text{\glsentrylongpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} -\@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}#3}% -}% + \@gls@link[#1]{#2}% + {% + \expandafter\makefirstuc\expandafter{\@glo@text}#3% + }% + }% } % \end{macrocode} % -% \cs{GLSuservi} behaves like \ics{glsuservi} except that the -% link text is converted to uppercase. -%\begin{macro}{\GLSuservi} +%\begin{macro}{\ACRlongpl} % \begin{macrocode} -\newcommand*{\GLSuservi}{\@ifstar\@sGLSuservi\@GLSuservi} +\newcommand*{\ACRlongpl}{\@ifstar\s@ACRlongpl\ns@ACRlongpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} -\newcommand*{\@sGLSuservi}[1][]{\@GLSuservi[hyper=false,#1]} +\newcommand*{\s@ACRlongpl}[2][]{% + \new@ifnextchar[{\@ACRlongpl{hyper=false,#1}{#2}}% + {\@ACRlongpl{hyper=false,#1}{#2}[]}% +} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} -\newcommand*{\@GLSuservi}[2][]{% -\new@ifnextchar[{\@GLSuservi@{#1}{#2}}{\@GLSuservi@{#1}{#2}[]}} +\newcommand*{\ns@ACRlongpl}[2][]{% + \new@ifnextchar[{\@ACRlongpl{#1}{#2}}{\@ACRlongpl{#1}{#2}[]}% +} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} -\def\@GLSuservi@#1#2[#3]{% -\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% +\def\@ACRlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} -\protected@edef\@glo@text{\glsentryuservi{#2}}% + \protected@edef\@glo@text{\glsentrylongpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} -% \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% -}% +% \begin{macrocode} + \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% + }% } % \end{macrocode} % @@ -11126,6 +7360,108 @@ counter as its value}}{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsentryshort} +% Get the short key (as specified by the +% \gloskey{short} the entry was defined). The argument +% is the label associated with the entry. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\glsentryshort}[1]{\csname glo@#1@short\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Glsentryshort} +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\Glsentryshort}[1]{% +\protected@edef\@glo@text{\csname glo@#1@short\endcsname}% +\expandafter\makefirstuc\expandafter{\@glo@text}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsentryshortpl} +% Get the short plural key (as specified by the +% \gloskey{shortplural} the entry was defined). The argument +% is the label associated with the entry. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\glsentryshortpl}[1]{\csname glo@#1@shortpl\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Glsentryshortpl} +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\Glsentryshortpl}[1]{% +\protected@edef\@glo@text{\csname glo@#1@shortpl\endcsname}% +\expandafter\makefirstuc\expandafter{\@glo@text}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsentrylong} +% Get the long key (as specified by the +% \gloskey{long} the entry was defined). The argument +% is the label associated with the entry. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\glsentrylong}[1]{\csname glo@#1@long\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Glsentrylong} +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\Glsentrylong}[1]{% +\protected@edef\@glo@text{\csname glo@#1@long\endcsname}% +\expandafter\makefirstuc\expandafter{\@glo@text}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsentrylongpl} +% Get the long plural key (as specified by the +% \gloskey{longplural} the entry was defined). The argument +% is the label associated with the entry. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\glsentrylongpl}[1]{\csname glo@#1@longpl\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Glsentrylongpl} +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\Glsentrylongpl}[1]{% +\protected@edef\@glo@text{\csname glo@#1@longpl\endcsname}% +\expandafter\makefirstuc\expandafter{\@glo@text}} +% \end{macrocode} +%\end{macro} +% +% Short cut macros to access full form: +%\begin{macro}{\glsentryfull} +% \begin{macrocode} +\newcommand*{\glsentryfull}[1]{% + \glsentrylong{#1}\space(\glsentryshort{#1})% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Glsentryfull} +% \begin{macrocode} +\newcommand*{\Glsentryfull}[1]{% + \Glsentrylong{#1}\space(\glsentryshort{#1})% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsentryfullpl} +% \begin{macrocode} +\newcommand*{\glsentryfullpl}[1]{% + \glsentrylongpl{#1}\space(\glsentryshort{#1})% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Glsentryfullpl} +% \begin{macrocode} +\newcommand*{\Glsentryfullpl}[1]{% + \Glsentrylongpl{#1}\space(\glsentryshort{#1})% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glshyperlink} % Provide a hyperlink to a glossary entry without adding information % to the glossary file. The entry needs to be added using a @@ -11134,8 +7470,10 @@ counter as its value}}{% % the link text. The entry name is used by default. The second % argument is the entry label. %\changes{1.17}{2008 December 26}{new} +%\changes{3.0}{2011/04/02}{changed default from \cs{glsentryname} +%to \cs{glsentrytext}} % \begin{macrocode} -\newcommand*{\glshyperlink}[2][\glsentryname{\@glo@label}]{% +\newcommand*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{% \def\@glo@label{#2}% \@glslink{glo:#2}{#1}} % \end{macrocode} @@ -11169,14 +7507,19 @@ counter as its value}}{% %\changes{2.04}{2009 November 10}{fixed bug that ignored counter} % \begin{macrocode} \newcommand*{\glsadd}[2][]{% -\glsdoifexists{#2}{% -\def\@glsnumberformat{glsnumberformat}% -\edef\@gls@counter{\csname glo@#2@counter\endcsname}% -\setkeys{glossadd}{#1}% -\edef\theglsentrycounter{\expandafter\noexpand - \csname the\@gls@counter\endcsname}% -\@do@wrglossary{#2}% -}} + \glsdoifexists{#2}% + {% + \def\@glsnumberformat{glsnumberformat}% + \edef\@gls@counter{\csname glo@#2@counter\endcsname}% + \setkeys{glossadd}{#1}% +% \end{macrocode} +% Store the entry's counter in \cs{theglsentrycounter} +%\changes{3.0}{2011/04/02}{added \cs{@gls@saveentrycounter}} +% \begin{macrocode} + \@gls@saveentrycounter + \@do@wrglossary{#2}% + }% +} % \end{macrocode} %\end{macro} %\vskip5pt @@ -11288,140 +7631,115 @@ counter as its value}}{% \fi % \end{macrocode} %\end{macro} -% + %\begin{macro}{\writeist} %\changes{1.17}{2008 December 26}{added xindy support} %\changes{1.01}{2007 May 17}{Added spaces after 'delimN and 'delimR in ist file}% +%\changes{3.0}{2011/04/02}{modified to support new format} % \begin{macrocode} -\newwrite\istfile \ifglsxindy % \end{macrocode} % Code to use if \app{xindy} is required. % \begin{macrocode} \def\writeist{% % \end{macrocode} -% Open the style file +% Update attributes list % \begin{macrocode} - \openout\istfile=\istfilename + \@gls@addpredefinedattributes +% \end{macrocode} +% Open the file. +% \begin{macrocode} + \openout\glswrite=\istfilename % \end{macrocode} % Write header comment at the start of the file % \begin{macrocode} - \write\istfile{;; xindy style file created by the glossaries - package}% - \write\istfile{;; for document '\jobname' on - \the\year-\the\month-\the\day}% + \write\glswrite{;; xindy style file created by the glossaries + package}% + \write\glswrite{;; for document '\jobname' on + \the\year-\the\month-\the\day}% % \end{macrocode} % Specify the required styles % \begin{macrocode} - \write\istfile{^^J; required styles^^J} + \write\glswrite{^^J; required styles^^J} \@for\@xdystyle:=\@xdyrequiredstyles\do{% - \ifx\@xdystyle\@empty - \else - \protected@write\istfile{}{(require - \string"\@xdystyle.xdy\string")}% - \fi + \ifx\@xdystyle\@empty + \else + \protected@write\glswrite{}{(require + \string"\@xdystyle.xdy\string")}% + \fi }% % \end{macrocode} % List the allowed attributes (possible values used by the % \gloskey{format} key) % \begin{macrocode} - \write\istfile{^^J% + \write\glswrite{^^J% ; list of allowed attributes (number formats)^^J}% - \write\istfile{(define-attributes ((\@xdyattributes)))}% + \write\glswrite{(define-attributes ((\@xdyattributes)))}% % \end{macrocode} % Define any additional alphabets % \begin{macrocode} - \write\istfile{^^J; user defined alphabets^^J}% - \write\istfile{\@xdyuseralphabets}% + \write\glswrite{^^J; user defined alphabets^^J}% + \write\glswrite{\@xdyuseralphabets}% % \end{macrocode} % Define location classes. % \begin{macrocode} - \write\istfile{^^J; location class definitions^^J}% -% \end{macrocode} -% Lower case Roman numerals (i, ii, \ldots). In the event that -% \ics{roman} has been redefined to produce a fancy form of -% roman numerals, attempt to work out how it will be written -% to the output file. -% \begin{macrocode} - \protected@edef\@gls@roman{\@roman{0\string" - \string"roman-numbers-lowercase\string" :sep \string"}}% - \@onelevel@sanitize\@gls@roman - \edef\@tmp{\string" \string"roman-numbers-lowercase\string" - :sep \string"}% - \@onelevel@sanitize\@tmp - \ifx\@tmp\@gls@roman - \write\istfile{(define-location-class - \string"roman-page-numbers\string"^^J\space\space\space - (\string"roman-numbers-lowercase\string") - :min-range-length \@glsminrange)}% - \else - \write\istfile{(define-location-class - \string"roman-page-numbers\string"^^J\space\space\space - (:sep "\@gls@roman") - :min-range-length \@glsminrange)}% - \fi -% \end{macrocode} -% Upper case Roman numerals (I, II, \ldots) -% \begin{macrocode} - \write\istfile{(define-location-class - \string"Roman-page-numbers\string"^^J\space\space\space - (\string"roman-numbers-uppercase\string") - :min-range-length \@glsminrange)}% -% \end{macrocode} -% Arabic numbers (1, 2, \ldots) -% \begin{macrocode} - \write\istfile{(define-location-class - \string"arabic-page-numbers\string"^^J\space\space\space - (\string"arabic-numbers\string") - :min-range-length \@glsminrange)}% -% \end{macrocode} -% Lower case alphabetical locations (a, b, \ldots) -% \begin{macrocode} - \write\istfile{(define-location-class - \string"alpha-page-numbers\string"^^J\space\space\space - (\string"alpha\string") - :min-range-length \@glsminrange)}% + \write\glswrite{^^J; location class definitions^^J}% % \end{macrocode} -% Upper case alphabetical locations (A, B, \ldots) +% As from version 3.0, locations are now specified as +% \marg{Hprefix}\marg{number}, so need to add all possible +% combinations of location types. % \begin{macrocode} - \write\istfile{(define-location-class - \string"Alpha-page-numbers\string"^^J\space\space\space - (\string"ALPHA\string") - :min-range-length \@glsminrange)}% + \@for\@gls@classI:=\@gls@xdy@locationlist\do{% % \end{macrocode} -% Appendix style locations (e.g.\ A-1, A-2, \ldots, B-1, B-2, -% \ldots). The separator is given by \ics{@glsAlphacompositor}. +% Case were \meta{Hprefix} is empty: % \begin{macrocode} - \write\istfile{(define-location-class - \string"Appendix-page-numbers\string"^^J\space\space\space - (\string"ALPHA\string" - :sep \string"\@glsAlphacompositor\string" - \string"arabic-numbers\string") - :min-range-length \@glsminrange)}% + \protected@write\glswrite{}{(define-location-class + \string"\@gls@classI\string"^^J\space\space\space + ( + :sep "{}{" + \csname @gls@xdy@Lclass@\@gls@classI\endcsname\space + :sep "}" + ) + ^^J\space\space\space + :min-range-length \@glsminrange^^J% + ) + }% % \end{macrocode} -% Section number style locations (e.g.\ 1.1, 1.2, \ldots). The -% compositor is given by \ics{glscompositor}. +% Nested iteration over all classes: % \begin{macrocode} - \write\istfile{(define-location-class - \string"arabic-section-numbers\string"^^J\space\space\space - (\string"arabic-numbers\string" - :sep \string"\glscompositor\string" - \string"arabic-numbers\string") - :min-range-length \@glsminrange)}% + {% + \@for\@gls@classII:=\@gls@xdy@locationlist\do{% + \protected@write\glswrite{}{(define-location-class + \string"\@gls@classII-\@gls@classI\string" + ^^J\space\space\space + ( + :sep "{" + \csname @gls@xdy@Lclass@\@gls@classII\endcsname\space + :sep "}{" + \csname @gls@xdy@Lclass@\@gls@classI\endcsname\space + :sep "}" + ) + ^^J\space\space\space + :min-range-length \@glsminrange^^J% + ) + }% + }% + }% + }% % \end{macrocode} -% User defined location classes. +% User defined location classes (needs checking for new location format). % \begin{macrocode} - \write\istfile{^^J; user defined location classes}% - \write\istfile{\@xdyuserlocationdefs}% + \write\glswrite{^^J; user defined location classes}% + \write\glswrite{\@xdyuserlocationdefs}% % \end{macrocode} % Cross-reference class. (The unverified option is used as the % cross-references are supplied using the list of labels along with % the optional argument for \ics{glsseeformat} which % \app{xindy} won't recognise.) % \begin{macrocode} - \write\istfile{^^J; define cross-reference class^^J}% - \write\istfile{(define-crossref-class \string"see\string" - :unverified )}% + \write\glswrite{^^J; define cross-reference class^^J}% + \write\glswrite{(define-crossref-class \string"see\string" + :unverified )}% % \end{macrocode} % Define how cross-references should be displayed. This adds an % empty set of braces after the cross-referencing information @@ -11429,59 +7747,91 @@ counter as its value}}{% % gets ignored. (When using \app{makeindex} this final argument % contains the location information which is not required.) % \begin{macrocode} - \write\istfile{(markup-crossref-list - :class \string"see\string"^^J\space\space\space - :open \string"\string\glsseeformat\string" - :close \string"{}\string")}% + \write\glswrite{(markup-crossref-list + :class \string"see\string"^^J\space\space\space + :open \string"\string\glsseeformat\string" + :close \string"{}\string")}% % \end{macrocode} % List the order to sort the classes. % \begin{macrocode} - \write\istfile{^^J; define the order of the location classes}% - \write\istfile{(define-location-class-order - (\@xdylocationclassorder))}% + \write\glswrite{^^J; define the order of the location classes}% + \write\glswrite{(define-location-class-order + (\@xdylocationclassorder))}% % \end{macrocode} % Specify what to write to the start and end of the glossary file. % \begin{macrocode} - \write\istfile{^^J; define the glossary markup^^J}% - \write\istfile{(markup-index^^J\space\space\space - :open \string"\string - \glossarysection[\string\glossarytoctitle]{\string - \glossarytitle}\string\glossarypreamble\string~n\string\begin - {theglossary}\string\glossaryheader\string~n\string" ^^J\space - \space\space:close \string"\expandafter\@gobble - \string\%\string~n\string - \end{theglossary}\string\glossarypostamble - \string~n\string" ^^J\space\space\space - :tree)}% + \write\glswrite{^^J; define the glossary markup^^J}% +% \end{macrocode} +%\changes{3.0}{2011/04/02}{added xindy-only macro definitions to +%glossary open tag} +% \begin{macrocode} + \write\glswrite{(markup-index^^J\space\space\space + :open \string"\string + \glossarysection[\string\glossarytoctitle]{\string + \glossarytitle}\string\glossarypreamble}% +% \end{macrocode} +% Add all the xindy-only macro definitions (needed to prevent errors +% in the event that the user changes from \pkgopt{xindy} to +% \pkgopt{makeindex}) +% \begin{macrocode} + \@for\@this@ctr:=\@xdycounters\do{% + {% + \@for\@this@attr:=\@xdyattributelist\do{% + \protected@write\glswrite{}{\string\providecommand*% + \expandafter\string + \csname glsX\@this@ctr X\@this@attr\endcsname[2]% + {% + \string\setentrycounter + [\expandafter\@gobble\string\#1]{\@this@ctr}% + \expandafter\string + \csname\@this@attr\endcsname + {\expandafter\@gobble\string\#2}% + }% + }% + }% + }% + }% +% \end{macrocode} +% Add the end part of the open tag and the rest of the markup-index +% information: +% \begin{macrocode} + \write\glswrite{% + \string\begin + {theglossary}\string\glossaryheader\string~n\string" ^^J\space + \space\space:close \string"\expandafter\@gobble + \string\%\string~n\string + \end{theglossary}\string\glossarypostamble + \string~n\string" ^^J\space\space\space + :tree)}% % \end{macrocode} % Specify what to put between letter groups % \begin{macrocode} - \write\istfile{(markup-letter-group-list - :sep \string"\string\glsgroupskip\string~n\string")}% + \write\glswrite{(markup-letter-group-list + :sep \string"\string\glsgroupskip\string~n\string")}% % \end{macrocode} % Specify what to put between entries % \begin{macrocode} - \write\istfile{(markup-indexentry - :open \string"\string\relax \string\glsresetentrylist - \string~n\string")}% + \write\glswrite{(markup-indexentry + :open \string"\string\relax \string\glsresetentrylist + \string~n\string")}% % \end{macrocode} % Specify how to format entries % \begin{macrocode} - \write\istfile{(markup-locclass-list :open - \string"\glsopenbrace\string\glossaryentrynumbers - \glsopenbrace\string\relax\space \string"^^J\space\space\space - :sep \string", \string" - :close \string"\glsclosebrace\glsclosebrace\string")}% + \write\glswrite{(markup-locclass-list :open + \string"\glsopenbrace\string\glossaryentrynumbers + \glsopenbrace\string\relax\space \string"^^J\space\space\space + :sep \string", \string" + :close \string"\glsclosebrace\glsclosebrace\string")}% % \end{macrocode} % Specify how to separate location numbers % \begin{macrocode} - \write\istfile{(markup-locref-list - :sep \string"\string\delimN\space\string")}% + \write\glswrite{(markup-locref-list + :sep \string"\string\delimN\space\string")}% % \end{macrocode} % Specify how to indicate location ranges % \begin{macrocode} - \write\istfile{(markup-range - :sep \string"\string\delimR\space\string")}% + \write\glswrite{(markup-range + :sep \string"\string\delimR\space\string")}% % \end{macrocode} % Specify 2-page and 3-page suffixes, if defined. % First, the values must be sanitized to write them explicity. @@ -11492,44 +7842,52 @@ counter as its value}}{% % \begin{macrocode} \ifx\gls@suffixF\@empty \else - \write\istfile{(markup-range - :close "\gls@suffixF" :length 1 :ignore-end)}% + \write\glswrite{(markup-range + :close "\gls@suffixF" :length 1 :ignore-end)}% \fi \ifx\gls@suffixFF\@empty \else - \write\istfile{(markup-range - :close "\gls@suffixFF" :length 2 :ignore-end)}% + \write\glswrite{(markup-range + :close "\gls@suffixFF" :length 2 :ignore-end)}% \fi % \end{macrocode} % Specify how to format locations. % \begin{macrocode} - \write\istfile{^^J; define format to use for locations^^J}% - \write\istfile{\@xdylocref}% + \write\glswrite{^^J; define format to use for locations^^J}% + \write\glswrite{\@xdylocref}% % \end{macrocode} % Specify how to separate letter groups. % \begin{macrocode} - \write\istfile{^^J; define letter group list format^^J}% - \write\istfile{(markup-letter-group-list - :sep \string"\string\glsgroupskip\string~n\string")}% + \write\glswrite{^^J; define letter group list format^^J}% + \write\glswrite{(markup-letter-group-list + :sep \string"\string\glsgroupskip\string~n\string")}% % \end{macrocode} % Define letter group headings. % \begin{macrocode} - \write\istfile{^^J; letter group headings^^J}% - \write\istfile{(markup-letter-group - :open-head \string"\string\glsgroupheading - \glsopenbrace\string"^^J\space\space\space - :close-head \string"\glsclosebrace\string")}% + \write\glswrite{^^J; letter group headings^^J}% + \write\glswrite{(markup-letter-group + :open-head \string"\string\glsgroupheading + \glsopenbrace\string"^^J\space\space\space + :close-head \string"\glsclosebrace\string")}% % \end{macrocode} % Define additional letter groups. % \begin{macrocode} - \write\istfile{^^J; additional letter groups^^J}% - \write\istfile{\@xdylettergroups}% + \write\glswrite{^^J; additional letter groups^^J}% + \write\glswrite{\@xdylettergroups}% % \end{macrocode} % Define additional sort rules % \begin{macrocode} - \write\istfile{^^J; additional sort rules^^J} - \write\istfile{\@xdysortrules}% - \noist} + \write\glswrite{^^J; additional sort rules^^J} + \write\glswrite{\@xdysortrules}% +% \end{macrocode} +% Close the style file +% \begin{macrocode} + \closeout\glswrite +% \end{macrocode} +% Suppress any further calls. +% \begin{macrocode} + \let\writeist\relax + } \else % \end{macrocode} % Code to use if \app{makeindex} is required. @@ -11540,83 +7898,87 @@ counter as its value}}{% \edef\@gls@levelchar{\string!} \edef\@gls@quotechar{\string"} \def\writeist{\relax - \openout\istfile=\istfilename - \write\istfile{\expandafter\@gobble\string\% makeindex style file + \openout\glswrite=\istfilename + \write\glswrite{\expandafter\@gobble\string\% makeindex style file created by the glossaries package} - \write\istfile{\expandafter\@gobble\string\% for document + \write\glswrite{\expandafter\@gobble\string\% for document '\jobname' on \the\year-\the\month-\the\day} - \write\istfile{actual '\@gls@actualchar'} - \write\istfile{encap '\@gls@encapchar'} - \write\istfile{level '\@gls@levelchar'} - \write\istfile{quote '\@gls@quotechar'} - \write\istfile{keyword \string"\string\\glossaryentry\string"} - \write\istfile{preamble \string"\string\\glossarysection[\string + \write\glswrite{actual '\@gls@actualchar'} + \write\glswrite{encap '\@gls@encapchar'} + \write\glswrite{level '\@gls@levelchar'} + \write\glswrite{quote '\@gls@quotechar'} + \write\glswrite{keyword \string"\string\\glossaryentry\string"} + \write\glswrite{preamble \string"\string\\glossarysection[\string \\glossarytoctitle]{\string\\glossarytitle}\string \\glossarypreamble\string\n\string\\begin{theglossary}\string \\glossaryheader\string\n\string"} - \write\istfile{postamble \string"\string\%\string\n\string + \write\glswrite{postamble \string"\string\%\string\n\string \\end{theglossary}\string\\glossarypostamble\string\n \string"} - \write\istfile{group_skip \string"\string\\glsgroupskip\string\n + \write\glswrite{group_skip \string"\string\\glsgroupskip\string\n \string"} - \write\istfile{item_0 \string"\string\%\string\n\string"} - \write\istfile{item_1 \string"\string\%\string\n\string"} - \write\istfile{item_2 \string"\string\%\string\n\string"} - \write\istfile{item_01 \string"\string\%\string\n\string"} - \write\istfile{item_x1 + \write\glswrite{item_0 \string"\string\%\string\n\string"} + \write\glswrite{item_1 \string"\string\%\string\n\string"} + \write\glswrite{item_2 \string"\string\%\string\n\string"} + \write\glswrite{item_01 \string"\string\%\string\n\string"} + \write\glswrite{item_x1 \string"\string\\relax \string\\glsresetentrylist\string\n \string"} - \write\istfile{item_12 \string"\string\%\string\n\string"} - \write\istfile{item_x2 + \write\glswrite{item_12 \string"\string\%\string\n\string"} + \write\glswrite{item_x2 \string"\string\\relax \string\\glsresetentrylist\string\n \string"} % \end{macrocode} %\changes{2.05}{2010 Feb 6}{Added \cs{string} before opening % and closing braces. Patch provided by Segiu Dotenco} % \begin{macrocode} - \write\istfile{delim_0 \string"\string\{\string + \write\glswrite{delim_0 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} - \write\istfile{delim_1 \string"\string\{\string + \write\glswrite{delim_1 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} - \write\istfile{delim_2 \string"\string\{\string + \write\glswrite{delim_2 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} - \write\istfile{delim_t \string"\string\}\string\}\string"} - \write\istfile{delim_n \string"\string\\delimN \string"} - \write\istfile{delim_r \string"\string\\delimR \string"} - \write\istfile{headings_flag 1} - \write\istfile{heading_prefix + \write\glswrite{delim_t \string"\string\}\string\}\string"} + \write\glswrite{delim_n \string"\string\\delimN \string"} + \write\glswrite{delim_r \string"\string\\delimR \string"} + \write\glswrite{headings_flag 1} + \write\glswrite{heading_prefix \string"\string\\glsgroupheading\string\{\string"} - \write\istfile{heading_suffix + \write\glswrite{heading_suffix \string"\string\}\string\\relax \string\\glsresetentrylist \string"} - \write\istfile{symhead_positive \string"glssymbols\string"} - \write\istfile{numhead_positive \string"glsnumbers\string"} - \write\istfile{page_compositor \string"\glscompositor\string"} + \write\glswrite{symhead_positive \string"glssymbols\string"} + \write\glswrite{numhead_positive \string"glsnumbers\string"} + \write\glswrite{page_compositor \string"\glscompositor\string"} \@gls@escbsdq\gls@suffixF \@gls@escbsdq\gls@suffixFF \ifx\gls@suffixF\@empty \else - \write\istfile{suffix_2p \string"\gls@suffixF\string"} + \write\glswrite{suffix_2p \string"\gls@suffixF\string"} \fi \ifx\gls@suffixFF\@empty \else - \write\istfile{suffix_3p \string"\gls@suffixFF\string"} + \write\glswrite{suffix_3p \string"\gls@suffixFF\string"} \fi - \noist + \closeout\glswrite + \let\writeist\relax } \fi % \end{macrocode} %\end{macro} % %The command \cs{noist} will suppress the creation of -% the \filetype{.ist} file (it simply redefines -% \cs{writeist} to do nothing). Obviously you need to use this -% command before \cs{writeist} to have any effect. Since -% the \filetype{.ist} file should only be created once, \cs{noist} -% is called at the end of \cs{writeist}. +% the \filetype{.ist} file. Obviously you need to use this +% command before \cs{writeist} to have any effect. %\begin{macro}{\noist} % \begin{macrocode} -\newcommand{\noist}{\let\writeist\relax} +\newcommand{\noist}{% +% \end{macrocode} +% Update attributes list +% \begin{macrocode} + \@gls@addpredefinedattributes + \let\writeist\relax +} % \end{macrocode} %\end{macro} % @@ -11638,17 +8000,39 @@ counter as its value}}{% %\begin{macro}{\@makeglossary} % \begin{macrocode} \newcommand*{\@makeglossary}[1]{% -\ifglossaryexists{#1}{% -\edef\glo@out{\csname @glotype@#1@out\endcsname}% -\expandafter\newwrite\csname glo@#1@file\endcsname -\edef\@glo@file{\csname glo@#1@file\endcsname}% -\immediate\openout\@glo@file=\jobname.\glo@out -\@gls@renewglossary -\PackageInfo{glossaries}{Writing glossary file \jobname.\glo@out} -\writeist -}{\PackageError{glossaries}{% -Glossary type `#1' not defined}{New glossaries must be defined before -using \string\makeglossary}}} + \ifglossaryexists{#1}% + {% +% \end{macrocode} +% Only create a new write if \pkgopt[false]{savewrites} otherwise +% create a token to collect the information. +%\changes{3.0}{2010 Jul 12}{Added check for \pkgopt{savewrites}} +% \begin{macrocode} + \ifglssavewrites + \expandafter\newtoks\csname glo@#1@filetok\endcsname + \else + \expandafter\newwrite\csname glo@#1@file\endcsname + \expandafter\@glsopenfile\csname glo@#1@file\endcsname{#1}% + \fi + \@gls@renewglossary + \writeist + }% + {% + \PackageError{glossaries}% + {Glossary type `#1' not defined}% + {New glossaries must be defined before using \string\makeglossary}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsopenfile} +% Open write file associated with the given glossary. +% \begin{macrocode} +\newcommand*{\@glsopenfile}[2]{% + \immediate\openout#1=\jobname.\csname @glotype@#2@out\endcsname + \PackageInfo{glossaries}{Writing glossary file + \jobname.\csname @glotype@#2@out\endcsname}% +} % \end{macrocode} %\end{macro} % @@ -11670,6 +8054,7 @@ using \string\makeglossary}}} %\begin{macro}{\makeglossaries} % \begin{macrocode} \newcommand*{\makeglossaries}{% +% \end{macrocode} % Write the name of the style file to the aux file % (needed by \app{makeglossaries}) % \begin{macrocode} @@ -11731,6 +8116,51 @@ using \string\makeglossary}}} % \end{macrocode} % %\subsection{Writing information to associated files} +% +% +%\begin{macro}{\glswrite} +% The write used for style file also used for all other output files +% if \pkgopt[true]{savewrites}. +% \begin{macrocode} +\newwrite\glswrite +% \end{macrocode} +%\end{macro} +%\begin{macro}{\istfile} +%\changes{3.0}{2011/04/02}{deprecated} +% Deprecated. +% \begin{macrocode} +\def\istfile{\glswrite} +% \end{macrocode} +%\end{macro} +% +% At the end of the document, the files should be created if +% \pkgopt[true]{savewrites}. +% \begin{macrocode} +\AtEndDocument{% + \glswritefiles +} +% \end{macrocode} +%\begin{macro}{\glswritefiles} +% Only write the files if \pkgopt[true]{savewrites} +% \begin{macrocode} +\ifglssavewrites + \newcommand*{\glswritefiles}{% +% \end{macrocode} +% Iterate through all the glossaries +% \begin{macrocode} + \forallglossaries{\@glo@type}{% + \@glsopenfile{\glswrite}{\@glo@type}% + \immediate\write\glswrite{% + \expandafter\the\csname glo@\@glo@type @filetok\endcsname}% + \immediate\closeout\glswrite + }% + } +\else + \let\glswritefiles\relax +\fi +% \end{macrocode} +%\end{macro} +% % The \cs{glossary} command is redefined so that it takes an % optional argument \meta{type} to specify the glossary type (use % \cs{glsdefaulttype} glossary by default). @@ -11762,8 +8192,8 @@ using \string\makeglossary}}} %\begin{macro}{\@gls@renewglossary} % \begin{macrocode} \newcommand{\@gls@renewglossary}{% -\gdef\@glossary[##1]{\@bsphack\begingroup\@wrglossary{##1}}% -\let\@gls@renewglossary\@empty + \gdef\@glossary[##1]{\@bsphack\begingroup\@wrglossary{##1}}% + \let\@gls@renewglossary\@empty } % \end{macrocode} %\end{macro} @@ -11773,9 +8203,17 @@ using \string\makeglossary}}} % (the format of which is set in \cs{glslink}). %\begin{macro}{\@wrglossary} %\changes{1.17}{2008 December 26}{modified to allow for xindy support} +%\changes{3.0}{2010 Jul 12}{modified to take into account +%\pkgopt{savewrites}} % \begin{macrocode} \renewcommand*{\@wrglossary}[2]{% - \expandafter\protected@write\csname glo@#1@file\endcsname{}{#2}% + \ifglssavewrites + \protected@edef\@gls@tmp{\the\csname glo@#1@filetok\endcsname#2}% + \expandafter\global\expandafter\csname glo@#1@filetok\endcsname + \expandafter{\@gls@tmp^^J}% + \else + \expandafter\protected@write\csname glo@#1@file\endcsname{}{#2}% + \fi \endgroup\@esphack } % \end{macrocode} @@ -11784,11 +8222,32 @@ using \string\makeglossary}}} %\begin{macro}{\@do@wrglossary} %\changes{1.17}{2008 December 26}{new} % Write the glossary entry in the appropriate format. -% (Need to set \@glsnumberformat and \@gls@counter prior to use.) +% (Need to set \cs{@glsnumberformat} and \cs{@gls@counter} prior to use.) % The argument is the entry's label. +%\changes{3.0}{2011/04/02}{modified to use new format} % \begin{macrocode} \newcommand{\@do@wrglossary}[1]{% % \end{macrocode} +% Get the location and escape any special characters +% \begin{macrocode} + \protected@edef\@glslocref{\theglsentrycounter}% + \@gls@checkmkidxchars\@glslocref +% \end{macrocode} +% Check if the hyper-location is the same as the location and set +% the hyper prefix. +%\changes{3.0}{2011/04/02}{added check for hyper location prefix} +% \begin{macrocode} + \expandafter\ifx\theHglsentrycounter\theglsentrycounter + \def\@glo@counterprefix{}% + \else + \protected@edef\@glsHlocref{\theHglsentrycounter}% + \@gls@checkmkidxchars\@glsHlocref + \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix + {\@glslocref}{\@glsHlocref}% + }% + \@do@gls@getcounterprefix + \fi +% \end{macrocode} % Determine whether to use \app{xindy} or \app{makeindex} % syntax % \begin{macrocode} @@ -11807,17 +8266,13 @@ using \string\makeglossary}}} \fi \fi % \end{macrocode} -% Get the location and escape any special characters -% \begin{macrocode} -\protected@edef\@glslocref{\theglsentrycounter}% -\@gls@checkmkidxchars\@glslocref -% \end{macrocode} % Write to the glossary file using \app{xindy} syntax. % \begin{macrocode} \glossary[\csname glo@#1@type\endcsname]{% (indexentry :tkey (\csname glo@#1@index\endcsname) - :locref \string"\@glslocref\string" % - :attr \string"\@glo@suffix\string" \@glo@range + :locref \string"{\@glo@counterprefix}{\@glslocref}\string" % + :attr \string"\@gls@counter\@glo@suffix\string" + \@glo@range ) }% \else @@ -11825,7 +8280,8 @@ using \string\makeglossary}}} % Convert the format information into the format required for % \app{makeindex} % \begin{macrocode} - \@set@glo@numformat\@glo@numfmt\@gls@counter\@glsnumberformat + \@set@glo@numformat{\@glo@numfmt}{\@gls@counter}{\@glsnumberformat}% + {\@glo@counterprefix}% % \end{macrocode} % Write to the glossary file using \app{makeindex} syntax. % \begin{macrocode} @@ -11837,6 +8293,34 @@ using \string\makeglossary}}} % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@getcounterprefix} +% Get the prefix that needs to be prepended to counter in order to +% get the hyper counter. (For example, with the standard +% \cls{article} class and \sty{hyperref}, \ics{theequation} needs to +% be prefixed with \meta{section num}|.| to get the equivalent +% \ics{theHequation}.) NB this assumes that the prefix ends with a +% dot, which is the standard. (Otherwise it makes the xindy location +% classes more complicated.) +% \begin{macrocode} +\newcommand*\@gls@getcounterprefix[2]{% + \edef\@gls@thisloc{#1}\edef\@gls@thisHloc{#2}% + \ifx\@gls@thisloc\@gls@thisHloc + \def\@glo@counterprefix{}% + \else + \def\@gls@get@counterprefix##1.#1##2\end@getprefix{% + \def\@glo@tmp{##2}% + \ifx\@glo@tmp\@empty + \def\@glo@counterprefix{}% + \else + \def\@glo@counterprefix{##1}% + \fi + }% + \@gls@get@counterprefix#2.#1\end@getprefix + \fi +} +% \end{macrocode} +%\end{macro} +% %\subsection{Glossary Entry Cross-References} %\begin{macro}{\@do@seeglossary} %\changes{1.17}{2008 December 26}{new} @@ -11844,20 +8328,25 @@ using \string\makeglossary}}} % The first argument is the entry's label, the second must be in % the form \oarg{tag}\marg{list}, where \meta{tag} is a tag % such as ``see'' and \meta{list} is a list of labels. +%\changes{3.0}{2011/04/02}{Sanitize and escape cross-referencing +%information} % \begin{macrocode} \newcommand{\@do@seeglossary}[2]{% +\def\@gls@xref{#2}% +\@onelevel@sanitize\@gls@xref +\@gls@checkmkidxchars\@gls@xref \ifglsxindy \glossary[\csname glo@#1@type\endcsname]{% (indexentry :tkey (\csname glo@#1@index\endcsname) - :xref (\string"#2\string") + :xref (\string"\@gls@xref\string") :attr \string"see\string" ) }% \else \glossary[\csname glo@#1@type\endcsname]{% \string\glossaryentry{\csname glo@#1@index\endcsname - \@gls@encapchar glsseeformat#2}{Z}}% + \@gls@encapchar glsseeformat\@gls@xref}{Z}}% \fi } % \end{macrocode} @@ -11879,12 +8368,12 @@ using \string\makeglossary}}} %\begin{macro}{\glssee} %\cs{glssee}\marg{label}\marg{cross-ref list} %\changes{1.17}{2008 December 26}{new} -% \begin{macrocode} +% \begin{macrocode} \newcommand*{\glssee}[3][\seename]{% \@do@seeglossary{#2}{[#1]{#3}}} \newcommand*{\@glssee}[3][\seename]{% \glssee[#1]{#3}{#2}} -% \end{macrocode} +% \end{macrocode} %\end{macro} % %\begin{macro}{\glsseeformat} @@ -11951,8 +8440,19 @@ using \string\makeglossary}}} %\begin{macro}{\glsseeitem} %\cs{glsseeitem}\marg{label} formats individual entry in a % cross-referencing list. +%\changes{3.0}{2011/04/02}{hyperlink uses \cs{glsseeitemformat} instead +%of \cs{glsentryname}} +% \begin{macrocode} +\newcommand*{\glsseeitem}[1]{\glshyperlink[\glsseeitemformat{#1}]{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsseeitemformat} +%\changes{3.0}{2011/04/02}{new} +% As from v3.0, default is to use \ics{glsentrytext} instead of +% \ics{glsentryname}. (To avoid problems with the \gloskey{name} key being +% sanitized.) % \begin{macrocode} -\newcommand*{\glsseeitem}[1]{\glshyperlink{#1}} +\newcommand*{\glsseeitemformat}[1]{\glsentrytext{#1}} % \end{macrocode} %\end{macro} % @@ -11985,14 +8485,17 @@ using \string\makeglossary}}} % The TOC title needs to be processed in a different manner % to the main title in case the \sty{translator} and \sty{hyperref} packages % are both being used. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\@ifundefined{printglossary}{}{% +\ifcsundef{printglossary}{}% +{% % \end{macrocode} % If \cs{printglossary} is already defined, issue a warning % and undefine it. % \begin{macrocode} \GlossariesWarning{Overriding \string\printglossary}% - \let\printglossary\undefined + \undef\printglossary } % \end{macrocode} % \cs{printglossary} has an optional argument. The default @@ -12009,6 +8512,7 @@ using \string\makeglossary}}} % \begin{macrocode} \def\@glo@type{\glsdefaulttype}% \def\glossarytitle{\csname @glotype@\@glo@type @title\endcsname}% + \let\org@glossarytitle\glossarytitle \def\@glossarystyle{}% \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% % \end{macrocode} @@ -12019,17 +8523,38 @@ using \string\makeglossary}}} % \end{macrocode} % Localise the effects of the optional argument % \begin{macrocode} - \bgroup + \bgroup +% \end{macrocode} +% Determine settings specified in the optional argument. +% \begin{macrocode} + \setkeys{printgloss}{#1}% +% \end{macrocode} +% If title has been set, but toctitle hasn't, make toctitle the same +% as given title (rather than the title used when the glossary was +% defined) +%\changes{3.0}{2011/04/02}{make toctitle default to title} +% \begin{macrocode} + \ifx\glossarytitle\org@glossarytitle + \else + \expandafter\let\csname @glotype@\@glo@type @title\endcsname + \glossarytitle + \fi % \end{macrocode} -% Determine settings specified in the optional argument. +% Allow a high-level user command to indicate the current glossary +%\changes{3.0}{2011/04/02}{added \cs{currentglossary}} % \begin{macrocode} - \setkeys{printgloss}{#1}% + \let\currentglossary\@glo@type % \end{macrocode} %Enable individual number lists to be suppressed. % \begin{macrocode} \let\org@glossaryentrynumbers\glossaryentrynumbers \let\glsnonextpages\@glsnonextpages % \end{macrocode} +% Enable individual number list to be activated: +%\changes{3.0}{2011/04/02}{added \cs{glsnextpages}} +% \begin{macrocode} + \let\glsnextpages\@glsnextpages +% \end{macrocode} % Enable suppression of description terminators. % \begin{macrocode} \let\nopostdesc\@nopostdesc @@ -12062,12 +8587,16 @@ using \string\makeglossary}}} % If \app{xindy} is being used, need to write the language % dependent information to the \filetype{.aux} file for % \app{makeglossaries}. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} \ifglsxindy - \@ifundefined{@xdy@\@glo@type @language}{% + \ifcsundef{@xdy@\@glo@type @language}% + {% \protected@write\@auxout{}{% \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}% - }{% + }% + {% \protected@write\@auxout{}{% \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type @language\endcsname}}% @@ -12126,11 +8655,19 @@ using \string\makeglossary}}} % \end{macrocode} % The \gloskey[printglossary]{style} key sets the glossary style (but only for % the given glossary). +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} \define@key{printgloss}{style}{% -\@ifundefined{@glsstyle@#1}{\PackageError{glossaries}{Glossary -style `#1' undefined}{}}{% -\def\@glossarystyle{\csname @glsstyle@#1\endcsname}}} + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries}% + {Glossary style `#1' undefined}{}% + }% + {% + \def\@glossarystyle{\csname @glsstyle@#1\endcsname}% + }% +} % \end{macrocode} % \changes{1.14}{2008 June 17}{added numberedsection key to 'printglossary} % The \gloskey[printglossary]{numberedsection} key determines if this @@ -12176,6 +8713,21 @@ false,nolabel,autolabel}[nolabel]{% \glsresetentrylist}} % \end{macrocode} %\end{macro} +%\begin{macro}{\@glsnextpages} +%\changes{3.0}{2011/04/02}{new}% +% Activate the next number list only. Global assignments required +% as it may not occur in the same level of grouping as the +% next numberlist. (For example, if \cs{glsnextpages} is place +% in the entry's description and 3 column tabular style glossary +% is used.) \cs{org@glossaryentrynumbers} needs to be set at +% the start of each glossary, in the event that +% \ics{glossaryentrynumber} is redefined. +% \begin{macrocode} +\newcommand*{\@glsnextpages}{% + \gdef\glossaryentrynumbers##1{% + ##1\glsresetentrylist}} +% \end{macrocode} +%\end{macro} %\begin{macro}{\glsresetentrylist} % Resets \cs{glossaryentrynumbers} % \begin{macrocode} @@ -12192,18 +8744,178 @@ false,nolabel,autolabel}[nolabel]{% % \end{macrocode} %\end{macro} % -%\DescribeEnv{theglossary} +%\begin{macro}{\glsnextpages} +% Outside of \cs{printglossary} this does nothing. +% \begin{macrocode} +\newcommand*{\glsnextpages}{} +% \end{macrocode} +%\end{macro} +% +%\begin{counter}{glossaryentry} +%\changes{3.0}{2011/04/02}{new} +% If the \pkgopt{entrycounter} package option has been used, define +% a counter to number each level~0 entry. +% \begin{macrocode} +\ifglsentrycounter + \ifx\@gls@counterwithin\@empty + \newcounter{glossaryentry} + \else + \newcounter{glossaryentry}[\@gls@counterwithin] + \fi + \def\theHglossaryentry{\currentglossary.\theglossaryentry} +\fi +% \end{macrocode} +%\end{counter} +% +%\begin{counter}{glossarysubentry} +%\changes{3.0}{2011/04/02}{new} +% If the \pkgopt{subentrycounter} package option has been used, define +% a counter to number each level~1 entry. +% \begin{macrocode} +\ifglssubentrycounter + \ifglsentrycounter + \newcounter{glossarysubentry}[glossaryentry] + \else + \newcounter{glossarysubentry} + \fi + \def\theHglossarysubentry{\currentglssubentry.\theglossarysubentry} +\fi +% \end{macrocode} +%\end{counter} +% +%\begin{macro}{\glsresetsubentrycounter} +%\changes{3.0}{2011/04/02}{new} +% Resets the \ctr{glossarysubentry} counter. +% \begin{macrocode} +\ifglssubentrycounter + \newcommand*{\glsresetsubentrycounter}{% + \setcounter{glossarysubentry}{0}% + } +\else + \newcommand*{\glsresetsubentrycounter}{} +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsstepentry} +%\changes{3.0}{2011/04/02}{new} +% Advance the \ctr{glossaryentry} counter if in use. The argument is +% the label associated with the entry. +% \begin{macrocode} +\ifglsentrycounter + \newcommand*{\glsstepentry}[1]{% + \refstepcounter{glossaryentry}% + \label{glsentry-#1}% + } +\else + \newcommand*{\glsstepentry}[1]{} +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsstepsubentry} +%\changes{3.0}{2011/04/02}{new} +% Advance the \ctr{glossarysubentry} counter if in use. The argument is +% the label associated with the subentry. +% \begin{macrocode} +\ifglssubentrycounter + \newcommand*{\glsstepsubentry}[1]{% + \def\currentglssubentry{#1}% + \refstepcounter{glossarysubentry}% + \label{glsentry-#1}% + } +\else + \newcommand*{\glsstepsubentry}[1]{} +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsrefentry} +%\changes{3.0}{2011/04/02}{new} +% Reference the entry or sub-entry counter if in use, otherwise just do +% \ics{gls}. +% \begin{macrocode} +\ifglsentrycounter + \newcommand*{\glsrefentry}[1]{\ref{glsentry-#1}} +\else + \ifglssubentrycounter + \newcommand*{\glsrefentry}[1]{\ref{glsentry-#1}} + \else + \newcommand*{\glsrefentry}[1]{\gls{#1}} + \fi +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsentrycounterlabel} +%\changes{3.0}{2011/04/02}{new} +% Defines how to display the \ctr{glossaryentry} counter. +% \begin{macrocode} +\ifglsentrycounter + \newcommand*{\glsentrycounterlabel}{\theglossaryentry.\space} +\else + \newcommand*{\glsentrycounterlabel}{} +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glssubentrycounterlabel} +%\changes{3.0}{2011/04/02}{new} +% Defines how to display the \ctr{glossarysubentry} counter. +% \begin{macrocode} +\ifglssubentrycounter + \newcommand*{\glssubentrycounterlabel}{\theglossarysubentry)\space} +\else + \newcommand*{\glssubentrycounterlabel}{} +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsentryitem} +% Step and display \ctr{glossaryentry} counter, if appropriate. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\ifglsentrycounter + \newcommand*{\glsentryitem}[1]{% + \glsstepentry{#1}\glsentrycounterlabel + } +\else + \newcommand*{\glsentryitem}[1]{\glsresetsubentrycounter} +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glssubentryitem} +% Step and display \ctr{glossarysubentry} counter, if appropriate. +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\ifglssubentrycounter + \newcommand*{\glssubentryitem}[1]{% + \glsstepsubentry{#1}\glssubentrycounterlabel + } +\else + \newcommand*{\glssubentryitem}[1]{} +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{environment}{theglossary} % If the \env{theglossary} environment has % already been defined, a warning will be issued. % This environment should be redefined by glossary styles. +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\@ifundefined{theglossary}{% +\ifcsundef{theglossary}% +{% \newenvironment{theglossary}{}{}% -}{% +}% +{% \GlossariesWarning{overriding `theglossary' environment}% \renewenvironment{theglossary}{}{}% } % \end{macrocode} +%\end{environment} % % The glossary header is given by \cs{glossaryheader}. % This forms part of the glossary style, and @@ -12306,9 +9018,12 @@ false,nolabel,autolabel}[nolabel]{% % \texttt{A}, \ldots, \texttt{Z}\@. If you want to redefine % the group titles, you will need to redefine this command. %\begin{macro}{\glsgetgrouptitle} +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} \newcommand*{\glsgetgrouptitle}[1]{% -\@ifundefined{#1groupname}{#1}{\csname #1groupname\endcsname}} + \ifcsundef{#1groupname}{#1}{\csname #1groupname\endcsname}% +} % \end{macrocode} %\end{macro} %\vskip5pt @@ -12332,19 +9047,35 @@ false,nolabel,autolabel}[nolabel]{% % \ics{glossary} argument so that the relevant counter is % set prior to the formatting command. %\begin{macro}{\setentrycounter} +%\changes{3.0}{2011/04/02}{added optional argument} % \begin{macrocode} -\newcommand*{\setentrycounter}[1]{\def\glsentrycounter{#1}} +\newcommand*{\setentrycounter}[2][]{% + \def\@glo@counterprefix{#1}% + \ifx\@glo@counterprefix\@empty + \def\@glo@counterprefix{.}% + \else + \def\@glo@counterprefix{.#1.}% + \fi + \def\glsentrycounter{#2}% +} % \end{macrocode} %\end{macro} % % The current glossary style can be set using % \cs{glossarystyle}\marg{style}. %\begin{macro}{\glossarystyle} +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} \newcommand*{\glossarystyle}[1]{% -\@ifundefined{@glsstyle@#1}{\PackageError{glossaries}{Glossary -style `#1' undefined}{}}{% -\csname @glsstyle@#1\endcsname}} + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries}{Glossary style `#1' undefined}{}% + }% + {% + \csname @glsstyle@#1\endcsname + }% +} % \end{macrocode} %\end{macro} % @@ -12361,11 +9092,18 @@ style `#1' undefined}{}}{% % the user should be able to switch between styles without affecting % the pre- and postambles. %\changes{1.17}{2008 December 26}{made 'newglossarystyle long} +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} \newcommand{\newglossarystyle}[2]{% -\@ifundefined{@glsstyle@#1}{% -\expandafter\def\csname @glsstyle@#1\endcsname{#2}}{% -\PackageError{glossaries}{Glossary style `#1' is already defined}{}}} + \ifcsundef{@glsstyle@#1}% + {% + \expandafter\def\csname @glsstyle@#1\endcsname{#2}% + }% + {% + \PackageError{glossaries}{Glossary style `#1' is already defined}{}% + }% +} % \end{macrocode} %\end{macro} % @@ -12405,11 +9143,16 @@ style `#1' undefined}{}}{% %\begin{macro}{\glshypernumber} %\changes{1.17}{2008 December 26}{modified to allow material % to be attached to location} +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} -\@ifundefined{hyperlink}{% -\def\glshypernumber#1{#1}}{% -\def\glshypernumber#1{% - \@glshypernumber#1\nohyperpage{}\@nil}} +\ifcsundef{hyperlink}% +{% + \def\glshypernumber#1{#1}% +}% +{% + \def\glshypernumber#1{\@glshypernumber#1\nohyperpage{}\@nil} +} % \end{macrocode} %\end{macro} % @@ -12480,7 +9223,11 @@ style `#1' undefined}{}}{% \edef\x{\the\toks@}% \ifx\x\empty \else - \hyperlink{\glsentrycounter.\the\toks@}{\the\toks@}% +% \end{macrocode} +%\changes{3.0}{2011/04/02}{added prefix to hyperlink} +% \begin{macrocode} + \hyperlink{\glsentrycounter\@glo@counterprefix\the\toks@}% + {\the\toks@}% \fi \else \@gls@ReturnAfterFi{% @@ -12583,17 +9330,23 @@ style `#1' undefined}{}}{% % \cs{gls} explicitly, e.g.\ "\gls{svm}['s]". Note that it is % up to the user to load \isty{xspace} if desired. %\changes{1.18}{2009 January 14}{new} +%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with +%\cs{ifcsundef}} % \begin{macrocode} \newcommand{\oldacronym}[4][\gls@label]{% \def\gls@label{#2}% \newacronym[#4]{#1}{#2}{#3}% - \@ifundefined{xspace}{% + \ifcsundef{xspace}% + {% \expandafter\edef\csname#1\endcsname{% - \noexpand\@ifstar{\noexpand\Gls{#1}}{\noexpand\gls{#1}}}% - }{% + \noexpand\@ifstar{\noexpand\Gls{#1}}{\noexpand\gls{#1}}% + }% + }% + {% \expandafter\edef\csname#1\endcsname{% \noexpand\@ifstar{\noexpand\Gls{#1}\noexpand\xspace}{% - \noexpand\gls{#1}\noexpand\xspace}}% + \noexpand\gls{#1}\noexpand\xspace}% + }% }% } % \end{macrocode} @@ -12641,160 +9394,201 @@ style `#1' undefined}{}}{% % \end{macrocode} %\end{macro} % -% Make a note of the keys that are used to store the long and -% short forms: +% The following are defined for compatibility with version 2.07 and +% earlier. %\begin{macro}{\glsshortkey} % \begin{macrocode} -\newcommand*{\glsshortkey}{text} +\newcommand*{\glsshortkey}{short} % \end{macrocode} %\end{macro} %\begin{macro}{\glsshortpluralkey} % \begin{macrocode} -\newcommand*{\glsshortpluralkey}{plural} +\newcommand*{\glsshortpluralkey}{shortplural} % \end{macrocode} %\end{macro} %\begin{macro}{\glslongkey} % \begin{macrocode} -\newcommand*{\glslongkey}{description} +\newcommand*{\glslongkey}{long} % \end{macrocode} %\end{macro} %\begin{macro}{\glslongpluralkey} % \begin{macrocode} -\newcommand*{\glslongpluralkey}{descriptionplural} +\newcommand*{\glslongpluralkey}{longplural} % \end{macrocode} %\end{macro} % -% Using the default definitions, \ics{acrshort} is the same as -% \ics{glstext}, which means that it will print the abbreviation. -%\begin{macro}{\acrshort} +%\begin{macro}{\acrfull} +% Full form of the acronym. % \begin{macrocode} -\newcommand*{\acrshort}[2][]{% - \new@ifnextchar[{\@acrshort{#1}{#2}}{\@acrshort{#1}{#2}[]}} +\newcommand*{\acrfull}{% + \@ifstar\s@acrfull\ns@acrfull +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\Acrshort} -%\changes{1.13}{2008 May 10}{fixed bug that used all lower case version} +%\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} -\newcommand*{\Acrshort}[2][]{% - \new@ifnextchar[{\@Acrshort{#1}{#2}}{\@Acrshort{#1}{#2}[]}} +\newcommand*\s@acrfull[2][]{% + \new@ifnextchar[{\@acrfull{hyper=false,#1}{#2}}% + {\@acrfull{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@acrfull[2][]{% + \new@ifnextchar[{\@acrfull{#1}{#2}}% + {\@acrfull{#1}{#2}[]}% +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\ACRshort} -%\changes{1.13}{2008 May 10}{fixed bug that used all lower case version} +% Low-level macro: % \begin{macrocode} -\newcommand*{\ACRshort}[2][]{% - \new@ifnextchar[{\@ACRshort{#1}{#2}}{\@ACRshort{#1}{#2}[]}} +\def\@acrfull#1#2[#3]{% + \acrlinkfullformat{\@acrlong}{\@acrshort}{#1}{#2}{#3}% +} % \end{macrocode} %\end{macro} -% Plural: -%\begin{macro}{\acrshortpl} -%\changes{1.13}{2008 May 10}{new} +% +%\begin{macro}{\acrlinkfullformat} +% Format for full links like \ics{acrfull}. Syntax: +% \cs{acrlinkfullformat}\marg{long cs}\marg{short +% cs}\marg{options}\marg{label}\marg{insert} % \begin{macrocode} -\newcommand*{\acrshortpl}[2][]{% - \new@ifnextchar[{\@acrshortpl{#1}{#2}}{\@acrshortpl{#1}{#2}[]}} +\newcommand{\acrlinkfullformat}[5]{% + \acrfullformat{#1{#3}{#4}[#5]}{#2{#3}{#4}[]}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\Acrshortpl} -%\changes{1.13}{2008 May 10}{new} +% +%\begin{macro}{\acrfullformat} +% Default full form is \meta{long} +% (\cs{acronymfont}"{"\meta{short}"}"). % \begin{macrocode} -\newcommand*{\Acrshortpl}[2][]{% - \new@ifnextchar[{\@Acrshortpl{#1}{#2}}{\@Acrshortpl{#1}{#2}[]}} +\newcommand{\acrfullformat}[2]{#1\space(\acronymfont{#2})} % \end{macrocode} %\end{macro} -%\begin{macro}{\ACRshortpl} -%\changes{1.13}{2008 May 10}{new} +% +% Default format for full acronym +%\begin{macro}{\Acrfull} +% \begin{macrocode} +\newcommand*{\Acrfull}{% + \@ifstar\s@Acrfull\ns@Acrfull +} +% \end{macrocode} +%\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} -\newcommand*{\ACRshortpl}[2][]{% - \new@ifnextchar[{\@ACRshortpl{#1}{#2}}{\@ACRshortpl{#1}{#2}[]}} +\newcommand*\s@Acrfull[2][]{% + \new@ifnextchar[{\@Acrfull{hyper=false,#1}{#2}}% + {\@Acrfull{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@Acrfull[2][]{% + \new@ifnextchar[{\@Acrfull{#1}{#2}}% + {\@Acrfull{#1}{#2}[]}% +} +% \end{macrocode} +% Low-level macro: +% \begin{macrocode} +\def\@Acrfull#1#2[#3]{% + \acrlinkfullformat{\@Acrlong}{\@acrshort}{#1}{#2}{#3}% +} % \end{macrocode} %\end{macro} % -% \ics{acrlong} is set to \ics{glsdesc}, so it will print the long -% form, unless the description key has been set to something else. -%\begin{macro}{\acrlong} +%\begin{macro}{\ACRfull} % \begin{macrocode} -\newcommand*{\acrlong}[2][]{% - \new@ifnextchar[{\@acrlong{#1}{#2}}{\@acrlong{#1}{#2}[]}} +\newcommand*{\ACRfull}{% + \@ifstar\s@ACRfull\ns@ACRfull +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\Acrlong} -%\changes{1.13}{2008 May 10}{fixed bug that used all lower case version} +%\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} -\newcommand*{\Acrlong}[2][]{% - \new@ifnextchar[{\@Acrlong{#1}{#2}}{\@Acrlong{#1}{#2}[]}} +\newcommand*\s@ACRfull[2][]{% + \new@ifnextchar[{\@ACRfull{hyper=false,#1}{#2}}% + {\@ACRfull{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@ACRfull[2][]{% + \new@ifnextchar[{\@ACRfull{#1}{#2}}% + {\@ACRfull{#1}{#2}[]}% +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\ACRlong} -%\changes{1.13}{2008 May 10}{fixed bug that used all lower case version} +% Low-level macro: % \begin{macrocode} -\newcommand*{\ACRlong}[2][]{% - \new@ifnextchar[{\@ACRlong{#1}{#2}}{\@ACRlong{#1}{#2}[]}} +\def\@ACRfull#1#2[#3]{% + \acrlinkfullformat{\@ACRlong}{\@ACRshort}{#1}{#2}{#3}% +} % \end{macrocode} %\end{macro} +% % Plural: -%\begin{macro}{\acrlongpl} +%\begin{macro}{\acrfullpl} %\changes{1.13}{2008 May 10}{new} % \begin{macrocode} -\newcommand*{\acrlongpl}[2][]{% - \new@ifnextchar[{\@acrlongpl{#1}{#2}}{\@acrlongpl{#1}{#2}[]}} +\newcommand*{\acrfullpl}{% + \@ifstar\s@acrfullpl\ns@acrfullpl +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\Acrlongpl} -%\changes{1.13}{2008 May 10}{new} +%\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} -\newcommand*{\Acrlongpl}[2][]{% - \new@ifnextchar[{\@Acrlongpl{#1}{#2}}{\@Acrlongpl{#1}{#2}[]}} +\newcommand*\s@acrfullpl[2][]{% + \new@ifnextchar[{\@acrfullpl{hyper=false,#1}{#2}}% + {\@acrfullpl{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@acrfullpl[2][]{% + \new@ifnextchar[{\@acrfullpl{#1}{#2}}% + {\@acrfullpl{#1}{#2}[]}% +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\ACRlongpl} -%\changes{1.13}{2008 May 10}{new} +% Low-level macro: % \begin{macrocode} -\newcommand*{\ACRlongpl}[2][]{% - \new@ifnextchar[{\@ACRlongpl{#1}{#2}}{\@ACRlongpl{#1}{#2}[]}} +\def\@acrfullpl#1#2[#3]{% + \acrlinkfullformat{\@acrlongpl}{\@acrshortpl}{#1}{#2}{#3}% +} % \end{macrocode} %\end{macro} % -% -% \ics{acrfull} is set to \ics{glsfirst}, so it should display the -% full form. -%\begin{macro}{\acrfull} +%\begin{macro}{\Acrfullpl} +%\changes{1.13}{2008 May 10}{new} % \begin{macrocode} -\newcommand*{\acrfull}[2][]{% - \new@ifnextchar[{\@acrfull{#1}{#2}}{\@acrfull{#1}{#2}[]}} +\newcommand*{\Acrfullpl}{% + \@ifstar\s@Acrfullpl\ns@Acrfullpl +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\Acrfull} +%\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} -\newcommand*{\Acrfull}[2][]{% - \new@ifnextchar[{\@Acrfull{#1}{#2}}{\@Acrfull{#1}{#2}[]}} +\newcommand*\s@Acrfullpl[2][]{% + \new@ifnextchar[{\@Acrfullpl{hyper=false,#1}{#2}}% + {\@Acrfullpl{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@Acrfullpl[2][]{% + \new@ifnextchar[{\@Acrfullpl{#1}{#2}}% + {\@Acrfullpl{#1}{#2}[]}% +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\ACRfull} +% Low-level macro: % \begin{macrocode} -\newcommand*{\ACRfull}[2][]{% - \new@ifnextchar[{\@ACRfull{#1}{#2}}{\@ACRfull{#1}{#2}[]}} +\def\@Acrfullpl#1#2[#3]{% + \acrlinkfullformat{\@Acrlong}{\@acrshort}{#1}{#2}{#3}% +} % \end{macrocode} %\end{macro} -% Plural: -%\begin{macro}{\acrfullpl} +% +%\begin{macro}{\ACRfullpl} %\changes{1.13}{2008 May 10}{new} % \begin{macrocode} -\newcommand*{\acrfullpl}[2][]{% - \new@ifnextchar[{\@acrfullpl{#1}{#2}}{\@acrfullpl{#1}{#2}[]}} +\newcommand*{\ACRfullpl}{% + \@ifstar\s@ACRfullpl\ns@ACRfullpl +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\Acrfullpl} -%\changes{1.13}{2008 May 10}{new} +%\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} -\newcommand*{\Acrfullpl}[2][]{% - \new@ifnextchar[{\@Acrfullpl{#1}{#2}}{\@Acrfullpl{#1}{#2}[]}} +\newcommand*\s@ACRfullpl[2][]{% + \new@ifnextchar[{\@ACRfullpl{hyper=false,#1}{#2}}% + {\@ACRfullpl{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@ACRfullpl[2][]{% + \new@ifnextchar[{\@ACRfullpl{#1}{#2}}% + {\@ACRfullpl{#1}{#2}[]}% +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\ACRfullpl} -%\changes{1.13}{2008 May 10}{new} +% Low-level macro: % \begin{macrocode} -\newcommand*{\ACRfullpl}[2][]{% - \new@ifnextchar[{\@ACRfullpl{#1}{#2}}{\@ACRfullpl{#1}{#2}[]}} +\def\@ACRfullpl#1#2[#3]{% + \acrlinkfullformat{\@ACRlongpl}{\@ACRshortpl}{#1}{#2}{#3}% +} % \end{macrocode} %\end{macro} % @@ -12869,14 +9663,21 @@ style `#1' undefined}{}}{% {% type=\acronymtype,% name={\the\glsshorttok},% - description={\the\glslongtok},% - text={\the\glsshorttok},% sort={\the\glsshorttok},% - descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% - first={\the\glslongtok\space(\the\glsshorttok)},% + text={\the\glsshorttok},% + first={\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% - firstplural={\noexpand\@glo@descplural\space - (\noexpand\@glo@plural)},% + firstplural={\acrfullformat{\noexpand\@glo@longpl}% + {\noexpand\@glo@shortpl}},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% + description={\the\glslongtok},% + descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% +% \end{macrocode} +% Remaining options specified by the user: +% \begin{macrocode} \the\glskeylisttok }% }% @@ -12917,32 +9718,31 @@ style `#1' undefined}{}}{% \newacronymhook \DefaultNewAcronymDef }% + \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% +} % \end{macrocode} -% Define short cuts. +%\end{macro} +% +%\begin{macro}{\acrfootnote} +%\changes{3.0}{2011/04/02}{new} +% Used by the footnote acronym styles. % \begin{macrocode} - \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% - \renewcommand*{\glsshortkey}{text}% - \renewcommand*{\glsshortpluralkey}{plural}% - \renewcommand*{\glslongkey}{description}% - \renewcommand*{\glslongpluralkey}{descriptionplural}% - \def\@acrshort##1##2[##3]{\@glstext@{##1}{##2}[##3]}% - \def\@Acrshort##1##2[##3]{\@Glstext@{##1}{##2}[##3]}% - \def\@ACRshort##1##2[##3]{\@GLStext@{##1}{##2}[##3]}% - \def\@acrshortpl##1##2[##3]{\@glsplural@{##1}{##2}[##3]}% - \def\@Acrshortpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3]}% - \def\@ACRshortpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3]}% - \def\@acrlong##1##2[##3]{\@glsdesc@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsdesc@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSdesc@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsdescplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSdescplural@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}% - \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}% - \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}% - \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}% - \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}% - \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}% +\newcommand*{\acrfootnote}[3]{\acrlinkfootnote{#1}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\acrlinkfootnote} +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\acrlinkfootnote}[3]{% + \footnote{\glslink[#1]{#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\acrnolinkfootnote} +%\changes{3.0}{2011/04/02}{new} +% \begin{macrocode} +\newcommand*{\acrnolinkfootnote}[3]{% + \footnote{#3}% } % \end{macrocode} %\end{macro} @@ -12951,12 +9751,14 @@ style `#1' undefined}{}}{% % Sets the acronym display style for given glossary for the % description and footnote combination. %\changes{2.04}{2009 November 10}{new} +%\changes{3.0}{2011/04/02}{expanded options link options} % \begin{macrocode} \newcommand*{\SetDescriptionFootnoteAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{% \firstacronymfont{##1}##4% - \protect\footnote{% - \glslink[\@gls@link@opts]{\@gls@link@label}{##3}}}% + \expandafter\protect\expandafter\acrfootnote\expandafter + {\@gls@link@opts}{\@gls@link@label}{##3} + }% \defglsdisplay[#1]{\acronymfont{##1}##4}% } % \end{macrocode} @@ -12972,6 +9774,10 @@ style `#1' undefined}{}}{% sort={\the\glsshorttok},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\the\glslongtok},% symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok @@ -13004,62 +9810,6 @@ style `#1' undefined}{}}{% \DescriptionFootnoteNewAcronymDef }% % \end{macrocode} -% Set up the commands to make a note of the keys to store the long -% and short forms: -% \begin{macrocode} - \def\glsshortkey{text}% - \def\glsshortpluralkey{plural}% - \def\glslongkey{symbol}% - \def\glslongpluralkey{symbolplural}% -% \end{macrocode} -% Set up short cuts. Short form: -% \begin{macrocode} - \def\@acrshort##1##2[##3]{% - \acronymfont{\@glstext@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{% - \acronymfont{\@Glstext@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{% - \acronymfont{\@GLStext@{##1}{##2}[##3]}}% -% \end{macrocode} -% Plural form: -% \begin{macrocode} - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glsplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glsplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSplural@{##1}{##2}[##3]}}% -% \end{macrocode} -% Long form: -% \begin{macrocode} - \def\@acrlong##1##2[##3]{\@glssymbol@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glssymbol@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural long form: -% \begin{macrocode} - \def\@acrlongpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3]}% -% \end{macrocode} -% Full form: -% \begin{macrocode} - \def\@acrfull##1##2[##3]{\@glssymbol@{##1}{##2}[##3] - (\acronymfont{\@glstext@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glssymbol@{##1}{##2}[##3] - (\acronymfont{\@glstext@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3] - (\acronymfont{\@GLStext@{##1}{##2}[##3]})}% -% \end{macrocode} -% Plural full form: -% \begin{macrocode} - \def\@acrfullpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3] - (\acronymfont{\@glsplural@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3] - (\acronymfont{\@glsplural@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3] - (\acronymfont{\@GLSplural@{##1}{##2}[##3]})}% -% \end{macrocode} % % If \pkgopt{footnote} package option is specified, set the first % use to append the long form (stored in \gloskey{symbol}) as a @@ -13119,6 +9869,10 @@ style `#1' undefined}{}}{% sort={\the\glslongtok}, text={\the\glslongtok},% plural={\the\glslongtok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\the\glsshorttok},% symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% \the\glskeylisttok @@ -13159,62 +9913,6 @@ style `#1' undefined}{}}{% \DescriptionDUANewAcronymDef }% % \end{macrocode} -% Set up the commands to make a note of the keys to store the long -% and short forms: -% \begin{macrocode} - \def\glsshortkey{symbol}% - \def\glsshortpluralkey{symbolplural}% - \def\glslongkey{first}% - \def\glslongpluralkey{plural}% -% \end{macrocode} -% Set up short cuts. Short form: -% \begin{macrocode} - \def\@acrshort##1##2[##3]{% - \acronymfont{\@glssymbol@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{% - \acronymfont{\@Glssymbol@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{% - \acronymfont{\@GLSsymbol@{##1}{##2}[##3]}}% -% \end{macrocode} -% Plural short form: -% \begin{macrocode} - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glssymbolplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glssymbolplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]}}% -% \end{macrocode} -% Long form: -% \begin{macrocode} - \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural long form: -% \begin{macrocode} - \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}% -% \end{macrocode} -% Full form: -% \begin{macrocode} - \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}% -% \end{macrocode} -% Plural full form: -% \begin{macrocode} - \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}% -% \end{macrocode} % Set display. % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% @@ -13226,7 +9924,7 @@ style `#1' undefined}{}}{% % %\begin{macro}{\SetDescriptionAcronymDisplayStyle} % Sets the acronym display style for given glossary using -% the description setting (but not footnote or dua). +% the description setting (but not \pkgopt{footnote} or \pkgopt{dua}). %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\SetDescriptionAcronymDisplayStyle}[1]{% @@ -13250,6 +9948,10 @@ style `#1' undefined}{}}{% firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\noexpand\@glo@text},% symbolplural={\noexpand\@glo@plural},% \the\glskeylisttok}% @@ -13283,62 +9985,6 @@ style `#1' undefined}{}}{% \DescriptionNewAcronymDef }% % \end{macrocode} -% Set up the commands to make a note of the keys to store the long -% and short forms: -% \begin{macrocode} - \def\glsshortkey{text}% - \def\glsshortpluralkey{plural}% - \def\glslongkey{first}% - \def\glslongpluralkey{firstplural}% -% \end{macrocode} -% Set up short cuts. Short form: -% \begin{macrocode} - \def\@acrshort##1##2[##3]{% - \acronymfont{\@glstext@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{% - \acronymfont{\@Glstext@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{% - \acronymfont{\@GLStext@{##1}{##2}[##3]}}% -% \end{macrocode} -% Plural short form: -% \begin{macrocode} - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glsplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glsplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSplural@{##1}{##2}[##3]}}% -% \end{macrocode} -% Long form: -% \begin{macrocode} - \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural long form: -% \begin{macrocode} - \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}% -% \end{macrocode} -% Full form: -% \begin{macrocode} - \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}% -% \end{macrocode} -% Plural full form: -% \begin{macrocode} - \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}% -% \end{macrocode} % Set display. % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% @@ -13366,14 +10012,15 @@ style `#1' undefined}{}}{% % %\begin{macro}{\SetFootnoteAcronymDisplayStyle} % Sets the acronym display style for given glossary with -% footnote setting (but not description or dua). +% footnote setting (but not \pkgopt{description} or \pkgopt{dua}). %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\SetFootnoteAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{% - \firstacronymfont{##1}##4\protect\footnote{% - \protect\glslink - [\@gls@link@opts]{\@gls@link@label}{##2}}}% + \firstacronymfont{##1}##4% + \expandafter\protect\expandafter\acrfootnote\expandafter + {\@gls@link@opts}{\@gls@link@label}{##2}% + }% \defglsdisplay[#1]{\acronymfont{##1}##4}% } % \end{macrocode} @@ -13389,6 +10036,10 @@ style `#1' undefined}{}}{% sort={\the\glsshorttok},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok @@ -13420,14 +10071,6 @@ style `#1' undefined}{}}{% \FootnoteNewAcronymDef }% % \end{macrocode} -% Set up the commands to make a note of the keys to store the long -% and short forms: -% \begin{macrocode} - \def\glsshortkey{text}% - \def\glsshortpluralkey{plural}% - \def\glslongkey{description}% - \def\glslongpluralkey{descriptionplural}% -% \end{macrocode} % Set display %\changes{1.12}{2008 Mar 8}{Added 'protect before 'footnote and % 'glslink} @@ -13436,51 +10079,6 @@ style `#1' undefined}{}}{% \SetFootnoteAcronymDisplayStyle{\@gls@type}% }% % \end{macrocode} -% Set up short cuts. Short form: -% \begin{macrocode} - \def\@acrshort##1##2[##3]{\acronymfont{\@glstext@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{\acronymfont{\@Glstext@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{\acronymfont{\@GLStext@{##1}{##2}[##3]}}% -% \end{macrocode} -% Plural short form: -% \begin{macrocode} - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glsplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glsplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSplural@{##1}{##2}[##3]}}% -% \end{macrocode} -% Long form: -% \begin{macrocode} - \def\@acrlong##1##2[##3]{\@glsdesc@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsdesc@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSdesc@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural long form: -% \begin{macrocode} - \def\@acrlongpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsdescplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSdescplural@{##1}{##2}[##3]}% -% \end{macrocode} -% Full form: -% \begin{macrocode} - \def\@acrfull##1##2[##3]{\@glsdesc@{##1}{##2}[##3] - (\@glstext@{##1}{##2}[##3])}% - \def\@Acrfull##1##2[##3]{\@Glsdesc@{##1}{##2}[##3] - (\@glstext@{##1}{##2}[##3])}% - \def\@ACRfull##1##2[##3]{\@GLSdesc@{##1}{##2}[##3] - (\@GLStext@{##1}{##2}[##3])}% -% \end{macrocode} -% Plural full form: -% \begin{macrocode} - \def\@acrfullpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3] - (\@glsplural@{##1}{##2}[##3])}% - \def\@Acrfullpl##1##2[##3]{\@Glsdesctext@{##1}{##2}[##3] - (\@glsplural@{##1}{##2}[##3])}% - \def\@ACRfullpl##1##2[##3]{\@GLSdesctext@{##1}{##2}[##3] - (\@GLSplural@{##1}{##2}[##3])}% -% \end{macrocode} % Redefine \ics{acronymfont} if small caps required. The plural suffix % is set in an upright font so that it remains in normal lower case, % otherwise it looks as though it's part of the acronym. @@ -13532,6 +10130,10 @@ style `#1' undefined}{}}{% plural={\noexpand\@glo@symbolplural},% first={\the\glslongtok},% firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\noexpand\@glo@first},% descriptionplural={\noexpand\@glo@firstplural},% symbol={\the\glsshorttok},% @@ -13565,14 +10167,6 @@ style `#1' undefined}{}}{% \SmallNewAcronymDef }% % \end{macrocode} -% Set up the commands to make a note of the keys to store the long -% and short forms: -% \begin{macrocode} - \def\glsshortkey{symbol}% - \def\glsshortpluralkey{symbolplural}% - \def\glslongkey{first}% - \def\glslongpluralkey{firstplural}% -% \end{macrocode} % Change the display since \gloskey{first} only contains long form. % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% @@ -13593,54 +10187,6 @@ style `#1' undefined}{}}{% \renewcommand*{\acronymfont}[1]{\textsmaller{##1}} \fi % \end{macrocode} -% Set up short cuts. Short form: -% \begin{macrocode} - \def\@acrshort##1##2[##3]{% - \acronymfont{\@glstext@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{% - \acronymfont{\@Glstext@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{% - \acronymfont{\@GLStext@{##1}{##2}[##3]}}% -% \end{macrocode} -% Plural short form: -% \begin{macrocode} - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glsplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glsplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSplural@{##1}{##2}[##3]}}% -% \end{macrocode} -% Long form: -% \begin{macrocode} - \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural long form: -% \begin{macrocode} - \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}% -% \end{macrocode} -% Full form: -% \begin{macrocode} - \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glstext@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glstext@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3] - (\acronymfont{\@GLStext@{##1}{##2}[##3]})}% -% \end{macrocode} -% Plural full form: -% \begin{macrocode} - \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glsplural@{##1}{##2}[##3]})} - \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glsplural@{##1}{##2}[##3]})} - \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3] - (\acronymfont{\@GLSplural@{##1}{##2}[##3]})} -% \end{macrocode} % check for option clash % \begin{macrocode} \ifglsacrdua @@ -13677,6 +10223,10 @@ style `#1' undefined}{}}{% name={\the\glsshorttok},% text={\the\glslongtok},% plural={\the\glslongtok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% symbol={\the\glsshorttok},% symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% @@ -13706,62 +10256,12 @@ style `#1' undefined}{}}{% \DUANewAcronymDef }% % \end{macrocode} -% Set up the commands to make a note of the keys to store the long -% and short forms: -% \begin{macrocode} - \def\glsshortkey{symbol}% - \def\glsshortpluralkey{symbolplural}% - \def\glslongkey{text}% - \def\glslongpluralkey{plural}% -% \end{macrocode} % Set the display % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetDUADisplayStyle{\@gls@type}% }% -% \end{macrocode} -% Set up short cuts. Short form: -% \begin{macrocode} - \def\@acrshort##1##2[##3]{\@glssymbol@{##1}{##2}[##3]}% - \def\@Acrshort##1##2[##3]{\@Glssymbol@{##1}{##2}[##3]}% - \def\@ACRshort##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural short form: -% \begin{macrocode} - \def\@acrshortpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3]}% - \def\@Acrshortpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3]}% - \def\@ACRshortpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3]}% -% \end{macrocode} -% Long form: -% \begin{macrocode} - \def\@acrlong##1##2[##3]{\@glstext@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glstext@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLStext@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural long form: -% \begin{macrocode} - \def\@acrlongpl##1##2[##3]{\@glsplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3]}% -% \end{macrocode} -% Full form: -% \begin{macrocode} - \def\@acrfull##1##2[##3]{\@glstext@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glstext@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLStext@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}% -% \end{macrocode} -% Plural full form: -% \begin{macrocode} - \def\@acrfullpl##1##2[##3]{\@glsplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}% -}% +} % \end{macrocode} %\end{macro} % @@ -13803,10 +10303,11 @@ style `#1' undefined}{}}{% % \end{macrocode} %\end{macro} % -% Allow user to define their own custom acronyms. The short form is +% Allow user to define their own custom acronyms. +% (For compatibility with versions before v3.0, the short form is % stored in the user1 key, the plural short form is stored in the % user2 key, the long form is stored in the user3 key and the -% plural long form is stored in the user4 key. Defaults to +% plural long form is stored in the user4 key.) Defaults to % displaying only the acronym with the long form as the description. %\begin{macro}{\SetCustomDisplayStyle} % Sets the acronym display style. @@ -13824,9 +10325,9 @@ style `#1' undefined}{}}{% \newcommand*{\CustomAcronymFields}{% name={\the\glsshorttok},% description={\the\glslongtok},% - first={\the\glslongtok\space(\the\glsshorttok)},% - firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space - (\the\glsshorttok)}% + first={\noexpand\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% + firstplural={\noexpand\acrfullformat + {\the\glslongtok\noexpand\acrpluralsuffix}{\the\glsshorttok}}% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix}% } @@ -13840,6 +10341,10 @@ style `#1' undefined}{}}{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% user1={\the\glsshorttok},% user2={\the\glsshorttok\noexpand\acrpluralsuffix},% user3={\the\glslongtok},% @@ -13871,62 +10376,12 @@ style `#1' undefined}{}}{% \CustomNewAcronymDef }% % \end{macrocode} -% Set up the commands to make a note of the keys to store the long -% and short forms: -% \begin{macrocode} - \def\glsshortkey{user1}% - \def\glsshortpluralkey{user2}% - \def\glslongkey{user3}% - \def\glslongpluralkey{user4}% -% \end{macrocode} % Set the display % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetCustomDisplayStyle{\@gls@type}% }% -% \end{macrocode} -% Set up short cuts. Short form: -% \begin{macrocode} - \def\@acrshort##1##2[##3]{\@glsuseri@{##1}{##2}[##3]}% - \def\@Acrshort##1##2[##3]{\@Glsuseri@{##1}{##2}[##3]}% - \def\@ACRshort##1##2[##3]{\@GLSuseri@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural short form: -% \begin{macrocode} - \def\@acrshortpl##1##2[##3]{\@glsuserii@{##1}{##2}[##3]}% - \def\@Acrshortpl##1##2[##3]{\@Glsuserii@{##1}{##2}[##3]}% - \def\@ACRshortpl##1##2[##3]{\@GLSuserii@{##1}{##2}[##3]}% -% \end{macrocode} -% Long form: -% \begin{macrocode} - \def\@acrlong##1##2[##3]{\@glsuseriii@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsuseriii@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSuseriii@{##1}{##2}[##3]}% -% \end{macrocode} -% Plural long form: -% \begin{macrocode} - \def\@acrlongpl##1##2[##3]{\@glsuseriv@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsuseriv@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSuseriv@{##1}{##2}[##3]}% -% \end{macrocode} -% Full form: -% \begin{macrocode} - \def\@acrfull##1##2[##3]{\@glsuseriii@{##1}{##2}[##3] - (\acronymfont{\@glsuseri@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glsuseriii@{##1}{##2}[##3] - (\acronymfont{\@glsuseri@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSuseriii@{##1}{##2}[##3] - (\acronymfont{\@GLSuseri@{##1}{##2}[##3]})}% -% \end{macrocode} -% Plural full form: -% \begin{macrocode} - \def\@acrfullpl##1##2[##3]{\@glsuseriv@{##1}{##2}[##3] - (\acronymfont{\@glsuserii@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glsuseriv@{##1}{##2}[##3] - (\acronymfont{\@glsuserii@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSuseriv@{##1}{##2}[##3] - (\acronymfont{\@GLSuserii@{##1}{##2}[##3]})}% -}% +} % \end{macrocode} %\end{macro} % @@ -14060,26 +10515,407 @@ style `#1' undefined}{}}{% % The styles that use the \env{longtable} environment. These are % not loaded if the \pkgopt{nolong} package option is used. % \begin{macrocode} -\@gls@loadlong +\@gls@loadlong +% \end{macrocode} +% The styles that use the \env{supertabular} environment. These are +% not loaded if the \pkgopt{nosuper} package option is used or if +% the \isty{supertabular} package isn't installed. +% \begin{macrocode} +\@gls@loadsuper +% \end{macrocode} +% The tree-like styles. These are not loaded if the \pkgopt{notree} +% package option is used. +% \begin{macrocode} +\@gls@loadtree +% \end{macrocode} +% The default glossary style is set according to the \pkgopt{style} package +% option, but can be overridden by \ics{glossarystyle}. The +% required style must be defined at this point. +% \begin{macrocode} +\ifx\@glossary@default@style\relax +\else + \glossarystyle{\@glossary@default@style} +\fi +% \end{macrocode} +% +%\subsection{Debugging Commands} +% +%\begin{macro}{\showgloparent} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showgloparent}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showgloparent}[1]{% + \expandafter\show\csname glo@#1@parent\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglolevel} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglolevel}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglolevel}[1]{% + \expandafter\show\csname glo@#1@level\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglotext} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglotext}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglotext}[1]{% + \expandafter\show\csname glo@#1@text\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showgloplural} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showgloplural}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showgloplural}[1]{% + \expandafter\show\csname glo@#1@plural\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglofirst} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglofirst}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglofirst}[1]{% + \expandafter\show\csname glo@#1@first\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglofirstpl} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglofirstpl}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglofirstpl}[1]{% + \expandafter\show\csname glo@#1@firstpl\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglotype} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglotype}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglotype}[1]{% + \expandafter\show\csname glo@#1@type\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglocounter} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglocounter}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglocounter}[1]{% + \expandafter\show\csname glo@#1@counter\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglouseri} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglouseri}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglouseri}[1]{% + \expandafter\show\csname glo@#1@useri\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglouserii} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglouserii}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglouserii}[1]{% + \expandafter\show\csname glo@#1@userii\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglouseriii} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglouseriii}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglouseriii}[1]{% + \expandafter\show\csname glo@#1@useriii\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglouseriv} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglouseriv}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglouseriv}[1]{% + \expandafter\show\csname glo@#1@useriv\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglouserv} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglouserv}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglouserv}[1]{% + \expandafter\show\csname glo@#1@userv\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglouservi} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglouservi}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglouservi}[1]{% + \expandafter\show\csname glo@#1@uservi\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showgloname} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showgloname}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showgloname}[1]{% + \expandafter\show\csname glo@#1@name\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglodesc} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglodesc}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglodesc}[1]{% + \expandafter\show\csname glo@#1@desc\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglodescplural} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglodescplural}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglodescplural}[1]{% + \expandafter\show\csname glo@#1@descplural\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglosort} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglosort}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglosort}[1]{% + \expandafter\show\csname glo@#1@sort\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglosymbol} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglosymbol}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglosymbol}[1]{% + \expandafter\show\csname glo@#1@symbol\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglosymbolplural} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglosymbolplural}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showglosymbolplural}[1]{% + \expandafter\show\csname glo@#1@symbolplural\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showgloindex} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showgloindex}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showgloindex}[1]{% + \expandafter\show\csname glo@#1@index\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showgloflag} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showgloflag}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showgloflag}[1]{% + \expandafter\show\csname ifglo@#1@flag\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showacronymlists} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showacronymlists} +%\end{definition} +% Show list of glossaries that have been flagged as a list of +% acronyms. +% \begin{macrocode} +\newcommand*{\showacronymlists}{% + \show\@glsacronymlists +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglossaries} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglossaries} +%\end{definition} +% Show list of defined glossaries. +% \begin{macrocode} +\newcommand*{\showglossaries}{% + \show\@glo@types +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglossaryin} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglossaryin}\marg{glossary-label} +%\end{definition} +% Show the `in' extension for the given glossary. +% \begin{macrocode} +\newcommand*{\showglossaryin}[1]{% + \expandafter\show\csname @glotype@#1@in\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglossaryout} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglossaryout}\marg{glossary-label} +%\end{definition} +% Show the `out' extension for the given glossary. +% \begin{macrocode} +\newcommand*{\showglossaryout}[1]{% + \expandafter\show\csname @glotype@#1@out\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\showglossarytitle} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglossarytitle}\marg{glossary-label} +%\end{definition} +% Show the title for the given glossary. +% \begin{macrocode} +\newcommand*{\showglossarytitle}[1]{% + \expandafter\show\csname @glotype@#1@title\endcsname +} % \end{macrocode} -% The styles that use the \env{supertabular} environment. These are -% not loaded if the \pkgopt{nosuper} package option is used or if -% the \isty{supertabular} package isn't installed. +%\end{macro} +% +%\begin{macro}{\showglossarycounter} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglossarycounter}\marg{glossary-label} +%\end{definition} +% Show the counter for the given glossary. % \begin{macrocode} -\@gls@loadsuper +\newcommand*{\showglossarycounter}[1]{% + \expandafter\show\csname @glotype@#1@counter\endcsname +} % \end{macrocode} -% The tree-like styles. These are not loaded if the \pkgopt{notree} -% package option is used. +%\end{macro} +% +%\begin{macro}{\showglossaryentries} +%\changes{3.0}{2011/04/02}{new} +%\begin{definition} +%\cs{showglossaryentries}\marg{glossary-label} +%\end{definition} +% Show the list of entry labels for the given glossary. % \begin{macrocode} -\@gls@loadtree +\newcommand*{\showglossaryentries}[1]{% + \expandafter\show\csname @glolist@#1\endcsname +} % \end{macrocode} -% The default glossary style is set according to the \pkgopt{style} package -% option, but can be overridden by \ics{glossarystyle}. The -% required style must be defined at this point. +%\end{macro} +% +%\subsection{Compatibility with version 2.07 and below} +% +% In order to fix some bugs in v3.0, it was necessary to change the +% way information is written to the \filetype{glo} file, which also meant +% a change in the format of the Xindy style file. The compatibility +% option is meant for documents that use a customised Xindy style +% file with \ics{noist}. With the compatibility option, hopefully +% \app{xindy} will still be able to process the old document, but +% the bugs will remain. The issues in versions 2.07 and below: +%\begin{itemize} +% \item With \pkgopt{xindy}, the counter used by the entry was +% hard-coded into the Xindy style file. This meant that you couldn't +% use the \gloskey[glslink]{counter} to swap counters. +% \item With both \pkgopt{xindy} and \pkgopt{makeindex}, if used +% with \sty{hyperref} and \cs{theH}\meta{counter} was different to +% \cs{thecounter}, the link in the location number would be +% undefined. +%\end{itemize} % \begin{macrocode} -\ifx\@glossary@default@style\relax -\else - \glossarystyle{\@glossary@default@style} +\csname ifglscompatible-2.07\endcsname + \RequirePackage{glossaries-compatible-207} \fi % \end{macrocode} %\iffalse @@ -14096,7 +10932,7 @@ style `#1' undefined}{}}{% %\label{sec:code:mfirstuc} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mfirstuc}[2009/11/03 v1.04 (NLCT)] +\ProvidesPackage{mfirstuc}[2011/04/02 v1.05 (NLCT)] % \end{macrocode} %\begin{macro}{\makefirstuc} % Syntax:\\ @@ -14129,22 +10965,22 @@ style `#1' undefined}{}}{% \if@glscs \@gls@getbody #1{}\@nil \ifx\@gls@rest\@empty - \@gls@makefirstuc{#1}% + \glsmakefirstuc{#1}% \else \expandafter\@gls@split\@gls@rest\@nil \ifx\@gls@first\@empty - \@gls@makefirstuc{#1}% + \glsmakefirstuc{#1}% \else \expandafter\@glsmfirst\expandafter{\@gls@first}% \expandafter\@glsmrest\expandafter{\@gls@rest}% \edef\@gls@domfirstuc{\noexpand\@gls@body - {\noexpand\@gls@makefirstuc\the\@glsmfirst}% + {\noexpand\glsmakefirstuc\the\@glsmfirst}% \the\@glsmrest}% \@gls@domfirstuc \fi \fi \else - \@gls@makefirstuc{#1}% + \glsmakefirstuc{#1}% \fi \fi } @@ -14171,6 +11007,13 @@ style `#1' undefined}{}}{% % \begin{macrocode} \def\@gls@makefirstuc#1{\MakeUppercase #1} % \end{macrocode} +%\begin{macro}{\glsmakefirstuc} +%\changes{1.05}{2011/04/02}{new} +% Provide a user command to make it easier to customise. +% \begin{macrocode} +\newcommand*{\glsmakefirstuc}[1]{\@gls@makefirstuc{#1}} +% \end{macrocode} +%\end{macro} % % Get the first grouped argument and stores in \cs{@gls@body}. % \begin{macrocode} @@ -14370,7 +11213,7 @@ style `#1' undefined}{}}{% % \ics{item} command, it will appear in a bold font by % default. % \begin{macrocode} -\ProvidesPackage{glossary-list}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-list}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} %\begin{style}{list} % The \glostyle{list} glossary style @@ -14400,11 +11243,13 @@ style `#1' undefined}{}}{% % Main (level 0) entries start a new item in the list: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \item[\glstarget{##1}{##2}] ##3\glspostdescription\space ##5}% + \item[\glsentryitem{##1}\glstarget{##1}{##2}] + ##3\glspostdescription\space ##5}% % \end{macrocode} % Sub-entries continue on the same line: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% + \glssubentryitem{##2}% \glstarget{##2}{\strut}##4\glspostdescription\space ##6.}% % \end{macrocode} % Add vertical space between groups: @@ -14470,13 +11315,15 @@ style `#1' undefined}{}}{% % line break after the entry name: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \item[\glstarget{##1}{##2}]\mbox{}\newline + \item[\glsentryitem{##1}\glstarget{##1}{##2}]\mbox{}\newline ##3\glspostdescription\space ##5}% % \end{macrocode} % Sub-entries start a new paragraph: % \begin{macrocode} \renewcommand{\glossarysubentryfield}[6]{% - \par\glstarget{##2}{\strut}##4\glspostdescription\space ##6}% + \par + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6}% } % \end{macrocode} %\end{style} @@ -14538,13 +11385,16 @@ style `#1' undefined}{}}{% % Each main (level 0) entry starts a new item: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \item[]\makebox[\glslistdottedwidth][l]{\glstarget{##1}{##2}% - \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}% + \item[]\makebox[\glslistdottedwidth][l]{% + \glsentryitem{##1}\glstarget{##1}{##2}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}% % \end{macrocode} % Sub entries have the same format as main entries: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - \item[]\makebox[\glslistdottedwidth][l]{\glstarget{##2}{##3}% + \item[]\makebox[\glslistdottedwidth][l]{% + \glssubentryitem{##2}% + \glstarget{##2}{##3}% \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##4}% } % \end{macrocode} @@ -14570,7 +11420,7 @@ style `#1' undefined}{}}{% % Main (level 0) entries just display the name: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \item[\glstarget{##1}{##2}]}% + \item[\glsentryitem{##1}\glstarget{##1}{##2}]}% } % \end{macrocode} %\end{style} @@ -14589,7 +11439,7 @@ style `#1' undefined}{}}{% % The glossary styles defined in the \isty{glossary-long} package % used the \env{longtable} environment in the glossary. % \begin{macrocode} -\ProvidesPackage{glossary-long}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-long}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % Requires the \isty{longtable} package: % \begin{macrocode} @@ -14644,12 +11494,14 @@ style `#1' undefined}{}}{% % Main (level 0) entries displayed in a row: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% % \end{macrocode} % Sub entries displayed on the following row without the name: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -14742,13 +11594,15 @@ style `#1' undefined}{}}{% % description in second column, page list in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}% % \end{macrocode} % Sub-entries on a separate row (no name, description in % second column, page list in third column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -14844,13 +11698,15 @@ style `#1' undefined}{}}{% % in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% % \end{macrocode} % Sub entries on a single row with no name (description in second % column, symbol in third column, page list in last column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -15025,7 +11881,7 @@ style `#1' undefined}{}}{% % used the \env{longtable} environment in the glossary and use % ragged right formatting for the multiline columns. % \begin{macrocode} -\ProvidesPackage{glossary-longragged}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-longragged}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -15081,13 +11937,15 @@ style `#1' undefined}{}}{% % Main (level 0) entries displayed in a row: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3\glspostdescription\space ##5% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5% \tabularnewline}% % \end{macrocode} % Sub entries displayed on the following row without the name: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4\glspostdescription\space ##6% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6% \tabularnewline}% % \end{macrocode} % Blank row between groups: @@ -15185,13 +12043,15 @@ style `#1' undefined}{}}{% % description in second column, page list in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% % \end{macrocode} % Sub-entries on a separate row (no name, description in % second column, page list in third column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -15292,13 +12152,15 @@ style `#1' undefined}{}}{% % in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% % \end{macrocode} % Sub entries on a single row with no name (description in second % column, symbol in third column, page list in last column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -15402,7 +12264,7 @@ style `#1' undefined}{}}{% % The glossary styles defined in the \isty{glossary-super} package % use the \env{supertabular} environment. % \begin{macrocode} -\ProvidesPackage{glossary-super}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-super}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % Requires the \isty{supertabular} package: % \begin{macrocode} @@ -15461,13 +12323,15 @@ style `#1' undefined}{}}{% % description and page list in second column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% % \end{macrocode} % Sub entries put in a row (no name, description and page list % in second column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -15569,13 +12433,15 @@ style `#1' undefined}{}}{% % description in second column, page list in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}% % \end{macrocode} % Sub entries on a row (no name, description in second column, % page list in last column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -15681,13 +12547,15 @@ style `#1' undefined}{}}{% % and page list in last column: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% % \end{macrocode} % Sub entries on a row with no name, the description in the second % column, symbol in third column and page list in last column: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -15874,7 +12742,7 @@ style `#1' undefined}{}}{% % are like those provided by the \isty{glossary-super} package, % except that the multiline columns have ragged right justification. % \begin{macrocode} -\ProvidesPackage{glossary-superragged}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-superragged}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -15932,14 +12800,16 @@ style `#1' undefined}{}}{% % description and page list in second column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3\glspostdescription\space ##5% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5% \tabularnewline}% % \end{macrocode} % Sub entries put in a row (no name, description and page list % in second column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4\glspostdescription\space ##6% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6% \tabularnewline}% % \end{macrocode} % Blank row between groups: @@ -16044,13 +12914,15 @@ style `#1' undefined}{}}{% % description in second column, page list in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% % \end{macrocode} % Sub entries on a row (no name, description in second column, % page list in last column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -16160,12 +13032,14 @@ style `#1' undefined}{}}{% % and page list in last column: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% % \end{macrocode} % Sub entries on a row with no name, the description in the second% column, symbol in third column and page list in last column: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} @@ -16264,7 +13138,7 @@ style `#1' undefined}{}}{% % that have a tree-like structure. These are designed for % hierarchical glossaries. % \begin{macrocode} -\ProvidesPackage{glossary-tree}[2009/01/14 v1.01 (NLCT)] +\ProvidesPackage{glossary-tree}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % %\begin{style}{index} @@ -16301,7 +13175,7 @@ style `#1' undefined}{}}{% % and the page list. % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% -\item\textbf{\glstarget{##1}{##2}}% +\item\glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% @@ -16322,6 +13196,7 @@ style `#1' undefined}{}}{% \or % level 1 \subitem + \glssubentryitem{##2}% \else % all other levels \subsubitem @@ -16411,7 +13286,7 @@ style `#1' undefined}{}}{% \renewcommand{\glossaryentryfield}[5]{% \hangindent0pt\relax \parindent0pt\relax - \textbf{\glstarget{##1}{##2}}% + \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% @@ -16426,6 +13301,9 @@ style `#1' undefined}{}}{% \renewcommand{\glossarysubentryfield}[6]{% \hangindent##1\glstreeindent\relax \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi \textbf{\glstarget{##2}{##3}}% \ifx\relax##5\relax \else @@ -16524,7 +13402,7 @@ style `#1' undefined}{}}{% \renewcommand{\glossaryentryfield}[5]{% \hangindent0pt\relax \parindent0pt\relax - \textbf{\glstarget{##1}{##2}}% + \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% @@ -16538,6 +13416,9 @@ style `#1' undefined}{}}{% \renewcommand{\glossarysubentryfield}[6]{% \hangindent##1\glstreeindent\relax \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi \glstarget{##2}{\strut}% ##4\glspostdescription\space ##6\par}% % \end{macrocode} @@ -16657,7 +13538,7 @@ style `#1' undefined}{}}{% % Put the name to the left of the paragraph block. % \begin{macrocode} \makebox[0pt][r]{\makebox[\glstreeindent][l]{% - \textbf{\glstarget{##1}{##2}}}}% + \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}}}% % \end{macrocode} % If the symbol is missing, ignore it, otherwise put it in % brackets. @@ -16681,6 +13562,13 @@ style `#1' undefined}{}}{% % \begin{macrocode} \renewcommand{\glossarysubentryfield}[6]{% % \end{macrocode} +% Increment and display the sub-entry counter if this is a level~1 +% entry and the sub-entry counter is in use. +% \begin{macrocode} + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi +% \end{macrocode} % If the level hasn't changed, keep the same settings, otherwise % adjust \cs{glstreeindent} accordingly. % \begin{macrocode} @@ -16802,21 +13690,386 @@ style `#1' undefined}{}}{% \parindent0pt\relax \textbf{\glsnavigation}\par\indexspace}% % \end{macrocode} -% Put a hypertarget at the start of each group +% Put a hypertarget at the start of each group +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \indexspace}} +% \end{macrocode} +%\end{style} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-compatible-207.sty> +% \end{macrocode} +%\fi +%\section{glossaries-compatible-207} +% Provides compatibility with version 2.07 and below. This uses +% original \sty{glossaries} xindy and makeindex formatting, so can +% be used with old documents that had customized style files, but +% hyperlinks may not work properly. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-compatible-207}[2011/04/02 v1.0 (NLCT)] +% \end{macrocode} +%\begin{macro}{\GlsAddXdyAttribute} +% Adds an attribute in old format. +% \begin{macrocode} +\ifglsxindy + \renewcommand*\GlsAddXdyAttribute[1]{% + \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string"}% + \expandafter\toks@\expandafter{\@xdylocref}% + \edef\@xdylocref{\the\toks@ ^^J% + (markup-locref + :open \string"\string~n\string\setentrycounter + {\noexpand\glscounter}% + \expandafter\string\csname#1\endcsname + \expandafter\@gobble\string\{\string" ^^J + :close \string"\expandafter\@gobble\string\}\string" ^^J + :attr \string"#1\string")}} +% \end{macrocode} +% Only has an effect before \ics{writeist}: +% \begin{macrocode} +\fi +% \end{macrocode} +%\end{macro} +%\begin{macro}{\GlsAddXdyCounters} +% \begin{macrocode} +\renewcommand*\GlsAddXdyCounters[1]{% + \GlossariesWarning{\string\GlsAddXdyCounters\space not available + in compatibility mode.}% +} +% \end{macrocode} +%\end{macro} +% Add predefined attributes +% \begin{macrocode} + \GlsAddXdyAttribute{glsnumberformat} + \GlsAddXdyAttribute{textrm} + \GlsAddXdyAttribute{textsf} + \GlsAddXdyAttribute{texttt} + \GlsAddXdyAttribute{textbf} + \GlsAddXdyAttribute{textmd} + \GlsAddXdyAttribute{textit} + \GlsAddXdyAttribute{textup} + \GlsAddXdyAttribute{textsl} + \GlsAddXdyAttribute{textsc} + \GlsAddXdyAttribute{emph} + \GlsAddXdyAttribute{glshypernumber} + \GlsAddXdyAttribute{hyperrm} + \GlsAddXdyAttribute{hypersf} + \GlsAddXdyAttribute{hypertt} + \GlsAddXdyAttribute{hyperbf} + \GlsAddXdyAttribute{hypermd} + \GlsAddXdyAttribute{hyperit} + \GlsAddXdyAttribute{hyperup} + \GlsAddXdyAttribute{hypersl} + \GlsAddXdyAttribute{hypersc} + \GlsAddXdyAttribute{hyperemph} +% \end{macrocode} +% +%\begin{macro}{\GlsAddXdyLocation} +% Restore v2.07 definition: +% \begin{macrocode} +\ifglsxindy + \renewcommand*{\GlsAddXdyLocation}[2]{% + \edef\@xdyuserlocationdefs{% + \@xdyuserlocationdefs ^^J% + (define-location-class \string"#1\string"^^J\space\space + \space(#2)) + }% + \edef\@xdyuserlocationnames{% + \@xdyuserlocationnames^^J\space\space\space + \string"#1\string"}% + } +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@do@wrglossary} +% \begin{macrocode} +\renewcommand{\@do@wrglossary}[1]{% +% \end{macrocode} +% Determine whether to use \app{xindy} or \app{makeindex} +% syntax +% \begin{macrocode} +\ifglsxindy +% \end{macrocode} +% Need to determine if the formatting information starts with +% a ( or ) indicating a range. +% \begin{macrocode} + \expandafter\@glo@check@mkidxrangechar\@glsnumberformat\@nil + \def\@glo@range{}% + \expandafter\if\@glo@prefix(\relax + \def\@glo@range{:open-range}% + \else + \expandafter\if\@glo@prefix)\relax + \def\@glo@range{:close-range}% + \fi + \fi +% \end{macrocode} +% Get the location and escape any special characters +% \begin{macrocode} + \protected@edef\@glslocref{\theglsentrycounter}% + \@gls@checkmkidxchars\@glslocref +% \end{macrocode} +% Write to the glossary file using \app{xindy} syntax. +% \begin{macrocode} + \glossary[\csname glo@#1@type\endcsname]{% + (indexentry :tkey (\csname glo@#1@index\endcsname) + :locref \string"\@glslocref\string" % + :attr \string"\@glo@suffix\string" \@glo@range + ) + }% +\else +% \end{macrocode} +% Convert the format information into the format required for +% \app{makeindex} +% \begin{macrocode} + \@set@glo@numformat\@glo@numfmt\@gls@counter\@glsnumberformat +% \end{macrocode} +% Write to the glossary file using \app{makeindex} syntax. +% \begin{macrocode} + \glossary[\csname glo@#1@type\endcsname]{% + \string\glossaryentry{\csname glo@#1@index\endcsname + \@gls@encapchar\@glo@numfmt}{\theglsentrycounter}}% +\fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@set@glo@numformat} +% Only had 3 arguments in v2.07 +% \begin{macrocode} +\def\@set@glo@numformat#1#2#3{% + \expandafter\@glo@check@mkidxrangechar#3\@nil + \protected@edef#1{% + \@glo@prefix setentrycounter[]{#2}% + \expandafter\string\csname\@glo@suffix\endcsname + }% + \@gls@checkmkidxchars#1% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\writeist} +% Redefine \cs{writeist} back to the way it was in v2.07, but change +% \cs{istfile} to \cs{glswrite}. +% \begin{macrocode} +\ifglsxindy + \def\writeist{% + \openout\glswrite=\istfilename + \write\glswrite{;; xindy style file created by the glossaries + package in compatible-2.07 mode}% + \write\glswrite{;; for document '\jobname' on + \the\year-\the\month-\the\day}% + \write\glswrite{^^J; required styles^^J} + \@for\@xdystyle:=\@xdyrequiredstyles\do{% + \ifx\@xdystyle\@empty + \else + \protected@write\glswrite{}{(require + \string"\@xdystyle.xdy\string")}% + \fi + }% + \write\glswrite{^^J% + ; list of allowed attributes (number formats)^^J}% + \write\glswrite{(define-attributes ((\@xdyattributes)))}% + \write\glswrite{^^J; user defined alphabets^^J}% + \write\glswrite{\@xdyuseralphabets}% + \write\glswrite{^^J; location class definitions^^J}% + \protected@edef\@gls@roman{\@roman{0\string" + \string"roman-numbers-lowercase\string" :sep \string"}}% + \@onelevel@sanitize\@gls@roman + \edef\@tmp{\string" \string"roman-numbers-lowercase\string" + :sep \string"}% + \@onelevel@sanitize\@tmp + \ifx\@tmp\@gls@roman + \write\glswrite{(define-location-class + \string"roman-page-numbers\string"^^J\space\space\space + (\string"roman-numbers-lowercase\string") + :min-range-length \@glsminrange)}% + \else + \write\glswrite{(define-location-class + \string"roman-page-numbers\string"^^J\space\space\space + (:sep "\@gls@roman") + :min-range-length \@glsminrange)}% + \fi + \write\glswrite{(define-location-class + \string"Roman-page-numbers\string"^^J\space\space\space + (\string"roman-numbers-uppercase\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"arabic-page-numbers\string"^^J\space\space\space + (\string"arabic-numbers\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"alpha-page-numbers\string"^^J\space\space\space + (\string"alpha\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"Alpha-page-numbers\string"^^J\space\space\space + (\string"ALPHA\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"Appendix-page-numbers\string"^^J\space\space\space + (\string"ALPHA\string" + :sep \string"\@glsAlphacompositor\string" + \string"arabic-numbers\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"arabic-section-numbers\string"^^J\space\space\space + (\string"arabic-numbers\string" + :sep \string"\glscompositor\string" + \string"arabic-numbers\string") + :min-range-length \@glsminrange)}% + \write\glswrite{^^J; user defined location classes}% + \write\glswrite{\@xdyuserlocationdefs}% + \write\glswrite{^^J; define cross-reference class^^J}% + \write\glswrite{(define-crossref-class \string"see\string" + :unverified )}% + \write\glswrite{(markup-crossref-list + :class \string"see\string"^^J\space\space\space + :open \string"\string\glsseeformat\string" + :close \string"{}\string")}% + \write\glswrite{^^J; define the order of the location classes}% + \write\glswrite{(define-location-class-order + (\@xdylocationclassorder))}% + \write\glswrite{^^J; define the glossary markup^^J}% + \write\glswrite{(markup-index^^J\space\space\space + :open \string"\string + \glossarysection[\string\glossarytoctitle]{\string + \glossarytitle}\string\glossarypreamble\string~n\string\begin + {theglossary}\string\glossaryheader\string~n\string" ^^J\space + \space\space:close \string"\expandafter\@gobble + \string\%\string~n\string + \end{theglossary}\string\glossarypostamble + \string~n\string" ^^J\space\space\space + :tree)}% + \write\glswrite{(markup-letter-group-list + :sep \string"\string\glsgroupskip\string~n\string")}% + \write\glswrite{(markup-indexentry + :open \string"\string\relax \string\glsresetentrylist + \string~n\string")}% + \write\glswrite{(markup-locclass-list :open + \string"\glsopenbrace\string\glossaryentrynumbers + \glsopenbrace\string\relax\space \string"^^J\space\space\space + :sep \string", \string" + :close \string"\glsclosebrace\glsclosebrace\string")}% + \write\glswrite{(markup-locref-list + :sep \string"\string\delimN\space\string")}% + \write\glswrite{(markup-range + :sep \string"\string\delimR\space\string")}% + \@onelevel@sanitize\gls@suffixF + \@onelevel@sanitize\gls@suffixFF + \ifx\gls@suffixF\@empty + \else + \write\glswrite{(markup-range + :close "\gls@suffixF" :length 1 :ignore-end)}% + \fi + \ifx\gls@suffixFF\@empty + \else + \write\glswrite{(markup-range + :close "\gls@suffixFF" :length 2 :ignore-end)}% + \fi + \write\glswrite{^^J; define format to use for locations^^J}% + \write\glswrite{\@xdylocref}% + \write\glswrite{^^J; define letter group list format^^J}% + \write\glswrite{(markup-letter-group-list + :sep \string"\string\glsgroupskip\string~n\string")}% + \write\glswrite{^^J; letter group headings^^J}% + \write\glswrite{(markup-letter-group + :open-head \string"\string\glsgroupheading + \glsopenbrace\string"^^J\space\space\space + :close-head \string"\glsclosebrace\string")}% + \write\glswrite{^^J; additional letter groups^^J}% + \write\glswrite{\@xdylettergroups}% + \write\glswrite{^^J; additional sort rules^^J} + \write\glswrite{\@xdysortrules}% + \noist} +\else + \edef\@gls@actualchar{\string?} + \edef\@gls@encapchar{\string|} + \edef\@gls@levelchar{\string!} + \edef\@gls@quotechar{\string"} + \def\writeist{\relax + \openout\glswrite=\istfilename + \write\glswrite{\expandafter\@gobble\string\% makeindex style file + created by the glossaries package} + \write\glswrite{\expandafter\@gobble\string\% for document + '\jobname' on \the\year-\the\month-\the\day} + \write\glswrite{actual '\@gls@actualchar'} + \write\glswrite{encap '\@gls@encapchar'} + \write\glswrite{level '\@gls@levelchar'} + \write\glswrite{quote '\@gls@quotechar'} + \write\glswrite{keyword \string"\string\\glossaryentry\string"} + \write\glswrite{preamble \string"\string\\glossarysection[\string + \\glossarytoctitle]{\string\\glossarytitle}\string + \\glossarypreamble\string\n\string\\begin{theglossary}\string + \\glossaryheader\string\n\string"} + \write\glswrite{postamble \string"\string\%\string\n\string + \\end{theglossary}\string\\glossarypostamble\string\n + \string"} + \write\glswrite{group_skip \string"\string\\glsgroupskip\string\n + \string"} + \write\glswrite{item_0 \string"\string\%\string\n\string"} + \write\glswrite{item_1 \string"\string\%\string\n\string"} + \write\glswrite{item_2 \string"\string\%\string\n\string"} + \write\glswrite{item_01 \string"\string\%\string\n\string"} + \write\glswrite{item_x1 + \string"\string\\relax \string\\glsresetentrylist\string\n + \string"} + \write\glswrite{item_12 \string"\string\%\string\n\string"} + \write\glswrite{item_x2 + \string"\string\\relax \string\\glsresetentrylist\string\n + \string"} + \write\glswrite{delim_0 \string"\string\{\string + \\glossaryentrynumbers\string\{\string\\relax \string"} + \write\glswrite{delim_1 \string"\string\{\string + \\glossaryentrynumbers\string\{\string\\relax \string"} + \write\glswrite{delim_2 \string"\string\{\string + \\glossaryentrynumbers\string\{\string\\relax \string"} + \write\glswrite{delim_t \string"\string\}\string\}\string"} + \write\glswrite{delim_n \string"\string\\delimN \string"} + \write\glswrite{delim_r \string"\string\\delimR \string"} + \write\glswrite{headings_flag 1} + \write\glswrite{heading_prefix + \string"\string\\glsgroupheading\string\{\string"} + \write\glswrite{heading_suffix + \string"\string\}\string\\relax + \string\\glsresetentrylist \string"} + \write\glswrite{symhead_positive \string"glssymbols\string"} + \write\glswrite{numhead_positive \string"glsnumbers\string"} + \write\glswrite{page_compositor \string"\glscompositor\string"} + \@gls@escbsdq\gls@suffixF + \@gls@escbsdq\gls@suffixFF + \ifx\gls@suffixF\@empty + \else + \write\glswrite{suffix_2p \string"\gls@suffixF\string"} + \fi + \ifx\gls@suffixFF\@empty + \else + \write\glswrite{suffix_3p \string"\gls@suffixFF\string"} + \fi + \noist + } +\fi +% \end{macrocode} +%\end{macro} +%\begin{macro}{\noist} % \begin{macrocode} - \renewcommand*{\glsgroupheading}[1]{% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par - \indexspace}} +\renewcommand*{\noist}{\let\writeist\relax} % \end{macrocode} -%\end{style} -% +%\end{macro} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse @@ -16824,7 +14077,7 @@ style `#1' undefined}{}}{% %<*glossaries-accsupp.sty> % \end{macrocode} %\fi -%\section{Accessibilty Support (glossaries-accsupp Code)} +%\section{Accessibility Support (glossaries-accsupp Code)} %\label{sec:code:accsupp} % The \isty{glossaries-accsupp} package is experimental. It is % intended to provide a means of using the PDF accessibilty support @@ -16832,7 +14085,13 @@ style `#1' undefined}{}}{% % further details about accessibility support. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-accsupp}[2009/11/02 v0.2 (NLCT)] +% \end{macrocode} +% Package version number now in line with main glossaries package number +% but will only be updated when \texttt{glossaries-accsupp.sty} is +% modified. +% \begin{macrocode} +\ProvidesPackage{glossaries-accsupp}[2011/04/02 v3.0 (NLCT) + Experimental glossaries accessibility] % \end{macrocode} % Pass all options to \sty{glossaries}: % \begin{macrocode} @@ -16927,6 +14186,38 @@ style `#1' undefined}{}}{% } % \end{macrocode} %\end{key} +%\begin{key}{shortaccess} +% The replacement text corresponding to the \gloskey{short} key: +% \begin{macrocode} +\define@key{glossentry}{shortaccess}{% + \def\@glo@shortaccess{#1}% +} +% \end{macrocode} +%\end{key} +%\begin{key}{shortpluralaccess} +% The replacement text corresponding to the \gloskey{shortplural} key: +% \begin{macrocode} +\define@key{glossentry}{shortpluralaccess}{% + \def\@glo@shortpluralaccess{#1}% +} +% \end{macrocode} +%\end{key} +%\begin{key}{longaccess} +% The replacement text corresponding to the \gloskey{long} key: +% \begin{macrocode} +\define@key{glossentry}{longaccess}{% + \def\@glo@longaccess{#1}% +} +% \end{macrocode} +%\end{key} +%\begin{key}{longpluralaccess} +% The replacement text corresponding to the \gloskey{longplural} key: +% \begin{macrocode} +\define@key{glossentry}{longpluralaccess}{% + \def\@glo@longpluralaccess{#1}% +} +% \end{macrocode} +%\end{key} % There are no equivalent keys for the \gloskey{user1}\ldots %\gloskey{user6} keys. The replacement text would have to be % explicitly put in the value, e.g., @@ -16958,6 +14249,10 @@ style `#1' undefined}{}}{% \def\@glo@symbolpluralaccess{\@glo@symbolaccess}% \def\@glo@descaccess{\relax}% \def\@glo@descpluralaccess{\@glo@descaccess}% + \def\@glo@shortaccess{\relax}% + \def\@glo@shortpluralaccess{\@glo@shortaccess}% + \def\@glo@longaccess{\relax}% + \def\@glo@longpluralaccess{\@glo@longaccess}% } % \end{macrocode} % Add to the end hook: @@ -16995,6 +14290,18 @@ style `#1' undefined}{}}{% \expandafter \protected@xdef\csname glo@\@glo@label @descpluralaccess\endcsname{% \@glo@descpluralaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @shortaccess\endcsname{% + \@glo@shortaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @shortpluralaccess\endcsname{% + \@glo@shortpluralaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @longaccess\endcsname{% + \@glo@longaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @longpluralaccess\endcsname{% + \@glo@longpluralaccess}% } % \end{macrocode} % @@ -17081,6 +14388,43 @@ style `#1' undefined}{}}{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsentryshortaccess} +% Get the value of the \gloskey{shortaccess} key for the entry with +% the given label: +% \begin{macrocode} +\newcommand*{\glsentryshortaccess}[1]{% + \csname glo@#1@shortaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsentryshortpluralaccess} +% Get the value of the \gloskey{shortpluralaccess} key for the entry with +% the given label: +% \begin{macrocode} +\newcommand*{\glsentryshortpluralaccess}[1]{% + \csname glo@#1@shortpluralaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsentrylongaccess} +% Get the value of the \gloskey{longaccess} key for the entry with +% the given label: +% \begin{macrocode} +\newcommand*{\glsentrylongaccess}[1]{% + \csname glo@#1@longaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsentrylongpluralaccess} +% Get the value of the \gloskey{longpluralaccess} key for the entry with +% the given label: +% \begin{macrocode} +\newcommand*{\glsentrylongpluralaccess}[1]{% + \csname glo@#1@longpluralaccess\endcsname +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccsupp} %\cs{glsaccsupp}\marg{replacement text}\marg{text}\\[10pt] % This can be redefined to use "E" or "Alt" instead of @@ -17220,6 +14564,61 @@ style `#1' undefined}{}}{% } % \end{macrocode} %\end{macro} +%\begin{macro}{\glsshortaccessdisplay} +% As above but for the \gloskey{shortaccess} replacement text. +% \begin{macrocode} +\DeclareRobustCommand*{\glsshortaccessdisplay}[2]{% + \protected@edef\@glo@access{\glsentryshortaccess{#2}}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsshortpluralaccessdisplay} +% As above but for the \gloskey{shortpluralaccess} replacement text. +% \begin{macrocode} +\DeclareRobustCommand*{\glsshortpluralaccessdisplay}[2]{% + \protected@edef\@glo@access{\glsentryshortpluralaccess{#2}}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glslongaccessdisplay} +% As above but for the \gloskey{longaccess} replacement text. +% \begin{macrocode} +\DeclareRobustCommand*{\glslongaccessdisplay}[2]{% + \protected@edef\@glo@access{\glsentrylongaccess{#2}}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongpluralaccessdisplay} +% As above but for the \gloskey{longpluralaccess} replacement text. +% \begin{macrocode} +\DeclareRobustCommand*{\glslongpluralaccessdisplay}[2]{% + \protected@edef\@glo@access{\glsentrylongpluralaccess{#2}}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccessdisplay} % Gets the replacement text corresponding to the named key given % by the first argument and calls the appropriate command @@ -17597,6 +14996,138 @@ style `#1' undefined}{}}{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\@acrshort} +% \begin{macrocode} +\def\@acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \begin{macrocode} + \def\@glo@text{% + \glsshortaccessdisplay{\glsentryshort{#2}}{#2}% + }% +% \end{macrocode} +% Call \cs{@gls@link} +% \begin{macrocode} + \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Acrshort} +% \begin{macrocode} +\def\@Acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \begin{macrocode} + \def\@glo@text{% + \glsshortaccessdisplay{\Glsentryshort{#2}}{#2}% + }% +% \end{macrocode} +% Call \cs{@gls@link} +% \begin{macrocode} + \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@ACRshort} +% \begin{macrocode} +\def\@ACRshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \begin{macrocode} + \def\@glo@text{% + \glsshortaccessdisplay{\MakeUppercase{\glsentryshort{#2}}}{#2}% + }% +% \end{macrocode} +% Call \cs{@gls@link} +% \begin{macrocode} + \@gls@link[#1]{#2}{\acronymfont{\@glo@text#3}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@acrlong} +% \begin{macrocode} +\def\@acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \begin{macrocode} + \def\@glo@text{% + \glslongaccessdisplay{\glsentrylong{#2}}{#2}% + }% +% \end{macrocode} +% Call \cs{@gls@link} +% \begin{macrocode} + \@gls@link[#1]{#2}{\@glo@text#3}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Acrlong} +% \begin{macrocode} +\def\@Acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \begin{macrocode} + \def\@glo@text{% + \glslongaccessdisplay{\Glsentrylong{#2}}{#2}% + }% +% \end{macrocode} +% Call \cs{@gls@link} +% \begin{macrocode} + \@gls@link[#1]{#2}{\@glo@text#3}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@ACRlong} +% \begin{macrocode} +\def\@ACRlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% +% \end{macrocode} +% Determine what the link text should be (this is stored in +% \cs{@glo@text}) +% \begin{macrocode} + \def\@glo@text{% + \glslongaccessdisplay{\MakeUppercase{\glsentrylong{#2}}}{#2}% + }% +% \end{macrocode} +% Call \cs{@gls@link} +% \begin{macrocode} + \@gls@link[#1]{#2}{\@glo@text#3}% + }% +} +% \end{macrocode} +%\end{macro} +% %\subsection{Displaying the Glossary} % Entries within the glossary or list of acronyms are now formatted % via \cs{accsuppglossaryentryfield} and @@ -17649,7 +15180,7 @@ style `#1' undefined}{}}{% % the access text to the long version by default. % \begin{macrocode} \renewcommand*{\newacronymhook}{% - \edef\@gls@keylist{\glsshortkey access=\the\glslongtok,% + \edef\@gls@keylist{shortaccess=\the\glslongtok,% \the\glskeylisttok}% \expandafter\glskeylisttok\expandafter{\@gls@keylist}% } @@ -17666,21 +15197,26 @@ style `#1' undefined}{}}{% description={\the\glslongtok},% descriptionaccess=\relax, text={\the\glsshorttok},% - textaccess={\the\glslongtok},% access={\noexpand\@glo@textaccess},% sort={\the\glsshorttok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + shortaccess={\the\glslongtok},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% - firstaccess=\relax, - first={\noexpand\glsdescriptionaccessdisplay + first={\noexpand\glslongaccessdisplay {\the\glslongtok}{\the\glslabeltok}\space - (\noexpand\glstextaccessdisplay + (\noexpand\glsshortaccessdisplay {\the\glsshorttok}{\the\glslabeltok})},% plural={\the\glsshorttok\acrpluralsuffix},% - firstplural={\noexpand\glsdescriptionpluralaccessdisplay - {\noexpand\@glo@descplural}{\the\glslabeltok}\space - (\noexpand\glspluralaccessdisplay - {\noexpand\@glo@plural}{\the\glslabeltok})},% + firstplural={\noexpand\glslongpluralaccessdisplay + {\noexpand\@glo@longpl}{\the\glslabeltok}\space + (\noexpand\glsshortpluralaccessdisplay + {\noexpand\@glo@shortpl}{\the\glslabeltok})},% + firstaccess=\relax, firstpluralaccess=\relax, + textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok }% }% @@ -17698,11 +15234,17 @@ style `#1' undefined}{}}{% name={\noexpand\acronymfont{\the\glsshorttok}},% sort={\the\glsshorttok},% text={\the\glsshorttok},% - textaccess={\the\glslongtok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + shortaccess={\the\glslongtok},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% access={\noexpand\@glo@textaccess},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% symbol={\the\glslongtok},% symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},% + firstpluralaccess=\relax, + textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok }% }% @@ -17721,6 +15263,11 @@ style `#1' undefined}{}}{% \acrnameformat{\the\glsshorttok}{\the\glslongtok}},% access={\noexpand\@glo@textaccess},% sort={\the\glsshorttok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + shortaccess={\the\glslongtok},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% first={\the\glslongtok},% firstaccess=\relax, firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% @@ -17730,6 +15277,8 @@ style `#1' undefined}{}}{% symbol={\noexpand\@glo@text},% symbolaccess={\noexpand\@glo@textaccess},% symbolplural={\noexpand\@glo@plural},% + firstpluralaccess=\relax, + textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok}% }% \@do@newglossaryentry @@ -17744,11 +15293,15 @@ style `#1' undefined}{}}{% {% type=\acronymtype,% name={\noexpand\acronymfont{\the\glsshorttok}},% - access={\noexpand\@glo@textaccess},% sort={\the\glsshorttok},% text={\the\glsshorttok},% textaccess={\the\glslongtok},% + access={\noexpand\@glo@textaccess},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok @@ -17768,9 +15321,14 @@ style `#1' undefined}{}}{% name={\noexpand\acronymfont{\the\glsshorttok}},% access={\noexpand\@glo@symbolaccess},% sort={\the\glsshorttok},% - text={\noexpand\@glo@symbol},% - textaccess={\noexpand\@glo@symbolaccess},% - plural={\noexpand\@glo@symbolplural},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + shortaccess={\the\glslongtok},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% + text={\noexpand\@glo@short},% + textaccess={\noexpand\@glo@shortaccess},% + plural={\noexpand\@glo@shortpl},% first={\the\glslongtok},% firstaccess=\relax, firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% @@ -17786,7 +15344,9 @@ style `#1' undefined}{}}{% } % \end{macrocode} %\end{macro} -% Add means of referencing accessibility support for acronyms: +% +% The following are kept for compatibility with versions before +% 3.0: %\begin{macro}{\glsshortaccesskey} % \begin{macrocode} \newcommand*{\glsshortaccesskey}{\glsshortkey access}% @@ -17807,6 +15367,99 @@ style `#1' undefined}{}}{% \newcommand*{\glslongpluralaccesskey}{\glslongpluralkey access}% % \end{macrocode} %\end{macro} +%\subsection{Debugging Commands} +% +%\begin{macro}{\showglonameaccess} +% \begin{macrocode} +\newcommand*{\showglonameaccess}[1]{% + \expandafter\show\csname glo@#1@textaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglotextaccess} +% \begin{macrocode} +\newcommand*{\showglotextaccess}[1]{% + \expandafter\show\csname glo@#1@textaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglopluralaccess} +% \begin{macrocode} +\newcommand*{\showglopluralaccess}[1]{% + \expandafter\show\csname glo@#1@pluralaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglofirstaccess} +% \begin{macrocode} +\newcommand*{\showglofirstaccess}[1]{% + \expandafter\show\csname glo@#1@firstaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglofirstpluralaccess} +% \begin{macrocode} +\newcommand*{\showglofirstpluralaccess}[1]{% + \expandafter\show\csname glo@#1@firstpluralaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglosymbolaccess} +% \begin{macrocode} +\newcommand*{\showglosymbolaccess}[1]{% + \expandafter\show\csname glo@#1@symbolaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglosymbolpluralaccess} +% \begin{macrocode} +\newcommand*{\showglosymbolpluralaccess}[1]{% + \expandafter\show\csname glo@#1@symbolpluralaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglodescaccess} +% \begin{macrocode} +\newcommand*{\showglodescaccess}[1]{% + \expandafter\show\csname glo@#1@descaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglodescpluralaccess} +% \begin{macrocode} +\newcommand*{\showglodescpluralaccess}[1]{% + \expandafter\show\csname glo@#1@descpluralaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showgloshortaccess} +% \begin{macrocode} +\newcommand*{\showgloshortaccess}[1]{% + \expandafter\show\csname glo@#1@shortaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showgloshortpluralaccess} +% \begin{macrocode} +\newcommand*{\showgloshortpluralaccess}[1]{% + \expandafter\show\csname glo@#1@shortpluralaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglolongaccess} +% \begin{macrocode} +\newcommand*{\showglolongaccess}[1]{% + \expandafter\show\csname glo@#1@longaccess\endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\showglolongpluralaccess} +% \begin{macrocode} +\newcommand*{\showglolongpluralaccess}[1]{% + \expandafter\show\csname glo@#1@longpluralaccess\endcsname +} +% \end{macrocode} +%\end{macro} %\iffalse % \begin{macrocode} % @@ -17958,980 +15611,1413 @@ style `#1' undefined}{}}{% % Italian: % \begin{macrocode} \@ifundefined{captionsitalian}{}{% - \addto\captionsitalian{% - \renewcommand*{\glossaryname}{Glossario}% - \renewcommand*{\acronymname}{Acronimi}% - \renewcommand*{\entryname}{Nomenclatura}% - \renewcommand*{\descriptionname}{Descrizione}% - \renewcommand*{\symbolname}{Simbolo}% - \renewcommand*{\pagelistname}{Elenco delle pagine}% - \renewcommand*{\glssymbolsgroupname}{Simboli}% - \renewcommand*{\glsnumbersgroupname}{Numeri}} + \addto\captionsitalian{% + \renewcommand*{\glossaryname}{Glossario}% + \renewcommand*{\acronymname}{Acronimi}% + \renewcommand*{\entryname}{Nomenclatura}% + \renewcommand*{\descriptionname}{Descrizione}% + \renewcommand*{\symbolname}{Simbolo}% + \renewcommand*{\pagelistname}{Elenco delle pagine}% + \renewcommand*{\glssymbolsgroupname}{Simboli}% + \renewcommand*{\glsnumbersgroupname}{Numeri}} +} +% \end{macrocode} +% Dutch: +% \begin{macrocode} +\@ifundefined{captionsdutch}{}{% + \addto\captionsdutch{% + \renewcommand*{\glossaryname}{Woordenlijst}% + \renewcommand*{\acronymname}{Acroniemen}% + \renewcommand*{\entryname}{Benaming}% + \renewcommand*{\descriptionname}{Beschrijving}% + \renewcommand*{\symbolname}{Symbool}% + \renewcommand*{\pagelistname}{Pagina's}% + \renewcommand*{\glssymbolsgroupname}{Symbolen}% + \renewcommand*{\glsnumbersgroupname}{Cijfers}} +} +% \end{macrocode} +% Spanish: +% \begin{macrocode} +\@ifundefined{captionsspanish}{}{% + \addto\captionsspanish{% + \renewcommand*{\glossaryname}{Glosario}% + \renewcommand*{\acronymname}{Siglas}% + \renewcommand*{\entryname}{Entrada}% + \renewcommand*{\descriptionname}{Descripci\'on}% + \renewcommand*{\symbolname}{S\'{\i}mbolo}% + \renewcommand*{\pagelistname}{Lista de p\'aginas}% + \renewcommand*{\glssymbolsgroupname}{S\'{\i}mbolos}% + \renewcommand*{\glsnumbersgroupname}{N\'umeros}} +} +% \end{macrocode} +% French: +% \begin{macrocode} +\@ifundefined{captionsfrench}{}{% + \addto\captionsfrench{% + \renewcommand*{\glossaryname}{Glossaire}% + \renewcommand*{\acronymname}{Acronymes}% + \renewcommand*{\entryname}{Terme}% + \renewcommand*{\descriptionname}{Description}% + \renewcommand*{\symbolname}{Symbole}% + \renewcommand*{\pagelistname}{Pages}% + \renewcommand*{\glssymbolsgroupname}{Symboles}% + \renewcommand*{\glsnumbersgroupname}{Nombres}} +} +\@ifundefined{captionsfrenchb}{}{% + \addto\captionsfrenchb{% + \renewcommand*{\glossaryname}{Glossaire}% + \renewcommand*{\acronymname}{Acronymes}% + \renewcommand*{\entryname}{Terme}% + \renewcommand*{\descriptionname}{Description}% + \renewcommand*{\symbolname}{Symbole}% + \renewcommand*{\pagelistname}{Pages}% + \renewcommand*{\glssymbolsgroupname}{Symboles}% + \renewcommand*{\glsnumbersgroupname}{Nombres}} +} +\@ifundefined{captionsfrancais}{}{% + \addto\captionsfrancais{% + \renewcommand*{\glossaryname}{Glossaire}% + \renewcommand*{\acronymname}{Acronymes}% + \renewcommand*{\entryname}{Terme}% + \renewcommand*{\descriptionname}{Description}% + \renewcommand*{\symbolname}{Symbole}% + \renewcommand*{\pagelistname}{Pages}% + \renewcommand*{\glssymbolsgroupname}{Symboles}% + \renewcommand*{\glsnumbersgroupname}{Nombres}} +} +% \end{macrocode} +% Danish: +% \begin{macrocode} +\@ifundefined{captionsdanish}{}{% + \addto\captionsdanish{% + \renewcommand*{\glossaryname}{Ordliste}% + \renewcommand*{\acronymname}{Akronymer}% + \renewcommand*{\entryname}{Symbolforklaring}% + \renewcommand*{\descriptionname}{Beskrivelse}% + \renewcommand*{\symbolname}{Symbol}% + \renewcommand*{\pagelistname}{Side}% + \renewcommand*{\glssymbolsgroupname}{Symboler}% + \renewcommand*{\glsnumbersgroupname}{Tal}} +} +% \end{macrocode} +% Irish: +% \begin{macrocode} +\@ifundefined{captionsirish}{}{% + \addto\captionsirish{% + \renewcommand*{\glossaryname}{Gluais}% + \renewcommand*{\acronymname}{Acrainmneacha}% +% \end{macrocode} +% wasn't sure whether to go for N\'ota (Note), Ciall (`Meaning', +% `sense') or Br\'{\i} (`Meaning'). In the end I chose Ciall. +% \begin{macrocode} + \renewcommand*{\entryname}{Ciall}% + \renewcommand*{\descriptionname}{Tuairisc}% +% \end{macrocode} +% Again, not sure whether to use Comhartha/Comhartha\'{\i} or +% Siombail/Siombaile, so have chosen the former. +% \begin{macrocode} + \renewcommand*{\symbolname}{Comhartha}% + \renewcommand*{\glssymbolsgroupname}{Comhartha\'{\i}}% + \renewcommand*{\pagelistname}{Leathanaigh}% + \renewcommand*{\glsnumbersgroupname}{Uimhreacha}} +} +% \end{macrocode} +% Hungarian: +% \begin{macrocode} +\@ifundefined{captionsmagyar}{}{% + \addto\captionsmagyar{% + \renewcommand*{\glossaryname}{Sz\'ojegyz\'ek}% + \renewcommand*{\acronymname}{Bet\H uszavak}% + \renewcommand*{\entryname}{Kifejez\'es}% + \renewcommand*{\descriptionname}{Magyar\'azat}% + \renewcommand*{\symbolname}{Jel\"ol\'es}% + \renewcommand*{\pagelistname}{Oldalsz\'am}% + \renewcommand*{\glssymbolsgroupname}{Jelek}% + \renewcommand*{\glsnumbersgroupname}{Sz\'amjegyek}% + } +} +\@ifundefined{captionshungarian}{}{% + \addto\captionshungarian{% + \renewcommand*{\glossaryname}{Sz\'ojegyz\'ek}% + \renewcommand*{\acronymname}{Bet\H uszavak}% + \renewcommand*{\entryname}{Kifejez\'es}% + \renewcommand*{\descriptionname}{Magyar\'azat}% + \renewcommand*{\symbolname}{Jel\"ol\'es}% + \renewcommand*{\pagelistname}{Oldalsz\'am}% + \renewcommand*{\glssymbolsgroupname}{Jelek}% + \renewcommand*{\glsnumbersgroupname}{Sz\'amjegyek}% + } +} +% \end{macrocode} +% Polish +% \changes{1.13}{2008 May 10}{Add Polish support} +% \begin{macrocode} +\@ifundefined{captionspolish}{}{% + \addto\captionspolish{% + \renewcommand*{\glossaryname}{S{\l}ownik termin\'ow}% + \renewcommand*{\acronymname}{Skr\'ot}% + \renewcommand*{\entryname}{Termin}% + \renewcommand*{\descriptionname}{Opis}% + \renewcommand*{\symbolname}{Symbol}% + \renewcommand*{\pagelistname}{Strony}% + \renewcommand*{\glssymbolsgroupname}{Symbole}% + \renewcommand*{\glsnumbersgroupname}{Liczby}} +} +% \end{macrocode} +% Brazilian +%\changes{1.17}{2008 December 11}{Added Brazilian support} +% \begin{macrocode} +\@ifundefined{captionsbrazil}{}{% + \addto\captionsbrazil{% + \renewcommand*{\glossaryname}{Gloss\'ario}% + \renewcommand*{\acronymname}{Siglas}% + \renewcommand*{\entryname}{Nota\c c\~ao}% + \renewcommand*{\descriptionname}{Descri\c c\~ao}% + \renewcommand*{\symbolname}{S\'imbolo}% + \renewcommand*{\pagelistname}{Lista de P\'aginas}% + \renewcommand*{\glssymbolsgroupname}{S\'imbolos}% + \renewcommand*{\glsnumbersgroupname}{N\'umeros}% + }% +} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-polyglossia.sty> +% \end{macrocode} +%\fi +%\subsection{Polyglossia Captions} +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-polyglossia}[2009/11/09 v1.0 (NLCT)] +% \end{macrocode} +% English: +% \begin{macrocode} +\@ifundefined{captionsenglish}{}{% + \expandafter\toks@\expandafter{\captionsenglish + \renewcommand*{\glossaryname}{\textenglish{Glossary}}% + \renewcommand*{\acronymname}{\textenglish{Acronyms}}% + \renewcommand*{\entryname}{\textenglish{Notation}}% + \renewcommand*{\descriptionname}{\textenglish{Description}}% + \renewcommand*{\symbolname}{\textenglish{Symbol}}% + \renewcommand*{\pagelistname}{\textenglish{Page List}}% + \renewcommand*{\glssymbolsgroupname}{\textenglish{Symbols}}% + \renewcommand*{\glsnumbersgroupname}{\textenglish{Numbers}}% + }% + \edef\captionsenglish{\the\toks@}% +} +% \end{macrocode} +% German: +% \begin{macrocode} +\@ifundefined{captionsgerman}{}{% + \expandafter\toks@\expandafter{\captionsgerman + \renewcommand*{\glossaryname}{\textgerman{Glossar}}% + \renewcommand*{\acronymname}{\textgerman{Akronyme}}% + \renewcommand*{\entryname}{\textgerman{Bezeichnung}}% + \renewcommand*{\descriptionname}{\textgerman{Beschreibung}}% + \renewcommand*{\symbolname}{\textgerman{Symbol}}% + \renewcommand*{\pagelistname}{\textgerman{Seiten}}% + \renewcommand*{\glssymbolsgroupname}{\textgerman{Symbole}}% + \renewcommand*{\glsnumbersgroupname}{\textgerman{Zahlen}}% + }% + \edef\captionsgerman{\the\toks@}% +} +% \end{macrocode} +% Italian: +% \begin{macrocode} +\@ifundefined{captionsitalian}{}{% + \expandafter\toks@\expandafter{\captionsitalian + \renewcommand*{\glossaryname}{\textitalian{Glossario}}% + \renewcommand*{\acronymname}{\textitalian{Acronimi}}% + \renewcommand*{\entryname}{\textitalian{Nomenclatura}}% + \renewcommand*{\descriptionname}{\textitalian{Descrizione}}% + \renewcommand*{\symbolname}{\textitalian{Simbolo}}% + \renewcommand*{\pagelistname}{\textitalian{Elenco delle pagine}}% + \renewcommand*{\glssymbolsgroupname}{\textitalian{Simboli}}% + \renewcommand*{\glsnumbersgroupname}{\textitalian{Numeri}}% + }% + \edef\captionsitalian{\the\toks@}% } % \end{macrocode} % Dutch: % \begin{macrocode} \@ifundefined{captionsdutch}{}{% - \addto\captionsdutch{% - \renewcommand*{\glossaryname}{Woordenlijst}% - \renewcommand*{\acronymname}{Acroniemen}% - \renewcommand*{\entryname}{Benaming}% - \renewcommand*{\descriptionname}{Beschrijving}% - \renewcommand*{\symbolname}{Symbool}% - \renewcommand*{\pagelistname}{Pagina's}% - \renewcommand*{\glssymbolsgroupname}{Symbolen}% - \renewcommand*{\glsnumbersgroupname}{Cijfers}} + \expandafter\toks@\expandafter{\captionsdutch + \renewcommand*{\glossaryname}{\textdutch{Woordenlijst}}% + \renewcommand*{\acronymname}{\textdutch{Acroniemen}}% + \renewcommand*{\entryname}{\textdutch{Benaming}}% + \renewcommand*{\descriptionname}{\textdutch{Beschrijving}}% + \renewcommand*{\symbolname}{\textdutch{Symbool}}% + \renewcommand*{\pagelistname}{\textdutch{Pagina's}}% + \renewcommand*{\glssymbolsgroupname}{\textdutch{Symbolen}}% + \renewcommand*{\glsnumbersgroupname}{\textdutch{Cijfers}}% + }% + \edef\captionsdutch{\the\toks@}% } % \end{macrocode} % Spanish: % \begin{macrocode} \@ifundefined{captionsspanish}{}{% - \addto\captionsspanish{% - \renewcommand*{\glossaryname}{Glosario}% - \renewcommand*{\acronymname}{Siglas}% - \renewcommand*{\entryname}{Entrada}% - \renewcommand*{\descriptionname}{Descripci\'on}% - \renewcommand*{\symbolname}{S\'{\i}mbolo}% - \renewcommand*{\pagelistname}{Lista de p\'aginas}% - \renewcommand*{\glssymbolsgroupname}{S\'{\i}mbolos}% - \renewcommand*{\glsnumbersgroupname}{N\'umeros}} + \expandafter\toks@\expandafter{\captionsspanish + \renewcommand*{\glossaryname}{\textspanish{Glosario}}% + \renewcommand*{\acronymname}{\textspanish{Siglas}}% + \renewcommand*{\entryname}{\textspanish{Entrada}}% + \renewcommand*{\descriptionname}{\textspanish{Descripci\'on}}% + \renewcommand*{\symbolname}{\textspanish{S\'{\i}mbolo}}% + \renewcommand*{\pagelistname}{\textspanish{Lista de p\'aginas}}% + \renewcommand*{\glssymbolsgroupname}{\textspanish{S\'{\i}mbolos}}% + \renewcommand*{\glsnumbersgroupname}{\textspanish{N\'umeros}}% + }% + \edef\captionsspanish{\the\toks@}% } % \end{macrocode} % French: % \begin{macrocode} \@ifundefined{captionsfrench}{}{% - \addto\captionsfrench{% - \renewcommand*{\glossaryname}{Glossaire}% - \renewcommand*{\acronymname}{Acronymes}% - \renewcommand*{\entryname}{Terme}% - \renewcommand*{\descriptionname}{Description}% - \renewcommand*{\symbolname}{Symbole}% - \renewcommand*{\pagelistname}{Pages}% - \renewcommand*{\glssymbolsgroupname}{Symboles}% - \renewcommand*{\glsnumbersgroupname}{Nombres}} + \expandafter\toks@\expandafter{\captionsfrench + \renewcommand*{\glossaryname}{\textfrench{Glossaire}}% + \renewcommand*{\acronymname}{\textfrench{Acronymes}}% + \renewcommand*{\entryname}{\textfrench{Terme}}% + \renewcommand*{\descriptionname}{\textfrench{Description}}% + \renewcommand*{\symbolname}{\textfrench{Symbole}}% + \renewcommand*{\pagelistname}{\textfrench{Pages}}% + \renewcommand*{\glssymbolsgroupname}{\textfrench{Symboles}}% + \renewcommand*{\glsnumbersgroupname}{\textfrench{Nombres}}% + }% + \edef\captionsfrench{\the\toks@}% } -\@ifundefined{captionsfrenchb}{}{% - \addto\captionsfrenchb{% - \renewcommand*{\glossaryname}{Glossaire}% - \renewcommand*{\acronymname}{Acronymes}% - \renewcommand*{\entryname}{Terme}% - \renewcommand*{\descriptionname}{Description}% - \renewcommand*{\symbolname}{Symbole}% - \renewcommand*{\pagelistname}{Pages}% - \renewcommand*{\glssymbolsgroupname}{Symboles}% - \renewcommand*{\glsnumbersgroupname}{Nombres}} +% \end{macrocode} +% Danish: +% \begin{macrocode} +\@ifundefined{captionsdanish}{}{% + \expandafter\toks@\expandafter{\captionsdanish + \renewcommand*{\glossaryname}{\textdanish{Ordliste}}% + \renewcommand*{\acronymname}{\textdanish{Akronymer}}% + \renewcommand*{\entryname}{\textdanish{Symbolforklaring}}% + \renewcommand*{\descriptionname}{\textdanish{Beskrivelse}}% + \renewcommand*{\symbolname}{\textdanish{Symbol}}% + \renewcommand*{\pagelistname}{\textdanish{Side}}% + \renewcommand*{\glssymbolsgroupname}{\textdanish{Symboler}}% + \renewcommand*{\glsnumbersgroupname}{\textdanish{Tal}}% + }% + \edef\captionsdanish{\the\toks@}% } -\@ifundefined{captionsfrancais}{}{% - \addto\captionsfrancais{% - \renewcommand*{\glossaryname}{Glossaire}% - \renewcommand*{\acronymname}{Acronymes}% - \renewcommand*{\entryname}{Terme}% - \renewcommand*{\descriptionname}{Description}% - \renewcommand*{\symbolname}{Symbole}% - \renewcommand*{\pagelistname}{Pages}% - \renewcommand*{\glssymbolsgroupname}{Symboles}% - \renewcommand*{\glsnumbersgroupname}{Nombres}} +% \end{macrocode} +% Irish: +% \begin{macrocode} +\@ifundefined{captionsirish}{}{% + \expandafter\toks@\expandafter{\captionsirish + \renewcommand*{\glossaryname}{\textirish{Gluais}}% + \renewcommand*{\acronymname}{\textirish{Acrainmneacha}}% + \renewcommand*{\entryname}{\textirish{Ciall}}% + \renewcommand*{\descriptionname}{\textirish{Tuairisc}}% + \renewcommand*{\symbolname}{\textirish{Comhartha}}% + \renewcommand*{\glssymbolsgroupname}{\textirish{Comhartha\'{\i}}}% + \renewcommand*{\pagelistname}{\textirish{Leathanaigh}}% + \renewcommand*{\glsnumbersgroupname}{\textirish{Uimhreacha}}% + }% + \edef\captionsirish{\the\toks@}% +} +% \end{macrocode} +% Hungarian: +% \begin{macrocode} +\@ifundefined{captionsmagyar}{}{% + \expandafter\toks@\expandafter{\captionsmagyar + \renewcommand*{\glossaryname}{\textmagyar{Sz\'ojegyz\'ek}}% + \renewcommand*{\acronymname}{\textmagyar{Bet\H uszavak}}% + \renewcommand*{\entryname}{\textmagyar{Kifejez\'es}}% + \renewcommand*{\descriptionname}{\textmagyar{Magyar\'azat}}% + \renewcommand*{\symbolname}{\textmagyar{Jel\"ol\'es}}% + \renewcommand*{\pagelistname}{\textmagyar{Oldalsz\'am}}% + \renewcommand*{\glssymbolsgroupname}{\textmagyar{Jelek}}% + \renewcommand*{\glsnumbersgroupname}{\textmagyar{Sz\'amjegyek}}% + }% + \edef\captionsmagyar{\the\toks@}% +} +% \end{macrocode} +% Polish +% \changes{1.13}{2008 May 10}{Add Polish support} +% \begin{macrocode} +\@ifundefined{captionspolish}{}{% + \expandafter\toks@\expandafter{\captionspolish + \renewcommand*{\glossaryname}{\textpolish{S{\l}ownik termin\'ow}}% + \renewcommand*{\acronymname}{\textpolish{Skr\'ot}}% + \renewcommand*{\entryname}{\textpolish{Termin}}% + \renewcommand*{\descriptionname}{\textpolish{Opis}}% + \renewcommand*{\symbolname}{\textpolish{Symbol}}% + \renewcommand*{\pagelistname}{\textpolish{Strony}}% + \renewcommand*{\glssymbolsgroupname}{\textpolish{Symbole}}% + \renewcommand*{\glsnumbersgroupname}{\textpolish{Liczby}}% + }% + \edef\captionspolish{\the\toks@}% +} +% \end{macrocode} +% Portugues +% \begin{macrocode} +\@ifundefined{captionsportuges}{}{% + \expandafter\toks@\expandafter{\captionsportuges + \renewcommand*{\glossaryname}{\textportuges{Gloss\'ario}}% + \renewcommand*{\acronymname}{\textportuges{Siglas}}% + \renewcommand*{\entryname}{\textportuges{Nota\c c\~ao}}% + \renewcommand*{\descriptionname}{\textportuges{Descri\c c\~ao}}% + \renewcommand*{\symbolname}{\textportuges{S\'imbolo}}% + \renewcommand*{\pagelistname}{\textportuges{Lista de P\'aginas}}% + \renewcommand*{\glssymbolsgroupname}{\textportuges{S\'imbolos}}% + \renewcommand*{\glsnumbersgroupname}{\textportuges{N\'umeros}}% + }% + \edef\captionsportuges{\the\toks@}% } % \end{macrocode} -% Danish: +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-dictionary-Brazilian.dict> +% \end{macrocode} +%\fi +%\subsection{Brazilian Dictionary} +% This is a dictionary file provided by Thiago de~Melo for +% use with the \isty{translator} package. +%\changes{1.17}{2008 November 17}{added Brazilian dictionary} +%\changes{2.02}{2009 July 13}{Changed Brazil to Brazilian} +% \begin{macrocode} +\ProvidesDictionary{glossaries-dictionary}{Brazilian} +% \end{macrocode} +% Provide Brazilian translations: +% \begin{macrocode} +\providetranslation{Glossary}{Gloss\'ario} +\providetranslation{Acronyms}{Siglas} +\providetranslation{Notation (glossaries)}{Nota\c c\~ao} +\providetranslation{Description (glossaries)}{Descri\c c\~ao} +\providetranslation{Symbol (glossaries)}{S\'imbolo} +\providetranslation{Page List (glossaries)}{Lista de P\'aginas} +\providetranslation{Symbols (glossaries)}{S\'imbolos} +\providetranslation{Numbers (glossaries)}{N\'umeros} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-dictionary-Danish.dict> +% \end{macrocode} +%\fi +%\subsection{Danish Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. +% \begin{macrocode} +\ProvidesDictionary{glossaries-dictionary}{Danish} +% \end{macrocode} +% Provide Danish translations: +% \begin{macrocode} +\providetranslation{Glossary}{Ordliste} +\providetranslation{Acronyms}{Akronymer} +\providetranslation{Notation (glossaries)}{Symbolforklaring} +\providetranslation{Description (glossaries)}{Beskrivelse} +\providetranslation{Symbol (glossaries)}{Symbol} +\providetranslation{Page List (glossaries)}{Side} +\providetranslation{Symbols (glossaries)}{Symboler} +\providetranslation{Numbers (glossaries)}{Tal} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse % \begin{macrocode} -\@ifundefined{captionsdanish}{}{% - \addto\captionsdanish{% - \renewcommand*{\glossaryname}{Ordliste}% - \renewcommand*{\acronymname}{Akronymer}% - \renewcommand*{\entryname}{Symbolforklaring}% - \renewcommand*{\descriptionname}{Beskrivelse}% - \renewcommand*{\symbolname}{Symbol}% - \renewcommand*{\pagelistname}{Side}% - \renewcommand*{\glssymbolsgroupname}{Symboler}% - \renewcommand*{\glsnumbersgroupname}{Tal}} -} +%<*glossaries-dictionary-Dutch.dict> % \end{macrocode} -% Irish: +%\fi +%\subsection{Dutch Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. % \begin{macrocode} -\@ifundefined{captionsirish}{}{% - \addto\captionsirish{% - \renewcommand*{\glossaryname}{Gluais}% - \renewcommand*{\acronymname}{Acrainmneacha}% +\ProvidesDictionary{glossaries-dictionary}{Dutch} % \end{macrocode} -% wasn't sure whether to go for N\'ota (Note), Ciall (`Meaning', -% `sense') or Br\'{\i} (`Meaning'). In the end I chose Ciall. +% Provide Dutch translations: % \begin{macrocode} - \renewcommand*{\entryname}{Ciall}% - \renewcommand*{\descriptionname}{Tuairisc}% +\providetranslation{Glossary}{Woordenlijst} +\providetranslation{Acronyms}{Acroniemen} +\providetranslation{Notation (glossaries)}{Benaming} +\providetranslation{Description (glossaries)}{Beschrijving} +\providetranslation{Symbol (glossaries)}{Symbool} +\providetranslation{Page List (glossaries)}{Pagina's} +\providetranslation{Symbols (glossaries)}{Symbolen} +\providetranslation{Numbers (glossaries)}{Cijfers} % \end{macrocode} -% Again, not sure whether to use Comhartha/Comhartha\'{\i} or -% Siombail/Siombaile, so have chosen the former. +%\iffalse % \begin{macrocode} - \renewcommand*{\symbolname}{Comhartha}% - \renewcommand*{\glssymbolsgroupname}{Comhartha\'{\i}}% - \renewcommand*{\pagelistname}{Leathanaigh}% - \renewcommand*{\glsnumbersgroupname}{Uimhreacha}} -} +% % \end{macrocode} -% Hungarian: +%\fi +%\iffalse % \begin{macrocode} -\@ifundefined{captionsmagyar}{}{% - \addto\captionsmagyar{% - \renewcommand*{\glossaryname}{Sz\'ojegyz\'ek}% - \renewcommand*{\acronymname}{Bet\H uszavak}% - \renewcommand*{\entryname}{Kifejez\'es}% - \renewcommand*{\descriptionname}{Magyar\'azat}% - \renewcommand*{\symbolname}{Jel\"ol\'es}% - \renewcommand*{\pagelistname}{Oldalsz\'am}% - \renewcommand*{\glssymbolsgroupname}{Jelek}% - \renewcommand*{\glsnumbersgroupname}{Sz\'amjegyek}% - } -} -\@ifundefined{captionshungarian}{}{% - \addto\captionshungarian{% - \renewcommand*{\glossaryname}{Sz\'ojegyz\'ek}% - \renewcommand*{\acronymname}{Bet\H uszavak}% - \renewcommand*{\entryname}{Kifejez\'es}% - \renewcommand*{\descriptionname}{Magyar\'azat}% - \renewcommand*{\symbolname}{Jel\"ol\'es}% - \renewcommand*{\pagelistname}{Oldalsz\'am}% - \renewcommand*{\glssymbolsgroupname}{Jelek}% - \renewcommand*{\glsnumbersgroupname}{Sz\'amjegyek}% - } -} +%<*glossaries-dictionary-English.dict> % \end{macrocode} -% Polish -% \changes{1.13}{2008 May 10}{Add Polish support} +%\fi +%\subsection{English Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. % \begin{macrocode} -\@ifundefined{captionspolish}{}{% - \addto\captionspolish{% - \renewcommand*{\glossaryname}{S{\l}ownik termin\'ow}% - \renewcommand*{\acronymname}{Skr\'ot}% - \renewcommand*{\entryname}{Termin}% - \renewcommand*{\descriptionname}{Opis}% - \renewcommand*{\symbolname}{Symbol}% - \renewcommand*{\pagelistname}{Strony}% - \renewcommand*{\glssymbolsgroupname}{Symbole}% - \renewcommand*{\glsnumbersgroupname}{Liczby}} -} +\ProvidesDictionary{glossaries-dictionary}{English} % \end{macrocode} -% Brazilian -%\changes{1.17}{2008 December 11}{Added Brazilian support} +% Provide English translations: % \begin{macrocode} -\@ifundefined{captionsbrazil}{}{% - \addto\captionsbrazil{% - \renewcommand*{\glossaryname}{Gloss\'ario}% - \renewcommand*{\acronymname}{Siglas}% - \renewcommand*{\entryname}{Nota\c c\~ao}% - \renewcommand*{\descriptionname}{Descri\c c\~ao}% - \renewcommand*{\symbolname}{S\'imbolo}% - \renewcommand*{\pagelistname}{Lista de P\'aginas}% - \renewcommand*{\glssymbolsgroupname}{S\'imbolos}% - \renewcommand*{\glsnumbersgroupname}{N\'umeros}% - }% -} +\providetranslation{Glossary}{Glossary} +\providetranslation{Acronyms}{Acronyms} +\providetranslation{Notation (glossaries)}{Notation} +\providetranslation{Description (glossaries)}{Description} +\providetranslation{Symbol (glossaries)}{Symbol} +\providetranslation{Page List (glossaries)}{Page List} +\providetranslation{Symbols (glossaries)}{Symbols} +\providetranslation{Numbers (glossaries)}{Numbers} % \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-polyglossia.sty> +%<*glossaries-dictionary-French.dict> % \end{macrocode} %\fi -%\subsection{Polyglossia Captions} +%\subsection{French Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-polyglossia}[2009/11/09 v1.0 (NLCT)] +\ProvidesDictionary{glossaries-dictionary}{French} % \end{macrocode} -% English: +% Provide French translations: % \begin{macrocode} -\@ifundefined{captionsenglish}{}{% - \expandafter\toks@\expandafter{\captionsenglish - \renewcommand*{\glossaryname}{\textenglish{Glossary}}% - \renewcommand*{\acronymname}{\textenglish{Acronyms}}% - \renewcommand*{\entryname}{\textenglish{Notation}}% - \renewcommand*{\descriptionname}{\textenglish{Description}}% - \renewcommand*{\symbolname}{\textenglish{Symbol}}% - \renewcommand*{\pagelistname}{\textenglish{Page List}}% - \renewcommand*{\glssymbolsgroupname}{\textenglish{Symbols}}% - \renewcommand*{\glsnumbersgroupname}{\textenglish{Numbers}}% - }% - \edef\captionsenglish{\the\toks@}% -} +\providetranslation{Glossary}{Glossaire} +\providetranslation{Acronyms}{Acronymes} +\providetranslation{Notation (glossaries)}{Terme} +\providetranslation{Description (glossaries)}{Description} +\providetranslation{Symbol (glossaries)}{Symbole} +\providetranslation{Page List (glossaries)}{Pages} +\providetranslation{Symbols (glossaries)}{Symboles} +\providetranslation{Numbers (glossaries)}{Nombres} % \end{macrocode} -% German: +%\iffalse % \begin{macrocode} -\@ifundefined{captionsgerman}{}{% - \expandafter\toks@\expandafter{\captionsgerman - \renewcommand*{\glossaryname}{\textgerman{Glossar}}% - \renewcommand*{\acronymname}{\textgerman{Akronyme}}% - \renewcommand*{\entryname}{\textgerman{Bezeichnung}}% - \renewcommand*{\descriptionname}{\textgerman{Beschreibung}}% - \renewcommand*{\symbolname}{\textgerman{Symbol}}% - \renewcommand*{\pagelistname}{\textgerman{Seiten}}% - \renewcommand*{\glssymbolsgroupname}{\textgerman{Symbole}}% - \renewcommand*{\glsnumbersgroupname}{\textgerman{Zahlen}}% - }% - \edef\captionsgerman{\the\toks@}% -} +% % \end{macrocode} -% Italian: +%\fi +%\iffalse % \begin{macrocode} -\@ifundefined{captionsitalian}{}{% - \expandafter\toks@\expandafter{\captionsitalian - \renewcommand*{\glossaryname}{\textitalian{Glossario}}% - \renewcommand*{\acronymname}{\textitalian{Acronimi}}% - \renewcommand*{\entryname}{\textitalian{Nomenclatura}}% - \renewcommand*{\descriptionname}{\textitalian{Descrizione}}% - \renewcommand*{\symbolname}{\textitalian{Simbolo}}% - \renewcommand*{\pagelistname}{\textitalian{Elenco delle pagine}}% - \renewcommand*{\glssymbolsgroupname}{\textitalian{Simboli}}% - \renewcommand*{\glsnumbersgroupname}{\textitalian{Numeri}}% - }% - \edef\captionsitalian{\the\toks@}% -} +%<*glossaries-dictionary-German.dict> % \end{macrocode} -% Dutch: +%\fi +%\subsection{German Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. % \begin{macrocode} -\@ifundefined{captionsdutch}{}{% - \expandafter\toks@\expandafter{\captionsdutch - \renewcommand*{\glossaryname}{\textdutch{Woordenlijst}}% - \renewcommand*{\acronymname}{\textdutch{Acroniemen}}% - \renewcommand*{\entryname}{\textdutch{Benaming}}% - \renewcommand*{\descriptionname}{\textdutch{Beschrijving}}% - \renewcommand*{\symbolname}{\textdutch{Symbool}}% - \renewcommand*{\pagelistname}{\textdutch{Pagina's}}% - \renewcommand*{\glssymbolsgroupname}{\textdutch{Symbolen}}% - \renewcommand*{\glsnumbersgroupname}{\textdutch{Cijfers}}% - }% - \edef\captionsdutch{\the\toks@}% -} +\ProvidesDictionary{glossaries-dictionary}{German} % \end{macrocode} -% Spanish: +% Provide German translations (quite a few variations were suggested +% for German; I settled on the following): % \begin{macrocode} -\@ifundefined{captionsspanish}{}{% - \expandafter\toks@\expandafter{\captionsspanish - \renewcommand*{\glossaryname}{\textspanish{Glosario}}% - \renewcommand*{\acronymname}{\textspanish{Siglas}}% - \renewcommand*{\entryname}{\textspanish{Entrada}}% - \renewcommand*{\descriptionname}{\textspanish{Descripci\'on}}% - \renewcommand*{\symbolname}{\textspanish{S\'{\i}mbolo}}% - \renewcommand*{\pagelistname}{\textspanish{Lista de p\'aginas}}% - \renewcommand*{\glssymbolsgroupname}{\textspanish{S\'{\i}mbolos}}% - \renewcommand*{\glsnumbersgroupname}{\textspanish{N\'umeros}}% - }% - \edef\captionsspanish{\the\toks@}% -} +\providetranslation{Glossary}{Glossar} +\providetranslation{Acronyms}{Akronyme} +\providetranslation{Notation (glossaries)}{Bezeichnung} +\providetranslation{Description (glossaries)}{Beschreibung} +\providetranslation{Symbol (glossaries)}{Symbol} +\providetranslation{Page List (glossaries)}{Seiten} +\providetranslation{Symbols (glossaries)}{Symbole} +\providetranslation{Numbers (glossaries)}{Zahlen} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-dictionary-Irish.dict> +% \end{macrocode} +%\fi +%\subsection{Irish Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. +% \begin{macrocode} +\ProvidesDictionary{glossaries-dictionary}{Irish} +% \end{macrocode} +% Provide Irish translations: +% \begin{macrocode} +\providetranslation{Glossary}{Gluais} +\providetranslation{Acronyms}{Acrainmneacha} +\providetranslation{Notation (glossaries)}{Ciall} +\providetranslation{Description (glossaries)}{Tuairisc} +\providetranslation{Symbol (glossaries)}{Comhartha} +\providetranslation{Page List (glossaries)}{Leathanaigh} +\providetranslation{Symbols (glossaries)}{Comhartha\'{\i}} +\providetranslation{Numbers (glossaries)}{Uimhreacha} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% % \end{macrocode} -% French: +%\fi +%\iffalse % \begin{macrocode} -\@ifundefined{captionsfrench}{}{% - \expandafter\toks@\expandafter{\captionsfrench - \renewcommand*{\glossaryname}{\textfrench{Glossaire}}% - \renewcommand*{\acronymname}{\textfrench{Acronymes}}% - \renewcommand*{\entryname}{\textfrench{Terme}}% - \renewcommand*{\descriptionname}{\textfrench{Description}}% - \renewcommand*{\symbolname}{\textfrench{Symbole}}% - \renewcommand*{\pagelistname}{\textfrench{Pages}}% - \renewcommand*{\glssymbolsgroupname}{\textfrench{Symboles}}% - \renewcommand*{\glsnumbersgroupname}{\textfrench{Nombres}}% - }% - \edef\captionsfrench{\the\toks@}% -} +%<*glossaries-dictionary-Italian.dict> % \end{macrocode} -% Danish: +%\fi +%\subsection{Italian Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. % \begin{macrocode} -\@ifundefined{captionsdanish}{}{% - \expandafter\toks@\expandafter{\captionsdanish - \renewcommand*{\glossaryname}{\textdanish{Ordliste}}% - \renewcommand*{\acronymname}{\textdanish{Akronymer}}% - \renewcommand*{\entryname}{\textdanish{Symbolforklaring}}% - \renewcommand*{\descriptionname}{\textdanish{Beskrivelse}}% - \renewcommand*{\symbolname}{\textdanish{Symbol}}% - \renewcommand*{\pagelistname}{\textdanish{Side}}% - \renewcommand*{\glssymbolsgroupname}{\textdanish{Symboler}}% - \renewcommand*{\glsnumbersgroupname}{\textdanish{Tal}}% - }% - \edef\captionsdanish{\the\toks@}% -} +\ProvidesDictionary{glossaries-dictionary}{Italian} % \end{macrocode} -% Irish: +% Provide Italian translations: % \begin{macrocode} -\@ifundefined{captionsirish}{}{% - \expandafter\toks@\expandafter{\captionsirish - \renewcommand*{\glossaryname}{\textirish{Gluais}}% - \renewcommand*{\acronymname}{\textirish{Acrainmneacha}}% - \renewcommand*{\entryname}{\textirish{Ciall}}% - \renewcommand*{\descriptionname}{\textirish{Tuairisc}}% - \renewcommand*{\symbolname}{\textirish{Comhartha}}% - \renewcommand*{\glssymbolsgroupname}{\textirish{Comhartha\'{\i}}}% - \renewcommand*{\pagelistname}{\textirish{Leathanaigh}}% - \renewcommand*{\glsnumbersgroupname}{\textirish{Uimhreacha}}% - }% - \edef\captionsirish{\the\toks@}% -} +\providetranslation{Glossary}{Glossario} +\providetranslation{Acronyms}{Acronimi} +\providetranslation{Notation (glossaries)}{Nomenclatura} +\providetranslation{Description (glossaries)}{Descrizione} +\providetranslation{Symbol (glossaries)}{Simbolo} +\providetranslation{Page List (glossaries)}{Elenco delle pagine} +\providetranslation{Symbols (glossaries)}{Simboli} +\providetranslation{Numbers (glossaries)}{Numeri} % \end{macrocode} -% Hungarian: +%\iffalse % \begin{macrocode} -\@ifundefined{captionsmagyar}{}{% - \expandafter\toks@\expandafter{\captionsmagyar - \renewcommand*{\glossaryname}{\textmagyar{Sz\'ojegyz\'ek}}% - \renewcommand*{\acronymname}{\textmagyar{Bet\H uszavak}}% - \renewcommand*{\entryname}{\textmagyar{Kifejez\'es}}% - \renewcommand*{\descriptionname}{\textmagyar{Magyar\'azat}}% - \renewcommand*{\symbolname}{\textmagyar{Jel\"ol\'es}}% - \renewcommand*{\pagelistname}{\textmagyar{Oldalsz\'am}}% - \renewcommand*{\glssymbolsgroupname}{\textmagyar{Jelek}}% - \renewcommand*{\glsnumbersgroupname}{\textmagyar{Sz\'amjegyek}}% - }% - \edef\captionsmagyar{\the\toks@}% -} +% % \end{macrocode} -% Polish -% \changes{1.13}{2008 May 10}{Add Polish support} +%\fi +%\iffalse % \begin{macrocode} -\@ifundefined{captionspolish}{}{% - \expandafter\toks@\expandafter{\captionspolish - \renewcommand*{\glossaryname}{\textpolish{S{\l}ownik termin\'ow}}% - \renewcommand*{\acronymname}{\textpolish{Skr\'ot}}% - \renewcommand*{\entryname}{\textpolish{Termin}}% - \renewcommand*{\descriptionname}{\textpolish{Opis}}% - \renewcommand*{\symbolname}{\textpolish{Symbol}}% - \renewcommand*{\pagelistname}{\textpolish{Strony}}% - \renewcommand*{\glssymbolsgroupname}{\textpolish{Symbole}}% - \renewcommand*{\glsnumbersgroupname}{\textpolish{Liczby}}% - }% - \edef\captionspolish{\the\toks@}% -} +%<*glossaries-dictionary-Magyar.dict> % \end{macrocode} -% Portugues +%\fi +%\subsection{Magyar Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. % \begin{macrocode} -\@ifundefined{captionsportuges}{}{% - \expandafter\toks@\expandafter{\captionsportuges - \renewcommand*{\glossaryname}{\textportuges{Gloss\'ario}}% - \renewcommand*{\acronymname}{\textportuges{Siglas}}% - \renewcommand*{\entryname}{\textportuges{Nota\c c\~ao}}% - \renewcommand*{\descriptionname}{\textportuges{Descri\c c\~ao}}% - \renewcommand*{\symbolname}{\textportuges{S\'imbolo}}% - \renewcommand*{\pagelistname}{\textportuges{Lista de P\'aginas}}% - \renewcommand*{\glssymbolsgroupname}{\textportuges{S\'imbolos}}% - \renewcommand*{\glsnumbersgroupname}{\textportuges{N\'umeros}}% - }% - \edef\captionsportuges{\the\toks@}% -} +\ProvidesDictionary{glossaries-dictionary}{Magyar} +% \end{macrocode} +% Provide translations: +% \begin{macrocode} +\providetranslation{Glossary}{Sz\'ojegyz\'ek} +\providetranslation{Acronyms}{Bet\H uszavak} +\providetranslation{Notation (glossaries)}{Kifejez\'es} +\providetranslation{Description (glossaries)}{Magyar\'azat} +\providetranslation{Symbol (glossaries)}{Jel\"ol\'es} +\providetranslation{Page List (glossaries)}{Oldalsz\'am} +\providetranslation{Symbols (glossaries)}{Jelek} +\providetranslation{Numbers (glossaries)}{Sz\'amjegyek} % \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Brazilian.dict> +%<*glossaries-dictionary-Polish.dict> % \end{macrocode} %\fi -%\subsection{Brazilian Dictionary} -% This is a dictionary file provided by Thiago de~Melo for -% use with the \isty{translator} package. -%\changes{1.17}{2008 November 17}{added Brazilian dictionary} -%\changes{2.02}{2009 July 13}{Changed Brazil to Brazilian} +%\subsection{Polish Dictionary} +% This is a dictionary file provided for use with the \isty{translator} +% package. % \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Brazilian} +\ProvidesDictionary{glossaries-dictionary}{Polish} % \end{macrocode} -% Provide Brazilian translations: +% Provide Polish translations: % \begin{macrocode} -\providetranslation{Glossary}{Gloss\'ario} -\providetranslation{Acronyms}{Siglas} -\providetranslation{Notation (glossaries)}{Nota\c c\~ao} -\providetranslation{Description (glossaries)}{Descri\c c\~ao} -\providetranslation{Symbol (glossaries)}{S\'imbolo} -\providetranslation{Page List (glossaries)}{Lista de P\'aginas} -\providetranslation{Symbols (glossaries)}{S\'imbolos} -\providetranslation{Numbers (glossaries)}{N\'umeros} +\providetranslation{Glossary}{S{\l}ownik termin\'ow} +\providetranslation{Acronyms}{Skr\'ot} +\providetranslation{Notation (glossaries)}{Termin} +\providetranslation{Description (glossaries)}{Opis} +\providetranslation{Symbol (glossaries)}{Symbol} +\providetranslation{Page List (glossaries)}{Strony} +\providetranslation{Symbols (glossaries)}{Symbole} +\providetranslation{Numbers (glossaries)}{Liczby} % \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Danish.dict> +%<*glossaries-dictionary-Serbian.dict> % \end{macrocode} %\fi -%\subsection{Danish Dictionary} +%\subsection{Serbian Dictionary} +% This dictionary was provided by Zoran Filipovic. +% \begin{macrocode} +\ProvidesDictionary{glossaries-dictionary}{Serbian} +\providetranslation{Glossary}{Mali re\v cnik} +\providetranslation{Acronyms}{Skra\' cenice} +\providetranslation{Notation (glossaries)}{Oznaka} +\providetranslation{Description (glossaries)}{Opis} +\providetranslation{Symbol (glossaries)}{Simbol} +\providetranslation{Page List (glossaries)}{Stranica} +\providetranslation{Symbols (glossaries)}{Simboli} +\providetranslation{Numbers (glossaries)}{Brojevi} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-dictionary-Spanish.dict> +% \end{macrocode} +%\fi +%\subsection{Spanish Dictionary} % This is a dictionary file provided for use with the \isty{translator} % package. % \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Danish} +\ProvidesDictionary{glossaries-dictionary}{Spanish} % \end{macrocode} -% Provide Danish translations: +% Provide Spanish translations: % \begin{macrocode} -\providetranslation{Glossary}{Ordliste} -\providetranslation{Acronyms}{Akronymer} -\providetranslation{Notation (glossaries)}{Symbolforklaring} -\providetranslation{Description (glossaries)}{Beskrivelse} -\providetranslation{Symbol (glossaries)}{Symbol} -\providetranslation{Page List (glossaries)}{Side} -\providetranslation{Symbols (glossaries)}{Symboler} -\providetranslation{Numbers (glossaries)}{Tal} +\providetranslation{Glossary}{Glosario} +\providetranslation{Acronyms}{Siglas} +\providetranslation{Notation (glossaries)}{Entrada} +\providetranslation{Description (glossaries)}{Descripci\'on} +\providetranslation{Symbol (glossaries)}{S\'{\i}mbolo} +\providetranslation{Page List (glossaries)}{Lista de p\'aginas} +\providetranslation{Symbols (glossaries)}{S\'{\i}mbolos} +\providetranslation{Numbers (glossaries)}{N\'umeros} % \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Dutch.dict> +%<*minimalgls.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % This file is public domain. + % + % This is a minimal file for testing and debugging + % the glossaries package. Change the class file as + % desired, and add the relevant package options to + % both the class file and the glossaries package. + % Change the sample glossary entry and acronym if + % required. If the problem occurs with an additional + % glossary, add in the relevant \newglossary command + % and a sample entry. + % + % Only add extra packages or commands if they + % contribute to whatever problem you are trying to + % test. + % + % Remember that the document will not be complete + % until you have successfully completed all of the + % following steps: + % 1. latex minimalgls + % 2. makeglossaries minimalgls (note no extension) + % 3. latex minimalgls + % A further run through LaTeX will be required to ensure that + % the table of contents is up to date if the toc option + % is used. +\documentclass{article} +\listfiles + +\usepackage[colorlinks]{hyperref} + \usepackage{glossaries} % acronym will go in main glossary + %\usepackage[acronym]{glossaries} % make a separate list of acronyms + +\makeglossaries + +\newglossaryentry{sample}{name={sample}, +description={a sample entry}} + +% This contrived acronym has non-standard plural forms. +% These are specified in the optional argument. +\newacronym[\glsshortpluralkey=cas,\glslongpluralkey=contrived +acronyms]{aca}{aca}{a contrived acronym} + +\begin{document} +A \gls{sample} entry and \gls{aca}. Second use: \gls{aca}. + +Plurals: \glspl{sample}. Reset acronym\glsreset{aca}. +First use: \glspl{aca}. Second use: \glspl{aca}. + +\printglossaries +\end{document} % \end{macrocode} %\fi -%\subsection{Dutch Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Dutch} -% \end{macrocode} -% Provide Dutch translations: -% \begin{macrocode} -\providetranslation{Glossary}{Woordenlijst} -\providetranslation{Acronyms}{Acroniemen} -\providetranslation{Notation (glossaries)}{Benaming} -\providetranslation{Description (glossaries)}{Beschrijving} -\providetranslation{Symbol (glossaries)}{Symbool} -\providetranslation{Page List (glossaries)}{Pagina's} -\providetranslation{Symbols (glossaries)}{Symbolen} -\providetranslation{Numbers (glossaries)}{Cijfers} -% \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-English.dict> +%<*sample-crossref.tex> % \end{macrocode} %\fi -%\subsection{English Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{English} -% \end{macrocode} -% Provide English translations: -% \begin{macrocode} -\providetranslation{Glossary}{Glossary} -\providetranslation{Acronyms}{Acronyms} -\providetranslation{Notation (glossaries)}{Notation} -\providetranslation{Description (glossaries)}{Description} -\providetranslation{Symbol (glossaries)}{Symbol} -\providetranslation{Page List (glossaries)}{Page List} -\providetranslation{Symbols (glossaries)}{Symbols} -\providetranslation{Numbers (glossaries)}{Numbers} -% \end{macrocode} %\iffalse % \begin{macrocode} -% +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage[sanitize={description=false}]{glossaries} + +\makeglossaries + +\renewcommand{\glsseeitemformat}[1]{\textsc{\glsentryname{#1}}} + +\newglossaryentry{pear}{name=pear, +description={an oddly shaped fruit}} + +\newglossaryentry{apple}{name=apple, +description={firm, round fruit}, +see=[see also]{pear}} + +\newglossaryentry{banana}{name=banana, +description={a yellow fruit with an even odder shape than +a \protect\gls{pear}}} + +\newglossaryentry{fruit}{name=fruit, +description={sweet, fleshy product of plant containing seed}} + +\glssee{fruit}{pear,apple,banana} + +\begin{document} +\gls{pear}, \gls{apple} and \gls{banana}. + +\printglossaries + +\end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-French.dict> +% % \end{macrocode} %\fi -%\subsection{French Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{French} -% \end{macrocode} -% Provide French translations: -% \begin{macrocode} -\providetranslation{Glossary}{Glossaire} -\providetranslation{Acronyms}{Acronymes} -\providetranslation{Notation (glossaries)}{Terme} -\providetranslation{Description (glossaries)}{Description} -\providetranslation{Symbol (glossaries)}{Symbole} -\providetranslation{Page List (glossaries)}{Pages} -\providetranslation{Symbols (glossaries)}{Symboles} -\providetranslation{Numbers (glossaries)}{Nombres} -% \end{macrocode} %\iffalse % \begin{macrocode} -% +%<*sample-custom-acronym.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-German.dict> + % This file is public domain +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[acronym, % create list of acronyms + nomain, % don't need main glossary for this example + style=tree, % need a style that displays the symbol + hyperfirst=false,% don't hyperlink first use + sanitize=none % switch off sanitization as description + % will be used in the main text + ]{glossaries} + +\makeglossaries + + % This is a sample file to illustrate how to define a custom + % acronym. This example defines the acronym so that on first use + % it displays the short form in the text and places the long form + % and its description in a footnote. In the main body of the + % document the short form will be displayed in small caps, but in + % the list of acronyms the short form is displayed in normal + % capitals. To ensure this, the short form should be written in + % lower case when the acronym is defined, and \MakeUppercase is + % used when it's displayed in the list of acronyms. + + % In the list of acronyms, the long form is used as the name, the + % short form is used as the symbol and the user supplies the + % description when defining the acronym. + +\renewcommand*{\CustomAcronymFields}{% + name={\the\glslongtok},% + symbol={\MakeUppercase{\the\glsshorttok}},% + text={\textsc{\the\glsshorttok}},% + plural={\textsc{\the\glsshorttok}\noexpand\acrpluralsuffix}% +} + +\renewcommand*{\SetCustomDisplayStyle}[1]{% + % ##1 corresponds to the 'first' key + % ##2 corresponds to the 'description' key + % ##3 corresponds to the 'symbol' key + % ##4 is the inserted text given by the final optional argument to + % commands like \gls + % The short form can be obtained via \glsentryshort{\glslabel} + % The plural short form can be obtained via + % \glsentryshortplural{\glslabel} + % The long form can be obtained via \glsentrylong{\glslabel} + % The plural long form can be obtained via + % \glsentrylongplural{\glslabel} + \defglsdisplayfirst[#1]{##1##4\protect\footnote{% + \glsentrylong{\glslabel}: ##2}}% + % ##1 corresponds to the 'text' key + % the rest as above + \defglsdisplay[#1]{##1##4}% +} + + % Now set the custom acronym style (to override the default style) +\SetCustomStyle + + % Now define the acronyms (must be done after setting the custom + % style) + +\newacronym[description={set of tags for use in developing hypertext +documents}]{html}{html}{Hyper Text Markup Language} + +\newacronym[description={language used to describe the layout of a +document written in a markup language}]{css}{css}{Cascading Style +Sheet} + +\begin{document} + +\gls{css}. \gls{html}. + +\gls{css}. \gls{html}. + +\printglossaries +\end{document} % \end{macrocode} %\fi -%\subsection{German Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{German} -% \end{macrocode} -% Provide German translations (quite a few variations were suggested -% for German; I settled on the following): -% \begin{macrocode} -\providetranslation{Glossary}{Glossar} -\providetranslation{Acronyms}{Akronyme} -\providetranslation{Notation (glossaries)}{Bezeichnung} -\providetranslation{Description (glossaries)}{Beschreibung} -\providetranslation{Symbol (glossaries)}{Symbol} -\providetranslation{Page List (glossaries)}{Seiten} -\providetranslation{Symbols (glossaries)}{Symbole} -\providetranslation{Numbers (glossaries)}{Zahlen} -% \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Irish.dict> +%<*sample-dual.tex> % \end{macrocode} %\fi -%\subsection{Irish Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Irish} -% \end{macrocode} -% Provide Irish translations: -% \begin{macrocode} -\providetranslation{Glossary}{Gluais} -\providetranslation{Acronyms}{Acrainmneacha} -\providetranslation{Notation (glossaries)}{Ciall} -\providetranslation{Description (glossaries)}{Tuairisc} -\providetranslation{Symbol (glossaries)}{Comhartha} -\providetranslation{Page List (glossaries)}{Leathanaigh} -\providetranslation{Symbols (glossaries)}{Comhartha\'{\i}} -\providetranslation{Numbers (glossaries)}{Uimhreacha} -% \end{macrocode} %\iffalse % \begin{macrocode} -% + % This file is public domain +\documentclass{article} + +\usepackage[acronym]{glossaries} + + % \newdualentry[main options]{label}{short}{long}{description} + +\newcommand*{\newdualentry}[5][]{% + \newglossaryentry{main-#2}{name={#4},% + text={#3\protect\glsadd{#2}},% + description={#5},% + #1 + }% + \newacronym{#2}{#3\protect\glsadd{main-#2}}{#4} +} + +\newdualentry{svm}% label + {SVM}% abbreviation + {support vector machine}% long form + {Statistical pattern recognition technique}% description + +\makeglossaries + +\begin{document} + +\gls{svm}. + +\printglossaries +\end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Italian.dict> +% % \end{macrocode} %\fi -%\subsection{Italian Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Italian} -% \end{macrocode} -% Provide Italian translations: -% \begin{macrocode} -\providetranslation{Glossary}{Glossario} -\providetranslation{Acronyms}{Acronimi} -\providetranslation{Notation (glossaries)}{Nomenclatura} -\providetranslation{Description (glossaries)}{Descrizione} -\providetranslation{Symbol (glossaries)}{Simbolo} -\providetranslation{Page List (glossaries)}{Elenco delle pagine} -\providetranslation{Symbols (glossaries)}{Simboli} -\providetranslation{Numbers (glossaries)}{Numeri} -% \end{macrocode} %\iffalse % \begin{macrocode} -% +%<*sample.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Magyar.dict> + % This file is public domain +\documentclass[a4paper]{report} + +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage[toc,style=treenoname,order=word,subentrycounter]{glossaries} + +\makeglossaries + +\newglossaryentry{Perl}{name=\texttt{Perl}, +sort=Perl, % need a sort key because name contains a command +description=A scripting language} + +\newglossaryentry{glossary}{name=glossary, +description={\nopostdesc}, +plural={glossaries}} + +\newglossaryentry{glossarycol}{ +description={collection of glosses}, +sort={2}, +parent={glossary}} + +\newglossaryentry{glossarylist}{ +description={list of technical words}, +sort={1}, +parent={glossary}} + +\newglossaryentry{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)}} + +\newglossaryentry{mtrx}{name=matrix, +description={rectangular array of quantities}, + % plural is not simply obtained by appending an s, so specify +plural=matrices} + + % entry with a paragraph break in the description + +\newglossaryentry{par}{name=paragraph, +description={distinct section of piece of +writing.\glspar Beginning on new, usually indented, line}} + + % entry with two types of plural. Set the plural form to the + % form most likely to be used. If you want to use a different + % plural, you will need to explicity specify it in \glslink +\newglossaryentry{cow}{name=cow, + % this isn't necessary, as this form (appending an s) is + % the default +plural=cows, + % description: +description={(\emph{pl.}\ cows, \emph{archaic} kine) an adult +female of any bovine animal}} + +\newglossaryentry{bravo}{name={bravo}, +description={\nopostdesc}} + +\newglossaryentry{bravo1}{description={cry of approval (pl.\ bravos)}, +sort={1}, +plural={bravos}, +parent=bravo} + +\newglossaryentry{bravo2}{description={hired ruffian or killer (pl.\ bravoes)}, +sort={2}, +plural={bravoes}, +parent=bravo} + +\newglossaryentry{seal}{name=seal,description={sea mammal with +flippers that eats fish}} + +\newglossaryentry{sealion}{name={sea lion}, +description={large seal}} + +\begin{document} + +\title{Sample Document Using glossary Package} +\author{Nicola Talbot} +\pagenumbering{alph}% prevent duplicate page link names if using PDF +\maketitle + +\pagenumbering{roman} +\tableofcontents + +\chapter{Introduction} +\pagenumbering{arabic} + +A \gls{glossarylist} (definition~\glsrefentry{glossarylist}) is a +very useful addition to any technical document, although a +\gls{glossarycol} (definition~\glsrefentry{glossarycol}) can also +simply be a collection of glosses, which is another thing entirely. +Some documents have multiple \glspl{glossarylist}. + +Once you have run your document through \LaTeX, you +will then need to run the \texttt{.glo} file through +\texttt{makeindex}. You will need to set the output +file so that it creates a \texttt{.gls} file instead +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 \gls{Perl} script +\texttt{makeglossaries} which provides a convenient +wrapper. + +If a comma appears within the name or description, grouping +must be used, e.g.\ in the description of \gls{pagelist}. + +\chapter{Plurals and Paragraphs} + +Plurals are assumed to have the letter s appended, but if this is +not the case, as in \glspl{mtrx}, then you need to specify the +plural when you define the entry. If a term may have multiple +plurals (for example \glspl{cow}/\glslink{cow}{kine}) then +define the entry with the plural form most likely to be used and +explicitly specify the alternative form using \verb|\glslink|. +\Glspl{seal} and \glspl{sealion} have regular plural forms. + +\Gls{bravo} is a homograph, but the plural forms are spelt +differently. The plural of \gls{bravo1}, a cry of approval +(definition~\glsrefentry{bravo1}), is \glspl{bravo1}, whereas the +plural of \gls{bravo2}, a hired ruffian or killer +(definition~\glsrefentry{bravo2}), is \glspl{bravo2}. + +\Glspl{par} can cause a problem in commands, so care is needed +when having a paragraph break in a \gls{glossarylist} entry. + +\chapter{Ordering} + +There are two types of ordering: word ordering (which places +``\gls{sealion}'' before ``\gls{seal}'') and letter ordering +(which places ``\gls{seal}'' before ``\gls{sealion}''). + +\printglossaries + +\end{document} % \end{macrocode} %\fi -%\subsection{Magyar Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Magyar} -% \end{macrocode} -% Provide translations: -% \begin{macrocode} -\providetranslation{Glossary}{Sz\'ojegyz\'ek} -\providetranslation{Acronyms}{Bet\H uszavak} -\providetranslation{Notation (glossaries)}{Kifejez\'es} -\providetranslation{Description (glossaries)}{Magyar\'azat} -\providetranslation{Symbol (glossaries)}{Jel\"ol\'es} -\providetranslation{Page List (glossaries)}{Oldalsz\'am} -\providetranslation{Symbols (glossaries)}{Jelek} -\providetranslation{Numbers (glossaries)}{Sz\'amjegyek} -% \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Polish.dict> +%<*sample4col.tex> % \end{macrocode} %\fi -%\subsection{Polish Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Polish} -% \end{macrocode} -% Provide Polish translations: -% \begin{macrocode} -\providetranslation{Glossary}{S{\l}ownik termin\'ow} -\providetranslation{Acronyms}{Skr\'ot} -\providetranslation{Notation (glossaries)}{Termin} -\providetranslation{Description (glossaries)}{Opis} -\providetranslation{Symbol (glossaries)}{Symbol} -\providetranslation{Page List (glossaries)}{Strony} -\providetranslation{Symbols (glossaries)}{Symbole} -\providetranslation{Numbers (glossaries)}{Liczby} -% \end{macrocode} %\iffalse % \begin{macrocode} -% + % This file is public domain +\documentclass[a4paper]{article} + +\usepackage[style=long4colheaderborder]{glossaries} + +\makeglossaries + +\newglossaryentry{w}{name={$w$}, +sort=w, +description={width}, +symbol=m} + +\newglossaryentry{M}{name={$M$}, +sort=M, +description={mass}, +symbol=kg} + +\begin{document} + +\printglossaries + +The width, \gls{w}, is measured in meters. The mass, \gls{M} is +measured in kilograms. + +\end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Serbian.dict> +% % \end{macrocode} %\fi -%\subsection{Serbian Dictionary} -% This dictionary was provided by Zoran Filipovic. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Serbian} -\providetranslation{Glossary}{Mali re\v cnik} -\providetranslation{Acronyms}{Skra\' cenice} -\providetranslation{Notation (glossaries)}{Oznaka} -\providetranslation{Description (glossaries)}{Opis} -\providetranslation{Symbol (glossaries)}{Simbol} -\providetranslation{Page List (glossaries)}{Stranica} -\providetranslation{Symbols (glossaries)}{Simboli} -\providetranslation{Numbers (glossaries)}{Brojevi} -% \end{macrocode} %\iffalse % \begin{macrocode} -% +%<*sampleaccsupp.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*glossaries-dictionary-Spanish.dict> + % This file is public domain +\documentclass{article} + +\usepackage[acronym,smallcaps]{glossaries-accsupp} + +\makeglossaries + +\newglossaryentry{dr}{name=Dr,description={Doctor},access={Doctor}} + +\newacronym[shortaccess=S V M]{svm}{svm}{support vector machine} + +\newacronym{eg}{e.g.}{for example} + +\begin{document} +\gls{dr}~Jones. +\gls{dr}~Jones. + +\Gls{eg}, \gls{eg}, \acrshort{eg}, \acrlong{eg}, \acrfull{eg}. + +\Acrshort{eg}, \ACRshort{eg}. \Acrlong{eg}, \ACRlong{eg}. +\Acrfull{eg}, \ACRfull{eg}. + +\gls{svm}. \gls{svm}, \acrshort{svm}, \acrlong{svm}, \acrfull{svm}. + +\printglossaries +\end{document} % \end{macrocode} %\fi -%\subsection{Spanish Dictionary} -% This is a dictionary file provided for use with the \isty{translator} -% package. -% \begin{macrocode} -\ProvidesDictionary{glossaries-dictionary}{Spanish} -% \end{macrocode} -% Provide Spanish translations: -% \begin{macrocode} -\providetranslation{Glossary}{Glosario} -\providetranslation{Acronyms}{Siglas} -\providetranslation{Notation (glossaries)}{Entrada} -\providetranslation{Description (glossaries)}{Descripci\'on} -\providetranslation{Symbol (glossaries)}{S\'{\i}mbolo} -\providetranslation{Page List (glossaries)}{Lista de p\'aginas} -\providetranslation{Symbols (glossaries)}{S\'{\i}mbolos} -\providetranslation{Numbers (glossaries)}{N\'umeros} -% \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*minimalgls.tex> +%<*sampleAcr.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} - % This is a minimal file for testing and debugging - % the glossaries package. Change the class file as - % desired, and add the relevant package options to - % both the class file and the glossaries package. - % Change the sample glossary entry and acronym if - % required. If the problem occurs with an additional - % glossary, add in the relevant \newglossary command - % and a sample entry. - % - % Only add extra packages or commands if they - % contribute to whatever problem you are trying to - % test. - % - % Remember that the document will not be complete - % until you have successfully completed all of the - % following steps: - % 1. latex minimalgls - % 2. makeglossaries minimalgls (note no extension) - % 3. latex minimalgls - % A further run through LaTeX will be required to ensure that - % the table of contents is up to date if the toc option - % is used. -\documentclass{article} -\listfiles + % This file is public domain +\documentclass[a4paper]{report} + +\usepackage[colorlinks,plainpages=false]{hyperref} +\usepackage[style=long,% use 'long' style for the glossary + toc,% add glossary to table of contents + smallcaps% Use small caps for acronyms + ]{glossaries} + +\makeglossaries + +\newacronym{svm}% label +{svm}% abbreviation +{support vector machine}% long form + +\newacronym{ksvm}{ksvm}{kernel support vector machine} + +\newacronym{rna}{rna}{ribonukleins\"aure} + +\begin{document} +\tableofcontents + +\chapter{Support Vector Machines} + +\Glspl{svm} are used widely in the area of pattern recognition. +Subsequent use: \gls{svm}. -\usepackage[colorlinks]{hyperref} - \usepackage{glossaries} % acronym will go in main glossary - %\usepackage[acronym]{glossaries} % make a separate list of acronyms +Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full +version: \acrfull{svm}. Description: \glsentrydesc{svm}. -\makeglossaries +This is the entry in uppercase: \GLS{svm}. -\newglossaryentry{sample}{name={sample}, -description={a sample entry}} +\chapter{Kernel Support Vector Machines} -% This contrived acronym has non-standard plural forms. -% These are specified in the optional argument. -\newacronym[\glsshortpluralkey=cas,\glslongpluralkey=contrived -acronyms]{aca}{aca}{a contrived acronym} +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. Plural: \glspl{ksvm}. Resetting +acronyms. -\begin{document} -A \gls{sample} entry and \gls{aca}. Second use: \gls{aca}. +\glsresetall +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{ksvm}. + +\chapter{Short, Long and Full Forms} + +These commands don't affect the first use flag: + +\begin{center} +\begin{tabular}{lll} + & Unstarred & Starred\\ +acrshort & \acrshort{svm} & \acrshort*{svm}\\ +Acrshort & \Acrshort{svm} & \Acrshort*{svm}\\ +ACRshort & \ACRshort{svm} & \ACRshort*{svm}\\ +acrlong & \acrlong{svm} & \acrlong*{svm}\\ +Acrlong & \Acrlong{svm} & \Acrlong*{svm}\\ +ACRlong & \ACRlong{svm} & \ACRlong*{svm}\\ +acrfull & \acrfull{svm} & \acrfull*{svm}\\ +Acrfull & \Acrfull{svm} & \Acrfull*{svm}\\ +ACRfull & \ACRfull{svm} & \ACRfull*{svm}\\ +\\ +& Insert Unstarred & Insert Starred\\ +acrshort & \acrshort{svm}['s] & \acrshort*{svm}['s]\\ +Acrshort & \Acrshort{svm}['s] & \Acrshort*{svm}['s]\\ +ACRshort & \ACRshort{svm}['s] & \ACRshort*{svm}['s]\\ +acrlong & \acrlong{svm}['s] & \acrlong*{svm}['s]\\ +Acrlong & \Acrlong{svm}['s] & \Acrlong*{svm}['s]\\ +ACRlong & \ACRlong{svm}['s] & \ACRlong*{svm}['s]\\ +acrfull & \acrfull{svm}['s] & \acrfull*{svm}['s]\\ +Acrfull & \Acrfull{svm}['s] & \Acrfull*{svm}['s]\\ +ACRfull & \ACRfull{svm}['s] & \ACRfull*{svm}['s] +\end{tabular} +\end{center} -Plurals: \glspl{sample}. Reset acronym\glsreset{aca}. -First use: \glspl{aca}. Second use: \glspl{aca}. +\chapter{Another chapter} + +You don't need to worry about makeindex's special characters: +\gls{rna}. + +\printglossary[title={List of Acronyms}] -\printglossaries \end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*sample-custom-acronym.tex> +%<*sampleAcrDesc.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -\documentclass{report} + % This file is public domain +\documentclass[a4paper]{report} -\usepackage[colorlinks]{hyperref} -\usepackage[acronym, % create list of acronyms - nomain, % don't need main glossary for this example - style=tree, % need a style that displays the symbol - hyperfirst=false,% don't hyperlink first use - sanitize=none % switch off sanitization as description - % will be used in the main text - ]{glossaries} +\usepackage[colorlinks,plainpages=false]{hyperref} + +\usepackage[acronym,% create 'acronym' glossary type + nomain,% 'main' glossary not needed as using 'acronym' + style=altlist, % use altlist style + toc, % add the glossary to the table of contents + sanitize={description=false},% want to use description in main document + smallcaps,% + description% acronyms have a user-supplied description + ]{glossaries} \makeglossaries - % This is a sample file to illustrate how to define a custom - % acronym. This example defines the acronym so that on first use - % it displays the short form in the text and places the long form - % and its description in a footnote. In the main body of the - % document the short form will be displayed in small caps, but in - % the list of acronyms the short form is displayed in normal - % capitals. To ensure this, the short form should be written in - % lower case when the acronym is defined, and \MakeUppercase is - % used when it's displayed in the list of acronyms. +% Change the "see" items so that they use \acronymfont: +\renewcommand*{\glsseeitemformat}[1]{\acronymfont{\glsentrytext{#1}}} - % In the list of acronyms, the long form is used as the name, the - % short form is used as the symbol and the user supplies the - % description when defining the acronym. +% Change the default style for the "name" key: +\renewcommand*{\acrnameformat}[2]{\acronymfont{#1} (#2)} -\renewcommand*{\CustomAcronymFields}{% - name={\the\glslongtok},% - symbol={\MakeUppercase{\the\glsshorttok}},% - text={\textsc{\the\glsshorttok}},% - plural={\textsc{\the\glsshorttok}\noexpand\acrpluralsuffix}% -} +% Not using a font that supports bold smallcaps so change the way +% the name is formatted in the glossary: -\renewcommand*{\SetCustomDisplayStyle}[1]{% - % ##1 corresponds to the 'first' key - % ##2 corresponds to the 'description' key - % ##3 corresponds to the 'symbol' key - % ##4 is the inserted text given by the final optional argument to - % commands like \gls - % The short form can be obtained via \glsentryuseri{\glslabel} - % The plural short form can be obtained via - % \glsentryuserii{\glslabel} - % The long form can be obtained via \glsentryuseriii{\glslabel} - % The plural long form can be obtained via - % \glsentryuseriv{\glslabel} - \defglsdisplayfirst[#1]{##1##4\protect\footnote{% - \glsentryuseriii{\glslabel}: ##2}}% - % ##1 corresponds to the 'text' key - % the rest as above - \defglsdisplay[#1]{##1##4}% -} +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} - % Now set the custom acronym style (to override the default style) -\SetCustomStyle +\newacronym[description={Statistical pattern recognition +technique~\protect\cite{svm}}, % acronym's description +]{svm}{svm}{support vector machine} - % Now define the acronyms (must be done after setting the custom - % style) +\newacronym[description={Statistical pattern recognition technique +using the ``kernel trick''},% acronym's description +see={[see also]{svm}}, +]{ksvm}{ksvm}{kernel +support vector machine} -\newacronym[description={set of tags for use in developing hypertext -documents}]{html}{html}{Hyper Text Markup Language} +\begin{document} +\tableofcontents -\newacronym[description={language used to describe the layout of a -document written in a markup language}]{css}{css}{Cascading Style -Sheet} +\chapter{Support Vector Machines} -\begin{document} +The \gls{svm} is used widely in the area of pattern recognition. + % plural form with initial letter in uppercase: +\Glspl{svm} are \ldots -\gls{css}. \gls{html}. +Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full +version: \acrfull{svm}. Description: \glsentrydesc{svm}. -\gls{css}. \gls{html}. +This is the entry in uppercase: \GLS{svm}. + +\chapter{Kernel Support Vector Machines} + +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. This is the entry's description without +a link: \glsentrydesc{ksvm}. + +\glsresetall +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{svm}. + +\begin{thebibliography}{1} +\bibitem{svm} \ldots +\end{thebibliography} + +\printglossary -\printglossaries \end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*sample.tex> +%<*sampleacronyms.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -\documentclass[a4paper]{report} - -\usepackage[plainpages=false,colorlinks]{hyperref} -\usepackage[toc,style=treenoname,order=word,acronym]{glossaries} - -\makeglossaries - -\newglossaryentry{glossary}{name=glossary, -description={\nopostdesc}, -plural={glossaries}} - -\newglossaryentry{glossarylist}{ -description={1) list of technical words}, -sort={1}, -parent={glossary}} - -\newglossaryentry{glossarycol}{ -description={2) collection of glosses}, -sort={2}, -parent={glossary}} + % This file is public domain +\documentclass{article} -\newglossaryentry{Perl}{name=\texttt{Perl}, -sort=Perl, % need a sort key because name contains a command -description=A scripting language} +\usepackage[acronym,footnote,acronymlists={main,acronym2}]{glossaries} -\newglossaryentry{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)}} +\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms} -\newglossaryentry{mtrx}{name=matrix, -description={rectangular array of quantities}, - % plural is not simply obtained by appending an s, so specify -plural=matrices} +\makeglossaries - % entry with a paragraph break in the description +% Main glossary is a list of calculus acronyms -\newglossaryentry{par}{name=paragraph, -description={distinct section of piece of -writing.\glspar Beginning on new, usually indented, line}} +\renewcommand{\glossaryname}{Calculus Acronyms} - % entry with two types of plural. Set the plural form to the - % form most likely to be used. If you want to use a different - % plural, you will need to explicity specify it in \glslink -\newglossaryentry{cow}{name=cow, - % this isn't necessary, as this form (appending an s) is - % the default -plural=cows, - % description: -description={(\emph{pl.}\ cows, \emph{archaic} kine) an adult -female of any bovine animal}} +\newacronym[type=main]{vc}{VC}{Vector Calculus} +\newacronym[type=main]{ftoc}{FTOC}{Fundamental Theorem of Calculus} -\newglossaryentry{bravo}{name={bravo}, -description={\nopostdesc}} +% "acronym" glossary is a list of computer related acronyms -\newglossaryentry{bravo1}{description={1) cry of approval (pl.\ bravos)}, -sort={1}, -plural={bravos}, -parent=bravo} +\renewcommand{\acronymname}{Computer Acronyms} -\newglossaryentry{bravo2}{description={2) hired ruffian or killer (pl.\ bravoes)}, -sort={2}, -plural={bravoes}, -parent=bravo} +\newacronym{kb}{kb}{KiloBit} +\newacronym{kB}{kB}{KiloByte} -\newglossaryentry{seal}{name=seal,description={sea mammal with -flippers that eats fish}} +% "acronym2" glossary is a list of statistical acronyms -\newglossaryentry{sealion}{name={sea lion}, -description={large seal}} +\newacronym[type=acronym2]{svm}{SVM}{Support Vector Machine} \begin{document} +\section{Sample Section} +\gls{kb}. \gls{kB}. \gls{vc}. \gls{ftoc}. \gls{svm}. -\title{Sample Document Using glossary Package} -\author{Nicola Talbot} -\pagenumbering{alph}% prevent duplicate page link names if using PDF -\maketitle - -\pagenumbering{roman} -\tableofcontents - -\chapter{Introduction} -\pagenumbering{arabic} - -A \gls{glossarylist} is a very useful addition to any -technical document, although a \gls{glossarycol} can -also simply be a collection of glosses, which is -another thing entirely. Some documents have -multiple \glspl{glossarylist}. - -Once you have run your document through \LaTeX, you -will then need to run the \texttt{.glo} file through -\texttt{makeindex}. You will need to set the output -file so that it creates a \texttt{.gls} file instead -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 \gls{Perl} script -\texttt{makeglossaries} which provides a convenient -wrapper. +\gls{kb}. \gls{kB}. \gls{vc}. \gls{ftoc}. \gls{svm}. -If a comma appears within the name or description, grouping -must be used, e.g.\ in the description of \gls{pagelist}. +\printglossaries +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*sampleDB.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % This file is public domain +\documentclass{article} -\chapter{Plurals and Paragraphs} +\usepackage[colorlinks,plainpages=false]{hyperref} +\usepackage[nonumberlist]{glossaries} -Plurals are assumed to have the letter s appended, but if this is -not the case, as in \glspl{mtrx}, then you need to specify the -plural when you define the entry. If a term may have multiple -plurals (for example \glspl{cow}/\glslink{cow}{kine}) then -define the entry with the plural form most likely to be used and -explicitly specify the alternative form using \verb|\glslink|. -\Glspl{seal} and \glspl{sealion} have regular plural forms. +\newglossary[nlg]{symbols}{not}{ntn}{Symbols} -\Gls{bravo} is a homograph, but the plural forms are spelt -differently. The plural of \gls{bravo1}, a cry of approval, -is \glspl{bravo1}, whereas the plural of \gls{bravo2}, a hired -ruffian or killer, is \glspl{bravo2}. +\makeglossaries -\Glspl{par} can cause a problem in commands, so care is needed -when having a paragraph break in a \gls{glossarylist} entry. +\loadglsentries{database1} +\loadglsentries[symbols]{database2} -\chapter{Ordering} +\begin{document} -There are two types of ordering: word ordering (which places -``\gls{sealion}'' before ``\gls{seal}'') and letter ordering -(which places ``\gls{seal}'' before ``\gls{sealion}''). +\glsaddall \printglossaries @@ -18940,1480 +17026,2416 @@ There are two types of ordering: word ordering (which places %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*sample4col.tex> +%<*sampleDesc.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -\documentclass[a4paper]{article} + % This file is public domain + % + % See also sampleAcrDesc.tex +\documentclass[a4paper]{report} -\usepackage[style=long4colheaderborder]{glossaries} +\usepackage[colorlinks,plainpages=false]{hyperref} + +\usepackage[style=altlist, % use altlist style + toc, % add the glossary to the table of contents + sanitize={description=false}% don't sanitize description + ]{glossaries} \makeglossaries -\newglossaryentry{w}{name={$w$}, -sort=w, -description={width}, -symbol=m} +\newglossaryentry{svm}{ + % how the entry name should appear in the glossary +name={Support vector machine (SVM)}, + % how the description should appear in the glossary + % since I have used sanitize={description=false} + % I have to protect fragile commands +description={Statistical pattern recognition +technique~\protect\cite{svm}}, + % how the entry should appear in the document text +text={svm}, + % how the entry should appear the first time it is + % used in the document text +first={support vector machine (svm)}} -\newglossaryentry{M}{name={$M$}, -sort=M, -description={mass}, -symbol=kg} +\newglossaryentry{ksvm}{ +name={Kernel support vector machine (KSVM)}, +description={Statistical pattern recognition technique +using the ``kernel trick'' (see also SVM)}, +text={ksvm}, +first={kernel support vector machine}} \begin{document} +\tableofcontents -\printglossaries +\chapter{Support Vector Machines} -The width, \gls{w}, is measured in meters. The mass, \gls{M} is -measured in kilograms. +The \gls{svm} is used widely in the area of pattern recognition. + % plural form with initial letter in uppercase: +\Glspl{svm} are \ldots + +This is the text produced without a link: \glsentrytext{svm}. +This is the text produced on first use without a link: +\glsentryfirst{svm}. This is the entry's description without +a link: \glsentrydesc{svm}. + +This is the entry in uppercase: \GLS{svm}. + +\chapter{Kernel Support Vector Machines} + +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. + +\glsresetall +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{svm}. + +\begin{thebibliography}{1} +\bibitem{svm} \ldots +\end{thebibliography} + +\printglossary[title={Acronyms}] \end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*sampleaccsupp.tex> +%<*sampleEq.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -\documentclass{article} + % This file is public domain +\documentclass[a4paper,12pt]{report} -\usepackage[acronym,smallcaps]{glossaries-accsupp} +\usepackage{amsmath} +\usepackage[colorlinks]{hyperref} +\usepackage[style=long3colheader,counter=equation]{glossaries} \makeglossaries -\newglossaryentry{dr}{name=Dr,description={Doctor},access={Doctor}} +\newcommand{\erf}{\operatorname{erf}} +\newcommand{\erfc}{\operatorname{erfc}} + + % redefine the way hyperref creates the target for equations + % so that the glossary links to equation numbers work -\newacronym[\glsshortaccesskey=S V M]{svm}{svm}{support vector machine} + \renewcommand*\theHequation{\theHchapter.\arabic{equation}} -\newacronym{eg}{e.g.}{for example} + % Change the glossary headings + +\renewcommand{\entryname}{Notation} +\renewcommand{\descriptionname}{Function Name} +\renewcommand{\pagelistname}{Number of Formula} + + % define glossary entries + +\newglossaryentry{Gamma}{name=\ensuremath{\Gamma(z)}, +description=Gamma function, +sort=Gamma} + +\newglossaryentry{gamma}{name={\ensuremath{\gamma(\alpha,x)}}, +description=Incomplete gamma function, +sort=gamma} + +\newglossaryentry{iGamma}{name={\ensuremath{\Gamma(\alpha,x)}}, +description=Incomplete gamma function, +sort=Gamma} + +\newglossaryentry{psi}{name=\ensuremath{\psi(x)}, +description=Psi function,sort=psi} + +\newglossaryentry{erf}{name=\ensuremath{\erf(x)}, +description=Error function,sort=erf} + +\newglossaryentry{erfc}{name=\ensuremath{\erfc}, +description=Complementary error function,sort=erfc} + +\newglossaryentry{B}{name={\ensuremath{B(x,y)}}, +description=Beta function,sort=B} + +\newglossaryentry{Bx}{name={\ensuremath{B_x(p,q)}}, +description=Incomplete beta function,sort=Bx} + +\newglossaryentry{Tn}{name=\ensuremath{T_n(x)}, +description=Chebyshev's polynomials of the first kind,sort=Tn} + +\newglossaryentry{Un}{name=\ensuremath{U_n(x)}, +description=Chebyshev's polynomials of the second kind,sort=Un} + +\newglossaryentry{Hn}{name=\ensuremath{H_n(x)}, +description=Hermite polynomials,sort=Hn} + +\newglossaryentry{Ln}{name=\ensuremath{L_n^\alpha(x)}, +description=Laguerre polynomials,sort=Lna} + +\newglossaryentry{Znu}{name=\ensuremath{Z_\nu(z)}, +description=Bessel functions,sort=Z} + +\newglossaryentry{Phi}{name={\ensuremath{\Phi(\alpha,\gamma;z)}}, +description=confluent hypergeometric function,sort=Pagz} + +\newglossaryentry{knu}{name=\ensuremath{k_\nu(x)}, +description=Bateman's function,sort=kv} + +\newglossaryentry{Dp}{name=\ensuremath{D_p(z)}, +description=Parabolic cylinder functions,sort=Dp} + +\newglossaryentry{F}{name={\ensuremath{F(\phi,k)}}, +description=Elliptical integral of the first kind,sort=Fpk} + +\newglossaryentry{C}{name=\ensuremath{C}, +description=Euler's constant,sort=C} + +\newglossaryentry{G}{name=\ensuremath{G}, +description=Catalan's constant,sort=G} \begin{document} -\gls{dr}~Jones. -\gls{dr}~Jones. +\title{A Sample Document Using glossaries.sty} +\author{Nicola Talbot} +\maketitle -\Gls{eg}, \gls{eg} +\begin{abstract} +This is a sample document illustrating the use of the \textsf{glossaries} +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 using the \texttt{counter=equation} package +option. +\end{abstract} -\gls{svm}. \gls{svm}. +\printglossary[title={Index of Special Functions and Notations}] -\printglossaries -\end{document} -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*sampleAcr.tex> -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -\documentclass[a4paper]{report} +\chapter{Gamma Functions} + +\begin{equation} +\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +\end{equation} + +\verb|\ensuremath| is only required here if using +hyperlinks. +\begin{equation} +\glslink{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) +\end{equation} + +\begin{equation} +\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt +\end{equation} + +\begin{equation} +\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt +\end{equation} + +\newpage + +\begin{equation} +\gls{Gamma} = \Gamma(\alpha, x) + \gamma(\alpha, x) +\end{equation} + +\begin{equation} +\gls{psi} = \frac{d}{dx}\ln\Gamma(x) +\end{equation} + +\chapter{Error Functions} + +\begin{equation} +\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt +\end{equation} + +\begin{equation} +\gls{erfc} = 1 - \erf(x) +\end{equation} + +\chapter{Beta Function} + +\begin{equation} +\gls{B} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt +\end{equation} +Alternatively: +\begin{equation} +\gls{B} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi +\end{equation} + +\begin{equation} +\gls{B} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) +\end{equation} + +\begin{equation} +\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt +\end{equation} + +\chapter{Polynomials} + +\section{Chebyshev's polynomials} + +\begin{equation} +\gls{Tn} = \cos(n\arccos x) +\end{equation} -\usepackage[colorlinks,plainpages=false]{hyperref} -\usepackage[style=long,toc]{glossaries} +\begin{equation} +\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} +\end{equation} -\makeglossaries +\section{Hermite polynomials} -\newacronym{svm}% label -{svm}% abbreviation -{support vector machine}% long form +\begin{equation} +\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) +\end{equation} -\newacronym{ksvm}{ksvm}{kernel support vector machine} +\section{Laguerre polynomials} -\newacronym{rna}{rna}{ribonukleins\"aure} +\begin{equation} +L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} +\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) +\end{equation} -\begin{document} -\tableofcontents +\chapter{Bessel Functions} -\chapter{Support Vector Machines} +Bessel functions $Z_\nu$ are solutions of +\begin{equation} +\frac{d^2\glslink{Znu}{Z_\nu}}{dz^2} ++ \frac{1}{z}\,\frac{dZ_\nu}{dz} + +\left( 1-\frac{\nu^2}{z^2}Z_\nu = 0 \right) +\end{equation} -\Glspl{svm} are used widely in the area of pattern recognition. +\chapter{Confluent hypergeometric function} -This is the text produced without a link: \glsentrytext{svm}. -This is the text produced on first use without a link: -\glsentryfirst{svm}. This is the entry's description without -a link: \glsentrydesc{svm}. +\begin{equation} +\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 +\end{equation} -This is the entry in uppercase: \GLS{svm}. +\begin{equation} +\gls{knu} = \frac{2}{\pi}\int_0^{\pi/2} +\cos(x \tan\theta - \nu\theta)\,d\theta +\end{equation} -\chapter{Kernel Support Vector Machines} +\chapter{Parabolic cylinder functions} -The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses -the so called ``kernel trick''. Plural: \glspl{ksvm}. +\begin{equation} +\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) +-\frac{\sqrt{2\pi}z}{\Gamma\left(-\frac{p}{2}\right)} +\Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) +\right\} +\end{equation} -\glsresetall -Possessive: \gls{ksvm}['s]. -Make the glossary entry number bold for this -one \gls[format=hyperbf]{svm}. +\chapter{Elliptical Integral of the First Kind} -\chapter{Another chapter} +\begin{equation} +\gls{F} = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} +\end{equation} -You don't need to worry about makeindex's special characters: -\gls{rna}. +\chapter{Constants} -\printglossary[title={Acronyms}] +\begin{equation} +\gls{C} = 0.577\,215\,664\,901\ldots +\end{equation} + +\begin{equation} +\gls{G} = 0.915\,965\,594\ldots +\end{equation} \end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*sampleAcrDesc.tex> +%<*sampleEqPg.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -\documentclass[a4paper]{report} - -\usepackage[colorlinks,plainpages=false]{hyperref} + % This file is public domain + % + % To ensure that the page numbers are up-to-date: + % + % latex sampleEqPg + % makeglossaries sampleEqPg + % latex sampleEqPg + % makeglossaries sampleEqPg + % latex sampleEqPg + % + % The extra makeglossaries run is required because adding the + % glossary in the second LaTeX run shifts the page numbers on + % which means that the glossary needs to be updated again. + % (Note that this problem is avoided if the page numbering is + % reset after the glossary. For example, if the glossary has + % roman numbering and the subsequent pages have arabic numbering) +\documentclass[a4paper,12pt]{report} -\usepackage[style=altlist, % use altlist style - toc, % add the glossary to the table of contents - sanitize={description=false},% want to use description in main document - description% acronyms have a user-supplied description - ]{glossaries} +\usepackage{amsmath} +\usepackage[colorlinks]{hyperref} +\usepackage[style=long3colheader,toc, + counter=equation]{glossaries} -\makeglossaries +\newcommand{\erf}{\operatorname{erf}} +\newcommand{\erfc}{\operatorname{erfc}} -\newacronym[description={Statistical pattern recognition -technique~\protect\cite{svm}}, % acronym's description -name={Support vector machine (svm)}% change the default way of displaying the entry name in the list of acronyms -]{svm}{svm}{support vector machine} + % redefine the way hyperref creates the target for equations + % so that the glossary links to equation numbers work -\newacronym[description={Statistical pattern recognition technique -using the ``kernel trick'' (see also \glshyperlink[SVM]{svm})},% acronym's description -name={Kernel support vector machine (ksvm)}% change the default way of displaying the entry name in the list of acronyms -]{ksvm}{ksvm}{kernel -support vector machine} +\renewcommand*\theHequation{\thechapter.\arabic{equation}} -\begin{document} -\tableofcontents +\renewcommand{\glossaryname}{Index of Special Functions and Notations} -\chapter{Support Vector Machines} +\renewcommand{\glossarypreamble}{Numbers in italic indicate the equation number, +numbers in bold indicate page numbers where the main definition occurs.\par} -The \gls{svm} is used widely in the area of pattern recognition. - % plural form with initial letter in uppercase: -\Glspl{svm} are \ldots + % set the glossary number style to italic + % hyperit is used instead of textit because + % the hyperref package is being used. +\renewcommand{\glsnumberformat}[1]{\hyperit{#1}} -This is the text produced without a link: \glsentrytext{svm}. -This is the text produced on first use without a link: -\glsentryfirst{svm}. This is the entry's description without -a link: \glsentrydesc{svm}. + % 1st column heading +\renewcommand{\entryname}{Notation} -This is the entry in uppercase: \GLS{svm}. + % 2nd column heading +\renewcommand{\descriptionname}{Function Name} -\chapter{Kernel Support Vector Machines} + % 3rd column heading +\renewcommand{\pagelistname}{} -The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses -the so called ``kernel trick''. This is the entry's description without -a link: \glsentrydesc{ksvm}. + % Redefine header row so that it + % adds a blank row after the title row +\renewcommand{\glossaryheader}{\bfseries\entryname & +\bfseries\descriptionname&\bfseries\pagelistname\\ +& & \\\endhead} -\glsresetall -Possessive: \gls{ksvm}['s]. -Make the glossary entry number bold for this -one \gls[format=hyperbf]{svm}. + % Define glossary entries -\begin{thebibliography}{1} -\bibitem{svm} \ldots -\end{thebibliography} +\newglossaryentry{Gamma}{name=\ensuremath{\Gamma(z)}, +description=Gamma function,sort=Gamma} -\printglossary +\newglossaryentry{gamma}{name=\ensuremath{\gamma(\alpha,x)}, +description=Incomplete gamma function,sort=gamma} -\end{document} -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*sampleacronyms.tex> -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -\documentclass{article} +\newglossaryentry{iGamma}{name=\ensuremath{\Gamma(\alpha,x)}, +description=Incomplete gamma function,sort=Gamma} -\usepackage[acronym,footnote,acronymlists={main,acronym2}]{glossaries} +\newglossaryentry{psi}{name=\ensuremath{\psi(x)}, +description=Psi function,sort=psi} -\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms} +\newglossaryentry{erf}{name=\ensuremath{\erf(x)}, +description=Error function,sort=erf} -\makeglossaries +\newglossaryentry{erfc}{name=\ensuremath{\erfc(x)}, +description=Complementary error function,sort=erfc} -% Main glossary is a list of calculus acronyms +\newglossaryentry{beta}{name=\ensuremath{B(x,y)}, +description=Beta function,sort=B} -\renewcommand{\glossaryname}{Calculus Acronyms} +\newglossaryentry{Bx}{name=\ensuremath{B_x(p,q)}, +description=Incomplete beta function,sort=Bx} -\newacronym[type=main]{vc}{VC}{Vector Calculus} -\newacronym[type=main]{ftoc}{FTOC}{Fundamental Theorem of Calculus} +\newglossaryentry{Tn}{name=\ensuremath{T_n(x)}, +description=Chebyshev's polynomials of the first kind, +sort=Tn} -% "acronym" glossary is a list of computer related acronyms +\newglossaryentry{Un}{name=\ensuremath{U_n(x)}, +description=Chebyshev's polynomials of the second kind, +sort=Un} -\renewcommand{\acronymname}{Computer Acronyms} +\newglossaryentry{Hn}{name=\ensuremath{H_n(x)}, +description=Hermite polynomials,sort=Hn} -\newacronym{kb}{kb}{KiloBit} -\newacronym{kB}{kB}{KiloByte} +\newglossaryentry{Lna}{name=\ensuremath{L_n^\alpha(x)}, +description=Laguerre polynomials,sort=Lna} -% "acronym2" glossary is a list of statistical acronyms +\newglossaryentry{Znu}{name=\ensuremath{Z_\nu(z)}, +description=Bessel functions,sort=Z} -\newacronym[type=acronym2]{svm}{SVM}{Support Vector Machine} +\newglossaryentry{Pagz}{name=\ensuremath{\Phi(\alpha,\gamma;z)}, +description=confluent hypergeometric function,sort=Pagz} -\begin{document} -\section{Sample Section} -\gls{kb}. \gls{kB}. \gls{vc}. \gls{ftoc}. \gls{svm}. +\newglossaryentry{kv}{name=\ensuremath{k_\nu(x)}, +description=Bateman's function,sort=kv} -\gls{kb}. \gls{kB}. \gls{vc}. \gls{ftoc}. \gls{svm}. +\newglossaryentry{Dp}{name=\ensuremath{D_p(z)}, +description=Parabolic cylinder functions,sort=Dp} -\printglossaries -\end{document} -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*sampleDB.tex> -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -\documentclass{article} +\newglossaryentry{Fpk}{name=\ensuremath{F(\phi,k)}, +description=Elliptical integral of the first kind,sort=Fpk} -\usepackage[colorlinks,plainpages=false]{hyperref} -\usepackage[nonumberlist]{glossaries} +\newglossaryentry{C}{name=\ensuremath{C}, +description=Euler's constant,sort=C} -\newglossary[nlg]{symbols}{not}{ntn}{Symbols} +\newglossaryentry{G}{name=\ensuremath{G}, +description=Catalan's constant,sort=G} \makeglossaries -\loadglsentries{database1} -\loadglsentries[symbols]{database2} +\pagestyle{headings} \begin{document} -\glsaddall +\title{Sample Document Using Interchangable Numbering} +\author{Nicola Talbot} +\maketitle -\printglossaries +\begin{abstract} +This is a sample document illustrating the use of the \textsf{glossaries} +package. The functions here have been taken from ``Tables of +Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik. -\end{document} -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*sampleDesc.tex> -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% See also sampleAcrDesc.tex -\documentclass[a4paper]{report} +The glossary lists both page numbers and equation numbers. +Since the majority of the entries use the equation number, +\texttt{counter=equation} was used as a package option. +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. -\usepackage[colorlinks,plainpages=false]{hyperref} +\end{abstract} -\usepackage[style=altlist, % use altlist style - toc, % add the glossary to the table of contents - sanitize={description=false}% don't sanitize description - ]{glossaries} +\tableofcontents -\makeglossaries +\printglossary[toctitle={Special Functions}] -\newglossaryentry{svm}{ - % how the entry name should appear in the glossary -name={Support vector machine (SVM)}, - % how the description should appear in the glossary - % since I have used sanitize={description=false} - % I have to protect fragile commands -description={Statistical pattern recognition -technique~\protect\cite{svm}}, - % how the entry should appear in the document text -text={svm}, - % how the entry should appear the first time it is - % used in the document text -first={support vector machine (svm)}} +\chapter{Gamma Functions} -\newglossaryentry{ksvm}{ -name={Kernel support vector machine (KSVM)}, -description={Statistical pattern recognition technique -using the ``kernel trick'' (see also SVM)}, -text={ksvm}, -first={kernel support vector machine}} +The \glslink[format=hyperbf,counter=page]{Gamma}{gamma function} is +defined as +\begin{equation} +\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +\end{equation} -\begin{document} -\tableofcontents +\begin{equation} +\glslink{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) +\end{equation} -\chapter{Support Vector Machines} +\begin{equation} +\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt +\end{equation} -The \gls{svm} is used widely in the area of pattern recognition. - % plural form with initial letter in uppercase: -\Glspl{svm} are \ldots +\begin{equation} +\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt +\end{equation} -This is the text produced without a link: \glsentrytext{svm}. -This is the text produced on first use without a link: -\glsentryfirst{svm}. This is the entry's description without -a link: \glsentrydesc{svm}. +\newpage -This is the entry in uppercase: \GLS{svm}. +\begin{equation} +\glslink{Gamma}{\ensuremath{\Gamma(\alpha)}} = +\Gamma(\alpha, x) + \gamma(\alpha, x) +\end{equation} -\chapter{Kernel Support Vector Machines} +\begin{equation} +\gls{psi} = \frac{d}{dx}\ln\Gamma(x) +\end{equation} -The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses -the so called ``kernel trick''. +\chapter{Error Functions} -\glsresetall -Possessive: \gls{ksvm}['s]. -Make the glossary entry number bold for this -one \gls[format=hyperbf]{svm}. +The \glslink[format=hyperbf,counter=page]{erf}{error function} is defined as: +\begin{equation} +\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt +\end{equation} -\begin{thebibliography}{1} -\bibitem{svm} \ldots -\end{thebibliography} +\begin{equation} +\gls{erfc} = 1 - \erf(x) +\end{equation} -\printglossary[title={Acronyms}] +\chapter{Beta Function} -\end{document} -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*sampleEq.tex> -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -\documentclass[a4paper,12pt]{report} +\begin{equation} +\gls{beta} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt +\end{equation} +Alternatively: +\begin{equation} +\gls{beta} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi +\end{equation} -\usepackage{amsmath} -\usepackage[colorlinks]{hyperref} -\usepackage[style=long3colheader,counter=equation]{glossaries} +\begin{equation} +\gls{beta} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) +\end{equation} -\makeglossaries +\begin{equation} +\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt +\end{equation} -\newcommand{\erf}{\operatorname{erf}} -\newcommand{\erfc}{\operatorname{erfc}} +\chapter{Chebyshev's polynomials} - % redefine the way hyperref creates the target for equations - % so that the glossary links to equation numbers work +\begin{equation} +\gls{Tn} = \cos(n\arccos x) +\end{equation} -\renewcommand*\theHequation{\thechapter.\arabic{equation}} +\begin{equation} +\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} +\end{equation} - % Change the glossary headings +\chapter{Hermite polynomials} -\renewcommand{\entryname}{Notation} -\renewcommand{\descriptionname}{Function Name} -\renewcommand{\pagelistname}{Number of Formula} +\begin{equation} +\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) +\end{equation} - % define glossary entries +\chapter{Laguerre polynomials} -\newglossaryentry{Gamma}{name=\ensuremath{\Gamma(z)}, -description=Gamma function, -sort=Gamma} +\begin{equation} +\gls{Lna} = \frac{1}{n!}e^x x^{-\alpha} +\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) +\end{equation} -\newglossaryentry{gamma}{name={\ensuremath{\gamma(\alpha,x)}}, -description=Incomplete gamma function, -sort=gamma} +\chapter{Bessel Functions} -\newglossaryentry{iGamma}{name={\ensuremath{\Gamma(\alpha,x)}}, -description=Incomplete gamma function, -sort=Gamma} +Bessel functions $Z_\nu(z)$ are solutions of +\begin{equation} +\frac{d^2\glslink{Znu}{Z_\nu}}{dz^2} + \frac{1}{z}\,\frac{dZ_\nu}{dz} + +\left( +1-\frac{\nu^2}{z^2}Z_\nu = 0 +\right) +\end{equation} -\newglossaryentry{psi}{name=\ensuremath{\psi(x)}, -description=Psi function,sort=psi} +\chapter{Confluent hypergeometric function} -\newglossaryentry{erf}{name=\ensuremath{\erf(x)}, -description=Error function,sort=erf} +\begin{equation} +\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!} ++ \cdots +\end{equation} -\newglossaryentry{erfc}{name=\ensuremath{\erfc}, -description=Complementary error function,sort=erfc} +\begin{equation} +\gls{kv} = \frac{2}{\pi}\int_0^{\pi/2} +\cos(x \tan\theta - \nu\theta)\,d\theta +\end{equation} -\newglossaryentry{B}{name={\ensuremath{B(x,y)}}, -description=Beta function,sort=B} +\chapter{Parabolic cylinder functions} -\newglossaryentry{Bx}{name={\ensuremath{B_x(p,q)}}, -description=Incomplete beta function,sort=Bx} +\begin{equation} +\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) +-\frac{\sqrt{2\pi}z}{\Gamma\left(-\frac{p}{2}\right)} +\Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) +\right\} +\end{equation} + +\chapter{Elliptical Integral of the First Kind} + +\begin{equation} +\gls{Fpk} = \int_0^\phi +\frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} +\end{equation} + +\chapter{Constants} + +\begin{equation} +\gls{C} = 0.577\,215\,664\,901\ldots +\end{equation} + +\begin{equation} +\gls{G} = 0.915\,965\,594\ldots +\end{equation} + +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*sampleNtn.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % This file is public domain +\documentclass{report} -\newglossaryentry{Tn}{name=\ensuremath{T_n(x)}, -description=Chebyshev's polynomials of the first kind,sort=Tn} +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage{html} +\usepackage[toc,savewrites,xindy]{glossaries} -\newglossaryentry{Un}{name=\ensuremath{U_n(x)}, -description=Chebyshev's polynomials of the second kind,sort=Un} + % Define a new glossary type called notation +\newglossary[nlg]{notation}{not}{ntn}{Notation} -\newglossaryentry{Hn}{name=\ensuremath{H_n(x)}, -description=Hermite polynomials,sort=Hn} +\makeglossaries -\newglossaryentry{Ln}{name=\ensuremath{L_n^\alpha(x)}, -description=Laguerre polynomials,sort=Lna} + % Notation definitions -\newglossaryentry{Znu}{name=\ensuremath{Z_\nu(z)}, -description=Bessel functions,sort=Z} +\newglossaryentry{not:set}{type=notation, % glossary type +name={$\mathcal{S}$}, +description={A set}, +sort={S}} -\newglossaryentry{Phi}{name={\ensuremath{\Phi(\alpha,\gamma;z)}}, -description=confluent hypergeometric function,sort=Pagz} +\newglossaryentry{not:U}{type=notation, +name={$\mathcal{U}$}, +description={The universal set}, +sort=U} -\newglossaryentry{knu}{name=\ensuremath{k_\nu(x)}, -description=Bateman's function,sort=kv} +\newglossaryentry{not:card}{type=notation, +name={$|\mathcal{S}|$}, +description={cardinality of $\mathcal{S}$}, +sort=cardinality} -\newglossaryentry{Dp}{name=\ensuremath{D_p(z)}, -description=Parabolic cylinder functions,sort=Dp} +\newglossaryentry{not:fact}{type=notation, +name={$!$}, +description={factorial}, +sort=factorial} -\newglossaryentry{F}{name={\ensuremath{F(\phi,k)}}, -description=Elliptical integral of the first kind,sort=Fpk} + % Main glossary definitions -\newglossaryentry{C}{name=\ensuremath{C}, -description=Euler's constant,sort=C} +\newglossaryentry{gls:set}{name=set, +description={A collection of distinct objects}} -\newglossaryentry{G}{name=\ensuremath{G}, -description=Catalan's constant,sort=G} +\newglossaryentry{gls:card}{name=cardinality, +description={The number of elements in the specified set}} \begin{document} -\title{A Sample Document Using glossaries.sty} +\title{Sample Document using the glossaries Package} \author{Nicola Talbot} +\pagenumbering{alph} \maketitle \begin{abstract} -This is a sample document illustrating the use of the \textsf{glossaries} -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 using the \texttt{counter=equation} package -option. + %stop hyperref complaining about duplicate page identifiers: +\pagenumbering{Alph} +This is a sample document illustrating the use of the +\textsf{glossaries} package. In this example, a new glossary type +called \texttt{notation} is defined, so that the document can have a +separate glossary of terms and index of notation. The index of notation +doesn't have associated numbers. \end{abstract} -\printglossary[title={Index of Special Functions and Notations}] -\chapter{Gamma Functions} +\pagenumbering{roman} +\tableofcontents -\begin{equation} -\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt -\end{equation} +\printglossaries -\verb|\ensuremath| is only required here if using -hyperlinks. -\begin{equation} -\glslink{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) -\end{equation} +\chapter{Introduction} +\pagenumbering{arabic} -\begin{equation} -\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt -\end{equation} +\glslink{gls:set}{Sets} +are denoted by a caligraphic font +e.g.\ \gls{not:set}. -\begin{equation} -\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt -\end{equation} +Let \gls[format=hyperit]{not:U} denote the universal set. -\newpage +The \gls{gls:card} of a set $\mathcal{S}$ is denoted +\gls{not:card}. -\begin{equation} -\gls{Gamma} = \Gamma(\alpha, x) + \gamma(\alpha, x) -\end{equation} +\chapter{Another Chapter} -\begin{equation} -\gls{psi} = \frac{d}{dx}\ln\Gamma(x) -\end{equation} +Another mention of the universal set \gls{not:U}. -\chapter{Error Functions} +The factorial symbol: \gls{not:fact}. -\begin{equation} -\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt -\end{equation} +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*sampleSec.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % This file is public domain +\documentclass{report} -\begin{equation} -\gls{erfc} = 1 - \erf(x) -\end{equation} +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage[style=altlist,toc,counter=section]{glossaries} -\chapter{Beta Function} +\makeglossaries -\begin{equation} -\gls{B} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt -\end{equation} -Alternatively: -\begin{equation} -\gls{B} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi -\end{equation} +\newglossaryentry{ident}{name=identity matrix, +description=diagonal matrix with 1s along the leading diagonal, +plural=identity matrices} -\begin{equation} -\gls{B} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) -\end{equation} +\newglossaryentry{diag}{name=diagonal matrix, +description=matrix whose only non-zero entries are along +the leading diagonal, +plural=diagonal matrices} -\begin{equation} -\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt -\end{equation} +\newglossaryentry{sing}{name=singular matrix, +description=matrix with zero determinant, +plural=singular matrices} -\chapter{Polynomials} +\begin{document} -\section{Chebyshev's polynomials} +\pagenumbering{roman} +\tableofcontents -\begin{equation} -\gls{Tn} = \cos(n\arccos x) -\end{equation} +\printglossaries -\begin{equation} -\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} -\end{equation} +\chapter{Introduction} +\pagenumbering{arabic} +This is a sample document illustrating the use of the +\textsf{glossaries} package. -\section{Hermite polynomials} +\chapter{Diagonal matrices} -\begin{equation} -\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) -\end{equation} +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. -\section{Laguerre polynomials} +\newpage +\section{Identity matrix} +The \gls[format=hyperit]{ident} is a \gls{diag} whose leading +diagonal elements are all equal to 1. -\begin{equation} -L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} -\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) -\end{equation} +Here is another entry for a \gls{diag}. And this is the +plural: \glspl{ident}. -\chapter{Bessel Functions} +This adds an entry into the glossary with a bold number, but +it doesn't create a hyperlink: \gls*[format=hyperbf]{ident}. -Bessel functions $Z_\nu$ are solutions of -\begin{equation} -\frac{d^2\glslink{Znu}{Z_\nu}}{dz^2} -+ \frac{1}{z}\,\frac{dZ_\nu}{dz} + -\left( 1-\frac{\nu^2}{z^2}Z_\nu = 0 \right) -\end{equation} +\chapter{Singular Matrices} -\chapter{Confluent hypergeometric function} +A \gls{sing} is a matrix with zero determinant. +\Glspl{sing} are non-invertible. Possessive: +a \gls{sing}['s] dimensions are not necessarily equal. + +Another \gls{ident} entry. + +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*sampletree.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % This file is public domain +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[style=alttreehypergroup,nolong,nosuper]{glossaries} + + % The alttree type of glossary styles need to know the + % widest entry name for each level +\glssetwidest{Roman letters} % level 0 widest name +\glssetwidest[1]{Sigma} % level 1 widest name + +\makeglossaries + +\newglossaryentry{greekletter}{name={Greek letters}, +text={Greek letter}, +description={\nopostdesc}} + +\newglossaryentry{sigma}{name={Sigma}, +text={\ensuremath{\Sigma}}, +first={\ensuremath{\Sigma} (uppercase sigma)}, +symbol={\ensuremath{\Sigma}}, +description={Used to indicate summation}, +parent=greekletter} + +\newglossaryentry{pi}{name={pi}, +text={\ensuremath{\pi}}, +first={\ensuremath{\pi} (lowercase pi)}, +symbol={\ensuremath{\pi}}, +description={Transcendental number}, +parent=greekletter} -\begin{equation} -\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 -\end{equation} +\newglossaryentry{romanletter}{name={Roman letters}, +text={Roman letter}, +description={\nopostdesc}} -\begin{equation} -\gls{knu} = \frac{2}{\pi}\int_0^{\pi/2} -\cos(x \tan\theta - \nu\theta)\,d\theta -\end{equation} +\newglossaryentry{e}{name={e}, +description={Unique real number such that the derivative of +the function $e^x$ is the function itself}, +parent=romanletter} -\chapter{Parabolic cylinder functions} +\newglossaryentry{C}{name={C}, +description={Euler's constant}, +parent=romanletter} -\begin{equation} -\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) --\frac{\sqrt{2\pi}z}{\Gamma\left(-\frac{p}{2}\right)} -\Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) -\right\} -\end{equation} +\begin{document} +This is a sample document illustrating hierarchical glossary +entries. -\chapter{Elliptical Integral of the First Kind} +\chapter{Greek Letters Used in Mathematics} -\begin{equation} -\gls{F} = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} -\end{equation} +Some information about \glspl{greekletter}. +The letter \gls{pi} is used to represent the ratio of a circle's +circumference to its diameter. +The letter \gls{sigma} is used to represent summation. -\chapter{Constants} +\chapter{Roman Letters Used in Mathematics} -\begin{equation} -\gls{C} = 0.577\,215\,664\,901\ldots -\end{equation} +Some information about \glspl{romanletter}. +The letter \gls{e} is the unique real number such that +the derivative of the function $e^x$ is the function itself. +The letter \gls{C} represents Euler's constant. -\begin{equation} -\gls{G} = 0.915\,965\,594\ldots -\end{equation} +\printglossaries \end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*sampleEqPg.tex> +%<*sampleutf8.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} - % To ensure that the page numbers are up-to-date: - % - % latex sampleEqPg - % makeglossaries sampleEqPg - % latex sampleEqPg - % makeglossaries sampleEqPg - % latex sampleEqPg - % - % The extra makeglossaries run is required because adding the - % glossary in the second LaTeX run shifts the page numbers on - % which means that the glossary needs to be updated again. - % (Note that this problem is avoided if the page numbering is - % reset after the glossary. For example, if the glossary has - % roman numbering and the subsequent pages have arabic numbering) -\documentclass[a4paper,12pt]{report} - -\usepackage{amsmath} -\usepackage[colorlinks]{hyperref} -\usepackage[style=long3colheader,toc, - counter=equation]{glossaries} - -\newcommand{\erf}{\operatorname{erf}} -\newcommand{\erfc}{\operatorname{erfc}} - - % redefine the way hyperref creates the target for equations - % so that the glossary links to equation numbers work - -\renewcommand*\theHequation{\thechapter.\arabic{equation}} - -\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} - - % set the glossary number style to italic - % hyperit is used instead of textit because - % the hyperref package is being used. -\renewcommand{\glsnumberformat}[1]{\hyperit{#1}} - - % 1st column heading -\renewcommand{\entryname}{Notation} + % This file is public domain +\documentclass{article} - % 2nd column heading -\renewcommand{\descriptionname}{Function Name} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[xindy,nonumberlist,style=listgroup]{glossaries} - % 3rd column heading -\renewcommand{\pagelistname}{} +\makeglossaries - % Redefine header row so that it - % adds a blank row after the title row -\renewcommand{\glossaryheader}{\bfseries\entryname & -\bfseries\descriptionname&\bfseries\pagelistname\\ -& & \\\endhead} +% Note that because the é is the first letter of the +% name, it needs to be grouped or it will cause a +% problem for \makefirstuc due to expansion issues. +\newglossaryentry{elite}{name={{é}lite}, +description={select group or class}} - % Define glossary entries +\newglossaryentry{elephant}{name=elephant, +description={large animal with trunk and tusks}} -\newglossaryentry{Gamma}{name=\ensuremath{\Gamma(z)}, -description=Gamma function,sort=Gamma} +\newglossaryentry{elk}{name=elk, +description=large deer} -\newglossaryentry{gamma}{name=\ensuremath{\gamma(\alpha,x)}, -description=Incomplete gamma function,sort=gamma} +\newglossaryentry{mannerly}{name=mannerly, +description=polite} -\newglossaryentry{iGamma}{name=\ensuremath{\Gamma(\alpha,x)}, -description=Incomplete gamma function,sort=Gamma} +% The Å“ is not the first letter, so it doesn't need to +% be grouped. +\newglossaryentry{manoeuvre}{name={manÅ“uvre}, +description=planned and controlled movement} -\newglossaryentry{psi}{name=\ensuremath{\psi(x)}, -description=Psi function,sort=psi} +\newglossaryentry{manor}{name=manor, +description=large landed estate or its house} -\newglossaryentry{erf}{name=\ensuremath{\erf(x)}, -description=Error function,sort=erf} +\newglossaryentry{odometer}{name=odometer, +description=instrument for measuring distance travelled by +a wheeled vehicle} -\newglossaryentry{erfc}{name=\ensuremath{\erfc(x)}, -description=Complementary error function,sort=erfc} +\newglossaryentry{oesophagus}{name={{Å“}sophagus}, +description={canal from mouth to stomach}} -\newglossaryentry{beta}{name=\ensuremath{B(x,y)}, -description=Beta function,sort=B} +\newglossaryentry{ogre}{name=ogre, +description=man-eating giant} -\newglossaryentry{Bx}{name=\ensuremath{B_x(p,q)}, -description=Incomplete beta function,sort=Bx} +\begin{document} +\null % ensure that the first run produces some output +\glsaddall -\newglossaryentry{Tn}{name=\ensuremath{T_n(x)}, -description=Chebyshev's polynomials of the first kind, -sort=Tn} +\printglossaries -\newglossaryentry{Un}{name=\ensuremath{U_n(x)}, -description=Chebyshev's polynomials of the second kind, -sort=Un} +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*samplexdy-compatible207.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % This file is public domain. + % + % This is a sample document illustrating how to use the + % glossaries package with xindy using the compatibility option. + % To create the document: + % + % latex samplexdy-compatible207 + % makeglossaries samplexdy-compatible207 + % latex samplexdy-compatible207 + % + % If you don't have Perl installed, then use one of the + % following instead of makeglossaries: + % + % If you want to have a separate "Mc" letter group do: + % + % xindy -I xindy -M samplexdy-mc207 -t samplexdy-compatible207.glg -o samplexdy-compatible207.gls samplexdy-compatible207.glo + % + % Otherwise do: + % + % xindy -L english -C utf8 -I xindy -M samplexdy-compatible207 -t samplexdy-compatible207.glg -o samplexdy-compatible207.gls samplexdy-compatible207.glo + % +\documentclass{article} -\newglossaryentry{Hn}{name=\ensuremath{H_n(x)}, -description=Hermite polynomials,sort=Hn} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{fmtcount} -\newglossaryentry{Lna}{name=\ensuremath{L_n^\alpha(x)}, -description=Laguerre polynomials,sort=Lna} + % remove redefinition of \thepage below if you want to uncomment + % the following line: + % \usepackage[colorlinks]{hyperref} -\newglossaryentry{Znu}{name=\ensuremath{Z_\nu(z)}, -description=Bessel functions,sort=Z} +\usepackage[xindy,compatible-2.07,style=altlistgroup]{glossaries} -\newglossaryentry{Pagz}{name=\ensuremath{\Phi(\alpha,\gamma;z)}, -description=confluent hypergeometric function,sort=Pagz} + % Define a new command to do bold italic (it uses \hyperbf + % rather than \textbf in case I later introduce hyperlinks + % - although I would have to remove the fancy page numbering + % if I wanted to do that): -\newglossaryentry{kv}{name=\ensuremath{k_\nu(x)}, -description=Bateman's function,sort=kv} +\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} -\newglossaryentry{Dp}{name=\ensuremath{D_p(z)}, -description=Parabolic cylinder functions,sort=Dp} + % Need to add this to the list of attributes in order + % to use it with xindy: + % (This command will have no effect if \noist is used) -\newglossaryentry{Fpk}{name=\ensuremath{F(\phi,k)}, -description=Elliptical integral of the first kind,sort=Fpk} +\GlsAddXdyAttribute{hyperbfit} -\newglossaryentry{C}{name=\ensuremath{C}, -description=Euler's constant,sort=C} + % Redefine the page numbers so that they appear as a word: -\newglossaryentry{G}{name=\ensuremath{G}, -description=Catalan's constant,sort=G} + \renewcommand*{\thepage}{\Numberstring{page}} -\makeglossaries + % Need to add this to the list of location styles. + % \Numberstring{page} gets expanded to + % \protect \Numberstringnum {} (where is the page number) + % so need to define the location in that format: + % (This command will have no effect if \noist is used) -\pagestyle{headings} +\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space + \string\Numberstringnum\space\glsopenbrace" + "arabic-numbers" :sep "\glsclosebrace"} -\begin{document} + % To have Mc as a separate group uncomment the following three + % lines: -\title{Sample Document Using Interchangable Numbering} -\author{Nicola Talbot} -\maketitle + \setStyleFile{samplexdy-mc207} % note no extension + \noist + \GlsSetXdyLanguage{} -\begin{abstract} -This is a sample document illustrating the use of the \textsf{glossaries} -package. The functions here have been taken from ``Tables of -Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik. + % The above three lines specify to use samplexdy-mc.xdy (supplied + % with this file) and don't overwrite it. The language is + % unset using \GlsSetXdyLanguage{} as all the language + % dependent information is contained in samplexdy-mc.xdy + % Note that using \noist means that commands like + % \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have + % an effect. -The glossary lists both page numbers and equation numbers. -Since the majority of the entries use the equation number, -\texttt{counter=equation} was used as a package option. -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. + % Write the style file (if \noist isn't used) + % and activate glossary entries -\end{abstract} +\makeglossaries -\tableofcontents + % Define glossary entries + % \glshyperlink is used instead of \gls to prevent the glossary + % page numbers also appear in the locations, however I need + % to ensure that the referenced entries are added to the + % glossary via commands that use \glslink, \glsadd or \glssee -\printglossary[toctitle={Special Functions}] +\newglossaryentry{mcadam}{name={McAdam, John Loudon}, +first={John Loudon McAdam},text={McAdam}, +description={Scottish engineer}} -\chapter{Gamma Functions} +\newglossaryentry{maclaurin}{name={Maclaurin, Colin}, +first={Colin Maclaurin},text={Maclaurin}, +description={Scottish mathematician best known for the +\gls{maclaurinseries}}} -The \glslink[format=hyperbf,counter=page]{Gamma}{gamma function} is -defined as -\begin{equation} -\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt -\end{equation} +\newglossaryentry{maclaurinseries}{name={Maclaurin series}, +description={Series expansion},see={taylorstheorem}} -\begin{equation} -\glslink{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) -\end{equation} +\newglossaryentry{taylorstheorem}{name={Taylor's theorem}, +description={Theorem expressing a function $f(x)$ as the sum of +a polynomial and a remainder: +\[f(x) = f(a)+f'(a)(x-a)+f''(a)(x-a^2)/2!+\cdots+R_n\] +If $n\to\infty$ the expansion is a \glshyperlink{taylorseries} +and if $a=0$, the series is called a +\gls{maclaurinseries}}} -\begin{equation} -\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt -\end{equation} +\newglossaryentry{taylorseries}{name={Taylor series}, +description={Series expansion},see={taylorstheorem}} -\begin{equation} -\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt -\end{equation} +\newglossaryentry{taylor}{name={Taylor, Brook}, +first={Brook Taylor},text={Taylor}, +description={English mathematician}} -\newpage +\newglossaryentry{mcnemar}{name={McNemar, Quinn}, +first={Quinn McNemar},text={McNemar}, +description={Mathematician who introduced +\gls{mcnemarstest}. This entry has the number list +suppressed},nonumberlist} -\begin{equation} -\glslink{Gamma}{\ensuremath{\Gamma(\alpha)}} = -\Gamma(\alpha, x) + \gamma(\alpha, x) -\end{equation} +\newglossaryentry{mcnemarstest}{name={McNemar's test}, +description={A nonparametric test introduced by +\gls{mcnemar} in 1947}} -\begin{equation} -\gls{psi} = \frac{d}{dx}\ln\Gamma(x) -\end{equation} +\newglossaryentry{mach}{name={Mach, Ernst}, +first={Ernst Mach},text={Mach}, + % if using samplexdy-mc.xdy, the following line is needed + % to prevent this entry being put in the "Mc" group +sort={mach, Ernst}, +description={Czech/Austrian physicist and philosopher}} -\chapter{Error Functions} +\newglossaryentry{machnumber}{name={Mach number}, + % if using samplexdy-mc.xdy, the following line is needed + % to prevent this entry being put in the "Mc" group +sort={mach number}, +description={Ratio of the speed of a body in a fluid to the +speed of sound in that fluid named after \gls{mach}}} -The \glslink[format=hyperbf,counter=page]{erf}{error function} is defined as: -\begin{equation} -\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt -\end{equation} +\newglossaryentry{malthus}{name={Malthus, Thomas Robert}, +first={Thomas Robert Malthus},text={Malthus}, +description={English mathematician, sociologist and classicist}} -\begin{equation} -\gls{erfc} = 1 - \erf(x) -\end{equation} +\newglossaryentry{ampereandre}{name={Ampère, André-Marie}, +first={André-Marie Ampère},text={Ampère}, +description={French mathematician and physicist}} -\chapter{Beta Function} +\newglossaryentry{ampere}{name={ampere}, +description={SI unit of electric current named after +\gls{ampereandre}}} -\begin{equation} -\gls{beta} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt -\end{equation} -Alternatively: -\begin{equation} -\gls{beta} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi -\end{equation} +\newglossaryentry{archimedes}{name={Archimedes of Syracuse}, +first={Archimedes of Syracuse},text={Archimedes}, +description={Greek mathematician}} -\begin{equation} -\gls{beta} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) -\end{equation} +\newglossaryentry{archimedesprinciple}{name={Archemedes' principle}, +description={Principle that if a body is submerged in a fluid +it experiences upthrust equal to the weight of the displaced +fluid. Named after \gls{archimedes}}} -\begin{equation} -\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt -\end{equation} +\newglossaryentry{galton}{name={Galton, Sir Francis}, +first={Sir Francis Galton},text={Galton}, +description={English anthropologist}} -\chapter{Chebyshev's polynomials} +\newglossaryentry{gauss}{name={Gauss, Karl Friedrich}, +first={Karl Friedrich Gauss},text={Gauss}, +description={German mathematician}} -\begin{equation} -\gls{Tn} = \cos(n\arccos x) -\end{equation} +\newglossaryentry{gaussianint}{name={Gaussian integer}, +description={Complex number where both real and imaginary +parts are integers}} -\begin{equation} -\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} -\end{equation} +\newglossaryentry{peano}{name={Peano, Giuseppe}, +first={Giuseppe Peano},text={Peano}, +description={Italian mathematician}} -\chapter{Hermite polynomials} +\newglossaryentry{peanoscurve}{name={Peano's curve}, +description={A space-filling curve discovered by +\gls{peano}}} -\begin{equation} -\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) -\end{equation} +\newglossaryentry{pearson}{name={Pearson, Karl}, +first={Karl Pearson},text={Pearson}, +description={English mathematician}} -\chapter{Laguerre polynomials} +\newglossaryentry{pearspmcc}{name={Pearson's product moment +correlation coefficient},description={Product moment correlation +coefficient named after \gls{pearson}}} -\begin{equation} -\gls{Lna} = \frac{1}{n!}e^x x^{-\alpha} -\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) -\end{equation} +\begin{document} +\title{Sample Document Using the Glossaries Package With Xindy} +\author{Nicola Talbot} +\maketitle -\chapter{Bessel Functions} +\section{\glsentryfirst{gauss}} -Bessel functions $Z_\nu(z)$ are solutions of -\begin{equation} -\frac{d^2\glslink{Znu}{Z_\nu}}{dz^2} + \frac{1}{z}\,\frac{dZ_\nu}{dz} + -\left( -1-\frac{\nu^2}{z^2}Z_\nu = 0 -\right) -\end{equation} +This is a section on \gls[format=(]{gauss}. This section spans +several pages. -\chapter{Confluent hypergeometric function} +\newpage -\begin{equation} -\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!} -+ \cdots -\end{equation} +This page talks about \glspl[format=hyperbfit]{gaussianint}. Since +it's the principle definition, the user-defined hyperbfit format is +used. -\begin{equation} -\gls{kv} = \frac{2}{\pi}\int_0^{\pi/2} -\cos(x \tan\theta - \nu\theta)\,d\theta -\end{equation} +\newpage -\chapter{Parabolic cylinder functions} +The section on \gls[format=)]{gauss} ends here. -\begin{equation} -\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) --\frac{\sqrt{2\pi}z}{\Gamma\left(-\frac{p}{2}\right)} -\Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) -\right\} -\end{equation} +\section{Series Expansions} -\chapter{Elliptical Integral of the First Kind} +This section is about series expansions. It mentions +\gls{maclaurin} and \gls{taylor}. It also discusses +\gls{taylorstheorem} which is related to the \gls{taylorseries}. +The \gls{maclaurinseries} is a special case of the +\gls{taylorseries}. -\begin{equation} -\gls{Fpk} = \int_0^\phi -\frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} -\end{equation} +\section{\glsentryname{archimedesprinciple}} -\chapter{Constants} +This section discusses \gls{archimedesprinciple} which was +introduced by \gls{archimedes}. -\begin{equation} -\gls{C} = 0.577\,215\,664\,901\ldots -\end{equation} +\section{Another section} -\begin{equation} -\gls{G} = 0.915\,965\,594\ldots -\end{equation} +This section covers \gls{mach} who introduced the \gls{machnumber}. +It also mentions \gls{ampereandre} after whom the +SI unit \gls{ampere} is named. It then discusses \gls{galton} +and \gls{malthus}. Finally it mentions \gls{mcadam}. +\newpage +This page discusses \gls{mcnemar} who introduced +\gls{mcnemarstest} and \gls{peano} who discovered \gls{peanoscurve}. + +\printglossaries \end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*sampleNtn.tex> +%<*samplexdy.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -\documentclass{report} + % This file is public domain. + % + % This is a sample document illustrating how to use the + % glossaries package with xindy. To create the document: + % + % latex samplexdy + % makeglossaries samplexdy + % latex samplexdy + % + % If you don't have Perl installed, then use one of the + % following instead of makeglossaries: + % + % If you want to have a separate "Mc" letter group do: + % + % xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo + % + % Otherwise do: + % + % xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo + % +\documentclass{article} -\usepackage[plainpages=false,colorlinks]{hyperref} -\usepackage{html} -\usepackage[toc]{glossaries} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{fmtcount} - % Define a new glossary type called notation -\newglossary[nlg]{notation}{not}{ntn}{Notation} +\usepackage[colorlinks,plainpages]{hyperref} +\usepackage[xindy,style=altlistgroup]{glossaries} -\makeglossaries + % Define a new command to do bold italic: - % Notation definitions +\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} -\newglossaryentry{not:set}{type=notation, % glossary type -name={$\mathcal{S}$}, -description={A set}, -sort={S}} + % Need to add this to the list of attributes in order + % to use it with xindy: + % (This command will have no effect if \noist is used) -\newglossaryentry{not:U}{type=notation, -name={$\mathcal{U}$}, -description={The universal set}, -sort=U} +\GlsAddXdyAttribute{hyperbfit} -\newglossaryentry{not:card}{type=notation, -name={$|\mathcal{S}|$}, -description={cardinality of $\mathcal{S}$}, -sort=cardinality} + % Redefine the page numbers so that they appear as a word: -\newglossaryentry{not:fact}{type=notation, -name={$!$}, -description={factorial}, -sort=factorial} + \renewcommand*{\thepage}{\Numberstring{page}} - % Main glossary definitions + % Need to add this to the list of location styles. + % \Numberstring{page} gets expanded to + % \protect \Numberstringnum {} (where is the page number) + % so need to define the location in that format: + % (This command will have no effect if \noist is used) -\newglossaryentry{gls:set}{name=set, -description={A collection of distinct objects}} +\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space + \string\Numberstringnum\space\glsopenbrace" + "arabic-numbers" :sep "\glsclosebrace"} -\newglossaryentry{gls:card}{name=cardinality, -description={The number of elements in the specified set}} + % (Need to redefine \glsXpageXhyperbfit and + % \glsXpageXglsnumberformat after \makeglossaries to get the + % hyperlinks working correctly.) -\begin{document} -\title{Sample Document using the glossaries Package} -\author{Nicola Talbot} -\pagenumbering{alph} -\maketitle + % To have Mc as a separate group uncomment the following three + % lines: -\begin{abstract} - %stop hyperref complaining about duplicate page identifiers: -\pagenumbering{Alph} -This is a sample document illustrating the use of the -\textsf{glossaries} package. In this example, a new glossary type -called \texttt{notation} is defined, so that the document can have a -separate glossary of terms and index of notation. The index of notation -doesn't have associated numbers. -\end{abstract} + %\setStyleFile{samplexdy-mc} % note no extension + %\noist + %\GlsSetXdyLanguage{} + % The above three lines specify to use samplexdy-mc.xdy (supplied + % with this file) and don't overwrite it. The language is + % unset using \GlsSetXdyLanguage{} as all the language + % dependent information is contained in samplexdy-mc.xdy + % Note that using \noist means that commands like + % \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have + % an effect. -\pagenumbering{roman} -\tableofcontents + % Write the style file (if \noist isn't used) + % and activate glossary entries -\printglossaries +\makeglossaries -\chapter{Introduction} -\pagenumbering{arabic} + % Each page location will be specified in the form: + % + % "\glsXpageXglsnumberformat{}{\protect \Numberstringnum "\marg{n}"}" + % or + % "\glsXpageXhyperbfit{}{\protect \Numberstringnum "\marg{n}"}" + % + % Redefine to allow hyperlinks: -\glslink{gls:set}{Sets} -are denoted by a caligraphic font -e.g.\ \gls{not:set}. +\renewcommand{\glsXpageXglsnumberformat}[2]{% + \linkpagenumber#2% +} -Let \gls[format=hyperit]{not:U} denote the universal set. +\renewcommand{\glsXpageXhyperbfit}[2]{% + \textbf{\em\linkpagenumber#2}% +} -The \gls{gls:card} of a set $\mathcal{S}$ is denoted -\gls{not:card}. +\newcommand{\linkpagenumber}[3]{\hyperlink{page.#3}{#1#2{#3}}} -\chapter{Another Chapter} + % Define glossary entries + % \glshyperlink is used instead of \gls to prevent the glossary + % page numbers also appear in the locations, however I need + % to ensure that the referenced entries are added to the + % glossary via commands that use \glslink, \glsadd or \glssee -Another mention of the universal set \gls{not:U}. +\newglossaryentry{mcadam}{name={McAdam, John Loudon}, +first={John Loudon McAdam},text={McAdam}, +description={Scottish engineer}} -The factorial symbol: \gls{not:fact}. +\newglossaryentry{maclaurin}{name={Maclaurin, Colin}, +first={Colin Maclaurin},text={Maclaurin}, +description={Scottish mathematician best known for the +\gls{maclaurinseries}}} -\end{document} -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*sampleSec.tex> -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -\documentclass{report} +\newglossaryentry{maclaurinseries}{name={Maclaurin series}, +description={Series expansion},see={taylorstheorem}} -\usepackage[plainpages=false,colorlinks]{hyperref} -\usepackage[style=altlist,toc,counter=section]{glossaries} +\newglossaryentry{taylorstheorem}{name={Taylor's theorem}, +description={Theorem expressing a function $f(x)$ as the sum of +a polynomial and a remainder: +\[f(x) = f(a)+f'(a)(x-a)+f''(a)(x-a^2)/2!+\cdots+R_n\] +If $n\to\infty$ the expansion is a \glshyperlink{taylorseries} +and if $a=0$, the series is called a +\gls{maclaurinseries}}} -\makeglossaries +\newglossaryentry{taylorseries}{name={Taylor series}, +description={Series expansion},see={taylorstheorem}} -\newglossaryentry{ident}{name=identity matrix, -description=diagonal matrix with 1s along the leading diagonal, -plural=identity matrices} +\newglossaryentry{taylor}{name={Taylor, Brook}, +first={Brook Taylor},text={Taylor}, +description={English mathematician}} -\newglossaryentry{diag}{name=diagonal matrix, -description=matrix whose only non-zero entries are along -the leading diagonal, -plural=diagonal matrices} +\newglossaryentry{mcnemar}{name={McNemar, Quinn}, +first={Quinn McNemar},text={McNemar}, +description={Mathematician who introduced +\gls{mcnemarstest}. This entry has the number list +suppressed},nonumberlist} -\newglossaryentry{sing}{name=singular matrix, -description=matrix with zero determinant, -plural=singular matrices} +\newglossaryentry{mcnemarstest}{name={McNemar's test}, +description={A nonparametric test introduced by +\gls{mcnemar} in 1947}} -\begin{document} +\newglossaryentry{mach}{name={Mach, Ernst}, +first={Ernst Mach},text={Mach}, + % if using samplexdy-mc.xdy, the following line is needed + % to prevent this entry being put in the "Mc" group +sort={mach, Ernst}, +description={Czech/Austrian physicist and philosopher}} -\pagenumbering{roman} -\tableofcontents +\newglossaryentry{machnumber}{name={Mach number}, + % if using samplexdy-mc.xdy, the following line is needed + % to prevent this entry being put in the "Mc" group +sort={mach number}, +description={Ratio of the speed of a body in a fluid to the +speed of sound in that fluid named after \gls{mach}}} -\printglossaries +\newglossaryentry{malthus}{name={Malthus, Thomas Robert}, +first={Thomas Robert Malthus},text={Malthus}, +description={English mathematician, sociologist and classicist}} -\chapter{Introduction} -\pagenumbering{arabic} -This is a sample document illustrating the use of the -\textsf{glossaries} package. +\newglossaryentry{ampereandre}{name={Ampère, André-Marie}, +first={André-Marie Ampère},text={Ampère}, +description={French mathematician and physicist}} -\chapter{Diagonal matrices} +\newglossaryentry{ampere}{name={ampere}, +description={SI unit of electric current named after +\gls{ampereandre}}} -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. +\newglossaryentry{archimedes}{name={Archimedes of Syracuse}, +first={Archimedes of Syracuse},text={Archimedes}, +description={Greek mathematician}} -\newpage -\section{Identity matrix} -The \gls[format=hyperit]{ident} is a \gls{diag} whose leading -diagonal elements are all equal to 1. +\newglossaryentry{archimedesprinciple}{name={Archemedes' principle}, +description={Principle that if a body is submerged in a fluid +it experiences upthrust equal to the weight of the displaced +fluid. Named after \gls{archimedes}}} -Here is another entry for a \gls{diag}. And this is the -plural: \glspl{ident}. +\newglossaryentry{galton}{name={Galton, Sir Francis}, +first={Sir Francis Galton},text={Galton}, +description={English anthropologist}} -This adds an entry into the glossary with a bold number, but -it doesn't create a hyperlink: \gls*[format=hyperbf]{ident}. +\newglossaryentry{gauss}{name={Gauss, Karl Friedrich}, +first={Karl Friedrich Gauss},text={Gauss}, +description={German mathematician}} -\chapter{Singular Matrices} +\newglossaryentry{gaussianint}{name={Gaussian integer}, +description={Complex number where both real and imaginary +parts are integers}} -A \gls{sing} is a matrix with zero determinant. -\Glspl{sing} are non-invertible. Possessive: -a \gls{sing}['s] dimensions are not necessarily equal. +\newglossaryentry{peano}{name={Peano, Giuseppe}, +first={Giuseppe Peano},text={Peano}, +description={Italian mathematician}} -Another \gls{ident} entry. +\newglossaryentry{peanoscurve}{name={Peano's curve}, +description={A space-filling curve discovered by +\gls{peano}}} -\end{document} -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*sampletree.tex> -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -\documentclass{report} +\newglossaryentry{pearson}{name={Pearson, Karl}, +first={Karl Pearson},text={Pearson}, +description={English mathematician}} -\usepackage[colorlinks]{hyperref} -\usepackage[style=alttreehypergroup,nolong,nosuper]{glossaries} +\newglossaryentry{pearspmcc}{name={Pearson's product moment +correlation coefficient},description={Product moment correlation +coefficient named after \gls{pearson}}} + +\begin{document} +\title{Sample Document Using the Glossaries Package With Xindy} +\author{Nicola Talbot} +\maketitle - % The alttree type of glossary styles need to know the - % widest entry name for each level -\glssetwidest{Roman letters} % level 0 widest name -\glssetwidest[1]{Sigma} % level 1 widest name +\section{\glsentryfirst{gauss}} -\makeglossaries +This is a section on \gls[format=(]{gauss}. This section spans +several pages. -\newglossaryentry{greekletter}{name={Greek letters}, -text={Greek letter}, -description={\nopostdesc}} +\newpage -\newglossaryentry{sigma}{name={Sigma}, -text={\ensuremath{\Sigma}}, -first={\ensuremath{\Sigma} (uppercase sigma)}, -symbol={\ensuremath{\Sigma}}, -description={Used to indicate summation}, -parent=greekletter} +This page talks about \glspl[format=hyperbfit]{gaussianint}. Since +it's the principle definition, the user-defined hyperbfit format is +used. -\newglossaryentry{pi}{name={pi}, -text={\ensuremath{\pi}}, -first={\ensuremath{\pi} (lowercase pi)}, -symbol={\ensuremath{\pi}}, -description={Transcendental number}, -parent=greekletter} +\newpage -\newglossaryentry{romanletter}{name={Roman letters}, -text={Roman letter}, -description={\nopostdesc}} +The section on \gls[format=)]{gauss} ends here. -\newglossaryentry{e}{name={e}, -description={Unique real number such that the derivative of -the function $e^x$ is the function itself}, -parent=romanletter} +\section{Series Expansions} -\newglossaryentry{C}{name={C}, -description={Euler's constant}, -parent=romanletter} +This section is about series expansions. It mentions +\gls{maclaurin} and \gls{taylor}. It also discusses +\gls{taylorstheorem} which is related to the \gls{taylorseries}. +The \gls{maclaurinseries} is a special case of the +\gls{taylorseries}. -\begin{document} -This is a sample document illustrating hierarchical glossary -entries. +\section{\glsentryname{archimedesprinciple}} -\chapter{Greek Letters Used in Mathematics} +This section discusses \gls{archimedesprinciple} which was +introduced by \gls{archimedes}. -Some information about \glspl{greekletter}. -The letter \gls{pi} is used to represent the ratio of a circle's -circumference to its diameter. -The letter \gls{sigma} is used to represent summation. +\section{Another section} -\chapter{Roman Letters Used in Mathematics} +This section covers \gls{mach} who introduced the \gls{machnumber}. +It also mentions \gls{ampereandre} after whom the +SI unit \gls{ampere} is named. It then discusses \gls{galton} +and \gls{malthus}. Finally it mentions \gls{mcadam}. -Some information about \glspl{romanletter}. -The letter \gls{e} is the unique real number such that -the derivative of the function $e^x$ is the function itself. -The letter \gls{C} represents Euler's constant. +\newpage +This page discusses \gls{mcnemar} who introduced +\gls{mcnemarstest} and \gls{peano} who discovered \gls{peanoscurve}. \printglossaries - \end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*sampleutf8.tex> +%<*samplexdy2.tex> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -\documentclass{article} + % This file is public domain + % + % This is a sample document illustrating how to use the + % glossaries package with xindy. To create the document: + % + % pdflatex samplexdy2 + % makeglossaries samplexdy2 + % pdflatex samplexdy2 + % + % This sample file won't work with makeindex + % +\documentclass{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} -\usepackage[xindy,nonumberlist,style=listgroup]{glossaries} +\usepackage[colorlinks]{hyperref} +\usepackage[xindy,counter=section]{glossaries} + + % Set up somewhat eccentric section numbering system: + +\renewcommand*{\thesection}{[\thechapter]\arabic{section}} + +\renewcommand*{\theHsection}{\thepart.\thesection} +\renewcommand*{\thepart}{\Roman{part}} + +\GlsAddXdyLocation["roman-numbers-uppercase"]{section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} + + % If part is 0, then \thepart will be empty, so add an extra + % case to catch this: + +\GlsAddXdyLocation{zero.section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} + + % (Note that the above will stop xindy giving a warning, but the + % location hyper links will be invalid if no \part is used.) \makeglossaries -% Note that because the é is the first letter of the -% name, it needs to be grouped or it will cause a -% problem for \makefirstuc due to expansion issues. -\newglossaryentry{elite}{name={{é}lite}, -description={select group or class}} +\newglossaryentry{sample}{name=sample,description={an example}} +\newglossaryentry{sample2}{name=sample2,description={another example}} -\newglossaryentry{elephant}{name=elephant, -description={large animal with trunk and tusks}} +\begin{document} +This is a sample document illustrating Xindy specific commands in +the glossaries package. -\newglossaryentry{elk}{name=elk, -description=large deer} +\part{First Part} -\newglossaryentry{mannerly}{name=mannerly, -description=polite} +\chapter{Sample Chapter} -% The Å“ is not the first letter, so it doesn't need to -% be grouped. -\newglossaryentry{manoeuvre}{name={manÅ“uvre}, -description=planned and controlled movement} +\section{First Section} -\newglossaryentry{manor}{name=manor, -description=large landed estate or its house} +\gls{sample}. \gls{sample2}. -\newglossaryentry{odometer}{name=odometer, -description=instrument for measuring distance travelled by -a wheeled vehicle} +\section{Second Section} -\newglossaryentry{oesophagus}{name={{Å“}sophagus}, -description={canal from mouth to stomach}} +\gls{sample2}. -\newglossaryentry{ogre}{name=ogre, -description=man-eating giant} +\section{Third Section} -\begin{document} -\null % ensure that the first run produces some output -\glsaddall +\gls{sample}. \gls{sample2}. \printglossaries - \end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*samplexdy.tex> +%<*samplexdy-mc.xdy> % \end{macrocode} %\fi %\iffalse % \begin{macrocode} - % This is a sample document illustrating how to use the - % glossaries package with xindy. To create the document: - % - % latex samplexdy - % makeglossaries samplexdy - % latex samplexdy - % - % If you don't have Perl installed, then use one of the - % following instead of makeglossaries: - % - % If you want to have a separate "Mc" letter group do: - % - % xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo - % - % Otherwise do: - % - % xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo - % -\documentclass{article} - -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{fmtcount} - - % remove redefinition of \thepage below if you want to uncomment - % the following line: - % \usepackage[colorlinks]{hyperref} - -\usepackage[xindy,style=altlistgroup]{glossaries} - - % Define a new command to do bold italic (it uses \hyperbf - % rather than \textbf in case I later introduce hyperlinks - % - although I would have to remove the fancy page numbering - % if I wanted to do that): - -\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} - - % Need to add this to the list of attributes in order - % to use it with xindy: - % (This command will have no effect if \noist is used) - -\GlsAddXdyAttribute{hyperbfit} - - % Redefine the page numbers so that they appear as a word: - - \renewcommand*{\thepage}{\Numberstring{page}} - - % Need to add this to the list of location styles. - % \Numberstring{page} gets expanded to - % \protect \Numberstringnum {} (where is the page number) - % so need to define the location in that format: - % (This command will have no effect if \noist is used) - -\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space - \string\Numberstringnum\space\glsopenbrace" - "arabic-numbers" :sep "\glsclosebrace"} - - % To have Mc as a separate group uncomment the following three - % lines: +;; xindy style file for samplexdy.tex that has Mc letter group - %\setStyleFile{samplexdy-mc} % note no extension - %\noist - %\GlsSetXdyLanguage{} +(define-letter-group "A" :prefixes ("€")) +(define-letter-group "B" :after "A" :prefixes ("„")) +(define-letter-group "C" :after "B" :prefixes ("†")) +(define-letter-group "D" :after "C" :prefixes ("Â")) +(define-letter-group "E" :after "D" :prefixes ("—")) +(define-letter-group "F" :after "E" :prefixes ("Âœ")) +(define-letter-group "G" :after "F" :prefixes ("Â")) +(define-letter-group "H" :after "G" :prefixes ("¤")) +(define-letter-group "I" :after "H" :prefixes ("¨")) +(define-letter-group "J" :after "I" :prefixes ("¬")) +(define-letter-group "K" :after "J" :prefixes ("®")) +(define-letter-group "L" :after "K" :prefixes ("´")) +(define-letter-group "Mc" :after "L" :prefixes ("Ƞ")) +(define-letter-group "M" :after "Mc" :prefixes ("»")) +(define-letter-group "N" :after "M" :prefixes ("¼")) +(define-letter-group "O" :after "N" :prefixes ("Ã")) +(define-letter-group "P" :after "O" :prefixes ("È")) +(define-letter-group "Q" :after "P" :prefixes ("Ê")) +(define-letter-group "R" :after "Q" :prefixes ("Ë")) +(define-letter-group "S" :after "R" :prefixes ("Ã")) +(define-letter-group "T" :after "S" :prefixes ("Ú")) +(define-letter-group "U" :after "T" :prefixes ("à")) +(define-letter-group "V" :after "U" :prefixes ("Ã¥")) +(define-letter-group "W" :after "V" :prefixes ("æ")) +(define-letter-group "X" :after "W" :prefixes ("ë")) +(define-letter-group "Y" :after "X" :prefixes ("í")) +(define-letter-group "Ȝ" :after "Y" :prefixes ("ï")) +(define-letter-group "Z" :after "Ȝ" :prefixes ("ð")) +(define-letter-group "Þ" :after "Z" :prefixes ("ö")) +(define-letter-group "Æ¿" :after "Þ" :prefixes ("÷")) - % The above three lines specify to use samplexdy-mc.xdy (supplied - % with this file) and don't overwrite it. The language is - % unset using \GlsSetXdyLanguage{} as all the language - % dependent information is contained in samplexdy-mc.xdy - % Note that using \noist means that commands like - % \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have - % an effect. +(define-rule-set "en-alphabetize" - % Write the style file (if \noist isn't used) - % and activate glossary entries + :rules (("à" "€" :string) + ("À" "€" :string) + ("Æ" "€—" :string) + ("æ" "€—" :string) + ("Ç" "†" :string) + ("ç" "†" :string) + ("ð" "Â" :string) + ("ÃÂ" "Â" :string) + ("É" "—" :string) + ("Ê" "—" :string) + ("È" "—" :string) + ("Ë" "—" :string) + ("è" "—" :string) + ("ë" "—" :string) + ("ê" "—" :string) + ("é" "—" :string) + ("ÃÂ" "¨" :string) + ("ï" "¨" :string) + ("Ñ" "¼" :string) + ("ñ" "¼" :string) + ("Ö" "Ã" :string) + ("Ô" "Ã" :string) + ("ô" "Ã" :string) + ("ö" "Ã" :string) + ("œ" "×" :string) + ("Ã…Â’" "×" :string) + ("ÈÂ" "ï" :string) + ("Ȝ" "ï" :string) + ("þ" "ö" :string) + ("Þ" "ö" :string) + ("Ç·" "÷" :string) + ("Æ¿" "÷" :string) + ("a" "€" :string) + ("A" "€" :string) + ("b" "„" :string) + ("B" "„" :string) + ("C" "†" :string) + ("c" "†" :string) + ("d" "Â" :string) + ("D" "Â" :string) + ("E" "—" :string) + ("e" "—" :string) + ("F" "Âœ" :string) + ("f" "Âœ" :string) + ("g" "Â" :string) + ("G" "Â" :string) + ("H" "¤" :string) + ("h" "¤" :string) + ("I" "¨" :string) + ("i" "¨" :string) + ("J" "¬" :string) + ("j" "¬" :string) + ("K" "®" :string) + ("k" "®" :string) + ("L" "´" :string) + ("l" "´" :string) + ("Mc" "Ƞ" :string) + ("Mac" "Ƞ" :string) + ("M" "»" :string) + ("m" "»" :string) + ("N" "¼" :string) + ("n" "¼" :string) + ("O" "Ã" :string) + ("o" "Ã" :string) + ("P" "È" :string) + ("p" "È" :string) + ("q" "Ê" :string) + ("Q" "Ê" :string) + ("r" "Ë" :string) + ("R" "Ë" :string) + ("S" "Ã" :string) + ("s" "Ã" :string) + ("T" "Ú" :string) + ("t" "Ú" :string) + ("u" "à" :string) + ("U" "à" :string) + ("v" "Ã¥" :string) + ("V" "Ã¥" :string) + ("w" "æ" :string) + ("W" "æ" :string) + ("X" "ë" :string) + ("x" "ë" :string) + ("Y" "í" :string) + ("y" "í" :string) + ("z" "ð" :string) + ("Z" "ð" :string) + )) -\makeglossaries +(define-rule-set "en-resolve-diacritics" - % Define glossary entries - % \glshyperlink is used instead of \gls to prevent the glossary - % page numbers also appear in the locations, however I need - % to ensure that the referenced entries are added to the - % glossary via commands that use \glslink, \glsadd or \glssee + :rules (("ÈÂ" "¢" :string) + ("þ" "¢" :string) + ("Ç·" "¢" :string) + ("Þ" "¢" :string) + ("Ȝ" "¢" :string) + ("Æ¿" "¢" :string) + ("Ö" "£" :string) + ("Ñ" "£" :string) + ("ð" "£" :string) + ("Ç" "£" :string) + ("É" "£" :string) + ("ÃÂ" "£" :string) + ("ï" "£" :string) + ("ö" "£" :string) + ("ñ" "£" :string) + ("ç" "£" :string) + ("à" "£" :string) + ("À" "£" :string) + ("é" "£" :string) + ("ÃÂ" "£" :string) + ("Ô" "¤" :string) + ("ô" "¤" :string) + ("È" "¤" :string) + ("è" "¤" :string) + ("Ë" "Â¥" :string) + ("ë" "Â¥" :string) + ("Ê" "¦" :string) + ("ê" "¦" :string) + ("œ" "ÿ" :string) + ("Æ" "ÿ" :string) + ("Ã…Â’" "ÿ" :string) + ("æ" "ÿ" :string) + ("S" "¢" :string) + ("K" "¢" :string) + ("d" "¢" :string) + ("Y" "¢" :string) + ("E" "¢" :string) + ("y" "¢" :string) + ("g" "¢" :string) + ("e" "¢" :string) + ("J" "¢" :string) + ("q" "¢" :string) + ("D" "¢" :string) + ("b" "¢" :string) + ("z" "¢" :string) + ("w" "¢" :string) + ("Q" "¢" :string) + ("M" "¢" :string) + ("C" "¢" :string) + ("L" "¢" :string) + ("X" "¢" :string) + ("P" "¢" :string) + ("T" "¢" :string) + ("a" "¢" :string) + ("N" "¢" :string) + ("j" "¢" :string) + ("Z" "¢" :string) + ("u" "¢" :string) + ("k" "¢" :string) + ("t" "¢" :string) + ("W" "¢" :string) + ("v" "¢" :string) + ("s" "¢" :string) + ("B" "¢" :string) + ("H" "¢" :string) + ("c" "¢" :string) + ("I" "¢" :string) + ("G" "¢" :string) + ("U" "¢" :string) + ("F" "¢" :string) + ("r" "¢" :string) + ("x" "¢" :string) + ("V" "¢" :string) + ("h" "¢" :string) + ("f" "¢" :string) + ("i" "¢" :string) + ("A" "¢" :string) + ("O" "¢" :string) + ("n" "¢" :string) + ("m" "¢" :string) + ("l" "¢" :string) + ("p" "¢" :string) + ("R" "¢" :string) + ("o" "¢" :string) + )) -\newglossaryentry{mcadam}{name={McAdam, John Loudon}, -first={John Loudon McAdam},text={McAdam}, -description={Scottish engineer}} +(define-rule-set "en-resolve-case" -\newglossaryentry{maclaurin}{name={Maclaurin, Colin}, -first={Colin Maclaurin},text={Maclaurin}, -description={Scottish mathematician best known for the -\gls{maclaurinseries}}} + :rules (("Ö" "8" :string) + ("Ñ" "8" :string) + ("Ô" "8" :string) + ("Ç" "8" :string) + ("É" "8" :string) + ("ÃÂ" "8" :string) + ("Ê" "8" :string) + ("È" "8" :string) + ("Ë" "8" :string) + ("Ç·" "8" :string) + ("À" "8" :string) + ("Þ" "8" :string) + ("Ȝ" "8" :string) + ("ÃÂ" "8" :string) + ("Æ" "89" :string) + ("Ã…Â’" "89" :string) + ("ð" "9" :string) + ("ô" "9" :string) + ("ÈÂ" "9" :string) + ("ï" "9" :string) + ("ö" "9" :string) + ("ñ" "9" :string) + ("ç" "9" :string) + ("à" "9" :string) + ("þ" "9" :string) + ("è" "9" :string) + ("ë" "9" :string) + ("ê" "9" :string) + ("é" "9" :string) + ("Æ¿" "9" :string) + ("œ" "99" :string) + ("æ" "99" :string) + ("S" "8" :string) + ("K" "8" :string) + ("Y" "8" :string) + ("E" "8" :string) + ("J" "8" :string) + ("D" "8" :string) + ("Q" "8" :string) + ("M" "8" :string) + ("C" "8" :string) + ("L" "8" :string) + ("X" "8" :string) + ("P" "8" :string) + ("T" "8" :string) + ("N" "8" :string) + ("Z" "8" :string) + ("W" "8" :string) + ("B" "8" :string) + ("H" "8" :string) + ("I" "8" :string) + ("G" "8" :string) + ("U" "8" :string) + ("F" "8" :string) + ("V" "8" :string) + ("A" "8" :string) + ("O" "8" :string) + ("R" "8" :string) + ("d" "9" :string) + ("y" "9" :string) + ("g" "9" :string) + ("e" "9" :string) + ("q" "9" :string) + ("b" "9" :string) + ("z" "9" :string) + ("w" "9" :string) + ("a" "9" :string) + ("j" "9" :string) + ("u" "9" :string) + ("k" "9" :string) + ("t" "9" :string) + ("v" "9" :string) + ("s" "9" :string) + ("c" "9" :string) + ("r" "9" :string) + ("x" "9" :string) + ("h" "9" :string) + ("f" "9" :string) + ("i" "9" :string) + ("n" "9" :string) + ("m" "9" :string) + ("l" "9" :string) + ("p" "9" :string) + ("o" "9" :string) + )) -\newglossaryentry{maclaurinseries}{name={Maclaurin series}, -description={Series expansion},see={taylorstheorem}} +(define-rule-set "en-ignore-special" -\newglossaryentry{taylorstheorem}{name={Taylor's theorem}, -description={Theorem expressing a function $f(x)$ as the sum of -a polynomial and a remainder: -\[f(x) = f(a)+f'(a)(x-a)+f''(a)(x-a^2)/2!+\cdots+R_n\] -If $n\to\infty$ the expansion is a \glshyperlink{taylorseries} -and if $a=0$, the series is called a -\gls{maclaurinseries}}} + :rules (("-" "" :string) + ("!" "" :string) + ("{" "" :string) + ("'" "" :string) + ("}" "" :string) + ("?" "" :string) + ("." "" :string) + )) -\newglossaryentry{taylorseries}{name={Taylor series}, -description={Series expansion},see={taylorstheorem}} +(define-rule-set "en-resolve-special" -\newglossaryentry{taylor}{name={Taylor, Brook}, -first={Brook Taylor},text={Taylor}, -description={English mathematician}} + :rules (("Ö" "¤" :string) + ("Ñ" "¤" :string) + ("ð" "¤" :string) + ("Ô" "¤" :string) + ("Ç" "¤" :string) + ("É" "¤" :string) + ("ô" "¤" :string) + ("ÃÂ" "¤" :string) + ("ÈÂ" "¤" :string) + ("ï" "¤" :string) + ("Ê" "¤" :string) + ("ö" "¤" :string) + ("ñ" "¤" :string) + ("È" "¤" :string) + ("ç" "¤" :string) + ("Ë" "¤" :string) + ("à" "¤" :string) + ("þ" "¤" :string) + ("Ç·" "¤" :string) + ("è" "¤" :string) + ("À" "¤" :string) + ("ë" "¤" :string) + ("Þ" "¤" :string) + ("ê" "¤" :string) + ("é" "¤" :string) + ("Ȝ" "¤" :string) + ("Æ¿" "¤" :string) + ("ÃÂ" "¤" :string) + ("œ" "¤¤" :string) + ("Æ" "¤¤" :string) + ("Ã…Â’" "¤¤" :string) + ("æ" "¤¤" :string) + ("?" "¡" :string) + ("!" "¢" :string) + ("." "£" :string) + ("S" "¤" :string) + ("K" "¤" :string) + ("d" "¤" :string) + ("Y" "¤" :string) + ("E" "¤" :string) + ("y" "¤" :string) + ("g" "¤" :string) + ("e" "¤" :string) + ("J" "¤" :string) + ("q" "¤" :string) + ("D" "¤" :string) + ("b" "¤" :string) + ("z" "¤" :string) + ("w" "¤" :string) + ("Q" "¤" :string) + ("M" "¤" :string) + ("C" "¤" :string) + ("L" "¤" :string) + ("X" "¤" :string) + ("P" "¤" :string) + ("T" "¤" :string) + ("a" "¤" :string) + ("N" "¤" :string) + ("j" "¤" :string) + ("Z" "¤" :string) + ("u" "¤" :string) + ("k" "¤" :string) + ("t" "¤" :string) + ("W" "¤" :string) + ("v" "¤" :string) + ("s" "¤" :string) + ("B" "¤" :string) + ("H" "¤" :string) + ("c" "¤" :string) + ("I" "¤" :string) + ("G" "¤" :string) + ("U" "¤" :string) + ("F" "¤" :string) + ("r" "¤" :string) + ("x" "¤" :string) + ("V" "¤" :string) + ("h" "¤" :string) + ("f" "¤" :string) + ("i" "¤" :string) + ("A" "¤" :string) + ("O" "¤" :string) + ("n" "¤" :string) + ("m" "¤" :string) + ("l" "¤" :string) + ("p" "¤" :string) + ("R" "¤" :string) + ("o" "¤" :string) + ("-" "Â¥" :string) + ("'" "¦" :string) + ("{" "§" :string) + ("}" "¨" :string) + )) -\newglossaryentry{mcnemar}{name={McNemar, Quinn}, -first={Quinn McNemar},text={McNemar}, -description={Mathematician who introduced -\gls{mcnemarstest}. This entry has the number list -suppressed},nonumberlist} +; The following section is customised for samplexdy.tex +; (copied from samplexdy.xdy automatically generated by +; samplexdy.tex) -\newglossaryentry{mcnemarstest}{name={McNemar's test}, -description={A nonparametric test introduced by -\gls{mcnemar} in 1947}} +; required styles -\newglossaryentry{mach}{name={Mach, Ernst}, -first={Ernst Mach},text={Mach}, - % if using samplexdy-mc.xdy, the following line is needed - % to prevent this entry being put in the "Mc" group -sort={mach, Ernst}, -description={Czech/Austrian physicist and philosopher}} +(require "tex.xdy") -\newglossaryentry{machnumber}{name={Mach number}, - % if using samplexdy-mc.xdy, the following line is needed - % to prevent this entry being put in the "Mc" group -sort={mach number}, -description={Ratio of the speed of a body in a fluid to the -speed of sound in that fluid named after \gls{mach}}} +; list of allowed attributes (number formats) -\newglossaryentry{malthus}{name={Malthus, Thomas Robert}, -first={Thomas Robert Malthus},text={Malthus}, -description={English mathematician, sociologist and classicist}} +(define-attributes (("default" + "hyperbfit" + "pagehyperbfit" + "glsnumberformat" + "pageglsnumberformat" + "textrm" + "pagetextrm" + "textsf" + "pagetextsf" + "texttt" + "pagetexttt" + "textbf" + "pagetextbf" + "textmd" + "pagetextmd" + "textit" + "pagetextit" + "textup" + "pagetextup" + "textsl" + "pagetextsl" + "textsc" + "pagetextsc" + "emph" + "pageemph" + "glshypernumber" + "pageglshypernumber" + "hyperrm" + "pagehyperrm" + "hypersf" + "pagehypersf" + "hypertt" + "pagehypertt" + "hyperbf" + "pagehyperbf" + "hypermd" + "pagehypermd" + "hyperit" + "pagehyperit" + "hyperup" + "pagehyperup" + "hypersl" + "pagehypersl" + "hypersc" + "pagehypersc" + "hyperemph" + "pagehyperemph"))) -\newglossaryentry{ampereandre}{name={Ampère, André-Marie}, -first={André-Marie Ampère},text={Ampère}, -description={French mathematician and physicist}} +; user defined alphabets -\newglossaryentry{ampere}{name={ampere}, -description={SI unit of electric current named after -\gls{ampereandre}}} -\newglossaryentry{archimedes}{name={Archimedes of Syracuse}, -first={Archimedes of Syracuse},text={Archimedes}, -description={Greek mathematician}} -\newglossaryentry{archimedesprinciple}{name={Archemedes' principle}, -description={Principle that if a body is submerged in a fluid -it experiences upthrust equal to the weight of the displaced -fluid. Named after \gls{archimedes}}} +; location class definitions -\newglossaryentry{galton}{name={Galton, Sir Francis}, -first={Sir Francis Galton},text={Galton}, -description={English anthropologist}} +(define-location-class "roman-page-numbers" + ( :sep "{}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-roman-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-roman-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-roman-page-numbers" + ( :sep "{" "alpha" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-roman-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-roman-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers" + ( :sep "{}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Roman-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Roman-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Roman-page-numbers" + ( :sep "{" "alpha" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Roman-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Roman-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers" + ( :sep "{}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-arabic-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-arabic-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-arabic-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-arabic-page-numbers" + ( :sep "{" "alpha" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-arabic-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-arabic-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-arabic-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers" + ( :sep "{}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-alpha-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-alpha-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-alpha-page-numbers" + ( :sep "{" "alpha" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers" + ( :sep "{}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Alpha-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Alpha-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Alpha-page-numbers" + ( :sep "{" "alpha" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers" + ( :sep "{}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Appendix-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Appendix-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Appendix-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Appendix-page-numbers" + ( :sep "{" "alpha" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Appendix-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Appendix-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Appendix-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers" + ( :sep "{}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-arabic-section-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-arabic-section-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-arabic-section-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-arabic-section-numbers" + ( :sep "{" "alpha" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-arabic-section-numbers" + ( :sep "{" "ALPHA" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-arabic-section-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-arabic-section-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) -\newglossaryentry{gauss}{name={Gauss, Karl Friedrich}, -first={Karl Friedrich Gauss},text={Gauss}, -description={German mathematician}} +; user defined location classes -\newglossaryentry{gaussianint}{name={Gaussian integer}, -description={Complex number where both real and imaginary -parts are integers}} +(define-location-class "Numberstring" + (:sep "{}{" :sep "\protect \Numberstringnum {" "arabic-numbers" :sep "}" :sep "}")) -\newglossaryentry{peano}{name={Peano, Giuseppe}, -first={Giuseppe Peano},text={Peano}, -description={Italian mathematician}} +; define cross-reference class -\newglossaryentry{peanoscurve}{name={Peano's curve}, -description={A space-filling curve discovered by -\gls{peano}}} +(define-crossref-class "see" :unverified ) +(markup-crossref-list :class "see" + :open "\glsseeformat" :close "{}") -\newglossaryentry{pearson}{name={Pearson, Karl}, -first={Karl Pearson},text={Pearson}, -description={English mathematician}} +; define the order of the location classes +(define-location-class-order ( + "roman-page-numbers" + "arabic-page-numbers" + "arabic-section-numbers" + "alpha-page-numbers" + "Roman-page-numbers" + "Alpha-page-numbers" + "Appendix-page-numbers" + "see" )) -\newglossaryentry{pearspmcc}{name={Pearson's product moment -correlation coefficient},description={Product moment correlation -coefficient named after \gls{pearson}}} +; define the glossary markup -\begin{document} -\title{Sample Document Using the Glossaries Package With Xindy} -\author{Nicola Talbot} -\maketitle +(markup-index + :open "\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble +\providecommand*\glsXpageXhyperbfit[2]{\setentrycounter[#1]{page}\hyperbfit{#2}} +\providecommand*\glsXpageXglsnumberformat[2]{\setentrycounter[#1]{page}\glsnumberformat{#2}} +\providecommand*\glsXpageXtextrm[2]{\setentrycounter[#1]{page}\textrm{#2}} +\providecommand*\glsXpageXtextsf[2]{\setentrycounter[#1]{page}\textsf{#2}} +\providecommand*\glsXpageXtexttt[2]{\setentrycounter[#1]{page}\texttt{#2}} +\providecommand*\glsXpageXtextbf[2]{\setentrycounter[#1]{page}\textbf{#2}} +\providecommand*\glsXpageXtextmd[2]{\setentrycounter[#1]{page}\textmd{#2}} +\providecommand*\glsXpageXtextit[2]{\setentrycounter[#1]{page}\textit{#2}} +\providecommand*\glsXpageXtextup[2]{\setentrycounter[#1]{page}\textup{#2}} +\providecommand*\glsXpageXtextsl[2]{\setentrycounter[#1]{page}\textsl{#2}} +\providecommand*\glsXpageXtextsc[2]{\setentrycounter[#1]{page}\textsc{#2}} +\providecommand*\glsXpageXemph[2]{\setentrycounter[#1]{page}\emph{#2}} +\providecommand*\glsXpageXglshypernumber[2]{\setentrycounter[#1]{page}\glshypernumber{#2}} +\providecommand*\glsXpageXhyperrm[2]{\setentrycounter[#1]{page}\hyperrm{#2}} +\providecommand*\glsXpageXhypersf[2]{\setentrycounter[#1]{page}\hypersf{#2}} +\providecommand*\glsXpageXhypertt[2]{\setentrycounter[#1]{page}\hypertt{#2}} +\providecommand*\glsXpageXhyperbf[2]{\setentrycounter[#1]{page}\hyperbf{#2}} +\providecommand*\glsXpageXhypermd[2]{\setentrycounter[#1]{page}\hypermd{#2}} +\providecommand*\glsXpageXhyperit[2]{\setentrycounter[#1]{page}\hyperit{#2}} +\providecommand*\glsXpageXhyperup[2]{\setentrycounter[#1]{page}\hyperup{#2}} +\providecommand*\glsXpageXhypersl[2]{\setentrycounter[#1]{page}\hypersl{#2}} +\providecommand*\glsXpageXhypersc[2]{\setentrycounter[#1]{page}\hypersc{#2}} +\providecommand*\glsXpageXhyperemph[2]{\setentrycounter[#1]{page}\hyperemph{#2}} +\begin{theglossary}\glossaryheader~n" + :close "%~n\end{theglossary}\glossarypostamble~n" + :tree) +(markup-letter-group-list :sep "\glsgroupskip~n") +(markup-indexentry :open "\relax\glsresetentrylist~n") +(markup-locclass-list :open "{\glossaryentrynumbers{\relax " + :sep ", " :close "}}") +(markup-locref-list :sep "\delimN ") +(markup-range :sep "\delimR ") -\section{\glsentryfirst{gauss}} +; define format to use for locations -This is a section on \gls[format=(]{gauss}. This section spans -several pages. -\newpage +(markup-locref :open "~n\glsXpageXhyperbfit" + :close "" + :attr "pagehyperbfit") +(markup-locref :open "~n\glsXpageXglsnumberformat" + :close "" + :attr "pageglsnumberformat") +(markup-locref :open "~n\glsXpageXtextrm" + :close "" + :attr "pagetextrm") +(markup-locref :open "~n\glsXpageXtextsf" + :close "" + :attr "pagetextsf") +(markup-locref :open "~n\glsXpageXtexttt" + :close "" + :attr "pagetexttt") +(markup-locref :open "~n\glsXpageXtextbf" + :close "" + :attr "pagetextbf") +(markup-locref :open "~n\glsXpageXtextmd" + :close "" + :attr "pagetextmd") +(markup-locref :open "~n\glsXpageXtextit" + :close "" + :attr "pagetextit") +(markup-locref :open "~n\glsXpageXtextup" + :close "" + :attr "pagetextup") +(markup-locref :open "~n\glsXpageXtextsl" + :close "" + :attr "pagetextsl") +(markup-locref :open "~n\glsXpageXtextsc" + :close "" + :attr "pagetextsc") +(markup-locref :open "~n\glsXpageXemph" + :close "" + :attr "pageemph") +(markup-locref :open "~n\glsXpageXglshypernumber" + :close "" + :attr "pageglshypernumber") +(markup-locref :open "~n\glsXpageXhyperrm" + :close "" + :attr "pagehyperrm") +(markup-locref :open "~n\glsXpageXhypersf" + :close "" + :attr "pagehypersf") +(markup-locref :open "~n\glsXpageXhypertt" + :close "" + :attr "pagehypertt") +(markup-locref :open "~n\glsXpageXhyperbf" + :close "" + :attr "pagehyperbf") +(markup-locref :open "~n\glsXpageXhypermd" + :close "" + :attr "pagehypermd") +(markup-locref :open "~n\glsXpageXhyperit" + :close "" + :attr "pagehyperit") +(markup-locref :open "~n\glsXpageXhyperup" + :close "" + :attr "pagehyperup") +(markup-locref :open "~n\glsXpageXhypersl" + :close "" + :attr "pagehypersl") +(markup-locref :open "~n\glsXpageXhypersc" + :close "" + :attr "pagehypersc") +(markup-locref :open "~n\glsXpageXhyperemph" + :close "" + :attr "pagehyperemph") -This page talks about \glspl[format=hyperbfit]{gaussianint}. Since -it's the principle definition, the user-defined hyperbfit format is -used. +; define letter group list format -\newpage +(markup-letter-group-list :sep "\glsgroupskip~n") -The section on \gls[format=)]{gauss} ends here. +; letter group headings -\section{Series Expansions} +(markup-letter-group :open-head "\glsgroupheading{" + :close-head "}") -This section is about series expansions. It mentions -\gls{maclaurin} and \gls{taylor}. It also discusses -\gls{taylorstheorem} which is related to the \gls{taylorseries}. -The \gls{maclaurinseries} is a special case of the -\gls{taylorseries}. +; additional letter groups -\section{\glsentryname{archimedesprinciple}} +(define-letter-group "glsnumbers" + :prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") + :before "A") -This section discusses \gls{archimedesprinciple} which was -introduced by \gls{archimedes}. +; additional sort rules -\section{Another section} -This section covers \gls{mach} who introduced the \gls{machnumber}. -It also mentions \gls{ampereandre} after whom the -SI unit \gls{ampere} is named. It then discusses \gls{galton} -and \gls{malthus}. Finally it mentions \gls{mcadam}. +; The following is copied from xindy/lang/english/utf8-lang.xdy -\newpage -This page discusses \gls{mcnemar} who introduced -\gls{mcnemarstest} and \gls{peano} who discovered \gls{peanoscurve}. +(define-sort-rule-orientations (forward backward forward forward)) +(use-rule-set :run 0 + :rule-set ("en-alphabetize" "en-ignore-special")) +(use-rule-set :run 1 + :rule-set ("en-resolve-diacritics" "en-ignore-special")) +(use-rule-set :run 2 + :rule-set ("en-resolve-case" "en-ignore-special")) +(use-rule-set :run 3 + :rule-set ("en-resolve-special")) -\printglossaries -\end{document} % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*samplexdy-mc.xdy> +%<*samplexdy-mc207.xdy> % \end{macrocode} %\fi %\iffalse @@ -21016,7 +20038,7 @@ This page discusses \gls{mcnemar} who introduced %\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse @@ -21080,7 +20102,7 @@ description={the ``at'' symbol}} \newglossaryentry{excl}{name={!}, description={the exclamation mark symbol}} -\newglossaryentry{bar}{name={$|$}, +\newglossaryentry{bar}{name={\ensuremath{|}}, description={the vertical bar symbol}} \newglossaryentry{hash}{name={\#}, diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index 86a04b70a07..13f67b0f5c4 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.ins +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.ins @@ -1,10 +1,10 @@ -% glossaries.ins generated using makedtx version 0.94b 2010/7/10 12:21 +% glossaries.ins generated using makedtx version 0.94b 2011/4/3 22:26 \input docstrip \preamble glossaries.dtx - Copyright 2010 Nicola Talbot + Copyright 2011 Nicola Talbot This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -18,7 +18,7 @@ The Current Maintainer of this work is Nicola Talbot. - This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. + This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. \endpreamble @@ -42,6 +42,8 @@ \usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-superragged.sty,package}} \file{glossary-tree.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-tree.sty,package}} +\file{glossaries-compatible-207.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-compatible-207.sty,package}} \file{glossaries-accsupp.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-accsupp.sty,package}} \file{glossaries-babel.sty}{\usepreamble\defaultpreamble @@ -73,7 +75,9 @@ \file{glossaries-dictionary-Spanish.dict}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-dictionary-Spanish.dict,package}} \file{minimalgls.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{minimalgls.tex}} +\file{sample-crossref.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-crossref.tex}} \file{sample-custom-acronym.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-custom-acronym.tex}} +\file{sample-dual.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-dual.tex}} \file{sample.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample.tex}} \file{sample4col.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample4col.tex}} \file{sampleaccsupp.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleaccsupp.tex}} @@ -88,8 +92,11 @@ \file{sampleSec.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleSec.tex}} \file{sampletree.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampletree.tex}} \file{sampleutf8.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleutf8.tex}} +\file{samplexdy-compatible207.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy-compatible207.tex}} \file{samplexdy.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy.tex}} +\file{samplexdy2.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy2.tex}} \file{samplexdy-mc.xdy}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy-mc.xdy}} +\file{samplexdy-mc207.xdy}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy-mc207.xdy}} \file{database1.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{database1.tex}} \file{database2.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{database2.tex}} \file{glossaries.perl}{\nopreamble\nopostamble\from{glossaries.dtx}{glossaries.perl}} diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-babel.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-babel.sty index 291fa313d0e..cb4c936813a 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-babel.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-babel.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-babel.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-207.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-207.sty new file mode 100644 index 00000000000..05bd60a57d5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-207.sty @@ -0,0 +1,328 @@ +%% +%% This is file `glossaries-compatible-207.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% glossaries.dtx (with options: `glossaries-compatible-207.sty,package') +%% +%% glossaries.dtx +%% Copyright 2011 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license of (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-compatible-207}[2011/04/02 v1.0 (NLCT)] +\ifglsxindy + \renewcommand*\GlsAddXdyAttribute[1]{% + \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string"}% + \expandafter\toks@\expandafter{\@xdylocref}% + \edef\@xdylocref{\the\toks@ ^^J% + (markup-locref + :open \string"\string~n\string\setentrycounter + {\noexpand\glscounter}% + \expandafter\string\csname#1\endcsname + \expandafter\@gobble\string\{\string" ^^J + :close \string"\expandafter\@gobble\string\}\string" ^^J + :attr \string"#1\string")}} +\fi +\renewcommand*\GlsAddXdyCounters[1]{% + \GlossariesWarning{\string\GlsAddXdyCounters\space not available + in compatibility mode.}% +} + \GlsAddXdyAttribute{glsnumberformat} + \GlsAddXdyAttribute{textrm} + \GlsAddXdyAttribute{textsf} + \GlsAddXdyAttribute{texttt} + \GlsAddXdyAttribute{textbf} + \GlsAddXdyAttribute{textmd} + \GlsAddXdyAttribute{textit} + \GlsAddXdyAttribute{textup} + \GlsAddXdyAttribute{textsl} + \GlsAddXdyAttribute{textsc} + \GlsAddXdyAttribute{emph} + \GlsAddXdyAttribute{glshypernumber} + \GlsAddXdyAttribute{hyperrm} + \GlsAddXdyAttribute{hypersf} + \GlsAddXdyAttribute{hypertt} + \GlsAddXdyAttribute{hyperbf} + \GlsAddXdyAttribute{hypermd} + \GlsAddXdyAttribute{hyperit} + \GlsAddXdyAttribute{hyperup} + \GlsAddXdyAttribute{hypersl} + \GlsAddXdyAttribute{hypersc} + \GlsAddXdyAttribute{hyperemph} +\ifglsxindy + \renewcommand*{\GlsAddXdyLocation}[2]{% + \edef\@xdyuserlocationdefs{% + \@xdyuserlocationdefs ^^J% + (define-location-class \string"#1\string"^^J\space\space + \space(#2)) + }% + \edef\@xdyuserlocationnames{% + \@xdyuserlocationnames^^J\space\space\space + \string"#1\string"}% + } +\fi +\renewcommand{\@do@wrglossary}[1]{% +\ifglsxindy + \expandafter\@glo@check@mkidxrangechar\@glsnumberformat\@nil + \def\@glo@range{}% + \expandafter\if\@glo@prefix(\relax + \def\@glo@range{:open-range}% + \else + \expandafter\if\@glo@prefix)\relax + \def\@glo@range{:close-range}% + \fi + \fi + \protected@edef\@glslocref{\theglsentrycounter}% + \@gls@checkmkidxchars\@glslocref + \glossary[\csname glo@#1@type\endcsname]{% + (indexentry :tkey (\csname glo@#1@index\endcsname) + :locref \string"\@glslocref\string" % + :attr \string"\@glo@suffix\string" \@glo@range + ) + }% +\else + \@set@glo@numformat\@glo@numfmt\@gls@counter\@glsnumberformat + \glossary[\csname glo@#1@type\endcsname]{% + \string\glossaryentry{\csname glo@#1@index\endcsname + \@gls@encapchar\@glo@numfmt}{\theglsentrycounter}}% +\fi +} +\def\@set@glo@numformat#1#2#3{% + \expandafter\@glo@check@mkidxrangechar#3\@nil + \protected@edef#1{% + \@glo@prefix setentrycounter[]{#2}% + \expandafter\string\csname\@glo@suffix\endcsname + }% + \@gls@checkmkidxchars#1% +} +\ifglsxindy + \def\writeist{% + \openout\glswrite=\istfilename + \write\glswrite{;; xindy style file created by the glossaries + package in compatible-2.07 mode}% + \write\glswrite{;; for document '\jobname' on + \the\year-\the\month-\the\day}% + \write\glswrite{^^J; required styles^^J} + \@for\@xdystyle:=\@xdyrequiredstyles\do{% + \ifx\@xdystyle\@empty + \else + \protected@write\glswrite{}{(require + \string"\@xdystyle.xdy\string")}% + \fi + }% + \write\glswrite{^^J% + ; list of allowed attributes (number formats)^^J}% + \write\glswrite{(define-attributes ((\@xdyattributes)))}% + \write\glswrite{^^J; user defined alphabets^^J}% + \write\glswrite{\@xdyuseralphabets}% + \write\glswrite{^^J; location class definitions^^J}% + \protected@edef\@gls@roman{\@roman{0\string" + \string"roman-numbers-lowercase\string" :sep \string"}}% + \@onelevel@sanitize\@gls@roman + \edef\@tmp{\string" \string"roman-numbers-lowercase\string" + :sep \string"}% + \@onelevel@sanitize\@tmp + \ifx\@tmp\@gls@roman + \write\glswrite{(define-location-class + \string"roman-page-numbers\string"^^J\space\space\space + (\string"roman-numbers-lowercase\string") + :min-range-length \@glsminrange)}% + \else + \write\glswrite{(define-location-class + \string"roman-page-numbers\string"^^J\space\space\space + (:sep "\@gls@roman") + :min-range-length \@glsminrange)}% + \fi + \write\glswrite{(define-location-class + \string"Roman-page-numbers\string"^^J\space\space\space + (\string"roman-numbers-uppercase\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"arabic-page-numbers\string"^^J\space\space\space + (\string"arabic-numbers\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"alpha-page-numbers\string"^^J\space\space\space + (\string"alpha\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"Alpha-page-numbers\string"^^J\space\space\space + (\string"ALPHA\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"Appendix-page-numbers\string"^^J\space\space\space + (\string"ALPHA\string" + :sep \string"\@glsAlphacompositor\string" + \string"arabic-numbers\string") + :min-range-length \@glsminrange)}% + \write\glswrite{(define-location-class + \string"arabic-section-numbers\string"^^J\space\space\space + (\string"arabic-numbers\string" + :sep \string"\glscompositor\string" + \string"arabic-numbers\string") + :min-range-length \@glsminrange)}% + \write\glswrite{^^J; user defined location classes}% + \write\glswrite{\@xdyuserlocationdefs}% + \write\glswrite{^^J; define cross-reference class^^J}% + \write\glswrite{(define-crossref-class \string"see\string" + :unverified )}% + \write\glswrite{(markup-crossref-list + :class \string"see\string"^^J\space\space\space + :open \string"\string\glsseeformat\string" + :close \string"{}\string")}% + \write\glswrite{^^J; define the order of the location classes}% + \write\glswrite{(define-location-class-order + (\@xdylocationclassorder))}% + \write\glswrite{^^J; define the glossary markup^^J}% + \write\glswrite{(markup-index^^J\space\space\space + :open \string"\string + \glossarysection[\string\glossarytoctitle]{\string + \glossarytitle}\string\glossarypreamble\string~n\string\begin + {theglossary}\string\glossaryheader\string~n\string" ^^J\space + \space\space:close \string"\expandafter\@gobble + \string\%\string~n\string + \end{theglossary}\string\glossarypostamble + \string~n\string" ^^J\space\space\space + :tree)}% + \write\glswrite{(markup-letter-group-list + :sep \string"\string\glsgroupskip\string~n\string")}% + \write\glswrite{(markup-indexentry + :open \string"\string\relax \string\glsresetentrylist + \string~n\string")}% + \write\glswrite{(markup-locclass-list :open + \string"\glsopenbrace\string\glossaryentrynumbers + \glsopenbrace\string\relax\space \string"^^J\space\space\space + :sep \string", \string" + :close \string"\glsclosebrace\glsclosebrace\string")}% + \write\glswrite{(markup-locref-list + :sep \string"\string\delimN\space\string")}% + \write\glswrite{(markup-range + :sep \string"\string\delimR\space\string")}% + \@onelevel@sanitize\gls@suffixF + \@onelevel@sanitize\gls@suffixFF + \ifx\gls@suffixF\@empty + \else + \write\glswrite{(markup-range + :close "\gls@suffixF" :length 1 :ignore-end)}% + \fi + \ifx\gls@suffixFF\@empty + \else + \write\glswrite{(markup-range + :close "\gls@suffixFF" :length 2 :ignore-end)}% + \fi + \write\glswrite{^^J; define format to use for locations^^J}% + \write\glswrite{\@xdylocref}% + \write\glswrite{^^J; define letter group list format^^J}% + \write\glswrite{(markup-letter-group-list + :sep \string"\string\glsgroupskip\string~n\string")}% + \write\glswrite{^^J; letter group headings^^J}% + \write\glswrite{(markup-letter-group + :open-head \string"\string\glsgroupheading + \glsopenbrace\string"^^J\space\space\space + :close-head \string"\glsclosebrace\string")}% + \write\glswrite{^^J; additional letter groups^^J}% + \write\glswrite{\@xdylettergroups}% + \write\glswrite{^^J; additional sort rules^^J} + \write\glswrite{\@xdysortrules}% + \noist} +\else + \edef\@gls@actualchar{\string?} + \edef\@gls@encapchar{\string|} + \edef\@gls@levelchar{\string!} + \edef\@gls@quotechar{\string"} + \def\writeist{\relax + \openout\glswrite=\istfilename + \write\glswrite{\expandafter\@gobble\string\% makeindex style file + created by the glossaries package} + \write\glswrite{\expandafter\@gobble\string\% for document + '\jobname' on \the\year-\the\month-\the\day} + \write\glswrite{actual '\@gls@actualchar'} + \write\glswrite{encap '\@gls@encapchar'} + \write\glswrite{level '\@gls@levelchar'} + \write\glswrite{quote '\@gls@quotechar'} + \write\glswrite{keyword \string"\string\\glossaryentry\string"} + \write\glswrite{preamble \string"\string\\glossarysection[\string + \\glossarytoctitle]{\string\\glossarytitle}\string + \\glossarypreamble\string\n\string\\begin{theglossary}\string + \\glossaryheader\string\n\string"} + \write\glswrite{postamble \string"\string\%\string\n\string + \\end{theglossary}\string\\glossarypostamble\string\n + \string"} + \write\glswrite{group_skip \string"\string\\glsgroupskip\string\n + \string"} + \write\glswrite{item_0 \string"\string\%\string\n\string"} + \write\glswrite{item_1 \string"\string\%\string\n\string"} + \write\glswrite{item_2 \string"\string\%\string\n\string"} + \write\glswrite{item_01 \string"\string\%\string\n\string"} + \write\glswrite{item_x1 + \string"\string\\relax \string\\glsresetentrylist\string\n + \string"} + \write\glswrite{item_12 \string"\string\%\string\n\string"} + \write\glswrite{item_x2 + \string"\string\\relax \string\\glsresetentrylist\string\n + \string"} + \write\glswrite{delim_0 \string"\string\{\string + \\glossaryentrynumbers\string\{\string\\relax \string"} + \write\glswrite{delim_1 \string"\string\{\string + \\glossaryentrynumbers\string\{\string\\relax \string"} + \write\glswrite{delim_2 \string"\string\{\string + \\glossaryentrynumbers\string\{\string\\relax \string"} + \write\glswrite{delim_t \string"\string\}\string\}\string"} + \write\glswrite{delim_n \string"\string\\delimN \string"} + \write\glswrite{delim_r \string"\string\\delimR \string"} + \write\glswrite{headings_flag 1} + \write\glswrite{heading_prefix + \string"\string\\glsgroupheading\string\{\string"} + \write\glswrite{heading_suffix + \string"\string\}\string\\relax + \string\\glsresetentrylist \string"} + \write\glswrite{symhead_positive \string"glssymbols\string"} + \write\glswrite{numhead_positive \string"glsnumbers\string"} + \write\glswrite{page_compositor \string"\glscompositor\string"} + \@gls@escbsdq\gls@suffixF + \@gls@escbsdq\gls@suffixFF + \ifx\gls@suffixF\@empty + \else + \write\glswrite{suffix_2p \string"\gls@suffixF\string"} + \fi + \ifx\gls@suffixFF\@empty + \else + \write\glswrite{suffix_3p \string"\gls@suffixFF\string"} + \fi + \noist + } +\fi +\renewcommand*{\noist}{\let\writeist\relax} +\endinput +%% +%% End of file `glossaries-compatible-207.sty'. diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-polyglossia.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-polyglossia.sty index 370d530b711..a92f5411d54 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-polyglossia.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-polyglossia.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-polyglossia.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty index 7d8714a0042..76d7739d757 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,16 +39,18 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2010/07/10 v2.07 (NLCT)] +\ProvidesPackage{glossaries}[2011/04/02 v3.0 (NLCT)] \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} \RequirePackage{xfor} \RequirePackage{amsgen} +\RequirePackage{etoolbox} \define@boolkey{glossaries.sty}[gls]{toc}[true]{} \define@boolkey{glossaries.sty}[gls]{numberline}[true]{} -\@ifundefined{chapter}{\newcommand*{\@@glossarysec}{section}}{% - \newcommand*{\@@glossarysec}{chapter}} +\ifcsundef{chapter}% + {\newcommand*{\@@glossarysec}{section}}% + {\newcommand*{\@@glossarysec}{chapter}} \define@choicekey{glossaries.sty}{section}{part,chapter,section,% subsection,subsubsection,paragraph,subparagraph}[section]{% \renewcommand*{\@@glossarysec}{#1}} @@ -75,6 +77,12 @@ false,nolabel,autolabel}[nolabel]{% \newcommand*{\glossaryentrynumbers}[1]{#1} \DeclareOptionX{nonumberlist}{% \renewcommand*{\glossaryentrynumbers}[1]{}} +\newcommand*\@glo@seeautonumberlist{} +\DeclareOptionX{seeautonumberlist}{% + \renewcommand*{\@glo@seeautonumberlist}{% + \def\@glo@prefix{\glsnextpages}% + }% +} \newcommand*{\@gls@loadlong}{\RequirePackage{glossary-long}} \DeclareOptionX{nolong}{\renewcommand*{\@gls@loadlong}{}} \IfFileExists{supertabular.sty}{% @@ -92,6 +100,81 @@ false,nolabel,autolabel}[nolabel]{% \renewcommand*{\@gls@loadtree}{}% \let\@glossary@default@style\relax } +\define@boolkey{glossaries.sty}[gls]{entrycounter}[true]{} +\glsentrycounterfalse +\define@key{glossaries.sty}{counterwithin}{% + \renewcommand*{\@gls@counterwithin}{#1}% + \glsentrycountertrue +} +\newcommand*{\@gls@counterwithin}{} +\define@boolkey{glossaries.sty}[gls]{subentrycounter}[true]{} +\glssubentrycounterfalse +\define@choicekey{glossaries.sty}{sort}{standard,def,use}{% + \csname @gls@setupsort@#1\endcsname +} +\newcommand*{\@gls@setupsort@standard}{% + \def\do@glo@storeentry{\@glo@storeentry}% + \def\@gls@defsortcount##1{}% + \def\@gls@defsort##1##2{% + \ifx\@glo@sort\@glsdefaultsort + \let\@glo@sort\@glo@name + \fi + \@onelevel@sanitize\@glo@sort + \expandafter\protected@xdef\csname glo@##2@sort\endcsname{\@glo@sort}% + }% + \def\@gls@setsort##1{}% +} +\@gls@setupsort@standard +\newcommand*\glssortnumberfmt[1]{% + \ifnum#1<100000 0\fi + \ifnum#1<10000 0\fi + \ifnum#1<1000 0\fi + \ifnum#1<100 0\fi + \ifnum#1<10 0\fi + \number#1% +} +\newcommand*{\@gls@setupsort@def}{% + \def\do@glo@storeentry{\@glo@storeentry}% + \def\@gls@defsortcount##1{% + \expandafter\global + \expandafter\newcount\csname glossary@##1@sortcount\endcsname + }% + \def\@gls@defsort##1##2{% + \expandafter\global\expandafter + \advance\csname glossary@##1@sortcount\endcsname by 1\relax + \expandafter\protected@xdef\csname glo@##2@sort\endcsname{% + \expandafter\glssortnumberfmt + {\csname glossary@##1@sortcount\endcsname}}% + }% + \def\@gls@setsort##1{}% +} +\newcommand*{\@gls@setupsort@use}{% + \let\do@glo@storeentry\@gobble + \def\@gls@defsortcount##1{% + \expandafter\global + \expandafter\newcount\csname glossary@##1@sortcount\endcsname + }% + \def\@gls@defsort##1##2{% + \expandafter\gdef\csname glo@##2@sort\endcsname{}% + }% + \def\@gls@setsort##1{% + \edef\@glo@parent{\csname glo@##1@parent\endcsname}% + \ifx\@glo@parent\@empty + \else + \expandafter\@gls@setsort\expandafter{\@glo@parent}% + \fi + \edef\@glo@type{\csname glo@##1@type\endcsname}% + \edef\@gls@tmp{\csname glo@##1@sort\endcsname}% + \ifx\@gls@tmp\@empty + \expandafter\global\expandafter + \advance\csname glossary@\@glo@type @sortcount\endcsname by 1\relax + \expandafter\protected@xdef\csname glo@##1@sort\endcsname{% + \expandafter\glssortnumberfmt + {\csname glossary@\@glo@type @sortcount\endcsname}}% + \@glo@storeentry{##1}% + \fi + }% +} \newcommand*{\glsdefmain}{% \newglossary{main}{gls}{glo}{\glossaryname}% } @@ -211,7 +294,7 @@ name=true]{% \gls@xindy@glsnumberstrue \def\@xdy@main@language{\rootlanguagename}% \define@key[gls]{xindy}{language}{\def\@xdy@main@language{#1}} -\@ifundefined{inputencodingname}{% +\ifcsundef{inputencodingname}{% \def\gls@codepage{}}{% \def\gls@codepage{\inputencodingname} } @@ -220,6 +303,8 @@ name=true]{% \glsxindytrue \setkeys[gls]{xindy}{#1}% } +\define@boolkey{glossaries.sty}[gls]{savewrites}[true]{} +\glssavewritesfalse \newcommand*{\GlossariesWarning}[1]{% \PackageWarning{glossaries}{#1}% } @@ -230,16 +315,23 @@ name=true]{% \renewcommand*{\GlossariesWarning}[1]{}% \renewcommand*{\GlossariesWarningNoLine}[1]{}% } +\define@boolkey{glossaries.sty}[gls]{compatible-2.07}[true]{} +\csname glscompatible-2.07false\endcsname \ProcessOptionsX \ifglstranslate \@ifpackageloaded{babel}{\IfFileExists{translator.sty}{% \RequirePackage{translator}}{}}{} \fi -\ifthenelse{\equal{\glscounter}{section}}{% -\@ifundefined{chapter}{}{% -\let\@gls@old@chapter\@chapter -\def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}% -\@ifundefined{hyperdef}{}{\hyperdef{section}{\thesection}{}}}}}{} +\ifthenelse{\equal{\glscounter}{section}}% +{% + \ifcsundef{chapter}{}% + {% + \let\@gls@old@chapter\@chapter + \def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}% + \ifcsundef{hyperdef}{}{\hyperdef{section}{\thesection}{}}}% + }% +}% +{} \newcommand*{\@gls@onlypremakeg}{} \newcommand*{\@onlypremakeg}[1]{% \ifx\@gls@onlypremakeg\@empty @@ -271,7 +363,8 @@ name=true]{% \providecommand*{\seename}{see} \providecommand*{\andname}{\&} \newcommand*{\addglossarytocaptions}[1]{% - \@ifundefined{captions#1}{}{% + \ifcsundef{captions#1}{}% + {% \expandafter\let\expandafter\@gls@tmp\csname captions#1\endcsname \expandafter\toks@\expandafter{\@gls@tmp \renewcommand*{\glossaryname}{\translate{Glossary}}% @@ -380,23 +473,35 @@ name=true]{% \@onlypremakeg\glsSetSuffixF \newcommand*{\gls@suffixFF}{} \newcommand*{\glsSetSuffixFF}[1]{% - \renewcommand*{\gls@suffixFF}{#1}} -\@ifundefined{hyperlink}{% -\newcommand*{\glsnumberformat}[1]{#1}}{% -\newcommand*{\glsnumberformat}[1]{\glshypernumber{#1}}} + \renewcommand*{\gls@suffixFF}{#1}% +} +\ifcsdef{hyperlink}% +{% + \newcommand*{\glsnumberformat}[1]{#1}% +}% +{% + \newcommand*{\glsnumberformat}[1]{\glshypernumber{#1}}% +} \newcommand{\delimN}{, } \newcommand{\delimR}{--} \newcommand*{\glossarypreamble}{} \newcommand*{\glossarypostamble}{} \newcommand*{\glossarysection}[2][\@gls@title]{% \def\@gls@title{#2}% - \@ifundefined{phantomsection}{% - \@glossarysection{#1}{#2}}{\@p@glossarysection{#1}{#2}}% + \ifcsundef{phantomsection}% + {% + \@glossarysection{#1}{#2}% + }% + {% + \@p@glossarysection{#1}{#2}% + }% \glossarymark{\glossarytoctitle}% } -\@ifundefined{glossarymark}{% +\ifcsundef{glossarymark}% +{% \newcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} -}{% +}% +{% \GlossariesWarning{overriding \string\glossarymark}% \@ifclassloaded{memoir}% { @@ -429,8 +534,11 @@ name=true]{% \fi \@@glossaryseclabel} \newcommand*{\gls@doclearpage}{% -\ifthenelse{\equal{\@@glossarysec}{chapter}}{% -\@ifundefined{cleardoublepage}{\clearpage}{\cleardoublepage}}{}% + \ifthenelse{\equal{\@@glossarysec}{chapter}}% + {% + \ifcsundef{cleardoublepage}{\clearpage}{\cleardoublepage}% + }% + {}% } \newcommand*{\glsclearpage}{\gls@doclearpage} \newcommand*{\@gls@toc}[2]{% @@ -447,27 +555,86 @@ name=true]{% \ifglsxindy \edef\@xdyattributes{\string"default\string"}% \fi +\ifglsxindy + \edef\@xdyattributelist{}% +\fi \ifglsxindy \def\@xdylocref{} \fi +\newcommand*{\@gls@ifinlist}[4]{% + \def\@do@ifinlist##1,#1,##2\end@doifinlist{% + \def\@gls@listsuffix{##2}% + \ifx\@gls@listsuffix\@empty + #4% + \else + #3% + \fi + }% + \@do@ifinlist,#2,#1,\end@doifinlist +} +\ifglsxindy + \newcommand*{\@xdycounters}{\glscounter} + \newcommand*\GlsAddXdyCounters[1]{% + \@for\@gls@ctr:=#1\do{% + \edef\@do@addcounter{% + \noexpand\@gls@ifinlist{\@gls@ctr}{\@xdycounters}{}% + {% + \noexpand\edef\noexpand\@xdycounters{\@xdycounters,% + \noexpand\@gls@ctr}% + }% + }% + \@do@addcounter + } + } + \@onlypremakeg\GlsAddXdyCounters +\else + \newcommand*\GlsAddXdyCounters[1]{% + \glsnoxindywarning\GlsAddXdyAttribute + } +\fi +\newcommand*\@disabled@glsaddxdycounters{% + \PackageError{glossaries}{\string\GlsAddXdyCounters\space + can't be used after \string\GlsAddXdyAttribute}{Move all + occurrences of \string\GlsAddXdyCounters\space before the first + instance of \string\GlsAddXdyAttribute}% +} \ifglsxindy + \newcommand*\@glsaddxdyattribute[2]{% + \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string" ^^J + \string"#2#1\string"}% + \expandafter\toks@\expandafter{\@xdylocref}% + \edef\@xdylocref{\the\toks@ ^^J% + (markup-locref + :open \string"\string~n% + \expandafter\string\csname glsX#2X#1\endcsname + \string" ^^J + :close \string"\string" ^^J + :attr \string"#2#1\string")}% + \expandafter\gdef\csname glsX#2X#1\endcsname##1##2{% + \setentrycounter[##1]{#2}\csname #1\endcsname{##2}% + }% + } \newcommand*\GlsAddXdyAttribute[1]{% - \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string"}% - \expandafter\toks@\expandafter{\@xdylocref}% - \edef\@xdylocref{\the\toks@ ^^J% - (markup-locref - :open \string"\string~n\string\setentrycounter - {\noexpand\glscounter}% - \expandafter\string\csname#1\endcsname - \expandafter\@gobble\string\{\string" ^^J - :close \string"\expandafter\@gobble\string\}\string" ^^J - :attr \string"#1\string")}} + \ifx\@xdyattributelist\@empty + \edef\@xdyattributelist{#1}% + \else + \edef\@xdyattributelist{\@xdyattributelist,#1}% + \fi + \@for\@this@counter:=\@xdycounters\do{% + \protected@edef\gls@do@addxdyattribute{% + \noexpand\@glsaddxdyattribute{#1}{\@this@counter}% + } + \gls@do@addxdyattribute + }% + \let\GlsAddXdyCounters\@disabled@glsaddxdycounters + } \@onlypremakeg\GlsAddXdyAttribute \else \newcommand*\GlsAddXdyAttribute[1]{% \glsnoxindywarning\GlsAddXdyAttribute} \fi \ifglsxindy +\newcommand*{\@gls@addpredefinedattributes}{% \GlsAddXdyAttribute{glsnumberformat} \GlsAddXdyAttribute{textrm} \GlsAddXdyAttribute{textsf} @@ -490,6 +657,9 @@ name=true]{% \GlsAddXdyAttribute{hypersl} \GlsAddXdyAttribute{hypersc} \GlsAddXdyAttribute{hyperemph} +} +\else + \let\@gls@addpredefinedattributes\relax \fi \def\@xdyuseralphabets{} \ifglsxindy @@ -501,15 +671,78 @@ name=true]{% \newcommand*{\GlsAddXdyAlphabet}[2]{% \glsnoxindywarning\GlsAddXdyAlphabet} \fi -\def\@xdyuserlocationdefs{} -\def\@xdyuserlocationnames{} \ifglsxindy - \newcommand*{\GlsAddXdyLocation}[2]{% - \edef\@xdyuserlocationdefs{% - \@xdyuserlocationdefs ^^J% - (define-location-class \string"#1\string"^^J\space\space - \space(#2)) - }% + \newcommand*{\@gls@xdy@locationlist}{% + roman-page-numbers,% + Roman-page-numbers,% + arabic-page-numbers,% + alpha-page-numbers,% + Alpha-page-numbers,% + Appendix-page-numbers,% + arabic-section-numbers% + } + \protected@edef\@gls@roman{\@roman{0\string" + \string"roman-numbers-lowercase\string" :sep \string"}}% + \@onelevel@sanitize\@gls@roman + \edef\@tmp{\string" \string"roman-numbers-lowercase\string" + :sep \string"}% + \@onelevel@sanitize\@tmp + \ifx\@tmp\@gls@roman + \expandafter + \edef\csname @gls@xdy@Lclass@roman-page-numbers\endcsname{% + \string"roman-numbers-lowercase\string"% + }% + \else + \expandafter + \edef\csname @gls@xdy@Lclass@roman-page-numbers\endcsname{ + :sep \string"\@gls@roman\string"% + }% + \fi + \expandafter\def\csname @gls@xdy@Lclass@Roman-page-numbers\endcsname{% + \string"roman-numbers-uppercase\string"% + }% + \expandafter\def\csname @gls@xdy@Lclass@arabic-page-numbers\endcsname{% + \string"arabic-numbers\string"% + }% + \expandafter\def\csname @gls@xdy@Lclass@alpha-page-numbers\endcsname{% + \string"alpha\string"% + }% + \expandafter\def\csname @gls@xdy@Lclass@Alpha-page-numbers\endcsname{% + \string"ALPHA\string"% + }% + \expandafter\def\csname @gls@xdy@Lclass@Appendix-page-numbers\endcsname{% + \string"ALPHA\string" + :sep \string"\@glsAlphacompositor\string" + \string"arabic-numbers\string"% + } + \expandafter\def\csname @gls@xdy@Lclass@arabic-section-numbers\endcsname{% + \string"arabic-numbers\string" + :sep \string"\glscompositor\string" + \string"arabic-numbers\string"% + }% + \def\@xdyuserlocationdefs{} + \def\@xdyuserlocationnames{} +\fi +\ifglsxindy + \newcommand*{\GlsAddXdyLocation}[3][]{% + \def\@gls@tmp{#1}% + \ifx\@gls@tmp\@empty + \edef\@xdyuserlocationdefs{% + \@xdyuserlocationdefs ^^J% + (define-location-class \string"#2\string"^^J\space\space + \space(:sep \string"{}\glsopenbrace\string" #3 + :sep \string"\glsclosebrace\string")) + }% + \else + \edef\@xdyuserlocationdefs{% + \@xdyuserlocationdefs ^^J% + (define-location-class \string"#2\string"^^J\space\space + \space(:sep "\glsopenbrace" + #1 + :sep "\glsclosebrace\glsopenbrace" #3 + :sep "\glsclosebrace")) + }% + \fi \edef\@xdyuserlocationnames{% \@xdyuserlocationnames^^J\space\space\space \string"#1\string"}% @@ -650,10 +883,11 @@ name=true]{% \expandafter\forallglossaries\expandafter[#1]{\@@this@glo@}{% \forglsentries[\@@this@glo@]{#2}{#3}}} \newcommand{\ifglossaryexists}[3]{% - \@ifundefined{@glotype@#1@out}{#3}{#2}% + \ifcsundef{@glotype@#1@out}{#3}{#2}% } \newcommand{\ifglsentryexists}[3]{% -\@ifundefined{glo@#1@name}{#3}{#2}} + \ifcsundef{glo@#1@name}{#3}{#2}% +} \newcommand*{\ifglsused}[3]{\ifthenelse{\boolean{glo@#1@flag}}{#2}{#3}} \newcommand{\glsdoifexists}[2]{% \ifglsentryexists{#1}{#2}{% @@ -682,14 +916,22 @@ name=true]{% \expandafter\def\csname @glotype@#2@out\endcsname{#4}% \expandafter\def\csname @glotype@#2@title\endcsname{#5}% \protected@write\@auxout{}{\string\@newglossary{#2}{#1}{#3}{#4}}% - \@ifundefined{gls@#2@display}{% - \expandafter\gdef\csname gls@#2@display\endcsname{% - \glsdisplay}}{}% - \@ifundefined{gls@#2@displayfirst}{% - \expandafter\gdef\csname gls@#2@displayfirst\endcsname{% - \glsdisplayfirst}}{}% + \ifcsundef{gls@#2@display}% + {% + \expandafter\gdef\csname gls@#2@display\endcsname{\glsdisplay}% + }% + {}% + \ifcsundef{gls@#2@displayfirst}% + {% + \expandafter\gdef\csname gls@#2@displayfirst\endcsname{% + \glsdisplayfirst + }% + }% + {}% + \@gls@defsortcount{#2}% \@ifnextchar[{\@gls@setcounter{#2}}% - {\@gls@setcounter{#2}[\glscounter]}}} + {\@gls@setcounter{#2}[\glscounter]}}% +} \newcommand*{\altnewglossary}[3]{% \newglossary[#2-glg]{#1}{#2-gls}{#2-glo}{#3}% } @@ -697,7 +939,10 @@ name=true]{% \@onlypremakeg\newglossary \newcommand*{\@newglossary}[4]{} \def\@gls@setcounter#1[#2]{% -\expandafter\def\csname @glotype@#1@counter\endcsname{#2}% + \expandafter\def\csname @glotype@#1@counter\endcsname{#2}% + \ifglsxindy + \GlsAddXdyCounters{#2}% + \fi } \newcommand*{\@gls@getcounter}[1]{% \csname @glotype@#1@counter\endcsname} @@ -734,16 +979,32 @@ name=true]{% \define@key{glossentry}{type}{% \def\@glo@type{#1}} \define@key{glossentry}{counter}{% -\@ifundefined{c@#1}{\PackageError{glossaries}{There is no counter -called `#1'}{The counter key should have the name of a valid -counter as its value}}{% -\def\@glo@counter{#1}}} + \ifcsundef{c@#1}% + {% + \PackageError{glossaries}% + {There is no counter called `#1'}% + {% + The counter key should have the name of a valid counter + as its value% + }% + }% + {% + \def\@glo@counter{#1}% + }% +} \define@key{glossentry}{see}{% -\def\@glo@see{#1}} + \def\@glo@see{#1}% + \@glo@seeautonumberlist +} \define@key{glossentry}{parent}{% \def\@glo@parent{#1}} -\define@key{glossentry}{nonumberlist}[none]{% -\def\@glo@prefix{\glsnonextpages}} +\define@choicekey{glossentry}{nonumberlist}[\val\nr]{true,false}[true]{% + \ifcase\nr\relax + \def\@glo@prefix{\glsnonextpages}% + \else + \def\@glo@prefix{\glsnextpages}% + \fi +} \define@key{glossentry}{user1}{% \def\@glo@useri{#1}% } @@ -762,6 +1023,18 @@ counter as its value}}{% \define@key{glossentry}{user6}{% \def\@glo@uservi{#1}% } +\define@key{glossentry}{short}{% + \def\@glo@short{#1}% +} +\define@key{glossentry}{shortplural}{% + \def\@glo@shortpl{#1}% +} +\define@key{glossentry}{long}{% + \def\@glo@long{#1}% +} +\define@key{glossentry}{longplural}{% + \def\@glo@longpl{#1}% +} \newcommand*{\@glsnoname}{% \PackageError{glossaries}{name key required in \string\newglossaryentry\space for entry `\@glo@label'}{You @@ -769,7 +1042,7 @@ counter as its value}}{% \newcommand*{\@glsdefaultplural}{\@glo@text\glspluralsuffix} \newcommand*{\@glsdefaultsort}{\@glo@name} \newcount\gls@level -\DeclareRobustCommand{\newglossaryentry}[2]{% +\newrobustcmd{\newglossaryentry}[2]{% \glsdoifnoexists{#1}{% \def\@glo@label{#1}% \let\@glo@name\@glsnoname @@ -794,14 +1067,22 @@ counter as its value}}{% \def\@glo@useriv{}% \def\@glo@userv{}% \def\@glo@uservi{}% +\def\@glo@short{}% +\def\@glo@shortpl{}% +\def\@glo@long{}% +\def\@glo@longpl{}% \@newglossaryentryprehook \setkeys{glossentry}{#2}% -\@ifundefined{glolist@\@glo@type}{\PackageError{glossaries}{% -Glossary type '\@glo@type' has not been defined}{% -You need to define a new glossary type, before making entries -in it}}{% -\protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% -\expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% +\ifcsundef{glolist@\@glo@type}% +{% + \PackageError{glossaries}% + {Glossary type '\@glo@type' has not been defined}% + {You need to define a new glossary type, before making entries + in it}% +}% +{% + \protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% + \expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% }% \gls@level=0\relax \ifx\@glo@parent\@empty @@ -870,6 +1151,14 @@ in it}}{% \protected@xdef\csname glo@#1@userv\endcsname{\@glo@userv}% \expandafter \protected@xdef\csname glo@#1@uservi\endcsname{\@glo@uservi}% +\expandafter + \protected@xdef\csname glo@#1@short\endcsname{\@glo@short}% +\expandafter + \protected@xdef\csname glo@#1@shortpl\endcsname{\@glo@shortpl}% +\expandafter + \protected@xdef\csname glo@#1@long\endcsname{\@glo@long}% +\expandafter + \protected@xdef\csname glo@#1@longpl\endcsname{\@glo@longpl}% \@gls@sanitizename \expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}% \def\@glo@@desc{\@glo@first}% @@ -879,11 +1168,7 @@ in it}}{% \@gls@sanitizedesc \expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}% \expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}% -\ifx\@glo@sort\@glsdefaultsort - \let\@glo@sort\@glo@name -\fi -\@onelevel@sanitize\@glo@sort -\expandafter\protected@xdef\csname glo@#1@sort\endcsname{\@glo@sort}% +\@gls@defsort{\@glo@type}{#1}% \def\@glo@@symbol{\@glo@text}% \ifx\@glo@symbol\@glo@@symbol \let\@glo@symbol\@glo@text @@ -907,7 +1192,7 @@ in it}}{% \@do@glssee \fi }% - \@glo@storeentry{#1}% + \do@glo@storeentry{#1}% \@newglossaryentryposthook } \newcommand*{\@newglossaryentryprehook}{} @@ -1012,10 +1297,19 @@ in it}}{% \newcommand*{\defglsdisplayfirst}[2][\glsdefaulttype]{% \expandafter\def\csname gls@#1@displayfirst\endcsname##1##2##3##4{#2}} \define@key{glslink}{counter}{% -\@ifundefined{c@#1}{\PackageError{glossaries}{There is no counter -called `#1'}{The counter key should have the name of a valid -counter as its value}}{% -\def\@gls@counter{#1}}} + \ifcsundef{c@#1}% + {% + \PackageError{glossaries}% + {There is no counter called `#1'}% + {% + The counter key should have the name of a valid counter + as its value% + }% + }% + {% + \def\@gls@counter{#1}% + }% +} \define@key{glslink}{format}{% \def\@glsnumberformat{#1}} \define@boolkey{glslink}{hyper}[true]{} @@ -1040,8 +1334,8 @@ counter as its value}}{% \edef\@gls@counter{\csname glo@#2@counter\endcsname}% \KV@glslink@hypertrue \setkeys{glslink}{#1}% - \edef\theglsentrycounter{\expandafter\noexpand - \csname the\@gls@counter\endcsname}% + \@gls@saveentrycounter + \@gls@setsort{#2}% \@do@wrglossary{#2}% \ifKV@glslink@hyper \@glslink{glo:#2}{\glstextformat{#3}}% @@ -1049,11 +1343,58 @@ counter as its value}}{% \glstextformat{#3}\relax \fi } -\def\@set@glo@numformat#1#2#3{% -\expandafter\@glo@check@mkidxrangechar#3\@nil -\protected@edef#1{\@glo@prefix setentrycounter{#2}% -\expandafter\string\csname\@glo@suffix\endcsname}% -\@gls@checkmkidxchars#1} +\newcommand*{\@gls@saveentrycounter}{% + \def\@gls@Hcounter{}% + \ifthenelse{\equal{\@gls@counter}{equation}}% + { + \ifcsundef{xatlevel@}% + {% + \edef\theglsentrycounter{\expandafter\noexpand + \csname the\@gls@counter\endcsname}% + }% + {% + \ifx\xatlevel@\@empty + \edef\theglsentrycounter{\expandafter\noexpand + \csname the\@gls@counter\endcsname}% + \else + \savecounters@ + \advance\c@equation by 1\relax + \edef\theglsentrycounter{\csname the\@gls@counter\endcsname}% + \ifcsundef{theH\@gls@counter}% + {% + \def\@gls@Hcounter{\theglsentrycounter}% + }% + {% + \def\@gls@Hcounter{\csname theH\@gls@counter\endcsname}% + }% + \protected@edef\theHglsentrycounter{\@gls@Hcounter}% + \restorecounters@ + \fi + }% + }% + {% + \edef\theglsentrycounter{\expandafter\noexpand + \csname the\@gls@counter\endcsname}% + }% + \ifx\@gls@Hcounter\@empty + \ifcsundef{theH\@gls@counter}% + {% + \def\theHglsentrycounter{\theglsentrycounter}% + }% + {% + \protected@edef\theHglsentrycounter{\expandafter\noexpand + \csname theH\@gls@counter\endcsname}% + }% + \fi +} +\def\@set@glo@numformat#1#2#3#4{% + \expandafter\@glo@check@mkidxrangechar#3\@nil + \protected@edef#1{% + \@glo@prefix setentrycounter[#4]{#2}% + \expandafter\string\csname\@glo@suffix\endcsname + }% + \@gls@checkmkidxchars#1% +} \def\@glo@check@mkidxrangechar#1#2\@nil{% \if#1(\relax \def\@glo@prefix{(}% @@ -1356,18 +1697,23 @@ counter as its value}}{% }% } \def@gls@xdycheckbackslash -\@ifundefined{hyperlink}{% +\ifcsundef{hyperlink}% +{% \gdef\@glslink#1#2{#2}% -}{% +}% +{% \gdef\@glslink#1#2{\hyperlink{#1}{#2}}% } \newlength\gls@tmplen -\@ifundefined{hypertarget}{% +\ifcsundef{hypertarget}% +{% \gdef\@glstarget#1#2{#2}% -}{% - \gdef\@glstarget#1#2{% +}% +{% + \gdef\@glstarget#1#2{% \settoheight{\gls@tmplen}{#2}% - \raisebox{\gls@tmplen}{\hypertarget{#1}{}}#2}% + \raisebox{\gls@tmplen}{\hypertarget{#1}{}}#2% + }% } \newcommand{\glsdisablehyper}{% \renewcommand*\@glslink[2]{##2}% @@ -2076,6 +2422,210 @@ counter as its value}}{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } +\newcommand*{\acrshort}{\@ifstar\s@acrshort\ns@acrshort} +\newcommand*{\s@acrshort}[2][]{% + \new@ifnextchar[{\@acrshort{hyper=false,#1}{#2}}% + {\@acrshort{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@acrshort}[2][]{% + \new@ifnextchar[{\@acrshort{#1}{#2}}{\@acrshort{#1}{#2}[]}% +} +\def\@acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentryshort{#2}}% + \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% + }% +} +\newcommand*{\Acrshort}{\@ifstar\s@Acrshort\ns@Acrshort} +\newcommand*{\s@Acrshort}[2][]{% + \new@ifnextchar[{\@Acrshort{hyper=false,#1}{#2}}% + {\@Acrshort{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@Acrshort}[2][]{% + \new@ifnextchar[{\@Acrshort{#1}{#2}}{\@Acrshort{#1}{#2}[]}% +} +\def\@Acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentryshort{#2}}% + \@gls@link[#1]{#2}% + {% + \acronymfont{\expandafter\makefirstuc\expandafter{\@glo@text}}#3% + }% + }% +} +\newcommand*{\ACRshort}{\@ifstar\s@ACRshort\ns@ACRshort} +\newcommand*{\s@ACRshort}[2][]{% + \new@ifnextchar[{\@ACRshort{hyper=false,#1}{#2}}% + {\@ACRshort{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@ACRshort}[2][]{% + \new@ifnextchar[{\@ACRshort{#1}{#2}}{\@ACRshort{#1}{#2}[]}% +} +\def\@ACRshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentryshort{#2}}% + \@gls@link[#1]{#2}{\acronymfont{\MakeUppercase{\@glo@text#3}}}% + }% +} +\newcommand*{\acrshortpl}{\@ifstar\s@acrshortpl\ns@acrshortpl} +\newcommand*{\s@acrshortpl}[2][]{% + \new@ifnextchar[{\@acrshortpl{hyper=false,#1}{#2}}% + {\@acrshortpl{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@acrshortpl}[2][]{% + \new@ifnextchar[{\@acrshortpl{#1}{#2}}{\@acrshortpl{#1}{#2}[]}% +} +\def\@acrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentryshortpl{#2}}% + \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% + }% +} +\newcommand*{\Acrshortpl}{\@ifstar\s@Acrshortpl\ns@Acrshortpl} +\newcommand*{\s@Acrshortpl}[2][]{% + \new@ifnextchar[{\@Acrshortpl{hyper=false,#1}{#2}}% + {\@Acrshortpl{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@Acrshortpl}[2][]{% + \new@ifnextchar[{\@Acrshortpl{#1}{#2}}{\@Acrshortpl{#1}{#2}[]}% +} +\def\@Acrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentryshortpl{#2}}% + \@gls@link[#1]{#2}% + {% + \acronymfont{\expandafter\makefirstuc\expandafter{\@glo@text}}#3% + }% + }% +} +\newcommand*{\ACRshortpl}{\@ifstar\s@ACRshortpl\ns@ACRshortpl} +\newcommand*{\s@ACRshortpl}[2][]{% + \new@ifnextchar[{\@ACRshortpl{hyper=false,#1}{#2}}% + {\@ACRshortpl{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@ACRshortpl}[2][]{% + \new@ifnextchar[{\@ACRshortpl{#1}{#2}}{\@ACRshortpl{#1}{#2}[]}% +} +\def\@ACRshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentryshortpl{#2}}% + \@gls@link[#1]{#2}{\acronymfont{\MakeUppercase{\@glo@text#3}}}% + }% +} +\newcommand*{\acrlong}{\@ifstar\s@acrlong\ns@acrlong} +\newcommand*{\s@acrlong}[2][]{% + \new@ifnextchar[{\@acrlong{hyper=false,#1}{#2}}% + {\@acrlong{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@acrlong}[2][]{% + \new@ifnextchar[{\@acrlong{#1}{#2}}{\@acrlong{#1}{#2}[]}% +} +\def\@acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentrylong{#2}}% + \@gls@link[#1]{#2}{\@glo@text#3}% + }% +} +\newcommand*{\Acrlong}{\@ifstar\s@Acrlong\ns@Acrlong} +\newcommand*{\s@Acrlong}[2][]{% + \new@ifnextchar[{\@Acrlong{hyper=false,#1}{#2}}% + {\@Acrlong{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@Acrlong}[2][]{% + \new@ifnextchar[{\@Acrlong{#1}{#2}}{\@Acrlong{#1}{#2}[]}% +} +\def\@Acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentrylong{#2}}% + \@gls@link[#1]{#2}% + {% + \expandafter\makefirstuc\expandafter{\@glo@text}#3% + }% + }% +} +\newcommand*{\ACRlong}{\@ifstar\s@ACRlong\ns@ACRlong} +\newcommand*{\s@ACRlong}[2][]{% + \new@ifnextchar[{\@ACRlong{hyper=false,#1}{#2}}% + {\@ACRlong{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@ACRlong}[2][]{% + \new@ifnextchar[{\@ACRlong{#1}{#2}}{\@ACRlong{#1}{#2}[]}% +} +\def\@ACRlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentrylong{#2}}% + \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% + }% +} +\newcommand*{\acrlongpl}{\@ifstar\s@acrlongpl\ns@acrlongpl} +\newcommand*{\s@acrlongpl}[2][]{% + \new@ifnextchar[{\@acrlongpl{hyper=false,#1}{#2}}% + {\@acrlongpl{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@acrlongpl}[2][]{% + \new@ifnextchar[{\@acrlongpl{#1}{#2}}{\@acrlongpl{#1}{#2}[]}% +} +\def\@acrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentrylongpl{#2}}% + \@gls@link[#1]{#2}{\@glo@text#3}% + }% +} +\newcommand*{\Acrlongpl}{\@ifstar\s@Acrlongpl\ns@Acrlongpl} +\newcommand*{\s@Acrlongpl}[2][]{% + \new@ifnextchar[{\@Acrlongpl{hyper=false#1}{#2}}% + {\@Acrlongpl{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@Acrlongpl}[2][]{% + \new@ifnextchar[{\@Acrlongpl{#1}{#2}}{\@Acrlongpl{#1}{#2}[]}% +} +\def\@Acrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentrylongpl{#2}}% + \@gls@link[#1]{#2}% + {% + \expandafter\makefirstuc\expandafter{\@glo@text}#3% + }% + }% +} +\newcommand*{\ACRlongpl}{\@ifstar\s@ACRlongpl\ns@ACRlongpl} +\newcommand*{\s@ACRlongpl}[2][]{% + \new@ifnextchar[{\@ACRlongpl{hyper=false,#1}{#2}}% + {\@ACRlongpl{hyper=false,#1}{#2}[]}% +} +\newcommand*{\ns@ACRlongpl}[2][]{% + \new@ifnextchar[{\@ACRlongpl{#1}{#2}}{\@ACRlongpl{#1}{#2}[]}% +} +\def\@ACRlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \protected@edef\@glo@text{\glsentrylongpl{#2}}% + \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% + }% +} \newcommand*{\glsentryname}[1]{\csname glo@#1@name\endcsname} \newcommand*{\Glsentryname}[1]{% \protected@edef\@glo@text{\csname glo@#1@name\endcsname}% @@ -2141,21 +2691,50 @@ counter as its value}}{% \newcommand*{\Glsentryuservi}[1]{% \protected@edef\@glo@text{\csname glo@#1@uservi\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} -\newcommand*{\glshyperlink}[2][\glsentryname{\@glo@label}]{% +\newcommand*{\glsentryshort}[1]{\csname glo@#1@short\endcsname} +\newcommand*{\Glsentryshort}[1]{% +\protected@edef\@glo@text{\csname glo@#1@short\endcsname}% +\expandafter\makefirstuc\expandafter{\@glo@text}} +\newcommand*{\glsentryshortpl}[1]{\csname glo@#1@shortpl\endcsname} +\newcommand*{\Glsentryshortpl}[1]{% +\protected@edef\@glo@text{\csname glo@#1@shortpl\endcsname}% +\expandafter\makefirstuc\expandafter{\@glo@text}} +\newcommand*{\glsentrylong}[1]{\csname glo@#1@long\endcsname} +\newcommand*{\Glsentrylong}[1]{% +\protected@edef\@glo@text{\csname glo@#1@long\endcsname}% +\expandafter\makefirstuc\expandafter{\@glo@text}} +\newcommand*{\glsentrylongpl}[1]{\csname glo@#1@longpl\endcsname} +\newcommand*{\Glsentrylongpl}[1]{% +\protected@edef\@glo@text{\csname glo@#1@longpl\endcsname}% +\expandafter\makefirstuc\expandafter{\@glo@text}} +\newcommand*{\glsentryfull}[1]{% + \glsentrylong{#1}\space(\glsentryshort{#1})% +} +\newcommand*{\Glsentryfull}[1]{% + \Glsentrylong{#1}\space(\glsentryshort{#1})% +} +\newcommand*{\glsentryfullpl}[1]{% + \glsentrylongpl{#1}\space(\glsentryshort{#1})% +} +\newcommand*{\Glsentryfullpl}[1]{% + \Glsentrylongpl{#1}\space(\glsentryshort{#1})% +} +\newcommand*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{% \def\@glo@label{#2}% \@glslink{glo:#2}{#1}} \define@key{glossadd}{counter}{\def\@gls@counter{#1}} \define@key{glossadd}{format}{\def\@glsnumberformat{#1}} \define@key{glossadd}{types}{\def\@glo@type{#1}} \newcommand*{\glsadd}[2][]{% -\glsdoifexists{#2}{% -\def\@glsnumberformat{glsnumberformat}% -\edef\@gls@counter{\csname glo@#2@counter\endcsname}% -\setkeys{glossadd}{#1}% -\edef\theglsentrycounter{\expandafter\noexpand - \csname the\@gls@counter\endcsname}% -\@do@wrglossary{#2}% -}} + \glsdoifexists{#2}% + {% + \def\@glsnumberformat{glsnumberformat}% + \edef\@gls@counter{\csname glo@#2@counter\endcsname}% + \setkeys{glossadd}{#1}% + \@gls@saveentrycounter + \@do@wrglossary{#2}% + }% +} \newcommand*{\glsaddall}[1][]{% \edef\@glo@type{\@glo@types}% \setkeys{glossadd}{#1}% @@ -2183,217 +2762,240 @@ counter as its value}}{% \newcommand*{\GlsSetXdyMinRangeLength}[1]{% \glsnoxindywarning\GlsSetXdyMinRangeLength} \fi -\newwrite\istfile + \ifglsxindy \def\writeist{% - \openout\istfile=\istfilename - \write\istfile{;; xindy style file created by the glossaries - package}% - \write\istfile{;; for document '\jobname' on - \the\year-\the\month-\the\day}% - \write\istfile{^^J; required styles^^J} + \@gls@addpredefinedattributes + \openout\glswrite=\istfilename + \write\glswrite{;; xindy style file created by the glossaries + package}% + \write\glswrite{;; for document '\jobname' on + \the\year-\the\month-\the\day}% + \write\glswrite{^^J; required styles^^J} \@for\@xdystyle:=\@xdyrequiredstyles\do{% - \ifx\@xdystyle\@empty - \else - \protected@write\istfile{}{(require - \string"\@xdystyle.xdy\string")}% - \fi + \ifx\@xdystyle\@empty + \else + \protected@write\glswrite{}{(require + \string"\@xdystyle.xdy\string")}% + \fi }% - \write\istfile{^^J% + \write\glswrite{^^J% ; list of allowed attributes (number formats)^^J}% - \write\istfile{(define-attributes ((\@xdyattributes)))}% - \write\istfile{^^J; user defined alphabets^^J}% - \write\istfile{\@xdyuseralphabets}% - \write\istfile{^^J; location class definitions^^J}% - \protected@edef\@gls@roman{\@roman{0\string" - \string"roman-numbers-lowercase\string" :sep \string"}}% - \@onelevel@sanitize\@gls@roman - \edef\@tmp{\string" \string"roman-numbers-lowercase\string" - :sep \string"}% - \@onelevel@sanitize\@tmp - \ifx\@tmp\@gls@roman - \write\istfile{(define-location-class - \string"roman-page-numbers\string"^^J\space\space\space - (\string"roman-numbers-lowercase\string") - :min-range-length \@glsminrange)}% - \else - \write\istfile{(define-location-class - \string"roman-page-numbers\string"^^J\space\space\space - (:sep "\@gls@roman") - :min-range-length \@glsminrange)}% - \fi - \write\istfile{(define-location-class - \string"Roman-page-numbers\string"^^J\space\space\space - (\string"roman-numbers-uppercase\string") - :min-range-length \@glsminrange)}% - \write\istfile{(define-location-class - \string"arabic-page-numbers\string"^^J\space\space\space - (\string"arabic-numbers\string") - :min-range-length \@glsminrange)}% - \write\istfile{(define-location-class - \string"alpha-page-numbers\string"^^J\space\space\space - (\string"alpha\string") - :min-range-length \@glsminrange)}% - \write\istfile{(define-location-class - \string"Alpha-page-numbers\string"^^J\space\space\space - (\string"ALPHA\string") - :min-range-length \@glsminrange)}% - \write\istfile{(define-location-class - \string"Appendix-page-numbers\string"^^J\space\space\space - (\string"ALPHA\string" - :sep \string"\@glsAlphacompositor\string" - \string"arabic-numbers\string") - :min-range-length \@glsminrange)}% - \write\istfile{(define-location-class - \string"arabic-section-numbers\string"^^J\space\space\space - (\string"arabic-numbers\string" - :sep \string"\glscompositor\string" - \string"arabic-numbers\string") - :min-range-length \@glsminrange)}% - \write\istfile{^^J; user defined location classes}% - \write\istfile{\@xdyuserlocationdefs}% - \write\istfile{^^J; define cross-reference class^^J}% - \write\istfile{(define-crossref-class \string"see\string" - :unverified )}% - \write\istfile{(markup-crossref-list - :class \string"see\string"^^J\space\space\space - :open \string"\string\glsseeformat\string" - :close \string"{}\string")}% - \write\istfile{^^J; define the order of the location classes}% - \write\istfile{(define-location-class-order - (\@xdylocationclassorder))}% - \write\istfile{^^J; define the glossary markup^^J}% - \write\istfile{(markup-index^^J\space\space\space - :open \string"\string - \glossarysection[\string\glossarytoctitle]{\string - \glossarytitle}\string\glossarypreamble\string~n\string\begin - {theglossary}\string\glossaryheader\string~n\string" ^^J\space - \space\space:close \string"\expandafter\@gobble - \string\%\string~n\string - \end{theglossary}\string\glossarypostamble - \string~n\string" ^^J\space\space\space - :tree)}% - \write\istfile{(markup-letter-group-list - :sep \string"\string\glsgroupskip\string~n\string")}% - \write\istfile{(markup-indexentry - :open \string"\string\relax \string\glsresetentrylist - \string~n\string")}% - \write\istfile{(markup-locclass-list :open - \string"\glsopenbrace\string\glossaryentrynumbers - \glsopenbrace\string\relax\space \string"^^J\space\space\space - :sep \string", \string" - :close \string"\glsclosebrace\glsclosebrace\string")}% - \write\istfile{(markup-locref-list - :sep \string"\string\delimN\space\string")}% - \write\istfile{(markup-range - :sep \string"\string\delimR\space\string")}% + \write\glswrite{(define-attributes ((\@xdyattributes)))}% + \write\glswrite{^^J; user defined alphabets^^J}% + \write\glswrite{\@xdyuseralphabets}% + \write\glswrite{^^J; location class definitions^^J}% + \@for\@gls@classI:=\@gls@xdy@locationlist\do{% + \protected@write\glswrite{}{(define-location-class + \string"\@gls@classI\string"^^J\space\space\space + ( + :sep "{}{" + \csname @gls@xdy@Lclass@\@gls@classI\endcsname\space + :sep "}" + ) + ^^J\space\space\space + :min-range-length \@glsminrange^^J% + ) + }% + {% + \@for\@gls@classII:=\@gls@xdy@locationlist\do{% + \protected@write\glswrite{}{(define-location-class + \string"\@gls@classII-\@gls@classI\string" + ^^J\space\space\space + ( + :sep "{" + \csname @gls@xdy@Lclass@\@gls@classII\endcsname\space + :sep "}{" + \csname @gls@xdy@Lclass@\@gls@classI\endcsname\space + :sep "}" + ) + ^^J\space\space\space + :min-range-length \@glsminrange^^J% + ) + }% + }% + }% + }% + \write\glswrite{^^J; user defined location classes}% + \write\glswrite{\@xdyuserlocationdefs}% + \write\glswrite{^^J; define cross-reference class^^J}% + \write\glswrite{(define-crossref-class \string"see\string" + :unverified )}% + \write\glswrite{(markup-crossref-list + :class \string"see\string"^^J\space\space\space + :open \string"\string\glsseeformat\string" + :close \string"{}\string")}% + \write\glswrite{^^J; define the order of the location classes}% + \write\glswrite{(define-location-class-order + (\@xdylocationclassorder))}% + \write\glswrite{^^J; define the glossary markup^^J}% + \write\glswrite{(markup-index^^J\space\space\space + :open \string"\string + \glossarysection[\string\glossarytoctitle]{\string + \glossarytitle}\string\glossarypreamble}% + \@for\@this@ctr:=\@xdycounters\do{% + {% + \@for\@this@attr:=\@xdyattributelist\do{% + \protected@write\glswrite{}{\string\providecommand*% + \expandafter\string + \csname glsX\@this@ctr X\@this@attr\endcsname[2]% + {% + \string\setentrycounter + [\expandafter\@gobble\string\#1]{\@this@ctr}% + \expandafter\string + \csname\@this@attr\endcsname + {\expandafter\@gobble\string\#2}% + }% + }% + }% + }% + }% + \write\glswrite{% + \string\begin + {theglossary}\string\glossaryheader\string~n\string" ^^J\space + \space\space:close \string"\expandafter\@gobble + \string\%\string~n\string + \end{theglossary}\string\glossarypostamble + \string~n\string" ^^J\space\space\space + :tree)}% + \write\glswrite{(markup-letter-group-list + :sep \string"\string\glsgroupskip\string~n\string")}% + \write\glswrite{(markup-indexentry + :open \string"\string\relax \string\glsresetentrylist + \string~n\string")}% + \write\glswrite{(markup-locclass-list :open + \string"\glsopenbrace\string\glossaryentrynumbers + \glsopenbrace\string\relax\space \string"^^J\space\space\space + :sep \string", \string" + :close \string"\glsclosebrace\glsclosebrace\string")}% + \write\glswrite{(markup-locref-list + :sep \string"\string\delimN\space\string")}% + \write\glswrite{(markup-range + :sep \string"\string\delimR\space\string")}% \@onelevel@sanitize\gls@suffixF \@onelevel@sanitize\gls@suffixFF \ifx\gls@suffixF\@empty \else - \write\istfile{(markup-range - :close "\gls@suffixF" :length 1 :ignore-end)}% + \write\glswrite{(markup-range + :close "\gls@suffixF" :length 1 :ignore-end)}% \fi \ifx\gls@suffixFF\@empty \else - \write\istfile{(markup-range - :close "\gls@suffixFF" :length 2 :ignore-end)}% + \write\glswrite{(markup-range + :close "\gls@suffixFF" :length 2 :ignore-end)}% \fi - \write\istfile{^^J; define format to use for locations^^J}% - \write\istfile{\@xdylocref}% - \write\istfile{^^J; define letter group list format^^J}% - \write\istfile{(markup-letter-group-list - :sep \string"\string\glsgroupskip\string~n\string")}% - \write\istfile{^^J; letter group headings^^J}% - \write\istfile{(markup-letter-group - :open-head \string"\string\glsgroupheading - \glsopenbrace\string"^^J\space\space\space - :close-head \string"\glsclosebrace\string")}% - \write\istfile{^^J; additional letter groups^^J}% - \write\istfile{\@xdylettergroups}% - \write\istfile{^^J; additional sort rules^^J} - \write\istfile{\@xdysortrules}% - \noist} + \write\glswrite{^^J; define format to use for locations^^J}% + \write\glswrite{\@xdylocref}% + \write\glswrite{^^J; define letter group list format^^J}% + \write\glswrite{(markup-letter-group-list + :sep \string"\string\glsgroupskip\string~n\string")}% + \write\glswrite{^^J; letter group headings^^J}% + \write\glswrite{(markup-letter-group + :open-head \string"\string\glsgroupheading + \glsopenbrace\string"^^J\space\space\space + :close-head \string"\glsclosebrace\string")}% + \write\glswrite{^^J; additional letter groups^^J}% + \write\glswrite{\@xdylettergroups}% + \write\glswrite{^^J; additional sort rules^^J} + \write\glswrite{\@xdysortrules}% + \closeout\glswrite + \let\writeist\relax + } \else \edef\@gls@actualchar{\string?} \edef\@gls@encapchar{\string|} \edef\@gls@levelchar{\string!} \edef\@gls@quotechar{\string"} \def\writeist{\relax - \openout\istfile=\istfilename - \write\istfile{\expandafter\@gobble\string\% makeindex style file + \openout\glswrite=\istfilename + \write\glswrite{\expandafter\@gobble\string\% makeindex style file created by the glossaries package} - \write\istfile{\expandafter\@gobble\string\% for document + \write\glswrite{\expandafter\@gobble\string\% for document '\jobname' on \the\year-\the\month-\the\day} - \write\istfile{actual '\@gls@actualchar'} - \write\istfile{encap '\@gls@encapchar'} - \write\istfile{level '\@gls@levelchar'} - \write\istfile{quote '\@gls@quotechar'} - \write\istfile{keyword \string"\string\\glossaryentry\string"} - \write\istfile{preamble \string"\string\\glossarysection[\string + \write\glswrite{actual '\@gls@actualchar'} + \write\glswrite{encap '\@gls@encapchar'} + \write\glswrite{level '\@gls@levelchar'} + \write\glswrite{quote '\@gls@quotechar'} + \write\glswrite{keyword \string"\string\\glossaryentry\string"} + \write\glswrite{preamble \string"\string\\glossarysection[\string \\glossarytoctitle]{\string\\glossarytitle}\string \\glossarypreamble\string\n\string\\begin{theglossary}\string \\glossaryheader\string\n\string"} - \write\istfile{postamble \string"\string\%\string\n\string + \write\glswrite{postamble \string"\string\%\string\n\string \\end{theglossary}\string\\glossarypostamble\string\n \string"} - \write\istfile{group_skip \string"\string\\glsgroupskip\string\n + \write\glswrite{group_skip \string"\string\\glsgroupskip\string\n \string"} - \write\istfile{item_0 \string"\string\%\string\n\string"} - \write\istfile{item_1 \string"\string\%\string\n\string"} - \write\istfile{item_2 \string"\string\%\string\n\string"} - \write\istfile{item_01 \string"\string\%\string\n\string"} - \write\istfile{item_x1 + \write\glswrite{item_0 \string"\string\%\string\n\string"} + \write\glswrite{item_1 \string"\string\%\string\n\string"} + \write\glswrite{item_2 \string"\string\%\string\n\string"} + \write\glswrite{item_01 \string"\string\%\string\n\string"} + \write\glswrite{item_x1 \string"\string\\relax \string\\glsresetentrylist\string\n \string"} - \write\istfile{item_12 \string"\string\%\string\n\string"} - \write\istfile{item_x2 + \write\glswrite{item_12 \string"\string\%\string\n\string"} + \write\glswrite{item_x2 \string"\string\\relax \string\\glsresetentrylist\string\n \string"} - \write\istfile{delim_0 \string"\string\{\string + \write\glswrite{delim_0 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} - \write\istfile{delim_1 \string"\string\{\string + \write\glswrite{delim_1 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} - \write\istfile{delim_2 \string"\string\{\string + \write\glswrite{delim_2 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} - \write\istfile{delim_t \string"\string\}\string\}\string"} - \write\istfile{delim_n \string"\string\\delimN \string"} - \write\istfile{delim_r \string"\string\\delimR \string"} - \write\istfile{headings_flag 1} - \write\istfile{heading_prefix + \write\glswrite{delim_t \string"\string\}\string\}\string"} + \write\glswrite{delim_n \string"\string\\delimN \string"} + \write\glswrite{delim_r \string"\string\\delimR \string"} + \write\glswrite{headings_flag 1} + \write\glswrite{heading_prefix \string"\string\\glsgroupheading\string\{\string"} - \write\istfile{heading_suffix + \write\glswrite{heading_suffix \string"\string\}\string\\relax \string\\glsresetentrylist \string"} - \write\istfile{symhead_positive \string"glssymbols\string"} - \write\istfile{numhead_positive \string"glsnumbers\string"} - \write\istfile{page_compositor \string"\glscompositor\string"} + \write\glswrite{symhead_positive \string"glssymbols\string"} + \write\glswrite{numhead_positive \string"glsnumbers\string"} + \write\glswrite{page_compositor \string"\glscompositor\string"} \@gls@escbsdq\gls@suffixF \@gls@escbsdq\gls@suffixFF \ifx\gls@suffixF\@empty \else - \write\istfile{suffix_2p \string"\gls@suffixF\string"} + \write\glswrite{suffix_2p \string"\gls@suffixF\string"} \fi \ifx\gls@suffixFF\@empty \else - \write\istfile{suffix_3p \string"\gls@suffixFF\string"} + \write\glswrite{suffix_3p \string"\gls@suffixFF\string"} \fi - \noist + \closeout\glswrite + \let\writeist\relax } \fi -\newcommand{\noist}{\let\writeist\relax} +\newcommand{\noist}{% + \@gls@addpredefinedattributes + \let\writeist\relax +} \newcommand*{\@makeglossary}[1]{% -\ifglossaryexists{#1}{% -\edef\glo@out{\csname @glotype@#1@out\endcsname}% -\expandafter\newwrite\csname glo@#1@file\endcsname -\edef\@glo@file{\csname glo@#1@file\endcsname}% -\immediate\openout\@glo@file=\jobname.\glo@out -\@gls@renewglossary -\PackageInfo{glossaries}{Writing glossary file \jobname.\glo@out} -\writeist -}{\PackageError{glossaries}{% -Glossary type `#1' not defined}{New glossaries must be defined before -using \string\makeglossary}}} + \ifglossaryexists{#1}% + {% + \ifglssavewrites + \expandafter\newtoks\csname glo@#1@filetok\endcsname + \else + \expandafter\newwrite\csname glo@#1@file\endcsname + \expandafter\@glsopenfile\csname glo@#1@file\endcsname{#1}% + \fi + \@gls@renewglossary + \writeist + }% + {% + \PackageError{glossaries}% + {Glossary type `#1' not defined}% + {New glossaries must be defined before using \string\makeglossary}% + }% +} +\newcommand*{\@glsopenfile}[2]{% + \immediate\openout#1=\jobname.\csname @glotype@#2@out\endcsname + \PackageInfo{glossaries}{Writing glossary file + \jobname.\csname @glotype@#2@out\endcsname}% +} \newcommand*{\warn@nomakeglossaries}{% \GlossariesWarningNoLine{\string\makeglossaries\space hasn't been used,^^Jthe glossaries will not be updated}% @@ -2421,18 +3023,53 @@ using \string\makeglossary}}} \warn@nomakeglossaries \warn@noprintglossary } +\newwrite\glswrite +\def\istfile{\glswrite} +\AtEndDocument{% + \glswritefiles +} +\ifglssavewrites + \newcommand*{\glswritefiles}{% + \forallglossaries{\@glo@type}{% + \@glsopenfile{\glswrite}{\@glo@type}% + \immediate\write\glswrite{% + \expandafter\the\csname glo@\@glo@type @filetok\endcsname}% + \immediate\closeout\glswrite + }% + } +\else + \let\glswritefiles\relax +\fi \renewcommand*{\glossary}[1][\glsdefaulttype]{% \@glossary[#1]} \def\@glossary[#1]{\index} \newcommand{\@gls@renewglossary}{% -\gdef\@glossary[##1]{\@bsphack\begingroup\@wrglossary{##1}}% -\let\@gls@renewglossary\@empty + \gdef\@glossary[##1]{\@bsphack\begingroup\@wrglossary{##1}}% + \let\@gls@renewglossary\@empty } \renewcommand*{\@wrglossary}[2]{% - \expandafter\protected@write\csname glo@#1@file\endcsname{}{#2}% + \ifglssavewrites + \protected@edef\@gls@tmp{\the\csname glo@#1@filetok\endcsname#2}% + \expandafter\global\expandafter\csname glo@#1@filetok\endcsname + \expandafter{\@gls@tmp^^J}% + \else + \expandafter\protected@write\csname glo@#1@file\endcsname{}{#2}% + \fi \endgroup\@esphack } \newcommand{\@do@wrglossary}[1]{% + \protected@edef\@glslocref{\theglsentrycounter}% + \@gls@checkmkidxchars\@glslocref + \expandafter\ifx\theHglsentrycounter\theglsentrycounter + \def\@glo@counterprefix{}% + \else + \protected@edef\@glsHlocref{\theHglsentrycounter}% + \@gls@checkmkidxchars\@glsHlocref + \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix + {\@glslocref}{\@glsHlocref}% + }% + \@do@gls@getcounterprefix + \fi \ifglsxindy \expandafter\@glo@check@mkidxrangechar\@glsnumberformat\@nil \def\@glo@range{}% @@ -2443,34 +3080,53 @@ using \string\makeglossary}}} \def\@glo@range{:close-range}% \fi \fi -\protected@edef\@glslocref{\theglsentrycounter}% -\@gls@checkmkidxchars\@glslocref \glossary[\csname glo@#1@type\endcsname]{% (indexentry :tkey (\csname glo@#1@index\endcsname) - :locref \string"\@glslocref\string" % - :attr \string"\@glo@suffix\string" \@glo@range + :locref \string"{\@glo@counterprefix}{\@glslocref}\string" % + :attr \string"\@gls@counter\@glo@suffix\string" + \@glo@range ) }% \else - \@set@glo@numformat\@glo@numfmt\@gls@counter\@glsnumberformat + \@set@glo@numformat{\@glo@numfmt}{\@gls@counter}{\@glsnumberformat}% + {\@glo@counterprefix}% \glossary[\csname glo@#1@type\endcsname]{% \string\glossaryentry{\csname glo@#1@index\endcsname \@gls@encapchar\@glo@numfmt}{\theglsentrycounter}}% \fi } +\newcommand*\@gls@getcounterprefix[2]{% + \edef\@gls@thisloc{#1}\edef\@gls@thisHloc{#2}% + \ifx\@gls@thisloc\@gls@thisHloc + \def\@glo@counterprefix{}% + \else + \def\@gls@get@counterprefix##1.#1##2\end@getprefix{% + \def\@glo@tmp{##2}% + \ifx\@glo@tmp\@empty + \def\@glo@counterprefix{}% + \else + \def\@glo@counterprefix{##1}% + \fi + }% + \@gls@get@counterprefix#2.#1\end@getprefix + \fi +} \newcommand{\@do@seeglossary}[2]{% +\def\@gls@xref{#2}% +\@onelevel@sanitize\@gls@xref +\@gls@checkmkidxchars\@gls@xref \ifglsxindy \glossary[\csname glo@#1@type\endcsname]{% (indexentry :tkey (\csname glo@#1@index\endcsname) - :xref (\string"#2\string") + :xref (\string"\@gls@xref\string") :attr \string"see\string" ) }% \else \glossary[\csname glo@#1@type\endcsname]{% \string\glossaryentry{\csname glo@#1@index\endcsname - \@gls@encapchar glsseeformat#2}{Z}}% + \@gls@encapchar glsseeformat\@gls@xref}{Z}}% \fi } \def\@gls@fixbraces#1#2#3\@nil{% @@ -2501,25 +3157,35 @@ using \string\makeglossary}}} } \newcommand*{\glsseelastsep}{\space\andname\space} \newcommand*{\glsseesep}{, } -\newcommand*{\glsseeitem}[1]{\glshyperlink{#1}} +\newcommand*{\glsseeitem}[1]{\glshyperlink[\glsseeitemformat{#1}]{#1}} +\newcommand*{\glsseeitemformat}[1]{\glsentrytext{#1}} \def\warn@noprintglossary{\GlossariesWarningNoLine{No \string\printglossary\space or \string\printglossaries\space found.^^JThis document will not have a glossary}} -\@ifundefined{printglossary}{}{% +\ifcsundef{printglossary}{}% +{% \GlossariesWarning{Overriding \string\printglossary}% - \let\printglossary\undefined + \undef\printglossary } \newcommand*{\printglossary}[1][type=\glsdefaulttype]{% \ifglsxindy\findrootlanguage\fi \def\@glo@type{\glsdefaulttype}% \def\glossarytitle{\csname @glotype@\@glo@type @title\endcsname}% + \let\org@glossarytitle\glossarytitle \def\@glossarystyle{}% \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% \let\@org@glossaryentrynumbers\glossaryentrynumbers \bgroup \setkeys{printgloss}{#1}% + \ifx\glossarytitle\org@glossarytitle + \else + \expandafter\let\csname @glotype@\@glo@type @title\endcsname + \glossarytitle + \fi + \let\currentglossary\@glo@type \let\org@glossaryentrynumbers\glossaryentrynumbers \let\glsnonextpages\@glsnonextpages + \let\glsnextpages\@glsnextpages \let\nopostdesc\@nopostdesc \gls@dotoctitle \@glossarystyle @@ -2528,10 +3194,12 @@ using \string\makeglossary}}} \IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}{}% {\null}% \ifglsxindy - \@ifundefined{@xdy@\@glo@type @language}{% + \ifcsundef{@xdy@\@glo@type @language}% + {% \protected@write\@auxout{}{% \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}% - }{% + }% + {% \protected@write\@auxout{}{% \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type @language\endcsname}}% @@ -2551,9 +3219,15 @@ using \string\makeglossary}}} \let\gls@dotoctitle\relax } \define@key{printgloss}{style}{% -\@ifundefined{@glsstyle@#1}{\PackageError{glossaries}{Glossary -style `#1' undefined}{}}{% -\def\@glossarystyle{\csname @glsstyle@#1\endcsname}}} + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries}% + {Glossary style `#1' undefined}{}% + }% + {% + \def\@glossarystyle{\csname @glsstyle@#1\endcsname}% + }% +} \define@choicekey{printgloss}{numberedsection}[\val\nr]{% false,nolabel,autolabel}[nolabel]{% \ifcase\nr\relax @@ -2575,12 +3249,91 @@ false,nolabel,autolabel}[nolabel]{% \newcommand*{\@glsnonextpages}{% \gdef\glossaryentrynumbers##1{% \glsresetentrylist}} +\newcommand*{\@glsnextpages}{% + \gdef\glossaryentrynumbers##1{% + ##1\glsresetentrylist}} \newcommand*{\glsresetentrylist}{% \global\let\glossaryentrynumbers\org@glossaryentrynumbers} \newcommand*{\glsnonextpages}{} -\@ifundefined{theglossary}{% +\newcommand*{\glsnextpages}{} +\ifglsentrycounter + \ifx\@gls@counterwithin\@empty + \newcounter{glossaryentry} + \else + \newcounter{glossaryentry}[\@gls@counterwithin] + \fi + \def\theHglossaryentry{\currentglossary.\theglossaryentry} +\fi +\ifglssubentrycounter + \ifglsentrycounter + \newcounter{glossarysubentry}[glossaryentry] + \else + \newcounter{glossarysubentry} + \fi + \def\theHglossarysubentry{\currentglssubentry.\theglossarysubentry} +\fi +\ifglssubentrycounter + \newcommand*{\glsresetsubentrycounter}{% + \setcounter{glossarysubentry}{0}% + } +\else + \newcommand*{\glsresetsubentrycounter}{} +\fi +\ifglsentrycounter + \newcommand*{\glsstepentry}[1]{% + \refstepcounter{glossaryentry}% + \label{glsentry-#1}% + } +\else + \newcommand*{\glsstepentry}[1]{} +\fi +\ifglssubentrycounter + \newcommand*{\glsstepsubentry}[1]{% + \def\currentglssubentry{#1}% + \refstepcounter{glossarysubentry}% + \label{glsentry-#1}% + } +\else + \newcommand*{\glsstepsubentry}[1]{} +\fi +\ifglsentrycounter + \newcommand*{\glsrefentry}[1]{\ref{glsentry-#1}} +\else + \ifglssubentrycounter + \newcommand*{\glsrefentry}[1]{\ref{glsentry-#1}} + \else + \newcommand*{\glsrefentry}[1]{\gls{#1}} + \fi +\fi +\ifglsentrycounter + \newcommand*{\glsentrycounterlabel}{\theglossaryentry.\space} +\else + \newcommand*{\glsentrycounterlabel}{} +\fi +\ifglssubentrycounter + \newcommand*{\glssubentrycounterlabel}{\theglossarysubentry)\space} +\else + \newcommand*{\glssubentrycounterlabel}{} +\fi +\ifglsentrycounter + \newcommand*{\glsentryitem}[1]{% + \glsstepentry{#1}\glsentrycounterlabel + } +\else + \newcommand*{\glsentryitem}[1]{\glsresetsubentrycounter} +\fi +\ifglssubentrycounter + \newcommand*{\glssubentryitem}[1]{% + \glsstepsubentry{#1}\glssubentrycounterlabel + } +\else + \newcommand*{\glssubentryitem}[1]{} +\fi +\ifcsundef{theglossary}% +{% \newenvironment{theglossary}{}{}% -}{% +}% +{% \GlossariesWarning{overriding `theglossary' environment}% \renewenvironment{theglossary}{}{}% } @@ -2593,24 +3346,46 @@ false,nolabel,autolabel}[nolabel]{% \newcommand*{\glsgroupskip}{} \newcommand*{\glsgroupheading}[1]{} \newcommand*{\glsgetgrouptitle}[1]{% -\@ifundefined{#1groupname}{#1}{\csname #1groupname\endcsname}} + \ifcsundef{#1groupname}{#1}{\csname #1groupname\endcsname}% +} \newcommand*{\glsgetgrouplabel}[1]{% \ifthenelse{\equals{#1}{\glssymbolsgroupname}}{glssymbols}{% \ifthenelse{\equals{#1}{\glsnumbersgroupname}}{glsnumbers}{#1}}} -\newcommand*{\setentrycounter}[1]{\def\glsentrycounter{#1}} +\newcommand*{\setentrycounter}[2][]{% + \def\@glo@counterprefix{#1}% + \ifx\@glo@counterprefix\@empty + \def\@glo@counterprefix{.}% + \else + \def\@glo@counterprefix{.#1.}% + \fi + \def\glsentrycounter{#2}% +} \newcommand*{\glossarystyle}[1]{% -\@ifundefined{@glsstyle@#1}{\PackageError{glossaries}{Glossary -style `#1' undefined}{}}{% -\csname @glsstyle@#1\endcsname}} + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries}{Glossary style `#1' undefined}{}% + }% + {% + \csname @glsstyle@#1\endcsname + }% +} \newcommand{\newglossarystyle}[2]{% -\@ifundefined{@glsstyle@#1}{% -\expandafter\def\csname @glsstyle@#1\endcsname{#2}}{% -\PackageError{glossaries}{Glossary style `#1' is already defined}{}}} + \ifcsundef{@glsstyle@#1}% + {% + \expandafter\def\csname @glsstyle@#1\endcsname{#2}% + }% + {% + \PackageError{glossaries}{Glossary style `#1' is already defined}{}% + }% +} \newcommand*{\glsnamefont}[1]{#1} -\@ifundefined{hyperlink}{% -\def\glshypernumber#1{#1}}{% -\def\glshypernumber#1{% - \@glshypernumber#1\nohyperpage{}\@nil}} +\ifcsundef{hyperlink}% +{% + \def\glshypernumber#1{#1}% +}% +{% + \def\glshypernumber#1{\@glshypernumber#1\nohyperpage{}\@nil} +} \def\@glshypernumber#1\nohyperpage#2#3\@nil{% \ifx\\#1\\% \else @@ -2650,7 +3425,8 @@ style `#1' undefined}{}}{% \edef\x{\the\toks@}% \ifx\x\empty \else - \hyperlink{\glsentrycounter.\the\toks@}{\the\toks@}% + \hyperlink{\glsentrycounter\@glo@counterprefix\the\toks@}% + {\the\toks@}% \fi \else \@gls@ReturnAfterFi{% @@ -2676,57 +3452,113 @@ style `#1' undefined}{}}{% \newcommand{\oldacronym}[4][\gls@label]{% \def\gls@label{#2}% \newacronym[#4]{#1}{#2}{#3}% - \@ifundefined{xspace}{% + \ifcsundef{xspace}% + {% \expandafter\edef\csname#1\endcsname{% - \noexpand\@ifstar{\noexpand\Gls{#1}}{\noexpand\gls{#1}}}% - }{% + \noexpand\@ifstar{\noexpand\Gls{#1}}{\noexpand\gls{#1}}% + }% + }% + {% \expandafter\edef\csname#1\endcsname{% \noexpand\@ifstar{\noexpand\Gls{#1}\noexpand\xspace}{% - \noexpand\gls{#1}\noexpand\xspace}}% + \noexpand\gls{#1}\noexpand\xspace}% + }% }% } \newcommand{\newacronym}[4][]{} \newcommand*{\acrpluralsuffix}{\glspluralsuffix} -\newcommand*{\glsshortkey}{text} -\newcommand*{\glsshortpluralkey}{plural} -\newcommand*{\glslongkey}{description} -\newcommand*{\glslongpluralkey}{descriptionplural} -\newcommand*{\acrshort}[2][]{% - \new@ifnextchar[{\@acrshort{#1}{#2}}{\@acrshort{#1}{#2}[]}} -\newcommand*{\Acrshort}[2][]{% - \new@ifnextchar[{\@Acrshort{#1}{#2}}{\@Acrshort{#1}{#2}[]}} -\newcommand*{\ACRshort}[2][]{% - \new@ifnextchar[{\@ACRshort{#1}{#2}}{\@ACRshort{#1}{#2}[]}} -\newcommand*{\acrshortpl}[2][]{% - \new@ifnextchar[{\@acrshortpl{#1}{#2}}{\@acrshortpl{#1}{#2}[]}} -\newcommand*{\Acrshortpl}[2][]{% - \new@ifnextchar[{\@Acrshortpl{#1}{#2}}{\@Acrshortpl{#1}{#2}[]}} -\newcommand*{\ACRshortpl}[2][]{% - \new@ifnextchar[{\@ACRshortpl{#1}{#2}}{\@ACRshortpl{#1}{#2}[]}} -\newcommand*{\acrlong}[2][]{% - \new@ifnextchar[{\@acrlong{#1}{#2}}{\@acrlong{#1}{#2}[]}} -\newcommand*{\Acrlong}[2][]{% - \new@ifnextchar[{\@Acrlong{#1}{#2}}{\@Acrlong{#1}{#2}[]}} -\newcommand*{\ACRlong}[2][]{% - \new@ifnextchar[{\@ACRlong{#1}{#2}}{\@ACRlong{#1}{#2}[]}} -\newcommand*{\acrlongpl}[2][]{% - \new@ifnextchar[{\@acrlongpl{#1}{#2}}{\@acrlongpl{#1}{#2}[]}} -\newcommand*{\Acrlongpl}[2][]{% - \new@ifnextchar[{\@Acrlongpl{#1}{#2}}{\@Acrlongpl{#1}{#2}[]}} -\newcommand*{\ACRlongpl}[2][]{% - \new@ifnextchar[{\@ACRlongpl{#1}{#2}}{\@ACRlongpl{#1}{#2}[]}} -\newcommand*{\acrfull}[2][]{% - \new@ifnextchar[{\@acrfull{#1}{#2}}{\@acrfull{#1}{#2}[]}} -\newcommand*{\Acrfull}[2][]{% - \new@ifnextchar[{\@Acrfull{#1}{#2}}{\@Acrfull{#1}{#2}[]}} -\newcommand*{\ACRfull}[2][]{% - \new@ifnextchar[{\@ACRfull{#1}{#2}}{\@ACRfull{#1}{#2}[]}} -\newcommand*{\acrfullpl}[2][]{% - \new@ifnextchar[{\@acrfullpl{#1}{#2}}{\@acrfullpl{#1}{#2}[]}} -\newcommand*{\Acrfullpl}[2][]{% - \new@ifnextchar[{\@Acrfullpl{#1}{#2}}{\@Acrfullpl{#1}{#2}[]}} -\newcommand*{\ACRfullpl}[2][]{% - \new@ifnextchar[{\@ACRfullpl{#1}{#2}}{\@ACRfullpl{#1}{#2}[]}} +\newcommand*{\glsshortkey}{short} +\newcommand*{\glsshortpluralkey}{shortplural} +\newcommand*{\glslongkey}{long} +\newcommand*{\glslongpluralkey}{longplural} +\newcommand*{\acrfull}{% + \@ifstar\s@acrfull\ns@acrfull +} +\newcommand*\s@acrfull[2][]{% + \new@ifnextchar[{\@acrfull{hyper=false,#1}{#2}}% + {\@acrfull{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@acrfull[2][]{% + \new@ifnextchar[{\@acrfull{#1}{#2}}% + {\@acrfull{#1}{#2}[]}% +} +\def\@acrfull#1#2[#3]{% + \acrlinkfullformat{\@acrlong}{\@acrshort}{#1}{#2}{#3}% +} +\newcommand{\acrlinkfullformat}[5]{% + \acrfullformat{#1{#3}{#4}[#5]}{#2{#3}{#4}[]}% +} +\newcommand{\acrfullformat}[2]{#1\space(\acronymfont{#2})} +\newcommand*{\Acrfull}{% + \@ifstar\s@Acrfull\ns@Acrfull +} +\newcommand*\s@Acrfull[2][]{% + \new@ifnextchar[{\@Acrfull{hyper=false,#1}{#2}}% + {\@Acrfull{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@Acrfull[2][]{% + \new@ifnextchar[{\@Acrfull{#1}{#2}}% + {\@Acrfull{#1}{#2}[]}% +} +\def\@Acrfull#1#2[#3]{% + \acrlinkfullformat{\@Acrlong}{\@acrshort}{#1}{#2}{#3}% +} +\newcommand*{\ACRfull}{% + \@ifstar\s@ACRfull\ns@ACRfull +} +\newcommand*\s@ACRfull[2][]{% + \new@ifnextchar[{\@ACRfull{hyper=false,#1}{#2}}% + {\@ACRfull{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@ACRfull[2][]{% + \new@ifnextchar[{\@ACRfull{#1}{#2}}% + {\@ACRfull{#1}{#2}[]}% +} +\def\@ACRfull#1#2[#3]{% + \acrlinkfullformat{\@ACRlong}{\@ACRshort}{#1}{#2}{#3}% +} +\newcommand*{\acrfullpl}{% + \@ifstar\s@acrfullpl\ns@acrfullpl +} +\newcommand*\s@acrfullpl[2][]{% + \new@ifnextchar[{\@acrfullpl{hyper=false,#1}{#2}}% + {\@acrfullpl{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@acrfullpl[2][]{% + \new@ifnextchar[{\@acrfullpl{#1}{#2}}% + {\@acrfullpl{#1}{#2}[]}% +} +\def\@acrfullpl#1#2[#3]{% + \acrlinkfullformat{\@acrlongpl}{\@acrshortpl}{#1}{#2}{#3}% +} +\newcommand*{\Acrfullpl}{% + \@ifstar\s@Acrfullpl\ns@Acrfullpl +} +\newcommand*\s@Acrfullpl[2][]{% + \new@ifnextchar[{\@Acrfullpl{hyper=false,#1}{#2}}% + {\@Acrfullpl{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@Acrfullpl[2][]{% + \new@ifnextchar[{\@Acrfullpl{#1}{#2}}% + {\@Acrfullpl{#1}{#2}[]}% +} +\def\@Acrfullpl#1#2[#3]{% + \acrlinkfullformat{\@Acrlong}{\@acrshort}{#1}{#2}{#3}% +} +\newcommand*{\ACRfullpl}{% + \@ifstar\s@ACRfullpl\ns@ACRfullpl +} +\newcommand*\s@ACRfullpl[2][]{% + \new@ifnextchar[{\@ACRfullpl{hyper=false,#1}{#2}}% + {\@ACRfullpl{hyper=false,#1}{#2}[]}% +} +\newcommand*\ns@ACRfullpl[2][]{% + \new@ifnextchar[{\@ACRfullpl{#1}{#2}}% + {\@ACRfullpl{#1}{#2}[]}% +} +\def\@ACRfullpl#1#2[#3]{% + \acrlinkfullformat{\@ACRlongpl}{\@ACRshortpl}{#1}{#2}{#3}% +} \newcommand{\acronymfont}[1]{#1} \newcommand{\firstacronymfont}[1]{\acronymfont{#1}} \newcommand*{\acrnameformat}[2]{\acronymfont{#1}} @@ -2745,14 +3577,18 @@ style `#1' undefined}{}}{% {% type=\acronymtype,% name={\the\glsshorttok},% - description={\the\glslongtok},% - text={\the\glsshorttok},% sort={\the\glsshorttok},% - descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% - first={\the\glslongtok\space(\the\glsshorttok)},% + text={\the\glsshorttok},% + first={\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% - firstplural={\noexpand\@glo@descplural\space - (\noexpand\@glo@plural)},% + firstplural={\acrfullformat{\noexpand\@glo@longpl}% + {\noexpand\@glo@shortpl}},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% + description={\the\glslongtok},% + descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok }% }% @@ -2777,34 +3613,20 @@ style `#1' undefined}{}}{% \DefaultNewAcronymDef }% \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% - \renewcommand*{\glsshortkey}{text}% - \renewcommand*{\glsshortpluralkey}{plural}% - \renewcommand*{\glslongkey}{description}% - \renewcommand*{\glslongpluralkey}{descriptionplural}% - \def\@acrshort##1##2[##3]{\@glstext@{##1}{##2}[##3]}% - \def\@Acrshort##1##2[##3]{\@Glstext@{##1}{##2}[##3]}% - \def\@ACRshort##1##2[##3]{\@GLStext@{##1}{##2}[##3]}% - \def\@acrshortpl##1##2[##3]{\@glsplural@{##1}{##2}[##3]}% - \def\@Acrshortpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3]}% - \def\@ACRshortpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3]}% - \def\@acrlong##1##2[##3]{\@glsdesc@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsdesc@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSdesc@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsdescplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSdescplural@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}% - \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}% - \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}% - \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}% - \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}% - \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}% +} +\newcommand*{\acrfootnote}[3]{\acrlinkfootnote{#1}{#2}{#3}} +\newcommand*{\acrlinkfootnote}[3]{% + \footnote{\glslink[#1]{#2}{#3}}% +} +\newcommand*{\acrnolinkfootnote}[3]{% + \footnote{#3}% } \newcommand*{\SetDescriptionFootnoteAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{% \firstacronymfont{##1}##4% - \protect\footnote{% - \glslink[\@gls@link@opts]{\@gls@link@label}{##3}}}% + \expandafter\protect\expandafter\acrfootnote\expandafter + {\@gls@link@opts}{\@gls@link@label}{##3} + }% \defglsdisplay[#1]{\acronymfont{##1}##4}% } \newcommand*{\DescriptionFootnoteNewAcronymDef}{% @@ -2816,6 +3638,10 @@ style `#1' undefined}{}}{% sort={\the\glsshorttok},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\the\glslongtok},% symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok @@ -2838,40 +3664,6 @@ style `#1' undefined}{}}{% \newacronymhook \DescriptionFootnoteNewAcronymDef }% - \def\glsshortkey{text}% - \def\glsshortpluralkey{plural}% - \def\glslongkey{symbol}% - \def\glslongpluralkey{symbolplural}% - \def\@acrshort##1##2[##3]{% - \acronymfont{\@glstext@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{% - \acronymfont{\@Glstext@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{% - \acronymfont{\@GLStext@{##1}{##2}[##3]}}% - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glsplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glsplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSplural@{##1}{##2}[##3]}}% - \def\@acrlong##1##2[##3]{\@glssymbol@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glssymbol@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glssymbol@{##1}{##2}[##3] - (\acronymfont{\@glstext@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glssymbol@{##1}{##2}[##3] - (\acronymfont{\@glstext@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3] - (\acronymfont{\@GLStext@{##1}{##2}[##3]})}% - \def\@acrfullpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3] - (\acronymfont{\@glsplural@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3] - (\acronymfont{\@glsplural@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3] - (\acronymfont{\@GLSplural@{##1}{##2}[##3]})}% \@for\@gls@type:=\@glsacronymlists\do{% \SetDescriptionFootnoteAcronymDisplayStyle{\@gls@type}% }% @@ -2902,6 +3694,10 @@ style `#1' undefined}{}}{% sort={\the\glslongtok}, text={\the\glslongtok},% plural={\the\glslongtok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\the\glsshorttok},% symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% \the\glskeylisttok @@ -2933,40 +3729,6 @@ style `#1' undefined}{}}{% \newacronymhook \DescriptionDUANewAcronymDef }% - \def\glsshortkey{symbol}% - \def\glsshortpluralkey{symbolplural}% - \def\glslongkey{first}% - \def\glslongpluralkey{plural}% - \def\@acrshort##1##2[##3]{% - \acronymfont{\@glssymbol@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{% - \acronymfont{\@Glssymbol@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{% - \acronymfont{\@GLSsymbol@{##1}{##2}[##3]}}% - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glssymbolplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glssymbolplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]}}% - \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}% - \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}% \@for\@gls@type:=\@glsacronymlists\do{% \SetDescriptionDUAAcronymDisplayStyle{\@gls@type}% }% @@ -2988,6 +3750,10 @@ style `#1' undefined}{}}{% firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\noexpand\@glo@text},% symbolplural={\noexpand\@glo@plural},% \the\glskeylisttok}% @@ -3009,40 +3775,6 @@ style `#1' undefined}{}}{% \newacronymhook \DescriptionNewAcronymDef }% - \def\glsshortkey{text}% - \def\glsshortpluralkey{plural}% - \def\glslongkey{first}% - \def\glslongpluralkey{firstplural}% - \def\@acrshort##1##2[##3]{% - \acronymfont{\@glstext@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{% - \acronymfont{\@Glstext@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{% - \acronymfont{\@GLStext@{##1}{##2}[##3]}}% - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glsplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glsplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSplural@{##1}{##2}[##3]}}% - \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}% - \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}% \@for\@gls@type:=\@glsacronymlists\do{% \SetDescriptionAcronymDisplayStyle{\@gls@type}% }% @@ -3058,9 +3790,10 @@ style `#1' undefined}{}}{% }% \newcommand*{\SetFootnoteAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{% - \firstacronymfont{##1}##4\protect\footnote{% - \protect\glslink - [\@gls@link@opts]{\@gls@link@label}{##2}}}% + \firstacronymfont{##1}##4% + \expandafter\protect\expandafter\acrfootnote\expandafter + {\@gls@link@opts}{\@gls@link@label}{##2}% + }% \defglsdisplay[#1]{\acronymfont{##1}##4}% } \newcommand*{\FootnoteNewAcronymDef}{% @@ -3072,6 +3805,10 @@ style `#1' undefined}{}}{% sort={\the\glsshorttok},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok @@ -3094,40 +3831,9 @@ style `#1' undefined}{}}{% \newacronymhook \FootnoteNewAcronymDef }% - \def\glsshortkey{text}% - \def\glsshortpluralkey{plural}% - \def\glslongkey{description}% - \def\glslongpluralkey{descriptionplural}% \@for\@gls@type:=\@glsacronymlists\do{% \SetFootnoteAcronymDisplayStyle{\@gls@type}% }% - \def\@acrshort##1##2[##3]{\acronymfont{\@glstext@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{\acronymfont{\@Glstext@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{\acronymfont{\@GLStext@{##1}{##2}[##3]}}% - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glsplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glsplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSplural@{##1}{##2}[##3]}}% - \def\@acrlong##1##2[##3]{\@glsdesc@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsdesc@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSdesc@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsdescplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSdescplural@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glsdesc@{##1}{##2}[##3] - (\@glstext@{##1}{##2}[##3])}% - \def\@Acrfull##1##2[##3]{\@Glsdesc@{##1}{##2}[##3] - (\@glstext@{##1}{##2}[##3])}% - \def\@ACRfull##1##2[##3]{\@GLSdesc@{##1}{##2}[##3] - (\@GLStext@{##1}{##2}[##3])}% - \def\@acrfullpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3] - (\@glsplural@{##1}{##2}[##3])}% - \def\@Acrfullpl##1##2[##3]{\@Glsdesctext@{##1}{##2}[##3] - (\@glsplural@{##1}{##2}[##3])}% - \def\@ACRfullpl##1##2[##3]{\@GLSdesctext@{##1}{##2}[##3] - (\@GLSplural@{##1}{##2}[##3])}% \ifglsacrsmallcaps \renewcommand*{\acronymfont}[1]{\textsc{##1}}% \renewcommand*{\acrpluralsuffix}{% @@ -3157,6 +3863,10 @@ style `#1' undefined}{}}{% plural={\noexpand\@glo@symbolplural},% first={\the\glslongtok},% firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\noexpand\@glo@first},% descriptionplural={\noexpand\@glo@firstplural},% symbol={\the\glsshorttok},% @@ -3181,10 +3891,6 @@ style `#1' undefined}{}}{% \newacronymhook \SmallNewAcronymDef }% - \def\glsshortkey{symbol}% - \def\glsshortpluralkey{symbolplural}% - \def\glslongkey{first}% - \def\glslongpluralkey{firstplural}% \@for\@gls@type:=\@glsacronymlists\do{% \SetSmallAcronymDisplayStyle{\@gls@type}% }% @@ -3195,36 +3901,6 @@ style `#1' undefined}{}}{% \else \renewcommand*{\acronymfont}[1]{\textsmaller{##1}} \fi - \def\@acrshort##1##2[##3]{% - \acronymfont{\@glstext@{##1}{##2}[##3]}}% - \def\@Acrshort##1##2[##3]{% - \acronymfont{\@Glstext@{##1}{##2}[##3]}}% - \def\@ACRshort##1##2[##3]{% - \acronymfont{\@GLStext@{##1}{##2}[##3]}}% - \def\@acrshortpl##1##2[##3]{% - \acronymfont{\@glsplural@{##1}{##2}[##3]}}% - \def\@Acrshortpl##1##2[##3]{% - \acronymfont{\@Glsplural@{##1}{##2}[##3]}}% - \def\@ACRshortpl##1##2[##3]{% - \acronymfont{\@GLSplural@{##1}{##2}[##3]}}% - \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glstext@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3] - (\acronymfont{\@glstext@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3] - (\acronymfont{\@GLStext@{##1}{##2}[##3]})}% - \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glsplural@{##1}{##2}[##3]})} - \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3] - (\acronymfont{\@glsplural@{##1}{##2}[##3]})} - \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3] - (\acronymfont{\@GLSplural@{##1}{##2}[##3]})} \ifglsacrdua \ifglsacrsmallcaps \PackageError{glossaries}{Option clash: `smallcaps' and `dua' @@ -3247,6 +3923,10 @@ style `#1' undefined}{}}{% name={\the\glsshorttok},% text={\the\glslongtok},% plural={\the\glslongtok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% symbol={\the\glsshorttok},% symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% @@ -3270,38 +3950,10 @@ style `#1' undefined}{}}{% \newacronymhook \DUANewAcronymDef }% - \def\glsshortkey{symbol}% - \def\glsshortpluralkey{symbolplural}% - \def\glslongkey{text}% - \def\glslongpluralkey{plural}% \@for\@gls@type:=\@glsacronymlists\do{% \SetDUADisplayStyle{\@gls@type}% }% - \def\@acrshort##1##2[##3]{\@glssymbol@{##1}{##2}[##3]}% - \def\@Acrshort##1##2[##3]{\@Glssymbol@{##1}{##2}[##3]}% - \def\@ACRshort##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3]}% - \def\@acrshortpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3]}% - \def\@Acrshortpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3]}% - \def\@ACRshortpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3]}% - \def\@acrlong##1##2[##3]{\@glstext@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glstext@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLStext@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glsplural@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glstext@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glstext@{##1}{##2}[##3] - (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLStext@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}% - \def\@acrfullpl##1##2[##3]{\@glsplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3] - (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3] - (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}% -}% +} \newcommand*{\SetAcronymStyle}{% \SetDefaultAcronymStyle \ifglsacrdescription @@ -3339,9 +3991,9 @@ style `#1' undefined}{}}{% \newcommand*{\CustomAcronymFields}{% name={\the\glsshorttok},% description={\the\glslongtok},% - first={\the\glslongtok\space(\the\glsshorttok)},% - firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space - (\the\glsshorttok)}% + first={\noexpand\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% + firstplural={\noexpand\acrfullformat + {\the\glslongtok\noexpand\acrpluralsuffix}{\the\glsshorttok}}% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix}% } @@ -3350,6 +4002,10 @@ style `#1' undefined}{}}{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% user1={\the\glsshorttok},% user2={\the\glsshorttok\noexpand\acrpluralsuffix},% user3={\the\glslongtok},% @@ -3375,38 +4031,10 @@ style `#1' undefined}{}}{% \newacronymhook \CustomNewAcronymDef }% - \def\glsshortkey{user1}% - \def\glsshortpluralkey{user2}% - \def\glslongkey{user3}% - \def\glslongpluralkey{user4}% \@for\@gls@type:=\@glsacronymlists\do{% \SetCustomDisplayStyle{\@gls@type}% }% - \def\@acrshort##1##2[##3]{\@glsuseri@{##1}{##2}[##3]}% - \def\@Acrshort##1##2[##3]{\@Glsuseri@{##1}{##2}[##3]}% - \def\@ACRshort##1##2[##3]{\@GLSuseri@{##1}{##2}[##3]}% - \def\@acrshortpl##1##2[##3]{\@glsuserii@{##1}{##2}[##3]}% - \def\@Acrshortpl##1##2[##3]{\@Glsuserii@{##1}{##2}[##3]}% - \def\@ACRshortpl##1##2[##3]{\@GLSuserii@{##1}{##2}[##3]}% - \def\@acrlong##1##2[##3]{\@glsuseriii@{##1}{##2}[##3]}% - \def\@Acrlong##1##2[##3]{\@Glsuseriii@{##1}{##2}[##3]}% - \def\@ACRlong##1##2[##3]{\@GLSuseriii@{##1}{##2}[##3]}% - \def\@acrlongpl##1##2[##3]{\@glsuseriv@{##1}{##2}[##3]}% - \def\@Acrlongpl##1##2[##3]{\@Glsuseriv@{##1}{##2}[##3]}% - \def\@ACRlongpl##1##2[##3]{\@GLSuseriv@{##1}{##2}[##3]}% - \def\@acrfull##1##2[##3]{\@glsuseriii@{##1}{##2}[##3] - (\acronymfont{\@glsuseri@{##1}{##2}[##3]})}% - \def\@Acrfull##1##2[##3]{\@Glsuseriii@{##1}{##2}[##3] - (\acronymfont{\@glsuseri@{##1}{##2}[##3]})}% - \def\@ACRfull##1##2[##3]{\@GLSuseriii@{##1}{##2}[##3] - (\acronymfont{\@GLSuseri@{##1}{##2}[##3]})}% - \def\@acrfullpl##1##2[##3]{\@glsuseriv@{##1}{##2}[##3] - (\acronymfont{\@glsuserii@{##1}{##2}[##3]})}% - \def\@Acrfullpl##1##2[##3]{\@Glsuseriv@{##1}{##2}[##3] - (\acronymfont{\@glsuserii@{##1}{##2}[##3]})}% - \def\@ACRfullpl##1##2[##3]{\@GLSuseriv@{##1}{##2}[##3] - (\acronymfont{\@GLSuserii@{##1}{##2}[##3]})}% -}% +} \newcommand*{\DefineAcronymSynonyms}{% \let\acs\acrshort \let\Acs\Acrshort @@ -3437,6 +4065,96 @@ style `#1' undefined}{}}{% \else \glossarystyle{\@glossary@default@style} \fi +\newcommand*{\showgloparent}[1]{% + \expandafter\show\csname glo@#1@parent\endcsname +} +\newcommand*{\showglolevel}[1]{% + \expandafter\show\csname glo@#1@level\endcsname +} +\newcommand*{\showglotext}[1]{% + \expandafter\show\csname glo@#1@text\endcsname +} +\newcommand*{\showgloplural}[1]{% + \expandafter\show\csname glo@#1@plural\endcsname +} +\newcommand*{\showglofirst}[1]{% + \expandafter\show\csname glo@#1@first\endcsname +} +\newcommand*{\showglofirstpl}[1]{% + \expandafter\show\csname glo@#1@firstpl\endcsname +} +\newcommand*{\showglotype}[1]{% + \expandafter\show\csname glo@#1@type\endcsname +} +\newcommand*{\showglocounter}[1]{% + \expandafter\show\csname glo@#1@counter\endcsname +} +\newcommand*{\showglouseri}[1]{% + \expandafter\show\csname glo@#1@useri\endcsname +} +\newcommand*{\showglouserii}[1]{% + \expandafter\show\csname glo@#1@userii\endcsname +} +\newcommand*{\showglouseriii}[1]{% + \expandafter\show\csname glo@#1@useriii\endcsname +} +\newcommand*{\showglouseriv}[1]{% + \expandafter\show\csname glo@#1@useriv\endcsname +} +\newcommand*{\showglouserv}[1]{% + \expandafter\show\csname glo@#1@userv\endcsname +} +\newcommand*{\showglouservi}[1]{% + \expandafter\show\csname glo@#1@uservi\endcsname +} +\newcommand*{\showgloname}[1]{% + \expandafter\show\csname glo@#1@name\endcsname +} +\newcommand*{\showglodesc}[1]{% + \expandafter\show\csname glo@#1@desc\endcsname +} +\newcommand*{\showglodescplural}[1]{% + \expandafter\show\csname glo@#1@descplural\endcsname +} +\newcommand*{\showglosort}[1]{% + \expandafter\show\csname glo@#1@sort\endcsname +} +\newcommand*{\showglosymbol}[1]{% + \expandafter\show\csname glo@#1@symbol\endcsname +} +\newcommand*{\showglosymbolplural}[1]{% + \expandafter\show\csname glo@#1@symbolplural\endcsname +} +\newcommand*{\showgloindex}[1]{% + \expandafter\show\csname glo@#1@index\endcsname +} +\newcommand*{\showgloflag}[1]{% + \expandafter\show\csname ifglo@#1@flag\endcsname +} +\newcommand*{\showacronymlists}{% + \show\@glsacronymlists +} +\newcommand*{\showglossaries}{% + \show\@glo@types +} +\newcommand*{\showglossaryin}[1]{% + \expandafter\show\csname @glotype@#1@in\endcsname +} +\newcommand*{\showglossaryout}[1]{% + \expandafter\show\csname @glotype@#1@out\endcsname +} +\newcommand*{\showglossarytitle}[1]{% + \expandafter\show\csname @glotype@#1@title\endcsname +} +\newcommand*{\showglossarycounter}[1]{% + \expandafter\show\csname @glotype@#1@counter\endcsname +} +\newcommand*{\showglossaryentries}[1]{% + \expandafter\show\csname @glolist@#1\endcsname +} +\csname ifglscompatible-2.07\endcsname + \RequirePackage{glossaries-compatible-207} +\fi \endinput %% %% End of file `glossaries.sty'. diff --git a/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty b/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty index cb10834fddf..15f73330303 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/mfirstuc.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `mfirstuc.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mfirstuc}[2009/11/03 v1.04 (NLCT)] +\ProvidesPackage{mfirstuc}[2011/04/02 v1.05 (NLCT)] \newif\if@glscs \newtoks\@glsmfirst \newtoks\@glsmrest @@ -53,22 +53,22 @@ \if@glscs \@gls@getbody #1{}\@nil \ifx\@gls@rest\@empty - \@gls@makefirstuc{#1}% + \glsmakefirstuc{#1}% \else \expandafter\@gls@split\@gls@rest\@nil \ifx\@gls@first\@empty - \@gls@makefirstuc{#1}% + \glsmakefirstuc{#1}% \else \expandafter\@glsmfirst\expandafter{\@gls@first}% \expandafter\@glsmrest\expandafter{\@gls@rest}% \edef\@gls@domfirstuc{\noexpand\@gls@body - {\noexpand\@gls@makefirstuc\the\@glsmfirst}% + {\noexpand\glsmakefirstuc\the\@glsmfirst}% \the\@glsmrest}% \@gls@domfirstuc \fi \fi \else - \@gls@makefirstuc{#1}% + \glsmakefirstuc{#1}% \fi \fi } @@ -84,6 +84,7 @@ \fi } \def\@gls@makefirstuc#1{\MakeUppercase #1} +\newcommand*{\glsmakefirstuc}[1]{\@gls@makefirstuc{#1}} \def\@gls@getbody#1#{\def\@gls@body{#1}\@gls@gobbletonil} \def\@gls@gobbletonil#1\@nil{\def\@gls@rest{#1}} \newcommand*{\xmakefirstuc}[1]{% diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Brazilian.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Brazilian.dict index f235973c80e..aef181f20d1 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Brazilian.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Brazilian.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Brazilian.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Danish.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Danish.dict index a52b1a4be44..4430d1cccde 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Danish.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Danish.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Danish.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Dutch.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Dutch.dict index 37011f0f8b3..daa59ff0bfb 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Dutch.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Dutch.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Dutch.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-English.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-English.dict index acf518e4b7c..de7550d74b1 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-English.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-English.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-English.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-French.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-French.dict index 4cb2a307b0d..3fe71a617f9 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-French.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-French.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-French.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-German.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-German.dict index c4fbd3a23bf..1edbfbf7b8c 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-German.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-German.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-German.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Irish.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Irish.dict index 39e898eb5bb..4e8ae30e84c 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Irish.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Irish.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Irish.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Italian.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Italian.dict index 61f224ec245..3e8f8ee7a24 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Italian.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Italian.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Italian.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Magyar.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Magyar.dict index 35df501a752..00fba3094b3 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Magyar.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Magyar.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Magyar.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Polish.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Polish.dict index 6ca991d0512..b92a84f2548 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Polish.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Polish.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Polish.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Serbian.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Serbian.dict index 9631befad3c..5ec30b56554 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Serbian.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Serbian.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Serbian.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Spanish.dict b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Spanish.dict index 99621ec1e7a..e0ef0253c84 100644 --- a/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Spanish.dict +++ b/Master/texmf-dist/tex/latex/glossaries/dict/glossaries-dictionary-Spanish.dict @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-dictionary-Spanish.dict,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty b/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty index 4388301741e..574678f709a 100644 --- a/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty +++ b/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-accsupp.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,8 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-accsupp}[2009/11/02 v0.2 (NLCT)] +\ProvidesPackage{glossaries-accsupp}[2011/04/02 v3.0 (NLCT) + Experimental glossaries accessibility] \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}} \ProcessOptions \RequirePackage{glossaries} @@ -71,6 +72,18 @@ \define@key{glossentry}{descriptionpluralaccess}{% \def\@glo@descpluralaccess{#1}% } +\define@key{glossentry}{shortaccess}{% + \def\@glo@shortaccess{#1}% +} +\define@key{glossentry}{shortpluralaccess}{% + \def\@glo@shortpluralaccess{#1}% +} +\define@key{glossentry}{longaccess}{% + \def\@glo@longaccess{#1}% +} +\define@key{glossentry}{longpluralaccess}{% + \def\@glo@longpluralaccess{#1}% +} \def\@gls@noaccess{\relax} \let\@gls@oldnewglossaryentryprehook\@newglossaryentryprehook \renewcommand*{\@newglossaryentryprehook}{% @@ -84,6 +97,10 @@ \def\@glo@symbolpluralaccess{\@glo@symbolaccess}% \def\@glo@descaccess{\relax}% \def\@glo@descpluralaccess{\@glo@descaccess}% + \def\@glo@shortaccess{\relax}% + \def\@glo@shortpluralaccess{\@glo@shortaccess}% + \def\@glo@longaccess{\relax}% + \def\@glo@longpluralaccess{\@glo@longaccess}% } \let\@gls@oldnewglossaryentryposthook\@newglossaryentryposthook \renewcommand*{\@newglossaryentryposthook}{% @@ -115,6 +132,18 @@ \expandafter \protected@xdef\csname glo@\@glo@label @descpluralaccess\endcsname{% \@glo@descpluralaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @shortaccess\endcsname{% + \@glo@shortaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @shortpluralaccess\endcsname{% + \@glo@shortpluralaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @longaccess\endcsname{% + \@glo@longaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @longpluralaccess\endcsname{% + \@glo@longpluralaccess}% } \newcommand*{\glsentryaccess}[1]{% \csname glo@#1@access\endcsname @@ -143,6 +172,18 @@ \newcommand*{\glsentrydescpluralaccess}[1]{% \csname glo@#1@descaccess\endcsname } +\newcommand*{\glsentryshortaccess}[1]{% + \csname glo@#1@shortaccess\endcsname +} +\newcommand*{\glsentryshortpluralaccess}[1]{% + \csname glo@#1@shortpluralaccess\endcsname +} +\newcommand*{\glsentrylongaccess}[1]{% + \csname glo@#1@longaccess\endcsname +} +\newcommand*{\glsentrylongpluralaccess}[1]{% + \csname glo@#1@longpluralaccess\endcsname +} \newcommand*{\glsaccsupp}[2]{% \BeginAccSupp{ActualText=#1}#2\EndAccSupp{}% } @@ -222,6 +263,38 @@ \xglsaccsupp{\@glo@access}{#1}% \fi } +\DeclareRobustCommand*{\glsshortaccessdisplay}[2]{% + \protected@edef\@glo@access{\glsentryshortaccess{#2}}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} +\DeclareRobustCommand*{\glsshortpluralaccessdisplay}[2]{% + \protected@edef\@glo@access{\glsentryshortpluralaccess{#2}}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} +\DeclareRobustCommand*{\glslongaccessdisplay}[2]{% + \protected@edef\@glo@access{\glsentrylongaccess{#2}}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} +\DeclareRobustCommand*{\glslongpluralaccessdisplay}[2]{% + \protected@edef\@glo@access{\glsentrylongpluralaccess{#2}}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} \DeclareRobustCommand*{\glsaccessdisplay}[3]{% \@ifundefined{gls#1accessdisplay}% {% @@ -463,6 +536,66 @@ \glsunset{#2}% }% } +\def\@acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \def\@glo@text{% + \glsshortaccessdisplay{\glsentryshort{#2}}{#2}% + }% + \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% + }% +} +\def\@Acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \def\@glo@text{% + \glsshortaccessdisplay{\Glsentryshort{#2}}{#2}% + }% + \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% + }% +} +\def\@ACRshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \def\@glo@text{% + \glsshortaccessdisplay{\MakeUppercase{\glsentryshort{#2}}}{#2}% + }% + \@gls@link[#1]{#2}{\acronymfont{\@glo@text#3}}% + }% +} +\def\@acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \def\@glo@text{% + \glslongaccessdisplay{\glsentrylong{#2}}{#2}% + }% + \@gls@link[#1]{#2}{\@glo@text#3}% + }% +} +\def\@Acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \def\@glo@text{% + \glslongaccessdisplay{\Glsentrylong{#2}}{#2}% + }% + \@gls@link[#1]{#2}{\@glo@text#3}% + }% +} +\def\@ACRlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \def\@glo@text{% + \glslongaccessdisplay{\MakeUppercase{\glsentrylong{#2}}}{#2}% + }% + \@gls@link[#1]{#2}{\@glo@text#3}% + }% +} \ifglsxindy \renewcommand*{\@glossaryentryfield}{% \string\\accsuppglossaryentryfield} @@ -490,7 +623,7 @@ {\glssymbolaccessdisplay{#5}{#2}}{#6}% } \renewcommand*{\newacronymhook}{% - \edef\@gls@keylist{\glsshortkey access=\the\glslongtok,% + \edef\@gls@keylist{shortaccess=\the\glslongtok,% \the\glskeylisttok}% \expandafter\glskeylisttok\expandafter{\@gls@keylist}% } @@ -503,21 +636,26 @@ description={\the\glslongtok},% descriptionaccess=\relax, text={\the\glsshorttok},% - textaccess={\the\glslongtok},% access={\noexpand\@glo@textaccess},% sort={\the\glsshorttok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + shortaccess={\the\glslongtok},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% - firstaccess=\relax, - first={\noexpand\glsdescriptionaccessdisplay + first={\noexpand\glslongaccessdisplay {\the\glslongtok}{\the\glslabeltok}\space - (\noexpand\glstextaccessdisplay + (\noexpand\glsshortaccessdisplay {\the\glsshorttok}{\the\glslabeltok})},% plural={\the\glsshorttok\acrpluralsuffix},% - firstplural={\noexpand\glsdescriptionpluralaccessdisplay - {\noexpand\@glo@descplural}{\the\glslabeltok}\space - (\noexpand\glspluralaccessdisplay - {\noexpand\@glo@plural}{\the\glslabeltok})},% + firstplural={\noexpand\glslongpluralaccessdisplay + {\noexpand\@glo@longpl}{\the\glslabeltok}\space + (\noexpand\glsshortpluralaccessdisplay + {\noexpand\@glo@shortpl}{\the\glslabeltok})},% + firstaccess=\relax, firstpluralaccess=\relax, + textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok }% }% @@ -531,11 +669,17 @@ name={\noexpand\acronymfont{\the\glsshorttok}},% sort={\the\glsshorttok},% text={\the\glsshorttok},% - textaccess={\the\glslongtok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + shortaccess={\the\glslongtok},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% access={\noexpand\@glo@textaccess},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% symbol={\the\glslongtok},% symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},% + firstpluralaccess=\relax, + textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok }% }% @@ -550,6 +694,11 @@ \acrnameformat{\the\glsshorttok}{\the\glslongtok}},% access={\noexpand\@glo@textaccess},% sort={\the\glsshorttok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + shortaccess={\the\glslongtok},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% first={\the\glslongtok},% firstaccess=\relax, firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% @@ -559,6 +708,8 @@ symbol={\noexpand\@glo@text},% symbolaccess={\noexpand\@glo@textaccess},% symbolplural={\noexpand\@glo@plural},% + firstpluralaccess=\relax, + textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok}% }% \@do@newglossaryentry @@ -569,11 +720,15 @@ {% type=\acronymtype,% name={\noexpand\acronymfont{\the\glsshorttok}},% - access={\noexpand\@glo@textaccess},% sort={\the\glsshorttok},% text={\the\glsshorttok},% textaccess={\the\glslongtok},% + access={\noexpand\@glo@textaccess},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok @@ -589,9 +744,14 @@ name={\noexpand\acronymfont{\the\glsshorttok}},% access={\noexpand\@glo@symbolaccess},% sort={\the\glsshorttok},% - text={\noexpand\@glo@symbol},% - textaccess={\noexpand\@glo@symbolaccess},% - plural={\noexpand\@glo@symbolplural},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + shortaccess={\the\glslongtok},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% + text={\noexpand\@glo@short},% + textaccess={\noexpand\@glo@shortaccess},% + plural={\noexpand\@glo@shortpl},% first={\the\glslongtok},% firstaccess=\relax, firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% @@ -609,6 +769,45 @@ \newcommand*{\glsshortpluralaccesskey}{\glsshortpluralkey access}% \newcommand*{\glslongaccesskey}{\glslongkey access}% \newcommand*{\glslongpluralaccesskey}{\glslongpluralkey access}% +\newcommand*{\showglonameaccess}[1]{% + \expandafter\show\csname glo@#1@textaccess\endcsname +} +\newcommand*{\showglotextaccess}[1]{% + \expandafter\show\csname glo@#1@textaccess\endcsname +} +\newcommand*{\showglopluralaccess}[1]{% + \expandafter\show\csname glo@#1@pluralaccess\endcsname +} +\newcommand*{\showglofirstaccess}[1]{% + \expandafter\show\csname glo@#1@firstaccess\endcsname +} +\newcommand*{\showglofirstpluralaccess}[1]{% + \expandafter\show\csname glo@#1@firstpluralaccess\endcsname +} +\newcommand*{\showglosymbolaccess}[1]{% + \expandafter\show\csname glo@#1@symbolaccess\endcsname +} +\newcommand*{\showglosymbolpluralaccess}[1]{% + \expandafter\show\csname glo@#1@symbolpluralaccess\endcsname +} +\newcommand*{\showglodescaccess}[1]{% + \expandafter\show\csname glo@#1@descaccess\endcsname +} +\newcommand*{\showglodescpluralaccess}[1]{% + \expandafter\show\csname glo@#1@descpluralaccess\endcsname +} +\newcommand*{\showgloshortaccess}[1]{% + \expandafter\show\csname glo@#1@shortaccess\endcsname +} +\newcommand*{\showgloshortpluralaccess}[1]{% + \expandafter\show\csname glo@#1@shortpluralaccess\endcsname +} +\newcommand*{\showglolongaccess}[1]{% + \expandafter\show\csname glo@#1@longaccess\endcsname +} +\newcommand*{\showglolongpluralaccess}[1]{% + \expandafter\show\csname glo@#1@longpluralaccess\endcsname +} \endinput %% %% End of file `glossaries-accsupp.sty'. diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty index 3c5a4d04c98..3483dd5d9ea 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossary-hypernav.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-list.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-list.sty index a465d83341a..8b773da64ab 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-list.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-list.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossary-list.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -38,15 +38,17 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-list}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-list}[2011/03/28 v3.0 (NLCT)] \newglossarystyle{list}{% \renewenvironment{theglossary}% {\begin{description}}{\end{description}}% \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \item[\glstarget{##1}{##2}] ##3\glspostdescription\space ##5}% + \item[\glsentryitem{##1}\glstarget{##1}{##2}] + ##3\glspostdescription\space ##5}% \renewcommand*{\glossarysubentryfield}[6]{% + \glssubentryitem{##2}% \glstarget{##2}{\strut}##4\glspostdescription\space ##6.}% \renewcommand*{\glsgroupskip}{\indexspace}% } @@ -62,10 +64,12 @@ \newglossarystyle{altlist}{% \glossarystyle{list}% \renewcommand*{\glossaryentryfield}[5]{% - \item[\glstarget{##1}{##2}]\mbox{}\newline + \item[\glsentryitem{##1}\glstarget{##1}{##2}]\mbox{}\newline ##3\glspostdescription\space ##5}% \renewcommand{\glossarysubentryfield}[6]{% - \par\glstarget{##2}{\strut}##4\glspostdescription\space ##6}% + \par + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6}% } \newglossarystyle{altlistgroup}{% \glossarystyle{altlist}% @@ -79,10 +83,13 @@ \newglossarystyle{listdotted}{% \glossarystyle{list}% \renewcommand*{\glossaryentryfield}[5]{% - \item[]\makebox[\glslistdottedwidth][l]{\glstarget{##1}{##2}% - \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}% + \item[]\makebox[\glslistdottedwidth][l]{% + \glsentryitem{##1}\glstarget{##1}{##2}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}% \renewcommand*{\glossarysubentryfield}[6]{% - \item[]\makebox[\glslistdottedwidth][l]{\glstarget{##2}{##3}% + \item[]\makebox[\glslistdottedwidth][l]{% + \glssubentryitem{##2}% + \glstarget{##2}{##3}% \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##4}% } \newlength\glslistdottedwidth @@ -90,7 +97,7 @@ \newglossarystyle{sublistdotted}{% \glossarystyle{listdotted}% \renewcommand*{\glossaryentryfield}[5]{% - \item[\glstarget{##1}{##2}]}% + \item[\glsentryitem{##1}\glstarget{##1}{##2}]}% } \endinput %% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty index f03c7059180..756eef5dcbf 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossary-long.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-long}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-long}[2011/03/28 v3.0 (NLCT)] \RequirePackage{longtable} \@ifundefined{glsdescwidth}{% \newlength\glsdescwidth @@ -55,9 +55,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% \renewcommand*{\glsgroupskip}{ & \\}% } \newglossarystyle{longborder}{% @@ -85,9 +87,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##6\\}% \renewcommand*{\glsgroupskip}{ & &\\}% } \newglossarystyle{long3colborder}{% @@ -118,9 +122,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% \renewcommand*{\glsgroupskip}{ & & &\\}% } \newglossarystyle{long4colheader}{% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-longragged.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-longragged.sty index ec9ef91e5f7..a05e4bd1a24 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-longragged.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-longragged.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossary-longragged.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-longragged}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-longragged}[2011/03/28 v3.0 (NLCT)] \RequirePackage{array} \RequirePackage{longtable} \@ifundefined{glsdescwidth}{% @@ -56,10 +56,12 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3\glspostdescription\space ##5% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5% \tabularnewline}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4\glspostdescription\space ##6% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6% \tabularnewline}% \renewcommand*{\glsgroupskip}{ & \tabularnewline}% } @@ -92,9 +94,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% } \newglossarystyle{longragged3colborder}{% @@ -127,9 +131,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% \renewcommand*{\glsgroupskip}{ & & &\tabularnewline}% } \newglossarystyle{altlongragged4colheader}{% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty index da1a81fd541..7831f9b0085 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossary-super.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-super}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-super}[2011/03/28 v3.0 (NLCT)] \RequirePackage{supertabular} \@ifundefined{glsdescwidth}{% \newlength\glsdescwidth @@ -56,9 +56,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% \renewcommand*{\glsgroupskip}{ & \\}% } \newglossarystyle{superborder}{% @@ -93,9 +95,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##6\\}% \renewcommand*{\glsgroupskip}{ & &\\}% } \newglossarystyle{super3colborder}{% @@ -131,9 +135,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% \renewcommand*{\glsgroupskip}{ & & &\\}% } \newglossarystyle{super4colheader}{% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-superragged.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-superragged.sty index 0c38554b9ba..2c02e10e420 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-superragged.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-superragged.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossary-superragged.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-superragged}[2009/05/30 v2.01 (NLCT)] +\ProvidesPackage{glossary-superragged}[2011/03/28 v3.0 (NLCT)] \RequirePackage{array} \RequirePackage{supertabular} \@ifundefined{glsdescwidth}{% @@ -57,10 +57,12 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3\glspostdescription\space ##5% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5% \tabularnewline}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4\glspostdescription\space ##6% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6% \tabularnewline}% \renewcommand*{\glsgroupskip}{ & \tabularnewline}% } @@ -98,9 +100,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% } \newglossarystyle{superragged3colborder}{% @@ -140,9 +144,11 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% - \glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% + \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% \renewcommand*{\glossarysubentryfield}[6]{% - & \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% \renewcommand*{\glsgroupskip}{ & & &\tabularnewline}% } \newglossarystyle{altsuperragged4colheader}{% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-tree.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-tree.sty index ac00ec2bf85..490ad13ea68 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-tree.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-tree.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossary-tree.sty,package') %% %% glossaries.dtx -%% Copyright 2010 Nicola Talbot +%% Copyright 2011 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-custom-acronym.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-tree}[2009/01/14 v1.01 (NLCT)] +\ProvidesPackage{glossary-tree}[2011/03/28 v3.0 (NLCT)] \newglossarystyle{index}{% \renewenvironment{theglossary}% {\setlength{\parindent}{0pt}% @@ -48,7 +48,7 @@ \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand*{\glossaryentryfield}[5]{% -\item\textbf{\glstarget{##1}{##2}}% +\item\glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% @@ -61,6 +61,7 @@ \or % level 1 \subitem + \glssubentryitem{##2}% \else % all other levels \subsubitem @@ -95,7 +96,7 @@ \renewcommand{\glossaryentryfield}[5]{% \hangindent0pt\relax \parindent0pt\relax - \textbf{\glstarget{##1}{##2}}% + \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% @@ -104,6 +105,9 @@ \renewcommand{\glossarysubentryfield}[6]{% \hangindent##1\glstreeindent\relax \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi \textbf{\glstarget{##2}{##3}}% \ifx\relax##5\relax \else @@ -137,7 +141,7 @@ \renewcommand{\glossaryentryfield}[5]{% \hangindent0pt\relax \parindent0pt\relax - \textbf{\glstarget{##1}{##2}}% + \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% @@ -146,6 +150,9 @@ \renewcommand{\glossarysubentryfield}[6]{% \hangindent##1\glstreeindent\relax \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi \glstarget{##2}{\strut}% ##4\glspostdescription\space ##6\par}% \renewcommand*{\glsgroupskip}{\indexspace}% @@ -184,7 +191,7 @@ \parindent\glstreeindent \fi \makebox[0pt][r]{\makebox[\glstreeindent][l]{% - \textbf{\glstarget{##1}{##2}}}}% + \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}}}% \ifx\relax##4\relax \else (##4)\space @@ -193,6 +200,9 @@ \def\@gls@prevlevel{0}% }% \renewcommand{\glossarysubentryfield}[6]{% + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi \ifnum\@gls@prevlevel=##1\relax \else \@ifundefined{@glswidestname\romannumeral##1}{% -- cgit v1.2.3