From 17efbb93c3c280ebec43438b10c53601758ef11e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 5 Feb 2017 23:22:17 +0000 Subject: glossaries-extra (4feb17) git-svn-id: svn://tug.org/texlive/trunk@43152 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/glossaries-extra/CHANGES | 77 + .../texmf-dist/doc/latex/glossaries-extra/README | 4 +- .../glossaries-extra/glossaries-extra-code.pdf | Bin 718489 -> 763669 bytes .../glossaries-extra/glossaries-extra-manual.html | 10444 +++++++++++-------- .../glossaries-extra/glossaries-extra-manual.pdf | Bin 612304 -> 667551 bytes .../glossaries-extra/glossaries-extra-manual.tex | 1224 ++- .../doc/latex/glossaries-extra/sample-abbrv.pdf | Bin 43307 -> 43307 bytes .../doc/latex/glossaries-extra/sample-accsupp.pdf | Bin 80745 -> 80745 bytes .../latex/glossaries-extra/sample-acronym-desc.pdf | Bin 50358 -> 50358 bytes .../doc/latex/glossaries-extra/sample-acronym.pdf | Bin 36734 -> 36734 bytes .../doc/latex/glossaries-extra/sample-alias.pdf | Bin 0 -> 42449 bytes .../doc/latex/glossaries-extra/sample-alias.tex | 37 + .../latex/glossaries-extra/sample-altmodifier.pdf | Bin 35296 -> 35296 bytes .../glossaries-extra/sample-alttree-marginpar.pdf | Bin 91049 -> 91049 bytes .../latex/glossaries-extra/sample-alttree-sym.pdf | Bin 69519 -> 69519 bytes .../doc/latex/glossaries-extra/sample-alttree.pdf | Bin 54855 -> 54855 bytes .../glossaries-extra/sample-autoindex-hyp.pdf | Bin 142160 -> 142220 bytes .../latex/glossaries-extra/sample-autoindex.pdf | Bin 147253 -> 147259 bytes .../doc/latex/glossaries-extra/sample-crossref.pdf | Bin 40642 -> 40642 bytes .../latex/glossaries-extra/sample-crossref2.pdf | Bin 41305 -> 41305 bytes .../doc/latex/glossaries-extra/sample-docdef.pdf | Bin 45245 -> 45245 bytes .../latex/glossaries-extra/sample-entrycount.pdf | Bin 54610 -> 54610 bytes .../doc/latex/glossaries-extra/sample-external.pdf | Bin 34175 -> 55773 bytes .../doc/latex/glossaries-extra/sample-fmt.pdf | Bin 0 -> 75259 bytes .../doc/latex/glossaries-extra/sample-fmt.tex | 58 + .../doc/latex/glossaries-extra/sample-footnote.pdf | Bin 63220 -> 63220 bytes .../doc/latex/glossaries-extra/sample-header.pdf | Bin 125189 -> 125189 bytes .../latex/glossaries-extra/sample-indexhook.pdf | Bin 42711 -> 42711 bytes .../latex/glossaries-extra/sample-initialisms.pdf | Bin 81582 -> 81582 bytes .../glossaries-extra/sample-mixed-abbrv-styles.pdf | Bin 57809 -> 57809 bytes .../latex/glossaries-extra/sample-mixedsort.pdf | Bin 45141 -> 45141 bytes .../doc/latex/glossaries-extra/sample-mixture.pdf | Bin 160070 -> 160074 bytes .../latex/glossaries-extra/sample-name-font.pdf | Bin 202090 -> 202090 bytes .../doc/latex/glossaries-extra/sample-nested.pdf | Bin 67724 -> 67724 bytes .../sample-noidx-restricteddocdefs.pdf | Bin 47572 -> 47572 bytes .../doc/latex/glossaries-extra/sample-onelink.pdf | Bin 44514 -> 44514 bytes .../glossaries-extra/sample-onthefly-utf8.pdf | Bin 106058 -> 106058 bytes .../glossaries-extra/sample-onthefly-xetex.pdf | Bin 19857 -> 19859 bytes .../doc/latex/glossaries-extra/sample-onthefly.pdf | Bin 43469 -> 43469 bytes .../doc/latex/glossaries-extra/sample-pages.pdf | Bin 38788 -> 38788 bytes .../doc/latex/glossaries-extra/sample-postdot.pdf | Bin 37051 -> 37051 bytes .../doc/latex/glossaries-extra/sample-postlink.pdf | Bin 67877 -> 67877 bytes .../doc/latex/glossaries-extra/sample-prefix.pdf | Bin 33107 -> 33107 bytes .../doc/latex/glossaries-extra/sample-record.pdf | Bin 47151 -> 49653 bytes .../doc/latex/glossaries-extra/sample-record.tex | 25 +- .../glossaries-extra/sample-restricteddocdefs.pdf | Bin 47883 -> 47883 bytes .../doc/latex/glossaries-extra/sample-trans.pdf | Bin 49443 -> 49443 bytes .../doc/latex/glossaries-extra/sample-undef.pdf | Bin 33219 -> 33219 bytes .../glossaries-extra/sample-unitentrycount.pdf | Bin 61040 -> 61040 bytes .../doc/latex/glossaries-extra/sample.pdf | Bin 45734 -> 45734 bytes .../latex/glossaries-extra/glossaries-extra.dtx | 1614 ++- .../latex/glossaries-extra/glossaries-extra.ins | 2 +- .../glossaries-extra-stylemods.sty | 2 +- .../latex/glossaries-extra/glossaries-extra.sty | 856 +- 54 files changed, 9951 insertions(+), 4392 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.tex create mode 100644 Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.tex (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES b/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES index c731e42ef24..5c558eb872c 100644 --- a/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES +++ b/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES @@ -1,3 +1,80 @@ +1.12 (2017-02-03): + + * \longnewglossaryentry now has a starred version that + doesn't suppress the post-description hook. The unstarred + version now inserts \glsxtrpostlongdescription at the end + of the description instead of the hard-coded + \leavevmode\unskip\nopostdesc + + * Added option 'postdot' (shortcut for 'nopostdot=false') + + * Added 'alias' key to \newglossaryentry and associated command + \glsxtralias + + * \printunsrtglossary now has a starred version. + + * New commands: + + \apptoglossarypreamble + \pretoglossarypreamble + \glsxtrprovidestoragekey + \glsxtrfielduse + \glsxtrifkeydefined + \glsxtrfieldlistadd + \glsxtrfieldlistgadd + \glsxtrfieldlisteadd + \glsxtrfieldlistxadd + \glsxtrfielddolistloop + \glsxtrfieldforlistloop + \glsxtrfieldifinlist + \glsxtrfieldxifinlist + \glsxtrdisplaysingleloc + \glsxtrdisplaystartloc + \glsxtrdisplayendloc + \glsxtrdisplayendlochook + \glsxtrlocrangefmt + \GlsXtrSetField + \gGlsXtrSetField + \eGlsXtrSetField + \xGlsXtrSetField + \GlsXtrLetField + \csGlsXtrLetField + \GlsXtrLetFieldToField + \glsxtrdeffield + \glsxtredeffield + \glsxtrsetfieldifexists + \GlsXtrRecordCounter + \printunsrtglossaryunit + \printunsrtglossaryunitsetup + \glsxtrcopytoglossary + \provideignoredglossary + \glsxtrabbrvpluralsuffix + \glsxtrfmt + \glsxtrentryfmt + \GlsXtrFmtField + \GlsXtrFmtDefaultOptions + + * Added existence checks to \newignoredglossary + + * Modified \glsnoidxdisplayloc to check for range formations. + + * The record=only package option automatically implements + indexcrossref=false + + * \glsxtrresourcefile sets the category code of @ to letter + to allow internal commands within the location field. + + * \GlsXtrLoadResources can now be used multiple times. After + the first instance "\jobname-" is used as the argument + to \glsxtrresourcefile. + + * New abbreviation styles: + + long-postshort-user + long-postshort-user-desc + short-postlong-user + short-postlong-user-desc + 1.11 (2017-01-19): * \glsxtrresourcefile now enforces the file extension .glstex diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/README b/Master/texmf-dist/doc/latex/glossaries-extra/README index 6628abf2d29..a5d34f055fc 100644 --- a/Master/texmf-dist/doc/latex/glossaries-extra/README +++ b/Master/texmf-dist/doc/latex/glossaries-extra/README @@ -1,6 +1,6 @@ -LaTeX Package : glossaries-extra v1.11 +LaTeX Package : glossaries-extra v1.12 -Last Modified : 2017-01-19 +Last Modified : 2017-02-03 Author : Nicola Talbot diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-code.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-code.pdf index 7560eb51250..f6043353cbb 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-code.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-code.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.html b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.html index ddfadac3654..156020f88d9 100644 --- a/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.html +++ b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.html @@ -50,16 +50,16 @@ .cmssbx-10{ font-family: sans-serif; font-weight: bold;} .cmssbx-10{ font-family: sans-serif; font-weight: bold;} .cmitt-10{font-family: monospace; font-style: italic;} -.cmti-8{font-size:80%; font-style: italic;} +.cmssi-10{ font-family: sans-serif; font-style: oblique;} +.cmssi-10{ font-family: sans-serif; font-style: oblique;} +.cmssi-10{ font-family: sans-serif; font-style: oblique;} +.cmssi-10{ font-family: sans-serif; font-style: oblique;} .cmtt-8{font-size:80%;font-family: monospace;} .cmtt-8{font-family: monospace;} .cmtt-8{font-family: monospace;} .cmtt-8{font-family: monospace;} .cmtt-8{font-family: monospace;} -.cmssi-10{ font-family: sans-serif; font-style: oblique;} -.cmssi-10{ font-family: sans-serif; font-style: oblique;} -.cmssi-10{ font-family: sans-serif; font-style: oblique;} -.cmssi-10{ font-family: sans-serif; font-style: oblique;} +.cmti-8{font-size:80%; font-style: italic;} p.noindent { text-indent: 0em } td p.noindent { text-indent: 0em; margin-top:0em; } p.nopar { text-indent: 0em; } @@ -202,22 +202,22 @@ a span.HoLogo-TeX span.HoLogo-e{text-decoration:none;} -

-

+

-

+

-

-

glossaries-extra.sty v1.11: an extension to the +

+

glossaries-extra.sty v1.12: an extension to the glossaries package

@@ -240,22 +240,22 @@ class="td11">http://www.dickimaw-books.com/
-

2017-01-19

+

2017-02-03

-

+

-

-

+

Abstract

-

The

The glossaries-extra package is an extension to the glossaries package, providing additional features. Some of the features provided by this package are only available @@ -268,7 +268,7 @@ class="cmss-10">glossaries package.

-

Since

Since glossaries-extra internally loads the glossaries package, you also need to have EX distribution? or Updating TEX on Linux.)
-

-

Additional resources:

+

+

Additional resources:

- - - -

1.

1. Introduction

-

The

The glossaries package is a flexible package, but it’s also a heavy-weight package that uses a lot of resources. As package developer, I’m caught between those users who complain about the drawbacks of a heavy-weight package with a large user manual and those users who want more features (which necessarily adds to the package weight and manual size). -

The

The glossaries-extra package is an attempt to provide a compromise for this conflict. Version 4.22 of the glossaries package is the last version to incorporate new @@ -423,10 +433,10 @@ of package loading time and allocation of resources, but those users who do want extra features available will have more of a chance of getting their feature requests accepted.

-

Top

1.1 Package Defaults

-

I’m not happy with some of the default settings assumed by the

I’m not happy with some of the default settings assumed by the glossaries package, and, judging from code I’ve seen, other users also seem unhappy with them, as certain package options are often used in questions posted on various sites. I can’t @@ -436,7 +446,7 @@ but since glossaries-extra is a separate package, I have decided to implement some of these commonly-used options by default. You can switch them back if they’re not appropriate. -

The new defaults are:

+

The new defaults are:

-

This is like: +

This is like: @@ -518,7 +528,7 @@ Commands and Styles).  
\usepackage[toc,nopostdot]{glossaries}  
\usepackage{glossaries-extra}

-

+

  • @@ -530,7 +540,7 @@ Commands and Styles).  
    \usepackage{babel}  
    \usepackage{glossaries-extra} -

    This is like: +

    This is like: @@ -541,7 +551,7 @@ Commands and Styles).  
    \usepackage[toc,nopostdot,translate=babel]{glossaries}  
    \usepackage{glossaries-extra} -

    +

  • @@ -552,7 +562,7 @@ Commands and Styles). \documentclass{memoir}  
    \usepackage{glossaries-extra} -

    This is like: +

    This is like: @@ -562,7 +572,7 @@ Commands and Styles).  
    \usepackage[toc,nopostdot,noredefwarn]{glossaries}  
    \usepackage{glossaries-extra} -

    However @@ -573,7 +583,7 @@ class="cmti-10">However  
    \usepackage{glossaries}  
    \usepackage{glossaries-extra} -

    This is like: +

    This is like: @@ -583,19 +593,19 @@ class="cmti-10">However  
    \usepackage[toc,nopostdot]{glossaries}  
    \usepackage{glossaries-extra} -

    Since by the time

    Since by the time glossaries-extra has been loaded, glossaries has already redefined memoir’s glossary-related commands.

  • -

    Another noticeable change is that by default

    Another noticeable change is that by default \printglossary will now display information text in the document if the external glossary file doesn’t exist. This is explanatory text to help new users who can’t work out what to do next to complete the document build. Once the document is set up correctly and the external files have been generated, this text will disappear. -

    This change is mostly likely to be noticed by users with one or more +

    This change is mostly likely to be noticed by users with one or more redundant empty glossaries who ignore transcript messages, explicitly use \printglossaries  
    \end{document} -

    The above document will only display the list of acronyms at the place where +

    The above document will only display the list of acronyms at the place where \printglossaries occurs. However it will also attempt to input the .gls file associated with the main glossary. -

    If you use

    If you use makeglossaries, you’ll get the warning message: @@ -646,7 +656,7 @@ Warning: File 'test.glo' is empty.  
    Remember to use package option 'nomain' if you  
    don't want to use the main glossary. -

    (where the original file is called

    (where the original file is called test.tex) but if you simply call No file test.gls. -

    This doesn’t occur with

    This doesn’t occur with makeglossaries as it will create the .gls file containing the single command \null. -

    If you simply change from

    If you simply change from glossaries to glossaries-extra in this document, you’ll find a change in the resulting PDF if you don’t use .acr file with makeindex. -

    The transcript file will still contain the message about the missing

    The transcript file will still contain the message about the missing .gls, but now you’ll also see information in the actual PDF document. The simplest remedy is to follow the advice inserted into the document at that point, which is to add the @@ -702,13 +712,13 @@ class="cmss-10">nomain\printglossaries  
    \end{document} -

    -

    +

    +

    -

    Top

    1.2 New or Modified Package Options

    -

    If you haven’t already loaded

    If you haven’t already loaded glossaries, you can use any of the package options provided by glossaries when you load \setupglossariesglossaries package options may be used in that command. -

    This section only lists options that are either unrecognised by the

    This section only lists options that are either unrecognised by the glossaries package or are a modified version of options of the same name provided by glossaries. See the glossaries user manual for details about the unmodified options.
    -

    -

    The new and modified options provided by

    +

    The new and modified options provided by glossaries-extra are described below:

    @@ -744,7 +754,7 @@ class="cmss-10">glossaries-accsupp

    If you want to define styles that can interface with the accessibility support +

    If you want to define styles that can interface with the accessibility support provided by glossaries-accsupp use the \glsaccessxxx⟩ commands will add the accessibility information. (See §10.2 §11.2 Accessibility Support for further details.) -

    Note that the

    Note that the accsupp option can only be used as a package option (not through glossaries-extra-stylemodsvalue⟩ if it contains any commas.) The value may be omitted if no options need to be passed. See §2.6 §2.7 Glossary Style Modifications for further details.

    @@ -816,14 +826,14 @@ class="cmss-10">glossaries). You can switch this to a warning message (and ?? appearing in the text) with undefaction=warn. -

    Undefined entries can’t be picked up by any commands that iterate +

    Undefined entries can’t be picked up by any commands that iterate over a glossary list. This includes \forglsentries and \glsaddall.
    -

    +

    recordoff (default), only and alsoindex. If the value is omitted only is assumed. The - option is provided for the benefit of any post-processing applications that need - to know information about the entries used in the document, such as - bib2gls.1.2 - The option may only be set in the preamble. -

    The bib2gls (see §9 bib2gls: Managing + Reference Databases). +

    The option may only be set in the preamble. +

    The record=off option switches off the recording, as per the default behaviour. + id="dx1-4021"> option switches off the recording, as per the default behaviour. It implements undefaction=error. -

    The other values switch on the recording and also . +

    The other values switch on the recording and also undefaction=warn, + id="dx1-4023">, but record=only will also switch off the indexing mechanism (even if + id="dx1-4024"> will also switch off the indexing mechanism (even if \makeglossaries or \makenoidxglossaries has been used) whereas record=alsoindex will both record and index. - - - -

    With the recording on, any of the commands that would typically index the + id="dx1-4025"> will both record and index. +

    With the recording on, any of the commands that would typically index the entry (such as \gls, \glstext or \glsadd) will add a \glsxtr@record entry - to the .aux file. The post-processing application can then read these lines to - find out which entries have been used. (Remember that commands like - \glsentryname don’t index, so any use of these commands won’t add a - corresponding \glsxtr@record entry to the .aux file.) -

    There are new commands that are intended for use with the recording - function: -


    \glsxtrresourcefile  \glsxtrresourcefile[options]{filename} -

    -

    - (Don’t include the file extension in ⟨filename⟩.) There’s a shortcut version that - sets ⟨filename\jobname: -


    \GlsXtrLoadResources  \GlsXtrLoadResources[options]

    -

    - (Only one instance of \GlsXtrLoadResources is permitted per document. Use - \glsxtrresourcefile for any additional resources.) -

    This writes the line

    -
    - \glsxtr@resource{options}{filename} -
    -
    to the .aux file and will input ⟨filename.glstex if it - exists.1.3 - The post-processor may use this information to create the required file. (This is - why the record option automatically switches on undefaction=warn, to allow the - document to compile before the post-processor has created the .glstex - file.) -

    The options aren’t processed by glossaries-extra (other than simply writing - ⟨options⟩ to the .aux file). The post-processor determines the allowed options. As - from v1.11, this command also writes other information to the .aux file for the - benefit of the post-processor, including the list of valid keys allowed by - \newglossaryentry so make sure you add any custom keys before using - \glsxtrresourcefile or \GlsXtrLoadResources if the post-processor needs - that information. -


    \printunsrtglossary  \printunsrtglossary[options]

    -

    - This behaves like \printnoidxglossary but never sorts the entries and always - lists all the defined entries for the given glossary (and doesn’t require - \makenoidxglossaries). -

    You may use this command without the record option or \glsxtrresourcefile if - you’re happy to have a complete unsorted list without number lists. However - this requires all entries to have been defined before use, so if you’ve used the - docdefs package option with definitions after the glossary, you’ll need a - second LATEX run to pick up the definitions from the .glsdefs file. -
    -

    -

    The optional argument is as for \printnoidxglossary (except for the sort key, - which isn’t available). The number list will need setting by the post-processor - by adding the loclist or location field to the entry definitions, otherwise the - number list will be empty. (If both the loclist and location fields are set, the - location field will be used in the glossary.) -

    The location field should contain the relevant commands to format the number - list. There’s no specific syntax for this field, it just needs to contain valid - LATEX commands. -

    The loclist field should be a list separated by | (as per etoolbox’s internal lists) - where each location in the list is in the format -


    \glsnoidxdisplayloc{prefix}{counter}{format}{location} -

    -

    - (see the glossaries manual for information about that command). -

    All glossaries may be displayed in the order of their definition using: -


    \printunsrtglossaries  \printunsrtglossaries

    -

    - which is analogous to \printnoidxglossaries. + to the .aux file. bib2gls can then read these lines to find out which entries + have been used. (Remember that commands like \glsentryname don’t index, + so any use of these commands won’t add a corresponding \glsxtr@record + entry to the .aux file.) See §9 bib2gls: Managing Reference Databases for + further details.

    docdef
    This option governs the use of \newglossaryentry. It was originally a boolean option, but as from version 1.06, it can now take one of three values (if @@ -1049,10 +910,10 @@ class="cmss-10">true is assumed):
    • \newglossaryentry is not permitted in the is not permitted in the document environment + id="dx1-4031"> environment (default).
    • \newglossaryentry behaves as it does in the base glossaries package. That is, where its use is permitted in the document environment, it + id="dx1-4034"> environment, it uses the .glsdefs temporary file to store the entry definitions so that on the next LATEX run the entries are defined at the beginning of the document environment. This allows the entry information + id="dx1-4036"> environment. This allows the entry information to be referenced in the glossary, even if the glossary occurs before \newglossaryentry. (For example, when the glossary is displayed in - - - the front matter.) This method of saving the definitions for the next LATEX run has drawbacks that are detailed in the glossaries user
    • (new to version 1.06) \newglossaryentry is permitted in the + id="dx1-4039"> is permitted in the document environment without using the environment without using the .glsdefs file. This means that all entries must be defined before the glossary is displayed, but it avoids the complications associated with saving the entry details @@ -1097,15 +955,15 @@ class="cmtt-10">.glsdefs file. This means class="cmti-10">key⟩=⟨value⟩ mechanism (that is, the comma and equal sign) and any makeindex or xindy character that occurs in the sort key or label. If any of those characters + id="dx1-4044"> key or label. If any of those characters are made active in the document, then it can cause problems with the entry definition. This option will allow \newglossaryentry to @@ -1113,10 +971,10 @@ class="cmtt-10">\newglossaryentry to class="cmtt-10">\makenoidxglossaries, but note that \longnewglossaryentry remains a preamble-only command. -

      With this option, if an entry appears in the glossary before it has been +

      With this option, if an entry appears in the glossary before it has been defined, an error will occur (or a warning if the undefaction=warn + id="dx1-4045"> option is used.) If you edit your document and either remove an entry or change its label, you may need to delete the document’s temporary files (such as the .aux and .gls files).

    -

    The

    The glossaries package allows \newglossaryentry within the document + id="dx1-4046"> environment (when used with makeindex or xindy) but the user manual warns against this usage. By default the glossaries-extra package prohibits this, only allowing definitions within the preamble. If you are really determined to define entries in the document environment, despite all the + id="dx1-4050"> environment, despite all the associated drawbacks, you can restore this with docdef=true. Note that this + id="dx1-4052">. Note that this doesn’t change the prohibitions that the glossaries package has in certain circumstances (for example, when using “option 1”). See the glossaries user manual for further details. A better option if document definitions are required is docdef=restricted. Only use . Only use docdef=true if document definitions + id="dx1-4054"> if document definitions are necessary and one or more of the glossaries occurs in the front matter. -

    This option affects commands that internally use

    This option affects commands that internally use \newglossaryentry, such as \newabbreviation, but not the “on-the-fly” commands described in On-the-Fly Document Definitions

    Note that bib2gls can automatically find dependent entries when it + parses the .bib source file. The record option automatically implements + indexcrossrefs=false. +

    abbreviations
    This option has no value and can’t be cancelled. If used, it will automatically create a new glossary with the label abbreviations and redefines \glsxtrabbrvtype to this label. In addition, it defines a shortcut command -



    \printabbreviations  \printabbreviations[options]

    -

    +

    which is equivalent to

    + + +
    \printglossary[type=\glsxtrabbrvtype,options]
    The title of the new glossary is given by -



    \abbreviationsname  \abbreviationsname

    -

    +

    If this command is already defined, it’s left unchanged. Otherwise it’s defined to “Abbreviations” if babel hasn’t been loaded or hasn’t been loaded or \acronymname if babel has been loaded. However, if you’re using has been loaded. However, if you’re using babel it’s likely you + id="dx1-4069"> it’s likely you will need to change this. (See §12 §13 Multi-Lingual Support for further details.) -

    If you don’t use the

    If you don’t use the abbreviations package option, the package option, the \abbreviationsname command won’t be defined (unless it’s defined by an included language file).
    -

    -

    If the

    +

    If the abbreviations option is used and the option is used and the acronym option provided by the + id="dx1-4072"> option provided by the glossaries package hasn’t been used, then \acronymtype will be set to + id="dx1-4073"> will be set to \glsxtrabbrvtype so that acronyms defined with so that acronyms defined with \newacronym can be added + id="dx1-4075"> can be added to the list of abbreviations. If you want acronyms in the main glossary and other abbreviations in the main:

    \renewcommand*{\acronymtype}{main}
    -

    -

    Note that there are no analogous options to the

    +

    Note that there are no analogous options to the glossaries package’s acronymlists + id="dx1-4076"> option (or associated commands) as the abbreviation mechanism is handled differently with glossaries-extra.

    symbols
    This is passed to glossaries but will additionally define -



    \glsxtrnewsymbol  \glsxtrnewsymbol[options]{}{symbol}

    -

    +

    which is equivalent to

    }
    Note that the sort key is set to the ⟨ key is set to the ⟨label⟩ not the ⟨symbol⟩ as the symbol will likely contain commands.
    numbers
    This is passed to glossaries but will additionally define -



    \glsxtrnewnumber  \glsxtrnewnumber[options]{number}

    -

    +

    which is equivalent to

    }
    shortcuts
    Unlike the glossaries package option of the same name, this option isn’t boolean but has multiple values: @@ -1377,18 +1250,18 @@ class="cmss-10">glossaries package option of the same name, this option i
    • shortcuts=acronyms (or (or shortcuts=acro): set the shortcuts provided + id="dx1-4084">): set the shortcuts provided by the glossaries package for acronyms (such as \ac).
    • shortcuts=abbreviations (or (or shortcuts=abbr): + id="dx1-4086">): set the abbreviation shortcuts provided by glossaries-extra. (See glossaries package.
    • shortcuts=other: set the “other” shortcut commands, but not the shortcut + id="dx1-4087">: set the “other” shortcut commands, but not the shortcut commands for abbreviations or the acronym shortcuts provided by glossaries. The “other” shortcuts are:
      • \newentry equivalent to equivalent to \newglossaryentry + id="dx1-4089">
      • \newsym equivalent to equivalent to \glsxtrnewsymbol (see the (see the symbols + id="dx1-4092"> option).
      • \newnum equivalent to equivalent to \glsxtrnewnumber (see the (see the numbers + id="dx1-4095"> option).
    • shortcuts=all (or (or shortcuts=true): define all the shortcut commands. + id="dx1-4097">): define all the shortcut commands.
    • shortcuts=none (or (or shortcuts=false): don’t define any of the shortcut + id="dx1-4099">): don’t define any of the shortcut commands (default).
    -

    Note that multiple invocations of the

    Note that multiple invocations of the shortcuts option option within the same option list will override each other.

    -

    After the

    After the glossaries-extra package has been loaded, you can set available options using -



    \glossariesextrasetup  \glossariesextrasetup{options}

    -

    +

    The abbreviations and and docdef options may only be used in the preamble. Additionally, + id="dx1-4103"> options may only be used in the preamble. Additionally, docdef can’t be used after can’t be used after \makenoidxglossaries. + id="dx1-4105">.

    -

    -

    +

    Top

    2. Modifications to Existing Commands and Styles

    -

    The commands used by

    The commands used by glossaries to automatically produce an error if an entry is undefined (such as \glsdoifexists\glsdoifexistsundefaction option into account. -

    The

    The \newignoredglossary{targeturl§5 Categories for further details.) -

    The \newglossaryentry command has a new key called Categories for further details.) As from v1.12 both the starred and unstarred version +check that the glossary doesn’t already exist. (The glossaries package omits this +check.) +

    You can now provide an ignored glossary with: +


    \provideignoredglossary  \provideignoredglossary{type}

    +

    +which will only define the glossary if it doesn’t already exist. This also has a starred +version that doesn’t automatically switch off hyperlinks. +

    The individual glossary displaying commands \printglossary, +\printnoidxglossary and \printunsrtglossary have an extra key target. This is a +boolean key which can be used to switch off the automatic hypertarget for +each entry. Unlike \glsdisablehyper this doesn’t switch off hyperlinks, so +any cross-references within the glossary won’t be affected. This is a way of +avoiding duplicate target warnings if a glossary needs to be displayed multiple +times. +

    The \newglossaryentry command has two new keys:

    +
      +
    • category, which sets the -category label for the given entry. By default this is , which sets the category label for the given entry. By default this + is general. See §5 Categories for -further information about categories. +href="#sec:categories">Categories for further information about categories. +
    • +
    • alias, which allows an entry to be alias to another entry. See §10.3 Entry + Aliases for further details.
    +

    The \longnewglossaryentry command now has a starred version (as from v1.12) +that doesn’t automatically insert + + + +

    +
    +\leavevmode\unskip\nopostdesc +
    +

    at the end of the description field. +


    \longnewglossaryentry  \longnewglossaryentry*{label}{options} +{description}

    +

    +The descriptionplural key is left unset unless explicitly set in ⟨options⟩. +

    The unstarred version no longer hard-codes the above code (which removes +trailing space and suppresses the post-description hook) but instead uses: +


    \glsxtrpostlongdescription  \glsxtrpostlongdescription

    +

    +This can be redefined to allow the post-description hook to work but retain the +\unskip part if required. For example: + + + +

    +
    +\renewcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip} +
    +

    This will discarded unwanted trailing space at the end of the description but won’t +suppress the post-description hook. +

    The unstarred version also alters the base glossaries package’s treatment of the +descriptionplural key. Since a plural description doesn’t make much sense for +multi-paragraph descriptions, the default behaviour with glossaries-extra’s +\longnewglossaryentry is to simply leave the plural description unset +unless explicitly set using the descriptionplural key. The glossaries.sty version +of this command sets the description’s plural form to the same as the +singular.2.1 +

    Note that this modified unstarred version doesn’t append \glsxtrpostlongdescription +to the description’s plural form.

    The \newterm command (defined through the command (defined through the index package option) is modified + id="dx1-5025"> package option) is modified so that the category defaults to index. The . The \newacronym command is modified + id="dx1-5027"> command is modified to use the new abbreviation interface provided by glossaries-extra. (See \makeglossaries command now has an optional argument.


    \makeglossaries  \makeglossaries[list]

    @@ -1552,17 +1534,17 @@ class="cmtt-10">sample-mixedsort.tex for an example.) class="cmti-10">list⟩, you can’t define entries in the document (even with the docdef option).
    + id="dx1-5029"> option).

    You will need at least version 2.20 of makeglossaries or at least version 1.3 of the Lua alternative makeglossaries-lite.lua (both distributed with (both distributed with glossaries v4.27) to allow for this use of \makeglossaries[list]. Alternatively, use the automake option. + id="dx1-5033"> option.

    Top

    2.1 glossaries, as the first use might not be the most pertinent use. (If you want to apply + + + indexonlyfirst to selected entries, rather than all of them, you can use the \glsadd (and \glsaddall) since the whole purpose of that command is - - - to index an entry.

    There is a new hook that’s used each time indexing information is written to the external glossary files: @@ -1737,6 +1719,9 @@ class="cmti-10">label⟩. id="dx1-6034">number list using nonumberlist. This + + + will automatically prevent the cross-references from being displayed. The seeautonumberlistsee key set, but this will also show the rest of the number - - - list.

    Another approach in this situation is to use the post description hook with -

    +
    \renewcommand*{\glsxtrpostdescgeneral}{%  
     \ifglshasfield{see}{\glscurrententrylabel}  
     {, \glsxtrusesee{\glscurrententrylabel}}% @@ -1896,7 +1878,7 @@ class="cmtt-10">\glstextformat -
    +
    \renewcommand*{\glsxtrregularfont}[1]{\textsf{#1}}

    You can access the label through -

    +
    \renewcommand*{\glsxtrregularfont}[1]{%  
     \glsifcategory{\glslabel}{general}{\textsf{#1}}{#1}}
    @@ -1915,7 +1897,7 @@ category:

    -
    +
    \glssetcategoryattribute{general}{font}{sf}  
    \renewcommand*{\glsxtrregularfont}[1]{%  
     \glsifattribute{\glslabel}{font}{sf}{\textsf{#1}}{#1}} @@ -1925,7 +1907,7 @@ category:

    -
    +

    @@ -2042,7 +2024,7 @@ class="cmss-10">symbol -

    +
    \newcommand*{\glsxtrpostlinksymbol}{%  
      \glsxtrpostlinkAddDescOnFirstUse  
    } @@ -2120,7 +2102,7 @@ class="cmss-10">general
    -
    +
    \newcommand*{\glsxtrpostlinkgeneral}{%  
      \glsxtrifwasfirstuse{\footnote{\glsentrydesc{\glslabel}}}{}%  
    } @@ -2150,7 +2132,7 @@ For example, if you mostly don’t want to index entries then you can do:

    -
    +
    \GlsXtrSetDefaultGlsOpts{noindex}

    and then use, for example, char⟩ take care of any changes in category code.

    -
    +
    \GlsXtrSetAltModifier{!}{noindex}

    This means that -

    +
    \gls[noindex,hyper=false]{sample}

    you can use \gls![hyper=false]{sample} but you can’t combine the * and ! modifiers. -

    +

    Location lists displayed with \printnoidxglossary internally use +


    \glsnoidxdisplayloc  \glsnoidxdisplayloc{prefix}{counter}{format} +{location}

    +

    +This command is provided by glossaries, but is modified by glossaries-extra to check +for the start and end range formation identifiers ( and ) which are discarded to +obtain the actual control sequence name that forms the location formatting +command. +

    If the range identifiers aren’t present, this just uses +


    \glsxtrdisplaysingleloc  \glsxtrdisplaysingleloc{format}{location} +

    +

    +otherwise it uses +


    \glsxtrdisplaystartloc  \glsxtrdisplaystartloc{format}{location} +

    +

    +for the start of a range (where the identifier has been stripped from ⟨format⟩) +or +


    \glsxtrdisplayendloc  \glsxtrdisplayendloc{format}{location} +

    +

    +for the end of a range (where the identifier has been stripped from ⟨format⟩). +

    By default the start range command saves the format in +


    \glsxtrlocrangefmt  \glsxtrlocrangefmt

    +

    +and does +
    \glsxtrdisplaysingleloc{format}{location} +
    +(If the format is empty, it will be replaced with glsnumberformat.) +

    The end command checks that the format matches the start of the range, +does +


    \glsxtrdisplayendlochook  \glsxtrdisplayendlochook{format}{location} +

    +

    +(which does nothing by default), followed by +
    \glsxtrdisplaysingleloc{format}{location} +
    +and then sets \glsxtrlocrangefmt to empty. + + + +

    This means that the list + + + +

    +
    +\glsnoidxdisplayloc{}{page}{(textbf}{1}, + 
    \glsnoidxdisplayloc{}{page}{textbf}{1}, + 
    \glsnoidxdisplayloc{}{page}{)textbf}{1}. +
    +

    doesn’t display any differently from + + + +

    +
    +\glsnoidxdisplayloc{}{page}{textbf}{1}, + 
    \glsnoidxdisplayloc{}{page}{textbf}{1}, + 
    \glsnoidxdisplayloc{}{page}{textbf}{1}. +
    +

    but it does make it easier to define your own custom list handler that can +accommodate the ranges. +

    -

    Top

    2.3 Entry Counting Modifications

    -

    The

    The \glsenableentrycount command is modified to allow for the entrycount§5 Categories). -

    For example, instead of just doing: +

    For example, instead of just doing:

    -
    +
    \glsenableentrycount
    -

    you now need to do: +

    you now need to do:

    -
    +
    \glsenableentrycount  
    \glssetcategoryattribute{abbreviation}{entrycount}{1}
    -

    This will enable the entry counting for entries in the

    This will enable the entry counting for entries in the abbreviation category, but any entries assigned to other categories will be unchanged. -

    Further information about entry counting, including the new per-unit feature, is +

    Further information about entry counting, including the new per-unit feature, is described in §6 Entry Counting. -

    +

    -

    Top

    2.4 Nested Links

    -

    Complications arise when you use \gls in the value of the name field (or Plurals

    +

    Some languages, such as English, have a general rule that plurals are formed from +the singular with a suffix appended. This isn’t an absolute rule. There are +plenty of exceptions (for example, geese, children, churches, elves, fairies, +sheep). The glossaries package allows the plural key to be optional when +defining entries. In some cases a plural may not make any sense (for example, +the term is a symbol) and in some cases the plural may be identical to the +singular. +

    To make life easier for languages where the majority of plurals can simply be +formed by appending a suffix to the singular, the glossaries package sets lets the plural +field default to the value of the text or field with \glspluralsuffix appended. This +command is defined to be just the letter “s”. This means that the majority of terms +don’t need to have the plural supplied as well, and you only need to use it for the +exceptions. +

    For languages that don’t have this general rule, the plural field will always need to +be supplied, where needed. +

    There are other plural fields, such as firstplural, longplural and shortplural. Again, if +you are using a language that doesn’t have a simple suffix rule, you’ll have to +supply the plural forms if you need them (and if a plural makes sense in the +context). +

    If these fields are omitted, the glossaries package follows these rules:

    + +

    This last case is changed with glossaries-extra. With this extension package, the +shortplural field defaults to the short field with \abbrvpluralsuffix appended +unless overridden by category attributes. This suffix command is set by the +abbreviation styles. This means that every time an abbreviation style is +implemented, \abbrvpluralsuffix is redefined. In most cases its redefined to +use +


    \glsxtrabbrvpluralsuffix  \glsxtrabbrvpluralsuffix

    +

    +which defaults to just \glspluralsuffix. Some of the abbreviation styles have their +own command for the plural suffix, such as \glsxtrscsuffix which is defined +as: + + + +

    +
    +\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}} +
    +

    So if you want to completely strip all the plural suffixes used for abbreviations then +you need to redefine \glsxtrabbrvpluralsuffix not \abbrvpluralsuffix, which +changes with the style. Redefining \acrpluralsuffix will have no affect, since it’s +not used by the new abbreviation mechanism. +

    If you require a mixture (for example, in a multilingual document), there are two +attributes that affect the short plural suffix formation. The first is aposplural which +uses the suffix + + + +

    +
    +'\abbrvpluralsuffix +
    +

    That is, an apostrophe followed by \abbrvpluralsuffix is appended. The second +attribute is noshortplural which suppresses the suffix and simply sets shortplural to the +same as short. +

    +

    +

    Top

    2.5 Nested Links

    +

    Complications arise when you use \gls in the value of the name field (or text or first fields, if set). This tends to occur with abbreviations that extend other abbreviations. For example, SHTML is an abbreviation for SSI enabled HTML, where SSI is an abbreviation for Server Side Includes and HTML is an abbreviation for Hypertext Markup Language. -

    Things can go wrong if we try the following with the

    Things can go wrong if we try the following with the glossaries package:

    -
    +
    \newacronym{ssi}{SSI}{Server Side Includes}  
    \newacronym{html}{HTML}{Hypertext Markup Language}  
    \newacronym{shtml}{S\gls{html}}{\gls{ssi} enabled \gls{html}}
    -

    -

    The main problems are: +

    +

    The main problems are:

    1. The first letter upper casing commands, such as \Gls, won’t work for the + id="dx1-10007">, won’t work for the shtml entry on first use if the long form is displayed before the short form (which is the default abbreviation style). This will attempt to do -
      +
      \gls{\uppercase ssi} enabled \gls{html}
      -

      which just doesn’t work. Grouping the

      which just doesn’t work. Grouping the \gls{ssi} doesn’t work either as this will effectively try to do

      -
      +
      \uppercase{\gls{ssi}} enabled \gls{html}
      -

      This will upper case the label

      This will upper case the label ssi so the entry won’t be recognised. This problem will also occur if you use the all capitals version, such as \GLS. + id="dx1-10009">.

    2. The long and abbreviated forms accessed through \glsentrylong and + id="dx1-10012"> and \glsentryshort are no longer expandable and so can’t be used be used in + id="dx1-10013"> are no longer expandable and so can’t be used be used in contexts that require this, such as PDF bookmarks.
    3. The nested commands may end up in the sort key, which will confuse the + id="dx1-10016"> key, which will confuse the indexing.
    4. The shtml entry produces inconsistent results depending on whether the ssi @@ -2363,18 +2651,18 @@ class="cmtt-10">shtml. For example: -
      +
      This section discusses \gls{ssi}, \gls{html} and \gls{shtml}.
      -

      This produces: +

      This produces:

      -

      This section discusses server side includes (SSI), hypertext +

      This section discusses server side includes (SSI), hypertext markup language (HTML) and SSI enabled HTML (SHTML).

      -

      So the

      So the first use of the shtml entry produces “SSI enabled HTML (SHTML)”. -

      Now let’s suppose the

      Now let’s suppose the html entry is used before the shtml but the ssi entry is @@ -2384,41 +2672,41 @@ class="cmtt-10">shtml entry, for example:

      -
      +
      The sample files are either \gls{html} or \gls{shtml}, but let's  
      first discuss \gls{ssi}.
      -

      This produces: +

      This produces:

      -

      The sample files are either hypertext markup language (HTML) +

      The sample files are either hypertext markup language (HTML) or server side includes (SSI) enabled HTML (SHTML), but let’s first discuss SSI.

      -

      So the

      So the first use of the shtml entry now produces “server side includes (SSI) enabled HTML (SHTML)”, which looks a bit strange. -

      Now let’s suppose the

      Now let’s suppose the shtml entry is used before (or without) the other two entries:

      -
      +
      This article is an introduction to \gls{shtml}.
      -

      This produces: +

      This produces:

      -

      This article is an introduction to server side includes (SSI) +

      This article is an introduction to server side includes (SSI) enabled hypertext markup language (HTML) (SHTML).

      -

      So the

      So the first use of the shtml entry now produces “server side includes (SSI) enabled hypertext markup language (HTML) (SHTML)”, which is even more strange. -

      This is all aggravated by setting the style using the

      This is all aggravated by setting the style using the glossaries package’s \setacronymstyle. For example: @@ -2426,22 +2714,22 @@ class="cmtt-10">\setacronymstyle. For example:

      -
      +
      \setacronymstyle{long-short}
      -

      as this references the label through the use of

      as this references the label through the use of \glslabel when displaying the long and short forms, but this value changes with each use of \gls, so instead of displaying “(SHTML)” at the end of the first use, it now displays “(HTML)”, since \glslabel has been changed to html by \gls{html}. -

      Another oddity occurs if you reset the

      Another oddity occurs if you reset the html entry between uses of the shtml entry. For example: @@ -2449,27 +2737,27 @@ class="cmtt-10">shtml

      -
      +
      \gls{shtml} ... \glsreset{html}\gls{shtml}
      -

      The next use of

      The next use of shtml produces “Shypertext markup language (HTML)”, which is downright weird. -

      Even without this, the short form has nested formatting commands, which +

      Even without this, the short form has nested formatting commands, which amount to \acronymfont{S\acronymfont{HTML}}. This may not be a problem for some styles, but if you use one of the “sm” styles (that use \textsmaller), + id="dx1-10023">), this will produce an odd result.

    5. Each time the shtml entry is used, the html entry will also be indexed and marked as used, and on first use this will happen to both the ssi and html @@ -2477,86 +2765,86 @@ class="cmtt-10">html helpful to the reader.
    6. If hyperref is in use, you’ll get nested hyperlinks and there’s no consistent way + id="dx1-10029"> is in use, you’ll get nested hyperlinks and there’s no consistent way of dealing with this across the available PDF viewers. If on the first + id="dx1-10030">first use case, the user clicks on the “HTML” part of the “SSI enabled HTML (SHTML)” link, they may be directed to the HTML entry in the glossary or they may be directed to the SHTML entry in the glossary.
    -

    For these reasons it’s better to use the simple expandable commands +

    For these reasons it’s better to use the simple expandable commands like \glsentrytext or or \glsentryshort in the definition of other entries + id="dx1-10032"> in the definition of other entries (although that doesn’t fix the first problem). Alternatively use something like:

    -
    +
    \newacronym  
     [description={\acrshort{ssi} enabled \acrshort{html}}]  
     {shtml}{SHTML}{SSI enabled HTML}
    -

    with

    with glossaries or:

    -
    +
    \newabbreviation  
     [description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}]  
     {shtml}{SHTML}{SSI enabled HTML}
    -

    with

    with glossaries-extra. This fixes all the above listed problems (as long as you don’t use \glsdesc). Note that replacing ). Note that replacing \gls with \acrshort in the original example may fix the first use issue, but it doesn’t fix any of the other problems listed above. -

    If it’s simply that you want to use the abbreviation font, you can use +

    If it’s simply that you want to use the abbreviation font, you can use \glsabbrvfont:

    -
    +
    \setabbreviationstyle{long-short-sc}  
    \newabbreviation{ssi}{ssi}{server-side includes}  
    \newabbreviation{html}{html}{hypertext markup language}  
    \newabbreviation{shtml}{shtml}{\glsabbrvfont{ssi} enabled  
    \glsabbrvfont{html}}
    -

    This will pick up the font style setting of the outer entry (shtml, in the above case). +

    This will pick up the font style setting of the outer entry (shtml, in the above case). This isn’t a problem in the above example as all the abbreviations use the same style. -

    However if you’re really determined to use

    However if you’re really determined to use \gls in a field that may be included + id="dx1-10035"> in a field that may be included within some link-text, glossaries-extra patches internals used by the linking commands so that if \gls (or plural or case changing variants) occurs in the link-text it will + id="dx1-10037">link-text it will behave as though you used \glstext[hyper=false,noindex] instead. Grouping is also added so that, for example, when \gls{shtml} is used for the first time the long @@ -2565,19 +2853,19 @@ form

    -
    +
    \gls{ssi} enabled \gls{html}
    -

    is treated as +

    is treated as

    -
    +
    {\glstext[hyper=false,noindex]{ssi}} enabled  
    {\glstext[hyper=false,noindex]{html}}
    -

    This overcomes problems 

    This overcomes problems 4, 5 and 6 listed above, but still doesn’t fix problems 2. Problem 3 usually won’t be an issue as most abbreviation styles set the sort + id="dx1-10039"> key to the short form, so using these commands in the long form but not the short form will only affect entries with a style that sorts according to the long form (such as long-noshort-desc). -

    Additionally, any instance of the long form commands, such as ). +

    Additionally, any instance of the long form commands, such as \glsxtrlong or + id="dx1-10041"> or \acrlong will be temporarily redefined to just use

    + id="dx1-10042"> will be temporarily redefined to just use

    {\glsentrylong{label}}
    (or case-changing versions). Similarly the short form commands, such as \glsxtrshort or or \acrshort will use will use \glsentryshort in the argument of either + id="dx1-10046"> in the argument of either \glsabbrvfont (for \glsxtrshort) or shtml entry had instead been defined as: -
    +
    \newacronym{shtml}{SHTML}{\acrshort{ssi} enabled \acrshort{html}}
    -

    then (using the

    then (using the long-short style) the style) the first use will be like

    -
    +
    {\acronymfont{\glsentryshort{ssi}}} enabled  
    {\acronymfont{\glsentryshort{html}}} (SHTML)
    -

    whereas if the entry is defined as: +

    whereas if the entry is defined as:

    -
    +
    \newabbreviation{shtml}{SHTML}{\glsxtrshort{ssi} enabled  
    \glsxtrshort{html}}
    -

    then the

    then the first use will be like:

    -
    +
    {\glsabbrvfont{\glsentryshort{ssi}}} enabled  
    {\glsabbrvfont{\glsentryshort{html}}} (SHTML)
    -

    Note that the first optional argument of

    Note that the first optional argument of \acrshort or \glsxtrshort is ignored in this context. (The final optional argument will be inserted, if present.) The abbreviation style that governs \glsabbrvfont will be set for will be set for \glsxtrshort. Note + id="dx1-10051">. Note that \acrshort doesn’t set the abbreviation style. -

    Alternatively you can use: -


    Alternatively you can use: +


    \glsxtrp  \glsxtrp{field}{label}

    -

    +

    where ⟨field⟩ is the field label and corresponds to a command in the form \gls\glstext) or in the form \glsxtrfield⟩ (e.g. \glsxtrshort). -

    There’s a shortcut command for the most common fields: -


    There’s a shortcut command for the most common fields: +


    \glsps  \glsps{label}

    -

    +

    which is equivalent to \glsxtrp{short}{label}, and -



    \glspt  \glspt{label}

    -

    +

    which is equivalent to \glsxtrp{text}{label}. -

    The

    The \glsxtrp command behaves much like the \glsfmtfield⟩ commands described @@ -2732,167 +3020,167 @@ href="#sec:headtitle">Entries in Sectioning Titles, Headers, Captions and Conten hook is also suppressed and extra grouping is added. It automatically sets hyper to to false and noindex to to true. If you want to change this, you can use -



    \glsxtrsetpopts  \glsxtrsetpopts{options}

    -

    +

    For example:

    -
    +
    \glsxtrsetpopts{hyper=false}
    -

    will just switch off the hyperlinks but not the indexing. Be careful using +

    will just switch off the hyperlinks but not the indexing. Be careful using this command or you can end up back to the original problem of nested links. -

    The hyper link is re-enabled within glossaries. This is done through the +

    The hyper link is re-enabled within glossaries. This is done through the command: -



    \glossxtrsetpopts  \glossxtrsetpopts

    -

    +

    which by default just does

    -
    +
    \glsxtrsetpopts{noindex}
    -

    You can redefine this if you want to adjust the setting when

    You can redefine this if you want to adjust the setting when \glsxtrp is used in the glossary. For example:

    -
    +
    \renewcommand{\glossxtrsetpopts}{\glsxtrsetpopts{noindex=false}}
    -

    -

    For example, +

    +

    For example,

    -
    +
    \glsxtrp{short}{ssi}
    -

    is equivalent to +

    is equivalent to

    -
    +
    {\let\glspostlinkhook\relax  
     \glsxtrshort[hyper=false,noindex]{ssi}[]%  
    }
    -

    in the main body of the document or +

    in the main body of the document or

    -
    +
    {\let\glspostlinkhook\relax  
     \glsxtrshort[noindex]{ssi}[]%  
    }
    -

    inside the glossary. (Note the post-link hook is locally disabled.) -

    If

    inside the glossary. (Note the post-link hook is locally disabled.) +

    If \glsxtrp{short}{ssi} occurs in a sectioning mark, it’s equivalent to

    -
    +
    {\glsxtrheadshort{ssi}}
    -

    (which recognises the

    (which recognises the headuc attribute.) -

    If attribute.) +

    If hyperref has been loaded, then the bookmark will use has been loaded, then the bookmark will use \glsentryfield⟩ (\glsentryshort{ssi} in the above example). -

    There are similar commands -


    There are similar commands +


    \Glsxtrp  \Glsxtrp{field}{label}

    -

    +

    for first letter upper case and -



    \Glsxtrp  \GLSxtrp{field}{label}

    -

    +

    for all upper case. -

    If you use any of the case-changing commands, such as

    If you use any of the case-changing commands, such as \Gls or or \Glstext, (either + id="dx1-10064">, (either all caps or first letter upper casing) don’t use any of the linking commands, such as \gls or or \glstext, in the definition of entries for any of the fields that may be used + id="dx1-10066">, in the definition of entries for any of the fields that may be used by those case-changing commands.
    -

    -

    You can, with care, protect against issue 

    +

    You can, with care, protect against issue 1 by inserting an empty group at the start if the long form starts with a command that breaks the first letter uppercasing commands like \Gls, but you still won’t be able to use the all caps commands, such as \GLS. -

    If you

    If you really need nested commands, the safest method is

    -
    +
    \newabbreviation{shtml}{shtml}{{}\glsxtrp{short}{ssi} enabled  
    \glsxtrp{short}{html}}
    -

    but be aware that it may have some unexpected results occasionally. -

    Example document: +

    but be aware that it may have some unexpected results occasionally. +

    Example document:

    -
    +
    \documentclass{report}  
    \usepackage[utf8]{inputenc}  
    \usepackage[T1]{fontenc} @@ -2917,20 +3205,20 @@ class="cmti-10">really need nested commands, the safest method is  
    \printglossaries  
    \end{document}
    -

    -

    +

    +

    -

    Top

    2.5

    Top

    2.6 Acronym Style Modifications

    -

    The

    The glossaries-extra package provides a new way of dealing with abbreviations and redefines \newacronym to use to use \newabbreviation (see §3 glossaries-extra is do just add

    -
    +
    \setabbreviationstyle[acronym]{long-short}
    -

    before you define any entries. For example, the following document using just +

    before you define any entries. For example, the following document using just glossaries

    -
    +
    \documentclass{article}  
    \usepackage[acronym,nopostdot,toc]{glossaries}  
    \makeglossaries @@ -2965,13 +3253,13 @@ class="cmss-10">glossaries  
    \printglossaries  
    \end{document}
    -

    can be easily adapted to use

    can be easily adapted to use glossaries-extra:

    -
    +
    \documentclass{article}  
    \usepackage[acronym]{glossaries-extra}  
    \makeglossaries @@ -2982,7 +3270,7 @@ class="cmss-10">glossaries-extra:  
    \printglossaries  
    \end{document}
    -

    Table 

    Table 2.1 lists the nearest equivalent glossaries-extra abbreviation styles for the predefined acronym styles provided by


    @@ -3014,41 +3302,41 @@ class="cmtt-10">\setabbreviationstyle[⟨category]{new-style-name}
    +class="cmtt-10">}
    + id="dx1-11004">

    + id="dx1-11006">

    + id="dx1-11010">

    + id="dx1-11012">

    + id="dx1-11014">

    + id="dx1-11016">

    + id="dx1-11018">

    + id="dx1-11020">

    + id="dx1-11024">

    + id="dx1-11026">

    + id="dx1-11028">

    + id="dx1-11030">

    + id="dx1-11032">

    + id="dx1-11034">

    + id="dx1-11036">

    + id="dx1-11038">

    + id="dx1-11040">

    + id="dx1-11042">

    Old Style Name

    New Style Name

    long-sc-short

    long-short-sc

    long-sm-short

    long-short-sm

    long-sp-short

    long-short

    with \renewcommand{#1}}

    short-long

    short-long

    sc-short-long

    short-sc-long

    sm-short-long

    short-sm-long

    long-short-desc

    long-short-desc

    long-sc-short-desc

    long-short-sc-desc

    long-sm-short-desc

    long-short-sm-desc

    long-sp-short-desc

    long-short-desc

    with \renewcommand{#1}}

    short-long-desc

    short-long-desc

    sc-short-long-desc

    short-sc-long-desc

    sm-short-long-desc

    short-sm-long-desc

    dua

    long-noshort

    dua-desc

    long-noshort-desc

    footnote

    short-footnote

    footnote-sc

    short-sc-footnote

    footnote-sm

    short-sm-footnote

    footnote-desc

    short-footnote-desc

    footnote-sc-desc

    short-sc-footnote-desc

    footnote-sm-desc

    short-sm-footnote-desc

    + id="dx1-11044">


    -

    The reason for introducing the new style of abbreviation commands provided by +

    The reason for introducing the new style of abbreviation commands provided by glossaries-extra is because the original acronym commands provided by glossaries are @@ -3229,175 +3517,175 @@ class="cmss-10">glossaries-extra. However, if you really want to restore the generic acronym function provided by glossaries you can use -



    \RestoreAcronyms  \RestoreAcronyms

    -

    +

    (before any use of \newacronym). -

    \RestoreAcronyms should not be used in combination with the newer glossaries-extra abbreviations. Don’t combine old and new style entries with the same type. The original . The original glossaries acronym mechanism doesn’t work well with the newer glossaries-extra commands. -

    If you use

    If you use \RestoreAcronyms, don’t use any of the commands provided by glossaries-extra intended for abbreviations (such as \glsxtrshort or or \glsfmtshort) + id="dx1-11048">) with entries defined via \newacronym as it will cause unexpected results. + id="dx1-11049"> as it will cause unexpected results.
    -

    -

    In general, there’s rarely any need for

    +

    In general, there’s rarely any need for \RestoreAcronyms. If you have a document that uses \newacronymstyle, then it’s best to either stick with just + id="dx1-11050">, then it’s best to either stick with just glossaries for that document or define an equivalent abbreviation style with \newabbreviationstyle. (See . (See §3.5 Defining New Abbreviation Styles for further details.) -



    \glsacspace  \glsacspace{label}

    -

    +

    The space command \glsacspace used by the long-sp-short acronym style provided + id="dx1-11053"> acronym style provided by glossaries is modified so that it uses -



    \glsacspacemax  \glsacspacemax

    -

    +

    instead of the hard-coded 3em. This is a command not a length and so can be changed using \renewcommand. -

    Any of the new abbreviation styles that use

    Any of the new abbreviation styles that use \glsxtrfullsep (such as (such as long-short) + id="dx1-11056">) can easily be changed to use \glsacspace with

    -
    +
    \renewcommand*{\glsxtrfullsep}[1]{\glsacspace{#1}}
    -

    -

    The

    +

    The first use acronym font command -



    \firstacronymfont{text}

    -

    +

    is redefined to use the first use abbreviation font command first use abbreviation font command \glsfirstabbrvfont. + id="dx1-11059">. This will be reset if you use \RestoreAcronyms. -

    The subsequent use acronym font command -


    The subsequent use acronym font command +


    \acronymfont{text}

    -

    +

    is redefined to use the subsequent use abbreviation font command \glsabbrvfont. + id="dx1-11060">. This will be reset if you use \RestoreAcronyms.

    -

    Top

    2.6

    Top

    2.7 Glossary Style Modifications

    -

    The default value of

    The default value of \glslistdottedwidth is changed so that it’s set at the start + id="dx1-12001"> is changed so that it’s set at the start of the document (if it hasn’t been changed in the preamble). This should take into account situations where \hsize isn’t set until the start of the document. -

    +

    -

    Top

    2.6.1

    Top

    2.7.1 Style Hooks

    -

    The commands

    The commands \glossentryname and and \glossentrydesc are modified to take into + id="dx1-13002"> are modified to take into account the glossname, , glossdesc and and glossdescfont attributes (see attributes (see §5 Categories). This means you can make simple case-changing modifications to the name and description without defining a new glossary style. -

    There is a hook after

    There is a hook after \glossentryname and and \Glossentryname: -


    : +


    \glsxtrpostnamehook  \glsxtrpostnamehook{label}

    -

    +

    By default this checks the indexname attribute. If the attribute exists for the + id="dx1-13009"> attribute. If the attribute exists for the category to which the label belongs, then the name is automatically indexed using -



    \glsxtrdoautoindexname{label}{indexname}

    -

    +

    See §7 Auto-Indexing for fur -

    As from version 1.04, the post-name hook

    As from version 1.04, the post-name hook \glsxtrpostnamehook will also use \glsxtrpostnamecategory⟩ if it exists. You can use \glscurrententrylabel to + id="dx1-13011"> to obtain the entry label with the definition of this command. For example, suppose you are using a glossary style the doesn’t display the symbol, you can insert the symbol after the name for a particular category, say, the “symbol” @@ -3420,25 +3708,25 @@ category:

    -
    +
    \newcommand*{\glsxtrpostnamesymbol}{\space  
     (\glsentrysymbol{\glscurrententrylabel})}
    -

    -

    The post-description code used within the glossary is modified so that it also +

    +

    The post-description code used within the glossary is modified so that it also does -



    \glsxtrpostdescription  \glsxtrpostdescription

    -

    +

    This occurs before the original \glspostdescription, so if the nopostdot=false + id="dx1-13013"> option is used, it will be inserted before the terminating full stop. -

    This new command will do

    This new command will do \glsxtrpostdesccategory⟩ if it exists, where ⟨category⟩ is the category label associated with th \glsxtrpostdescgeneral for entries with the category set to general or + id="dx1-13014"> or \glsxtrpostdescacronym for entries with the category set to acronym. -

    Since both . +

    Since both \glossentry and \subglossentry set -



    \glscurrententrylabel  \glscurrententrylabel

    -

    +

    to the label for the current entry, you can use this within the definition of these post-description hooks if you need to reference the label. -

    For example, suppose you want to insert the plural form in brackets after the +

    For example, suppose you want to insert the plural form in brackets after the description in the glossary, but only for entries in the general category, then you could + id="dx1-13017"> category, then you could do:

    -
    +
    \renewcommand{\glsxtrpostdescgeneral}{\space  
     (plural: \glsentryplural{\glscurrententrylabel})}
    -

    This means you don’t have to define a custom glossary style, which you may find +

    This means you don’t have to define a custom glossary style, which you may find more complicated. (It also allows more flexibility if you decide to change the underlying glossary style.) -

    This feature can’t be used for glossary styles that ignore

    This feature can’t be used for glossary styles that ignore \glspostdescription or if you redefine \glspostdescription without including \glsxtrpostdescription. class="cmtt-10">\glspostdescription to do nothing instead of using the nopostdot option to suppress the terminating full stop.) See §2.6.3 The + id="dx1-13018"> option to suppress the terminating full stop.) See §2.7.3 The glossaries-extra-stylemods Package to patch the predefined styles provided by glossaries that are missing \glspostdescription.
    -

    -

    +

    +

    -

    Top

    2.6.2

    Top

    2.7.2 Number List

    -

    The

    The number list is now placed inside the argument of -



    \GlsXtrFormatLocationList  \GlsXtrFormatLocationList{number list}

    -

    +

    This is internally used by \glossaryentrynumbers. The nonumberlist option + id="dx1-14003"> option redefines \glossaryentrynumbers so that it doesn’t display the number list, but it + id="dx1-14004">number list, but it still saves the number list in case it’s required. -

    If you want to suppress the number list always use the number list in case it’s required. +

    If you want to suppress the number list always use the nonumberlist option + id="dx1-14007"> option instead of redefining \glossaryentrynumbers to do nothing.
    -

    -

    If you want to, for example, change the font for the entire number list +

    +

    If you want to, for example, change the font for the entire number list then redefine \GlsXtrFormatLocationList as appropriate. Don’t modify \glossaryentrynumbers. -

    Sometimes users like to insert “page” or “pages” in front of the number list. This +

    Sometimes users like to insert “page” or “pages” in front of the number list. This is quite fiddly to do with the base glossaries package, but glossaries-extra provides a way of doing this. First you need to enable this option and specify the text to display using: -



    \GlsXtrEnablePreLocationTag  \GlsXtrEnablePreLocationTag{page}{pages}

    -

    +

    where ⟨page⟩ is the text to display if the number list only contains a single location and + id="dx1-14011">number list only contains a single location and ⟨pages⟩ is the text to display otherwise. For example:

    -
    +
    \GlsXtrEnablePreLocationTag{Page: }{Pages: }
    -

    An extra run is required when using this command. -

    Use

    An extra run is required when using this command. +

    Use glsignore not @gobble as the format if you want to suppress the page number (and only index the entry once).
    -

    -

    See the accompanying sample file

    +

    See the accompanying sample file sample-pages.tex. -

    -

    -

    Top

    2.6.3 The

    Note that bib2gls can be instructed to insert a prefix at the start of non-empty +location lists, which can be used as an alternative to \GlsXtrEnablePreLocationTag. +

    +

    +

    Top

    2.7.3 The glossaries-extra-stylemods Package

    -

    As from v1.02,

    As from v1.02, glossaries-extra now includes the package glossaries-extra-stylemods that + id="dx1-15001"> that will redefine the predefined styles to include the post-description hook (for those that are missing it). You will need to make sure the styles have already been defined before loading glossaries-extra. For example:

    -
    +
    \usepackage{glossaries-extra}  
    \usepackage{glossary-longragged}  
    \usepackage{glossaries-extra-stylemods}
    -

    Alternatively you can load

    Alternatively you can load glossary-name.sty at the same time by passing ⟨name⟩ as a package option to glossaries-extra-stylemods. For example: + id="dx1-15002">. For example:

    -
    +
    \usepackage{glossaries-extra}  
    \usepackage[longragged]{glossaries-extra-stylemods}
    -

    Another option is to use the

    Another option is to use the stylemods key when you load key when you load glossaries-extra. You can omit a value if you only want to use the predefined styles that are automatically loaded by glossaries (for example, the long3col style): + id="dx1-15004"> style):

    -
    +
    \usepackage[style=long3col,stylemods]{glossaries-extra}
    -

    Or the value of

    Or the value of stylemods may be a comma-separated list of the style package + id="dx1-15005"> may be a comma-separated list of the style package identifiers. For example:

    -
    +
    \usepackage[style=mcoltree,stylemods=mcols]{glossaries-extra}
    -

    Remember to group the value if it contains any commas: +

    Remember to group the value if it contains any commas:

    -
    +
    \usepackage[stylemods={mcols,longbooktabs}]{glossaries-extra}
    -

    -

    Note that the

    +

    Note that the inline style is dealt with slightly differently. The original definition + id="dx1-15006"> style is dealt with slightly differently. The original definition provided by the glossary-inline package uses package uses \glspostdescription at the end of the glossary (not after each entry description) within the definition of \glspostinline. @@ -3669,152 +3964,152 @@ class="cmtt-10">\glsxtrpostdescription (not \glspostdescription). This means that the modified inline style isn’t affected by the style isn’t affected by the nopostdot option, but the post-description + id="dx1-15009"> option, but the post-description category hook can still be used. -

    As from version 1.05, the

    As from version 1.05, the glossaries-extra-stylemods package provides some additional commands for use with the alttree style to make it easier to modify. These + id="dx1-15010"> style to make it easier to modify. These commands are only defined if the glossary-tree package has already been loaded, + id="dx1-15011"> package has already been loaded, which is typically the case unless the notree option has been used when loading + id="dx1-15012"> option has been used when loading glossaries. -



    \eglssetwidest  \eglssetwidest[level]{name}

    -

    +

    This is like \glssetwidest (provided by glossary-tree) but performs a protected + id="dx1-15014">) but performs a protected expansion on ⟨name⟩. This has a localised effect. For a global setting, use -



    \xglssetwidest  \xglssetwidest[level]{name}

    -

    +

    The widest entry value can later be retrieved using -



    \glsgetwidestname  \glsgetwidestname

    -

    +

    for the top-level entries and -



    \glsgetwidestsubname  \glsgetwidestsubname{level}

    -

    +

    for sub-entries, where ⟨level⟩ is the level number. -

    The command

    The command \glsfindwidesttoplevelname provided by glossary-tree has a + id="dx1-15018"> has a CamelCase synonym: -



    \glsFindWidestTopLevelName  \glsFindWidestTopLevelName[glossary list]

    -

    +

    Similar commands are also provided: -



    \glsFindWidestUsedTopLevelName  \glsFindWidestUsedTopLevelName[glossary list]

    -

    +

    This has an additional check that the entry has been used. Naturally this is only useful if the glossaries that use the alttree style occur at the end of the document. + id="dx1-15021"> style occur at the end of the document. This command should be placed just before the start of the glossary. (Alternatively, place it at the end of the document and save the value in the auxiliary file for the next run.) -



    \glsFindWidestUsedAnyName  \glsFindWidestUsedAnyName[glossary list]

    -

    +

    This is like the previous command but if doesn’t check the parent key. This is useful if + id="dx1-15023"> key. This is useful if all levels should have the same width for the name. -



    \glsFindWidestAnyName  \glsFindWidestAnyName[glossary list]

    -

    +

    This is like the previous command but doesn’t check if the entry has been used. -



    \glsFindWidestUsedLevelTwo  \glsFindWidestUsedLevelTwo[glossary list]

    -

    +

    This is like \glsFindWidestUsedTopLevelName but also sets the first two sub-levels as well. Any entry that has a great-grandparent is ignored. -



    \glsFindWidestLevelTwo  \glsFindWidestLevelTwo[glossary list]

    -

    +

    This is like the previous command but doesn’t check if the entry has been used. -



    \glsFindWidestUsedAnyNameSymbol  \glsFindWidestUsedAnyNameSymbol [glossary list]{register}

    -

    +

    This is like \glsFindWidestUsedAnyName but also measures the symbol. The length of the widest symbol is stored in ⟨register⟩. -



    \glsFindWidestAnyNameSymbol  \glsFindWidestAnyNameSymbol[glossary list]{register}

    -

    +

    This is like the previous command but it doesn’t check if the entry has been used. -



    \glsFindWidestUsedAnyNameSymbolLocation  \glsFindWidestUsedAnyNameSymbolLocation [symbol register}{location register}

    -

    +

    This is like \glsFindWidestUsedAnyNameSymbol but also measures the number list. This requires \glsentrynumberlist (see the (see the glossaries user manual). The length of the widest symbol is stored in ⟨symbol register⟩ and the length of the widest number + id="dx1-15032">number list is stored in ⟨location register⟩. -



    \glsFindWidestAnyNameSymbolLocation  \glsFindWidestAnyNameSymbolLocation [symbol register}{location register}

    -

    +

    This is like the previous command but it doesn’t check if the entry has been used. -



    \glsFindWidestUsedAnyNameLocation  \glsFindWidestUsedAnyNameLocation [}

    -

    +

    This is like \glsFindWidestUsedAnyNameSymbolLocation but doesn’t measure the symbol. The length of the widest number list is stored in ⟨number list is stored in ⟨register⟩. -



    \glsFindWidestAnyNameLocation  \glsFindWidestAnyNameLocation[glossary list]{register}

    -

    +

    This is like the previous command but doesn’t check if the entry has been used. -

    The layout of the symbol, description and

    The layout of the symbol, description and number list is governed by -



    \glsxtralttreeSymbolDescLocation  \glsxtralttreeSymbolDescLocation {label}{number list}

    -

    +

    for top-level entries and -



    \glsxtralttreeSubSymbolDescLocation  \glsxtralttreeSubSymbolDescLocation {label}{number list}

    -

    +

    for sub-entries. -

    There is now a user level command that performs the initialisation for the

    There is now a user level command that performs the initialisation for the alttree + id="dx1-15040"> style: -



    \glsxtralttreeInit  \glsxtralttreeInit

    -

    -

    The paragraph indent for subsequent paragraphs in multi-paragraph descriptions +

    +

    The paragraph indent for subsequent paragraphs in multi-paragraph descriptions is provided by the length -



    \glsxtrAltTreeIndent  \glsxtrAltTreeIndent

    -

    -

    For additional commands that are available with the

    +

    For additional commands that are available with the alttree style, see the + id="dx1-15043"> style, see the documented code (glossaries-extra-code.pdf). For examples, see the accompanying sample files sample-alttree-marginpar.tex.

    -

    -

    +

    Top

    3. Abbreviations

    -

    Abbreviations include acronyms (words formed from initial letters, such as +

    Abbreviations include acronyms (words formed from initial letters, such as “laser”), initialisms (initial letters of a phrase, such as “html”, that aren’t pronounced as words) and contractions (where parts of words are omitted, often replaced by an apostrophe, such as “don’t”). The “acronym” code provided by the @@ -3991,19 +4286,19 @@ replaced by an apostrophe, such as “don’t”). The “acrony class="cmss-10">glossaries package is misnamed as it’s more often than not used for initialisms instead. Acronyms tend not to be expanded on first use (although they may need to be described for readers unfamiliar with the term). They are therefore more like a regular term, which may or may not require a description in the glossary. -

    The

    The glossaries-extra package corrects this misnomer, and provides better abbreviation handling, with -



    \newabbreviation  \newabbreviation[options]{}{long}

    -

    -

    This sets the

    +

    This sets the category key to key to abbreviation by default, but that value may be overridden in ⟨options⟩. The category may have attributes that modify the way abbreviations are defined. For example, the insertdots attribute will automatically + id="dx1-16004"> attribute will automatically insert full stops (periods) into ⟨short⟩ or the noshortplural attribute will set the default + id="dx1-16005"> attribute will set the default value of the shortplural key to just ⟨ key to just ⟨short⟩ (without appending the plural suffix). See §5 Categories for further details. -

    See

    See §2.4 §2.5 Nested Links regarding the pitfalls of using commands like \gls or + id="dx1-16007"> or \glsxtrshort within ⟨ within ⟨short⟩ or ⟨long⟩. -

    Make sure that you set the category attributes before defining new abbreviations +

    Make sure that you set the category attributes before defining new abbreviations or they may not be correctly applied.
    -

    -

    The

    +

    The \newacronym command provided by the command provided by the glossaries package is redefined by glossaries-extra to use \newabbreviation with the category set to set to acronym (see also §2.5 §2.6 Acronym Style Modifications) so -



    \newacronym  \newacronym[options]{short}{long}

    -

    +

    is now equivalent @@ -4103,122 +4398,122 @@ class="cmtt-10">}
    -

    The

    The \newabbreviation command is superficially similar to the glossaries package’s \newacronym but you can apply different styles to different categories. The default style is short-nolong for entries in the for entries in the acronym category and category and short-long for + id="dx1-16014"> for entries in the abbreviation category. (These aren’t the same as the acronym + id="dx1-16015"> category. (These aren’t the same as the acronym styles provided by the glossaries package, although they may produce similar results.) -

    The short form is displayed within commands like

    The short form is displayed within commands like \gls using -



    \glsfirstabbrvfont  \glsfirstabbrvfont{short-form}

    -

    +

    on first use and -



    \glsabbrvfont  \glsabbrvfont{short-form}

    -

    +

    for subsequent use. -

    These commands (

    These commands (\glsfirstabbrvfont and \glsabbrvfont) are reset by the abbreviation styles and whenever an abbreviation is used by commands like \gls (but not by commands like \glsentryshort) so don’t try redefining them outside of + id="dx1-16019">) so don’t try redefining them outside of an abbreviation style.
    -

    -

    If you use the

    +

    If you use the long-short style, style, \glsabbrvfont is redefine to use -



    \glsabbrvdefaultfont  \glsabbrvdefaultfont{text}

    -

    +

    whereas the long-short-sc style redefines style redefines \glsabbrvfont to use \glsxtrscfont. If you want to use a different font-changing command you can either redefine \glsabbrvdefaultfont and use one of the base styles, such as long-short, or define a + id="dx1-16023">, or define a new style in a similar manner to the “sc”, “sm” or “em” styles. -

    Similarly the basic styles redefine

    Similarly the basic styles redefine \glsfirstabbrvfont to use -



    \glsfirstabbrvdefaultfont  \glsfirstabbrvdefaultfont{short-form}

    -

    +

    whereas the font modifier styles, such as long-short-sc, use their own custom + id="dx1-16025">, use their own custom command, such as \glsfirstscfont. -

    The commands that display the full form for abbreviations use

    The commands that display the full form for abbreviations use \glsfirstabbrvfont to display the short form and -



    \glsfirstlongfont  \glsfirstlongfont{long-form}

    -

    +

    to display the long form on first use or for the inline full format. Commands like + id="dx1-16027">first use or for the inline full format. Commands like \glsxtrlong use -



    \glslongfont  \glslongfont{long-form}

    -

    +

    instead. -

    As with

    As with \glsabbrvfont, this command is changed by all styles. Currently + id="dx1-16029">, this command is changed by all styles. Currently all predefined abbreviation styles, except the “long-em” (emphasize long form) versions, provided by glossaries-extra redefine \glsfirstlongfont to use -



    \glsfirstlongdefaultfont  \glsfirstlongdefaultfont{long-form}

    -

    +

    and \glslongfont to use -



    \glslongdefaultfont  \glslongdefaultfont{long-form}

    -

    -

    You can redefine these command if you want to change the font used by the long +

    +

    You can redefine these command if you want to change the font used by the long form for all your abbreviations (except for the emphasize-long styles), or you can define your own abbreviation style that provides a different format for only those abbreviations defined with that style. -

    The “long-em” (emphasize long) styles use -


    The “long-em” (emphasize long) styles use +


    \glsfirstlongemfont  \glsfirstlongemfont{long-form}

    -

    +

    instead of \glsfirstlongdefaultfont{long-form} and -



    \glslongemfont  \glslongemfont{long-form}

    -

    +

    instead of \glslongdefaultfont{long-form}. The first form \glsfirstlongemfont is initialised to use \glslongemfont. -

    Note that by default inserted material (provided in the final optional argument of +

    Note that by default inserted material (provided in the final optional argument of commands like \gls), is placed outside the font command in the predefined styles. To move it inside, use: -



    \glsxtrinsertinsidetrue  \glsxtrinsertinsidetrue

    -

    +

    This applies to all the predefined styles. For example:

    -
    +
    \setabbreviationstyle{long-short}  
    \renewcommand*{\glsfirstlongdefaultfont}[1]{\emph{#1}}  
    \glsxtrinsertinsidetrue
    -

    This will make the long form and the inserted text emphasized, whereas the default +

    This will make the long form and the inserted text emphasized, whereas the default (without \glsxtrinsertinsidetrue) would place the inserted text outside of the emphasized font. -

    Note that for some styles, such as the

    Note that for some styles, such as the short-long, the inserted text would be + id="dx1-16035">, the inserted text would be placed inside the font command for the short form (rather than the long form in the above example). -

    There are two types of full forms. The display full form, which is used on +

    There are two types of full forms. The display full form, which is used on first use by commands like \gls and the inline full form, which is used by + id="dx1-16037"> and the inline full form, which is used by commands like \glsxtrfull. For some of the abbreviation styles, such as + id="dx1-16038">. For some of the abbreviation styles, such as long-short, the display and inline forms are the same. In the case of styles + id="dx1-16039">, the display and inline forms are the same. In the case of styles such as short-nolong or or short-footnote, the display and inline full forms are + id="dx1-16041">, the display and inline full forms are different. -

    These formatting commands aren’t stored in the

    These formatting commands aren’t stored in the short, , shortplural, , long or + id="dx1-16044"> or longplural fields, which means they won’t be used within commands like + id="dx1-16045"> fields, which means they won’t be used within commands like \glsentryshort (but they are used within commands like \glsxtrshort and \glsfmtshort). Note that \glsxtrlong and the case-changing variants don’t use + id="dx1-16046"> and the case-changing variants don’t use \glsfirstlongfont.

    -

    Top

    3.1 Tagging Initials

    -

    If you would like to tag the initial letters in the long form such that those letters are +

    If you would like to tag the initial letters in the long form such that those letters are underlined in the glossary but not in the main part of the document, you can use -



    \GlsXtrEnableInitialTagging  \GlsXtrEnableInitialTagging{categories} @@ -4362,31 +4657,31 @@ class="cmtt-10">} class="cmtt-10">{⟨cs}

    -

    +

    before you define your abbreviations. -

    This command (robustly) defines ⟨

    This command (robustly) defines ⟨cs⟩ (a control sequence) to accept a single argument, which is the letter (or letters) that needs to be tagged. The normal behaviour of this command within the document is to simply do its argument, but in the glossary it’s activated for those categories that have the tagging attribute set to + id="dx1-17002"> attribute set to “true”. For those cases it will use -



    \glsxtrtagfont  \glsxtrtagfont{text}

    -

    +

    This command defaults to \underline{text} but may be redefined as required. -

    The control sequence ⟨

    The control sequence ⟨cs⟩ can’t already be defined when used with the unstarred version of \GlsXtrEnableInitialTagging for safety reasons. The starred @@ -4398,38 +4693,38 @@ class="cmti-10">cs⟩. As with redefining any commands, ensure that you don’t redefine something important. In fact, just forget the existence of the starred version and let’s pretend I didn’t mention it. -

    The first argument of

    The first argument of \GlsXtrEnableInitialTagging is a comma-separated list of category names. The tagging attribute will automatically be set for those + id="dx1-17005"> attribute will automatically be set for those categories. You can later set this attribute for other categories (see §5 Categories) but this must be done before the glossary is displayed. -

    The accompanying sample file

    The accompanying sample file sample-mixtures.tex uses initial tagging for both the acronym and and abbreviation categories: + id="dx1-17007"> categories:

    -
    +
    \GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag}
    -

    This defines the command

    This defines the command \itag which can be used in the definitions. For example:

    -
    +
    \newacronym  
     [description={a system for detecting the location and  
     speed of ships, aircraft, etc, through the use of radio @@ -4441,27 +4736,27 @@ example:  
    \newabbreviation{xml}{XML}  
     {e\itag{x}tensible \itag{m}arkup \itag{l}anguage}
    -

    The underlining of the tagged letters only occurs in the glossary and then only for +

    The underlining of the tagged letters only occurs in the glossary and then only for entries with the tagging attribute set. -

    + id="dx1-17008"> attribute set. +

    -

    Top

    3.2 Abbreviation Styles

    -

    The abbreviation style must be set before abbreviations are defined using: -


    The abbreviation style must be set before abbreviations are defined using: +


    \setabbreviationstyle  \setabbreviationstyle[category]{style-name}

    -

    +

    where ⟨style-name⟩ is the name of the style and ⟨category⟩ is the category label @@ -4473,20 +4768,20 @@ class="cmtt-10">abbreviation category. Some styles may automatically modify one or more of the attributes associated with the given category. For example, the long-noshort and and short-nolong styles set the styles set the regular attribute to + id="dx1-18004"> attribute to true. -

    If you want to apply different styles to groups of abbreviations, assign a +

    If you want to apply different styles to groups of abbreviations, assign a different category to each group and set the style for the given category.
    -

    -

    Note that

    +

    Note that \setacronymstyle is disabled by is disabled by glossaries-extra. Use

    }
    instead. The original acronym interface can be restored with \RestoreAcronyms (see + id="dx1-18006"> (see §2.5 §2.6 Acronym Style Modifications). However the original acronym interface is incompatible with all the commands described here. -

    Abbreviations can be used with the standard

    Abbreviations can be used with the standard glossaries commands, such as \gls, + id="dx1-18007">, but don’t use the acronym commands like \acrshort (which use (which use \acronymfont). + id="dx1-18009">). The short form can be produced with: -



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

    -

    +

    (Use this instead of \acrshort.) -

    The long form can be produced with -


    .) +

    The long form can be produced with +


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

    -

    +

    (Use this instead of \acrlong.) -

    The .) +

    The inline full form can be produced with -



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

    -

    +

    (This this instead of \acrfull.) -

    As mentioned earlier, the inline full form may not necessarily match the format + id="dx1-18015">.) +

    As mentioned earlier, the inline full form may not necessarily match the format used on first use with \gls. For example, the short-nolong style only displays the + id="dx1-18017"> style only displays the short form on first use, but the full form will display the long form followed by the + id="dx1-18018">first use, but the full form will display the long form followed by the short form in parentheses. -

    If you want to use an abbreviation in a chapter or section title, use the +

    If you want to use an abbreviation in a chapter or section title, use the commands described in §4 Entries in Sectioning Titles, Headers, Captions and Contents instead.
    -

    -

    The arguments ⟨

    +

    The arguments ⟨options⟩, ⟨label⟩ and ⟨insert⟩ are the same as for commands such as \glstext. There are also analogous case-changing commands: -

    First letter upper case short form: -


    First letter upper case short form: +


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

    -

    -

    First letter upper case long form: -


    +

    First letter upper case long form: +


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

    -

    -

    First letter upper case inline full form: -


    +

    First letter upper case inline full form: +


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

    -

    -

    All upper case short form: -


    +

    All upper case short form: +


    \Glsxtrshort  \GLSxtrshort[options]{label}[insert]

    -

    -

    All upper case long form: -


    +

    All upper case long form: +


    \Glsxtrlong  \GLSxtrlong[options]{]

    -

    -

    All upper case inline full form: -


    +

    All upper case inline full form: +


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

    -

    -

    Plural forms are also available. -

    Short form plurals: -


    +

    Plural forms are also available. +

    Short form plurals: +


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

    -

    -


    +


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

    -

    -


    +


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

    -

    -

    Long form plurals: -


    +

    Long form plurals: +


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

    -

    -


    +


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

    -

    -


    +


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

    -

    -

    Full form plurals: -


    +

    Full form plurals: +


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

    -

    -


    +


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

    -

    -


    +


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

    -

    -

    Be careful about using

    +

    Be careful about using \glsentryfull, \Glsentryfull, \glsentryfullpl and @@ -4788,24 +5083,24 @@ class="cmtt-10">\Glsentryfullpl. These commands will use the currently ap than the style in use when the entry was defined. If you have mixed styles, you’ll need to use \glsxtrfull instead. Similarly for instead. Similarly for \glsentryshort etc.
    -

    +

    -

    +

    -

    Top

    3.3 Shortcut Commands

    -

    The abbreviation shortcut commands can be enabled using the package option +

    The abbreviation shortcut commands can be enabled using the package option shortcuts=abbreviation (or (or shortcuts=abbr). This defines the commands listed in + id="dx1-19002">). This defines the commands listed in table 3.1.

    @@ -4813,7 +5108,7 @@ href="#tab:abbrshortcuts">table 3.1. -


    @@ -4821,7 +5116,7 @@ href="#tab:abbrshortcuts">table 3.1.
    Table 3.1: Abbreviation Shortcut Commands
    +class="content">Abbreviation Shortcut Commands
    Equivalent Command style="vertical-align:baseline;" id="TBL-3-2-"> + id="dx1-19005"> + id="dx1-19007"> + id="dx1-19009"> + id="dx1-19011"> + id="dx1-19013"> + id="dx1-19015"> + id="dx1-19017"> + id="dx1-19019"> + id="dx1-19021"> + id="dx1-19023"> + id="dx1-19025"> + id="dx1-19027"> + id="dx1-19029"> + id="dx1-19031"> + id="dx1-19033"> + id="dx1-19035"> + id="dx1-19037"> + id="dx1-19039"> + id="dx1-19041"> + id="dx1-19043">
    \ab \cgls
    \abp \cglspl
    \as \glsxtrshort
    \asp \glsxtrshortpl
    \al \glsxtrlong
    \alp \glsxtrlongpl
    \af \glsxtrfull
    \afp \glsxtrfullpl
    \As \Glsxtrshort
    \Asp \Glsxtrshortpl
    \Al \Glsxtrlong
    \Alp \Glsxtrlongpl
    \Af \Glsxtrfull
    \Afp \Glsxtrfullpl
    \AS \GLSxtrshort
    \ASP \GLSxtrshortpl
    \AL \GLSxtrlong
    \ALP \GLSxtrlongpl
    \AF \GLSxtrfull
    \AFP \GLSxtrfullpl
    \newabbr \newabbreviation
    + id="dx1-19045">

    -

    Top

    3.4 Predefined Abbreviation Styles

    -

    There are two types of abbreviation styles: those that treat the abbreviation as a +

    There are two types of abbreviation styles: those that treat the abbreviation as a regular entry (so that \gls uses uses \glsgenentryfmt) and those that don’t treat the + id="dx1-20002">) and those that don’t treat the abbreviation as a regular entry (so that \gls uses uses \glsxtrgenabbrvfmt). -

    The regular entry abbreviation styles set the ). +

    The regular entry abbreviation styles set the regular attribute to “true” for the + id="dx1-20005"> attribute to “true” for the category assigned to each abbreviation with that style. This means that on first use, \gls uses the value of the uses the value of the first field and on subsequent use field and on subsequent use \gls uses the value of the + id="dx1-20009"> uses the value of the text field (and analogously for the plural and case-changing versions). The field (and analogously for the plural and case-changing versions). The short and + id="dx1-20011"> and long fields are set as appropriate and may be accessed through commands like + id="dx1-20012"> fields are set as appropriate and may be accessed through commands like \glsxtrshort. -

    The other abbreviation styles don’t modify the . +

    The other abbreviation styles don’t modify the regular attribute. The attribute. The first + id="dx1-20015"> and text fields (and their plural forms) are set and can be accessed through + id="dx1-20016"> fields (and their plural forms) are set and can be accessed through commands like \glsfirst, but they aren’t used by commands like \gls, which + id="dx1-20017">, which instead use the short form (stored in the short key) and the display full + id="dx1-20018"> key) and the display full format (through commands like \glsxtrfullformat that are defined by the + id="dx1-20019"> that are defined by the style). -

    In both cases, the first use of

    In both cases, the first use of \gls may not match the text produced by + id="dx1-20021"> may not match the text produced by \glsfirst (and likewise for the plural and case-changing versions). -

    For the “sc” styles that use (and likewise for the plural and case-changing versions). +

    For the “sc” styles that use \textsc, be careful about your choice of fonts as + id="dx1-20023">, be careful about your choice of fonts as some only have limited support. For example, you may not be able to combine bold and small-caps. I recommend that you at least use the fontenc package with the package with the T1 option or something similar.
    -

    -

    The “sc” styles all use -


    +

    The “sc” styles all use +


    \glsxtrscfont  \glsxtrscfont{text}

    -

    +

    which is defined as

    -
    +
    \newcommand*{\glsxtrscfont}[1]{\textsc{#1}}
    -

    and -


    and +


    \glsxtrfirstscfont  \glsxtrfirstscfont{text}

    -

    +

    which is defined as

    -
    +
    \newcommand*{\glsxtrfirstscfont}[1]{\glsxtrscfont{#1}}
    -

    The default plural suffix for the short form is set to -


    The default plural suffix for the short form is set to +


    \glsxtrscsuffix  \glsxtrscsuffix

    -

    +

    This just defined as

    -
    +
    \newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}}
    -

    The

    The \glstextup command is provided by command is provided by glossaries and is used to switch off the small caps font for the suffix. If you override the default short plural using the shortplural key when you define the abbreviation you will need to make the + id="dx1-20029"> key when you define the abbreviation you will need to make the appropriate adjustment if necessary. (Remember that the default plural suffix behaviour can be modified through the use of the aposplural and and noshortplural + id="dx1-20031"> attributes. See §5 Categories for further details.) -

    Remember that

    Remember that \textsc renders lowercase letters as small capitals. Uppercase letters are rendered as normal uppercase letters, so if you specify the short form in @@ -5157,132 +5452,132 @@ its argument to lowercase. For example:

    -
    +
    \renewcommand*{\glsxtrscfont}[1]{\textsc{\MakeLowercase{#1}}}
    -

    -

    The “sm” styles all use -


    +

    The “sm” styles all use +


    \glsxtrsmfont  \glsxtrsmfont{text}

    -

    +

    This is defined as:

    -
    +
    \newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}}
    -

    and -


    and +


    \glsxtrfirstsmfont  \glsxtrfirstsmfont{text}

    -

    +

    which is defined as

    -
    +
    \newcommand*{\glsxtrfirstsmfont}[1]{\glsxtrsmfont{#1}}
    -

    If you want to use this style, you must explicitly load the

    If you want to use this style, you must explicitly load the relsize package which + id="dx1-20034"> package which defines the \textsmaller command. If you want to easily switch between the “sc” + id="dx1-20035"> command. If you want to easily switch between the “sc” and “sm” styles, you may find it easier to redefine this command to convert to upper case:

    -
    +
    \renewcommand*{\glsxtrsmfont}[1]{\textsmaller{\MakeTextUppercase{#1}}}
    -

    The default plural suffix for the short form is set to -


    The default plural suffix for the short form is set to +


    \glsxtrsmsuffix  \glsxtrsmsuffix

    -

    +

    This just does \glspluralsuffix. -

    The “em” styles all use -


    . +

    The “em” styles all use +


    \glsabbrvemfont  \glsabbrvemfont{text}

    -

    +

    which is defined as:

    -
    +
    \newcommand*{\glsabbrvemfont}[1]{\emph{#1}}
    -

    and -


    and +


    \glsfirstabbrvemfont  \glsfirstabbrvemfont{text}

    -

    +

    which is defined as:

    -
    +
    \newcommand*{\glsfirstabbrvemfont}[1]{\glsabbrvemfont{#1}}
    -

    -

    Some of the styles use -


    +

    Some of the styles use +


    \glsxtrfullsep  \glsxtrfullsep{label}

    -

    +

    as a separator between the long and short forms. This is defined as a space by default, but may be changed as required. For example:

    -
    +
    \renewcommand*{\glsxtrfullsep}[1]{~}
    -

    or +

    or

    -
    +
    \renewcommand*{\glsxtrfullsep}[1]{\glsacspace{#1}}
    -

    -

    The new naming scheme for abbreviation styles is as follows:

    +

    +

    The new naming scheme for abbreviation styles is as follows:

    • field1⟩[field2⟩[-modifier2⟩][-user] -

      This is for the parenthetical styles. The

      This is for the parenthetical styles. The -modifier⟩ parts may be omitted. These styles display ⟨field2⟩ in parentheses. If ⟨field2⟩ starts with “no” then the parenthetical element is omitted from the display style but is included in the inline style. -

      If the

      If the -modifier⟩ part is present, then the field has a font changing command applied to it. -

      If the

      If the -user part is present, then the user1 value, if provided, is inserted + id="dx1-20041"> value, if provided, is inserted into the parenthetical material . (The field used for the inserted material may be changed.) -

      Examples:

      +

      Examples:

      • long-noshort-sc: ⟨: ⟨field1⟩ is the long form, the short form is set in smallcaps but omitted in the display style.
      • long-em-short-em: both the long form and the short form are + id="dx1-20043">: both the long form and the short form are emphasized. The short form is in parentheses.
      • long-short-em: the short form is emphasized but not the long form. + id="dx1-20044">: the short form is emphasized but not the long form. The short form is in parentheses.
      • long-short-user: if the : if the user1 key has been set, this produces the style + id="dx1-20046"> key has been set, this produces the style ⟨long⟩ (⟨short⟩, ⟨modifier1⟩]-[post]footnote -

        The display style uses ⟨

        The display style uses ⟨field1⟩ followed by a footnote with the other field in it. If post is present then the footnote is placed after the link-text using the post-link hook. The inline style does ⟨field1⟩ followed by the other field in parentheses. -

        If

        If -modifier1⟩ is present, ⟨field1⟩ has a font-changing command applied to it. -

        Examples:

        +

        Examples:

        • short-footnote: short form in the text with the long form in the + id="dx1-20048">: short form in the text with the long form in the footnote.
        • short-sc-postfootnote: short form in smallcaps with the long form in + id="dx1-20049">: short form in smallcaps with the long form in the footnote outside of the link-text.
        -

        Take care with the footnote styles. Remember that there are some situations +

        Take care with the footnote styles. Remember that there are some situations where \footnote doesn’t work.
        -

        + id="dx1-20051"> doesn’t work.

        +

      • style-desc -

        Like ⟨

        Like ⟨style⟩ but the description key must be provided when defining abbreviations + id="dx1-20052"> key must be provided when defining abbreviations with this style. -

        Examples:

        +

        Examples:

        • short-long-desc: like : like short-long but requires a description. + id="dx1-20054"> but requires a description.
        • short-em-footnote-desc: like : like short-em-footnote but requires a + id="dx1-20056"> but requires a description.
      -

      Not all combinations that fit the above syntax are provided. Pre-version 1.04 +

      Not all combinations that fit the above syntax are provided. Pre-version 1.04 styles that didn’t fit this naming scheme are either provided with a synonym (where the former name wasn’t ambiguous) or provided with a deprecated synonym (where the former name was confusing). The deprecated style names generate a warning using: -



      \GlsXtrWarnDeprecatedAbbrStyle  \GlsXtrWarnDeprecatedAbbrStyle {old-name}{new-name}

      -

      +

      where ⟨old-name⟩ is the deprecated name and ⟨new-name⟩ is the preferred name. You can suppress these warnings by redefining this command to do nothing. -

      +

      -

      Top

      3.4.1 Predefined Abbreviation Styles that Set the Regular Attribute

      -

      The following abbreviation styles set the

      The following abbreviation styles set the regular attribute to “true” for all categories + id="dx1-21001"> attribute to “true” for all categories that have abbreviations defined with any of these styles. @@ -5444,187 +5739,187 @@ that have abbreviations defined with any of these styles.

      short-nolong
      This only displays the short form on first use. The name is set to + id="dx1-21004"> is set to the short form. The description is set to the long form. The inline full form + id="dx1-21005"> is set to the long form. The inline full form displays ⟨short⟩ (⟨long⟩). The long form on its own can be displayed through commands like \glsxtrlong. + id="dx1-21006">.
      short
      A synonym for short-nolong. + id="dx1-21008">.
      short-sc-nolong
      Like short-nolong but redefines but redefines \glsabbrvfont to use \glsxtrscfont. + id="dx1-21011">.
      short-sc
      A synonym for short-sc-nolong + id="dx1-21013">
      short-sm-nolong
      Like short-nolong but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. + id="dx1-21016">.
      short-sm
      A synonym for short-sm-nolong. + id="dx1-21018">.
      short-em-nolong
      Like short-nolong but redefines but redefines \glsabbrvfont to use \glsxtremfont. + id="dx1-21021">.
      short-em
      A synonym for short-em-nolong + id="dx1-21023">
      short-nolong-desc
      Like the short-nolong style, but the style, but the name is set to the full + id="dx1-21026"> is set to the full form and the description must be supplied by the user. You may prefer + id="dx1-21027"> must be supplied by the user. You may prefer to use the short-nolong style with the post-description hook set to display + id="dx1-21028"> style with the post-description hook set to display the long form and override the description key. (See the sample file + id="dx1-21029"> key. (See the sample file sample-acronym-desc.tex.)
      short-desc
      A synonym for short-nolong-desc. + id="dx1-21031">.
      short-sc-nolong-desc
      Like short-nolong but redefines but redefines \glsabbrvfont to use \glsxtrscfont. + id="dx1-21034">.
      short-sc-desc
      A synonym for short-sc-nolong-desc. + id="dx1-21036">.
      short-sm-nolong-desc
      Like short-nolong-desc but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. + id="dx1-21039">.
      short-sm-desc
      A synonym for short-sm-nolong-desc. + id="dx1-21041">.
      short-em-nolong-desc
      Like short-nolong-desc but redefines but redefines \glsabbrvfont to use \glsxtremfont. + id="dx1-21044">.
      short-em-desc
      A synonym for short-em-nolong-desc. + id="dx1-21046">.
      long-noshort-desc
      This style only displays the long form, regardless of first or subsequent use of commands \gls. The short form may be accessed + id="dx1-21048">. The short form may be accessed through commands like \glsxtrshort. The inline full form displays ⟨. The inline full form displays ⟨long⟩ (⟨short⟩). -

      The

      The name and and sort keys are set to the long form and the keys are set to the long form and the description must + id="dx1-21052"> must be provided by the user. The predefined glossary styles won’t display the short form. You can use the post-description hook to automatically append the short form to the description. The inline full form will display ⟨short⟩).

      long-desc
      A synonym for long-noshort-desc. + id="dx1-21054">.
      long-noshort-sc-desc
      Like the long-noshort-desc style but the short form + id="dx1-21056"> style but the short form (accessed through commands like \glsxtrshort) use ) use \glsxtrscfont. + id="dx1-21058">. (This style was originally called long-desc-sc. Renamed in version + id="dx1-21059">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      long-noshort-sm-desc
      Like long-noshort-desc but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. (This style was originally called . (This style was originally called long-desc-sm. + id="dx1-21063">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      long-noshort-em-desc
      Like long-noshort-desc but redefines but redefines \glsabbrvfont to use \glsxtremfont. The long form isn’t emphasized. (This style was + id="dx1-21066">. The long form isn’t emphasized. (This style was originally called long-desc-em. Renamed in version 1.04, but original name + id="dx1-21067">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      long-em-noshort-em-desc
      New to version 1.04, like long-noshort-desc but + id="dx1-21069"> but redefines \glsabbrvfont to use \glsxtremfont. The long form uses + id="dx1-21070">. The long form uses \glsfirstlongemfont and and \glslongemfont. + id="dx1-21072">.
      long-noshort
      This style doesn’t really make sense if you don’t use the short form anywhere in the document, but is provided for completeness. This is like the long-noshort-desc style, but the style, but the name and and sort keys are set to the + id="dx1-21076"> keys are set to the short form and the description is set to the long form. + id="dx1-21077"> is set to the long form.
      long
      A synonym for long-noshort + id="dx1-21079">
      long-noshort-sc
      Like the long-noshort style but the short form (accessed + id="dx1-21081"> style but the short form (accessed through commands like \glsxtrshort) use ) use \glsxtrscfont. (This style + id="dx1-21083">. (This style was originally called long-sc. Renamed in version 1.04, but original name + id="dx1-21084">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      long-noshort-sm
      Like long-noshort but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. (This style was originally called . (This style was originally called long-sm. Renamed in + id="dx1-21088">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      long-noshort-em
      This style is like long-noshort but redefines but redefines \glsabbrvfont to use \glsxtremfont. The long form isn’t emphasized. (This style was + id="dx1-21091">. The long form isn’t emphasized. (This style was originally called long-em. Renamed in version 1.04, but original name + id="dx1-21092">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      long-em-noshort-em
      New to version 1.04, this style is like long-noshort but + id="dx1-21094"> but redefines \glsabbrvfont to use \glsxtremfont, , \glsfirstlongfont to use \glsfirstlongemfont and \glslongfont to use \glslongemfont. The short form isn’t used by commands like \gls, but can be obtained + id="dx1-21096">, but can be obtained using \glsxtrshort. + id="dx1-21097">.
      -

      +

      -

      Top

      3.4.2 Predefined Abbreviation Styles that Don’t Set the Regular Attribute

      -

      The following abbreviation styles will set the

      The following abbreviation styles will set the regular attribute to “false” if it has + id="dx1-22001"> attribute to “false” if it has previously been set. If it hasn’t already been set, it’s left unset. Other attributes may also be set, depending on the style.

      long-short
      On first use, this style uses the format ⟨long⟩ (⟨short⟩). The inline and display full forms are the same. The name and and sort keys are + id="dx1-22005"> keys are set to the short form. (The name key additionally includes the font + id="dx1-22006"> key additionally includes the font command \glsabbrvfont.) The description is set to the long form. The + id="dx1-22007"> is set to the long form. The long and short forms are separated by \glsxtrfullsep. If you want to insert material within the parentheses (such as a translation), try the long-short-user style. + id="dx1-22008"> style.
      long-short-sc
      Like long-short but redefines but redefines \glsabbrvfont to use \glsxtrscfont. + id="dx1-22011">.
      long-short-sm
      Like long-short but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. + id="dx1-22014">.
      long-short-em
      Like long-short but redefines but redefines \glsabbrvfont to use \glsxtremfont. + id="dx1-22017">.
      long-em-short-em
      New to version 1.04, this style is like long-short-em but + id="dx1-22019"> but redefines \glsfirstlongfont to use \glsfirstlongemfont. + id="dx1-22020">.
      long-short-user
      This style was introduced in version 1.04. It’s like the long-short style + id="dx1-22022"> style but additional information can be inserted into the parenthetical material. This checks the value of the field given by -



      \glsxtruserfield  \glsxtruserfield

      -

      +

      (which defaults to useri) using \ifglshasfield (provided by (provided by glossaries). If the field hasn’t been set, the style behaves like the long-short style and produces + id="dx1-22025"> style and produces ⟨long⟩ (⟨short⟩) but if the field has been set, the contents of that field are inserted @@ -5911,23 +6206,23 @@ class="cmti-10">long⟩ (⟨short⟩, ⟨field-value⟩). The format is governed by -



      \glsxtruserparen  \glsxtruserparen{text}{label}

      -

      +

      where ⟨text⟩ is the short form (for the long-short-user style) or the long form (for + id="dx1-22027"> style) or the long form (for the short-long-user style). This command first inserts a space using + id="dx1-22028"> style). This command first inserts a space using \glsxtrfullsep and then the parenthetical content. The ⟨text⟩ argument @@ -5937,339 +6232,339 @@ class="cmti-10">short⟩} in the case of the long-short-user style and style and \glsfirstlongfont{long} in the case of the short-long-user style. -

      For example: + id="dx1-22030"> style. +

      For example:

      -
      +
      \setabbreviationstyle[acronym]{long-short-user}  
      \newacronym{tug}{TUG}{\TeX\ User Group}  
      \newacronym  
       [user1={German Speaking \TeX\ User Group}]  
       {dante}{DANTE}{Deutschsprachige Anwendervereinigung \TeX\ e.V}
      -

      On first use,

      On first use, \gls{tug} will appear as:

      -

      T

      TEX User Group (TUG)

      -

      whereas

      whereas \gls{dante} will appear as:

      -

      Deutschsprachige Anwendervereinigung T

      Deutschsprachige Anwendervereinigung TEX e.V (DANTE, German Speaking TEX User Group)

      -

      The short form is formatted according to -


      The short form is formatted according to +


      \glsabbrvuserfont  \glsabbrvuserfont{text}

      -

      +

      and the plural suffix is given by -



      \glsxtrusersuffix  \glsxtrusersuffix

      -

      -

      These may be redefined as appropriate. For example, if you want a smallcaps +

      +

      These may be redefined as appropriate. For example, if you want a smallcaps style, you can just set these commands to those used by the long-short-sc + id="dx1-22033"> style:

      -
      +
      \renewcommand{\glsabbruserfont}[1]{\glsxtrscfont{#1}}  
      \renewcommand{\glsxtrusersuffix}{\glsxtrscsuffix}
      -

      +

      long-short-desc
      On first use, this style uses the format ⟨long⟩ (⟨short⟩). The inline and display full forms are the same. The name is set to the full + id="dx1-22036"> is set to the full form. The sort key is set to ⟨ key is set to ⟨long⟩ (⟨short⟩). Before version 1.04, this was incorrectly set to the short form. If you want to revert back to this you can redefine -



      \glsxtrlongshortdescsort  \glsxtrlongshortdescsort

      -

      +

      For example:

      -
      +
      \renewcommand*{\glsxtrlongshortdescsort}{\the\glsshorttok}
      -

      The

      The description must be supplied by the user. The long and short forms are + id="dx1-22039"> must be supplied by the user. The long and short forms are separated by \glsxtrfullsep.

      long-short-sc-desc
      Like long-short-desc but redefines but redefines \glsabbrvfont to use \glsxtrscfont. + id="dx1-22042">.
      long-short-sm-desc
      Like long-short-desc but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. + id="dx1-22045">.
      long-short-em-desc
      Like long-short-desc but redefines but redefines \glsabbrvfont to use \glsxtremfont. + id="dx1-22048">.
      long-em-short-em-desc
      New to version 1.04, this style is like long-short-em-desc but + id="dx1-22050"> but redefines \glsfirstlongfont to use \glsfirstlongemfont. + id="dx1-22051">.
      long-short-user-desc
      New to version 1.04, this style is like a cross between the long-short-desc style and the style and the long-short-user style. The display and inline forms + id="dx1-22054"> style. The display and inline forms are as for long-short-user and the and the name key is as key is as long-short-desc. The . The description + id="dx1-22058"> key must be supplied in the optional argument of \newabbreviation (or \newacronym). The sort key is set to ⟨ key is set to ⟨long⟩ (⟨short⟩) as per the long-short-desc + id="dx1-22060"> style.
      short-long
      On first use, this style uses the format ⟨short⟩ (⟨long⟩). The inline and display full forms are the same. The name and and sort keys are set to the + id="dx1-22064"> keys are set to the short form. The description is set to the long form. The short and long + id="dx1-22065"> is set to the long form. The short and long forms are separated by \glsxtrfullsep. If you want to insert material within the parentheses (such as a translation), try the short-long-user + id="dx1-22066"> style.
      short-sc-long
      Like short-long but redefines but redefines \glsabbrvfont to use \glsxtrscfont. + id="dx1-22069">.
      short-sm-long
      Like short-long but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. + id="dx1-22072">.
      short-em-long
      Like short-long but redefines but redefines \glsabbrvfont to use \glsxtremfont. + id="dx1-22075">.
      short-em-long-em
      New to version 1.04, this style is like short-em-long but redefines + id="dx1-22077"> but redefines \glsfirstlongfont to use \glsfirstlongemfont. + id="dx1-22078">.
      short-long-user
      New to version 1.04. This style is like the long-short-user + id="dx1-22080"> style but with the long and short forms switched. The parenthetical material is governed by the same command \glsxtruserparen, but + id="dx1-22081">, but the first argument supplied to it is the long form instead of the short form.
      short-long-desc
      On first use, this style uses the format ⟨short⟩ (⟨long⟩). The inline and display full forms are the same. The name is set to the full form. The is set to the full form. The description + id="dx1-22085"> must be supplied by the user. The short and long forms are separated by \glsxtrfullsep.
      short-sc-long-desc
      Like short-long-desc but redefines but redefines \glsabbrvfont to use \glsxtrscfont. + id="dx1-22088">.
      short-sm-long-desc
      Like short-long-desc but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. + id="dx1-22091">.
      short-em-long-desc
      Like short-long-desc but redefines but redefines \glsabbrvfont to use \glsxtremfont. + id="dx1-22094">.
      short-em-long-em-desc
      New to version 1.04, this style is like short-em-long-desc but + id="dx1-22096"> but redefines \glsfirstlongfont to use \glsfirstlongemfont. + id="dx1-22097">.
      short-long-user-desc
      New to version 1.04, this style is like a cross between the short-long-desc style and the style and the short-long-user style. The display and inline forms + id="dx1-22100"> style. The display and inline forms are as for short-long-user and the and the name key is as key is as short-long-desc. The . The description + id="dx1-22104"> key must be supplied in the optional argument of \newabbreviation (or \newacronym).
      short-footnote
      On first use, this style displays the short form with the long form as + id="dx1-22106">first use, this style displays the short form with the long form as a footnote. This style automatically sets the nohyperfirst attribute to “true” for + id="dx1-22107"> attribute to “true” for the supplied category, so the first use won’t be hyperlinked (but the footnote + id="dx1-22108">first use won’t be hyperlinked (but the footnote marker may be, if the hyperref package is used). + id="dx1-22109"> package is used). -

      The inline full form uses the ⟨

      The inline full form uses the ⟨short⟩ (⟨long⟩) style. The name is set to the short + id="dx1-22110"> is set to the short form. The description is set to the long form. -

      As from version 1.05, all the footnote styles use: -


      is set to the long form. +

      As from version 1.05, all the footnote styles use: +


      \glsfirstlongfootnotefont  \glsfirstlongfootnotefont{text}

      -

      +

      to format the long form on first use or for the full form and -



      \glslongfootnotefont  \glslongfootnotefont{text}

      -

      +

      to format the long form elsewhere (for example, when used with \glsxtrlong). -

      As from version 1.07, all the footnote styles use: -


      As from version 1.07, all the footnote styles use: +


      \glsxtrabbrvfootnote  \glsxtrabbrvfootnote{label}{long}

      -

      +

      By default, this just does \footnote{long} (the first argument is ignored). For @@ -6345,180 +6640,230 @@ class="cmtt-10">} (the first argument is ignored). For

      -
      +
      \renewcommand{\glsxtrabbrvfootnote}[2]{%  
        \footnote{\glshyperlink[#2]{#1}}%  
      }
      -

      or to include the short form with a hyperlink: +

      or to include the short form with a hyperlink:

      -
      +
      \renewcommand{\glsxtrabbrvfootnote}[2]{%  
        \footnote{\glshyperlink[\glsfmtshort{#1}]{#1}: #2}%  
      }
      -

      Note that I haven’t used commands like

      Note that I haven’t used commands like \glsxtrshort to avoid interference (see §2.2 Entry Display Style Modifications and §2.4 §2.5 Nested Links).

      footnote
      A synonym for short-footnote. + id="dx1-22118">.
      short-sc-footnote
      Like short-footnote but redefines but redefines \glsabbrvfont to use \glsxtrscfont. (This style was originally called . (This style was originally called footnote-sc. Renamed in + id="dx1-22122">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      short-sc-footnote
      Like short-footnote but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. (This style was originally called . (This style was originally called footnote-sm. Renamed in + id="dx1-22126">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      short-em-footnote
      Like short-footnote but redefines but redefines \glsabbrvfont to use \glsxtremfont. (This style was originally called . (This style was originally called footnote-em. Renamed in + id="dx1-22130">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      short-postfootnote
      This is similar to the short-footnote style but doesn’t modify the + id="dx1-22132"> style but doesn’t modify the category attribute. Instead it changes \glsxtrpostlinkcategory to insert the + id="dx1-22133"> to insert the footnote after the link-text on first use. This will also defer the footnote until after any following punctuation character that’s recognised by \glsxtrifnextpunc. -

      The inline full form uses the ⟨. +

      The inline full form uses the ⟨short⟩ (⟨long⟩) style. The name is set to the short + id="dx1-22137"> is set to the short form. The description is set to the long form. Note that this style will change + id="dx1-22138"> is set to the long form. Note that this style will change \glsxtrfull (and it’s variants) so that it fakes non-first use. (Otherwise the + id="dx1-22139">first use. (Otherwise the footnote would appear after the inline form.)

      postfootnote
      A synonym for short-postfootnote. + id="dx1-22141">.
      short-sc-postfootnote
      Like short-postfootnote but redefines but redefines \glsabbrvfont to use \glsxtrscfont. (This style was originally called . (This style was originally called postfootnote-sc. Renamed in + id="dx1-22145">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      short-sm-postfootnote
      Like short-postfootnote but redefines but redefines \glsabbrvfont to use \glsxtrsmfont. (This style was originally called . (This style was originally called postfootnote-sm. Renamed in + id="dx1-22149">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.)
      short-em-postfootnote
      Like short-postfootnote but redefines but redefines \glsabbrvfont to use \glsxtremfont. (This style was originally called . (This style was originally called postfootnote-em. Renamed in + id="dx1-22153">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.) +
      +short-postlong-user
      This style was introduced in version 1.12. It’s like the + short-long-user style but defers the parenthetical material to after the + link-text. This means that you don’t have such a long hyperlink (which + can cause problems for the DVI LATEX format) and it also means + that the user supplied material can include a hyperlink to another + location. +
      +short-postlong-user-desc
      This style was introduced in version 1.12. It’s + like the above short-postlong-user style but the description must be + specified. +
      +long-postshort-user
      This style was introduced in version 1.12. It’s like the + above short-postlong-user style but the long form is shown first and + the short form is in the parenthetical material (as for long-short-user) + style. +
      +long-postshort-user-desc
      This style was introduced in version 1.12. It’s + like the above long-postshort-user style but the description must be + specified.
      -

      +

      -

      Top

      3.5 Defining New Abbreviation Styles

      -

      New abbreviation styles may be defined using: -


      New abbreviation styles may be defined using: +


      \newabbreviationstyle  \newabbreviationstyle{name}{}{fmts}

      -

      -

      where ⟨

      +

      where ⟨name⟩ is the name of the new style (as used in the mandatory argument of \setabbreviationstyle). This is similar but not identical to the ). This is similar but not identical to the glossaries package’s \newacronymstyle command. -

      You can’t use styles defined by command. +

      You can’t use styles defined by \newacronymstyle with glossaries-extra unless you have reverted \newacronym back to its generic definition from + id="dx1-23004"> back to its generic definition from glossaries (using \RestoreAcronyms). The acronym styles from the ). The acronym styles from the glossaries package can’t be used with abbreviations defined with \newabbreviation.
      -

      -

      The ⟨

      +

      The ⟨setup⟩ argument deals with the way the entry is defined and may set attributes for the given abbreviation category. This argument should redefine -



      \CustomAbbreviationFields  \CustomAbbreviationFields

      -

      +

      to set the entry fields including the name (defaults to the short form if omitted), + id="dx1-23007"> (defaults to the short form if omitted), sort, , first, , firstplural. Other fields may also be set, such as . Other fields may also be set, such as text, , plural and - - - + id="dx1-23012"> and description. -

      . +

      \CustomAbbreviationFields is expanded by \newabbreviation so take care to protect commands that shouldn’t be expanded.
      -

      -

      For example, the

      +

      For example, the long-short style has the following in ⟨ style has the following in ⟨setup⟩:

      -
      +
        \renewcommand*{\CustomAbbreviationFields}{%  
          name={\protect\glsabbrvfont{\the\glsshorttok}},  
          sort={\the\glsshorttok}, @@ -6608,32 +6950,32 @@ class="cmti-10">setup⟩:  
          plural={\protect\glsabbvfont{\the\glsshortpltok}},%  
          description={\the\glslongtok}}%
      -

      Note that the

      Note that the first and and firstplural are set even though they’re not used by + id="dx1-23016"> are set even though they’re not used by \gls. -

      The ⟨

      The ⟨setup⟩ argument may also redefine -



      \GlsXtrPostNewAbbreviation  \GlsXtrPostNewAbbreviation

      -

      +

      which can be used to assign attributes. (This will automatically be initialised to do nothing.) -

      For example, the

      For example, the short-footnote includes the following in ⟨ includes the following in ⟨setup⟩:

      -
      +
        \renewcommand*{\GlsXtrPostNewAbbreviation}{%  
          \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}%  
          \glshasattribute{\the\glslabeltok}{regular}% @@ -6643,222 +6985,222 @@ class="cmti-10">setup⟩:  
          {}%  
        }%
      -

      This sets the

      This sets the nohyperfirst attribute to “true”. It also unsets the attribute to “true”. It also unsets the regular attribute if it + id="dx1-23020"> attribute if it has previously been set. Note that the nohyperfirst attribute doesn’t get unset by + id="dx1-23021"> attribute doesn’t get unset by other styles, so take care not to switch styles for the same category. -

      You can access the short, long, short plural and long plural values through the +

      You can access the short, long, short plural and long plural values through the following token registers. -

      Short value (defined by

      Short value (defined by glossaries): -



      \glsshorttok  \glsshorttok

      -

      -

      Short plural value (defined by

      +

      Short plural value (defined by glossaries-extra): -



      \glsshortpltok  \glsshortpltok

      -

      +

      (This may be the default value or, if provided, the value provided by the user through the shortplural key in the optional argument of key in the optional argument of \newabbreviation.) -

      Long value (defined by .) +

      Long value (defined by glossaries): -



      \glslongtok  \glslongtok

      -

      -

      Long plural value (defined by

      +

      Long plural value (defined by glossaries-extra): -



      \glslongpltok  \glslongpltok

      -

      +

      (This may be the default value or, if provided, the value provided by the user through the longplural key in the optional argument of key in the optional argument of \newabbreviation.) -

      There are two other registers available that are defined by .) +

      There are two other registers available that are defined by glossaries: -



      \glslabeltok  \glslabeltok

      -

      +

      which contains the entry’s label and -



      \glskeylisttok  \glskeylisttok

      -

      +

      which contains the values provided in the optional argument of \newabbreviation. -

      Remember put . +

      Remember put \the in front of the register command as in the examples above. The category label can be access through the command (not a register): -



      \glscategorylabel  \glscategorylabel

      -

      +

      This may be used inside the definition of \GlsXtrPostNewAbbreviation. -

      If you want to base a style on an existing style, you can use -


      If you want to base a style on an existing style, you can use +


      \GlsXtrUseAbbrStyleSetup  \GlsXtrUseAbbrStyleSetup{name}

      -

      +

      where ⟨name⟩ is the name of the existing style. For example, the short-sc-footnote and + id="dx1-23035"> and short-sm-footnote styles both simply use + id="dx1-23036"> styles both simply use

      -
      +
      \GlsXtrUseAbbrStyleSetup{short-footnote}
      -

      within ⟨

      within ⟨setup⟩. -

      The ⟨

      The ⟨fmts⟩ argument deals with the way the entry is displayed in the document. This argument should redefine the following commands: -

      The default suffix for the plural short form (if not overridden by the

      The default suffix for the plural short form (if not overridden by the shortplural + id="dx1-23037"> key): -



      \abbrvpluralsuffix  \abbrvpluralsuffix

      -

      +

      (Note that this isn’t used for the plural long form, which just uses the regular \glspluralsuffix.) -

      The font used for the short form on

      The font used for the short form on first use or in the full forms: -



      \glsfirstabbrvfont  \glsfirstabbrvfont{text}

      -

      -

      The font used for the short form on subsequent use or through commands like +

      +

      The font used for the short form on subsequent use or through commands like \glsxtrshort: -


      : +


      \glsabbrvfont  \glsabbrvfont{text}

      -

      -

      The font used for the long form on first use or in the full forms: -


      +

      The font used for the long form on first use or in the full forms: +


      \glsfirstlongfont  \glsfirstlongfont{text}

      -

      -

      The font used for the long form in commands like

      +

      The font used for the long form in commands like \glsxtrlong use: -



      \glslongfont  \glslongfont{text}

      -

      -

      Display full form singular no case-change (used by

      +

      Display full form singular no case-change (used by \gls on first use for + id="dx1-23046"> on first use for abbreviations without the regular attribute set): -


      attribute set): +


      \glsxtrfullformat  \glsxtrfullformat{label}{insert}

      -

      -

      Display full form singular first letter converted to upper case (used by

      +

      Display full form singular first letter converted to upper case (used by \Gls on + id="dx1-23050"> on first use for abbreviations without the first use for abbreviations without the regular attribute set): -


      attribute set): +


      \Glsxtrfullformat  \Glsxtrfullformat{label}{insert}

      -

      -

      Display full form plural no case-change (used by

      +

      Display full form plural no case-change (used by \glspl on first use for + id="dx1-23054"> on first use for abbreviations without the regular attribute set): -


      attribute set): +


      \glsxtrfullplformat  \glsxtrfullplformat{label}{}

      -

      -

      Display full form plural first letter converted to upper case (used by

      +

      Display full form plural first letter converted to upper case (used by \Glspl on + id="dx1-23058"> on first use for abbreviations without the regular attribute set): -


      attribute set): +


      \Glsxtrfullplformat  \Glsxtrfullplformat{label}{insert}

      -

      -

      In addition ⟨

      +

      In addition ⟨fmts⟩ may also redefine the following commands that govern the inline full formats. If the style doesn’t redefine them, they will default to the same as the display full forms. -

      Inline singular no case-change (used by

      Inline singular no case-change (used by \glsentryfull, , \glsxtrfull and + id="dx1-23063"> and \GLSxtrfull): -


      ): +


      \glsxtrinlinefullformat  \glsxtrinlinefullformat{label}{insert}

      -

      -

      Inline singular first letter converted to upper case (used by

      +

      Inline singular first letter converted to upper case (used by \Glsentryfull and + id="dx1-23066"> and \Glsxtrfull): -


      ): +


      \Glsxtrinlinefullformat  \Glsxtrinlinefullformat{label}{insert}

      -

      -

      Inline plural no case-change (used by

      +

      Inline plural no case-change (used by \glsentryfullpl, , \glsxtrfullpl and + id="dx1-23070"> and \GLSxtrfullpl): -


      ): +


      \glsxtrinlinefullplformat  \glsxtrinlinefullplformat{label}{insert}

      -

      -

      Inline plural first letter converted to upper case (used by

      +

      Inline plural first letter converted to upper case (used by \Glsentryfullpl and + id="dx1-23073"> and \Glsxtrfullpl): -


      ): +


      \Glsxtrinlinefullplformat  \Glsxtrinlinefullplformat{label}{insert}

      -

      -

      If you want to provide support for

      +

      If you want to provide support for glossaries-accsupp use the following + id="dx1-23076"> use the following \glsaccessxxx⟩ commands (§10.2 §11.2 Accessibility Support) within the definitions of \glsxtrfullformat etc instead of the analogous \glsentryxxx⟩ commands. (If you don’t use glossaries-accsupp, they will just do the corresponding , they will just do the corresponding \glsentryxxx⟩ command.) -

      For example, the

      For example, the short-long style has the following in ⟨ style has the following in ⟨fmts⟩:

      -
      +
        \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}%  
        \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}%  
        \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% @@ -7012,55 +7354,55 @@ class="cmti-10">fmts⟩:  
          (\glsfirstlongfont{\glsaccesslongpl{##1}})%  
        }%
      -

      Since the inline full commands aren’t redefined, they default to the same as the +

      Since the inline full commands aren’t redefined, they default to the same as the display versions. -

      If you want to base a style on an existing style, you can use -


      If you want to base a style on an existing style, you can use +


      \GlsXtrUseAbbrStyleFmts  \GlsXtrUseAbbrStyleFmts{name}

      -

      +

      within ⟨fmts⟩, where ⟨name⟩ is the name of the existing style. For example, the short-sc-long style has the following in ⟨ style has the following in ⟨fmts⟩:

      -
      +
        \GlsXtrUseAbbrStyleFmts{short-long}%  
        \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}%  
        \renewcommand*{\glsabbrvfont}[1]{\glsxtrscfont{##1}}%
      -

      and the

      and the short-sm-long style has: + id="dx1-23081"> style has:

      -
      +
        \GlsXtrUseAbbrStyleFmts{short-long-desc}%  
        \renewcommand*{\glsabbrvfont}[1]{\glsxtrsmfont{##1}}%  
        \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}%
      -

      -

      The simplest examples of creating a new style based on an existing style are the +

      +

      The simplest examples of creating a new style based on an existing style are the “em” styles, such as the short-em-long style, which is defined as: + id="dx1-23082"> style, which is defined as:

      -
      +
      \newabbreviationstyle  
      {short-em-long}% label  
      {% setup @@ -7071,22 +7413,22 @@ class="cmss-10">short-em-long  \renewcommand*{\glsabbrvfont}[1]{\glsxtremfont{##1}}%  
      }
      -

      +

      -

      -

      +

      Top

      4. Entries in Sectioning Titles, Headers, Captions and Contents

      -

      The

      The glossaries user manual cautions against using commands like \gls in chapter or section titles. The principle problems are:

      • if you have a table of contents, the first use flag will be unset in the contents rather than later in the document;
      • @@ -7103,27 +7445,27 @@ class="cmtt-10">\gls etc) will be converted to upper case and the
      • if you use hyperref, commands like , commands like \gls can’t be expanded to a simple string and only the label will appear in the PDF bookmark (with a warning from hyperref); + id="dx1-24003">);
      • if you use hyperref, you will end up with nested hyperlinks in the table of + id="dx1-24004">, you will end up with nested hyperlinks in the table of contents.
      -

      Similar problems can also occur with captions (except for the page header and bookmark +

      Similar problems can also occur with captions (except for the page header and bookmark issues). -

      To get around all these problems, the

      To get around all these problems, the glossaries user manual recommends using the expandable non-hyperlink commands, such as \glsentrytext + id="dx1-24005"> (for regular entries) or \glsentryshort (for abbreviations). This is the + id="dx1-24006"> (for abbreviations). This is the simplest solution, but doesn’t allow for special formatting that’s applied to the entry through commands like \glstext or \glsxtrshort. This means that if, for example, you are using one of the abbreviation styles that uses \textsc then the short form displayed with then the short form displayed with \glsentryshort won’t use small caps. If you only have one abbreviation style in use, you can explicitly enclose -

      +
      \chapter{A Chapter about \glsabbrvfont{\glsentryshort{html}}}
      -

      Or, if you are using

      Or, if you are using hyperref: + id="dx1-24008">:

      -
      +
      \chapter{A Chapter about  
      \texorpdfstring{\glsabbrvfont{\glsentryshort{html}}}{\glsentryshort{html}}}
      -

      -

      Since this is a bit cumbersome, you might want to define a new command to do +

      +

      Since this is a bit cumbersome, you might want to define a new command to do this for you. However, if you have mixed styles this won’t work as commands like \gls and \MakeUppercase. -

      The . +

      The glossaries-extra package tries to resolve this by modifying \markright and + id="dx1-24010"> and \markboth. If you don’t like this change, you can restore their former definitions + id="dx1-24011">. If you don’t like this change, you can restore their former definitions using -



      \glsxtrRevertMarks  \glsxtrRevertMarks

      -

      +

      In this case, you’ll have to use the glossaries manual’s recommendations of either simply using -

      +
      \chapter[A Chapter about \glsentryshort{html}]{A Chapter about \gls{html}}
      -

      -

      If you don’t revert the mark commands back with

      +

      If you don’t revert the mark commands back with \glsxtrRevertMarks, you can use the commands described below in the argument of sectioning commands. You can still use them even if the mark commands have been reverted, but only where they don’t conflict with the page style. -

      The commands listed below all use

      The commands listed below all use \texorpdfstring if if hyperref has been + id="dx1-24014"> has been loaded so that the expandable non-formatted version is added to the PDF bookmarks. Note that since the commands that convert the first letter to upper case aren’t expandable, the non-case-changing version is used for the bookmarks. -

      These commands essentially behave as though you have used

      These commands essentially behave as though you have used \glsxtrshort (or equivalent) with the options noindex and and hyper=false. The text produced won’t be + id="dx1-24016">. The text produced won’t be converted to upper case in the page headings by default. If you want the text converted to upper case you need to set the headuc attribute to “true” for the + id="dx1-24017"> attribute to “true” for the appropriate category. -

      If you use one of the

      If you use one of the \textsc styles, be aware that the default fonts don’t + id="dx1-24018"> styles, be aware that the default fonts don’t provide bold small-caps or italic small-caps. This means that if the chapter or section title style uses bold, this may override the small-caps setting, in which case the abbreviation will just appear as lower case bold. If the @@ -7237,298 +7579,298 @@ heading style uses italic, the abbreviation may appear in upright small-caps, even if you have set the headuc attribute since the all-capitals form still uses \glsabbrvfont. You may want to consider using the slantsc package in this case. + id="dx1-24020"> package in this case.
      -

      -

      Display the short form: -


      +

      Display the short form: +


      \glsfmtshort  \glsfmtshort{label}

      -

      -

      Display the plural short form: -


      +

      Display the plural short form: +


      \glsfmtshortpl  \glsfmtshortpl{label}

      -

      -

      First letter upper case singular short form: -


      +

      First letter upper case singular short form: +


      \Glsfmtshort  \Glsfmtshort{label}

      -

      +

      (No case-change applied to PDF bookmarks.) -

      First letter upper case plural short form: -


      First letter upper case plural short form: +


      \Glsfmtshortpl  \Glsfmtshortpl{label}

      -

      +

      (No case-change applied to PDF bookmarks.) -

      Display the long form: -


      Display the long form: +


      \glsfmtlong  \glsfmtlong{label}

      -

      -

      Display the plural long form: -


      +

      Display the plural long form: +


      \glsfmtlongpl  \glsfmtlongpl{label}

      -

      -

      First letter upper case singular long form: -


      +

      First letter upper case singular long form: +


      \Glsfmtlong  \Glsfmtlong{label}

      -

      +

      (No case-change applied to PDF bookmarks.) -

      First letter upper case plural long form: -


      First letter upper case plural long form: +


      \Glsfmtlongpl  \Glsfmtlongpl{label}

      -

      +

      (No case-change applied to PDF bookmarks.) -

      There are similar commands for the full form, but note that these use the

      There are similar commands for the full form, but note that these use the inline full form, which may be different from the full form used by \gls. -

      Display the full form: -


      Display the full form: +


      \glsfmtfull  \glsfmtfull{label}

      -

      -

      Display the plural full form: -


      +

      Display the plural full form: +


      \glsfmtfullpl  \glsfmtfullpl{label}

      -

      -

      First letter upper case singular full form: -


      +

      First letter upper case singular full form: +


      \Glsfmtfull  \Glsfmtfull{label}

      -

      +

      (No case-change applied to PDF bookmarks.) -

      First letter upper case plural full form: -


      First letter upper case plural full form: +


      \Glsfmtfullpl  \Glsfmtfullpl{label}

      -

      +

      (No case-change applied to PDF bookmarks.) -

      There are also equivalent commands for the value of the

      There are also equivalent commands for the value of the text field: -


      field: +


      \glsfmttext  \glsfmttext{label}

      -

      -

      First letter converted to upper case: -


      +

      First letter converted to upper case: +


      \Glsfmttext  \Glsfmttext{label}

      -

      +

      (No case-change applied to PDF bookmarks.) -

      The plural equivalents: -


      The plural equivalents: +


      \glsfmtplural  \glsfmtplural{label}

      -

      +

      and -



      \Glsfmtplural  \Glsfmtplural{label}

      -

      -

      Similarly for the value of the

      +

      Similarly for the value of the first field: -


      field: +


      \glsfmtfirst  \glsfmtfirst{label}

      -

      -

      First letter converted to upper case: -


      +

      First letter converted to upper case: +


      \Glsfmtfirst  \Glsfmtfirst{label}

      -

      +

      (No case-change applied to PDF bookmarks.) -

      The plural equivalents: -


      The plural equivalents: +


      \glsfmtfirstpl  \glsfmtfirstpl{label}

      -

      +

      and -



      \Glsfmtfirstpl  \Glsfmtfirstpl{label}

      -

      +

      -

      -

      +

      Top

      5. Categories

      -

      Each entry defined by

      Each entry defined by \newglossaryentry (or commands that internally use it + id="dx1-25001"> (or commands that internally use it such as \newabbreviation) is assigned a category through the ) is assigned a category through the category key. You may + id="dx1-25003"> key. You may add any category that you like, but since the category is a label used in the creation of some control sequences, avoid problematic characters within the category label. (So take care if you have babel shorthands on that make some characters + id="dx1-25004"> shorthands on that make some characters active.) -

      The use of categories can give you more control over the way entries are displayed +

      The use of categories can give you more control over the way entries are displayed in the text or glossary. Note that an entry’s category is independent of the glossary type. Be careful not to confuse category with with type. -

      The default category assumed by . +

      The default category assumed by \newglossaryentry is labelled general. + id="dx1-25007">. Abbreviations defined with \newabbreviation have the category set to abbreviation + id="dx1-25008"> by default. Abbreviations defined with \newacronym have the category set to acronym by default. -

      Additionally, if you have enabled by default. +

      Additionally, if you have enabled \newterm with the with the index package option + id="dx1-25011"> package option that command will set the category to index by default. If you have enabled + id="dx1-25012"> by default. If you have enabled \glsxtrnewsymbol with the with the symbols package option, that command will set the + id="dx1-25014"> package option, that command will set the category to symbol. If you have enabled . If you have enabled \glsxtrnewnumber with the with the numbers package + id="dx1-25017"> package option, that command will set the category to number. -

      You can obtain the category label for a given entry using -


      . +

      You can obtain the category label for a given entry using +


      \glscategory  \glscategory{label}

      -

      +

      This is equivalent to commands like \glsentryname and so may be used in an expandable context. No error is generated if the entry doesn’t exist. -

      You can test the category for a given entry using -


      You can test the category for a given entry using +


      \glsifcategory  \glsifcategory{entry-label}{part}{false part}

      -

      +

      This is equivalent to

      \ifglsfieldeq{entry-label}}
      so any restrictions that apply to \ifglsfieldeq also apply to \glsifcategory. -

      Each category may have a set of attributes. For example, the

      Each category may have a set of attributes. For example, the general and and acronym + id="dx1-25023"> categories have the attribute regular set to “true” to indicate that all entries with + id="dx1-25024"> set to “true” to indicate that all entries with either of those categories are regular entries (as opposed to abbreviations). This attribute is accessed by \glsentryfmt to determine whether to use \glsgenentryfmt or \glsxtrgenabbrvfmt. -

      Other attributes recognised by

      Other attributes recognised by glossaries-extra are:

      nohyperfirst
      When using commands like \gls this will automatically suppress the + id="dx1-25026"> this will automatically suppress the hyperlink on first use for entries with a category that has this attribute set to “true”. (This settings can be overridden by explicitly setting the hyper key on + id="dx1-25028"> key on or off in the optional argument of commands like \gls.) As from version 1.07, \glsfirst, \Glsfirst, \GLSfirst and their plural versions (which should ideally behave in a similar way to the first use of first use of \gls or \glspl) now honour this attribute (but not the package-wide hyperfirst=false option, which + id="dx1-25030"> option, which matches the behaviour of glossaries). If you want commands these + id="dx1-25031">). If you want commands these \glsfirst etc commands to ignore the nohyperfirst attribute then just + id="dx1-25032"> attribute then just redefine -



      \glsxtrchecknohyperfirst  \glsxtrchecknohyperfirst{label}

      -

      +

      to do nothing.

      nohyper
      When using commands like \gls this will automatically suppress the + id="dx1-25035"> this will automatically suppress the hyperlink for entries with a category that has this attribute set to “true”. (This settings can be overridden by explicitly setting the hyper key on or off in the + id="dx1-25036"> key on or off in the optional argument of commands like \gls.)
      indexonlyfirst
      This is similar to the indexonlyfirst package option but only for entries + id="dx1-25038"> package option but only for entries that have a category with this attribute set to “true”.
      discardperiod
      If set to “true”, the post-link-text hook will discard a full stop (period) that follows non-plural commands like \gls or \glstext. (Provided for entries such as abbreviations that end with a full stop.) -

      Note that this can cause a problem if you access a field that doesn’t end with a +

      Note that this can cause a problem if you access a field that doesn’t end with a full stop. For example:

      -
      +
      \newabbreviation  
       [user1={German Speaking \TeX\ User Group}]  
       {dante}{DANTE e.V.}{Deutschsprachige Anwendervereinigung \TeX\  
      e.V.}
      -

      Here the

      Here the short and and long fields end with a full stop, but the fields end with a full stop, but the user1 field doesn’t. + id="dx1-25043"> field doesn’t. The simplest solution in this situation is to put the sentence terminator in the final optional argument. For example:

      -
      +
      \glsuseri{dante}[.]
      -

      This will bring the punctuation character inside the

      This will bring the punctuation character inside the link-text and it won’t be discarded.

      pluraldiscardperiod
      If this attribute is set to “true” and the discardperiod attribute is + id="dx1-25046"> attribute is set to “true”, this will behave as above for the plural commands like \glspl or \glsplural.
      retainfirstuseperiod
      If this attribute is set to “true” then the full stop won’t be discarded for first use instances, even if discardperiod or or pluraldiscardperiod are + id="dx1-25050"> are set. This is useful for ⟨short⟩ (⟨long⟩) abbreviation styles where only the short form @@ -7724,10 +8066,10 @@ class="cmti-10">long⟩) abbreviation styles where only the short fo
      insertdots
      If this attribute is set to “true” any entry defined using \newabbreviation + id="dx1-25052"> will automatically have full stops (periods) inserted after each letter. The entry will be defined with those dots present as though they had been present in the ⟨\newabbreviation (rather than inserting them new dotted version of the original ⟨short⟩ form with the plural suffix appended. -

      If you explicitly override the short plural using the

      If you explicitly override the short plural using the shortplural key, you must + id="dx1-25053"> key, you must explicitly insert the dots yourself (since there’s no way for the code to determine if the plural has a suffix that shouldn’t be followed by a dot).
      -

      -

      This attribute is best used with the

      +

      This attribute is best used with the discardperiod attribute set to “true”. + id="dx1-25054"> attribute set to “true”.

      aposplural
      If this attribute is set to “true”, \newabbreviation will insert an + id="dx1-25056"> will insert an apostrophe (’) before the plural suffix for the short plural form (unless explicitly overridden with the shortplural key). The long plural form is + id="dx1-25057"> key). The long plural form is unaffected by this setting.
      noshortplural
      If this attribute is set to “true”, \newabbreviation won’t append the + id="dx1-25059"> won’t append the plural suffix for the short plural form. This means the short and and shortplural + id="dx1-25061"> values will be the same unless explicitly overridden. The aposplural attribute trumps the noshortplural attribute. @@ -7788,21 +8130,21 @@ class="cmti-10">attribute.
      headuc
      If this attribute is set to “true”, commands like \glsfmtshort will use the + id="dx1-25065"> will use the upper case version in the page headers.
      tagging
      If this attribute is set to “true”, the tagging command defined by \GlsXtrEnableInitialTagging will be activated to use will be activated to use \glsxtrtagfont in + id="dx1-25068"> in the glossary (see §3.1 Tagging Initials).
      entrycount
      Unlike the above attributes, this attribute isn’t boolean but instead must be an integer value and is used in combination with \glsenableentrycount + id="dx1-25070"> (see §2.3 Entry Counting Modifications

      With

      With glossaries, commands like \cgls use \cglsformat only if the previous @@ -7834,16 +8176,16 @@ class="cmtt-10">\cglsformat only if the previous class="cmss-10">glossaries-extra the test is now for entries that have the entrycount attribute set and where the previous + id="dx1-25073"> attribute set and where the previous usage count for that entry is less than or equal to the value of that attribute.

      glossdesc
      The \glossentrydesc command (used in the predefined glossary styles) is + id="dx1-25075"> command (used in the predefined glossary styles) is modified by glossaries-extra to check for this attribute. The attribute may have one of the following values: @@ -7852,34 +8194,34 @@ class="cmss-10">glossaries-extra to check for this attribute. The attribu class="cmtt-10">firstuc: the first letter of the description will be converted to upper case (using \Glsentrydesc). + id="dx1-25076">).
    • title: the description will be used in the argument of the title casing command \capitalisewords (provided by (provided by mfirstuc). If you want to use a + id="dx1-25078">). If you want to use a different command you can redefine: -



      \glsxtrfieldtitlecasecs  \glsxtrfieldtitlecasecs{phrase cs}

      -

      +

      For example:

      -
      +
      \newcommand*{\glsxtrfieldtitlecasecs}[1]{\xcapitalisefmtwords*{#1}}
      -

      (Note that the argument to

      (Note that the argument to \glsxtrfieldtitlecasecs will be a control sequence whose replacement text is the entry’s description, which is why \xcapitalisefmtwords is needed instead of \capitalisefmtwords.)

    -

    Any other values of this attribute are ignored. Remember that there are design +

    Any other values of this attribute are ignored. Remember that there are design limitations for both the first letter uppercasing and the title casing commands. See the mfirstuc user manual for further details. + id="dx1-25080"> user manual for further details.

    glossdescfont
    (New to version 1.04) In addition to the above, the modified \glossentrydesc command also checks this attribute. If set, it should be the + id="dx1-25082"> command also checks this attribute. If set, it should be the name of a control sequence (without the leading backslash) that takes one argument. This control sequence will be applied to the description text. For example: -
    +
    \glssetcategoryattribute{general}{glossdescfont}{emph}
    -

    +

    glossname
    As glossdesc but applies to but applies to \glossentryname. Additionally, if this + id="dx1-25085">. Additionally, if this attribute is set to “uc” the name is converted to all capitals.
    indexname
    If set, the \glsxtrpostnamehook hook used at the end of \glossentyname + id="dx1-25087"> will index the entry using \index. See . See §7 Auto-Indexing for further @@ -7938,40 +8280,40 @@ href="#sec:autoindex">Auto-Indexing for fur
    glossnamefont
    (New to version 1.04) In addition to the above, the modified \glossentryname command also checks this attribute. If set, it should be the + id="dx1-25090"> command also checks this attribute. If set, it should be the name of a control sequence (without the leading backslash) that takes one argument. This control sequence will be applied to the name text. For example: -
    +
    \glssetcategoryattribute{general}{glossnamefont}{emph}
    -

    Note that this overrides

    Note that this overrides \glsnamefont which will only be used if this attribute hasn’t been set. -

    Remember that glossary styles may additionally apply a font change, +

    Remember that glossary styles may additionally apply a font change, such as the list styles which put the name in the optional argument of \item.

    dualindex
    If set, whenever a glossary entry has information written to the external glossary file through commands like \gls and and \glsadd, a corresponding line + id="dx1-25093">, a corresponding line will be written to the indexing file using \index. See . See §7 Auto-Indexing for @@ -7979,17 +8321,17 @@ href="#sec:autoindex">Auto-Indexing for
    targeturl
    If set, the hyperlink generated by commands like \gls will be set to the URL provided by this attributes value. For example: -
    +
    \glssetcategoryattribute{general}{targeturl}{master-doc.pdf}
    -

    (See also the accompanying sample file

    (See also the accompanying sample file sample-external.tex.) If the URL contains awkward characters (such as % or ~) remember that the base glossaries package provides commands like \glspercentchar and and \glstildechar that expand to literal characters. -

    If you want to a named anchor within the target URL (notionally adding +

    If you want to a named anchor within the target URL (notionally adding #name⟩ to the URL), then you also need to set targetname to the anchor ⟨ to the anchor ⟨name⟩. You may use \glslabel within ⟨name⟩ which is set by commands like \gls to the entry’s label. -

    All the predefined glossary styles start each entry listing with

    All the predefined glossary styles start each entry listing with \glstarget which sets the anchor to \glolinkprefix\glslabel, so if you want entries to link to glossaries in the URL given by targeturl, you can just + id="dx1-25098">, you can just do:

    -
    +
    \glssetcategoryattribute{general}{targetname}{\glolinkprefix\glslabel}
    -

    (If the target document changed

    (If the target document changed \glolinkprefix then you will need to adjust the above as appropriate.) -

    If the anchor is in the form ⟨

    If the anchor is in the form ⟨name1.name2⟩ then use targetname for the ⟨ for the ⟨name2⟩ part and targetcategory for the ⟨ for the ⟨name1⟩ part. -

    For example: +

    For example:

    -
    +
    \glssetcategoryattribute{general}{targeturl}{master-doc.pdf}  
    \glssetcategoryattribute{general}{targetcategory}{page}  
    \glssetcategoryattribute{general}{targetname}{7}
    -

    will cause all link text for

    will cause all link text for general entries to link to master-doc.pdf#page.7 (page 7 of that PDF). -

    If you want a mixture in your document of entries that link to an internal +

    If you want a mixture in your document of entries that link to an internal glossary and entries that link to an external URL then you can use the starred form of \newignoredglossary for the external list. For + id="dx1-25101"> for the external list. For example:

    -
    +
    \newignoredglossary*{external}  
    \glssetcategoryattribute{external}{targeturl}{master-doc.pdf}  
    \glssetcategoryattribute{general}{targetname}{\glolinkprefix\glslabel} @@ -8075,14 +8417,14 @@ class="cmtt-10">\newignoredglossary  category=external,  
      description={external example}}
    -

    +

    -

    An attribute can be set using: -


    An attribute can be set using: +


    \glssetcategoryattribute  \glssetcategoryattribute{category-label} @@ -8092,30 +8434,30 @@ class="cmitt-10">attribute-label}{value}

    -

    +

    where ⟨category-label⟩ is the category label, ⟨attribute-label⟩ is the attribute label and ⟨value⟩ is the new value for the attribute. -

    There is a shortcut version to set the

    There is a shortcut version to set the regular attribute to “true”: -


    attribute to “true”: +


    \glssetregularcategory  \glssetregularcategory{category-label}

    -

    -

    If you need to lookup the category label for a particular entry, you can use the +

    +

    If you need to lookup the category label for a particular entry, you can use the shortcut command: -



    \glssetattribute  \glssetattribute{entry-label}{} class="cmtt-10">{value}

    -

    +

    This uses \glssetcategoryattribute with \glscategory to set the attribute. Note that this will affect all other entries that share this entry’s category. -

    You can fetch the value of an attribute for a particular category using: -


    You can fetch the value of an attribute for a particular category using: +


    \glsgetcategoryattribute  \glsgetcategoryattribute{category-label} @@ -8142,13 +8484,13 @@ class="cmtt-10">} class="cmtt-10">{⟨attribute-label}

    -

    +

    Again there is a shortcut if you need to lookup the category label for a given entry: -



    \glsgetattribute  \glsgetattribute{entry-label}{} -

    -

    You can test if an attribute has been assigned to a given category using: -


    +

    You can test if an attribute has been assigned to a given category using: +


    \glshascategoryattribute  \glshascategoryattribute{category-label} @@ -8175,19 +8517,19 @@ class="cmitt-10">true code}{false code}

    -

    +

    This uses etoolbox’s ’s \ifcsvoid and does ⟨true code⟩ if the attribute has been set and isn’t blank and isn’t \relax. The shortcut if you need to lookup the category label from an entry is: -



    \glshasattribute  \glshasattribute{entry-label}{code}{false code}

    -

    -

    You can test the value of an attribute for a particular category using: -


    +

    You can test the value of an attribute for a particular category using: +


    \glsifcategoryattribute  \glsifcategoryattribute{category-label} @@ -8218,7 +8560,7 @@ class="cmitt-10">true-part}{false-part}

    -

    +

    This tests if the attribute (given by ⟨attribute-label⟩) for the category (given by ⟨true-part⟩ is done. If the attribute isn’t set or is set but isn’t equal to ⟨value⟩, ⟨false part⟩ is done. -

    For example: +

    For example:

    -
    +
    \glsifcategoryattribute{general}{nohyper}{true}{NO HYPER}{HYPER}
    -

    This does “NO HYPER” if the

    This does “NO HYPER” if the general category has the category has the nohyper attribute set to + id="dx1-25113"> attribute set to true otherwise if does “HYPER”. -

    With boolean-style attributes like

    With boolean-style attributes like nohyper, make sure you always test for , make sure you always test for true not false in case the attribute hasn’t been set. -

    Again there’s a shortcut if you need to lookup the category label from a particular +

    Again there’s a shortcut if you need to lookup the category label from a particular entry: -



    \glsifattribute  \glsifattribute{entry-label}{true-part} {false-part}

    -

    -

    There’s also a shortcut to determine if a particular category has the

    +

    There’s also a shortcut to determine if a particular category has the regular + id="dx1-25116"> attribute set to “true”: -



    \glsifregularcategory  \glsifregularcategory{category-label} @@ -8286,12 +8628,12 @@ class="cmitt-10">true-part}{false-part}

    -

    +

    Alternatively, if you need to lookup the category for a particular entry: -



    \glsifregular  \glsifregular{entry-label}{}{false-part}

    -

    +

    Note that if the regular attribute hasn’t be set, the above do ⟨ attribute hasn’t be set, the above do ⟨false-part⟩. There are also reverse commands that test if the regular attribute has been set to + id="dx1-25120"> attribute has been set to “false”: -



    \glsifnotregularcategory  \glsifnotregularcategory{category-label} @@ -8322,12 +8664,12 @@ class="cmitt-10">true-part}{false-part}

    -

    +

    or for a particular entry: -



    \glsifnotregular  \glsifnotregular{entry-label}{}{false-part}

    -

    +

    Again, if the regular attribute hasn’t been set, the above do ⟨ attribute hasn’t been set, the above do ⟨false-part⟩, so these reverse commands aren’t logically opposite in the strict sense. -

    You can iterate through all entries with a given category using: -


    You can iterate through all entries with a given category using: +


    \glsforeachincategory[glossary-labels]{label-cs}{body}

    -

    +

    This iterates through all entries in the glossaries identified by the comma-separated list ⟨glossary-labels⟩ that have the category given by ⟨

    Similarly, you can iterate through all entries that have a category with a given +

    Similarly, you can iterate through all entries that have a category with a given attribute using: -



    \glsforeachwithattribute  \glsforeachwithattribute[glossary-labels] @@ -8395,42 +8737,42 @@ class="cmtt-10">}{body}

    -

    +

    This will do ⟨body⟩ for each entry that has a category with the attribute ⟨attribute-label⟩ set to ⟨attribute-value⟩. The remaining arguments are as the previous command. -

    You can change the category for a particular entry using the standard glossary +

    You can change the category for a particular entry using the standard glossary field changing commands, such as \glsfielddef. Alternatively, you can + id="dx1-25125">. Alternatively, you can use -



    \glsxtrsetcategory  \glsxtrsetcategory{entry-labels}{category-label}

    -

    +

    This will change the category to ⟨category-label⟩ for each entry listed in the comma-separated list ⟨entry-labels⟩. This command uses \glsfieldxdef so it will + id="dx1-25127"> so it will expand ⟨category-label⟩ and make the change global. -

    You can also change the category for all entries with a glossary or glossaries +

    You can also change the category for all entries with a glossary or glossaries using: -



    \glsxtrsetcategoryforall  \glsxtrsetcategoryforall{glossary-labels} @@ -8438,75 +8780,75 @@ class="cmtt-10">} class="cmtt-10">{⟨category-label}

    -

    +

    where ⟨glossary-labels⟩ is a comma-separated list of glossary labels.

    -

    -

    +

    Top

    6. Entry Counting

    -

    As mentioned in

    As mentioned in §2.3 Entry Counting Modifications, glossaries-extra modifies the \glsenableentrycount command to allow for the command to allow for the entrycount attribute. This means + id="dx1-26002"> attribute. This means that you not only need to enable entry counting with \glsenableentrycount, but + id="dx1-26003">, but you also need to set the appropriate attribute (see §5 Categories). -

    Remember that entry counting only counts the number of times an entry is used +

    Remember that entry counting only counts the number of times an entry is used by commands that change the first use flag. (That is, all those commands that mark the entry as having been used.) There are many commands that don’t modify this flag and they won’t contribute to the entry use count.
    -

    -

    With

    +

    With glossaries-extra, you may use \cgls instead of instead of \gls even if you haven’t enabled + id="dx1-26006"> even if you haven’t enabled entry counting. You will only get a warning if you use \glsenableentrycount without setting the entrycount attribute. (With attribute. (With glossaries, commands like \cgls will + id="dx1-26008"> will generate a warning if \glsenableentrycount hasn’t been used.) The abbreviation shortcut \ab uses uses \cgls (see §3.3 Shortcut Commands) unlike the acronym shortcut \ac which uses which uses \gls. -

    All upper case versions (not provided by

    All upper case versions (not provided by glossaries) are also available: -



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

    -

    +

    and -



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

    -

    +

    These are analogous to \cgls and \cglspl but they use -



    \cGLSformat  \cGLSformat{label}{insert}

    -

    +

    and -



    \cGLSplformat  \cGLSplformat{label}{insert}

    -

    +

    which convert the analogous \cglsformat and \cglsplformat to upper case. -

    Just using

    Just using glossaries:

    -
    +
    \documentclass{article}  
    \usepackage{glossaries}  
    \makeglossaries @@ -8575,16 +8917,16 @@ class="cmss-10">glossaries:  
    \printglossaries  
    \end{document}
    -

    -

    If you switch to

    +

    If you switch to glossaries-extra you must set the entrycount attribute: + id="dx1-26015"> attribute:

    -
    +
    \documentclass{article}  
    \usepackage{glossaries-extra}  
    \makeglossaries @@ -8598,16 +8940,16 @@ class="cmss-10">entrycount\printglossaries  
    \end{document}
    -

    -

    When activated with

    +

    When activated with \glsenableentrycount, commands such as \cgls now + id="dx1-26016"> now use -



    \glsxtrifcounttrigger  \glsxtrifcounttrigger{label}{} class="cmtt-10">{normal code}

    -

    +

    to determine if the entry trips the entry count trigger. The ⟨trigger code⟩ uses commands like \cglsformat and unsets the first use flag. The ⟨normal code⟩ is the code that would ordinarily be performed by whatever the equivalent command is (for @@ -8633,12 +8975,12 @@ class="cmti-10">trigger code⟩ but the usual \gls behaviour in ⟨normal code⟩). -

    The default definition is: +

    The default definition is:

    -
    +
    \newcommand*{\glsxtrifcounttrigger}[3]{%  
     \glshasattribute{#1}{entrycount}%  
     {% @@ -8651,35 +8993,35 @@ class="cmti-10">normal code⟩).  
     {#3}%  
    }
    -

    This means that if an entry is assigned to a category that has the

    This means that if an entry is assigned to a category that has the entrycount + id="dx1-26019"> attribute then the ⟨trigger code⟩ will be used if the previous count value (the number of times the entry was used on the last run) is greater than the value of the attribute. -

    For example, to trigger normal use if the previous count value is greater than +

    For example, to trigger normal use if the previous count value is greater than four:

    -
    +
    \glssetcategoryattribute{abbreviation}{entrycount}{4}
    -

    -

    There is a convenient command provided to enable entry counting, set the +

    +

    There is a convenient command provided to enable entry counting, set the entrycount attribute and redefine attribute and redefine \gls, etc to use , etc to use \cgls etc: -


    etc: +


    \GlsXtrEnableEntryCounting  \GlsXtrEnableEntryCounting{categories} @@ -8687,18 +9029,18 @@ class="cmtt-10">} class="cmtt-10">{⟨value}

    -

    +

    The first argument ⟨categories⟩ is a comma-separated list of categories. For each category, the entrycount attribute is set to ⟨ attribute is set to ⟨value⟩. In addition, this does:

    -
    +
    \renewcommand*{\gls}{\cgls}%  
    \renewcommand*{\Gls}{\cGls}%  
    \renewcommand*{\glspl}{\cglspl}% @@ -8706,18 +9048,18 @@ class="cmti-10">value⟩. In addition, this does:  
    \renewcommand*{\GLS}{\cGLS}%  
    \renewcommand*{\GLSpl}{\cGLSpl}%
    -

    This makes it easier to enable entry-counting on existing documents. -

    If you use

    This makes it easier to enable entry-counting on existing documents. +

    If you use \GlsXtrEnableEntryCounting more than once, subsequent uses will just set the entrycount attribute for each listed category. -

    The above example document can then become: + id="dx1-26025"> attribute for each listed category. +

    The above example document can then become:

    -
    +
    \documentclass{article}  
    \usepackage{glossaries-extra}  
    \makeglossaries @@ -8730,15 +9072,15 @@ class="cmss-10">entrycount\printglossaries  
    \end{document}
    -

    -

    The standard entry-counting function describe above counts the number of times +

    +

    The standard entry-counting function describe above counts the number of times an entry has been marked as used throughout the document. (The reset commands will reset the total back to zero.) If you prefer to count per sectional-unit, you can use -



    \GlsXtrEnableEntryUnitCounting  \GlsXtrEnableEntryUnitCounting {value}{counter-name}

    -

    +

    where ⟨categories⟩ is a comma-separated list of categories to which this feature should be applied, ⟨value⟩ is the trigger value and ⟨counter-name⟩ is the name of the counter used by the sectional unit. -

    Due to the asynchronous nature of T

    Due to the asynchronous nature of TEX’s output routine, discrepancies will occur in page spanning paragraphs if you use the page counter.
    -

    -

    Note that you can’t use both the document-wide counting and the per-unit + id="dx1-26027"> counter.

    +

    +

    Note that you can’t use both the document-wide counting and the per-unit counting in the same document. -

    The counter value is used as part of a label, which means that

    The counter value is used as part of a label, which means that \thecounter-name⟩ needs to be expandable. Since hyperref also has a similar requirement and provides + id="dx1-26028"> also has a similar requirement and provides \theHcounter-name⟩ as an expandable alternative, \theHcounter-name⟩ if it exists otherwise it will use \thecounter-name⟩. -

    The per-unit counting function uses two attributes:

    The per-unit counting function uses two attributes: entrycount (as before) and + id="dx1-26029"> (as before) and unitcount (the name of the counter). + id="dx1-26030"> (the name of the counter). -

    Both the original document-wide counting mechanism and the per-unit counting +

    Both the original document-wide counting mechanism and the per-unit counting mechanism provide a command that can be used to access the current count value for this run: -



    \glsentrycurrcount  \glsentrycurrcount{label}

    -

    +

    and the final value from the previous run: -



    \glsentryprevcount  \glsentryprevcount{label}

    -

    +

    In the case of the per-unit counting, this is the final value for the current unit. In both commands ⟨label⟩ is the entry’s label. -

    The per-unit counting mechanism additionally provides: -


    The per-unit counting mechanism additionally provides: +


    \glsentryprevtotalcount  \glsentryprevtotalcount{label}

    -

    +

    which gives the sum of all the per-unit totals from the previous run for the entry given by ⟨label⟩, and -



    \glsentryprevmaxcount  \glsentryprevmaxcount{label}

    -

    +

    which gives the maximum per-unit total from the previous run. -

    The above two commands are unavailable for the document-wide counting. -

    Example of per-unit counting, where the unit is the chapter: +

    The above two commands are unavailable for the document-wide counting. +

    Example of per-unit counting, where the unit is the chapter:

    -
    +
    \documentclass{report}  
    \usepackage{glossaries-extra}  
    \GlsXtrEnableEntryUnitCounting{abbreviation}{2}{chapter} @@ -8857,11 +9199,11 @@ which gives the maximum per-unit total from the previous run.  
    \printglossaries  
    \end{document}
    -

    In this document, the

    In this document, the css entry is used three times in the first chapter. This is more than the trigger value of 2, so \gls{css} is expanded on first use with the short form used on subsequent use, and the css entries in that @@ -8871,19 +9213,19 @@ only used once, which trips the suppression trigger, so in that chapter, the long form is used and \gls{css} doesn’t get a line added to the glossary file. -

    The

    The html is used a total of three times, but the expansion and indexing suppression trigger is tripped in both chapters because the per-unit total (1 for the first chapter and 2 for the second chapter) is less than or equal to the trigger value. -

    The

    The sample entry has only been used once, but it doesn’t trip the indexing suppression because it’s in the general category, which hasn’t been listed in + id="dx1-26036"> category, which hasn’t been listed in \GlsXtrEnableEntryUnitCounting. -

    The per-unit entry counting can be used for other purposes. In the following +

    The per-unit entry counting can be used for other purposes. In the following @@ -8891,20 +9233,20 @@ example document the trigger value is set to zero, which means the index suppres won’t be triggered, but the unit entry count is used to automatically suppress the hyperlink for commands like \gls by modifying the hook -


    by modifying the hook +


    \glslinkcheckfirsthyperhook  \glslinkcheckfirsthyperhook

    -

    +

    which is used at the end of the macro the determines whether or not to suppress the hyperlink.

    -
    +
    \documentclass{article}  
    \usepackage[colorlinks]{hyperref}  
    \usepackage{glossaries-extra} @@ -8925,12 +9267,12 @@ hyperlink.  
    \printglossaries  
    \end{document}
    -

    This only produces a hyperlink for the first instance of

    This only produces a hyperlink for the first instance of \gls{sample} on each page. -

    The earlier warning about using the

    The earlier warning about using the page counter still applies. If the + id="dx1-26039"> counter still applies. If the first instance of \gls occurs at the top of the page within a paragraph that started on the previous page, then the count will continue from the previous @@ -8939,58 +9281,58 @@ page.

    -

    -

    +

    Top

    7. Auto-Indexing

    -

    It’s possible that you may also want a normal index as well as the glossary, +

    It’s possible that you may also want a normal index as well as the glossary, and you may want entries to automatically be added to the index (as in this document). There are two attributes that govern this: indexname and + id="dx1-27001"> and dualindex. -

    The . +

    The \glsxtrpostnamehook macro, used at the end of macro, used at the end of \glossentryname and + id="dx1-27004"> and \Glossentryname, checks the , checks the indexname attribute for the category associated with + id="dx1-27006"> attribute for the category associated with that entry. Since \glossentryname is used in the default glossary styles, this makes a convenient way of automatically indexing each entry name at its location in the glossary without fiddling around with the value of the name + id="dx1-27007"> key. -

    The internal macro used by the

    The internal macro used by the glossaries package to write the information to the external glossary file is modified to check for the dualindex attribute. -

    In both cases, the indexing is done through -


    attribute. +

    In both cases, the indexing is done through +


    \glsxtrdoautoindexname  \glsxtrdoautoindexname{label}{attribute-label}

    -

    +

    This uses the standard \index command with the sort value taken from the entry’s + id="dx1-27010"> command with the sort value taken from the entry’s sort key and the actual value set to key and the actual value set to \glsentryname{label}. If the value of the @@ -9001,141 +9343,141 @@ encap will be the attribute value. For example:

    -
    +
    \glssetcategoryattribute{general}{indexname}{textbf}
    -

    will set the encap to

    will set the encap to textbf which will display the relevant page number in bold whereas

    -
    +
    \glssetcategoryattribute{general}{dualindex}{true}
    -

    won’t apply any formatting to the page number in the index. -

    The location used in the index will always be the page number not the counter +

    won’t apply any formatting to the page number in the index. +

    The location used in the index will always be the page number not the counter used in the glossary. (Unless some other loaded package has modified the definition of \index to use some thing else.)
    -

    -

    By default the

    +

    By default the format key won’t be used with the key won’t be used with the dualindex attribute. You can + id="dx1-27013"> attribute. You can allow the format key to override the attribute value by using the preamble-only + id="dx1-27014"> key to override the attribute value by using the preamble-only command: -



    \GlsXtrEnableIndexFormatOverride  \GlsXtrEnableIndexFormatOverride

    -

    +

    If you use this command and hyperref has been loaded, then the has been loaded, then the theindex + id="dx1-27017"> environment will be modified to redefine \glshypernumber to allow formats that use + id="dx1-27019"> to allow formats that use that command. -

    The

    The dualindex attribute will still be used on subsequent use even if the + id="dx1-27020"> attribute will still be used on subsequent use even if the indexonlyfirst attribute (or attribute (or indexonlyfirst package option) is set. However, the package option) is set. However, the dualindex + id="dx1-27023"> attribute will honour the noindex key.
    -

    -

    The key.

    +

    +

    The \glsxtrdoautoindexname command will attempt to escape any of \makeindex’s special characters, but there may be special cases where it fails, so take + id="dx1-27025">’s special characters, but there may be special cases where it fails, so take care. This assumes the default makeindex actual, level, quote and encap values (unless any of the commands \actualchar, , \levelchar, , \quotechar or or \encapchar + id="dx1-27030"> have been defined before glossaries-extra is loaded). -

    If this isn’t the case, you can use the following preamble-only commands to set +

    If this isn’t the case, you can use the following preamble-only commands to set the correct characters. -

    Be very careful of possible shifting category codes!
    -

    -


    Be very careful of possible shifting category codes!
    +

    +


    \GlsXtrSetActualChar  \GlsXtrSetActualChar{char}

    -

    +

    Set the actual character to ⟨char⟩. -



    \GlsXtrSetLevelChar  \GlsXtrSetLevelChar{char}

    -

    +

    Set the level character to ⟨char⟩. -



    \GlsXtrSetEscChar  \GlsXtrSetEscChar{char}

    -

    +

    Set the escape (quote) character to ⟨char⟩. -



    \GlsXtrSetEncapChar  \GlsXtrSetEncapChar{char}

    -

    +

    Set the encap character to ⟨char⟩.

    -

    -

    +

    Top

    8. On-the-Fly Document Definitions

    -

    The commands described here may superficially look like ⟨

    The commands described here may superficially look like ⟨word\index{word\index then just use \index.
    -

    -

    The

    +

    The glossaries package advises against defining entries in the document + id="dx1-28001"> environment. As mentioned in §1.2 glossaries-extra but can be enabled using the docdefs package options. -

    Although this can be problematic, the package options. +

    Although this can be problematic, the glossaries-extra package provides a way of defining and using entries within the document environment without the tricks used + id="dx1-28004"> environment without the tricks used with the docdefs option. option. There are limitations with this approach, so take care with it. This function is disabled by default, but can be enabled using the preamble-only command: -



    \GlsXtrEnableOnTheFly  \GlsXtrEnableOnTheFly

    -

    +

    When used, this defines the commands described below. -

    The commands

    The commands \glsxtr, \glsxtrpl, \Glsxtr and \Glsxtrpl can’t be used after the glossaries have been displayed (through \printglossary etc). It’s best not to + id="dx1-28008"> etc). It’s best not to mix these commands with the standard glossary commands, such as \gls or there may be unexpected results.
    -

    -


    +


    \glsxtr  \glsxtr[gls-options][dfn-options]{label}

    -

    +

    If an entry with the label ⟨label⟩ has already been defined, this just does \gls @@ -9236,68 +9578,68 @@ class="cmitt-10">dfn-options⟩}

    -

    The ⟨

    The ⟨label⟩ must contain any non-expandable commands, such as formatting commands or problematic characters. If the term requires any of these, they must be omitted from the ⟨label⟩ and placed in the name key must be provided in the optional + id="dx1-28010"> key must be provided in the optional argument ⟨dfn-options⟩.
    -

    +

    -

    The second optional argument ⟨

    The second optional argument ⟨dfn-options⟩ should be empty if the entry has already been defined, since it’s too late for them. If it’s not empty, a warning will be generated with -



    \GlsXtrWarning  \GlsXtrWarning{dfn-options}{label}

    -

    -

    For example, this warning will be generated on the second instance of

    +

    For example, this warning will be generated on the second instance of \glsxtr below:

    -
    +
    \glsxtr[][plural=geese]{goose}  
     ... later  
    \glsxtr[][plural=geese]{goose}
    -

    -

    If you are considering doing something like: +

    +

    If you are considering doing something like:

    -
    +
    \newcommand*{\goose}{\glsxtr[][plural=geese]{goose}}  
    \renewcommand*{\GlsXtrWarning}[2]{}  
     ... later  
    \goose\ some more text here
    -

    then don’t bother. It’s simpler and less problematic to just define the entries in the +

    then don’t bother. It’s simpler and less problematic to just define the entries in the preamble with \newglossaryentry and then use and then use \gls in the document. -

    There are plural and case-changing alternatives to

    There are plural and case-changing alternatives to \glsxtr: -



    \glsxtrpl  \glsxtrpl[gls-options][dfn-options]{label}

    -

    +

    This is like \glsxtr but uses \glspl instead of \gls. -



    \Glsxtr  \Glsxtr[gls-options][dfn-options]{label}

    -

    +

    This is like \glsxtr but uses \Gls instead of \gls. -



    \Glsxtrpl  \Glsxtrpl[gls-options][dfn-options]{label}

    -

    +

    This is like \glsxtr but uses \Glspl instead of \gls. -

    If you use UTF-8 and don’t want the inconvenient of needing to use an +

    If you use UTF-8 and don’t want the inconvenient of needing to use an ASCII-only label, then it’s better to use XƎLATEX or LuaLATEX instead of LATEX (or pdfLATEX). If you really desperately want to use UTF-8 entry labels @@ -9351,564 +9693,2052 @@ without switching to X\GlsXtrEnableOnTheFly that allows you to use UTF-8 characters in ⟨label⟩, but it’s experimental and may not work in some cases. -

    If you use the starred version of

    If you use the starred version of \GlsXtrEnableOnTheFly don’t use any commands in the ⟨label⟩, even if they expand to just text.
    -

    +

    -

    -

    +

    Top

    9. Miscellaneous New Commands

    -

    The glossaries package provides \glsrefentry entry to cross-reference entries -when used with the entrycounter or subentrycounter options. The glossaries-extra -package provides a supplementary command -


    \glsxtrpageref  \glsxtrpageref{label}

    -

    -that works in the same way except that it uses \pageref instead of \ref. -

    As mentioned in the description for the record package option described in §1.2 -New or Modified Package Options, there’s a new way of printing a glossary without -sorting or indexing: -


    \printunsrtglossary[options]

    -

    -To iterate over all glossaries: -


    \printunsrtglossaries

    -

    -

    However, you can also uses these commands together with a post-processor that -works with the record package option and -


    \glsxtrresourcefile[options]filename

    -

    -or -


    \GlsXtrLoadResources[options]

    -

    -At the time of writing this, there is a new post-processor under development called -bib2gls that can be used in this way to fetch glossary entries stored in a .bib file, -selecting only those referenced in the document. It then creates a .glstex file with -the relevant definitions defined in the order indicated in by ⟨options⟩. Since the order -of definition is already in the appropriate order, there’s no need for any additional -sorting by makeindex or xindy. (It is however possible to use makeindex/xindy in -combination with the post-processor by setting record=alsoindex and using -\makeglossaries and \printglossaries as usual. For example, if you require -custom xindy rules.) + id="sec:bib2gls">bib2gls: Managing Reference Databases

    +

    There is a new command line application under development called bib2gls, +which works in much the same way as bibtex. Instead of storing all your entry +definitions in a .tex and loading them using \input or \loadglsentries, the entries +can instead be stored in a .bib file and bib2gls can selectively write the appropriate +commands to a .glstex file which is loaded using \glsxtrresourcefile (or +\GlsXtrLoadResources). +

    This means that you can use a reference managing system, such as JabRef, to +maintain the database and it reduces the TEX overhead by only defining the entries +that are actually required in the document. If you currently have a .tex file that +contains hundreds of definitions, but you only use a dozen or so in your document, +then the build time is needlessly slowed by the unrequired definitions that occur +when the file is input. +

    Although bib2gls isn’t ready yet, there have been some new commands and +options added to glossaries-extra to help assist the integration of bib2gls into the +document build process. +

    An example of the contents of .bib file that stores glossary entries that can be +extracted with bib2gls:

    -

    -

    Top

    10. Supplemental Packages

    -

    The glossaries bundle provides additional support packages glossaries-prefix (for -prefixing) and glossaries-accsupp (for accessibility support). These packages aren’t -automatically loaded. +

    +@entry{bird, + 
      name={bird}, + 
      description = {feathered animal}, + 
      see={[see also]{duck,goose}} + 
    } + 
    @entry{duck, + 
      name={duck}, + 
      description = {a waterbird with short legs} + 
    } + 
    @entry{goose, + 
      name="goose", + 
      plural="geese", + 
      description={a waterbird with a long neck} + 
    } +
    +

    +

    The follow provides some abbreviations: + + +

    -

    Top

    10.1 Prefixes or Determiners

    -

    If prefixing is required, you can simply load glossaries-prefix after glossaries-extra. For -example: +

    +@string{ssi={server-side includes}} + 
    @string{html={hypertext markup language}} + 
    @abbreviation{shtml, + 
      short="shtml", + 
      long= ssi # " enabled " # html, + 
      description={a combination of \gls{html} and \gls{ssi}} + 
    } + 
    @abbreviation{html, + 
      short ="html", + 
      long  = html, + 
      description={a markup language for creating web pages} + 
    } + 
    @abbreviation{ssi, + 
      short="ssi", + 
      long = ssi, + 
      description={a simple interpreted server-side scripting language} + 
    } +
    +

    +

    Here are some symbols:

    -
    -\documentclass{article} - 
    \usepackage{glossaries-extra} - 
    \usepackage{glossaries-prefix} - 
    \makeglossaries - 
    \newabbreviation - 
     [prefix={an\space}, - 
     prefixfirst={a~}] - 
     {svm}{SVM}{support vector machine} - 
    \begin{document} - 
    First use: \pgls{svm}. - 
    Next use: \pgls{svm}. - 
    \printglossaries - 
    \end{document} +
    +preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"} + 
    @symbol{M, + 
      name={$\mtx{M}$}, + 
      text={\mtx{M}}, + 
      description={a matrix} + 
    } + 
    @symbol{v, + 
      name={$\vec{v}$}, + 
      text={\vec{v}}, + 
      description={a vector} + 
    } + 
    @symbol{S, + 
      name={$\mathcal{S}$}, + 
      text={\mathcal{S}}, + 
      description={a set} + 
    }
    -

    -

    +

    +

    To ensure that bib2gls can find out which entries have been used in the +document, you need the record package. Option: + + +

    -

    Top

    10.2 Accessibility Support

    -

    The glossaries-accsupp needs to be loaded before glossaries-extra or through the +

    +\usepackage[record]{glossaries-extra} +
    +

    If this option’s value is omitted (as above), the normal indexing will be switched off, +since bib2gls can also sort the entries and collate the locations. +

    If you still want to use an indexing application (for example, you need a custom +xindy rule), then just use record=alsoindex and continue to use \makeglossaries +and \printglossary (or \printglossaries), but instruct bib2gls to omit sorting +to save time. +

    The .glstex file created by \bib2gls is loaded using: +


    \glsxtrresourcefile  \glsxtrresourcefile[options]{filename} +

    +

    +(Don’t include the file extension in ⟨filename⟩.) There’s a shortcut version that sets +⟨filename\jobname: +


    \GlsXtrLoadResources  \GlsXtrLoadResources[options]

    +

    +On the first use, this command is a shortcut for

    +
    accsupp package option: +class="cmtt-10">\glsxtrresourcefile[⟨options]{\jobname} +
    +
    On subsequent use,9.1 this +command is a shortcut for
    +
    +\glsxtrresourcefile[options]{\jobname-n} +
    +
    where ⟨n⟩ is the current value of +


    \glsxtrresourcecount

    +

    +which is incremented at the end of \GlsXtrLoadResources. Any advisory notes +regarding \glsxtrresourcefile also apply to \GlsXtrLoadResources. +

    The \glsxtrresourcefile command writes the line

    +
    +\glsxtr@resource{options}{filename} +
    +
    to the .aux file and will input ⟨filename.glstex if it +exists.9.2 + + + +

    The options are ignored by glossaries-extra but are picked up by bib2gls and are +used to supply various information, such as the name of the .bib files and any +changes to the default behaviour. +

    Since the .glstex won’t exist on the first LATEX run, the record package option +additionally switches on undefaction=warn. Any use of commands like \gls or +\glstext will produce ?? in the document, since they are undefined at this +point. Once bib2gls has created the .glstex file the references should be +resolved. +

    Note that as from v1.12, \glsxtrresourcefile temporarily switches the +category code of @ to 11 (letter) while it reads the file to allow for any internal +commands stored in the location field. +

    Since the .glstex file only defines those references used within the document and +the definitions have been written in the order corresponding to bib2gls sorted +list, the glossaries can simply be displayed using \printunsrtglossary (or +\printunsrtglossaries), described in §10.2 Display All Entries Without Sorting or +Indexing. +

    Suppose the .bib examples shown above have been stored in the files terms.bib, +abbrvs.bib and symbols.bib which may either be in the current directory or on +TEX’s path. Then the document might look like:

    -
    -\usepackage[accsupp]{glossaries-extra} +
    +\documentclass{article} + 
    \usepackage[record]{glossaries-extra} + 
    \setabbreviationstyle{long-short-desc} + 
    \GlsXtrLoadResources[src={terms,abbrvs,symbols}] + 
    \begin{document} + 
    \gls{bird} + 
    \gls{shtml} + 
    \gls{M} + 
    \printunsrtglossaries + 
    \end{document}
    -

    If you don’t load glossaries-accsupp or you load glossaries-accsupp after glossaries-extra -the new \glsaccessxxx⟩ commands described below will simply be equivalent to the -corresponding \glsentryxxx⟩ commands. -

    The following \glsaccessxxx⟩ commands add accessibility information wrapped -around the corresponding \glsentryxxx⟩ commands. There is no check for existence -of the entry nor do any of these commands add formatting, hyperlinks or indexing -information. -


    \glsaccessname  \glsaccessname{label}

    -

    -This displays the value of the name field for the entry identified by ⟨label⟩. -

    If the glossaries-accsupp package isn’t loaded, this is simply defined as: +

    The document build process (assuming the document is called mydoc) is:

    -
    -\newcommand*{\glsaccessname}[1]{\glsentryname{#1}} +
    +pdflatex mydoc + 
    bib2gls mydoc + 
    pdflatex mydoc
    -

    otherwise it’s defined as: +

    This creates a single glossary containing the entries: bird, duck, goose, html, M, +shtml and ssi (in that order). The bird, shtml and M entries were added because +bib2gls detected (from the .aux file) that they had been used in the document. The +other entries were added because bib2gls detected (from the .bib files) that they +are referenced by the used entries. In the case of duck and goose, they are +in the see field for bird. In the case of ssi and html, they are referenced +in the description field of shtml. These cross-referenced entries won’t have +a location list when the glossary is first displayed, but depending on how +they are referenced, they may pick up a location list on the next document +build. +

    The entries can be separated into different glossaries with different sort +methods:

    -
    -\newcommand*{\glsaccessname}[1]{% - 
      \glsnameaccessdisplay - 
      {% - 
        \glsentryname{#1}% - 
      }% - 
      {#1}% - 
    } +
    +\documentclass{article} + 
    \usepackage[record,abbreviations,symbols]{glossaries-extra} + 
    \setabbreviationstyle{long-short-desc} + 
    \GlsXtrLoadResources[src={terms},sort={en-GB},type=main] + 
    \glsxtrresourcefile + 
     [src={abbrvs},sort={letter-nocase},type=abbreviations] + 
     {\jobname-abr} + 
    \glsxtrresourcefile + 
     [src={symbols},sort={use},type={symbols}] + 
     {\jobname-sym} + 
    \begin{document} + 
    \gls{bird} + 
    \gls{shtml} + 
    \gls{M} + 
    \printunsrtglossaries + 
    \end{document}
    -

    (\glsnameaccessdisplay is defined by the glossaries-accsupp package.) The first -letter upper case version is: -


    \Glsaccessname  \Glsaccessname{label}

    -

    -Without the glossaries-accsupp package this is just defined as: +

    (By default, entries are sorted according to the operating system’s locale. +If this doesn’t match the document language, you need to set this in the +option list, for example sort=de-CH-1996 for Swiss German using the new +orthography.) +

    Note that \glsaddall doesn’t work in this case as it has to iterate over the +glossary lists, which will be empty on the first run and on subsequent runs will only +contain those entries that have been selected by bib2gls. Instead, if you want to +add all entries to the glossary, you need to tell bib2gls this in the options +list:

    -
    -\newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}} +
    +\GlsXtrLoadResources[src={terms},selection={all}]
    -

    With the glossaries-accsupp package this is defined as: +

    +

    The bib2gls user manual will contain more detail.

    -
    -\newcommand*{\Glsaccessname}[1]{% - 
      \glsnameaccessdisplay - 
      {% +

    +

    Top

    10. Miscellaneous New Commands

    +

    The glossaries package provides \glsrefentry entry to cross-reference entries +when used with the entrycounter or subentrycounter options. The glossaries-extra +package provides a supplementary command +


    \glsxtrpageref  \glsxtrpageref{label}

    +

    +that works in the same way except that it uses \pageref instead of \ref. +

    You can copy an entry to another glossary using +


    \glsxtrcopytoglossary  \glsxtrcopytoglossary{entry-label}{glossary-type} +

    +

    +This appends ⟨entry-label⟩ to the end of the internal list for the glossary given by +⟨glossary-type⟩. Be careful if you use the hyperref package as this may cause duplicate +hypertargets. You will need to change \glolinkprefix to another value or disable +hyperlinks when you display the duplicate. Alternatively, use the new target key to +switch off the targets: + + + +

    +
    +\printunsrtglossary[target=false] +
    +

    +

    The glossaries package allows you to set preamble code for a given glossary +type using \setglossarypreamble. This overrides any previous setting. +With glossaries-extra (as from v1.12) you can instead append to the preamble +using +


    \apptoglossarypreamble  \apptoglossarypreamble[type]{code}

    +

    +or prepend using +


    \pretoglossarypreamble  \pretoglossarypreamble[type]{code}

    +

    +

    +

    Top

    10.1 Entry Fields

    +

    A field may now be used to store the name of a text-block command that takes a +single argument. The field is given by +


    \GlsXtrFmtField  \GlsXtrFmtField

    +

    +The default value is useri. Note that the value must be the control sequence name +without the initial backslash. +

    For example: + + + +

    +
    +\newcommand*{\mtx}[1]{\boldsymbol{#1}} + 
    \newcommand*{\mtxinv}[1]{\mtx{#1}\sp{-1}} + 
    \newglossaryentry{matrix}{% + 
      name={matrix}, + 
      symbol={\ensuremath{\mtx{M}}}, + 
      plural={matrices}, + 
      user1={mtx}, + 
      description={rectangular array of values} + 
    } + 
    \newglossaryentry{identitymatrix}{% + 
      name={identity matrix}, + 
      symbol={\ensuremath{\mtx{I}}}, + 
      plural={identity matrices}, + 
      description={a diagonal matrix with all diagonal elements equal to + 
    1 and all other elements equal to 0} + 
    } + 
    \newglossaryentry{matrixinv}{% + 
      name={matrix inverse}, + 
      symbol={\ensuremath{\mtxinv{M}}}, + 
      user1={mtxinv}, + 
      description={a square \gls{matrix} such that + 
       $\mtx{M}\mtxinv{M}=\glssymbol{identitymatrix}$} + 
    } +
    +

    +

    There are two commands provided that allow you to apply the command to an +argument: +


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

    +

    +This effectively does

    +
    +\glslink[options]{label}{⟨⟨cs{text}} +
    +
    where ⟨cs⟩ is the command obtained from the control sequence name supplied in the +provided field. If the field hasn’t been set, \glsxtrfmt will simply do ⟨text⟩. The +default ⟨options⟩ are given by +


    \GlsXtrFmtDefaultOptions  \GlsXtrFmtDefaultOptions

    +

    + + + +This is defined as noindex but may be redefined as appropriate. Note that the +replacement text of \GlsXtrFmtDefaultOptions is prepended to the optional +argument of \glslink. +

    For example: + + + +

    +
    +\[ + 
      \glsxtrfmt{matrix}{A} + 
      \glsxtrfmt{matrixinv}{A} + 
      = + 
      \glssymbol{identitymatrix} + 
    \] +
    +

    If the default options are set to noindex then \glsxtrfmt won’t index, but will +create a hyperlink (if hyperref has been loaded). This can be changed so that it also +suppresses the hyperlink: + + + +

    +
    +\renewcommand{\GlsXtrFmtDefaultOptions}{hyper=false,noindex} +
    +

    +

    Note that \glsxtrfmt won’t work with PDF bookmarks. Instead you can +use +


    \glsxtrentryfmt  \glsxtrentryfmt{label}{text}

    +

    +This uses \texorpdfstring and will simply expand to ⟨text⟩ within the PDF +bookmarks, but in the document it will do ⟨cs{text} if a control sequence name has +been provided or just ⟨text⟩ otherwise. +

    The glossaries package provides \glsaddstoragekey to add new keys. This +command will cause an error if the key has already been defined. The glossaries-extra +package provides a supplementary command that will only define the key if it doesn’t +already exist: +


    \glsxtrprovidestoragekey  \glsxtrprovidestoragekey{key}{default}{cs} +

    +

    +If the key has already been defined, it will still provide the command given in the +third argument ⟨cs⟩ (if it hasn’t already been defined). Unlike \glsaddstoragekey, ⟨cs⟩ +may be left empty if you’re happy to just use \glsfieldfetch to fetch the value of +this new key. +

    You can test if a key has been provided with: +


    \glsxtrifkeydefined  \glsxtrifkeydefined{key}{true}{false}

    +

    +This tests if ⟨key⟩ is available for use in the ⟨key⟩= list in the second argument of +\newglossaryentry (or the optional argument of commands like \newabbreviation). +The corresponding field may not have been set for any of the entries if no default was +provided. +

    There are now commands provided to set individual fields. Note that these only +change the specified field, not any related fields. For example, changing the value of +the text field won’t update the plural field. +


    \GlsXtrSetField  \GlsXtrSetField{label}{field}{value}

    +

    +Sets the field given by ⟨field⟩ to ⟨value⟩ for the entry given by ⟨label⟩. No expansion is +performed. It’s not necessary for the field to have been defined as a key. You can +access the value later with \glsxtrusefield. Note that \glsxtrifkeydefined only +tests if a key has been defined for use with commands like \newglossaryentry. If a +field without a corresponding key is assigned a value, the key remains undefined. This +command is robust. +

    \GlsXtrSetField uses +


    \glsxtrsetfieldifexists  \glsxtrsetfieldifexists{label}{field}{code} +

    + + + +

    +where ⟨label⟩ is the entry label and ⟨code⟩ is the assignment code. +

    This command just uses \glsdoifexists{label}{code} (ignoring the +⟨field⟩ argument), so by default it causes an error if the entry doesn’t exist. +This can be changed to a warning with undefaction=warn. You can redefine +\glsxtrsetfieldifexists to simply do ⟨code⟩ if you want to skip the existence check. +Alternatively you can instead use +


    \glsxtrdeffield  \glsxtrdeffield{label}{field}arguments{replacement +text}

    +

    +This simply uses etoolbox’s \csdef without any checks. This command isn’t robust. +There is also a version that uses \csedef instead: +


    \glsxtredeffield  \glsxtredeffield{label}{field}arguments{replacement +text}

    +

    +


    \gGlsXtrSetField  \gGlsXtrSetField{label}{field}{value}

    +

    +As \GlsXtrSetField but globally. +


    \eGlsXtrSetField  \eGlsXtrSetField{label}{field}{value}

    +

    +As \GlsXtrSetField but uses protected expansion. +


    \xGlsXtrSetField  \xGlsXtrSetField{label}{field}{value}

    +

    +As \gGlsXtrSetField but uses protected expansion. +


    \GlsXtrLetField  \GlsXtrLetField{label}{field}{cs}

    +

    +Sets the field given by ⟨field⟩ to the replacement text of ⟨cs⟩ for the entry given by ⟨label⟩ +(using \let). +


    \csGlsXtrLetField  \csGlsXtrLetField{label}{field}{cs name} +

    +

    +As \GlsXtrLetField but the control sequence name is supplied instead. +


    \GlsXtrLetFieldToField  \GlsXtrLetFieldToField{label-1}{field-1} +{label-2}{field-2}

    +

    +Sets the field given by ⟨field-1⟩ for the entry given by ⟨label-1⟩ to the field given by +⟨field-2⟩ for the entry given by ⟨label-2⟩. There’s no check for the existence of ⟨label-2⟩, +but \glsxtrsetfieldifexists{label-1}{field-1}{code} is still used, as for +\GlsXtrSetField. +

    The glossaries package provides \glsfieldfetch which can be used to fetch the +value of the given field and store it in a control sequence. The glossaries-extra package +provides another way of accessing the field value: +


    \glsxtrusefield  \glsxtrusefield{entry-label}{field-label}

    +

    +This works in the same way as commands like \glsentrytext but the field label is + + + +specified in the first argument. Note that the ⟨field-label⟩ corresponds to the internal +field tag, which isn’t always the same as the key name. See Table 4.1 of the glossaries +manual. No error occurs if the entry or field haven’t been defined. This command is +not robust. +

    There is also a version that converts the first letter to uppercase (analogous to +\Glsentrytext): +


    \Glsxtrusefield  \Glsxtrusefield{entry-label}{field-label}

    +

    +

    If you want to use a field to store a list that can be used as an etoolbox internal +list, you can use the following command that adds an item to the field using +etoolbox’s \listcsadd: +


    \glsxtrfieldlistadd  \glsxtrfieldlistadd{label}{field}{item} +

    +

    +where ⟨label⟩ is the entry’s label, ⟨field⟩ is the entry’s field and ⟨item⟩ is the item to +add. There are analogous commands that use \listgadd, \listeadd and +\listxadd: +


    \glsxtrfieldlistgadd  \glsxtrfieldlistgadd{label}{field}{item} +

    +

    +


    \glsxtrfieldlisteadd  \glsxtrfieldlisteadd{label}{field}{item} +

    +

    +


    \glsxtrfieldlistxadd  \glsxtrfieldlistxadd{label}{field}{item} +

    +

    +You can then iterate over the list using: +


    \glsxtrfielddolistloop  \glsxtrfielddolistloop{label}{field} +

    +

    +or +


    \glsxtrfieldforlistloop  \glsxtrfieldforlistloop{label}{field} +{handler}

    +

    +that internally use \dolistcsloop and \forlistloop, respectively. +

    There are also commands that use \ifinlistcs: +


    \glsxtrfieldifinlist  \glsxtrfieldifinlist{label}{field}{item}{true} +{false}

    +

    +and \xifinlistcs +


    \glsxtrfieldxifinlist  \glsxtrfieldxifinlist{label}{field}{item} +{true}{false}

    + + + +

    +

    See the etoolbox’s user manual for further details of these commands, in particular +the limitations of \ifinlist. +

    When using the record option, in addition to recording the usual location, you can +also record the current value of another counter at the same time using the +preamble-only command: +


    \GlsXtrRecordCounter  \GlsXtrRecordCounter{counter name}

    +

    +For example: + + + +

    +
    +\usepackage[record]{glossaries-extra} + 
    \GlsXtrRecordCounter{section} +
    +

    Each time an entry is referenced with commands like \gls or \glstext, +the .aux file will not only contain the \glsxtr@record command but also +

    +
    +\glsxtr@counterrecord{label}{section}{n} +
    +
    where ⟨n⟩ is the current expansion of \thesection and ⟨label⟩ is the entry’s +label. On the next run, when the .aux file is run, this command will do +
    +
    +\glsxtrfieldlistgadd{label}{record.counter}{n} +
    +
    In the above example, if \gls{bird} is used in section 1.2 this would be + + + +
    +\glsxtrfieldlistgadd{bird}{record.section}{1.2} +
    +

    Note that there’s no key corresponding to this new record.section field, but its +value can be accessed with \glsxtrfielduse or the list can be iterated over with +\glsxtrfielddolistloop etc. +

    +

    +

    Top

    10.2 Display All Entries Without Sorting or Indexing

    +


    \printunsrtglossary  \printunsrtglossary[options]

    +

    +This behaves like \printnoidxglossary but never sorts the entries and +always lists all the defined entries for the given glossary (and doesn’t require +\makenoidxglossaries). +

    There’s also a starred form +


    \printunsrtglossary * \printunsrtglossary*[options]{code}

    +

    +which is equivalent to

    +
    +\begingroup +
     code\printunsrtglossary[options]% +
    \endgroup +
    +
    Note that unlike \glossarypreamble, the supplied ⟨code⟩ is done before the glossary +header. +

    This means you now have the option to simply list all entries on the first +LATEX run without the need for a post-processor, however there will be no number +list in this case, as that has to be set by a post-processor such as bib2gls (see §9 +bib2gls: Managing Reference Databases). +

    For example: + + + +

    +
    +\documentclass{article} + 
    \usepackage{glossaries-extra} + 
    \newglossaryentry{zebra}{name={zebra},description={stripy animal}} + 
    \newglossaryentry{ant}{name={ant},description={an insect}} + 
    \begin{document} + 
    \gls{ant} and \gls{zebra} + 
    \printunsrtglossaries + 
    \end{document} +
    +

    In the above, zebra will be listed before ant as it was defined first. +

    If you allow document definitions with the docdefs option, the document will +require a second LATEX run if the entries are defined after \printunsrtglossary. +

    The optional argument is as for \printnoidxglossary (except for the sort key, +which isn’t available). +

    All glossaries may be displayed in the order of their definition using: +


    \printunsrtglossaries  \printunsrtglossaries

    +

    +which is analogous to \printnoidxglossaries. This just iterates over all defined +glossaries (that aren’t on the ignored list) and does \printunsrtglossary[type=⟨type⟩]. +

    The \printunsrtglossary command internally uses +


    \printunsrtglossaryhandler  \printunsrtglossaryhandler{label} +

    +

    +for each item in the list, where ⟨label⟩ is the current label. +

    By default this just does +


    \glsxtrunsrtdo  \glsxtrunsrtdo{label}

    +

    +which determines whether to use \glossentry or \subglossentry and checks the +location and loclist fields for the number list. +

    You can redefine the handler if required. +

    If you redefine the handler to exclude entries, you may end up with an empty +glossary. This could cause a problem for the list-based styles.
    +

    +

    For example, if the preamble includes: + + + +

    +
    +\usepackage[record,style=index]{glossaries-extra} + 
    \GlsXtrRecordCounter{section} +
    +

    then you can print the glossary but first redefine the handler to only select entries +that include the current section number in the record.section field: + + + +

    +
    +\renewcommand{\printunsrtglossaryhandler}[1]{% + 
      \glsxtrfieldxifinlist{#1}{record.section}{\thesection} + 
      {\glsxtrunsrtdo{#1}}% + 
      {}% + 
    } +
    +

    +

    Alternatively you can use the starred form of \printunsrtglossary which will +localise the change: + + + +

    +
    +\printunsrtglossary*{% + 
      \renewcommand{\printunsrtglossaryhandler}[1]{% + 
        \glsxtrfieldxifinlist{#1}{record.section}{\thesection} + 
        {\glsxtrunsrtdo{#1}}% + 
        {}% + 
      }% + 
    } +
    +

    +

    If you are using the hyperref package and want to display the same glossary more +than once, you can also add a temporary redefinition of \glolinkprefix to avoid +duplicate hypertarget names. For example: + + + +

    +
    +\printunsrtglossary*{% + 
      \renewcommand{\printunsrtglossaryhandler}[1]{% + 
        \glsxtrfieldxifinlist{#1}{record.section}{\thesection} + 
        {\glsxtrunsrtdo{#1}}% + 
        {}% + 
      }% + 
      \ifcsundef{theHsection}% + 
      {% + 
        \renewcommand*{\glolinkprefix}{record.#2.\csuse{thesection}.}% + 
      }% + 
      {% + 
        \renewcommand*{\glolinkprefix}{record.#2.\csuse{theHsection}.}% + 
      }% + 
    } +
    +

    If it’s a short summary at the start of a section, you might also want to suppress the +glossary header and add some vertical space afterwards: + + + +

    +
    +\printunsrtglossary*{% + 
      \renewcommand{\printunsrtglossaryhandler}[1]{% + 
        \glsxtrfieldxifinlist{#1}{record.section}{\thesection} + 
        {\glsxtrunsrtdo{#1}}% + 
        {}% + 
      }% + 
      \ifcsundef{theHsection}% + 
      {% + 
        \renewcommand*{\glolinkprefix}{record.#2.\csuse{thesection}.}% + 
      }% + 
      {% + 
        \renewcommand*{\glolinkprefix}{record.#2.\csuse{theHsection}.}% + 
      }% + 
      \renewcommand*{\glossarysection}[2][]{}% + 
      \appto\glossarypostamble{\glspar\medskip\glspar}% + 
    } +
    +

    +

    There’s a shortcut command that does this: +


    \printunsrtglossaryunit  \printunsrtglossaryunit[options]{counter +name}

    +

    +The above example can simply be replaced with: + + + +

    +
    +\printunsrtglossaryunit{section} +
    +

    +

    This shortcut command is actually defined to use \printunsrtglossary* +with +


    \printunsrtglossaryunitsetup  \printunsrtglossaryunitsetup{counter +name}

    +

    +so if you want to just make some minor modifications you can do + + + +

    +
    +\printunsrtglossary*{\printunsrtglossaryunitsetup{section}% + 
      \renewcommand*{\glossarysection}[2][]{\subsection*{Summary}}% + 
    } +
    +

    which will start the list with a subsection header with the title “Summary” +(overriding the glossary’s title). +

    Note that this shortcut command is only available with the record (or +record=alsoindex) package option. +

    This temporary change in the hypertarget prefix means you need to explicitly use +\hyperlink to create a link to it as commands like \gls will try to link to the target +created with the default definition of \gloslinkprefix. This isn’t a problem if you +want a primary glossary of all terms produced using just \printunsrtglossary (in +the front or back matter) which can be the target for all glossary references and then +just use \printunsrtglossaryunit for a quick summary at the start of a section +etc. +

    +

    +

    Top

    10.3 Entry Aliases

    +

    An entry can be made an alias of another entry using the alias key. The +value should be the label of the other term. There’s no check for the other’s +existence when the aliased entry is defined. This is to allow the possibility of +defining the other entry after the aliased entry. (For example, when used with +bib2gls.) +

    If an entry ⟨entry-1⟩ is made an alias of ⟨entry-2⟩ then:

    +
      +
    • If the see field wasn’t provided when ⟨entry-1⟩ was defined, the alias key will + automatically trigger
      +
      + \glssee{entry-1}{entry-2} +
      +
      +
    • +
    • If the hyperref package has been loaded then \gls{entry-1} will link to + ⟨entry-2⟩’s target. (Unless the targeturl attribute has been set for ⟨entry-1⟩’s + category.) + + + +
    • +
    • The noindex setting will automatically be triggered when referencing ⟨entry-1⟩ + with commands like \gls or \glstext. This prevents ⟨entry-1⟩ from have a + location list (aside from the cross-reference added with \glssee) unless it’s + been explicitly indexed with \glsadd or if the indexing has been explicitly set + using noindex=false.
    +

    The index suppression trigger is performed by +


    \glsxtrsetaliasnoindex  \glsxtrsetaliasnoindex

    +

    +This is performed after the default options provided by \GlsXtrSetDefaultGlsOpts +have been set. +

    Within the definition of \glsxtrsetaliasnoindex you can use +


    \glsxtrindexaliased  \glsxtrindexaliased

    +

    +to index ⟨entry-2⟩. +

    The index suppression command can be redefined to index the main term instead. +For example: + + + +

    +
    +\renewcommand{\glsxtrsetaliasnoindex}{% + 
     \glsxtrindexaliased + 
     \setkeys{glslink}{noindex}% + 
    } +
    +

    +

    The value of the alias field can be accessed using +


    \glsxtralias  \glsxtralias{label}

    +

    + + + +

    +

    +

    Top

    11. Supplemental Packages

    +

    The glossaries bundle provides additional support packages glossaries-prefix (for +prefixing) and glossaries-accsupp (for accessibility support). These packages aren’t +automatically loaded. +

    +

    Top

    11.1 Prefixes or Determiners

    +

    If prefixing is required, you can simply load glossaries-prefix after glossaries-extra. For +example: + + + +

    +
    +\documentclass{article} + 
    \usepackage{glossaries-extra} + 
    \usepackage{glossaries-prefix} + 
    \makeglossaries + 
    \newabbreviation + 
     [prefix={an\space}, + 
     prefixfirst={a~}] + 
     {svm}{SVM}{support vector machine} + 
    \begin{document} + 
    First use: \pgls{svm}. + 
    Next use: \pgls{svm}. + 
    \printglossaries + 
    \end{document} +
    +

    +

    +

    +

    Top

    11.2 Accessibility Support

    +

    The glossaries-accsupp needs to be loaded before glossaries-extra or through the +accsupp package option: + + + +

    +
    +\usepackage[accsupp]{glossaries-extra} +
    +

    If you don’t load glossaries-accsupp or you load glossaries-accsupp after glossaries-extra +the new \glsaccessxxx⟩ commands described below will simply be equivalent to the +corresponding \glsentryxxx⟩ commands. +

    The following \glsaccessxxx⟩ commands add accessibility information wrapped +around the corresponding \glsentryxxx⟩ commands. There is no check for existence +of the entry nor do any of these commands add formatting, hyperlinks or indexing +information. +


    \glsaccessname  \glsaccessname{label}

    +

    +This displays the value of the name field for the entry identified by ⟨label⟩. +

    If the glossaries-accsupp package isn’t loaded, this is simply defined as: + + + +

    +
    +\newcommand*{\glsaccessname}[1]{\glsentryname{#1}} +
    +

    otherwise it’s defined as: + + + +

    +
    +\newcommand*{\glsaccessname}[1]{% + 
      \glsnameaccessdisplay + 
      {% + 
        \glsentryname{#1}% + 
      }% + 
      {#1}% + 
    } +
    +

    (\glsnameaccessdisplay is defined by the glossaries-accsupp package.) The first +letter upper case version is: +


    \Glsaccessname  \Glsaccessname{label}

    +

    +Without the glossaries-accsupp package this is just defined as: + + + +

    +
    +\newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}} +
    +

    With the glossaries-accsupp package this is defined as: + + + +

    +
    +\newcommand*{\Glsaccessname}[1]{% + 
      \glsnameaccessdisplay + 
      {%  
        \Glsentryname{#1}%  
      }%  
      {#1}%  
    }
    -

    -

    The following commands are all defined in an analogous manner. -


    +

    The following commands are all defined in an analogous manner. +


    \glsaccesstext  \glsaccesstext{label}

    -

    +

    This displays the value of the text field. -


    field. +


    \Glsaccesstext  \Glsaccesstext{label}

    -

    +

    This displays the value of the text field with the first letter converted to upper + id="dx1-36016"> field with the first letter converted to upper case. -



    \glsaccessplural  \glsaccessplural{label}

    -

    +

    This displays the value of the plural field. -


    field. +


    \Glsaccessplural  \Glsaccessplural{label}

    -

    +

    This displays the value of the plural field with the first letter converted to upper + id="dx1-36020"> field with the first letter converted to upper case. -



    \glsaccessfirst  \glsaccessfirst{label}

    -

    +

    This displays the value of the first field. -


    field. +


    \Glsaccessfirst  \Glsaccessfirst{label}

    -

    +

    This displays the value of the first field with the first letter converted to upper + id="dx1-36024"> field with the first letter converted to upper case. -



    \glsaccessfirstplural  \glsaccessfirstplural{label}

    -

    +

    This displays the value of the firstplural field. -


    field. +


    \Glsaccessfirstplural  \Glsaccessfirstplural{label}

    -

    +

    This displays the value of the firstplural field with the first letter converted to upper + id="dx1-36028"> field with the first letter converted to upper case. -



    \glsaccesssymbol  \glsaccesssymbol{label}

    -

    +

    This displays the value of the symbol field. -


    field. +


    \Glsaccesssymbol  \Glsaccesssymbol{label}

    -

    +

    This displays the value of the symbol field with the first letter converted to upper + id="dx1-36032"> field with the first letter converted to upper case. -



    \glsaccesssymbolplural  \glsaccesssymbolplural{label}

    -

    +

    This displays the value of the symbolplural field. -


    field. +


    \Glsaccesssymbolplural  \Glsaccesssymbolplural{label}

    -

    +

    This displays the value of the symbolplural field with the first letter converted to + id="dx1-36036"> field with the first letter converted to upper case. -



    \glsaccessdesc  \glsaccessdesc{label}

    -

    +

    This displays the value of the desc field. -


    field. +


    \Glsaccessdesc  \Glsaccessdesc{label}

    -

    +

    This displays the value of the desc field with the first letter converted to upper + id="dx1-36040"> field with the first letter converted to upper case. -



    \glsaccessdescplural  \glsaccessdescplural{label}

    -

    +

    This displays the value of the descplural field. -


    field. +


    \Glsaccessdescplural  \Glsaccessdescplural{label}

    -

    +

    This displays the value of the descplural field with the first letter converted to upper + id="dx1-36044"> field with the first letter converted to upper case. -



    \glsaccessshort  \glsaccessshort{label}

    -

    +

    This displays the value of the short field. -


    field. +


    \Glsaccessshort  \Glsaccessshort{label}

    -

    +

    This displays the value of the short field with the first letter converted to upper + id="dx1-36048"> field with the first letter converted to upper case. -



    \glsaccessshortpl  \glsaccessshortpl{label}

    -

    +

    This displays the value of the shortplural field. -


    field. +


    \Glsaccessshortpl  \Glsaccessshortpl{label}

    -

    +

    This displays the value of the shortplural field with the first letter converted to upper + id="dx1-36052"> field with the first letter converted to upper case. -



    \glsaccesslong  \glsaccesslong{label}

    -

    +

    This displays the value of the long field. -


    field. +


    \Glsaccesslong  \Glsaccesslong{label}

    -

    +

    This displays the value of the long field with the first letter converted to upper + id="dx1-36056"> field with the first letter converted to upper case. -



    \glsaccesslongpl  \glsaccesslongpl{label}

    -

    +

    This displays the value of the longplural field. -


    field. +


    \Glsaccesslongpl  \Glsaccesslongpl{label}

    -

    +

    This displays the value of the longplural field with the first letter converted to upper + id="dx1-36060"> field with the first letter converted to upper case.

    -

    -

    Top

    11.

    +

    Top

    12. Sample Files

    -

    The following sample files are provided with this package: +

    The following sample files are provided with this package:

    sample.tex
    General abbreviations. sample-acronym.tex
    Acronyms aren’t initialisms and don’t expand on first use.
    @@ -9982,7 +11812,7 @@ class="description">Another initialisms example. sample-postlink.tex
    Automatically inserting text after the link-text produced by commands like \gls (outside of hyperlink, if present). @@ -9995,27 +11825,27 @@ class="description">Using entries in section/chapter headings. class="cmbx-10">sample-autoindex.tex
    Using the dualindex and and indexname attributes to + id="dx1-37004"> attributes to automatically add glossary entries to the index (in addition to the glossary location list).
    sample-autoindex-hyp.tex
    As previous but uses hyperref. + id="dx1-37006">.
    sample-nested.tex
    Using \gls within the value of the within the value of the name key. + id="dx1-37008"> key.
    sample-entrycount.tex
    \printnoidxglossary. class="cmbx-10">sample-external.tex
    Uses the targeturl attribute to allow for entries that + id="dx1-37009"> attribute to allow for entries that should link to an external URL rather than to an internal glossary.
    sample-fmt.tex
    Provides text-block commands associated with entries in + order to use \glsxtrfmt. + + + +
    +sample-alias.tex
    Uses the alias key. (See §10.3 Entry Aliases.) +
    +sample-alttree.tex
    Uses the glossaries-extra-stylemods package with the package with the alttree + id="dx1-37012"> style (see §2.6.3 The §2.7.3 The glossaries-extra-stylemods Package). - - -
    sample-alttree-sym.tex
    Another alttree example that measures the symbol + id="dx1-37013"> example that measures the symbol widths.
    sample-alttree-marginpar.tex
    Another alttree example that puts the + id="dx1-37014"> example that puts the number list in the margin.
    sample-onthefly.tex
    Using on-the-fly commands. Terms with accents must have the name key explicitly set. + id="dx1-37016"> key explicitly set.
    sample-onthefly-xetex.tex
    Using on-the-fly commands with XƎLATEX. Terms with UTF-8 characters don’t need to have the name key explicitly + id="dx1-37017"> key explicitly set. Terms that contain commands must have the name key explicitly set + id="dx1-37018"> key explicitly set with the commands removed from the label.
    Tries to emulate the previous sample file for use with LATEX through the starred version of \GlsXtrEnableOnTheFly. + id="dx1-37019">. This is a bit iffy and may not always work. Terms that contain commands must have the name key explicitly set with the commands removed from + id="dx1-37020"> key explicitly set with the commands removed from the label.
    sample-accsupp.tex
    Integrate glossaries-accsupp. + id="dx1-37021">.
    sample-prefix.tex
    Integrate glossaries-prefix. + id="dx1-37022">.
    -

    -

    Top

    12.

    +

    Top

    13. Multi-Lingual Support

    -

    There’s only one command provided by

    There’s only one command provided by glossaries-extra that you’re likely to want to change in your document and that’s \abbreviationsname ( (§1.2 New or Modified Package Options) if you use the abbreviations package option to + id="dx1-38002"> package option to automatically create the glossary labelled abbreviations. If this command doesn’t already exist, it will be defined to “Abbreviations” if babel hasn’t + id="dx1-38003"> hasn’t been loaded, otherwise it will be defined as \acronymname (provided by glossaries). -

    You can redefine it in the usual way. For example: +

    You can redefine it in the usual way. For example:

    -
    +
    \renewcommand*{\abbreviationsname}{List of Abbreviations}
    -

    Or using

    Or using babel or or polyglossia captions hook: + id="dx1-38005"> captions hook:

    -
    +
    \appto\captionsenglish{%  
     \renewcommand*{\abbreviationsname}{List of Abbreviations}%  
    }
    -

    -

    Alternatively you can use the

    +

    Alternatively you can use the title key when you print the list of abbreviations. + id="dx1-38006"> key when you print the list of abbreviations. For example:

    -
    +
    \printabbreviations[title={List of Abbreviations}]
    -

    or +

    or

    -
    +
    \printglossary[type=abbreviations,title={List of Abbreviations}]
    -

    -

    The other fixed text commands are the diagnostic messages, which shouldn’t +

    +

    The other fixed text commands are the diagnostic messages, which shouldn’t appear in the final draft of your document. -

    The

    The glossaries-extra package has the facility to load language modules if they exist, but won’t warn if they don’t. -

    If you want to write your own language module, you just need to create a file +

    If you want to write your own language module, you just need to create a file called glossariesxtr-lang.ldf, where ⟨lang⟩ is the language name (see the tracklang + id="dx1-38007"> package). For example, glossariesxtr-french.ldf. -

    The simplest code for this file is: +

    The simplest code for this file is:

    -
    +
    \ProvidesGlossariesExtraLang{french}[2015/12/09 v1.0]  
    \newcommand*{\glossariesxtrcaptionsfrench}{%  
     \def\abbreviationsname{Abr\'eviations}% @@ -10248,8 +12093,8 @@ class="cmtt-10">glossariesxtr-french.ldf.  
      \glossariesxtrcaptionsfrench  
    }
    -

    -

    You can adapt this for other languages by replacing all instances of the language +

    +

    You can adapt this for other languages by replacing all instances of the language identifier french and the translated text Abr\’eviations as appropriate. This EX’s path so that it can be found by class="cmss-10">glossaries-extra. You might also want to consider uploading it to CTAN so that it can be useful to others. (Please don’t send it to me. I already have more packages than I am able to maintain.) -

    If you additionally want to provide translations for the diagnostic messages used +

    If you additionally want to provide translations for the diagnostic messages used when a glossary is missing, you need to redefine the following commands: -



    \GlsXtrNoGlsWarningHead  \GlsXtrNoGlsWarningHead{label}{file}

    -

    +

    This produces the following text in English:

    -

    This document is incomplete. The external file associated with the +

    This document is incomplete. The external file associated with the glossary ‘⟨label⟩’ (which should be called ⟨file⟩) hasn’t been created.

    -



    \GlsXtrNoGlsWarningEmptyStart  \GlsXtrNoGlsWarningEmptyStart

    -

    +

    This produces the following text in English:

    -

    This has probably happened because there are no entries defined in +

    This has probably happened because there are no entries defined in this glossary.

    -



    \GlsXtrNoGlsWarningEmptyMain  \GlsXtrNoGlsWarningEmptyMain

    -

    +

    This produces the following text in English:

    -

    If you don’t want this glossary, add

    If you don’t want this glossary, add nomain to your package option list when you load glossaries-extra.sty. For example:

    -



    \GlsXtrNoGlsWarningEmptyNotMain  \GlsXtrNoGlsWarningEmptyNotMain{label}

    -

    +

    This produces the following text in English:

    -

    Did you forget to use

    Did you forget to use type=label⟩ when you defined your entries? If you tried to load entries into this glossary with ] as the optional argument? If you did, check that the definitions in the file you loaded all had the type set to \glsdefaulttype.

    -



    \GlsXtrNoGlsWarningCheckFile  \GlsXtrNoGlsWarningCheckFile{file}

    -

    +

    This produces the following text in English:

    -

    Check the contents of the file ⟨

    Check the contents of the file ⟨file⟩. If it’s empty, that means you haven’t indexed any of your entries in this glossary (using commands like \gls or \glsadd) so this list can’t be generated. If the file isn’t empty, the document build process hasn’t been completed.

    -



    \GlsXtrNoGlsWarningMisMatch  \GlsXtrNoGlsWarningMisMatch

    -

    +

    This produces the following text in English:

    -

    You need +

    You need to either replace \makenoidxglossaries with \makeglossaries or @@ -10367,17 +12212,17 @@ class="cmtt-10">\printglossaries) class="cmtt-10">\printnoidxglossary (or \printnoidxglossaries) and then rebuild this document.

    -



    \GlsXtrNoGlsWarningNoOut  \GlsXtrNoGlsWarningNoOut{file}

    -

    +

    This produces the following text in English:

    -

    The file ⟨

    The file ⟨file⟩ doesn’t exist. This most likely means you haven’t used \makeglossaries or you have used \nofiles. If this is just a draft version of the document, you can suppress this message using the nomissingglstext package option.

    -



    \GlsXtrNoGlsWarningTail  \GlsXtrNoGlsWarningTail

    -

    +

    This produces the following text in English:

    -

    This message will be removed once the problem has been fixed.

    -


    This message will be removed once the problem has been fixed.

    +


    \GlsXtrNoGlsWarningBuildInfo  \GlsXtrNoGlsWarningBuildInfo

    -

    +

    This is advice on how to generate the glossary files. See the documented code (glossaries-extra-code.pdf) for further details. -



    \GlsXtrNoGlsWarningAutoMake  \GlsXtrNoGlsWarningAutoMake{label}

    -

    +

    This is the message produced when the automake option is used, but the document + id="dx1-38018"> option is used, but the document needs a rerun or the shell escape setting doesn’t permit the execution of the external application. This command also generates a warning in the transcript file. See the documented code for further details. @@ -10431,12 +12276,24 @@ documented code for further details.

    Top

    Glossary

    + id="x1-3900013">Glossary
    +bib2gls
    A command line Java application that selects entries from a + .bib file and converts them to glossary definitions. At the time of + writing, this application is still under development. Further details at: + https://github.com/nlct/bib2gls. +
    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. @@ -10444,95 +12301,98 @@ class="description">The location of the entry in the document. This defaults to 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, + id="dx1-39007">, \glspl, , \Glspl, , \GLSpl or or \glsdisp. + id="dx1-39011">.
    first use flag
    A conditional that determines whether or not the entry has been used according to the rules of first use.
    first use text
    The text that is displayed on first use, which is governed by the + id="dx1-39015">first use, which is governed by the first and and firstplural keys of keys of \newglossaryentry. (May be overridden by + id="dx1-39018">. (May be overridden by \glsdisp.) + id="dx1-39019">.)
    link-text
    The text produced by commands such as \gls. It may or may not + id="dx1-39021">. It may or may not have a hyperlink to the glossary.
    location list
    A list of entry locations. See number list.
    makeglossaries
    A custom designed Perl script interface provided with the glossaries package to run xindy or makeindex according to the document settings. + + +
    makeglossaries-lite.lua
    A custom designed Lua script interface to xindy and makeindex provided with the glossaries package. This is a cut-down alternative to the Perl makeglossaries script. If you have Perl installed, called makeglossaries-lite (without the .lua extension) to the actual - - - makeglossaries-lite.lua script.
    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. + id="dx1-39035"> package option.
    xindy
    An flexible indexing application with multilingual support written in Perl.

    Index

    + id="x1-4000013">Index

    A

    abbreviation styles (deprecated):
        footnote-em  1
    +href="glossaries-extra-manual.html#dx1-22130" >1
        footnote-sc  2
    +href="glossaries-extra-manual.html#dx1-22122" >2
        footnote-sm  3
    +href="glossaries-extra-manual.html#dx1-22126" >3
        long-desc-em  4
    +href="glossaries-extra-manual.html#dx1-21067" >4
        long-desc-sc  5
    +href="glossaries-extra-manual.html#dx1-21059" >5
        long-desc-sm  6
    +href="glossaries-extra-manual.html#dx1-21063" >6
        long-em  7
    +href="glossaries-extra-manual.html#dx1-21092" >7
        long-sc  8
    +href="glossaries-extra-manual.html#dx1-21084" >8
        long-sm  9
    +href="glossaries-extra-manual.html#dx1-21088" >9
        postfootnote-em  10
    +href="glossaries-extra-manual.html#dx1-22153" >10
        postfootnote-sc  11
    +href="glossaries-extra-manual.html#dx1-22145" >11
        postfootnote-sm  12
    +href="glossaries-extra-manual.html#dx1-22149" >12
    abbreviation styles:
        footnote  13
    +href="glossaries-extra-manual.html#dx1-22117" >13
        long  14
    +href="glossaries-extra-manual.html#dx1-21078" >14
        long-desc  15
    +href="glossaries-extra-manual.html#dx1-21053" >15
        long-em-noshort-em  16
    +href="glossaries-extra-manual.html#dx1-21093" >16
        long-em-noshort-em-desc  17
    +href="glossaries-extra-manual.html#dx1-21068" >17
        long-em-short-em  18, 19
    +href="glossaries-extra-manual.html#dx1-20043" >18, 19
        long-em-short-em-desc  20
    +href="glossaries-extra-manual.html#dx1-22049" >20
        long-noshort  21, 22, 23, 24, 25, 26, 27, 28
    +href="glossaries-extra-manual.html#dx1-11030" >21, 22, 23, 24, 25, 26, 27, 28
        long-noshort-desc  29, 30, 31, 32, 33, 34, 35, 36, 37
    +href="glossaries-extra-manual.html#dx1-10040" >29, 30, 31, 32, 33, 34, 35, 36, 37
        long-noshort-em  38
    +href="glossaries-extra-manual.html#dx1-21089" >38
        long-noshort-em-desc  39
    +href="glossaries-extra-manual.html#dx1-21064" >39
        long-noshort-sc  40, 41
    +href="glossaries-extra-manual.html#dx1-20042" >40, 41
        long-noshort-sc-desc  42
    +href="glossaries-extra-manual.html#dx1-21055" >42
        long-noshort-sm  43
    +href="glossaries-extra-manual.html#dx1-21085" >43
        long-noshort-sm-desc  44
    +href="glossaries-extra-manual.html#dx1-21060" >44
    +    long-postshort-user  45, 46
    +    long-postshort-user-desc  47
        long-short  45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57
    +href="glossaries-extra-manual.html#dx1-10047" >48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60
        long-short-desc  58, 59, 60, 61, 62, 63, 64, 65, 66
    +href="glossaries-extra-manual.html#dx1-11016" >61, 62, 63, 64, 65, 66, 67, 68, 69
    + + +     long-short-em  67, 68, 69
    +href="glossaries-extra-manual.html#dx1-20044" >70, 71, 72
        long-short-em-desc  70, 71
    - - - +href="glossaries-extra-manual.html#dx1-22046" >73, 74
        long-short-sc  72, 73, 74, 75, 76
    +href="glossaries-extra-manual.html#dx1-11004" >75, 76, 77, 78, 79
        long-short-sc-desc  77, 78
    +href="glossaries-extra-manual.html#dx1-11018" >80, 81
        long-short-sm  79, 80
    +href="glossaries-extra-manual.html#dx1-11006" >82, 83
        long-short-sm-desc  81, 82
    +href="glossaries-extra-manual.html#dx1-11020" >84, 85
        long-short-user  83, 84, 85, 86, 87, 88, 89, 90
    +href="glossaries-extra-manual.html#dx1-20045" >86, 87, 88, 89, 90, 91, 92, 93, 94
        long-short-user-desc  91
    +href="glossaries-extra-manual.html#dx1-22052" >95
        postfootnote  92
    +href="glossaries-extra-manual.html#dx1-22140" >96
        short  93
    +href="glossaries-extra-manual.html#dx1-21007" >97
        short-desc  94
    +href="glossaries-extra-manual.html#dx1-21030" >98
        short-em  95
    +href="glossaries-extra-manual.html#dx1-21022" >99
        short-em-desc  96
    +href="glossaries-extra-manual.html#dx1-21045" >100
        short-em-footnote  97, 98
    +href="glossaries-extra-manual.html#dx1-20056" >101, 102
        short-em-footnote-desc  99
    +href="glossaries-extra-manual.html#dx1-20055" >103
        short-em-long  100, 101, 102
    +href="glossaries-extra-manual.html#dx1-22073" >104, 105, 106
        short-em-long-desc  103, 104
    +href="glossaries-extra-manual.html#dx1-22092" >107, 108
        short-em-long-em  105
    +href="glossaries-extra-manual.html#dx1-22076" >109
        short-em-long-em-desc  106
    +href="glossaries-extra-manual.html#dx1-22095" >110
        short-em-nolong  107, 108
    +href="glossaries-extra-manual.html#dx1-21019" >111, 112
        short-em-nolong-desc  109, 110
    +href="glossaries-extra-manual.html#dx1-21042" >113, 114
        short-em-postfootnote  111
    +href="glossaries-extra-manual.html#dx1-22150" >115
        short-footnote  112, 113, 114, 115, 116, 117, 118, 119, 120, 121
    +href="glossaries-extra-manual.html#dx1-11034" >116, 117, 118, 119, 120, 121, 122, 123, 124, 125
        short-footnote-desc  122
    +href="glossaries-extra-manual.html#dx1-11040" >126
        short-long  123, 124, 125, 126, 127, 128, 129, 130, 131
    +href="glossaries-extra-manual.html#dx1-11010" >127, 128, 129, 130, 131, 132, 133, 134, 135
        short-long-desc  132, 133, 134, 135, 136, 137, 138, 139
    +href="glossaries-extra-manual.html#dx1-11024" >136, 137, 138, 139, 140, 141, 142, 143
        short-long-user  140, 141, 142, 143, 144, 145
    +href="glossaries-extra-manual.html#dx1-22028" >144, 145, 146, 147, 148, 149, 150
        short-long-user-desc  146
    +href="glossaries-extra-manual.html#dx1-22098" >151
        short-nolong  147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158
    +href="glossaries-extra-manual.html#dx1-16012" >152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163
        short-nolong-desc  159, 160, 161, 162
    +href="glossaries-extra-manual.html#dx1-21024" >164, 165, 166, 167
        short-postfootnote  163, 164, 165, 166, 167, 168, 169
    +href="glossaries-extra-manual.html#dx1-7058" >168, 169, 170, 171, 172, 173, 174
    +    short-postlong-user  175, 176, 177
    +    short-postlong-user-desc  178
        short-sc  170
    +href="glossaries-extra-manual.html#dx1-21012" >179
        short-sc-desc  171
    +href="glossaries-extra-manual.html#dx1-21035" >180
        short-sc-footnote  172, 173, 174, 175
    +href="glossaries-extra-manual.html#dx1-11036" >181, 182, 183, 184
        short-sc-footnote-desc  176
    +href="glossaries-extra-manual.html#dx1-11042" >185
        short-sc-long  177, 178, 179
    +href="glossaries-extra-manual.html#dx1-11012" >186, 187, 188
        short-sc-long-desc  180, 181
    +href="glossaries-extra-manual.html#dx1-11026" >189, 190
        short-sc-nolong  182, 183
    +href="glossaries-extra-manual.html#dx1-21009" >191, 192
        short-sc-nolong-desc  184, 185
    +href="glossaries-extra-manual.html#dx1-21032" >193, 194
        short-sc-postfootnote  186, 187
    +href="glossaries-extra-manual.html#dx1-20049" >195, 196
        short-sm  188
    +href="glossaries-extra-manual.html#dx1-21017" >197
        short-sm-desc  189
    +href="glossaries-extra-manual.html#dx1-21040" >198
        short-sm-footnote  190, 191
    +href="glossaries-extra-manual.html#dx1-11038" >199, 200
        short-sm-footnote-desc  192
    +href="glossaries-extra-manual.html#dx1-11044" >201
    + + +     short-sm-long  193, 194, 195
    +href="glossaries-extra-manual.html#dx1-11014" >202, 203, 204
        short-sm-long-desc  196, 197
    +href="glossaries-extra-manual.html#dx1-11028" >205, 206
        short-sm-nolong  198, 199
    +href="glossaries-extra-manual.html#dx1-21014" >207, 208
        short-sm-nolong-desc  200, 201
    - - - +href="glossaries-extra-manual.html#dx1-21037" >209, 210
        short-sm-postfootnote  202
    +href="glossaries-extra-manual.html#dx1-22146" >211
    \abbreviationsname  203
    +href="glossaries-extra-manual.html#dx1-4066" >212
    \abbrvpluralsuffix  204
    +href="glossaries-extra-manual.html#dx1-23038" >213
    acronym styles (glossaries):
        dua  205
    +href="glossaries-extra-manual.html#dx1-11029" >214
        dua-desc  206
    +href="glossaries-extra-manual.html#dx1-11031" >215
        footnote  207
    +href="glossaries-extra-manual.html#dx1-11033" >216
        footnote-desc  208
    +href="glossaries-extra-manual.html#dx1-11039" >217
        footnote-sc  209
    +href="glossaries-extra-manual.html#dx1-11035" >218
        footnote-sc-desc  210
    +href="glossaries-extra-manual.html#dx1-11041" >219
        footnote-sm  211
    +href="glossaries-extra-manual.html#dx1-11037" >220
        footnote-sm-desc  212
    +href="glossaries-extra-manual.html#dx1-11043" >221
        long-sc-short  213
    +href="glossaries-extra-manual.html#dx1-11003" >222
        long-sc-short-desc  214
    +href="glossaries-extra-manual.html#dx1-11017" >223
        long-short-desc  215
    +href="glossaries-extra-manual.html#dx1-11015" >224
        long-sm-short  216
    +href="glossaries-extra-manual.html#dx1-11005" >225
        long-sm-short-desc  217
    +href="glossaries-extra-manual.html#dx1-11019" >226
        long-sp-short  218, 219
    +href="glossaries-extra-manual.html#dx1-11007" >227, 228
        long-sp-short-desc  220
    +href="glossaries-extra-manual.html#dx1-11021" >229
        sc-short-long  221
    +href="glossaries-extra-manual.html#dx1-11011" >230
        sc-short-long-desc  222
    +href="glossaries-extra-manual.html#dx1-11025" >231
        short-long  223
    +href="glossaries-extra-manual.html#dx1-11009" >232
        short-long-desc  224
    +href="glossaries-extra-manual.html#dx1-11023" >233
        sm-short-long  225
    +href="glossaries-extra-manual.html#dx1-11013" >234
        sm-short-long-desc  226
    +href="glossaries-extra-manual.html#dx1-11027" >235
    amsgen package  227
    +href="glossaries-extra-manual.html#dx1-9" >236
    +\apptoglossarypreamble  237

    B babel package  228, 229, 230, 231, 232, 233, 234, 235
    +href="glossaries-extra-manual.html#dx1-3009" >238, 239, 240, 241, 242, 243, 244, 245
    +bib2gls  246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268
    +bib2gls  269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291

    C categories:
        abbreviation  236, 237, 238, 239
    +href="glossaries-extra-manual.html#dx1-8003" >292, 293, 294, 295
        acronym  240, 241, 242, 243, 244, 245
    +href="glossaries-extra-manual.html#dx1-7029" >296, 297, 298, 299, 300, 301
        general  246, 247, 248, 249, 250, 251, 252, 253
    +href="glossaries-extra-manual.html#dx1-7036" >302, 303, 304, 305, 306, 307, 308, 309
    + + +     index  254, 255
    +href="glossaries-extra-manual.html#dx1-5026" >310, 311
        number  256
    +href="glossaries-extra-manual.html#dx1-25018" >312
        symbol  257, 258
    +href="glossaries-extra-manual.html#dx1-7043" >313, 314
    category attributes:
        aposplural  259, 260, 261
    +href="glossaries-extra-manual.html#dx1-9036" >315, 316, 317, 318
        discardperiod  262, 263, 264, 265, 266
    +href="glossaries-extra-manual.html#dx1-7032" >319, 320, 321, 322, 323
        dualindex  267, 268, 269, 270, 271, 272, 273
    +href="glossaries-extra-manual.html#dx1-25091" >324, 325, 326, 327, 328, 329, 330
        entrycount  274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284
    +href="glossaries-extra-manual.html#dx1-8002" >331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341
        glossdesc  285, 286, 287
    - - - +href="glossaries-extra-manual.html#dx1-13004" >342, 343, 344
        glossdescfont  288, 289
    +href="glossaries-extra-manual.html#dx1-13005" >345, 346
        glossname  290, 291
    +href="glossaries-extra-manual.html#dx1-13003" >347, 348
        glossnamefont  292
    +href="glossaries-extra-manual.html#dx1-25089" >349
        headuc  293, 294, 295, 296
    +href="glossaries-extra-manual.html#dx1-10059" >350, 351, 352, 353
        indexname  297, 298, 299, 300, 301
    +href="glossaries-extra-manual.html#dx1-13009" >354, 355, 356, 357, 358
        indexonlyfirst  302, 303, 304
    +href="glossaries-extra-manual.html#dx1-6005" >359, 360, 361
        insertdots  305, 306
    +href="glossaries-extra-manual.html#dx1-16004" >362, 363
        nohyper  307, 308, 309
    +href="glossaries-extra-manual.html#dx1-25034" >364, 365, 366
        nohyperfirst  310, 311, 312, 313, 314
    +href="glossaries-extra-manual.html#dx1-22107" >367, 368, 369, 370, 371
        noshortplural  315, 316, 317, 318
    +href="glossaries-extra-manual.html#dx1-9037" >372, 373, 374, 375, 376
        pluraldiscardperiod  319, 320
    +href="glossaries-extra-manual.html#dx1-25045" >377, 378
        regular  321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340
    +href="glossaries-extra-manual.html#dx1-7010" >379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398
        retainfirstuseperiod  341
    +href="glossaries-extra-manual.html#dx1-25047" >399
        tagging  342, 343, 344, 345
    +href="glossaries-extra-manual.html#dx1-17002" >400, 401, 402, 403
        targetcategory  346
    +href="glossaries-extra-manual.html#dx1-25100" >404
        targetname  347, 348
    +href="glossaries-extra-manual.html#dx1-25097" >405, 406
        targeturl  349, 350, 351, 352
    +href="glossaries-extra-manual.html#dx1-5004" >407, 408, 409, 410, 411
        unitcount  353
    +href="glossaries-extra-manual.html#dx1-26030" >412
    \cGLS  354
    +href="glossaries-extra-manual.html#dx1-26011" >413
    \cGLSformat  355
    +href="glossaries-extra-manual.html#dx1-26013" >414
    \cGLSpl  356
    +href="glossaries-extra-manual.html#dx1-26012" >415
    \cGLSplformat  357
    +href="glossaries-extra-manual.html#dx1-26014" >416
    +\csGlsXtrLetField  417
    \CustomAbbreviationFields  358
    +href="glossaries-extra-manual.html#dx1-23006" >418

    D datatool-base package  359
    +href="glossaries-extra-manual.html#dx1-8" >419

    E \eglssetwidest  360
    +href="glossaries-extra-manual.html#dx1-15013" >420
    +\eGlsXtrSetField  421
    entry location  361, 362, 363
    +href="glossaries-extra-manual.html#dx1-39003" >422, 423, 424
    etoolbox package  364, 365, 366
    +href="glossaries-extra-manual.html#dx1-4" >425, 426, 427, 428, 429, 430

    F + + + first use  367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420
    +href="glossaries-extra-manual.html#dx1-6003" >431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 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, 480, 481, 482, 483, 484
    first use flag  421, 422, 423, 424, 425
    +href="glossaries-extra-manual.html#dx1-7048" >485, 486, 487, 488, 489
    first use text  426, 427
    +href="glossaries-extra-manual.html#dx1-39014" >490, 491
    fontenc package  428
    +href="glossaries-extra-manual.html#dx1-20024" >492

    G +\gGlsXtrSetField  493
    glossaries package  429
    +href="glossaries-extra-manual.html#dx1-5014" >494, 495, 496, 497, 498, 499, 500
    glossaries-accsupp package  430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444
    +href="glossaries-extra-manual.html#dx1-4003" >501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515
    +glossaries-extra package  516
    glossaries-extra-stylemods package  445, 446, 447, 448
    - - - +href="glossaries-extra-manual.html#dx1-4012" >517, 518, 519, 520
    glossaries-prefix package  449, 450, 451
    +href="glossaries-extra-manual.html#dx1-34001" >521, 522, 523
    \glossariesextrasetup  452
    +href="glossaries-extra-manual.html#dx1-4101" >524
    glossary styles:
        alttree  453, 454, 455, 456, 457, 458, 459
    +href="glossaries-extra-manual.html#dx1-15010" >525, 526, 527, 528, 529, 530, 531
        inline  460, 461
    +href="glossaries-extra-manual.html#dx1-15006" >532, 533
        long3col  462
    +href="glossaries-extra-manual.html#dx1-15004" >534
    glossary-inline package  463
    +href="glossaries-extra-manual.html#dx1-15007" >535
    glossary-tree package  464, 465, 466
    +href="glossaries-extra-manual.html#dx1-15011" >536, 537, 538
    \glossxtrsetpopts  467
    +href="glossaries-extra-manual.html#dx1-10058" >539
    \glsabbrvdefaultfont  468
    +href="glossaries-extra-manual.html#dx1-16021" >540
    \glsabbrvemfont  469
    +href="glossaries-extra-manual.html#dx1-20038" >541
    \glsabbrvfont  470, 471
    +href="glossaries-extra-manual.html#dx1-16018" >542, 543
    \glsabbrvuserfont  472
    +href="glossaries-extra-manual.html#dx1-22031" >544
    \Glsaccessdesc  473
    +href="glossaries-extra-manual.html#dx1-36039" >545
    \glsaccessdesc  474
    +href="glossaries-extra-manual.html#dx1-36037" >546
    \Glsaccessdescplural  475
    +href="glossaries-extra-manual.html#dx1-36043" >547
    \glsaccessdescplural  476
    +href="glossaries-extra-manual.html#dx1-36041" >548
    \Glsaccessfirst  477
    +href="glossaries-extra-manual.html#dx1-36023" >549
    \glsaccessfirst  478
    +href="glossaries-extra-manual.html#dx1-36021" >550
    \Glsaccessfirstplural  479
    +href="glossaries-extra-manual.html#dx1-36027" >551
    \glsaccessfirstplural  480
    +href="glossaries-extra-manual.html#dx1-36025" >552
    \Glsaccesslong  481
    +href="glossaries-extra-manual.html#dx1-36055" >553
    \glsaccesslong  482
    +href="glossaries-extra-manual.html#dx1-36053" >554
    \Glsaccesslongpl  483
    +href="glossaries-extra-manual.html#dx1-36059" >555
    \glsaccesslongpl  484
    +href="glossaries-extra-manual.html#dx1-36057" >556
    \Glsaccessname  485
    +href="glossaries-extra-manual.html#dx1-36010" >557
    \glsaccessname  486
    +href="glossaries-extra-manual.html#dx1-36005" >558
    \Glsaccessplural  487
    +href="glossaries-extra-manual.html#dx1-36019" >559
    \glsaccessplural  488
    +href="glossaries-extra-manual.html#dx1-36017" >560
    \Glsaccessshort  489
    +href="glossaries-extra-manual.html#dx1-36047" >561
    \glsaccessshort  490
    +href="glossaries-extra-manual.html#dx1-36045" >562
    \Glsaccessshortpl  491
    +href="glossaries-extra-manual.html#dx1-36051" >563
    + + + \glsaccessshortpl  492
    +href="glossaries-extra-manual.html#dx1-36049" >564
    \Glsaccesssymbol  493
    +href="glossaries-extra-manual.html#dx1-36031" >565
    \glsaccesssymbol  494
    +href="glossaries-extra-manual.html#dx1-36029" >566
    \Glsaccesssymbolplural  495
    +href="glossaries-extra-manual.html#dx1-36035" >567
    \glsaccesssymbolplural  496
    +href="glossaries-extra-manual.html#dx1-36033" >568
    \Glsaccesstext  497
    +href="glossaries-extra-manual.html#dx1-36015" >569
    \glsaccesstext  498
    +href="glossaries-extra-manual.html#dx1-36013" >570
    \glsacspace  499
    +href="glossaries-extra-manual.html#dx1-11052" >571
    \glsacspacemax  500
    +href="glossaries-extra-manual.html#dx1-11054" >572
    \glscategory  501
    +href="glossaries-extra-manual.html#dx1-25019" >573
    \glscategorylabel  502
    +href="glossaries-extra-manual.html#dx1-23033" >574
    \glscurrententrylabel  503
    +href="glossaries-extra-manual.html#dx1-13016" >575
    \glsentrycurrcount  504
    +href="glossaries-extra-manual.html#dx1-26031" >576
    \glsentryprevcount  505
    - - - +href="glossaries-extra-manual.html#dx1-26032" >577
    \glsentryprevmaxcount  506
    +href="glossaries-extra-manual.html#dx1-26034" >578
    \glsentryprevtotalcount  507
    +href="glossaries-extra-manual.html#dx1-26033" >579
    \glsFindWidestAnyName  508
    +href="glossaries-extra-manual.html#dx1-15024" >580
    \glsFindWidestAnyNameLocation  509
    +href="glossaries-extra-manual.html#dx1-15036" >581
    \glsFindWidestAnyNameSymbol  510
    +href="glossaries-extra-manual.html#dx1-15028" >582
    \glsFindWidestAnyNameSymbolLocation  511
    +href="glossaries-extra-manual.html#dx1-15033" >583
    \glsFindWidestLevelTwo  512
    +href="glossaries-extra-manual.html#dx1-15026" >584
    \glsFindWidestTopLevelName  513
    +href="glossaries-extra-manual.html#dx1-15019" >585
    \glsFindWidestUsedAnyName  514
    +href="glossaries-extra-manual.html#dx1-15022" >586
    \glsFindWidestUsedAnyNameLocation  515
    +href="glossaries-extra-manual.html#dx1-15034" >587
    \glsFindWidestUsedAnyNameSymbol  516
    +href="glossaries-extra-manual.html#dx1-15027" >588
    \glsFindWidestUsedAnyNameSymbolLocation  517
    +href="glossaries-extra-manual.html#dx1-15029" >589
    \glsFindWidestUsedLevelTwo  518
    +href="glossaries-extra-manual.html#dx1-15025" >590
    \glsFindWidestUsedTopLevelName  519
    +href="glossaries-extra-manual.html#dx1-15020" >591
    \glsfirstabbrvdefaultfont  520
    +href="glossaries-extra-manual.html#dx1-16024" >592
    \glsfirstabbrvemfont  521
    +href="glossaries-extra-manual.html#dx1-20039" >593
    \glsfirstabbrvfont  522, 523
    +href="glossaries-extra-manual.html#dx1-16016" >594, 595
    \glsfirstlongdefaultfont  524
    +href="glossaries-extra-manual.html#dx1-16030" >596
    \glsfirstlongemfont  525
    +href="glossaries-extra-manual.html#dx1-16032" >597
    \glsfirstlongfont  526, 527
    +href="glossaries-extra-manual.html#dx1-16026" >598, 599
    \glsfirstlongfootnotefont  528
    +href="glossaries-extra-manual.html#dx1-22112" >600
    \Glsfmtfirst  529
    +href="glossaries-extra-manual.html#dx1-24040" >601
    \glsfmtfirst  530
    +href="glossaries-extra-manual.html#dx1-24039" >602
    \Glsfmtfirstpl  531
    +href="glossaries-extra-manual.html#dx1-24042" >603
    \glsfmtfirstpl  532
    +href="glossaries-extra-manual.html#dx1-24041" >604
    \Glsfmtfull  533
    +href="glossaries-extra-manual.html#dx1-24031" >605
    \glsfmtfull  534
    +href="glossaries-extra-manual.html#dx1-24029" >606
    \Glsfmtfullpl  535
    +href="glossaries-extra-manual.html#dx1-24032" >607
    \glsfmtfullpl  536
    +href="glossaries-extra-manual.html#dx1-24030" >608
    \Glsfmtlong  537
    +href="glossaries-extra-manual.html#dx1-24027" >609
    \glsfmtlong  538
    +href="glossaries-extra-manual.html#dx1-24025" >610
    \Glsfmtlongpl  539
    +href="glossaries-extra-manual.html#dx1-24028" >611
    + + + \glsfmtlongpl  540
    +href="glossaries-extra-manual.html#dx1-24026" >612
    \Glsfmtplural  541
    +href="glossaries-extra-manual.html#dx1-24037" >613
    \glsfmtplural  542
    +href="glossaries-extra-manual.html#dx1-24036" >614
    \Glsfmtshort  543
    +href="glossaries-extra-manual.html#dx1-24023" >615
    \glsfmtshort  544
    +href="glossaries-extra-manual.html#dx1-24021" >616
    \Glsfmtshortpl  545
    +href="glossaries-extra-manual.html#dx1-24024" >617
    \glsfmtshortpl  546
    +href="glossaries-extra-manual.html#dx1-24022" >618
    \Glsfmttext  547
    +href="glossaries-extra-manual.html#dx1-24035" >619
    \glsfmttext  548
    +href="glossaries-extra-manual.html#dx1-24034" >620
    \glsforeachwithattribute  549
    +href="glossaries-extra-manual.html#dx1-25124" >621
    \glsgetattribute  550
    +href="glossaries-extra-manual.html#dx1-25107" >622
    \glsgetcategoryattribute  551
    +href="glossaries-extra-manual.html#dx1-25106" >623
    \glsgetwidestname  552
    +href="glossaries-extra-manual.html#dx1-15016" >624
    \glsgetwidestsubname  553
    - - - +href="glossaries-extra-manual.html#dx1-15017" >625
    \glshasattribute  554
    +href="glossaries-extra-manual.html#dx1-25110" >626
    \glshascategoryattribute  555
    +href="glossaries-extra-manual.html#dx1-25108" >627
    \glsifattribute  556
    +href="glossaries-extra-manual.html#dx1-25115" >628
    \glsifcategory  557
    +href="glossaries-extra-manual.html#dx1-25020" >629
    \glsifcategoryattribute  558
    +href="glossaries-extra-manual.html#dx1-25111" >630
    \glsifnotregular  559
    +href="glossaries-extra-manual.html#dx1-25122" >631
    \glsifnotregularcategory  560
    +href="glossaries-extra-manual.html#dx1-25121" >632
    \glsifregular  561
    +href="glossaries-extra-manual.html#dx1-25118" >633
    \glsifregularcategory  562
    +href="glossaries-extra-manual.html#dx1-25117" >634
    \glskeylisttok  563
    +href="glossaries-extra-manual.html#dx1-23031" >635
    \glslabeltok  564
    +href="glossaries-extra-manual.html#dx1-23030" >636
    \glslink options
        format  565, 566
    +href="glossaries-extra-manual.html#dx1-27012" >637, 638
        hyper  567, 568, 569
    +href="glossaries-extra-manual.html#dx1-10055" >639, 640, 641
        hyper=false  570
    +href="glossaries-extra-manual.html#dx1-24016" >642
        noindex  571, 572, 573, 574, 575
    +href="glossaries-extra-manual.html#dx1-6001" >643, 644, 645, 646, 647, 648
    \glslinkcheckfirsthyperhook  576
    +href="glossaries-extra-manual.html#dx1-26038" >649
    \glslongdefaultfont  577
    +href="glossaries-extra-manual.html#dx1-16031" >650
    \glslongemfont  578
    +href="glossaries-extra-manual.html#dx1-16033" >651
    \glslongfont  579, 580
    +href="glossaries-extra-manual.html#dx1-16028" >652, 653
    \glslongfootnotefont  581
    +href="glossaries-extra-manual.html#dx1-22114" >654
    \glslongpltok  582
    +href="glossaries-extra-manual.html#dx1-23027" >655
    \glslongtok  583
    +href="glossaries-extra-manual.html#dx1-23026" >656
    +\glsnoidxdisplayloc  657
    \glsps  584
    +href="glossaries-extra-manual.html#dx1-10053" >658
    \glspt  585
    +href="glossaries-extra-manual.html#dx1-10054" >659
    \glssetattribute  586
    +href="glossaries-extra-manual.html#dx1-25105" >660
    \glssetcategoryattribute  587
    +href="glossaries-extra-manual.html#dx1-25102" >661
    \glssetregularcategory  588
    +href="glossaries-extra-manual.html#dx1-25104" >662
    \glsshortpltok  589
    +href="glossaries-extra-manual.html#dx1-23023" >663
    \glsshorttok  590
    +href="glossaries-extra-manual.html#dx1-23022" >664
    \Glsxtr  591
    +href="glossaries-extra-manual.html#dx1-28014" >665
    + + + \glsxtr  592
    +href="glossaries-extra-manual.html#dx1-28009" >666
    \glsxtrabbrvfootnote  593
    +href="glossaries-extra-manual.html#dx1-22115" >667
    +\glsxtrabbrvpluralsuffix  668
    \glsxtraddallcrossrefs  594
    +class="cmti-10">669
    +\glsxtralias  670
    \glsxtrAltTreeIndent  595
    +href="glossaries-extra-manual.html#dx1-15042" >671
    \glsxtralttreeInit  596
    +href="glossaries-extra-manual.html#dx1-15041" >672
    \glsxtralttreeSubSymbolDescLocation  597
    +href="glossaries-extra-manual.html#dx1-15039" >673
    \glsxtralttreeSymbolDescLocation  598
    +href="glossaries-extra-manual.html#dx1-15038" >674
    \glsxtrchecknohyperfirst  599
    +href="glossaries-extra-manual.html#dx1-25033" >675
    +\glsxtrcopytoglossary  676
    +\glsxtrdeffield  677
    +\glsxtrdisplayendloc  678
    +\glsxtrdisplayendlochook  679
    +\glsxtrdisplaysingleloc  680
    +\glsxtrdisplaystartloc  681
    \glsxtrdoautoindexname  600
    +href="glossaries-extra-manual.html#dx1-27009" >682
    \glsxtrdowrglossaryhook  601
    +class="cmti-10">683
    +\glsxtredeffield  684
    \GlsXtrEnableEntryCounting  602
    +href="glossaries-extra-manual.html#dx1-26023" >685
    \GlsXtrEnableEntryUnitCounting  603
    +href="glossaries-extra-manual.html#dx1-26026" >686
    \GlsXtrEnableIndexFormatOverride  604
    +href="glossaries-extra-manual.html#dx1-27015" >687
    \GlsXtrEnableInitialTagging  605
    +href="glossaries-extra-manual.html#dx1-17001" >688
    \GlsXtrEnableOnTheFly  606
    - - - +href="glossaries-extra-manual.html#dx1-28007" >689
    \GlsXtrEnablePreLocationTag  607
    +href="glossaries-extra-manual.html#dx1-14010" >690
    +\glsxtrentryfmt  691
    +\glsxtrfielddolistloop  692
    +\glsxtrfieldforlistloop  693
    +\glsxtrfieldifinlist  694
    +\glsxtrfieldlistadd  695
    +\glsxtrfieldlisteadd  696
    +\glsxtrfieldlistgadd  697
    +\glsxtrfieldlistxadd  698
    \glsxtrfieldtitlecasecs  608
    +href="glossaries-extra-manual.html#dx1-25079" >699
    +\glsxtrfieldxifinlist  700
    \glsxtrfirstscfont  609
    +href="glossaries-extra-manual.html#dx1-20026" >701
    \glsxtrfirstsmfont  610
    +href="glossaries-extra-manual.html#dx1-20033" >702
    +\glsxtrfmt  703
    +\GlsXtrFmtDefaultOptions  704
    +\GlsXtrFmtField  705
    \GlsXtrFormatLocationList  611
    +href="glossaries-extra-manual.html#dx1-14002" >706
    \GLSxtrfull  612
    +href="glossaries-extra-manual.html#dx1-18024" >707
    \Glsxtrfull  613
    +href="glossaries-extra-manual.html#dx1-18021" >708
    \glsxtrfull  614
    +href="glossaries-extra-manual.html#dx1-18014" >709
    \Glsxtrfullformat  615
    +href="glossaries-extra-manual.html#dx1-23053" >710
    \glsxtrfullformat  616
    +href="glossaries-extra-manual.html#dx1-23049" >711
    + + + \GLSxtrfullpl  617
    +href="glossaries-extra-manual.html#dx1-18033" >712
    \Glsxtrfullpl  618
    +href="glossaries-extra-manual.html#dx1-18032" >713
    \glsxtrfullpl  619
    +href="glossaries-extra-manual.html#dx1-18031" >714
    \Glsxtrfullplformat  620
    +href="glossaries-extra-manual.html#dx1-23061" >715
    \glsxtrfullplformat  621
    +href="glossaries-extra-manual.html#dx1-23057" >716
    \glsxtrfullsep  622
    +href="glossaries-extra-manual.html#dx1-20040" >717
    \glsxtrifcounttrigger  623
    +href="glossaries-extra-manual.html#dx1-26017" >718
    +\glsxtrifkeydefined  719
    \glsxtrifwasfirstuse  624
    +class="cmti-10">720
    +\glsxtrindexaliased  721
    \Glsxtrinlinefullformat  625
    +href="glossaries-extra-manual.html#dx1-23068" >722
    \glsxtrinlinefullformat  626
    +href="glossaries-extra-manual.html#dx1-23065" >723
    \Glsxtrinlinefullplformat  627
    +href="glossaries-extra-manual.html#dx1-23075" >724
    \glsxtrinlinefullplformat  628
    +href="glossaries-extra-manual.html#dx1-23072" >725
    \glsxtrinsertinsidetrue  629
    +href="glossaries-extra-manual.html#dx1-16034" >726
    +\GlsXtrLetField  727
    +\GlsXtrLetFieldToField  728
    \GlsXtrLoadResources  630
    +href="glossaries-extra-manual.html#dx1-29021" >729
    +\glsxtrlocrangefmt  730
    \Glsxtrlong  631, 632
    +href="glossaries-extra-manual.html#dx1-18020" >731, 732
    \glsxtrlong  633
    +href="glossaries-extra-manual.html#dx1-18012" >733
    \GLSxtrlongpl  634
    +href="glossaries-extra-manual.html#dx1-18030" >734
    \Glsxtrlongpl  635
    +href="glossaries-extra-manual.html#dx1-18029" >735
    \glsxtrlongpl  636
    +href="glossaries-extra-manual.html#dx1-18028" >736
    \glsxtrlongshortdescsort  637
    +href="glossaries-extra-manual.html#dx1-22038" >737
    \glsxtrnewnumber  638
    +href="glossaries-extra-manual.html#dx1-4081" >738
    \glsxtrnewsymbol  639
    +href="glossaries-extra-manual.html#dx1-4078" >739
    \GlsXtrNoGlsWarningAutoMake  640
    +href="glossaries-extra-manual.html#dx1-38017" >740
    \GlsXtrNoGlsWarningBuildInfo  641
    +href="glossaries-extra-manual.html#dx1-38016" >741
    \GlsXtrNoGlsWarningCheckFile  642
    +href="glossaries-extra-manual.html#dx1-38012" >742
    \GlsXtrNoGlsWarningEmptyMain  643
    +href="glossaries-extra-manual.html#dx1-38010" >743
    \GlsXtrNoGlsWarningEmptyNotMain  644
    +href="glossaries-extra-manual.html#dx1-38011" >744
    \GlsXtrNoGlsWarningEmptyStart  645
    +href="glossaries-extra-manual.html#dx1-38009" >745
    \GlsXtrNoGlsWarningHead  646
    +href="glossaries-extra-manual.html#dx1-38008" >746
    \GlsXtrNoGlsWarningMisMatch  647
    +href="glossaries-extra-manual.html#dx1-38013" >747
    \GlsXtrNoGlsWarningNoOut  648
    +href="glossaries-extra-manual.html#dx1-38014" >748
    \GlsXtrNoGlsWarningTail  649
    +href="glossaries-extra-manual.html#dx1-38015" >749
    \Glsxtrp  650, 651
    +href="glossaries-extra-manual.html#dx1-10061" >750, 751
    \glsxtrp  652
    +href="glossaries-extra-manual.html#dx1-10052" >752
    \glsxtrpageref  653
    +href="glossaries-extra-manual.html#dx1-30004" >753
    \Glsxtrpl  654
    - - - +href="glossaries-extra-manual.html#dx1-28015" >754
    \glsxtrpl  655
    +href="glossaries-extra-manual.html#dx1-28013" >755
    \glsxtrpostdescription  656
    +href="glossaries-extra-manual.html#dx1-13012" >756
    \glsxtrpostlink  657
    +class="cmti-10">757
    \glsxtrpostlinkAddDescOnFirstUse  658
    +class="cmti-10">758
    \glsxtrpostlinkAddSymbolOnFirstUse  659
    +class="cmti-10">759
    + + + \glsxtrpostlinkendsentence  660
    +class="cmti-10">760
    \glsxtrpostlinkhook  661
    +class="cmti-10">761
    +\glsxtrpostlongdescription  762
    \glsxtrpostnamehook  662
    +href="glossaries-extra-manual.html#dx1-13008" >763
    \GlsXtrPostNewAbbreviation  663
    +href="glossaries-extra-manual.html#dx1-23017" >764
    +\glsxtrprovidestoragekey  765
    +\GlsXtrRecordCounter  766
    \glsxtrregularfont  664
    +class="cmti-10">767
    \glsxtrresourcefile  665
    +href="glossaries-extra-manual.html#dx1-29020" >768
    \glsxtrRevertMarks  666
    +href="glossaries-extra-manual.html#dx1-24012" >769
    \glsxtrscfont  667
    +href="glossaries-extra-manual.html#dx1-20025" >770
    \glsxtrscsuffix  668
    +href="glossaries-extra-manual.html#dx1-20027" >771
    \GlsXtrSetActualChar  669
    +href="glossaries-extra-manual.html#dx1-27031" >772
    +\glsxtrsetaliasnoindex  773
    \GlsXtrSetAltModifier  670
    +class="cmti-10">774
    \glsxtrsetcategory  671
    +href="glossaries-extra-manual.html#dx1-25126" >775
    \glsxtrsetcategoryforall  672
    +href="glossaries-extra-manual.html#dx1-25128" >776
    \GlsXtrSetDefaultGlsOpts  673
    +class="cmti-10">777
    \GlsXtrSetEncapChar  674
    +href="glossaries-extra-manual.html#dx1-27034" >778
    \GlsXtrSetEscChar  675
    +href="glossaries-extra-manual.html#dx1-27033" >779
    +\GlsXtrSetField  780
    +\glsxtrsetfieldifexists  781
    \GlsXtrSetLevelChar  676
    +href="glossaries-extra-manual.html#dx1-27032" >782
    \glsxtrsetpopts  677
    +href="glossaries-extra-manual.html#dx1-10057" >783
    \Glsxtrshort  678, 679
    +href="glossaries-extra-manual.html#dx1-18019" >784, 785
    \glsxtrshort  680
    +href="glossaries-extra-manual.html#dx1-18010" >786
    \GLSxtrshortpl  681
    +href="glossaries-extra-manual.html#dx1-18027" >787
    \Glsxtrshortpl  682
    +href="glossaries-extra-manual.html#dx1-18026" >788
    \glsxtrshortpl  683
    +href="glossaries-extra-manual.html#dx1-18025" >789
    \glsxtrsmfont  684
    +href="glossaries-extra-manual.html#dx1-20032" >790
    \glsxtrsmsuffix  685
    +href="glossaries-extra-manual.html#dx1-20036" >791
    \glsxtrtagfont  686
    +href="glossaries-extra-manual.html#dx1-17003" >792
    +\glsxtrunsrtdo  793
    \GlsXtrUseAbbrStyleFmts  687
    +href="glossaries-extra-manual.html#dx1-23079" >794
    \GlsXtrUseAbbrStyleSetup  688
    +href="glossaries-extra-manual.html#dx1-23034" >795
    +\Glsxtrusefield  796
    +\glsxtrusefield  797
    \glsxtruserfield  689
    +href="glossaries-extra-manual.html#dx1-22023" >798
    \glsxtruserparen  690
    +href="glossaries-extra-manual.html#dx1-22026" >799
    \glsxtrusersuffix  691
    +href="glossaries-extra-manual.html#dx1-22032" >800
    \glsxtrusesee  692
    +class="cmti-10">801
    \glsxtruseseeformat  693
    +class="cmti-10">802
    \GlsXtrWarnDeprecatedAbbrStyle  694
    +href="glossaries-extra-manual.html#dx1-20057" >803
    \GlsXtrWarning  695
    +href="glossaries-extra-manual.html#dx1-28011" >804

    H + + + hyperref package  696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706
    +href="glossaries-extra-manual.html#dx1-10029" >805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819

    L - - - link-text  707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724
    +href="glossaries-extra-manual.html#dx1-7001" >820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837
    location list  725, 726
    +href="glossaries-extra-manual.html#dx1-7071" >838, 839, 840, 841
    +\longnewglossaryentry  842

    M makeglossaries  727, 728, 729, 730, 731
    +href="glossaries-extra-manual.html#dx1-3026" >843, 844, 845, 846, 847
    \makeglossaries  732
    +href="glossaries-extra-manual.html#dx1-5028" >848
    makeglossaries-lite.lua  733, 734
    +href="glossaries-extra-manual.html#dx1-5031" >849, 850
    makeglossaries-lite.lua  735, 736
    +href="glossaries-extra-manual.html#dx1-5032" >851, 852
    makeindex  737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747
    +href="glossaries-extra-manual.html#dx1-3021" >853, 854, 855, 856, 857, 858, 859, 860, 861
    memoir class  748
    +href="glossaries-extra-manual.html#dx1-3020" >862
    mfirstuc package  749, 750, 751
    +href="glossaries-extra-manual.html#dx1-3" >863, 864, 865

    N \newabbreviation  752
    +href="glossaries-extra-manual.html#dx1-16002" >866
    \newabbreviationstyle  753
    +href="glossaries-extra-manual.html#dx1-23001" >867
    \newacronym  754
    +href="glossaries-extra-manual.html#dx1-16011" >868
    \newglossaryentry options
        alias  869, 870, 871, 872, 873
    +    category  755, 756, 757, 758, 759
    +href="glossaries-extra-manual.html#dx1-5009" >874, 875, 876, 877, 878
        desc  760, 761
    +href="glossaries-extra-manual.html#dx1-36038" >879, 880
        descplural  762, 763
    +href="glossaries-extra-manual.html#dx1-36042" >881, 882
        description  764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778
    +href="glossaries-extra-manual.html#dx1-20052" >883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901
    +    descriptionplural  902, 903, 904, 905
        first  779, 780, 781, 782, 783, 784, 785, 786, 787, 788
    +href="glossaries-extra-manual.html#dx1-7013" >906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917
        firstplural  789, 790, 791, 792, 793, 794
    +href="glossaries-extra-manual.html#dx1-7014" >918, 919, 920, 921, 922, 923, 924, 925, 926, 927
        location  795, 796, 797, 798
    +href="glossaries-extra-manual.html#dx1-32011" >928
        loclist  799, 800, 801
    +href="glossaries-extra-manual.html#dx1-32012" >929
        long  802, 803, 804, 805, 806
    +href="glossaries-extra-manual.html#dx1-9026" >930, 931, 932, 933, 934, 935, 936, 937
        longplural  807, 808, 809, 810
    +href="glossaries-extra-manual.html#dx1-9010" >938, 939, 940, 941, 942, 943
        name  811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833
    +href="glossaries-extra-manual.html#dx1-9023" >944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967
        parent  834
    +href="glossaries-extra-manual.html#dx1-15023" >968
        plural  835, 836, 837, 838
    +href="glossaries-extra-manual.html#dx1-7017" >969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981
        see  839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851
    +href="glossaries-extra-manual.html#dx1-4057" >982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996
        short  852, 853, 854, 855, 856, 857, 858, 859, 860, 861
    +href="glossaries-extra-manual.html#dx1-7011" >997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010
        shortplural  862, 863, 864, 865, 866, 867, 868, 869, 870, 871
    +href="glossaries-extra-manual.html#dx1-9011" >1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024
        sort  872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883
    +href="glossaries-extra-manual.html#dx1-4044" >1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036
    + + +     symbol  884, 885
    +href="glossaries-extra-manual.html#dx1-36030" >1037, 1038, 1039
        symbolplural  886, 887
    +href="glossaries-extra-manual.html#dx1-36034" >1040, 1041
        text  888, 889, 890, 891, 892, 893, 894, 895
    +href="glossaries-extra-manual.html#dx1-7016" >1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053
        type  896, 897
    +href="glossaries-extra-manual.html#dx1-11046" >1054, 1055
        user1  898, 899, 900
    +href="glossaries-extra-manual.html#dx1-20041" >1056, 1057, 1058
    number list  901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924
    - - - +href="glossaries-extra-manual.html#dx1-6032" >1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080

    P package options:
        abbreviations  925, 926, 927, 928, 929
    +href="glossaries-extra-manual.html#dx1-4064" >1081, 1082, 1083, 1084, 1085
        accsupp  930, 931, 932
    +href="glossaries-extra-manual.html#dx1-4002" >1086, 1087, 1088
        acronym  933
    +href="glossaries-extra-manual.html#dx1-4072" >1089
        acronymlists  934
    +href="glossaries-extra-manual.html#dx1-4076" >1090
        automake  935, 936
    +href="glossaries-extra-manual.html#dx1-5033" >1091, 1092
        docdef  937, 938, 939, 940
    +href="glossaries-extra-manual.html#dx1-4028" >1093, 1094, 1095, 1096
            restricted  941
    +href="glossaries-extra-manual.html#dx1-4053" >1097
            true  942, 943
    +href="glossaries-extra-manual.html#dx1-4052" >1098, 1099
        docdefs  944, 945, 946
    +href="glossaries-extra-manual.html#dx1-28003" >1100, 1101, 1102
        entrycounter  947
    +href="glossaries-extra-manual.html#dx1-30002" >1103
        hyperfirst
            false  948
    +href="glossaries-extra-manual.html#dx1-25030" >1104
        index  949, 950
    +href="glossaries-extra-manual.html#dx1-5025" >1105, 1106
        indexcrossrefs  951, 952, 953
    +href="glossaries-extra-manual.html#dx1-4056" >1107, 1108, 1109
    +        false  1110
        indexonlyfirst  954, 955, 956, 957
    +href="glossaries-extra-manual.html#dx1-6002" >1111, 1112, 1113, 1114
        nomain  958
    +href="glossaries-extra-manual.html#dx1-3031" >1115
        nomissingglstext  959
    +href="glossaries-extra-manual.html#dx1-4055" >1116
        nonumberlist  960, 961, 962, 963
    +href="glossaries-extra-manual.html#dx1-6035" >1117, 1118, 1119, 1120
        nopostdot  964, 965
    +href="glossaries-extra-manual.html#dx1-13018" >1121, 1122
            false  966, 967
    +href="glossaries-extra-manual.html#dx1-3004" >1123, 1124
            true  968
    +href="glossaries-extra-manual.html#dx1-3003" >1125
        noredefwarn
            false  969
    +href="glossaries-extra-manual.html#dx1-3008" >1126
            true  970
    +href="glossaries-extra-manual.html#dx1-3005" >1127
        notree  971
    +href="glossaries-extra-manual.html#dx1-15012" >1128
        numbers  972, 973, 974
    +href="glossaries-extra-manual.html#dx1-4080" >1129, 1130, 1131
        record  975, 976, 977, 978, 979
    +href="glossaries-extra-manual.html#dx1-4018" >1132, 1133, 1134, 1135, 1136, 1137
            alsoindex  980, 981
    +href="glossaries-extra-manual.html#dx1-4025" >1138, 1139, 1140
            off  982
    +href="glossaries-extra-manual.html#dx1-4021" >1141
            only  983
    +href="glossaries-extra-manual.html#dx1-4024" >1142
        seeautonumberlist  984
    +href="glossaries-extra-manual.html#dx1-6036" >1143
        seenoindex  985
    +href="glossaries-extra-manual.html#dx1-6025" >1144
            ignore  986
    +href="glossaries-extra-manual.html#dx1-6027" >1145
        shortcuts  987, 988
    +href="glossaries-extra-manual.html#dx1-4082" >1146, 1147
    + + +         abbr  989, 990
    +href="glossaries-extra-manual.html#dx1-4086" >1148, 1149
            abbreviation  991
    +href="glossaries-extra-manual.html#dx1-19001" >1150
            abbreviations  992
    +href="glossaries-extra-manual.html#dx1-4085" >1151
            acro  993
    +href="glossaries-extra-manual.html#dx1-4084" >1152
            acronyms  994
    +href="glossaries-extra-manual.html#dx1-4083" >1153
            all  995
    +href="glossaries-extra-manual.html#dx1-4096" >1154
            false  996
    +href="glossaries-extra-manual.html#dx1-4099" >1155
            none  997
    - - - +href="glossaries-extra-manual.html#dx1-4098" >1156
            other  998
    +href="glossaries-extra-manual.html#dx1-4087" >1157
            true  999
    +href="glossaries-extra-manual.html#dx1-4097" >1158
        stylemods  1000, 1001, 1002
    +href="glossaries-extra-manual.html#dx1-4011" >1159, 1160, 1161
        subentrycounter  1003
    +href="glossaries-extra-manual.html#dx1-30003" >1162
        symbols  1004, 1005, 1006
    +href="glossaries-extra-manual.html#dx1-4077" >1163, 1164, 1165
        toc
            false  1007
    +href="glossaries-extra-manual.html#dx1-3002" >1166
            true  1008
    +href="glossaries-extra-manual.html#dx1-3001" >1167
        translate
            babel  1009
    +href="glossaries-extra-manual.html#dx1-3010" >1168
            true  1010
    +href="glossaries-extra-manual.html#dx1-3012" >1169
        undefaction  1011, 1012
    +href="glossaries-extra-manual.html#dx1-4013" >1170, 1171
            error  1013, 1014
    +href="glossaries-extra-manual.html#dx1-4014" >1172, 1173
            warn  1015, 1016, 1017, 1018
    +href="glossaries-extra-manual.html#dx1-4015" >1174, 1175, 1176, 1177, 1178
    page (counter)  1019, 1020
    +href="glossaries-extra-manual.html#dx1-26027" >1179, 1180
    polyglossia package  1021
    +href="glossaries-extra-manual.html#dx1-38005" >1181
    +\pretoglossarypreamble  1182
    \printabbreviations  1022
    +href="glossaries-extra-manual.html#dx1-4065" >1183
    \printglossary options
        target  1184, 1185
    +    title  1023
    +href="glossaries-extra-manual.html#dx1-38006" >1186
    \printnoidxglossary options
        sort  1024
    +href="glossaries-extra-manual.html#dx1-32007" >1187
    \printunsrtglossaries  1025
    +href="glossaries-extra-manual.html#dx1-32008" >1188
    \printunsrtglossary  1026
    +href="glossaries-extra-manual.html#dx1-32001" >1189, 1190
    +\printunsrtglossaryhandler  1191
    +\printunsrtglossaryunit  1192
    +\printunsrtglossaryunitsetup  1193
    +\provideignoredglossary  1194

    R relsize package  1027
    +href="glossaries-extra-manual.html#dx1-20034" >1195
    \RestoreAcronyms  1028
    +href="glossaries-extra-manual.html#dx1-11045" >1196

    S \setabbreviationstyle  1029
    +href="glossaries-extra-manual.html#dx1-18001" >1197
    + + + slantsc package  1030
    +href="glossaries-extra-manual.html#dx1-24020" >1198

    T textcase package  1031
    +href="glossaries-extra-manual.html#dx1-6" >1199
    tracklang package  1032, 1033
    +href="glossaries-extra-manual.html#dx1-2" >1200, 1201
    translator package  1034
    +href="glossaries-extra-manual.html#dx1-3011" >1202

    X xfor package  1035
    +href="glossaries-extra-manual.html#dx1-7" >1203
    \xglssetwidest  1036
    +href="glossaries-extra-manual.html#dx1-15015" >1204
    +\xGlsXtrSetField  1205
    xindy  1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045
    +href="glossaries-extra-manual.html#dx1-3022" >1206, 1207, 1208, 1209, 1210, 1211, 1212
    xkeyval package  1046
    - - - +href="glossaries-extra-manual.html#dx1-5" >1213

    1.14.21 was originally intended as the last release of glossaries to incorporate new features, but a few new minor features slipped in with some bug fixes in v4.21.

    -

    1.2Still under development at the time of writing this.

    -

    1.3

    2.1The descriptionplural key is a throwback to the base package’s original acronym mechanism +before the introduction of the long and short keys, where the long form was stored in the description +field and the short form was stored in the symbol field.

    +

    9.1Version 1.11 only allowed one use of \GlsXtrLoadResources per document.

    +

    9.2v1.08 assumed filename.tex #1={\protect\ttfamily#1}|main}} \DeleteShortVerb{\|} \MakeShortVerb{"} - \title{glossaries-extra.sty v1.11: + \title{glossaries-extra.sty v1.12: an extension to the glossaries package} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} - \date{2017-01-19} + \date{2017-02-03} \maketitle \begin{abstract} @@ -477,14 +488,12 @@ over a glossary list. This includes \ics{forglsentries} and \ics{glsaddall}. \end{important} -\item[{\pkgopt{record}}] (New to v1.08.) This is a \meta{key}=\meta{value} +\item[{\pkgopt{record}}]\label{opt:record}(New to v1.08.) This is a \meta{key}=\meta{value} option, which has three allowed values: \pkgoptfmt{off} (default), \pkgoptfmt{only} and \pkgoptfmt{alsoindex}. If the value is omitted \pkgoptfmt{only} is assumed. The option is provided for the benefit -of any post-processing applications that need to know information -about the entries used in the document, such as -\href{https://github.com/nlct/bib2gls}{bib2gls}.\footnote{Still -under development at the time of writing this.} +of \gls{bib2gls} (see \sectionref{sec:bib2gls}). + The option may only be set in the preamble. The \pkgopt[off]{record} option switches off the recording, as per @@ -499,94 +508,11 @@ or \cs{makenoidxglossaries} has been used) whereas With the recording on, any of the commands that would typically index the entry (such as \cs{gls}, \cs{glstext} or \cs{glsadd}) will add a \cs{glsxtr@record} entry to the \texttt{.aux} file. -The post-processing application can then read these lines to find +\gls{bib2gls} can then read these lines to find out which entries have been used. (Remember that commands like \cs{glsentryname} don't index, so any use of these commands won't add a corresponding \cs{glsxtr@record} entry to the \texttt{.aux} -file.) - -There are new commands that are intended for use with the -recording function: -\begin{definition}[\DescribeMacro\glsxtrresourcefile] -\cs{glsxtrresourcefile}\oarg{options}\marg{filename} -\end{definition} -(Don't include the file extension in \meta{filename}.) -There's a shortcut version that sets \meta{filename} \cs{jobname}: -\begin{definition}[\DescribeMacro\GlsXtrLoadResources] -\cs{GlsXtrLoadResources}\oarg{options} -\end{definition} -(Only one instance of \cs{GlsXtrLoadResources} is permitted -per document. Use \cs{glsxtrresourcefile} for any additional -resources.) - -This writes the line -\begin{alltt} -\cs{glsxtr@resource}\marg{options}\marg{filename} -\end{alltt} -to the \texttt{.aux} file and will input -\meta{filename}\texttt{.glstex} if it exists.\footnote{v1.08 assumed -\meta{filename}\texttt{.tex} but that's potentially dangerous if, -for example, \meta{filename} happens to be the same as \cs{jobname}. -The \texttt{.glstex} extension was enforced by version 1.11.} The post-processor may use this information -to create the required file. (This is why the \pkgopt{record} -option automatically switches on \pkgopt[warn]{undefaction}, -to allow the document to compile before the post-processor -has created the \texttt{.glstex} file.) - -The options aren't processed by -\styfmt{glossaries-extra} (other than simply writing \meta{options} -to the \texttt{.aux} file). The post-processor determines the -allowed options. As from v1.11, this command also writes other -information to the \texttt{.aux} file for the benefit of the -post-processor, including the list of valid keys allowed by -\cs{newglossaryentry} so make sure you add any custom keys -before using \cs{glsxtrresourcefile} or \cs{GlsXtrLoadResources} -if the post-processor needs that information. - -\begin{definition}[\DescribeMacro\printunsrtglossary] -\cs{printunsrtglossary}\oarg{options} -\end{definition} -This behaves like \cs{printnoidxglossary} but never sorts the -entries and always lists all the defined entries for the given -glossary (and doesn't require \cs{makenoidxglossaries}). - -\begin{important} -You may use this command without the \pkgopt{record} option -or \cs{glsxtrresourcefile} if you're happy to have a complete -unsorted list without \glspl{numberlist}. However this requires -all entries to have been defined before use, so if you've used the -\pkgopt{docdefs} package option with definitions after the glossary, -you'll need a second \LaTeX\ run to pick up the definitions from the -\texttt{.glsdefs} file. -\end{important} - -The optional argument is as for \cs{printnoidxglossary} (except for -the \gloskey[printnoidxglossary]{sort} key, which isn't available). -The \gls{numberlist} will need setting by the post-processor -by adding the \gloskey{loclist} or \gloskey{location} field to the entry definitions, -otherwise the \gls*{numberlist} will be empty. (If both the -\gloskey{loclist} and \gloskey{location} fields are set, the -\gloskey{location} field will be used in the glossary.) - -The \gloskey{location} field should contain the relevant commands to -format the \gls{numberlist}. There's no specific syntax for this -field, it just needs to contain valid \LaTeX\ commands. - -The \gloskey{loclist} field should be a list separated by -\verb"|" (as per \sty{etoolbox}'s internal lists) where each -location in the list is in the format -\begin{definition} -\cs{glsnoidxdisplayloc}\marg{prefix}\marg{counter}\marg{format}\marg{location} -\end{definition} -(see the \styfmt{glossaries} manual for information about that -command). - -All glossaries may be displayed in the order of their definition -using: -\begin{definition}[\DescribeMacro\printunsrtglossaries] -\cs{printunsrtglossaries} -\end{definition} -which is analogous to \cs{printnoidxglossaries}. +file.) See \sectionref{sec:bib2gls} for further details. \item[{\pkgopt{docdef}}] This option governs the use of \cs{newglossaryentry}. It was originally a boolean option, @@ -668,9 +594,14 @@ the end of the document. Note that this necessarily adds to the overall document build time, especially if you have defined a large number of entries, so this defaults to \pkgoptfmt{false}, but it will be automatically switched on if you use the \gloskey{see} key in any -entries. To force it off, even if you use the \gloskey{see}, you +entries. To force it off, even if you use the \gloskey{see} key, you need to explicitly set \pkgopt{indexcrossrefs} to \pkgoptfmt{false}. +Note that \gls{bib2gls} can automatically find dependent +entries when it parses the \texttt{.bib} source file. +The \pkgopt{record} option automatically implements +\pkgopt[false]{indexcrossrefs}. + \item[{\pkgopt{abbreviations}}] This option has no value and can't be cancelled. If used, it will automatically create a new glossary with the label @@ -797,12 +728,81 @@ version that doesn't automatically switch off the hyperlinks. This starred version may be used with the \catattr{targeturl} attribute to create a link to an external URL. (See \sectionref{sec:categories} for further details.) - -The \cs{newglossaryentry} command has a new key called -\gloskey{category}, which sets the category label for the given +As from v1.12 both the starred and unstarred version check +that the glossary doesn't already exist. (The \styfmt{glossaries} +package omits this check.) + +You can now provide an ignored glossary with: +\begin{definition}[\DescribeMacro\provideignoredglossary] +\cs{provideignoredglossary}\marg{type} +\end{definition} +which will only define the glossary if it doesn't already exist. +This also has a starred version that doesn't automatically switch +off hyperlinks. + +The individual glossary displaying commands \ics{printglossary}, +\ics{printnoidxglossary} and \cs{printunsrtglossary} have an extra +key \gloskey[printglossary]{target}. This is a boolean key which can +be used to switch off the automatic hypertarget for each entry. +Unlike \cs{glsdisablehyper} this doesn't switch off hyperlinks, so +any cross-references within the glossary won't be affected. This is +a way of avoiding duplicate target warnings if a glossary needs to +be displayed multiple times. + +The \cs{newglossaryentry} command has two new keys: +\begin{itemize} +\item \gloskey{category}, which sets the category label for the given entry. By default this is \texttt{general}. See \sectionref{sec:categories} for further information about categories. +\item \gloskey{alias}, which allows an entry to be alias to another +entry. See \sectionref{sec:alias} for further details. +\end{itemize} + +The \cs{longnewglossaryentry} command now has a starred version +(as from v1.12) that doesn't automatically insert +\begin{verbatim} +\leavevmode\unskip\nopostdesc +\end{verbatim} +at the end of the description field. +\begin{definition}[\DescribeMacro\longnewglossaryentry] +\cs{longnewglossaryentry}*\marg{label}\marg{options}\marg{description} +\end{definition} +The \gloskey{descriptionplural} key is left unset unless explicitly +set in \meta{options}. + +The unstarred version no longer hard-codes the above code (which +removes trailing space and suppresses the post-description hook) but instead +uses: +\begin{definition}[\DescribeMacro\glsxtrpostlongdescription] +\cs{glsxtrpostlongdescription} +\end{definition} +This can be redefined to allow the post-description hook to work +but retain the \cs{unskip} part if required. +For example: +\begin{verbatim} +\renewcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip} +\end{verbatim} +This will discarded unwanted trailing space at the end of the description +but won't suppress the post-description hook. + +The unstarred version also alters the base \sty{glossaries} package's +treatment of the \gloskey{descriptionplural} key. Since a +plural description doesn't make much sense for multi-paragraph +descriptions, the default behaviour with +\sty{glossaries-extra}'s +\cs{longnewglossaryentry} is to simply leave the plural description +unset unless explicitly set using the \gloskey{descriptionplural} +key. The \styfmt{glossaries.sty} version of this command sets the description's +plural form to the same as the singular.\footnote{The +\gloskey{descriptionplural} key is a +throwback to the base package's original acronym mechanism before the introduction of +the \gloskey{long} and \gloskey{short} keys, where the long form was +stored in the \gloskey{description} field and the short form was stored in the +\gloskey{symbol} field.} + +Note that this modified unstarred version doesn't append +\cs{glsxtrpostlongdescription} to the description's plural form. The \ics{newterm} command (defined through the \pkgopt{index} package option) is modified so that the category defaults to \category{index}. @@ -1178,6 +1178,71 @@ you can use \verb|\gls*[noindex]{sample}| or \verb|\gls![hyper=false]{sample}| but you can't combine the \texttt{*} and \texttt{!} modifiers. +\Glspl{locationlist} displayed with \cs{printnoidxglossary} +internally use +\begin{definition}[\DescribeMacro\glsnoidxdisplayloc] +\cs{glsnoidxdisplayloc}\marg{prefix}\marg{counter}\marg{format}\marg{location} +\end{definition} +This command is provided by \styfmt{glossaries}, but is modified by +\styfmt{glossaries-extra} to check for the start and end range +formation identifiers \verb|(| and \verb|)| which are discarded to +obtain the actual control sequence name that forms the location +formatting command. + +If the range identifiers aren't present, this just uses +\begin{definition}[\DescribeMacro\glsxtrdisplaysingleloc] +\cs{glsxtrdisplaysingleloc}\marg{format}\marg{location} +\end{definition} +otherwise it uses +\begin{definition}[\DescribeMacro\glsxtrdisplaystartloc] +\cs{glsxtrdisplaystartloc}\marg{format}\marg{location} +\end{definition} +for the start of a range (where the identifier has been stripped +from \meta{format}) or +\begin{definition}[\DescribeMacro\glsxtrdisplayendloc] +\cs{glsxtrdisplayendloc}\marg{format}\marg{location} +\end{definition} +for the end of a range (where the identifier has been stripped +from \meta{format}). + +By default the start range command saves the format in +\begin{definition}[\DescribeMacro\glsxtrlocrangefmt] +\cs{glsxtrlocrangefmt} +\end{definition} +and does +\begin{display} +\cs{glsxtrdisplaysingleloc}\marg{format}\marg{location} +\end{display} +(If the format is empty, it will be replaced with +\texttt{glsnumberformat}.) + +The end command checks that the format matches the start of the +range, does +\begin{definition}[\DescribeMacro\glsxtrdisplayendlochook] +\cs{glsxtrdisplayendlochook}\marg{format}\marg{location} +\end{definition} +(which does nothing by default), followed by +\begin{display} +\cs{glsxtrdisplaysingleloc}\marg{format}\marg{location} +\end{display} +and then sets \cs{glsxtrlocrangefmt} to empty. + +This means that the list +\begin{verbatim} +\glsnoidxdisplayloc{}{page}{(textbf}{1}, +\glsnoidxdisplayloc{}{page}{textbf}{1}, +\glsnoidxdisplayloc{}{page}{)textbf}{1}. +\end{verbatim} +doesn't display any differently from +\begin{verbatim} +\glsnoidxdisplayloc{}{page}{textbf}{1}, +\glsnoidxdisplayloc{}{page}{textbf}{1}, +\glsnoidxdisplayloc{}{page}{textbf}{1}. +\end{verbatim} +but it does make it easier to define your own custom list handler +that can accommodate the ranges. + + \section{Entry Counting Modifications} \label{sec:entrycountmods} @@ -1203,6 +1268,92 @@ other categories will be unchanged. Further information about entry counting, including the new per-unit feature, is described in \sectionref{sec:entrycount}. +\section{Plurals} + +Some languages, such as English, have a general rule that plurals +are formed from the singular with a suffix appended. This isn't +an absolute rule. There are plenty of exceptions (for example, +geese, children, churches, elves, fairies, sheep). The +\sty{glossaries} package allows the \gloskey{plural} key to be +optional when defining entries. In some cases a plural may not make +any sense (for example, the term is a symbol) and in some cases +the plural may be identical to the singular. + +To make life easier for languages where the majority of plurals can +simply be formed by appending a suffix to the singular, the +\sty{glossaries} package sets lets the \gloskey{plural} field default +to the value of the \gloskey{text} field with \ics{glspluralsuffix} +appended. This command is defined to be just the letter \qt{s}. +This means that the majority of terms don't need to have the +\gloskey{plural} supplied as well, and you only need to use it for the +exceptions. + +For languages that don't have this general rule, the \gloskey{plural} +field will always need to be supplied, where needed. + +There are other plural fields, such as \gloskey{firstplural}, +\gloskey{longplural} and \gloskey{shortplural}. Again, if you are using +a language that doesn't have a simple suffix rule, you'll have to +supply the plural forms if you need them (and if a plural makes +sense in the context). + +If these fields are omitted, the \sty{glossaries} package follows +these rules: +\begin{itemize} +\item If \gloskey{firstplural} is missing, then \cs{glspluralsuffix} +is appended to the \gloskey{first} field, if that field has been +supplied. If the \gloskey{first} field hasn't been supplied but the +\gloskey{plural} field has been supplied, then the \gloskey{firstplural} +field defaults to the \gloskey{plural} field. If the \gloskey{plural} +field hasn't been supplied, then both the \gloskey{plural} and +\gloskey{firstplural} fields default to the \gloskey{text} field (or +\gloskey{name}, if no \gloskey{text} field) with \cs{glspluralsuffix} +appended. + +\item If the \gloskey{longplural} field is missing, then +\cs{glspluralsuffix} is appended to the \gloskey{long} field, if the +\gloskey{long} field has been supplied. + +\item If the \gloskey{shortplural} field is missing then, \emph{with +the base \sty{glossaries} acronym mechanism}, \ics{acrpluralsuffix} +is appended to the \gloskey{short} field. + +\end{itemize} + +This \emph{last case is changed} with \styfmt{glossaries-extra}. +With this extension package, the \gloskey{shortplural} field +defaults to the \gloskey{short} field with \ics{abbrvpluralsuffix} +appended unless overridden by category attributes. This +suffix command is set by the abbreviation styles. This means that +every time an abbreviation style is implemented, +\cs{abbrvpluralsuffix} is redefined. In most cases its redefined to +use +\begin{definition}[\DescribeMacro\glsxtrabbrvpluralsuffix] +\cs{glsxtrabbrvpluralsuffix} +\end{definition} +which defaults to just \cs{glspluralsuffix}. Some of the +abbreviation styles have their own command for the plural suffix, +such as \cs{glsxtrscsuffix} which is defined as: +\begin{verbatim} +\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}} +\end{verbatim} +So if you want to completely strip all the plural suffixes used for +abbreviations then you need to redefine \cs{glsxtrabbrvpluralsuffix} +\emph{not} \cs{abbrvpluralsuffix}, which changes with the style. Redefining +\cs{acrpluralsuffix} will have no affect, since it's not used by the +new abbreviation mechanism. + +If you require a mixture (for example, in a multilingual document), +there are two attributes that affect the short plural suffix +formation. The first is \catattr{aposplural} which uses the suffix +\begin{verbatim} +'\abbrvpluralsuffix +\end{verbatim} +That is, an apostrophe followed by \cs{abbrvpluralsuffix} is +appended. The second attribute is \catattr{noshortplural} which +suppresses the suffix and simply sets \gloskey{shortplural} to the +same as \gloskey{short}. + \section{Nested Links} \label{sec:nested} @@ -1868,6 +2019,10 @@ want to suppress the page number (and only index the entry once). See the accompanying sample file \texttt{sample-pages.tex}. +Note that \gls{bib2gls} can be instructed to insert +a prefix at the start of non-empty location lists, which +can be used as an alternative to \cs{GlsXtrEnablePreLocationTag}. + \subsection{The \styfmt{glossaries-extra-stylemods} Package} \label{sec:stylemods} @@ -3186,6 +3341,30 @@ use \ics{glsxtremfont}. 1.04, but original name retained as a deprecated synonym for backward-compatibility.) +\item[\abbrstyle{short-postlong-user}] +This style was introduced in version 1.12. It's like the +\abbrstyle{short-long-user} style but defers the parenthetical +material to after the link-text. This means that you don't have such +a long hyperlink (which can cause problems for the DVI \LaTeX\ format) +and it also means that the user supplied material can include a +hyperlink to another location. + +\item[\abbrstyle{short-postlong-user-desc}] +This style was introduced in version 1.12. It's like the above +\abbrstyle{short-postlong-user} style but the \gloskey{description} +must be specified. + +\item[\abbrstyle{long-postshort-user}] +This style was introduced in version 1.12. It's like the above +\abbrstyle{short-postlong-user} style but the long form is shown +first and the short form is in the parenthetical material (as for +\abbrstyle{long-short-user}) style. + +\item[\abbrstyle{long-postshort-user-desc}] +This style was introduced in version 1.12. It's like the above +\abbrstyle{long-postshort-user} style but the \gloskey{description} +must be specified. + \end{description} \section{Defining New Abbreviation Styles} @@ -4745,6 +4924,265 @@ don't use any commands in the \meta{label}, even if they expand to just text. \end{important} +\chapter{bib2gls: Managing Reference Databases} +\label{sec:bib2gls} + +There is a new command line application under development called +\gls{bib2gls}, which works in much the same way as \appfmt{bibtex}. +Instead of storing all your entry definitions in a \texttt{.tex} and +loading them using \cs{input} or \cs{loadglsentries}, the entries +can instead be stored in a \texttt{.bib} file and \gls{bib2gls} can +selectively write the appropriate commands to a \texttt{.glstex} +file which is loaded using \cs{glsxtrresourcefile} (or +\cs{GlsXtrLoadResources}). + +This means that you can use a reference managing system, such as +JabRef, to maintain the database and it reduces the \TeX\ overhead +by only defining the entries that are actually required in the +document. If you currently have a \texttt{.tex} file that contains +hundreds of definitions, but you only use a dozen or so in your +document, then the build time is needlessly slowed by the unrequired +definitions that occur when the file is input. + +Although \gls{bib2gls} isn't ready yet, there have been some new +commands and options added to \styfmt{glossaries-extra} to help +assist the integration of \gls{bib2gls} into the document build +process. + +An example of the contents of \texttt{.bib} file that stores +glossary entries that can be extracted with \gls{bib2gls}: +\begin{verbatim} +@entry{bird, + name={bird}, + description = {feathered animal}, + see={[see also]{duck,goose}} +} + +@entry{duck, + name={duck}, + description = {a waterbird with short legs} +} + +@entry{goose, + name="goose", + plural="geese", + description={a waterbird with a long neck} +} +\end{verbatim} + +The follow provides some abbreviations: +\begin{verbatim} +@string{ssi={server-side includes}} +@string{html={hypertext markup language}} + +@abbreviation{shtml, + short="shtml", + long= ssi # " enabled " # html, + description={a combination of \gls{html} and \gls{ssi}} +} + +@abbreviation{html, + short ="html", + long = html, + description={a markup language for creating web pages} +} + +@abbreviation{ssi, + short="ssi", + long = ssi, + description={a simple interpreted server-side scripting language} +} +\end{verbatim} + +Here are some symbols: +\begin{verbatim} +preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"} + +@symbol{M, + name={$\mtx{M}$}, + text={\mtx{M}}, + description={a matrix} +} + +@symbol{v, + name={$\vec{v}$}, + text={\vec{v}}, + description={a vector} +} + +@symbol{S, + name={$\mathcal{S}$}, + text={\mathcal{S}}, + description={a set} +} +\end{verbatim} + +To ensure that \gls{bib2gls} can find out which entries have been +used in the document, you need the \pkgopt{record} package. Option: +\begin{verbatim} +\usepackage[record]{glossaries-extra} +\end{verbatim} +If this option's value is omitted (as above), the normal indexing +will be switched off, since \gls{bib2gls} can also sort the entries and +collate the locations. + +If you still want to use an indexing application (for example, you +need a custom \gls{xindy} rule), then just use +\pkgopt[alsoindex]{record} and continue to use \cs{makeglossaries} +and \cs{printglossary} (or \cs{printglossaries}), but instruct +\gls{bib2gls} to omit sorting to save time. + +The \texttt{.glstex} file created by \cs{bib2gls} is loaded using: +\begin{definition}[\DescribeMacro\glsxtrresourcefile] +\cs{glsxtrresourcefile}\oarg{options}\marg{filename} +\end{definition} +(Don't include the file extension in \meta{filename}.) +There's a shortcut version that sets \meta{filename} \cs{jobname}: +\begin{definition}[\DescribeMacro\GlsXtrLoadResources] +\cs{GlsXtrLoadResources}\oarg{options} +\end{definition} +On the first use, this command is a shortcut for +\begin{alltt} +\cs{glsxtrresourcefile}\oarg{options}\{\cs{jobname}\} +\end{alltt} +On subsequent use,\footnote{Version 1.11 only allowed one use +of \cs{GlsXtrLoadResources} per document.}\ this command is a shortcut for +\begin{alltt} +\cs{glsxtrresourcefile}\oarg{options}\{\cs{jobname}-\meta{n}\} +\end{alltt} +where \meta{n} is the current value of +\begin{definition} +\cs{glsxtrresourcecount} +\end{definition} +which is incremented at the end of \cs{GlsXtrLoadResources}. +Any advisory notes regarding \cs{glsxtrresourcefile} also +apply to \cs{GlsXtrLoadResources}. + +The \cs{glsxtrresourcefile} command writes the line +\begin{alltt} +\cs{glsxtr@resource}\marg{options}\marg{filename} +\end{alltt} +to the \texttt{.aux} file and will input +\meta{filename}\texttt{.glstex} if it exists.\footnote{v1.08 assumed +\meta{filename}\texttt{.tex} but that's potentially dangerous if, +for example, \meta{filename} happens to be the same as \cs{jobname}. +The \texttt{.glstex} extension was enforced by version 1.11.} + +The options are ignored by \styfmt{glossaries-extra} but are picked +up by \gls{bib2gls} and are used to supply various information, such +as the name of the \texttt{.bib} files and any changes to the +default behaviour. + +Since the \texttt{.glstex} won't exist on the first \LaTeX\ run, the +\pkgopt{record} package option additionally switches on +\pkgopt[warn]{undefaction}. Any use of commands like \cs{gls} or +\cs{glstext} will produce ?? in the document, since they are +undefined at this point. Once \gls{bib2gls} has created the +\texttt{.glstex} file the references should be resolved. + +Note that as from v1.12, \cs{glsxtrresourcefile} temporarily +switches the category code of \texttt{@} to 11 (letter) while it +reads the file to allow for any internal commands stored in the +location field. + +Since the \texttt{.glstex} file only defines those references used +within the document and the definitions have been written in the +order corresponding to \gls{bib2gls} sorted list, the glossaries can +simply be displayed using \cs{printunsrtglossary} (or +\cs{printunsrtglossaries}), described in \sectionref{sec:printunsrt}. + +Suppose the \texttt{.bib} examples shown above have been stored in +the files \texttt{terms.bib}, \texttt{abbrvs.bib} and +\texttt{symbols.bib} which may either be in the current directory or +on \TeX's path. Then the document might look like: +\begin{verbatim} +\documentclass{article} + +\usepackage[record]{glossaries-extra} + +\setabbreviationstyle{long-short-desc} + +\GlsXtrLoadResources[src={terms,abbrvs,symbols}] + +\begin{document} +\gls{bird} + +\gls{shtml} + +\gls{M} + +\printunsrtglossaries +\end{document} +\end{verbatim} +The document build process (assuming the document is called +\texttt{mydoc}) is: +\begin{verbatim} +pdflatex mydoc +bib2gls mydoc +pdflatex mydoc +\end{verbatim} +This creates a single glossary containing the entries: +\texttt{bird}, \texttt{duck}, \texttt{goose}, +\texttt{html}, \texttt{M}, \texttt{shtml} and \texttt{ssi} (in that +order). The \texttt{bird}, \texttt{shtml} and \texttt{M} entries +were added because \gls{bib2gls} detected (from the \texttt{.aux} +file) that they had been used in the document. The other entries +were added because \gls{bib2gls} detected (from the \texttt{.bib} +files) that they are referenced by the used entries. In the case of +\texttt{duck} and \texttt{goose}, they are in the \gloskey{see} +field for \texttt{bird}. In the case of \texttt{ssi} and +\texttt{html}, they are referenced in the \gloskey{description} +field of \texttt{shtml}. These cross-referenced entries won't have a +location list when the glossary is first displayed, but depending on +how they are referenced, they may pick up a location list on the +next document build. + +The entries can be separated into different glossaries with +different sort methods: +\begin{verbatim} +\documentclass{article} + +\usepackage[record,abbreviations,symbols]{glossaries-extra} + +\setabbreviationstyle{long-short-desc} + +\GlsXtrLoadResources[src={terms},sort={en-GB},type=main] + +\glsxtrresourcefile + [src={abbrvs},sort={letter-nocase},type=abbreviations] + {\jobname-abr} + +\glsxtrresourcefile + [src={symbols},sort={use},type={symbols}] + {\jobname-sym} + +\begin{document} +\gls{bird} + +\gls{shtml} + +\gls{M} + +\printunsrtglossaries +\end{document} +\end{verbatim} +(By default, entries are sorted according to the operating system's +locale. If this doesn't match the document language, you need to +set this in the option list, for example \verb|sort=de-CH-1996| +for Swiss German using the new orthography.) + +Note that \cs{glsaddall} doesn't work in this case as it has to +iterate over the glossary lists, which will be empty on the first +run and on subsequent runs will only contain those entries that have +been selected by \gls{bib2gls}. Instead, if you want to add all +entries to the glossary, you need to tell \gls{bib2gls} this in the +options list: +\begin{verbatim} +\GlsXtrLoadResources[src={terms},selection={all}] +\end{verbatim} + +The \gls{bib2gls} user manual will contain more detail. + \chapter{Miscellaneous New Commands} \label{sec:miscnew} @@ -4758,39 +5196,571 @@ package provides a supplementary command that works in the same way except that it uses \ics{pageref} instead of \ics{ref}. -As mentioned in the description for the \pkgopt{record} package -option described in \sectionref{sec:pkgopts}, there's a new way of -printing a glossary without sorting or indexing: -\begin{definition} -\ics{printunsrtglossary}\oarg{options} +You can copy an entry to another glossary using +\begin{definition}[\DescribeMacro\glsxtrcopytoglossary] +\cs{glsxtrcopytoglossary}\marg{entry-label}\marg{glossary-type} +\end{definition} +This appends \meta{entry-label} to the end of the internal +list for the glossary given by \meta{glossary-type}. +Be careful if you use the \sty{hyperref} package as this +may cause duplicate hypertargets. You will need to change +\cs{glolinkprefix} to another value or disable hyperlinks +when you display the duplicate. Alternatively, use the new +\gloskey[printglossary]{target} key to switch off the targets: +\begin{verbatim} +\printunsrtglossary[target=false] +\end{verbatim} + +The \styfmt{glossaries} package allows you to set preamble code +for a given glossary type using \cs{setglossarypreamble}. This +overrides any previous setting. With \styfmt{glossaries-extra} +(as from v1.12) you can instead append to the preamble +using +\begin{definition}[\DescribeMacro\apptoglossarypreamble] +\cs{apptoglossarypreamble}\oarg{type}\marg{code} \end{definition} -To iterate over all glossaries: -\begin{definition} -\ics{printunsrtglossaries} +or prepend using +\begin{definition}[\DescribeMacro\pretoglossarypreamble] +\cs{pretoglossarypreamble}\oarg{type}\marg{code} \end{definition} -However, you can also uses these commands together with a -post-processor that works with the \pkgopt{record} package option and -\begin{definition} -\ics{glsxtrresourcefile}\oarg{options}{filename} +\section{Entry Fields} +\label{sec:fields} + +A field may now be used to store the name of a text-block command +that takes a single argument. The field is given by +\begin{definition}[\DescribeMacro\GlsXtrFmtField] +\cs{GlsXtrFmtField} +\end{definition} +The default value is \texttt{\GlsXtrFmtField}. Note that the +value must be the control sequence name \emph{without the initial +backslash}. + +For example: +\begin{verbatim} +\newcommand*{\mtx}[1]{\boldsymbol{#1}} +\newcommand*{\mtxinv}[1]{\mtx{#1}\sp{-1}} + +\newglossaryentry{matrix}{% + name={matrix}, + symbol={\ensuremath{\mtx{M}}}, + plural={matrices}, + user1={mtx}, + description={rectangular array of values} +} + +\newglossaryentry{identitymatrix}{% + name={identity matrix}, + symbol={\ensuremath{\mtx{I}}}, + plural={identity matrices}, + description={a diagonal matrix with all diagonal elements equal to +1 and all other elements equal to 0} +} + +\newglossaryentry{matrixinv}{% + name={matrix inverse}, + symbol={\ensuremath{\mtxinv{M}}}, + user1={mtxinv}, + description={a square \gls{matrix} such that + $\mtx{M}\mtxinv{M}=\glssymbol{identitymatrix}$} +} +\end{verbatim} + +There are two commands provided that allow you to apply the +command to an argument: +\begin{definition}[\DescribeMacro\glsxtrfmt] +\cs{glsxtrfmt}\oarg{options}\marg{label}\marg{text} +\end{definition} +This effectively does +\begin{alltt} +\cs{glslink}\oarg{options}\marg{label}\marg{\meta{cs}\marg{text}} +\end{alltt} +where \meta{cs} is the command obtained from the control +sequence name supplied in the provided field. If the field +hasn't been set, \cs{glsxtrfmt} will simply do \meta{text}. +The default \meta{options} are given by +\begin{definition}[\DescribeMacro\GlsXtrFmtDefaultOptions] +\cs{GlsXtrFmtDefaultOptions} +\end{definition} +This is defined as \texttt{\GlsXtrFmtDefaultOptions} but may +be redefined as appropriate. Note that the replacement text of +\cs{GlsXtrFmtDefaultOptions} is prepended to the optional +argument of \cs{glslink}. + +For example: +\begin{verbatim} +\[ + \glsxtrfmt{matrix}{A} + \glsxtrfmt{matrixinv}{A} + = + \glssymbol{identitymatrix} +\] +\end{verbatim} +If the default options are set to \texttt{noindex} then +\cs{glsxtrfmt} won't index, but will create a hyperlink (if +\sty{hyperref} has been loaded). This can be changed so that +it also suppresses the hyperlink: +\begin{verbatim} +\renewcommand{\GlsXtrFmtDefaultOptions}{hyper=false,noindex} +\end{verbatim} + +Note that \cs{glsxtrfmt} won't work with PDF bookmarks. Instead +you can use +\begin{definition}[\DescribeMacro\glsxtrentryfmt] +\cs{glsxtrentryfmt}\marg{label}\marg{text} +\end{definition} +This uses \cs{texorpdfstring} and will simply expand to \meta{text} +within the PDF bookmarks, but in the document it will do +\meta{cs}\marg{text} if a control sequence name has been provided +or just \meta{text} otherwise. + +The \styfmt{glossaries} package provides \cs{glsaddstoragekey} to +add new keys. This command will cause an error if the key has +already been defined. The \styfmt{glossaries-extra} package provides +a supplementary command that will only define the key if it doesn't +already exist: +\begin{definition}[\DescribeMacro\glsxtrprovidestoragekey] +\cs{glsxtrprovidestoragekey}\marg{key}\marg{default}\marg{cs} +\end{definition} +If the key has already been defined, it will still provide the command given in +the third argument \meta{cs} (if it hasn't already been defined). Unlike +\cs{glsaddstoragekey}, \meta{cs} may be left empty if you're happy +to just use \cs{glsfieldfetch} to fetch the value of this new key. + +You can test if a key has been provided with: +\begin{definition}[\DescribeMacro\glsxtrifkeydefined] +\cs{glsxtrifkeydefined}\marg{key}\marg{true}\marg{false} +\end{definition} +This tests if \meta{key} is available for use in the +\meta{key}=\value{value} list in the second argument of +\cs{newglossaryentry} (or the optional argument of +commands like \cs{newabbreviation}). The corresponding +field may not have been set for any of the entries if no +default was provided. + +There are now commands provided to set individual fields. Note that +these only change the specified field, not any related fields. For +example, changing the value of the \gloskey{text} field won't update +the \gloskey{plural} field. + +\begin{definition}[\DescribeMacro\GlsXtrSetField] +\cs{GlsXtrSetField}\marg{label}\marg{field}\marg{value} +\end{definition} +Sets the field given by \meta{field} to \meta{value} for the entry +given by \meta{label}. No expansion is performed. It's not +necessary for the field to have been defined as a key. You +can access the value later with \cs{glsxtrusefield}. Note that +\cs{glsxtrifkeydefined} only tests if a key has been defined for use +with commands like \cs{newglossaryentry}. If a field without a +corresponding key is assigned a value, the key remains undefined. +This command is robust. + +\cs{GlsXtrSetField} uses +\begin{definition}[\DescribeMacro\glsxtrsetfieldifexists] +\cs{glsxtrsetfieldifexists}\marg{label}\marg{field}\marg{code} +\end{definition} +where \meta{label} is the entry label and \meta{code} is the +assignment code. + +This command just uses \ics{glsdoifexists}\marg{label}\marg{code} +(ignoring the \meta{field} argument), so by default it causes an +error if the entry doesn't exist. This can be changed to a warning +with \pkgopt[warn]{undefaction}. You can redefine +\cs{glsxtrsetfieldifexists} to simply do \meta{code} if you want to +skip the existence check. Alternatively you can instead use +\begin{definition}[\DescribeMacro\glsxtrdeffield] +\cs{glsxtrdeffield}\marg{label}\marg{field}\meta{arguments}\marg{replacement text} +\end{definition} +This simply uses \sty{etoolbox}'s \cs{csdef} without any checks. +This command isn't robust. There is also a version that uses +\cs{csedef} instead: +\begin{definition}[\DescribeMacro\glsxtredeffield] +\cs{glsxtredeffield}\marg{label}\marg{field}\meta{arguments}\marg{replacement text} +\end{definition} + +\begin{definition}[\DescribeMacro\gGlsXtrSetField] +\cs{gGlsXtrSetField}\marg{label}\marg{field}\marg{value} +\end{definition} +As \cs{GlsXtrSetField} but globally. + +\begin{definition}[\DescribeMacro\eGlsXtrSetField] +\cs{eGlsXtrSetField}\marg{label}\marg{field}\marg{value} +\end{definition} +As \cs{GlsXtrSetField} but uses protected expansion. + +\begin{definition}[\DescribeMacro\xGlsXtrSetField] +\cs{xGlsXtrSetField}\marg{label}\marg{field}\marg{value} +\end{definition} +As \cs{gGlsXtrSetField} but uses protected expansion. + +\begin{definition}[\DescribeMacro\GlsXtrLetField] +\cs{GlsXtrLetField}\marg{label}\marg{field}\marg{cs} +\end{definition} +Sets the field given by \meta{field} to the replacement text of \meta{cs} +for the entry given by \meta{label} (using \cs{let}). + +\begin{definition}[\DescribeMacro\csGlsXtrLetField] +\cs{csGlsXtrLetField}\marg{label}\marg{field}\marg{cs name} +\end{definition} +As \cs{GlsXtrLetField} but the control sequence name is supplied +instead. + +\begin{definition}[\DescribeMacro\GlsXtrLetFieldToField] +\cs{GlsXtrLetFieldToField}\marg{label-1}\marg{field-1}\marg{label-2}\marg{field-2} +\end{definition} +Sets the field given by \meta{field-1} for the entry given by +\meta{label-1} to the field given by \meta{field-2} for the entry +given by \meta{label-2}. There's no check for the existence of +\meta{label-2}, but +\cs{glsxtrsetfieldifexists}\marg{label-1}\marg{field-1}\marg{code} +is still used, as for \cs{GlsXtrSetField}. + +The \styfmt{glossaries} package provides \ics{glsfieldfetch} which +can be used to fetch the value of the given field and store it in a +control sequence. The \styfmt{glossaries-extra} package provides +another way of accessing the field value: +\begin{definition}[\DescribeMacro\glsxtrusefield] +\cs{glsxtrusefield}\marg{entry-label}\marg{field-label} +\end{definition} +This works in the same way as commands like \cs{glsentrytext} but +the field label is specified in the first argument. Note that the +\meta{field-label} corresponds to the internal field tag, which +isn't always the same as the key name. See Table~4.1 of the +\sty{glossaries} manual. No error occurs if the entry or field +haven't been defined. This command is not robust. + +There is also a version that converts the first letter to uppercase +(analogous to \cs{Glsentrytext}): +\begin{definition}[\DescribeMacro\Glsxtrusefield] +\cs{Glsxtrusefield}\marg{entry-label}\marg{field-label} +\end{definition} + +If you want to use a field to store a list that can be used +as an \sty{etoolbox} internal list, you can use the following +command that adds an item to the field using \sty{etoolbox}'s +\cs{listcsadd}: +\begin{definition}[\DescribeMacro\glsxtrfieldlistadd] +\cs{glsxtrfieldlistadd}\marg{label}\marg{field}\marg{item} +\end{definition} +where \meta{label} is the entry's label, \meta{field} is +the entry's field and \meta{item} is the item to add. There +are analogous commands that use \cs{listgadd}, \cs{listeadd} +and \cs{listxadd}: +\begin{definition}[\DescribeMacro\glsxtrfieldlistgadd] +\cs{glsxtrfieldlistgadd}\marg{label}\marg{field}\marg{item} +\end{definition} +\begin{definition}[\DescribeMacro\glsxtrfieldlisteadd] +\cs{glsxtrfieldlisteadd}\marg{label}\marg{field}\marg{item} +\end{definition} +\begin{definition}[\DescribeMacro\glsxtrfieldlistxadd] +\cs{glsxtrfieldlistxadd}\marg{label}\marg{field}\marg{item} +\end{definition} +You can then iterate over the list using: +\begin{definition}[\DescribeMacro\glsxtrfielddolistloop] +\cs{glsxtrfielddolistloop}\marg{label}\marg{field} \end{definition} or -\begin{definition} -\ics{GlsXtrLoadResources}\oarg{options} -\end{definition} -At the time of writing this, -there is a new post-processor under development called -\href{https://github.com/nlct/bib2gls}{bib2gls} that can be used in -this way to fetch glossary entries stored in a \texttt{.bib} file, -selecting only those referenced in the document. It then creates a -\texttt{.glstex} file with the relevant definitions defined in the -order indicated in by \meta{options}. Since the order of definition -is already in the appropriate order, there's no need for any -additional sorting by \gls{makeindex} or \gls{xindy}. (It is however -possible to use \gls{makeindex}\slash\gls{xindy} in combination -with the post-processor by setting \pkgopt[alsoindex]{record} and using -\cs{makeglossaries} and \cs{printglossaries} as usual. For example, -if you require custom \gls{xindy} rules.) +\begin{definition}[\DescribeMacro\glsxtrfieldforlistloop] +\cs{glsxtrfieldforlistloop}\marg{label}\marg{field}\marg{handler} +\end{definition} +that internally use \cs{dolistcsloop} and \cs{forlistloop}, +respectively. + +There are also commands that use \cs{ifinlistcs}: +\begin{definition}[\DescribeMacro\glsxtrfieldifinlist] +\cs{glsxtrfieldifinlist}\marg{label}\marg{field}\marg{item}\marg{true}\marg{false} +\end{definition} +and \cs{xifinlistcs} +\begin{definition}[\DescribeMacro\glsxtrfieldxifinlist] +\cs{glsxtrfieldxifinlist}\marg{label}\marg{field}\marg{item}\marg{true}\marg{false} +\end{definition} + +See the \sty{etoolbox}'s user manual for further +details of these commands, in particular the limitations +of \cs{ifinlist}. + +When using the \pkgopt{record} option, in addition to recording the +usual location, you can also record the current value +of another counter at the same time using the preamble-only command: +\begin{definition}[\DescribeMacro\GlsXtrRecordCounter] +\cs{GlsXtrRecordCounter}\marg{counter name} +\end{definition} +For example: +\begin{verbatim} +\usepackage[record]{glossaries-extra} +\GlsXtrRecordCounter{section} +\end{verbatim} +Each time an entry is referenced with commands like \cs{gls} +or \cs{glstext}, the \texttt{.aux} file will not only contain +the \cs{glsxtr@record} command but also +\begin{alltt} +\cs{glsxtr@counterrecord}\marg{label}\{section\}\marg{n} +\end{alltt} +where \meta{n} is the current expansion of \cs{thesection} +and \meta{label} is the entry's label. On the next run, when the +\texttt{.aux} file is run, this command will do +\begin{alltt} +\cs{glsxtrfieldlistgadd}\marg{label}\{record.\meta{counter}\}\marg{n} +\end{alltt} +In the above example, if \verb|\gls{bird}| is used in section~1.2 +this would be +\begin{verbatim} +\glsxtrfieldlistgadd{bird}{record.section}{1.2} +\end{verbatim} +Note that there's no key corresponding to this new +\texttt{record.section} field, but its value can be +accessed with \cs{glsxtrfielduse} or the list can be +iterated over with \cs{glsxtrfielddolistloop} etc. + +\section{Display All Entries Without Sorting or Indexing} +\label{sec:printunsrt} + +\begin{definition}[\DescribeMacro\printunsrtglossary] +\cs{printunsrtglossary}\oarg{options} +\end{definition} +This behaves like \cs{printnoidxglossary} but never sorts the +entries and always lists all the defined entries for the given +glossary (and doesn't require \cs{makenoidxglossaries}). + +There's also a starred form +\begin{definition}[\DescribeMacro\printunsrtglossary*] +\cs{printunsrtglossary}*\oarg{options}\marg{code} +\end{definition} +which is equivalent to +\begin{alltt} +\cs{begingroup} + \meta{code}\cs{printunsrtglossary}\oarg{options}\% +\cs{endgroup} +\end{alltt} +Note that unlike \cs{glossarypreamble}, the supplied \meta{code} is +done before the glossary header. + +This means you now have the option to simply list all entries on the +first \LaTeX\ run without the need for a post-processor, however +there will be no \gls{numberlist} in this case, as that has to be +set by a post-processor such as \gls{bib2gls} (see +\sectionref{sec:bib2gls}). + +For example: +\begin{verbatim} +\documentclass{article} + +\usepackage{glossaries-extra} + +\newglossaryentry{zebra}{name={zebra},description={stripy animal}} +\newglossaryentry{ant}{name={ant},description={an insect}} + +\begin{document} +\gls{ant} and \gls{zebra} + +\printunsrtglossaries +\end{document} +\end{verbatim} +In the above, zebra will be listed before ant as it was defined +first. + +If you allow document definitions with the \pkgopt{docdefs} option, +the document will require a second \LaTeX\ run if the entries are +defined after \cs{printunsrtglossary}. + +The optional argument is as for \cs{printnoidxglossary} (except for +the \gloskey[printnoidxglossary]{sort} key, which isn't available). + +All glossaries may be displayed in the order of their definition +using: +\begin{definition}[\DescribeMacro\printunsrtglossaries] +\cs{printunsrtglossaries} +\end{definition} +which is analogous to \cs{printnoidxglossaries}. This just +iterates over all defined glossaries (that aren't on the ignored +list) and does \cs{printunsrtglossary}[type=\meta{type}]. + +The \cs{printunsrtglossary} command internally uses +\begin{definition}[\DescribeMacro\printunsrtglossaryhandler] +\cs{printunsrtglossaryhandler}\marg{label} +\end{definition} +for each item in the list, where \meta{label} is the current label. + +By default this just does +\begin{definition}[\DescribeMacro\glsxtrunsrtdo] +\cs{glsxtrunsrtdo}\marg{label} +\end{definition} +which determines whether to use \cs{glossentry} or +\cs{subglossentry} and checks the \gloskey{location} and +\gloskey{loclist} fields for the \gls{numberlist}. + +You can redefine the handler if required. + +\begin{important} +If you redefine the handler to exclude entries, you may end +up with an empty glossary. This could cause a problem for +the list-based styles. +\end{important} + +For example, if the preamble includes: +\begin{verbatim} +\usepackage[record,style=index]{glossaries-extra} +\GlsXtrRecordCounter{section} +\end{verbatim} +then you can print the glossary but first redefine the handler +to only select entries that include the current section number +in the \texttt{record.section} field: +\begin{verbatim} +\renewcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrfieldxifinlist{#1}{record.section}{\thesection} + {\glsxtrunsrtdo{#1}}% + {}% +} +\end{verbatim} + +Alternatively you can use the starred form of +\cs{printunsrtglossary} which will localise the change: + +\begin{verbatim} +\printunsrtglossary*{% + \renewcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrfieldxifinlist{#1}{record.section}{\thesection} + {\glsxtrunsrtdo{#1}}% + {}% + }% +} +\end{verbatim} + +If you are using the \sty{hyperref} package and want to +display the same glossary more than once, you can also +add a temporary redefinition of \cs{glolinkprefix} to +avoid duplicate hypertarget names. For example: + +\begin{verbatim} +\printunsrtglossary*{% + \renewcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrfieldxifinlist{#1}{record.section}{\thesection} + {\glsxtrunsrtdo{#1}}% + {}% + }% + \ifcsundef{theHsection}% + {% + \renewcommand*{\glolinkprefix}{record.#2.\csuse{thesection}.}% + }% + {% + \renewcommand*{\glolinkprefix}{record.#2.\csuse{theHsection}.}% + }% +} +\end{verbatim} +If it's a short summary at the start of a section, you might +also want to suppress the glossary header and add some vertical +space afterwards: +\begin{verbatim} +\printunsrtglossary*{% + \renewcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrfieldxifinlist{#1}{record.section}{\thesection} + {\glsxtrunsrtdo{#1}}% + {}% + }% + \ifcsundef{theHsection}% + {% + \renewcommand*{\glolinkprefix}{record.#2.\csuse{thesection}.}% + }% + {% + \renewcommand*{\glolinkprefix}{record.#2.\csuse{theHsection}.}% + }% + \renewcommand*{\glossarysection}[2][]{}% + \appto\glossarypostamble{\glspar\medskip\glspar}% +} +\end{verbatim} + +There's a shortcut command that does this: +\begin{definition}[\DescribeMacro\printunsrtglossaryunit] +\cs{printunsrtglossaryunit}\oarg{options}\marg{counter name} +\end{definition} +The above example can simply be replaced with: +\begin{verbatim} +\printunsrtglossaryunit{section} +\end{verbatim} + +This shortcut command is actually defined to use \cs{printunsrtglossary*} with +\begin{definition}[\DescribeMacro\printunsrtglossaryunitsetup] +\cs{printunsrtglossaryunitsetup}\marg{counter name} +\end{definition} +so if you want to just make some minor modifications you can +do +\begin{verbatim} +\printunsrtglossary*{\printunsrtglossaryunitsetup{section}% + \renewcommand*{\glossarysection}[2][]{\subsection*{Summary}}% +} +\end{verbatim} +which will start the list with a subsection header with the +title \qt{Summary} (overriding the glossary's title). + +Note that this shortcut command is only available with the +\pkgopt{record} (or \pkgopt[alsoindex]{record}) package option. + +This temporary change in the hypertarget prefix means you +need to explicitly use \cs{hyperlink} to create a link to it +as commands like \cs{gls} will try to link to the target +created with the default definition of \cs{gloslinkprefix}. +This isn't a problem if you want a primary glossary of all terms +produced using just \cs{printunsrtglossary} (in the front or back +matter) which can be the target for all glossary references +and then just use \cs{printunsrtglossaryunit} for a quick +summary at the start of a section etc. + +\section{Entry Aliases} +\label{sec:alias} + +An entry can be made an alias of another entry using the +\gloskey{alias} key. The value should be the label of the other +term. There's no check for the other's existence when the aliased +entry is defined. This is to allow the possibility of defining the +other entry after the aliased entry. (For example, when used with +\gls{bib2gls}.) + +If an entry \meta{entry-1} is made an alias of \meta{entry-2} then: +\begin{itemize} +\item If the \gloskey{see} field wasn't provided when \meta{entry-1} +was defined, the \gloskey{alias} key will automatically trigger +\begin{alltt} +\cs{glssee}\marg{entry-1}\marg{entry-2} +\end{alltt} +\item If the \sty{hyperref} package has been loaded then +\cs{gls}\marg{entry-1} will link to \meta{entry-2}'s target. (Unless +the \catattr{targeturl} attribute has been set for \meta{entry-1}'s +category.) +\item The \gloskey[glslink]{noindex} setting will automatically be triggered +when referencing \meta{entry-1} with commands like \cs{gls} or +\cs{glstext}. This prevents \meta{entry-1} from have a +\gls{locationlist} (aside from the cross-reference added with +\cs{glssee}) unless it's been explicitly indexed with \cs{glsadd} or +if the indexing has been explicitly set using +\texttt{noindex=false}. +\end{itemize} + +The index suppression trigger is performed by +\begin{definition}[\DescribeMacro\glsxtrsetaliasnoindex] +\cs{glsxtrsetaliasnoindex} +\end{definition} +This is performed after the default options provided by +\ics{GlsXtrSetDefaultGlsOpts} have been set. + +Within the definition of \cs{glsxtrsetaliasnoindex} you can use +\begin{definition}[\DescribeMacro\glsxtrindexaliased] +\cs{glsxtrindexaliased} +\end{definition} +to index \meta{entry-2}. + +The index suppression command can be redefined to index the main +term instead. For example: +\begin{verbatim} +\renewcommand{\glsxtrsetaliasnoindex}{% + \glsxtrindexaliased + \setkeys{glslink}{noindex}% +} +\end{verbatim} + +The value of the \gloskey{alias} field can be accessed using +\begin{definition}[\DescribeMacro\glsxtralias] +\cs{glsxtralias}\marg{label} +\end{definition} \chapter{Supplemental Packages} \label{sec:supplemental} @@ -5105,6 +6075,12 @@ and \cs{printnoidxglossary}. to allow for entries that should link to an external URL rather than to an internal glossary. +\item[sample-fmt.tex] Provides text-block commands associated +with entries in order to use \cs{glsxtrfmt}. + +\item[sample-alias.tex] Uses the \gloskey{alias} key. +(See \sectionref{sec:alias}.) + \item[sample-alttree.tex] Uses the \sty{glossaries-extra-stylemods} package with the \glostyle{alttree} style (see \sectionref{sec:stylemods}). diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.pdf index 39be8e42be5..e4122bdfb5e 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.pdf index 6e8c82ed99a..2ddb9aaf13b 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym-desc.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym-desc.pdf index 0fd6d56a88f..7d1d2f6f473 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym-desc.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym-desc.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.pdf index 93d87d39ee6..a86e446c9e8 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.pdf new file mode 100644 index 00000000000..5fbc0ca9469 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.tex new file mode 100644 index 00000000000..b6d0f8fa692 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.tex @@ -0,0 +1,37 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\newglossaryentry{numberlist}{name={number list}, + description={\nopostdesc}, + alias={locationlist}} + +\newglossaryentry{locationlist}{name={location list}, + description={list of locations} +} + +\renewcommand{\glsxtrsetaliasnoindex}{% + \ifglshasfield{alias}{\glslabel}% + {% + \setkeys{glslink}{noindex}% + \glsxtrindexaliased + }% + {}% +} + +\begin{document} + +\gls{numberlist} or \gls{locationlist}. + +\newpage +\gls{numberlist} + +\newpage +\printglossaries +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.pdf index 4f89fd5bc33..22f91dc2610 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree-marginpar.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree-marginpar.pdf index b8cca03f7d5..333f1b4cb00 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree-marginpar.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree-marginpar.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree-sym.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree-sym.pdf index b5098e07358..c8247c5f61e 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree-sym.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree-sym.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree.pdf index 0322dd44949..5b40b2cf978 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alttree.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex-hyp.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex-hyp.pdf index fb9f445d3bd..cb6d6fd14d4 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex-hyp.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex-hyp.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.pdf index e68420954db..a3b4351441e 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.pdf index 99d4b2c44c8..c2f80c1a75f 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref2.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref2.pdf index bfcaa815b18..2920952946b 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref2.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref2.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.pdf index a23225f14cb..61e024c27f3 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.pdf index 637c34555ca..2ef7efda58a 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-external.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-external.pdf index 1189b569be3..3e385a94b29 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-external.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-external.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.pdf new file mode 100644 index 00000000000..f7508273bc5 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.tex new file mode 100644 index 00000000000..2c96d8a1fb9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.tex @@ -0,0 +1,58 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[T1]{fontenc} +\usepackage{amsmath} +\usepackage[colorlinks]{hyperref} +\usepackage[postdot,style=index]{glossaries-extra} + +\makeglossaries + +\newcommand*{\mtx}[1]{\boldsymbol{#1}} +\newcommand*{\mtxinv}[1]{\mtx{#1}\sp{-1}} + +\newglossaryentry{matrix}{% + name={matrix}, + symbol={\ensuremath{\mtx{M}}}, + plural={matrices}, + user1={mtx}, + description={rectangular array of values} +} + +\newglossaryentry{identitymatrix}{% + name={identity matrix}, + symbol={\ensuremath{\mtx{I}}}, + plural={identity matrices}, + description={a diagonal matrix with all diagonal elements equal to +1 and all other elements equal to 0} +} + +\newglossaryentry{matrixinv}{% + name={matrix inverse}, + symbol={\ensuremath{\mtxinv{M}}}, + user1={mtxinv}, + description={a square \gls{matrix} such that + $\mtx{M}\mtxinv{M}=\glssymbol{identitymatrix}$} +} + +\renewcommand{\GlsXtrFmtDefaultOptions}{hyper=false,noindex} + +\begin{document} +A \gls{matrix} is denoted \glssymbol{matrix}. +The inverse is denoted \glssymbol{matrixinv}. + +\newpage + +\[ + \glsxtrfmt{matrix}{A} + \glsxtrfmt{matrixinv}{A} + = + \glssymbol{identitymatrix} +\] + +\newpage + +\printglossaries +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.pdf index c4751858562..a9765934279 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.pdf index 3a420d91580..6b07508e2a5 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.pdf index ae4afe578ef..6e45aa3d513 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.pdf index cb4f0d80db9..9c215130fae 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixed-abbrv-styles.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixed-abbrv-styles.pdf index 4aab1eb0e16..6df03557702 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixed-abbrv-styles.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixed-abbrv-styles.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixedsort.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixedsort.pdf index 1fb0b238778..279a3fa5486 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixedsort.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixedsort.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.pdf index de31fadeb93..3907b63f777 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-name-font.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-name-font.pdf index 68aac107ec0..2a0068091f4 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-name-font.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-name-font.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.pdf index f02682fa57b..cf7b3653c97 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-noidx-restricteddocdefs.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-noidx-restricteddocdefs.pdf index c3baccbea1a..0607bd39c9e 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-noidx-restricteddocdefs.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-noidx-restricteddocdefs.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.pdf index 6eb0437709b..053b518d3e3 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.pdf index 860c1defd1e..b6571e332ed 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.pdf index fa896e06b1d..d72c3fcf0f7 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.pdf index dfe8d06dcbc..67c2deb262c 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-pages.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-pages.pdf index 5dbc6630348..3e2f8d8d08d 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-pages.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-pages.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.pdf index dd53c2bf325..1dd9af40d8c 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.pdf index 32a659466f1..ad50ddd937c 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.pdf index 17d6f0100da..b7887bd5eca 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.pdf index 64e1dab7930..23df5f0a2c8 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.tex index f480e816510..2639da2e3d4 100644 --- a/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.tex +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.tex @@ -3,21 +3,38 @@ \documentclass{article} \usepackage[colorlinks]{hyperref} -\usepackage[record]{glossaries-extra} +\usepackage[record,style=index]{glossaries-extra} + % Use \loadglsentries (or \input) for .tex files: % \loadglsentries{example-glossaries-brief} -% Use \glsxtrresourcefile for .glstex files: -\glsxtrresourcefile{sample-resource} +% Use \glsxtrresourcefile or \GlsXtrLoadResources for .glstex files: + +%\GlsXtrLoadResources % loads \jobname.glstex +\glsxtrresourcefile{sample-resource}% loads sample-resource.glstex + +\GlsXtrRecordCounter{section} \begin{document} -\glspl{lorem}, \gls{dolor}, \gls{amet}. +\section{Sample Section} +\printunsrtglossaryunit{section} +% or: +%\printunsrtglossary*{\printunsrtglossaryunitsetup{section}% +% \renewcommand*{\glossarysection}[2][]{\subsection*{Summary}}% +%} + +\gls{dolor}, \gls{amet}. See \url{https://github.com/nlct/bib2gls} for converting .bib to .glstex files. +\section{Another Section} +\printunsrtglossaryunit{section} + +\glspl{lorem}, \gls{amet}. + \printunsrtglossary \end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-restricteddocdefs.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-restricteddocdefs.pdf index ce136852e29..5357ada51b5 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-restricteddocdefs.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-restricteddocdefs.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.pdf index f00a9dabc4c..aa635808784 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.pdf index d13cb3ee6f0..2a2863d8649 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.pdf index 6362eb199e4..da3ca8c041c 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample.pdf index e07214bf4f7..258e3bf3fd3 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample.pdf differ diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx index 4356869f109..890b246d395 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx @@ -4,11 +4,11 @@ % -section "chapter" % -src "glossaries-extra.sty\Z=>glossaries-extra.sty" % -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty" -% -doc "glossaries-extra-codedoc.tex" % -author "Nicola Talbot" % -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" +% -doc "glossaries-extra-codedoc.tex" % glossaries-extra -% Created on 2017/1/19 14:10 +% Created on 2017/2/3 20:32 %\fi %\iffalse %<*package> @@ -118,7 +118,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{10304} +\CheckSum{11390} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -154,13 +154,13 @@ styles (glossaries):>#1={\protect\ttfamily#1}|main}} \raggedright } -\title{glossaries-extra.sty v1.11: +\title{glossaries-extra.sty v1.12: documented code} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} -\date{2017-01-19} +\date{2017-02-03} \begin{document} \DocInput{glossaries-extra.dtx} @@ -205,7 +205,7 @@ Dickimaw Books\\ %\section{Package Initialisation and Options} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2017/01/19 v1.11 (NLCT)] +\ProvidesPackage{glossaries-extra}[2017/02/03 v1.12 (NLCT)] % \end{macrocode} % Requires \sty{xkeyval} to define package options. % \begin{macrocode} @@ -425,14 +425,45 @@ Dickimaw Books\\ \protected@write\@auxout{}{\string\glsxtr@record {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% {\@glslocref}}% + \@glsxtr@counterrecordhook } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtr@record} -%\changes{1.08}{2016-12-13}{new} +%\begin{macro}{\@@glsxtr@recordcounter} +%\changes{1.12}{2017-02-03}{new} % \begin{macrocode} -\newcommand*{\glsxtr@record}[5]{} +\newcommand*{\@@glsxtr@recordcounter}{% + \@glsxtr@noop@recordcounter +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@noop@recordcounter} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@noop@recordcounter}[1]{% + \PackageError{glossaries-extra}{\string\GlsXtrRecordCounter\space + requires record=only or record=alsoindex package option}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@op@recordcounter} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@op@recordcounter}[1]{% + \eappto\@glsxtr@counterrecordhook{\noexpand\@glsxtr@docounterrecord{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\printunsrtglossaryunit} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\printunsrtglossaryunit}{% + \print@noop@unsrtglossaryunit +} % \end{macrocode} %\end{macro} % @@ -525,6 +556,8 @@ Dickimaw Books\\ \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter \let\glsxtrundefaction\@glsxtr@err@undefaction \let\glsxtr@warnonexistsordo\@gobble + \let\@@glsxtr@recordcounter\@glsxtr@noop@recordcounter + \def\printunsrtglossaryunit{\print@noop@unsrtglossaryunit}% }% \or % \end{macrocode} @@ -537,6 +570,9 @@ Dickimaw Books\\ \let\glsxtrundefaction\@glsxtr@warn@undefaction \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo \glsxtr@addloclistfield + \renewcommand*{\@glsxtr@autoindexcrossrefs}{}% + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% }% \or % \end{macrocode} @@ -549,6 +585,8 @@ Dickimaw Books\\ \let\glsxtrundefaction\@glsxtr@warn@undefaction \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo \glsxtr@addloclistfield + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% }% \fi } @@ -666,6 +704,16 @@ Dickimaw Books\\ } % \end{macrocode} % +%\begin{option}{postdot} +%Shortcut for \pkgopt[false]{nopostdot} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\@glsxtr@declareoption{postdot}{% + \glsxtr@dooption{nopostdot=false}% +} +% \end{macrocode} +%\end{option} +% %\begin{macro}{\glsxtrabbrvtype} % Glossary type for abbreviations. % \begin{macrocode} @@ -1066,78 +1114,734 @@ Dickimaw Books\\ % glossary exists and is empty. (It's initialised to a comma.) %\changes{0.4}{2015-12-03}{new} % \begin{macrocode} -\newcommand{\glsxtrifemptyglossary}[3]{% - \ifglossaryexists{#1}% +\newcommand{\glsxtrifemptyglossary}[3]{% + \ifcsdef{glolist@#1}% + {% + \ifcsstring{glolist@#1}{,}{#2}{#3}% + }% + {% + \glsxtrundefaction{Glossary type `#1' doesn't exist}{}% + #2% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifkeydefined} +%\changes{1.12}{2017-02-03}{new} +%Tests if the key given in the first argument has been defined. +% \begin{macrocode} +\newcommand*{\glsxtrifkeydefined}[3]{% + \key@ifundefined{glossentry}{#1}{#3}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrprovidestoragekey} +%\changes{1.12}{2017-02-03}{new} +%Like \cs{glsaddstoragekey} but does nothing if the key has already +%been defined. +% \begin{macrocode} +\newcommand*{\glsxtrprovidestoragekey}{% + \@ifstar\@sglsxtr@provide@storagekey\@glsxtr@provide@storagekey +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@provide@storagekey} +%\changes{1.12}{2017-02-03}{new} +%Unstarred version. +% \begin{macrocode} +\newcommand*{\@glsxtr@provide@storagekey}[3]{% + \key@ifundefined{glossentry}{#1}% + {% + \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}% + \appto\@gls@keymap{,{#1}{#1}}% + \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}% + \appto\@newglossaryentryposthook{% + \letcs{\@glo@tmp}{@glo@#1}% + \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}% + }% +% \end{macrocode} +%Allow the user to omit the user level command if they only +%intended fetching the value with \cs{glsxtrusefield} +% \begin{macrocode} + \ifblank{#3} + {}% + {% + \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + }% + }% + {% +% \end{macrocode} +%Provide the no-link command if not already defined. +% \begin{macrocode} + \ifblank{#3} + {}% + {% + \providecommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\s@glsxtr@provide@storagekey} +%\changes{1.12}{2017-02-03}{new} +%Starred version. +% \begin{macrocode} +\newcommand*{\s@glsxtr@provide@storagekey}[1]{% + \key@ifundefined{glossentry}{#1}% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname gls@assign@#1@field\endcsname}[2]{% + \@@gls@expand@field{##1}{#1}{##2}% + }% + }% + {}% + \@glsxtr@provide@addstoragekey{#1}% +} +% \end{macrocode} +%\end{macro} +% +%The name of a text-block control sequence can be stored in a +%field (given by \cs{GlsXtrFmtField}). This command can then be used +%with \cs{glsxtrfmt}\oarg{options}\marg{label}\marg{text} which +%effectively does +%\cs{glslink}\oarg{options}\marg{label}\{\meta{cs}\marg{text}\} +%If the field hasn't been set for that entry just \meta{text} is +%done. +% +%\begin{macro}{\GlsXtrFmtField} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\GlsXtrFmtField}{useri} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrFmtDefaultOptions} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\GlsXtrFmtDefaultOptions}{noindex} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfmt} +%\changes{1.12}{2017-02-03}{new} +%The post-link hook isn't done. +% \begin{macrocode} +\newrobustcmd*{\glsxtrfmt}[3][]{% + \glsdoifexistsordo{#2}% + {% + \ifglshasfield{\GlsXtrFmtField}{#2}% + {% + \let\do@gls@link@checkfirsthyper\relax + \expandafter\@gls@link\expandafter[\GlsXtrFmtDefaultOptions,#1]{#2}% + {\csuse{\glscurrentfieldvalue}{#3}}% + }% + {#3}% + }% + {#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrentryfmt} +%\changes{1.12}{2017-02-03}{new} +%No link or indexing. +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\glsxtrentryfmt}[2]{% + \texorpdfstring{\@glsxtrentryfmt{#1}{#2}}{#2}% + } +} +{ + \newcommand*{\glsxtrentryfmt}{\@glsxtrentryfmt} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrentryfmt} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newrobustcmd*{\@glsxtrentryfmt}[2]{% + \glsdoifexistsordo + {% + \ifglshasfield{\GlsXtrFmtField}{#1}% + {% + \csuse{\glscurrentfieldvalue}{#2}% + }% + {#2}% + }% + {#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldlistadd} +%\changes{1.12}{2017-02-03}{new} +%If a field stores an etoolbox internal list (e.g. +%\gloskey{loclist}) then this macro provides a convenient +%way of adding to the list via etoolbox's \cs{listcsadd}. +%The first argument is the entry's label, the second is the field +%label and the third is the element to add to the list. +% \begin{macrocode} +\newcommand*{\glsxtrfieldlistadd}[3]{% + \listcsadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldlistgadd} +%\changes{1.12}{2017-02-03}{new} +%Similarly but uses \cs{listcsgadd}. +% \begin{macrocode} +\newcommand*{\glsxtrfieldlistgadd}[3]{% + \listcsgadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldlisteadd} +%\changes{1.12}{2017-02-03}{new} +%Similarly but uses \cs{listcseadd}. +% \begin{macrocode} +\newcommand*{\glsxtrfieldlisteadd}[3]{% + \listcseadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldlistxadd} +%Similarly but uses \cs{listcsxadd}. +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfieldlistxadd}[3]{% + \listcsxadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%Now provide commands to iterate over these lists. +%\begin{macro}{\glsxtrfielddolistloop} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfielddolistloop}[2]{% + \dolistcsloop{glo@\glsdetoklabel{#1}@#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldforlistloop} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfieldforlistloop}[3]{% + \forlistcsloop{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%List element tests: +%\begin{macro}{\glsxtrfieldifinlist} +%\changes{1.12}{2017-02-03}{new} +%First argument label, second argument field, third argument item, +%fourth true part and fifth false part. +% \begin{macrocode} +\newcommand*{\glsxtrfieldifinlist}[5]{% + \ifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldxifinlist} +%\changes{1.12}{2017-02-03}{new} +%Expands item. +% \begin{macrocode} +\newcommand*{\glsxtrfieldxifinlist}[5]{% + \xifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrusefield} +%\changes{1.12}{2017-02-03}{new} +%Provide a user-level alternative to \cs{@gls@entry@field}. +%The first argument is the entry label. The second argument is the +%field label. +% \begin{macrocode} +\newcommand*{\glsxtrusefield}[2]{% + \@gls@entry@field{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrusefield} +%\changes{1.12}{2017-02-03}{new} +%Provide a user-level alternative to \cs{@Gls@entry@field}. +% \begin{macrocode} +\newcommand*{\Glsxtrusefield}[2]{% + \@gls@entry@field{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdeffield} +%\changes{1.12}{2017-02-03}{new} +%Just use \cs{csdef} to provide a field value for the given entry. +% \begin{macrocode} +\newcommand*{\glsxtrdeffield}[2]{\csdef{glo@\glsdetoklabel{#1}@#2}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtredeffield} +%\changes{1.12}{2017-02-03}{new} +%Just use \cs{csedef} to provide a field value for the given entry. +% \begin{macrocode} +\newcommand*{\glsxtredeffield}[2]{\csedef{glo@\glsdetoklabel{#1}@#2}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrsetfieldifexists} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrsetfieldifexists}[3]{\glsdoifexists{#1}{#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetField} +%\changes{1.12}{2017-02-03}{new} +%Allow the user to set a field. First argument entry label, second +%argument field label, third argument value. +% \begin{macrocode} +\newrobustcmd*{\GlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrLetField} +%\changes{1.12}{2017-02-03}{new} +%Uses \cs{cslet} instead. Third argument should be a macro. +% \begin{macrocode} +\newrobustcmd*{\GlstrLetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\cslet{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\csGlsXtrLetField} +%\changes{1.12}{2017-02-03}{new} +%Uses \cs{csletcs} instead. Third argument should be a control +%sequence name. +% \begin{macrocode} +\newrobustcmd*{\csGlsXtrLetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csletcs{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrLetFieldToField} +%\changes{1.12}{2017-02-03}{new} +%Sets the field for one entry to the field for another entry. +%Third argument should be the other entry +%and the fourth argument that other field label. +% \begin{macrocode} +\newrobustcmd*{\GlsXtrLetFieldToField}[4]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csletcs{glo@\glsdetoklabel{#1}@#2}{glo@\glsdetoklabel{#3}@#4}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\gGlsXtrSetField} +%\changes{1.12}{2017-02-03}{new} +%Allow the user to set a field. First argument entry label, second +%argument field label, third argument value. +% \begin{macrocode} +\newrobustcmd*{\gGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csgdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\xGlsXtrSetField} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newrobustcmd*{\xGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\protected@csxdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\eGlsXtrSetField} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newrobustcmd*{\eGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\protected@csedef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpageref} +% Like \cs{glsrefentry} but references the page number instead (if +% entry counting is on). +% \begin{macrocode} +\ifglsentrycounter + \newcommand*{\glsxtrpageref}[1]{\pageref{glsentry-\glsdetoklabel{#1}}} +\else + \ifglssubentrycounter + \newcommand*{\glsxtrpageref}[1]{\pageref{glsentry-\glsdetoklabel{#1}}} + \else + \newcommand*{\glsxtrpageref}[1]{\gls{#1}} + \fi +\fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\apptoglossarypreamble} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\apptoglossarypreamble}[2][\glsdefaulttype]{% + \ifcsdef{glolist@#1}% + {% + \ifcsundef{@glossarypreamble@#1}% + {\csdef{@glossarypreamble@#1}{}}% + {}% + \csappto{@glossarypreamble@#1}{#2}% + }% + {% + \GlossariesExtraWarning{Glossary `#1' is not defined}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\pretoglossarypreamble} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\preglossarypreamble}[2][\glsdefaulttype]{% + \ifcsdef{glolist@#1}% + {% + \ifcsundef{@glossarypreamble@#1}% + {\csdef{@glossarypreamble@#1}{}}% + {}% + \cspreto{@glossarypreamble@#1}{#2}% + }% + {% + \GlossariesExtraWarning{Glossary `#1' is not defined}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\section{Modifications to Commands Provided by \styfmt{glossaries}} +% Some of the commands provided by \styfmt{glossaries} are modified +% to take into account new options or to change default behaviour. +%\begin{macro}{\glsxtralias} +%\changes{1.12}{2017-02-03}{new} +%Provide a key to allow aliases to be defined. The key should +%be set to the label of the synonymous entry. +% \begin{macrocode} +\glsaddstoragekey*{alias}{}{\glsxtralias} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@newglossaryentryposthook} +%\changes{1.12}{2017-02-03}{added check for alias key} +%Append to the hook to check for the \gloskey{alias} key. +% \begin{macrocode} +\appto\@newglossaryentryposthook{% + \ifcsvoid{glo@\@glo@label @alias}{}% + {% +% \end{macrocode} +%Add cross-reference if see key hasn't been used. +% \begin{macrocode} + \ifdefvoid\@glo@see + {% + \edef\@do@glssee{\noexpand\glssee + {\@glo@label}{\csuse{glo@\@glo@label @alias}}}% + \@do@glssee + }% + {}% + }% +} +% \end{macrocode} +%\end{macro} +% +%Provide a starred version of \cs{longnewglossaryentry} that doesn't +%automatically insert \verb|\leavevmode\unskip\nopostdesc| at the +%end of the description. The unstarred version is modified to use +%\cs{glsxtrpostlongdescription} instead. +% +%\begin{macro}{\longnewglossaryentry} +%\changes{1.12}{2017-02-03}{added starred version} +% \begin{macrocode} +\renewcommand*{\longnewglossaryentry}{% + \@ifstar\@glsxtr@s@longnewglossaryentry\@glsxtr@longnewglossaryentry +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@s@longnewglossaryentry} +%\changes{1.12}{2017-02-03}{new} +%Starred version. +% \begin{macrocode} +\newcommand{\@glsxtr@s@longnewglossaryentry}[3]{% + \glsdoifnoexists{#1}% + {% + \bgroup + \let\@org@newglossaryentryprehook\@newglossaryentryprehook + \long\def\@newglossaryentryprehook{% + \long\def\@glo@desc{#3}% + \@org@newglossaryentryprehook + }% + \renewcommand*{\gls@assign@desc}[1]{% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}% + } + \gls@defglossaryentry{#1}{#2}% + \egroup + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@longnewglossaryentry} +%\changes{1.12}{2017-02-03}{new} +%Unstarred version. +% \begin{macrocode} +\newcommand{\@glsxtr@longnewglossaryentry}[3]{% + \glsdoifnoexists{#1}% + {% + \bgroup + \let\@org@newglossaryentryprehook\@newglossaryentryprehook + \long\def\@newglossaryentryprehook{% + \long\def\@glo@desc{#3\glsxtrpostlongdescription}% + \@org@newglossaryentryprehook + }% + \renewcommand*{\gls@assign@desc}[1]{% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% +% \end{macrocode} +%The following is different from the base \sty{glossaries.sty}: +% \begin{macrocode} + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}% + } + \gls@defglossaryentry{#1}{#2}% + \egroup + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostlongdescription} +%\changes{1.12}{2017-02-03}{new} +%Hook at the end of the description when using the unstarred +%\cs{longnewglossaryentry}. +% \begin{macrocode} +\newcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip\nopostdesc} +% \end{macrocode} +%\end{macro} +% +%Provide a starred version of \cs{newignoredglossary} that doesn't +%add the glossary to the nohyperlist list. +% +%\begin{macro}{\newignoredglossary} +%\changes{1.11}{2017-01-19}{added starred version} +%Redefine to check for star. +% \begin{macrocode} +\renewcommand{\newignoredglossary}{% + \@ifstar\glsxtr@s@newignoredglossary\glsxtr@org@newignoredglossary +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@org@newignoredglossary} +%The original definition is patched to check for existence. +%\changes{1.11}{2017-01-19}{new} +%\changes{1.12}{2017-02-03}{Added check for existence} +% \begin{macrocode} +\newcommand*{\glsxtr@org@newignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + }% + {% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \eappto\@gls@nohyperlist{,#1}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@s@newignoredglossary} +%Starred form. +%\changes{1.11}{2017-01-19}{new} +%\changes{1.12}{2017-02-03}{Added check for existence} +% \begin{macrocode} +\newcommand*{\glsxtr@s@newignoredglossary}[1]{% + \ifcsdef{glolist@#1} {% - \ifcsstring{glolist@#1}{,}{#2}{#3}% + \glsxtrundefaction{Glossary type `#1' already exists}{}% }% {% - \glsxtrundefaction{Glossary type `#1' doesn't exist}{}% - #2% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrpageref} -% Like \cs{glsrefentry} but references the page number instead (if -% entry counting is on). +%\begin{macro}{\glssettoctitle} +%\changes{1.12}{2017-02-03}{added patch} +%Ignored glossaries don't have an associated title, so modify +%\cs{glssettoctitle} to check for it to prevent an undefined +%command written to the toc file. % \begin{macrocode} -\ifglsentrycounter - \newcommand*{\glsxtrpageref}[1]{\pageref{glsentry-\glsdetoklabel{#1}}} -\else - \ifglssubentrycounter - \newcommand*{\glsxtrpageref}[1]{\pageref{glsentry-\glsdetoklabel{#1}}} - \else - \newcommand*{\glsxtrpageref}[1]{\gls{#1}} - \fi -\fi +\glsifusetranslator +{% + \renewcommand*{\glssettoctitle}[1]{% + \ifcsdef{gls@tr@set@#1@toctitle}% + {% + \csuse{gls@tr@set@#1@toctitle}% + }% + {% + \ifcsdef{@glotype@#1@title}% + {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}% + {\def\glossarytoctitle{\glossarytitle}}% + }% + }% +} +{ + \renewcommand*{\glssettoctitle}[1]{% + \ifcsdef{@glotype@#1@title}% + {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}% + {\def\glossarytoctitle{\glossarytitle}}% + } +} % \end{macrocode} %\end{macro} % -%\section{Modifications to Commands Provided by \styfmt{glossaries}} -% Some of the commands provided by \styfmt{glossaries} are modified -% to take into account new options or to change default behaviour. -% -%Provide a starred version of \cs{newignoredglossary} that doesn't -%add the glossary to the nohyperlist list. -% -%\begin{macro}{\glsxtr@org@newignoredglossary} -%Save the original definition. -%\changes{1.11}{2017-01-19}{new} +%\begin{macro}{\provideignoredglossary} +%\changes{1.12}{2017-02-03}{new} +%As above but won't do anything if the glossary already exists. % \begin{macrocode} -\let\glsxtr@org@newignoredglossary\newignoredglossary +\newcommand{\provideignoredglossary}{% + \@ifstar\glsxtr@s@provideignoredglossary\glsxtr@provideignoredglossary +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtr@s@newignoredglossary} -%Starred form. -%\changes{1.11}{2017-01-19}{new} +%\begin{macro}{\glsxtr@provideignoredglossary} +%\changes{1.12}{2017-02-03}{new} +%Unstarred version. % \begin{macrocode} -\newcommand*{\glsxtr@s@newignoredglossary}[1]{% - \ifdefempty\@ignored@glossaries - {% - \edef\@ignored@glossaries{#1}% - }% +\newcommand*{\glsxtr@provideignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {}% {% - \eappto\@ignored@glossaries{,#1}% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \eappto\@gls@nohyperlist{,#1}% + }% }% - \csgdef{glolist@#1}{,}% - \ifcsundef{gls@#1@entryfmt}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@s@provideignoredglossary} +%Starred form. +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@s@provideignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {}% {% - \defglsentryfmt[#1]{\glsentryfmt}% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% }% - {}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\newignoredglossary} -%\changes{1.11}{2017-01-19}{added starred version} -%Redefine to check for star. +%\begin{macro}{\glsxtrcopytoglossary} +%Adds an entry label to another glossary list. First argument is +%entry label. Second argument is glossary label. +%\changes{1.12}{2017-02-03}{new} % \begin{macrocode} -\renewcommand{\newignoredglossary}{% - \@ifstar\glsxtr@s@newignoredglossary\glsxtr@org@newignoredglossary +\newcommand*{\glsxtrcopytoglossary}[2]{% + \glsdoifexists{#1}% + {% + \ifcsdef{glolist@#2} + {% + \cseappto{glolist@#2}{#1,}% + }% + {% + \glsxtrundefaction{Glossary type `#2' doesn't exist}{}% + }% + }% } % \end{macrocode} %\end{macro} @@ -3272,6 +3976,7 @@ Dickimaw Books\\ { \renewcommand*{\@gls@setdefault@glslink@opts}{% \KV@glslink@noindexfalse + \@glsxtrsetaliasnoindex } } { @@ -3281,18 +3986,85 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\@gls@setdefault@glslink@opts}{% \KV@glslink@noindexfalse + \@glsxtrsetaliasnoindex } \preto\do@glsdisablehyperinlist{\@gls@setdefault@glslink@opts} } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrsetaliasnoindex} +%\changes{1.12}{2017-02-03}{new} +%Allow user to hook into the alias noindex setting. +%Default behaviour switches off indexing for aliases. +% \begin{macrocode} +\newcommand*{\glsxtrsetaliasnoindex}{% + \KV@glslink@noindextrue +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrsetaliasnoindex} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\@glsxtrsetaliasnoindex}{% + \ifglshasfield{alias}{\glslabel}% + {% + \let\glsxtrindexaliased\@glsxtrindexaliased + \glsxtrsetaliasnoindex + \let\glsxtrindexaliased\@no@glsxtrindexaliased + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrindexaliased} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\@glsxtrindexaliased}{% + \ifKV@glslink@noindex + \else + \begingroup + \def\@glsnumberformat{glsnumberformat}% + \edef\@gls@counter{\csname glo@\glsdetoklabel{\glslabel}@counter\endcsname}% + \glsxtr@saveentrycounter + \@@do@wrglossary{\glsxtralias{\glslabel}}% + \endgroup + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@no@glsxtrindexaliased} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\@no@glsxtrindexaliased}{% + \PackageError{glossaries-extra}{\string\glsxtrindexaliased\space + not permitted outside definition of \string\glsxtrsetaliasnoindex}% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrindexaliased} +%\changes{1.12}{2017-02-03}{new} +%Provide a command to redirect alias indexing, but only allow it to +%be used within \cs{glsxtrsetaliasnoindex}. +% \begin{macrocode} +\let\glsxtrindexaliased\@no@glsxtrindexaliased +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsXtrSetDefaultGlsOpts} %\changes{0.5.4}{2015-12-15}{new} % Set the default options for \cs{glslink} etc. % \begin{macrocode} \newcommand*{\GlsXtrSetDefaultGlsOpts}[1]{% - \renewcommand*{\@gls@setdefault@glslink@opts}{\setkeys{glslink}{#1}}% + \renewcommand*{\@gls@setdefault@glslink@opts}{% + \setkeys{glslink}{#1}% + \@glsxtrsetaliasnoindex + }% } % \end{macrocode} %\end{macro} @@ -3463,14 +4235,28 @@ Dickimaw Books\\ }% }% {% - \hyperlink{#1}{{\glsxtrprotectlinks#2}}% +% \end{macrocode} +%Check for alias. +%\changes{1.12}{2017-02-03}{added check for alias field} +% \begin{macrocode} + \glsfieldfetch{\glslabel}{alias}{\gloaliaslabel}% + \ifdefvoid\gloaliaslabel + {% + \hyperlink{#1}{{\glsxtrprotectlinks#2}}% + }% + {% +% \end{macrocode} +%Redirect link to the alias target. +% \begin{macrocode} + \hyperlink + {\glolinkprefix\glsdetoklabel{\gloaliaslabel}}% + {{\glsxtrprotectlinks#2}}% + }% }% } % \end{macrocode} %\end{macro} % -% -% %\begin{macro}{\glsdisablehyper} %\changes{0.5.4}{2015-12-15}{added} % Redefine in case we have an old version of \styfmt{glossaries}. @@ -5070,7 +5856,7 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\MakeAcronymsAbbreviations}{% \renewcommand*{\newacronym}[4][]{% - \newabbreviation[type=\acronymtype,category=acronym,##1]{##2}{##3}{##4}% + \glsxtr@newabbreviation{type=\acronymtype,category=acronym,##1}{##2}{##3}{##4}% }% \renewcommand*{\firstacronymfont}[1]{\glsfirstabbrvfont{##1}}% \renewcommand*{\acronymfont}[1]{\glsabbrvfont{##1}}% @@ -5354,9 +6140,66 @@ Dickimaw Books\\ %to pick up the glossary type. % %\begin{macro}{\@glsxtr@orgprintglossary} -%Save original definition (also needed for the on-the-fly macro). -% \begin{macrocode} -\let\@glsxtr@orgprintglossary\@printglossary +%This no longer simply saves \cs{@printglossary} with \cs{let} is actually defined +%to check for the existence of the title, since ignored +%glossaries don't have a title assigned. (bib2gls writes +%\cs{provideignoredglossary} to the glstex file for some settings, +%so the glossary might not have been defined.) +%(This command is also used for on-the-fly setting.) +% \begin{macrocode} +\newcommand{\@glsxtr@orgprintglossary}[2]{% + \def\@glo@type{\glsdefaulttype}% +% \end{macrocode} +%Add check here. +% \begin{macrocode} + \def\glossarytitle{% + \ifcsdef{@glotype@\@glo@type @title}% + {\csuse{@glotype@\@glo@type @title}}% + {\glossaryname}}% + \def\glossarytoctitle{\glossarytitle}% + \let\org@glossarytitle\glossarytitle + \def\@glossarystyle{% + \ifx\@glossary@default@style\relax + \GlossariesWarning{No default glossary style provided \MessageBreak + for the glossary `\@glo@type'. \MessageBreak + Using deprecated fallback. \MessageBreak + To fix this set the style with \MessageBreak + \string\setglossarystyle\space or use the \MessageBreak + style key=value option}% + \fi + }% + \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% + \let\@org@glossaryentrynumbers\glossaryentrynumbers + \bgroup + \@printgloss@setsort + \setkeys{printgloss}{#1}% + \ifx\glossarytitle\org@glossarytitle + \else + \cslet{@glotype@\@glo@type @title}{\glossarytitle}% + \fi + \let\currentglossary\@glo@type + \let\org@glossaryentrynumbers\glossaryentrynumbers + \let\glsnonextpages\@glsnonextpages + \let\glsnextpages\@glsnextpages + \let\nopostdesc\@nopostdesc + \gls@dotoctitle + \@glossarystyle + \let\gls@org@glossaryentryfield\glossentry + \let\gls@org@glossarysubentryfield\subglossentry + \renewcommand{\glossentry}[1]{% + \xdef\glscurrententrylabel{\glsdetoklabel{##1}}% + \gls@org@glossaryentryfield{##1}% + }% + \renewcommand{\subglossentry}[2]{% + \xdef\glscurrententrylabel{\glsdetoklabel{##2}}% + \gls@org@glossarysubentryfield{##1}{##2}% + }% + \@gls@preglossaryhook + #2% + \egroup + \global\let\glossaryentrynumbers\@org@glossaryentrynumbers + \global\let\warn@noprintglossary\relax +} % \end{macrocode} %\end{macro} % @@ -5371,6 +6214,18 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%Add a key that switches off the entry targets: +%\changes{1.12}{2017-02-03}{added target key to printgloss family} +% \begin{macrocode} +\define@choicekey{printgloss}{target}[\val\nr]{true,false}[true]{% + \ifcase\nr + \let\@glstarget\glsdohypertarget + \else + \let\@glstarget\@secondoftwo + \fi +} +% \end{macrocode} +% %\begin{macro}{\glsxtr@makeglossaries} %For the benefit of \app{makeglossaries} %\changes{1.09}{2016-12-16}{new} @@ -5543,6 +6398,97 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsnoidxdisplayloc} +%\changes{1.12}{2017-02-03}{added redefinition} +%Patch to check for range formations. +% \begin{macrocode} +\renewcommand*{\glsnoidxdisplayloc}[4]{% + \setentrycounter[#1]{#2}% + \@glsxtr@display@loc#3\empty\end@glsxtr@display@loc{#4}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@display@loc} +%\changes{1.12}{2017-02-03}{new} +%Patch to check for range formations. +% \begin{macrocode} +\def\@glsxtr@display@loc#1#2\end@glsxtr@display@loc#3{% + \ifx#1(\relax + \glsxtrdisplaystartloc{#2}{#3}% + \else + \ifx#1)\relax + \glsxtrdisplayendloc{#2}{#3}% + \else + \glsxtrdisplaysingleloc{#1#2}{#3}% + \fi + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdisplaysingleloc} +%\changes{1.12}{2017-02-03}{new} +%Single location. +% \begin{macrocode} +\newcommand*{\glsxtrdisplaysingleloc}[2]{% + \csuse{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%By default the range identifiers are simply ignored. +%A custom list loop handler can be defined by the user +%to test for ranges by checking the definition of +%\cs{glsxtrlocrangefmt}. +% +%\begin{macro}{\glsxtrdisplaystartloc} +%\changes{1.12}{2017-02-03}{new} +%Start of a location range. +% \begin{macrocode} +\newcommand*{\glsxtrdisplaystartloc}[2]{% + \edef\glsxtrlocrangefmt{#1}% + \ifx\glsxtrlocrangefmt\empty + \def\glsxtrlocrangefmt{glsnumberformat}% + \fi + \expandafter\glsxtrdisplaysingleloc + \expandafter{\glsxtrlocrangefmt}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdisplayendloc} +%\changes{1.12}{2017-02-03}{new} +%End of a location range. +% \begin{macrocode} +\newcommand*{\glsxtrdisplayendloc}[2]{% + \ifdefstring{\glsxtrlocrangefmt}{#1}{}% + {\GlossariesExtraWarning{Mismatched end location range + (start=\glsxtrlocrangefmt, end=#1)}% + }% + \glsxtrdisplayendlochook{#1}{#2}% + \expandafter\glsxtrdisplaysingleloc + \expandafter{\glsxtrlocrangefmt}{#2}% + \def\glsxtrlocrangefmt{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdisplayendlochook} +%\changes{1.12}{2017-02-03}{new} +%Allow the user to hook into the end of range command. +% \begin{macrocode} +\newcommand*{\glsxtrdisplayendlochook}[2]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrlocrangefmt} +%\changes{1.12}{2017-02-03}{new} +%Current range format. Empty if not in a range. +% \begin{macrocode} +\newcommand*{\glsxtrlocrangefmt}{} +% \end{macrocode} +%\end{macro} +% % Give a bit of assistance to new users who are confused and don't % know how to read transcript messages. %\begin{macro}{\@print@glossary} @@ -5826,7 +6772,18 @@ Dickimaw Books\\ \glsxtr@writefields \let\@glsxtr@org@see@noindex\@gls@see@noindex \let\@gls@see@noindex\relax - \InputIfFileExists{#2.glstex}{}% + \IfFileExists{#2.glstex}% + {% +% \end{macrocode} +%Can't scope \cs{@input} so save and restore the category code of +%\texttt{@} to allow for internal commands in the location list. +%\changes{1.12}{2017-02-03}{added catcode change for @} +% \begin{macrocode} + \edef\@bibgls@restoreat{\noexpand\catcode\noexpand`\noexpand\@=\number\catcode`\@}% + \makeatletter + \@input{#2.glstex}% + \@bibgls@restoreat + }% {% \GlossariesExtraWarning{No file `#2.glstex'}% }% @@ -5836,20 +6793,25 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrresourcecount} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcount\glsxtrresourcecount +% \end{macrocode} +%\end{macro} %\begin{macro}{\GlsXtrLoadResources} %\changes{1.11}{2017-01-19}{new} +%\changes{1.12}{2017-02-03}{removed restriction on only one per document} %Short cut that uses \cs{glsxtrresourcefile} with \cs{jobname} as %the mandatory argument. % \begin{macrocode} \newcommand*{\GlsXtrLoadResources}[1][]{% - \glsxtrresourcefile[#1]{\jobname}% - \renewcommand*{\GlsXtrLoadResources}[1][]{% - \PackageError{glossaries-extra}% - {Only 1 \string\GlsXtrLoadResources\space permitted per - document. Use \string\glsxtrresourcefile\space for additional - resources}% - {}% - }% + \ifnum\glsxtrresourcecount=0\relax + \glsxtrresourcefile[#1]{\jobname}% + \else + \glsxtrresourcefile[#1]{\jobname-\the\glsxtrresourcecount}% + \fi + \advance\glsxtrresourcecount by 1\relax } % \end{macrocode} %\end{macro} @@ -5875,6 +6837,20 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtr@langtag} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@langtag}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@pluralsuffixes} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@pluralsuffixes}[4]{} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtr@shortcutsval} %\changes{1.11}{2017-01-19}{new} % \begin{macrocode} @@ -5896,6 +6872,22 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\glsxtr@writefields}{% \protected@write\@auxout{}{\string\glsxtr@fields{\@gls@keymap}}% +% \end{macrocode} +%If any languages have been loaded, the language tag will be +%available in \cs{CurrentTrackedLanguageTag} (provided by +%\sty{tracklang}). For multilingual +%documents, the required locale will have to be indicated in the +%"sort" key when using \cs{glsxtrresourcefile}. +% \begin{macrocode} + \ifdef\CurrentTrackedLanguageTag + {% + \protected@write\@auxout{}{% + \string\glsxtr@langtag{\CurrentTrackedLanguageTag}}% + }% + {}% + \protected@write\@auxout{}{\string\glsxtr@pluralsuffixes + {\glspluralsuffix}{\abbrvpluralsuffix}{\acrpluralsuffix}% + {\glsxtrabbrvpluralsuffix}}% \ifdef\inputencodingname {% \protected@write\@auxout{}{\string\glsxtr@texencoding{\inputencodingname}}% @@ -5911,18 +6903,98 @@ Dickimaw Books\\ {}% }% \protected@write\@auxout{}{\string\glsxtr@shortcutsval{\@glsxtr@shortcutsval}}% - \protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}% +% \end{macrocode} +%Prefix deferred until the beginning of the document in case it's +%redefined later in the preamble. This is picked up by bib2gls when +%the external option is used. +% \begin{macrocode} + \AtBeginDocument + {\protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}}% \let\glsxtr@writefields\relax } % \end{macrocode} %\end{macro} -%\begin{macro}{\printunsrtglossary} -%\changes{1.08}{2016-12-13}{new} -%Similar to \cs{printnoidxglossary} but it displays all entries -%defined for the given glossary without sorting. +% +%Allow locations specific to a particular counter to be recorded. +%\begin{macro}{\glsxtr@record} +%\changes{1.08}{2016-12-13}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@record}[5]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@counterrecord} +%\changes{1.12}{2017-02-03}{new} +%Aux file command. +% \begin{macrocode} +\newcommand*{\glsxtr@counterrecord}[3]{% + \glsxtrfieldlistgadd{#1}{record.#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@counterrecordhook} +%\changes{1.12}{2017-02-03}{new} +%Hook used by \cs{@glsxtr@dorecord}. +% \begin{macrocode} +\newcommand*{\@glsxtr@counterrecordhook}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrRecordCounter} +%\changes{1.12}{2017-02-03}{new} +%Activate recording for a particular counter (identified in the +%argument). +% \begin{macrocode} +\newcommand*{\GlsXtrRecordCounter}[1]{% + \@@glsxtr@recordcounter{#1}% +} +\@onlypreamble\GlsXtrRecordCounter +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@docounterrecord} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@docounterrecord}[1]{% + \protected@write\@auxout{}{\string\glsxtr@counterrecord + {\@gls@label}{#1}{\csuse{the#1}}}% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\printunsrtglossary} +%\changes{1.08}{2016-12-13}{new} +%\changes{1.12}{2017-02-03}{added starred form} +%Similar to \cs{printnoidxglossary} but it displays all entries +%defined for the given glossary without sorting. +% \begin{macrocode} +\newcommand*{\printunsrtglossary}{% + \@ifstar\s@printunsrtglossary\@printunsrtglossary +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@printunsrtglossary} +%\changes{1.12}{2017-02-03}{new} +%Unstarred version. +% \begin{macrocode} +\newcommand*{\@printunsrtglossary}[1][]{% + \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\s@printunsrtglossary} +%\changes{1.12}{2017-02-03}{new} +%Starred version. % \begin{macrocode} -\newcommand*{\printunsrtglossary}[1][type=\glsdefaulttype]{% - \@printglossary{#1}{\@print@unsrt@glossary}% +\newcommand*{\s@printunsrtglossary}[2][]{% + \begingroup + #2% + \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}% + \endgroup } % \end{macrocode} %\end{macro} @@ -5963,7 +7035,7 @@ Dickimaw Books\\ :\expandafter=\csname glolist@\@glo@type\endcsname\do{% \ifdefempty{\glscurrententrylabel} {}% - {\@glsxtr@noidx@do\glscurrententrylabel}% + {\printunsrtglossaryhandler\glscurrententrylabel}% }% \end{theglossary}% }% @@ -5972,6 +7044,58 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\printunsrtglossaryhandler} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrunsrtdo{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\print@op@unsrtglossaryunit} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\print@op@unsrtglossaryunit}[2][]{% + \s@printunsrtglossary[type=\glsdefaulttype,#1]{% + \printunsrtglossaryunitsetup{#2}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\printunsrtglossaryunitsetup} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\printunsrtglossaryunitsetup}[1]{% + \renewcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrfieldxifinlist{##1}{record.#1}{\csuse{the#1}} + {\glsxtrunsrtdo{##1}}% + {}% + }% + \ifcsundef{theH#1}% + {% + \renewcommand*{\glolinkprefix}{record.#1.\csuse{the#1}.}% + }% + {% + \renewcommand*{\glolinkprefix}{record.#1.\csuse{theH#1}.}% + }% + \renewcommand*{\glossarysection}[2][]{}% + \appto\glossarypostamble{\glspar\medskip\glspar}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\print@noop@unsrtglossaryunit} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\print@noop@unsrtglossaryunit}[2][]{% + \PackageError{glossaries-extra}{\string\printunsrtglossaryunit\space + requires the record=only or record=alsoindex package option}{}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@unsrt@getgrouptitle} %\changes{1.11}{2017-01-19}{new} % \begin{macrocode} @@ -5981,6 +7105,15 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrunsrtdo} +%\changes{1.12}{2017-02-03}{new} +%Provide a user-level call to \cs{@glsxtr@noidx@do} to make it +%easier to define a new handler. +% \begin{macrocode} +\newcommand{\glsxtrunsrtdo}{\@glsxtr@noidx@do} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@noidx@do} %\changes{1.11}{2017-01-19}{new} %Minor modification of \cs{@gls@noidx@do} to check for location @@ -8172,14 +9305,25 @@ Dickimaw Books\\ { \renewcommand*{\@gls@preglossaryhook}{% \@glsxtr@activate@initialtagging - \let\@glsxtr@org@postdescription\glspostdescription - \renewcommand*{\glspostdescription}{% - \ifglsentryexists{\glscurrententrylabel}% - {% - \glsxtrpostdescription - \@glsxtr@org@postdescription - }{}% +% \end{macrocode} +%\changes{1.12}{2017-02-03}{check for definition} +%Since the glossaries are automatically scoped, +%\cs{@glsxtr@org@postdescription} shouldn't already be defined, but +%check anyway just as a precautionary measure. +% \begin{macrocode} + \ifundef\@glsxtr@org@postdescription + {% + \let\@glsxtr@org@postdescription\glspostdescription + \renewcommand*{\glspostdescription}{% + \ifglsentryexists{\glscurrententrylabel}% + {% + \glsxtrpostdescription + \@glsxtr@org@postdescription + }% + {}% + }% }% + {}% % \end{macrocode} %\changes{1.07}{2016-08-15}{added \cs{glossxtrsetpopts}} %Enable the options used by \cs{@@glsxtrp}: @@ -8577,6 +9721,18 @@ Dickimaw Books\\ % Define a new generic abbreviation. % \begin{macrocode} \newcommand*{\newabbreviation}[4][]{% + \glsxtr@newabbreviation{#1}{#2}{#3}{#4}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@newabbreviation} +% Internal macro. (bib2gls has an option that needs to +% temporarily redefine \cs{newabbreviation}. This is just makes +% it easier to save and restore the original definition.) +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@newabbreviation}[4]{% \glskeylisttok{#1}% \glslabeltok{#2}% \glsshorttok{#3}% @@ -8874,10 +10030,19 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrabbrvpluralsuffix} +% Default plural suffix. +%\changes{1.12}{2017-02-03}{new} +%Allow an alternative default suffix for abbreviations. +% \begin{macrocode} +\newcommand*{\glsxtrabbrvpluralsuffix}{\glspluralsuffix} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\abbrvpluralsuffix} % Default plural suffix. % \begin{macrocode} -\newcommand*{\abbrvpluralsuffix}{\glspluralsuffix} +\newcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} % @@ -9882,7 +11047,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10004,7 +11169,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10152,7 +11317,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% @@ -10275,7 +11440,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% @@ -10363,7 +11528,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10456,7 +11621,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10540,7 +11705,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10651,7 +11816,7 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrscsuffix} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}} +\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}} % \end{macrocode} %\end{macro} % @@ -10931,7 +12096,7 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrsmsuffix} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newcommand*{\glsxtrsmsuffix}{\glspluralsuffix} +\newcommand*{\glsxtrsmsuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} % @@ -11684,7 +12849,7 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrusersuffix} %\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\newcommand*{\glsxtrusersuffix}{\glspluralsuffix} +\newcommand*{\glsxtrusersuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} % @@ -11755,6 +12920,257 @@ Dickimaw Books\\ % \end{macrocode} %\end{abbrvstyle} % +%\begin{abbrvstyle}{long-postshort-user} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{long-short-user} but defers the parenthetical +%matter to after the link. +% \begin{macrocode} +\newabbreviationstyle{long-postshort-user}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\protect\glslonguserfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +% \end{macrocode} +%First use full form: +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +% \end{macrocode} +% In-line format: +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-postshort-user-desc} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{long-postshort-user} but the user supplies the +%description. +% \begin{macrocode} +\newabbreviationstyle{long-postshort-user-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtruserparen + {\protect\glsabbrvfont{\the\glsshorttok}}{\the\glslabeltok}}, + sort={\the\glslongtok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-postshort-user}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-postlong-user} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{short-long-user} but defers the parenthetical +%matter to after the link. +% \begin{macrocode} +\newabbreviationstyle{short-postlong-user}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\protect\glslonguserfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentrylong{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +% \end{macrocode} +%First use full form: +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +% \end{macrocode} +% In-line format: +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-postlong-user-desc} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{short-postlong-user} but leaves the user to specify +%the description. +% \begin{macrocode} +\newabbreviationstyle{short-postlong-user-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}% + \protect\glsxtruserparen + {\protect\glsfirstlongfont{\the\glslongpltok}}% + {\the\glslabeltok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentrylong{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-postlong-user}% +} +% \end{macrocode} +%\end{abbrvstyle} +% %\begin{abbrvstyle}{long-short-user-desc} %\changes{1.04}{2016-05-02}{new} % \begin{macrocode} @@ -13127,7 +14543,7 @@ Dickimaw Books\\ % First identify package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2017/01/19 v1.11 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2017/02/03 v1.12 (NLCT)] % \end{macrocode} % Provide package options to automatically load required predefined % styles. The simplest method is to just test for the existence of diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins index bd6494afdea..0491f42a41c 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins @@ -1,4 +1,4 @@ -% glossaries-extra.ins generated using makedtx version 1.1 2017/1/19 14:10 +% glossaries-extra.ins generated using makedtx version 1.1 2017/2/3 20:32 \input docstrip \preamble diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty index 52c42f275ea..5b47d114020 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2017/01/19 v1.11 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2017/02/03 v1.12 (NLCT)] \newcommand*{\@glsxtr@loadstyles}{} \DeclareOption*{% \IfFileExists{glossary-\CurrentOption.sty} diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty index 159b4e1d552..ee66803885f 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2017/01/19 v1.11 (NLCT)] +\ProvidesPackage{glossaries-extra}[2017/02/03 v1.12 (NLCT)] \RequirePackage{xkeyval} \RequirePackage{etoolbox} \@ifpackageloaded{glossaries} @@ -141,8 +141,21 @@ \protected@write\@auxout{}{\string\glsxtr@record {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% {\@glslocref}}% + \@glsxtr@counterrecordhook +} +\newcommand*{\@@glsxtr@recordcounter}{% + \@glsxtr@noop@recordcounter +} +\newcommand*{\@glsxtr@noop@recordcounter}[1]{% + \PackageError{glossaries-extra}{\string\GlsXtrRecordCounter\space + requires record=only or record=alsoindex package option}{}% +} +\newcommand*{\@glsxtr@op@recordcounter}[1]{% + \eappto\@glsxtr@counterrecordhook{\noexpand\@glsxtr@docounterrecord{#1}}% +} +\newcommand{\printunsrtglossaryunit}{% + \print@noop@unsrtglossaryunit } -\newcommand*{\glsxtr@record}[5]{} \newcommand*{\glsxtr@setup@record}{} \newcommand*{\glsxtr@indexonly@saveentrycounter}{% \ifKV@glslink@noindex @@ -196,6 +209,8 @@ \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter \let\glsxtrundefaction\@glsxtr@err@undefaction \let\glsxtr@warnonexistsordo\@gobble + \let\@@glsxtr@recordcounter\@glsxtr@noop@recordcounter + \def\printunsrtglossaryunit{\print@noop@unsrtglossaryunit}% }% \or \def\glsxtr@setup@record{% @@ -205,6 +220,9 @@ \let\glsxtrundefaction\@glsxtr@warn@undefaction \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo \glsxtr@addloclistfield + \renewcommand*{\@glsxtr@autoindexcrossrefs}{}% + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% }% \or \def\glsxtr@setup@record{% @@ -214,6 +232,8 @@ \let\glsxtrundefaction\@glsxtr@warn@undefaction \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo \glsxtr@addloclistfield + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% }% \fi } @@ -247,6 +267,9 @@ \let\GlossariesExtraWarningNoLine\@gobble \glsxtr@dooption{nowarn}% } +\@glsxtr@declareoption{postdot}{% + \glsxtr@dooption{nopostdot=false}% +} \newcommand*{\glsxtrabbrvtype}{\glsdefaulttype} \newcommand*{\@glsxtr@abbreviationsdef}{} @@ -435,7 +458,7 @@ \def\@glsxtrundeftag{\glsxtrundeftag}% } \newcommand{\glsxtrifemptyglossary}[3]{% - \ifglossaryexists{#1}% + \ifcsdef{glolist@#1}% {% \ifcsstring{glolist@#1}{,}{#2}{#3}% }% @@ -444,6 +467,143 @@ #2% }% } +\newcommand*{\glsxtrifkeydefined}[3]{% + \key@ifundefined{glossentry}{#1}{#3}{#2}% +} +\newcommand*{\glsxtrprovidestoragekey}{% + \@ifstar\@sglsxtr@provide@storagekey\@glsxtr@provide@storagekey +} +\newcommand*{\@glsxtr@provide@storagekey}[3]{% + \key@ifundefined{glossentry}{#1}% + {% + \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}% + \appto\@gls@keymap{,{#1}{#1}}% + \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}% + \appto\@newglossaryentryposthook{% + \letcs{\@glo@tmp}{@glo@#1}% + \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}% + }% + \ifblank{#3} + {}% + {% + \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + }% + }% + {% + \ifblank{#3} + {}% + {% + \providecommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + }% + }% +} +\newcommand*{\s@glsxtr@provide@storagekey}[1]{% + \key@ifundefined{glossentry}{#1}% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname gls@assign@#1@field\endcsname}[2]{% + \@@gls@expand@field{##1}{#1}{##2}% + }% + }% + {}% + \@glsxtr@provide@addstoragekey{#1}% +} +\newcommand{\GlsXtrFmtField}{useri} +\newcommand{\GlsXtrFmtDefaultOptions}{noindex} +\newrobustcmd*{\glsxtrfmt}[3][]{% + \glsdoifexistsordo{#2}% + {% + \ifglshasfield{\GlsXtrFmtField}{#2}% + {% + \let\do@gls@link@checkfirsthyper\relax + \expandafter\@gls@link\expandafter[\GlsXtrFmtDefaultOptions,#1]{#2}% + {\csuse{\glscurrentfieldvalue}{#3}}% + }% + {#3}% + }% + {#3}% +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsxtrentryfmt}[2]{% + \texorpdfstring{\@glsxtrentryfmt{#1}{#2}}{#2}% + } +} +{ + \newcommand*{\glsxtrentryfmt}{\@glsxtrentryfmt} +} +\newrobustcmd*{\@glsxtrentryfmt}[2]{% + \glsdoifexistsordo + {% + \ifglshasfield{\GlsXtrFmtField}{#1}% + {% + \csuse{\glscurrentfieldvalue}{#2}% + }% + {#2}% + }% + {#2}% +} +\newcommand*{\glsxtrfieldlistadd}[3]{% + \listcsadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfieldlistgadd}[3]{% + \listcsgadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfieldlisteadd}[3]{% + \listcseadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfieldlistxadd}[3]{% + \listcsxadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfielddolistloop}[2]{% + \dolistcsloop{glo@\glsdetoklabel{#1}@#2}% +} +\newcommand*{\glsxtrfieldforlistloop}[3]{% + \forlistcsloop{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfieldifinlist}[5]{% + \ifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}% +} +\newcommand*{\glsxtrfieldxifinlist}[5]{% + \xifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}% +} +\newcommand*{\glsxtrusefield}[2]{% + \@gls@entry@field{#1}{#2}% +} +\newcommand*{\Glsxtrusefield}[2]{% + \@gls@entry@field{#1}{#2}% +} +\newcommand*{\glsxtrdeffield}[2]{\csdef{glo@\glsdetoklabel{#1}@#2}} +\newcommand*{\glsxtredeffield}[2]{\csedef{glo@\glsdetoklabel{#1}@#2}} +\newcommand*{\glsxtrsetfieldifexists}[3]{\glsdoifexists{#1}{#3}} +\newrobustcmd*{\GlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\GlstrLetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\cslet{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\csGlsXtrLetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csletcs{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\GlsXtrLetFieldToField}[4]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csletcs{glo@\glsdetoklabel{#1}@#2}{glo@\glsdetoklabel{#3}@#4}}% +} +\newrobustcmd*{\gGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csgdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\xGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\protected@csxdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\eGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\protected@csedef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} \ifglsentrycounter \newcommand*{\glsxtrpageref}[1]{\pageref{glsentry-\glsdetoklabel{#1}}} \else @@ -453,25 +613,214 @@ \newcommand*{\glsxtrpageref}[1]{\gls{#1}} \fi \fi -\let\glsxtr@org@newignoredglossary\newignoredglossary -\newcommand*{\glsxtr@s@newignoredglossary}[1]{% - \ifdefempty\@ignored@glossaries +\newcommand{\apptoglossarypreamble}[2][\glsdefaulttype]{% + \ifcsdef{glolist@#1}% {% - \edef\@ignored@glossaries{#1}% + \ifcsundef{@glossarypreamble@#1}% + {\csdef{@glossarypreamble@#1}{}}% + {}% + \csappto{@glossarypreamble@#1}{#2}% }% {% - \eappto\@ignored@glossaries{,#1}% + \GlossariesExtraWarning{Glossary `#1' is not defined}% }% - \csgdef{glolist@#1}{,}% - \ifcsundef{gls@#1@entryfmt}% +} +\newcommand{\preglossarypreamble}[2][\glsdefaulttype]{% + \ifcsdef{glolist@#1}% {% - \defglsentryfmt[#1]{\glsentryfmt}% + \ifcsundef{@glossarypreamble@#1}% + {\csdef{@glossarypreamble@#1}{}}% + {}% + \cspreto{@glossarypreamble@#1}{#2}% + }% + {% + \GlossariesExtraWarning{Glossary `#1' is not defined}% }% - {}% } +\glsaddstoragekey*{alias}{}{\glsxtralias} +\appto\@newglossaryentryposthook{% + \ifcsvoid{glo@\@glo@label @alias}{}% + {% + \ifdefvoid\@glo@see + {% + \edef\@do@glssee{\noexpand\glssee + {\@glo@label}{\csuse{glo@\@glo@label @alias}}}% + \@do@glssee + }% + {}% + }% +} +\renewcommand*{\longnewglossaryentry}{% + \@ifstar\@glsxtr@s@longnewglossaryentry\@glsxtr@longnewglossaryentry +} +\newcommand{\@glsxtr@s@longnewglossaryentry}[3]{% + \glsdoifnoexists{#1}% + {% + \bgroup + \let\@org@newglossaryentryprehook\@newglossaryentryprehook + \long\def\@newglossaryentryprehook{% + \long\def\@glo@desc{#3}% + \@org@newglossaryentryprehook + }% + \renewcommand*{\gls@assign@desc}[1]{% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}% + } + \gls@defglossaryentry{#1}{#2}% + \egroup + }% +} +\newcommand{\@glsxtr@longnewglossaryentry}[3]{% + \glsdoifnoexists{#1}% + {% + \bgroup + \let\@org@newglossaryentryprehook\@newglossaryentryprehook + \long\def\@newglossaryentryprehook{% + \long\def\@glo@desc{#3\glsxtrpostlongdescription}% + \@org@newglossaryentryprehook + }% + \renewcommand*{\gls@assign@desc}[1]{% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}% + } + \gls@defglossaryentry{#1}{#2}% + \egroup + }% +} +\newcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip\nopostdesc} \renewcommand{\newignoredglossary}{% \@ifstar\glsxtr@s@newignoredglossary\glsxtr@org@newignoredglossary } +\newcommand*{\glsxtr@org@newignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + }% + {% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \eappto\@gls@nohyperlist{,#1}% + }% + }% +} +\newcommand*{\glsxtr@s@newignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + }% + {% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + }% +} +\glsifusetranslator +{% + \renewcommand*{\glssettoctitle}[1]{% + \ifcsdef{gls@tr@set@#1@toctitle}% + {% + \csuse{gls@tr@set@#1@toctitle}% + }% + {% + \ifcsdef{@glotype@#1@title}% + {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}% + {\def\glossarytoctitle{\glossarytitle}}% + }% + }% +} +{ + \renewcommand*{\glssettoctitle}[1]{% + \ifcsdef{@glotype@#1@title}% + {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}% + {\def\glossarytoctitle{\glossarytitle}}% + } +} +\newcommand{\provideignoredglossary}{% + \@ifstar\glsxtr@s@provideignoredglossary\glsxtr@provideignoredglossary +} +\newcommand*{\glsxtr@provideignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {}% + {% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \eappto\@gls@nohyperlist{,#1}% + }% + }% +} +\newcommand*{\glsxtr@s@provideignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {}% + {% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + }% +} +\newcommand*{\glsxtrcopytoglossary}[2]{% + \glsdoifexists{#1}% + {% + \ifcsdef{glolist@#2} + {% + \cseappto{glolist@#2}{#1,}% + }% + {% + \glsxtrundefaction{Glossary type `#2' doesn't exist}{}% + }% + }% +} \renewcommand{\glsdoifexists}[2]{% \ifglsentryexists{#1}{#2}% {% @@ -1548,16 +1897,50 @@ { \renewcommand*{\@gls@setdefault@glslink@opts}{% \KV@glslink@noindexfalse + \@glsxtrsetaliasnoindex } } { \newcommand*{\@gls@setdefault@glslink@opts}{% \KV@glslink@noindexfalse + \@glsxtrsetaliasnoindex } \preto\do@glsdisablehyperinlist{\@gls@setdefault@glslink@opts} } +\newcommand*{\glsxtrsetaliasnoindex}{% + \KV@glslink@noindextrue +} +\newcommand*{\@glsxtrsetaliasnoindex}{% + \ifglshasfield{alias}{\glslabel}% + {% + \let\glsxtrindexaliased\@glsxtrindexaliased + \glsxtrsetaliasnoindex + \let\glsxtrindexaliased\@no@glsxtrindexaliased + }% + {}% +} +\newcommand{\@glsxtrindexaliased}{% + \ifKV@glslink@noindex + \else + \begingroup + \def\@glsnumberformat{glsnumberformat}% + \edef\@gls@counter{\csname glo@\glsdetoklabel{\glslabel}@counter\endcsname}% + \glsxtr@saveentrycounter + \@@do@wrglossary{\glsxtralias{\glslabel}}% + \endgroup + \fi +} +\newcommand{\@no@glsxtrindexaliased}{% + \PackageError{glossaries-extra}{\string\glsxtrindexaliased\space + not permitted outside definition of \string\glsxtrsetaliasnoindex}% + {}% +} +\let\glsxtrindexaliased\@no@glsxtrindexaliased \newcommand*{\GlsXtrSetDefaultGlsOpts}[1]{% - \renewcommand*{\@gls@setdefault@glslink@opts}{\setkeys{glslink}{#1}}% + \renewcommand*{\@gls@setdefault@glslink@opts}{% + \setkeys{glslink}{#1}% + \@glsxtrsetaliasnoindex + }% } \newcommand*{\glsxtrifindexing}[2]{% \ifKV@glslink@noindex #2\else #1\fi @@ -1637,7 +2020,16 @@ }% }% {% - \hyperlink{#1}{{\glsxtrprotectlinks#2}}% + \glsfieldfetch{\glslabel}{alias}{\gloaliaslabel}% + \ifdefvoid\gloaliaslabel + {% + \hyperlink{#1}{{\glsxtrprotectlinks#2}}% + }% + {% + \hyperlink + {\glolinkprefix\glsdetoklabel{\gloaliaslabel}}% + {{\glsxtrprotectlinks#2}}% + }% }% } \ifundef\glsdonohyperlink @@ -2509,7 +2901,7 @@ \let\@glsxtr@org@newacronymstyle\newacronymstyle \newcommand*{\MakeAcronymsAbbreviations}{% \renewcommand*{\newacronym}[4][]{% - \newabbreviation[type=\acronymtype,category=acronym,##1]{##2}{##3}{##4}% + \glsxtr@newabbreviation{type=\acronymtype,category=acronym,##1}{##2}{##3}{##4}% }% \renewcommand*{\firstacronymfont}[1]{\glsfirstabbrvfont{##1}}% \renewcommand*{\acronymfont}[1]{\glsabbrvfont{##1}}% @@ -2673,11 +3065,67 @@ \fi }% } -\let\@glsxtr@orgprintglossary\@printglossary +\newcommand{\@glsxtr@orgprintglossary}[2]{% + \def\@glo@type{\glsdefaulttype}% + \def\glossarytitle{% + \ifcsdef{@glotype@\@glo@type @title}% + {\csuse{@glotype@\@glo@type @title}}% + {\glossaryname}}% + \def\glossarytoctitle{\glossarytitle}% + \let\org@glossarytitle\glossarytitle + \def\@glossarystyle{% + \ifx\@glossary@default@style\relax + \GlossariesWarning{No default glossary style provided \MessageBreak + for the glossary `\@glo@type'. \MessageBreak + Using deprecated fallback. \MessageBreak + To fix this set the style with \MessageBreak + \string\setglossarystyle\space or use the \MessageBreak + style key=value option}% + \fi + }% + \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% + \let\@org@glossaryentrynumbers\glossaryentrynumbers + \bgroup + \@printgloss@setsort + \setkeys{printgloss}{#1}% + \ifx\glossarytitle\org@glossarytitle + \else + \cslet{@glotype@\@glo@type @title}{\glossarytitle}% + \fi + \let\currentglossary\@glo@type + \let\org@glossaryentrynumbers\glossaryentrynumbers + \let\glsnonextpages\@glsnonextpages + \let\glsnextpages\@glsnextpages + \let\nopostdesc\@nopostdesc + \gls@dotoctitle + \@glossarystyle + \let\gls@org@glossaryentryfield\glossentry + \let\gls@org@glossarysubentryfield\subglossentry + \renewcommand{\glossentry}[1]{% + \xdef\glscurrententrylabel{\glsdetoklabel{##1}}% + \gls@org@glossaryentryfield{##1}% + }% + \renewcommand{\subglossentry}[2]{% + \xdef\glscurrententrylabel{\glsdetoklabel{##2}}% + \gls@org@glossarysubentryfield{##1}{##2}% + }% + \@gls@preglossaryhook + #2% + \egroup + \global\let\glossaryentrynumbers\@org@glossaryentrynumbers + \global\let\warn@noprintglossary\relax +} \renewcommand{\@printglossary}[2]{% \def\@glsxtr@printglossopts{#1}% \@glsxtr@orgprintglossary{#1}{#2}% } +\define@choicekey{printgloss}{target}[\val\nr]{true,false}[true]{% + \ifcase\nr + \let\@glstarget\glsdohypertarget + \else + \let\@glstarget\@secondoftwo + \fi +} \newcommand*{\glsxtr@makeglossaries}[1]{} \def\@glsxtr@gettype#1,type=#2,#3\@end@glsxtr@gettype{% \def\@glo@type{#2}% @@ -2782,6 +3230,44 @@ \@gls@noref@warn{\@glo@type}% }% } +\renewcommand*{\glsnoidxdisplayloc}[4]{% + \setentrycounter[#1]{#2}% + \@glsxtr@display@loc#3\empty\end@glsxtr@display@loc{#4}% +} +\def\@glsxtr@display@loc#1#2\end@glsxtr@display@loc#3{% + \ifx#1(\relax + \glsxtrdisplaystartloc{#2}{#3}% + \else + \ifx#1)\relax + \glsxtrdisplayendloc{#2}{#3}% + \else + \glsxtrdisplaysingleloc{#1#2}{#3}% + \fi + \fi +} +\newcommand*{\glsxtrdisplaysingleloc}[2]{% + \csuse{#1}{#2}% +} +\newcommand*{\glsxtrdisplaystartloc}[2]{% + \edef\glsxtrlocrangefmt{#1}% + \ifx\glsxtrlocrangefmt\empty + \def\glsxtrlocrangefmt{glsnumberformat}% + \fi + \expandafter\glsxtrdisplaysingleloc + \expandafter{\glsxtrlocrangefmt}{#2}% +} +\newcommand*{\glsxtrdisplayendloc}[2]{% + \ifdefstring{\glsxtrlocrangefmt}{#1}{}% + {\GlossariesExtraWarning{Mismatched end location range + (start=\glsxtrlocrangefmt, end=#1)}% + }% + \glsxtrdisplayendlochook{#1}{#2}% + \expandafter\glsxtrdisplaysingleloc + \expandafter{\glsxtrlocrangefmt}{#2}% + \def\glsxtrlocrangefmt{}% +} +\newcommand*{\glsxtrdisplayendlochook}[2]{} +\newcommand*{\glsxtrlocrangefmt}{} \renewcommand{\@print@glossary}{% \makeatletter \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% @@ -2976,30 +3462,46 @@ \glsxtr@writefields \let\@glsxtr@org@see@noindex\@gls@see@noindex \let\@gls@see@noindex\relax - \InputIfFileExists{#2.glstex}{}% + \IfFileExists{#2.glstex}% + {% + \edef\@bibgls@restoreat{\noexpand\catcode\noexpand`\noexpand\@=\number\catcode`\@}% + \makeatletter + \@input{#2.glstex}% + \@bibgls@restoreat + }% {% \GlossariesExtraWarning{No file `#2.glstex'}% }% \let\@gls@see@noindex\@glsxtr@org@see@noindex } \@onlypreamble\glsxtrresourcefile +\newcount\glsxtrresourcecount \newcommand*{\GlsXtrLoadResources}[1][]{% - \glsxtrresourcefile[#1]{\jobname}% - \renewcommand*{\GlsXtrLoadResources}[1][]{% - \PackageError{glossaries-extra}% - {Only 1 \string\GlsXtrLoadResources\space permitted per - document. Use \string\glsxtrresourcefile\space for additional - resources}% - {}% - }% + \ifnum\glsxtrresourcecount=0\relax + \glsxtrresourcefile[#1]{\jobname}% + \else + \glsxtrresourcefile[#1]{\jobname-\the\glsxtrresourcecount}% + \fi + \advance\glsxtrresourcecount by 1\relax } \newcommand*{\glsxtr@resource}[2]{} \newcommand*{\glsxtr@fields}[1]{} \newcommand*{\glsxtr@texencoding}[1]{} +\newcommand*{\glsxtr@langtag}[1]{} +\newcommand*{\glsxtr@pluralsuffixes}[4]{} \newcommand*{\glsxtr@shortcutsval}[1]{} \newcommand*{\glsxtr@linkprefix}[1]{} \newcommand*{\glsxtr@writefields}{% \protected@write\@auxout{}{\string\glsxtr@fields{\@gls@keymap}}% + \ifdef\CurrentTrackedLanguageTag + {% + \protected@write\@auxout{}{% + \string\glsxtr@langtag{\CurrentTrackedLanguageTag}}% + }% + {}% + \protected@write\@auxout{}{\string\glsxtr@pluralsuffixes + {\glspluralsuffix}{\abbrvpluralsuffix}{\acrpluralsuffix}% + {\glsxtrabbrvpluralsuffix}}% \ifdef\inputencodingname {% \protected@write\@auxout{}{\string\glsxtr@texencoding{\inputencodingname}}% @@ -3010,11 +3512,34 @@ {}% }% \protected@write\@auxout{}{\string\glsxtr@shortcutsval{\@glsxtr@shortcutsval}}% - \protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}% + \AtBeginDocument + {\protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}}% \let\glsxtr@writefields\relax } -\newcommand*{\printunsrtglossary}[1][type=\glsdefaulttype]{% - \@printglossary{#1}{\@print@unsrt@glossary}% +\newcommand*{\glsxtr@record}[5]{} +\newcommand*{\glsxtr@counterrecord}[3]{% + \glsxtrfieldlistgadd{#1}{record.#2}{#3}% +} +\newcommand*{\@glsxtr@counterrecordhook}{} +\newcommand*{\GlsXtrRecordCounter}[1]{% + \@@glsxtr@recordcounter{#1}% +} +\@onlypreamble\GlsXtrRecordCounter +\newcommand*{\@glsxtr@docounterrecord}[1]{% + \protected@write\@auxout{}{\string\glsxtr@counterrecord + {\@gls@label}{#1}{\csuse{the#1}}}% +} +\newcommand*{\printunsrtglossary}{% + \@ifstar\s@printunsrtglossary\@printunsrtglossary +} +\newcommand*{\@printunsrtglossary}[1][]{% + \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}% +} +\newcommand*{\s@printunsrtglossary}[2][]{% + \begingroup + #2% + \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}% + \endgroup } \newcommand*{\printunsrtglossaries}{% \forallglossaries{\@@glo@type}{\printunsrtglossary[type=\@@glo@type]}% @@ -3039,15 +3564,44 @@ :\expandafter=\csname glolist@\@glo@type\endcsname\do{% \ifdefempty{\glscurrententrylabel} {}% - {\@glsxtr@noidx@do\glscurrententrylabel}% + {\printunsrtglossaryhandler\glscurrententrylabel}% }% \end{theglossary}% }% \glossarypostamble } +\newcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrunsrtdo{#1}% +} +\newcommand{\print@op@unsrtglossaryunit}[2][]{% + \s@printunsrtglossary[type=\glsdefaulttype,#1]{% + \printunsrtglossaryunitsetup{#2}% + }% +} +\newcommand*{\printunsrtglossaryunitsetup}[1]{% + \renewcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrfieldxifinlist{##1}{record.#1}{\csuse{the#1}} + {\glsxtrunsrtdo{##1}}% + {}% + }% + \ifcsundef{theH#1}% + {% + \renewcommand*{\glolinkprefix}{record.#1.\csuse{the#1}.}% + }% + {% + \renewcommand*{\glolinkprefix}{record.#1.\csuse{theH#1}.}% + }% + \renewcommand*{\glossarysection}[2][]{}% + \appto\glossarypostamble{\glspar\medskip\glspar}% +} +\newcommand{\print@noop@unsrtglossaryunit}[2][]{% + \PackageError{glossaries-extra}{\string\printunsrtglossaryunit\space + requires the record=only or record=alsoindex package option}{}% +} \newcommand*{\@glsxtr@unsrt@getgrouptitle}[2]{% \def#2{#1}% } +\newcommand{\glsxtrunsrtdo}{\@glsxtr@noidx@do} \newcommand{\@glsxtr@noidx@do}[1]{% \global\letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@location}% @@ -4031,14 +4585,19 @@ { \renewcommand*{\@gls@preglossaryhook}{% \@glsxtr@activate@initialtagging - \let\@glsxtr@org@postdescription\glspostdescription - \renewcommand*{\glspostdescription}{% - \ifglsentryexists{\glscurrententrylabel}% - {% - \glsxtrpostdescription - \@glsxtr@org@postdescription - }{}% + \ifundef\@glsxtr@org@postdescription + {% + \let\@glsxtr@org@postdescription\glspostdescription + \renewcommand*{\glspostdescription}{% + \ifglsentryexists{\glscurrententrylabel}% + {% + \glsxtrpostdescription + \@glsxtr@org@postdescription + }% + {}% + }% }% + {}% \glossxtrsetpopts }% } @@ -4189,6 +4748,9 @@ \@glsxtr@insert@dots@next#1% } \newcommand*{\newabbreviation}[4][]{% + \glsxtr@newabbreviation{#1}{#2}{#3}{#4}% +} +\newcommand*{\glsxtr@newabbreviation}[4]{% \glskeylisttok{#1}% \glslabeltok{#2}% \glsshorttok{#3}% @@ -4291,7 +4853,8 @@ \newcommand*{\glslongdefaultfont}[1]{#1} \newcommand*{\glsfirstlongfont}[1]{\glslongfont{#1}} \newcommand*{\glsfirstlongdefaultfont}[1]{\glslongdefaultfont{#1}} -\newcommand*{\abbrvpluralsuffix}{\glspluralsuffix} +\newcommand*{\glsxtrabbrvpluralsuffix}{\glspluralsuffix} +\newcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix} \newrobustcmd*{\glsxtrfull}{\@gls@hyp@opt\ns@glsxtrfull} \newcommand*\ns@glsxtrfull[2][]{% \new@ifnextchar[{\@glsxtr@full{#1}{#2}}% @@ -4863,7 +5426,7 @@ }% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -4939,7 +5502,7 @@ }% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -5018,7 +5581,7 @@ }% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% @@ -5098,7 +5661,7 @@ }% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% @@ -5155,7 +5718,7 @@ \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -5217,7 +5780,7 @@ \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -5274,7 +5837,7 @@ \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -5337,7 +5900,7 @@ \letabbreviationstyle{long-noshort}{long} \newcommand*{\glsxtrscfont}[1]{\textsc{#1}} \newcommand*{\glsxtrfirstscfont}[1]{\glsxtrscfont{#1}} -\newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}} +\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}} \newabbreviationstyle{long-short-sc}% {% \GlsXtrUseAbbrStyleSetup{long-short}% @@ -5446,7 +6009,7 @@ \@glsxtr@deprecated@abbrstyle{postfootnote-sc}{short-sc-postfootnote} \newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} \newcommand*{\glsxtrfirstsmfont}[1]{\glsxtrsmfont{#1}} -\newcommand*{\glsxtrsmsuffix}{\glspluralsuffix} +\newcommand*{\glsxtrsmsuffix}{\glsxtrabbrvpluralsuffix} \newabbreviationstyle{long-short-sm}% {% \GlsXtrUseAbbrStyleSetup{long-short}% @@ -5781,7 +6344,7 @@ \newcommand*{\glsfirstabbrvuserfont}[1]{\glsabbrvuserfont{#1}} \newcommand*{\glslonguserfont}[1]{#1} \newcommand*{\glsfirstlonguserfont}[1]{\glslonguserfont{#1}} -\newcommand*{\glsxtrusersuffix}{\glspluralsuffix} +\newcommand*{\glsxtrusersuffix}{\glsxtrabbrvpluralsuffix} \newabbreviationstyle{long-short-user}% {% \renewcommand*{\CustomAbbreviationFields}{% @@ -5828,6 +6391,205 @@ \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% }% } +\newabbreviationstyle{long-postshort-user}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\protect\glslonguserfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + }% +} +\newabbreviationstyle{long-postshort-user-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtruserparen + {\protect\glsabbrvfont{\the\glsshorttok}}{\the\glslabeltok}}, + sort={\the\glslongtok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-postshort-user}% +} +\newabbreviationstyle{short-postlong-user}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\protect\glslonguserfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentrylong{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + }% +} +\newabbreviationstyle{short-postlong-user-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}% + \protect\glsxtruserparen + {\protect\glsfirstlongfont{\the\glslongpltok}}% + {\the\glslabeltok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentrylong{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-postlong-user}% +} \newabbreviationstyle{long-short-user-desc}% {% \GlsXtrUseAbbrStyleSetup{long-short-desc}% -- cgit v1.2.3