From b4449269786ca00b3c302d244f99e83d31a6b0d6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 1 Dec 2018 22:48:17 +0000 Subject: glossaries-extra (1dec18) git-svn-id: svn://tug.org/texlive/trunk@49297 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/glossaries-extra/CHANGES | 41 + .../texmf-dist/doc/latex/glossaries-extra/README | 4 +- .../glossaries-extra/glossaries-extra-code.pdf | Bin 1167701 -> 738075 bytes .../glossaries-extra/glossaries-extra-manual.html | 17815 +++++++++++-------- .../glossaries-extra/glossaries-extra-manual.pdf | Bin 705248 -> 769187 bytes .../glossaries-extra/glossaries-extra-manual.tex | 1250 +- .../latex/glossaries-extra/sample-abbr-styles.pdf | Bin 512962 -> 512950 bytes .../doc/latex/glossaries-extra/sample-abbrv.pdf | Bin 44761 -> 44749 bytes .../doc/latex/glossaries-extra/sample-accsupp.pdf | Bin 82623 -> 82614 bytes .../latex/glossaries-extra/sample-acronym-desc.pdf | Bin 50368 -> 50358 bytes .../doc/latex/glossaries-extra/sample-acronym.pdf | Bin 36745 -> 36734 bytes .../doc/latex/glossaries-extra/sample-alias.pdf | Bin 43875 -> 43863 bytes .../latex/glossaries-extra/sample-altmodifier.pdf | Bin 35308 -> 35296 bytes .../glossaries-extra/sample-alttree-marginpar.pdf | Bin 91061 -> 91118 bytes .../latex/glossaries-extra/sample-alttree-sym.pdf | Bin 69532 -> 69554 bytes .../doc/latex/glossaries-extra/sample-alttree.pdf | Bin 54866 -> 54855 bytes .../glossaries-extra/sample-autoindex-hyp.pdf | Bin 142167 -> 139691 bytes .../latex/glossaries-extra/sample-autoindex.pdf | Bin 161657 -> 161586 bytes .../doc/latex/glossaries-extra/sample-crossref.pdf | Bin 41294 -> 41281 bytes .../latex/glossaries-extra/sample-crossref2.pdf | Bin 41613 -> 41603 bytes .../doc/latex/glossaries-extra/sample-docdef.pdf | Bin 45257 -> 45245 bytes .../latex/glossaries-extra/sample-entrycount.pdf | Bin 54623 -> 54610 bytes .../doc/latex/glossaries-extra/sample-external.pdf | Bin 34187 -> 34175 bytes .../doc/latex/glossaries-extra/sample-fmt.pdf | Bin 75268 -> 75114 bytes .../doc/latex/glossaries-extra/sample-footnote.pdf | Bin 63232 -> 63220 bytes .../doc/latex/glossaries-extra/sample-header.pdf | Bin 125912 -> 125899 bytes .../latex/glossaries-extra/sample-indexhook.pdf | Bin 42722 -> 42711 bytes .../latex/glossaries-extra/sample-initialisms.pdf | Bin 81618 -> 81603 bytes .../latex/glossaries-extra/sample-linkcount.pdf | Bin 38234 -> 38222 bytes .../glossaries-extra/sample-mixed-abbrv-styles.pdf | Bin 57823 -> 57809 bytes .../latex/glossaries-extra/sample-mixedsort.pdf | Bin 45154 -> 45141 bytes .../doc/latex/glossaries-extra/sample-mixture.pdf | Bin 160093 -> 160020 bytes .../latex/glossaries-extra/sample-name-font.pdf | Bin 202094 -> 202099 bytes .../doc/latex/glossaries-extra/sample-nested.pdf | Bin 67736 -> 67675 bytes .../sample-noidx-restricteddocdefs.pdf | Bin 47582 -> 47572 bytes .../doc/latex/glossaries-extra/sample-onelink.pdf | Bin 44527 -> 25018 bytes .../glossaries-extra/sample-onthefly-utf8.pdf | Bin 106071 -> 106058 bytes .../glossaries-extra/sample-onthefly-xetex.pdf | Bin 19858 -> 19861 bytes .../doc/latex/glossaries-extra/sample-onthefly.pdf | Bin 43481 -> 43469 bytes .../doc/latex/glossaries-extra/sample-pages.pdf | Bin 38801 -> 38788 bytes .../doc/latex/glossaries-extra/sample-postdot.pdf | Bin 37059 -> 37047 bytes .../doc/latex/glossaries-extra/sample-postlink.pdf | Bin 67890 -> 67878 bytes .../doc/latex/glossaries-extra/sample-prefix.pdf | Bin 33119 -> 33107 bytes .../glossaries-extra/sample-record-nameref.glstex | 112 + .../glossaries-extra/sample-record-nameref.pdf | Bin 0 -> 71304 bytes .../glossaries-extra/sample-record-nameref.tex | 74 + .../latex/glossaries-extra/sample-record.glstex | 20 +- .../doc/latex/glossaries-extra/sample-record.pdf | Bin 50231 -> 50220 bytes .../glossaries-extra/sample-restricteddocdefs.pdf | Bin 47895 -> 47883 bytes .../latex/glossaries-extra/sample-suppl-hyp.pdf | Bin 34944 -> 34931 bytes .../glossaries-extra/sample-suppl-main-hyp.pdf | Bin 46402 -> 46388 bytes .../latex/glossaries-extra/sample-suppl-main.pdf | Bin 31607 -> 31596 bytes .../doc/latex/glossaries-extra/sample-suppl.pdf | Bin 13423 -> 13411 bytes .../doc/latex/glossaries-extra/sample-trans.pdf | Bin 49455 -> 49443 bytes .../doc/latex/glossaries-extra/sample-undef.pdf | Bin 33231 -> 33219 bytes .../glossaries-extra/sample-unitentrycount.pdf | Bin 61051 -> 60476 bytes .../doc/latex/glossaries-extra/sample.pdf | Bin 45747 -> 45734 bytes .../latex/glossaries-extra/glossaries-extra.dtx | 10282 +++++++---- .../latex/glossaries-extra/glossaries-extra.ins | 6 +- .../glossaries-extra/example-glossaries-xr.tex | 2 +- .../glossaries-extra/glossaries-extra-bib2gls.sty | 284 +- .../glossaries-extra-stylemods.sty | 5 +- .../latex/glossaries-extra/glossaries-extra.sty | 377 +- .../latex/glossaries-extra/glossary-bookindex.sty | 4 +- .../latex/glossaries-extra/glossary-longextra.sty | 910 + 65 files changed, 19768 insertions(+), 11418 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.glstex create mode 100644 Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.pdf create mode 100644 Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.tex create mode 100644 Master/texmf-dist/tex/latex/glossaries-extra/glossary-longextra.sty (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES b/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES index 31e52db4642..a6c05c691bd 100644 --- a/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES +++ b/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES @@ -1,3 +1,44 @@ +1.37 (2018-11-30) + + * glossaries-extra.sty + + - added record=nameref option + + - added equations and floats options + + - added \glsxtrhiername, \Glsxtrhiername, \GlsXtrhiername, + \GLSxtrhiername, \GLSXTRhiername and \glsxtrhiernamesep + + - added \GlsXtrStandaloneEntryName and \GlsXtrStandaloneEntryOther + + - added \GlsXtrLocationField + + - added \GlsXtrAutoAddOnFormat + + - added \glsxtridentifyglslike + + - added \GLSxtrusefield + + - bug fix: corrected \Glsxtrusefield + + * glossaries-extra-bib2gls.sty + + - added \glsxtrdisplaylocnameref, \glsxtrfmtinternalnameref + and \glsxtrfmtexternalnameref + + - added \glsxtrSetWidest and \glsxtrSetWidestFallback + + - added \glsxtraddlabelprefix, \glsxtrprependlabelprefix, + \glsxtrclearlabelprefixes, \glsxtrifinlabelprefixlist, + \dgls, \dglspl, \dGls, \dGlspl, \dGLS, \dGLSpl, + \dglslink, \dglsdisp + + - added \glsrenewcommand + + * glossary-longextra.sty + + - new package providing additional longtable glossary styles + 1.36 (2018-08-18) * glossaries-extra-bib2gls.sty diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/README b/Master/texmf-dist/doc/latex/glossaries-extra/README index cbe12413bae..eb723948605 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.36 +LaTeX Package : glossaries-extra v1.37 -Last Modified : 2018-08-18 +Last Modified : 2018-11-30 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 ee037236147..e1422330534 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 e809808ef05..2a9ac0fa5f8 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,6 +50,7 @@ .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;} +.cmmi-9{font-size:90%;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;} @@ -217,7 +218,7 @@ a span.HoLogo-TeX span.HoLogo-e{text-decoration:none;} >

glossaries-extra.sty v1.36: an extension to the +class="cmr-17">glossaries-extra.sty v1.37: an extension to the glossaries package

@@ -241,7 +242,7 @@ href="http://www.dickimaw-books.com/" class="url" >http://www.dickimaw-books.com/

2018-08-18

+class="cmr-12">2018-11-30

@@ -382,80 +383,89 @@ href="#sec:acronymmods" id="QQ2-1-13">Acronym Style Modifications href="#x1-140002.9" id="QQ2-1-15">glossary-bookindex package
 2.10 Glossary Style Modifications -
  2.10.1 Style Hooks -
  2.10.2 Number List -
  2.10.3 The glossary-longextra package +
 2.11 Glossary Style Modifications +
  2.11.1 Style Hooks +
  2.11.2 Number List +
  2.11.3 The glossaries-extra-stylemods Package
3 Abbreviations +href="#sec:abbreviations" id="QQ2-1-21">Abbreviations
 3.1 Tagging Initials +href="#sec:tagging" id="QQ2-1-22">Tagging Initials
 3.2 Abbreviation Styles +href="#sec:abbrstyle" id="QQ2-1-23">Abbreviation Styles
 3.3 Shortcut Commands +href="#sec:abbrshortcuts" id="QQ2-1-24">Shortcut Commands
 3.4 Predefined Abbreviation Styles +href="#sec:predefabbrvstyles" id="QQ2-1-26">Predefined Abbreviation Styles
  3.4.1 Predefined Abbreviation Styles that Set the Regular Attribute +href="#sec:predefregabbrvstyles" id="QQ2-1-27">Predefined Abbreviation Styles that Set the Regular Attribute
  3.4.2 Predefined Abbreviation Styles that Don’t Set the Regular Attribute +href="#sec:predefnonregabbrvstyles" id="QQ2-1-28">Predefined Abbreviation Styles that Don’t Set the Regular Attribute
 3.5 Defining New Abbreviation Styles +href="#sec:newabbrvstyle" id="QQ2-1-29">Defining New Abbreviation Styles
4 Entries in Sectioning Titles, Headers, Captions and Contents +href="#sec:headtitle" id="QQ2-1-30">Entries in Sectioning Titles, Headers, Captions and Contents
5 Categories +href="#sec:categories" id="QQ2-1-31">Categories
6 Counting References +href="#sec:countref" id="QQ2-1-32">Counting References
 6.1 Entry Counting (First Use Flag) +href="#sec:entrycount" id="QQ2-1-33">Entry Counting (First Use Flag)
 6.2 Link Counting +href="#sec:linkcount" id="QQ2-1-34">Link Counting
7 Auto-Indexing +href="#sec:autoindex" id="QQ2-1-35">Auto-Indexing
8 On-the-Fly Document Definitions +href="#sec:onthefly" id="QQ2-1-36">On-the-Fly Document Definitions
9 bib2gls: Managing Reference Databases +href="#sec:bib2gls" id="QQ2-1-37">bib2gls: Managing Reference Databases
 9.1 Selection -
 9.2 Sorting and Displaying the Glossary +href="#selection" id="QQ2-1-38">Selection +
 9.2 Sorting and Displaying the Glossary
 9.3 The The glossaries-extra-bib2gls package +
  9.3.1 Supplemental Locations +
  9.3.2 Nameref Record +
  9.3.3 Helper Commands for Resource Options
 9.4 Supplementary Commands +href="#supplementarycommands" id="QQ2-1-44">Supplementary Commands
 9.5 Record Counting +href="#sec:recordcount" id="QQ2-1-45">Record Counting
10 Miscellaneous New Commands +href="#sec:miscnew" id="QQ2-1-46">Miscellaneous New Commands
 10.1 Entry Fields +href="#sec:fields" id="QQ2-1-47">Entry Fields
 10.2 Display All Entries Without Sorting or Indexing +href="#sec:printunsrt" id="QQ2-1-48">Display All Entries Without Sorting or Indexing
 10.3 Standalone Entry Items +href="#sec:glossentry" id="QQ2-1-49">Standalone Entry Items
 10.4 Entry Aliases +href="#sec:alias" id="QQ2-1-50">Entry Aliases
11 Supplemental Packages +href="#sec:supplemental" id="QQ2-1-51">Supplemental Packages
 11.1 Prefixes or Determiners +href="#sec:prefix" id="QQ2-1-52">Prefixes or Determiners
 11.2 Accessibility Support +href="#sec:accsupp" id="QQ2-1-53">Accessibility Support
12 Sample Files +href="#sec:samples" id="QQ2-1-54">Sample Files
13 Multi-Lingual Support +href="#sec:lang" id="QQ2-1-55">Multi-Lingual Support
Glossary
@@ -1087,13 +1097,13 @@ href="#sec:accsupp">Accessibility Support for

Note that the accsupp option can only be used as a package option (not - through option can only be used as a package option (and can’t + be set with \glossariesextrasetup) since the glossaries-accsupp package must be - loaded before package must + be loaded before glossaries-extra if it’s required.

glossaries-extra-stylemodsvalue⟩ if it contains any commas.) The value may be omitted if no options need to be passed. See §2.10 §2.11 Glossary Style Modifications for further details. There are two special keyword values: =noneglossaries v4.30.)

nameref
(New to v1.37 and requires bib2gls v1.8+.) This option is like + record=only but additionally records the current label information given by + \@currentlabel and \@currentHref, and provides a more reliable way of + saving the \theHcounter⟩ for the given location. This option requires + hyperref otherwise it will fall back on the usual location records. + Remember that \@currentHref is always globally updated whenever + \refstepcounter is used, but \@currentlabel isn’t. This can cause some + undesired side-effects with some settings. Remember also that the + indexcounter option increments the associated counter every time an entry + is indexed, which affects this option. See §9.3.2 Nameref Record for further + details. +

This option is best used with counter=chapter or counter=section if you + want the title included in the location list. If the indexing counter is the + default page, only the location number is shown. Similarly for + counter=equation (or equations=true). +

+ alsoindex
This is a hybrid setting that uses bib2gls to fetch entry information + id="dx1-4105"> to fetch entry information from .bib files, but uses makeindex or xindy to create the glossary files. This option should be used with \makeglossaries but not \makenoidxglossaries. You may need to change the transcript file used by bib2gls to avoid a clash with the transcript file used by to avoid a clash with the transcript file used by makeindex or xindy. (This can be done with bib2gls’s ’s --log-file or -t option.) -

The glossaries should be displayed using

The glossaries should be displayed using \printglossary (or \printglossaries). This option is expected to be used with bib2gls’s + id="dx1-4115">’s sort=none setting and so glossaries-extra-bib2gls is not automatically + id="dx1-4116"> is not automatically + + + loaded. -

The document build process is (assuming the file is called

The document build process is (assuming the file is called myDoc.tex): @@ -1467,16 +1538,16 @@ class="cmtt-10">myDoc.tex):  
makeglossaries myDoc  
pdflatex myDoc -

-

With the recording on (

+

With the recording on (record=only or or record=alsoindex), any of the commands + id="dx1-4118">), 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. bib2gls can then + id="dx1-4120"> 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 @@ -1500,25 +1571,94 @@ class="cmsy-10">§9 bib2gls: Managing Reference Databases for further details.

+equations
(New to v1.37.) This option will cause the default location counter to + automatically switch to equation when inside a numbered equation + environment, such as equation or align. The counter can be explicitly overridden + with counter in the optional arguments of commands like \glslink or \gls as + usual. +
+floats
(New to v1.37.) This option will cause the default location counter to + automatically switch to the corresponding counter when inside a floating + environment, such as figure or table. The counter can be explicitly overridden + with counter in the optional arguments of commands like \glslink or \gls as + usual. Remember that within floats it’s the \caption command that + actually uses \refstepcounter, so indexing before the caption will + result in the wrong reference. The commands for use in captions and + sections, such as \glsfmttext and \glsfmtshort, don’t index. (See §4 + Entries in Sectioning Titles, Headers, Captions and Contents). You may + want to consider using \glsadd after the caption (not before). For + example: + + + +
+ \begin{figure}[htbp] +  
  \centering +  
  \includegraphics{example-image} +  
  \caption{Sample \glsfmttext{foobar} figure} +  
  \glsadd{foobar} +  
\end{figure} +
+

+

indexcounter
(New to v1.29.) This option (which doesn’t take a value) is primarily intended for use with bib2gls (v1.4+) and (v1.4+) and hyperref. It can be used + id="dx1-4137">. It can be used with makeindex or xindy but it will interfere with the number list collation, so you won’t have ranges and you’ll have duplicate page numbers present (but each page number will link to the relevant part of the page @@ -1527,53 +1667,53 @@ href="#glo:numberlist">number list href="#styopt.counter">counter=wrglossary. -

This option works by incrementing . +

This option works by incrementing wrglossary and adding and adding \label. This can + id="dx1-4143">. This can cause a problem if the indexing occurs in an equation environment as environment as amsmath + id="dx1-4146"> forbids multiple occurrences of \label (resulting in the “Multiple \label’s” error). It’s best to change the counter to page or or equation when in maths mode + id="dx1-4148"> when in maths mode with this option. For example:

-
+
\renewcommand{\glslinkpresetkeys}{%  
 \ifmmode \setkeys{glslink}{counter=equation}\fi}  
\renewcommand{\glsaddpresetkeys}{%  
 \ifmmode \setkeys{glossadd}{counter=equation}\fi}
-

-

-

By default (with

+

+

By default (with hyperref), the page numbers in ), the page numbers in number lists link back to the top of the relevant page (provided the format uses \glshypernumber). The indexcounter option is designed to link back to the place within the page where + id="dx1-4151"> option is designed to link back to the place within the page where the indexing occurred. It does this by creating a new counter (called wrglossary) + id="dx1-4152">) that’s incremented with \refstepcounter every time an entry is indexed (but not via cross-referencing commands, such as \label is placed class="cmtt-10">\pageref. The location, as seen by the indexing application, is the value of the wrglossary counter but this value is substituted with the page + id="dx1-4153"> counter but this value is substituted with the page reference when number list is typeset. Since the counter is used by all + id="dx1-4154">number list is typeset. Since the counter is used by all entries and is incremented every time any indexing occurs, neither makeindex nor xindy can correctly collate the lists. For example, if the first term to be referenced is indexed three times on page 5 without any intervening terms then the actual locations obtained from wrglossary + id="dx1-4157"> will be 1, 2 and 3, which xindy and makeindex will try to form into the range 1–3, but they should actually all simply appear as page 5, whereas it can actually end up with 5–5. Conversely, a range may not be formed where it would naturally occur if just the page counter was + id="dx1-4160"> counter was used. -

Since

Since bib2gls is designed specifically to work with is designed specifically to work with glossaries-extra, bib2gls (v1.4+) will check for (v1.4+) will check for wrglossary locations. If the default + id="dx1-4165"> locations. If the default --merge-wrglossary-records is on, then any records for the same page for a given entry will be merged. In the above example with three references on page 5, only a single record for page 5 for that entry will be added to the number list and it will link back to the first instance on + id="dx1-4166">number list and it will link back to the first instance on that page. Whereas if you use the --no-merge-wrglossary-records switch, the number list will contain three instance of page 5, with + id="dx1-4167">number list will contain three instance of page 5, with each linking to the corresponding place on that page. In both cases, consecutive pages can form ranges, but it may look strange in the second case. -

See the

See the bib2gls documentation for the documentation for the save-index-counter resource option for more details. @@ -1648,7 +1788,7 @@ class="cmtt-10">save-index-counter resource option 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 the following @@ -1657,10 +1797,10 @@ class="cmss-10">true is assumed): -

The

The glossaries package allows \newglossaryentry within the document + id="dx1-4195"> environment (when used with makeindex or xindy) but the user manual warns against this usage. By default the prohibits this, only allowing definitions within the preamble. If you are really determined to define entries in the document environment, despite all the associated drawbacks, you + id="dx1-4199"> environment, despite all the associated drawbacks, you can restore this with docdef=true. Note that this doesn’t change the + id="dx1-4201">. 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 href="#styopt.docdef">docdef=restricted. Only use . Only use docdef=true if document definitions + id="dx1-4203"> 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



\printabbreviations  \printabbreviations[options]

-

+

which is equivalent to

]
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-4210"> it’s likely you will need to change this. (See §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-4213"> option provided by the glossaries package hasn’t been used, then \acronymtype will be set to + id="dx1-4214"> will be set to \glsxtrabbrvtype so that acronyms defined with so that acronyms defined with \newacronym can be added + id="dx1-4216"> 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-4217"> option (or associated commands) as the abbreviation mechanism is handled differently with glossaries-extra. @@ -1933,13 +2073,13 @@ class="cmss-10">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. @@ -1976,19 +2116,19 @@ class="cmti-10">symbol⟩ as the symbol will 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: @@ -2023,11 +2163,11 @@ class="cmss-10">glossaries package option of the same name, this option i href="#styopt.shortcuts">shortcuts=acronyms (or (or shortcuts=acro): set the shortcuts provided + id="dx1-4225">): set the shortcuts provided by the glossaries package for acronyms (such as \ac). Note that the @@ -2043,13 +2183,13 @@ class="cmss-10">glossaries-extra href="#styopt.shortcuts">shortcuts=ac. + id="dx1-4226">.
  • shortcuts=ac: set the shortcuts provided by the : set the shortcuts provided by the glossaries package for acronyms (such as \ac) but uses the \gls. href="#styopt.shortcuts">shortcuts=abbreviations (or (or shortcuts=abbr): + id="dx1-4229">): set the abbreviation shortcuts provided by glossaries-extra. (See glossaries package. href="#styopt.shortcuts">shortcuts=other: set the “other” shortcut commands, but not the shortcut + id="dx1-4230">: 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-4232">
    • \newsym equivalent to equivalent to \glsxtrnewsymbol (see the (see the symbols + id="dx1-4235"> option).
    • \newnum equivalent to equivalent to \glsxtrnewnumber (see the (see the numbers + id="dx1-4238"> option).
  • shortcuts=all (or (or shortcuts=true): implements ): implements shortcuts=ac, + id="dx1-4241">, shortcuts=abbreviations and and shortcuts=other. + id="dx1-4243">.
  • shortcuts=none (or (or shortcuts=false): don’t define any of the shortcut + id="dx1-4245">): 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-4249"> options may only be used in the preamble. Additionally, docdef can’t be used after can’t be used after \makenoidxglossaries. + id="dx1-4251">.

    -

    -

    +

    Top

    2. Modifications to Existing Commands and Styles

    -

    The

    The glossaries package provides \nopostdesc which may be used in the descriptionglossaries-extra package provides another command -



    \glsxtrnopostpunc  \glsxtrnopostpunc

    -

    +

    which has a similar function but only suppresses the post-description punctuation. It doesn’t suppress the use of \glsxtrpostdescription which allows the use of @@ -2213,12 +2353,12 @@ class="cmtt-10">\glsxtrpostdescription not before.) The post-description hook can counter-act the effect of \glsxtrnopostpunc using -



    \glsxtrrestorepostpunc  \glsxtrrestorepostpunc

    -

    +

    These commands have no effect outside of the glossary (except with standalone entries that use \glsxtractivatenopost and §10.3 Standalone Entry Items). -

    The

    The glossaries package provides -



    \glsseeitemformat  \glsseeitemformat{label}

    -

    +

    to format items in a cross-reference list (identified with the see key or -

    +
    \renewcommand*{\glsseeitemformat}[1]{%  
     \ifglshasshort{\glslabel}{\glsaccesstext{#1}}{\glsaccessname{#1}}%  
    }
    -

    If you want to restore the

    If you want to restore the glossaries v3.0+ definition just do:

    -
    +
    \renewcommand*{\glsseeitemformat}[1]{\glsentrytext{#1}}
    -

    -

    The commands used by

    The glossaries-extra package provides \glsxtrhiername and its case-changing +variants that may be used within the definition of \glsseeitemformat if required. +These display the hierarchy for sub-entries rather than just the name, which may be +more helpful in cross-references. See §2.2 Cross-References (“see” and “see also”) for +further details. +

    The commands used by glossaries to automatically produce an error if an entry is undefined (such as \glsdoifexists) are changed to take the ) are changed to take the undefaction option into + id="dx1-5014"> option into account. -

    The

    The \newignoredglossary{type} command now (as from v1.11) has a starred @@ -2304,7 +2456,7 @@ version that doesn’t automatically switch off the hyperlinks. This starred be used with the targeturl attribute to create a link to an external URL. (See attribute to create a link to an external URL. (See §5 Categories for furt check that the glossary doesn’t already exist. (The glossaries package omits this check.) -

    You can now provide an ignored glossary with: -


    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

    The individual glossary displaying commands \printglossary, , \printnoidxglossary + id="dx1-5019"> and \printunsrtglossary have two extra keys:

    • target. This is a boolean key which can be used to switch off the automatic + id="dx1-5020">. 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. @@ -2343,7 +2495,7 @@ class="cmtt-10">\glsdisablehyper this doesn’t switch
    • targetnameprefix={prefix}. Another way of avoiding duplicate target names @@ -2354,36 +2506,36 @@ class="cmtt-10">\gls).
    • prefix={prefix}. If you do actually want to locally change \glolinkprefix, you can use the prefix key instead. You need to use the matching key instead. You need to use the matching prefix + id="dx1-5024"> key in commands like \gls.
    -

    The

    The \newglossaryentry command has three new keys:

    + + +
    • category, which sets the category label for the given entry. By default this + id="dx1-5025">, which sets the category label for the given entry. By default this is general. See §5 Categories for further information about categories.
    • - - -
    • alias, which allows an entry to be alias to another entry. See , which allows an entry to be alias to another entry. See §10.4 Entry @@ -2391,46 +2543,46 @@ href="#sec:alias">Entry
    • seealso, which performs much like , which performs much like see, but allows for separate “see” and + id="dx1-5028">, but allows for separate “see” and “see also” treatment. See §2.2 Cross-References (“see” and “see also”) for further details.
    -

    The test file

    The test file example-glossaries-xr.tex contains dummy entries with a mixture of see, , alias and and seealso keys for use with minimal working examples. There are also + id="dx1-5031"> keys for use with minimal working examples. There are also example-glossaries-*.bib files that correspond to each example-glossaries-*.tex file for testing bib2gls. -

    The . +

    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. -


    at the end of the description field. +


    \longnewglossaryentry  \longnewglossaryentry*{label}{} class="cmtt-10">{description}

    -

    +

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

    The unstarred version no longer hard-codes the above code (which removes +

    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: @@ -2460,60 +2612,60 @@ class="cmtt-10">\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 +

    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

    The unstarred version also alters the base glossaries package’s treatment of the + id="dx1-5037"> package’s treatment of the descriptionplural key. Since a plural description doesn’t make much sense for + id="dx1-5038"> key. Since a plural description doesn’t make much sense for multi-paragraph descriptions, the default behaviour with glossaries-extra’s + id="dx1-5039">’s \longnewglossaryentry is to simply leave the plural description unset unless explicitly set using the descriptionplural key. The 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 +

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

    The

    The \newterm command (defined through the command (defined through the index package option) is modified + id="dx1-5048"> package option) is modified so that the category defaults to index. The . The \newacronym command is modified + id="dx1-5050"> command is modified to use the new abbreviation interface provided by glossaries-extra. (See §3 Abbreviations.) -

    The

    The \makeglossaries command now has an optional argument. -



    \makeglossaries  \makeglossaries[list]

    -

    +

    If ⟨list⟩ is empty, \makeglossaries behaves as per its original definition in the @@ -2521,44 +2673,44 @@ class="cmtt-10">\makeglossaries behaves as per its original definition in class="cmss-10">glossaries package, otherwise ⟨list⟩ can be a comma-separated list of glossaries that need processing with an external indexing application. -

    This command is not permitted with the

    This command is not permitted with the record=only package option. Without + id="dx1-5052"> package option. Without the optional argument, it’s permitted with record=alsoindex. With the optional + id="dx1-5053">. With the optional argument, it’s only permitted with the default record=off. -

    It should then be possible to use . +

    It should then be possible to use \printglossary for those glossaries listed in ⟨list⟩ and \printnoidxglossary for the other glossaries. (See the accompanying file sample-mixedsort.tex for an example.) -

    If you use the optional argument ⟨

    If you use the optional argument ⟨list⟩, you can’t define entries in the document (even with the docdef option).
    -

    -

    You will need at least version 2.20 of option).

    +

    +

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

    -

    Top

    2.1 Entry Indexing

    -

    As from version 1.31, there is a new command like

    As from version 1.31, there is a new command like \glsadd where the mandatory argument is a comma-separated list of labels: -



    \glsaddeach  options]{list}

    -

    +

    This simply iterates over ⟨list⟩ and does \glsadd[]{label} for each entry in the list. -

    The

    As from version 1.37, you can make commands like \gls or \glslink +automatically use \glsadd with specific options when a given format is used +(identified with format={format} in the optional argument of the corresponding +\gls, \glslink etc). +


    \GlsXtrAutoAddOnFormat  \GlsXtrAutoAddOnFormat[label]{format list} +{glsadd options}

    +

    +The optional argument ⟨label⟩ defaults to \glslabel and indicates the label to use in +\glsadd and so needs to be expandable. The ⟨format list⟩ is a comma-separated list of +format values that will trigger the automated adding. The ⟨glsadd options⟩ are +the options to pass to \glsadd with format={format} prepended to the +list. +

    For example, with: + + + +

    +
    +\GlsXtrAutoAddOnFormat{hyperbf}{counter=chapter} +
    +

    then \gls[format=hyperbf]{sample} will be equivalent to + + + +

    +
    +\glsadd[format=hyperbf,counter=chapter]{sample}\gls[format=hyperbf]{sample} +
    +

    Note that the explicit range markers will prevent a match unless you include +them in ⟨format list⟩ (in which case, be sure to add both the start and end +formats). +

    Here’s another example: + + + +

    +
    +\GlsXtrAutoAddOnFormat[dual.\glslabel]{hyperbf}{} +
    +

    In this case \gls[format=hyperbf]{sample} will now be equivalent to: + + + +

    +
    +\glsadd[format=hyperbf]{dual.sample}\gls[format=hyperbf]{sample} +
    +

    +

    \GlsXtrAutoAddOnFormat is not applied to \glsadd as it could cause an infinite +loop.
    +

    +The glossaries-extra package provides extra keys for commands like \gls and \glstext:

    noindex
    This is a boolean key. If true, this suppresses the indexing. (That is, it prevents \gls or whatever from adding a line to the external glossary file.) This is more useful than the indexonlyfirst package option provided + id="dx1-6004"> package option provided by 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 + id="dx1-6006"> to selected entries, rather than all of them, you can use the indexonlyfirst attribute, see attribute, see §5 Categories for further details.) Note that the noindex key isn’t available for key isn’t available for \glsadd (and (and \glsaddall) + id="dx1-6010">) since the whole purpose of that command is to index an entry.
    wrgloss
    (New to v1.14.) This is may only take the values before or after. By @@ -2655,20 +2891,20 @@ class="cmtt-10">wrgloss=after for specific instances. Note that this opti doesn’t have an effect if the indexing has been suppressed through other settings (such as noindex). -

    The default value is set up using -


    ). +

    The default value is set up using +


    \glsxtrinitwrgloss  \glsxtrinitwrgloss

    -

    +

    which is defined as:

    -
    +
    \newcommand*{\glsxtrinitwrgloss}{%  
     \glsifattribute{\glslabel}{wrgloss}{after}%  
     {% @@ -2679,31 +2915,31 @@ class="cmtt-10">\glsxtrinitwrgloss

     
     }%  
    }
    -

    This sets the conditional -


    This sets the conditional +


    \ifglsxtrinitwrglossbefore  \ifglsxtrinitwrgloss

    -

    +

    which is used to determine where to perform the indexing. -

    This means you can set the

    This means you can set the wrgloss attribute to attribute to after to automatically use this as the default for entries with that category attribute. (Note that adding wrgloss to the default options in to the default options in \GlsXtrSetDefaultGlsOpts will override + id="dx1-6017"> will override \glsxtrinitwrgloss.)

    hyperoutside
    (New to v1.21.) This is a boolean key. The default is hyperoutside=true, which puts the hyperlink outside }
    You can use the hyperoutside category attribute to set the default for a + id="dx1-6019"> category attribute to set the default for a given category. This can be combined with the use of the textformat + id="dx1-6020"> attribute to counteract any interference caused by \hyperlink. For example: -
    +
    \glssetcategoryattribute{mathrelation}{hyperoutside}{false}
    -

    will set

    will set hyperoutside=false for all entries that are assigned to the category mathrelation and @@ -2766,10 +3002,10 @@ class="cmtt-10">mathrelation and

    -
    +
    \glssetcategoryattribute{mathrelation}{textformat}{mathrel}
    -

    will use

    will use \mathrel instead of \glstextformat resulting in:

    @@ -2786,23 +3022,23 @@ class="cmsy-10">}
    for entries with the category key set to key set to mathrelation.
    textformat
    This key must have a control sequence name as its value. The command formed from this name must exist and must take one argument. (Use relax for default behaviour.) If set, this overrides the textformat + id="dx1-6023"> attribute and \glstextformat. See the soul example in example in §2.5 First Use @@ -2810,136 +3046,140 @@ href="#sec:glsunset">First Use
    prefix
    Locally redefines \glolinkprefix to the given value. It should match the + id="dx1-6026"> to the given value. It should match the prefix for the desired glossary.
    thevalue
    Explicitly set the location to this value (see below).
    theHvalue
    Set the corresponding hyperlink location (see below).
    -

    There is a new hook that’s used each time indexing information is written to the +

    There is a new hook that’s used each time indexing information is written to the external glossary files: -



    \glsxtrdowrglossaryhook  \glsxtrdowrglossaryhook{label}

    -

    +

    where ⟨label⟩ is the entry’s label. This does nothing by default but may be redefined. (See, for example, the accompanying sample file sample-indexhook.tex, which uses this hook to determine which entries haven’t been indexed.) -

    There’s also a new hook (from v1.26) that’s used immediately before the options +

    There’s also a new hook (from v1.26) that’s used immediately before the options are set by the \gls-like and \glstext-like commands: -



    \glslinkpresetkeys  \glslinkpresetkeys

    -

    +

    (The base package provides \glslinkpostsetkeys that’s used immediately after the + id="dx1-6031"> that’s used immediately after the options are set.) -

    As from version 1.30 there are also similar hooks for

    As from version 1.30 there are also similar hooks for \glsadd: -



    \glsaddpresetkeys  \glsaddpresetkeys

    -

    +

    and -



    \glsaddpostsetkeys  \glsaddpostsetkeys

    -

    +

    For example, to default to using the equation counter in maths mode: + id="dx1-6034"> counter in maths mode:

    -
    +
    \renewcommand{\glslinkpresetkeys}{%  
     \ifmmode \setkeys{glslink}{counter=equation}\fi}  
    \renewcommand{\glsaddpresetkeys}{%  
     \ifmmode \setkeys{glossadd}{counter=equation}\fi}
    -

    (This can be overridden with an explicit use of

    In this case, the counter can be overridden with an explicit use of counter in the optional argument -of in the +optional argument of \gls or \glsadd.) Alternatively, to enforce this (overriding the option -argument): +class="cmtt-10">\glsadd. (As from version 1.37, a simpler method is to +just use the equations package option.) +

    Alternatively, to enforce this (overriding the option argument):

    -
    +
    \renewcommand{\glslinkpostsetkeys}{%  
     \ifmmode \setkeys{glslink}{counter=equation}\fi}  
    \renewcommand{\glsaddpostsetkeys}{%  
     \ifmmode \setkeys{glossadd}{counter=equation}\fi}
    -

    -

    As from version 1.14, there are two new keys for

    +

    As from version 1.14, there are two new keys for \glsadd: thevalue and and theHvalue. + id="dx1-6038">. These keys are designed for manually adding explicit locations rather than obtaining the value from the associated counter. As from version 1.19, these two keys are also available for commands like \gls and \glslink. The thevalue keys is intended + id="dx1-6039"> keys is intended primarily for adding locations in supplementary material that can’t be obtained from a counter. -

    The principle key

    The principle key thevalue is for the location value. The other key is for the location value. The other key theHvalue can + id="dx1-6041"> can be used to extract a prefix value for the first argument of commands like \glsnoidxdisplayloc. Its value must be in the format ⟨. Its value must be in the format ⟨prefix⟩⟨location⟩. In general, there’s little need for this key as the prefix is typically associated with a counter that can be used to form hypertargets. -

    If you use

    If you use thevalue, you must make sure that you use an indexing application + id="dx1-6043">, you must make sure that you use an indexing application that will accept the given value.
    -

    -

    For example,

    +

    For example, makeindex will only accept locations in the form [⟨ will only accept locations in the form [⟨num⟩⟨sep⟩]*⟨num⟩ @@ -2952,38 +3192,38 @@ instances of a number followed by the recognised separator character (set with \glsSetCompositor). This means that makeindex won’t accept, for + id="dx1-6045"> won’t accept, for example,

    -
    +
    \glsadd[thevalue={Supplementary Material}]{sample}
    -

    This location value will be accepted by

    This location value will be accepted by bib2gls, since it will allow any location and + id="dx1-6047">, since it will allow any location and will only try forming ranges if the location matches any of its numerical patterns. In the case of xindy, you’ll need to add a rule that can match the value. + id="dx1-6048">, you’ll need to add a rule that can match the value. If you’re using hyperref, you may need to use the , you may need to use the format key to prevent a + id="dx1-6050"> key to prevent a hyperlink if one can’t naturally be formed from the prefix, counter and location value. -

    For example, suppose the file

    For example, suppose the file suppl.tex contains:

    -
    +
    \documentclass{article}  
    \usepackage{glossaries-extra}  
    \newglossaryentry{sample}{name={sample},description={an example}} @@ -2994,17 +3234,17 @@ class="cmtt-10">suppl.tex contains:  
    \gls{sample}.  
    \end{document}
    -

    This has an entry on page S.2. Suppose another document wants to include this +

    This has an entry on page S.2. Suppose another document wants to include this location in the glossary. Then this can be done by setting thevalue to to S.2. For example:

    -
    +
    \documentclass{article}  
    \usepackage{glossaries-extra}  
    \makeglossaries @@ -3015,59 +3255,59 @@ example:  
    \glsadd[thevalue={S.2}]{sample}  
    \end{document}
    -

    This location value will be accepted by

    This location value will be accepted by makeindex as it’s in the form ⟨ as it’s in the form ⟨num⟩⟨sep⟩⟨num⟩. -

    If you want hyperlinks, things are more complicated. First you need to set the +

    If you want hyperlinks, things are more complicated. First you need to set the externallocation attribute to the location of the PDF file. For example: + id="dx1-6053"> attribute to the location of the PDF file. For example:

    -
    +
    \glssetcategoryattribute{supplemental}{externallocation}{suppl.pdf}  
    \newglossaryentry{sample}{category=supplemental,  
     name={sample},description={an example}}
    -

    Next you need to add

    Next you need to add glsxtrsupphypernumber as the format:

    -
    +
    \glsadd[thevalue={S.2},format=glsxtrsupphypernumber]{sample}
    -

    Both documents will need to use the

    Both documents will need to use the hyperref package. Remember that the counter + id="dx1-6054"> package. Remember that the counter used for the location also needs to match. If \theHcounter⟩ is defined in the other document and doesn’t match in the referencing document, then you need to use theHvalue to set the appropriate value. See the accompanying sample files + id="dx1-6055"> to set the appropriate value. See the accompanying sample files sample-suppl-hyp.tex and sample-suppl-main-hyp.tex for an example that uses hyperref. -

    The hyperlink for the supplementary location may or . +

    The hyperlink for the supplementary location may or may not take you to the relevant place in the external PDF file depending on your PDF viewer. Some may not support external links, and some may take you to the first page or last visited page.
    -

    -

    For example, if both

    +

    For example, if both sample-suppl-hyp.pdf and sample-suppl-main-hyp.pdf are in the same directory, then viewing sample-suppl-main-hyp.pdf in Evince will take you to the correct location in the linked document (when you click on the S.2 external link), but Okular will take you to the top of the first page of the linked document. -

    This method can only be used where there is one external source for the +

    This method can only be used where there is one external source for the designated category (identified by the externallocation attribute). For multiple + id="dx1-6057"> attribute). For multiple sources, you need to use bib2gls version 1.7+, which is the better method in + id="dx1-6059"> version 1.7+, which is the better method in general as it can automatically fetch the relevant locations from the .aux files of the designated external documents without the need to explicitly use \glsadd. -

    +

    -

    Top

    2.2 Cross-References (“see” and “see also”)

    -

    The value of the

    The value of the see key is now saved as a field. This isn’t the case with glossaries, @@ -3122,9 +3362,9 @@ class="cmss-10">document environment on the next run. -

    This modification allows

    This modification allows glossaries-extra to provide -



    \glsxtraddallcrossrefs  \glsxtraddallcrossrefs

    -

    +

    which is used at the end of the document to automatically add any unused cross-references unless the package option indexcrossrefs was set to false. -

    As a by-product of this enhancement, the

    As a by-product of this enhancement, the see key will now work for entries defined in the see value to be stored even though it may not be possible to index it at that point. -

    As from version 1.06, you can display the cross-referenced information for a given +

    As from version 1.06, you can display the cross-referenced information for a given entry using -



    \glsxtrusesee  \glsxtrusesee{label}

    -

    +

    This internally uses -



    \glsxtruseseeformat  tag}{xr list}

    -

    +

    where ⟨tag⟩ and ⟨xr list⟩ are obtained from the value of the entry’s see field hasn’t been set for the entry given by ⟨label⟩. -

    Suppose you want to suppress the number list using

    As with the base glossaries package, \glsseeformat is defined to do \emph{tag} +\glsseelist{xr list}. The third argument is always ignored and is present for +makeindex, which always requires a final argument to encapsulate the associated +location. The command +


    \glsseelist{xr list}

    +

    +used to iterate over the list of cross-reference labels is also unchanged from +the base glossaries package, with each item in the list formatted according +to: +


    \glsseeitem{label}

    +

    +This is defined by the glossaries package to:

    +
    +\glshyperlink[\glsseeitemformat{label}]{label} +
    +
    So the actual formatting for each cross-referenced entry is performed by +\glsseeitemformat, which is redefined by glossaries-extra, as described in §2 +Modifications to Existing Commands and Styles. This now displays the value of the +text field for abbreviations and the value of the name field otherwise. There’s no +indication of the entry hierarchy, which could confuse the reader. Therefore, as from + + + +glossaries-extra v1.37, there are some new commands that include the hierarchical +information. You may prefer to redefine \glsseeitemformat to use one of this if you +have sub-entries. For example: + + + +
    +\renewcommand*{\glsseeitemformat}[1]{\glsxtrhiername{#1}} +
    +

    +

    The command: +


    \glsxtrhiername  \glsxtrhiername{label}

    +

    +performs a recursive action: +

      +
    1. If the entry given by ⟨label⟩ has a parent, then \glsxtrhiername{parent + label} is done followed by \glsxtrhiernamesep then: +
    2. +
    3. If the entry given by ⟨label⟩ is an abbreviation (that is, it has the short field + set) then the short form is displayed (using \glsaccessshort) otherwise + the name is displayed (using \glsaccessname).
    +

    The first step above is skipped if the entry doesn’t have a parent. Each level is separated +by: +


    \glsxtrhiernamesep  \glsxtrhiernamesep

    +

    +which defaults to “ ”. This can be redefined as appropriate. +

    There are some case-changing variants: +


    \Glsxtrhiername  \Glsxtrhiername{label}

    +

    +The top-level has the first letter changed to upper case (either \Glsaccessshort or +\Glsaccessname). There’s no case-change for sub-entries. +


    \GlsXtrhiername  \GlsXtrhiername{label}

    +

    +All levels have the first letter changed to upper case (either \Glsaccessshort or +\Glsaccessname). +


    \GLSxtrhiername  \GLSxtrhiername{label}

    +

    +The top-level is converted to upper case (either \GLSaccessshort or \GLSaccessname). +There’s no case-change for sub-entries. +


    \GLSXTRhiername  \GLSXTRhiername{label}

    +

    +All levels are converted to upper case (either \GLSaccessshort or \GLSaccessname). +

    Suppose you want to suppress the number list using nonumberlist. This + id="dx1-7048">. This will automatically prevent the cross-references from being displayed. The seeautonumberlist package option will automatically enable the number list for entries + id="dx1-7049"> package option will automatically enable the number list for entries that have the see key set, but this will also show the rest of the number + id="dx1-7051"> 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 + + + +

    Another approach in this situation is to use the post description hook with \glsxtrusesee to append the cross-reference after the description. For example: @@ -3233,22 +3641,22 @@ example:

    -
    +
    \renewcommand*{\glsxtrpostdescgeneral}{%  
     \ifglshasfield{see}{\glscurrententrylabel}  
     {, \glsxtrusesee{\glscurrententrylabel}}%  
     {}%  
    }
    -

    Now the cross-references can appear even though the

    Now the cross-references can appear even though the number list has been suppressed. -

    As from v1.16, there’s a separate

    As from v1.16, there’s a separate seealso key. Unlike key. Unlike see, this doesn’t have an + id="dx1-7055">, this doesn’t have an optional part for the textual tag. The syntax seealso={xr-labelsxr-labels} but the information is stored in a separate field. If you need a different tag, use the see key + id="dx1-7056"> key instead (or redefine \seealsoname or \glsxtruseseealsoformat, described below). -

    You can display the formatted list of cross-references stored in the

    You can display the formatted list of cross-references stored in the seealso key + id="dx1-7057"> key using: -



    \glsxtruseseealso  \glsxtruseseealso{label}

    -

    +

    This works in much the same way as \glsxtrusesee but it internally uses -



    \glsxtruseseeformat  \glsxtruseseealsoformat{xr list}

    -

    +

    For example:

    -
    +
    \renewcommand*{\glsxtrpostdescgeneral}{%  
     \ifglshasfield{see}{\glscurrententrylabel}  
     {, \glsxtrusesee{\glscurrententrylabel}}% @@ -3301,27 +3709,27 @@ For example:  
     {}%  
    }
    -

    -

    The actual unformatted comma-separated list ⟨

    +

    The actual unformatted comma-separated list ⟨xr-list⟩ stored in the seealso field + id="dx1-7060"> field can be accessed with: -



    \glsxtrseealsolabels  \glsxtrseealsolabels{label}

    -

    +

    This will just expand to the ⟨xr-labels⟩ provided in the value of the seealso key. There’s + id="dx1-7062"> key. There’s no corresponding command to access the see field. If you really need to access it, you + id="dx1-7063"> field. If you really need to access it, you can use commands like \glsxtrfielduse, but remember that it may start with [tag], so it can’t be automatically treated as a simple comma-separated list. -

    The base

    As mentioned above, the base glossaries package provides \glsseelist, which requires a -comma-separated list of labels as the argument. The argument isn’t fully expanded, -so it’s not suitable to use, for example, , which +requires a comma-separated list of labels as the argument. The argument isn’t fully +expanded, so it’s not suitable to use, for example, \glsxtrseealsolabels{label} as the -argument. For convenience, } as +the argument. For convenience, glossaries-extra provides -



    \glsxtrseelist  \glsxtrseelist{xr list}

    -

    +

    which fully expands its argument and passes it to \glsseelist. -

    The

    The seealso key implements the automatic indexing using -


    key implements the automatic indexing using +


    \glsxtrindexseealso  \glsxtrindexseealso{label}{xr list}

    -

    +

    which just does

    }
    unless the xindy option is used with option is used with glossaries v4.30+, in which case a distinct + id="dx1-7069"> v4.30+, in which case a distinct seealso cross-reference class is used instead. -

    +

    -

    Top

    2.3 Entry Display Style Modifications

    -

    Recall from the

    Recall from the glossaries package that commands such as \gls display text at that point in the document (optionally with a hyperlink to the relevant @@ -3400,7 +3808,7 @@ whether or not it actually has a hyperlink. The actual text and the way it’s displayed depends on the command used (such as \gls) and the entry format. -

    The default entry format (

    The default entry format (\glsentryfmt) used in the §3.2 Abbreviation Styles). -

    This means that entries with a short form can be treated as regular entries rather +

    This means that entries with a short form can be treated as regular entries rather than abbreviations if it’s more appropriate for the desired style. -

    As from version 1.04,

    As from version 1.04, \glsentryfmt now puts \glsgenentry in the argument of the new command -



    \glsxtrregularfont  \glsxtrregularfont{text}

    -

    +

    This just does its argument ⟨text⟩ by default. This means that if you want regular entries in a different font but don’t want that font to apply to abbreviations, then @@ -3511,62 +3919,62 @@ overridden by the textformat attribute. -

    For example: +

    For example:

    -
    +
    \renewcommand*{\glsxtrregularfont}[1]{\textsf{#1}}
    -

    You can access the label through

    You can access the label through \glslabel. For example, you can query the category:

    -
    +
    \renewcommand*{\glsxtrregularfont}[1]{%  
     \glsifcategory{\glslabel}{general}{\textsf{#1}}{#1}}
    -

    or query the category attribute, for example, provide a custom attribute called +

    or query the category attribute, for example, provide a custom attribute called font:

    -
    +
    \glssetcategoryattribute{general}{font}{sf}  
    \renewcommand*{\glsxtrregularfont}[1]{%  
     \glsifattribute{\glslabel}{font}{sf}{\textsf{#1}}{#1}}
    -

    As from version 1.21, it’s simpler to just do, for example: +

    As from version 1.21, it’s simpler to just do, for example:

    -
    +
    \glssetcategoryattribute{general}{textformat}{textsf}
    -

    without redefining

    without redefining \glsxtrregularfont. -

    As from version 1.30, there is also a command for abbreviations that encapsulates +

    As from version 1.30, there is also a command for abbreviations that encapsulates \glsxtrgenabbrvfmt: -



    \glsxtrabbreviationfont  \glsxtrabbreviationfont{text}

    -

    +

    This also just does its argument by default. Font changes made by abbreviation styles are within ⟨text⟩. -

    The

    The \glspostlinkhook provided by the glossaries package to insert information after the link-text produced by commands like \gls and \glstext is redefined to -



    \glsxtrpostlinkhook  \glsxtrpostlinkhook

    -

    +

    This command will discard a following full stop (period) if the discardperiod attribute is set to “true” for the current entry’s category. It will also do -



    \glsxtrpostlink  \glsxtrpostlink

    -

    +

    if a full stop hasn’t be discarded and -



    \glsxtrpostlinkendsentence  \glsxtrpostlinkendsentence

    -

    +

    if a full stop has been discarded. -

    It may be that you want to check some other setting (rather than a category +

    It may be that you want to check some other setting (rather than a category attribute) to determine whether or not to discard a following full stop. In which case you can redefine: -



    \glsxtrifcustomdiscardperiod  } class="cmtt-10">{⟨false}

    -

    +

    You can access the field’s label using \glslabel. This command should do ⟨true⟩ if the @@ -3625,12 +4033,12 @@ definition is simply:

    -
    +
    \newcommand*{\glsxtrifcustomdiscardperiod}[2]{#2}
    -

    which means that no additional checks are performed. (Only the recognised category +

    which means that no additional checks are performed. (Only the recognised category attributes will be checked.) -

    Avoid the use of

    Avoid the use of \gls-like and \glstext-like commands within the post-link hook as they will cause interference. Consider using commands like @@ -3642,8 +4050,8 @@ href="#sec:nested">§2.7 Nested Links) instead.
    -

    -

    By default

    +

    By default \glsxtrpostlink just does \glsxtrpostlinkcategorygeneral category, \glsxtrpostlinkgeneral if it has been defined.) -

    You can define the post-link hook command using

    You can define the post-link hook command using \newcommand, for example:

    -
    +
    \newcommand*{\glsxtrpostlinkgeneral}{%  
     \glsxtrpostlinkAddDescOnFirstUse  
    }
    -

    or, as from v1.31, you can use -


    or, as from v1.31, you can use +


    \glsdefpostlink  category}{definition}

    -

    +

    This is simply a shortcut for:

    definition}
    Note that it doesn’t check if the command has already been defined. -

    The sentence-ending hook is slightly more complicated. If the command +

    The sentence-ending hook is slightly more complicated. If the command \glsxtrpostlinkcategory

    There are some convenient commands you might want to use when customizing +

    There are some convenient commands you might want to use when customizing the post-link-text category hooks: -



    \glsxtrpostlinkAddDescOnFirstUse  \glsxtrpostlinkAddDescOnFirstUse

    -

    +

    This will add the description in parentheses on first use. -

    For example, suppose you want to append the description in parentheses on

    For example, suppose you want to append the description in parentheses on first use for entries in the symbolsymbol -

    +
    \newcommand*{\glsxtrpostlinksymbol}{%  
      \glsxtrpostlinkAddDescOnFirstUse  
    }
    -

    -


    +


    \glsxtrpostlinkAddSymbolOnFirstUse  \glsxtrpostlinkAddSymbolOnFirstUse

    -

    +

    This will append the symbol (if defined) in parentheses on first use. (Does nothing if the symbol hasn’t been set.) -



    \glsxtrpostlinkAddSymbolDescOnFirstUse  \glsxtrpostlinkAddSymbolDescOnFirstUse

    -

    +

    (New to v1.31.) On first use, this will append \space(⟨description⟩) if the symbol is defined otherwise it just appends \space(⟨description⟩). -

    If you want to provide your own custom format be aware that you can’t use +

    If you want to provide your own custom format be aware that you can’t use \ifglsused within the post-link-text hook as by this point the first use flag will have been unset. Instead you can use -



    \glsxtrifwasfirstuse  true}{false}

    -

    +

    This will do ⟨true⟩ if the last used entry was the first use for that entry, otherwise it @@ -3790,7 +4198,7 @@ locally set by commands like \gls, so don’t rely on it outside of the post-link-text hook. -

    Note that commands like

    Note that commands like \glsfirst and \glsxtrfull\glsxtrfull so that it fakes non-first use otherwise the inline full format would include the footnote, which is inappropriate.
    -

    -

    For example, if you want to place the description in a footnote after the

    +

    For example, if you want to place the description in a footnote after the link-text on first use for the general -

    +
    \newcommand*{\glsxtrpostlinkgeneral}{%  
      \glsxtrifwasfirstuse{\footnote{\glsentrydesc{\glslabel}}}{}%  
    }
    -

    -

    The

    +

    The short-postfootnote abbreviation style uses the post-link-text hook to place the footnote after trailing punctuation characters. -

    You can set the default options used by

    You can set the default options used by \glslink, \gls etc with: -



    \GlsXtrSetDefaultGlsOpts  \GlsXtrSetDefaultGlsOpts{options}

    -

    +

    For example, if you mostly don’t want to index entries then you can do:

    -
    +
    \GlsXtrSetDefaultGlsOpts{noindex}
    -

    and then use, for example,

    and then use, for example, \gls[noindex=false]{sample} when you actually want the location added to the \glslink and \gls. -

    Note that if you don’t want

    Note that if you don’t want any indexing, just omit \makeglossaries and wrgloss\glsxtrinitwrgloss instead. -

    \GlsXtrSetDefaultGlsOpts doesn’t affect \glsadd.
    -

    -

    If you want to change the default value of

    +

    If you want to change the default value of format, you can instead use: -



    \GlsXtrSetDefaultNumberFormat{format}

    -

    +

    This has the advantage of also working for \glsadd. For example, if you want all locations in the back matter to appear in italic (unless explicitly @@ -3898,12 +4306,12 @@ overridden):

    -
    +
    \backmatter  
    \GlsXtrSetDefaultNumberFormat{hyperit}
    -

    -

    Commands like

    +

    Commands like \gls have star (*) and plus (hyper=false and hyper=true. The glossaries-extra package provides a way to add a third modifier, if required, using -



    \GlsXtrSetAltModifier  }{options}

    -

    +

    where ⟨char⟩ is the character used as the modifier and ⟨options⟩ is the default set of options (which may be overridden). Note that ⟨char⟩ must be a single character (not a UTF-8 character, unless you are using XƎLATEX or LuaLATEX). -

    When choosing the character ⟨

    When choosing the character ⟨char⟩ take care of any changes in category code.
    -

    -

    Example: +

    +

    Example:

    -
    +
    \GlsXtrSetAltModifier{!}{noindex}
    -

    This means that

    This means that \gls!{sample} will be equivalent to \gls[noindex]{sample}. It’s not possible to mix modifiers. For example, if you want to do @@ -3950,20 +4358,20 @@ not possible to mix modifiers. For example, if you want to do

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

    you can use

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

    Location lists displayed with \printnoidxglossary internally use -



    \glsnoidxdisplayloc  } class="cmtt-10">{⟨location}

    -

    +

    This command is provided by glossaries, but is modified by glossaries-extra to check @@ -3987,8 +4395,8 @@ class="cmtt-10">( 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 -


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


    \glsxtrdisplaysingleloc  }{location}

    -

    +

    otherwise it uses -



    \glsxtrdisplaystartloc  }{location}

    -

    +

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



    \glsxtrdisplayendloc  }{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 -


    By default the start range command saves the format in +


    \glsxtrlocrangefmt  \glsxtrlocrangefmt

    -

    +

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

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

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



    \glsxtrdisplayendlochook  }{location}

    -

    +

    (which does nothing by default), followed by
    \glsxtrdisplaysingleloc{\glsxtrlocrangefmt to empty. -

    This means that the list +

    This means that the list

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

    doesn’t display any differently from +

    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 +

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

    +

    -

    Top

    2.4 Entry Counting Modifications

    -

    If you are using

    If you are using bib2gls§9 bib2gls: Managing Reference Databases instead. -

    The

    The \glsenableentrycount command is modified to allow for the §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.1 Entry Counting (First Use Flag). -

    +

    -

    Top

    2.5 First Use Flag

    -

    The

    The glossaries package provides -



    \ifglsused{true}{false}

    -

    +

    to determine whether or not an entry has been used. This requires the entry to have been defined. If the entry is undefined, then the underlying boolean variable doesn’t exist and so is neither true nor false. This command will produce an error with the @@ -4182,7 +4590,7 @@ class="cmti-10">true⟩ nor ⟨false⟩ will be performed if ⟨label⟩ doesn’t exist. -

    The

    The record option automatically implements bib2gls. In this case, you may prefer to use: -



    \GlsXtrIfUnusedOrUndefined  } class="cmtt-10">{⟨false}

    -

    +

    (new to v1.34) which does ⟨true⟩ if the entry given by ⟨label⟩ is undefined or if @@ -4227,24 +4635,24 @@ href="#sec:entryfmtmods">§2.3 Entry Display Style Modifications.) -

    There are two new commands provided with version 1.31+: -


    There are two new commands provided with version 1.31+: +


    \glslocalreseteach  \glslocalreseteach{list}

    -

    +

    and -



    \glslocalunseteach  \glslocalunseteach{list}

    -

    +

    These behave like \glslocalreset and \glslocalunset but the argument is a @@ -4252,7 +4660,7 @@ class="cmtt-10">\glslocalunset but the argument is a comma-separated list of labels. -

    The internal command used by

    The internal command used by \glsunset is modified first to allow for the changing in entry counting, described above, but also to allow for buffering pending unsets when commands like -

    +
    \ul{Some text about \gls{html}.}
    -

    This causes the confusing error: +

    This causes the confusing error:

    -
    +
    Glossary entry `{html}' has not been defined.
    -

    The simplest workaround is to put

    The simplest workaround is to put \gls{html} inside the argument of \mbox. For example: @@ -4284,29 +4692,29 @@ example:

    -
    +
    \ul{Some text about \mbox{\gls{html}}.}
    -

    This can work provided it’s not the first use of this entry. It if is, then unsetting the +

    This can work provided it’s not the first use of this entry. It if is, then unsetting the first use flag causes a problem and results in the error:

    -
    +
    ! Package soul Error: Reconstruction failed.
    -

    The

    The glossaries-extra package provides a way of temporarily switching off \glsunset so that it just makes a note of the entry’s label but doesn’t actually perform the change: -



    \GlsXtrStartUnsetBuffering  \GlsXtrStartUnsetBuffering

    -

    +

    The unstarred version doesn’t check for duplicates, so the internal list may end up with multiple occurrences of the same label. The starred version only adds a label to the internal list if it’s not already in it. Note that this @@ -4314,14 +4722,14 @@ buffering only applies to the global \glsunset and does not affect the local \glslocalunset. -

    Later you can restore

    Later you can restore \glsunset and unset all buffered labels using: -



    \GlsXtrStopUnsetBuffering  \GlsXtrStopUnsetBuffering

    -

    +

    The starred form \GlsXtrStopUnsetBuffering* uses \glslocalunset instead. For @@ -4330,7 +4738,7 @@ example:

    -
    +
    \documentclass{article}  
    \usepackage[T1]{fontenc}  
    \usepackage{soul} @@ -4343,9 +4751,9 @@ example:  
    Next use: \gls{html}.  
    \end{document}
    -

    Before you stop the unset buffering, you can iterate over the current buffer +

    Before you stop the unset buffering, you can iterate over the current buffer using -



    \GlsXtrForUnsetBufferedList  \GlsXtrForUnsetBufferedList{cs}

    -

    +

    where ⟨cs⟩ is a control sequence that takes a single argument (which is the entry label). This is best used with the starred version \GlsXtrStartUnsetBuffering* to avoid duplicates. -

    Note that since the change in the first use flag now doesn’t occur until +

    Note that since the change in the first use flag now doesn’t occur until \GlsXtrStopUnsetBuffering, multiple references of the same term within the buffering zone will always be treated as first use (if the term wasn’t used before the buffering started).
    -

    -

    There can still be a problem here as content within

    +

    There can still be a problem here as content within \mbox can’t break across a line so you may end up with an overfull line or excessive white space within the paragraph. -

    An alternative is to use

    An alternative is to use \protect:

    -
    +
    \GlsXtrStartUnsetBuffering  
    \ul{Some text about \protect\gls{html}.}  
    \GlsXtrStopUnsetBuffering
    -

    but the formatting (underlining in this example) won’t be applied. Another +

    but the formatting (underlining in this example) won’t be applied. Another possibility is:

    -
    +
    \usepackage[T1]{fontenc}  
    \usepackage{soul}  
    \usepackage{glossaries-extra} @@ -4403,7 +4811,7 @@ possibility is:  
    Next use: \gls{html}.  
    \end{document}
    -

    This moves

    This moves \gls outside of \ul and uses textformattextformat\gul, which locally changes the regular font and the default abbreviation font to use \ul. It then uses -



    \GlsXtrExpandedFmt  cs}{text}

    -

    +

    which (protected) fully expands ⟨text⟩ before applying ⟨cs⟩, which must be a control @@ -4439,12 +4847,12 @@ something that \ul can’t deal with. For example, if an abbreviation style is used that contains complex formatting or if the field value contains problematic content. -

    +

    -

    Top

    2.6 Plurals

    -

    Some languages, such as English, have a general rule that plurals are formed from +

    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

    To make life easier for languages where the majority of plurals can simply be +

    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 lets 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

    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

    There are other plural fields, such as firstplural, longpluralshortplural

    If these fields are omitted, the

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

      @@ -4549,7 +4957,7 @@ class="cmtt-10">\acrpluralsuffixshort field.
    -

    This

    This last case is changed with glossaries-extra. With this extension package, the \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

    If you require a mixture (for example, in a multilingual document), there are two +

    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 -

    +
    '\abbrvpluralsuffix
    -

    That is, an apostrophe followed by

    That is, an apostrophe followed by \abbrvpluralsuffix is appended. The second attribute is shortpluralshort. -

    +

    -

    Top

    2.7 Nested Links

    -

    Complications arise when you use

    Complications arise when you use \gls in the value of the name

    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. first use if the long form is displayed before the shor -
      +
      \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 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 @@ -4727,41 +5135,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: @@ -4769,10 +5177,10 @@ 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 @@ -4784,7 +5192,7 @@ class="cmtt-10">\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: @@ -4792,13 +5200,13 @@ 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 hyperref

    -

    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 -

    +
    \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 \glsdescfirst 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 within some -

    +
    \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 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 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 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 @@ -5019,8 +5427,8 @@ class="cmtt-10">\glsxtrshort. Note that \acrshort doesn’t set the abbreviation style. -

    Alternatively you can use: -


    Alternatively you can use: +


    \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 @@ -5083,104 +5491,104 @@ class="cmss-10">noindex 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

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

    There are similar commands -


    There are similar commands +


    \Glsxtrp  field}{label}

    -

    +

    for first letter upper case and -


    \Glsxtrp


    \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 \Glstext\gls\glstext, 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} @@ -5263,16 +5671,16 @@ class="cmti-10">really need nested commands, the safest method is  
    \printglossaries  
    \end{document}
    -

    -

    +

    +

    -

    Top

    2.8 Acronym Style Modifications

    -

    The

    The glossaries-extra package provides a new way of dealing with abbreviations and redefines \newacronymglossaries-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 @@ -5311,13 +5719,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 @@ -5328,7 +5736,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


    @@ -5367,34 +5775,34 @@ cellspacing="0" cellpadding="0" id="TBL-2-1" />

    Old Style Name

    New Style Name

    long-sc-short

    long-short-sc

    long-sm-short

    long-short-sm

    long-sp-short

    long-short
    #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
    #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

    @@ -5587,7 +5995,7 @@ class="cmss-10">short-sm-footnote-desc
    -

    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 @@ -5596,15 +6004,15 @@ 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 @@ -5614,7 +6022,7 @@ class="cmss-10">typeglossaries acronym mechanism doesn’t work well with the newer glossaries-extra commands. -

    If you use

    -

    -

    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§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 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 \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 \glsfirstabbrvfont. 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. This will be reset if you use \RestoreAcronyms.

    -

    Top

    2.9 glossary-bookindex package

    -

    As from v1.21,

    As from v1.21, glossaries-extra has a new supplementary package glossary-bookindex @@ -5726,12 +6134,12 @@ style:

    -
    +
    \usepackage{glossaries-extra}  
    \usepackage{glossary-bookindex}  
    \setglossarystyle{bookindex}
    -

    or use both the

    or use both the stylemods and style -

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

    The

    The bookindex style only supports a maximum hierarchical level of 2 (top-level, level 1 and level 2). It’s primarily designed for use with record package option.) -

    The number of columns is given by -


    The number of columns is given by +


    \glsxtrbookindexcols  \glsxtrbookindexcols

    -

    +

    which defaults to 2. -

    This style uses the

    This style uses the multicols environment. If the command -



    \glsxtrbookindexcolspread  \glsxtrbookindexcolspread

    -

    +

    isn’t empty then it’s supplied as the optional argument following \begin{multicols} multicolsmulticols* by redefining -



    \glsxtrbookindexmulticolsenv  \glsxtrbookindexmulticolsenv

    -

    +

    For example

    -
    +
    \renewcommand{\glsxtrbookindexmulticolsenv}{multicols*}
    -

    -

    Each top-level entry is displayed using -


    +

    Each top-level entry is displayed using +


    \glsxtrbookindexname  \glsxtrbookindexname{label}

    -

    +

    where the entry is identified by ⟨label⟩. This just does \glossentryname{ -

    +
    \renewcommand*{\glsxtrbookindexname}[1]{%  
     \glossentryname{#1}%  
     \ifglshassymbol{#1}{\space (\glossentrysymbol{#1})}{}%  
    }
    -

    or if you want the description (if set): +

    or if you want the description (if set):

    -
    +
    \renewcommand*{\glsxtrbookindexname}[1]{%  
     \glossentryname{#1}%  
     \ifglshasdesc{#1}{\space \glossentrydesc{#1}\glspostdescription}{}%  
    }
    -

    (which picks up the post-description hook). -

    Alternatively you can use the

    (which picks up the post-description hook). +

    Alternatively you can use the \glsxtrpostnamecategory⟩ hook to append information after the name according to the entry’s category. -

    Sub-entries are displayed using -


    Sub-entries are displayed using +


    \glsxtrbookindexsubname  \glsxtrbookindexsubname{label}

    -

    +

    which just defaults to \glsxtrbookindexname{label}. -

    The separator used before the location list for top-level entries is given +

    The separator used before the location list for top-level entries is given by -



    \glsxtrbookindexprelocation  \glsxtrbookindexprelocation{label}

    -

    +

    where ⟨label⟩ is the entry’s label. This checks if the location field has been set. If it @@ -5882,10 +6290,10 @@ has, it does

    -
    +
    ,\glsxtrprelocation
    -

    otherwise it just does

    otherwise it just does \glsxtrprelocation (which defaults to \space). If you’re not using bib2gls, the location field won’t be set. -

    The separator used before the location list for sub-entries is given by -


    The separator used before the location list for sub-entries is given by +


    \glsxtrbookindexsubprelocation  \glsxtrbookindexsubprelocation{label}

    -

    +

    which defaults to \glsxtrbookindexprelocation{label}. -

    The separator used between a top-level parent and child entry is given +

    The separator used between a top-level parent and child entry is given by -



    \glsxtrbookindexparentchildsep  \glsxtrbookindexparentchildsep

    -

    +

    This defaults to \nopagebreak. -

    The separator used between a sub-level parent and child entry is given +

    The separator used between a sub-level parent and child entry is given by -



    \glsxtrbookindexparentsubchildsep  \glsxtrbookindexparentsubchildsep

    -

    +

    This defaults to \glsxtrbookindexparentchildsep. -

    The separator between top-level entries is given by -


    The separator between top-level entries is given by +


    \glsxtrbookindexbetween  }{label2}

    -

    +

    This comes after the entry given by ⟨label1⟩, if the entry has no children, or after the last descendent otherwise, so it always comes immediately before the entry given by ⟨label2⟩ unless the entry occurs at the start of a group. This does nothing by default. -

    The separator between two level 1 entries is given by -


    The separator between two level 1 entries is given by +


    \glsxtrbookindexsubbetween  }{label2}

    -

    -

    The separator between two level 2 entries is given by -


    +

    The separator between two level 2 entries is given by +


    \glsxtrbookindexsubsubbetween  } class="cmtt-10">{⟨label2}

    -

    +

    At the end of each letter group, the following hooks are done in order: -



    \glsxtrbookindexsubsubatendgroup  }

    -

    -


    +


    \glsxtrbookindexsubatendgroup  \glsxtrbookindexsubatendgroup{sub-label}

    -

    -


    +


    \glsxtrbookindexatendgroup  \glsxtrbookindexatendgroup{label}

    -

    +

    where ⟨sub-sub-label⟩ is the label of the last level 2 entry, ⟨sub-label⟩ is the label of the last level 1 entry and ⟨label⟩ is the label of the last level 0 entry. -

    For example, the resource option

    For example, the resource option seealso=omit instructs -

    +
    \renewcommand{\glsxtrbookindexatendgroup}[1]{%  
      \glsxtrifhasfield{seealso}{#1}{\glstreesubitem\glsxtruseseealso{#1}}{}%  
    } @@ -6049,7 +6457,7 @@ appended after the child entries using:  
      \glsxtrbookindexsubsubatendgroup{#1}%  
    }
    -

    This uses

    This uses \glstreesubitem and \glstreesubsubitem to indent the cross-reference according to the next level down, so the cross-reference for a top-level entry is aligned @@ -6059,7 +6467,7 @@ indented a bit further (but it won’t be aligned with any deeper level as t class="cmss-10">bookindex style only supports a maximum of two sub-levels). -

    The

    The bookindex style uses group headings. (If you use bib2gls--group or -g switch.) The heading will use -




    -

    +

    If \pdfbookmark has been defined, this will use that command to bookmark the group title. If \pdfbookmark hasn’t been defined, this command does nothin. -

    The group heading is formatted according to -


    The group heading is formatted according to +


    \glsxtrbookindexformatheader  } -

    +

    which is defined as

    -
    +
    \newcommand*{\glsxtrbookindexformatheader}[1]{%  
      \par{\centering\glstreegroupheaderfmt{#1}\par}%  
    }
    -

    where

    where \glstreegroupheaderfmt is provided by the glossary-tree package, which is automatically loaded. Note that the entry names aren’t encapsulated with \glstreenamefmt. -

    The

    The glossary-bookindex package provides some supplementary commands that aren’t used by default, but may be used when adjusting the style. These commands @@ -6129,35 +6537,35 @@ should only be used within one of the \print…glossary commands. (That is, they should only be used in glossary styles.) -



    \glsxtrbookindexmarkentry  \glsxtrbookindexmarkentry{label}

    -

    +

    This writes information to the .aux file that can be read on the next run to obtain the first and last entry on each page of the glossary. -

    You can display the first entry associated with the current page using: -


    You can display the first entry associated with the current page using: +


    \glsxtrbookindexfirstmark  \glsxtrbookindexfirstmark

    -

    +

    and the last entry associated with the current page using: -



    \glsxtrbookindexlastmark  \glsxtrbookindexlastmark

    -

    +

    These do nothing if there are no entries marked on the current page (or if the document build isn’t up to date). -

    The entry is formatted using: -


    The entry is formatted using: +


    \glsxtrbookindexfirstmarkfmt  \glsxtrbookindexfirstmarkfmt{label}

    -

    +

    for the first instance and -



    \glsxtrbookindexlastmarkfmt  \glsxtrbookindexlastmarkfmt{label}

    -

    +

    for the last. -

    These commands are designed for use in page headers or footers where the page +

    These commands are designed for use in page headers or footers where the page number is stable. For example, \glsxtrbookindexname can be redefined to mark the current entry: @@ -6185,13 +6593,13 @@ current entry:

    -
    +
    \renewcommand{\glsxtrbookindexname}[1]{%  
      \glsxtrbookindexmarkentry{#1}%  
      \glossentryname{#1}%  
    }
    -

    If you only want to mark the top-level entries, remember to redefine +

    If you only want to mark the top-level entries, remember to redefine \glsxtrbookindexsubname as it defaults to \glsxtrbookindexname: @@ -6199,13 +6607,13 @@ class="cmtt-10">\glsxtrbookindexname:

    -
    +
    \renewcommand{\glsxtrbookindexsubname}[1]{%  
      \glossentryname{#1}%  
    }
    -

    -

    Then if you’re using

    +

    Then if you’re using fancyhdr you can set the page style to show the first and last entry for the current page with: @@ -6213,250 +6621,1277 @@ entry for the current page with:

    -
    +
      \pagestyle{fancy}%  
      \lhead{\thepage}%  
      \lfoot{\glsxtrbookindexfirstmark}%  
      \cfoot{}%  
      \rfoot{\glsxtrbookindexlastmark}%
    -

    -

    +

    +

    -

    Top

    2.10 Glossary Style Modifications

    -

    The glossaries-extra-stylemods package (more conveniently loaded through the -glossaries-extra stylemods option) modifies some of the predefined styles that are -provided with the glossaries package. These modifications are described in more detail -in §2.10.3 The glossaries-extra-stylemods Package. -

    The glossaries package tries to determine the group title from its label by first -checking if \labelgroupname exists. If it doesn’t exist, then the title is assumed to be -the same as the label. For example, when typesetting the “A” letter group, glossaries -first checks if \Agroupname exists. This could potentially cause conflict with another -package that may have some other meaning for \Agroupname, so glossaries-extra first -checks for the existence of the internal command \glsxtr@grouptitle@label⟩ -which shouldn’t clash with another package. You can set the group title -using -


    \glsxtrsetgrouptitleglossary-longextra package +

    As from version 1.37, the glossaries-extra package comes with the supplementary +package glossary-longextra that provides additional styles, listed below, that use the +longtable environment. If you know that your glossary won’t span more than a page +and you need to use it in a context that’s incompatible with longtable, you can +instead setup these styles to use tabular instead. In order to do this you must +use +


    \GlsLongExtraUseTabulartrue  \glsxtrsetgrouptitle{label}{title}

    -

    -For example: + id="dx1-15008"> \GlsLongExtraUseTabulartrue


    +

    +before the style is set. For example:

    -
    -\glsxtrsetgrouptitle{A}{A (a)} +
    +\GlsLongExtraUseTabulartrue + 
    \setglossarystyle{long-name-desc}
    -

    This uses a global assignment. If you need to scope the change you can -use -


    \glsxtrlocalsetgrouptitle  \glsxtrlocalsetgrouptitle{label}{title} -

    -

    -

    +

    or + + +

    -

    Top

    2.10.1 Style Hooks

    -

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

    If you want to adapt a style to use another field instead of name, you can -use -


    \glossentrynameother  \glossentrynameother{label}{field}

    -

    -This behaves just like \glossentryname (that is, it obeys glossname, glossnamefont or -\glsnamefont and uses the post-name hook) but it uses the given ⟨field⟩ instead of -name. The ⟨field⟩ argument must be the internal field name (for example desc rather -than description). See the key to field mappings table in the glossaries user -manual. -

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


    \glsxtrpostnamehook  \glsxtrpostnamehook{label +\GlsLongExtraUseTabulartrue + 
    \printunsrtglossary[style={long-name-desc}] +
    +

    If you use this setting, you can change the default vertical alignment with: +


    \glslongextraTabularVAlign  \glslongextraTabularVAlign

    +

    +The default definition is c. +

    The column titles are formatted according to: +


    \glslongextraHeaderFmt  \glslongextraHeaderFmt{text}

    -

    -By default this checks the indexname 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 further details. -

    As from version 1.04, the post-name hook \glsxtrpostnamehook will also use -\glsxtrpostnamecategory⟩ if it exists. You can use \glscurrententrylabel 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” -category: +

    +which simply does \textbf{text} by default. +

    The name column has the title given by \entryname and the column alignment is +given by: +


    \glslongextraNameAlign  \glslongextraNameAlign

    +

    +which expands to l (left) by default. +

    The symbol column (where applicable) has the title given by \symbolname and +the column alignment is given by: +


    \glslongextraSymbolAlign  \glslongextraSymbolAlign

    +

    +which expands to c (centred) by default. +

    The location list column (where applicable) has the title given by \pagelistname +and the column alignment is given by: +


    \glslongextraLocationAlign  \glslongextraLocationAlign

    +

    +which expands to

    -
    -\newcommand*{\glsxtrpostnamesymbol}{\space - 
     (\glsentrysymbol{\glscurrententrylabel})} +
    +>{\raggedright}p{\glspagelistwidth}
    -

    For convenience, as from v1.31, you can use -


    \glsdefpostname

    by default. (Ragged-right paragraph, \glspagelistwidth is defined in glossary-long, +which is automatically loaded.) +

    The description column has the title given by \descriptionname and the column +alignment is given by: +


    \glslongextraDescAlign  \glsdefpostname{category}{definition}

    -

    -This is simply a shortcut for:

    + id="dx1-15020"> \glslongextraDescAlign

    +

    +which expands to + + + +

    +
    +>{\raggedright}p{\glsdescwidth} +
    +

    by default. (Ragged-right paragraph, \glsdescwidth is defined in glossary-long, +which is automatically loaded.) +

    Unlike the long styles provided by the base glossaries package, these new styles try +to determine the value of \glsdescwidth at the start of the glossary according to the +number of columns provided by the style. The calculations are performed by the +following commands: +


    \glslongextraSetDescWidth  \glslongextraSetDescWidth

    +

    +This is used by the styles that have a name and description column. The value of +\glsdescwidth is computed as: +

    +
    +\glsdescwidth = \linewidth- 4\tabcolsep- W
+
    +

    where W is a guess at the width of the name column. This is first set to the width of +the name column header:

    \csdef\settowidth{width}{glsxtrpostnamecategory}{definition} +class="cmtt-10">\glslongextraHeaderFmt\entryname}
    -
    Note that it doesn’t check if the command has already been defined. -

    As from version 1.25, the post-name hook also does -


    \glsextrapostnamehook If any names in that column are larger than this, then you need to specify the widest +name using: +


    \glslongextraSetWidest  \glsextrapostnamehook{label \glslongextraSetWidest{widest name}

    -

    -(before \glsxtrpostnamecategory⟩) to allow for additional non-category related code. -This does nothing by default. -

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


    \glsxtrpostdescription

    +or +


    \glslongextraUpdateWidest  \glsxtrpostdescription

    -

    -This occurs before the original \glspostdescription, so if the nopostdot \glslongextraUpdateWidest{text}


    +

    +These work like the analogous commands \glssetwidest and \glsupdatewidest +provided with the alttree style, but in this case there’s no hierarchy. The default +widest name is obtained from the alttree top-level name if set, otherwise it’s empty, +so you can use bib2gls’s set-widest option. If you have the entry counter enabled, +you will need to include this with the name for the extra material to be taken into +account. +

    The name isn’t shown for child entries by default, but if you change this and you +want to use bib2gls’s set-widest option (for bib2gls v1.8+) then you need to +redefine: + + + +


    \glslongextraUpdateWidestChild  \glslongextraUpdateWidestChild{level} +{text}

    +

    +This does nothing by default, but if you are including the child names then you need +to redefine this command: + + + +

    +
    +\renewcommand{\glslongextraUpdateWidestChild}[2]{% + 
     \glslongextraUpdateWidest{#2}% + 
    } +
    +

    +

    If you prefer to set an explicit width for the description column then you need to +redefine \glslongextraSetDescWidth. For example: + + + +

    +
    +\renewcommand{\glslongextraSetDescWidth}{% + 
      \setlength{\glsdescwidth}{0.6\linewidth}% + 
    } +
    +

    +

    The styles that have a name, symbol and description, \glsdescwidth is set +with: +


    \glslongextraSymSetDescWidth  \glslongextraSymSetDescWidth

    +

    +This first uses \glslongextraSetDescWidth and then subtracts 2\tabcolsep and +the width of the symbol column header from \glsdescwidth. This assumes that the +symbol column header is larger than any of the symbols. If this isn’t appropriate then +you can redefine this command. For example: + + + +

    +
    +\renewcommand{\glslongextraSymSetDescWidth}{% + 
      \glslongextraSetDescWidth + 
      \addtolength{\glsdescwidth}{-3cm}% + 
    } +
    +

    or + + + +

    +
    +\renewcommand{\glslongextraSymSetDescWidth}{% + 
      \setlength{\glsdescwidth}{.5\linewidth}% + 
    } +
    +

    +

    For the styles that have a name, description and location column, \glsdescwidth +is set using: +


    \glslongextraLocSetDescWidth  \glslongextraLocSetDescWidth

    +

    +This uses \glslongextraSetDescWidth and then subtracts 2\tabcolsep and +\glspagelistwidth from \glsdescwidth. You can redefine this command to set +both \glsdescwidth and \glspagelistwidth if appropriate. +

    For the styles that have a name, description, symbol and location column, +\glsdescwidth is set using: +


    \glslongextraSymLocSetDescWidth  \glslongextraSymLocSetDescWidth +

    +

    +This uses \glslongextraSymSetDescWidth and then subtracts 2\tabcolsep and +\glspagelistwidth from \glsdescwidth. Again, you can redefine this command to +explicitly set both lengths. +

    In all cases, the top-level name is formatted according to: +


    \glslongextraNameFmt  \glslongextraNameFmt{label}

    +

    +This does

    +
    +\glsentryitem{label}\glstarget{label}{\glossentryname{label}} +
    +
    which includes the entry counter (if enabled), the target and the post-name +link. +

    The top-level description is formatted according to: +


    \glslongextraDescFmt  \glslongextraDescFmt{label}

    +

    +This does \glossentrydesc{label} followed by the post-description hook. +

    The styles that have a symbol column format the symbol using: +


    \glslongextraSymbolFmt  \glslongextraSymbolFmt{label}

    +

    +This just does \glossentrysymbol{label}. +

    The styles that have a location list column format the list using: +


    \glslongextraLocationFmt  \glslongextraLocationFmt{label}{locations} +

    + + + +

    +This just does ⟨locations⟩ and ignores the label. +

    The child entries have their name formatted according to: +


    \glslongextraSubNameFmt  \glslongextraSubNameFmt{level}{label} +

    +

    +where ⟨level⟩ is the hierarchical level. This defaults to:

    +
    +\glssubentryitem{label}\glstarget{label}{\strut} +
    +
    This includes the sub-entry counter (if enabled) and the target but doesn’t show the +name. The child description is formatted according to: +


    \glslongextraSubDescFmt  \glslongextraSubDescFmt{level}{label} +

    +

    +which defaults to just \glslongextraDescFmt{label} +

    The child symbol is formatted (where appropriate) according to: +


    \glslongextraSubSymbolFmt  \glslongextraSubSymbolFmt{level}{label} +

    +

    +This just does \glslongextraSymbolFmt{label} by default. +

    The styles that have a location list column format the list for child entries +using: +


    \glslongextraLocationFmt  \glslongextraSubLocationFmtlevel{label} +{locations}

    +

    +This just does ⟨locations⟩ and ignores the level and label. +

    The letter group headings are formatted according to: +


    \glslongextraGroupHeading  \glslongextraGroupHeading{n}{label} +

    +

    +which does nothing by default. The first argument ⟨n⟩ is the number of columns in the +table. The second argument ⟨label⟩ is the group label (not the title, although they may +happen to be the same). +

    This can be redefined to show the group heading. For example: + + + +

    +
    +\renewcommand*{\glslongextraGroupHeading}[2]{% + 
      \glsxtrgetgrouptitle{#2}{\thisgrptitle}% + 
      \glslongextraHeaderFmt{\thisgrptitle}% + 
      \tabularnewline + 
      \noalign{\vskip\normalbaselineskip}% + 
    } +
    +

    This ignores the first argument and just puts the group title in the first column +formatted according to \glslongextraHeaderFmt (to match the column +header). +

    Remember that you can also adjust the styles through category attributes. The +name column’s title is given by \entryname, the description column’s title is given by +\descriptionname and (where present) the symbol column’s title is given by +\symbolname, as for the other long styles that have headers. +

    +
    long-name-desc This is like the longragged-booktabs style but doesn’t show the + location list (regardless of the nonumberlist option). The name is shown in + the first column and the description in the second. +

    The symbol is not displayed. The header row is produced with: +


    \glslongextraNameDescHeader  \glslongextraNameDescHeader

    +

    + This essentially uses the same code as for longragged-booktabs but makes it + easier to adjust the header without having to define a new style. This is defined + as: + + + +

    +
    + \glslongextraNameDescTabularHeader\endhead +  
    \glslongextraNameDescTabularFooter\endfoot +
    +

    where: +


    \glslongextraNameDescTabularHeader  \glslongextraNameDescTabularHeader +

    +

    + sets up the header and +


    \glslongextraNameDescTabularFooter  \glslongextraNameDescTabularFooter +

    +

    + sets up the footer. If you have setup the tabular version of this style then the + above two commands are used at the start and end of the tabular environment + (and \glslongextraNameDescHeader isn’t used). +

    For example, to simply remove the header and footer (for the default longtable + version of the style): + + + +

    +
    + \renewcommand{\glslongextraNameDescHeader}{} +
    +

    Or to change the name alignment to centred: + + + +

    +
    + \renewcommand{\glslongextraNameAlign}{c} +
    +

    +

    +
    long-name-desc-loc This is like the long-name-desc style but has a third column for + the location list. The longtable header is given by: +


    \glslongextraNameDescLocationHeader  \glslongextraNameDescLocationHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraNameDescLocationTabularHeader  \glslongextraNameDescLocationTabularHeader +

    +

    + and +


    \glslongextraNameDescLocationTabularFooter  \glslongextraNameDescLocationTabularFooter +

    +

    +

    +
    long-desc-name This is like the long-name-desc style but swaps the columns. Note + that if the entry counter is displayed it will appear at the start of the + second column by default. The longtable header is formatted according + to: +


    \glslongextraDescNameHeader  \glslongextraDescNameHeader

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraDescNameTabularHeader  \glslongextraDescNameTabularHeader +

    +

    + and +


    \glslongextraDescNameTabularFooter  \glslongextraDescNameTabularFooter +

    +

    + + + +

    +
    long-loc-desc-name This has three columns containing the location list, + description and name. The longtable header is formatted according + to: +


    \glslongextraLocationDescNameHeader  \glslongextraLocationDescNameHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraLocationDescNameTabularHeader  \glslongextraLocationDescNameTabularHeader +

    +

    + and +


    \glslongextraLocationDescNameTabularFooter  \glslongextraLocationDescNameTabularFooter +

    +

    +

    +
    long-name-desc-sym This is has three columns, with the name in the first, the + description in the second and the symbol in the third. +

    The longtable header row is produced with: +


    \glslongextraNameDescSymHeader  \glslongextraNameDescSymHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraNameDescSymTabularHeader  \glslongextraNameDescSymTabularHeader +

    +

    + and +


    \glslongextraNameDescSymTabularFooter  \glslongextraNameDescSymTabularFooter +

    +

    +

    +
    long-name-desc-sym-loc This is has four columns, with the name in the first, the + description in the second, the symbol in the third and the location list in the + fourth. +

    The longtable header row is produced with: + + + +


    \glslongextraNameDescSymLocationHeader  \glslongextraNameDescSymLocationHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraNameDescSymLocationTabularHeader  + \glslongextraNameDescSymLocationTabularHeader

    +

    + and +


    \glslongextraNameDescSymLocationTabularFooter  + \glslongextraNameDescSymLocationTabularFooter

    +

    +

    +
    long-name-sym-desc This is like the long-name-desc-sym but the second and third + column are swapped. The longtable header row is given by: +


    \glslongextraNameSymDescHeader  \glslongextraNameSymDescHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraNameSymDescTabularHeader  \glslongextraNameSymDescTabularHeader +

    +

    + and +


    \glslongextraNameSymDescTabularFooter  \glslongextraNameSymDescTabularFooter +

    +

    +

    +
    long-name-sym-desc-loc This is like the long-name-desc-sym-loc but the second and + third column are swapped. The longtable header row is given by: +


    \glslongextraNameSymDescLocationHeader  \glslongextraNameSymDescLocationHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraNameSymDescLocationTabularHeader  + \glslongextraNameSymDescLocationTabularHeader

    + + + +

    + and +


    \glslongextraNameSymDescLocationTabularFooter  + \glslongextraNameSymDescLocationTabularFooter

    +

    +

    +
    long-sym-desc-name This has the symbol in the first column, the description in the + second and the name in the third. The longtable header row is given + by: +


    \glslongextraSymDescNameHeader  \glslongextraSymDescNameHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraSymDescNameTabularHeader  \glslongextraSymDescNameTabularHeader +

    +

    + and +


    \glslongextraSymDescNameTabularFooter  \glslongextraSymDescNameTabularFooter +

    +

    +

    +
    long-loc-sym-desc-name This has the location list in the first column, symbol in the + second column, the description in the third and the name in the fourth. The + longtable header row is given by: +


    \glslongextraLocationSymDescNameHeader  \glslongextraLocationSymDescNameHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraLocationSymDescNameTabularHeader  + \glslongextraLocationSymDescNameTabularHeader

    +

    + and +


    \glslongextraLocationSymDescNameTabularFooter  + \glslongextraLocationSymDescNameTabularFooter

    +

    + + + +

    +
    long-desc-sym-name This has the description in the first column, the symbol in the + second and the name in the third. The longtable header row is given + by: +


    \glslongextraDescSymNameHeader  \glslongextraDescSymNameHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraDescSymNameTabularHeader  \glslongextraDescSymNameTabularHeader +

    +

    + and +


    \glslongextraDescSymNameTabularFooter  \glslongextraDescSymNameTabularFooter +

    +

    +

    +
    long-loc-desc-sym-name This has the location list in the first column, the description + in the second column, the symbol in the third and the name in the fourth. The + longtable header row is given by: +


    \glslongextraLocationDescSymNameHeader  \glslongextraLocationDescSymNameHeader +

    +

    + which similarly defined in terms of the commands used for the tabular + version: +


    \glslongextraLocationDescSymNameTabularHeader  + \glslongextraLocationDescSymNameTabularHeader

    +

    + and +


    \glslongextraLocationDescSymNameTabularFooter  + \glslongextraLocationDescSymNameTabularFooter

    +

    +

    +
    + + + +

    +

    +

    Top

    2.11 Glossary Style Modifications

    +

    The glossaries-extra-stylemods package (more conveniently loaded through the +glossaries-extra stylemods option) modifies some of the predefined styles that are +provided with the glossaries package. These modifications are described in more detail +in §2.11.3 The glossaries-extra-stylemods Package. +

    The glossaries package tries to determine the group title from its label by first +checking if \labelgroupname exists. If it doesn’t exist, then the title is assumed to be +the same as the label. For example, when typesetting the “A” letter group, glossaries +first checks if \Agroupname exists. This could potentially cause conflict with another +package that may have some other meaning for \Agroupname, so glossaries-extra first +checks for the existence of the internal command \glsxtr@grouptitle@label⟩ +which shouldn’t clash with another package. You can set the group title +using +


    \glsxtrsetgrouptitle  \glsxtrsetgrouptitle{label}{title}

    +

    +For example: + + + +

    +
    +\glsxtrsetgrouptitle{A}{A (a)} +
    +

    This uses a global assignment. If you need to scope the change you can +use +


    \glsxtrlocalsetgrouptitle  \glsxtrlocalsetgrouptitle{label}{title} +

    +

    +

    +

    +

    Top

    2.11.1 Style Hooks

    +

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

    If you want to adapt a style to use another field instead of name, you can +use +


    \glossentrynameother  \glossentrynameother{label}{field}

    +

    +This behaves just like \glossentryname (that is, it obeys glossname, glossnamefont or +\glsnamefont and uses the post-name hook) but it uses the given ⟨field⟩ instead of +name. The ⟨field⟩ argument must be the internal field name (for example desc rather +than description). See the key to field mappings table in the glossaries user +manual. +

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


    \glsxtrpostnamehook  \glsxtrpostnamehook{label}

    +

    +By default this checks the indexname 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 further details. +

    As from version 1.04, the post-name hook \glsxtrpostnamehook will also use +\glsxtrpostnamecategory⟩ if it exists. You can use \glscurrententrylabel 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” +category: + + + +

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

    For convenience, as from v1.31, you can use +


    \glsdefpostname  \glsdefpostname{category}{definition}

    +

    +This is simply a shortcut for:

    +
    +\csdef{glsxtrpostnamecategory}{definition} +
    +
    Note that it doesn’t check if the command has already been defined. +

    As from version 1.25, the post-name hook also does +


    \glsextrapostnamehook  \glsextrapostnamehook{label}

    +

    +(before \glsxtrpostnamecategory⟩) to allow for additional non-category related code. +This does nothing by default. +

    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-17020"> 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-17021"> or \glsxtrpostdescacronym for entries with the category set to acronym. For + id="dx1-17022">. For convenience, as from v1.31, you can use -



    \glsdefpostdesc  \glsdefpostdesc{category}{definition}

    -

    +

    This is simply a shortcut for:

    definition}
    Note that it doesn’t check if the command has already been defined. -

    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-17025"> 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 \glspostdescription to do nothing instead of using the nopostdot option to suppress the terminating full stop.) See §2.10.3 The + id="dx1-17026"> option to suppress the terminating full stop.) See §2.11.3 The glossaries-extra-stylemods Package to patch the predefined styles provided by glossaries that are missing \glspostdescription.
    -

    -

    +

    +

    -

    Top

    2.10.2

    Top

    2.11.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-18003"> option redefines \glossaryentrynumbers so that it doesn’t display the number list, but it + id="dx1-18004">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-18007"> 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-18011">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. -

    Note that

    Note that bib2gls can be instructed to insert a prefix at the start of non-empty + id="dx1-18013"> 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.10.3 The

    Top

    2.11.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-19001"> 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-19002">. 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-19004"> 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-19005"> 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-19006"> 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. @@ -6726,23 +8161,23 @@ 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-19009"> option, but the post-description category hook can still be used. -

    The

    The tabular-like styles, such as -like styles, such as long are adjusted so that the are adjusted so that the \ifglsnogroupskip + id="dx1-19013"> conditional (set with nogroupskip) is moved outside of the definition of + id="dx1-19014">) is moved outside of the definition of \glsgroupskip to avoid problems that cause an “Incomplete \iftrue” error with @@ -6752,107 +8187,107 @@ class="cmtt-10">\printnoidxglossary. This means that if you want to change this conditional using \setupglossaries or using the nogroupskip option in + id="dx1-19015"> option in \printglossary, \printnoidxglossary or \printunsrtglossary, you must also reset the glossary style. -

    As from version 1.21, the hard-coded

    As from version 1.21, the hard-coded \space before the number list in many of the predefined styles is replaced with -



    \glsxtrprelocation  \glsxtrprelocation

    -

    +

    This just defaults to \space but may be redefined as required. For example:

    -
    +
    \renewcommand{\glsxtrprelocation}{\dotfill}
    -

    -

    The

    +

    The list styles use -


    styles use +


    \glslistprelocation  \glslistprelocation

    -

    +

    (which defaults to \glsxtrprelocation) for top-level items and -



    \glslistchildprelocation  \glslistchildprelocation

    -

    +

    (which defaults to \glslistprelocation) for child items. -

    As from v1.31, the description (including the post-description hook) is governed +

    As from v1.31, the description (including the post-description hook) is governed by: -



    \glslistdesc  \glslistdesc{label}

    -

    +

    for the list and and altlist styles (but not the styles (but not the listdotted variations). -

    For just the variations). +

    For just the list style and its letter group variations (not the style and its letter group variations (not the altlist or or listdotted + id="dx1-19027"> variations) the number list for child entries is followed by -



    \glslistchildpostlocation  \glslistchildpostlocation

    -

    +

    which defaults to a full stop. -

    The default value of

    The default value of \glslistdottedwidth is changed so that it’s set at the start + id="dx1-19030"> 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. -

    The

    The glossary-tree package introduced two new commands in package introduced two new commands in glossaries version 4.22, + id="dx1-19032"> version 4.22, \glstreegroupheaderfmt and and \glstreenavigationfmt, which are used to format + id="dx1-19034">, which are used to format the letter group headings and the navigation elements for the appropriate styles. These two new commands are defined in terms of \glstreenamefmt since that was + id="dx1-19035"> since that was the command originally used for the group headings and navigation. This now allows these different elements to be defined independently, but the most common redefinition is for \glstreenamefmt has been defined, as from v1.31 glossaries-extra-stylemods + id="dx1-19036"> defines: -



    \glstreedefaultnamefmt  \glstreedefaultnamefmt{text}

    -

    +

    which simply does \textbf{text\glstreenamefmt without affecting the other two commands, you now can. -

    The

    The index-like and -like and tree-like styles insert the pre--like styles insert the pre-number list space with -



    \glstreeprelocation  \glstreeprelocation

    -

    +

    (which defaults to \glsxtrprelocation) for top-level items and -



    \glstreechildprelocation  \glstreechildprelocation

    -

    +

    (which defaults to \glstreeprelocation) for child items. -

    As from version 1.31, the

    As from version 1.31, the glossaries-extra-stylemods package also provides: -



    \glstreenonamedesc  \glstreenonamedesc{label}

    -

    +

    which is used by the treenoname styles to display the pre-description separator, the + id="dx1-19044"> styles to display the pre-description separator, the description and the post-description hook. Similarly for the symbol: -



    \glstreenonamesymbol  \glstreenonamesymbol{label}

    -

    +

    The above are just used for top-level entries. Child entries don’t have the name or symbol displayed for the treenoname styles, so there’s only a command for the child + id="dx1-19046"> styles, so there’s only a command for the child description: -



    \glstreenonamechilddesc  \glstreenonamechilddesc{label}

    -

    -

    For the

    +

    For the tree styles (but not the styles (but not the treenoname or or alttree styles), the description is + id="dx1-19050"> styles), the description is displayed using: -



    \glstreedesc  \glstreedesc{label}

    -

    +

    and the symbol with: -



    \glstreesymbol  \glstreesymbol{label}

    -

    +

    Again the above two commands are just for top-level entries. The child entries use: -



    \glstreechilddesc  \glstreechilddesc{label}

    -

    +

    for the description and -



    \glstreechildsymbol  \glstreechildsymbol{label}

    -

    +

    for the symbol. -

    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-19055"> style to make it easier to modify. These commands are only defined if the glossary-tree package has already been loaded, + id="dx1-19056"> package has already been loaded, which is typically the case unless the notree option has been used when loading + id="dx1-19057"> option has been used when loading glossaries. -



    \gglssetwidest  \gglssetwidest[level]{name}

    -

    +

    (New to version 1.21.) This is like \glssetwidest (provided by glossary-tree) but + id="dx1-19059">) but performs a global assignment. -



    \eglssetwidest  \eglssetwidest[level]{}

    -

    +

    This is like \glssetwidest but performs a protected expansion on ⟨name⟩. This has a localised effect. For a global setting, use -



    \xglssetwidest  \xglssetwidest[level]{name}

    -

    +

    The following only set the value if ⟨name⟩ is wider than the current value (new to version 1.23). Local update: -



    \glsupdatewidest  \glsupdatewidest[level]{name}

    -

    +

    Global update: -



    \gglsupdatewidest  \gglsupdatewidest[level]{name}

    -

    +

    Locale update (expands ⟨name⟩): -



    \eglsupdatewidest  \eglsupdatewidest[level]{name}

    -

    +

    Global update (expands ⟨name⟩): -



    \xglsupdatewidest  \xglsupdatewidest[level]{name}

    -

    -

    The widest entry value can later be retrieved using -


    +

    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. -

    Note that if you are using

    Note that if you are using bib2gls, you can use the resource option , you can use the resource option set-widest which will try to determine the widest name of all the selected entries. This isn’t guaranteed to work as it may depend on fonts or commands that bib2gls + id="dx1-19071"> can’t replicate, but it should be suitable for names that just consist of text, and can be more efficient than iterating over all the defined entries using TEX. -

    The command

    The command \glsfindwidesttoplevelname provided by glossary-tree has a + id="dx1-19072"> 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-19075"> 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-19077"> 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-19086">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 [glossary list]{register}

    -

    +

    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-19094"> 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-19097"> 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 @@ -7391,19 +8826,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-20004"> attribute will automatically insert full stops (periods) into ⟨short⟩ or the noshortplural attribute will set the default + id="dx1-20005"> 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.7 Nested Links regarding the pitfalls of using commands like \gls or + id="dx1-20007"> 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.8 Acronym Style Modifications) so -



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

    -

    +

    is now equivalent @@ -7505,7 +8940,7 @@ class="cmtt-10">}
    -

    The

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

    The way the abbreviations are displayed by commands like

    The way the abbreviations are displayed by commands like \gls varies according to the abbreviation style. The styles are set according to the entry’s category so, unlike the base glossaries package, you can have different abbreviation styles within the same glossary. -

    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-20017"> and the inline full form, which is used by commands like \glsxtrfull. For some of the abbreviation styles, such as + id="dx1-20018">. 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-20019">, 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-20021">, 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-20024"> or longplural fields, which means they won’t be used within commands like + id="dx1-20025"> 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-20026"> and the case-changing variants don’t use \glsfirstlongfont. -

    You can apply the formatting command used for the short form to some arbitrary +

    You can apply the formatting command used for the short form to some arbitrary text using -



    \glsuseabbrvfont  \glsuseabbrvfont{text}{category}

    -

    +

    where ⟨category⟩ is the category label that identifies the abbreviation style. Similarly for the formatting command use by the long form: -



    \glsuselongfont  \glsuselongfont{text}{category}

    -

    +

    -

    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} @@ -7614,9 +9049,9 @@ 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 @@ -7626,23 +9061,23 @@ behaviour of this command within the document is to simply do its argument, but the glossary it’s activated for those categories that have the tagging attribute set to + id="dx1-21002"> 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 @@ -7651,39 +9086,39 @@ 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-21005"> 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-21007"> 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 @@ -7695,28 +9130,28 @@ 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-21008"> 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 @@ -7729,22 +9164,22 @@ 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-22004"> 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-22006"> (see §2.8 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-22007">, but don’t use the acronym commands like \acrshort (which use (which use \acronymfont). + id="dx1-22009">). 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.) -

    In general, it’s best not to use commands like .) +

    In general, it’s best not to use commands like \glsfirst for abbreviations, + id="dx1-22016"> for abbreviations, especially if you use the ⟨insert⟩ optional argument. Use either \gls (possibly with a reset) or \glsxtrfull.
    -

    -

    As mentioned earlier, the inline full form may not necessarily match the format +

    +

    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-22018"> style only displays the short form on first use, but the full form will display the long form followed by the + id="dx1-22019">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]{label}[insert]

    -

    -

    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 @@ -8056,32 +9491,32 @@ 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) or ) or shortcuts=ac. (You can use + id="dx1-23003">. (You can use both settings at the same time.) The provided shortcut commands listed in table 3.1. @@ -8090,7 +9525,7 @@ href="#tab:abbrshortcuts">table 3.1. -


    @@ -8098,7 +9533,7 @@ href="#tab:abbrshortcuts">table 3.1.
    Table 3.1: Abbreviation Shortcut Commands
    +class="content">Abbreviation Shortcut Commands
    (shortcuts=abbreviation) + id="dx1-23009"> + id="dx1-23012"> + id="dx1-23015"> + id="dx1-23018"> + id="dx1-23021"> + id="dx1-23024"> + id="dx1-23027"> + id="dx1-23030"> + id="dx1-23033"> + id="dx1-23036"> + id="dx1-23039"> + id="dx1-23042"> + id="dx1-23045"> + id="dx1-23048"> + id="dx1-23051"> + id="dx1-23054"> + id="dx1-23057"> + id="dx1-23060"> + id="dx1-23063"> + id="dx1-23066"> + id="dx1-23069"> + id="dx1-23072"> + id="dx1-23075"> + id="dx1-23078">
    (shortcuts=ac)
    \ab \ac \cgls
    \abp \acp \cglspl
    \as \acs \glsxtrshort
    \asp \acsp \glsxtrshortpl
    \al \acl \glsxtrlong
    \alp \aclp \glsxtrlongpl
    \af \acf \glsxtrfull
    \afp \acfp \glsxtrfullpl
    \Ab \Ac \cgls
    \Abp \Acp \cglspl
    \As \Acs \Glsxtrshort
    \Asp \Acsp \Glsxtrshortpl
    \Al \Acl \Glsxtrlong
    \Alp \Aclp \Glsxtrlongpl
    \Af \Acf \Glsxtrfull
    \Afp \Acfp \Glsxtrfullpl
    \AB \AC \cGLS
    \ABP \ACP \cGLSpl
    \AS \ACS \GLSxtrshort
    \ASP \ACSP \GLSxtrshortpl
    \AL \ACL \GLSxtrlong
    \ALP \ACLP \GLSxtrlongpl
    \AF \ACF \GLSxtrfull
    \AFP \ACFP \GLSxtrfullpl
    \newabbr \newabbr \newabbreviation
    + id="dx1-23081">

    -

    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-24002">) 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-24005"> 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-24009"> 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-24011"> and long fields are set as appropriate and may be accessed through commands like + id="dx1-24012"> 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-24015"> and text fields (and their plural forms) are set and can be accessed through + id="dx1-24016"> 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-24017">, which instead use the short form (stored in the short key) and the display full + id="dx1-24018"> key) and the display full format (through commands like \glsxtrfullformat that are defined by the + id="dx1-24019"> 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-24021"> may not match the text produced by \glsfirst (and likewise for the plural and case-changing versions). -

    The sample file (and likewise for the plural and case-changing versions). +

    The sample file sample-abbr-styles.tex demonstrates all predefined styles described here. -

    For the “sc” styles that use

    For the “sc” styles that use \textsc, be careful about your choice of fonts as + id="dx1-24023">, 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 parenthetical styles, such as

    +

    The parenthetical styles, such as long-short, use -


    , use +


    \glsxtrparen  \glsxtrparen{text}

    -

    +

    to set the parenthetical material. This just puts parentheses around the text: (⟨text⟩). -

    The basic abbreviation styles, such as

    The basic abbreviation styles, such as long-short and and short-long use -


    use +


    \glsabbrvdefaultfont  \glsabbrvdefaultfont{text}

    -

    +

    for the short form. This just does ⟨text⟩ by default. (That is, no font change is applied.) On first use, -



    \glsfirstabbrvdefaultfont  \glsfirstabbrvdefaultfont{text}

    -

    +

    is used instead. By default, this just does \glsabbrvdefaultfont. The long form is formatted according to -



    \glslongdefaultfont  \glslongdefaultfont{text}

    -

    +

    which again just does ⟨text⟩ (no font change). On first use, -



    \glsfirstlongdefaultfont  \glsfirstlongdefaultfont{text}

    -

    +

    is used instead. This just does \glslongdefaultfont. The plural suffix used for the short form is given by -



    \glsxtrabbrvpluralsuffix  \glsxtrabbrvpluralsuffix

    -

    +

    which defaults to \glspluralsuffix. -

    The small-cap styles, such as . +

    The small-cap styles, such as long-short-sc and and short-sc-long, use -


    , use +


    \glsabbrvscfont  \glsabbrvscfont{text}

    -

    +

    which uses \textsc.3.1 + id="x1-24038f1"> On first use -



    \glsabbrvdefaultfont  \glsfirstabbrvscfont{text}

    -

    +

    is used instead. This uses \glsabbrvscfont by default. So redefine, \glsabbrvscfont to change first and subsequent uses or \glsfirstabbrvscfont to change just the first use. -

    The long form for the small-cap styles uses

    The long form for the small-cap styles uses \glslongdefaultfont or \glsfirstlongdefaultfont, as with the basic style. The suffix is given by -



    \glsxtrscsuffix  \glsxtrscsuffix

    -

    +

    This is defined as

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

    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-24042"> 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-24044"> attributes. See §5 Categories for further details.) -

    The small styles, such as

    The small styles, such as long-short-sm and and short-sm-long, use -


    , use +


    \glsabbrvsmfont  \glsabbrvsmfont{text}

    -

    +

    which uses \textsmaller. (This requires the relsizes package, which isn’t loaded by + id="dx1-24048"> package, which isn’t loaded by glossaries-extra, so must be loaded explicitly.) On first use -



    \glsfirstabbrvsmfont  \glsfirstabbrvsmfont{text}

    -

    +

    is used instead. This uses \glsabbrvsmfont by default. -

    The long form for the smaller styles uses

    The long form for the smaller styles uses \glslongdefaultfont or \glsfirstlongdefaultfont, as with the basic style. The suffix is given by -



    \glsxtrsmsuffix  \glsxtrsmsuffix

    -

    +

    which defaults to just \glsxtrabbrvpluralsuffix. -

    The “short-em” (emphasize short) styles, such as

    The “short-em” (emphasize short) styles, such as long-short-em or or short-em-long, + id="dx1-24052">, use -



    \glsabbrvemfont  \glsabbrvemfont{text}

    -

    +

    On first use -



    \glsfirstabbrvemfont  \glsfirstabbrvemfont{text}

    -

    +

    is used instead. This uses \glsabbrvemfont by default. The suffix is given by -



    \glsxtremsuffix  \glsxtremsuffix

    -

    +

    which defaults to just \glsxtrabbrvpluralsuffix. The long form is as for the basic style unless the style is a “long-em” style. -

    The “long-em” (emphasize long) styles, such as

    The “long-em” (emphasize long) styles, such as long-em-short-em or or short-em-long-em, + id="dx1-24057">, 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. -

    The user styles have similar commands: -


    The user styles have similar commands: +


    \glsabbrvuserfont  \glsabbrvuserfont{text}

    -

    +

    for the short form, -



    \glsfirstabbrvuserfont  \glsfirstabbrvuserfont{text}

    -

    +

    for the first use short form, -



    \glslonguserfont  \glslonguserfont{text}

    -

    +

    for the long form, -



    \glsfirstlonguserfont  \glsfirstlonguserfont{text}

    -

    +

    for the first use long form, and -



    \glsxtrusersuffix  \glsxtrusersuffix

    -

    +

    for the short plural suffix. -

    Similarly for the hyphen styles: -


    Similarly for the hyphen styles: +


    \glsabbrvhyphenfont  \glsabbrvhyphenfont{text}

    -

    +

    for the short form, -



    \glsfirstabbrvhyphenfont  \glsfirstabbrvhyphenfont{text}

    -

    +

    for the first use short form, -



    \glslonghyphenfont  \glslonghyphenfont{text}

    -

    +

    for the long form, -



    \glsfirstlonghyphenfont  \glsfirstlonghyphenfont{text}

    -

    +

    for the first use long form, and -



    \glsxtrhyphensuffix  \glsxtrhyphensuffix

    -

    +

    for the short plural suffix. -

    Similarly for the “only” styles, such as

    Similarly for the “only” styles, such as long-only-short-only: -


    : +


    \glsabbrvonlyfont  \glsabbrvonlyfont{text}

    -

    +

    for the short form, -



    \glsfirstabbrvonlyfont  \glsfirstabbrvonlyfont{text}

    -

    +

    for the first use short form, -



    \glslongonlyfont  \glslongonlyfont{text}

    -

    +

    for the long form, -



    \glsfirstlongonlyfont  \glsfirstlongonlyfont{text}

    -

    +

    for the first use long form, and -



    \glsxtronlysuffix  \glsxtronlysuffix

    -

    +

    for the short plural suffix. -

    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-24077">, the inserted text would be placed inside the font command for the short form (rather than the long form in the above example). -

    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 @@ -8935,49 +10370,49 @@ convert its argument to lowercase. For example:

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

    -

    If you want to easily switch between the “sc” and “sm” styles, you may find it +

    +

    If you want to easily switch between the “sc” and “sm” styles, you may find it easier to redefine this command to convert case:

    -
    +
    \renewcommand*{\glsabbrvscfont}[1]{\textsc{\MakeTextLowercase{#1}}}  
    \renewcommand*{\glsabbrvsmfont}[1]{\textsmaller{\MakeTextUppercase{#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 ⟨field1⟩ or ⟨field2⟩ starts with “no” then that element is omitted from the display style (no parenthetical part) 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. The special modifier -only indicates that field is only present according to whether or not the entry has been used. -

      If

      If post is present then ⟨field2⟩ is placed after the link-text using the post-link hook. -

      If the

      If the -user part is present, then the user1 value, if provided, is inserted + id="dx1-24080"> 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-24082">: 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-24083">: 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-24085"> key has been set, this produces the style ⟨long⟩ (⟨short⟩, ⟨short⟩).
      • long-hyphen-postshort-hyphen: the short form and the inserted + id="dx1-24086">: the short form and the inserted material (provided by the final optional argument of commands like \gls) is moved to the post-link hook. The long form is formatted @@ -9072,31 +10507,31 @@ class="cmtt-10">\glsfirstabbrvhyphenfont on first
      • style-noreg -

        Some styles set the

        Some styles set the regular attribute. In some cases, there’s a version of the + id="dx1-24087"> attribute. In some cases, there’s a version of the style that doesn’t set this attribute. For example, long-em-noshort-em sets the + id="dx1-24088"> sets the regular attribute. The attribute. The long-em-noshort-em-noreg style is a minor variation that + id="dx1-24090"> style is a minor variation that style that doesn’t set the attribute. -

        There are a few “noshort” styles, such as

        There are a few “noshort” styles, such as long-hyphen-noshort-noreg, that have + id="dx1-24091">, that have “-noreg” version without a regular version. This is because the style won’t work properly with the regular set, but the naming scheme is maintained for + id="dx1-24092"> set, but the naming scheme is maintained for consistency with the other “noshort” styles.

      • 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-24094">: 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-24095">: 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 + id="dx1-24096">link-text.
      +

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

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

    +

  • style-desc -

    Like ⟨

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

    Examples:

    +

    Examples:

  • -

    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-25001"> attribute to “true” for all categories 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 the + id="dx1-25004"> is set to the short form through the command -



    \glsxtrshortnolongname  \glsxtrshortnolongname

    -

    +

    (Similarly for the other shortmodifier\newacronym) for it to take effect. Make sure to \protect any formatting commands (or anything else that shouldn’t be expanded). -

    The

    The description is set to the long form. The inline full form displays ⟨ 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-25007">.

    short
    A synonym for short-nolong. + id="dx1-25009">.
    nolong-short
    Like short-nolong but the inline full form displays ⟨ but the inline full form displays ⟨long⟩ (⟨short⟩).
    short-sc-nolong
    Like short-nolong but redefines but redefines \glsabbrvfont to use \glsabbrvscfont (which defaults to (which defaults to \textsc).
    short-sc
    A synonym for short-sc-nolong + id="dx1-25016"> @@ -9289,11 +10724,11 @@ class="cmss-10">short-sc-nolongnolong-short-sc
    Like short-sc-nolong but the inline full form displays ⟨ but the inline full form displays ⟨long⟩ (⟨short⟩). The name is still obtained from modifier⟩ unless indicated short-sm-nolong
    Like short-nolong but redefines but redefines \glsabbrvfont to use \glsabbrvsmfont (which defaults to (which defaults to \textsmaller).
    short-sm
    A synonym for short-sm-nolong. + id="dx1-25023">.
    nolong-short-sm
    Like short-sm-nolong but the inline full form displays ⟨ but the inline full form displays ⟨long⟩ (⟨short⟩). @@ -9343,33 +10778,33 @@ class="cmti-10">short⟩). short-em-nolong
    Like short-nolong but redefines but redefines \glsabbrvfont to use \glsabbrvemfont. + id="dx1-25028">.
    short-em
    A synonym for short-em-nolong + id="dx1-25030">
    nolong-short-em
    Like short-em-nolong but the inline full form displays ⟨ but the inline full form displays ⟨long⟩ (⟨short⟩). @@ -9377,20 +10812,20 @@ class="cmti-10">short⟩). short-nolong-desc
    Like the short-nolong style, but the style, but the name is set to the full form + id="dx1-25035"> is set to the full form obtained by expanding -



    \glsxtrshortdescname  \glsxtrshortdescname

    -

    +

    (Similarly for the other shortmodifier\protect fragile and formatting commands and only redefin before \newabbreviation (or \newacronym). -

    The

    The description must be supplied by the user. You may prefer to use + id="dx1-25037"> 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-25038"> style with the post-description hook set to display the long form and override the description key. (See the sample file + id="dx1-25039"> key. (See the sample file sample-acronym-desc.tex.)

    short-desc
    A synonym for short-nolong-desc. + id="dx1-25041">.
    short-sc-nolong-desc
    Like short-nolong but redefines but redefines \glsabbrvfont to use \glsabbrvscfont (which defaults to (which defaults to \textsc). @@ -9445,83 +10880,83 @@ class="cmtt-10">\textsc). short-sc-desc
    A synonym for short-sc-nolong-desc. + id="dx1-25046">.
    short-sm-nolong-desc
    Like short-nolong-desc but redefines but redefines \glsabbrvfont to use \glsabbrvsmfont (which defaults to (which defaults to \textsmaller).
    short-sm-desc
    A synonym for short-sm-nolong-desc. + id="dx1-25051">.
    short-em-nolong-desc
    Like short-nolong-desc but redefines but redefines \glsabbrvfont to use \glsabbrvemfont. + id="dx1-25054">.
    short-em-desc
    A synonym for short-em-nolong-desc. + id="dx1-25056">.
    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-25058">. The short form may be accessed through commands like \glsxtrshort. The inline full form displays ⟨. The inline full form displays ⟨long⟩ (⟨short⟩). -

    The

    The sort key are set to the long form. The key are set to the long form. The name key is also set to the long form, + id="dx1-25061"> key is also set to the long form, but this is done by expanding -



    \glsxtrlongnoshortdescname  \glsxtrlongnoshortdescname

    -

    +

    (Similarly for the other longmodifier-desc styles, unless indicated otherwise.) This command should only be redefined before abbreviations are defined, and any fragile or formatting commands within it need protecting. -

    The

    The description must be provided by the user. The predefined glossary styles + id="dx1-25063"> 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-25065">.
    long-noshort-sc-desc
    Like the long-noshort-desc style but the short form (accessed + id="dx1-25067"> style but the short form (accessed through commands like \glsxtrshort) use ) use \glsabbrvscfont. (This style was + id="dx1-25069">. (This style was originally called long-desc-sc. Renamed in version 1.04, but original name + id="dx1-25070">. 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 \glsabbrvsmfont. (This style was originally called . (This style was originally called long-desc-sm. Renamed in + id="dx1-25074">. Renamed in version 1.04, but original name retained as a deprecated synonym for backward-compatibility.) @@ -9590,60 +11025,60 @@ class="cmss-10">long-desc-smlong-noshort-em-desc
    Like long-noshort-desc but redefines but redefines \glsabbrvfont to use \glsabbrvemfont. The long form isn’t emphasized. (This style was originally + id="dx1-25077">. The long form isn’t emphasized. (This style was originally called long-desc-em. Renamed in version 1.04, but original name retained as a + id="dx1-25078">. 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-25080"> but redefines \glsabbrvfont to use \glsabbrvemfont. The long form uses + id="dx1-25081">. The long form uses \glsfirstlongemfont and and \glslongemfont. + id="dx1-25083">.
    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 sort key is set to the short + id="dx1-25086"> key is set to the short form. The name key is also set to the short form, but this is done by + id="dx1-25087"> key is also set to the short form, but this is done by expanding -



    \glsxtrlongnoshortname  \glsxtrlongnoshortname

    -

    +

    (Similarly for other longmodifier-noshortmodifier⟩ styles, unless indicated otherwise.) This command should only be redefined before abbreviations are defined, and fragile or formatting commands should be protected. -

    The

    The description is set to the long form. + id="dx1-25089"> is set to the long form.

    long
    A synonym for long-noshort + id="dx1-25091">
    long-noshort-sc
    Like the long-noshort style but the short form (accessed through + id="dx1-25093"> style but the short form (accessed through commands like \glsxtrshort) use ) use \glsabbrvscfont. (This style was originally + id="dx1-25095">. (This style was originally called long-sc. Renamed in version 1.04, but original name retained as a + id="dx1-25096">. 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 \glsabbrvsmfont. (This style was originally called . (This style was originally called long-sm. Renamed in + id="dx1-25100">. 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 \glsabbrvemfont. The long form isn’t emphasized. (This style was originally + id="dx1-25103">. The long form isn’t emphasized. (This style was originally called long-em. Renamed in version 1.04, but original name retained as a + id="dx1-25104">. 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 redefines + id="dx1-25106"> but redefines \glsabbrvfont to use \glsabbrvemfont, , \glsfirstlongfont to use \glsfirstlongemfont and \glslongfont to use \glslongemfont. The short form isn’t used by commands like \gls, but can be obtained using + id="dx1-25108">, but can be obtained using \glsxtrshort. The related style . The related style long-em-noshort-em-noreg doesn’t set the + id="dx1-25110"> doesn’t set the regular attribute. + id="dx1-25111"> attribute.
    -

    +

    -

    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-26001"> 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 sort key is set to the short form. The key is set to the short form. The name + id="dx1-26005"> is also set to the short form through -



    \glsxtrlongshortname  \glsxtrlongshortname

    -

    +

    (Similarly for other longmodifiermodifier⟩ styles, unless indicated class="cmtt-10">\the\glslongtok and the short form can be referenced with \the\glsshorttok. -

    The

    The description is set to the long form. The long and short forms are separated + id="dx1-26007"> 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-26008"> style.

    long-short-sc
    Like long-short but redefines but redefines \glsabbrvfont to use \glsabbrvscfont. + id="dx1-26011">.
    long-short-sm
    Like long-short but redefines but redefines \glsabbrvfont to use \glsabbrvsmfont. + id="dx1-26014">.
    long-short-em
    Like long-short but redefines but redefines \glsabbrvfont to use \glsabbrvemfont. + id="dx1-26017">.
    long-em-short-em
    New to version 1.04, this style is like long-short-em but redefines + id="dx1-26019"> but redefines \glsfirstlongfont to use \glsfirstlongemfont. + id="dx1-26020">. @@ -9860,20 +11295,20 @@ class="cmtt-10">\glsfirstlongemfontlong-only-short-only
    New to version 1.17, this style only shows the long form on first use and only shows the short form on subsequent use. The inline full form \glsxtrfull shows the long form followed by the short form in parentheses. The name field is obtained from -


    field is obtained from +


    \glsxtronlyname  \glsxtronlyname

    -

    +

    Any redefinition of this command must come before the abbreviations are defined as it expands on definition. Make sure you protect any commands that shouldn’t be expanded. The long form can be referenced @@ -9885,21 +11320,21 @@ class="cmtt-10">\the\glsshorttok. long-only-short-only-desc

    New to version 1.17, this style is like long-only-short-only + id="dx1-26025"> but the user must supply the description. The name field is obtained + id="dx1-26026"> field is obtained from -



    \glsxtronlydescname  \glsxtronlydescname

    -

    +

    Any redefinition of this command must come before the abbreviations are defined as it expands on definition. Make sure you protect any commands that shouldn’t be expanded. The long form can be referenced @@ -9911,41 +11346,41 @@ class="cmtt-10">\the\glsshorttok. long-em-noshort-em-noreg

    New to version 1.17, this style is like long-em-noshort-em + id="dx1-26029"> but doesn’t set the regular attribute. + id="dx1-26030"> attribute.
    long-short-user
    This style was introduced in version 1.04. It’s like the long-short style + id="dx1-26032"> 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-26035"> style and produces ⟨long⟩ (⟨short⟩) but if the field has been set, the contents of that field are inserted @@ -9954,53 +11389,53 @@ 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-26037"> style) or the long form (for the short-long-user style). This command first inserts a space using + id="dx1-26038"> style). This command first inserts a space using \glsxtrfullsep and then the parenthetical content (using \glsxtrparen). + id="dx1-26039">). The description is set to -


    is set to +


    \glsuserdescription  \glsuserdescription{long}{label}

    -

    +

    The default definition ignores the ⟨label⟩ and encapsulates ⟨long⟩ with \glslonguserfont. -

    The

    The name is obtained by expanding is obtained by expanding \glsxtrlongshortname (see above). The ⟨text⟩ argument includes the font formatting command, 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-26044"> 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-26047"> style:

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

    +

    long-noshort-noreg
    This style is like long-noshort but it doesn’t set the but it doesn’t set the regular + id="dx1-26050"> attribute.
    long-noshort-desc-noreg
    This style is like long-noshort-desc but it doesn’t set the + id="dx1-26052"> but it doesn’t set the regular attribute. + id="dx1-26053"> attribute.
    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-26056"> 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 + id="dx1-26059"> must be supplied by the user. The long and short forms are separated by \glsxtrfullsep. The name field is obtained + id="dx1-26060"> field is obtained from -



    \glsxtrlongshortdescname  \glsxtrlongshortdescname

    -

    +

    (Similarly for other longmodifier\the\glsshorttok. long-short-sc-desc

    Like long-short-desc but redefines but redefines \glsabbrvfont to use \glsabbrvscfont. + id="dx1-26064">.
    long-short-sm-desc
    Like long-short-desc but redefines but redefines \glsabbrvfont to use \glsabbrvsmfont. + id="dx1-26067">.
    long-short-em-desc
    Like long-short-desc but redefines but redefines \glsabbrvfont to use \glsabbrvemfont. + id="dx1-26070">.
    long-em-short-em-desc
    New to version 1.04, this style is like long-short-em-desc but + id="dx1-26072"> but redefines \glsfirstlongfont to use \glsfirstlongemfont. + id="dx1-26073">.
    long-em-noshort-em-desc-noreg
    New to version 1.17, this style is like long-em-noshort-em-desc but doesn’t set the but doesn’t set the regular attribute. + id="dx1-26076"> attribute.
    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 + id="dx1-26079"> style. The display and inline forms are as for long-short-user and the and the name key is obtained + id="dx1-26081"> key is obtained from -



    \glsxtrlongshortuserdescname  \glsxtrlongshortuserdescname

    -

    +

    Again, this should only be redefined before \newabbreviation (or \newacronym), and fragile and formatting commands need protecting. -

    The

    The description key must be supplied in the optional argument of + id="dx1-26083"> 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 style. + id="dx1-26085"> style.

    short-nolong-noreg
    This is like short-nolong but doesn’t set the but doesn’t set the regular attribute. + id="dx1-26088"> attribute.
    nolong-short-noreg
    This is like nolong-short but doesn’t set the but doesn’t set the regular attribute. + id="dx1-26091"> attribute.
    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-26095"> keys are set to the short form. The description is set to the long form. The short and long + id="dx1-26096"> 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-26097"> style. -

    The

    The name field is obtained from -


    field is obtained from +


    \glsxtrshortlongname  \glsxtrshortlongname

    -

    +

    (Similarly for other shortmodifier\the\glsshorttok. short-sc-long

    Like short-long but redefines but redefines \glsabbrvfont to use \glsabbrvscfont. + id="dx1-26102">.
    short-sm-long
    Like short-long but redefines but redefines \glsabbrvfont to use \glsabbrvsmfont. + id="dx1-26105">.
    short-em-long
    Like short-long but redefines but redefines \glsabbrvfont to use \glsabbrvemfont. + id="dx1-26108">.
    short-em-long-em
    New to version 1.04, this style is like short-em-long but redefines + id="dx1-26110"> but redefines \glsfirstlongfont to use \glsfirstlongemfont. + id="dx1-26111">.
    short-long-user
    New to version 1.04. This style is like the long-short-user style but + id="dx1-26113"> style but with the long and short forms switched. The parenthetical material is governed by the same command \glsxtruserparen, but the first argument supplied to it + id="dx1-26114">, but the first argument supplied to it is the long form instead of the short form. The name field is obtained by + id="dx1-26115"> field is obtained by expanding -



    \glsxtrshortlongname  \glsxtrshortlongname

    -

    +

    Again, this should only be redefined before \newabbreviation (or \newacronym) and commands that should be expanded need to be protected. The description is set to is set to \glsuserdescription{long}{}. short-nolong-desc-noreg

    This style is like short-nolong-desc but it doesn’t set the + id="dx1-26119"> but it doesn’t set the regular attribute. + id="dx1-26120"> attribute.
    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 + id="dx1-26123"> is set to the full form. The description must be supplied by the user. The short and long + id="dx1-26124"> must be supplied by the user. The short and long forms are separated by \glsxtrfullsep. The name field is obtained + id="dx1-26125"> field is obtained from -



    \glsxtrshortlongdescname  \glsxtrshortlongdescname

    -

    +

    (Similarly for other shortmodifier\the\glsshorttok. short-sc-long-desc

    Like short-long-desc but redefines but redefines \glsabbrvfont to use \glsabbrvscfont. + id="dx1-26129">.
    short-sm-long-desc
    Like short-long-desc but redefines but redefines \glsabbrvfont to use \glsabbrvsmfont. + id="dx1-26132">.
    short-em-long-desc
    Like short-long-desc but redefines but redefines \glsabbrvfont to use \glsabbrvemfont. + id="dx1-26135">.
    short-em-long-em-desc
    New to version 1.04, this style is like short-em-long-desc but + id="dx1-26137"> but redefines \glsfirstlongfont to use \glsfirstlongemfont. + id="dx1-26138">.
    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 + id="dx1-26141"> style. The display and inline forms are as for short-long-user, but the , but the name key is obtained + id="dx1-26143"> key is obtained from -



    \glsxtrshortlonguserdescname  \glsxtrshortlonguserdescname

    -

    +

    Again, this should only be redefined before \newabbreviation (or \newacronym), and fragile and formatting commands need protecting. -

    The

    The description key must be supplied in the optional argument of + id="dx1-26145"> key must be supplied in the optional argument of \newabbreviation (or \newacronym). @@ -10578,36 +12013,36 @@ class="cmtt-10">\newacronym). short-footnote

    On 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-26148"> attribute to “true” for the supplied category, so the first use won’t be hyperlinked (but the footnote + id="dx1-26149">first use won’t be hyperlinked (but the footnote marker may be, if the hyperref package is used). -

    The inline full form uses the ⟨ package is used). +

    The inline full form uses the ⟨short⟩ (⟨long⟩) style. The name is set to the short + id="dx1-26151"> is set to the short form. The description is set to the long form. The is set to the long form. The name key is obtained by + id="dx1-26153"> key is obtained by expanding -



    \glsxtrfootnotename  \glsxtrfootnotename

    -

    +

    (Similarly for other shortmodifierfootnote styles, unless class="cmtt-10">\newabbreviation (or \newacronym), and fragile or formatting commands should be protected from expansion. -

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


    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 -


    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 @@ -10664,22 +12099,22 @@ 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 Nested Links). footnote

    A synonym for short-footnote. + id="dx1-26161">.
    short-sc-footnote
    Like short-footnote but redefines but redefines \glsabbrvfont to use \glsabbrvscfont. (This style was originally called . (This style was originally called footnote-sc. Renamed in + id="dx1-26165">. 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 \glsabbrvsmfont. (This style was originally called . (This style was originally called footnote-sm. Renamed in + id="dx1-26169">. 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 \glsabbrvemfont. (This style was originally called . (This style was originally called footnote-em. Renamed in + id="dx1-26173">. 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-26175"> style but doesn’t modify the category attribute. Instead it changes \glsxtrpostlinkcategory to insert the + id="dx1-26176"> 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-26180"> is set to the short form. The description is set to the long form. Note that this style will change + id="dx1-26181"> is set to the long form. Note that this style will change \glsxtrfull (and its variants) so that it fakes non-first use. (Otherwise the + id="dx1-26182">first use. (Otherwise the footnote would appear after the inline form.)

    postfootnote
    A synonym for short-postfootnote. + id="dx1-26184">. @@ -10798,133 +12233,133 @@ class="cmss-10">short-postfootnoteshort-sc-postfootnote
    Like short-postfootnote but redefines but redefines \glsabbrvfont to use \glsabbrvscfont. (This style was originally called . (This style was originally called postfootnote-sc. Renamed in + id="dx1-26188">. 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 \glsabbrvsmfont. (This style was originally called . (This style was originally called postfootnote-sm. Renamed + id="dx1-26192">. 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 \glsabbrvemfont. (This style was originally called . (This style was originally called postfootnote-em. Renamed + id="dx1-26196">. 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. + id="dx1-26198"> 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. The name key is obtained + id="dx1-26199"> key is obtained from \glsxtrshortlongname.
    short-postlong-user-desc
    This style was introduced in version 1.12. It’s like the above short-postlong-user style but the style but the description must be specified. The must be specified. The name + id="dx1-26203"> is obtained from \glsxtrshortlonguserdescname.
    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 + id="dx1-26205"> style but the long form is shown first and the short form is in the parenthetical material (as for long-short-user) + id="dx1-26206">) style.
    long-postshort-user-desc
    This style was introduced in version 1.12. It’s like the above long-postshort-user style but the style but the description must be specified. The must be specified. The name + id="dx1-26210"> is obtained from \glsxtrlongshortuserdescname.
    long-hyphen-short-hyphen
    This style (new to v1.17) is designed to work with the markwords category attribute. The full form is formatted + id="dx1-26212"> category attribute. The full form is formatted using -



    \glsxtrlonghyphenshort  \glsxtrlonghyphenshort{label}{}

    -

    +

    where ⟨insert⟩ is the inserted material provided in the final optional argument of commands like \insert. If ⟨insert⟩ start with a hyphen, then this locally redefines \glsxtrwordsep to a hyphen, which means that if the to a hyphen, which means that if the markwords + id="dx1-26215"> attribute is set then the long form will become hyphenated. (If this attribute isn’t set, there’s no alteration to the way the long form is displayed.) The name + id="dx1-26216"> key is obtained from \glsxtrlongshortname. -

    Unlike the other ⟨

    Unlike the other ⟨long⟩ (⟨short⟩) type of styles, such as long-short, this style also + id="dx1-26217">, this style also repeats the insertion in the parenthetical part, so that the first use form is:

    -

    \glsfirstlonghyphenfont{long}\glsfirstabbrvhyphenfont{short}insert⟩)

    -

    The space before the parenthetical material is actually given by +

    The space before the parenthetical material is actually given by \glsxtrfullsep{labelinsert⟩ may be moved into the formatting commands according to the conditional \ifglsxtrinsertinside. -

    For example, if

    For example, if ip is defined using:

    -
    +
    \glssetcategoryattribute{english}{markwords}{true}  
    \setabbreviationstyle[english]{long-hyphen-short-hyphen}  
    \newabbreviation[category=english]{ip}{IP}{Internet Protocol}
    -

    then +

    then

    -
    +
    \gls{ip}[-Adressen]
    -

    will do +

    will do

    -

    Internet-Protocol-Adressen (IP-Adressen)

    -

    on first use, whereas +

    Internet-Protocol-Adressen (IP-Adressen)

    +

    on first use, whereas

    -
    +
    \gls{ip}[ Address]
    -

    will do +

    will do

    -

    Internet Protocol Address (IP Address)

    -

    on first use. -

    Note that the hyphenation isn’t applied when using commands like +

    Internet Protocol Address (IP Address)

    +

    on first use. +

    Note that the hyphenation isn’t applied when using commands like \glsxtrlong. This means that

    -
    +
    \glsxtrlong{ip}[-Adressen]
    -

    will do +

    will do

    -

    Internet Protocol-Adressen

    +

    Internet Protocol-Adressen

    -

    -

    If the

    +

    If the markwords attribute hadn’t been set, then the first use of + id="dx1-26218"> attribute hadn’t been set, then the first use of

    -
    +
    \gls{ip}[-Adressen]
    -

    would do +

    would do

    -

    Internet Protocol-Adressen (IP-Adressen)

    -

    instead. -

    If the inserted material ⟨

    Internet Protocol-Adressen (IP-Adressen)

    +

    instead. +

    If the inserted material ⟨insert⟩ is likely to contain commands like \gls, then use long-hyphen-postshort-hyphen instead to avoid nested links. + id="dx1-26219"> instead to avoid nested links.
    -

    -

    If you want the short version in small-caps, you can just redefine +

    +

    If you want the short version in small-caps, you can just redefine \glsabbrvhyphenfont and \glsxtrhyphensuffix to use the small-caps @@ -11067,65 +12502,65 @@ class="cmtt-10">\glsxtrhyphensuffix to use the small-caps

    -
    +
    \renewcommand{\glsabbrvhyphenfont}{\glsabbrvscfont}  
    \renewcommand{\glsxtrhyphensuffix}{\glsxtrscsuffix}
    -

    Similarly for other font-changing variations. +

    Similarly for other font-changing variations.

    long-hyphen-noshort-desc-noreg
    New to version 1.17, this style is like long-hyphen-short-hyphen-desc except that the parenthetical part is omitted and + id="dx1-26221"> except that the parenthetical part is omitted and the long form is displayed on subsequent use. The short form can be accessed with \glsxtrshort but just uses the default abbreviation font. There’s no regular version of this style as the regular form doesn’t have the flexibility to deal with the hyphen switch. The name is obtained from + id="dx1-26222"> is obtained from \glsxtrlongnoshortdescname.
    long-hyphen-noshort-noreg
    New to version 1.17, this style is like long-hyphen-noshort-desc-noreg but the name is set to the short form and the + id="dx1-26224"> but the name is set to the short form and the description is set to the long form.
    long-hyphen-short-hyphen-desc
    -

    New to version 1.17. This is similar to

    New to version 1.17. This is similar to long-hyphen-short-hyphen but the user + id="dx1-26226"> but the user supplies the description. The name is obtained from is obtained from \glsxtrlongshortdescname.

    long-hyphen-postshort-hyphen
    -

    New to version 1.17. This is similar to

    New to version 1.17. This is similar to long-hyphen-short-hyphen but the + id="dx1-26229"> but the inserted and parenthetical material are moved to the post-link hook. On first use, \gls{}insert
    where -



    \glsxtrposthyphenshort  \glsxtrposthyphenshort{label}insert

    -

    +

    is in the post-link hook. This uses the format:
    insert⟩ (isnert⟩) -

    The singular short form is always used here, even with

    The singular short form is always used here, even with \glspl. (Unlike long-hyphen-long-hyphen.)
    -

    -

    The part in the link-text on first use: -


    .)
    +

    +

    The part in the link-text on first use: +


    \glsxtrlonghyphen  \glsxtrlonghyphen{long}{}{insert}

    -

    +

    checks if ⟨insert⟩ starts with a hyphen. If it does, then \glsxtrwordsep is locally @@ -11202,15 +12637,15 @@ class="cmti-10">insert⟩ for this style without causing nested hyperlinks, but only for commands like \gls. -

    Don’t use

    Don’t use \gls in the ⟨insert⟩ part for commands like \glsxtrfull, \glsxtrshort or \glsxtrlong.
    -

    -

    The inline full display format used by commands like

    +

    The inline full display format used by commands like \glsxtrfull behaves differently to the first use of \gls with this style. It’s better @@ -11225,32 +12660,32 @@ class="cmtt-10">} if you want to ensure the full long-hyphen-postshort-hyphen-desc

    -

    New to version 1.17. This is similar to

    New to version 1.17. This is similar to long-hyphen-postshort-hyphen + id="dx1-26234"> but the user supplies the description. The name is obtained from + id="dx1-26235"> is obtained from \glsxtrlongshortdescname.

    short-hyphen-long-hyphen
    This style (new to v1.17) is like long-hyphen-short-hyphen, + id="dx1-26237">, except that the short form is displayed first followed by the long form in parentheses. The full form is formatted using -



    \glsxtrshorthyphenlong  \glsxtrshorthyphenlong{label}{} class="cmtt-10">{insert}

    -

    +

    which behaves in an analogous way to \glsxtrlonghyphenshort. The name is + id="dx1-26239"> is obtained from \glsxtrshortlongname.

    short-hyphen-long-hyphen-desc
    -

    New to version 1.17. This is similar to

    New to version 1.17. This is similar to short-hyphen-long-hyphen but the user + id="dx1-26241"> but the user supplies the description. The name is obtained from is obtained from \glsxtrshortlongdescname. @@ -11290,12 +12725,12 @@ class="cmtt-10">\glsxtrshortlongdescname. short-hyphen-postlong-hyphen

    This style (new to v1.17) is like long-hyphen-postshort-hyphen, but the short form is displayed first followed by + id="dx1-26244">, but the short form is displayed first followed by the long form in parentheses. On first use, \gls{label}insert
    where -



    \glsxtrposthyphenlong  \glsxtrposthyphenlong{label}insert

    -

    +

    is in the post-link hook. These commands behave in an analogous manner to those used with long-hyphen-postshort-hyphen. The . The name is obtained from + id="dx1-26247"> is obtained from \glsxtrshortlongname. -

    Don’t use

    Don’t use \gls in the ⟨insert⟩ part for commands like \glsxtrfull, \glsxtrshort or \glsxtrlong.
    -

    -

    The inline full display format used by commands like

    +

    The inline full display format used by commands like \glsxtrfull behaves differently to the first use of \gls with this style. It’s better @@ -11360,29 +12795,29 @@ class="cmtt-10">} if you want to ensure the full short-hyphen-postlong-hyphen-desc

    -

    New to version 1.17. This is similar to

    New to version 1.17. This is similar to short-hyphen-postlong-hyphen + id="dx1-26249"> but the user supplies the description. The name is obtained from + id="dx1-26250"> is obtained from \glsxtrshortlongdescname.

    -

    +

    -

    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-27004"> 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-27007"> (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-27012"> 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}, @@ -11473,24 +12908,24 @@ class="cmti-10">setup⟩:  
        plural={\protect\glsabbrvfont{\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-27016"> are set even though they’re not used by \gls. -

    The basic styles, such as

    The basic styles, such as long-short, use commands like , use commands like \glsabbrvfont (which are redefined whenever the style formatting is set) within \CustomAbbreviationFields. Other styles, such as long-em-short-em directly use their own custom commands, such + id="dx1-27018"> directly use their own custom commands, such as \glsabbrvemfont. With these styles, commands like \glsabbrvfont still need to @@ -11498,26 +12933,26 @@ be defined as appropriate in the ⟨fmts⟩ argument even if they’re not used within \CustomAbbreviationFields. -

    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}% @@ -11527,252 +12962,252 @@ 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-27022"> attribute if it has previously been set. Note that the nohyperfirst attribute doesn’t get unset by + id="dx1-27023"> 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.) -

    The short or long values may be modified by attributes (such as .) +

    The short or long values may be modified by attributes (such as markwords). The + id="dx1-27032">). The above registers reflect the modification. If you want to access the original (unmodified) short or long form (as provided in the final two arguments of \newabbreviation), then use the commands: -



    \glsxtrorgshort  \glsxtrorgshort

    -

    +

    for the short form and -



    \glsxtrorglong  \glsxtrorglong

    -

    +

    for the long form. (These may be useful for the sort key to avoid any formatting that + id="dx1-27035"> key to avoid any formatting that may be added by the attribute setting.) -

    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 long-noshort-sc-desc + id="dx1-27041"> style simply does

    -
    +
    \GlsXtrUseAbbrStyleSetup{long-noshort-desc}
    -

    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-27042"> 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-27051"> 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-27055"> 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-27059"> 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-27063"> 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-27068"> 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-27071"> 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-27075"> 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-27078"> and \Glsxtrfullpl): -


    ): +


    \Glsxtrinlinefullplformat  \Glsxtrinlinefullplformat{label}{insert}

    -

    -

    (New to version 1.17.) You can also modify the way the subsequent use is +

    +

    (New to version 1.17.) You can also modify the way the subsequent use is formatted by redefining the following four commands, but these won’t be used for abbreviations with the regular attribute set. If the style doesn’t redefine these + id="dx1-27081"> attribute set. If the style doesn’t redefine these commands, the default values are used. -

    Singular with no case-change: -


    Singular with no case-change: +


    \glsxtrsubsequentfmt  \glsxtrsubsequentfmt{label}{insert}

    -

    -

    Singular with first letter upper case: -


    +

    Singular with first letter upper case: +


    \Glsxtrsubsequentfmt  \Glsxtrsubsequentfmt{label}{insert}

    -

    +

    -

    Plural with no case-change: -


    Plural with no case-change: +


    \glsxtrsubsequentplfmt  \glsxtrsubsequentplfmt{label}{insert}

    -

    -

    Plural with first letter upper case: -


    +

    Plural with first letter upper case: +


    \Glsxtrsubsequentplfmt  \Glsxtrsubsequentplfmt{label}{insert}

    -

    -

    If you want to provide support for

    +

    If you want to provide support for glossaries-accsupp use the following + id="dx1-27086"> use the following \glsaccessxxx⟩ commands (\glsentry⟨xxx⟩ 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}{\glsxtrabbrvpluralsuffix}%  
      \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}%  
      \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% @@ -11990,44 +13425,44 @@ class="cmti-10">fmts⟩:  
        \glsxtrparen{\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 long-short-desc style has the following in ⟨ style has the following in ⟨fmts⟩:

    -
    +
      \GlsXtrUseAbbrStyleFmts{long-short}%
    -

    -

    Here’s an example of an abbreviation style that’s based on

    +

    Here’s an example of an abbreviation style that’s based on long-short that displays + id="dx1-27091"> that displays the short form within \textsf:

    -
    +
    \newabbreviationstyle  
    {custom-sf}% label  
    {% setup @@ -12038,37 +13473,37 @@ class="cmtt-10">\textsf:  
      \renewcommand*{\glsabbrvfont}[1]{\textsf{##1}}%  
    }
    -

    Note that this wouldn’t work if it was instead based on one of the modified versions +

    Note that this wouldn’t work if it was instead based on one of the modified versions such as short-sc-long as they explicitly use their own formatting commands, such as + id="dx1-27092"> as they explicitly use their own formatting commands, such as \glsabbrvemfont. The base styles, such as short-long, use the more generic + id="dx1-27093">, use the more generic \glsabbrvfont etc which makes them easier to adapt than the modified styles. -

    For further details, see the “Abbreviations” section in the documented code +

    For further details, see the “Abbreviations” section in the documented code (glossaries-extra-code.pdf).

    -

    -

    +

    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;
    • @@ -12085,27 +13520,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-28003">);
    • if you use hyperref, you will end up with nested hyperlinks in the table of + id="dx1-28004">, 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-28005"> (for regular entries) or \glsentryshort (for abbreviations). This is the + id="dx1-28006"> (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-28008">:

    -
    +
    \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-28010"> and \markboth and and \@starttoc. If you don’t like this change, you can restore their former definitions using -



    \glsxtrRevertMarks  \glsxtrRevertMarks

    -

    +

    If you only want to restore \@starttoc you can use: -



    \glsxtrRevertTocMarks  \glsxtrRevertTocMarks

    -

    +

    If you restore the header or table of contents commands, 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}}
    -

    Alternatively, you need to find a way to insert

    Alternatively, you need to find a way to insert \glsxtrmarkhook and \@glsxtrinmark at the start of the header or table of contents either scoped or afterwards cancelled with \@glsxtrnotinmark and \glsxtrrestoremarkhook. -

    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-28015"> 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-28017">. 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-28018"> 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-28019"> 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 @@ -12236,322 +13671,322 @@ heading style uses italic, the abbreviation may appear in upright small-caps, class="cmti-10">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-28021"> 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}

    -

    -

    Likewise for the value of the

    +

    Likewise for the value of the name field: -


    field: +


    \glsfmtname  \glsfmtname{label}

    -

    -

    First letter converted to upper case: -


    +

    First letter converted to upper case: +


    \Glsfmtname  \Glsfmtname{label}

    -

    +

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

    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-29001"> (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-29003"> 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-29004"> 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-29007">. Abbreviations defined with \newabbreviation have the category set to abbreviation + id="dx1-29008"> 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-29011"> package option that command will set the category to index by default. If you have enabled + id="dx1-29012"> by default. If you have enabled \glsxtrnewsymbol with the with the symbols package option, that command will set the + id="dx1-29014"> 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-29017"> 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-29023"> categories have the attribute regular set to “true” to indicate that all entries with + id="dx1-29024"> 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-29026"> 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-29028"> 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-29030"> option, which matches the behaviour of glossaries). If you want commands these + id="dx1-29031">). If you want commands these \glsfirst etc commands to ignore the nohyperfirst attribute then just + id="dx1-29032"> attribute then just redefine -



    \glsxtrchecknohyperfirst  \glsxtrchecknohyperfirst{label}

    -

    +

    to do nothing.

    nohyper
    When using commands like \gls this will automatically suppress the + id="dx1-29035"> 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-29036"> 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-29038"> package option but only for entries that have a category with this attribute set to “true”.
    wrgloss
    When using commands like \gls, if this attribute is set to “after”, it will + id="dx1-29040">, if this attribute is set to “after”, it will automatically implement wrgloss=after. (New to v1.14.)
    discardperiod
    If set to “true”, the post-link-text hook will discard a full stop (period) that follows non-plural commands like \newacronym if it’s using \newabbreviation.) This attribute doesn’t apply to the accessibility fields. -

    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-29046"> 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-29049"> attribute is set to “true”, this will behave as above for the plural commands like \glspl or \newabbreviation.) 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-29053"> are set. This is useful for ⟨short⟩ (⟨long⟩) abbreviation styles where only the @@ -12790,52 +14225,52 @@ class="cmtt-10">\newabbreviation.) This attribute doesn’t apply to markwords
    If this attribute is set to “true” any entry defined using \newabbreviation + id="dx1-29055"> will automatically have spaces in the long form replaced with -



    \glsxtrwordsep  \glsxtrwordsep

    -

    +

    and each word is encapsulated with -



    \glsxtrword  \glsxtrword{word}

    -

    +

    For example:

    -
    +
    \glssetcategoryattribute{abbreviation}{markwords}{true}  
    \newabbreviation{ip}{IP}{Internet Protocol}
    -

    is essentially the same as +

    is essentially the same as

    -
    +
    \newabbreviation{ip}{IP}  
    {\glsxtrword{Internet}\glsxtrwordsep\glsxtrword{Protocol}}
    -

    The “hyphen” styles, such as

    The “hyphen” styles, such as long-hyphen-short-hyphen, take advantage of this + id="dx1-29058">, take advantage of this markup. If the inserted material (provided in the final argument of commands like \gls) starts with a hyphen then ) starts with a hyphen then \glsxtrwordsep is locally redefined to a hyphen. (The default value is a space). Note that this only applies to commands like \glsxtrlong. You can provide your own

    -
    +
    \newcommand{\hyplong}[2][]{%  
     {\def\glsxtrwordsep{-}\glsxtrlong[#1]{#2}}}
    -

    -

    This setting will also adjust the long plural. This attribute is only applicable to +

    +

    This setting will also adjust the long plural. This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using \newabbreviation.) -

    This setting may result in the

    This setting may result in the \glsxtrword and \glsxtrwordsep markup ending up in the sort field, depending on the style in use.
    -

    + id="dx1-29060"> field, depending on the style in use.

    +

    markshortwords
    This is similar to markwords but applies to the short form. (Only + id="dx1-29062"> but applies to the short form. (Only useful for abbreviations that contain spaces.) This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using \newabbreviation.) -

    This setting will only adjust the short plural if the

    This setting will only adjust the short plural if the shortplural key isn’t used. + id="dx1-29063"> key isn’t used. This setting will take precedence over insertdots. -

    This setting may result in the . +

    This setting may result in the \glsxtrword and \glsxtrwordsep markup ending up in the sort field, depending on the style in use.
    -

    + id="dx1-29065"> field, depending on the style in use.

    +

    insertdots
    If this attribute is set to “true” any entry defined using \newabbreviation + id="dx1-29067"> 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 ⟨This setting is class="cmti-10">incompatible with markshortwords. This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using \newabbreviation.) -

    If you explicitly override the short plural using the

    If you explicitly override the short plural using the shortplural key, you must + id="dx1-29069"> 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-29070"> attribute set to “true”.

    aposplural
    If this attribute is set to “true”, \newabbreviation will insert an + id="dx1-29072"> 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-29073"> key). The long plural form is unaffected by this setting. This setting overrides noshortplural. This + id="dx1-29074">. This attribute is only applicable to entries defined using \newabbreviation (or \newabbreviation.) Check with your supervisor, noshortplural
    If this attribute is set to “true”, \newabbreviation won’t append + id="dx1-29076"> won’t append the plural suffix for the short plural form. This means the short and + id="dx1-29077"> and shortplural values will be the same unless explicitly overridden. values will be the same unless explicitly overridden. This setting is incompatible with aposplural. This attribute is only applicable to entries defined using \newabbreviation (or \newabbreviation.) accessinsertdots
    If this attribute is set to “true” and the glossaries-accsupp package + id="dx1-29081"> package has been loaded (with the accsupp option), then this behaves like option), then this behaves like insertdots but + id="dx1-29083"> but for the shortaccess field instead of the field instead of the short field. This can be used to assist the + id="dx1-29085"> field. This can be used to assist the screen reader for initialisms that should be read out letter by letter rather than as a word. For example: -
    +
    \glssetcategoryattribute{initialism}{accessinsertdots}{true}  
    \newabbreviation[category=initialism]{pi}{PI}{Private Investigator}
    -

    This setting will be overridden by an explicit use of the

    This setting will be overridden by an explicit use of the shortaccess key in the + id="dx1-29086"> key in the optional argument of \newabbreviation (or \newacronym). This attribute is @@ -13029,21 +14464,21 @@ class="cmtt-10">\newabbreviation.) nameshortaccess

    If this attribute is set to “true”, the access field (used for the field (used for the name + id="dx1-29089"> field’s accessibility support) is set to the shortaccess value. This attribute has no + id="dx1-29090"> value. This attribute has no effect if there’s no accessibility support or if the shortaccess field hasn’t been + id="dx1-29091"> field hasn’t been assigned or if the access field is used explicitly. This attribute is only applicable + id="dx1-29092"> field is used explicitly. This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using @@ -13053,61 +14488,61 @@ class="cmtt-10">\newabbreviation.) textshortaccess
    Like nameshortaccess but applies to the but applies to the textaccess field (for use with + id="dx1-29095"> field (for use with regular abbreviations).
    firstshortaccess
    Like nameshortaccess but applies to the but applies to the firstaccess field (for use with + id="dx1-29098"> field (for use with regular abbreviations).
    accessaposplural
    This boolean attribute overrides aposplural for the for the shortpluralaccess + id="dx1-29101"> key. Has no effect if there’s no accessibility support or if the shortaccess key + id="dx1-29102"> key hasn’t been set or if the shortpluralaccess key is explicitly set. If the key is explicitly set. If the aposplural is + id="dx1-29104"> is set and this attribute isn’t set and the shortaccess key is set, then the + id="dx1-29105"> key is set, then the aposplural setting governs the default setting governs the default shortpluralaccess setting. If you want + id="dx1-29107"> setting. If you want aposplural but don’t want it applied to the accessibility support, set the + id="dx1-29108"> but don’t want it applied to the accessibility support, set the accessaposplural attribute to “false”. This attribute is only applicable to + id="dx1-29109"> attribute to “false”. This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using @@ -13117,17 +14552,17 @@ class="cmtt-10">\newabbreviation.) accessnoshortplural
    This boolean attribute overrides noshortplural for the + id="dx1-29111"> for the shortpluralaccess key. The same conditions apply as for key. The same conditions apply as for accessaposplural. This + id="dx1-29113">. This attribute is only applicable to entries defined using \newabbreviation (or \newabbreviation.) headuc
    If this attribute is set to “true”, commands like \glsfmtshort will use the + id="dx1-29115"> will use the upper case version in the page headers. @@ -13149,13 +14584,13 @@ class="cmtt-10">\glsfmtshorttagging
    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-29118"> 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-29120"> (see §2.4 Entry Counting Modifications

    With

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

    linkcount
    This attribute is set to true by \GlsXtrEnableLinkCounting (see (see §6.2 Link Counting). linkcountmaster
    This attribute is set to the name of the master counter by \GlsXtrEnableLinkCounting if the optional argument is provided (see if the optional argument is provided (see §6.2 Link Counting). glossdesc
    The \glossentrydesc command (used in the predefined glossary styles) is + id="dx1-29129"> 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: @@ -13234,34 +14669,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-29130">).
  • 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-29132">). 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-29134"> 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-29136"> 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-29139">. 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 \glossentryname + id="dx1-29141"> will index the entry using \index. See . See §7 Auto-Indexing for further @@ -13325,24 +14760,24 @@ 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-29144"> 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. @@ -13350,7 +14785,7 @@ class="cmtt-10">\item. textformat

    (New to version 1.21.) Commands like \gls and \glstext have the link @@ -13365,14 +14800,14 @@ class="cmtt-10">\glstextformat by default. If this hyperoutside
    (New to v1.21.) The attribute value may be false, true or unset. If unset, true is assumed. This indicates the default setting of the hyperoutside + id="dx1-29147"> key, described in §2.1 Entry Indexing. 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-29150">, a corresponding line will be written to the indexing file using \index. See . See §7 Auto-Indexing for @@ -13399,17 +14834,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-29155">, 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-29158"> for the external list. For example:

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

    +

    externallocation
    The value should be the file name of the target document when manually indexing an external location (see §2.1 Entry Indexing). In general, it’s better to use bib2gls v1.7+ which can handle multiple external sources + id="dx1-29161"> v1.7+ which can handle multiple external sources and doesn’t require this attribute.
    -

    An attribute can be set using: -


    An attribute can be set using: +


    \glssetcategoryattribute  \glssetcategoryattribute{category-label} @@ -13531,31 +14966,31 @@ 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} @@ -13585,25 +15020,25 @@ class="cmtt-10">}

    -

    +

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



    \glsgetattribute  \glsgetattribute{entry-label}{attribute-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} @@ -13615,19 +15050,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} @@ -13658,7 +15093,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-29173"> 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-29176"> attribute set to “true”: -



    \glsifregularcategory  \glsifregularcategory{category-label} @@ -13729,12 +15164,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-29180"> attribute has been set to “false”: -



    \glsifnotregularcategory  \glsifnotregularcategory{category-label} @@ -13767,12 +15202,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] @@ -13841,42 +15276,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-29185">. 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-29187"> 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} @@ -13884,21 +15319,21 @@ class="cmtt-10">} class="cmtt-10">{⟨category-label}

    -

    +

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

    -

    -

    +

    Top

    6. Counting References

    -

    There are three basic ways of counting entry references: +

    There are three basic ways of counting entry references:

    1. Counting the total number of times Counting the total number of times \glsunset is used (\glsreset resets the count and is best avoided). This is provided by the base glossaries class="cmtt-10">.aux file so that it’s available on the next LATEX run. -

      This method is extended by

      This method is extended by glossaries-extra and is described in §6.1 Entry Counting (First Use Flag).

    2. Counting the total number of records. This method is only available with + class="enumerate" id="x1-30004x2">Counting the total number of records. This method is only available with bib2gls and is intended for documents where the term should be displayed + id="dx1-30006"> and is intended for documents where the term should be displayed differently if it’s only been recorded (indexed) a certain number of times. See §9.5 Record Counting for further details.
    3. Counting the number of times the Counting the number of times the \gls-like or \glstext-like commands are used. (That is, those commands that internally use @@ -13947,50 +15382,50 @@ class="cmtt-10">\glslinkpresetkeys. See §6.2 Link Counting for further details.
    -

    Top

    6.1 Entry Counting (First Use Flag)

    -

    As mentioned in

    As mentioned in §2.4 Entry Counting Modifications, glossaries-extra modifies the \glsenableentrycount command to allow for the command to allow for the entrycount attribute. This means + id="dx1-31002"> attribute. This means that you not only need to enable entry counting with \glsenableentrycount, but + id="dx1-31003">, 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-31006"> 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 + id="dx1-31008"> will generate a warning if \glsenableentrycount hasn’t been used.) The @@ -13998,40 +15433,40 @@ class="cmtt-10">\glsenableentrycount hasn’t been used.) The abbreviation shortcut \ab uses uses \cgls (see §3.3 Shortcut Commands). The acronym shortcut \ac uses uses \cgls if it’s been defined with shortcuts=ac (or + id="dx1-31011"> (or shortcuts=all) but uses ) but uses \gls if it’s been defined with shortcuts=acronyms (or + id="dx1-31013"> (or shortcuts=acro). -

    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 @@ -14100,17 +15535,17 @@ 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-31019"> attribute:

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

    -

    When activated with

    +

    When activated with \glsenableentrycount, commands such as \cgls now + id="dx1-31020"> 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 @@ -14159,12 +15594,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}%  
     {% @@ -14177,37 +15612,37 @@ 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-31023"> 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} @@ -14215,19 +15650,19 @@ 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}% @@ -14235,19 +15670,19 @@ 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-31029"> attribute for each listed category. +

    The above example document can then become:

    -
    +
    \documentclass{article}  
    \usepackage{glossaries-extra}  
    \makeglossaries @@ -14260,15 +15695,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-31031"> 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-31032"> 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-31033"> (as before) and unitcount (the name of the counter). -

    Both the original document-wide counting mechanism and the per-unit counting + id="dx1-31034"> (the name of the counter). +

    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} @@ -14389,11 +15824,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 @@ -14403,40 +15838,40 @@ 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-31040"> 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 example document the trigger value is set to zero, which means the index suppression 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} @@ -14457,22 +15892,22 @@ 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-31043"> 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 page. -

    +

    -

    Top

    6.2 Link Counting

    -

    As from version 1.26, an alternative method of entry counting is to count the number +

    As from version 1.26, an alternative method of entry counting is to count the number @@ -14486,13 +15921,13 @@ class="cmtt-10">\hyperlink although \@gls@link may use \hyperlink when displaying the link-text.) -

    To enable link counting use the preamble-only command: -


    To enable link counting use the preamble-only command: +


    \GlsXtrEnableLinkCounting  \GlsXtrEnableLinkCounting[master counter] @@ -14500,7 +15935,7 @@ class="cmtt-10">] class="cmtt-10">{⟨categories}

    -

    +

    where ⟨categories⟩ is a list of category labels. The optional argument ⟨master @@ -14510,24 +15945,24 @@ present, the associated link counter will be reset when the master counter is incremented. This command automatically sets the linkcount attribute for the given + id="dx1-32003"> attribute for the given categories. If the optional argument is present, it also sets the linkcountmaster + id="dx1-32004"> attribute. -

    When enabled, commands like

    When enabled, commands like \gls and \glstext increment the associated counter using -



    \glsxtrinclinkcounter  \glsxtrinclinkcounter{counter name}

    -

    +

    This just does \stepcounter{counter name\refstepcounter instead, just redefine this command:

    -
    +
    \renewcommand*{\glsxtrinclinkcounter}[1]{\refstepcounter{#1}}
    -

    -

    You can access the internal count register using -


    +

    You can access the internal count register using +


    \GlsXtrLinkCounterValue  \GlsXtrLinkCounterValue{label}

    -

    +

    where ⟨label⟩ is the entry’s label. This will expand to 0 if the counter hasn’t been defined. -

    It’s also possible to access the display value (

    It’s also possible to access the display value (\thecounter⟩) using -



    \GlsXtrTheLinkCounter  \GlsXtrTheLinkCounter{counter}

    -

    +

    (This will expand to 0 if the counter hasn’t been defined.) -

    In order to conserve resources, the counter is only defined when it first +

    In order to conserve resources, the counter is only defined when it first needs to be incremented so terms that have been defined but haven’t been used in the document won’t have the associated count register allocated.
    -

    -

    You can test if the counter has been defined using: -


    +

    You can test if the counter has been defined using: +


    \GlsXtrIfLinkCounterDef  \GlsXtrIfLinkCounterDef{label}{}{false}

    -

    +

    where ⟨label⟩ is the entry’s label. -

    The counter name can be obtained using -


    The counter name can be obtained using +


    \GlsXtrLinkCounterName  \GlsXtrLinkCounterName{label}

    -

    +

    This simply expands to the counter name associated with the entry given by ⟨label⟩ without any check for existence. For example, to change the display command @@ -14603,15 +16038,15 @@ without any check for existence. For example, to change the display command class="cmtt-10">\the⟨counter⟩) using etoolbox: + id="dx1-32010">:

    -
    +
    \csdef{the\GlsXtrLinkCounterName{duck}}{\Roman{\GlsXtrLinkCounterName{duck}}}
    -

    This is useful if you just want to change the display for specific entries but isn’t +

    This is useful if you just want to change the display for specific entries but isn’t convenient if you want to change the display for all entries. Instead, it’s simpler to redefine \GlsXtrTheLinkCounter. For example: @@ -14619,19 +16054,19 @@ class="cmtt-10">\GlsXtrTheLinkCounter. For example:

    -
    +
    \renewcommand*{\GlsXtrTheLinkCounter}[1]{%  
     \GlsXtrIfLinkCounterDef{#1}%  
     {\Roman{\GlsXtrLinkCounterName{#1}}}%  
     {0}%  
    }
    -

    In both cases, the redefinition should be implemented after

    In both cases, the redefinition should be implemented after \GlsXtrEnableLinkCounting. -

    Here’s an example document that uses link counting to disable the hyperlink after +

    Here’s an example document that uses link counting to disable the hyperlink after the first reference. This redefines \glslinkpresetkeys (which is used by both (which is used by both \gls and \glstext) instead of \glstext).

    -
    +
    \documentclass{article}  
    \usepackage[colorlinks]{hyperref}  
    \usepackage{glossaries-extra} @@ -14666,32 +16101,32 @@ class="cmtt-10">\glstext).  
    \printglossaries  
    \end{document}
    -

    The use of

    The use of \glslinkpresetkeys means that the options can override this. For + id="dx1-32012"> means that the options can override this. For example

    -
    +
    \gls[hyper=true]{sample1}
    -

    will override the

    will override the hyper=false setting in \glslinkpresetkeys. If . If \glslinkpostsetkeys + id="dx1-32014"> is used instead, the hyper=false setting will override the setting provided in the optional argument. -

    The

    The abbreviation category doesn’t have the category doesn’t have the linkcount attribute set (since it’s not + id="dx1-32016"> attribute set (since it’s not listed in the argument of \GlsXtrEnableLinkCounting). This means that -

    +
    \ifnum\GlsXtrLinkCounterValue{\glslabel}>1
    -

    will always be false. This means that the abbreviation won’t have

    will always be false. This means that the abbreviation won’t have hyper=false applied. If the test is changed to

    -
    +
    \ifnum\GlsXtrLinkCounterValue{\glslabel}=1  
    \else  
     \setkeys{glslink}{hyper=false}%  
    \fi
    -

    Then the abbreviation will always have

    Then the abbreviation will always have hyper=false applied. -

    To reset the counter every section use the optional argument to set the master +

    To reset the counter every section use the optional argument to set the master counter:

    -
    +
    \GlsXtrEnableLinkCounting[section]{general}
    -

    +

    -

    -

    +

    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-33001"> and dualindex. -

    The auto-indexing is designed for . +

    The auto-indexing is designed for makeindex syntax. If you’ve used the xindy + id="dx1-33004"> package option, the automatic escaping of xindy special characters in the sort field + id="dx1-33006"> field may result in an incorrect sort value for the \index command used by the auto-indexing. Note also that texindy has a fixed set of special characters + id="dx1-33007"> has a fixed set of special characters (corresponding to makeindex’s defaults) that can’t be customized. You may want to consider using bib2gls and its dual entries as an alternative approach. + id="dx1-33010"> and its dual entries as an alternative approach.
    -

    -

    The

    +

    The \glsxtrpostnamehook macro, used at the end of macro, used at the end of \glossentryname and + id="dx1-33012"> and \Glossentryname, checks the , checks the indexname attribute for the category associated with + id="dx1-33014"> 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-33015"> 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-33018"> 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}. As from v1.16, there are user-level commands available to change the sort and actual value used by the automated index. -

    The actual value is given by -


    The actual value is given by +


    \glsxtrautoindexentry  \glsxtrautoindexentry{label}

    -

    +

    where ⟨label⟩ is the entry’s label. The default definition is:

    -
    +
    \newcommand*{\glsxtrautoindexentry}[1]{\string\glsentryname{#1}}
    -

    Note the use of

    Note the use of \string to prevent \glsentryname from being expanded as it’s written to the index file. -

    The sort value is assigned using: -


    The sort value is assigned using: +


    \glsxtrautoindexassignsort  \glsxtrautoindexassignsort{cs}{label}

    -

    +

    where ⟨label⟩ is the entry label and ⟨cs⟩ is the command which needs to be set to the @@ -14865,225 +16300,225 @@ sort value. The default definition is:

    -
    +
    \newcommand*{\glsxtrautoindexassignsort}[2]{%  
      \glsletentryfield{#1}{#2}{sort}%  
    }
    -

    After this macro is called, ⟨

    After this macro is called, ⟨cs⟩ is then processed to escape any of makeindex’s special + id="dx1-33022">’s special characters. Note that this escaping is only performed on the sort not on the actual value. The escaping of the sort value is performed by -



    \glsxtrautoindexesc  \glsxtrautoindexesc

    -

    +

    You can redefine this to do nothing if you want to omit the escaping. You may want to consider providing another field to obtain the appropriate sort value if the one provided in the sort field isn’t suitable (because it may already have had special + id="dx1-33024"> field isn’t suitable (because it may already have had special characters escaped or it may be a numeric value in the case of sort by use or definition). -

    The command used to perform the actual indexing is: -


    The command used to perform the actual indexing is: +


    \glsxtrautoindex  \glsxtrautoindex{text}

    -

    +

    This just does \index{text} by default. -

    The entry’s

    The entry’s parent field isn’t referenced in this automated indexing. + id="dx1-33026"> field isn’t referenced in this automated indexing.
    -

    -

    For example, to index the value of the

    +

    For example, to index the value of the first key, instead of the key, instead of the name key: + id="dx1-33028"> key:

    -
    +
    \renewcommand*{\glsxtrautoindexentry}[1]{\string\glsentryfirst{#1}}
    -

    and if the sort value also needs to be set to the

    and if the sort value also needs to be set to the long field, if present, otherwise the + id="dx1-33029"> field, if present, otherwise the sort field: + id="dx1-33030"> field:

    -
    +
    \renewcommand*{\glsxtrautoindexassignsort}[2]{%  
      \ifglshaslong{#2}%  
      {\glsletentryfield{#1}{#2}{long}}%  
      {\glsletentryfield{#1}{#2}{sort}}%  
    }
    -

    -

    If the value of the attribute given by ⟨

    +

    If the value of the attribute given by ⟨attribute-label⟩ is “true”, no encap will be added, otherwise the 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-33032"> attribute. You can allow the format key to override the attribute value by using the preamble-only + id="dx1-33033"> 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-33036"> environment will be modified to redefine \glshypernumber to allow formats that use + id="dx1-33038"> to allow formats that use that command. -

    The

    The dualindex attribute will still be used on subsequent use even if the + id="dx1-33039"> 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-33042"> 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-33044">’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-33049"> 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-34001"> 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-34004"> 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-34008"> 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 @@ -15186,68 +16621,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-34010"> 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 @@ -15301,24 +16736,24 @@ 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. bib2gls: Managing Reference Databases

    -

    There is a new command line application called

    There is a new command line application called bib2gls, which works in much + id="dx1-35002">, which works in much the same way as a combination of bibtex and makeindex/\input or \loadglsentries, the entries can instead be stored in a .bib file and bib2gls can + id="dx1-35004"> 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 +

    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 containing glossary definitions to a .bib file using convertgls2bib, supplied with + id="dx1-35005">, supplied with bib2gls.) -

    There are some new commands and options added to .) +

    There are some new commands and options added to glossaries-extra to help assist the integration of bib2gls into the document build process. -

    This chapter just provides a general overview of into the document build process. +

    This chapter just provides a general overview of bib2gls. The full details and + id="dx1-35011">. The full details and some sample documents are provided in the bib2gls manual. -

    An example of the contents of

    An example of the contents of .bib file that stores glossary entries that can be extracted with bib2gls: + id="dx1-35015">:

    -
    +
    @entry{bird,  
      name={bird},  
      description = {feathered animal}, @@ -15395,13 +16830,13 @@ class="cmtt-10">bib2gls  description={a waterbird with a long neck}  
    }
    -

    -

    The follow provides some abbreviations: +

    +

    The follow provides some abbreviations:

    -
    + -

    -

    Here are some symbols: +

    +

    Here are some symbols:

    -
    +
    preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"}  
    @symbol{M,  
      name={$\mtx{M}$}, @@ -15444,78 +16879,78 @@ preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"}  
      description={a set}  
    }
    -

    -

    To ensure that

    +

    To ensure that bib2gls can find out which entries have been used in the + id="dx1-35017"> can find out which entries have been used in the document, you need the record package option: + id="dx1-35018"> package option:

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

    If this option’s value is omitted (as above), the normal indexing will be switched off, +

    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 + id="dx1-35020"> 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 and continue to use \makeglossaries and \printglossary (or \printglossaries), but you also need to instruct bib2gls to omit sorting to save time and to prevent the to omit sorting to save time and to prevent the sort key from being + id="dx1-35025"> key from being set. -

    The

    The .glstex file created by bib2gls is loaded using: -


    is loaded using: +


    \glsxtrresourcefile  \glsxtrresourcefile[options]{filename}

    -

    +

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



    \GlsXtrLoadResources  \GlsXtrLoadResources[options]

    -

    +

    On the first use, this command is a shortcut for

    }
    On subsequent use,9.1 this + id="x1-35030f1"> this command is a shortcut for
    }
    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

    The \glsxtrresourcefile command writes the line

    filename.glstex if it exists.9.2 + id="x1-35031f2"> -

    Since the

    Since the .glstex file won’t exist on the first LATEX run, the record package + id="dx1-35032"> package option additionally switches on undefaction=warn. Any use of commands like . Any use of commands like \gls or \glstext will produce ?? in the document, since the entries are undefined at this point. Once bib2gls has created the has created the .glstex file the references should be resolved. This may cause a shift in the locations if the actual text produced once the entry is defined is significantly larger than the placeholder ?? (as this can alter the page breaking). -

    Note that as from v1.12,

    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.

    -

    Top

    9.1 Selection

    -

    The default behaviour is for

    The default behaviour is for bib2gls to select all entries that have a record in the + id="dx1-36002"> to select all entries that have a record in the .aux file, and any dependent entries (including parent and cross-references). The glsignore format (for example, \gls[format=glsignore]{duck}) is recognised by bib2gls as a special ignored record. This means that it will match the selection + id="dx1-36004"> as a special ignored record. This means that it will match the selection criteria but the record won’t be added to the location list. This means that you won’t get spurious commas in the location list (as can happen with the other indexing methods), so you can do, for example, @@ -15622,72 +17057,72 @@ methods), so you can do, for example,

    -
    +
    \GlsXtrSetDefaultNumberFormat{glsignore}
    -

    at the start of the front matter and +

    at the start of the front matter and

    -
    +
    \GlsXtrSetDefaultNumberFormat{glsnumberformat}
    -

    at the start of the main matter to prevent any records in the front matter from +

    at the start of the main matter to prevent any records in the front matter from occurring in the location lists. -

    Note that commands like

    Note that commands like \glsaddall and \glsaddallunused don’t work with bib2gls as the command has to iterate over the internal lists of + id="dx1-36006"> as the command has to iterate over the internal lists of defined entry labels, which will be empty on the first run and on subsequent runs will only contain those entries that have been selected by bib2gls. + id="dx1-36008">.
    -

    -

    If you want to add all entries to the glossary, you need to tell

    +

    If you want to add all entries to the glossary, you need to tell bib2gls this in the + id="dx1-36010"> this in the options list. For example:

    -
    +
    \GlsXtrLoadResources[src={terms},selection={all}]
    -

    This will add all entries, regardless of whether or not they have any records in the +

    This will add all entries, regardless of whether or not they have any records in the .aux file. Those that don’t have any records will have an empty location list. See the bib2gls user manual for more details of this option. -

    + id="dx1-36012"> user manual for more details of this option. +

    -

    Top

    9.2 Sorting and Displaying the Glossary

    -

    There are many sorting options provided by

    There are many sorting options provided by bib2gls. The default is to sort + id="dx1-37002">. The default is to sort according to the system locale. If the document has a language setting, you can use sort=doc to instruct bib2gls to sort according to that. (The language tag obtained + id="dx1-37004"> to sort according to that. (The language tag obtained from tracklang’s interface is written to the ’s interface is written to the .aux file.) For a multilingual document you need to explicitly set the locale using a well-formed language tag. For example: @@ -15695,29 +17130,29 @@ example:

    -
    +
    \GlsXtrLoadResources[  
      src=terms, % data in terms.bib  
      sort=de-DE-1996 % sort according to this locale  
    ]
    -

    The locale-sensitive sort methods usually ignore most punctuation so for lists of +

    The locale-sensitive sort methods usually ignore most punctuation so for lists of symbols you may find it more appropriate to use one of the letter-base sort methods that sort according to the Unicode value of each character. Alternatively you can provide a custom rule. See the bib2gls manual for full details of all the available sort + id="dx1-37007"> manual for full details of all the available sort methods. -

    Since the

    Since the .glstex file only defines those references required within the document (selected according to the selection option) and the definitions have been written in the order corresponding to bib2gls’s sorted list, the glossaries can simply be + id="dx1-37009">’s sorted list, the glossaries can simply be displayed using \printunsrtglossary (or \printunsrtglossaries), described in @@ -15725,7 +17160,7 @@ class="cmtt-10">\printunsrtglossaries), described in href="#sec:printunsrt">§10.2 Display All Entries Without Sorting or Indexing. -

    Suppose the

    Suppose the .bib examples shown above have been stored in the files terms.bib, EX’s path. Then the document might look like:

    -
    +
    \documentclass{article}  
    \usepackage[record]{glossaries-extra}  
    \setabbreviationstyle{long-short-desc} @@ -15749,18 +17184,18 @@ class="E">EX’s path. Then the document might look like:  
    \printunsrtglossaries  
    \end{document}
    -

    The document build process (assuming the document is called

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

    -
    +
    pdflatex mydoc  
    bib2gls mydoc  
    pdflatex mydoc
    -

    This creates a single glossary containing the entries:

    This creates a single glossary containing the entries: bird, duck, goose, bird, shtml and M entries were added because bib2gls detected (from the detected (from the .aux file) that they had been used in the document. The other entries were added because bib2gls detected (from the 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 field for bird. In the case of ssi and html, they are referenced in the description field of 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 +

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

    -
    +
    \documentclass{article}  
    \usepackage[record,abbreviations,symbols]{glossaries-extra}  
    \setabbreviationstyle{long-short-desc} @@ -15821,8 +17256,8 @@ methods:  
    \printunsrtglossaries  
    \end{document}
    -

    -

    Or you can have multiple instance of

    +

    Or you can have multiple instance of \GlsXtrLoadResources with the same type, which will produce a glossary with ordered sub-blocks. For example: @@ -15830,7 +17265,7 @@ class="cmtt-10">type, which will produce a glossary with ordered sub-bloc

    -
    +
    \documentclass{article}  
    \usepackage[record,style=indexgroup]{glossaries-extra}  
    \setabbreviationstyle{long-short-desc} @@ -15848,13 +17283,13 @@ class="cmtt-10">type, which will produce a glossary with ordered sub-bloc  
    \printunsrtglossaries  
    \end{document}
    -

    This will result in a glossary where the first group has the title “Abbreviations”, the +

    This will result in a glossary where the first group has the title “Abbreviations”, the second group has the title “Symbols” and then follow the usual letter groups. Note that for this example to work, you must run bib2gls with the with the --group (or -g) switch. For example, if the document is called myDoc.tex:

    -
    +
    pdflatex myDoc  
    bib2gls -g myDoc  
    pdflatex myDoc
    -

    The value of the

    The value of the group field must always be a label. You can set the corresponding + id="dx1-37018"> field must always be a label. You can set the corresponding title with \glsxtrsetgrouptitle (see §2.10 §2.11 Glossary Style Modifications). If no title is set then the label is used as the group title. -

    You can provide your own custom sort rule. For example, if you are using +

    You can provide your own custom sort rule. For example, if you are using XƎLATEX or LuaLATEX:

    ]
    Remember that if you are using inputenc then extended characters, such as é or ø, + id="dx1-37019"> then extended characters, such as é or ø, are active and will expand when written to the .aux file. So with PDFLATEX the @@ -16029,10 +17464,10 @@ class="cmti-10">hex⟩) in the .aux file. bib2gls will recognise this as the + id="dx1-37021"> will recognise this as the character given by the hexadecimal value ⟨hex⟩. The \u also needs protection from @@ -16041,7 +17476,7 @@ written as \string\uE6 and so on. This is quite cumbersome, but you can use the shortcut \glshex E6 instead, so the above needs to be written as:
    @@ -16177,101 +17612,725 @@ class="cmsy-10">}]
    -

    +

    -

    Top

    9.3 The The glossaries-extra-bib2gls package

    -

    The package option

    The package option record=only (or simply (or simply record) automatically loads the + id="dx1-38002">) automatically loads the supplementary package glossaries-extra-bib2gls, which provides some commands that + id="dx1-38003">, which provides some commands that are specific to bib2gls. The package isn’t loaded by record=alsoindex as that option +is intended for sorting with makeindex or xindy and it is expected that the sorting +will be switched off (with the resource option sort=none). +

    If glossaries-extra-bib2gls is loaded via the record package option then the +check for associated language resource files (see §13 Multi-Lingual Support) +will also search for the existence of glossariesxtr-script.ldf for each +document dialect (where ⟨script⟩ is the four letter script identifier, such as +Latn). +


    \glsxtrprovidecommand  \glsxtrprovidecommand{cs}[n][default] +{definition}

    +

    +This command is intended for use in @preamble. It’s simply defined to +\providecommand in glossaries-extra-bib2gls but bib2gls’s interpreter treats it as +\renewcommand. This means that you can override bib2gls’s internal definition of a +command without overriding the command definition in the document (if it’s already +defined before the resource file is input). For example + + + +

    +
    +@preamble{"\glsxtrprovidecommand{\int}{integral}"} +
    +

    This will force bib2gls to treat \int as the word “integral” to assist sorting but if +this preamble code is written to the .glstex file (as it is by default) then it won’t +override the current definition (provided by the kernel or redefined by a +package). +

    The helper commands in the resource files are defined using \providecommand. +For many of them, if you want to provide an alternative definition then you need to +define the command before the resource file is loaded. There are a few that may be +redefined afterwards but if you use \renewcommand then you will get an error on the +first LATEX run when the .glstex file doesn’t exist. In this case, you may prefer to +use: +


    \glsrenewcommand  \glsrenewcommand{cs}[n][default]{definition} +

    +

    +This behaves like \renewcommand but only generates a warning rather than an error +if the command isn’t already defined so it won’t interrupt the document +build. +


    \GlsXtrIndexCounterLink  \GlsXtrIndexCounterLink{text}{label} +

    +

    +If the \hyperref command has been defined (that is, hyperref has been +loaded before glossaries-extra) then this command checks for the existence of +the indexcounter field. If this field is set for the entry given by ⟨label⟩, this +command does \hyperref[wrglossary.value]{text}, where ⟨value⟩ is the +value of the indexcounter field. If the field isn’t set or if \hyperref hasn’t +been defined, this just does ⟨text⟩. This command is provided for use with the +indexcounter package option combined with bib2gls’s save-index-counter +resource option. See the bib2gls manual for further details (at least version +1.4). +

    If you use the set-widest resource option, bib2gls v1.8+ will now +use: +


    \glsxtrSetWidest  \glsxtrSetWidest{type}{level}{text}

    +

    +(if it has been defined) to set the widest name for the given glossary type and level. +This allows for both the alttree style and the styles provided by glossary-longextra, +which need to know the widest name. +

    If bib2gls can’t determine the widest name (typically because the name field +consists of commands that aren’t recognised by the interpreter) then bib2gls v1.8+ +will now use: +


    \glsxtrSetWidestFallback  \glsxtrSetWidestFallback{max depth}{list} +

    + + + +

    +(if defined). Currently the maximum hierarchical depth ⟨max depth⟩ may only be 0 or +2. This command requires commands provided by the glossaries-extra-stylemods +package with the alttree style enabled. In this case, it may be simpler to just use +\glssetwidest. +

    +

    +

    Top

    9.3.1 Supplemental Locations

    +


    \glsxtrdisplaysupploc  \glsxtrdisplaysupploc{prefix}{counter}{format} +{src}{location}

    +

    +This is used by bib2gls version 1.7+ for supplemental locations, instead of using +\glsxtrsupphypernumber with the externallocation attribute. This command sets up +the location counter and prefix (used in the formation of hyperlinks) and then +uses +


    \glsxtrmultisupplocation  \glsxtrmultisupplocation{location}{src} +{format}

    +

    +to format the actual location (with an external hyperlink, if supported). +

    +

    +

    Top

    9.3.2 Nameref Record

    +

    Normally locations are recorded in the .aux file in the form: +


    \glsxtr@record{label}{prefix}{counter}{format}{location} +

    +

    +The record=nameref option, which requires at least bib2gls v1.8, instead +uses: +


    \glsxtr@record@nameref{label}{prefix}{counter}{format}{location} +{title}{href}{hcounter}

    +

    +where ⟨title⟩ is obtained from \@currentlabelname and ⟨href ⟩ is obtained from +\@currentHref. These commands require hyperref. If they are undefined, ⟨title⟩ and +⟨href ⟩ will be left empty and bib2gls will treat it as a regular record. +

    Be careful with this option as ⟨href ⟩ will globally change on every instance of +\refstepcounter but ⟨title⟩ won’t necessarily change. It can therefore cause +unexpected behaviour.
    +

    +

    The final argument ⟨hcounter⟩ is obtained from \theHcounter⟩ which provides the +partial target name associated with the indexing counter. With the original + + + +makeindex/xindy approach, it’s not possible to include this information in the +location, so the base glossaries package attempts to derive a prefix from which the +⟨hcounter⟩ value can be reconstituted by appending the prefix. Unfortunately, not all +definitions of \theHcounter⟩ are in the form ⟨prefix\thecounter⟩ (most notably the +equation counter with chapters) so this can fail. +

    Since bib2gls. The package isn’t loaded by is customized specifically for use with glossaries-extra, it’s now +possible to save ⟨hcounter⟩, so the record=alsoindex as that option -is intended for sorting with makeindex or xindy and it is expected that the sorting -will be switched off (with the resource option sort=none). -

    If glossaries-extra-bib2gls is loaded via the record package option then the -check for associated language resource files (see §13 Multi-Lingual Support) -will also search for the existence of glossariesxtr-script.ldf for each -document dialect (where ⟨script⟩ is the four letter script identifier, such as +class="cmss-10">=nameref option does this. By providing both +⟨href ⟩ and ⟨hcounter⟩, you can determine which target you would rather use. The default +is to use ⟨hcounter⟩, which will take you to the place where the corresponding counter +was incremented with \refstepcounter. However, you may choose to switch to +using the ⟨href ⟩ target, which will take you to the nearest target before the indexing +took place. +

    With bib2gls v1.8+, normal locations are displayed using: +


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

    +

    +This is provided by the base glossaries package and is simply defined to do: +


    \setentrycounter[prefix]{counter}\csuse{format}{location} +

    +

    +Earlier versions of bib2gls only used this in the loclist field and explicitly used Latn). -


    \setentrycounter in the location field followed by \format{location}, which follows +the code that’s created with the default makeindex setting. The \setentrycounter +command sets up the prefix needed for \glshypernumber to reform the target name +from the given location. +

    The locations identified by \glsxtr@record@nameref are written by bib2gls to +the location list using: +


    \glsxtrdisplaylocnameref  \glsxtrdisplaylocnameref{prefix}{counter} +{format}{location}{title}{href}{hcounter}{file}

    +

    +With normal internal locations, ⟨file⟩ will always be empty. With supplemental +locations, ⟨file⟩ will be the external file reference. +

    The default definition is: + + + +

    +
    +\newcommand*{\glsxtrdisplaylocnameref}[8]{% + 
      \ifstrequal{#2}{equation}% + 
      {\glsxtrnamereflink{#3}{(#4)}{#2.#7}{#8}}% + 
      {% + 
         \ifstrempty{#5}% + 
         {% + 
           \glsxtrnamereflink{#3}{#4}{#2.#7}{#8}% + 
         }% + 
         {% + 
           \ifstrequal{#2}{page}% + 
           {\glsxtrnamereflink{#3}{#4}{#2.#7}{#8}}% + 
           {\glsxtrnamereflink{#3}{#5}{#2.#7}{#8}}% + 
         }% + 
      }% + 
    } +
    +

    which uses: +


    \glsxtrnamereflink  \glsxtrnamereflink{format}{title}{target}{file} +

    +

    +This ignores the ⟨prefix⟩, ⟨counter⟩ and {location} arguments and instead creates a +hyperlink with the target name obtained from ⟨target⟩ (and ⟨file⟩, if not empty). +

    Since pages and equations typically don’t have titles, the default definition of +\glsxtrdisplaylocnameref checks the counter was used as the location. If it’s page +or if ⟨title⟩ is empty, then just the location is used as the hyperlink text. If the counter +equation, then the text is the location in parentheses. Otherwise the text is obtained +from ⟨title⟩. +

    If ⟨file⟩ is empty an internal link is created with: +


    \glsxtrfmtinternalnameref  \glsxtrfmtinternalnameref{target}{format} +{title}

    +

    +otherwise an external link is created with: +


    \glsxtrfmtexternalnameref  \glsxtrfmtexternalnameref{target}{format} +{title}{file}

    +

    +The ⟨file⟩ argument is set by bib2gls for supplemental locations. +

    Here’s alternative definition that uses the ⟨prefix⟩ and ⟨counter⟩ to reform the +target name (as \glsnoidxdisplayloc) but uses the ⟨title⟩ as the hyperlink +text: + + + +

    +
    +\renewcommand*{\glsxtrdisplaylocnameref}[7]{% + 
     \glsxtrnamereflink{#3}{#5}{#6}{#7}% + 
    } +
    +

    which uses: +


    \glsxtrnameloclink  \glsxtrnameloclink{prefix}{counter}{format} +{location}{title}{file}

    +

    +This uses the same commands as \glsxtrnamereflink to produce the hyperlinks. +

    In both cases, the link is encapsulated with the text-block command whose +name is given by ⟨format⟩, but \glshypernumber is first locally redefined to +\@firstofone to prevent a conflict with the usual location hyperlink formation. +This means that if the ⟨format⟩ is hyperbf then it will simply behave like +textbf. +

    For compactness, bib2gls merges normal records if the ⟨prefix⟩, ⟨counter⟩ and +⟨location⟩ all match. (An order of precedence can be provided for format conflicts.) +With nameref records, you can use the --merge-nameref-on switch provided by +bib2gls v1.8+ to determine how to merge nameref records. This switch +must be followed by one of the following keywords: hcounter (merge on +⟨hcounter⟩, default) href (merge on ⟨href ⟩), title (merge on ⟨title⟩) and location +(merge on ⟨location⟩, as regular records). In all cases, the ⟨counter⟩ must also +match. +

    +

    +

    Top

    9.3.3 Helper Commands for Resource Options

    +


    \glshex  \glshex

    -

    +

    This is just defined as \string\u, which is required when you need to indicate a Unicode character in the form \uhex⟩ in some of the resource options (as illustrated above). -



    \glscapturedgroup  \glscapturedgroup

    -

    +

    This is just defined as \string\$ and is used for the captured group reference in a replacement part of a regular expression substitution (requires at least bib2gls + id="dx1-41004"> version 1.5). For example:

    -
    +
    sort-replace={{([a-zA-Z])\string\.}{\glscapturedgroup1}}
    -

    This only removes a full stop that follows any of the characters a,…,z or +

    This only removes a full stop that follows any of the characters a,…,z or A,…,Z. -

    If you use the

    If you use the save-child-count resource option, you can test if the childcount field is non-zero using: -



    \GlsXtrIfHasNonZeroChildCount  \GlsXtrIfHasNonZeroChildCount{label} @@ -16281,7 +18340,7 @@ class="cmitt-10">true}{false}

    -

    +

    This internally uses \GlsXtrIfFieldNonZero and will do ⟨false⟩ if the field isn’t set. @@ -16291,235 +18350,104 @@ class="cmti-10">false⟩ you can use \glscurrentfieldvalue to access the value. (It will be 0 in ⟨false⟩ if the field isn’t set.) -


    \glsxtrprovidecommand  \glsxtrprovidecommand

    -

    -This command is intended for use in @preamble. It’s simply defined to -\providecommand in glossaries-extra-bib2gls but bib2gls’s interpreter treats it as -\renewcommand. This means that you can override bib2gls’s internal definition of a -command without overriding the command definition in the document (if it’s already -defined before the resource file is input). For example - - - -

    -
    -@preamble{"\glsxtrprovidecommand{\int}{integral}"} -
    -

    This will force bib2gls to treat \int as the word “integral” to assist sorting but if -this preamble code is written to the .glstex file (as it is by default) then it won’t -override the current definition (provided by the kernel or redefined by a -package). -


    \GlsXtrIndexCounterLink  \GlsXtrIndexCounterLink{text}{label} -

    -

    -If the \hyperref command has been defined (that is, hyperref has been -loaded before glossaries-extra) then this command checks for the existence of -the indexcounter field. If this field is set for the entry given by ⟨label⟩, this -command does \hyperref[wrglossary.value]{text}, where ⟨value⟩ is the -value of the indexcounter field. If the field isn’t set or if \hyperref hasn’t -been defined, this just does ⟨text⟩. This command is provided for use with the -indexcounter package option combined with bib2gls’s save-index-counter -resource option. See the bib2gls manual for further details (at least version -1.4). -


    A convenient shortcut for use in the entry-type-aliases setting: +


    \GlsXtrBibTeXEntryAliases  \GlsXtrBibTeXEntryAliases

    -

    -A convenient shortcut for use in the entry-type-aliases setting. This provides -aliases for BibT

    +This provides aliases for BibTEX’s standard entry types to bib2gls’s @bibtexentry entry type -(requires at least ’s @bibtexentry +entry type (requires at least bib2gls version 1.4). -


    version 1.4). +

    You may also want to provide storage keys for BibTEX’s standard fields rather +than having to alias them all. This can be done with: +


    \GlsXtrProvideBibTeXFields  \GlsXtrProvideBibTeXFields

    -

    -Defines storage keys for BibTEX’s standard fields. Note that BibT

    +Note that BibTEX’s type field -clashes with the type field clashes with the glossaries package’s package’s type key, so this command provides the key -bibtextype instead. You can alias it with field-aliases=type=bibtextype in the -resource options. Each storage key is provided with a convenient command to access -the value in the form \glsxtrbibfield⟩. For example, \glsxtrbibaddress. The -bibtextype field can be accessed with \glsxtrbibtype. Each of these commands -takes the entry label as the sole argument. -


    \glsxtrdisplaysupploc  \glsxtrdisplaysupploc{prefix}{counter}{format} -{src}{location}

    -

    -This is used by bib2gls version 1.7+ for supplemental locations, instead of using -\glsxtrsupphypernumber with the externallocation attribute. This command sets up -the location counter and prefix (used in the formation of hyperlinks) and then -uses -


    \glsxtrmultisupplocation  \glsxtrmultisupplocation{location}{src} + id="dx1-41013"> key, so +this command provides the key bibtextype instead. You can alias it with {format}

    - - - -

    -to format the actual location (with an external hyperlink, if supported). -

    The field-aliases=type=bibtextype in the resource options. Each storage +key is provided with a convenient command to access the value in the form +\glsxtrbibfield⟩. For example, \glsxtrbibaddress. The bibtextype field can be +accessed with \glsxtrbibtype. Each of these commands takes the entry label as the +sole argument. +

    The glossaries-extra-bib2gls package also provides definitions of the missing + id="dx1-41014"> package also provides definitions of the missing mathematical Greek commands: \Alpha, , \Beta, , \Epsilon, , \Zeta, , \Eta, , \Iota, + id="dx1-41020">, \Kappa, , \Mu, , \Nu, , \Omicron, , \Rho, , \Tau, , \Chi, , \Digamma, , \omicron. These are all + id="dx1-41029">. These are all defined with \providecommand, so they won’t override any definitions provided by any package loaded before glossaries-extra. Since . Since bib2gls’s interpreter recognises + id="dx1-41032">’s interpreter recognises these commands, using them instead of explicitly using the Latin characters with the same shape helps to keep the Greek symbols together when sorting. Similarly, if upgreek has been loaded, the missing upright Greek commands are also + id="dx1-41033"> has been loaded, the missing upright Greek commands are also provided. -

    The remaining commands provide common rule blocks for use in the +

    The remaining commands provide common rule blocks for use in the sort-rule resource option. If you want a rule for a specific locale, you can provide similar commands in a file called \IfTrackedLanguageFileExists in the tracklang documentation for further details. + id="dx1-41034"> documentation for further details. + + + If this file is on TEX’s path and the tracklang package (automatically loaded by + id="dx1-41035"> package (automatically loaded by glossaries) detects that the document has requested that language or locale, then the file will automatically be loaded. For example, if you want to provide a rule @@ -16546,7 +18477,7 @@ contains:

    -
    +
    \ProvidesGlossariesExtraLang{welsh}[2018/02/23 v1.0]  
    \@ifpackageloaded{glossaries-extra-bib2gls}  
    { @@ -16584,7 +18515,7 @@ contains:  
    }  
    {}% glossaries-extra-bib2gls.sty not loaded
    -

    (The use of

    (The use of \string is in case the < character has been made active.) You can provide more than one rule-block per local, to allow for loanwords or foreign words. @@ -16592,7 +18523,7 @@ For example, you could provide \glsxtrWelshIRules, \glsxtrWelshIIRules etc. -

    If the rules are for a particular script (independent of language or region) then +

    If the rules are for a particular script (independent of language or region) then they can be provided in a file given by glossariesxtr-scriptglossariesxtr-Cyrl.ldf could contain:

    -
    +
    \ProvidesGlossariesExtraLang{Cyrl}[2018/02/23 v1.0]  
    \newcommand*{\glsxtrGeneralCyrillicIRules}{%  
      % Cyrillic rules @@ -16612,20 +18543,20 @@ class="cmtt-10">glossariesxtr-Cyrl.ldf could contain:  
      % an alternative set of Cyrillic rules  
    }
    -

    (Remember that the required document language scripts need to be tracked through +

    (Remember that the required document language scripts need to be tracked through the tracklang package, in order for these files to be automatically loaded. This + id="dx1-41036"> package, in order for these files to be automatically loaded. This essentially means ensuring you load the appropriate language package before tracklang is loaded by the base is loaded by the base glossaries package or any other package that uses it. + id="dx1-41038"> package or any other package that uses it. See the tracklang documentation for further details.) -

    Alternatively, if the rules are specific to a subject rather than a region or + id="dx1-41039"> documentation for further details.) +

    Alternatively, if the rules are specific to a subject rather than a region or language, then you can provide a supplementary package. For example, if you have a package called, say, mapsymbols that provides map symbols, then the file @@ -16635,7 +18566,7 @@ class="cmtt-10">mapsymbols.sty might contain:

    -
    +
    \NeedsTeXFormat{LaTeX2e}  
    \ProvidesPackage{mapsymbols}  
     some package or font loading stuff here to provide @@ -16651,28 +18582,28 @@ class="cmtt-10">mapsymbols.sty might contain:  
     \string< \glshex 26BD % football 0x26BD  
    }
    -

    and the supplementary file

    and the supplementary file mapsymbols.bib can provide the appropriate definitions for bib2gls: + id="dx1-41041">:

    -
    +
    @preamble{"\glsxtrprovidecommand{\Harbour}{\char"2693}  
    \glsxtrprovidecommand{\Battlefield}{\char"2694}  
    \glsxtrprovidecommand{\Stadium}{\char"26BD}"}
    -

    Now both the preamble and rule block can be used in the resource set: +

    Now both the preamble and rule block can be used in the resource set:

    -
    +
    \usepackage{mapsymbols}% my custom package  
    \usepackage[record]{glossaries-extra}  
    \GlsXtrLoadResources[ @@ -16694,10 +18625,10 @@ class="cmtt-10">bib2gls }  
    ]
    -

    -

    The following commands are provided by

    +

    The following commands are provided by glossaries-extra-bib2gls. They should be + id="dx1-41042">. They should be separated by the rule separator characters ; (semi-colon) or , (comma) or @@ -16706,21 +18637,21 @@ class="cmtt-10">& (ampersand) or < (less than). See Java’s RuleBasedCollator documentation for details of the rule syntax. -

    For example, the following will place the mathematical Greek symbols (

    For example, the following will place the mathematical Greek symbols (\alpha, + id="dx1-41043">, \Alpha, , \beta, , \Beta etc) in a block before Latin characters: + id="dx1-41046"> etc) in a block before Latin characters:

    -
    +
    sort-rule={\glsxtrcontrolrules  
     ;\glsxtrspacerules  
     ;\glsxtrnonprintablerules @@ -16735,48 +18666,48 @@ sort-rule={\glsxtrcontrolrules  
     <\glsxtrLatinOslash  
    }
    -

    -


    +


    \glsxtrcontrolrules  \glsxtrcontrolrules

    -

    +

    These are control characters that are usually placed at the start of a rule in the ignored section. They typically won’t occur in any sort values, but if they do they should normally be ignored. -



    \glsxtrspacerules  \glsxtrspacerules

    -

    +

    These are space characters. They typically come after the control characters with the two blocks separated by a ; (semi-colon). -



    \glsxtrnonprintablerules  \glsxtrnonprintablerules

    -

    +

    These are non-printable characters (BOM, tabs, line feed and carriage return). They typically come after the spaces separated by a ; (semi-colon). These characters aren’t checked for by bib2gls when it determines whether or not to use the + id="dx1-41051"> when it determines whether or not to use the interpreter, so a TAB or newline character may end up in the sort value if it wasn’t interpreted. -



    \glsxtrcombiningdiacriticrules  \glsxtrcombiningdiacriticrules

    -

    +

    These are combining diacritic marks which typically follow the space and non-printable blocks (separated by a semi-colon). This command is defined in terms of sub-block commands: @@ -16784,7 +18715,7 @@ of sub-block commands:

    -
    +
    \newcommand*{\glsxtrcombiningdiacriticrules}{%  
     \glsxtrcombiningdiacriticIrules\string;  
     \glsxtrcombiningdiacriticIIrules\string; @@ -16792,36 +18723,36 @@ of sub-block commands:  
     \glsxtrcombiningdiacriticIVrules  
    }
    -

    If you prefer, you can use the sub-blocks directly in your required ordered. -


    If you prefer, you can use the sub-blocks directly in your required ordered. +


    \glsxtrcombiningdiacriticIrules  \glsxtrcombiningdiacriticIrules

    -

    +

    This contains the combining diacritics: acute, grave, breve, circumflex, caron, ring, vertical line above, diaeresis (umlaut), double acute, tilde, dot above, combining macron. -



    \glsxtrcombiningdiacriticIIrules  \glsxtrcombiningdiacriticIIrules

    -

    +

    This contains the combining diacritics: short solidus overlay, cedilla, ogonek, dot below, low line, overline, hook above, double vertical line above, double grave accent, candrabindu, inverted breve, turned comma above, comma above, reversed comma above, comma above right, grave accent below, acute accent below. -



    \glsxtrcombiningdiacriticIIIrules  \glsxtrcombiningdiacriticIIIrules

    -

    +

    This contains the combining diacritics: left tack below, right tack below, left angle above, horn, left half ring below, up tack below, down tack below, plus sign below, minus sign below, palatalized hook below, retroflex hook below, diaresis below, ring @@ -16833,13 +18764,13 @@ seagull below, x above, vertical tilde, double overline, Greek perispomeni, Gree dialytika tonos, Greek ypogegrammeni, double tilde, double inverted breve, Cyrillic titlo, Cyrillic palatalization, Cyrillic dasia pneumata, Cyrillic psili pneumata. -



    \glsxtrcombiningdiacriticIVrules  \glsxtrcombiningdiacriticIVrules

    -

    +

    This contains the combining diacritics: left harpoon above, right harpoon above, long vertical line overlay, short vertical line overlay, anticlockwise arrow above, clockwise arrow above, left arrow above, right arrow above, ring overlay, clockwise ring overlay, @@ -16849,20 +18780,20 @@ arrow above, left arrow above, right arrow above, ring overlay, clockwise ring o anticlockwise ring overlay, three dots above, four dots above, enclosing circle, enclosing square, enclosing diamond, enclosing circle backslash, left right arrow above. -



    \glsxtrhyphenrules  \glsxtrhyphenrules

    -

    +

    This contains hyphens (including the minus sign 0x2212). This rule block typically comes after the diacritic rules separated by a comma. -



    \glsxtrgeneralpuncrules  \glsxtrgeneralpuncrules

    -

    +

    This contains punctuation characters. This rule block typically comes after the hyphen rules separated by a less than (<). As with the combining diacritics, this @@ -16872,20 +18803,20 @@ different order is required:

    -
    +
    \newcommand*{\glsxtrgeneralpuncrules}{%  
      \glsxtrgeneralpuncIrules  
      \string<\glsxtrcurrencyrules  
      \string<\glsxtrgeneralpuncIIrules  
    }
    -

    -


    +


    \glsxtrgeneralpuncIrules  \glsxtrgeneralpuncIrules

    -

    +

    This is the first punctuation sub-block containing: underscore, macron, comma, semi-colon, colon, exclamation mark, inverted exclamation mark, question mark, inverted question mark, solidus, full stop, acute accent, grave accent, @@ -16894,32 +18825,32 @@ straight double quote, left guillemet, right guillemet, left parenthesis, right parenthesis, left square bracket, right square bracket, left curly bracket, right curly bracket, section sign, pilcrow sign, copyright sign, registered sign, at sign. -



    \glsxtrcurrencyrules  \glsxtrcurrencyrules

    -

    +

    This sub-block contains some currency symbols: currency sign, Thai currency symbol baht, cent sign, colon sign, cruzeiro sign, dollar sign, dong sign, euro sign, French franc sign, lira sign, mill sign, naira sign, peseta sign, pound sign, rupee sign, new sheqel sign, won sign, yen sign. -



    \glsxtrgeneralpuncIIrules  \glsxtrgeneralpuncIIrules

    -

    +

    This sub-block contains some other punctuation symbols: asterisk, backslash, ampersand, hash sign, percent sign, plus sign, plus-minus sign, division sign, multiplication sign, less-than sign, equals sign, greater-than sign, not sign, vertical bar (pipe), broken bar, degree sign, micron sign. -



    \glsxtrdigitrules  \glsxtrdigitrules

    -

    +

    This rule block contains the Basic Latin digits (0, …, 9) and the subscript and superscript digits (0 0 etc) made equivalent to the corresponding Basic Lat The digit block typically comes after the punctuation rules separated by a less than (<). -



    \glsxtrBasicDigitrules  \glsxtrBasicDigitrules

    -

    +

    This rule block contains just the Basic Latin digits (0, …, 9). -



    \glsxtrSubScriptDigitrules  \glsxtrSubScriptDigitrules

    -

    +

    This rule block contains just the subscript digits (0 … 9). -



    \glsxtrSuperScriptDigitrules  \glsxtrSuperScriptDigitrules

    -

    +

    This rule block contains just the superscript digits (0 … 9). -



    \glsxtrfractionrules  \glsxtrfractionrules

    -

    +

    This rule block contains vulgar fraction characters. The digit block typically comes after the digit rules separated by a less than (<). -

    There are a number of Latin rule blocks. Some of these included extended +

    There are a number of Latin rule blocks. Some of these included extended characters or ligatures (such as ß or œ) but they don’t include accented characters. If you require a Latin rule block that includes accented characters, digraphs, trigraphs or other extended characters, then it’s best to provide similar @@ -16973,12 +18904,12 @@ class="cmtt-10">glossariesxtr-⟨tag.ldf file for the particular language or region. -



    \glsxtrGeneralLatinIrules  \glsxtrGeneralLatinIrules

    -

    +

    This is just the basic (non-extended) Latin alphabet with the superscript and subscript Latin letters (a a etc) treated as the equivalent basic Latin letter. don’t want the subscripts and superscripts included you can redefine \glsxtrLatinA etc to omit them.) -



    \glsxtrGeneralLatinIIrules  \glsxtrGeneralLatinIIrules

    -

    +

    This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’ and eszett (ß) treated as ‘ss’. -



    \glsxtrGeneralLatinIIIrules  \glsxtrGeneralLatinIIIrules

    -

    +

    This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’ and eszett (ß) treated as ‘sz’. -



    \glsxtrGeneralLatinIVrules  \glsxtrGeneralLatinIVrules

    -

    +

    This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’, ae-ligature (æ) is treated as ‘ae’, oe-ligature (œ) is treated as ‘oe’, eszett (ß) treated as ‘ss’ and thorn (þ) is treated as ‘th’. -



    \glsxtrGeneralLatinVrules  \glsxtrGeneralLatinVrules

    -

    +

    This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’, eszett (ß) treated as ‘ss’ and thorn (þ) treated as ‘th’. -



    \glsxtrGeneralLatinVIrules  \glsxtrGeneralLatinVIrules

    -

    +

    This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’, eszett (ß) treated as ‘sz’ and thorn (þ) treated as ‘th’. -



    \glsxtrGeneralLatinVIIrules  \glsxtrGeneralLatinVIIrules

    -

    +

    This is like \glsxtrGeneralLatinIrules but it includes ae-ligature (æ) between ‘A’ and ‘B’, eth (Ð) between ‘D’ and ‘E’, insular G (Ᵹ) instead of ‘G’, oe-ligature between ‘O’ and ‘P’, long s (ſ) equivalent to ‘s’, thorn (þ) between ‘T’ and ‘U’ and wynn (Ƿ) instead of W. -



    \glsxtrGeneralLatinVIIIrules  \glsxtrGeneralLatinVIIIrules

    -

    +

    This is like \glsxtrGeneralLatinIrules but ae-ligature (æ) is treated as ‘ae’, oe-ligature (œ) is treated as ‘oe’, eszett (ß) treated as ‘ss’, thorn (þ) is treated as ‘th’, Ø is treated as ‘O’ and ‘Ł’ is treated as ‘L’. -



    \glsxtrLatinA  \glsxtrLatinA

    -

    +

    A mini-rule that just covers ‘A’ but includes the sub- and superscript A. -



    \glsxtrLatinE  \glsxtrLatinE

    -

    +

    A mini-rule that just covers ‘E’ but includes the subscript E. -



    \glsxtrLatinH  \glsxtrLatinH

    -

    +

    A mini-rule that just covers ‘H’ but includes the subscript H. -



    \glsxtrLatinK  \glsxtrLatinK

    -

    +

    A mini-rule that just covers ‘K’ but includes the subscript K. -



    \glsxtrLatinI  \glsxtrLatinI

    -

    +

    A mini-rule that just covers ‘I’ but includes the superscript I. -



    \glsxtrLatinL  \glsxtrLatinL

    -

    +

    A mini-rule that just covers ‘L’ but includes the subscript L. -



    \glsxtrLatinM  \glsxtrLatinM

    -

    +

    A mini-rule that just covers ‘M’ but includes the subscript M. -



    \glsxtrLatinN  \glsxtrLatinN

    -

    +

    A mini-rule that just covers ‘N’ but includes the sub- and superscript N. -



    \glsxtrLatinO  \glsxtrLatinO

    -

    +

    A mini-rule that just covers ‘O’ but includes the sub- and superscript O. -



    \glsxtrLatinP  \glsxtrLatinP

    -

    +

    A mini-rule that just covers ‘P’ but includes the subscript P. -



    \glsxtrLatinS  \glsxtrLatinS

    -

    +

    A mini-rule that just covers ‘S’ but includes the subscript S. -



    \glsxtrLatinT  \glsxtrLatinT

    -

    +

    A mini-rule that just covers ‘T’ but includes the subscript T. -



    \glsxtrLatinX  \glsxtrLatinX

    -

    +

    A mini-rule that just covers ‘X’ but includes the subscript X. -



    \glsxtrLatinEszettSs  \glsxtrLatinEszettSs

    -

    +

    A mini-rule that just covers eszett (ß) and makes long s (ſ) followed by short ‘s’ equivalent to ‘ß’. (This is used in the above blocks that treat ‘ß’ as ‘ss’.) -



    \glsxtrLatinEszettSz  \glsxtrLatinEszettSz

    -

    +

    A mini-rule that just covers eszett (ß) and makes long s (ſ) followed by ‘z’ equivalent to ‘ß’. (This is used in the above blocks that treat ‘ß’ as ‘sz’.) -



    \glsxtrLatinEth  \glsxtrLatinEth

    -

    +

    A mini-rule for eth (Ð) so you don’t need to remember the Unicode values. -



    \glsxtrLatinThorn  \glsxtrLatinThorn

    -

    +

    A mini-rule for thorn (þ) so you don’t need to remember the Unicode values. -



    \glsxtrLatinAELigature  \glsxtrLatinAELigature

    -

    +

    A mini-rule for ae-ligature (æ) so you don’t need to remember the Unicode values. -



    \glsxtrLatinOELigature  \glsxtrLatinOELigature

    -

    +

    A mini-rule for oe-ligature (œ) so you don’t need to remember the Unicode values. -



    \glsxtrLatinOslash  \glsxtrLatinOslash

    -

    +

    A mini-rule for ‘Ø’ so you don’t need to remember the Unicode values. -



    \glsxtrLatinLslash  \glsxtrLatinLslash

    -

    +

    A mini-rule for ‘Ł’ so you don’t need to remember the Unicode values. -



    \glsxtrLatinWynn  \glsxtrLatinWynn

    -

    +

    A mini-rule for wynn (Ƿ) so you don’t need to remember the Unicode values. -



    \glsxtrLatinInsularG  \glsxtrLatinInsularG

    -

    +

    A mini-rule for insular G (Ᵹ) so you don’t need to remember the Unicode values. -



    \glsxtrLatinSchwa  \glsxtrLatinSchwa

    -

    +

    A mini-rule that just covers schwa (Ə) but includes the subscript schwa. (Not used in any of the provided Latin rule blocks described above.) -



    \glsxtrLatinAA  \glsxtrLatinAA

    -

    +

    A mini-rule for ‘Å’ so you don’t need to remember the Unicode values. (Not used in any of the provided Latin rule blocks described above.) -



    \glsxtrMathGreekIrules  \glsxtrMathGreekIrules

    -

    +

    A rule block for mathematical Greek (\alpha, , \beta etc) and upright Greek + id="dx1-41102"> etc) and upright Greek (\upalpha, etc, from the , etc, from the upgreek package) characters that includes digamma + id="dx1-41104"> package) characters that includes digamma (\digamma and and \Digamma) between epsilon and zeta. The upright and italic versions + id="dx1-41106">) between epsilon and zeta. The upright and italic versions are gathered together into the same letter group. -



    \glsxtrMathGreekIIrules  \glsxtrMathGreekIIrules

    -

    +

    As \glsxtrMathGreekIrules but doesn’t include digamma. -



    \glsxtrMathUpGreekIrules  \glsxtrMathUpGreekIrules

    -

    +

    A rule block for upright Greek (\upalpha, etc, from the , etc, from the upgreek package) + id="dx1-41110"> package) characters that includes digamma (\digamma and and \Digamma) between epsilon and + id="dx1-41112">) between epsilon and zeta. -



    \glsxtrMathUpGreekIIrules  \glsxtrMathUpGreekIIrules

    -

    +

    A rule block for upright Greek (\upalpha, etc, from the , etc, from the upgreek package) that + id="dx1-41115"> package) that doesn’t include digamma. -



    \glsxtrMathItalicGreekIrules  \glsxtrMathItalicGreekIrules

    -

    +

    A rule block for mathematical Greek (\alpha, , \Alpha, etc) characters that includes + id="dx1-41118">, etc) characters that includes digamma (\diagamma and and \Digamma) between epsilon and zeta. Note that even + id="dx1-41120">) between epsilon and zeta. Note that even though the upper case \Delta etc are actually rendered upright by LATEX, bib2gls’s interpreter treats them as italic to help keep them close to the lower case + id="dx1-41122">’s interpreter treats them as italic to help keep them close to the lower case versions. -



    \glsxtrMathItalicGreekIIrules  \glsxtrMathItalicGreekIIrules

    -

    +

    A rule block for mathematical Greek (\alpha, , \Alpha, etc) characters that doesn’t + id="dx1-41125">, etc) characters that doesn’t include digamma. -



    \glsxtrMathItalicUpperGreekIrules  \glsxtrMathItalicUpperGreekIrules

    -

    +

    A rule block for upper case mathematical Greek (\Alpha, , \Beta, etc) characters that + id="dx1-41128">, etc) characters that includes digamma (\Digamma) between epsilon and zeta. -


    ) between epsilon and zeta. +


    \glsxtrMathItalicUpperGreekIIrules  \glsxtrMathItalicUpperGreekIIrules

    -

    +

    A rule block for upper case mathematical Greek (\Alpha, , \Beta, etc) characters that + id="dx1-41132">, etc) characters that doesn’t include digamma. -



    \glsxtrMathItalicLowerGreekIrules  \glsxtrMathItalicLowerGreekIrules

    -

    +

    A rule block for lower case mathematical Greek (\alpha, , \beta, etc) characters that + id="dx1-41135">, etc) characters that includes digamma (\digamma) between epsilon and zeta. -


    ) between epsilon and zeta. +


    \glsxtrMathItalicLowerGreekIIrules  \glsxtrMathItalicLowerGreekIIrules

    -

    +

    A rule block for lower case mathematical Greek (\alpha, , \beta, etc) characters that + id="dx1-41139">, etc) characters that doesn’t include digamma. -

    Additionally, there are commands in the form

    Additionally, there are commands in the form \glsxtrUpAlpha, \glsxtrUpBeta etc and \upalpha etc and \Alpha, \alpha etc) as well as the following: -



    \glsxtrMathItalicPartial  \glsxtrMathItalicPartial

    -

    +

    The partial derivative symbol (). -



    \glsxtrMathItalicNabla  \glsxtrMathItalicNabla

    -

    +

    The nabla symbol (). -

    +

    -

    Top

    9.4 Supplementary Commands

    -

    These commands are provided by

    These commands are provided by glossaries-extra for use with bib2gls. -

    The information provided with . +

    The information provided with \GlsXtrLoadResources is written to the .aux file using

    @@ -17454,16 +19385,16 @@ class="cmtt-10">}
    where ⟨information⟩ is the information to pass to bib2gls. The command in the + id="dx1-42004">. The command in the second argument -



    \glsxtrresourceinit  \glsxtrresourceinit

    -

    +

    may be used to temporarily redefine commands before the information is written to the file. This does nothing by default, but may be redefined to allow the use of short commands for convenience. For example, with: @@ -17471,23 +19402,23 @@ commands for convenience. For example, with:

    -
    +
    \renewcommand{\glsxtrresourceinit}{\let\u\glshex}
    -

    you can just use, for example,

    you can just use, for example, \u E6 instead of \string\uE6 in the custom rule. This redefinition of \u is scoped so its original definition is restored after the write operation. -

    It’s possible to specify label prefixes. For example, modifying the earlier +

    It’s possible to specify label prefixes. For example, modifying the earlier example:

    -
    +
    \documentclass{article}  
    \usepackage[record,style=indexgroup]{glossaries-extra}  
    \setabbreviationstyle{long-short-desc} @@ -17508,24 +19439,24 @@ example:  
    \printunsrtglossaries  
    \end{document}
    -

    If you do something like this, you may find it more convenient to define custom +

    If you do something like this, you may find it more convenient to define custom commands that set the prefix. For example:

    -
    +
    \newcommand*{\sym}[2][]{\gls[#1]{sym.#2}}
    -

    The problem with this is that the custom command

    The problem with this is that the custom command \sym doesn’t allow for modifiers (such as \gls* or \gls+). Instead you can use: -



    \glsxtrnewgls  \glsxtrnewgls[default options]{prefix}{cs}

    -

    +

    which defines the command ⟨cs⟩ that behaves like

    @@ -17558,26 +19489,26 @@ class="cmtt-10">] -
    +
    \glsxtrnewgls{sym.}{\sym}
    -

    or (to default to no hyperlinks) +

    or (to default to no hyperlinks)

    -
    +
    \glsxtrnewgls[hyper=false]{sym.}{\sym}
    -

    now you can use

    now you can use \sym+{M} to behave like \gls+{sym.M}. -

    If you also want the plural and first letter upper case versions you can +

    If you also want the plural and first letter upper case versions you can use -



    \glsxtrnewglslike  \glsxtrnewglslike[default options]{}{\Glspl-like cs}

    -

    +

    For example:

    -
    +
    \glsxtrnewglslike[hyper=false]{idx.}{\idx}{\idxpl}{\Idx}{\Idxpl}
    -

    For the all caps versions: -


    For the all caps versions: +


    \glsxtrnewGLSlike  \glsxtrnewGLSlike[default options]{\GLS-like cs}{\GLSpl-like cs}

    -

    +

    For example:

    -
    +
    \glsxtrnewGLSlike[hyper=false]{idx.}{\IDX}{\IDXpl}
    -

    -

    There’s an analogous command for

    +

    There’s an analogous command for \rgls: -



    \glsxtrnewrgls  \glsxtrnewrgls[default options]{}{cs}

    -

    +

    and for \rgls, \rglspl, \rGls and \rGlspl: -



    \glsxtrnewrglslike  \glsxtrnewrglslike[default options]{}{\rGlspl-like cs}

    -

    +

    and for the all caps: -



    \glsxtrnewrGLSlike  \glsxtrnewrGLSlike[default options]{\rGLS-like cs}{\rGLSpl-like cs}

    -

    -

    +

    +

    If you provide your own custom command with just \newcommand that +has syntax that starts with [options]{label}, then you can notify bib2gls +using: +


    \glsxtridentifyglslike  \glsxtridentifyglslike{prefix}{command} +

    +

    +This writes information to the .aux file so that bib2gls can search for the given +command when looking for dependencies. +

    Another possibility is to set up known label prefixes, with each one identified +by: +


    \glsxtraddlabelprefix  \glsxtraddlabelprefix{prefix}

    +

    +These should be listed in order of precedence. Since no entries are defined on the first +LATEX run, the final prefix should be the fallback. You can prepend a prefix to the +list using: +


    \glsxtrprependlabelprefix  \glsxtrprependlabelprefix{prefix} +

    +

    +which gives it the highest order of precedence. +

    The ⟨prefix⟩ argument may be empty. You can clear the list with: +


    \glsxtrclearlabelprefixes  \glsxtrclearlabelprefixes

    +

    +

    You can test if a prefix is already in the list with: + + + +


    \glsxtrifinlabelprefixlist  \glsxtrifinlabelprefixlist{prefix}{true} +{false}

    +

    +In general it’s best to avoid adding multiple instances of the same prefix, so you can +check with this command before adding a prefix to the list. However, it can be useful +to repeat a prefix at the end of the list so that it can be used as a fallback for entries +that haven’t yet been defined. +

    With the list of possible prefixes set up (including an empty prefix if necessary), +you can use: +


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

    +

    +which behaves like

    +
    +\gls[options]{prefix⟩⟨label}[insert] +
    +
    where ⟨prefix⟩ is the first prefix in the list such that ⟨prefix⟩⟨label⟩ matches a defined +entry (or the last entry in the prefix list if none match). +

    There are also analogous commands for the plural and case-changing +versions: +


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

    +

    +(uses \glspl), +


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

    +

    +(uses \Gls), +


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

    +

    +(uses \Glspl), +


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

    +

    +(uses \GLS), +


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

    +

    +(uses \GLSpl), +


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

    +

    +(uses \glslink), +


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

    +

    +(uses \glsdisp). +

    These commands are essentially provided for a mixture of single and dual entries. +Suppose the file entries.bib contains: + + + +

    +
    +@index{duck} + 
    @dualindexabbreviation{svm, + 
      short={SVM}, + 
      long={support vector machine} + 
    } + 
    @dualindexsymbol{pi, + 
      symbol={\ensuremath{\pi}}, + 
      description={ratio of a circle's circumference to its + 
        diameter} + 
    } +
    +

    and suppose the document code is: + + + +

    +
    +\documentclass{article} + 
    \usepackage{hyperref} + 
    \usepackage[record,abbreviations,symbols]{glossaries-extra} + 
    \newcommand{\bibglsnewdualindexsymbolsecondary}[5]{% + 
     \longnewglossaryentry*{#1}{name={#3},category={symbol}, + 
       type={symbols},symbol={#4},#2}{#5}% + 
    } + 
    \GlsXtrLoadResources[src=entries] + 
    \begin{document} + 
    First use: \gls{duck}, \gls{svm}, \gls{pi}. + 
    Next use: \gls{duck}, \gls{svm}, \gls{pi}. + 
    \printunsrtglossaries + 
    \end{document} +
    +

    This uses the default empty primary prefix and dual. for the dual prefix, so +\gls{svm} is referencing the primary entry, which is (essentially) an @index type +not an abbreviation. It therefore doesn’t follow the abbreviation style, and +it also hyperlinks to the index not to the list of abbreviations. Similarly +for \gls{pi}, which references the primary @index entry rather than the +symbol. +

    What’s really needed is: + + + +

    +
    +\gls{duck}, \gls{dual.svm}, \gls{dual.pi}. +
    +

    or with + + + +

    +
    +\GlsXtrLoadResources[src=entries, + 
     label-prefix={idx.}, + 
     dual-prefix={} + 
    ] +
    +

    then only the entries without a dual need a prefix: + + + +

    +
    +\gls{idx.duck}, \gls{svm}, \gls{pi}. +
    +

    Using \glsxtrnewglslike, as earlier, this can be simplified to: + + + +

    +
    +\idx{duck}, \gls{svm}, \gls{pi}. +
    +

    but this requires remembering which terms have duals. +

    An alternative is to use \dgls instead: + + + +

    +
    +\documentclass{article} + 
    \usepackage{hyperref} + 
    \usepackage[record,abbreviations,symbols]{glossaries-extra} + 
    \newcommand{\bibglsnewdualindexsymbolsecondary}[5]{% + 
     \longnewglossaryentry*{#1}{name={#3},category={symbol}, + 
       type={symbols},symbol={#4},#2}{#5}% + 
    } + 
    \GlsXtrLoadResources[src=entries] + 
    \glsxtraddlabelprefix{dual.} + 
    \glsxtraddlabelprefix{} + 
    \begin{document} + 
    First use: \dgls{duck}, \dgls{svm}, \dgls{pi}. + 
    Next use: \dgls{duck}, \dgls{svm}, \dgls{pi}. + 
    \printunsrtglossaries + 
    \end{document} +
    +

    On the first LATEX call (when the .glstex file doesn’t exist), neither +dual.svm nor svm exists, so \dgls uses the last prefix (which is empty in this +case). This means that on the first LATEX run, \dgls{svm} behaves like +\gls{svm}, which adds a record for the primary svm entry. The default +primary-dual dependency means that this will cause both the primary (svm) and +dual (dual.svm) entry to be selected. The location will be added to the +primary entry’s location list, unless overridden by resource options, such as +combine-dual-locations. +

    Once bib2gls has been run and the .glstex file exists, then dual.svm exists. +So \dgls{svm} will again first try dual.svm (as dual. is the first in the +list of label prefixes). That now exists, so \dgls{svm} now behaves like +\gls{dual.svm}, which follows the abbreviation style and hyperlinks to the list of +abbreviations. +

    Similarly for the index-symbol combination dual.pi and pi. In the case of +\dgls{duck}, the label dual.duck never exists, so that’s never selected. The empty +prefix is the only one that matches, so \dgls{duck} always behaves like +\gls{duck}. +

    If you haven’t used combine-dual-locations an extra bib2gls+LATEX run +may be required to correct the location lists. +

    If you change the label prefixes, remember to update the corresponding +\glsxtraddlabelprefix{prefix}. If no prefixes have been added to the list (or if the +list is cleared), just an empty prefix is assumed. +

    As from version 1.8, bib2gls provides hooks that identify the label prefixes in the + + + +.glstex file:

    +
    +\bibglstertiaryprefixlabel{prefix} +
    \bibglsdualprefixlabel{prefix} +
    \bibglsprimaryprefixlabel{prefix} +
    +
    These do nothing by default, but they can be defined before the resource file is +loaded to set up the prefix list. For example: + + + +
    +\newcommand{\bibglsprimaryprefixlabel}[1]{\glsxtraddlabelprefix{#1}} + 
    \newcommand{\bibglsdualprefixlabel}[1]{\glsxtrprependlabelprefix{#1}} + 
    \GlsXtrLoadResources[src=entries] +
    +

    Remember that this will only have an effect once the .glstex file has been created. +The prefix list will be empty on the first run (which is treated as a single empty +prefix). If this isn’t a suitable fallback, it may be necessary to add one after all the +resource commands: + + + +

    +
    +\newcommand{\bibglsprimaryprefixlabel}[1]{\glsxtraddlabelprefix{#1}} + 
    \newcommand{\bibglsdualprefixlabel}[1]{\glsxtrprependlabelprefix{#1}} + 
    \GlsXtrLoadResources[src=entries,label-prefix={idx.}] + 
    \glsxtraddlabelprefix{idx.} +
    +

    Although this rather defeats the purpose of using the hooks as you still have to keep +track of the fallback prefix. +

    -

    Top

    9.5 Record Counting

    -

    As from version 1.1 of

    As from version 1.1 of bib2gls, you can save the total record count for each entry by + id="dx1-43002">, you can save the total record count for each entry by invoking bib2gls with the with the --record-count or --record-count-unit switches. These options will ensure that when each entry is written to the .glstex file bib2gls will additionally set the following internal fields for that entry: + id="dx1-43006"> will additionally set the following internal fields for that entry:

    • recordcount: set to the total number of records found for class="cmtt-10">recordcount.⟨counter⟩: set to the total number of records found for the entry for the given counter.
    -

    If

    If --record-count-unit is used then additionally:

    • counter.location⟩: set to the total number of records found for the entry for the given counter with the given location.
    - - - -

    Only use the unit counting option if the locations don’t contain any special characters. If +

    Only use the unit counting option if the locations don’t contain any special characters. If you really need it with locations that may contain formatting commands, then you can try redefining: -



    \glsxtrdetoklocation  \glsxtrdetoklocation{location}

    -

    +

    so that it detokenizes ⟨location⟩ but take care when using \GlsXtrLocationRecordCount with commands like \thepage as they can end up becoming detokenized too early. -

    Note that the record count includes locations that

    Note that the record count includes locations that bib2gls discards, such as + id="dx1-43009"> discards, such as ignored records, duplicates and partial duplicates. It doesn’t include cross-reference records. For example, if \gls{bird} is used twice on page 1, once on page 2 and fours times on page 3, and \gls[counter=section]{bird} is used once in + + + section 3, then the total record count (stored in the recordcount field) is 2 + 1 + 4 + 1 = 8, the total for the section counter (stored in the recordcount.section field) is 1. -

    With the unit counting on as well, the field

    With the unit counting on as well, the field recordcount.page.1 is set to 2, recordcount.page.2 is set to 1, recordcount.page.3 is set to 4 and recordcount.section.3 is set to 1. -

    You can access these fields using the following commands which will expand to +

    You can access these fields using the following commands which will expand to the field value if set or to 0 if unset: -



    \GlsXtrTotalRecordCount  \GlsXtrTotalRecordCount{label}

    -

    +

    This expands to the total record count for the entry given by ⟨label⟩.

    -
    +
    \GlsXtrTotalRecordCount{bird}
    -

    expands to 8. -


    expands to 8. +


    \GlsXtrRecordCount  \GlsXtrRecordCount{label}{counter}

    -

    +

    This expands to the counter total for the entry given by ⟨label⟩ where ⟨counter⟩ is the @@ -17811,22 +20183,22 @@ counter name. For example:

    -
    +
    \GlsXtrRecordCount{bird}{page}
    -

    expands to 7 and +

    expands to 7 and

    -
    +
    \GlsXtrRecordCount{bird}{section}
    -

    expands to 1. -


    expands to 1. +


    \GlsXtrLocationRecordCount  \GlsXtrLocationRecordCount{label}{} class="cmtt-10">{location}

    -

    +

    This expands to the total for the given location. For example

    -
    +
    \GlsXtrLocationRecordCount{bird}{page}{3}
    -

    expands to 4. Be careful about using

    expands to 4. Be careful about using \thepage in the ⟨location⟩ part. Remember that due to TEX’s asynchronous output routine, \thepage may not be correct. -

    There are commands analogous to the entry counting commands like

    There are commands analogous to the entry counting commands like \cgls and \cglsformat that are triggered by the record count. These are listed below. -



    \rgls  \rglsmodifier[label}[insert]

    -

    -


    +


    \rglspl  \rglsplmodifier[label}[insert]

    -

    -


    +


    \rGls  \rGlsmodifier[label}[insert]

    -

    -


    +


    \rGlspl  \rGlsplmodifier[label}[insert]

    -

    -


    +


    \rGLS  \rGLSmodifier[label}[insert]

    -

    -


    +


    \rGLSpl  \rGLSplmodifier[label}[insert]

    -

    +

    These commands check the recordcount attribute which, if set, should be a number. + id="dx1-43019"> attribute which, if set, should be a number. For example:

    -
    +
    \glssetcategoryattribute{abbreviation}{recordcount}{1}
    -

    For convenience, you can use -


    For convenience, you can use +


    \GlsXtrSetRecordCountAttribute  \GlsXtrSetRecordCountAttribute{category list}{n}

    -

    +

    to set the recordcount attribute to ⟨ attribute to ⟨n⟩ for all the categories listed in ⟨category list⟩. -

    The

    The \rgls-like commands use -



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

    -

    +

    to determine whether the \rgls-like command should behave like its \gls counterpart (⟨normal⟩) or whether it should instead use ⟨trigger code⟩. -

    This command checks if the

    This command checks if the recordcount attribute is set. If not is just does + id="dx1-43023"> attribute is set. If not is just does ⟨normal⟩, otherwise it tests if -



    \glsxtrrecordtriggervalue  \glsxtrrecordtriggervalue{label}

    -

    +

    is greater than the value given in the recordcount attribute for that entry’s category. + id="dx1-43025"> attribute for that entry’s category. If true, this does ⟨normal⟩ otherwise it does ⟨trigger code⟩. The default definition of the @@ -18021,105 +20393,105 @@ trigger value command is:

    -
    +
    \newcommand*{\glsxtrrecordtriggervalue}[1]{%  
     \GlsXtrTotalRecordCount{#1}%  
    }
    -

    The ⟨

    The ⟨trigger code⟩ part writes a record with the format set to set to glstriggerrecordformat (which bib2gls v1.1+ recognises as a special type of ignored location format) and + id="dx1-43028"> v1.1+ recognises as a special type of ignored location format) and does ⟨trigger format⟩. Then it unsets the first use flag. Note that it doesn’t implement the post-link hook. This ensures that the record count is correct on the next run. -

    The ⟨

    The ⟨trigger format⟩ depends on the \rgls-like command used and will be one of the following: -



    \rglsformat  \rglsformat{label}{insert}

    -

    -


    +


    \rglsplformat  \rglsplformat{label}{insert}

    -

    -


    +


    \rGlsformat  \rGlsformat{label}{insert}

    -

    -


    +


    \rGlsplformat  \rGlsplformat{label}{insert}

    -

    -


    +


    \rGLSformat  \rGLSformat{label}{insert}

    -

    -


    +


    \rGLSplformat  \rGLSplformat{label}{insert}

    -

    +

    These all behave much like their \cglsformat counterparts. If the entry’s regular + id="dx1-43036"> attribute is set or if the entry doesn’t have a long form, the first or first plural is used, otherwise the long or long plural form is used. -

    You can use -


    You can use +


    \glsxtrenablerecordcount  \glsxtrenablerecordcount

    -

    +

    to redefine \gls, \glspl, \rGls, class="cmtt-10">\rGlspl, \rGLS, \rGLSpl, respectively, for convenience. -

    If you don’t want the entries that use ⟨

    If you don’t want the entries that use ⟨trigger code⟩ to appear in the glossary, you need to use the resource option trigger-type to assign them to another glossary. @@ -18143,7 +20515,7 @@ For example:

    -
    +
    \documentclass{article}  
    \usepackage[record]{glossaries-extra}  
    \newignoredglossary{ignored} @@ -18160,7 +20532,7 @@ For example:  
    \printunsrtglossaries  
    \end{document}
    -

    In the above,

    In the above, stc and upa both only have one record, so they are assigned to the main one.

    -

    -

    +

    Top

    10. Miscellaneous New Commands

    -

    The

    The glossaries package provides \glsrefentry entry to cross-reference entries + id="dx1-44001"> entry to cross-reference entries when used with the entrycounter or or subentrycounter options. The 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 instead of \ref. -

    You can copy an entry to another glossary using -


    . +

    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 + id="dx1-44008"> 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 + id="dx1-44009"> key to switch off the targets:

    -
    +
    \printunsrtglossary[target=false]
    -

    -

    The

    +

    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 +

    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: +

    For example:

    -
    +
    \newcommand*{\mtx}[1]{\boldsymbol{#1}}  
    \newcommand*{\mtxinv}[1]{\mtx{#1}\sp{-1}}  
    \newglossaryentry{matrix}{% @@ -18306,13 +20678,13 @@ class="cmti-10">without the initial backslash.  
       $\mtx{M}\mtxinv{M}=\glssymbol{identitymatrix}$}  
    }
    -

    -

    There are two commands provided that allow you to apply the command to an +

    +

    There are two commands provided that allow you to apply the command to an argument: -



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

    -

    +

    This effectively does

    cs name⟩ is the control sequence name supplied in must be defined to take a single required argument. Although it effectively acts like \glslink it misses out the post-link hook. -

    The default ⟨

    The default ⟨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. -

    As from version 1.23, there’s also a starred version of this command that has a +

    As from version 1.23, there’s also a starred version of this command that has a final optional argument: -



    \glsxtrfmt*  \glsxtrfmt*[options]{text}[insert]

    -

    +

    Both the starred and unstarred versions use: -



    \glsxtrfmtdisplay  \glsxtrfmtdisplay{cs name}{}{insert}

    -

    +

    within the link text. In the case of the unstarred version ⟨insert⟩ will be empty. It will also be empty if the final option argument is missing from the starred form. If the @@ -18405,7 +20777,7 @@ warning if undefaction=warn). There won’t be a warning or error if the entry is + id="dx1-45006">). There won’t be a warning or error if the entry is defined by the given field is missing. In either case, (the entry is undefined or the field is missing) ⟨cs name⟩ will be -

    +
    \newcommand{\glsxtrfmtdisplay}[3]{\csuse{#1}{#2}#3}
    -

    which puts ⟨

    which puts ⟨text⟩ inside the argument of the control sequence and ⟨insert⟩ outside it (but it will still be inside the link text). -

    Remember that nested links cause a problem so avoid using commands like

    Remember that nested links cause a problem so avoid using commands like \gls or \glsxtrfmt within ⟨text⟩.
    -

    -

    For example: +

    +

    For example:

    -
    +
    \[  
      \glsxtrfmt{matrix}{A}  
      \glsxtrfmt{matrixinv}{A} @@ -18441,34 +20813,34 @@ class="cmti-10">text⟩.
     
      \glssymbol{identitymatrix}  
    \]
    -

    If the default options are set to

    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 + id="dx1-45007"> has been loaded). This can be changed so that it also suppresses the hyperlink:

    -
    +
    \renewcommand{\GlsXtrFmtDefaultOptions}{hyper=false,noindex}
    -

    -

    Note that

    +

    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 @@ -18479,17 +20851,17 @@ class="cmti-10">text⟩} if a control sequence name has been provided or just ⟨text⟩ otherwise. -

    The

    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}{}{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 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: -


    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 @@ -18528,22 +20900,22 @@ class="cmtt-10">\newglossaryentry (or the optional argument of commands l class="cmtt-10">\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 +

    There are now commands provided to set individual fields. Note that these only change the specified field, not any related values. For example, changing the value of the text field won’t update the field won’t update the plural field. There are also + id="dx1-45012"> field. There are also some fields that should really only be set when entries are defined (such as the parent field). Unexpected results may occur if they are subsequently + id="dx1-45013"> field). Unexpected results may occur if they are subsequently changed. -



    \GlsXtrSetField  \GlsXtrSetField{label}{field}{value}

    -

    +

    Sets the field given by ⟨field⟩ to ⟨value⟩ for the entry given by ⟨

    \GlsXtrSetField uses -



    \glsxtrsetfieldifexists  \glsxtrsetfieldifexists{label}{}{code}

    -

    +

    where ⟨label⟩ is the entry label and ⟨code⟩ is the assignment code. -

    This command just uses

    This command just uses \glsdoifexists{label}{undefaction=warn. You can redefine + id="dx1-45017">. You can redefine \glsxtrsetfieldifexists to simply do ⟨code⟩ if you want to skip the existence check. Alternatively you can instead use -



    \glsxtrdeffield  \glsxtrdeffield{label}{replacement text}

    -

    +

    This simply uses etoolbox’s ’s \csdef without any checks. This command isn’t robust. There is also a version that uses \protected@csedef instead:10.1 -


    +


    \glsxtredeffield  \glsxtredeffield{label}{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}{}{cs name}

    -

    +

    As \GlsXtrLetField but the control sequence name is supplied instead. -



    \GlsXtrLetFieldToField  \GlsXtrLetFieldToField{label-1}{label-2}{field-2}

    -

    +

    Sets the field given by ⟨field-1⟩ for the entry given by ⟨label-1⟩ to the field given by @@ -18753,19 +21125,19 @@ class="cmti-10">code⟩} is still used, as for \GlsXtrSetField. -

    The

    The glossaries package provides \ifglshasfield to determine if a field has been + id="dx1-45028"> to determine if a field has been set. The glossaries-extra package provides a simpler version: -



    \glsxtrifhasfield  \glsxtrifhasfield{field}{}{false}

    -

    +

    (New to v1.19.) Note that in this case the ⟨field⟩ must be the internal field label (for @@ -18793,20 +21165,20 @@ class="cmti-10">true⟩ part is done otherwise it does ⟨false⟩. Within ⟨true⟩ you may use -



    \glscurrentfieldvalue  \glscurrentfieldvalue

    -

    +

    to access the field value. This command includes grouping which scopes the ⟨true⟩ and ⟨false⟩ parts. The starred version -



    \glsxtrifhasfield*  \glsxtrifhasfield*{field}{}{false}

    -

    +

    omits the implicit grouping. -

    Be careful of keys that use

    Be careful of keys that use \relax as the default value (such as the symbol). Use + id="dx1-45032">). Use \ifglshassymbol instead.
    -

    -

    There is also a version that simply uses

    +

    There is also a version that simply uses \ifcsundef. It doesn’t save the field value, but can be used if you only need to check if the field is defined without accessing it: -



    \GlsXtrIfFieldUndef  \GlsXtrIfFieldUndef{field}{}{false}

    -

    -

    There’s a difference between an undefined field and an unset field. An undefined +

    +

    There’s a difference between an undefined field and an unset field. An undefined field hasn’t been assigned any value (no associated internal control sequence has been defined). If a defined field has been defined to empty, then it’s considered unset. \GlsXtrIfFieldUndef for fields that can only be defined through commands like \GlsXtrSetField.
    -

    -

    You can test if a field value equals a string using -


    +

    You can test if a field value equals a string using +


    \GlsXtrIfFieldEqStr  \GlsXtrIfFieldEqStr{field}{} class="cmtt-10">{false}

    -

    +

    If the entry exists and has the given field set to the given text then this does ⟨true⟩ otherwise it does ⟨false⟩. This is just a shortcut that uses: -



    \GlsXtrIfFieldCmpStr  \GlsXtrIfFieldCmpStr{field}{true}{false}

    -

    +

    This in turn is just a shortcut that uses \glsxtrifhasfield to test if the field exists and then compares the replacement text of \glscurrentfieldvalue with ⟨text⟩ using etoolbox’s ’s \ifdefstring. The ⟨comparison⟩ argument must be one of = (equality), < (less than) or > (greater than). -

    As from version 1.31, there’s a similar command: -


    As from version 1.31, there’s a similar command: +


    \GlsXtrIfFieldEqXpStr  \GlsXtrIfFieldEqXpStr{field}{true}{false}

    -

    +

    This is like \GlsXtrIfFieldEqStr but first (protected) fully expands ⟨text⟩ (but not the field value). If you want to compare the (protected) full expansion of both the field value and ⟨text⟩ use: -



    \GlsXtrIfXpFieldEqXpStr  \GlsXtrIfXpFieldEqXpStr{field}{true}{false}

    -

    -

    As from v1.31, if a field represents a numeric (integer) value, you can use the +

    +

    As from v1.31, if a field represents a numeric (integer) value, you can use the following two numeric tests. If the field is set, it must expand to an integer. You may use \glscurrentfieldvalue within ⟨false⟩ are scoped. If the field is undefined or empty, the value is assumed to be 0, and \glscurrentfieldvalue is set accordingly. -

    To test if the value is non-zero: -


    To test if the value is non-zero: +


    \GlsXtrIfFieldNonZero  \GlsXtrIfFieldNonZero{field}{} class="cmtt-10">{false}

    -

    +

    Alternatively, you can test if the field expands to a specific number using: -



    \GlsXtrIfFieldEqNum  \GlsXtrIfFieldEqNum{field}{} class="cmtt-10">{false}

    -

    +

    This does ⟨true⟩ if the field value equals ⟨n⟩ (using \ifnum for the comparison) otherwise it does ⟨false⟩. -

    The

    The glossaries package provides \glsfieldfetch which can be used to fetch the + id="dx1-45041"> 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 + id="dx1-45043"> 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 +

    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

    +and, as from v1.37, a command that converts the entire value to upper case: +


    \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 + id="dx1-45046"> internal list, you can use the following command that adds an item to the field using etoolbox’s ’s \listcsadd: -



    \glsxtrfieldlistadd  \glsxtrfieldlistadd{label}{}{item}

    -

    +

    where ⟨label⟩ is the entry’s label, ⟨field⟩ is the entry’s field and ⟨\listgadd, \listeadd and \listxadd: -



    \glsxtrfieldlistgadd  \glsxtrfieldlistgadd{label}{}{item}

    -

    -


    +


    \glsxtrfieldlisteadd  \glsxtrfieldlisteadd{label}{}{item}

    -

    -


    +


    \glsxtrfieldlistxadd  \glsxtrfieldlistxadd{label}{}{item}

    -

    +

    You can then iterate over the list using: -



    \glsxtrfielddolistloop  \glsxtrfielddolistloop{label}{field}

    -

    +

    or -



    \glsxtrfieldforlistloop  \glsxtrfieldforlistloop{label}{} class="cmtt-10">{handler}

    -

    +

    that internally use \dolistcsloop and \forlistloop, respectively. -

    There are also commands that use

    There are also commands that use \ifinlistcs: -



    \glsxtrfieldifinlist  \glsxtrfieldifinlist{label}{} class="cmtt-10">{false}

    -

    +

    and \xifinlistcs -



    \glsxtrfieldxifinlist  \glsxtrfieldxifinlist{label}{true}{false}

    -

    -

    See the

    +

    See the etoolbox’s user manual for further details of these commands, in particular + id="dx1-45056">’s user manual for further details of these commands, in particular the limitations of \ifinlist. -

    If the field has a comma-separated list value instead, you can iterate over it -using: -


    If the field has a comma-separated list value instead, you can iterate over it +using: +


    \glsxtrforcsvfield  \glsxtrforcsvfield{label}{}{handler}

    -

    +

    where again ⟨handler⟩ is a control sequence that takes a single argument. Unlike the etoolbox loops, this doesn’t ignore empty elements nor does it discard leading / + id="dx1-45058"> loops, this doesn’t ignore empty elements nor does it discard leading / trailing spaces. Internally it uses \@for (modified by xfor which is automatically + id="dx1-45059"> which is automatically loaded by glossaries). The ). The xfor package modifies the behaviour of package modifies the behaviour of \@for to allow the loop to be broken prematurely using \@endfortrue. The \glsxtrforcsvfield command locally defines a user level command: -



    \glsxtrendfor  \glsxtrendfor

    -

    +

    which is just a synonym for \@endfortrue. -

    The loop is performed within the true part of

    The loop is performed within the true part of \glsxtrifhasfield so scoping is automatically applied. -

    As from version 1.32, if the field given by -


    As from version 1.32, if the field given by +


    \GlsXtrForeignTextField  \GlsXtrForeignTextField

    -

    +

    (which defaults to userii) contains a locale tag, then -



    \GlsXtrForeignText  \GlsXtrForeignText{entry label}{text}

    -

    +

    can be used to encapsulate ⟨text⟩ in \foreignlanguage{} where ⟨dialect⟩ is obtained from the locale tag through tracklang’s ’s \GetTrackedDialectFromLanguageTag + id="dx1-45066"> command. You need at least tracklang v1.3.6 for this to work properly. The ⟨ v1.3.6 for this to work properly. The ⟨dialect⟩ must be one that’s tracked (which typically means that babel or or polyglossia has been + id="dx1-45069"> has been loaded with the appropriate setting for that language). If \foreignlanguage hasn’t been defined, this just does ⟨text⟩. For example:

    -
    +
    \documentclass{article}  
    \usepackage[main=british,brazilian,ngerman]{babel}  
    \usepackage{glossaries-extra} @@ -19331,31 +21714,31 @@ class="cmti-10">text⟩. For example:  
    \gls{abnt}, \gls{din}.  
    \end{document}
    -

    -

    When using the

    +

    When using the record option, in addition to recording the usual location, you can + id="dx1-45070"> 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

    Each time an entry is referenced with commands like \gls or \glstext, the \gls{bird} is used in section 1.2 th -

    +
    \glsxtrfieldlistgadd{bird}{record.section}{1.2}
    -

    Note that there’s no key corresponding to this new

    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). If you want to use one of the tabular-like styles with + id="dx1-46002">-like styles with \printunsrtglossary, make sure you load glossaries-extra-stylemods which modifies + id="dx1-46004"> which modifies the definition of \glsgroupskip to avoid the “Incomplete \iftrue” error that may otherwise occur. -

    There’s also a starred form -


    There’s also a starred form +


    \printunsrtglossary*  \printunsrtglossary*[options]{code}

    -

    +

    which is equivalent to

    \endgroup class="cmtt-10">\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 +

    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 (see §9 bib2gls: Managing Reference Databases). -

    No attempt is made to gather hierarchical elements. If child entries aren’t defined +

    No attempt is made to gather hierarchical elements. If child entries aren’t defined immediately after their parent entry, they won’t be together in the glossary when using \printunsrtglossary.
    -

    +

    -

    There’s a difference in behaviour depending on whether or not the

    There’s a difference in behaviour depending on whether or not the group key is + id="dx1-46009"> key is defined. If not defined (default), the group label will be formed from the first letter of the name field. The corresponding group title will be obtained as + id="dx1-46010"> field. The corresponding group title will be obtained as discussed in §2.10 §2.11 Glossary Style Modifications. This can lead to an odd effect if you are using a style that separates letter groups when the ordering isn’t alphabetical. -

    If the

    If the group key is defined (which it is with the key is defined (which it is with the record option) then the group label + id="dx1-46012"> option) then the group label will be obtained from the value of that field. If the field is empty, no grouping is performed, even if the style supports it. (That is, there won’t be a header or a vertical separation.) If the group field is non-empty, then the corresponding title is obtained + id="dx1-46013"> field is non-empty, then the corresponding title is obtained as described earlier. -

    If you want to use a different field, you can redefine -


    If you want to use a different field, you can redefine +


    \glsxtrgroupfield  \glsxtrgroupfield

    -

    +

    to the relevant internal field label, but the group key must still be defined (through the record option or with commands like option or with commands like \glsaddstoragekey) to ensure that \printunsrtglossary uses \glsxtrgroupfield. (This method is used by bib2gls + id="dx1-46018"> for secondary entries, which have the group label stored in the secondarygroup internal field.) -

    If you have any entries with the

    If you have any entries with the see key set, you will need the key set, you will need the glossaries package + id="dx1-46020"> package option seenoindex=ignore or or seenoindex=warn to prevent an error occurring from the + id="dx1-46022"> to prevent an error occurring from the automated \glssee normally triggered by this key. The record=only package option + id="dx1-46023"> package option will automatically deal with this. -

    For example: +

    For example:

    -
    +
    \documentclass{article}  
    \usepackage{glossaries-extra}  
    \newglossaryentry{zebra}{name={zebra},description={stripy animal}} @@ -19576,110 +21959,142 @@ will automatically deal with this.  
    \printunsrtglossaries  
    \end{document}
    -

    In the above, zebra will be listed before ant as it was defined first. -

    If you allow document definitions with the

    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 + id="dx1-46024"> option, the document will require a second LATEX run if the entries are defined after \printunsrtglossary. -

    The optional argument is as for

    The optional argument is as for \printnoidxglossary (except for the sort key, + id="dx1-46025"> key, which isn’t available). -

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


    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⟩]. -

    To avoid complications caused by

    To avoid complications caused by tabular-like glossary styles, -like glossary styles, \printunsrtglossary iterates over all entries in the selected glossary and appends the appropriate code to an internal command. Once the construction of this command is complete, then it’s performed to display the glossary. This puts the loop outside the style code. For convenience, there’s a hook used within the loop: -



    \printunsrtglossaryentryprocesshook  \printunsrtglossaryentryprocesshook {label}

    -

    +

    This hook should not display any content, but may be used to perform calculations. For example, to calculate widths. Within this hook you can use: -



    \printunsrtglossaryskipentry  \printunsrtglossaryskipentry

    -

    +

    to skip the current entry. This will prevent the entry from being added to the internal command. -

    There’s another hook immediately before the internal command containing the +

    There’s another hook immediately before the internal command containing the glossary code is performed: -



    \printunsrtglossarypredoglossary  \printunsrtglossarypredoglossary

    -

    +

    -

    The internal command uses -


    The internal command uses +


    \printunsrtglossaryhandler  \printunsrtglossaryhandler{label}

    -

    +

    to display each item in the list, where ⟨label⟩ is the current label. -

    By default the handler just does -


    By default the handler just does +


    \glsxtrunsrtdo  \glsxtrunsrtdo{label}

    -

    +

    which determines whether to use \glossentry or \subglossentry and checks the location and and loclist fields for the number list. -

    You can redefine the handler if required. For example, you may want to filter + id="dx1-46035"> fields for the number list. If you want to use a different field to be +used instead of location then redefine: +


    \GlsXtrLocationField  \GlsXtrLocationField

    +

    +to the internal name of the desired field. For example: + + + +

    +
    +\renewcommand{\GlsXtrLocationField}{primarylocation} +
    +

    +

    Note that if the given location field is undefined or unset, the handler will +fallback on the loclist field.
    +

    +You can instruct bib2gls to omit setting the loclist field with the resource option +--save-loclist=false to prevent it from being used as a fallback. +

    You can redefine the handler if required. For example, you may want to filter entries according to the category label. You can test if a label is contained in a comma-separated list of labels using: -



    \glsxtriflabelinlist  \glsxtriflabelinlist{label}{} class="cmtt-10">{false}

    -

    +

    The ⟨label⟩ and ⟨label list⟩ will be fully expanded. -

    If you redefine the handler to exclude entries, you may end up with an empty +

    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: +

    +

    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 +

    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

    +

    Alternatively you can use the starred form of \printunsrtglossary which will localise the change:

    -
    +
    \printunsrtglossary*{%  
      \renewcommand{\printunsrtglossaryhandler}[1]{%  
        \glsxtrfieldxifinlist{#1}{record.section}{\thesection} @@ -19738,10 +22153,10 @@ localise the change:  
      }%  
    }
    -

    -

    If you are using the

    +

    If you are using the hyperref package and want to display the same glossary more + id="dx1-46044"> 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: @@ -19749,7 +22164,7 @@ duplicate hypertarget names. For example:

    -
    +
    \printunsrtglossary*{%  
      \renewcommand{\printunsrtglossaryhandler}[1]{%  
        \glsxtrfieldxifinlist{#1}{record.section}{\thesection} @@ -19765,7 +22180,7 @@ duplicate hypertarget names. For example:  
      }%  
    }
    -

    Note that this will cause a problem if your descriptions contain commands like

    Note that this will cause a problem if your descriptions contain commands like \gls that need to link an entry that doesn’t appear in the summary. In this case, it’s a better approach to use: @@ -19773,7 +22188,7 @@ better approach to use:

    -
    +
    \printunsrtglossary*{%  
      \renewcommand{\printunsrtglossaryhandler}[1]{%  
        \glsxtrfieldxifinlist{#1}{record.section}{\thesection} @@ -19789,14 +22204,14 @@ better approach to use:  
      }%  
    }
    -

    -

    If it’s a short summary at the start of a section, you might also want to suppress +

    +

    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} @@ -19814,12 +22229,12 @@ the glossary header and add some vertical space afterwards:  
      \appto\glossarypostamble{\glspar\medskip\glspar}%  
    }
    -

    -

    There’s a shortcut command that essentially does this: -


    +

    There’s a shortcut command that essentially 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

    +

    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” +

    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

    Note that this shortcut command is only available with the record (or + id="dx1-46047"> (or record=alsoindex) package option. -

    This temporary change in the hypertarget prefix means you need to explicitly use + id="dx1-46048">) 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 @@ -19883,12 +22298,12 @@ the front or back matter) which can be the target for all glossary references an just use \printunsrtglossaryunit for a quick summary at the start of a section etc. -

    +

    -

    Top

    10.3 Standalone Entry Items

    -

    It may be that you don’t want a list but would rather display entry details +

    It may be that you don’t want a list but would rather display entry details throughout the document. You can simply do \glsentryname followed by \glsentrydesc. (Remember that if you don’t want a s href="#styopt.sort">sort=none to + id="dx1-47001"> to skip the construction of the sort field.) For example, in the preamble provide a + id="dx1-47002"> field.) For example, in the preamble provide a custom command:

    -
    +
    \newcommand{\displayterm}[1]{%  
     \par\medskip\par\noindent  
     Definition: \glsentryname{#1}.\par @@ -19913,43 +22328,43 @@ custom command:  
     \par\medskip  
    }
    -

    define your entries +

    define your entries

    -
    +
    \newglossaryentry{function}{name={function},  
      description={a relation or expression involving variables}  
    }
    -

    and then later in the text: +

    and then later in the text:

    -
    +
    \displayterm{function}
    -

    -

    However, if may be that you want to use

    +

    However, if may be that you want to use hyperref and have commands like and have commands like \gls link back to the place where the term is described. Instead of using \glsentryname use -



    \glsxtrglossentry  \glsxtrglossentry{label}

    -

    +

    where ⟨label⟩ is the entry’s label. -

    This is designed to behave much like the way the name is displayed in the +

    This is designed to behave much like the way the name is displayed in the glossary. It performs the following:

    • Defines \printglossary and may be used by style hooks. class="cmtt-10">\glsentryitem and \glssubentryitem. The value is obtained by fully expanding: -



      \GlsXtrStandaloneGlossaryType  \GlsXtrStandaloneGlossaryType

      -

      +

      which defaults to the value of the type field for the current entry. + id="dx1-47006"> field for the current entry.

    • Increments and display the entry counters if the entrycounter or or subentrycounter + id="dx1-47008"> package options are set. If the entry doesn’t have a parent, then this does -

      otherwise it does (as from v1.31)

      +

      otherwise it does (as from v1.31)

      • \GlsXtrStandaloneSubEntryItem + id="dx1-47009"> {label} if the entry has -

        This reflects the behaviour of the predefined hierarchical styles. A bug in +

        This reflects the behaviour of the predefined hierarchical styles. A bug in pre-version 1.31 used \glsentryitem for all child levels, which doesn’t match the hierarchical glossary styles. If you want to restore this behaviour, just @@ -20021,36 +22436,51 @@ class="cmtt-10">\glsentryitem for all child levels, which doesn’t m

        -
        +
        \renewcommand*{\GlsXtrStandaloneSubEntryItem}[1]{\glssubentryitem{#1}}
        -

        +

      • Sets the hyper-target if supported (using \glstarget). -
      • -
      • Displays the entry name using \glstarget) and displays the entry + name using: +


        \GlsXtrStandaloneEntryName  \GlsXtrStandaloneEntryName{label} +

        +

        + which uses \glstarget{label}{\glossentryname{label}. Remember that this - command uses \glsnamefont or picks up the style from category attributes - such as }} by default. + Remember that \glossentryname uses \glsnamefont or picks up the style + from category attributes such as glossnamefont.

      -

      If you have used .

    +

    If you have used \nopostdesc or or \glsxtrnopostpunc in any of your description fields, + id="dx1-47013"> in any of your description fields, you can use -



    \glsxtractivatenopost  \glsxtractivatenopost

    -

    +

    to make these commands behave as they normally do within a glossary. This needs to be placed before

    @@ -20063,13 +22493,13 @@ class="cmtt-10">}\glspostdescription class="cmtt-10">\glsnonextpages and \glsnextpages have no effect outside of the glossary and are not intended for use in a standalone context. -

    It’s also possible to select a different field (rather than using

    It’s also possible to select a different field (rather than using name): -


    ): +


    \glsxtrglossentryother  \glsxtrglossentryother{header}{}{field}

    -

    +

    The ⟨field⟩ must be given using its internal field label which may not be the same as the key used to set the field. See the key to field mappings table in the field⟩ class="cmtt-10">{⟨label}. - -

  • Otherwise ⟨header⟩ is simply the field value.
  • -

    The \glsxtrglossentryother command internally uses +

  • Otherwise ⟨header⟩ is simply the field value.
  • +

    The \glsxtrglossentryother command internally uses +


    \GlsXtrStandaloneEntryOther  \GlsXtrStandaloneEntryOther{label}{field} +

    +

    +instead of \GlsXtrStandaloneEntryName, which uses \glossentrynameother{label} @@ -20116,14 +22559,15 @@ class="cmti-10">field⟩} instead of \glossentryname{label}. If you are using the }. +

    If you have loaded the glossaries-accsupp -package (through the package (through the accsupp option) then accessibility support will be provided if -there’s a corresponding command

    + id="dx1-47019"> option) +then accessibility support will be provided if there’s a corresponding command +

    \gls}
    (for example, \glssymbolaccessdisplay). -

    This means that my custom command can be changed to: +

    This means that my custom command can be changed to:

    -
    +
    \newcommand{\displayterm}[1]{%  
     \par\medskip\par\noindent  
     Definition: \glsxtrglossentry{#1}.\par @@ -20149,17 +22593,17 @@ class="cmtt-10">\glssymbolaccessdisplay).  
     \par\medskip  
    }
    -

    If I want numbered definitions, then I can use the package options

    If I want numbered definitions, then I can use the package options entrycounter or + id="dx1-47020"> or subentrycounter and remove the colon: + id="dx1-47021"> and remove the colon:

    -
    +
    \newcommand{\displayterm}[1]{%  
     \par\medskip\par\noindent  
     Definition \glsxtrglossentry{#1}.\par @@ -20167,28 +22611,28 @@ class="cmss-10">subentrycounter \par\medskip  
    }
    -

    The counter label uses a dot after the number by default but this can be changed to +

    The counter label uses a dot after the number by default but this can be changed to a colon:

    -
    +
    \renewcommand*{\glsentrycounterlabel}{\theglossaryentry:\space}
    -

    It’s now possible to not only use

    It’s now possible to not only use \gls to link back to the definition but also use \glsrefentry to reference the counter and \glsxtrpageref to reference the page number. -

    If I want the description to behave more like it does in a glossary in need to make +

    If I want the description to behave more like it does in a glossary in need to make the following modification:

    -
    +
    \newcommand{\displayterm}[1]{%  
     \par\medskip\par\noindent  
     Definition \glsxtrglossentry{#1}.\par @@ -20199,18 +22643,18 @@ the following modification:  
     \par\medskip  
    }
    -

    (Note the grouping to localise

    (Note the grouping to localise \glsxtractivatenopost.) -

    You can also use

    You can also use \glsxtrglossentry within section headings. For example:

    -
    +
    \section{\glsxtrglossentry{function}}
    -

    This will use

    This will use \glsentryname in PDF bookmarks (if \texorpdfstring is defined) and will use \@glsxtrnotinmark and \glsxtrrestoremarkhook.) -

    +

    -

    Top

    10.4 Entry Aliases

    -

    An entry can be made an alias of another entry using the

    An entry can be made an alias of another entry using the alias key. The + id="dx1-48001"> 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 ⟨.) +

    If an entry ⟨entry-1⟩ is made an alias of ⟨entry-2⟩ then:

    • If the see field wasn’t provided when ⟨ field wasn’t provided when ⟨entry-1⟩ was defined, the alias key will + id="dx1-48005"> key will automatically trigger
      }
    • If the hyperref package has been loaded then package has been loaded then \gls{entry-1} will link to @@ -20273,7 +22717,7 @@ class="cmtt-10">} will link to class="cmti-10">entry-2⟩’s target. (Unless the targeturl attribute has been set for ⟨ attribute has been set for ⟨entry-1⟩’s category.)
    • @@ -20281,20 +22725,20 @@ class="cmti-10">entry-1⟩’s href="#styopt.record">record=off or or record=alsoindex, the , the noindex setting will automatically + id="dx1-48010"> 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 @@ -20305,97 +22749,97 @@ class="cmtt-10">noindex=false. -

      Note that with

      Note that with record=only, the location list for aliased entries is controlled + id="dx1-48012">, the location list for aliased entries is controlled with bib2gls’s settings.

    -

    The index suppression trigger is performed by -


    ’s settings.

    +

    The index suppression trigger is performed by +


    \glsxtrsetaliasnoindex  \glsxtrsetaliasnoindex

    -

    +

    This is performed after the default options provided by \GlsXtrSetDefaultGlsOpts + id="dx1-48017"> have been set. With record=only, , \glsxtrsetaliasnoindex will default to do nothing. -

    Within the definition of

    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. +

    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

    +

    The value of the alias field can be accessed using -


    field can be accessed using +


    \glsxtralias  \glsxtralias{label}

    -

    +

    -

    -

    +

    Top

    11. Supplemental Packages

    -

    The

    The glossaries bundle provides additional support packages glossaries-prefix (for + id="dx1-49001"> (for prefixing) and glossaries-accsupp (for accessibility support). These packages aren’t + id="dx1-49002"> (for accessibility support). These packages aren’t automatically loaded.

    -

    Top

    11.1 Prefixes or Determiners

    -

    If prefixing is required, you can simply load

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

    -
    +
    \documentclass{article}  
    \usepackage{glossaries-extra}  
    \usepackage{glossaries-prefix} @@ -20410,32 +22854,32 @@ example:  
    \printglossaries  
    \end{document}
    -

    -

    +

    +

    -

    Top

    11.2 Accessibility Support

    -

    The

    The glossaries-accsupp package needs to be loaded before package needs to be loaded before glossaries-extra or through the accsupp package option: + id="dx1-51002"> package option:

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

    If you don’t load

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

    The following

    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 ⟨ field for the entry identified by ⟨label⟩. -

    If the

    If the glossaries-accsupp package isn’t loaded, this is simply defined as: + id="dx1-51007"> package isn’t loaded, this is simply defined as:

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

    otherwise it’s defined as: +

    otherwise it’s defined as:

    -
    +
    \newcommand*{\glsaccessname}[1]{%  
      \glsnameaccessdisplay  
      {% @@ -20487,38 +22931,38 @@ class="cmss-10">glossaries-accsupp  {#1}%  
    }
    -

    (

    (\glsnameaccessdisplay is defined by the is defined by the glossaries-accsupp package.) The first + id="dx1-51009"> package.) The first letter upper case version is: -



    \Glsaccessname  \Glsaccessname{label}

    -

    +

    Without the glossaries-accsupp package this is just defined as: + id="dx1-51011"> package this is just defined as:

    -
    +
    \newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}}
    -

    With the

    With the glossaries-accsupp package this is defined as: + id="dx1-51012"> package this is defined as:

    -
    +
    \newcommand*{\Glsaccessname}[1]{%  
      \glsnameaccessdisplay  
      {% @@ -20527,299 +22971,299 @@ class="cmss-10">glossaries-accsupp  {#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-51016"> 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-51020"> 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-51024"> 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-51028"> 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-51032"> 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-51036"> 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-51040"> 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-51044"> 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-51048"> 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-51052"> 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-51056"> 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-51060"> field with the first letter converted to upper case.

    -

    -

    +

    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.
    @@ -20897,7 +23341,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). @@ -20911,28 +23355,28 @@ class="cmbx-10">sample-autoindex.tex
    Using the dualindex and and indexname attributes to + id="dx1-52004"> 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-52006">.
    sample-nested.tex
    Using \gls within the value of the within the value of the name key. + id="dx1-52008"> key.
    sample-entrycount.tex
    sample-external.tex
    Uses the targeturl attribute to allow for entries that + id="dx1-52009"> attribute to allow for entries that should link to an external URL rather than to an internal glossary.
    \glsxtrfmt. class="cmbx-10">sample-alias.tex
    Uses the alias key. (See key. (See §10.4 Entry Aliases.) @@ -21015,29 +23459,29 @@ href="#sec:alias">Entry Aliases.) class="cmbx-10">sample-alttree.tex
    Uses the glossaries-extra-stylemods package with the package with the alttree + id="dx1-52012"> style (see §2.10.3 The §2.11.3 The glossaries-extra-stylemods Package).
    sample-alttree-sym.tex
    Another alttree example that measures the symbol + id="dx1-52013"> example that measures the symbol widths.
    sample-alttree-marginpar.tex
    Another alttree example that puts the + id="dx1-52014"> 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-52016"> 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-52017"> key explicitly set. Terms that contain commands must have the name key explicitly set + id="dx1-52018"> 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-52019">. 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-52020"> key explicitly set with the commands removed from the label.
    sample-accsupp.tex
    Integrate glossaries-accsupp. + id="dx1-52021">.
    sample-prefix.tex
    Integrate glossaries-prefix. + id="dx1-52022">.
    sample-suppl-main.tex
    Uses thevalue to reference a location in the + id="dx1-52023"> to reference a location in the supplementary file sample-suppl.tex. @@ -21099,84 +23543,84 @@ class="cmbx-10">sample-suppl-main-hyp.tex
    A more complicated version to the above that uses the hyperref package to reference a location in the supplementary file + id="dx1-52024"> package to reference a location in the supplementary file sample-suppl-hyp.tex.
    -

    -

    +

    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-53002"> 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-53003"> 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-53005"> 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-53006"> 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 (whose filename is in the form glossariesxtr-language.ldf) if they exist, but won’t warn if they don’t. If glossaries-extra-bib2gls is loaded via the is loaded via the record package option then the + id="dx1-53008"> package option then the check for language resource files will additionally search for an associated language script file given by glossariesxtr-Latn, associated with the given dialect. There’s no warning if the associated file isn’t found. The script file is loaded after the dialect file. -

    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⟩ identifies the language or dialect (see the tracklang package). For example, 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}% @@ -21237,86 +23681,86 @@ class="cmtt-10">glossariesxtr-french.ldf.  
      {}%  
    }
    -

    -

    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. You can also use the .ldf file to provide rule blocks for a particular language for use with bib2gls’s custom sort rule. See ’s custom sort rule. See §9.3 The The glossaries-extra-bib2gls package for further details. -

    This

    This .ldf file then needs to be put somewhere on TEX’s path so that it can be found by 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 @@ -21368,17 +23812,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-53022"> 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. @@ -21433,22 +23877,22 @@ documented code for further details.

    Top

    Glossary

    + id="x1-5400013">Glossary

    bib2gls
    A command line Java application that selects entries from a .bib file and converts them to glossary definitions (like bibtex but also performs hierarchical sorting and collation, thus omitting the need for xindy or makeindex). Further details at: http://www.dickimaw-books.com/software/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. @@ -21466,80 +23910,80 @@ 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-54009">, \glspl, , \Glspl, , \GLSpl or or \glsdisp. + id="dx1-54013">.
    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-54017">first use, which is governed by the first and and firstplural keys of keys of \newglossaryentry. (May be overridden by + id="dx1-54020">. (May be overridden by \glsdisp.) + id="dx1-54021">.)
    link-text
    The text produced by commands such as \gls. It may or may not + id="dx1-54023">. 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. @@ -21549,13 +23993,13 @@ class="cmtt-10">makeindex according to the document makeglossaries-lite
    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-lite.exe. 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-54037"> package option.
    xindy
    An flexible indexing application with multilingual support written in Perl.

    Index

    + id="x1-5500013">Index

    A

    abbreviation styles (deprecated):
        footnote-em  1
    +href="glossaries-extra-manual.html#dx1-26173" >1
        footnote-sc  2
    +href="glossaries-extra-manual.html#dx1-26165" >2
        footnote-sm  3
    +href="glossaries-extra-manual.html#dx1-26169" >3
        long-desc-em  4
    +href="glossaries-extra-manual.html#dx1-25078" >4
        long-desc-sc  5
    +href="glossaries-extra-manual.html#dx1-25070" >5
        long-desc-sm  6
    +href="glossaries-extra-manual.html#dx1-25074" >6
        long-em  7
    +href="glossaries-extra-manual.html#dx1-25104" >7
        long-sc  8
    +href="glossaries-extra-manual.html#dx1-25096" >8
        long-sm  9
    +href="glossaries-extra-manual.html#dx1-25100" >9
        postfootnote-em  10
    +href="glossaries-extra-manual.html#dx1-26196" >10
        postfootnote-sc  11
    +href="glossaries-extra-manual.html#dx1-26188" >11
        postfootnote-sm  12
    +href="glossaries-extra-manual.html#dx1-26192" >12
    abbreviation styles:
        footnote  13
    +href="glossaries-extra-manual.html#dx1-26160" >13
        long  14
    +href="glossaries-extra-manual.html#dx1-25090" >14
        long-desc  15
    +href="glossaries-extra-manual.html#dx1-25064" >15
        long-em-noshort-em  16, 17, 18
    +href="glossaries-extra-manual.html#dx1-24088" >16, 17, 18
        long-em-noshort-em-desc  19, 20
    +href="glossaries-extra-manual.html#dx1-25079" >19, 20
        long-em-noshort-em-desc-noreg  21
    +href="glossaries-extra-manual.html#dx1-26074" >21
        long-em-noshort-em-noreg  22, 23, 24
    +href="glossaries-extra-manual.html#dx1-24090" >22, 23, 24
        long-em-short-em  25, 26, 27, 28
    +href="glossaries-extra-manual.html#dx1-24056" >25, 26, 27, 28
        long-em-short-em-desc  29
    +href="glossaries-extra-manual.html#dx1-26071" >29
        long-hyphen-long-hyphen  30
    +href="glossaries-extra-manual.html#dx1-26231" >30
        long-hyphen-noshort-desc-noreg  31, 32
    +href="glossaries-extra-manual.html#dx1-26220" >31, 32
        long-hyphen-noshort-noreg  33, 34
    +href="glossaries-extra-manual.html#dx1-24091" >33, 34
        long-hyphen-postshort-hyphen  35, 36, 37, 38, 39, 40
    +href="glossaries-extra-manual.html#dx1-24086" >35, 36, 37, 38, 39, 40
        long-hyphen-postshort-hyphen-desc  41
    +href="glossaries-extra-manual.html#dx1-26233" >41
        long-hyphen-short-hyphen  42, 43, 44, 45, 46
    +href="glossaries-extra-manual.html#dx1-26211" >42, 43, 44, 45, 46
        long-hyphen-short-hyphen-desc  47, 48
    +href="glossaries-extra-manual.html#dx1-26221" >47, 48
        long-noshort  49, 50, 51, 52, 53, 54, 55, 56, 57
    +href="glossaries-extra-manual.html#dx1-22002" >50, 51, 52, 53, 54, 55, 56, 57
        long-noshort-desc  58, 59, 60, 61, 62, 63, 64, 65, 66, 67
    +href="glossaries-extra-manual.html#dx1-25057" >60, 61, 62, 63, 64, 65, 66, 67
        long-noshort-desc-noreg  68
    +href="glossaries-extra-manual.html#dx1-26051" >68
        long-noshort-em  69
    +href="glossaries-extra-manual.html#dx1-25101" >69
        long-noshort-em-desc  70
    +href="glossaries-extra-manual.html#dx1-25075" >70
        long-noshort-noreg  71
    +href="glossaries-extra-manual.html#dx1-26048" >71
        long-noshort-sc  72, 73
    +href="glossaries-extra-manual.html#dx1-24081" >72, 73
        long-noshort-sc-desc  74, 75
    +href="glossaries-extra-manual.html#dx1-25066" >74, 75
        long-noshort-sm  76
    +href="glossaries-extra-manual.html#dx1-25097" >76
        long-noshort-sm-desc  77
    +href="glossaries-extra-manual.html#dx1-25071" >77
        long-only-short-only  78, 79, 80
    +href="glossaries-extra-manual.html#dx1-24070" >78, 79, 80
        long-only-short-only-desc  81
    +href="glossaries-extra-manual.html#dx1-26024" >81
        long-postshort-user  82, 83
    +href="glossaries-extra-manual.html#dx1-26204" >82, 83
        long-postshort-user-desc  84
    +href="glossaries-extra-manual.html#dx1-26207" >84
        long-short  85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
    +href="glossaries-extra-manual.html#dx1-20019" >88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
        long-short-desc  101, 102, 103, 104, 105, 106, 107, 108, 109
    +href="glossaries-extra-manual.html#dx1-26054" >103, 104, 105, 106, 107, 108, 109
        long-short-em  110, 111, 112, 113
    +href="glossaries-extra-manual.html#dx1-24051" >110, 111, 112, 113
        long-short-em-desc  114, 115
    +href="glossaries-extra-manual.html#dx1-26068" >114, 115
        long-short-sc  116, 117, 118, 119
    +href="glossaries-extra-manual.html#dx1-24035" >117, 118, 119
        long-short-sc-desc  120, 121
    +href="glossaries-extra-manual.html#dx1-26062" >121
        long-short-sm  122, 123, 124
    +href="glossaries-extra-manual.html#dx1-24045" >123, 124
        long-short-sm-desc  125, 126
    +href="glossaries-extra-manual.html#dx1-26065" >126
        long-short-user  127, 128, 129, 130, 131, 132, 133, 134, 135
    +href="glossaries-extra-manual.html#dx1-24084" >127, 128, 129, 130, 131, 132, 133, 134, 135
        long-short-user-desc  136
    +href="glossaries-extra-manual.html#dx1-26077" >136
        nolong-short  137, 138
    +href="glossaries-extra-manual.html#dx1-25010" >137, 138
        nolong-short-em  139
    +href="glossaries-extra-manual.html#dx1-25031" >139
        nolong-short-noreg  140
    +href="glossaries-extra-manual.html#dx1-26089" >140
        nolong-short-sc  141
    +href="glossaries-extra-manual.html#dx1-25017" >141
        nolong-short-sm  142
    +href="glossaries-extra-manual.html#dx1-25024" >142
        postfootnote  143
    +href="glossaries-extra-manual.html#dx1-26183" >143
        short  144
    +href="glossaries-extra-manual.html#dx1-25008" >144
        short-desc  145
    +href="glossaries-extra-manual.html#dx1-25040" >145
        short-em  146
    +href="glossaries-extra-manual.html#dx1-25029" >146
        short-em-desc  147
    +href="glossaries-extra-manual.html#dx1-25055" >147
        short-em-footnote  148, 149
    +href="glossaries-extra-manual.html#dx1-24102" >148, 149
        short-em-footnote-desc  150
    +href="glossaries-extra-manual.html#dx1-24101" >150
        short-em-long  151, 152, 153
    +href="glossaries-extra-manual.html#dx1-24052" >151, 152, 153
        short-em-long-desc  154, 155
    +href="glossaries-extra-manual.html#dx1-26133" >154, 155
        short-em-long-em  156, 157
    +href="glossaries-extra-manual.html#dx1-24057" >156, 157
        short-em-long-em-desc  158
    +href="glossaries-extra-manual.html#dx1-26136" >158
        short-em-nolong  159, 160, 161
    +href="glossaries-extra-manual.html#dx1-25026" >159, 160, 161
        short-em-nolong-desc  162, 163
    +href="glossaries-extra-manual.html#dx1-25052" >162, 163
        short-em-postfootnote  164
    +href="glossaries-extra-manual.html#dx1-26193" >164
        short-footnote  165, 166, 167, 168, 169, 170, 171, 172, 173, 174
    +href="glossaries-extra-manual.html#dx1-20021" >166, 167, 168, 169, 170, 171, 172, 173, 174
        short-footnote-desc  175
        short-hyphen-long-hyphen  176, 177
    +href="glossaries-extra-manual.html#dx1-26236" >176, 177
        short-hyphen-long-hyphen-desc  178
    +href="glossaries-extra-manual.html#dx1-26240" >178
        short-hyphen-postlong-hyphen  179, 180
    +href="glossaries-extra-manual.html#dx1-26243" >179, 180
        short-hyphen-postlong-hyphen-desc  181
    +href="glossaries-extra-manual.html#dx1-26248" >181
        short-long  182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192
    +href="glossaries-extra-manual.html#dx1-20014" >183, 184, 185, 186, 187, 188, 189, 190, 191, 192
        short-long-desc  193, 194, 195, 196, 197, 198, 199
    +href="glossaries-extra-manual.html#dx1-24099" >194, 195, 196, 197, 198, 199
        short-long-user  200, 201, 202, 203, 204, 205, 206
    +href="glossaries-extra-manual.html#dx1-26038" >200, 201, 202, 203, 204, 205, 206
        short-long-user-desc  207
    +href="glossaries-extra-manual.html#dx1-26139" >207
        short-nolong  208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221
    +href="glossaries-extra-manual.html#dx1-20012" >208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221
        short-nolong-desc  222, 223, 224, 225, 226
    +href="glossaries-extra-manual.html#dx1-25033" >222, 223, 224, 225, 226
        short-nolong-desc-noreg  227
    +href="glossaries-extra-manual.html#dx1-26118" >227
        short-nolong-noreg  228
    +href="glossaries-extra-manual.html#dx1-26086" >228
        short-postfootnote  229, 230, 231, 232, 233, 234, 235
    +href="glossaries-extra-manual.html#dx1-26174" >231, 232, 233, 234, 235
        short-postlong-user  236, 237, 238
    +href="glossaries-extra-manual.html#dx1-26197" >236, 237, 238
        short-postlong-user-desc  239
    +href="glossaries-extra-manual.html#dx1-26200" >239
        short-sc  240
    +href="glossaries-extra-manual.html#dx1-25015" >240
        short-sc-desc  241
    +href="glossaries-extra-manual.html#dx1-25045" >241
        short-sc-footnote  242, 243, 244
    +href="glossaries-extra-manual.html#dx1-26162" >243, 244
        short-sc-footnote-desc  245
        short-sc-long  246, 247, 248, 249
    +href="glossaries-extra-manual.html#dx1-24036" >247, 248, 249
        short-sc-long-desc  250, 251
    +href="glossaries-extra-manual.html#dx1-26127" >251
        short-sc-nolong  252, 253, 254
    +href="glossaries-extra-manual.html#dx1-25012" >252, 253, 254
        short-sc-nolong-desc  255, 256
    +href="glossaries-extra-manual.html#dx1-25042" >255, 256
        short-sc-postfootnote  257, 258
    +href="glossaries-extra-manual.html#dx1-24095" >257, 258
        short-sm  259
    +href="glossaries-extra-manual.html#dx1-25022" >259
        short-sm-desc  260
    +href="glossaries-extra-manual.html#dx1-25050" >260
        short-sm-footnote  261
    @@ -22080,31 +24524,31 @@ href="glossaries-extra-manual.html#dx1-13044" >262
        short-sm-long  263, 264, 265
    +href="glossaries-extra-manual.html#dx1-24046" >264, 265
        short-sm-long-desc  266, 267
    +href="glossaries-extra-manual.html#dx1-26130" >267
        short-sm-nolong  268, 269, 270
    +href="glossaries-extra-manual.html#dx1-25019" >268, 269, 270
        short-sm-nolong-desc  271, 272
    +href="glossaries-extra-manual.html#dx1-25047" >271, 272
        short-sm-postfootnote  273
    +href="glossaries-extra-manual.html#dx1-26189" >273
    \abbreviationsname  274
    \abbrvpluralsuffix  275
    acronym styles (glossaries):
        amsgen package  298
    amsmath package  299
    +href="glossaries-extra-manual.html#dx1-4146" >299
    \apptoglossarypreamble  300

    B @@ -22190,13 +24634,13 @@ class="cmbx-10">B class="cmss-10">babel package  301, 302, 303, 304, 305, 306, 307, 308, 309
    +href="glossaries-extra-manual.html#dx1-4208" >303, 304, 305, 306, 307, 308, 309
    bib2gls  310, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 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
    +href="glossaries-extra-manual.html#dx1-38004" >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
    bib2gls  397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 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
    +href="glossaries-extra-manual.html#dx1-3" >419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 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, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527

    C categories:
        abbreviation  484, 485, 486, 487, 488
    +href="glossaries-extra-manual.html#dx1-9005" >528, 529, 530, 531, 532
        acronym  489, 490, 491, 492, 493
    +href="glossaries-extra-manual.html#dx1-17022" >533, 534, 535, 536, 537
        general  494, 495, 496, 497, 498, 499, 500, 501
    +href="glossaries-extra-manual.html#dx1-8037" >538, 539, 540, 541, 542, 543, 544, 545
        index  502, 503
    +href="glossaries-extra-manual.html#dx1-5049" >546, 547
        number  504
    +href="glossaries-extra-manual.html#dx1-29018" >548
        symbol  505, 506
    +href="glossaries-extra-manual.html#dx1-8045" >549, 550
    category attributes:
        accessaposplural  507, 508, 509
    +href="glossaries-extra-manual.html#dx1-29099" >551, 552, 553
        accessinsertdots  510
    +href="glossaries-extra-manual.html#dx1-29080" >554
        accessnoshortplural  511
    +href="glossaries-extra-manual.html#dx1-29110" >555
        aposplural  512, 513, 514, 515, 516, 517, 518, 519
    +href="glossaries-extra-manual.html#dx1-11036" >556, 557, 558, 559, 560, 561, 562, 563
        discardperiod  520, 521, 522, 523, 524
    +href="glossaries-extra-manual.html#dx1-8032" >564, 565, 566, 567, 568
        dualindex  525, 526, 527, 528, 529, 530, 531
    +href="glossaries-extra-manual.html#dx1-29148" >569, 570, 571, 572, 573, 574, 575
        entrycount  532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542
    +href="glossaries-extra-manual.html#dx1-9004" >576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586
        externallocation  543, 544, 545, 546
    +href="glossaries-extra-manual.html#dx1-6053" >587, 588, 589, 590
        firstshortaccess  547
    +href="glossaries-extra-manual.html#dx1-29096" >591
        glossdesc  548, 549, 550
    +href="glossaries-extra-manual.html#dx1-17004" >592, 593, 594
        glossdescfont  551, 552
    +href="glossaries-extra-manual.html#dx1-17005" >595, 596
        glossname  553, 554, 555
    +href="glossaries-extra-manual.html#dx1-17003" >597, 598, 599
        glossnamefont  556, 557, 558
    +href="glossaries-extra-manual.html#dx1-17009" >600, 601, 602
        headuc  559, 560, 561, 562
    +href="glossaries-extra-manual.html#dx1-12059" >603, 604, 605, 606
        hyperoutside  563, 564
    +href="glossaries-extra-manual.html#dx1-6019" >607, 608
        indexname  565, 566, 567, 568, 569
    +href="glossaries-extra-manual.html#dx1-17014" >609, 610, 611, 612, 613
        indexonlyfirst  570, 571, 572
    +href="glossaries-extra-manual.html#dx1-6007" >614, 615, 616
        insertdots  573, 574, 575, 576
    +href="glossaries-extra-manual.html#dx1-20004" >617, 618, 619, 620
        linkcount  577, 578, 579
    +href="glossaries-extra-manual.html#dx1-29124" >621, 622, 623
        linkcountmaster  580, 581
    +href="glossaries-extra-manual.html#dx1-29126" >624, 625
        markshortwords  582, 583
    +href="glossaries-extra-manual.html#dx1-29061" >626, 627
        markwords  584, 585, 586, 587, 588, 589
    +href="glossaries-extra-manual.html#dx1-26212" >628, 629, 630, 631, 632, 633
        nameshortaccess  590
    +href="glossaries-extra-manual.html#dx1-29087" >634
        nohyper  591, 592, 593
    +href="glossaries-extra-manual.html#dx1-29034" >635, 636, 637
        nohyperfirst  594, 595, 596, 597, 598
    +href="glossaries-extra-manual.html#dx1-26148" >638, 639, 640, 641, 642
        noshortplural  599, 600, 601, 602, 603, 604
    +href="glossaries-extra-manual.html#dx1-11037" >643, 644, 645, 646, 647, 648
        pluraldiscardperiod  605, 606
    +href="glossaries-extra-manual.html#dx1-29048" >649, 650
        recordcount  607, 608, 609, 610
    +href="glossaries-extra-manual.html#dx1-43019" >651, 652, 653, 654
        regular  611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642
    +href="glossaries-extra-manual.html#dx1-8010" >655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686
        retainfirstuseperiod  643
    +href="glossaries-extra-manual.html#dx1-29050" >687
        tagging  644, 645, 646, 647
    +href="glossaries-extra-manual.html#dx1-21002" >688, 689, 690, 691
        targetcategory  648
    +href="glossaries-extra-manual.html#dx1-29157" >692
        targetname  649, 650
    +href="glossaries-extra-manual.html#dx1-29154" >693, 694
        targeturl  651, 652, 653, 654, 655
    +href="glossaries-extra-manual.html#dx1-5016" >695, 696, 697, 698, 699
        textformat  656, 657, 658, 659, 660
    +href="glossaries-extra-manual.html#dx1-6020" >700, 701, 702, 703, 704
        textshortaccess  661
    +href="glossaries-extra-manual.html#dx1-29093" >705
        unitcount  662
    +href="glossaries-extra-manual.html#dx1-31034" >706
        wrgloss  663, 664
    +href="glossaries-extra-manual.html#dx1-6015" >707, 708
    \cGLS  665
    +href="glossaries-extra-manual.html#dx1-31015" >709
    \cGLSformat  666
    +href="glossaries-extra-manual.html#dx1-31017" >710
    \cGLSpl  667
    +href="glossaries-extra-manual.html#dx1-31016" >711
    \cGLSplformat  668
    +href="glossaries-extra-manual.html#dx1-31018" >712
    convertgls2bib  669
    +href="glossaries-extra-manual.html#dx1-35005" >713
    \csGlsXtrLetField  670
    +href="glossaries-extra-manual.html#dx1-45026" >714
    \CustomAbbreviationFields  671
    +href="glossaries-extra-manual.html#dx1-27006" >715

    D datatool-base package  672
    +href="glossaries-extra-manual.html#dx1-10" >716
    +\dGLS  717
    +\dGls  718
    +\dgls  719
    +\dglsdisp  720
    +\dglslink  721
    +\dGLSpl  722
    +\dGlspl  723
    +\dglspl  724

    E \eglssetwidest  673
    +href="glossaries-extra-manual.html#dx1-19060" >725
    \eglsupdatewidest  674
    +href="glossaries-extra-manual.html#dx1-19064" >726
    + + + \eGlsXtrSetField  675
    +href="glossaries-extra-manual.html#dx1-45023" >727
    entry location  676, 677, 678
    +href="glossaries-extra-manual.html#dx1-54005" >728, 729, 730
    entrycounter package  679
    +href="glossaries-extra-manual.html#dx1-47020" >731
    equation (counter)  680, 681
    +href="glossaries-extra-manual.html#dx1-4122" >732, 733, 734, 735, 736
    etoolbox package  682, 683, 684, 685, 686, 687, 688, 689, 690
    +href="glossaries-extra-manual.html#dx1-6" >737, 738, 739, 740, 741, 742, 743, 744, 745

    F fancyhdr package  691
    - - - +href="glossaries-extra-manual.html#dx1-14052" >746
    first use  692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744
    +href="glossaries-extra-manual.html#dx1-6005" >747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799
    first use flag  745, 746, 747, 748, 749, 750, 751
    +href="glossaries-extra-manual.html#dx1-8052" >800, 801, 802, 803, 804, 805, 806
    first use text  752, 753
    +href="glossaries-extra-manual.html#dx1-54016" >807, 808
    fontenc package  754
    +href="glossaries-extra-manual.html#dx1-24024" >809

    G \gglssetwidest  755
    +href="glossaries-extra-manual.html#dx1-19058" >810
    \gglsupdatewidest  756
    +href="glossaries-extra-manual.html#dx1-19063" >811
    \gGlsXtrSetField  757
    +href="glossaries-extra-manual.html#dx1-45022" >812
    glossaries package  758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772
    +href="glossaries-extra-manual.html#dx1-5037" >813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832
    glossaries-accsupp package  773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789
    +href="glossaries-extra-manual.html#dx1-4036" >833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849
    glossaries-extra package  790, 791, 792
    +href="glossaries-extra-manual.html#dx1-5011" >850, 851, 852, 853, 854, 855
    glossaries-extra-bib2gls package  793, 794, 795, 796, 797, 798, 799, 800, 801
    +href="glossaries-extra-manual.html#dx1-4082" >856, 857, 858, 859, 860, 861, 862, 863, 864
    glossaries-extra-stylemods package  802, 803, 804, 805, 806, 807, 808, 809
    +href="glossaries-extra-manual.html#dx1-4027" >865, 866, 867, 868, 869, 870, 871, 872, 873
    glossaries-prefix package  810, 811, 812
    +href="glossaries-extra-manual.html#dx1-49001" >874, 875, 876
    \glossariesextrasetup  813
    +href="glossaries-extra-manual.html#dx1-4247" >877
    glossary styles:
        altlist  814, 815
    +href="glossaries-extra-manual.html#dx1-19023" >878, 879
        alttree  816, 817, 818, 819, 820, 821, 822, 823
    +href="glossaries-extra-manual.html#dx1-15026" >880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891
        bookindex  824, 825, 826, 827
    +href="glossaries-extra-manual.html#dx1-14002" >892, 893, 894, 895
        index  828
    +href="glossaries-extra-manual.html#dx1-19038" >896
        inline  829, 830
    +href="glossaries-extra-manual.html#dx1-19006" >897, 898
        list  831, 832, 833
    +href="glossaries-extra-manual.html#dx1-19018" >899, 900, 901
        listdotted  834, 835
    +href="glossaries-extra-manual.html#dx1-19024" >902, 903
        long  836
    +href="glossaries-extra-manual.html#dx1-19012" >904
    +    long-desc-name  905
    +    long-desc-sym-name  906
    +    long-loc-desc-name  907
    +    long-loc-desc-sym-name  908
    +    long-loc-sym-desc-name  909
    +    long-name-desc  910, 911, 912
    +    long-name-desc-loc  913
    +    long-name-desc-sym  914, 915
    +    long-name-desc-sym-loc  916, 917
    +    long-name-sym-desc  918
    + + + +    long-name-sym-desc-loc  919
    +    long-sym-desc-name  920
        long3col  837
    +href="glossaries-extra-manual.html#dx1-19004" >921
    +    longragged-booktabs  922, 923
        mcolindexgroup  838
    +href="glossaries-extra-manual.html#dx1-14003" >924
        tree  839, 840
    +href="glossaries-extra-manual.html#dx1-19039" >925, 926
        treenoname  841, 842, 843
    +href="glossaries-extra-manual.html#dx1-19044" >927, 928, 929
    glossary-bookindex package  844, 845
    +href="glossaries-extra-manual.html#dx1-14001" >930, 931
    glossary-inline package  846
    +href="glossaries-extra-manual.html#dx1-19007" >932
    +glossary-long package  933, 934
    +glossary-longextra package  935, 936
    glossary-tree package  847, 848, 849, 850, 851
    +href="glossaries-extra-manual.html#dx1-14045" >937, 938, 939, 940, 941
    \glossentrynameother  852
    +href="glossaries-extra-manual.html#dx1-17007" >942
    \glossxtrsetpopts  853
    +class="cmti-10">943
    \glsabbrvdefaultfont  854, 855
    +href="glossaries-extra-manual.html#dx1-24029" >944, 945
    \glsabbrvemfont  856
    +href="glossaries-extra-manual.html#dx1-24053" >946
    \glsabbrvfont  857
    +href="glossaries-extra-manual.html#dx1-27047" >947
    \glsabbrvhyphenfont  858
    +href="glossaries-extra-manual.html#dx1-24065" >948
    \glsabbrvonlyfont  859
    +href="glossaries-extra-manual.html#dx1-24071" >949
    \glsabbrvscfont  860
    +href="glossaries-extra-manual.html#dx1-24037" >950
    \glsabbrvsmfont  861
    +href="glossaries-extra-manual.html#dx1-24047" >951
    \glsabbrvuserfont  862, 863
    +href="glossaries-extra-manual.html#dx1-24060" >952, 953
    \Glsaccessdesc  864
    - - - +href="glossaries-extra-manual.html#dx1-51039" >954
    \glsaccessdesc  865
    +href="glossaries-extra-manual.html#dx1-51037" >955
    \Glsaccessdescplural  866
    +href="glossaries-extra-manual.html#dx1-51043" >956
    \glsaccessdescplural  867
    +href="glossaries-extra-manual.html#dx1-51041" >957
    \Glsaccessfirst  868
    +href="glossaries-extra-manual.html#dx1-51023" >958
    \glsaccessfirst  869
    +href="glossaries-extra-manual.html#dx1-51021" >959
    \Glsaccessfirstplural  870
    +href="glossaries-extra-manual.html#dx1-51027" >960
    \glsaccessfirstplural  871
    +href="glossaries-extra-manual.html#dx1-51025" >961
    \Glsaccesslong  872
    +href="glossaries-extra-manual.html#dx1-51055" >962
    \glsaccesslong  873
    +href="glossaries-extra-manual.html#dx1-51053" >963
    \Glsaccesslongpl  874
    +href="glossaries-extra-manual.html#dx1-51059" >964
    \glsaccesslongpl  875
    +href="glossaries-extra-manual.html#dx1-51057" >965
    \Glsaccessname  876
    +href="glossaries-extra-manual.html#dx1-51010" >966
    \glsaccessname  877
    +href="glossaries-extra-manual.html#dx1-51005" >967
    \Glsaccessplural  878
    +href="glossaries-extra-manual.html#dx1-51019" >968
    \glsaccessplural  879
    +href="glossaries-extra-manual.html#dx1-51017" >969
    \Glsaccessshort  880
    +href="glossaries-extra-manual.html#dx1-51047" >970
    \glsaccessshort  881
    +href="glossaries-extra-manual.html#dx1-51045" >971
    \Glsaccessshortpl  882
    +href="glossaries-extra-manual.html#dx1-51051" >972
    \glsaccessshortpl  883
    +href="glossaries-extra-manual.html#dx1-51049" >973
    \Glsaccesssymbol  884
    +href="glossaries-extra-manual.html#dx1-51031" >974
    \glsaccesssymbol  885
    +href="glossaries-extra-manual.html#dx1-51029" >975
    \Glsaccesssymbolplural  886
    +href="glossaries-extra-manual.html#dx1-51035" >976
    \glsaccesssymbolplural  887
    +href="glossaries-extra-manual.html#dx1-51033" >977
    + + + \Glsaccesstext  888
    +href="glossaries-extra-manual.html#dx1-51015" >978
    \glsaccesstext  889
    +href="glossaries-extra-manual.html#dx1-51013" >979
    \glsacspace  890
    +class="cmti-10">980
    \glsacspacemax  891
    +class="cmti-10">981
    \glsadd options
        format  892
    +href="glossaries-extra-manual.html#dx1-8075" >982
        theHvalue  893, 894
    +href="glossaries-extra-manual.html#dx1-6038" >983, 984
        thevalue  895, 896, 897, 898, 899
    +href="glossaries-extra-manual.html#dx1-6037" >985, 986, 987, 988, 989
    \glsaddeach  900
    +class="cmti-10">990
    \glsaddpostsetkeys  901
    +href="glossaries-extra-manual.html#dx1-6033" >991
    \glsaddpresetkeys  902
    +href="glossaries-extra-manual.html#dx1-6032" >992
    \glscapturedgroup  903
    +href="glossaries-extra-manual.html#dx1-41002" >993
    \glscategory  904
    +href="glossaries-extra-manual.html#dx1-29019" >994
    \glscategorylabel  905
    +href="glossaries-extra-manual.html#dx1-27039" >995
    \glscurrententrylabel  906
    +href="glossaries-extra-manual.html#dx1-17024" >996
    \glscurrentfieldvalue  907
    +href="glossaries-extra-manual.html#dx1-45030" >997
    \glsdefpostdesc  908
    +href="glossaries-extra-manual.html#dx1-17023" >998
    \glsdefpostlink  909
    +class="cmti-10">999
    \glsdefpostname  910
    +href="glossaries-extra-manual.html#dx1-17017" >1000
    \glsentrycurrcount  911
    +href="glossaries-extra-manual.html#dx1-31035" >1001
    \glsentryprevcount  912
    +href="glossaries-extra-manual.html#dx1-31036" >1002
    \glsentryprevmaxcount  913
    +href="glossaries-extra-manual.html#dx1-31038" >1003
    \glsentryprevtotalcount  914
    - - - +href="glossaries-extra-manual.html#dx1-31037" >1004
    \glsextrapostnamehook  915
    +href="glossaries-extra-manual.html#dx1-17018" >1005
    \glsFindWidestAnyName  916
    +href="glossaries-extra-manual.html#dx1-19078" >1006
    \glsFindWidestAnyNameLocation  917
    +href="glossaries-extra-manual.html#dx1-19090" >1007
    \glsFindWidestAnyNameSymbol  918
    +href="glossaries-extra-manual.html#dx1-19082" >1008
    \glsFindWidestAnyNameSymbolLocation  919
    +href="glossaries-extra-manual.html#dx1-19087" >1009
    \glsFindWidestLevelTwo  920
    +href="glossaries-extra-manual.html#dx1-19080" >1010
    \glsFindWidestTopLevelName  921
    +href="glossaries-extra-manual.html#dx1-19073" >1011
    \glsFindWidestUsedAnyName  922
    +href="glossaries-extra-manual.html#dx1-19076" >1012
    \glsFindWidestUsedAnyNameLocation  923
    +href="glossaries-extra-manual.html#dx1-19088" >1013
    \glsFindWidestUsedAnyNameSymbol  924
    +href="glossaries-extra-manual.html#dx1-19081" >1014
    \glsFindWidestUsedAnyNameSymbolLocation  925
    +href="glossaries-extra-manual.html#dx1-19083" >1015
    \glsFindWidestUsedLevelTwo  926
    +href="glossaries-extra-manual.html#dx1-19079" >1016
    \glsFindWidestUsedTopLevelName  927
    +href="glossaries-extra-manual.html#dx1-19074" >1017
    \glsfirstabbrvdefaultfont  928
    +href="glossaries-extra-manual.html#dx1-24030" >1018
    \glsfirstabbrvemfont  929
    +href="glossaries-extra-manual.html#dx1-24054" >1019
    \glsfirstabbrvfont  930
    +href="glossaries-extra-manual.html#dx1-27045" >1020
    \glsfirstabbrvhyphenfont  931
    +href="glossaries-extra-manual.html#dx1-24066" >1021
    \glsfirstabbrvonlyfont  932
    +href="glossaries-extra-manual.html#dx1-24072" >1022
    \glsfirstabbrvsmfont  933
    +href="glossaries-extra-manual.html#dx1-24049" >1023
    \glsfirstabbrvuserfont  934
    +href="glossaries-extra-manual.html#dx1-24061" >1024
    \glsfirstlongdefaultfont  935
    +href="glossaries-extra-manual.html#dx1-24032" >1025
    \glsfirstlongemfont  936
    +href="glossaries-extra-manual.html#dx1-24058" >1026
    \glsfirstlongfont  937
    +href="glossaries-extra-manual.html#dx1-27049" >1027
    + + + \glsfirstlongfootnotefont  938
    +href="glossaries-extra-manual.html#dx1-26155" >1028
    \glsfirstlonghyphenfont  939
    +href="glossaries-extra-manual.html#dx1-24068" >1029
    \glsfirstlongonlyfont  940
    +href="glossaries-extra-manual.html#dx1-24074" >1030
    \glsfirstlonguserfont  941
    +href="glossaries-extra-manual.html#dx1-24063" >1031
    \Glsfmtfirst  942
    +href="glossaries-extra-manual.html#dx1-28044" >1032
    \glsfmtfirst  943
    +href="glossaries-extra-manual.html#dx1-28043" >1033
    \Glsfmtfirstpl  944
    +href="glossaries-extra-manual.html#dx1-28046" >1034
    \glsfmtfirstpl  945
    +href="glossaries-extra-manual.html#dx1-28045" >1035
    \Glsfmtfull  946
    +href="glossaries-extra-manual.html#dx1-28032" >1036
    \glsfmtfull  947
    +href="glossaries-extra-manual.html#dx1-28030" >1037
    \Glsfmtfullpl  948
    +href="glossaries-extra-manual.html#dx1-28033" >1038
    \glsfmtfullpl  949
    +href="glossaries-extra-manual.html#dx1-28031" >1039
    \Glsfmtlong  950
    +href="glossaries-extra-manual.html#dx1-28028" >1040
    \glsfmtlong  951
    +href="glossaries-extra-manual.html#dx1-28026" >1041
    \Glsfmtlongpl  952
    +href="glossaries-extra-manual.html#dx1-28029" >1042
    \glsfmtlongpl  953
    +href="glossaries-extra-manual.html#dx1-28027" >1043
    \Glsfmtname  954
    +href="glossaries-extra-manual.html#dx1-28041" >1044
    \glsfmtname  955
    +href="glossaries-extra-manual.html#dx1-28040" >1045
    \Glsfmtplural  956
    +href="glossaries-extra-manual.html#dx1-28038" >1046
    \glsfmtplural  957
    +href="glossaries-extra-manual.html#dx1-28037" >1047
    \Glsfmtshort  958
    +href="glossaries-extra-manual.html#dx1-28024" >1048
    \glsfmtshort  959
    +href="glossaries-extra-manual.html#dx1-28022" >1049
    \Glsfmtshortpl  960
    - - - +href="glossaries-extra-manual.html#dx1-28025" >1050
    \glsfmtshortpl  961
    +href="glossaries-extra-manual.html#dx1-28023" >1051
    \Glsfmttext  962
    +href="glossaries-extra-manual.html#dx1-28036" >1052
    \glsfmttext  963
    +href="glossaries-extra-manual.html#dx1-28035" >1053
    \glsforeachwithattribute  964
    +href="glossaries-extra-manual.html#dx1-29184" >1054
    \glsgetattribute  965
    +href="glossaries-extra-manual.html#dx1-29167" >1055
    \glsgetcategoryattribute  966
    +href="glossaries-extra-manual.html#dx1-29166" >1056
    \glsgetwidestname  967
    +href="glossaries-extra-manual.html#dx1-19066" >1057
    \glsgetwidestsubname  968
    +href="glossaries-extra-manual.html#dx1-19067" >1058
    \glshasattribute  969
    +href="glossaries-extra-manual.html#dx1-29170" >1059
    \glshascategoryattribute  970
    +href="glossaries-extra-manual.html#dx1-29168" >1060
    \glshex  971
    +href="glossaries-extra-manual.html#dx1-41001" >1061
    \glsifattribute  972
    +href="glossaries-extra-manual.html#dx1-29175" >1062
    \glsifcategory  973
    +href="glossaries-extra-manual.html#dx1-29020" >1063
    \glsifcategoryattribute  974
    +href="glossaries-extra-manual.html#dx1-29171" >1064
    \glsifnotregular  975
    +href="glossaries-extra-manual.html#dx1-29182" >1065
    \glsifnotregularcategory  976
    +href="glossaries-extra-manual.html#dx1-29181" >1066
    \glsifregular  977
    +href="glossaries-extra-manual.html#dx1-29178" >1067
    \glsifregularcategory  978
    +href="glossaries-extra-manual.html#dx1-29177" >1068
    \glskeylisttok  979
    +href="glossaries-extra-manual.html#dx1-27037" >1069
    \glslabeltok  980
    +href="glossaries-extra-manual.html#dx1-27036" >1070
    \glslink options
        counter  1071, 1072
    +    format  981, 982, 983, 984
    +href="glossaries-extra-manual.html#dx1-6050" >1073, 1074, 1075, 1076
    + + +     hyper  985, 986, 987
    +href="glossaries-extra-manual.html#dx1-12055" >1077, 1078, 1079
        hyper=false  988
    +href="glossaries-extra-manual.html#dx1-28017" >1080
        hyperoutside  989, 990
    +href="glossaries-extra-manual.html#dx1-6018" >1081, 1082
        noindex  991, 992, 993, 994, 995, 996, 997
    +href="glossaries-extra-manual.html#dx1-6003" >1083, 1084, 1085, 1086, 1087, 1088, 1089
        prefix  998, 999
    +href="glossaries-extra-manual.html#dx1-5024" >1090, 1091
        textformat  1000, 1001
    +href="glossaries-extra-manual.html#dx1-6022" >1092, 1093
        theHvalue  1002, 1003
    +href="glossaries-extra-manual.html#dx1-6028" >1094, 1095
        thevalue  1004, 1005
    +href="glossaries-extra-manual.html#dx1-6027" >1096, 1097
        wrgloss  1006, 1007, 1008, 1009
    +href="glossaries-extra-manual.html#dx1-6011" >1098, 1099, 1100, 1101
    +\glslinkcheckfirsthyperhook  1102
    +\glslinkpresetkeys  1103
    +\glslistchildpostlocation  1104
    +\glslistchildprelocation  1105
    +\glslistdesc  1106
    +\glslistprelocation  1107
    +\glslocalreseteach  1108
    +\glslocalunseteach  1109
    +\glslongdefaultfont  1110
    +\glslongemfont  1111
    +\glslongextraDescAlign  1112
    +\glslongextraDescFmt  1113
    +\glslongextraDescNameHeader  1114
    +\glslongextraDescNameTabularFooter  1115
    +\glslongextraDescNameTabularHeader  1116
    +\glslongextraDescSymNameHeader  1117
    +\glslongextraDescSymNameTabularFooter  1118
    +\glslongextraDescSymNameTabularHeader  1119
    +\glslongextraGroupHeading  1120
    +\glslongextraHeaderFmt  1121
    +\glslongextraLocationAlign  1122
    +\glslongextraLocationDescNameHeader  1123
    +\glslongextraLocationDescNameTabularFooter  1124
    +\glslongextraLocationDescNameTabularHeader  1125
    +\glslongextraLocationDescSymNameHeader  1126
    +\glslongextraLocationDescSymNameTabularFooter  1127
    +\glslongextraLocationDescSymNameTabularHeader  1128
    +\glslongextraLocationFmt  1129, 1130
    +\glslongextraLocationSymDescNameHeader  1131
    +\glslongextraLocationSymDescNameTabularFooter  1132
    +\glslongextraLocationSymDescNameTabularHeader  1133
    +\glslongextraLocSetDescWidth  1134
    +\glslongextraNameAlign  1135
    +\glslongextraNameDescHeader  1136
    +\glslongextraNameDescLocationHeader  1137
    +\glslongextraNameDescLocationTabularFooter  1138
    +\glslongextraNameDescLocationTabularHeader  1139
    + + + +\glslongextraNameDescSymHeader  1140
    +\glslongextraNameDescSymLocationHeader  1141
    +\glslongextraNameDescSymLocationTabularFooter  1142
    +\glslongextraNameDescSymLocationTabularHeader  1143
    +\glslongextraNameDescSymTabularFooter  1144
    +\glslongextraNameDescSymTabularHeader  1145
    +\glslongextraNameDescTabularFooter  1146
    +\glslongextraNameDescTabularHeader  1147
    +\glslongextraNameFmt  1148
    +\glslongextraNameSymDescHeader  1149
    +\glslongextraNameSymDescLocationHeader  1150
    +\glslongextraNameSymDescLocationTabularFooter  1151
    +\glslongextraNameSymDescLocationTabularHeader  1152
    +\glslongextraNameSymDescTabularFooter  1153
    +\glslongextraNameSymDescTabularHeader  1154
    +\glslongextraSetDescWidth  1155
    \glslinkcheckfirsthyperhook  1010
    +class="cmtt-10">\glslongextraSetWidest  1156
    \glslinkpresetkeys  1011
    +class="cmtt-10">\glslongextraSubDescFmt  1157
    \glslistchildpostlocation  1012
    +class="cmtt-10">\glslongextraSubNameFmt  1158
    \glslistchildprelocation  1013
    +class="cmtt-10">\glslongextraSubSymbolFmt  1159
    \glslistdesc  1014
    +class="cmtt-10">\glslongextraSymbolAlign  1160
    \glslistprelocation  1015
    +class="cmtt-10">\glslongextraSymbolFmt  1161
    \glslocalreseteach  1016
    +class="cmtt-10">\glslongextraSymDescNameHeader  1162
    \glslocalunseteach  1017
    +class="cmtt-10">\glslongextraSymDescNameTabularFooter  1163
    \glslongdefaultfont  1018
    +class="cmtt-10">\glslongextraSymDescNameTabularHeader  1164
    \glslongemfont  1019
    +class="cmtt-10">\glslongextraSymLocSetDescWidth  1165
    +\glslongextraSymSetDescWidth  1166
    +\glslongextraTabularVAlign  1167
    +\glslongextraUpdateWidest  1168
    +\glslongextraUpdateWidestChild  1169
    +\GlsLongExtraUseTabulartrue  1170
    \glslongfont  1020
    +href="glossaries-extra-manual.html#dx1-27050" >1171
    \glslongfootnotefont  1021
    +href="glossaries-extra-manual.html#dx1-26157" >1172
    \glslonghyphenfont  1022
    +href="glossaries-extra-manual.html#dx1-24067" >1173
    \glslongonlyfont  1023
    +href="glossaries-extra-manual.html#dx1-24073" >1174
    \glslongpltok  1024
    - - - +href="glossaries-extra-manual.html#dx1-27029" >1175
    \glslongtok  1025
    +href="glossaries-extra-manual.html#dx1-27028" >1176
    \glslonguserfont  1026
    +href="glossaries-extra-manual.html#dx1-24062" >1177
    \glsnoidxdisplayloc  1027
    +class="cmti-10">1178
    \glsps  1028
    +class="cmti-10">1179
    \glspt  1029
    +class="cmti-10">1180
    +\glsrenewcommand  1181
    \glsseeitemformat  1030
    +class="cmti-10">1182
    \glssetattribute  1031
    +href="glossaries-extra-manual.html#dx1-29165" >1183
    \glssetcategoryattribute  1032
    +href="glossaries-extra-manual.html#dx1-29162" >1184
    \glssetregularcategory  1033
    +href="glossaries-extra-manual.html#dx1-29164" >1185
    + + + \glsshortpltok  1034
    +href="glossaries-extra-manual.html#dx1-27025" >1186
    \glsshorttok  1035
    +href="glossaries-extra-manual.html#dx1-27024" >1187
    \glstreechilddesc  1036
    +href="glossaries-extra-manual.html#dx1-19053" >1188
    \glstreechildprelocation  1037
    +href="glossaries-extra-manual.html#dx1-19042" >1189
    \glstreechildsymbol  1038
    +href="glossaries-extra-manual.html#dx1-19054" >1190
    \glstreedefaultnamefmt  1039
    +href="glossaries-extra-manual.html#dx1-19037" >1191
    \glstreedesc  1040
    +href="glossaries-extra-manual.html#dx1-19051" >1192
    \glstreenonamechilddesc  1041
    +href="glossaries-extra-manual.html#dx1-19047" >1193
    \glstreenonamedesc  1042
    +href="glossaries-extra-manual.html#dx1-19043" >1194
    \glstreenonamesymbol  1043
    +href="glossaries-extra-manual.html#dx1-19045" >1195
    \glstreeprelocation  1044
    +href="glossaries-extra-manual.html#dx1-19041" >1196
    \glstreesymbol  1045
    +href="glossaries-extra-manual.html#dx1-19052" >1197
    \glsupdatewidest  1046
    +href="glossaries-extra-manual.html#dx1-19062" >1198
    \glsuseabbrvfont  1047
    +href="glossaries-extra-manual.html#dx1-20027" >1199
    \glsuselongfont  1048
    +href="glossaries-extra-manual.html#dx1-20028" >1200
    \glsuserdescription  1049
    +href="glossaries-extra-manual.html#dx1-26041" >1201
    \Glsxtr  1050
    +href="glossaries-extra-manual.html#dx1-34014" >1202
    \glsxtr  1051
    +href="glossaries-extra-manual.html#dx1-34009" >1203
    \glsxtrabbreviationfont  1052
    +class="cmti-10">1204
    \glsxtrabbrvfootnote  1053
    +href="glossaries-extra-manual.html#dx1-26158" >1205
    \glsxtrabbrvpluralsuffix  1054, 1055
    +class="cmti-10">1206, 1207
    \glsxtractivatenopost  1056
    +href="glossaries-extra-manual.html#dx1-47014" >1208
    \glsxtraddallcrossrefs  1057
    +class="cmti-10">1209
    +\glsxtraddlabelprefix  1210
    \glsxtralias  1058
    +href="glossaries-extra-manual.html#dx1-48021" >1211
    \glsxtrAltTreeIndent  1059
    +href="glossaries-extra-manual.html#dx1-19096" >1212
    \glsxtralttreeInit  1060
    +href="glossaries-extra-manual.html#dx1-19095" >1213
    \glsxtralttreeSubSymbolDescLocation  1061
    +href="glossaries-extra-manual.html#dx1-19093" >1214
    \glsxtralttreeSymbolDescLocation  1062
    +href="glossaries-extra-manual.html#dx1-19092" >1215
    +\GlsXtrAutoAddOnFormat  1216
    \glsxtrautoindex  1063
    +href="glossaries-extra-manual.html#dx1-33025" >1217
    \glsxtrautoindexassignsort  1064
    +href="glossaries-extra-manual.html#dx1-33021" >1218
    \glsxtrautoindexentry  1065
    +href="glossaries-extra-manual.html#dx1-33020" >1219
    \glsxtrautoindexesc  1066
    +href="glossaries-extra-manual.html#dx1-33023" >1220
    \glsxtrBasicDigitrules  1067
    +href="glossaries-extra-manual.html#dx1-41063" >1221
    \GlsXtrBibTeXEntryAliases  1068
    +href="glossaries-extra-manual.html#dx1-41006" >1222
    \glsxtrbookindexatendgroup  1069
    +class="cmti-10">1223
    \glsxtrbookindexbetween  1070
    +class="cmti-10">1224
    \glsxtrbookindexbookmark  1071
    - - - +class="cmti-10">1225
    \glsxtrbookindexcols  1072
    +class="cmti-10">1226
    \glsxtrbookindexcolspread  1073
    +class="cmti-10">1227
    \glsxtrbookindexfirstmark  1074
    +class="cmti-10">1228
    \glsxtrbookindexfirstmarkfmt  1075
    +class="cmti-10">1229
    \glsxtrbookindexformatheader  1076
    +class="cmti-10">1230
    \glsxtrbookindexlastmark  1077
    +class="cmti-10">1231
    \glsxtrbookindexlastmarkfmt  1078
    +class="cmti-10">1232
    + + + \glsxtrbookindexmarkentry  1079
    +class="cmti-10">1233
    \glsxtrbookindexmulticolsenv  1080
    +class="cmti-10">1234
    \glsxtrbookindexname  1081
    +class="cmti-10">1235
    \glsxtrbookindexparentchildsep  1082
    +class="cmti-10">1236
    \glsxtrbookindexparentsubchildsep  1083
    +class="cmti-10">1237
    \glsxtrbookindexprelocation  1084
    +class="cmti-10">1238
    \glsxtrbookindexsubatendgroup  1085
    +class="cmti-10">1239
    \glsxtrbookindexsubbetween  1086
    +class="cmti-10">1240
    \glsxtrbookindexsubname  1087
    +class="cmti-10">1241
    \glsxtrbookindexsubprelocation  1088
    +class="cmti-10">1242
    \glsxtrbookindexsubsubatendgroup  1089
    +class="cmti-10">1243
    \glsxtrbookindexsubsubbetween  1090
    +class="cmti-10">1244
    \glsxtrchecknohyperfirst  1091
    +href="glossaries-extra-manual.html#dx1-29033" >1245
    +\glsxtrclearlabelprefixes  1246
    \glsxtrcombiningdiacriticIIIrules  1092
    +href="glossaries-extra-manual.html#dx1-41055" >1247
    \glsxtrcombiningdiacriticIIrules  1093
    +href="glossaries-extra-manual.html#dx1-41054" >1248
    \glsxtrcombiningdiacriticIrules  1094
    +href="glossaries-extra-manual.html#dx1-41053" >1249
    \glsxtrcombiningdiacriticIVrules  1095
    +href="glossaries-extra-manual.html#dx1-41056" >1250
    \glsxtrcombiningdiacriticrules  1096
    +href="glossaries-extra-manual.html#dx1-41052" >1251
    \glsxtrcontrolrules  1097
    +href="glossaries-extra-manual.html#dx1-41047" >1252
    \glsxtrcopytoglossary  1098
    +href="glossaries-extra-manual.html#dx1-44007" >1253
    \glsxtrcurrencyrules  1099
    +href="glossaries-extra-manual.html#dx1-41060" >1254
    \glsxtrdeffield  1100
    +href="glossaries-extra-manual.html#dx1-45018" >1255
    \glsxtrdetoklocation  1101
    +href="glossaries-extra-manual.html#dx1-43007" >1256
    \glsxtrdigitrules  1102
    +href="glossaries-extra-manual.html#dx1-41062" >1257
    \glsxtrdisplayendloc  1103
    +class="cmti-10">1258
    \glsxtrdisplayendlochook  1104
    +class="cmti-10">1259
    +\glsxtrdisplaylocnameref  1260
    \glsxtrdisplaysingleloc  1105
    +class="cmti-10">1261
    \glsxtrdisplaystartloc  1106
    +class="cmti-10">1262
    \glsxtrdisplaysupploc  1107
    +href="glossaries-extra-manual.html#dx1-39001" >1263
    \glsxtrdoautoindexname  1108
    +href="glossaries-extra-manual.html#dx1-33017" >1264
    \glsxtrdowrglossaryhook  1109
    +href="glossaries-extra-manual.html#dx1-6029" >1265
    \glsxtredeffield  1110
    +href="glossaries-extra-manual.html#dx1-45021" >1266
    \glsxtremsuffix  1111
    +href="glossaries-extra-manual.html#dx1-24055" >1267
    \GlsXtrEnableEntryCounting  1112
    +href="glossaries-extra-manual.html#dx1-31027" >1268
    \GlsXtrEnableEntryUnitCounting  1113
    +href="glossaries-extra-manual.html#dx1-31030" >1269
    \GlsXtrEnableIndexFormatOverride  1114
    +href="glossaries-extra-manual.html#dx1-33034" >1270
    \GlsXtrEnableInitialTagging  1115
    +href="glossaries-extra-manual.html#dx1-21001" >1271
    \GlsXtrEnableLinkCounting  1116
    +href="glossaries-extra-manual.html#dx1-32002" >1272
    \GlsXtrEnableOnTheFly  1117
    - - - +href="glossaries-extra-manual.html#dx1-34007" >1273
    \GlsXtrEnablePreLocationTag  1118
    +href="glossaries-extra-manual.html#dx1-18010" >1274
    \glsxtrenablerecordcount  1119
    +href="glossaries-extra-manual.html#dx1-43037" >1275
    \glsxtrendfor  1120
    +href="glossaries-extra-manual.html#dx1-45062" >1276
    \glsxtrentryfmt  1121
    +href="glossaries-extra-manual.html#dx1-45008" >1277
    \GlsXtrExpandedFmt  1122
    +class="cmti-10">1278
    + + + \glsxtrfielddolistloop  1123
    +href="glossaries-extra-manual.html#dx1-45052" >1279
    \glsxtrfieldforlistloop  1124
    +href="glossaries-extra-manual.html#dx1-45053" >1280
    \glsxtrfieldifinlist  1125
    +href="glossaries-extra-manual.html#dx1-45054" >1281
    \glsxtrfieldlistadd  1126
    +href="glossaries-extra-manual.html#dx1-45048" >1282
    \glsxtrfieldlisteadd  1127
    +href="glossaries-extra-manual.html#dx1-45050" >1283
    \glsxtrfieldlistgadd  1128
    +href="glossaries-extra-manual.html#dx1-45049" >1284
    \glsxtrfieldlistxadd  1129
    +href="glossaries-extra-manual.html#dx1-45051" >1285
    \glsxtrfieldtitlecasecs  1130
    +href="glossaries-extra-manual.html#dx1-29133" >1286
    \glsxtrfieldxifinlist  1131
    +href="glossaries-extra-manual.html#dx1-45055" >1287
    \glsxtrfmt  1132
    +href="glossaries-extra-manual.html#dx1-45002" >1288
    \glsxtrfmt*  1133
    +href="glossaries-extra-manual.html#dx1-45004" >1289
    \GlsXtrFmtDefaultOptions  1134
    +href="glossaries-extra-manual.html#dx1-45003" >1290
    \glsxtrfmtdisplay  1135
    +href="glossaries-extra-manual.html#dx1-45005" >1291
    +\glsxtrfmtexternalnameref  1292
    \GlsXtrFmtField  1136
    +href="glossaries-extra-manual.html#dx1-45001" >1293
    +\glsxtrfmtinternalnameref  1294
    \glsxtrfootnotename  1137
    +href="glossaries-extra-manual.html#dx1-26154" >1295
    \glsxtrforcsvfield  1138
    +href="glossaries-extra-manual.html#dx1-45057" >1296
    \GlsXtrForeignText  1139
    +href="glossaries-extra-manual.html#dx1-45064" >1297
    \GlsXtrForeignTextField  1140
    +href="glossaries-extra-manual.html#dx1-45063" >1298
    \GlsXtrFormatLocationList  1141
    +href="glossaries-extra-manual.html#dx1-18002" >1299
    \GlsXtrForUnsetBufferedList  1142
    +class="cmti-10">1300
    \glsxtrfractionrules  1143
    +href="glossaries-extra-manual.html#dx1-41066" >1301
    \GLSxtrfull  1144
    +href="glossaries-extra-manual.html#dx1-22025" >1302
    \Glsxtrfull  1145
    +href="glossaries-extra-manual.html#dx1-22022" >1303
    \glsxtrfull  1146
    +href="glossaries-extra-manual.html#dx1-22014" >1304
    \Glsxtrfullformat  1147
    +href="glossaries-extra-manual.html#dx1-27058" >1305
    \glsxtrfullformat  1148
    +href="glossaries-extra-manual.html#dx1-27054" >1306
    \GLSxtrfullpl  1149
    +href="glossaries-extra-manual.html#dx1-22034" >1307
    \Glsxtrfullpl  1150
    +href="glossaries-extra-manual.html#dx1-22033" >1308
    \glsxtrfullpl  1151
    +href="glossaries-extra-manual.html#dx1-22032" >1309
    \Glsxtrfullplformat  1152
    +href="glossaries-extra-manual.html#dx1-27066" >1310
    \glsxtrfullplformat  1153
    +href="glossaries-extra-manual.html#dx1-27062" >1311
    \glsxtrfullsep  1154
    +href="glossaries-extra-manual.html#dx1-24078" >1312
    \glsxtrGeneralLatinIIIrules  1155
    +href="glossaries-extra-manual.html#dx1-41069" >1313
    \glsxtrGeneralLatinIIrules  1156
    +href="glossaries-extra-manual.html#dx1-41068" >1314
    \glsxtrGeneralLatinIrules  1157
    +href="glossaries-extra-manual.html#dx1-41067" >1315
    \glsxtrGeneralLatinIVrules  1158
    +href="glossaries-extra-manual.html#dx1-41070" >1316
    \glsxtrGeneralLatinVIIIrules  1159
    +href="glossaries-extra-manual.html#dx1-41074" >1317
    \glsxtrGeneralLatinVIIrules  1160
    +href="glossaries-extra-manual.html#dx1-41073" >1318
    \glsxtrGeneralLatinVIrules  1161
    +href="glossaries-extra-manual.html#dx1-41072" >1319
    \glsxtrGeneralLatinVrules  1162
    +href="glossaries-extra-manual.html#dx1-41071" >1320
    \glsxtrgeneralpuncIIrules  1163
    - - - +href="glossaries-extra-manual.html#dx1-41061" >1321
    \glsxtrgeneralpuncIrules  1164
    +href="glossaries-extra-manual.html#dx1-41059" >1322
    \glsxtrgeneralpuncrules  1165
    +href="glossaries-extra-manual.html#dx1-41058" >1323
    \glsxtrglossentry  1166
    +href="glossaries-extra-manual.html#dx1-47004" >1324
    + + + \glsxtrglossentryother  1167
    +href="glossaries-extra-manual.html#dx1-47016" >1325
    \glsxtrgroupfield  1168
    +href="glossaries-extra-manual.html#dx1-46014" >1326
    +\GLSXTRhiername  1327
    +\GLSxtrhiername  1328
    +\GlsXtrhiername  1329
    +\Glsxtrhiername  1330
    +\glsxtrhiername  1331
    +\glsxtrhiernamesep  1332
    \glsxtrhyphenrules  1169
    +href="glossaries-extra-manual.html#dx1-41057" >1333
    \glsxtrhyphensuffix  1170
    +href="glossaries-extra-manual.html#dx1-24069" >1334
    +\glsxtridentifyglslike  1335
    \glsxtrifcounttrigger  1171
    +href="glossaries-extra-manual.html#dx1-31021" >1336
    \glsxtrifcustomdiscardperiod  1172
    +class="cmti-10">1337
    \GlsXtrIfFieldCmpStr  1173
    +href="glossaries-extra-manual.html#dx1-45035" >1338
    \GlsXtrIfFieldEqNum  1174
    +href="glossaries-extra-manual.html#dx1-45040" >1339
    \GlsXtrIfFieldEqStr  1175
    +href="glossaries-extra-manual.html#dx1-45034" >1340
    \GlsXtrIfFieldEqXpStr  1176
    +href="glossaries-extra-manual.html#dx1-45037" >1341
    \GlsXtrIfFieldNonZero  1177
    +href="glossaries-extra-manual.html#dx1-45039" >1342
    \GlsXtrIfFieldUndef  1178
    +href="glossaries-extra-manual.html#dx1-45033" >1343
    \glsxtrifhasfield  1179
    +href="glossaries-extra-manual.html#dx1-45029" >1344
    \glsxtrifhasfield*  1180
    +href="glossaries-extra-manual.html#dx1-45031" >1345
    \GlsXtrIfHasNonZeroChildCount  1181
    +href="glossaries-extra-manual.html#dx1-41005" >1346
    +\glsxtrifinlabelprefixlist  1347
    \glsxtrifkeydefined  1182
    +href="glossaries-extra-manual.html#dx1-45010" >1348
    \glsxtriflabelinlist  1183
    +href="glossaries-extra-manual.html#dx1-46043" >1349
    \GlsXtrIfLinkCounterDef  1184
    +href="glossaries-extra-manual.html#dx1-32008" >1350
    \glsxtrifrecordtrigger  1185
    +href="glossaries-extra-manual.html#dx1-43022" >1351
    \GlsXtrIfUnusedOrUndefined  1186
    +class="cmti-10">1352
    \glsxtrifwasfirstuse  1187
    +class="cmti-10">1353
    \GlsXtrIfXpFieldEqXpStr  1188
    +href="glossaries-extra-manual.html#dx1-45038" >1354
    \glsxtrinclinkcounter  1189
    +href="glossaries-extra-manual.html#dx1-32005" >1355
    \glsxtrindexaliased  1190
    +href="glossaries-extra-manual.html#dx1-48019" >1356
    \GlsXtrIndexCounterLink  1191
    +href="glossaries-extra-manual.html#dx1-38020" >1357
    \glsxtrindexseealso  1192
    +href="glossaries-extra-manual.html#dx1-7067" >1358
    \glsxtrinitwrgloss  1193
    +href="glossaries-extra-manual.html#dx1-6013" >1359
    \Glsxtrinlinefullformat  1194
    +href="glossaries-extra-manual.html#dx1-27073" >1360
    \glsxtrinlinefullformat  1195
    +href="glossaries-extra-manual.html#dx1-27070" >1361
    \Glsxtrinlinefullplformat  1196
    +href="glossaries-extra-manual.html#dx1-27080" >1362
    \glsxtrinlinefullplformat  1197
    +href="glossaries-extra-manual.html#dx1-27077" >1363
    \glsxtrinsertinsidetrue  1198
    +href="glossaries-extra-manual.html#dx1-24076" >1364
    \glsxtrLatinA  1199
    +href="glossaries-extra-manual.html#dx1-41075" >1365
    \glsxtrLatinAA  1200
    +href="glossaries-extra-manual.html#dx1-41099" >1366
    \glsxtrLatinAELigature  1201
    +href="glossaries-extra-manual.html#dx1-41092" >1367
    \glsxtrLatinE  1202
    +href="glossaries-extra-manual.html#dx1-41076" >1368
    \glsxtrLatinEszettSs  1203
    +href="glossaries-extra-manual.html#dx1-41088" >1369
    \glsxtrLatinEszettSz  1204
    +href="glossaries-extra-manual.html#dx1-41089" >1370
    + + + \glsxtrLatinEth  1205
    +href="glossaries-extra-manual.html#dx1-41090" >1371
    \glsxtrLatinH  1206
    +href="glossaries-extra-manual.html#dx1-41077" >1372
    \glsxtrLatinI  1207
    +href="glossaries-extra-manual.html#dx1-41079" >1373
    \glsxtrLatinInsularG  1208
    +href="glossaries-extra-manual.html#dx1-41097" >1374
    \glsxtrLatinK  1209
    - - - +href="glossaries-extra-manual.html#dx1-41078" >1375
    \glsxtrLatinL  1210
    +href="glossaries-extra-manual.html#dx1-41080" >1376
    \glsxtrLatinLslash  1211
    +href="glossaries-extra-manual.html#dx1-41095" >1377
    \glsxtrLatinM  1212
    +href="glossaries-extra-manual.html#dx1-41081" >1378
    \glsxtrLatinN  1213
    +href="glossaries-extra-manual.html#dx1-41082" >1379
    \glsxtrLatinO  1214
    +href="glossaries-extra-manual.html#dx1-41083" >1380
    \glsxtrLatinOELigature  1215
    +href="glossaries-extra-manual.html#dx1-41093" >1381
    \glsxtrLatinOslash  1216
    +href="glossaries-extra-manual.html#dx1-41094" >1382
    \glsxtrLatinP  1217
    +href="glossaries-extra-manual.html#dx1-41084" >1383
    \glsxtrLatinS  1218
    +href="glossaries-extra-manual.html#dx1-41085" >1384
    \glsxtrLatinSchwa  1219
    +href="glossaries-extra-manual.html#dx1-41098" >1385
    \glsxtrLatinT  1220
    +href="glossaries-extra-manual.html#dx1-41086" >1386
    \glsxtrLatinThorn  1221
    +href="glossaries-extra-manual.html#dx1-41091" >1387
    \glsxtrLatinWynn  1222
    +href="glossaries-extra-manual.html#dx1-41096" >1388
    \glsxtrLatinX  1223
    +href="glossaries-extra-manual.html#dx1-41087" >1389
    \GlsXtrLetField  1224
    +href="glossaries-extra-manual.html#dx1-45025" >1390
    \GlsXtrLetFieldToField  1225
    +href="glossaries-extra-manual.html#dx1-45027" >1391
    \GlsXtrLinkCounterName  1226
    +href="glossaries-extra-manual.html#dx1-32009" >1392
    \GlsXtrLinkCounterValue  1227
    +href="glossaries-extra-manual.html#dx1-32006" >1393
    \GlsXtrLoadResources  1228
    +href="glossaries-extra-manual.html#dx1-35029" >1394
    \glsxtrlocalsetgrouptitle  1229
    +href="glossaries-extra-manual.html#dx1-16007" >1395
    +\GlsXtrLocationField  1396
    \GlsXtrLocationRecordCount  1230
    +href="glossaries-extra-manual.html#dx1-43012" >1397
    \glsxtrlocrangefmt  1231
    +class="cmti-10">1398
    \Glsxtrlong  1232, 1233
    +href="glossaries-extra-manual.html#dx1-22021" >1399, 1400
    \glsxtrlong  1234
    +href="glossaries-extra-manual.html#dx1-22012" >1401
    \glsxtrlonghyphen  1235
    +href="glossaries-extra-manual.html#dx1-26232" >1402
    \glsxtrlonghyphenshort  1236
    +href="glossaries-extra-manual.html#dx1-26213" >1403
    \glsxtrlongnoshortdescname  1237
    +href="glossaries-extra-manual.html#dx1-25062" >1404
    \glsxtrlongnoshortname  1238
    +href="glossaries-extra-manual.html#dx1-25088" >1405
    \GLSxtrlongpl  1239
    +href="glossaries-extra-manual.html#dx1-22031" >1406
    \Glsxtrlongpl  1240
    +href="glossaries-extra-manual.html#dx1-22030" >1407
    \glsxtrlongpl  1241
    +href="glossaries-extra-manual.html#dx1-22029" >1408
    \glsxtrlongshortdescname  1242
    +href="glossaries-extra-manual.html#dx1-26061" >1409
    \glsxtrlongshortdescsort  1243
    +href="glossaries-extra-manual.html#dx1-26058" >1410
    \glsxtrlongshortname  1244
    +href="glossaries-extra-manual.html#dx1-26006" >1411
    \glsxtrlongshortuserdescname  1245
    +href="glossaries-extra-manual.html#dx1-26082" >1412
    \glsxtrMathGreekIIrules  1246
    +href="glossaries-extra-manual.html#dx1-41107" >1413
    \glsxtrMathGreekIrules  1247
    +href="glossaries-extra-manual.html#dx1-41100" >1414
    \glsxtrMathItalicGreekIIrules  1248
    +href="glossaries-extra-manual.html#dx1-41123" >1415
    \glsxtrMathItalicGreekIrules  1249
    +href="glossaries-extra-manual.html#dx1-41116" >1416
    \glsxtrMathItalicLowerGreekIIrules  1250
    +href="glossaries-extra-manual.html#dx1-41137" >1417
    + + + \glsxtrMathItalicLowerGreekIrules  1251
    +href="glossaries-extra-manual.html#dx1-41133" >1418
    \glsxtrMathItalicNabla  1252
    +href="glossaries-extra-manual.html#dx1-41141" >1419
    \glsxtrMathItalicPartial  1253
    +href="glossaries-extra-manual.html#dx1-41140" >1420
    \glsxtrMathItalicUpperGreekIIrules  1254
    +href="glossaries-extra-manual.html#dx1-41130" >1421
    \glsxtrMathItalicUpperGreekIrules  1255
    +href="glossaries-extra-manual.html#dx1-41126" >1422
    \glsxtrMathUpGreekIIrules  1256
    - - - +href="glossaries-extra-manual.html#dx1-41113" >1423
    \glsxtrMathUpGreekIrules  1257
    +href="glossaries-extra-manual.html#dx1-41108" >1424
    \glsxtrmultisupplocation  1258
    +href="glossaries-extra-manual.html#dx1-39005" >1425
    +\glsxtrnameloclink  1426
    +\glsxtrnamereflink  1427
    \glsxtrnewgls  1259
    +href="glossaries-extra-manual.html#dx1-42006" >1428
    \glsxtrnewGLSlike  1260
    +href="glossaries-extra-manual.html#dx1-42008" >1429
    \glsxtrnewglslike  1261
    +href="glossaries-extra-manual.html#dx1-42007" >1430
    \glsxtrnewnumber  1262
    +href="glossaries-extra-manual.html#dx1-4222" >1431
    \glsxtrnewrgls  1263
    +href="glossaries-extra-manual.html#dx1-42009" >1432
    \glsxtrnewrGLSlike  1264
    +href="glossaries-extra-manual.html#dx1-42011" >1433
    \glsxtrnewrglslike  1265
    +href="glossaries-extra-manual.html#dx1-42010" >1434
    \glsxtrnewsymbol  1266
    +href="glossaries-extra-manual.html#dx1-4219" >1435
    \GlsXtrNoGlsWarningAutoMake  1267
    +href="glossaries-extra-manual.html#dx1-53021" >1436
    \GlsXtrNoGlsWarningBuildInfo  1268
    +href="glossaries-extra-manual.html#dx1-53020" >1437
    \GlsXtrNoGlsWarningCheckFile  1269
    +href="glossaries-extra-manual.html#dx1-53016" >1438
    \GlsXtrNoGlsWarningEmptyMain  1270
    +href="glossaries-extra-manual.html#dx1-53014" >1439
    \GlsXtrNoGlsWarningEmptyNotMain  1271
    +href="glossaries-extra-manual.html#dx1-53015" >1440
    \GlsXtrNoGlsWarningEmptyStart  1272
    +href="glossaries-extra-manual.html#dx1-53013" >1441
    \GlsXtrNoGlsWarningHead  1273
    +href="glossaries-extra-manual.html#dx1-53012" >1442
    \GlsXtrNoGlsWarningMisMatch  1274
    +href="glossaries-extra-manual.html#dx1-53017" >1443
    \GlsXtrNoGlsWarningNoOut  1275
    +href="glossaries-extra-manual.html#dx1-53018" >1444
    \GlsXtrNoGlsWarningTail  1276
    +href="glossaries-extra-manual.html#dx1-53019" >1445
    \glsxtrnonprintablerules  1277
    +href="glossaries-extra-manual.html#dx1-41049" >1446
    \glsxtrnopostpunc  1278
    +class="cmti-10">1447
    \glsxtronlydescname  1279
    +href="glossaries-extra-manual.html#dx1-26027" >1448
    \glsxtronlyname  1280
    +href="glossaries-extra-manual.html#dx1-26023" >1449
    \glsxtronlysuffix  1281
    +href="glossaries-extra-manual.html#dx1-24075" >1450
    \glsxtrorglong  1282
    +href="glossaries-extra-manual.html#dx1-27034" >1451
    \glsxtrorgshort  1283
    +href="glossaries-extra-manual.html#dx1-27033" >1452
    +\GLSxtrp  1453
    \Glsxtrp  1284, 1285
    +class="cmti-10">1454
    \glsxtrp  1286
    +class="cmti-10">1455
    \glsxtrpageref  1287
    +href="glossaries-extra-manual.html#dx1-44004" >1456
    \glsxtrparen  1288
    +href="glossaries-extra-manual.html#dx1-24026" >1457
    \Glsxtrpl  1289
    +href="glossaries-extra-manual.html#dx1-34015" >1458
    \glsxtrpl  1290
    +href="glossaries-extra-manual.html#dx1-34013" >1459
    \glsxtrpostdescription  1291
    +href="glossaries-extra-manual.html#dx1-17019" >1460
    \glsxtrposthyphenlong  1292
    +href="glossaries-extra-manual.html#dx1-26245" >1461
    \glsxtrposthyphenshort  1293
    +href="glossaries-extra-manual.html#dx1-26230" >1462
    \glsxtrpostlink  1294
    +class="cmti-10">1463
    + + + \glsxtrpostlinkAddDescOnFirstUse  1295
    +class="cmti-10">1464
    \glsxtrpostlinkAddSymbolDescOnFirstUse  1296
    +class="cmti-10">1465
    \glsxtrpostlinkAddSymbolOnFirstUse  1297
    +class="cmti-10">1466
    \glsxtrpostlinkendsentence  1298
    +class="cmti-10">1467
    \glsxtrpostlinkhook  1299
    +class="cmti-10">1468
    \glsxtrpostlongdescription  1300
    +href="glossaries-extra-manual.html#dx1-5036" >1469
    \glsxtrpostnamehook  1301
    +href="glossaries-extra-manual.html#dx1-17013" >1470
    \GlsXtrPostNewAbbreviation  1302
    +href="glossaries-extra-manual.html#dx1-27019" >1471
    \glsxtrprelocation  1303
    - - - +href="glossaries-extra-manual.html#dx1-19017" >1472
    +\glsxtrprependlabelprefix  1473
    \GlsXtrProvideBibTeXFields  1304
    +href="glossaries-extra-manual.html#dx1-41011" >1474
    \glsxtrprovidecommand  1305
    +href="glossaries-extra-manual.html#dx1-38011" >1475
    \glsxtrprovidestoragekey  1306
    +href="glossaries-extra-manual.html#dx1-45009" >1476
    \GlsXtrRecordCount  1307
    +href="glossaries-extra-manual.html#dx1-43011" >1477
    \GlsXtrRecordCounter  1308
    +href="glossaries-extra-manual.html#dx1-45071" >1478
    \glsxtrrecordtriggervalue  1309
    +href="glossaries-extra-manual.html#dx1-43024" >1479
    \glsxtrregularfont  1310
    +class="cmti-10">1480
    \glsxtrresourcefile  1311
    +href="glossaries-extra-manual.html#dx1-35028" >1481
    \glsxtrresourceinit  1312
    +href="glossaries-extra-manual.html#dx1-42005" >1482
    \glsxtrrestorepostpunc  1313
    +class="cmti-10">1483
    \glsxtrRevertMarks  1314
    +href="glossaries-extra-manual.html#dx1-28012" >1484
    \glsxtrRevertTocMarks  1315
    +href="glossaries-extra-manual.html#dx1-28013" >1485
    \glsxtrscsuffix  1316
    +href="glossaries-extra-manual.html#dx1-24040" >1486
    \glsxtrseealsolabels  1317
    +href="glossaries-extra-manual.html#dx1-7061" >1487
    \glsxtrseelist  1318
    +href="glossaries-extra-manual.html#dx1-7065" >1488
    \GlsXtrSetActualChar  1319
    +href="glossaries-extra-manual.html#dx1-33050" >1489
    \glsxtrsetaliasnoindex  1320
    +href="glossaries-extra-manual.html#dx1-48016" >1490
    \GlsXtrSetAltModifier  1321
    +class="cmti-10">1491
    \glsxtrsetcategory  1322
    +href="glossaries-extra-manual.html#dx1-29186" >1492
    \glsxtrsetcategoryforall  1323
    +href="glossaries-extra-manual.html#dx1-29188" >1493
    \GlsXtrSetDefaultGlsOpts  1324
    +class="cmti-10">1494
    \GlsXtrSetEncapChar  1325
    +href="glossaries-extra-manual.html#dx1-33053" >1495
    \GlsXtrSetEscChar  1326
    +href="glossaries-extra-manual.html#dx1-33052" >1496
    \GlsXtrSetField  1327
    +href="glossaries-extra-manual.html#dx1-45014" >1497
    \glsxtrsetfieldifexists  1328
    +href="glossaries-extra-manual.html#dx1-45015" >1498
    \glsxtrsetgrouptitle  1329
    +href="glossaries-extra-manual.html#dx1-16006" >1499
    \GlsXtrSetLevelChar  1330
    +href="glossaries-extra-manual.html#dx1-33051" >1500
    \glsxtrsetpopts  1331
    +class="cmti-10">1501
    \GlsXtrSetRecordCountAttribute  1332
    +href="glossaries-extra-manual.html#dx1-43020" >1502
    +\glsxtrSetWidest  1503
    +\glsxtrSetWidestFallback  1504
    \Glsxtrshort  1333, 1334
    +href="glossaries-extra-manual.html#dx1-22020" >1505, 1506
    \glsxtrshort  1335
    +href="glossaries-extra-manual.html#dx1-22010" >1507
    \glsxtrshortdescname  1336
    +href="glossaries-extra-manual.html#dx1-25036" >1508
    \glsxtrshorthyphenlong  1337
    +href="glossaries-extra-manual.html#dx1-26238" >1509
    \glsxtrshortlongdescname  1338
    +href="glossaries-extra-manual.html#dx1-26126" >1510
    + + + \glsxtrshortlongname  1339, 1340
    +href="glossaries-extra-manual.html#dx1-26099" >1511, 1512
    \glsxtrshortlonguserdescname  1341
    +href="glossaries-extra-manual.html#dx1-26144" >1513
    \glsxtrshortnolongname  1342
    +href="glossaries-extra-manual.html#dx1-25005" >1514
    \GLSxtrshortpl  1343
    +href="glossaries-extra-manual.html#dx1-22028" >1515
    \Glsxtrshortpl  1344
    +href="glossaries-extra-manual.html#dx1-22027" >1516
    \glsxtrshortpl  1345
    +href="glossaries-extra-manual.html#dx1-22026" >1517
    \glsxtrsmsuffix  1346
    +href="glossaries-extra-manual.html#dx1-24050" >1518
    \glsxtrspacerules  1347
    +href="glossaries-extra-manual.html#dx1-41048" >1519
    +\GlsXtrStandaloneEntryName  1520
    +\GlsXtrStandaloneEntryOther  1521
    \GlsXtrStandaloneGlossaryType  1348
    +href="glossaries-extra-manual.html#dx1-47005" >1522
    \GlsXtrStartUnsetBuffering  1349
    +class="cmti-10">1523
    \GlsXtrStopUnsetBuffering  1350
    +class="cmti-10">1524
    \glsxtrSubScriptDigitrules  1351
    - - - +href="glossaries-extra-manual.html#dx1-41064" >1525
    \Glsxtrsubsequentfmt  1352
    +href="glossaries-extra-manual.html#dx1-27083" >1526
    \glsxtrsubsequentfmt  1353
    +href="glossaries-extra-manual.html#dx1-27082" >1527
    \Glsxtrsubsequentplfmt  1354
    +href="glossaries-extra-manual.html#dx1-27085" >1528
    \glsxtrsubsequentplfmt  1355
    +href="glossaries-extra-manual.html#dx1-27084" >1529
    \glsxtrSuperScriptDigitrules  1356
    +href="glossaries-extra-manual.html#dx1-41065" >1530
    \glsxtrtagfont  1357
    +href="glossaries-extra-manual.html#dx1-21003" >1531
    \GlsXtrTheLinkCounter  1358
    +href="glossaries-extra-manual.html#dx1-32007" >1532
    \GlsXtrTotalRecordCount  1359
    +href="glossaries-extra-manual.html#dx1-43010" >1533
    \glsxtrunsrtdo  1360
    +href="glossaries-extra-manual.html#dx1-46033" >1534
    \GlsXtrUseAbbrStyleFmts  1361
    +href="glossaries-extra-manual.html#dx1-27089" >1535
    \GlsXtrUseAbbrStyleSetup  1362
    +href="glossaries-extra-manual.html#dx1-27040" >1536
    +\GLSxtrusefield  1537
    \Glsxtrusefield  1363
    +href="glossaries-extra-manual.html#dx1-45044" >1538
    \glsxtrusefield  1364
    +href="glossaries-extra-manual.html#dx1-45042" >1539
    \glsxtruserfield  1365
    +href="glossaries-extra-manual.html#dx1-26033" >1540
    \glsxtruserparen  1366
    +href="glossaries-extra-manual.html#dx1-26036" >1541
    \glsxtrusersuffix  1367, 1368
    +href="glossaries-extra-manual.html#dx1-24064" >1542, 1543
    \glsxtrusesee  1369
    +class="cmti-10">1544
    \glsxtruseseealso  1370
    +href="glossaries-extra-manual.html#dx1-7058" >1545
    \glsxtruseseeformat  1371, 1372
    +class="cmti-10">1546, 1547
    \GlsXtrWarnDeprecatedAbbrStyle  1373
    +href="glossaries-extra-manual.html#dx1-24103" >1548
    \GlsXtrWarning  1374
    +href="glossaries-extra-manual.html#dx1-34011" >1549
    \glsxtrword  1375
    +href="glossaries-extra-manual.html#dx1-29057" >1550
    \glsxtrwordsep  1376
    +href="glossaries-extra-manual.html#dx1-29056" >1551
    \glsxtrwrglossmark  1377
    +class="cmti-10">1552

    H hyperref package  1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400
    +href="glossaries-extra-manual.html#dx1-4097" >1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577

    I \ifglsxtrinitwrglossbefore  1401
    +href="glossaries-extra-manual.html#dx1-6014" >1578
    + + + inputenc package  1402
    +href="glossaries-extra-manual.html#dx1-37019" >1579

    L link-text  1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422
    +href="glossaries-extra-manual.html#dx1-8001" >1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599
    location list  1423, 1424, 1425, 1426, 1427
    +href="glossaries-extra-manual.html#dx1-8078" >1600, 1601, 1602, 1603, 1604
    \longnewglossaryentry  1428
    +href="glossaries-extra-manual.html#dx1-5034" >1605

    M makeglossaries  1429, 1430, 1431, 1432, 1433
    +href="glossaries-extra-manual.html#dx1-3027" >1606, 1607, 1608, 1609, 1610
    \makeglossaries  1434
    +href="glossaries-extra-manual.html#dx1-5051" >1611
    makeglossaries-lite  1435, 1436
    +href="glossaries-extra-manual.html#dx1-5057" >1612, 1613
    makeglossaries-lite  1437, 1438
    - - - +href="glossaries-extra-manual.html#dx1-5058" >1614, 1615
    makeindex  1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457
    +href="glossaries-extra-manual.html#dx1-3022" >1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635
    makeindex  1458, 1459, 1460, 1461
    +href="glossaries-extra-manual.html#dx1-6044" >1636, 1637, 1638, 1639, 1640
    memoir class  1462
    +href="glossaries-extra-manual.html#dx1-3021" >1641
    mfirstuc package  1463, 1464, 1465
    +href="glossaries-extra-manual.html#dx1-5" >1642, 1643, 1644

    N \newabbreviation  1466
    +href="glossaries-extra-manual.html#dx1-20002" >1645
    \newabbreviationstyle  1467
    +href="glossaries-extra-manual.html#dx1-27001" >1646
    \newacronym  1468
    +href="glossaries-extra-manual.html#dx1-20011" >1647
    \newglossaryentry options
        access  1469, 1470
    +href="glossaries-extra-manual.html#dx1-29088" >1648, 1649
        alias  1471, 1472, 1473, 1474, 1475, 1476
    +href="glossaries-extra-manual.html#dx1-5026" >1650, 1651, 1652, 1653, 1654, 1655
        category  1477, 1478, 1479, 1480, 1481, 1482
    +href="glossaries-extra-manual.html#dx1-5025" >1656, 1657, 1658, 1659, 1660, 1661
        counter  1483
    +href="glossaries-extra-manual.html#dx1-6035" >1662
        desc  1484, 1485
    +href="glossaries-extra-manual.html#dx1-51038" >1663, 1664
        descplural  1486, 1487
    +href="glossaries-extra-manual.html#dx1-51042" >1665, 1666
        description  1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509
    +href="glossaries-extra-manual.html#dx1-5002" >1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688
        descriptionplural  1510, 1511, 1512, 1513
    +href="glossaries-extra-manual.html#dx1-5035" >1689, 1690, 1691, 1692
        first  1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526
    +href="glossaries-extra-manual.html#dx1-8013" >1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705
        firstaccess  1527
    +href="glossaries-extra-manual.html#dx1-29098" >1706
        firstplural  1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537
    +href="glossaries-extra-manual.html#dx1-8014" >1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716
        group  1538, 1539, 1540, 1541, 1542
    +href="glossaries-extra-manual.html#dx1-37018" >1717, 1718, 1719, 1720, 1721
        location  1543, 1544
    +href="glossaries-extra-manual.html#dx1-14026" >1722, 1723, 1724, 1725
        loclist  1545
    +href="glossaries-extra-manual.html#dx1-40019" >1726, 1727, 1728, 1729
        long  1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554
    +href="glossaries-extra-manual.html#dx1-11026" >1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738
        longplural  1555, 1556, 1557, 1558, 1559, 1560
    +href="glossaries-extra-manual.html#dx1-11010" >1739, 1740, 1741, 1742, 1743, 1744
        name  1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612
    +href="glossaries-extra-manual.html#dx1-5007" >1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797
    + + +     nameshortaccess  1613, 1614
    +href="glossaries-extra-manual.html#dx1-29094" >1798, 1799
        parent  1615, 1616, 1617
    +href="glossaries-extra-manual.html#dx1-19077" >1800, 1801, 1802
        plural  1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630
    +href="glossaries-extra-manual.html#dx1-8017" >1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815
        prefix  1631
    +href="glossaries-extra-manual.html#dx1-5023" >1816
        see  1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658
    +href="glossaries-extra-manual.html#dx1-4056" >1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843
        seealso  1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668
    +href="glossaries-extra-manual.html#dx1-4057" >1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853
        short  1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683
    +href="glossaries-extra-manual.html#dx1-7041" >1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869
        shortaccess  1684, 1685, 1686, 1687, 1688, 1689
    +href="glossaries-extra-manual.html#dx1-29084" >1870, 1871, 1872, 1873, 1874, 1875
        shortplural  1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704
    +href="glossaries-extra-manual.html#dx1-11011" >1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890
        shortpluralaccess  1705, 1706, 1707, 1708
    +href="glossaries-extra-manual.html#dx1-29101" >1891, 1892, 1893, 1894
        sort  1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728
    +href="glossaries-extra-manual.html#dx1-4190" >1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914
        symbol  1729, 1730, 1731, 1732
    +href="glossaries-extra-manual.html#dx1-45032" >1915, 1916, 1917, 1918
        symbolplural  1733, 1734
    - - - +href="glossaries-extra-manual.html#dx1-51034" >1919, 1920
        text  1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747
    +href="glossaries-extra-manual.html#dx1-5009" >1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934
        textaccess  1748
    +href="glossaries-extra-manual.html#dx1-29095" >1935
        type  1749, 1750, 1751, 1752
    +href="glossaries-extra-manual.html#dx1-13046" >1936, 1937, 1938, 1939
        user1  1753, 1754, 1755
    +href="glossaries-extra-manual.html#dx1-24080" >1940, 1941, 1942
    number list  1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789
    +href="glossaries-extra-manual.html#dx1-4028" >1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976

    P package options:
        abbreviations  1790, 1791, 1792, 1793, 1794
    +href="glossaries-extra-manual.html#dx1-4205" >1977, 1978, 1979, 1980, 1981
        accsupp  1795, 1796, 1797, 1798, 1799
    +href="glossaries-extra-manual.html#dx1-4035" >1982, 1983, 1984, 1985, 1986
        acronym  1800
    +href="glossaries-extra-manual.html#dx1-4213" >1987
        acronymlists  1801
    +href="glossaries-extra-manual.html#dx1-4217" >1988
        automake  1802, 1803
    +href="glossaries-extra-manual.html#dx1-5059" >1989, 1990
        autoseeindex  1804, 1805
    +href="glossaries-extra-manual.html#dx1-4066" >1991, 1992
            false  1806, 1807
    +href="glossaries-extra-manual.html#dx1-4058" >1993, 1994
        counter
            chapter  1995
    +        equation  1996
    +        section  1997
    +        wrglossary  1808
    +href="glossaries-extra-manual.html#dx1-4141" >1998
        debug  1809
    +href="glossaries-extra-manual.html#dx1-4002" >1999
            all  1810, 1811
    +href="glossaries-extra-manual.html#dx1-4005" >2000, 2001
            showtargets  1812, 1813
    +href="glossaries-extra-manual.html#dx1-4003" >2002, 2003
            showwrgloss  1814, 1815, 1816
    +href="glossaries-extra-manual.html#dx1-4004" >2004, 2005, 2006
            true  1817
    +href="glossaries-extra-manual.html#dx1-4007" >2007
        docdef  1818, 1819, 1820, 1821
    +href="glossaries-extra-manual.html#dx1-4170" >2008, 2009, 2010, 2011
            restricted  1822, 1823, 1824, 1825
    +href="glossaries-extra-manual.html#dx1-4183" >2012, 2013, 2014, 2015
            true  1826, 1827
    +href="glossaries-extra-manual.html#dx1-4201" >2016, 2017
        docdefs  1828, 1829, 1830
    +href="glossaries-extra-manual.html#dx1-34003" >2018, 2019, 2020
    + + +         true  1831
    +href="glossaries-extra-manual.html#dx1-4182" >2021
        entrycounter  1832, 1833
    +href="glossaries-extra-manual.html#dx1-44002" >2022, 2023
    +    equations  2024, 2025
    +        true  2026
    +    floats  2027
        hyperfirst
            false  1834
    +href="glossaries-extra-manual.html#dx1-29030" >2028
        index  1835, 1836
    +href="glossaries-extra-manual.html#dx1-5048" >2029, 2030
        indexcounter  1837, 1838, 1839
    +href="glossaries-extra-manual.html#dx1-4098" >2031, 2032, 2033, 2034
        indexcrossrefs  1840, 1841, 1842, 1843
    +href="glossaries-extra-manual.html#dx1-4055" >2035, 2036, 2037, 2038
            false  1844
    +href="glossaries-extra-manual.html#dx1-4065" >2039
        indexonlyfirst  1845, 1846, 1847, 1848
    +href="glossaries-extra-manual.html#dx1-6004" >2040, 2041, 2042, 2043
    +    makeindex  2044
        nogroupskip  1849
    +href="glossaries-extra-manual.html#dx1-19014" >2045
        nomain  1850
    +href="glossaries-extra-manual.html#dx1-3032" >2046
        nomissingglstext  1851
    +href="glossaries-extra-manual.html#dx1-4204" >2047
        nonumberlist  1852, 1853, 1854, 1855
    +href="glossaries-extra-manual.html#dx1-7048" >2048, 2049, 2050, 2051, 2052
        nopostdot  1856, 1857, 1858, 1859
    +href="glossaries-extra-manual.html#dx1-4023" >2053, 2054, 2055, 2056
            false  1860, 1861, 1862
    +href="glossaries-extra-manual.html#dx1-3004" >2057, 2058, 2059
            true  1863
    +href="glossaries-extra-manual.html#dx1-3003" >2060
        noredefwarn
            false  1864
    - - - +href="glossaries-extra-manual.html#dx1-3009" >2061
            true  1865
    +href="glossaries-extra-manual.html#dx1-3006" >2062
        notree  1866
    +href="glossaries-extra-manual.html#dx1-19057" >2063
        numbers  1867, 1868, 1869
    +href="glossaries-extra-manual.html#dx1-4221" >2064, 2065, 2066
        postdot  1870, 1871, 1872
    +href="glossaries-extra-manual.html#dx1-3005" >2067, 2068, 2069
        postpunc  1873, 1874, 1875
    +href="glossaries-extra-manual.html#dx1-4019" >2070, 2071, 2072
            comma  1876
    +href="glossaries-extra-manual.html#dx1-4020" >2073
            dot  1877
    +href="glossaries-extra-manual.html#dx1-4021" >2074
            none  1878
    +href="glossaries-extra-manual.html#dx1-4022" >2075
        record  1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891
    +href="glossaries-extra-manual.html#dx1-4064" >2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088
            alsoindex  1892, 1893, 1894, 1895, 1896, 1897, 1898
    +href="glossaries-extra-manual.html#dx1-4009" >2089, 2090, 2091, 2092, 2093, 2094, 2095
    +        nameref  2096, 2097
            off  1899, 1900
    +href="glossaries-extra-manual.html#dx1-5054" >2098, 2099
            only  1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910
    +href="glossaries-extra-manual.html#dx1-4069" >2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110
        section
            chapter  1911
    +href="glossaries-extra-manual.html#dx1-14043" >2111
        seeautonumberlist  1912
    +href="glossaries-extra-manual.html#dx1-7049" >2112
        seenoindex  1913
    +href="glossaries-extra-manual.html#dx1-7016" >2113
            ignore  1914, 1915
    +href="glossaries-extra-manual.html#dx1-7018" >2114, 2115
            warn  1916
    +href="glossaries-extra-manual.html#dx1-46022" >2116
        shortcuts  1917, 1918
    +href="glossaries-extra-manual.html#dx1-4223" >2117, 2118
            abbr  1919, 1920
    +href="glossaries-extra-manual.html#dx1-4229" >2119, 2120
            abbreviation  1921, 1922
    +href="glossaries-extra-manual.html#dx1-23001" >2121, 2122
            abbreviations  1923, 1924
    +href="glossaries-extra-manual.html#dx1-4228" >2123, 2124
            ac  1925, 1926, 1927, 1928, 1929, 1930
    +href="glossaries-extra-manual.html#dx1-4226" >2125, 2126, 2127, 2128, 2129, 2130
    + + +         acro  1931, 1932
    +href="glossaries-extra-manual.html#dx1-4225" >2131, 2132
            acronyms  1933, 1934
    +href="glossaries-extra-manual.html#dx1-4224" >2133, 2134
            all  1935, 1936
    +href="glossaries-extra-manual.html#dx1-4239" >2135, 2136
            false  1937
    +href="glossaries-extra-manual.html#dx1-4245" >2137
            none  1938
    +href="glossaries-extra-manual.html#dx1-4244" >2138
            other  1939, 1940
    +href="glossaries-extra-manual.html#dx1-4230" >2139, 2140
            true  1941
    +href="glossaries-extra-manual.html#dx1-4240" >2141
        sort
            none  1942, 1943
    +href="glossaries-extra-manual.html#dx1-4093" >2142, 2143
        stylemods  1944, 1945, 1946, 1947, 1948
    +href="glossaries-extra-manual.html#dx1-4044" >2144, 2145, 2146, 2147, 2148
            all  1949
    +href="glossaries-extra-manual.html#dx1-4047" >2149
            default  1950
    +href="glossaries-extra-manual.html#dx1-4046" >2150
        subentrycounter  1951, 1952
    +href="glossaries-extra-manual.html#dx1-44003" >2151, 2152
        symbols  1953, 1954, 1955
    +href="glossaries-extra-manual.html#dx1-4218" >2153, 2154, 2155
        toc
            false  1956
    +href="glossaries-extra-manual.html#dx1-3002" >2156
            true  1957
    +href="glossaries-extra-manual.html#dx1-3001" >2157
        translate
            babel  1958
    +href="glossaries-extra-manual.html#dx1-3011" >2158
            true  1959
    +href="glossaries-extra-manual.html#dx1-3013" >2159
        undefaction  1960, 1961
    +href="glossaries-extra-manual.html#dx1-4048" >2160, 2161
            error  1962, 1963, 1964
    +href="glossaries-extra-manual.html#dx1-4049" >2162, 2163, 2164
            warn  1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973
    - - - +href="glossaries-extra-manual.html#dx1-4050" >2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173
        xindy  1974, 1975
    +href="glossaries-extra-manual.html#dx1-7068" >2174, 2175
    page (counter)  1976, 1977, 1978, 1979
    +href="glossaries-extra-manual.html#dx1-4101" >2176, 2177, 2178, 2179, 2180, 2181
    polyglossia package  1980, 1981
    +href="glossaries-extra-manual.html#dx1-45069" >2182, 2183
    \pretoglossarypreamble  1982
    +href="glossaries-extra-manual.html#dx1-44011" >2184
    \printabbreviations  1983
    +href="glossaries-extra-manual.html#dx1-4206" >2185
    \printglossary options
        nogroupskip  1984
    +href="glossaries-extra-manual.html#dx1-19015" >2186
        prefix  1985
    +href="glossaries-extra-manual.html#dx1-5022" >2187
        target  1986, 1987
    +href="glossaries-extra-manual.html#dx1-5020" >2188, 2189
        targetnameprefix  1988
    +href="glossaries-extra-manual.html#dx1-5021" >2190
        title  1989
    +href="glossaries-extra-manual.html#dx1-53006" >2191
    \printnoidxglossary options
        sort  1990
    +href="glossaries-extra-manual.html#dx1-46025" >2192
    \printunsrtglossaries  1991
    +href="glossaries-extra-manual.html#dx1-46026" >2193
    \printunsrtglossary  1992
    +href="glossaries-extra-manual.html#dx1-46001" >2194
    \printunsrtglossary*  1993
    +href="glossaries-extra-manual.html#dx1-46005" >2195
    \printunsrtglossaryentryprocesshook  1994
    +href="glossaries-extra-manual.html#dx1-46029" >2196
    \printunsrtglossaryhandler  1995
    +href="glossaries-extra-manual.html#dx1-46032" >2197
    \printunsrtglossarypredoglossary  1996
    +href="glossaries-extra-manual.html#dx1-46031" >2198
    \printunsrtglossaryskipentry  1997
    +href="glossaries-extra-manual.html#dx1-46030" >2199
    \printunsrtglossaryunit  1998
    +href="glossaries-extra-manual.html#dx1-46045" >2200
    \printunsrtglossaryunitsetup  1999
    +href="glossaries-extra-manual.html#dx1-46046" >2201
    \provideignoredglossary  2000
    +href="glossaries-extra-manual.html#dx1-5017" >2202
    + + +

    R relsizes package  2001
    +href="glossaries-extra-manual.html#dx1-24048" >2203
    \RestoreAcronyms  2002
    +class="cmti-10">2204
    \rGLS  2003
    +href="glossaries-extra-manual.html#dx1-43017" >2205
    \rGls  2004
    +href="glossaries-extra-manual.html#dx1-43015" >2206
    \rgls  2005
    +href="glossaries-extra-manual.html#dx1-43013" >2207
    \rGLSformat  2006
    +href="glossaries-extra-manual.html#dx1-43034" >2208
    \rGlsformat  2007
    +href="glossaries-extra-manual.html#dx1-43032" >2209
    \rglsformat  2008
    +href="glossaries-extra-manual.html#dx1-43030" >2210
    \rGLSpl  2009
    +href="glossaries-extra-manual.html#dx1-43018" >2211
    \rGlspl  2010
    +href="glossaries-extra-manual.html#dx1-43016" >2212
    \rglspl  2011
    +href="glossaries-extra-manual.html#dx1-43014" >2213
    \rGLSplformat  2012
    +href="glossaries-extra-manual.html#dx1-43035" >2214
    \rGlsplformat  2013
    +href="glossaries-extra-manual.html#dx1-43033" >2215
    \rglsplformat  2014
    +href="glossaries-extra-manual.html#dx1-43031" >2216

    S \setabbreviationstyle  2015
    +href="glossaries-extra-manual.html#dx1-22001" >2217
    slantsc package  2016
    +href="glossaries-extra-manual.html#dx1-28021" >2218
    soul package  2017, 2018
    - - - +href="glossaries-extra-manual.html#dx1-6024" >2219, 2220
    style package  2019
    +href="glossaries-extra-manual.html#dx1-14005" >2221
    subentrycounter package  2020
    +href="glossaries-extra-manual.html#dx1-47021" >2222

    T texindy  2021
    +href="glossaries-extra-manual.html#dx1-33007" >2223
    textcase package  2022
    +href="glossaries-extra-manual.html#dx1-8" >2224
    tracklang package  2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032
    +href="glossaries-extra-manual.html#dx1-4" >2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234
    translator package  2033
    +href="glossaries-extra-manual.html#dx1-3012" >2235

    U upgreek package  2034, 2035, 2036, 2037
    +href="glossaries-extra-manual.html#dx1-41033" >2236, 2237, 2238, 2239

    W wrglossary (counter)  2038, 2039, 2040, 2041, 2042
    +href="glossaries-extra-manual.html#dx1-4142" >2240, 2241, 2242, 2243, 2244

    X xfor package  2043, 2044, 2045
    +href="glossaries-extra-manual.html#dx1-9" >2245, 2246, 2247
    \xglssetwidest  2046
    +href="glossaries-extra-manual.html#dx1-19061" >2248
    \xglsupdatewidest  2047
    +href="glossaries-extra-manual.html#dx1-19065" >2249
    + + + \xGlsXtrSetField  2048
    +href="glossaries-extra-manual.html#dx1-45024" >2250
    xindy  2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064
    +href="glossaries-extra-manual.html#dx1-3023" >2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267
    xindy  2065
    +href="glossaries-extra-manual.html#dx1-6048" >2268
    xkeyval package  2066
    +href="glossaries-extra-manual.html#dx1-7" >2269

    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.

    -

    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 + id="dx1-5045"> field and the short form was stored in the symbol field.

    -

    3.1For compatibility with earlier versions, \glsabbrvscfont \glsxtrscfont is now deprecated. Likewise for similar commands.

    -

    9.1Version 1.11 only allowed one use of \GlsXtrLoadResources per document.

    -

    9.2v1.08 assumed filename.glstex extension was enforced by version 1.11.

    -

    10.1Pre version 1.28 used \csedef#1={\protect\ttfamily#1}|main}} \DeleteShortVerb{\|} \MakeShortVerb{"} - \title{glossaries-extra.sty v1.36: + \title{glossaries-extra.sty v1.37: an extension to the glossaries package} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} - \date{2018-08-18} + \date{2018-11-30} \maketitle \begin{abstract} @@ -626,7 +626,7 @@ just does \cs{glsentrytext}) but if it has been loaded, then the information. (See \sectionref{sec:accsupp} for further details.) Note that the \pkgopt{accsupp} option can only be used as -a~package option (not through \ics{glossariesextrasetup}) since the \sty{glossaries-accsupp} +a~package option (and can't be set with \ics{glossariesextrasetup}) since the \sty{glossaries-accsupp} package must be loaded before \styfmt{glossaries-extra} if it's required. @@ -762,6 +762,25 @@ the \styfmt{glossaries} package's \pkgopt[none]{sort} option if available. (That option value was only introduced to \styfmt{glossaries} v4.30.) +\item[\pkgoptfmt{nameref}] (New to v1.37 and requires \gls{bib2gls} +v1.8+.) This option is like \pkgopt[only]{record} but additionally +records the current label information given by \cs{@currentlabel} +and \cs{@currentHref}, and provides a more reliable way of saving +the \cs{theH}\meta{counter} for the given location. This option +requires \sty{hyperref} otherwise it will fall back on the usual +location records. Remember that \cs{@currentHref} is always globally +updated whenever \cs{refstepcounter} is used, but \cs{@currentlabel} +isn't. This can cause some undesired side-effects with some settings. Remember also that the \pkgopt{indexcounter} option +increments the associated counter every time an entry is indexed, +which affects this option. See \sectionref{sec:recordnameref} for +further details. + +This option is best used with \pkgopt[chapter]{counter} or +\pkgopt[section]{counter} if you want the title included in the +location list. If the indexing counter is the default +\ctr{page}, only the location number is shown. Similarly for +\pkgopt[equation]{counter} (or \pkgopt[true]{equations}). + \item[\pkgoptfmt{alsoindex}] This is a hybrid setting that uses \gls{bib2gls} to fetch entry information from \texttt{.bib} files, but uses \gls{makeindex} or \gls{xindy} @@ -799,6 +818,34 @@ out which entries have been used. (Remember that commands like add a corresponding \cs{glsxtr@record} entry to the \texttt{.aux} file.) See \sectionref{sec:bib2gls} for further details. +\item[{\pkgoptdef{equations}}] (New to v1.37.) This option will +cause the default location counter to automatically switch +to \ctr{equation} when inside a numbered equation environment, such +as \env{equation} or \env{align}. The counter can be explicitly +overridden with \gloskey[glslink]{counter} in the optional +arguments of commands like \cs{glslink} or \cs{gls} as usual. + +\item[{\pkgoptdef{floats}}] (New to v1.37.) This option will +cause the default location counter to automatically switch +to the corresponding counter when inside a floating environment, +such as \env{figure} or \env{table}. The counter can be explicitly +overridden with \gloskey[glslink]{counter} in the optional +arguments of commands like \cs{glslink} or \cs{gls} as usual. +Remember that within floats it's the \cs{caption} command that actually uses +\cs{refstepcounter}, so indexing before the caption will result in +the wrong reference. The commands for use in captions and sections, +such as \cs{glsfmttext} and \cs{glsfmtshort}, don't index. (See +\sectionref{sec:headtitle}). You may +want to consider using \cs{glsadd} after the caption (not before). For example: +\begin{verbatim} +\begin{figure}[htbp] + \centering + \includegraphics{example-image} + \caption{Sample \glsfmttext{foobar} figure} + \glsadd{foobar} +\end{figure} +\end{verbatim} + \item[{\pkgoptdef{indexcounter}}] (New to v1.29.) This option (which doesn't take a value) is primarily intended for use with \gls{bib2gls} (v1.4+) and \sty{hyperref}. It can be used with @@ -1138,6 +1185,12 @@ If you want to restore the \styfmt{glossaries} v3.0+ definition just do: \begin{verbatim} \renewcommand*{\glsseeitemformat}[1]{\glsentrytext{#1}} \end{verbatim} +The \sty{glossaries-extra} package provides \ics{glsxtrhiername} +and its case-changing variants that may be used within +the definition of \cs{glsseeitemformat} if required. These +display the hierarchy for sub-entries rather than just the name, +which may be more helpful in cross-references. See +\sectionref{sec:see} for further details. The commands used by \styfmt{glossaries} to automatically produce an error if an entry is undefined (such as \ics{glsdoifexists}) are @@ -1295,6 +1348,47 @@ of labels: This simply iterates over \meta{list} and does \cs{glsadd}\oarg{options}\marg{label} for each entry in the list. +As from version 1.37, you can make commands like \cs{gls} or +\cs{glslink} automatically use \cs{glsadd} with specific options +when a given format is used (identified with +\texttt{format=\marg{format}} in the optional argument of the +corresponding \cs{gls}, \cs{glslink} etc). +\begin{definition}[\DescribeMacro\GlsXtrAutoAddOnFormat] +\cs{GlsXtrAutoAddOnFormat}\oarg{label}\marg{format list}\marg{glsadd options} +\end{definition} +The optional argument \meta{label} defaults to \cs{glslabel} and +indicates the label to use in \cs{glsadd} and so needs to be +expandable. The \meta{format list} is a comma-separated list +of format values that will trigger the automated adding. The +\meta{glsadd options} are the options to pass to \cs{glsadd} with +\texttt{format=\marg{format}} prepended to the list. + +For example, with: +\begin{verbatim} +\GlsXtrAutoAddOnFormat{hyperbf}{counter=chapter} +\end{verbatim} +then \verb|\gls[format=hyperbf]{sample}| will be equivalent to +\begin{verbatim} +\glsadd[format=hyperbf,counter=chapter]{sample}\gls[format=hyperbf]{sample} +\end{verbatim} +Note that the explicit range markers will prevent a match +unless you include them in \meta{format list} (in which case, be +sure to add both the start and end formats). + +Here's another example: +\begin{verbatim} +\GlsXtrAutoAddOnFormat[dual.\glslabel]{hyperbf}{} +\end{verbatim} +In this case \verb|\gls[format=hyperbf]{sample}| will now be +equivalent to: +\begin{verbatim} +\glsadd[format=hyperbf]{dual.sample}\gls[format=hyperbf]{sample} +\end{verbatim} + +\begin{important} +\cs{GlsXtrAutoAddOnFormat} is not applied to \cs{glsadd} +as it could cause an infinite loop. +\end{important} The \styfmt{glossaries-extra} package provides extra keys for commands like \cs{gls} and \cs{glstext}: \begin{description} @@ -1442,9 +1536,12 @@ mode: \renewcommand{\glsaddpresetkeys}{% \ifmmode \setkeys{glossadd}{counter=equation}\fi} \end{verbatim} -(This can be overridden with an explicit use of +In this case, the counter can be overridden with an explicit use of \gloskey{counter} in the optional argument of \cs{gls} or -\cs{glsadd}.) Alternatively, to enforce this (overriding the option +\cs{glsadd}. (As from version 1.37, a simpler method is to just use +the \pkgopt{equations} package option.) + +Alternatively, to enforce this (overriding the option argument): \begin{verbatim} \renewcommand{\glslinkpostsetkeys}{% @@ -1628,6 +1725,88 @@ list}\verb|{}|, which is how the cross-reference is displayed in the \gloskey{see} field hasn't been set for the entry given by \meta{label}. +As with the base \sty{glossaries} package, \cs{glsseeformat} +is defined to do \texttt{\cs{emph}\marg{tag} \cs{glsseelist}\marg{xr +list}}. The third argument is always ignored and is present for +\app{makeindex}, which always requires a final argument to +encapsulate the associated location. The command +\begin{definition} +\ics{glsseelist}\marg{xr list} +\end{definition} +used to iterate over the list of cross-reference labels is also +unchanged from the base \sty{glossaries} package, with each item in +the list formatted according to: +\begin{definition} +\ics{glsseeitem}\marg{label} +\end{definition} +This is defined by the \sty{glossaries} package to: +\begin{alltt} +\cs{glshyperlink}[\cs{glsseeitemformat}\marg{label}]\marg{label} +\end{alltt} +So the actual formatting for each cross-referenced entry is +performed by \ics{glsseeitemformat}, which is redefined by +\sty{glossaries-extra}, as described in +\sectionref{sec:modifications}. This now displays the value +of the \gloskey{text} field for abbreviations and the value +of the \gloskey{name} field otherwise. There's no indication +of the entry hierarchy, which could confuse the reader. Therefore, +as from \sty{glossaries-extra} v1.37, there are some new commands +that include the hierarchical information. You may prefer to +redefine \cs{glsseeitemformat} to use one of this if you have +sub-entries. For example: +\begin{verbatim} +\renewcommand*{\glsseeitemformat}[1]{\glsxtrhiername{#1}} +\end{verbatim} + +The command: +\begin{definition}[\DescribeMacro\glsxtrhiername] +\cs{glsxtrhiername}\marg{label} +\end{definition} +performs a recursive action: +\begin{enumerate} +\item If the entry given by \meta{label} has a parent, then +\cs{glsxtrhiername}\marg{parent label} is done followed by +\cs{glsxtrhiernamesep} then: +\item If the entry given by \meta{label} is an abbreviation +(that is, it has the \gloskey{short} field set) then +the short form is displayed (using \cs{glsaccessshort}) +otherwise the name is displayed (using \cs{glsaccessname}). +\end{enumerate} +The first step above is skipped if the entry doesn't have a parent. +Each level is separated by: +\begin{definition}[\DescribeMacro\glsxtrhiernamesep] +\cs{glsxtrhiernamesep} +\end{definition} +which defaults to \qt{\glsxtrhiernamesep}. This can be redefined as +appropriate. + +There are some case-changing variants: +\begin{definition}[\DescribeMacro\Glsxtrhiername] +\cs{Glsxtrhiername}\marg{label} +\end{definition} +The top-level has the first letter changed to upper case +(either \cs{Glsaccessshort} or \cs{Glsaccessname}). There's +no case-change for sub-entries. + +\begin{definition}[\DescribeMacro\GlsXtrhiername] +\cs{GlsXtrhiername}\marg{label} +\end{definition} +All levels have the first letter changed to upper case +(either \cs{Glsaccessshort} or \cs{Glsaccessname}). + +\begin{definition}[\DescribeMacro\GLSxtrhiername] +\cs{GLSxtrhiername}\marg{label} +\end{definition} +The top-level is converted to upper case +(either \cs{GLSaccessshort} or \cs{GLSaccessname}). There's +no case-change for sub-entries. + +\begin{definition}[\DescribeMacro\GLSXTRhiername] +\cs{GLSXTRhiername}\marg{label} +\end{definition} +All levels are converted to upper case +(either \cs{GLSaccessshort} or \cs{GLSaccessname}). + Suppose you want to suppress the \gls*{numberlist} using \pkgopt{nonumberlist}. This will automatically prevent the cross-references from being displayed. The @@ -1690,7 +1869,7 @@ can use commands like \cs{glsxtrfielduse}, but remember that it may start with \oarg{tag}, so it can't be automatically treated as a simple comma-separated list. -The base \styfmt{glossaries} package provides \ics{glsseelist}, +As mentioned above, the base \styfmt{glossaries} package provides \ics{glsseelist}, which requires a comma-separated list of labels as the argument. The argument isn't fully expanded, so it's not suitable to use, for example, \cs{glsxtrseealsolabels}\marg{label} as the argument. @@ -2683,7 +2862,7 @@ There are similar commands \cs{Glsxtrp}\marg{field}\marg{label} \end{definition} for first letter upper case and -\begin{definition}[\DescribeMacro\Glsxtrp] +\begin{definition}[\DescribeMacro\GLSxtrp] \cs{GLSxtrp}\marg{field}\marg{label} \end{definition} for all upper case. @@ -3180,6 +3359,497 @@ to show the first and last entry for the current page with: \rfoot{\glsxtrbookindexlastmark}% \end{verbatim} +\section{\styfmt{glossary-longextra} package} +\label{sec:longextra} + +As from version 1.37, the \styfmt{glossaries-extra} package comes +with the supplementary package \sty{glossary-longextra} that +provides additional styles, listed below, that use the +\env{longtable} environment. If you know that your glossary won't +span more than a page and you need to use it in a context that's +incompatible with \env{longtable}, you can instead setup these styles +to use \env{tabular} instead. In order to do this you must use +\begin{definition}[\DescribeMacro\GlsLongExtraUseTabulartrue] +\cs{GlsLongExtraUseTabulartrue} +\end{definition} +\emph{before the style is set}. For example: +\begin{verbatim} +\GlsLongExtraUseTabulartrue +\setglossarystyle{long-name-desc} +\end{verbatim} +or +\begin{verbatim} +\GlsLongExtraUseTabulartrue +\printunsrtglossary[style={long-name-desc}] +\end{verbatim} +If you use this setting, you can change the default vertical +alignment with: +\begin{definition}[\DescribeMacro\glslongextraTabularVAlign] +\cs{glslongextraTabularVAlign} +\end{definition} +The default definition is \texttt{c}. + +The column titles are formatted according to: +\begin{definition}[\DescribeMacro\glslongextraHeaderFmt] +\cs{glslongextraHeaderFmt}\marg{text} +\end{definition} +which simply does \cs{textbf}\marg{text} by default. + +The name column has the title given by \ics{entryname} and +the column alignment is given by: +\begin{definition}[\DescribeMacro\glslongextraNameAlign] +\cs{glslongextraNameAlign} +\end{definition} +which expands to \texttt{l} (left) by default. + +The symbol column (where applicable) has the title given by +\ics{symbolname} and the column alignment is given by: +\begin{definition}[\DescribeMacro\glslongextraSymbolAlign] +\cs{glslongextraSymbolAlign} +\end{definition} +which expands to \texttt{c} (centred) by default. + +The location list column (where applicable) has the title given by +\ics{pagelistname} and the column alignment is given by: +\begin{definition}[\DescribeMacro\glslongextraLocationAlign] +\cs{glslongextraLocationAlign} +\end{definition} +which expands to +\begin{verbatim} +>{\raggedright}p{\glspagelistwidth} +\end{verbatim} +by default. (Ragged-right paragraph, \ics{glspagelistwidth} is +defined in \sty{glossary-long}, which is automatically loaded.) + +The description column has the title given by \ics{descriptionname} +and the column alignment is given by: +\begin{definition}[\DescribeMacro\glslongextraDescAlign] +\cs{glslongextraDescAlign} +\end{definition} +which expands to +\begin{verbatim} +>{\raggedright}p{\glsdescwidth} +\end{verbatim} +by default. (Ragged-right paragraph, \ics{glsdescwidth} is +defined in \sty{glossary-long}, which is automatically loaded.) + +Unlike the long styles provided by the base \styfmt{glossaries} +package, these new styles try to determine the value of +\cs{glsdescwidth} at the start of the glossary according to the +number of columns provided by the style. The calculations are +performed by the following commands: +\begin{definition}[\DescribeMacro\glslongextraSetDescWidth] +\cs{glslongextraSetDescWidth} +\end{definition} +This is used by the styles that have a name and description +column. The value of \cs{glsdescwidth} is computed as: +\[ + \cs{glsdescwidth} = \cs{linewidth} - 4\cs{tabcolsep} - W +\] +where $W$ is a guess at the width of the name column. This is first +set to the width of the name column header: +\begin{alltt} +\cs{settowidth}\marg{width}\{\cs{glslongextraHeaderFmt}\cs{entryname}\} +\end{alltt} +If any names in that column are larger than this, then you need +to specify the widest name using: +\begin{definition}[\DescribeMacro\glslongextraSetWidest] +\cs{glslongextraSetWidest}\marg{widest name} +\end{definition} +or +\begin{definition}[\DescribeMacro\glslongextraUpdateWidest] +\cs{glslongextraUpdateWidest}\marg{text} +\end{definition} +These work like the analogous commands \cs{glssetwidest} and +\cs{glsupdatewidest} provided with the \glostyle{alttree} style, but +in this case there's no hierarchy. The default widest name +is obtained from the \glostyle{alttree} top-level name if set, +otherwise it's empty, so you can use \gls{bib2gls}['s] +\texttt{set-widest} option. If you have the entry counter enabled, +you will need to include this with the name for the extra material to +be taken into account. + +The name isn't shown for child entries by default, but if +you change this and you want to use \gls{bib2gls}['s] +\texttt{set-widest} option (for \gls{bib2gls} v1.8+) then you need to +redefine: +\begin{definition}[\DescribeMacro\glslongextraUpdateWidestChild] +\cs{glslongextraUpdateWidestChild}\marg{level}\marg{text} +\end{definition} +This does nothing by default, but if you are including the child +names then you need to redefine this command: +\begin{verbatim} +\renewcommand{\glslongextraUpdateWidestChild}[2]{% + \glslongextraUpdateWidest{#2}% +} +\end{verbatim} + +If you prefer to set an explicit width for the description +column then you need to redefine \cs{glslongextraSetDescWidth}. For +example: +\begin{verbatim} +\renewcommand{\glslongextraSetDescWidth}{% + \setlength{\glsdescwidth}{0.6\linewidth}% +} +\end{verbatim} + +The styles that have a name, symbol and description, +\cs{glsdescwidth} is set with: +\begin{definition}[\DescribeMacro\glslongextraSymSetDescWidth] +\cs{glslongextraSymSetDescWidth} +\end{definition} +This first uses \cs{glslongextraSetDescWidth} and then subtracts +2\cs{tabcolsep} and the width of the symbol column header from +\cs{glsdescwidth}. This assumes that the symbol column header +is larger than any of the symbols. If this isn't appropriate +then you can redefine this command. For example: +\begin{verbatim} +\renewcommand{\glslongextraSymSetDescWidth}{% + \glslongextraSetDescWidth + \addtolength{\glsdescwidth}{-3cm}% +} +\end{verbatim} +or +\begin{verbatim} +\renewcommand{\glslongextraSymSetDescWidth}{% + \setlength{\glsdescwidth}{.5\linewidth}% +} +\end{verbatim} + +For the styles that have a name, description and location column, +\cs{glsdescwidth} is set using: +\begin{definition}[\DescribeMacro\glslongextraLocSetDescWidth] +\cs{glslongextraLocSetDescWidth} +\end{definition} +This uses \cs{glslongextraSetDescWidth} and then subtracts +2\cs{tabcolsep} and \cs{glspagelistwidth} from \cs{glsdescwidth}. +You can redefine this command to set both \cs{glsdescwidth} and +\cs{glspagelistwidth} if appropriate. + +For the styles that have a name, description, symbol and location +column, \cs{glsdescwidth} is set using: +\begin{definition}[\DescribeMacro\glslongextraSymLocSetDescWidth] +\cs{glslongextraSymLocSetDescWidth} +\end{definition} +This uses \cs{glslongextraSymSetDescWidth} and then subtracts +2\cs{tabcolsep} and \cs{glspagelistwidth} from +\cs{glsdescwidth}. Again, you can redefine this command +to explicitly set both lengths. + +In all cases, the top-level name is formatted according to: +\begin{definition}[\DescribeMacro\glslongextraNameFmt] +\cs{glslongextraNameFmt}\marg{label} +\end{definition} +This does +\begin{alltt} +\cs{glsentryitem}\marg{label}\cs{glstarget}\marg{label}\{\cs{glossentryname}\marg{label}\} +\end{alltt} +which includes the entry counter (if enabled), the target and the post-name link. + +The top-level description is formatted according to: +\begin{definition}[\DescribeMacro\glslongextraDescFmt] +\cs{glslongextraDescFmt}\marg{label} +\end{definition} +This does \cs{glossentrydesc}\marg{label} followed by the +post-description hook. + +The styles that have a symbol column format the symbol using: +\begin{definition}[\DescribeMacro\glslongextraSymbolFmt] +\cs{glslongextraSymbolFmt}\marg{label} +\end{definition} +This just does \cs{glossentrysymbol}\marg{label}. + +The styles that have a location list column format the list using: +\begin{definition}[\DescribeMacro\glslongextraLocationFmt] +\cs{glslongextraLocationFmt}\marg{label}\marg{locations} +\end{definition} +This just does \meta{locations} and ignores the label. + +The child entries have their name formatted according to: +\begin{definition}[\DescribeMacro\glslongextraSubNameFmt] +\cs{glslongextraSubNameFmt}\marg{level}\marg{label} +\end{definition} +where \meta{level} is the hierarchical level. This defaults to: +\begin{alltt} +\cs{glssubentryitem}\marg{label}\cs{glstarget}\marg{label}\{\cs{strut}\} +\end{alltt} +This includes the sub-entry counter (if enabled) and the target +but doesn't show the name. The child description is formatted according to: +\begin{definition}[\DescribeMacro\glslongextraSubDescFmt] +\cs{glslongextraSubDescFmt}\marg{level}\marg{label} +\end{definition} +which defaults to just \cs{glslongextraDescFmt}\marg{label} + +The child symbol is formatted (where appropriate) according to: +\begin{definition}[\DescribeMacro\glslongextraSubSymbolFmt] +\cs{glslongextraSubSymbolFmt}\marg{level}\marg{label} +\end{definition} +This just does \cs{glslongextraSymbolFmt}\marg{label} by default. + +The styles that have a location list column format the list for +child entries using: +\begin{definition}[\DescribeMacro\glslongextraLocationFmt] +\cs{glslongextraSubLocationFmt}\meta{level}\marg{label}\marg{locations} +\end{definition} +This just does \meta{locations} and ignores the level and label. + +The letter group headings are formatted according to: +\begin{definition}[\DescribeMacro\glslongextraGroupHeading] +\cs{glslongextraGroupHeading}\marg{n}\marg{label} +\end{definition} +which does nothing by default. The first argument \meta{n} is the +number of columns in the table. The second argument \meta{label} +is the group label (not the title, although they may happen +to be the same). + +This can be redefined to show the group heading. For example: +\begin{verbatim} +\renewcommand*{\glslongextraGroupHeading}[2]{% + \glsxtrgetgrouptitle{#2}{\thisgrptitle}% + \glslongextraHeaderFmt{\thisgrptitle}% + \tabularnewline + \noalign{\vskip\normalbaselineskip}% +} +\end{verbatim} +This ignores the first argument and just puts the group +title in the first column formatted according to +\cs{glslongextraHeaderFmt} (to match the column header). + +Remember that you can also adjust the styles through category +attributes. The name column's title is given by +\cs{entryname}, the description column's title is given by +\cs{descriptionname} and (where present) the symbol column's +title is given by \cs{symbolname}, as for the other long styles +that have headers. + +\begin{description} +\item{\glostyle{long-name-desc}} This is like the +\glostyle{longragged-booktabs} style but doesn't show the location +list (regardless of the \pkgopt{nonumberlist} option). The name is +shown in the first column and the description in the second. + +The symbol is not displayed. The header +row is produced with: +\begin{definition}[\DescribeMacro\glslongextraNameDescHeader] +\cs{glslongextraNameDescHeader} +\end{definition} +This essentially uses the same code as for \glostyle{longragged-booktabs} +but makes it easier to adjust the header without having to define a +new style. This is defined as: +\begin{verbatim} +\glslongextraNameDescTabularHeader\endhead +\glslongextraNameDescTabularFooter\endfoot +\end{verbatim} +where: +\begin{definition}[\DescribeMacro\glslongextraNameDescTabularHeader] +\cs{glslongextraNameDescTabularHeader} +\end{definition} +sets up the header and +\begin{definition}[\DescribeMacro\glslongextraNameDescTabularFooter] +\cs{glslongextraNameDescTabularFooter} +\end{definition} +sets up the footer. If you have setup the \env{tabular} version +of this style then the above two commands are used at the +start and end of the \env{tabular} environment (and +\cs{glslongextraNameDescHeader} isn't used). + +For example, to simply remove the header and footer (for the default +\env{longtable} version of the style): +\begin{verbatim} +\renewcommand{\glslongextraNameDescHeader}{} +\end{verbatim} +Or to change the name alignment to centred: +\begin{verbatim} +\renewcommand{\glslongextraNameAlign}{c} +\end{verbatim} + +\item{\glostyle{long-name-desc-loc}} This is like the +\glostyle{long-name-desc} style but has a third column for the +location list. The \env{longtable} header is given by: +\begin{definition}[\DescribeMacro\glslongextraNameDescLocationHeader] +\cs{glslongextraNameDescLocationHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraNameDescLocationTabularHeader] +\cs{glslongextraNameDescLocationTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraNameDescLocationTabularFooter] +\cs{glslongextraNameDescLocationTabularFooter} +\end{definition} + +\item{\glostyle{long-desc-name}} This is like the +\glostyle{long-name-desc} style but swaps the columns. Note that +if the entry counter is displayed it will appear at the start +of the second column by default. The \env{longtable} header is formatted according +to: +\begin{definition}[\DescribeMacro\glslongextraDescNameHeader] +\cs{glslongextraDescNameHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraDescNameTabularHeader] +\cs{glslongextraDescNameTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraDescNameTabularFooter] +\cs{glslongextraDescNameTabularFooter} +\end{definition} + +\item{\glostyle{long-loc-desc-name}} This has three columns +containing the location list, description and name. The +\env{longtable} header +is formatted according to: +\begin{definition}[\DescribeMacro\glslongextraLocationDescNameHeader] +\cs{glslongextraLocationDescNameHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraLocationDescNameTabularHeader] +\cs{glslongextraLocationDescNameTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraLocationDescNameTabularFooter] +\cs{glslongextraLocationDescNameTabularFooter} +\end{definition} + +\item{\glostyle{long-name-desc-sym}} This is has three columns, with +the name in the first, the description in the second and the symbol +in the third. + +The \env{longtable} header row is produced with: +\begin{definition}[\DescribeMacro\glslongextraNameDescSymHeader] +\cs{glslongextraNameDescSymHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraNameDescSymTabularHeader] +\cs{glslongextraNameDescSymTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraNameDescSymTabularFooter] +\cs{glslongextraNameDescSymTabularFooter} +\end{definition} + +\item{\glostyle{long-name-desc-sym-loc}} This is has four columns, with +the name in the first, the description in the second, the symbol +in the third and the location list in the fourth. + +The \env{longtable} header row is produced with: +\begin{definition}[\DescribeMacro\glslongextraNameDescSymLocationHeader] +\cs{glslongextraNameDescSymLocationHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraNameDescSymLocationTabularHeader] +\cs{glslongextraNameDescSymLocationTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraNameDescSymLocationTabularFooter] +\cs{glslongextraNameDescSymLocationTabularFooter} +\end{definition} + +\item{\glostyle{long-name-sym-desc}} This is like the +\glostyle{long-name-desc-sym} but the second and third column are +swapped. The \env{longtable} header row is given by: +\begin{definition}[\DescribeMacro\glslongextraNameSymDescHeader] +\cs{glslongextraNameSymDescHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraNameSymDescTabularHeader] +\cs{glslongextraNameSymDescTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraNameSymDescTabularFooter] +\cs{glslongextraNameSymDescTabularFooter} +\end{definition} + +\item{\glostyle{long-name-sym-desc-loc}} This is like the +\glostyle{long-name-desc-sym-loc} but the second and third column are +swapped. The \env{longtable} header row is given by: +\begin{definition}[\DescribeMacro\glslongextraNameSymDescLocationHeader] +\cs{glslongextraNameSymDescLocationHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraNameSymDescLocationTabularHeader] +\cs{glslongextraNameSymDescLocationTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraNameSymDescLocationTabularFooter] +\cs{glslongextraNameSymDescLocationTabularFooter} +\end{definition} + +\item{\glostyle{long-sym-desc-name}} This has the symbol in the +first column, the description in the second and the name in the +third. The \env{longtable} header row is given by: +\begin{definition}[\DescribeMacro\glslongextraSymDescNameHeader] +\cs{glslongextraSymDescNameHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraSymDescNameTabularHeader] +\cs{glslongextraSymDescNameTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraSymDescNameTabularFooter] +\cs{glslongextraSymDescNameTabularFooter} +\end{definition} + +\item{\glostyle{long-loc-sym-desc-name}} This has the location list +in the first column, symbol in the +second column, the description in the third and the name in the +fourth. The \env{longtable} header row is given by: +\begin{definition}[\DescribeMacro\glslongextraLocationSymDescNameHeader] +\cs{glslongextraLocationSymDescNameHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraLocationSymDescNameTabularHeader] +\cs{glslongextraLocationSymDescNameTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraLocationSymDescNameTabularFooter] +\cs{glslongextraLocationSymDescNameTabularFooter} +\end{definition} + +\item{\glostyle{long-desc-sym-name}} This has the description in the +first column, the symbol in the second and the name in the +third. The \env{longtable} header row is given by: +\begin{definition}[\DescribeMacro\glslongextraDescSymNameHeader] +\cs{glslongextraDescSymNameHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraDescSymNameTabularHeader] +\cs{glslongextraDescSymNameTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraDescSymNameTabularFooter] +\cs{glslongextraDescSymNameTabularFooter} +\end{definition} + +\item{\glostyle{long-loc-desc-sym-name}} This has the location list +in the first column, the description in the +second column, the symbol in the third and the name in the +fourth. The \env{longtable} header row is given by: +\begin{definition}[\DescribeMacro\glslongextraLocationDescSymNameHeader] +\cs{glslongextraLocationDescSymNameHeader} +\end{definition} +which similarly defined in terms of the commands used for the +\env{tabular} version: +\begin{definition}[\DescribeMacro\glslongextraLocationDescSymNameTabularHeader] +\cs{glslongextraLocationDescSymNameTabularHeader} +\end{definition} +and +\begin{definition}[\DescribeMacro\glslongextraLocationDescSymNameTabularFooter] +\cs{glslongextraLocationDescSymNameTabularFooter} +\end{definition} + +\end{description} + \section{Glossary Style Modifications} \label{sec:glosstylemods} @@ -7932,38 +8602,8 @@ search for the existence of document dialect (where \meta{script} is the four letter script identifier, such as \texttt{Latn}). -\begin{definition}[\DescribeMacro\glshex] -\cs{glshex} -\end{definition} -This is just defined as \verb|\string\u|, which is required -when you need to indicate a Unicode character in the form -\cs{u}\meta{hex} in some of -the resource options (as illustrated above). - -\begin{definition}[\DescribeMacro\glscapturedgroup] -\cs{glscapturedgroup} -\end{definition} -This is just defined as \verb|\string\$| and is used for -the captured group reference in a replacement part of a regular -expression substitution (requires at least \gls{bib2gls} version 1.5). For example: -\begin{verbatim} -sort-replace={{([a-zA-Z])\string\.}{\glscapturedgroup1}} -\end{verbatim} -This only removes a full stop that follows any of the characters -a,\ldots,z or A,\ldots,Z. - -If you use the \texttt{save-child-count} resource option, -you can test if the \texttt{childcount} field is non-zero using: -\begin{definition}[\DescribeMacro{\GlsXtrIfHasNonZeroChildCount}] -\cs{GlsXtrIfHasNonZeroChildCount}\marg{label}\marg{true}\marg{false} -\end{definition} -This internally uses \cs{GlsXtrIfFieldNonZero} and will do -\meta{false} if the field isn't set. Within \meta{true} and -\meta{false} you can use \cs{glscurrentfieldvalue} to access the -value. (It will be 0 in \meta{false} if the field isn't set.) - \begin{definition}[\DescribeMacro\glsxtrprovidecommand] -\cs{glsxtrprovidecommand} +\cs{glsxtrprovidecommand}\marg{cs}\oarg{n}\oarg{default}\marg{definition} \end{definition} This command is intended for use in \texttt{@preamble}. It's simply defined to \cs{providecommand} in @@ -7982,6 +8622,20 @@ to the \texttt{.glstex} file (as it is by default) then it won't override the current definition (provided by the kernel or redefined by a package). +The helper commands in the resource files are defined using +\cs{providecommand}. For many of them, if you want to provide an +alternative definition then you need to define the command before +the resource file is loaded. There are a few that may be redefined +afterwards but if you use \cs{renewcommand} then you will get an +error on the first \LaTeX\ run when the \texttt{.glstex} file +doesn't exist. In this case, you may prefer to use: +\begin{definition}[\DescribeMacro\glsrenewcommand] +\cs{glsrenewcommand}\marg{cs}\oarg{n}\oarg{default}\marg{definition} +\end{definition} +This behaves like \cs{renewcommand} but only generates a warning +rather than an error if the command isn't already defined so it +won't interrupt the document build. + \begin{definition}[\DescribeMacro\GlsXtrIndexCounterLink] \cs{GlsXtrIndexCounterLink}\marg{text}\marg{label} \end{definition} @@ -7998,27 +8652,30 @@ does \meta{text}. This command is provided for use with the \texttt{save-index-counter} resource option. See the \gls{bib2gls} manual for further details (at least version 1.4). -\begin{definition}[\DescribeMacro\GlsXtrBibTeXEntryAliases] -\cs{GlsXtrBibTeXEntryAliases} +If you use the \texttt{set-widest} resource option, \gls{bib2gls} +v1.8+ will now use: +\begin{definition}[\DescribeMacro\glsxtrSetWidest] +\cs{glsxtrSetWidest}\marg{type}\marg{level}\marg{text} \end{definition} -A convenient shortcut for use in the \texttt{entry-type-aliases} -setting. This provides aliases for Bib\TeX's standard entry types to -\gls{bib2gls}['s] \texttt{@bibtexentry} entry type (requires at -least \gls{bib2gls} version 1.4). +(if it has been defined) to set the widest name for the given +glossary type and level. This allows for both the \glostyle{alttree} +style and the styles provided by \sty{glossary-longextra}, which +need to know the widest name. -\begin{definition}[\DescribeMacro\GlsXtrProvideBibTeXFields] -\cs{GlsXtrProvideBibTeXFields} +If \gls{bib2gls} can't determine the widest name (typically because +the name field consists of commands that aren't recognised by the +interpreter) then \gls{bib2gls} v1.8+ will now use: +\begin{definition}[\DescribeMacro\glsxtrSetWidestFallback] +\cs{glsxtrSetWidestFallback}\marg{max depth}\marg{list} \end{definition} -Defines storage keys for Bib\TeX's standard fields. Note that -Bib\TeX's \texttt{type} field clashes with the \sty{glossaries} -package's \gloskey{type} key, so this command provides the key -\texttt{bibtextype} instead. You can alias it with -\texttt{field-aliases={type=bibtextype}} in the resource options. -Each storage key is provided with a convenient command to access the -value in the form \cs{glsxtrbib}\meta{field}. For example, -\cs{glsxtrbibaddress}. The \texttt{bibtextype} field can be accessed -with \cs{glsxtrbibtype}. Each of these commands takes the entry -label as the sole argument. +(if defined). Currently the maximum hierarchical depth \meta{max +depth} may only be 0 or 2. This command requires commands provided +by the \sty{glossaries-extra-stylemods} package with the +\glostyle{alttree} style enabled. In this case, it may be simpler +to just use \ics{glssetwidest}. + +\subsection{Supplemental Locations} +\label{sec:supplocations} \begin{definition}[\DescribeMacro\glsxtrdisplaysupploc] \cs{glsxtrdisplaysupploc}\marg{prefix}\marg{counter}\marg{format}\marg{src}\marg{location} @@ -8034,6 +8691,213 @@ and then uses to format the actual location (with an external hyperlink, if supported). +\subsection{Nameref Record} +\label{sec:recordnameref} + +Normally locations are recorded in the \texttt{.aux} file +in the form: +\begin{definition} +\cs{glsxtr@record}\marg{label}\marg{prefix}\marg{counter}\marg{format}\marg{location} +\end{definition} +The \pkgopt[nameref]{record} option, which requires at least +\gls{bib2gls} v1.8, instead uses: +\begin{definition} +\cs{glsxtr@record@nameref}\marg{label}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{title}\marg{href}\marg{hcounter} +\end{definition} +where \meta{title} is obtained from \cs{@currentlabelname} +and \meta{href} is obtained from \cs{@currentHref}. These +commands require \sty{hyperref}. If they are undefined, +\meta{title} and \meta{href} will be left empty and \gls{bib2gls} +will treat it as a regular record. + +\begin{important} +Be careful with this option as \meta{href} will globally change on every +instance of \cs{refstepcounter} but \meta{title} won't necessarily +change. It can therefore cause unexpected behaviour. +\end{important} + +The final argument \meta{hcounter} is obtained from +\cs{theH}\meta{counter} which provides the partial target name associated +with the indexing counter. With the original +\gls{makeindex}\slash \gls{xindy} approach, it's not possible to +include this information in the location, so the base +\sty{glossaries} package attempts to derive a prefix from which the +\meta{hcounter} value can be reconstituted by appending the prefix. +Unfortunately, not all definitions of \cs{theH}\meta{counter} are in +the form \meta{prefix}\cs{the}\meta{counter} (most notably the +\ctr{equation} counter with chapters) so this can fail. + +Since \gls{bib2gls} is customized specifically for use with +\styfmt{glossaries-extra}, it's now possible to save +\meta{hcounter}, so the \pkgopt[nameref]{record} option does this. +By providing both \meta{href} and \meta{hcounter}, you can determine +which target you would rather use. The default is to use +\meta{hcounter}, which will take you to the place where the +corresponding counter was incremented with \cs{refstepcounter}. +However, you may choose to switch to using the \meta{href} target, +which will take you to the nearest target before the indexing took +place. + +With \gls{bib2gls} v1.8+, normal locations are displayed using: +\begin{definition} +\cs{glsnoidxdisplayloc}\marg{prefix}\marg{counter}\marg{format}\marg{location} +\end{definition} +This is provided by the base \sty{glossaries} package and is simply +defined to do: +\begin{definition} +\cs{setentrycounter}\oarg{prefix}\marg{counter}\cs{csuse}\marg{format}\marg{location} +\end{definition} +Earlier versions of \gls{bib2gls} only used this in the +\gloskey{loclist} field and explicitly used \cs{setentrycounter} in +the \gloskey{location} field followed by +\cs{}\meta{format}\marg{location}, which follows the code that's created +with the default \pkgopt{makeindex} setting. +The \cs{setentrycounter} command sets up the prefix needed for +\cs{glshypernumber} to reform the target name from the given +location. + +The locations identified by \cs{glsxtr@record@nameref} are written +by \gls{bib2gls} to the location list using: +\begin{definition}[\DescribeMacro\glsxtrdisplaylocnameref] +\cs{glsxtrdisplaylocnameref}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{title}\marg{href}\marg{hcounter}\marg{file} +\end{definition} +With normal internal locations, \meta{file} will always be empty. +With supplemental locations, \meta{file} will be the external file +reference. + +The default definition is: +\begin{verbatim} +\newcommand*{\glsxtrdisplaylocnameref}[8]{% + \ifstrequal{#2}{equation}% + {\glsxtrnamereflink{#3}{(#4)}{#2.#7}{#8}}% + {% + \ifstrempty{#5}% + {% + \glsxtrnamereflink{#3}{#4}{#2.#7}{#8}% + }% + {% + \ifstrequal{#2}{page}% + {\glsxtrnamereflink{#3}{#4}{#2.#7}{#8}}% + {\glsxtrnamereflink{#3}{#5}{#2.#7}{#8}}% + }% + }% +} +\end{verbatim} +which uses: +\begin{definition}[\DescribeMacro\glsxtrnamereflink] +\cs{glsxtrnamereflink}\marg{format}\marg{title}\marg{target}\marg{file} +\end{definition} +This ignores the \meta{prefix}, \meta{counter} and \marg{location} +arguments and instead creates a hyperlink with the target name obtained from \meta{target} (and \meta{file}, if not empty). + +Since pages and equations typically don't have titles, the default +definition of \cs{glsxtrdisplaylocnameref} checks the counter was +used as the location. If it's \ctr{page} or if \meta{title} is empty, then just the location is +used as the hyperlink text. If the counter \ctr{equation}, then the +text is the location in parentheses. Otherwise the text is obtained +from \meta{title}. + +If \meta{file} is empty an internal link is created with: +\begin{definition}[\DescribeMacro\glsxtrfmtinternalnameref] +\cs{glsxtrfmtinternalnameref}\marg{target}\marg{format}\marg{title} +\end{definition} +otherwise an external link is created with: +\begin{definition}[\DescribeMacro\glsxtrfmtexternalnameref] +\cs{glsxtrfmtexternalnameref}\marg{target}\marg{format}\marg{title}\marg{file} +\end{definition} +The \meta{file} argument is set by \gls{bib2gls} for supplemental +locations. + +Here's alternative definition that uses the \meta{prefix} and +\meta{counter} to reform the target name (as +\cs{glsnoidxdisplayloc}) but uses the \meta{title} as the hyperlink text: +\begin{verbatim} +\renewcommand*{\glsxtrdisplaylocnameref}[7]{% + \glsxtrnamereflink{#3}{#5}{#6}{#7}% +} +\end{verbatim} +which uses: +\begin{definition}[\DescribeMacro\glsxtrnameloclink] +\cs{glsxtrnameloclink}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{title}\marg{file} +\end{definition} +This uses the same commands as \cs{glsxtrnamereflink} +to produce the hyperlinks. + +In both cases, the link is encapsulated with the text-block command +whose name is given by \meta{format}, but \cs{glshypernumber} is +first locally redefined to \cs{@firstofone} to prevent a conflict with the +usual location hyperlink formation. This means that if the +\meta{format} is \texttt{hyperbf} then it will simply behave like +\texttt{textbf}. + +For compactness, \gls{bib2gls} merges normal records if the +\meta{prefix}, \meta{counter} and \meta{location} all match. (An +order of precedence can be provided for format conflicts.) With +nameref records, you can use the \verb|--merge-nameref-on| switch +provided by \gls{bib2gls} v1.8+ to determine how to merge nameref +records. This switch must be followed by one of the following +keywords: \texttt{hcounter} (merge on \meta{hcounter}, default) +\texttt{href} (merge on \meta{href}), \texttt{title} (merge +on \meta{title}) and \texttt{location} (merge on \meta{location}, as +regular records). In all cases, the \meta{counter} must also match. + +\subsection{Helper Commands for Resource Options} +\label{sec:resourcecommands} + +\begin{definition}[\DescribeMacro\glshex] +\cs{glshex} +\end{definition} +This is just defined as \verb|\string\u|, which is required +when you need to indicate a Unicode character in the form +\cs{u}\meta{hex} in some of +the resource options (as illustrated above). + +\begin{definition}[\DescribeMacro\glscapturedgroup] +\cs{glscapturedgroup} +\end{definition} +This is just defined as \verb|\string\$| and is used for +the captured group reference in a replacement part of a regular +expression substitution (requires at least \gls{bib2gls} version 1.5). For example: +\begin{verbatim} +sort-replace={{([a-zA-Z])\string\.}{\glscapturedgroup1}} +\end{verbatim} +This only removes a full stop that follows any of the characters +a,\ldots,z or A,\ldots,Z. + +If you use the \texttt{save-child-count} resource option, +you can test if the \texttt{childcount} field is non-zero using: +\begin{definition}[\DescribeMacro{\GlsXtrIfHasNonZeroChildCount}] +\cs{GlsXtrIfHasNonZeroChildCount}\marg{label}\marg{true}\marg{false} +\end{definition} +This internally uses \cs{GlsXtrIfFieldNonZero} and will do +\meta{false} if the field isn't set. Within \meta{true} and +\meta{false} you can use \cs{glscurrentfieldvalue} to access the +value. (It will be 0 in \meta{false} if the field isn't set.) + + +A convenient shortcut for use in the \texttt{entry-type-aliases} +setting: +\begin{definition}[\DescribeMacro\GlsXtrBibTeXEntryAliases] +\cs{GlsXtrBibTeXEntryAliases} +\end{definition} +This provides aliases for Bib\TeX's standard entry types to +\gls{bib2gls}['s] \texttt{@bibtexentry} entry type (requires at +least \gls{bib2gls} version 1.4). + +You may also want to provide storage keys for Bib\TeX's standard +fields rather than having to alias them all. This can be done with: +\begin{definition}[\DescribeMacro\GlsXtrProvideBibTeXFields] +\cs{GlsXtrProvideBibTeXFields} +\end{definition} +Note that Bib\TeX's \texttt{type} field clashes with the \sty{glossaries} +package's \gloskey{type} key, so this command provides the key +\texttt{bibtextype} instead. You can alias it with +\texttt{field-aliases={type=bibtextype}} in the resource options. +Each storage key is provided with a convenient command to access the +value in the form \cs{glsxtrbib}\meta{field}. For example, +\cs{glsxtrbibaddress}. The \texttt{bibtextype} field can be accessed +with \cs{glsxtrbibtype}. Each of these commands takes the entry +label as the sole argument. The \sty{glossaries-extra-bib2gls} package also provides definitions of the missing mathematical Greek commands: \ics{Alpha}, @@ -8810,6 +9674,236 @@ and for the all caps: options}\marg{prefix}\marg{\cs{rGLS}-like cs}\marg{\cs{rGLSpl}-like cs} \end{definition} +If you provide your own custom command with just +\cs{newcommand} that has syntax that starts with +\oarg{options}\marg{label}, then you can notify \gls{bib2gls} using: +\begin{definition}[\DescribeMacro\glsxtridentifyglslike] +\cs{glsxtridentifyglslike}\marg{prefix}\marg{command} +\end{definition} +This writes information to the \texttt{.aux} file so that +\gls{bib2gls} can search for the given command when looking +for dependencies. + +Another possibility is to set up known label prefixes, with each +one identified by: +\begin{definition}[\DescribeMacro\glsxtraddlabelprefix] +\cs{glsxtraddlabelprefix}\marg{prefix} +\end{definition} +These should be listed in order of precedence. Since no entries +are defined on the first \LaTeX\ run, the final prefix should +be the fallback. You can prepend a prefix to the list using: +\begin{definition}[\DescribeMacro\glsxtrprependlabelprefix] +\cs{glsxtrprependlabelprefix}\marg{prefix} +\end{definition} +which gives it the highest order of precedence. + +The \meta{prefix} argument may be empty. You can clear the list +with: +\begin{definition}[\DescribeMacro\glsxtrclearlabelprefixes] +\cs{glsxtrclearlabelprefixes} +\end{definition} + +You can test if a prefix is already in the list with: +\begin{definition}[\DescribeMacro\glsxtrifinlabelprefixlist] +\cs{glsxtrifinlabelprefixlist}\marg{prefix}\marg{true}\marg{false} +\end{definition} +In general it's best to avoid adding multiple instances of the same +prefix, so you can check with this command before adding a prefix to +the list. However, it can be useful to repeat a prefix at +the end of the list so that it can be used as a fallback for entries +that haven't yet been defined. + +With the list of possible prefixes set up (including an empty +prefix if necessary), you can use: +\begin{definition}[\DescribeMacro\dgls] +\cs{dgls}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +which behaves like +\begin{alltt} +\cs{gls}\oarg{options}\{\meta{prefix}\meta{label}\}\oarg{insert} +\end{alltt} +where \meta{prefix} is the first prefix in the list such that +\meta{prefix}\meta{label} matches a defined entry (or the last entry +in the prefix list if none match). + +There are also analogous commands for the plural and case-changing +versions: +\begin{definition}[\DescribeMacro\dglspl] +\cs{dglspl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(uses \cs{glspl}), +\begin{definition}[\DescribeMacro\dGls] +\cs{dGls}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(uses \cs{Gls}), +\begin{definition}[\DescribeMacro\dGlspl] +\cs{dGlspl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(uses \cs{Glspl}), +\begin{definition}[\DescribeMacro\dGLS] +\cs{dGLS}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(uses \cs{GLS}), +\begin{definition}[\DescribeMacro\dGLSpl] +\cs{dGLSpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(uses \cs{GLSpl}), +\begin{definition}[\DescribeMacro\dglslink] +\cs{dglslink}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(uses \cs{glslink}), +\begin{definition}[\DescribeMacro\dglsdisp] +\cs{dglsdisp}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(uses \cs{glsdisp}). + +These commands are essentially provided for a mixture of single and +dual entries. Suppose the file \texttt{entries.bib} contains: +\begin{verbatim} +@index{duck} +@dualindexabbreviation{svm, + short={SVM}, + long={support vector machine} +} +@dualindexsymbol{pi, + symbol={\ensuremath{\pi}}, + description={ratio of a circle's circumference to its + diameter} +} +\end{verbatim} +and suppose the document code is: +\begin{verbatim} +\documentclass{article} +\usepackage{hyperref} +\usepackage[record,abbreviations,symbols]{glossaries-extra} + +\newcommand{\bibglsnewdualindexsymbolsecondary}[5]{% + \longnewglossaryentry*{#1}{name={#3},category={symbol}, + type={symbols},symbol={#4},#2}{#5}% +} + +\GlsXtrLoadResources[src=entries] + +\begin{document} +First use: \gls{duck}, \gls{svm}, \gls{pi}. +Next use: \gls{duck}, \gls{svm}, \gls{pi}. +\printunsrtglossaries +\end{document} +\end{verbatim} +This uses the default empty primary prefix and \texttt{dual.}\ for +the dual prefix, so \verb|\gls{svm}| is referencing the primary +entry, which is (essentially) an \texttt{@index} type not an +abbreviation. It therefore doesn't follow the abbreviation style, and +it also hyperlinks to the index not to the list of abbreviations. +Similarly for \verb|\gls{pi}|, which references the primary +\texttt{@index} entry rather than the symbol. + +What's really needed is: +\begin{verbatim} +\gls{duck}, \gls{dual.svm}, \gls{dual.pi}. +\end{verbatim} +or with +\begin{verbatim} +\GlsXtrLoadResources[src=entries, + label-prefix={idx.}, + dual-prefix={} +] +\end{verbatim} +then only the entries without a dual need a prefix: +\begin{verbatim} +\gls{idx.duck}, \gls{svm}, \gls{pi}. +\end{verbatim} +Using \cs{glsxtrnewglslike}, as earlier, this can be simplified to: +\begin{verbatim} +\idx{duck}, \gls{svm}, \gls{pi}. +\end{verbatim} +but this requires remembering which terms have duals. + +An alternative is to use \cs{dgls} instead: +\begin{verbatim} +\documentclass{article} +\usepackage{hyperref} +\usepackage[record,abbreviations,symbols]{glossaries-extra} + +\newcommand{\bibglsnewdualindexsymbolsecondary}[5]{% + \longnewglossaryentry*{#1}{name={#3},category={symbol}, + type={symbols},symbol={#4},#2}{#5}% +} + +\GlsXtrLoadResources[src=entries] + +\glsxtraddlabelprefix{dual.} +\glsxtraddlabelprefix{} + +\begin{document} +First use: \dgls{duck}, \dgls{svm}, \dgls{pi}. +Next use: \dgls{duck}, \dgls{svm}, \dgls{pi}. +\printunsrtglossaries +\end{document} +\end{verbatim} +On the first \LaTeX\ call (when the \texttt{.glstex} file doesn't exist), +neither \texttt{dual.svm} nor \texttt{svm} exists, so \cs{dgls} +uses the last prefix (which is empty in this case). This means +that on the first \LaTeX\ run, \verb|\dgls{svm}| behaves like +\verb|\gls{svm}|, which adds a record for the primary +\texttt{svm} entry. The default primary-dual dependency means +that this will cause both the primary (\texttt{svm}) and dual +(\texttt{dual.svm}) entry to be selected. The location will be +added to the primary entry's location list, unless overridden +by resource options, such as \texttt{combine-dual-locations}. + +Once \gls{bib2gls} has been run and the \texttt{.glstex} file +exists, then \texttt{dual.svm} exists. So \verb|\dgls{svm}| will +again first try \texttt{dual.svm} (as \texttt{dual.} is the +first in the list of label prefixes). That now exists, so +\verb|\dgls{svm}| now behaves like \verb|\gls{dual.svm}|, which +follows the abbreviation style and hyperlinks to the list +of abbreviations. + +Similarly for the index-symbol combination \texttt{dual.pi} and +\texttt{pi}. In the case of \verb|\dgls{duck}|, the label +\texttt{dual.duck} never exists, so that's never selected. +The empty prefix is the only one that matches, so +\verb|\dgls{duck}| always behaves like \verb|\gls{duck}|. + +If you haven't used \texttt{combine-dual-locations} an extra +\gls{bib2gls}+\LaTeX\ run may be required to correct the location +lists. + +If you change the label prefixes, remember to update the +corresponding \cs{glsxtraddlabelprefix}\marg{prefix}. +If no prefixes have been added to the list (or if the list is +cleared), just an empty prefix is assumed. + +As from version 1.8, \gls{bib2gls} provides hooks that identify +the label prefixes in the \texttt{.glstex} file: +\begin{alltt} +\ics{bibglstertiaryprefixlabel}\marg{prefix} +\ics{bibglsdualprefixlabel}\marg{prefix} +\ics{bibglsprimaryprefixlabel}\marg{prefix} +\end{alltt} +These do nothing by default, but they can be defined before +the resource file is loaded to set up the prefix list. For +example: +\begin{verbatim} +\newcommand{\bibglsprimaryprefixlabel}[1]{\glsxtraddlabelprefix{#1}} +\newcommand{\bibglsdualprefixlabel}[1]{\glsxtrprependlabelprefix{#1}} +\GlsXtrLoadResources[src=entries] +\end{verbatim} +Remember that this will only have an effect once the +\texttt{.glstex} file has been created. The prefix list will be empty +on the first run (which is treated as a single empty prefix). +If this isn't a suitable fallback, it may be necessary to add one +after all the resource commands: +\begin{verbatim} +\newcommand{\bibglsprimaryprefixlabel}[1]{\glsxtraddlabelprefix{#1}} +\newcommand{\bibglsdualprefixlabel}[1]{\glsxtrprependlabelprefix{#1}} +\GlsXtrLoadResources[src=entries,label-prefix={idx.}] +\glsxtraddlabelprefix{idx.} +\end{verbatim} +Although this rather defeats the purpose of using the hooks as you +still have to keep track of the fallback prefix. + \section{Record Counting} \label{sec:recordcount} @@ -9417,6 +10511,10 @@ There is also a version that converts the first letter to uppercase \begin{definition}[\DescribeMacro\Glsxtrusefield] \cs{Glsxtrusefield}\marg{entry-label}\marg{field-label} \end{definition} +and, as from v1.37, a command that converts the entire value to upper case: +\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 @@ -9715,7 +10813,23 @@ By default the handler just does \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}. +\gloskey{loclist} fields for the \gls{numberlist}. If you want to +use a different field to be used instead of \gloskey{location} +then redefine: +\begin{definition}[\DescribeMacro\GlsXtrLocationField] +\cs{GlsXtrLocationField} +\end{definition} +to the internal name of the desired field. For example: +\begin{verbatim} +\renewcommand{\GlsXtrLocationField}{primarylocation} +\end{verbatim} +\begin{important} +Note that if the given location field is undefined or unset, +the handler will fallback on the \gloskey{loclist} field. +\end{important} +You can instruct \gls{bib2gls} to omit setting the \gloskey{loclist} +field with the resource option \texttt{--save-loclist=false} +to prevent it from being used as a fallback. You can redefine the handler if required. For example, you may want to filter entries according to the category @@ -9941,11 +11055,15 @@ restore this behaviour, just do: \renewcommand*{\GlsXtrStandaloneSubEntryItem}[1]{\glssubentryitem{#1}} \end{verbatim} -\item Sets the hyper-target if supported (using \cs{glstarget}). - -\item Displays the entry name using - \cs{glossentryname}\marg{label}. - Remember that this command uses \cs{glsnamefont} or picks up +\item Sets the hyper-target if supported (using \cs{glstarget}) +and displays the entry name using: +\begin{definition}[\DescribeMacro\GlsXtrStandaloneEntryName] +\cs{GlsXtrStandaloneEntryName}\marg{label} +\end{definition} + which uses + \cs{glstarget}\marg{label}\{\cs{glossentryname}\marg{label}\} + by default. + Remember that \cs{glossentryname} uses \cs{glsnamefont} or picks up the style from category attributes such as \catattr{glossnamefont}. \end{itemize} @@ -9980,8 +11098,14 @@ is \cs{glsxtrhead\meta{field}}\marg{label}. \item Otherwise \meta{header} is simply the field value. \end{itemize} The \cs{glsxtrglossentryother} command internally uses +\begin{definition}[\DescribeMacro\GlsXtrStandaloneEntryOther] +\cs{GlsXtrStandaloneEntryOther}\marg{label}\marg{field} +\end{definition} +instead of \cs{GlsXtrStandaloneEntryName}, which uses \cs{glossentrynameother}\marg{label}\marg{field} instead of -\cs{glossentryname}\marg{label}. If you are using the +\cs{glossentryname}\marg{label}. + +If you have loaded the \sty{glossaries-accsupp} package (through the \pkgopt{accsupp} option) then accessibility support will be provided if there's a corresponding command diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbr-styles.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbr-styles.pdf index eb3d13bc2ec..deabe7e258e 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbr-styles.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbr-styles.pdf differ 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 48b8be56b07..28387d49807 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 70214de4fcc..7d8113959c7 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 58b056b9e90..24a74e1e130 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 fca0e1e122c..65809f6ec26 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 index b937f3cc5bb..4c7fe963a8a 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-alias.pdf differ 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 9ec353fa776..395f72577cb 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 04b2adc06c6..3b6096665fd 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 30ade5766d8..ba62ed650ad 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 9f965b2fc8f..fd26dc1a4a1 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 095bb13d84a..53b1c537bad 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 b542c5f4fd2..350de9b8464 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 8fc81bd561a..bd096834ce8 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 38dce48dc81..92925bb1ca9 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 037abb01fe3..e890b61f74c 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 7b143745f8b..3c8cb18457d 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 3b3ac29f4ff..f939627b8a6 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 index d6c9cbdb7e2..e93e4acda0e 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-fmt.pdf differ 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 0d7033f6013..451908a8aa5 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 b562e648cf4..986cdef6c66 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 19c7150b7be..122eed00251 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 3eb8e9779a6..8abbd18a4f4 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-linkcount.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-linkcount.pdf index aef14af7065..48c19fb7647 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-linkcount.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-linkcount.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 ae72f02d504..69ff5dd8437 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 6645448ece6..ad8816b7a1a 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 5dd48d0cfe4..03c10b110d7 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 3e18d8aace6..ebdbf228352 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 d4b1f31925d..1dca016295e 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 39e97ec5aed..950e4e3ff55 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 f24115c8500..7f07f13df56 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 c7f9c67be43..3b3c9f540b2 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 228b0db9f1b..ebb6c7495da 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 540617f3a3e..d2a1e48b77f 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 db1e36acae6..f89b596c0ba 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 240d9aa30ab..e4e94b828db 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 e59b37e4831..b5da34a18d7 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 87d6b438bc6..860074d419f 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-nameref.glstex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.glstex new file mode 100644 index 00000000000..f0457093b40 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.glstex @@ -0,0 +1,112 @@ +\glsnoexpandfields +\providecommand{\bibglshashchar}{\expandafter\@gobble\string\#} +\providecommand{\bibglscircumchar}{\expandafter\@gobble\string\^} +\providecommand{\bibglsdollarchar}{\expandafter\@gobble\string\$} +\providecommand{\bibglsampersandchar}{\expandafter\@gobble\string\&} +\providecommand{\bibglsunderscorechar}{\expandafter\@gobble\string\_} +\providecommand{\bibglshrefchar}[2]{\glspercentchar #1} +\providecommand{\bibglsusesee}[1]{\glsxtrusesee{#1}} +\providecommand{\bibglsusealias}[1]{% + \glsxtrifhasfield{alias}{#1}% + {\expandafter\glsseeformat\expandafter{\glscurrentfieldvalue}{}}% + {}% +} +\providecommand{\bibglsuseseealso}[1]{\glsxtruseseealso{#1}} +\providecommand{\bibglsdelimN}{\delimN} +\providecommand{\bibglslastDelimN}{,~} +\providecommand{\bibglsrange}[1]{#1} +\providecommand{\bibglsinterloper}[1]{#1\bibglsdelimN } +\providecommand{\bibglspassimname}{passim} +\providecommand{\bibglspassim}{ \bibglspassimname} +\providecommand*{\bibglshyperlink}[2]{\glshyperlink[#1]{#2}} + +\providecommand{\bibglsuppercase}{\MakeTextUppercase} +\providecommand{\bibglslowercase}{\MakeTextLowercase} +\providecommand{\bibglsfirstuc}{\makefirstuc} +\providecommand{\bibglstitlecase}{\capitalisewords} + +\providecommand{\bibglsprimaryprefixlabel}[1]{} +\providecommand{\bibglsdualprefixlabel}[1]{} +\providecommand{\bibglstertiaryprefixlabel}[1]{} +\providecommand{\bibglsexternalprefixlabel}[2]{} + +\bibglstertiaryprefixlabel{tertiary.} +\bibglsdualprefixlabel{dual.} +\bibglsprimaryprefixlabel{} +\providecommand{\bibglsseesep}{, } + +\providecommand{\bibglsseealsosep}{, } + +\providecommand{\bibglsaliassep}{, } + +\appto\glossarypreamble{% + \providecommand{\bibglslocsuffix}[1]{\@.}% +} +\providecommand*{\bibglsflattenedhomograph}[2]{#1} +\providecommand{\bibglsnewentry}[4]{% + \longnewglossaryentry*{#1}{name={#3},#2}{#4}% +} + +\bibglsnewentry{alpha}% +{symbol={{}\ensuremath{\alpha}}, +location={\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{3}{Yet Another Section}{section.3}{3}{}\bibglsdelimN \glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{1}{Yet Another Section}{equation.3.1}{3.1}{}\delimR \glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{3}{Yet Another Section}{equation.3.2}{3.3}{}\bibglslocsuffix{4}}, +sort={alpha|}}% +{alpha}% +{Quisque ullamcorper placerat ipsum.} +\glsxtrfieldlistadd{alpha}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{3}{Yet Another Section}{section.3}{3}{}} +\glsxtrfieldlistadd{alpha}{loclist}{\glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{1}{Yet Another Section}{equation.3.1}{3.1}{}} +\glsxtrfieldlistadd{alpha}{loclist}{\glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{2}{Yet Another Section}{equation.3.1}{3.2}{}} +\glsxtrfieldlistadd{alpha}{loclist}{\glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{3}{Yet Another Section}{equation.3.2}{3.3}{}} + + +\bibglsnewentry{amet}% +{location={\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{1}{Sample Section}{section.1}{1}{}\delimR \glsxtrdisplaylocnameref{}{section}{glsnumberformat}{3}{Yet Another Section}{section.3}{3}{}\bibglslocsuffix{3}}, +sort={amet|}}% +{amet}% +{consectetuer} +\glsxtrfieldlistadd{amet}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{1}{Sample Section}{section.1}{1}{}} +\glsxtrfieldlistadd{amet}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{2}{Another Section}{section.2}{2}{}} +\glsxtrfieldlistadd{amet}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{3}{Yet Another Section}{section.3}{3}{}} + + +\bibglsnewentry{beta}% +{symbol={{}\ensuremath{\beta}}, +location={\glsxtrdisplaylocnameref{}{page}{glsnumberformat}{1}{Yet Another Section}{equation.3.1}{1}{}\bibglsdelimN \glsxtrdisplaylocnameref{}{section}{glsnumberformat}{3}{Yet Another Section}{equation.3.1}{3}{}\bibglsdelimN \glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{2}{Yet Another Section}{equation.3.1}{3.2}{}\bibglslastDelimN \glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{3}{Yet Another Section}{equation.3.2}{3.3}{}\bibglslocsuffix{4}}, +sort={beta|}}% +{beta}% +{Cras nibh.} +\glsxtrfieldlistadd{beta}{loclist}{\glsxtrdisplaylocnameref{}{page}{glsnumberformat}{1}{Yet Another Section}{equation.3.1}{1}{}} +\glsxtrfieldlistadd{beta}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{3}{Yet Another Section}{equation.3.1}{3}{}} +\glsxtrfieldlistadd{beta}{loclist}{\glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{2}{Yet Another Section}{equation.3.1}{3.2}{}} +\glsxtrfieldlistadd{beta}{loclist}{\glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{3}{Yet Another Section}{equation.3.2}{3.3}{}} + + +\bibglsnewentry{dolor}% +{location={\glsxtrdisplaylocnameref{}{page}{glsnumberformat}{1}{}{Doc-Start}{1}{}\bibglsdelimN \glsxtrdisplaylocnameref{}{section}{glsnumberformat}{1}{Sample Section}{section.1}{1}{}\bibglslastDelimN \glsxtrdisplaylocnameref{}{page}{glsnumberformat}{2}{Yet Another Section}{equation.3.3}{2}{}\bibglslocsuffix{3}}, +sort={dolor|}}% +{dolor}% +{sit} +\glsxtrfieldlistadd{dolor}{loclist}{\glsxtrdisplaylocnameref{}{page}{glsnumberformat}{1}{}{Doc-Start}{1}{}} +\glsxtrfieldlistadd{dolor}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{1}{Sample Section}{section.1}{1}{}} +\glsxtrfieldlistadd{dolor}{loclist}{\glsxtrdisplaylocnameref{}{page}{glsnumberformat}{2}{Yet Another Section}{equation.3.3}{2}{}} + + +\bibglsnewentry{gamma}% +{symbol={{}\ensuremath{\gamma}}, +location={\glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{3}{Yet Another Section}{equation.3.2}{3.3}{}\bibglslocsuffix{1}}, +sort={gamma|}}% +{gamma}% +{Morbi vel justo vitae lacus tincidunt ultrices.} +\glsxtrfieldlistadd{gamma}{loclist}{\glsxtrdisplaylocnameref{3}{equation}{glsnumberformat}{3}{Yet Another Section}{equation.3.2}{3.3}{}} + + +\bibglsnewentry{lorem}% +{location={\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{2}{Another Section}{section.2}{2}{}\delimR \glsxtrdisplaylocnameref{}{section}{glsnumberformat}{4}{Section about \glsxtrtitletext {lorem}}{section.4}{4}{}\bibglslocsuffix{3}}, +sort={lorem|}}% +{lorem}% +{ipsum} +\glsxtrfieldlistadd{lorem}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{2}{Another Section}{section.2}{2}{}} +\glsxtrfieldlistadd{lorem}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{3}{Yet Another Section}{section.3}{3}{}} +\glsxtrfieldlistadd{lorem}{loclist}{\glsxtrdisplaylocnameref{}{section}{glsnumberformat}{4}{Section about \glsxtrtitletext {lorem}}{section.4}{4}{}} + + diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.pdf new file mode 100644 index 00000000000..4b5440d6bc8 Binary files /dev/null and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.tex new file mode 100644 index 00000000000..94bce091322 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record-nameref.tex @@ -0,0 +1,74 @@ +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +\documentclass{article} + +\usepackage{amsmath} +\usepackage[colorlinks]{hyperref} +\usepackage[record=nameref,% use bib2gls with nameref information (requires bib2gls v1.8+) + equations,% switch to equation counter in numbered equations + floats,% switch to corresponding counter when in a float + counter=section,% use section as the default record counter + stylemods,% load glossaries-extra-stylemods.sty + style=index]{glossaries-extra} + +\GlsXtrLoadResources[ + % entries defined in example-glossaries-brief.bib and + % example-glossaries-symbols: + src={example-glossaries-brief,example-glossaries-symbols}, + sort={en-GB},% sort according to en-GB locale + %selection=all,% select all entries provided in the .bib file + loc-suffix% add default suffix (full stop) for location list + ] + +\begin{document} + +\Gls[counter=page]{dolor}. + +\section{Sample Section} + +\gls{dolor}, \gls{amet}. + +See \url{https://ctan.org/pkg/bib2gls} for converting +\texttt{.bib} to \texttt{.glstex} files. + +\section{Another Section} + +\glspl{lorem}, \gls{amet}. + +`Lorem' unused or undefined? \GlsXtrIfUnusedOrUndefined{lorem}{yes}{no}. + +\begin{figure}[hb] +\centering +X +\caption{Sample Figure \glsfmttext{lorem}} +\end{figure} + +\gls{lorem} again. + +\section{Yet Another Section} + +\Gls{lorem}, \gls{amet}, \gls{alpha}. + +\begin{equation} +\glssymbol{alpha} = 2\glssymbol[counter=page]{beta} +\end{equation} + +\gls{beta}. + +\begin{align} +\glssymbol{alpha} &= 2\glssymbol{beta}\\ +\glssymbol{gamma} &= \glssymbol{beta}[^2] = \frac{1}{4}\glssymbol{alpha}[^2] +\end{align} + +\newpage + +\Gls{lorem} and \gls[counter=page]{dolor}. + +\section{Section about \glsfmttext{lorem}} + +\Gls{lorem}. + +\printunsrtglossary + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.glstex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.glstex index b74d5b0f85f..877454a8b85 100644 --- a/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.glstex +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.glstex @@ -4,6 +4,7 @@ \providecommand{\bibglsdollarchar}{\expandafter\@gobble\string\$} \providecommand{\bibglsampersandchar}{\expandafter\@gobble\string\&} \providecommand{\bibglsunderscorechar}{\expandafter\@gobble\string\_} +\providecommand{\bibglshrefchar}[2]{\glspercentchar #1} \providecommand{\bibglsusesee}[1]{\glsxtrusesee{#1}} \providecommand{\bibglsusealias}[1]{% \glsxtrifhasfield{alias}{#1}% @@ -19,6 +20,19 @@ \providecommand{\bibglspassim}{ \bibglspassimname} \providecommand*{\bibglshyperlink}[2]{\glshyperlink[#1]{#2}} +\providecommand{\bibglsuppercase}{\MakeTextUppercase} +\providecommand{\bibglslowercase}{\MakeTextLowercase} +\providecommand{\bibglsfirstuc}{\makefirstuc} +\providecommand{\bibglstitlecase}{\capitalisewords} + +\providecommand{\bibglsprimaryprefixlabel}[1]{} +\providecommand{\bibglsdualprefixlabel}[1]{} +\providecommand{\bibglstertiaryprefixlabel}[1]{} +\providecommand{\bibglsexternalprefixlabel}[2]{} + +\bibglstertiaryprefixlabel{tertiary.} +\bibglsdualprefixlabel{dual.} +\bibglsprimaryprefixlabel{} \providecommand{\bibglsseesep}{, } \providecommand{\bibglsseealsosep}{, } @@ -43,7 +57,7 @@ } \bibglsnewentry{amet}% -{location={\bibglslocprefix{1}\setentrycounter[]{page}\glsnumberformat{1}\bibglslocsuffix{1}}, +{location={\bibglslocprefix{1}\glsnoidxdisplayloc{}{page}{glsnumberformat}{1}\bibglslocsuffix{1}}, sort={amet|}}% {amet}% {consectetuer} @@ -51,7 +65,7 @@ sort={amet|}}% \bibglsnewentry{dolor}% -{location={\bibglslocprefix{1}\setentrycounter[]{page}\glsnumberformat{1}\bibglslocsuffix{1}}, +{location={\bibglslocprefix{1}\glsnoidxdisplayloc{}{page}{glsnumberformat}{1}\bibglslocsuffix{1}}, sort={dolor|}}% {dolor}% {sit} @@ -59,7 +73,7 @@ sort={dolor|}}% \bibglsnewentry{lorem}% -{location={\bibglslocprefix{1}\setentrycounter[]{page}\glsnumberformat{1}\bibglslocsuffix{1}}, +{location={\bibglslocprefix{1}\glsnoidxdisplayloc{}{page}{glsnumberformat}{1}\bibglslocsuffix{1}}, sort={lorem|}}% {lorem}% {ipsum} 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 64e0ac647a9..f848e59ae07 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-restricteddocdefs.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-restricteddocdefs.pdf index be63df079f9..accd09f288c 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-suppl-hyp.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-hyp.pdf index 910c7ce9aa4..10f8c3dfdd7 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-hyp.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-hyp.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-main-hyp.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-main-hyp.pdf index aa73dc2d4f4..a95cb82a39e 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-main-hyp.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-main-hyp.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-main.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-main.pdf index 49dfb430609..9ad56b316c7 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-main.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl-main.pdf differ diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl.pdf index c625e9bc207..f47b785d145 100644 Binary files a/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl.pdf and b/Master/texmf-dist/doc/latex/glossaries-extra/sample-suppl.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 aed944fa697..e464cc52b43 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 a0ad64e9a75..3841fb1049c 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 7209cc15114..0ea4e2ebace 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 6f310deb315..ff6496ec21a 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 8a9e2fa5658..755decd8922 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx @@ -1,23 +1,24 @@ %\iffalse % glossaries-extra.dtx generated using makedtx version 1.2 (c) Nicola Talbot % Command line args: +% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" % -doc "glossaries-extra-codedoc.tex" +% -section "chapter" +% -author "Nicola Talbot" % -src "glossaries-extra.sty\Z=>glossaries-extra.sty" % -src "glossaries-extra-bib2gls.sty\Z=>glossaries-extra-bib2gls.sty" % -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty" % -src "glossary-bookindex.sty\Z=>glossary-bookindex.sty" +% -src "glossary-longextra.sty\Z=>glossary-longextra.sty" % -src "(example-glossaries-.+\.tex)\Z=>\1" % -src "(example-glossaries-.+\.bib)\Z=>\1" -% -author "Nicola Talbot" +% -comment ".*\.tex" +% -comment ".*\.bib" % -macrocode ".*\.tex" % -macrocode ".*\.bib" % -setambles ".*\.bib=>\nopreamble\nopostamble" -% -comment ".*\.tex" -% -comment ".*\.bib" -% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" -% -section "chapter" % glossaries-extra -% Created on 2018/8/18 20:14 +% Created on 2018/11/30 18:41 %\fi %\iffalse %<*package> @@ -87,6 +88,18 @@ package}, description={An indexing application}, } +\newglossaryentry{bib2gls}{% +name={\appfmt{bib2gls}\index{bib2gls=\appfmt{bib2gls}|htextbf}},% +sort={bib2gls},% +text={\appfmt{bib2gls}\iapp{bib2gls}},% +description={A command line Java application that selects +entries from a .bib file and converts them to glossary +definitions (like \appfmt{bibtex} but also performs hierarchical +sorting and collation, thus omitting the need for \gls{xindy} or +\gls{makeindex}). Further details at: +\url{http://www.dickimaw-books.com/software/bib2gls/}.}% +} + \let\glsd\glsuseri \let\glsation\glsuserii @@ -167,13 +180,13 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \raggedright } -\title{glossaries-extra.sty v1.36: +\title{glossaries-extra.sty v1.37: documented code} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} -\date{2018-08-18} +\date{2018-11-30} \begin{document} \DocInput{glossaries-extra.dtx} @@ -218,7 +231,7 @@ Dickimaw Books\\ %\section{Package Initialisation and Options} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2018/08/18 v1.36 (NLCT)] +\ProvidesPackage{glossaries-extra}[2018/11/30 1.37 (NLCT)] % \end{macrocode} % Requires \sty{xkeyval} to define package options. % \begin{macrocode} @@ -484,7 +497,7 @@ Dickimaw Books\\ %\begin{macro}{\@@glsxtr@record} %\changes{1.08}{2016-12-13}{new} %The \pkgopt[only]{record} option sets \cs{@glsxtr@record} to this. -%This performs the recording if the entry doesn't exist and is done +%This performs the recording if the entry \emph{doesn't exist} and is done %at the start of \cs{@gls@field@link} and commands like \cs{@gls@} %(before the existence test). This means that it disregards the %\gloskey[glslink]{wrgloss} key. @@ -515,6 +528,13 @@ Dickimaw Books\\ % \begin{macrocode} \let\@gls@counter\glscounter % \end{macrocode} +%Unless the \pkgopt{equations} option is on and this is inside a +%numbered maths environment. +% \begin{macrocode} + \if@glsxtr@equations + \@glsxtr@use@equation@counter + \fi +% \end{macrocode} %Check for default options (which may switch off indexing). %\changes{1.21}{2017-11-03}{added check for default options} % \begin{macrocode} @@ -529,14 +549,19 @@ Dickimaw Books\\ % \begin{macrocode} \setkeys{#3}{#1}% % \end{macrocode} -%Implement any post-key settings. +%Implement any post-key settings. Is the auto-add on? +%\changes{1.37}{2018-11-30}{added check for auto-add} +% \begin{macrocode} + \glsxtr@do@autoadd{#3}% +% \end{macrocode} +% Check post-key hook. %\changes{1.30}{2018-04-25}{added check for post-key hook} % \begin{macrocode} \csuse{@glsxtr@#3@postkeys}% % \end{macrocode} %Increment associated counter. % \begin{macrocode} - \glsxtr@inc@wrglossaryctr{#2}% + \glsxtr@inc@wrglossaryctr{#2}% % \end{macrocode} %Check if \gloskey[glslink]{noindex} option has been used. % \begin{macrocode} @@ -622,7 +647,6 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -% %\begin{macro}{\@glsxtr@dorecord} %\changes{1.08}{2016-12-13}{new} %\changes{1.15}{2017-05-10}{corrected premature expansion of \cs{@glslocref}} @@ -649,10 +673,17 @@ Dickimaw Books\\ %If the counter isn't \counter{page} then it needs expanding. If the %location includes \cs{thepage} then \cs{protected@write} will %automatically deal with it. +%\changes{1.37}{2018-11-30}{added check for record=nameref} % \begin{macrocode} - \protected@write\@auxout{}{\string\glsxtr@record + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% - {\@glsrecordlocref}}% + {\@glsrecordlocref}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\@glsrecordlocref}}% + \fi \@glsxtr@counterrecordhook \let\@glo@counterprefix\@glsxtr@orgprefix } @@ -670,23 +701,87 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*\@glsxtr@dorecordnodefer{% \ifx\theglsentrycounter\theHglsentrycounter - \protected@write\@auxout{}{\string\glsxtr@record - {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% - {\theglsentrycounter}}% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record + {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}}% + \fi \else - \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix - {\theglsentrycounter}{\theHglsentrycounter}% - }% - \@do@gls@getcounterprefix - \protected@write\@auxout{}{\string\glsxtr@record - {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% - {\theglsentrycounter}}% + \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix + {\theglsentrycounter}{\theHglsentrycounter}% + }% + \@do@gls@getcounterprefix + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}% + {\@glsnumberformat}{\theglsentrycounter}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}}% + \fi \fi \@glsxtr@counterrecordhook } % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsxtr@ifnum@mmode} +%\changes{1.37}{2018-11-30}{new} +%Check if in a numbered maths environment. +%The \sty{amsmath} package is automatically loaded by +%\sty{datatool-base}, which is required by \sty{glossaries}, so \cs{ifst@rred} +%and \cs{if@display} should both be defined. +% \begin{macrocode} +\newcommand{\@glsxtr@ifnum@mmode}[2]{% + \ifmmode + \ifst@rred + #2% + \else +% \end{macrocode} +% Non-\sty{amsmath} environments and regular inline math mode isn't +% flagged as starred by \sty{amsmath}, but we can't use \cs{mathchoice} +% in this case as it's not the current style that's relevant. +% Instead we can use \sty{amsmath}'s \cs{if@display}. This may not +% work for environments that aren't provided by \sty{amsmath}. +% \begin{macrocode} + \if@display #1\else #2\fi + \fi + \else + #2% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@do@nameref@record} +%\changes{1.37}{2018-11-30}{new} +%With \pkgopt[nameref]{record}, the current label information is included +%in the record, but this may not have been defined, so \cs{csuse} will +%prevent an undefined control sequence error and just leave the last +%two arguments blank if there's no information. In the event that a record is in +%\sty{amsmath}'s \env{align} environment \cs{@currentHref} will be out. +%There may be other instances where \cs{@currentHref} is out, so +%this also saves \cs{theHglsentrycounter}, which is +%useful if it can't be obtained by prefixing +%\cs{theglsentrycounter}. +% \begin{macrocode} +\newcommand*{\@glsxtr@do@nameref@record}[5]{% + \gls@ifnotmeasuring + {% + \protected@write\@auxout{}{\string\glsxtr@record@nameref + {#1}{#2}{#3}{#4}{#5}% + {\csuse{@currentlabelname}}{\csuse{@currentHref}}% + {\theHglsentrycounter}}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@@glsxtr@recordcounter} %\changes{1.12}{2017-02-03}{new} % \begin{macrocode} @@ -832,6 +927,30 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsxtr@record@setting@nameref} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@record@setting@nameref}{nameref} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@if@record@only} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@if@record@only}[2]{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only + #1% + \else + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + #1% + \else + #2% + \fi + \fi +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@record@setting@off} %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} @@ -839,13 +958,56 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsxtr@record@only@setup} +%\changes{1.37}{2018-11-30}{new} +%Initialisation code for record=only and record=nameref +% \begin{macrocode} +\newcommand*{\@glsxtr@record@only@setup}{% + \def\glsxtr@setup@record{% + \@glsxtr@autoseeindexfalse + \let\@do@seeglossary\@glsxtr@recordsee + \let\@glsxtr@record\@@glsxtr@record + \let\@@do@wrglossary\@glsxtr@do@record@wrglossary + \let\@gls@saveentrycounter\relax + \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}% +% \end{macrocode} +%Switch off the index suppression for aliased entries. +%(bib2gls will deal with them.) +% \begin{macrocode} + \def\glsxtrsetaliasnoindex{}% +% \end{macrocode} +% \cs{@gls@setupsort@none} was only introduced to +% \sty{glossaries} v4.30, so it may not be available. If it's +% defined, use it to remove the unnecessary overhead of escaping and +% sanitizing the sort value. +%\changes{1.16}{2017-06-15}{added check for \cs{@gls@setupsort@none}} +% \begin{macrocode} + \ifdef\@gls@setupsort@none{\@gls@setupsort@none}{}% +% \end{macrocode} +% Warn about using \cs{printglossary}: +% \begin{macrocode} + \def\glsxtrNoGlossaryWarning{\@glsxtr@record@noglossarywarning}% +% \end{macrocode} +%Load \sty{glossaries-extra-bib2gls}: +% \begin{macrocode} + \RequirePackage{glossaries-extra-bib2gls}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{option}{record} %Now define the \pkgopt{record} package option. %\changes{1.08}{2016-12-13}{added \pkgopt{record} package option} % \begin{macrocode} \define@choicekey{glossaries-extra.sty}{record} [\@glsxtr@record@setting\glsxtr@record@nr]% - {off,only,alsoindex}% + {off,only,alsoindex,nameref}% [only]% {% \ifcase\glsxtr@record@nr\relax @@ -867,40 +1029,7 @@ Dickimaw Books\\ % \end{macrocode} %Only record (don't index). % \begin{macrocode} - \def\glsxtr@setup@record{% - \@glsxtr@autoseeindexfalse - \let\@do@seeglossary\@glsxtr@recordsee - \let\@glsxtr@record\@@glsxtr@record - \let\@@do@wrglossary\@glsxtr@do@record@wrglossary - \let\@gls@saveentrycounter\relax - \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}% -% \end{macrocode} -%Switch off the index suppression for aliased entries. -%(bib2gls will deal with them.) -% \begin{macrocode} - \def\glsxtrsetaliasnoindex{}% -% \end{macrocode} -% \cs{@gls@setupsort@none} was only introduced to -% \sty{glossaries} v4.30, so it may not be available. If it's -% defined, use it to remove the unnecessary overhead of escaping and -% sanitizing the sort value. -%\changes{1.16}{2017-06-15}{added check for \cs{@gls@setupsort@none}} -% \begin{macrocode} - \ifdef\@gls@setupsort@none{\@gls@setupsort@none}{}% -% \end{macrocode} -% Warn about using \cs{printglossary}: -% \begin{macrocode} - \def\glsxtrNoGlossaryWarning{\@glsxtr@record@noglossarywarning}% -% \end{macrocode} -%Load \sty{glossaries-extra-bib2gls}: -% \begin{macrocode} - \RequirePackage{glossaries-extra-bib2gls}% - }% + \@glsxtr@record@only@setup \or % \end{macrocode} %Record and index. This option doesn't load @@ -919,6 +1048,15 @@ Dickimaw Books\\ \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% \undef\glsxtrsetaliasnoindex }% + \or +% \end{macrocode} +%Only record (don't index) but also include nameref information. +% \begin{macrocode} + \@glsxtr@record@only@setup + \ifundef\hyperlink + {\GlossariesExtraWarning{You have requested record=nameref but + the document doesn't support hyperlinks}}% + {}% \fi } % \end{macrocode} @@ -1030,6 +1168,49 @@ Dickimaw Books\\ % \end{macrocode} %\end{option} % +%\begin{option}{equations} +%Provide a boolean option to automatically switch to the +%\ctr{equation} counter when in a numbered maths environment. +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\define@boolkey{glossaries-extra.sty}[@glsxtr@]{equations}[true]{% +} +\@glsxtr@equationsfalse +% \end{macrocode} +%\end{option} +% +%\begin{macro}{\glsxtr@float} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\let\glsxtr@float\@float +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@dblfloat} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\let\glsxtr@dblfloat\@dblfloat +% \end{macrocode} +%\end{macro} +% +%\begin{option}{floats} +%Provide a boolean option to automatically switch to the +%the corresponding counter when in a float. +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\define@boolkey{glossaries-extra.sty}[@glsxtr@]{floats}[true]{% + \if@glsxtr@floats + \renewcommand*{\@float}[1]{\renewcommand{\glscounter}{##1}\glsxtr@float{##1}}% + \renewcommand*{\@dblfloat}[1]{\renewcommand{\glscounter}{##1}\glsxtr@dblfloat{##1}}% + \else + \let\@float\glsxtr@float + \let\@dblfloat\glsxtr@dblfloat + \fi +} +\@glsxtr@floatsfalse +% \end{macrocode} +%\end{option} +% %\begin{macro}{\GlossariesExtraWarning} %Allow users to suppress warnings. % \begin{macrocode} @@ -1840,6 +2021,52 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@getcounterprefix} +%\changes{1.37}{2018-11-30}{new} +%This command is provided by the base \sty{glossaries} package, but +%is redefined here. +%The standard indexing methods don't directly store the hypertarget +%but instead need to split it into the counter, prefix and location +%parts, which can be reconstituted in the location list. +%Unfortunately, not all targets are in this form, so the links fail. +%With \pkgopt[nameref]{record}, the complete target name can be +%saved, so this modification adjusts the warning. +% \begin{macrocode} +\renewcommand*\@gls@getcounterprefix[2]{% + \protected@edef\@gls@thisloc{#1}\protected@edef\@gls@thisHloc{#2}% + \ifx\@gls@thisloc\@gls@thisHloc + \def\@glo@counterprefix{}% + \else + \def\@gls@get@counterprefix##1.#1##2\end@getprefix{% + \def\@glo@tmp{##2}% + \ifx\@glo@tmp\@empty + \def\@glo@counterprefix{}% + \else + \def\@glo@counterprefix{##1}% + \fi + }% + \@gls@get@counterprefix#2.#1\end@getprefix +% \end{macrocode} +% Warn if no prefix can be formed, unless \pkgopt[nameref]{record}. +% \begin{macrocode} + \ifx\@glo@counterprefix\@empty + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \else + \GlossariesExtraWarning{Hyper target `#2' can't be formed by + prefixing^^Jlocation `#1'. You need to modify the + definition of \string\theH\@gls@counter^^Jotherwise you + will get the warning: "`name{\@gls@counter.#1}' has been^^J + referenced but does not exist"% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only + . You may want to consider using record=nameref instead% + \fi}% + \fi + \fi + \fi +} +% \end{macrocode} +%\end{macro} +% %Provide script dialect hook (does nothing unless %redefined by \sty{glossaries-extra-bib2gls}). %\begin{macro}{\@glsxtrdialecthook} @@ -2339,10 +2566,42 @@ Dickimaw Books\\ % %\begin{macro}{\Glsxtrusefield} %\changes{1.12}{2017-02-03}{new} +%\changes{1.37}{2018-11-30}{fixed internal command and added check for +%\cs{texorpdfstring}} %Provide a user-level alternative to \cs{@Gls@entry@field}. % \begin{macrocode} -\newcommand*{\Glsxtrusefield}[2]{% - \@gls@entry@field{#1}{#2}% +\ifdef\texorpdfstring +{ + \newcommand*{\Glsxtrusefield}[2]{% + \texorpdfstring + {\@Gls@entry@field{#1}{#2}} + {\@gls@entry@field{#1}{#2}}% + } +} +{ + \newcommand*{\Glsxtrusefield}[2]{% + \@Gls@entry@field{#1}{#2}% + } +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrusefield} +%\changes{1.37}{2018-11-30}{new} +%As above but convert to all caps. +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSxtrusefield}[2]{% + \texorpdfstring + {\glsdoifexists{#1}{\mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}}}% + {\@gls@entry@field{#1}{#2}}% + } +} +{ + \newcommand*{\GLSxtrusefield}[2]{% + \glsdoifexists{#1}{\mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}}% + } } % \end{macrocode} %\end{macro} @@ -3165,6 +3424,7 @@ Dickimaw Books\\ %\begin{macro}{\glsseeitemformat} %\changes{1.21}{2017-11-03}{new} %\changes{1.22}{2017-11-08}{switched check from regular to short} +%\changes{1.37}{2018-11-30}{removed reference to \cs{glslabel}} %\styfmt{glossaries} originally defined \cs{glsseeitemformat} %to use \cs{glsentryname} but in v3.0 this was switched to %use \cs{glsentrytext} due to problems occurring with the @@ -3175,11 +3435,120 @@ Dickimaw Books\\ %for abbreviations. % \begin{macrocode} \renewcommand*{\glsseeitemformat}[1]{% - \ifglshasshort{\glslabel}{\glsaccesstext{#1}}{\glsaccessname{#1}}% + \ifglshasshort{#1}{\glsaccesstext{#1}}{\glsaccessname{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrhiername} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glsxtrhiername}\marg{label} +%\end{definition} +%Displays the hierarchical name for the given entry. The +%cross-reference format \cs{glsseeitemformat} may be redefined to +%use this command to show the hierarchy, if required. +% \begin{macrocode} +\newcommand*{\glsxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\glsxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {}% + \ifglshasshort{#1}{\glsaccessshort{#1}}{\glsaccessname{#1}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrhiername} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{Glsxtrhiername}\marg{label} +%\end{definition} +%As above but displays the top-level name with an initial capital. +% \begin{macrocode} +\newcommand*{\Glsxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {% + \Glsxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep + \ifglshasshort{#1}{\glsaccessshort{#1}}{\glsaccessname{#1}}% + }% + {\ifglshasshort{#1}{\Glsaccessshort{#1}}{\Glsaccessname{#1}}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrhiername} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{GlsXtrhiername}\marg{label} +%\end{definition} +%As above but converts the first letter of each name to a capital. +% \begin{macrocode} +\newcommand*{\GlsXtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\GlsXtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {}% + \ifglshasshort{#1}{\Glsaccessshort{#1}}{\Glsaccessname{#1}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrhiername} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{GLSxtrhiername}\marg{label} +%\end{definition} +%As above but displays the top-level name in all-caps. +% \begin{macrocode} +\newcommand*{\GLSxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {% + \GLSxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep + \ifglshasshort{#1}{\glsaccessshort{#1}}{\glsaccessname{#1}}% + }% + {\ifglshasshort{#1}{\GLSaccessshort{#1}}{\GLSaccessname{#1}}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSXTRhiername} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{GLSXTRhiername}\marg{label} +%\end{definition} +%As above but displays all names in all-caps. +% \begin{macrocode} +\newcommand*{\GLSXTRhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\GLSXTRhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {} + \ifglshasshort{#1}{\GLSaccessshort{#1}}{\GLSaccessname{#1}}% + }% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrhiernamesep} +%\changes{1.37}{2018-11-30}{new} +%Separator used in \cs{glsxtrhiername} and variants. +% \begin{macrocode} +\newcommand*{\glsxtrhiernamesep}{\,{\small$\triangleright$}\,} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtruseseealso} %\changes{1.16}{2017-06-15}{new} %Apply \cs{glsseeformat} to the \gloskey{seealso} key if not empty. @@ -4518,26 +4887,76 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\begin{macro}{\@gls@link} -%\changes{1.14}{2017-04-18}{added redefinition} -%Redefine to allow the indexing to be placed after the link text. By -%default this is done before the link text to prevent problems that -%can occur from the whatsit, but there may be times when the user -%would like the indexing done afterwards even though it causes a -%whatsit. +%\begin{macro}{\@glsxtr@use@equation@counter@or} +%\changes{1.37}{2018-11-30}{new} +%If in a numbered equation, change the counter to \ctr{equation}. +%This can be overridden by explicitly setting the counter in the +%optional argument of commands like \cs{gls} and \cs{glslink}. % \begin{macrocode} -\def\@gls@link[#1]#2#3{% - \leavevmode - \edef\glslabel{\glsdetoklabel{#2}}% - \def\@gls@link@opts{#1}% - \let\@gls@link@label\glslabel - \let\@glsnumberformat\@glsxtr@defaultnumberformat - \edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}% - \edef\glstype{\csname glo@\glslabel @type\endcsname}% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper +\newcommand*{\@glsxtr@use@equation@counter}{% + \@glsxtr@ifnum@mmode{\def\@gls@counter{equation}}{}% +} % \end{macrocode} -%Save current value of \cs{glolinkprefix}: -% \begin{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@do@autoadd} +%\changes{1.37}{2018-11-30}{new} +%If \cs{GlsXtrAutoAddOnFormat} is used, this will automatically use +%\cs{glsadd}. It's therefore only used with \cs{@gls@link} not with +%\cs{glsadd} otherwise it could trigger an infinite loop. The +%argument indicates the key family (glslink or glossadd). +% \begin{macrocode} +\newcommand*{\glsxtr@do@autoadd}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrAutoAddOnFormat} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{GlsXtrAutoAddOnFormat}\oarg{label}\marg{format list}\marg{glsadd options} +%\end{definition} +%If an entry is indexed with the format set to one identified in the +%comma-separated list, then automatically index it using \cs{glsadd} +%with the given options, which may override the current options. +%Scoping is needed to prevent leakage. +% \begin{macrocode} +\newcommand*{\GlsXtrAutoAddOnFormat}[3][\glslabel]{% + \renewcommand*{\glsxtr@do@autoadd}[1]{% + \begingroup + \protected@edef\@glsxtr@do@autoadd{% + \noexpand\ifstrequal{##1}{glslink}% + {% + \noexpand\DTLifinlist{\@glsnumberformat}{#2}{\noexpand\glsadd[format={\@glsnumberformat},#3]{#1}}{}% + }% + {}% + }% + \@glsxtr@do@autoadd + \endgroup + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@link} +%\changes{1.14}{2017-04-18}{added redefinition} +%Redefine to allow the indexing to be placed after the link text. By +%default this is done before the link text to prevent problems that +%can occur from the whatsit, but there may be times when the user +%would like the indexing done afterwards even though it causes a +%whatsit. +% \begin{macrocode} +\def\@gls@link[#1]#2#3{% + \leavevmode + \edef\glslabel{\glsdetoklabel{#2}}% + \def\@gls@link@opts{#1}% + \let\@gls@link@label\glslabel + \let\@glsnumberformat\@glsxtr@defaultnumberformat + \edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}% + \edef\glstype{\csname glo@\glslabel @type\endcsname}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper +% \end{macrocode} +%Save current value of \cs{glolinkprefix}: +% \begin{macrocode} \let\@glsxtr@org@glolinkprefix\glolinkprefix % \end{macrocode} %Initialise \cs{@glsxtr@local@textformat} @@ -4565,7 +4984,13 @@ Dickimaw Books\\ % \end{macrocode} %Increment link counter if enabled (new to v1.26). % \begin{macrocode} - \glsxtr@inc@linkcount + \glsxtr@inc@linkcount +% \end{macrocode} +% Check if the \pkgopt{equations} option has been set (new to v1.37). +% \begin{macrocode} + \if@glsxtr@equations + \@glsxtr@use@equation@counter + \fi % \end{macrocode} % As the original definition. % \begin{macrocode} @@ -4580,6 +5005,10 @@ Dickimaw Books\\ % \begin{macrocode} \setkeys{glslink}{#1}% % \end{macrocode} +%Perform auto add if set (new to v1.37) +% \begin{macrocode} + \glsxtr@do@autoadd{glslink}% +% \end{macrocode} %User hook after options are set: % \begin{macrocode} \glslinkpostsetkeys @@ -4690,6 +5119,7 @@ Dickimaw Books\\ % %\begin{macro}{\glsadd} %\changes{1.08}{2016-12-13}{added \cs{@glsxtr@record}} +%\changes{1.37}{2018-11-30}{added grouping} %Redefine to include \cs{@glsxtr@record} and suppress in headings % \begin{macrocode} \renewrobustcmd*{\glsadd}[2][]{% @@ -4697,39 +5127,50 @@ Dickimaw Books\\ {}% {% \@gls@adjustmode - \@glsxtr@record{#1}{#2}{glossadd}% - \glsdoifexists{#2}% - {% - \let\@glsnumberformat\@glsxtr@defaultnumberformat - \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}% - \def\@glsxtr@thevalue{}% - \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% + \begingroup + \@glsxtr@record{#1}{#2}{glossadd}% + \glsdoifexists{#2}% + {% + \let\@glsnumberformat\@glsxtr@defaultnumberformat + \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}% + \def\@glsxtr@thevalue{}% + \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% % \end{macrocode} %Implement any default settings (before options are set) %\changes{1.30}{2018-04-25}{added \cs{glsaddpresetkeys}} % \begin{macrocode} - \glsaddpresetkeys - \setkeys{glossadd}{#1}% + \glsaddpresetkeys + \setkeys{glossadd}{#1}% % \end{macrocode} %Implement any default settings (after options are set) %\changes{1.30}{2018-04-25}{added \cs{glsaddpostsetkeys}} % \begin{macrocode} - \glsaddpostsetkeys - \ifdefempty{\@glsxtr@thevalue}% - {% - \@gls@saveentrycounter - }% - {% - \let\theglsentrycounter\@glsxtr@thevalue - \def\theHglsentrycounter{\@glsxtr@theHvalue}% - }% + \glsaddpostsetkeys + \ifdefempty{\@glsxtr@thevalue}% + {% + \@gls@saveentrycounter + }% + {% + \let\theglsentrycounter\@glsxtr@thevalue + \def\theHglsentrycounter{\@glsxtr@theHvalue}% + }% % \end{macrocode} % Define sort key if necessary (in case of \pkgopt[use]{sort}): %\changes{1.24}{2017-11-14}{added \cs{@gls@setsort}} % \begin{macrocode} - \@gls@setsort{#2}% - \@@do@wrglossary{#2}% - }% + \@gls@setsort{#2}% +% \end{macrocode} +%Ensure that indexing occurs (since that's the point of +%\cs{glsadd}). If indexing has been switched off by default, don't +%want the setting to affect \cs{glsadd}. The ignored format +%\cs{glsignore} can be used for selection without location, but the +%indexing still needs to be performed. +%\changes{1.37}{2018-11-30}{ensure that \cs{glsadd} performs indexing} +% \begin{macrocode} + \KV@glslink@noindexfalse + \@@do@wrglossary{#2}% + }% + \endgroup }% } % \end{macrocode} @@ -6094,6 +6535,16 @@ Dickimaw Books\\ \let\@gls@hyp@opt\@gls@alt@hyp@opt \def\@gls@alt@hyp@opt@char{#1}% \def\@gls@alt@hyp@opt@keys{#2}% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off + {}% + {% +% \end{macrocode} +%Let \gls{bib2gls} know the modifier. +%\changes{1.37}{2018-11-30}{write modifier to aux} +% \begin{macrocode} + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@altmodifier}[1]{}}% + \protected@write\@auxout{}{\string\@glsxtr@altmodifier{#1}}% + }% } % \end{macrocode} %\end{macro} @@ -8114,12 +8565,15 @@ Dickimaw Books\\ %\changes{1.0}{2016-01-24}{new} % \begin{macrocode} \renewcommand*{\makeglossaries}[1][]{% - \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only + \@glsxtr@if@record@only + {% \PackageError{glossaries-extra}{\string\makeglossaries\space - not permitted\MessageBreak with record=only package option}% + not permitted\MessageBreak with record=\@glsxtr@record@setting\space + package option}% {You may only use \string\makeglossaries\space with record=off or record=alsoindex options}% - \else + }% + {% \ifblank{#1}% {\@glsxtr@org@makeglossaries}% {% @@ -8310,7 +8764,7 @@ Dickimaw Books\\ \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}% \fi }% - \fi + }% } % \end{macrocode} %\end{macro} @@ -8968,6 +9422,9 @@ Dickimaw Books\\ % %\begin{macro}{\glsxtrlocationhyperlink} %\changes{1.14}{2017-04-18}{new} +%\begin{definition} +%\cs{glsxtrlocationhyperlink}\marg{counter}\marg{prefix}\marg{location} +%\end{definition} % \begin{macrocode} \newcommand*{\glsxtrlocationhyperlink}[3]{% \ifdefvoid\glsxtrsupplocationurl @@ -9328,6 +9785,11 @@ Dickimaw Books\\ \makeatletter \@input{#2.glstex}% \@bibgls@restoreat +% \end{macrocode} +% If the \pkgopt[nameref]{record} option has been set, check if this +% is supported by the installed version of \app{bib2gls}. +% \begin{macrocode} + \@glsxtr@check@bibgls@nameref }% {% \GlossariesExtraWarning{No file `#2.glstex'}% @@ -9338,6 +9800,25 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsxtr@check@bibgls@nameref} +%\changes{1.37}{2018-11-30}{new} +%This will only warn after \app{bib2gls} has created the .glstex +%file, but there's way to check before. +% \begin{macrocode} +\newcommand{\@glsxtr@check@bibgls@nameref}{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \ifdef\bibglshrefchar + {}% + {% + \GlossariesExtraWarning{record=nameref requires at least + version 1.8 of bib2gls}% + }% + \fi + \let\@glsxtr@check@bibgls@nameref\relax +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrresourceinit} %\changes{1.21}{2017-11-03}{new} %Code used during the protected write operation. @@ -9444,6 +9925,13 @@ Dickimaw Books\\ \protected@write\@auxout{}% {\string\providecommand*{\string\glsxtr@record}[5]{}}% % \end{macrocode} +%\changes{1.37}{2018-11-30}{provide \cs{glsxtr@record@nameref} in aux file} +% \begin{macrocode} + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@record@nameref}[8]{}}% + \fi +% \end{macrocode} %If any languages have been loaded, the language tag will be %available in \cs{CurrentTrackedLanguageTag} (provided by %\sty{tracklang}). For multilingual @@ -9529,6 +10017,15 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtr@record@nameref} +%\changes{1.37}{2018-11-30}{new} +%Used with \pkgopt[nameref]{record} to include current label +%information. +% \begin{macrocode} +\newcommand*{\glsxtr@record@nameref}[8]{} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtr@counterrecord} %\changes{1.12}{2017-02-03}{new} %Aux file command. @@ -9605,7 +10102,7 @@ Dickimaw Books\\ \ifglshasparent{#1}% {\GlsXtrStandaloneSubEntryItem{#1}}% {\glsentryitem{#1}}% - \glstarget{#1}{\glossentryname{#1}}% + \GlsXtrStandaloneEntryName{#1}% \endgroup }% }% @@ -9615,6 +10112,15 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\GlsXtrStandaloneEntryName} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrStandaloneEntryName}[1]{% + \glstarget{#1}{\glossentryname{#1}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsXtrStandaloneGlossaryType} %\changes{1.31}{2018-05-09}{new} %To make it easier to adjust the definition of \cs{currentglossary} @@ -9686,7 +10192,7 @@ Dickimaw Books\\ \ifglshasparent{#1}% {\GlsXtrStandaloneSubEntryItem{#1}}% {\glsentryitem{#1}}% - \glstarget{#1}{\glossentrynameother{#1}{#2}}% + \GlsXtrStandaloneEntryOther{#1}% \endgroup }% }% @@ -9696,6 +10202,15 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\GlsXtrStandaloneEntryOther} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrStandaloneEntryOther}[2]{% + \glstarget{#1}{\glossentrynameother{#1}{#2}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\printunsrtglossary} %\changes{1.08}{2016-12-13}{new} %\changes{1.12}{2017-02-03}{added starred form} @@ -10003,6 +10518,14 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\GlsXtrLocationField} +%\changes{1.37}{2018-11-30}{new} +%Stores the internal name of the location field. +% \begin{macrocode} +\newcommand*{\GlsXtrLocationField}{location} +% \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 @@ -10013,7 +10536,7 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% \ifglsentryexists{#1}% {% \global\letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% - \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@location}% + \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@\GlsXtrLocationField}% \ifglshasparent{#1}% {% \gls@level=\csuse{glo@\glsdetoklabel{#1}@level}\relax @@ -10081,6 +10604,32 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% %help make it unique, but it might feasibly contain %\gloskey[glslink]{thevalue} where the value might contain commands.) % +%\begin{macro}{\@glsxtr@providenewgls} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@providenewgls}{% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@newglslike}[2]{}}% + \let\@glsxtr@providenewgls\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtridentifyglslike} +%\changes{1.37}{2018-11-30}{new} +%Identify the command given in the second argument for the benefit +%of \gls{bib2gls}. +% \begin{macrocode} +\newcommand{\glsxtridentifyglslike}[2]{% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off + {}% + {% + \@glsxtr@providenewgls + \protected@write\@auxout{}{\string\@glsxtr@newglslike{#1}{\string#2}}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtrnewgls} %\changes{1.21}{2017-11-03}{new} %\begin{definition} @@ -10096,6 +10645,10 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% defined}{}% }% {% +% \end{macrocode} +%Write information to the aux file for bib2gls. +% \begin{macrocode} + \glsxtridentifyglslike{#2}{#3}% \ifcsdef{@#4like@#2}% {% \advance\@glsxtrnewgls@inner by \@ne @@ -22405,7 +22958,7 @@ defined}{}% %automatically loaded by the record option. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-bib2gls}[2018/08/18 v1.36 (NLCT)] +\ProvidesPackage{glossaries-extra-bib2gls}[2018/11/30 1.37 (NLCT)] % \end{macrocode} % %These are some convenient macros for use with custom rules. @@ -22443,6 +22996,32 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsrenewcommand} +%\changes{1.37}{2018-11-30}{new} +%Like \cs{renewcommand} but only generates a warning rather than an +%error if the command isn't defined. +% \begin{macrocode} +\newcommand*{\glsrenewcommand}{\@star@or@long\glsxtr@renewcommand} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@renewcommand} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@renewcommand}[1]{% + \begingroup \escapechar\m@ne\xdef\@gtempa{{\string#1}}\endgroup + \expandafter\@ifundefined\@gtempa + {% + \GlossariesExtraWarning{can't redefine \noexpand#1(not already defined)}% + }% + \relax + \relax + \let\@ifdefinable\@rc@ifdefinable + \new@command#1% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtr@wrglossarylocation} %\changes{1.29}{2018-04-09}{new} %For use with \pkgopt{indexcounter} and \app{bib2gls}. @@ -22587,4843 +23166,6828 @@ defined}{}% % \end{macrocode} %\end{macro} % -%Provide missing Greek letters for use in maths mode. -%These commands are recognised by \app{bib2gls} and will be mapped to the -%Mathematical Greek Italic letters. This ensures that the Greek -%letters that have the same shape as Latin letters are kept -%with the other mathematical Greek letters for sorting purposes. -%The \LaTeX\ version of these commands (provided here) use an upright font -%for capitals and italic for lower case to provide a better match -%with the other Greek symbols provided by the kernel. -% -%\begin{macro}{\Alpha} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrdisplaylocnameref} +%\changes{1.37}{2018-11-30}{new} +%\cs{glsxtrdisplaylocnameref}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{name}\marg{href}\marg{hcounter}\marg{external +%file} +%Used with the \sty[nameref]{record} package option. The \meta{href} +%argument was obtained from \cs{@currentHref} and the +%\meta{hcounter} argument was obtained from \cs{theHentrycounter}, +%which is more reliable. +%If \sty{hyperref} hasn't been loaded, this just behaves like \cs{glsnoidxdisplayloc}. % \begin{macrocode} -\providecommand*{\Alpha}{\mathrm{A}} +\ifundef\hyperlink +{ + \newcommand*{\glsxtrdisplaylocnameref}[8]{% + \glsnoidxdisplayloc{#1}{#2}{#3}{#4}% + } +} +{ % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Beta} -%\changes{1.27}{2018-02-26}{new} +% Default action uses \meta{hcounter}. Equations and pages typically don't +% have a title, so check the counter name. % \begin{macrocode} -\providecommand*{\Beta}{\mathrm{B}} + \newcommand*{\glsxtrdisplaylocnameref}[8]{% + \ifstrequal{#2}{equation}% + {\glsxtrnamereflink{#3}{(#4)}{#2.#7}{#8}}% + {% + \ifstrempty{#5}% + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Epsilon} -%\changes{1.27}{2018-02-26}{new} +%No title, so just use the location as the link text. % \begin{macrocode} -\providecommand*{\Epsilon}{\mathrm{E}} + \glsxtrnamereflink{#3}{#4}{#2.#7}{#8}% + }% + {% + \ifstrequal{#2}{page}% + {\glsxtrnamereflink{#3}{#4}{#2.#7}{#8}}% + {\glsxtrnamereflink{#3}{#5}{#2.#7}{#8}}% + }% + }% + } +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Zeta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrnamereflink} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glsxtrfmtnamereflink}\marg{format}\marg{title}\marg{href}\marg{external +%file} +%\end{definition} % \begin{macrocode} -\providecommand*{\Zeta}{\mathrm{Z}} +\newcommand*{\glsxtrnamereflink}[4]{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Eta} -%\changes{1.27}{2018-02-26}{new} +%Locally change \cs{glshypernumber} to \cs{@firstofone} to +%remove the normal location hyperlink. % \begin{macrocode} -\providecommand*{\Eta}{\mathrm{H}} + \begingroup + \let\glshypernumber\@firstofone % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Iota} -%\changes{1.27}{2018-02-26}{new} +%If the \meta{external file} argument is empty, an internal link is used, +%otherwise an external one is needed. % \begin{macrocode} -\providecommand*{\Iota}{\mathrm{I}} + \ifstrempty{#4}% + {\glsxtrfmtinternalnameref{#3}{#1}{#2}}% + {\glsxtrfmtexternalnameref{#3}{#1}{#2}{#4}}% + \endgroup +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Kappa} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrnameloclink} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glsxtrnamerefloclink}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{text}\marg{external +%file} +%\end{definition} +%Like \cs{@gls@numberlink}, this creates a hyperlink to the +%target obtained from the prefix, counter and location but uses +%\meta{text} as the hyperlink text. As with regular indexing, this +%will fail if the target name can't be formed by prefixing the +%location value. % \begin{macrocode} -\providecommand*{\Kappa}{\mathrm{K}} +\newcommand{\glsxtrnameloclink}[6]{% + \begingroup + \setentrycounter[#1]{#2}% + \def\glsxtr@locationhypertext{#5}% + \let\glshypernumber\@firstofone + \def\@glsnumberformat{#3}% + \def\glsxtrsupplocationurl{#6}% + \toks@={}% + \@glsxtr@bibgls@removespaces#4 \@nil + \endgroup +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Mu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@glsxtr@bibgls@removespaces} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\providecommand*{\Mu}{\mathrm{M}} +\def\@glsxtr@bibgls@removespaces#1 #2\@nil{% + \toks@=\expandafter{\the\toks@#1}% + \ifx\\#2\\% + \edef\x{\the\toks@}% + \ifx\x\empty + \else + \protected@edef\x{\glsentrycounter\@glo@counterprefix\the\toks@}% + \ifdefvoid\glsxtrsupplocationurl + {% + \expandafter\glsxtrfmtinternalnameref\expandafter{\x}% + {\@glsnumberformat}{\glsxtr@locationhypertext}% + }% + {% + \expandafter\glsxtrfmtexternalnameref\expandafter{\x}% + {\@glsnumberformat}{\glsxtr@locationhypertext}{\glsxtrsupplocationurl}% + }% + \fi + \else + \@gls@ReturnAfterFi{% + \@glsxtr@bibgls@removespaces#2\@nil + }% + \fi +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Nu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrfmtinternalnameref} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glsxtrfmtinternalnameloc}\marg{target}\marg{format}\marg{title} +%\end{definition} % \begin{macrocode} -\providecommand*{\Nu}{\mathrm{N}} +\newcommand*{\glsxtrfmtinternalnameref}[3]{% + \csuse{#2}{\glsdohyperlink{#1}{#3}}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Omicron} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrfmtexternalnameref} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glsxtrfmtexternalnameloc}\marg{target}\marg{format}\marg{title}\marg{file} +%\end{definition} % \begin{macrocode} -\providecommand*{\Omicron}{\mathrm{O}} +\newcommand*{\glsxtrfmtexternalnameref}[4]{% + \csuse{#2}{\hyperref{#4}{}{#1}{#3}}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Rho} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrSetWidest} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glsxtrSetWidest}\marg{type}\marg{level}\marg{text} +%\end{definition} +%As from \gls{bib2gls} v1.8, this is used by the \code{set-widest} +%resource option for the \glostyle{alttree} and the styles +%provided by the \sty{glossary-longextra} package. % \begin{macrocode} -\providecommand*{\Rho}{\mathrm{P}} +\newcommand*{\glsxtrSetWidest}[3]{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Tau} -%\changes{1.27}{2018-02-26}{new} +%Check which style options have been provided. (The style packages +%may not have been loaded.) % \begin{macrocode} -\providecommand*{\Tau}{\mathrm{T}} + \ifdef\glsupdatewidest + {% + \ifdef\glslongextraUpdateWidest + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Chi} -%\changes{1.27}{2018-02-26}{new} +%Relevant style packages all loaded. +%If the \meta{type} has been given, append to glossary preamble. % \begin{macrocode} -\providecommand*{\Chi}{\mathrm{X}} + \ifstrempty{#1} + {% + \glsupdatewidest[#2]{#3}% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Digamma} -%\changes{1.27}{2018-02-26}{new} +%Only \glostyle{alttree}. % \begin{macrocode} -\providecommand*{\Digamma}{\mathrm{F}} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\omicron} -%\changes{1.27}{2018-02-26}{new} + \ifstrempty{#1} + {% + \glsupdatewidest[#2]{#3}% + }% + {% + \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}% + }% + }% + }% + {% +% \end{macrocode} +%\cs{glsupdatewidest} hasn't been defined. This could just mean +%that the \sty{glossaries-extra-stylemods} package hasn't been +%loaded. % \begin{macrocode} -\providecommand*{\omicron}{\mathit{o}} + \ifdef\glssetwidest + {% + \ifdef\glslongextraUpdateWidest + {% % \end{macrocode} -%\end{macro} -% -%Provide corresponding upright characters if \sty{upgreek} has been -%loaded. (The upper case characters are the same as above.) +%Relevant \sty{glossary-tree} and \sty{glossary-longextra} have been loaded. +%If the \meta{type} has been given, append to glossary preamble. % \begin{macrocode} -\@ifpackageloaded{upgreek}% -{ + \ifstrempty{#1} + {% + \glssetwidest[#2]{#3}% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% + {% % \end{macrocode} -%\begin{macro}{\Upalpha} -%\changes{1.27}{2018-02-26}{new} +%Only \glostyle{alttree}. % \begin{macrocode} - \providecommand*{\Upalpha}{\mathrm{A}} + \ifstrempty{#1} + {% + \glssetwidest[#2]{#3}% + }% + {% + \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}% + }% + }% + }% + {% + \ifdef\glslongextraUpdateWidest + {% +% \end{macrocode} +%\sty{glossary-longextra} has been loaded. +% \begin{macrocode} + \ifstrempty{#1} + {% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% +% \end{macrocode} +%Neither \sty{glossary-tree} nor \sty{glossary-longextra} have been +%loaded. Do nothing. +% \begin{macrocode} + {}% + }% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upbeta} -%\changes{1.27}{2018-02-26}{new} -% \begin{macrocode} - \providecommand*{\Upbeta}{\mathrm{B}} +%\begin{macro}{\glsxtrSetWidestFallback} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glsxtrSetWidestFallback}\marg{max depth}\marg{list} +%\end{definition} +%Used when \gls{bib2gls} can't determine the widest name. +%The \meta{list} argument is a comma-separated list of glossary +%labels. The \meta{max depth} refers to the maximum hierarchical +%depth. This will either be 0 (only top-level entries) or 2 +%(up to two child-levels). +% \begin{macrocode} +\newcommand*{\glsxtrSetWidestFallback}[2]{% + \ifnum#1=0\relax + \ifdef\glsFindWidestTopLevelName + {% + \glsFindWidestTopLevelName[#2]% + }% + {% + \GlossariesExtraWarning{You need stylemods={tree} to + provide a fallback for set-widest}% + }% + \else + \ifdef\glsFindWidestLevelTwo + {% + \glsFindWidestLevelTwo[#2]% + \ifdef\glslongextraUpdateWidestChild + {% + \glslongextraUpdateWidestChild{#1}{\csuse{@glswidestnamei}}% + \glslongextraUpdateWidestChild{#1}{\csuse{@glswidestnameii}}% + }% + {}% + }% + {% + \GlossariesExtraWarning{You need stylemods={tree} to + provide a fallback for set-widest}% + }% + \fi +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upepsilon} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@glsxtr@labelprefixes} +%\changes{1.37}{2018-11-30}{new} +%List of label prefixes. % \begin{macrocode} - \providecommand*{\Upepsilon}{\mathrm{E}} +\newcommand*{\@glsxtr@labelprefixes}{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upzeta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrclearlabelprefixes} +%\changes{1.37}{2018-11-30}{new} +%List of label prefixes. % \begin{macrocode} - \providecommand*{\Upzeta}{\mathrm{Z}} +\newcommand*{\glsxtrclearlabelprefixes}{% + \renewcommand*{\@glsxtr@labelprefixes}{}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upeta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtraddlabelprefix} +%\changes{1.37}{2018-11-30}{new} +%Add prefix to the list. +%These should be added in the order of precedence with the last one +%as a fallback. This doesn't check against +%duplicates as it may be useful to replicate a prefix at the end as +%the fallback. % \begin{macrocode} - \providecommand*{\Upeta}{\mathrm{H}} +\newcommand*{\glsxtraddlabelprefix}[1]{% + \ifstrempty{#1}% + {\glsxtraddlabelprefix{\empty}}% + {% + \ifdefempty\@glsxtr@labelprefixes + {\def\@glsxtr@labelprefixes{#1}}% + {\appto\@glsxtr@labelprefixes{,#1}}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upiota} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrprependlabelprefix} +%\changes{1.37}{2018-11-30}{new} +%Inserts at the start of the list. % \begin{macrocode} - \providecommand*{\Upiota}{\mathrm{I}} +\newcommand*{\glsxtrprependlabelprefix}[1]{% + \ifstrempty{#1}% + {\glsxtrprependlabelprefix{\empty}}% + {% + \ifdefempty\@glsxtr@labelprefixes + {\def\@glsxtr@labelprefixes{#1}}% + {\preto\@glsxtr@labelprefixes{#1,}}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upkappa} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrifinlabelprefixlist} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glsxtrifinlabelprefixlist}\marg{prefix}\marg{true}\marg{false} +%\end{definition} +%Test if the given prefix is in the list. % \begin{macrocode} - \providecommand*{\Upkappa}{\mathrm{K}} +\newcommand*{\glsxtrifinlabelprefixlist}[3]{% + \ifstrempty{#1}% + {\glsxtrifinlabelprefixlist{\empty}{#2}{#3}}% + {% + \DTLifinlist{#1}{\@glsxtr@labelprefixes}{#2}{#3}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upmu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@glsxtr@prefixlabellist} +%\changes{1.37}{2018-11-30}{new} +%This is provided for the benefit of \gls{bib2gls}. It's possible +%that the user may add more prefixes after the start of the +%document, but that can lead to inconsistencies. The final element +%of the list (the fallback) is the only prefix of interest for \gls{bib2gls}. % \begin{macrocode} - \providecommand*{\Upmu}{\mathrm{M}} +\AtBeginDocument{% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@prefixlabellist}[1]{}}% + \protected@write\@auxout{}{\string\@glsxtr@prefixlabellist{\@glsxtr@labelprefixes}}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upnu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@glsxtr@get@prefixedlabel} +%\changes{1.37}{2018-11-30}{new} +%Iterate through all the prefixes and find the first +%prefix and label combination that exists. If none found, this could +%mean that it's the first \LaTeX\ run, so the last prefix in the +%list needs to be the fallback one. Grouping is used in case +%of a nested for loop. % \begin{macrocode} - \providecommand*{\Upnu}{\mathrm{N}} +\newcommand*{\@glsxtr@get@prefixedlabel}[1]{% + \begingroup +% \end{macrocode} +%Initialise to the unprefixed label in the event that the list is +%empty. +% \begin{macrocode} + \edef\@gls@thislabel{#1}% + \@for\@glsxtr@prefix:=\@glsxtr@labelprefixes\do + {% + \edef\@gls@thislabel{\@glsxtr@prefix#1}% + \ifglsentryexists{\@gls@thislabel}{\@endfortrue}{}% + }% + \edef\x{\endgroup\noexpand\def\noexpand\@gls@thislabel{\@gls@thislabel}}\x +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upomicron} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dgls} +%\changes{1.37}{2018-11-30}{new} +%Like \cs{gls} but tries the prefixes. (Can't use \cs{pgls} as +%that's provided by \sty{glossaries-prefix}.) Since this command +%is designed for \app{bib2gls}'s dual entry system, the \qt{d} +%stands for \qt{dual}. % \begin{macrocode} - \providecommand*{\Upomicron}{\mathrm{O}} +\newrobustcmd*{\dgls}{\@gls@hyp@opt\@dgls} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Uprho} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dgls} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \providecommand*{\Uprho}{\mathrm{P}} +\newcommand*{\@dgls}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@gls@{#1}{\@gls@thislabel}}{\@gls@{#1}{\@gls@thislabel}[]}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Uptau} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dglspl} % \begin{macrocode} - \providecommand*{\Uptau}{\mathrm{T}} +\newrobustcmd*{\dglspl}{\@gls@hyp@opt\@dglspl} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upchi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dglspl} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \providecommand*{\Upchi}{\mathrm{X}} +\newcommand*{\@dglspl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@glspl@{#1}{\@gls@thislabel}}{\@glspl@{#1}{\@gls@thislabel}[]}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\upomicron} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGls} % \begin{macrocode} - \providecommand*{\upomicron}{\mathrm{o}} +\newrobustcmd*{\dGls}{\@gls@hyp@opt\@dGls} % \end{macrocode} %\end{macro} % +%\begin{macro}{\@dGls} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -}% -{}% upgreek.sty not loaded +\newcommand*{\@dGls}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@Gls@{#1}{\@gls@thislabel}}{\@Gls@{#1}{\@gls@thislabel}[]}% +} % \end{macrocode} +%\end{macro} % -%This package provides some basic rules, but it's not intended for -%complete coverage of all locales. The CLDR should provide the -%appropriate locale-sensitive rules. These macros are primarily to -%help construct custom rules to include, for example, Greek maths symbols -%mixed with Latin. For the full rule syntax, see the Java API for -%\href{https://docs.oracle.com/javase/8/docs/api/java/text/RuleBasedCollator.html}{RuleBaseCollator} +%\begin{macro}{\dGlspl} +% \begin{macrocode} +\newrobustcmd*{\dGlspl}{\@gls@hyp@opt\@dGlspl} +% \end{macrocode} +%\end{macro} % -%If you want to provide a rule-block for a particular locale to -%allow for customization within that locale, create a file called -%\texttt{glossariesxtr-\meta{tag}.ldf} (where \meta{tag} identifies -%the locale) and add similar commands. See the description -%of \cs{IfTrackedLanguageFileExists} in the \sty{tracklang} manual -%for the allowed forms of \meta{tag}. The simplest is to just use -%the root language label or ISO code. The file will then be automatically loaded -%by \styfmt{glossaries-extra} if the document has support for that -%language. +%\begin{macro}{\@dGlspl} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand*{\@dGlspl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@Glspl@{#1}{\@gls@thislabel}}{\@Glspl@{#1}{\@gls@thislabel}[]}% +} +% \end{macrocode} +%\end{macro} % -%When combining these blocks of rules, remember to separate them -%with the appropriate character. For example: -%\begin{verbatim} -%sort-rule={\glsxtrcontrolrules -% ;\glsxtrspacerules -% ;\glsxtrnonprintablerules -% ;\glsxtrcombiningdiacriticrules -% ,\glsxtrhyphenrules -% <\glsxtrgeneralpuncrules -% <\glsxtrdigitrules -% <\glsxtrfractionrules -% <\glsxtrGeneralLatinIVrules -% <\glsxtrMathItalicGreekIrules -%} -%\end{verbatim} +%\begin{macro}{\dGLS} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newrobustcmd*{\dGLS}{\@gls@hyp@opt\@dGLS} +% \end{macrocode} +%\end{macro} % -%\begin{macro}{\glsxtrcontrolrules} -%\changes{1.27}{2018-02-26}{new} -%These are control characters that are usually placed at the start -%of a rule in the `ignored characters' section. These control -%characters are unlikely to appear in any entry fields but are -%provided for completeness. -%\cs{string} is used for punctuation characters in case they've been -%made active. +%\begin{macro}{\@dGLS} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrcontrolrules}{% - \string'\glshex 200B\string'\string=\glshex 200C\string=\glshex 200D - \string=\glshex 200E\string=\glshex 200F\string=\glshex 0000\string=\glshex 0001 - \string=\glshex 0002\string=\glshex 0003\string=\glshex 0004\string=\glshex 0005 - \string=\glshex 0006\string=\glshex 0007\string=\glshex 0008 - \string=\string'\glshex 0009\string'\string=\string'\glshex 000B\string' - \string=\glshex 000E\string=\glshex 000F\string=\string'\glshex -0010\string'\string=\glshex 0011 - \string=\glshex 0012\string=\glshex 0013\string=\glshex 0014\string=\glshex 0015 - \string=\glshex 0016\string=\glshex 0017\string=\glshex 0018\string=\glshex 0019 - \string=\glshex 001A\string=\glshex 001B\string=\glshex 001C\string=\glshex 001D - \string=\glshex 001E\string=\glshex 001F\string=\glshex 007F\string=\glshex 0080 - \string=\glshex 0081\string=\glshex 0082\string=\glshex 0083\string=\glshex 0084 - \string=\glshex 0085\string=\glshex 0086\string=\glshex 0087\string=\glshex 0088 - \string=\glshex 0089\string=\glshex 008A\string=\glshex 008B\string=\glshex 008C - \string=\glshex 008D\string=\glshex 008E\string=\glshex 008F\string=\glshex 0090 - \string=\glshex 0091\string=\glshex 0092\string=\glshex 0093\string=\glshex 0094 - \string=\glshex 0095\string=\glshex 0096\string=\glshex 0097\string=\glshex 0098 - \string=\glshex 0099\string=\glshex 009A\string=\glshex 009B\string=\glshex 009C - \string=\glshex 009D\string=\glshex 009E\string=\glshex 009F +\newcommand*{\@dGLS}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@GLS@{#1}{\@gls@thislabel}}{\@GLS@{#1}{\@gls@thislabel}[]}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrspacerules} -%\changes{1.27}{2018-02-26}{new} -%These are space characters. +%\begin{macro}{\dGLSpl} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrspacerules}{% - \string' \string'\string; - \string'\glshex 00A0\string'\string; - \string'\glshex 2000\string'\string; - \string'\glshex 2001\string'\string; - \string'\glshex 2002\string'\string; - \string'\glshex 2003\string'\string; - \string'\glshex 2004\string'\string; - \string'\glshex 2005\string'\string; - \string'\glshex 2006\string'\string; - \string'\glshex 2007\string'\string; - \string'\glshex 2008\string'\string; - \string'\glshex 2009\string'\string; - \string'\glshex 200A\string'\string; - \string'\glshex 3000\string' -} +\newrobustcmd*{\dGLSpl}{\@gls@hyp@opt\@dGLSpl} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrnonprintablerules} -%\changes{1.27}{2018-02-26}{new} -%These are non-printable characters (BOM, tabs, line feed and carriage -%return). +%\begin{macro}{\@dGLSpl} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrnonprintablerules}{% - \string'\glshex FEFF\string'\string; - \string'\glshex 000A\string'\string; - \string'\glshex 0009\string'\string; - \string'\glshex 000C\string'\string; - \string'\glshex 000B\string' +\newcommand*{\@dGLSpl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@GLSpl@{#1}{\@gls@thislabel}}{\@GLSpl@{#1}{\@gls@thislabel}[]}% } % \end{macrocode} %\end{macro} - -%\begin{macro}{\glsxtrcombiningdiacriticrules} -%\changes{1.27}{2018-02-26}{new} -%Combining diacritic marks. This is split into multiple macros. +% +%\begin{macro}{\dglslink} +%\changes{1.37}{2018-11-30}{new} +%Like \cs{glslink} but tries the prefixes. % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticrules}{% - \glsxtrcombiningdiacriticIrules\string; - \glsxtrcombiningdiacriticIIrules\string; - \glsxtrcombiningdiacriticIIIrules\string; - \glsxtrcombiningdiacriticIVrules +\newrobustcmd*{\dglslink}[3][]{% + \@glsxtr@get@prefixedlabel{#2}% + \glslink[#1]{\@gls@thislabel}{#3}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcombiningdiacriticIrules} -%\changes{1.27}{2018-02-26}{new} -%First set of combining diacritic marks. +%\begin{macro}{\dglsdisp} +%\changes{1.37}{2018-11-30}{new} +%Like \cs{glsdisp} but tries the prefixes. % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticIrules}{% - \glshex 0301\string;% combining acute - \glshex 0300\string;% combining grave - \glshex 0306\string;% combining breve - \glshex 0302\string;% combining circumflex - \glshex 030C\string;% combining caron - \glshex 030A\string;% combining ring - \glshex 030D\string;% combining vertical line above - \glshex 0308\string;% combining diaeresis - \glshex 030B\string;% combining double acute - \glshex 0303\string;% combining tilde - \glshex 0307\string;% combining dot above - \glshex 0304% combining macron +\newrobustcmd*{\dglsdisp}[3][]{% + \@glsxtr@get@prefixedlabel{#2}% + \glsdisp[#1]{\@gls@thislabel}{#3}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcombiningdiacriticIIrules} +%Provide missing Greek letters for use in maths mode. +%These commands are recognised by \app{bib2gls} and will be mapped to the +%Mathematical Greek Italic letters. This ensures that the Greek +%letters that have the same shape as Latin letters are kept +%with the other mathematical Greek letters for sorting purposes. +%The \LaTeX\ version of these commands (provided here) use an upright font +%for capitals and italic for lower case to provide a better match +%with the other Greek symbols provided by the kernel. +% +%\begin{macro}{\Alpha} %\changes{1.27}{2018-02-26}{new} -%Second set of combining diacritic marks. % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticIIrules}{% - \glshex 0337\string;% combining short solidus overlay - \glshex 0327\string;% combining cedilla - \glshex 0328\string;% combining ogonek - \glshex 0323\string;% combining dot below - \glshex 0332\string;% combining low line - \glshex 0305\string;% combining overline - \glshex 0309\string;% combining hook above - \glshex 030E\string;% combining double vertical line above - \glshex 030F\string;% combining double grave accent - \glshex 0310\string;% combining candrabindu - \glshex 0311\string;% combining inverted breve - \glshex 0312\string;% combining turned comma above - \glshex 0313\string;% combining comma above - \glshex 0314\string;% combining reversed comma above - \glshex 0315\string;% combining comma above right - \glshex 0316\string;% combining grave accent below - \glshex 0317% combining acute accent below -} +\providecommand*{\Alpha}{\mathrm{A}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcombiningdiacriticIIIrules} +%\begin{macro}{\Beta} %\changes{1.27}{2018-02-26}{new} -%Third set of combining diacritic marks. % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticIIIrules}{% - \glshex 0318\string;% combining left tack below - \glshex 0319\string;% combining right tack below - \glshex 031A\string;% combining left angle above - \glshex 031B\string;% combining horn - \glshex 031C\string;% combining left half ring below - \glshex 031D\string;% combining up tack below - \glshex 031E\string;% combining down tack below - \glshex 031F\string;% combining plus sign below - \glshex 0320\string;% combining minus sign below - \glshex 0321\string;% combining palatalized hook below - \glshex 0322\string;% combining retroflex hook below - \glshex 0324\string;% combining diaresis below - \glshex 0325\string;% combining ring below - \glshex 0326\string;% combining comma below - \glshex 0329\string;% combining vertical line below - \glshex 032A\string;% combining bridge below - \glshex 032B\string;% combining inverted double arch below - \glshex 032C\string;% combining caron below - \glshex 032D\string;% combining circumflex accent below - \glshex 032E\string;% combining breve below - \glshex 032F\string;% combining inverted breve below - \glshex 0330\string;% combining tilde below - \glshex 0331\string;% combining macron below - \glshex 0333\string;% combining double low line - \glshex 0334\string;% combining tilde overlay - \glshex 0335\string;% combining short stroke overlay - \glshex 0336\string;% combining long stroke overlay - \glshex 0338\string;% combining long solidus overlay - \glshex 0339\string;% combining combining right half ring below - \glshex 033A\string;% combining inverted bridge below - \glshex 033B\string;% combining square below - \glshex 033C\string;% combining seagull below - \glshex 033D\string;% combining x above - \glshex 033E\string;% combining vertical tilde - \glshex 033F\string;% combining double overline - \glshex 0342\string;% combining Greek perispomeni - \glshex 0344\string;% combining Greek dialytika tonos - \glshex 0345\string;% combining Greek ypogegrammeni - \glshex 0360\string;% combining double tilde - \glshex 0361\string;% combining double inverted breve - \glshex 0483\string;% combining Cyrillic titlo - \glshex 0484\string;% combining Cyrillic palatalization - \glshex 0485\string;% combining Cyrillic dasia pneumata - \glshex 0486% combining Cyrillic psili pneumata -} +\providecommand*{\Beta}{\mathrm{B}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcombiningdiacriticIVrules} +%\begin{macro}{\Epsilon} %\changes{1.27}{2018-02-26}{new} -%Fourth set of combining diacritic marks. % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticIVrules}{% - \glshex 20D0\string;% combining left harpoon above - \glshex 20D1\string;% combining right harpoon above - \glshex 20D2\string;% combining long vertical line overlay - \glshex 20D3\string;% combining short vertical line overlay - \glshex 20D4\string;% combining anticlockwise arrow above - \glshex 20D5\string;% combining clockwise arrow above - \glshex 20D6\string;% combining left arrow above - \glshex 20D7\string;% combining right arrow above - \glshex 20D8\string;% combining ring overlay - \glshex 20D9\string;% combining clockwise ring overlay - \glshex 20DA\string;% combining anticlockwise ring overlay - \glshex 20DB\string;% combining three dots above - \glshex 20DC\string;% combining four dots above - \glshex 20DD\string;% combining enclosing circle - \glshex 20DE\string;% combining enclosing square - \glshex 20DF\string;% combining enclosing diamond - \glshex 20E0\string;% combining enclosing circle backslash - \glshex 20E1% combining left right arrow above -} +\providecommand*{\Epsilon}{\mathrm{E}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrhyphenrules} +%\begin{macro}{\Zeta} %\changes{1.27}{2018-02-26}{new} -%Hyphens. % \begin{macrocode} -\newcommand*{\glsxtrhyphenrules}{% - \string'\string-\string'\string;% ASCII hyphen - \glshex 00AD\string;% soft hyphen - \glshex 2010\string;% hyphen - \glshex 2011\string;% non-breaking hyphen - \glshex 2012\string;% figure dash - \glshex 2013\string;% en dash - \glshex 2014\string;% em dash - \glshex 2015\string;% horizontal bar - \glshex 2212\string=\glshex 207B\string=\glshex 208B% minus sign -} +\providecommand*{\Zeta}{\mathrm{Z}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrgeneralpuncrules} +%\begin{macro}{\Eta} %\changes{1.27}{2018-02-26}{new} -%General punctuation. % \begin{macrocode} -\newcommand*{\glsxtrgeneralpuncrules}{% - \glsxtrgeneralpuncIrules - \string<\glsxtrcurrencyrules - \string<\glsxtrgeneralpuncIIrules -} +\providecommand*{\Eta}{\mathrm{H}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrgeneralpuncIrules} +%\begin{macro}{\Iota} %\changes{1.27}{2018-02-26}{new} -%First set of general punctuation. % \begin{macrocode} -\newcommand*{\glsxtrgeneralpuncIrules}{% - \string'\glshex 005F\string'% underscore - \string<\glshex 00AF% macron - \string<\string'\glshex 002C\string'% comma - \string<\string'\glshex 003B\string'% semi-colon - \string<\string'\glshex 003A\string'% colon - \string<\string'\glshex 0021\string'% exclamation mark - \string<\glshex 00A1% inverted exclamation mark - \string<\string'\glshex 003F\string'% question mark - \string<\glshex 00BF% inverted question mark - \string<\string'\glshex 002F\string'% solidus - \string<\string'\glshex 002E\string'% full stop - \string<\glshex 00B4% acute accent - \string<\string'\glshex 0060\string'% grave accent - \string<\string'\glshex 005E\string'% circumflex accent - \string<\glshex 00A8% diaersis - \string<\string'\glshex 007E\string'% tilde - \string<\glshex 00B7% middle dot - \string<\glshex 00B8% cedilla - \string<\string'\glshex 0027\string'% straight apostrophe - \string<\string'\glshex 0022\string'% straight double quote - \string<\glshex 00AB% left guillemet - \string<\glshex 00BB% right guillemet - \string<\string'\glshex 0028\string'% left parenthesis - \string=\glshex 207D\string=\glshex 208D% super/subscript left parenthesis - \string<\string'\glshex 0029\string'% right parenthesis - \string=\glshex 207E\string=\glshex 208E% super/subscript right parenthesis - \string<\string'\glshex 005B\string'% left square bracket - \string<\string'\glshex 005D\string'% right square bracket - \string<\string'\glshex 007B\string'% left curly bracket - \string<\string'\glshex 007D\string'% right curly bracket - \string<\glshex 00A7% section sign - \string<\glshex 00B6% pilcrow sign - \string<\glshex 00A9% copyright sign - \string<\glshex 00AE% registered sign - \string<\string'\glshex 0040\string'% at sign -} +\providecommand*{\Iota}{\mathrm{I}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcurrencyrules} +%\begin{macro}{\Kappa} %\changes{1.27}{2018-02-26}{new} -%General punctuation. % \begin{macrocode} -\newcommand*{\glsxtrcurrencyrules}{% - \glshex 00A4% currency sign - \string<\glshex 0E3F% Thai currency symbol baht - \string<\glshex 00A2% cent sign - \string<\glshex 20A1% colon sign - \string<\glshex 20A2% cruzeiro sign - \string<\string'\glshex 0024\string'% dollar sign - \string<\glshex 20AB% dong sign - \string<\glshex 20AC% euro sign - \string<\glshex 20A3% French franc sign - \string<\glshex 20A4% lira sign - \string<\glshex 20A5% mill sign - \string<\glshex 20A6% naira sign - \string<\glshex 20A7% peseta sign - \string<\glshex 00A3% pound sign - \string<\glshex 20A8% rupee sign - \string<\glshex 20AA% new sheqel sign - \string<\glshex 20A9% won sign - \string<\glshex 00A5% yen sign -} +\providecommand*{\Kappa}{\mathrm{K}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrgeneralpuncIIrules} +%\begin{macro}{\Mu} %\changes{1.27}{2018-02-26}{new} -%Second set of general punctuation. % \begin{macrocode} -\newcommand*{\glsxtrgeneralpuncIIrules}{% - \string'\glshex 002A\string'% asterisk - \string<\string'\glshex 005C\string'% backslash - \string<\string'\glshex 0026\string'% ampersand - \string<\string'\glshex 0023\string'% hash sign - \string<\string'\glshex 0025\string'% percent sign - \string<\string'\glshex 002B\string'% plus sign - \string=\glshex 207A\string=\glshex 208A% super/subscript plus sign - \string<\glshex 00B1% plus-minus sign - \string<\glshex 00F7% division sign - \string<\glshex 00D7% multiplication sign - \string<\string'\glshex 003C\string'% less-than sign - \string<\string'\glshex 003D\string'% equals sign - \string<\string'\glshex 003E\string'% greater-than sign - \string<\glshex 00AC% not sign - \string<\string'\glshex 007C\string'% vertical bar (pipe) - \string<\glshex 00A6% broken bar - \string<\glshex 00B0% degree sign - \string<\glshex 00B5% micron sign -} +\providecommand*{\Mu}{\mathrm{M}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrGeneralLatinIrules} +%\begin{macro}{\Nu} %\changes{1.27}{2018-02-26}{new} -%Basic Latin alphabet. % \begin{macrocode} -\newcommand*{\glsxtrGeneralLatinIrules}{% - \glsxtrLatinA - \string +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-extra-stylemods.sty> +% \end{macrocode} +%\fi +%\chapter{Style Adjustments (\styfmt{glossaries-extra-stylemods.sty})} +% This package adjusts the predefined styles so that they include the post +% description hook. Also, some other minor adjustments may be made +% to make existing styles more flexible. +% +%\section{Package Initialisation} +% First identify package: +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-extra-stylemods}[2018/11/30 v1.37 (NLCT)] +% \end{macrocode} +% Provide package options to automatically load required predefined +% styles. The simplest method is to just test for the existence of +% the file \texttt{glossary-}\meta{option}\texttt{.sty}. Packages +% can't be loaded whilst the options are being processed, so save +% the list in \cs{@glsxtr@loadstyles}. +%\begin{macro}{\@glsxtr@loadstyles} +% \begin{macrocode} +\newcommand*{\@glsxtr@loadstyles}{} +% \end{macrocode} +%\end{macro} +% +%\begin{option}{all} +%\changes{1.21}{2017-11-03}{new} +%Provide all known styles. +% \begin{macrocode} +\DeclareOption{all}{% + \appto\@glsxtr@loadstyles{% + \RequirePackage{glossary-inline}% + \RequirePackage{glossary-list}% + \RequirePackage{glossary-tree}% + \RequirePackage{glossary-mcols}% + \RequirePackage{glossary-long}% + \RequirePackage{glossary-longragged}% + \RequirePackage{glossary-longbooktabs}% + \RequirePackage{glossary-super}% + \RequirePackage{glossary-superragged}% + \RequirePackage{glossary-bookindex}% + \RequirePackage{glossary-longextra}% + } +} +% \end{macrocode} +%\end{option} +% +% \begin{macrocode} +\DeclareOption*{% + \IfFileExists{glossary-\CurrentOption.sty} + {\eappto\@glsxtr@loadstyles{% + \noexpand\RequirePackage{glossary-\CurrentOption}}% + }% + {% + \PackageError{glossaries-extra-styles}% + {Unknown option `\CurrentOption'}{}% + }% +} +% \end{macrocode} +% Process the package options: +% \begin{macrocode} +\ProcessOptions +% \end{macrocode} +% +% Load the required packages: +% \begin{macrocode} +\@glsxtr@loadstyles +% \end{macrocode} +% Adjust the styles so that they all have the post description hook. +% Also, instead of having a hard-coded \cs{space} before the +% location, use: +%\begin{macro}{\glsxtrprelocation} +%\changes{1.21}{2017-11-03}{new} +%This uses \cs{providecommand} as the same command is also +%provided by \sty{glossary-bookindex}. +% \begin{macrocode} +\providecommand*{\glsxtrprelocation}{\space} +% \end{macrocode} +%\end{macro} +% +%In case we have an old version of \sty{glossaries}: +%\begin{macro}{\renewglossarystyle} +% \begin{macrocode} +\providecommand{\renewglossarystyle}[2]{% + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries-extra}{Glossary style `#1' isn't already defined}{}% + }% + {% + \csdef{@glsstyle@#1}{#2}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\section{List-Like Styles} +% The list-like styles mostly already use the post description hook. +% Only the \glostyle{listdotted} style need modifying to add this. +% \begin{macrocode} +\ifdef{\@glsstyle@listdotted} +{% + \renewglossarystyle{listdotted}{% + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \item[]\makebox[\glslistdottedwidth][l]{% + \glsentryitem{##1}% + \glstarget{##1}{\glossentryname{##1}}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% + \glossentrydesc{##1}\glspostdescription}% + \renewcommand*{\subglossentry}[3]{% + \item[]\makebox[\glslistdottedwidth][l]{% + \glssubentryitem{##2}% + \glstarget{##2}{\glossentryname{##2}}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% + \glossentrydesc{##2}\glspostdescription}% + } +} +{% +% \end{macrocode} +% Assume the style isn't required if it hasn't already been defined. +% \begin{macrocode} +} +% \end{macrocode} +% The \glostyle{sublistdotted} style doesn't display the description +% for top-level entries. Sub-level entries use the +% \glostyle{listdottedstyle}. +% +%The other list styles would be easier to adapt if the space +%before the number list wasn't hard coded. +%\changes{1.21}{2017-11-03}{modified list to remove hard coded \cs{space}} +% \begin{macrocode} +\ifdef{\@glsstyle@list} +{% +% \end{macrocode} +%\begin{macro}{\glslistprelocation} +%\changes{1.21}{2017-11-03}{new} +%Space before number list for top-level entries. +% \begin{macrocode} + \newcommand{\glslistprelocation}{\glsxtrprelocation} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glslistchildprelocation} +%\changes{1.21}{2017-11-03}{new} +%Space before number list for child entries. +% \begin{macrocode} + \newcommand{\glslistchildprelocation}{\glslistprelocation} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glslistchildpostlocation} +%\changes{1.21}{2017-11-03}{new} +%Full stop after number list. +% \begin{macrocode} + \newcommand{\glslistchildpostlocation}{.} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glslistdesc} +%\changes{1.31}{2018-05-09}{new} +% \begin{macrocode} + \newcommand{\glslistdesc}[1]{\glossentrydesc{#1}\glspostdescription} +% \end{macrocode} +%\end{macro} +%Redefine \glostyle{list} to use these commands. +% \begin{macrocode} + \renewglossarystyle{list}{% + \renewenvironment{theglossary}% + {\begin{description}}{\end{description}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand*{\glossentry}[2]{% + \item[\glsentryitem{##1}% + \glstarget{##1}{\glossentryname{##1}}] + \glslistdesc{##1}\glslistprelocation ##2}% + \renewcommand*{\subglossentry}[3]{% + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\space + \glslistdesc{##2}% + \glslistchildprelocation ##3\glslistchildpostlocation}% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% + } +} +{} +% \end{macrocode} +%Similarly for \glostyle{altlist}. Since it requires \glostyle{list}, +%the new commands should have been defined above. +% \begin{macrocode} +\ifdef{\@glsstyle@altlist} +{% + \renewglossarystyle{altlist}{% + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \item[\glsentryitem{##1}% + \glstarget{##1}{\glossentryname{##1}}]% + \mbox{}\par\nobreak\@afterheading + \glslistdesc{##1}\glslistprelocation ##2}% + \renewcommand{\subglossentry}[3]{% + \par + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glslistdesc{##2}% + \glslistchildprelocation ##3}% + } +} +{} +% \end{macrocode} +%Redefine \glostyle{listgroup} so that it discourages a break +%after group headings. +%\changes{1.21}{2017-11-03}{redefined \texttt{listgroup} to discourage +%breaks after group headings} +% \begin{macrocode} +\ifdef{\@glsstyle@listgroup} +{% + \renewglossarystyle{listgroup}{% + \setglossarystyle{list}% + \renewcommand*{\glsgroupheading}[1]{% + \item[\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}]% + \mbox{}\par\nobreak\@afterheading + }% + } +} +{} +% \end{macrocode} +%Similarly for \glostyle{listhypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{listhypergroup} to discourage +%breaks after group headings} +% \begin{macrocode} +\ifdef{\@glsstyle@listhypergroup} +{% + \renewglossarystyle{listhypergroup}{% + \setglossarystyle{list}% + \renewcommand*{\glossaryheader}{% + \glslistnavigationitem{\glsnavigation}}% + \renewcommand*{\glsgroupheading}[1]{% + \item[\glslistgroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}]% + \mbox{}\par\nobreak\@afterheading + }% + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpAlpha} -%\changes{1.27}{2018-02-26}{new} +%Similarly for \glostyle{altlistgroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{altlistgroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand*{\glsxtrUpAlpha}{% - \glshex 03B1,% lower case alpha - \glshex 0391% upper case alpha +\ifdef{\@glsstyle@altlistgroup} +{% + \renewglossarystyle{altlistgroup}{% + \setglossarystyle{altlist}% + \renewcommand*{\glsgroupheading}[1]{% + \item[\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}]% + \mbox{}\par\nobreak\@afterheading + }% + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpBeta} -%\changes{1.27}{2018-02-26}{new} +%Similarly for \glostyle{altlisthypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{altlisthypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand*{\glsxtrUpBeta}{% - \glshex 03B2,% lower case beta - \glshex 0392% upper case beta +\ifdef{\@glsstyle@altlisthypergroup} +{% + \renewglossarystyle{altlisthypergroup}{% + \setglossarystyle{altlist}% + \renewcommand*{\glossaryheader}{% + \glslistnavigationitem{\glsnavigation}}% + \renewcommand*{\glsgroupheading}[1]{% + \item[\glslistgroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}]% + \mbox{}\par\nobreak\@afterheading + }% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrUpGamma} -%\changes{1.27}{2018-02-26}{new} +%\section{Longtable Styles} +% The three and four column styles require adjustment to add the +% post-description hook. The two column styles need the hard-coded +% \cs{space} changed to \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand*{\glsxtrUpGamma}{% - \glshex 03B3,% lower case gamma - \glshex 0393% upper case gamma +\ifcsdef{@glsstyle@long} +{% + \renewglossarystyle{long}{% + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription + \glsxtrprelocation ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & \tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpDelta} -%\changes{1.27}{2018-02-26}{new} +%Three column style: % \begin{macrocode} -\newcommand*{\glsxtrUpDelta}{% - \glshex 03B4,% lower case delta - \glshex 0394% upper case delta -} +\ifcsdef{@glsstyle@long3col} +{% + \renewglossarystyle{long3col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpEpsilon} -%\changes{1.27}{2018-02-26}{new} +%Conditional needs to be outside of \cs{glsgroupskip} otherwise it +%can cause \qt{Incomplete \cs{iftrue}} errors. +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glsxtrUpEpsilon}{% - \glshex 03B5% lower case epsilon - \string=\glshex 03F5,% lower case epsilon variant - \glshex 0395% upper case epsilon + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpDigamma} -%\changes{1.27}{2018-02-26}{new} +% Four column style: % \begin{macrocode} -\newcommand*{\glsxtrUpDigamma}{% - \glshex 03DD,% lower case digamma - \glshex 03DC% upper case digamma -} +\ifcsdef{@glsstyle@long4col} +{% + \renewglossarystyle{long4col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{llll}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpZeta} -%\changes{1.27}{2018-02-26}{new} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glsxtrUpZeta}{% - \glshex 03B6,% lower case zeta - \glshex 0396% upper case zeta + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrUpEta} -%\changes{1.27}{2018-02-26}{new} +%The styles in \sty{glossary-longbooktabs} are all based on the +%styles in \sty{glossary-long}, so no adjustments are needed for +%that package. +% +%\section{Long Ragged Styles} +% The three and four column styles require adjustment for the +% post-description hook, but not the two column styles. However, the +% two-column styles need to have \cs{space} replaced with +% \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand*{\glsxtrUpEta}{% - \glshex 03B7,% lower case eta - \glshex 0397% upper case eta +\ifcsdef{@glsstyle@longragged} +{% + \renewglossarystyle{longragged}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% + \tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}% + \glspostdescription\glsxtrprelocation ##3% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & \tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpTheta} -%\changes{1.27}{2018-02-26}{new} +%Three and four column styles don't use \cs{glsxtrprelocation} since the number +%list is in its own column. % \begin{macrocode} -\newcommand*{\glsxtrUpTheta}{% - \glshex 03B8% lower case theta - \string=\glshex 03D1,% lower case theta variant - \glshex 0398% upper case theta +\ifcsdef{@glsstyle@longragged3col} +{% + \renewglossarystyle{longragged3col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% +% \end{macrocode} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +% \begin{macrocode} + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpIota} -%\changes{1.27}{2018-02-26}{new} +% Four column style: % \begin{macrocode} -\newcommand*{\glsxtrUpIota}{% - \glshex 03B9,% lower case iota - \glshex 0399% upper case iota -} +\ifcsdef{@glsstyle@altlongragged4col} +{% + \renewglossarystyle{altlongragged4col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}l% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & \glossentrysymbol{##1} & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpKappa} -%\changes{1.27}{2018-02-26}{new} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glsxtrUpKappa}{% - \glshex 03BA% lower case kappa - \string=\glshex 03F0,% lower case kappa variant - \glshex 039A% upper case kappa + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrUpLambda} -%\changes{1.27}{2018-02-26}{new} +%\section{Supertabular Styles} +% The three and four column styles require adjustment to add the +% post-description hook. The two column styles need the hard-coded +% \cs{space} changed to \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand*{\glsxtrUpLambda}{% - \glshex 03BB,% lower lambda - \glshex 039B% upper case lambda +\ifcsdef{@glsstyle@super} +{% + \renewglossarystyle{super}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription + \glsxtrprelocation ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& \tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpMu} -%\changes{1.27}{2018-02-26}{new} +%Three column style: % \begin{macrocode} -\newcommand*{\glsxtrUpMu}{% - \glshex 03BC,% lower case mu - \glshex 039C% upper case mu -} +\ifcsdef{@glsstyle@super3col} +{% + \renewglossarystyle{super3col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpNu} -%\changes{1.27}{2018-02-26}{new} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glsxtrUpNu}{% - \glshex 03BD,% lower case nu - \glshex 039D% upper case nu + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpXi} -%\changes{1.27}{2018-02-26}{new} +% Four column styles: % \begin{macrocode} -\newcommand*{\glsxtrUpXi}{% - \glshex 03BE,% lower case xi - \glshex 039E% upper case xi -} +\ifcsdef{@glsstyle@super4col} +{% + \renewglossarystyle{super4col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{llll}}{% + \end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpOmicron} -%\changes{1.27}{2018-02-26}{new} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glsxtrUpOmicron}{% - \glshex 03BF,% lower case omicron - \glshex 039F% upper case omicron + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrUpPi} -%\changes{1.27}{2018-02-26}{new} +%\section{Super Ragged Styles} +% The three and four column styles require adjustment for the +% post-description hook, but not the two column styles. However, the +% two-column styles need to have \cs{space} replaced with +% \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand*{\glsxtrUpPi}{% - \glshex 03C0% lower case pi - \string=\glshex 03D6,% lower case pi variant - \glshex 03A0% upper case pi +\ifcsdef{@glsstyle@superragged} +{% + \renewglossarystyle{superragged}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% + \tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& \tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpRho} -%\changes{1.27}{2018-02-26}{new} +%Three column style: % \begin{macrocode} -\newcommand*{\glsxtrUpRho}{% - \glshex 03C1% lower case rho - \string=\glshex 03F1,% lower case rho variant - \glshex 03A1% upper case rho -} +\ifcsdef{@glsstyle@superragged3col} +{% + \renewglossarystyle{superragged3col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpSigma} -%\changes{1.27}{2018-02-26}{new} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glsxtrUpSigma}{% - \glshex 03C2% lower case sigma - \string=\glshex 03C3,% lower case sigma - \glshex 03A3% upper case sigma + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpTau} -%\changes{1.27}{2018-02-26}{new} +% Four columns: % \begin{macrocode} -\newcommand*{\glsxtrUpTau}{% - \glshex 03C4,% lower case tau - \glshex 03A4% upper case tau -} +\ifcsdef{@glsstyle@altsuperragged4col} +{% + \renewglossarystyle{altsuperragged4col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}l% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpUpsilon} -%\changes{1.27}{2018-02-26}{new} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glsxtrUpUpsilon}{% - \glshex 03C5,% lower case upsilon - \glshex 03A5% upper case upsilon + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrUpPhi} -%\changes{1.27}{2018-02-26}{new} +%\section{Inline Style} +% The \glostyle{inline} style is dealt with slightly differently. +% The \cs{glspostdescription} hook is actually in +% \cs{glspostinline}, which is called at the end of the glossary. +% The original definition of \cs{glspostinline} also includes a +% space, which is unnecessary. Here, instead of redefining the +% \glostyle{inline} style, just redefine \cs{glspostinline} and +% \cs{glsinlinedescformat}. % \begin{macrocode} -\newcommand*{\glsxtrUpPhi}{% - \glshex 03C6% lower case phi - \string=\glshex 03D5,% lower case phi variant - \glshex 03A6% upper case phi -} +\ifdef{\@glsstyle@inline} +{% + \renewcommand*{\glspostinline}{.\spacefactor\sfcode`\.} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpChi} -%\changes{1.27}{2018-02-26}{new} +% Just use \cs{glsxtrpostdescription} instead of +% \cs{glspostdescription}. % \begin{macrocode} -\newcommand*{\glsxtrUpChi}{% - \glshex 03C7,% lower case chi - \glshex 03A7% upper case chi -} + \renewcommand*{\glsinlinedescformat}[3]{% + \space#1\glsxtrpostdescription} + \renewcommand*{\glsinlinesubdescformat}[3]{% + #1\glsxtrpostdescription} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpPsi} -%\changes{1.27}{2018-02-26}{new} +% The default settings don't show the location lists, so there's no +% adjustment for \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand*{\glsxtrUpPsi}{% - \glshex 03C8,% lower case psi - \glshex 03A8% upper case psi } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrUpOmega} -%\changes{1.27}{2018-02-26}{new} +%\section{Tree Styles} +% Redefine both \cs{glstreenamefmt} and \cs{glstreegroupheaderfmt} +% in terms of \cs{glstreedefaultnamefmt} to make it easier to change +% both at the same time or only change one without affecting the +% other. % \begin{macrocode} -\newcommand*{\glsxtrUpOmega}{% - \glshex 03C9,% lower case omega - \glshex 03A9% upper case omega -} +\ifdef\glstreenamefmt +{ % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrMathItalicAlpha} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glstreedefaultnamefmt} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicAlpha}{% - \glshex 1D6FC,% lower case alpha (maths italic) - \glshex 1D6E2% upper case alpha (maths italic) -} + \newcommand{\glstreedefaultnamefmt}[1]{\textbf{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicBeta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glstreenamefmt} +%\changes{1.31}{2018-05-09}{added redefinition} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicBeta}{% - \glshex 1D6FD,% lower case beta (maths italic) - \glshex 1D6E3% upper case beta (maths italic) -} + \renewcommand{\glstreenamefmt}[1]{\glstreedefaultnamefmt{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicGamma} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glstreegroupheaderfmt} +%\changes{1.31}{2018-05-09}{added redefinition} +%This command was only introduced to \sty{glossary-tree} v4.22, so +%it may not be defined. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicGamma}{% - \glshex 1D6FE,% lower case gamma (maths italic) - \glshex 1D6E4% upper case gamma (maths italic) -} + \def\glstreegroupheaderfmt#1{\glstreedefaultnamefmt{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicDelta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glstreenavigationfmt} +%\changes{1.31}{2018-05-09}{added redefinition} +%This command was only introduced to \sty{glossary-tree} v4.22, so +%it may not be defined. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicDelta}{% - \glshex 1D6FF,% lower case delta (maths italic) - \glshex 1D6E5% upper case delta (maths italic) -} + \def\glstreenavigationfmt#1{\glstreedefaultnamefmt{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicEpsilon} -%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicEpsilon}{% - \glshex 1D700% lower case epsilon (maths italic) - \string=\glshex 1D716,% lower case epsilon variant (maths italic) - \glshex 1D6E6% upper case epsilon (maths italic) } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrMathItalicZeta} -%\changes{1.27}{2018-02-26}{new} +% The \glostyle{index} style is redefined so that the space before +% the number list isn't hard coded. +%\changes{1.21}{2017-11-03}{modified index to remove hard coded \cs{space}} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicZeta}{% - \glshex 1D701,% lower case zeta (maths italic) - \glshex 1D6E7% upper case zeta (maths italic) -} +\ifdef{\@glsstyle@index} +{ % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrMathItalicEta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glstreeprelocation} +%\changes{1.21}{2017-11-03}{new} +%The space before the number list for top-level entries. This is +%shared by the other tree styles. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicEta}{% - \glshex 1D702,% lower case eta (maths italic) - \glshex 1D6E8% upper case eta (maths italic) -} + \newcommand*{\glstreeprelocation}{\glsxtrprelocation} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicTheta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glstreechildprelocation} +%\changes{1.21}{2017-11-03}{new} +%The space before the number list for child entries. This is +%shared by the other tree styles. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicTheta}{% - \glshex 1D703% lower case theta (maths italic) - \string=\glshex 1D717,% lower case theta variant (maths italic) - \glshex 1D6E9% upper case theta (maths italic) - \string=\glshex 1D6F3% upper case theta variant (maths italic) -} + \newcommand*{\glstreechildprelocation}{\glstreeprelocation} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicIota} -%\changes{1.27}{2018-02-26}{new} +%Modify the \glostyle{index} style. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicIota}{% - \glshex 1D704,% lower case iota (maths italic) - \glshex 1D6EA% upper case iota (maths italic) + \renewglossarystyle{index}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\item\glstreeitem + \let\subitem\glstreesubitem + \let\subsubitem\glstreesubsubitem + }% + {\par}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand*{\glossentry}[2]{% + \item\glsentryitem{##1}% + \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreesymbol{##1}% + \glstreedesc{##1}% + \glstreeprelocation ##2% + }% + \renewcommand{\subglossentry}[3]{% + \ifcase##1\relax + \item + \or + \subitem + \glssubentryitem{##2}% + \else + \subsubitem + \fi + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}% + \glstreechildsymbol{##2}% + \glstreechilddesc{##2}% + \glstreechildprelocation ##3% + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrMathItalicKappa} -%\changes{1.27}{2018-02-26}{new} +% The \glostyle{indexgroup} style is redefined to discourage a page +% break after the heading. +%\changes{1.21}{2017-11-03}{redefined \texttt{indexgroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicKappa}{% - \glshex 1D705% lower case kappa (maths italic) - \string=\glshex 1D718,% lower case kappa variant (maths italic) - \glshex 1D6EB% upper case kappa (maths italic) +\ifdef{\@glsstyle@indexgroup} +{% + \renewglossarystyle{indexgroup}{% + \setglossarystyle{index}% + \renewcommand*{\glsgroupheading}[1]{% + \item\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% + \nopagebreak\indexspace + \nobreak\@afterheading + }% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrMathItalicLambda} -%\changes{1.27}{2018-02-26}{new} +%Similarly for \glostyle{indexhypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{indexhypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicLambda}{% - \glshex 1D706,% lower case lambda (maths italic) - \glshex 1D6EC% upper case lambda (maths italic) +\ifdef{\@glsstyle@indexhypergroup} +{% + \renewglossarystyle{indexhypergroup}{% + \setglossarystyle{index}% + \renewcommand*{\glossaryheader}{% + \item\glstreenavigationfmt{\glsnavigation}% + \nobreak\@afterheading\indexspace}% + \renewcommand*{\glsgroupheading}[1]{% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace + \nobreak\@afterheading}% + }% } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrMathItalicMu} -%\changes{1.27}{2018-02-26}{new} +%Adjust \glostyle{tree} style to remove hard coded space before +%number list. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicMu}{% - \glshex 1D707,% lower case mu (maths italic) - \glshex 1D6ED% upper case mu (maths italic) -} +\ifdef{\@glsstyle@tree} +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrMathItalicNu} -%\changes{1.27}{2018-02-26}{new} +%Provide a command for use with the \glostyle{tree} styles that displays +%the pre-description separator, the +%description and post-description hook. +%\begin{macro}{\glstreedesc} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicNu}{% - \glshex 1D708,% lower case nu (maths italic) - \glshex 1D6EE% upper case nu (maths italic) -} + \newcommand{\glstreedesc}[1]{% + \glstreepredesc\glossentrydesc{#1}\glspostdescription + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicXi} -%\changes{1.27}{2018-02-26}{new} +%Similarly for the symbol. +%\begin{macro}{\glstreesymbol} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicXi}{% - \glshex 1D709,% lower case xi (maths italic) - \glshex 1D6EF% upper case xi (maths italic) -} + \newcommand{\glstreesymbol}[1]{% + \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicOmicron} -%\changes{1.27}{2018-02-26}{new} +%And for the child entries: +%\begin{macro}{\glstreechilddesc} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicOmicron}{% - \glshex 1D70A,% lower case omicron (maths italic) - \glshex 1D6F0% upper case omicron (maths italic) -} + \newcommand{\glstreechilddesc}[1]{% + \glstreechildpredesc\glossentrydesc{#1}\glspostdescription + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicPi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glstreechildsymbol} +%\changes{1.31}{2018-05-09}{new} +%This just behaves in the same way as the top-level. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicPi}{% - \glshex 1D70B% lower case pi (maths italic) - \string=\glshex 1D71B,% lower case pi variant (maths italic) - \glshex 1D6F1% upper case pi (maths italic) -} + \newcommand{\glstreechildsymbol}[1]{% + \glstreesymbol{#1}% + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicRho} -%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicRho}{% - \glshex 1D70C% lower case rho (maths italic) - \string=\glshex 1D71A,% lower case rho variant (maths italic) - \glshex 1D6F2% upper case rho (maths italic) + \renewglossarystyle{tree}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}}% + {}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \hangindent0pt\relax + \parindent0pt\relax + \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreesymbol{##1}% + \glstreedesc{##1}% + \glstreeprelocation##2\par + }% + \renewcommand{\subglossentry}[3]{% + \hangindent##1\glstreeindent\relax + \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}% + \glstreechildsymbol{##2}% + \glstreechilddesc{##2}% + \glstreechildprelocation ##3\par + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% + }% } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrMathItalicSigma} -%\changes{1.27}{2018-02-26}{new} +% The \glostyle{treegroup} style is redefined to discourage a page +% break after the heading. +%\changes{1.21}{2017-11-03}{redefined \texttt{treegroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicSigma}{% - \glshex 1D70D% lower case final sigma (maths italic) - \string=\glshex 1D70E,% lower case sigma (maths italic) - \glshex 1D6F4% upper case sigma (maths italic) +\ifdef{\@glsstyle@treegroup} +{% + \renewglossarystyle{treegroup}{% + \setglossarystyle{tree}% + \renewcommand{\glsgroupheading}[1]{\par + \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}\par + \nopagebreak\indexspace\nobreak\@afterheading}% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrMathItalicTau} -%\changes{1.27}{2018-02-26}{new} +%Similarly for \glostyle{treehypergroup} +%\changes{1.21}{2017-11-03}{redefined \texttt{treehypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicTau}{% - \glshex 1D70F,% lower case tau (maths italic) - \glshex 1D6F5% upper case tau (maths italic) +\ifdef{\@glsstyle@treehypergroup} +{% + \renewglossarystyle{treehypergroup}{% + \setglossarystyle{tree}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}\par + \nobreak\@afterheading\indexspace}% + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \nopagebreak\indexspace\nobreak\@afterheading}% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrMathItalicUpsilon} -%\changes{1.27}{2018-02-26}{new} +%Adjust \glostyle{treenoname} style to remove hard coded space before +%number list. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicUpsilon}{% - \glshex 1D710,% lower case upsilon (maths italic) - \glshex 1D6F6% upper case upsilon (maths italic) -} +\ifdef{\@glsstyle@treenoname} +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrMathItalicPhi} -%\changes{1.27}{2018-02-26}{new} +%Provide a command for use with the \glostyle{treenoname} styles that displays +%the pre-description separator, the +%description and post-description hook. +%\begin{macro}{\glstreenonamedesc} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicPhi}{% - \glshex 1D711% lower case phi (maths italic) - \string=\glshex 1D719,% lower case phi variant (maths italic) - \glshex 1D6F7% upper case phi (maths italic) -} + \newcommand{\glstreenonamedesc}[1]{% + \glstreepredesc\glossentrydesc{#1}\glspostdescription + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicChi} -%\changes{1.27}{2018-02-26}{new} +%Similarly for the symbol. +%\begin{macro}{\glstreenonamesymbol} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicChi}{% - \glshex 1D712,% lower case chi (maths italic) - \glshex 1D6F8% upper case chi (maths italic) -} + \newcommand{\glstreenonamesymbol}[1]{% + \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicPsi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glstreenonamechilddesc} +%\changes{1.31}{2018-05-09}{new} +%The child entry doesn't have the pre-description separator as the +%name isn't displayed. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicPsi}{% - \glshex 1D713,% lower case psi (maths italic) - \glshex 1D6F9% upper case psi (maths italic) -} + \newcommand{\glstreenonamechilddesc}[1]{% + \glossentrydesc{#1}\glspostdescription + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrMathItalicOmega} -%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicOmega}{% - \glshex 1D714,% lower case omega (maths italic) - \glshex 1D6FA% upper case omega (maths italic) + \renewglossarystyle{treenoname}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}}% + {}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \hangindent0pt\relax + \parindent0pt\relax + \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreenonamesymbol{##1}% + \glstreenonamedesc{##1}% + \glstreeprelocation##2\par + }% + \renewcommand{\subglossentry}[3]{% + \hangindent##1\glstreeindent\relax + \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \glstarget{##2}{\strut}% + \glstreenonamechilddesc{##2}% + \glstreechildprelocation##3\par + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrMathItalicPartial} -%\changes{1.27}{2018-02-26}{new} +% The \glostyle{treenonamegroup} style is redefined to discourage a page +% break after the heading. +%\changes{1.21}{2017-11-03}{redefined \texttt{treenonamegroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicPartial}{% - \glshex 1D715% partial differential (maths italic) +\ifdef{\@glsstyle@treenonamegroup} +{% + \renewglossarystyle{treenonamegroup}{% + \setglossarystyle{treenoname}% + \renewcommand{\glsgroupheading}[1]{\par + \noindent\glstreegroupheaderfmt + {\glsgetgrouptitle{##1}}% + \nopagebreak\indexspace\nobreak\@afterheading + }% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrMathItalicNabla} -%\changes{1.27}{2018-02-26}{new} +%Similarly for \glostyle{treenonamehypergroup} +%\changes{1.21}{2017-11-03}{redefined \texttt{treenonamehypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicNabla}{% - \glshex 1D6FB% nabla (maths italic) +\ifdef{\@glsstyle@treenonamehypergroup} +{% + \renewglossarystyle{treenonamehypergroup}{% + \setglossarystyle{treenoname}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}\par + \nobreak\@afterheading\indexspace}% + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nobreak\@afterheading}% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsxtrdigitrules} -%\changes{1.27}{2018-02-26}{new} -%Digits from the Basic Latin set and subscript and superscript digit -%rules. +% The \glostyle{alttree} style is redefined to make it easier to +% made minor adjustments. % \begin{macrocode} -\newcommand*{\glsxtrdigitrules}{% - 0\string=\glshex 2080\string=\glshex 2070 - \string<1\string=\glshex 2081\string=\glshex 00B9 - \string<2\string=\glshex 2082\string=\glshex 00B2 - \string<3\string=\glshex 2083\string=\glshex 00B3 - \string<4\string=\glshex 2084\string=\glshex 2074 - \string<5\string=\glshex 2085\string=\glshex 2075 - \string<6\string=\glshex 2086\string=\glshex 2076 - \string<7\string=\glshex 2087\string=\glshex 2077 - \string<8\string=\glshex 2088\string=\glshex 2078 - \string<9\string=\glshex 2089\string=\glshex 2079 -} +\ifdef{\@glsstyle@alttree} +{% % \end{macrocode} -%\end{macro} +% Only redefine this style if it's already been defined. % -%\begin{macro}{\glsxtrBasicDigitrules} -%\changes{1.27}{2018-02-26}{new} -%Digits from the Basic Latin set. +%\begin{macro}{\glsxtralttreeSymbolDescLocation} +%\changes{1.05}{2016-06-10}{new} +%\begin{definition} +%\cs{glsxtralttreeSymbolDescLocation}\marg{label}\marg{location +%list} +%\end{definition} +%Layout the symbol, description and location for top-level entries. % \begin{macrocode} -\newcommand*{\glsxtrBasicDigitrules}{% - 0\string<1\string<2\string<3\string<4% - \string<5\string<6\string<7\string<8\string<9% -} + \newcommand{\glsxtralttreeSymbolDescLocation}[2]{% + {% + \let\par\glsxtrAltTreePar + \ifglshassymbol{#1}{(\glossentrysymbol{#1})\space}{}% + \glossentrydesc{#1}\glspostdescription\glstreeprelocation #2\par + }% + } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrSubScriptDigitrules} -%\changes{1.27}{2018-02-26}{new} -%Subscript digits. +%\begin{macro}{\glsxtrAltTreeIndent} +%\changes{1.05}{2016-06-10}{new} +% Paragraph indent for subsequent paragraphs in multi-paragraph +% descriptions. % \begin{macrocode} -\newcommand*{\glsxtrSubScriptDigitrules}{% - \glshex 2080% subscript 0 - \string<\glshex 2081% subscript 1 - \string<\glshex 2082% subscript 2 - \string<\glshex 2083% subscript 3 - \string<\glshex 2084% subscript 4 - \string<\glshex 2085% subscript 5 - \string<\glshex 2086% subscript 6 - \string<\glshex 2087% subscript 7 - \string<\glshex 2088% subscript 8 - \string<\glshex 2089% subscript 9 -} + \newlength\glsxtrAltTreeIndent % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrSuperScriptDigitrules} -%\changes{1.27}{2018-02-26}{new} -%Superscript digits. +%\begin{macro}{\glsxtrAltTreePar} +%\changes{1.05}{2016-06-10}{new} +%Multi-paragraph descriptions need to keep the hanging indent. % \begin{macrocode} -\newcommand*{\glsxtrSuperScriptDigitrules}{% - \glshex 2070% superscript 0 - \string<\glshex 00B9% superscript 1 - \string<\glshex 00B2% superscript 2 - \string<\glshex 00B3% superscript 3 - \string<\glshex 2074% superscript 4 - \string<\glshex 2075% superscript 5 - \string<\glshex 2076% superscript 6 - \string<\glshex 2077% superscript 7 - \string<\glshex 2078% superscript 8 - \string<\glshex 2079% superscript 9 -} + \newcommand{\glsxtrAltTreePar}{% + \@@par + \glsxtrAltTreeSetHangIndent + \setlength{\parindent}{\dimexpr\hangindent+\glsxtrAltTreeIndent}% + } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrfractionrules} -%\changes{1.27}{2018-02-26}{new} -%Vulgar fractions. +%\begin{macro}{\glsxtralttreeSubSymbolDescLocation} +%\changes{1.05}{2016-06-10}{new} +%\begin{definition} +%\cs{glsxtralttreeSubSymbolDescLocation}\marg{level}\marg{label}\marg{location +%list} +%\end{definition} +%Layout the symbol, description and location for sub-entries. +% Defaults to the same as the top-level. % \begin{macrocode} -\newcommand*{\glsxtrfractionrules}{% - \glshex 215F% fraction numerator one (1/) - \string<\glshex 2189% zero thirds (0/3 = 0) - \string<\glshex 2152% one tenth (1/10 = 0.1) - \string<\glshex 2151% one ninth (1/9 ~ 0.111) - \string<\glshex 215B% one eighth (1/8 = 0.125) - \string<\glshex 2150% one seventh (1/7 ~ 0.143) - \string<\glshex 2159% one sixth (1/6 ~ 0.167) - \string<\glshex 2155% one fifth (1/5 = 0.2) - \string<\glshex 00BC% one quarter (1/4 = 0.25) - \string<\glshex 2153% one third (1/3 ~ 0.333) - \string<\glshex 215C% three eighths (3/8 = 0.375) - \string<\glshex 2156% two fifths (2/5 = 0.4) - \string<\glshex 00BD% one half (1/2 = 0.5) - \string<\glshex 2157% three fifths (3/5 = 0.6) - \string<\glshex 215D% five eighths (5/8 = 0.625) - \string<\glshex 2154% two thirds (2/3 ~ 0.667) - \string<\glshex 00BE% three quarters (3/4 = 0.75) - \string<\glshex 2158% four fifths (4/5 = 0.8) - \string<\glshex 215A% five sixths (5/6 ~ 0.833) - \string<\glshex 215E% seven eighths (7/8 = 0.875) -} + \newcommand{\glsxtralttreeSubSymbolDescLocation}[3]{% + \glsxtralttreeSymbolDescLocation{#2}{#3}% + } % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsxtrdialecthook} -%Check for scripts associated with the document dialects. -%\changes{1.28}{2018-03-06}{save and restore \cs{TrackLangRequireDialectPrefix}} +%\begin{macro}{\glsxtrtreetopindent} +%\changes{1.05}{2016-06-10}{new} +% The original style has to keep computing the width of the name at +% each entry. This register allows the style to compute it once for +% the top-level at the start of the glossary. % \begin{macrocode} -\renewcommand{\@glsxtrdialecthook}{% - \ifundef\CurrentTrackedScript - {% - \TrackLangIfHasDefaultScript{\CurrentTrackedLanguage}% - {% - \edef\CurrentTrackedScript{% - \TrackLangGetDefaultScript\CurrentTrackedLanguage}% - }% - {}% - }% - {}% - \ifdef\CurrentTrackedScript - {% - \let\gls@orgTrackLangRequireDialectPrefix\TrackLangRequireDialectPrefix - \def\TrackLangRequireDialectPrefix{glossariesxtr-}% - \let\CurrentTrackedTag\CurrentTrackedScript - \IfFileExists{\TrackLangRequireDialectPrefix\CurrentTrackedTag.ldf} - {\RequireGlossariesExtraLang{\CurrentTrackedTag}}% - {}% - \let\TrackLangRequireDialectPrefix\gls@orgTrackLangRequireDialectPrefix - }% - {}% -} + \newlength\glsxtrtreetopindent % \end{macrocode} %\end{macro} -%If \cs{glsxtr@loaddialect} has been defined, then -%\sty{glossaries-extra-bib2gls} has been loaded after -%\sty{glossaries-extra}. (For example, through -%\ics{glossariesextrasetup}.) Not recommended, but if this has been -%done try to find the associated language resources. -% \begin{macrocode} -\ifdef\glsxtr@loaddialect -{% - \@ifpackageloaded{tracklang} - {% - \AnyTrackedLanguages - {% - \ForEachTrackedDialect{\this@dialect}{\glsxtr@loaddialect}% - }% - {}% - } - {} -} -{} -% \end{macrocode} -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*glossaries-extra-stylemods.sty> -% \end{macrocode} -%\fi -%\chapter{Style Adjustments (\styfmt{glossaries-extra-stylemods.sty})} -% This package adjusts the predefined styles so that they include the post -% description hook. Also, some other minor adjustments may be made -% to make existing styles more flexible. % -%\section{Package Initialisation} -% First identify package: -% \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2018/08/13 v1.35 (NLCT)] -% \end{macrocode} -% Provide package options to automatically load required predefined -% styles. The simplest method is to just test for the existence of -% the file \texttt{glossary-}\meta{option}\texttt{.sty}. Packages -% can't be loaded whilst the options are being processed, so save -% the list in \cs{@glsxtr@loadstyles}. -%\begin{macro}{\@glsxtr@loadstyles} +%\begin{macro}{\glsxtralttreeInit} +%\changes{1.05}{2016-06-10}{new} +% User-level initialisation for the \glostyle{alttree} style. % \begin{macrocode} -\newcommand*{\@glsxtr@loadstyles}{} + \newcommand*{\glsxtralttreeInit}{% + \settowidth{\glsxtrtreetopindent}{\glstreenamefmt{\glsgetwidestname\space}}% + \glsxtrAltTreeIndent=\parindent + } % \end{macrocode} %\end{macro} % -%\begin{option}{all} +%\begin{macro}{\gglssetwidest} %\changes{1.21}{2017-11-03}{new} -%Provide all known styles. +% The original \cs{glssetwidest} only uses \cs{def}. This uses +% \cs{gdef}. % \begin{macrocode} -\DeclareOption{all}{% - \appto\@glsxtr@loadstyles{% - \RequirePackage{glossary-inline}% - \RequirePackage{glossary-list}% - \RequirePackage{glossary-tree}% - \RequirePackage{glossary-mcols}% - \RequirePackage{glossary-long}% - \RequirePackage{glossary-longragged}% - \RequirePackage{glossary-longbooktabs}% - \RequirePackage{glossary-super}% - \RequirePackage{glossary-superragged}% - \RequirePackage{glossary-bookindex}% + \newcommand*{\gglssetwidest}[2][0]{% + \csgdef{@glswidestname\romannumeral#1}{#2}% } -} % \end{macrocode} -%\end{option} +%\end{macro} % +%\begin{macro}{\eglssetwidest} +%\changes{1.05}{2016-06-10}{new} +% The original \cs{glssetwidest} only uses \cs{def}. This uses +% \cs{protected@csedef}. % \begin{macrocode} -\DeclareOption*{% - \IfFileExists{glossary-\CurrentOption.sty} - {\eappto\@glsxtr@loadstyles{% - \noexpand\RequirePackage{glossary-\CurrentOption}}% - }% - {% - \PackageError{glossaries-extra-styles}% - {Unknown option `\CurrentOption'}{}% - }% -} -% \end{macrocode} -% Process the package options: -% \begin{macrocode} -\ProcessOptions + \newcommand*{\eglssetwidest}[2][0]{% + \protected@csedef{@glswidestname\romannumeral#1}{#2}% + } % \end{macrocode} +%\end{macro} % -% Load the required packages: -% \begin{macrocode} -\@glsxtr@loadstyles -% \end{macrocode} -% Adjust the styles so that they all have the post description hook. -% Also, instead of having a hard-coded \cs{space} before the -% location, use: -%\begin{macro}{\glsxtrprelocation} -%\changes{1.21}{2017-11-03}{new} -%This uses \cs{providecommand} as the same command is also -%provided by \sty{glossary-bookindex}. +%\begin{macro}{\xglssetwidest} +%\changes{1.05}{2016-06-10}{new} +%Like the above but uses \cs{protected@csxdef}. % \begin{macrocode} -\providecommand*{\glsxtrprelocation}{\space} + \newcommand*{\xglssetwidest}[2][0]{% + \protected@csxdef{@glswidestname\romannumeral#1}{#2}% + } % \end{macrocode} %\end{macro} % -%In case we have an old version of \sty{glossaries}: -%\begin{macro}{\renewglossarystyle} +%\begin{macro}{\glsupdatewidest} +%\changes{1.23}{2017-11-12}{new} +%Only sets if new value is wider than old value. % \begin{macrocode} -\providecommand{\renewglossarystyle}[2]{% - \ifcsundef{@glsstyle@#1}% - {% - \PackageError{glossaries-extra}{Glossary style `#1' isn't already defined}{}% - }% - {% - \csdef{@glsstyle@#1}{#2}% - }% -} + \newcommand*{\glsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\csdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \csdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } % \end{macrocode} %\end{macro} % -%\section{List-Like Styles} -% The list-like styles mostly already use the post description hook. -% Only the \glostyle{listdotted} style need modifying to add this. +%\begin{macro}{\gglsupdatewidest} +%\changes{1.23}{2017-11-12}{new} +%As above but global definition. % \begin{macrocode} -\ifdef{\@glsstyle@listdotted} -{% - \renewglossarystyle{listdotted}{% - \setglossarystyle{list}% - \renewcommand*{\glossentry}[2]{% - \item[]\makebox[\glslistdottedwidth][l]{% - \glsentryitem{##1}% - \glstarget{##1}{\glossentryname{##1}}% - \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% - \glossentrydesc{##1}\glspostdescription}% - \renewcommand*{\subglossentry}[3]{% - \item[]\makebox[\glslistdottedwidth][l]{% - \glssubentryitem{##2}% - \glstarget{##2}{\glossentryname{##2}}% - \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% - \glossentrydesc{##2}\glspostdescription}% - } -} -{% + \newcommand*{\gglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\csgdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \csgdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } % \end{macrocode} -% Assume the style isn't required if it hasn't already been defined. +%\end{macro} +% +%\begin{macro}{\eglsupdatewidest} +%\changes{1.23}{2017-11-12}{new} +%As \cs{glsupdatewidest} but expands value. % \begin{macrocode} -} + \newcommand*{\eglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\protected@csedef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \protected@csedef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } % \end{macrocode} -% The \glostyle{sublistdotted} style doesn't display the description -% for top-level entries. Sub-level entries use the -% \glostyle{listdottedstyle}. +%\end{macro} % -%The other list styles would be easier to adapt if the space -%before the number list wasn't hard coded. -%\changes{1.21}{2017-11-03}{modified list to remove hard coded \cs{space}} +%\begin{macro}{\xglsupdatewidest} +%\changes{1.23}{2017-11-12}{new} +%As above but global. % \begin{macrocode} -\ifdef{\@glsstyle@list} -{% + \newcommand*{\xglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\protected@csxdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \protected@csxdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } % \end{macrocode} -%\begin{macro}{\glslistprelocation} -%\changes{1.21}{2017-11-03}{new} -%Space before number list for top-level entries. +%\end{macro} +% +%\begin{macro}{\glsgetwidestname} +%\changes{1.05}{2016-06-10}{new} +% Provide a user-level macro to obtain the widest top-level name. % \begin{macrocode} - \newcommand{\glslistprelocation}{\glsxtrprelocation} + \newcommand*{\glsgetwidestname}{\@glswidestname} % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistchildprelocation} -%\changes{1.21}{2017-11-03}{new} -%Space before number list for child entries. +% +%\begin{macro}{\glsgetwidestsubname} +%\changes{1.05}{2016-06-10}{new} +% Provide a user-level macro to obtain the widest sub-entry name. % \begin{macrocode} - \newcommand{\glslistchildprelocation}{\glslistprelocation} + \newcommand*{\glsgetwidestsubname}[1]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\@glswidestname}% + {\csuse{@glswidestname\romannumeral#1}}% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistchildpostlocation} -%\changes{1.21}{2017-11-03}{new} -%Full stop after number list. +% +%\begin{macro}{\glsFindWidestTopLevelName} +%CamelCase is easier for long command names. Provide a CamelCase +%synonym of \ics{glsfindwidesttoplevelname}. % \begin{macrocode} - \newcommand{\glslistchildpostlocation}{.} + \let\glsFindWidestTopLevelName\glsfindwidesttoplevelname % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistdesc} -%\changes{1.31}{2018-05-09}{new} +% +%\begin{macro}{\glsFindWidestUsedTopLevelName} +%\changes{1.05}{2016-06-10}{new} +% Like \cs{glsfindwidesttoplevelname} but has an additional check +% that the entry has been used. Only useful if the glossaries occur +% at the end of the document, in which case this command should go +% at the start of the glossary. Alternatively, place at the end of +% the document and save for the next run. % \begin{macrocode} - \newcommand{\glslistdesc}[1]{\glossentrydesc{#1}\glspostdescription} + \newrobustcmd*{\glsFindWidestUsedTopLevelName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + {}% + }% + }% + } % \end{macrocode} %\end{macro} -%Redefine \glostyle{list} to use these commands. +% +%\begin{macro}{\glsFindWidestUsedAnyName} +%\changes{1.05}{2016-06-10}{new} +% Like the above but doesn't check the parent key. Useful if all +% levels should have the same width for the name. % \begin{macrocode} - \renewglossarystyle{list}{% - \renewenvironment{theglossary}% - {\begin{description}}{\end{description}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand*{\glossentry}[2]{% - \item[\glsentryitem{##1}% - \glstarget{##1}{\glossentryname{##1}}] - \glslistdesc{##1}\glslistprelocation ##2}% - \renewcommand*{\subglossentry}[3]{% - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\space - \glslistdesc{##2}% - \glslistchildprelocation ##3\glslistchildpostlocation}% - \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% + \newrobustcmd*{\glsFindWidestUsedAnyName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + {}% + }% + }% } -} -{} % \end{macrocode} -%Similarly for \glostyle{altlist}. Since it requires \glostyle{list}, -%the new commands should have been defined above. +%\end{macro} +% +%\begin{macro}{\glsFindWidestAnyName} +%\changes{1.05}{2016-06-10}{new} +% Like the above but doesn't check is the entry has been used. % \begin{macrocode} -\ifdef{\@glsstyle@altlist} -{% - \renewglossarystyle{altlist}{% - \setglossarystyle{list}% - \renewcommand*{\glossentry}[2]{% - \item[\glsentryitem{##1}% - \glstarget{##1}{\glossentryname{##1}}]% - \mbox{}\par\nobreak\@afterheading - \glslistdesc{##1}\glslistprelocation ##2}% - \renewcommand{\subglossentry}[3]{% - \par - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glslistdesc{##2}% - \glslistchildprelocation ##3}% + \newrobustcmd*{\glsFindWidestAnyName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% } -} -{} % \end{macrocode} -%Redefine \glostyle{listgroup} so that it discourages a break -%after group headings. -%\changes{1.21}{2017-11-03}{redefined \texttt{listgroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsFindWidestUsedLevelTwo} +%\changes{1.05}{2016-06-10}{new} +% This is like \cs{glsFindWidestUsedTopLevelName} but also sets the +% first two sub-levels as well. Any entry that has a +% great-grandparent is ignored. % \begin{macrocode} -\ifdef{\@glsstyle@listgroup} -{% - \renewglossarystyle{listgroup}{% - \setglossarystyle{list}% - \renewcommand*{\glsgroupheading}[1]{% - \item[\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}]% - \mbox{}\par\nobreak\@afterheading + \newrobustcmd*{\glsFindWidestUsedLevelTwo}[1][\@glo@types]{% + \dimen@=0pt\relax + \dimen@i=0pt\relax + \dimen@ii=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {% + \edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% + \ifglshasparent{\@glo@parent}% + {% + \edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% + \ifglshasparent{\@glo@parent}% + {}% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ii + \dimen@ii=\gls@tmplen + \eglssetwidest[2]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@i + \dimen@i=\gls@tmplen + \eglssetwidest[1]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ + \dimen@=\gls@tmplen + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + {}% + }% }% } -} -{} % \end{macrocode} -%Similarly for \glostyle{listhypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{listhypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsFindWidestLevelTwo} +%\changes{1.05}{2016-06-10}{new} +% This is like \cs{glsFindWidestUsedLevelTwo} but doesn't check if the +% entry has been used. % \begin{macrocode} -\ifdef{\@glsstyle@listhypergroup} -{% - \renewglossarystyle{listhypergroup}{% - \setglossarystyle{list}% - \renewcommand*{\glossaryheader}{% - \glslistnavigationitem{\glsnavigation}}% - \renewcommand*{\glsgroupheading}[1]{% - \item[\glslistgroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}]% - \mbox{}\par\nobreak\@afterheading + \newrobustcmd*{\glsFindWidestLevelTwo}[1][\@glo@types]{% + \dimen@=0pt\relax + \dimen@i=0pt\relax + \dimen@ii=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {% + \edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% + \ifglshasparent{\@glo@parent}% + {% + \edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% + \ifglshasparent{\@glo@parent}% + {}% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ii + \dimen@ii=\gls@tmplen + \eglssetwidest[2]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@i + \dimen@i=\gls@tmplen + \eglssetwidest[1]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ + \dimen@=\gls@tmplen + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% }% } -} -{} % \end{macrocode} -%Similarly for \glostyle{altlistgroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{altlistgroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsFindWidestUsedAnyNameSymbol} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestUsedAnyName} but also measures the +% symbol. The length of the widest symbol is stored in the second argument +% should be a length register. % \begin{macrocode} -\ifdef{\@glsstyle@altlistgroup} -{% - \renewglossarystyle{altlistgroup}{% - \setglossarystyle{altlist}% - \renewcommand*{\glsgroupheading}[1]{% - \item[\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}]% - \mbox{}\par\nobreak\@afterheading + \newrobustcmd*{\glsFindWidestUsedAnyNameSymbol}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + {}% + }% }% } -} -{} % \end{macrocode} -%Similarly for \glostyle{altlisthypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{altlisthypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsFindWidestAnyNameSymbol} +%\changes{1.05}{2016-06-10}{new} +% Like the above but doesn't check if the entry has been used. % \begin{macrocode} -\ifdef{\@glsstyle@altlisthypergroup} -{% - \renewglossarystyle{altlisthypergroup}{% - \setglossarystyle{altlist}% - \renewcommand*{\glossaryheader}{% - \glslistnavigationitem{\glsnavigation}}% - \renewcommand*{\glsgroupheading}[1]{% - \item[\glslistgroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}]% - \mbox{}\par\nobreak\@afterheading + \newrobustcmd*{\glsFindWidestAnyNameSymbol}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% }% } -} -{} % \end{macrocode} +%\end{macro} % -%\section{Longtable Styles} -% The three and four column styles require adjustment to add the -% post-description hook. The two column styles need the hard-coded -% \cs{space} changed to \cs{glsxtrprelocation}. +%\begin{macro}{\glsFindWidestUsedAnyNameSymbolLocation} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestUsedAnyNameSymbol} but also measures the +% location list. This requires \ics{glsentrynumberlist}. +% The length of the widest symbol is stored in the second argument +% should be a length register. The length of the widest location +% list is stored in the third argument, which should also be a +% length register. % \begin{macrocode} -\ifcsdef{@glsstyle@long} -{% - \renewglossarystyle{long}{% - \renewenvironment{theglossary}% - {\begin{longtable}{lp{\glsdescwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription - \glsxtrprelocation ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription - \glsxtrprelocation ##3\tabularnewline + \newrobustcmd*{\glsFindWidestUsedAnyNameSymbolLocation}[3][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + #3=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#3\relax + #3=\dimen@ + \fi + }% + {}% + }% }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{ & \tabularnewline}% - \fi } -} -{} % \end{macrocode} -%Three column style: +%\end{macro} +% +%\begin{macro}{\glsFindWidestAnyNameSymbolLocation} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestUsedAnyNameSymbol} but doesn't check if +% the entry has been used. % \begin{macrocode} -\ifcsdef{@glsstyle@long3col} -{% - \renewglossarystyle{long3col}{% - \renewenvironment{theglossary}% - {\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - ##3\tabularnewline + \newrobustcmd*{\glsFindWidestAnyNameSymbolLocation}[3][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + #3=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#3\relax + #3=\dimen@ + \fi + }% }% -% \end{macrocode} -%Conditional needs to be outside of \cs{glsgroupskip} otherwise it -%can cause \qt{Incomplete \cs{iftrue}} errors. -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} -% \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& &\tabularnewline}% - \fi } -} -{} % \end{macrocode} -% Four column style: +%\end{macro} +% +%\begin{macro}{\glsFindWidestUsedAnyNameLocation} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestUsedAnyNameSymbolLocation} but doesn't +% measure the symbol. The length of the widest location +% list is stored in the second argument, which should be a +% length register. % \begin{macrocode} -\ifcsdef{@glsstyle@long4col} -{% - \renewglossarystyle{long4col}{% - \renewenvironment{theglossary}% - {\begin{longtable}{llll}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & - \glossentrysymbol{##1} & - ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - \glossentrysymbol{##2} & ##3\tabularnewline + \newrobustcmd*{\glsFindWidestUsedAnyNameLocation}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + {}% + }% }% -% \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} -% \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% - \fi } -} -{} % \end{macrocode} +%\end{macro} % -%The styles in \sty{glossary-longbooktabs} are all based on the -%styles in \sty{glossary-long}, so no adjustments are needed for -%that package. -% -%\section{Long Ragged Styles} -% The three and four column styles require adjustment for the -% post-description hook, but not the two column styles. However, the -% two-column styles need to have \cs{space} replaced with -% \cs{glsxtrprelocation}. +%\begin{macro}{\glsFindWidestAnyNameLocation} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestAnyNameLocation} but doesn't +% check the \gls{firstuse} flag. % \begin{macrocode} -\ifcsdef{@glsstyle@longragged} -{% - \renewglossarystyle{longragged}{% - \renewenvironment{theglossary}% - {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% - \tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}% - \glspostdescription\glsxtrprelocation ##3% - \tabularnewline + \newrobustcmd*{\glsFindWidestAnyNameLocation}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{ & \tabularnewline}% - \fi } -} -{} -% \end{macrocode} -%Three and four column styles don't use \cs{glsxtrprelocation} since the number -%list is in its own column. -% \begin{macrocode} -\ifcsdef{@glsstyle@longragged3col} -{% - \renewglossarystyle{longragged3col}{% - \renewenvironment{theglossary}% - {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}% - >{\raggedright}p{\glspagelistwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - ##3\tabularnewline - }% % \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +%\end{macro} +% +%\begin{macro}{\glsxtrComputeTreeIndent} +%\changes{1.05}{2016-06-10}{new} +% Compute the value of \cs{glstreeindent}. Argument is the entry label. +% (Ignored in default definition, but this command may be redefined +% to take the particular entry into account.) Note that the +% sub-levels modify \cs{glstreeindent}. % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& &\tabularnewline}% - \fi + \newcommand*{\glsxtrComputeTreeIndent}[1]{% + \glstreeindent=\glsxtrtreetopindent\relax } -} -{} % \end{macrocode} -% Four column style: +%\end{macro} +% +%\begin{macro}{\glsxtrComputeTreeSubIndent} +%\changes{1.05}{2016-06-10}{new} +%\begin{definition} +%\cs{glsxtrComputeTreeSubIndent}\marg{level}\marg{label}\marg{register} +%\end{definition} +% Compute the indent for the sub-entries. The first argument is the +% level, the second argument is the entry label and the third +% argument is the length register used to store the computed indent. % \begin{macrocode} -\ifcsdef{@glsstyle@altlongragged4col} -{% - \renewglossarystyle{altlongragged4col}{% - \renewenvironment{theglossary}% - {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}l% - >{\raggedright}p{\glspagelistwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & \glossentrysymbol{##1} & - ##2\tabularnewline + \newcommand*{\glsxtrComputeTreeSubIndent}[3]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {% + \settowidth{#3}{\glstreenamefmt{\@glswidestname\space}}% }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - \glossentrysymbol{##2} & ##3\tabularnewline + {% + \settowidth{#3}{\glstreenamefmt{% + \csname @glswidestname\romannumeral#1\endcsname\space}}% }% + } % \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +%\end{macro} +% +%\begin{macro}{\glsxtrAltTreeSetHangIndent} +%\changes{1.05}{2016-06-10}{new} +% Set \cs{hangindent} for top-level entries: % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% - \fi - } -} -{} + \newcommand*{\glsxtrAltTreeSetHangIndent}{\hangindent\glstreeindent} % \end{macrocode} +%\end{macro} % -%\section{Supertabular Styles} -% The three and four column styles require adjustment to add the -% post-description hook. The two column styles need the hard-coded -% \cs{space} changed to \cs{glsxtrprelocation}. +%\begin{macro}{\glsxtrAltTreeSetSubHangIndent} +%\changes{1.05}{2016-06-10}{new} +% Set \cs{hangindent} for sub-entries: % \begin{macrocode} -\ifcsdef{@glsstyle@super} -{% - \renewglossarystyle{super}{% + \newcommand*{\glsxtrAltTreeSetSubHangIndent}[1]{\hangindent\glstreeindent} +% \end{macrocode} +%\end{macro} +% +% Redefine \glostyle{alttree}: +% \begin{macrocode} + \renewglossarystyle{alttree}{% \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{lp{\glsdescwidth}}}% - {\end{supertabular}}% + {% + \glsxtralttreeInit + \def\@gls@prevlevel{-1}% + \mbox{}\par}% + {\par}% \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription - \glsxtrprelocation ##2\tabularnewline - }% + \ifnum\@gls@prevlevel=0\relax + \else + \glsxtrComputeTreeIndent{##1}% + \fi + \parindent\glstreeindent + \glsxtrAltTreeSetHangIndent + \makebox[0pt][r]% + {% + \glstreenamebox{\glstreeindent}% + {% + \glsentryitem{##1}% + \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + }% + }% + \glsxtralttreeSymbolDescLocation{##1}{##2}% + \def\@gls@prevlevel{0}% + } \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription - \glsxtrprelocation ##3\tabularnewline + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \ifnum\@gls@prevlevel=##1\relax + \else + \glsxtrComputeTreeSubIndent{##1}{##2}{\gls@tmplen}% + \ifnum\@gls@prevlevel<##1\relax + \setlength\glstreeindent\gls@tmplen + \addtolength\glstreeindent\parindent + \parindent\glstreeindent + \else + \ifnum\@gls@prevlevel=0\relax + \glsxtrComputeTreeIndent{##2}% + \else + \glsxtrComputeTreeSubIndent{\@gls@prevlevel}{##2}{\glstreeindent}% + \fi + \addtolength\parindent{-\glstreeindent}% + \setlength\glstreeindent\parindent + \fi + \fi + \glsxtrAltTreeSetSubHangIndent{##1}% + \makebox[0pt][r]{\glstreenamebox{\gls@tmplen}{% + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}}}% + \glsxtralttreeSubSymbolDescLocation{##1}{##2}{##3}% + \def\@gls@prevlevel{##1}% }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& \tabularnewline}% - \fi + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% } +}% +{% } -{} % \end{macrocode} -%Three column style: +%Redefine \glostyle{alttreegroup} so that it discourages a break +%after group headings. +%\changes{1.21}{2017-11-03}{redefined \texttt{alttreegroup} to discourage +%breaks after group headings} +%Can't use \cs{@afterheading} here as it messes with the first item +%of the group. % \begin{macrocode} -\ifcsdef{@glsstyle@super3col} +\ifdef{\@glsstyle@alttreegroup} {% - \renewglossarystyle{super3col}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - ##3\tabularnewline + \renewglossarystyle{alttreegroup}{% + \setglossarystyle{alttree}% + \renewcommand{\glsgroupheading}[1]{\par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% + \nopagebreak\indexspace\nopagebreak }% -% \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} -% \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% - \fi - } + }% +}% +{% } -{} % \end{macrocode} -% Four column styles: +%Similarly for \glostyle{alttreehypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{alttreehypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\ifcsdef{@glsstyle@super4col} +\ifdef{\@glsstyle@alttreehypergroup} {% - \renewglossarystyle{super4col}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{llll}}{% - \end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & - \glossentrysymbol{##1} & ##2\tabularnewline + \renewglossarystyle{alttreehypergroup}{% + \setglossarystyle{alttree}% + \renewcommand*{\glossaryheader}{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreenavigationfmt{\glsnavigation}\par\indexspace }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - \glossentrysymbol{##2} & ##3\tabularnewline + \renewcommand*{\glsgroupheading}[1]{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \nopagebreak\indexspace\nopagebreak }% -% \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} -% \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% - \fi } +}% +{% } -{} % \end{macrocode} % -%\section{Super Ragged Styles} -% The three and four column styles require adjustment for the -% post-description hook, but not the two column styles. However, the -% two-column styles need to have \cs{space} replaced with -% \cs{glsxtrprelocation}. +%\section{Multicolumn Styles} +%Adjust \glostyle{mcolindexgroup} to discourage page breaks after +%the group headings. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexgroup} to discourage +%breaks after group headings} % \begin{macrocode} -\ifcsdef{@glsstyle@superragged} +\ifdef{\@glsstyle@mcolindexgroup} {% - \renewglossarystyle{superragged}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% - \tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription - \glsxtrprelocation ##3% - \tabularnewline + \renewglossarystyle{mcolindexgroup}{% + \setglossarystyle{mcolindex}% + \renewcommand*{\glsgroupheading}[1]{% + \item\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% + \nopagebreak\indexspace\nobreak\@afterheading }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& \tabularnewline}% - \fi } +}% +{% } -{} % \end{macrocode} -%Three column style: +%Similarly for \glostyle{mcolindexhypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexhypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\ifcsdef{@glsstyle@superragged3col} +\ifdef{\@glsstyle@mcolindexhypergroup} {% - \renewglossarystyle{superragged3col}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}% - >{\raggedright}p{\glspagelistwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & - ##2\tabularnewline + \renewglossarystyle{mcolindexhypergroup}{% + \setglossarystyle{mcolindex}% + \renewcommand*{\glossaryheader}{% + \item\glstreenavigationfmt{\glsnavigation}% + \indexspace }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - ##3\tabularnewline + \renewcommand*{\glsgroupheading}[1]{% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nobreak\@afterheading }% -% \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} -% \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% - \fi } +}% +{% } -{} % \end{macrocode} -% Four columns: +%Similarly for \glostyle{mcolindexspannav}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexspannav} to discourage +%breaks after group headings} % \begin{macrocode} -\ifcsdef{@glsstyle@altsuperragged4col} +\ifdef{\@glsstyle@mcolindexspannav} {% - \renewglossarystyle{altsuperragged4col}{% + \renewglossarystyle{mcolindexspannav}{% + \setglossarystyle{index}% \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}l% - >{\raggedright}p{\glspagelistwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & - \glossentrysymbol{##1} & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - \glossentrysymbol{##2} & ##3\tabularnewline + {% + \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}]% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\item\glstreeitem}% + {\end{multicols}}% + \renewcommand*{\glsgroupheading}[1]{% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nobreak\@afterheading }% -% \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} -% \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% - \fi } -} -{} -% \end{macrocode} -% -%\section{Inline Style} -% The \glostyle{inline} style is dealt with slightly differently. -% The \cs{glspostdescription} hook is actually in -% \cs{glspostinline}, which is called at the end of the glossary. -% The original definition of \cs{glspostinline} also includes a -% space, which is unnecessary. Here, instead of redefining the -% \glostyle{inline} style, just redefine \cs{glspostinline} and -% \cs{glsinlinedescformat}. -% \begin{macrocode} -\ifdef{\@glsstyle@inline} +}% {% - \renewcommand*{\glspostinline}{.\spacefactor\sfcode`\.} -% \end{macrocode} -% Just use \cs{glsxtrpostdescription} instead of -% \cs{glspostdescription}. -% \begin{macrocode} - \renewcommand*{\glsinlinedescformat}[3]{% - \space#1\glsxtrpostdescription} - \renewcommand*{\glsinlinesubdescformat}[3]{% - #1\glsxtrpostdescription} -% \end{macrocode} -% The default settings don't show the location lists, so there's no -% adjustment for \cs{glsxtrprelocation}. -% \begin{macrocode} -} -{} -% \end{macrocode} -% -%\section{Tree Styles} -% Redefine both \cs{glstreenamefmt} and \cs{glstreegroupheaderfmt} -% in terms of \cs{glstreedefaultnamefmt} to make it easier to change -% both at the same time or only change one without affecting the -% other. -% \begin{macrocode} -\ifdef\glstreenamefmt -{ -% \end{macrocode} -%\begin{macro}{\glstreedefaultnamefmt} -%\changes{1.31}{2018-05-09}{new} -% \begin{macrocode} - \newcommand{\glstreedefaultnamefmt}[1]{\textbf{#1}} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\glstreenamefmt} -%\changes{1.31}{2018-05-09}{added redefinition} -% \begin{macrocode} - \renewcommand{\glstreenamefmt}[1]{\glstreedefaultnamefmt{#1}} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\glstreegroupheaderfmt} -%\changes{1.31}{2018-05-09}{added redefinition} -%This command was only introduced to \sty{glossary-tree} v4.22, so -%it may not be defined. -% \begin{macrocode} - \def\glstreegroupheaderfmt#1{\glstreedefaultnamefmt{#1}} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\glstreenavigationfmt} -%\changes{1.31}{2018-05-09}{added redefinition} -%This command was only introduced to \sty{glossary-tree} v4.22, so -%it may not be defined. -% \begin{macrocode} - \def\glstreenavigationfmt#1{\glstreedefaultnamefmt{#1}} -% \end{macrocode} -%\end{macro} -% \begin{macrocode} } -{} -% \end{macrocode} -% The \glostyle{index} style is redefined so that the space before -% the number list isn't hard coded. -%\changes{1.21}{2017-11-03}{modified index to remove hard coded \cs{space}} -% \begin{macrocode} -\ifdef{\@glsstyle@index} -{ % \end{macrocode} -%\begin{macro}{\glstreeprelocation} -%\changes{1.21}{2017-11-03}{new} -%The space before the number list for top-level entries. This is -%shared by the other tree styles. +%Similarly for \glostyle{mcoltreegroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreegroup} to discourage +%breaks after group headings} % \begin{macrocode} - \newcommand*{\glstreeprelocation}{\glsxtrprelocation} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\glstreechildprelocation} -%\changes{1.21}{2017-11-03}{new} -%The space before the number list for child entries. This is -%shared by the other tree styles. +\ifdef{\@glsstyle@mcoltreegroup} +{% + \renewglossarystyle{mcoltreegroup}{% + \setglossarystyle{mcoltree}% + \renewcommand{\glsgroupheading}[1]{\par + \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% + \nopagebreak\indexspace\nobreak\@afterheading + }% + } +}% +{% +} +% \end{macrocode} +%Similarly for \glostyle{mcoltreehypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreehypergroup} to discourage +%breaks after group headings} % \begin{macrocode} - \newcommand*{\glstreechildprelocation}{\glstreeprelocation} +\ifdef{\@glsstyle@mcoltreehypergroup} +{% + \renewglossarystyle{mcoltreehypergroup}{% + \setglossarystyle{mcoltree}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace + }% + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nobreak\@afterheading + }% + } +}% +{% +} % \end{macrocode} -%\end{macro} -%Modify the \glostyle{index} style. +%Similarly for \glostyle{mcoltreespannav}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreespannav} to discourage +%breaks after group headings} % \begin{macrocode} - \renewglossarystyle{index}{% +\ifdef{\@glsstyle@mcoltreespannav} +{% + \renewglossarystyle{mcoltreespannav}{% + \setglossarystyle{tree}% \renewenvironment{theglossary}% - {\setlength{\parindent}{0pt}% + {% + \begin{multicols}{\glsmcols}% + [\noindent\glstreenavigationfmt{\glsnavigation}]% + \setlength{\parindent}{0pt}% \setlength{\parskip}{0pt plus 0.3pt}% - \let\item\glstreeitem - \let\subitem\glstreesubitem - \let\subsubitem\glstreesubsubitem - }% - {\par}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand*{\glossentry}[2]{% - \item\glsentryitem{##1}% - \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% - \glstreesymbol{##1}% - \glstreedesc{##1}% - \glstreeprelocation ##2% }% - \renewcommand{\subglossentry}[3]{% - \ifcase##1\relax - \item - \or - \subitem - \glssubentryitem{##2}% - \else - \subsubitem - \fi - \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}% - \glstreechildsymbol{##2}% - \glstreechilddesc{##2}% - \glstreechildprelocation ##3% + {\end{multicols}}% + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nobreak\@afterheading }% - \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% } +}% +{% } -{} % \end{macrocode} -% -% The \glostyle{indexgroup} style is redefined to discourage a page -% break after the heading. -%\changes{1.21}{2017-11-03}{redefined \texttt{indexgroup} to discourage +%Similarly for \glostyle{mcoltreenonamegroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamegroup} to discourage %breaks after group headings} % \begin{macrocode} -\ifdef{\@glsstyle@indexgroup} +\ifdef{\@glsstyle@mcoltreenonamegroup} {% - \renewglossarystyle{indexgroup}{% - \setglossarystyle{index}% - \renewcommand*{\glsgroupheading}[1]{% - \item\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% - \nopagebreak\indexspace - \nobreak\@afterheading + \renewglossarystyle{mcoltreenonamegroup}{% + \setglossarystyle{mcoltreenoname}% + \renewcommand{\glsgroupheading}[1]{\par + \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% + \nopagebreak\indexspace\nobreak\@afterheading }% } +}% +{% } -{} % \end{macrocode} -% -%Similarly for \glostyle{indexhypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{indexhypergroup} to discourage +%Similarly for \glostyle{mcoltreenonamehypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamehypergroup} to discourage %breaks after group headings} % \begin{macrocode} -\ifdef{\@glsstyle@indexhypergroup} +\ifdef{\@glsstyle@mcoltreenonamehypergroup} {% - \renewglossarystyle{indexhypergroup}{% - \setglossarystyle{index}% + \renewglossarystyle{mcoltreenonamehypergroup}{% + \setglossarystyle{mcoltreenoname}% \renewcommand*{\glossaryheader}{% - \item\glstreenavigationfmt{\glsnavigation}% - \nobreak\@afterheading\indexspace}% + \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace}% \renewcommand*{\glsgroupheading}[1]{% - \item\glstreegroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace - \nobreak\@afterheading}% - }% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nobreak\@afterheading}% + } +}% +{% } -{} % \end{macrocode} -% -%Adjust \glostyle{tree} style to remove hard coded space before -%number list. +%Similarly for \glostyle{mcoltreenonamespannav}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamespannav} to discourage +%breaks after group headings} % \begin{macrocode} -\ifdef{\@glsstyle@tree} +\ifdef{\@glsstyle@mcoltreenonamespannav} {% -%Provide a command for use with the \glostyle{tree} styles that displays -%the pre-description separator, the -%description and post-description hook. -%\begin{macro}{\glstreedesc} -%\changes{1.31}{2018-05-09}{new} -% \begin{macrocode} - \newcommand{\glstreedesc}[1]{% - \glstreepredesc\glossentrydesc{#1}\glspostdescription + \renewglossarystyle{mcoltreenonamespannav}{% + \setglossarystyle{treenoname}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{\glsmcols}% + [\noindent\glstreenavigationfmt{\glsnavigation}]% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + }% + {\end{multicols}}% + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nobreak\@afterheading}% } +}% +{% +} % \end{macrocode} -%\end{macro} -%Similarly for the symbol. -%\begin{macro}{\glstreesymbol} -%\changes{1.31}{2018-05-09}{new} -% \begin{macrocode} - \newcommand{\glstreesymbol}[1]{% - \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% - }% -% \end{macrocode} -%\end{macro} -%And for the child entries: -%\begin{macro}{\glstreechilddesc} -%\changes{1.31}{2018-05-09}{new} +%\glostyle{mcolalttree} needs adjusting so that it uses \cs{glsxtralttreeInit} +%This doesn't use \verb|\mbox{}\par| which would unbalance the top +%of the columns. +%\changes{1.21}{2017-11-03}{adjusted mcolalttree} % \begin{macrocode} - \newcommand{\glstreechilddesc}[1]{% - \glstreechildpredesc\glossentrydesc{#1}\glspostdescription - }% +\ifdef{\@glsstyle@mcolalttree} +{% + \renewglossarystyle{mcolalttree}{% + \setglossarystyle{alttree}% + \renewenvironment{theglossary}% + {% + \glsxtralttreeInit + \def\@gls@prevlevel{-1}% + \begin{multicols}{\glsmcols}% + }% + {\par\end{multicols}}% + } +}% +{% +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\glstreechildsymbol} -%\changes{1.31}{2018-05-09}{new} -%This just behaves in the same way as the top-level. +%Redefine \glostyle{mcolalttreegroup} to discourage page breaks +%after the group headings. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreegroup} to discourage +%breaks after group headings} % \begin{macrocode} - \newcommand{\glstreechildsymbol}[1]{% - \glstreesymbol{#1}% - }% +\ifdef{\@glsstyle@mcolalttreegroup} +{% + \renewglossarystyle{mcolalttreegroup}{% + \setglossarystyle{mcolalttree}% + \renewcommand{\glsgroupheading}[1]{\par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% + \nopagebreak\indexspace\nopagebreak + }% + } +}% +{% +} % \end{macrocode} -%\end{macro} +%Similarly for \glostyle{mcolalttreehypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreehypergroup} to discourage +%breaks after group headings} % \begin{macrocode} - \renewglossarystyle{tree}{% - \renewenvironment{theglossary}% - {\setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}}% - {}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% +\ifdef{\@glsstyle@mcolalttreehypergroup} +{% + \renewglossarystyle{mcolalttreehypergroup}{% + \setglossarystyle{mcolalttree}% + \renewcommand*{\glossaryheader}{% + \par + \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax - \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% - \glstreesymbol{##1}% - \glstreedesc{##1}% - \glstreeprelocation##2\par + \glstreenavigationfmt{\glsnavigation}% + \par\indexspace }% - \renewcommand{\subglossentry}[3]{% - \hangindent##1\glstreeindent\relax - \parindent##1\glstreeindent\relax - \ifnum##1=1\relax - \glssubentryitem{##2}% - \fi - \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}% - \glstreechildsymbol{##2}% - \glstreechilddesc{##2}% - \glstreechildprelocation ##3\par + \renewcommand*{\glsgroupheading}[1]{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nopagebreak }% - \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% - }% -} -{} -% \end{macrocode} -% -% The \glostyle{treegroup} style is redefined to discourage a page -% break after the heading. -%\changes{1.21}{2017-11-03}{redefined \texttt{treegroup} to discourage -%breaks after group headings} -% \begin{macrocode} -\ifdef{\@glsstyle@treegroup} -{% - \renewglossarystyle{treegroup}{% - \setglossarystyle{tree}% - \renewcommand{\glsgroupheading}[1]{\par - \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}\par - \nopagebreak\indexspace\nobreak\@afterheading}% } +}% +{% } -{} % \end{macrocode} -% -%Similarly for \glostyle{treehypergroup} -%\changes{1.21}{2017-11-03}{redefined \texttt{treehypergroup} to discourage +%Similarly for \glostyle{mcolalttreespannav}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreespannav} to discourage %breaks after group headings} % \begin{macrocode} -\ifdef{\@glsstyle@treehypergroup} +\ifdef{\@glsstyle@mcolalttreespannav} {% - \renewglossarystyle{treehypergroup}{% - \setglossarystyle{tree}% - \renewcommand*{\glossaryheader}{% - \par\noindent\glstreenavigationfmt{\glsnavigation}\par - \nobreak\@afterheading\indexspace}% + \renewglossarystyle{mcolalttreespannav}{% + \setglossarystyle{alttree}% + \renewenvironment{theglossary}% + {% + \glsxtralttreeInit + \def\@gls@prevlevel{-1}% + \begin{multicols}{\glsmcols}% + [\noindent\glstreenavigationfmt{\glsnavigation}]% + }% + {\par\end{multicols}}% \renewcommand*{\glsgroupheading}[1]{% - \par\noindent - \glstreegroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par - \nopagebreak\indexspace\nobreak\@afterheading}% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \nopagebreak\indexspace\nopagebreak + }% } +}% +{% } -{} % \end{macrocode} % -%Adjust \glostyle{treenoname} style to remove hard coded space before -%number list. +% Reset the default style % \begin{macrocode} -\ifdef{\@glsstyle@treenoname} -{% -%Provide a command for use with the \glostyle{treenoname} styles that displays -%the pre-description separator, the -%description and post-description hook. -%\begin{macro}{\glstreenonamedesc} -%\changes{1.31}{2018-05-09}{new} +\ifx\@glossary@default@style\relax +\else + \setglossarystyle{\@glsxtr@current@style} +\fi +% \end{macrocode} +%\iffalse % \begin{macrocode} - \newcommand{\glstreenonamedesc}[1]{% - \glstreepredesc\glossentrydesc{#1}\glspostdescription - }% +% % \end{macrocode} -%\end{macro} -%Similarly for the symbol. -%\begin{macro}{\glstreenonamesymbol} -%\changes{1.31}{2018-05-09}{new} +%\fi +%\iffalse % \begin{macrocode} - \newcommand{\glstreenonamesymbol}[1]{% - \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% - }% +%<*glossary-bookindex.sty> +% \end{macrocode} +%\fi +%\chapter{bookindex style (\styfmt{glossary-bookindex.sty})} +%\changes{1.21}{2017-11-03}{new} +%\section{Package Initialisation and Options} +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossary-bookindex}[2018/11/30 1.37 (NLCT)] +% \end{macrocode} +%Load required packages. +% \begin{macrocode} +\RequirePackage{multicol} +\RequirePackage{glossary-tree} +% \end{macrocode} +%\begin{macro}{\glsxtrbookindexcols} +%\changes{1.21}{2017-11-03}{new} +% Number of columns. +% \begin{macrocode} +\newcommand{\glsxtrbookindexcols}{2} % \end{macrocode} %\end{macro} -%\begin{macro}{\glstreenonamechilddesc} -%\changes{1.31}{2018-05-09}{new} -%The child entry doesn't have the pre-description separator as the -%name isn't displayed. +%\begin{macro}{\glsxtrbookindexname} +%\changes{1.21}{2017-11-03}{new} +%Format used for top-level entries. +% (Argument is the label.) % \begin{macrocode} - \newcommand{\glstreenonamechilddesc}[1]{% - \glossentrydesc{#1}\glspostdescription - }% +\newcommand*{\glsxtrbookindexname}[1]{\glossentryname{#1}} % \end{macrocode} %\end{macro} +%\begin{macro}{\glsxtrbookindexsubname} +%\changes{1.21}{2017-11-03}{new} +%Format used for sub entries. % \begin{macrocode} - \renewglossarystyle{treenoname}{% - \renewenvironment{theglossary}% - {\setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}}% - {}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \hangindent0pt\relax - \parindent0pt\relax - \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% - \glstreenonamesymbol{##1}% - \glstreenonamedesc{##1}% - \glstreeprelocation##2\par - }% - \renewcommand{\subglossentry}[3]{% - \hangindent##1\glstreeindent\relax - \parindent##1\glstreeindent\relax - \ifnum##1=1\relax - \glssubentryitem{##2}% - \fi - \glstarget{##2}{\strut}% - \glstreenonamechilddesc{##2}% - \glstreechildprelocation##3\par - }% - \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% - } -} -{} +\newcommand*{\glsxtrbookindexsubname}[1]{\glsxtrbookindexname{#1}} % \end{macrocode} +%\end{macro} % -% The \glostyle{treenonamegroup} style is redefined to discourage a page -% break after the heading. -%\changes{1.21}{2017-11-03}{redefined \texttt{treenonamegroup} to discourage -%breaks after group headings} +%\begin{macro}{\glsxtrprelocation} +%\changes{1.21}{2017-11-03}{new} +%Provide in case \sty{glossaries-stylemods} isn't loaded. % \begin{macrocode} -\ifdef{\@glsstyle@treenonamegroup} -{% - \renewglossarystyle{treenonamegroup}{% - \setglossarystyle{treenoname}% - \renewcommand{\glsgroupheading}[1]{\par - \noindent\glstreegroupheaderfmt - {\glsgetgrouptitle{##1}}% - \nopagebreak\indexspace\nobreak\@afterheading - }% - } +\providecommand*{\glsxtrprelocation}{\space} +% \end{macrocode} +%\end{macro} + +%\begin{macro}{\glsxtrbookindexprelocation} +%\changes{1.21}{2017-11-03}{new} +%Separator used before location list for top-level entries. +%Version 1.22 has removed the \cs{ifglsnopostdot} check +%since this style doesn't display the description. +%\changes{1.22}{2017-11-08}{removed check for no post dot} +% \begin{macrocode} +\newcommand*{\glsxtrbookindexprelocation}[1]{% + \glsxtrifhasfield{location}{#1}% + {,\glsxtrprelocation}% + {\glsxtrprelocation}% } -{} % \end{macrocode} -% -%Similarly for \glostyle{treenonamehypergroup} -%\changes{1.21}{2017-11-03}{redefined \texttt{treenonamehypergroup} to discourage -%breaks after group headings} +%\end{macro} +%\begin{macro}{\glsxtrbookindexsubprelocation} +%\changes{1.21}{2017-11-03}{new} +%Separator used before location list for sub-entries. % \begin{macrocode} -\ifdef{\@glsstyle@treenonamehypergroup} -{% - \renewglossarystyle{treenonamehypergroup}{% - \setglossarystyle{treenoname}% - \renewcommand*{\glossaryheader}{% - \par\noindent\glstreenavigationfmt{\glsnavigation}\par - \nobreak\@afterheading\indexspace}% - \renewcommand*{\glsgroupheading}[1]{% - \par\noindent - \glstreegroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nobreak\@afterheading}% - } +\newcommand*{\glsxtrbookindexsubprelocation}[1]{% + \glsxtrbookindexprelocation{#1}% } -{} % \end{macrocode} +%\end{macro} % -% The \glostyle{alttree} style is redefined to make it easier to -% made minor adjustments. +%\begin{macro}{\glsxtrbookindexparentchildsep} +%\changes{1.21}{2017-11-03}{new} +%Separator used between top-level parent and child entry. % \begin{macrocode} -\ifdef{\@glsstyle@alttree} -{% +\newcommand{\glsxtrbookindexparentchildsep}{\nopagebreak} % \end{macrocode} -% Only redefine this style if it's already been defined. +%\end{macro} +%\begin{macro}{\glsxtrbookindexparentsubchildsep} +%\changes{1.21}{2017-11-03}{new} +%Separator used between sub-level parent and child entry. +% \begin{macrocode} +\newcommand{\glsxtrbookindexparentsubchildsep}{\glsxtrbookindexparentchildsep} +% \end{macrocode} +%\end{macro} % -%\begin{macro}{\glsxtralttreeSymbolDescLocation} -%\changes{1.05}{2016-06-10}{new} -%\begin{definition} -%\cs{glsxtralttreeSymbolDescLocation}\marg{label}\marg{location -%list} -%\end{definition} -%Layout the symbol, description and location for top-level entries. +%\begin{macro}{\glsxtrbookindexbetween} +%\changes{1.21}{2017-11-03}{new} +%Between two top-level entries identified by the labels in the +%arguments. % \begin{macrocode} - \newcommand{\glsxtralttreeSymbolDescLocation}[2]{% - {% - \let\par\glsxtrAltTreePar - \ifglshassymbol{#1}{(\glossentrysymbol{#1})\space}{}% - \glossentrydesc{#1}\glspostdescription\glstreeprelocation #2\par - }% - } +\newcommand{\glsxtrbookindexbetween}[2]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrbookindexsubbetween} +%\changes{1.21}{2017-11-03}{new} +%Between two level~1 entries identified by the labels in the +%arguments. +% \begin{macrocode} +\newcommand{\glsxtrbookindexsubbetween}[2]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrbookindexsubsubbetween} +%\changes{1.21}{2017-11-03}{new} +%Between two level~2 entries identified by the labels in the +%arguments. +% \begin{macrocode} +\newcommand{\glsxtrbookindexsubsubbetween}[2]{} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrAltTreeIndent} -%\changes{1.05}{2016-06-10}{new} -% Paragraph indent for subsequent paragraphs in multi-paragraph -% descriptions. +%\begin{macro}{\glsxtrbookindexatendgroup} +%\changes{1.21}{2017-11-03}{new} +%At the end of a letter group. The argument is the index of the last +%top-level entry. % \begin{macrocode} - \newlength\glsxtrAltTreeIndent +\newcommand{\glsxtrbookindexatendgroup}[1]{} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrAltTreePar} -%\changes{1.05}{2016-06-10}{new} -%Multi-paragraph descriptions need to keep the hanging indent. +%\begin{macro}{\glsxtrbookindexsubatendgroup} +%\changes{1.21}{2017-11-03}{new} +%At the end of a letter group. The argument is the index of the last +%level~1 entry. % \begin{macrocode} - \newcommand{\glsxtrAltTreePar}{% - \@@par - \glsxtrAltTreeSetHangIndent - \setlength{\parindent}{\dimexpr\hangindent+\glsxtrAltTreeIndent}% - } +\newcommand{\glsxtrbookindexsubatendgroup}[1]{} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtralttreeSubSymbolDescLocation} -%\changes{1.05}{2016-06-10}{new} -%\begin{definition} -%\cs{glsxtralttreeSubSymbolDescLocation}\marg{level}\marg{label}\marg{location -%list} -%\end{definition} -%Layout the symbol, description and location for sub-entries. -% Defaults to the same as the top-level. +%\begin{macro}{\glsxtrbookindexsubsubatendgroup} +%\changes{1.21}{2017-11-03}{new} +%At the end of a letter group. The argument is the index of the last +%level~2 entry. % \begin{macrocode} - \newcommand{\glsxtralttreeSubSymbolDescLocation}[3]{% - \glsxtralttreeSymbolDescLocation{#2}{#3}% - } +\newcommand{\glsxtrbookindexsubsubatendgroup}[1]{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrtreetopindent} -%\changes{1.05}{2016-06-10}{new} -% The original style has to keep computing the width of the name at -% each entry. This register allows the style to compute it once for -% the top-level at the start of the glossary. +%\begin{macro}{\glsxtrbookindexgroupskip} +%\changes{1.21}{2017-11-03}{new} +%Group separator. % \begin{macrocode} - \newlength\glsxtrtreetopindent +\newcommand{\glsxtrbookindexgroupskip}{\ifglsnogroupskip\else\indexspace\fi} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtralttreeInit} -%\changes{1.05}{2016-06-10}{new} -% User-level initialisation for the \glostyle{alttree} style. +%Format group title. +%\begin{macro}{\glsxtrbookindexformatheader} +%\changes{1.21}{2017-11-03}{new} +%Group separator. % \begin{macrocode} - \newcommand*{\glsxtralttreeInit}{% - \settowidth{\glsxtrtreetopindent}{\glstreenamefmt{\glsgetwidestname\space}}% - \glsxtrAltTreeIndent=\parindent - } +\newcommand*{\glsxtrbookindexformatheader}[1]{% + \par{\centering\glstreegroupheaderfmt{#1}\par}% +} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\gglssetwidest} +%\begin{macro}{\glsxtrbookindexbookmark} %\changes{1.21}{2017-11-03}{new} -% The original \cs{glssetwidest} only uses \cs{def}. This uses -% \cs{gdef}. +%Book mark group heading if supported. % \begin{macrocode} - \newcommand*{\gglssetwidest}[2][0]{% - \csgdef{@glswidestname\romannumeral#1}{#2}% +\ifdef\pdfbookmark +{% + \newcommand*{\glsxtrbookindexbookmark}[2]{% + \ifdefstring{\@@glossarysec}{chapter}% + {\pdfbookmark[1]{#1}{#2}}% + {\pdfbookmark[2]{#1}{#2}}% } +} +{% + \newcommand*{\glsxtrbookindexbookmark}[2]{} +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\eglssetwidest} -%\changes{1.05}{2016-06-10}{new} -% The original \cs{glssetwidest} only uses \cs{def}. This uses -% \cs{protected@csedef}. +%\begin{macro}{\glsxtrbookindexcolspread} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \newcommand*{\eglssetwidest}[2][0]{% - \protected@csedef{@glswidestname\romannumeral#1}{#2}% - } +\newcommand*{\glsxtrbookindexcolspread}{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\xglssetwidest} -%\changes{1.05}{2016-06-10}{new} -%Like the above but uses \cs{protected@csxdef}. +%\begin{macro}{\glsxtrbookindexmulticolsenv} +%\changes{1.25}{2017-11-14}{new} % \begin{macrocode} - \newcommand*{\xglssetwidest}[2][0]{% - \protected@csxdef{@glswidestname\romannumeral#1}{#2}% - } +\newcommand*{\glsxtrbookindexmulticolsenv}{multicols} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsupdatewidest} -%\changes{1.23}{2017-11-12}{new} -%Only sets if new value is wider than old value. +%Define the style. % \begin{macrocode} - \newcommand*{\glsupdatewidest}[2][0]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\csdef{@glswidestname\romannumeral#1}{#2}}% +\newglossarystyle{bookindex}{% + \setglossarystyle{index}% + \renewenvironment{theglossary}% + {% + \ifdefempty\glsxtrbookindexcolspread {% - \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% - \settowidth{\dimen@ii}{#2}% - \ifdim\dimen@ii>\dimen@ - \csdef{@glswidestname\romannumeral#1}{#2}% - \fi + \expandafter\begin\expandafter{\glsxtrbookindexmulticolsenv}% + {\glsxtrbookindexcols}% }% - } + {% + \expandafter\begin\expandafter{\glsxtrbookindexmulticolsenv}% + {\glsxtrbookindexcols}[\glsxtrbookindexcolspread]% + }% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \let\@glsxtr@bookindex@between\@gobble + \let\@glsxtr@bookindex@subbetween\@gobble + \let\@glsxtr@bookindex@subsubbetween\@gobble + \let\@glsxtr@bookindex@atendgroup\relax + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax + \let\@glsxtr@bookindexgroupskip\relax + }% + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\gglsupdatewidest} -%\changes{1.23}{2017-11-12}{new} -%As above but global definition. +% Do end group hooks. +% \begin{macrocode} + \@glsxtr@bookindex@subsubatendgroup + \@glsxtr@bookindex@subatendgroup + \@glsxtr@bookindex@atendgroup +% \end{macrocode} +%End \env{multicols} environment. +% \begin{macrocode} + \expandafter\end\expandafter{\glsxtrbookindexmulticolsenv}% + }% +% \end{macrocode} +%Use ragged right as columns are likely to be narrow and +%indexes tend not to be fully justified. +% \begin{macrocode} + \renewcommand*{\glossaryheader}{\raggedright}% +% \end{macrocode} +%Top level entry format. +% \begin{macrocode} + \renewcommand*{\glossentry}[2]{% +% \end{macrocode} +%Do separator. +% \begin{macrocode} + \@glsxtr@bookindex@between{##1}% +% \end{macrocode} +%Update separators. +% \begin{macrocode} + \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \let\@glsxtr@bookindex@subbetween\@gobble + \let\@glsxtr@bookindex@subsubbetween\@gobble + \edef\@glsxtr@bookindex@between{% + \noexpand\glsxtrbookindexbetween{##1}% + }% + \edef\@glsxtr@bookindex@atendgroup{% + \noexpand\glsxtrbookindexatendgroup{##1}% + }% + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax +% \end{macrocode} +%Format entry. +% \begin{macrocode} + \glstreeitem + \glsentryitem{##1}% + \glstarget{##1}{\glsxtrbookindexname{##1}}% + \glsxtrbookindexprelocation{##1}##2% + }% + \renewcommand{\subglossentry}[3]{% + \ifcase##1\relax +% \end{macrocode} +% Level 0 (shouldn't happen as that's formatted with \cs{glossentry}). +% \begin{macrocode} + \glstreeitem + \or +% \end{macrocode} +% Level 1. +% \begin{macrocode} + \@glsxtr@bookindex@sep + \@glsxtr@bookindex@subbetween{##2}% + \let\@glsxtr@bookindex@sep\relax +% \end{macrocode} +% Update separators. +% \begin{macrocode} + \let\@glsxtr@bookindex@subsubbetween\@gobble + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \edef\@glsxtr@bookindex@subbetween{% + \noexpand\glsxtrbookindexsubbetween{##2}% + }% + \edef\@glsxtr@bookindex@atsubendgroup{% + \noexpand\glsxtrbookindexatsubendgroup{##1}% + }% +% \end{macrocode} +% Start sub-item. +% \begin{macrocode} + \glstreesubitem + \glssubentryitem{##2}% + \else +% \end{macrocode} +% All other levels. +% \begin{macrocode} + \@glsxtr@bookindex@subsep + \@glsxtr@bookindex@subsubbetween{##2}% +% \end{macrocode} +% Update separators. +% \begin{macrocode} + \let\@glsxtr@bookindex@subsep\relax + \edef\@glsxtr@bookindex@subsubbetween{% + \noexpand\glsxtrbookindexsubsubbetween{##2}% + }% + \edef\@glsxtr@bookindex@atsubsubendgroup{% + \noexpand\glsxtrbookindexatsubsubendgroup{##1}% + }% +% \end{macrocode} +% Start sub-sub-item. +% \begin{macrocode} + \glstreesubsubitem + \fi +% \end{macrocode} +% Format entry. +% \begin{macrocode} + \glstarget{##2}{\glsxtrbookindexsubname{##2}}% + \glsxtrbookindexsubprelocation{##2}##3% + }% +% \end{macrocode} +% The group skip is moved to the group heading to avoid interfering +% with the end letter group hooks. % \begin{macrocode} - \newcommand*{\gglsupdatewidest}[2][0]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\csgdef{@glswidestname\romannumeral#1}{#2}}% - {% - \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% - \settowidth{\dimen@ii}{#2}% - \ifdim\dimen@ii>\dimen@ - \csgdef{@glswidestname\romannumeral#1}{#2}% - \fi - }% - } + \renewcommand*{\glsgroupskip}{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\eglsupdatewidest} -%\changes{1.23}{2017-11-12}{new} -%As \cs{glsupdatewidest} but expands value. +% Group heading format. % \begin{macrocode} - \newcommand*{\eglsupdatewidest}[2][0]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\protected@csedef{@glswidestname\romannumeral#1}{#2}}% - {% - \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% - \settowidth{\dimen@ii}{#2}% - \ifdim\dimen@ii>\dimen@ - \protected@csedef{@glswidestname\romannumeral#1}{#2}% - \fi - }% - } + \renewcommand*{\glsgroupheading}[1]{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\xglsupdatewidest} -%\changes{1.23}{2017-11-12}{new} -%As above but global. +% Do end group hooks. % \begin{macrocode} - \newcommand*{\xglsupdatewidest}[2][0]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\protected@csxdef{@glswidestname\romannumeral#1}{#2}}% - {% - \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% - \settowidth{\dimen@ii}{#2}% - \ifdim\dimen@ii>\dimen@ - \protected@csxdef{@glswidestname\romannumeral#1}{#2}% - \fi - }% - } + \@glsxtr@bookindex@subsubatendgroup + \@glsxtr@bookindex@subatendgroup + \@glsxtr@bookindex@atendgroup + \@glsxtr@bookindexgroupskip % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsgetwidestname} -%\changes{1.05}{2016-06-10}{new} -% Provide a user-level macro to obtain the widest top-level name. +% Update separators. % \begin{macrocode} - \newcommand*{\glsgetwidestname}{\@glswidestname} + \let\@glsxtr@bookindexgroupskip\glsxtrbookindexgroupskip + \let\@glsxtr@bookindex@between\@gobble + \let\@glsxtr@bookindex@atendgroup\relax + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsgetwidestsubname} -%\changes{1.05}{2016-06-10}{new} -% Provide a user-level macro to obtain the widest sub-entry name. +% Fetch the group title from the label supplied in \verb|#1|. % \begin{macrocode} - \newcommand*{\glsgetwidestsubname}[1]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\@glswidestname}% - {\csuse{@glswidestname\romannumeral#1}}% - } + \glsxtrgetgrouptitle{##1}{\thisgrptitle}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsFindWidestTopLevelName} -%CamelCase is easier for long command names. Provide a CamelCase -%synonym of \ics{glsfindwidesttoplevelname}. +% Do the PDF bookmark if supported. % \begin{macrocode} - \let\glsFindWidestTopLevelName\glsfindwidesttoplevelname + \glsxtrbookindexbookmark{\thisgrptitle}{index.##1}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsFindWidestUsedTopLevelName} -%\changes{1.05}{2016-06-10}{new} -% Like \cs{glsfindwidesttoplevelname} but has an additional check -% that the entry has been used. Only useful if the glossaries occur -% at the end of the document, in which case this command should go -% at the start of the glossary. Alternatively, place at the end of -% the document and save for the next run. +% Format the group title. % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedTopLevelName}[1][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \ifglshasparent{\@glo@label}% - {}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - }% - {}% - }% - }% - } + \glsxtrbookindexformatheader{\thisgrptitle}% + \nopagebreak\indexspace\nopagebreak\@afterheading + }% +} +% \end{macrocode} +% Some supplementary commands that may be useful. +% These store the entry label for the current page. Since the page +% number is needed in the control sequence, this uses +% \cs{glsxtrbookindexthepage} instead of \cs{thepage} in case +% the page numbering has been set to something that contains +% formatting commands. +%\begin{macro}{\glsxtrbookindexthepage} +%\changes{1.21}{2017-11-03}{new} +%The \cs{@printglossary} sets \cs{currentglossary} to the current +%glossary label. This is used as a prefix in case the page number is +%reset. +% \begin{macrocode} +\newcommand{\glsxtrbookindexthepage}{% + \ifdef\currentglossary{\currentglossary.\arabic{page}}{\arabic{page}}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedAnyName} -%\changes{1.05}{2016-06-10}{new} -% Like the above but doesn't check the parent key. Useful if all -% levels should have the same width for the name. +%\begin{macro}{\glsxtrbookindexmarkentry} +%\changes{1.21}{2017-11-03}{new} +%Writes entry information to the \texttt{.aux} file. The argument is +%the entry label. % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedAnyName}[1][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - {}% - }% - }% - } +\newcommand*{\glsxtrbookindexmarkentry}[1]{% + \protected@write\@auxout + {\let\glsxtrbookindexthepage\relax}% + {\string\glsxtr@setbookindexmark{\glsxtrbookindexthepage}{#1}}% +} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsFindWidestAnyName} -%\changes{1.05}{2016-06-10}{new} -% Like the above but doesn't check is the entry has been used. +%\begin{macro}{\glsxtr@setbookindexmark} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestAnyName}[1][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - }% - } +\newcommand*{\glsxtr@setbookindexmark}[2]{% + \ifcsundef{glsxtr@idxfirstmark@#1}% + {\csgdef{glsxtr@idxfirstmark@#1}{#2}}% + {}% + \csgdef{glsxtr@idxlastmark@#1}{#2}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedLevelTwo} -%\changes{1.05}{2016-06-10}{new} -% This is like \cs{glsFindWidestUsedTopLevelName} but also sets the -% first two sub-levels as well. Any entry that has a -% great-grandparent is ignored. -% \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedLevelTwo}[1][\@glo@types]{% - \dimen@=0pt\relax - \dimen@i=0pt\relax - \dimen@ii=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \ifglshasparent{\@glo@label}% - {% - \edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% - \ifglshasparent{\@glo@parent}% - {% - \edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% - \ifglshasparent{\@glo@parent}% - {}% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@ii - \dimen@ii=\gls@tmplen - \eglssetwidest[2]{\glsentryname{\@glo@label}}% - \fi - }% - }% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@i - \dimen@i=\gls@tmplen - \eglssetwidest[1]{\glsentryname{\@glo@label}}% - \fi - }% - }% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@ - \dimen@=\gls@tmplen - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - }% - {}% - }% - }% - } +%\begin{macro}{\glsxtrbookindexfirstmarkfmt} +%\changes{1.21}{2017-11-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrbookindexfirstmarkfmt}[1]{% + \glsentryname{#1}% +} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsFindWidestLevelTwo} -%\changes{1.05}{2016-06-10}{new} -% This is like \cs{glsFindWidestUsedLevelTwo} but doesn't check if the -% entry has been used. +%\begin{macro}{\glsxtrbookindexfirstmark} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestLevelTwo}[1][\@glo@types]{% - \dimen@=0pt\relax - \dimen@i=0pt\relax - \dimen@ii=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglshasparent{\@glo@label}% - {% - \edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% - \ifglshasparent{\@glo@parent}% - {% - \edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% - \ifglshasparent{\@glo@parent}% - {}% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@ii - \dimen@ii=\gls@tmplen - \eglssetwidest[2]{\glsentryname{\@glo@label}}% - \fi - }% - }% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@i - \dimen@i=\gls@tmplen - \eglssetwidest[1]{\glsentryname{\@glo@label}}% - \fi - }% - }% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@ - \dimen@=\gls@tmplen - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - }% - }% - } +\newcommand*{\glsxtrbookindexfirstmark}{% + \letcs{\glsxtr@label}{glsxtr@idxfirstmark@\glsxtrbookindexthepage}% + \ifdef\glsxtr@label + {\glsxtrbookindexfirstmarkfmt{\glsxtr@label}}% + {}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedAnyNameSymbol} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestUsedAnyName} but also measures the -% symbol. The length of the widest symbol is stored in the second argument -% should be a length register. +%\begin{macro}{\glsxtrbookindexlastmarkfmt} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedAnyNameSymbol}[2][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\glsentrysymbol{\@glo@label}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - }% - {}% - }% - }% - } +\newcommand*{\glsxtrbookindexlastmarkfmt}[1]{% + \glsentryname{#1}% +} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsFindWidestAnyNameSymbol} -%\changes{1.05}{2016-06-10}{new} -% Like the above but doesn't check if the entry has been used. +%\begin{macro}{\glsxtrbookindexlastmark} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestAnyNameSymbol}[2][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\glsentrysymbol{\@glo@label}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - }% - }% - } +\newcommand*{\glsxtrbookindexlastmark}{% + \letcs{\glsxtr@label}{glsxtr@idxlastmark@\glsxtrbookindexthepage}% + \ifdef\glsxtr@label + {\glsxtrbookindexlastmarkfmt{\glsxtr@label}}% + {}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedAnyNameSymbolLocation} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestUsedAnyNameSymbol} but also measures the -% location list. This requires \ics{glsentrynumberlist}. -% The length of the widest symbol is stored in the second argument -% should be a length register. The length of the widest location -% list is stored in the third argument, which should also be a -% length register. +%\iffalse % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedAnyNameSymbolLocation}[3][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - #3=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\glsentrysymbol{\@glo@label}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - \settowidth{\dimen@}% - {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% - \ifdim\dimen@>#3\relax - #3=\dimen@ - \fi - }% - {}% - }% - }% - } +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossary-longextra.sty> +% \end{macrocode} +%\fi +%\chapter{longextra styles (\styfmt{glossary-longextra.sty})} +%\changes{1.37}{2018-11-30}{new} +%\section{Package Initialisation and Options} +%Provides additional long styles. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossary-longextra}[2018/11/30 1.37 (NLCT)] +% \end{macrocode} +%Load required packages. +% \begin{macrocode} +\RequirePackage{glossary-longbooktabs} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glsFindWidestAnyNameSymbolLocation} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestUsedAnyNameSymbol} but doesn't check if -% the entry has been used. +%\begin{macro}{\glslongextraNameFmt} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraNameFmt}\marg{label} +%\end{definition} +%Governs the way the name is displayed. % \begin{macrocode} - \newrobustcmd*{\glsFindWidestAnyNameSymbolLocation}[3][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - #3=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\glsentrysymbol{\@glo@label}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - \settowidth{\dimen@}% - {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% - \ifdim\dimen@>#3\relax - #3=\dimen@ - \fi - }% - }% - } +\newcommand{\glslongextraNameFmt}[1]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{#1}}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedAnyNameLocation} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestUsedAnyNameSymbolLocation} but doesn't -% measure the symbol. The length of the widest location -% list is stored in the second argument, which should be a -% length register. +%\begin{macro}{\glslongextraDescFmt} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraDescFmt}\marg{label} +%\end{definition} +%Governs the way the description is displayed. % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedAnyNameLocation}[2][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - }% - {}% - }% - }% - } +\newcommand{\glslongextraDescFmt}[1]{% + \glossentrydesc{#1}\glspostdescription +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestAnyNameLocation} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestAnyNameLocation} but doesn't -% check the \gls{firstuse} flag. +%\begin{macro}{\glslongextraSymbolFmt} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraSymbolFmt}\marg{label} +%\end{definition} +%Governs the way the symbol is displayed. % \begin{macrocode} - \newrobustcmd*{\glsFindWidestAnyNameLocation}[2][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - }% - }% - } +\newcommand{\glslongextraSymbolFmt}[1]{\glossentrysymbol{#1}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrComputeTreeIndent} -%\changes{1.05}{2016-06-10}{new} -% Compute the value of \cs{glstreeindent}. Argument is the entry label. -% (Ignored in default definition, but this command may be redefined -% to take the particular entry into account.) Note that the -% sub-levels modify \cs{glstreeindent}. +%\begin{macro}{\glslongextraLocationFmt} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraLocationFmt}\marg{label}\marg{location list} +%\end{definition} +%Governs the way the location is displayed. % \begin{macrocode} - \newcommand*{\glsxtrComputeTreeIndent}[1]{% - \glstreeindent=\glsxtrtreetopindent\relax - } +\newcommand{\glslongextraLocationFmt}[2]{#2} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrComputeTreeSubIndent} -%\changes{1.05}{2016-06-10}{new} +%\begin{macro}{\glslongextraSubNameFmt} +%\changes{1.37}{2018-11-30}{new} %\begin{definition} -%\cs{glsxtrComputeTreeSubIndent}\marg{level}\marg{label}\marg{register} +%\cs{glslongextraSubNameFmt}\marg{level}\marg{label} %\end{definition} -% Compute the indent for the sub-entries. The first argument is the -% level, the second argument is the entry label and the third -% argument is the length register used to store the computed indent. +%Governs the way the child name is displayed. Just does the +%sub-entry counter, if enabled, and the target. % \begin{macrocode} - \newcommand*{\glsxtrComputeTreeSubIndent}[3]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {% - \settowidth{#3}{\glstreenamefmt{\@glswidestname\space}}% - }% - {% - \settowidth{#3}{\glstreenamefmt{% - \csname @glswidestname\romannumeral#1\endcsname\space}}% - }% - } +\newcommand{\glslongextraSubNameFmt}[2]{% + \glssubentryitem{#2}\glstarget{#2}{\strut}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrAltTreeSetHangIndent} -%\changes{1.05}{2016-06-10}{new} -% Set \cs{hangindent} for top-level entries: +%\begin{macro}{\glslongextraSubDescFmt} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraSubDescFmt}\marg{level}\marg{label} +%\end{definition} +%Governs the way the child description is displayed. % \begin{macrocode} - \newcommand*{\glsxtrAltTreeSetHangIndent}{\hangindent\glstreeindent} +\newcommand{\glslongextraSubDescFmt}[2]{% + \glslongextraDescFmt{#2}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrAltTreeSetSubHangIndent} -%\changes{1.05}{2016-06-10}{new} -% Set \cs{hangindent} for sub-entries: +%\begin{macro}{\glslongextraSubSymbolFmt} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraSubSymbolFmt}\marg{level}\marg{label} +%\end{definition} +%Governs the way the child symbol is displayed. % \begin{macrocode} - \newcommand*{\glsxtrAltTreeSetSubHangIndent}[1]{\hangindent\glstreeindent} +\newcommand{\glslongextraSubSymbolFmt}[2]{% + \glslongextraSymbolFmt{#2}% +} % \end{macrocode} %\end{macro} % -% Redefine \glostyle{alttree}: +%\begin{macro}{\glslongextraSubLocationFmt} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraSubLocationFmt}\marg{level}\marg{label}\marg{location list} +%\end{definition} +%Governs the way the child location list is displayed. % \begin{macrocode} - \renewglossarystyle{alttree}{% - \renewenvironment{theglossary}% - {% - \glsxtralttreeInit - \def\@gls@prevlevel{-1}% - \mbox{}\par}% - {\par}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \ifnum\@gls@prevlevel=0\relax - \else - \glsxtrComputeTreeIndent{##1}% - \fi - \parindent\glstreeindent - \glsxtrAltTreeSetHangIndent - \makebox[0pt][r]% - {% - \glstreenamebox{\glstreeindent}% - {% - \glsentryitem{##1}% - \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% - }% - }% - \glsxtralttreeSymbolDescLocation{##1}{##2}% - \def\@gls@prevlevel{0}% - } - \renewcommand{\subglossentry}[3]{% - \ifnum##1=1\relax - \glssubentryitem{##2}% - \fi - \ifnum\@gls@prevlevel=##1\relax - \else - \glsxtrComputeTreeSubIndent{##1}{##2}{\gls@tmplen}% - \ifnum\@gls@prevlevel<##1\relax - \setlength\glstreeindent\gls@tmplen - \addtolength\glstreeindent\parindent - \parindent\glstreeindent - \else - \ifnum\@gls@prevlevel=0\relax - \glsxtrComputeTreeIndent{##2}% - \else - \glsxtrComputeTreeSubIndent{\@gls@prevlevel}{##2}{\glstreeindent}% - \fi - \addtolength\parindent{-\glstreeindent}% - \setlength\glstreeindent\parindent - \fi - \fi - \glsxtrAltTreeSetSubHangIndent{##1}% - \makebox[0pt][r]{\glstreenamebox{\gls@tmplen}{% - \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}}}% - \glsxtralttreeSubSymbolDescLocation{##1}{##2}{##3}% - \def\@gls@prevlevel{##1}% - }% - \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% - } -}% -{% -} +\newcommand{\glslongextraSubLocationFmt}[3]{#3} % \end{macrocode} -%Redefine \glostyle{alttreegroup} so that it discourages a break -%after group headings. -%\changes{1.21}{2017-11-03}{redefined \texttt{alttreegroup} to discourage -%breaks after group headings} -%Can't use \cs{@afterheading} here as it messes with the first item -%of the group. +%\end{macro} +% +%\begin{macro}{\glslongextraNameAlign} +%\changes{1.37}{2018-11-30}{new} +%Alignment for the name column. % \begin{macrocode} -\ifdef{\@glsstyle@alttreegroup} -{% - \renewglossarystyle{alttreegroup}{% - \setglossarystyle{alttree}% - \renewcommand{\glsgroupheading}[1]{\par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% - \nopagebreak\indexspace\nopagebreak - }% - }% -}% -{% -} +\newcommand{\glslongextraNameAlign}{l} % \end{macrocode} -%Similarly for \glostyle{alttreehypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{alttreehypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glslongextraDescAlign} +%\changes{1.37}{2018-11-30}{new} +%Alignment for the description column. % \begin{macrocode} -\ifdef{\@glsstyle@alttreehypergroup} -{% - \renewglossarystyle{alttreehypergroup}{% - \setglossarystyle{alttree}% - \renewcommand*{\glossaryheader}{% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreenavigationfmt{\glsnavigation}\par\indexspace - }% - \renewcommand*{\glsgroupheading}[1]{% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par - \nopagebreak\indexspace\nopagebreak - }% - } -}% -{% -} +\newcommand{\glslongextraDescAlign}{>{\raggedright}p{\glsdescwidth}} % \end{macrocode} +%\end{macro} % -%\section{Multicolumn Styles} -%Adjust \glostyle{mcolindexgroup} to discourage page breaks after -%the group headings. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexgroup} to discourage -%breaks after group headings} +%\begin{macro}{\glslongextraSymbolAlign} +%\changes{1.37}{2018-11-30}{new} +%Alignment for the symbol column. % \begin{macrocode} -\ifdef{\@glsstyle@mcolindexgroup} -{% - \renewglossarystyle{mcolindexgroup}{% - \setglossarystyle{mcolindex}% - \renewcommand*{\glsgroupheading}[1]{% - \item\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% - \nopagebreak\indexspace\nobreak\@afterheading - }% - } -}% -{% -} +\newcommand{\glslongextraSymbolAlign}{c} % \end{macrocode} -%Similarly for \glostyle{mcolindexhypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexhypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glslongextraLocationAlign} +%\changes{1.37}{2018-11-30}{new} +%Alignment for the location column. % \begin{macrocode} -\ifdef{\@glsstyle@mcolindexhypergroup} -{% - \renewglossarystyle{mcolindexhypergroup}{% - \setglossarystyle{mcolindex}% - \renewcommand*{\glossaryheader}{% - \item\glstreenavigationfmt{\glsnavigation}% - \indexspace - }% - \renewcommand*{\glsgroupheading}[1]{% - \item\glstreegroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nobreak\@afterheading - }% - } -}% -{% -} +\newcommand{\glslongextraLocationAlign}{>{\raggedright}p{\glspagelistwidth}} % \end{macrocode} -%Similarly for \glostyle{mcolindexspannav}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexspannav} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glslongextraGroupHeading} +%\changes{1.37}{2018-11-30}{new} +%Used to format the letter group headings. The first argument is the +%number of columns in the table. The second is the group +%\emph{label} (not the title). % \begin{macrocode} -\ifdef{\@glsstyle@mcolindexspannav} -{% - \renewglossarystyle{mcolindexspannav}{% - \setglossarystyle{index}% - \renewenvironment{theglossary}% - {% - \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}]% - \setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}% - \let\item\glstreeitem}% - {\end{multicols}}% - \renewcommand*{\glsgroupheading}[1]{% - \item\glstreegroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nobreak\@afterheading - }% - } -}% -{% -} +\newcommand{\glslongextraGroupHeading}[2]{} % \end{macrocode} -%Similarly for \glostyle{mcoltreegroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreegroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glslongextraHeaderFormat} +%\changes{1.37}{2018-11-30}{new} +%Format for the column headers. +% \begin{macrocode} +\newcommand{\glslongextraHeaderFmt}[1]{\textbf{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreegroup} -{% - \renewglossarystyle{mcoltreegroup}{% - \setglossarystyle{mcoltree}% - \renewcommand{\glsgroupheading}[1]{\par - \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% - \nopagebreak\indexspace\nobreak\@afterheading - }% - } -}% -{% +\newcommand{\glslongextraNameDescHeader}{% + \glslongextraNameDescTabularHeader\endhead + \glslongextraNameDescTabularFooter\endfoot } % \end{macrocode} -%Similarly for \glostyle{mcoltreehypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreehypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreehypergroup} -{% - \renewglossarystyle{mcoltreehypergroup}{% - \setglossarystyle{mcoltree}% - \renewcommand*{\glossaryheader}{% - \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace - }% - \renewcommand*{\glsgroupheading}[1]{% - \par\noindent - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nobreak\@afterheading - }% - } -}% -{% +\newcommand{\glslongextraNameDescTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname\tabularnewline + \midrule } % \end{macrocode} -%Similarly for \glostyle{mcoltreespannav}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreespannav} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreespannav} -{% - \renewglossarystyle{mcoltreespannav}{% - \setglossarystyle{tree}% - \renewenvironment{theglossary}% - {% - \begin{multicols}{\glsmcols}% - [\noindent\glstreenavigationfmt{\glsnavigation}]% - \setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}% - }% - {\end{multicols}}% - \renewcommand*{\glsgroupheading}[1]{% - \par\noindent - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nobreak\@afterheading - }% - } -}% -{% +\newcommand{\glslongextraNameDescTabularFooter}{% + \bottomrule } % \end{macrocode} -%Similarly for \glostyle{mcoltreenonamegroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamegroup} to discourage -%breaks after group headings} +%\end{macro} +% +%Unlike the \glostyle{alttree} style, there aren't different widths +%for the hierarchical levels. +%\begin{macro}{\glslongextraSetWidest} +%\changes{1.37}{2018-11-30}{new} +%Provide in case the tree styles haven't been loaded. % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreenonamegroup} -{% - \renewglossarystyle{mcoltreenonamegroup}{% - \setglossarystyle{mcoltreenoname}% - \renewcommand{\glsgroupheading}[1]{\par - \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% - \nopagebreak\indexspace\nobreak\@afterheading - }% - } -}% -{% +\newcommand*{\glslongextraSetWidest}[1]{% + \def\@glslongextrawidestname{#1}% } % \end{macrocode} -%Similarly for \glostyle{mcoltreenonamehypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamehypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\@glslongextrawidestname} +%\changes{1.37}{2018-11-30}{new} +%Pick up the widest name from the \glostyle{alttree} style if it has +%been set. (Will expand to nothing otherwise.) % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreenonamehypergroup} -{% - \renewglossarystyle{mcoltreenonamehypergroup}{% - \setglossarystyle{mcoltreenoname}% - \renewcommand*{\glossaryheader}{% - \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace}% - \renewcommand*{\glsgroupheading}[1]{% - \par\noindent - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nobreak\@afterheading}% - } -}% -{% -} +\newcommand*{\@glslongextrawidestname}{\csuse{@glswidestname}} % \end{macrocode} -%Similarly for \glostyle{mcoltreenonamespannav}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamespannav} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glslongextraUpdateWidest} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreenonamespannav} -{% - \renewglossarystyle{mcoltreenonamespannav}{% - \setglossarystyle{treenoname}% - \renewenvironment{theglossary}% - {% - \begin{multicols}{\glsmcols}% - [\noindent\glstreenavigationfmt{\glsnavigation}]% - \setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}% - }% - {\end{multicols}}% - \renewcommand*{\glsgroupheading}[1]{% - \par\noindent - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nobreak\@afterheading}% - } -}% -{% +\newcommand*{\glslongextraUpdateWidest}[1]{% + \ifundef\@glslongextrawidestname + {\def\@glslongextrawidestname{#1}}% + {% + \settowidth{\dimen@}{\@glslongextrawidestname}% + \settowidth{\dimen@ii}{#1}% + \ifdim\dimen@ii>\dimen@ + \def\@glslongextrawidestname{#1}% + \fi + }% } % \end{macrocode} -%\glostyle{mcolalttree} needs adjusting so that it uses \cs{glsxtralttreeInit} -%This doesn't use \verb|\mbox{}\par| which would unbalance the top -%of the columns. -%\changes{1.21}{2017-11-03}{adjusted mcolalttree} +%\end{macro} +% +%\begin{macro}{\glslongextraUpdateWidestChild} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraUpdateWidestChild}\marg{level}\marg{text} +%\end{definition} +%Used by \cs{glsxtrSetWidest} in \sty{glossaries-extra-bib2gls}. +%Does nothing by default, since the default action in these styles +%is to omit the child name. If the child name should be displayed, +%then this needs to be redefined to use +%\cs{glslongextraUpdateWidest}. % \begin{macrocode} -\ifdef{\@glsstyle@mcolalttree} -{% - \renewglossarystyle{mcolalttree}{% - \setglossarystyle{alttree}% - \renewenvironment{theglossary}% - {% - \glsxtralttreeInit - \def\@gls@prevlevel{-1}% - \begin{multicols}{\glsmcols}% - }% - {\par\end{multicols}}% - } -}% -{% -} +\newcommand*{\glslongextraUpdateWidestChild}[2]{} % \end{macrocode} -%Redefine \glostyle{mcolalttreegroup} to discourage page breaks -%after the group headings. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreegroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glslongextraSetDescWidth} +%\changes{1.37}{2018-11-30}{new} +% Computes the value of \cs{glsdescwidth} for the styles that only +% have name and description columns. % \begin{macrocode} -\ifdef{\@glsstyle@mcolalttreegroup} -{% - \renewglossarystyle{mcolalttreegroup}{% - \setglossarystyle{mcolalttree}% - \renewcommand{\glsgroupheading}[1]{\par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% - \nopagebreak\indexspace\nopagebreak - }% - } -}% -{% -} +\newcommand{\glslongextraSetDescWidth}{% + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\entryname}% % \end{macrocode} -%Similarly for \glostyle{mcolalttreehypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreehypergroup} to discourage -%breaks after group headings} +% Has the widest name been set. % \begin{macrocode} -\ifdef{\@glsstyle@mcolalttreehypergroup} -{% - \renewglossarystyle{mcolalttreehypergroup}{% - \setglossarystyle{mcolalttree}% - \renewcommand*{\glossaryheader}{% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreenavigationfmt{\glsnavigation}% - \par\indexspace - }% - \renewcommand*{\glsgroupheading}[1]{% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nopagebreak - }% - } -}% -{% -} + \settowidth{\dimen@}{\glsnamefont{\@glslongextrawidestname}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \fi % \end{macrocode} -%Similarly for \glostyle{mcolalttreespannav}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreespannav} to discourage -%breaks after group headings} +% Description width is \cs{linewidth} less 4\cs{tabcolsep} less the +% width of the name column. % \begin{macrocode} -\ifdef{\@glsstyle@mcolalttreespannav} -{% - \renewglossarystyle{mcolalttreespannav}{% - \setglossarystyle{alttree}% - \renewenvironment{theglossary}% - {% - \glsxtralttreeInit - \def\@gls@prevlevel{-1}% - \begin{multicols}{\glsmcols}% - [\noindent\glstreenavigationfmt{\glsnavigation}]% - }% - {\par\end{multicols}}% - \renewcommand*{\glsgroupheading}[1]{% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% - \nopagebreak\indexspace\nopagebreak - }% - } -}% -{% + \setlength{\glsdescwidth}{\dimexpr\linewidth-4\tabcolsep-\gls@tmplen}% } % \end{macrocode} +%\end{macro} % -% Reset the default style +%\begin{macro}{\glslongextraSymSetDescWidth} +%\changes{1.37}{2018-11-30}{new} +% Computes the value of \cs{glsdescwidth} for the styles that only +% have name, symbol and description columns. % \begin{macrocode} -\ifx\@glossary@default@style\relax -\else - \setglossarystyle{\@glsxtr@current@style} -\fi +\newcommand{\glslongextraSymSetDescWidth}{% % \end{macrocode} -%\iffalse +% Work out the size for just the name and description style. % \begin{macrocode} -% + \glslongextraSetDescWidth % \end{macrocode} -%\fi -%\iffalse +% Now work out the symbol column width. This is assuming that the +% column title will be the widest text in the column. % \begin{macrocode} -%<*glossary-bookindex.sty> + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\symbolname}% % \end{macrocode} -%\fi -%\chapter{bookindex style (\styfmt{glossary-bookindex.sty})} -%\changes{1.21}{2017-11-03}{new} -%\section{Package Initialisation and Options} +% Subtract 2\cs{tabcolsep} and the symbol header width. % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary-bookindex}[2018/08/18 v1.36 (NLCT)] + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\gls@tmplen}% +} % \end{macrocode} -%Load required packages. +%\end{macro} +% +%\begin{macro}{\glslongextraLocSetDescWidth} +%\changes{1.37}{2018-11-30}{new} +% Computes the value of \cs{glsdescwidth} for the styles that only +% have name, location and description columns. % \begin{macrocode} -\RequirePackage{multicol} -\RequirePackage{glossary-tree} +\newcommand{\glslongextraLocSetDescWidth}{% % \end{macrocode} -%\begin{macro}{\glsxtrbookindexcols} -%\changes{1.21}{2017-11-03}{new} -% Number of columns. +% Work out the size for just the name and description style. % \begin{macrocode} -\newcommand{\glsxtrbookindexcols}{2} + \glslongextraSetDescWidth +% \end{macrocode} +% Subtract 2\cs{tabcolsep} and the location list column width. +% \begin{macrocode} + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexname} -%\changes{1.21}{2017-11-03}{new} -%Format used for top-level entries. -% (Argument is the label.) +% +%\begin{macro}{\glslongextraSymLocSetDescWidth} +%\changes{1.37}{2018-11-30}{new} +% Computes the value of \cs{glsdescwidth} for the styles that +% have name, symbol, location and description columns. +% \begin{macrocode} +\newcommand{\glslongextraSymLocSetDescWidth}{% +% \end{macrocode} +% Work out the size for just the name, symbol and description style. +% \begin{macrocode} + \glslongextraSymSetDescWidth +% \end{macrocode} +% Subtract 2\cs{tabcolsep} and the location list column width. % \begin{macrocode} -\newcommand*{\glsxtrbookindexname}[1]{\glossentryname{#1}} + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubname} -%\changes{1.21}{2017-11-03}{new} -%Format used for sub entries. +% +%\begin{macro}{\ifGlsLongExtraUseTabular} +%\changes{1.37}{2018-11-30}{new} +%If true use \env{tabular} instead of \env{longtable}. Obviously +%only intended for short glossaries that can fit into a single page. % \begin{macrocode} -\newcommand*{\glsxtrbookindexsubname}[1]{\glsxtrbookindexname{#1}} +\newif\ifGlsLongExtraUseTabular +\GlsLongExtraUseTabularfalse % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrprelocation} -%\changes{1.21}{2017-11-03}{new} -%Provide in case \sty{glossaries-stylemods} isn't loaded. +%\begin{macro}{\glslongextraTabularVAlign} +%\changes{1.37}{2018-11-30}{new} +%Only used with the \env{tabular} setting. % \begin{macrocode} -\providecommand*{\glsxtrprelocation}{\space} +\newcommand*{\glslongextraTabularVAlign}{c} % \end{macrocode} %\end{macro} - -%\begin{macro}{\glsxtrbookindexprelocation} -%\changes{1.21}{2017-11-03}{new} -%Separator used before location list for top-level entries. -%Version 1.22 has removed the \cs{ifglsnopostdot} check -%since this style doesn't display the description. -%\changes{1.22}{2017-11-08}{removed check for no post dot} +%\begin{abbrvstyle}{long-name-desc} +%\changes{1.37}{2018-11-30}{new} +%Two column style with multi-lined descriptions and header. +%This is similar to the \glostyle{longragged-booktabs} style. % \begin{macrocode} -\newcommand*{\glsxtrbookindexprelocation}[1]{% - \glsxtrifhasfield{location}{#1}% - {,\glsxtrprelocation}% - {\glsxtrprelocation}% +\newglossarystyle{long-name-desc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} + & + \glslongextraSubDescFmt{##1}{##2}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsxtrbookindexsubprelocation} -%\changes{1.21}{2017-11-03}{new} -%Separator used before location list for sub-entries. +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraNameDescLocationHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexsubprelocation}[1]{% - \glsxtrbookindexprelocation{#1}% +\newcommand{\glslongextraNameDescLocationHeader}{% + \glslongextraNameDescLocationTabularHeader\endhead + \glslongextraNameDescLocationTabularFooter\endfoot } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexparentchildsep} -%\changes{1.21}{2017-11-03}{new} -%Separator used between top-level parent and child entry. +%\begin{macro}{\glslongextraNameDescLocationTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexparentchildsep}{\nopagebreak} +\newcommand{\glslongextraNameDescLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexparentsubchildsep} -%\changes{1.21}{2017-11-03}{new} -%Separator used between sub-level parent and child entry. +% +%\begin{macro}{\glslongextraNameDescLocationTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexparentsubchildsep}{\glsxtrbookindexparentchildsep} +\newcommand{\glslongextraNameDescLocationTabularFooter}{% + \bottomrule +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexbetween} -%\changes{1.21}{2017-11-03}{new} -%Between two top-level entries identified by the labels in the -%arguments. +%\begin{abbrvstyle}{long-name-desc-loc} +%\changes{1.37}{2018-11-30}{new} +%Three columns: name, description and location list. % \begin{macrocode} -\newcommand{\glsxtrbookindexbetween}[2]{} +\newglossarystyle{long-name-desc-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2}& + \glslongextraSubDescFmt{##1}{##2}& + \glslongextraSubLocationFmt{##1}{##2}{##3}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsxtrbookindexsubbetween} -%\changes{1.21}{2017-11-03}{new} -%Between two level~1 entries identified by the labels in the -%arguments. +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraDescNameHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexsubbetween}[2]{} +\newcommand{\glslongextraDescNameHeader}{% + \glslongextraDescNameTabularHeader\endhead + \glslongextraDescNameTabularFooter\endfoot +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubsubbetween} -%\changes{1.21}{2017-11-03}{new} -%Between two level~2 entries identified by the labels in the -%arguments. +% +%\begin{macro}{\glslongextraDescNameTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexsubsubbetween}[2]{} +\newcommand{\glslongextraDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\descriptionname& + \glslongextraHeaderFmt\entryname \tabularnewline + \midrule +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexatendgroup} -%\changes{1.21}{2017-11-03}{new} -%At the end of a letter group. The argument is the index of the last -%top-level entry. +% +%\begin{macro}{\glslongextraDescNameTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexatendgroup}[1]{} +\newcommand{\glslongextraDescNameTabularFooter}{% + \bottomrule +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubatendgroup} -%\changes{1.21}{2017-11-03}{new} -%At the end of a letter group. The argument is the index of the last -%level~1 entry. +% +%\begin{abbrvstyle}{long-desc-name} +%\changes{1.37}{2018-11-30}{new} +%Like \glostyle{name-desc} but swaps the columns. % \begin{macrocode} -\newcommand{\glsxtrbookindexsubatendgroup}[1]{} +\newglossarystyle{long-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsxtrbookindexsubsubatendgroup} -%\changes{1.21}{2017-11-03}{new} -%At the end of a letter group. The argument is the index of the last -%level~2 entry. +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraLocationDescNameHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexsubsubatendgroup}[1]{} +\newcommand{\glslongextraLocationDescNameHeader}{% + \glslongextraLocationDescNameTabularHeader\endhead + \glslongextraLocationDescNameTabularFooter\endfoot +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexgroupskip} -%\changes{1.21}{2017-11-03}{new} -%Group separator. +%\begin{macro}{\glslongextraLocationDescNameTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexgroupskip}{\ifglsnogroupskip\else\indexspace\fi} +\newcommand{\glslongextraLocationDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname& + \glslongextraHeaderFmt\descriptionname& + \glslongextraHeaderFmt\entryname \tabularnewline + \midrule +} % \end{macrocode} %\end{macro} % -%Format group title. -%\begin{macro}{\glsxtrbookindexformatheader} -%\changes{1.21}{2017-11-03}{new} -%Group separator. +%\begin{macro}{\glslongextraLocationDescNameTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexformatheader}[1]{% - \par{\centering\glstreegroupheaderfmt{#1}\par}% +\newcommand{\glslongextraLocationDescNameTabularFooter}{% + \bottomrule } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexbookmark} -%\changes{1.21}{2017-11-03}{new} -%Book mark group heading if supported. +% +%\begin{abbrvstyle}{long-loc-desc-name} +%\changes{1.37}{2018-11-30}{new} +%Three columns: location, description and name. % \begin{macrocode} -\ifdef\pdfbookmark +\newglossarystyle{long-loc-desc-name}% {% - \newcommand*{\glsxtrbookindexbookmark}[2]{% - \ifdefstring{\@@glossarysec}{chapter}% - {\pdfbookmark[1]{#1}{#2}}% - {\pdfbookmark[2]{#1}{#2}}% - } + \ifGlsLongExtraUseTabular + {% + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } -{% - \newcommand*{\glsxtrbookindexbookmark}[2]{} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraNameDescSymHeader} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraNameDescSymHeader}{% + \glslongextraNameDescSymTabularHeader\endhead + \glslongextraNameDescSymTabularFooter\endfoot } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexcolspread} -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\glslongextraNameDescSymTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexcolspread}{} +\newcommand{\glslongextraNameDescSymTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname\tabularnewline + \midrule +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexmulticolsenv} -%\changes{1.25}{2017-11-14}{new} +%\begin{macro}{\glslongextraNameDescSymTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexmulticolsenv}{multicols} +\newcommand{\glslongextraNameDescSymTabularFooter}{% + \bottomrule +} % \end{macrocode} %\end{macro} % -%Define the style. +%\begin{abbrvstyle}{long-name-desc-sym} +%\changes{1.37}{2018-11-30}{new} +%Three column style with symbol in the third column. % \begin{macrocode} -\newglossarystyle{bookindex}{% - \setglossarystyle{index}% - \renewenvironment{theglossary}% - {% - \ifdefempty\glsxtrbookindexcolspread +\newglossarystyle{long-name-desc-sym}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% {% - \expandafter\begin\expandafter{\glsxtrbookindexmulticolsenv}% - {\glsxtrbookindexcols}% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + }}% + \@glslongextra@begintab }% {% - \expandafter\begin\expandafter{\glsxtrbookindexmulticolsenv}% - {\glsxtrbookindexcols}[\glsxtrbookindexcolspread]% + \glslongextraNameDescSymTabularFooter + \end{tabular}% }% - \setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}% - \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep - \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep - \let\@glsxtr@bookindex@between\@gobble - \let\@glsxtr@bookindex@subbetween\@gobble - \let\@glsxtr@bookindex@subsubbetween\@gobble - \let\@glsxtr@bookindex@atendgroup\relax - \let\@glsxtr@bookindex@subatendgroup\relax - \let\@glsxtr@bookindex@subsubatendgroup\relax - \let\@glsxtr@bookindexgroupskip\relax + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1}\tabularnewline }% - {% -% \end{macrocode} -% Do end group hooks. -% \begin{macrocode} - \@glsxtr@bookindex@subsubatendgroup - \@glsxtr@bookindex@subatendgroup - \@glsxtr@bookindex@atendgroup -% \end{macrocode} -%End \env{multicols} environment. -% \begin{macrocode} - \expandafter\end\expandafter{\glsxtrbookindexmulticolsenv}% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2}% + \tabularnewline }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} % \end{macrocode} -%Use ragged right as columns are likely to be narrow and -%indexes tend not to be fully justified. +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraNameDescSymLocationHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \renewcommand*{\glossaryheader}{\raggedright}% +\newcommand{\glslongextraNameDescSymLocationHeader}{% + \glslongextraNameDescSymLocationTabularHeader\endhead + \glslongextraNameDescSymLocationTabularFooter\endfoot +} % \end{macrocode} -%Top level entry format. +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescSymLocationTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \renewcommand*{\glossentry}[2]{% +\newcommand{\glslongextraNameDescSymLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule +} % \end{macrocode} -%Do separator. +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescSymLocationTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \@glsxtr@bookindex@between{##1}% +\newcommand{\glslongextraNameDescSymLocationTabularFooter}{% + \bottomrule +} % \end{macrocode} -%Update separators. +%\end{macro} +% +%\begin{abbrvstyle}{long-name-desc-sym-loc} +%\changes{1.37}{2018-11-30}{new} +%Four columns: name, description and location % \begin{macrocode} - \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep - \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep - \let\@glsxtr@bookindex@subbetween\@gobble - \let\@glsxtr@bookindex@subsubbetween\@gobble - \edef\@glsxtr@bookindex@between{% - \noexpand\glsxtrbookindexbetween{##1}% +\newglossarystyle{long-name-desc-sym-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab }% - \edef\@glsxtr@bookindex@atendgroup{% - \noexpand\glsxtrbookindexatendgroup{##1}% + {% + \glslongextraNameDescSymLocationTabularFooter + \end{tabular}% }% - \let\@glsxtr@bookindex@subatendgroup\relax - \let\@glsxtr@bookindex@subsubatendgroup\relax -% \end{macrocode} -%Format entry. -% \begin{macrocode} - \glstreeitem - \glsentryitem{##1}% - \glstarget{##1}{\glsxtrbookindexname{##1}}% - \glsxtrbookindexprelocation{##1}##2% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1}& + \glslongextraLocationFmt{##1}{##2}\tabularnewline }% \renewcommand{\subglossentry}[3]{% - \ifcase##1\relax + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2}& + \glslongextraSubLocationFmt{##1}{##2}{##3}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} % \end{macrocode} -% Level 0 (shouldn't happen as that's formatted with \cs{glossentry}). +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraNameSymDescHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \glstreeitem - \or +\newcommand{\glslongextraNameSymDescHeader}{% + \glslongextraNameSymDescTabularHeader\endhead + \glslongextraNameSymDescTabularFooter\endfoot +} % \end{macrocode} -% Level 1. +%\end{macro} +% +%\begin{macro}{\glslongextraNameSymDescTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \@glsxtr@bookindex@sep - \@glsxtr@bookindex@subbetween{##2}% - \let\@glsxtr@bookindex@sep\relax +\newcommand{\glslongextraNameSymDescTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname\tabularnewline + \midrule +} % \end{macrocode} -% Update separators. +%\end{macro} +% +%\begin{macro}{\glslongextraNameSymDescTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \let\@glsxtr@bookindex@subsubbetween\@gobble - \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep - \edef\@glsxtr@bookindex@subbetween{% - \noexpand\glsxtrbookindexsubbetween{##2}% - }% - \edef\@glsxtr@bookindex@atsubendgroup{% - \noexpand\glsxtrbookindexatsubendgroup{##1}% - }% +\newcommand{\glslongextraNameSymDescTabularFooter}{% + \bottomrule +} % \end{macrocode} -% Start sub-item. +%\end{macro} +% +%\begin{abbrvstyle}{long-name-sym-desc} +%\changes{1.37}{2018-11-30}{new} +%Three column style with symbol in the second column. % \begin{macrocode} - \glstreesubitem - \glssubentryitem{##2}% - \else +\newglossarystyle{long-name-sym-desc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameSymDescTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} % \end{macrocode} -% All other levels. +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraNameSymDescLocationHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \@glsxtr@bookindex@subsep - \@glsxtr@bookindex@subsubbetween{##2}% +\newcommand{\glslongextraNameSymDescLocationHeader}{% + \glslongextraNameSymDescLocationTabularHeader\endhead + \glslongextraNameSymDescLocationTabularFooter\endfoot +} % \end{macrocode} -% Update separators. +%\end{macro} +% +%\begin{macro}{\glslongextraNameSymDescLocationTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \let\@glsxtr@bookindex@subsep\relax - \edef\@glsxtr@bookindex@subsubbetween{% - \noexpand\glsxtrbookindexsubsubbetween{##2}% - }% - \edef\@glsxtr@bookindex@atsubsubendgroup{% - \noexpand\glsxtrbookindexatsubsubendgroup{##1}% - }% +\newcommand{\glslongextraNameSymDescLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule +} % \end{macrocode} -% Start sub-sub-item. +%\end{macro} +% +%\begin{macro}{\glslongextraNameSymDescLocationTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \glstreesubsubitem - \fi +\newcommand{\glslongextraNameSymDescLocationTabularFooter}{% + \bottomrule +} % \end{macrocode} -% Format entry. +%\end{macro} +% +%\begin{abbrvstyle}{long-name-sym-desc-loc} +%\changes{1.37}{2018-11-30}{new} +%Four column style with symbol in the second column. % \begin{macrocode} - \glstarget{##2}{\glsxtrbookindexsubname{##2}}% - \glsxtrbookindexsubprelocation{##2}##3% +\newglossarystyle{long-name-sym-desc-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameSymDescLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubLocationFmt{##1}{##2}{##3}\tabularnewline }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} % \end{macrocode} -% The group skip is moved to the group heading to avoid interfering -% with the end letter group hooks. +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraSymDescNameHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \renewcommand*{\glsgroupskip}{}% +\newcommand{\glslongextraSymDescNameHeader}{% + \glslongextraSymDescNameTabularHeader\endhead + \glslongextraSymDescNameTabularFooter\endfoot +} % \end{macrocode} -% Group heading format. +%\end{macro} +% +%\begin{macro}{\glslongextraSymDescNameTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \renewcommand*{\glsgroupheading}[1]{% +\newcommand{\glslongextraSymDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule +} % \end{macrocode} -% Do end group hooks. +%\end{macro} +% +%\begin{macro}{\glslongextraSymDescNameTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \@glsxtr@bookindex@subsubatendgroup - \@glsxtr@bookindex@subatendgroup - \@glsxtr@bookindex@atendgroup - \@glsxtr@bookindexgroupskip +\newcommand{\glslongextraSymDescNameTabularFooter}{% + \bottomrule +} % \end{macrocode} -% Update separators. +%\end{macro} +% +%\begin{abbrvstyle}{long-sym-desc-name} +%\changes{1.37}{2018-11-30}{new} +%Three column style with symbol in the first column, description in +%the second and name in the third. % \begin{macrocode} - \let\@glsxtr@bookindexgroupskip\glsxtrbookindexgroupskip - \let\@glsxtr@bookindex@between\@gobble - \let\@glsxtr@bookindex@atendgroup\relax - \let\@glsxtr@bookindex@subatendgroup\relax - \let\@glsxtr@bookindex@subsubatendgroup\relax +\newglossarystyle{long-sym-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraSymDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraSymDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraSymDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} % \end{macrocode} -% Fetch the group title from the label supplied in \verb|#1|. +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraLocationSymDescNameHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \glsxtrgetgrouptitle{##1}{\thisgrptitle}% +\newcommand{\glslongextraLocationSymDescNameHeader}{% + \glslongextraLocationSymDescNameTabularHeader\endhead + \glslongextraLocationSymDescNameTabularFooter\endfoot +} % \end{macrocode} -% Do the PDF bookmark if supported. +%\end{macro} +% +%\begin{macro}{\glslongextraLocationSymDescNameTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \glsxtrbookindexbookmark{\thisgrptitle}{index.##1}% +\newcommand{\glslongextraLocationSymDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule +} % \end{macrocode} -% Format the group title. +%\end{macro} +% +%\begin{macro}{\glslongextraLocationSymDescNameTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} - \glsxtrbookindexformatheader{\thisgrptitle}% - \nopagebreak\indexspace\nopagebreak\@afterheading +\newcommand{\glslongextraLocationSymDescNameTabularFooter}{% + \bottomrule +} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-loc-sym-desc-name} +%\changes{1.37}{2018-11-30}{new} +%Four column style with location list, symbol, description and name. +% \begin{macrocode} +\newglossarystyle{long-loc-sym-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationSymDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationSymDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationSymDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } % \end{macrocode} -% Some supplementary commands that may be useful. -% These store the entry label for the current page. Since the page -% number is needed in the control sequence, this uses -% \cs{glsxtrbookindexthepage} instead of \cs{thepage} in case -% the page numbering has been set to something that contains -% formatting commands. -%\begin{macro}{\glsxtrbookindexthepage} -%\changes{1.21}{2017-11-03}{new} -%The \cs{@printglossary} sets \cs{currentglossary} to the current -%glossary label. This is used as a prefix in case the page number is -%reset. +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraDescSymNameHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexthepage}{% - \ifdef\currentglossary{\currentglossary.\arabic{page}}{\arabic{page}}% +\newcommand{\glslongextraDescSymNameHeader}{% + \glslongextraDescSymNameTabularHeader\endhead + \glslongextraDescSymNameTabularFooter\endfoot } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexmarkentry} -%\changes{1.21}{2017-11-03}{new} -%Writes entry information to the \texttt{.aux} file. The argument is -%the entry label. +%\begin{macro}{\glslongextraDescSymNameTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexmarkentry}[1]{% - \protected@write\@auxout - {\let\glsxtrbookindexthepage\relax}% - {\string\glsxtr@setbookindexmark{\glsxtrbookindexthepage}{#1}}% +\newcommand{\glslongextraDescSymNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtr@setbookindexmark} -%\changes{1.21}{2017-11-03}{new} +% +%\begin{macro}{\glslongextraDescSymNameTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtr@setbookindexmark}[2]{% - \ifcsundef{glsxtr@idxfirstmark@#1}% - {\csgdef{glsxtr@idxfirstmark@#1}{#2}}% - {}% - \csgdef{glsxtr@idxlastmark@#1}{#2}% +\newcommand{\glslongextraDescSymNameTabularFooter}{% + \bottomrule } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexfirstmarkfmt} -%\changes{1.21}{2017-11-03}{new} +%\begin{abbrvstyle}{long-desc-sym-name} +%\changes{1.37}{2018-11-30}{new} +%Three column style with description in the first column, symbol in +%the second and name in the third. % \begin{macrocode} -\newcommand*{\glsxtrbookindexfirstmarkfmt}[1]{% - \glsentryname{#1}% +\newglossarystyle{long-desc-sym-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraDescSymNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraDescSymNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraDescSymNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsxtrbookindexfirstmark} -%\changes{1.21}{2017-11-03}{new} +%\end{abbrvstyle} +% +%\begin{macro}{\glslongextraLocationDescSymNameHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexfirstmark}{% - \letcs{\glsxtr@label}{glsxtr@idxfirstmark@\glsxtrbookindexthepage}% - \ifdef\glsxtr@label - {\glsxtrbookindexfirstmarkfmt{\glsxtr@label}}% - {}% +\newcommand{\glslongextraLocationDescSymNameHeader}{% + \glslongextraLocationDescSymNameTabularHeader\endhead + \glslongextraLocationDescSymNameTabularFooter\endfoot } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexlastmarkfmt} -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\glslongextraLocationDescSymNameTabularHeader} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexlastmarkfmt}[1]{% - \glsentryname{#1}% +\newcommand{\glslongextraLocationDescSymNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexlastmark} -%\changes{1.21}{2017-11-03}{new} +% +%\begin{macro}{\glslongextraLocationDescSymNameTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexlastmark}{% - \letcs{\glsxtr@label}{glsxtr@idxlastmark@\glsxtrbookindexthepage}% - \ifdef\glsxtr@label - {\glsxtrbookindexlastmarkfmt{\glsxtr@label}}% - {}% +\newcommand{\glslongextraLocationDescSymNameTabularFooter}{% + \bottomrule } % \end{macrocode} %\end{macro} % +%\begin{abbrvstyle}{long-loc-desc-sym-name} +%\changes{1.37}{2018-11-30}{new} +%Four column style with location list, description, symbol and name. +% \begin{macrocode} +\newglossarystyle{long-loc-desc-sym-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationDescSymNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescSymNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescSymNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +% \end{macrocode} +%\end{abbrvstyle} +% %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse 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 b5956567208..ad19aa47335 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.2 2018/8/18 20:14 +% glossaries-extra.ins generated using makedtx version 1.2 2018/11/30 18:41 \input docstrip \preamble @@ -18,7 +18,7 @@ The Current Maintainer of this work is Nicola Talbot. - This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. + This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. \endpreamble @@ -32,6 +32,8 @@ \usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra-stylemods.sty,package}} \file{glossary-bookindex.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-bookindex.sty,package}} +\file{glossary-longextra.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-longextra.sty,package}} \file{example-glossaries-xr.tex}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries-extra.dtx}{example-glossaries-xr.tex,package}} \file{example-glossaries-acronym-desc.bib}{\nopreamble\nopostamble\from{glossaries-extra.dtx}{example-glossaries-acronym-desc.bib}} diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/example-glossaries-xr.tex b/Master/texmf-dist/tex/latex/glossaries-extra/example-glossaries-xr.tex index 1a34b6e1d56..727362a0afb 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/example-glossaries-xr.tex +++ b/Master/texmf-dist/tex/latex/glossaries-extra/example-glossaries-xr.tex @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-bib2gls.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-bib2gls.sty index 7dca62e8c98..02f5440640c 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-bib2gls.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-bib2gls.sty @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,13 +39,25 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-bib2gls}[2018/08/18 v1.36 (NLCT)] +\ProvidesPackage{glossaries-extra-bib2gls}[2018/11/30 1.37 (NLCT)] \newcommand*{\glshex}{\string\u} \newcommand*{\glscapturedgroup}{\string\$} \newcommand*{\GlsXtrIfHasNonZeroChildCount}[3]{% \GlsXtrIfFieldNonZero{childcount}{#1}{#2}{#3}% } \newcommand*{\glsxtrprovidecommand}{\providecommand} +\newcommand*{\glsrenewcommand}{\@star@or@long\glsxtr@renewcommand} +\newcommand*{\glsxtr@renewcommand}[1]{% + \begingroup \escapechar\m@ne\xdef\@gtempa{{\string#1}}\endgroup + \expandafter\@ifundefined\@gtempa + {% + \GlossariesExtraWarning{can't redefine \noexpand#1(not already defined)}% + }% + \relax + \relax + \let\@ifdefinable\@rc@ifdefinable + \new@command#1% +} \newcommand*{\glsxtr@wrglossarylocation}[2]{#1} \ifdef\hyperref {% @@ -111,6 +123,274 @@ \setentrycounter[#1]{#2}% \glsxtrmultisupplocation{#5}{#4}{#3}% } +\ifundef\hyperlink +{ + \newcommand*{\glsxtrdisplaylocnameref}[8]{% + \glsnoidxdisplayloc{#1}{#2}{#3}{#4}% + } +} +{ + \newcommand*{\glsxtrdisplaylocnameref}[8]{% + \ifstrequal{#2}{equation}% + {\glsxtrnamereflink{#3}{(#4)}{#2.#7}{#8}}% + {% + \ifstrempty{#5}% + {% + \glsxtrnamereflink{#3}{#4}{#2.#7}{#8}% + }% + {% + \ifstrequal{#2}{page}% + {\glsxtrnamereflink{#3}{#4}{#2.#7}{#8}}% + {\glsxtrnamereflink{#3}{#5}{#2.#7}{#8}}% + }% + }% + } +} +\newcommand*{\glsxtrnamereflink}[4]{% + \begingroup + \let\glshypernumber\@firstofone + \ifstrempty{#4}% + {\glsxtrfmtinternalnameref{#3}{#1}{#2}}% + {\glsxtrfmtexternalnameref{#3}{#1}{#2}{#4}}% + \endgroup +} +\newcommand{\glsxtrnameloclink}[6]{% + \begingroup + \setentrycounter[#1]{#2}% + \def\glsxtr@locationhypertext{#5}% + \let\glshypernumber\@firstofone + \def\@glsnumberformat{#3}% + \def\glsxtrsupplocationurl{#6}% + \toks@={}% + \@glsxtr@bibgls@removespaces#4 \@nil + \endgroup +} +\def\@glsxtr@bibgls@removespaces#1 #2\@nil{% + \toks@=\expandafter{\the\toks@#1}% + \ifx\\#2\\% + \edef\x{\the\toks@}% + \ifx\x\empty + \else + \protected@edef\x{\glsentrycounter\@glo@counterprefix\the\toks@}% + \ifdefvoid\glsxtrsupplocationurl + {% + \expandafter\glsxtrfmtinternalnameref\expandafter{\x}% + {\@glsnumberformat}{\glsxtr@locationhypertext}% + }% + {% + \expandafter\glsxtrfmtexternalnameref\expandafter{\x}% + {\@glsnumberformat}{\glsxtr@locationhypertext}{\glsxtrsupplocationurl}% + }% + \fi + \else + \@gls@ReturnAfterFi{% + \@glsxtr@bibgls@removespaces#2\@nil + }% + \fi +} +\newcommand*{\glsxtrfmtinternalnameref}[3]{% + \csuse{#2}{\glsdohyperlink{#1}{#3}}% +} +\newcommand*{\glsxtrfmtexternalnameref}[4]{% + \csuse{#2}{\hyperref{#4}{}{#1}{#3}}% +} +\newcommand*{\glsxtrSetWidest}[3]{% + \ifdef\glsupdatewidest + {% + \ifdef\glslongextraUpdateWidest + {% + \ifstrempty{#1} + {% + \glsupdatewidest[#2]{#3}% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% + {% + \ifstrempty{#1} + {% + \glsupdatewidest[#2]{#3}% + }% + {% + \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}% + }% + }% + }% + {% + \ifdef\glssetwidest + {% + \ifdef\glslongextraUpdateWidest + {% + \ifstrempty{#1} + {% + \glssetwidest[#2]{#3}% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% + {% + \ifstrempty{#1} + {% + \glssetwidest[#2]{#3}% + }% + {% + \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}% + }% + }% + }% + {% + \ifdef\glslongextraUpdateWidest + {% + \ifstrempty{#1} + {% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% + {}% + }% + }% +} +\newcommand*{\glsxtrSetWidestFallback}[2]{% + \ifnum#1=0\relax + \ifdef\glsFindWidestTopLevelName + {% + \glsFindWidestTopLevelName[#2]% + }% + {% + \GlossariesExtraWarning{You need stylemods={tree} to + provide a fallback for set-widest}% + }% + \else + \ifdef\glsFindWidestLevelTwo + {% + \glsFindWidestLevelTwo[#2]% + \ifdef\glslongextraUpdateWidestChild + {% + \glslongextraUpdateWidestChild{#1}{\csuse{@glswidestnamei}}% + \glslongextraUpdateWidestChild{#1}{\csuse{@glswidestnameii}}% + }% + {}% + }% + {% + \GlossariesExtraWarning{You need stylemods={tree} to + provide a fallback for set-widest}% + }% + \fi +} +\newcommand*{\@glsxtr@labelprefixes}{} +\newcommand*{\glsxtrclearlabelprefixes}{% + \renewcommand*{\@glsxtr@labelprefixes}{}% +} +\newcommand*{\glsxtraddlabelprefix}[1]{% + \ifstrempty{#1}% + {\glsxtraddlabelprefix{\empty}}% + {% + \ifdefempty\@glsxtr@labelprefixes + {\def\@glsxtr@labelprefixes{#1}}% + {\appto\@glsxtr@labelprefixes{,#1}}% + }% +} +\newcommand*{\glsxtrprependlabelprefix}[1]{% + \ifstrempty{#1}% + {\glsxtrprependlabelprefix{\empty}}% + {% + \ifdefempty\@glsxtr@labelprefixes + {\def\@glsxtr@labelprefixes{#1}}% + {\preto\@glsxtr@labelprefixes{#1,}}% + }% +} +\newcommand*{\glsxtrifinlabelprefixlist}[3]{% + \ifstrempty{#1}% + {\glsxtrifinlabelprefixlist{\empty}{#2}{#3}}% + {% + \DTLifinlist{#1}{\@glsxtr@labelprefixes}{#2}{#3}% + }% +} +\AtBeginDocument{% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@prefixlabellist}[1]{}}% + \protected@write\@auxout{}{\string\@glsxtr@prefixlabellist{\@glsxtr@labelprefixes}}% +} +\newcommand*{\@glsxtr@get@prefixedlabel}[1]{% + \begingroup + \edef\@gls@thislabel{#1}% + \@for\@glsxtr@prefix:=\@glsxtr@labelprefixes\do + {% + \edef\@gls@thislabel{\@glsxtr@prefix#1}% + \ifglsentryexists{\@gls@thislabel}{\@endfortrue}{}% + }% + \edef\x{\endgroup\noexpand\def\noexpand\@gls@thislabel{\@gls@thislabel}}\x +} +\newrobustcmd*{\dgls}{\@gls@hyp@opt\@dgls} +\newcommand*{\@dgls}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@gls@{#1}{\@gls@thislabel}}{\@gls@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dglspl}{\@gls@hyp@opt\@dglspl} +\newcommand*{\@dglspl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@glspl@{#1}{\@gls@thislabel}}{\@glspl@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dGls}{\@gls@hyp@opt\@dGls} +\newcommand*{\@dGls}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@Gls@{#1}{\@gls@thislabel}}{\@Gls@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dGlspl}{\@gls@hyp@opt\@dGlspl} +\newcommand*{\@dGlspl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@Glspl@{#1}{\@gls@thislabel}}{\@Glspl@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dGLS}{\@gls@hyp@opt\@dGLS} +\newcommand*{\@dGLS}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@GLS@{#1}{\@gls@thislabel}}{\@GLS@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dGLSpl}{\@gls@hyp@opt\@dGLSpl} +\newcommand*{\@dGLSpl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@GLSpl@{#1}{\@gls@thislabel}}{\@GLSpl@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dglslink}[3][]{% + \@glsxtr@get@prefixedlabel{#2}% + \glslink[#1]{\@gls@thislabel}{#3}% +} +\newrobustcmd*{\dglsdisp}[3][]{% + \@glsxtr@get@prefixedlabel{#2}% + \glsdisp[#1]{\@gls@thislabel}{#3}% +} \providecommand*{\Alpha}{\mathrm{A}} \providecommand*{\Beta}{\mathrm{B}} \providecommand*{\Epsilon}{\mathrm{E}} 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 9da23febe2e..f6a7e85532e 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 @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2018/08/13 v1.35 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2018/11/30 v1.37 (NLCT)] \newcommand*{\@glsxtr@loadstyles}{} \DeclareOption{all}{% \appto\@glsxtr@loadstyles{% @@ -53,6 +53,7 @@ \RequirePackage{glossary-super}% \RequirePackage{glossary-superragged}% \RequirePackage{glossary-bookindex}% + \RequirePackage{glossary-longextra}% } } \DeclareOption*{% 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 4be61aae9d4..cee1d645b41 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2018/08/18 v1.36 (NLCT)] +\ProvidesPackage{glossaries-extra}[2018/11/30 1.37 (NLCT)] \RequirePackage{xkeyval} \RequirePackage{etoolbox} \@ifpackageloaded{glossaries} @@ -170,11 +170,15 @@ \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% \let\@glsxtr@org@theHvalue\@glsxtr@theHvalue \let\@gls@counter\glscounter + \if@glsxtr@equations + \@glsxtr@use@equation@counter + \fi \@gls@setdefault@glslink@opts \csuse{@glsxtr@#3@prekeys}% \setkeys{#3}{#1}% + \glsxtr@do@autoadd{#3}% \csuse{@glsxtr@#3@postkeys}% - \glsxtr@inc@wrglossaryctr{#2}% + \glsxtr@inc@wrglossaryctr{#2}% \ifKV@glslink@noindex \else \glswriteentry{#2}% @@ -218,28 +222,66 @@ }% \@do@gls@getcounterprefix \fi - \protected@write\@auxout{}{\string\glsxtr@record + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% - {\@glsrecordlocref}}% + {\@glsrecordlocref}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\@glsrecordlocref}}% + \fi \@glsxtr@counterrecordhook \let\@glo@counterprefix\@glsxtr@orgprefix } \newcommand*\@glsxtr@dorecordnodefer{% \ifx\theglsentrycounter\theHglsentrycounter - \protected@write\@auxout{}{\string\glsxtr@record - {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% - {\theglsentrycounter}}% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record + {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}}% + \fi \else - \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix - {\theglsentrycounter}{\theHglsentrycounter}% - }% - \@do@gls@getcounterprefix - \protected@write\@auxout{}{\string\glsxtr@record - {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% - {\theglsentrycounter}}% + \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix + {\theglsentrycounter}{\theHglsentrycounter}% + }% + \@do@gls@getcounterprefix + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}% + {\@glsnumberformat}{\theglsentrycounter}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}}% + \fi \fi \@glsxtr@counterrecordhook } +\newcommand{\@glsxtr@ifnum@mmode}[2]{% + \ifmmode + \ifst@rred + #2% + \else + \if@display #1\else #2\fi + \fi + \else + #2% + \fi +} +\newcommand*{\@glsxtr@do@nameref@record}[5]{% + \gls@ifnotmeasuring + {% + \protected@write\@auxout{}{\string\glsxtr@record@nameref + {#1}{#2}{#3}{#4}{#5}% + {\csuse{@currentlabelname}}{\csuse{@currentHref}}% + {\theHglsentrycounter}}% + }% +} \newcommand*{\@@glsxtr@recordcounter}{% \@glsxtr@noop@recordcounter } @@ -304,10 +346,41 @@ \newcommand*{\@glsxtr@record@setting}{off} \newcommand*{\@glsxtr@record@setting@alsoindex}{alsoindex} \newcommand*{\@glsxtr@record@setting@only}{only} +\newcommand*{\@glsxtr@record@setting@nameref}{nameref} +\newcommand*{\@glsxtr@if@record@only}[2]{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only + #1% + \else + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + #1% + \else + #2% + \fi + \fi +} \newcommand*{\@glsxtr@record@setting@off}{off} +\newcommand*{\@glsxtr@record@only@setup}{% + \def\glsxtr@setup@record{% + \@glsxtr@autoseeindexfalse + \let\@do@seeglossary\@glsxtr@recordsee + \let\@glsxtr@record\@@glsxtr@record + \let\@@do@wrglossary\@glsxtr@do@record@wrglossary + \let\@gls@saveentrycounter\relax + \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}% + \def\glsxtrsetaliasnoindex{}% + \ifdef\@gls@setupsort@none{\@gls@setupsort@none}{}% + \def\glsxtrNoGlossaryWarning{\@glsxtr@record@noglossarywarning}% + \RequirePackage{glossaries-extra-bib2gls}% + }% +} \define@choicekey{glossaries-extra.sty}{record} [\@glsxtr@record@setting\glsxtr@record@nr]% - {off,only,alsoindex}% + {off,only,alsoindex,nameref}% [only]% {% \ifcase\glsxtr@record@nr\relax @@ -323,23 +396,7 @@ \undef\glsxtrsetaliasnoindex }% \or - \def\glsxtr@setup@record{% - \@glsxtr@autoseeindexfalse - \let\@do@seeglossary\@glsxtr@recordsee - \let\@glsxtr@record\@@glsxtr@record - \let\@@do@wrglossary\@glsxtr@do@record@wrglossary - \let\@gls@saveentrycounter\relax - \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}% - \def\glsxtrsetaliasnoindex{}% - \ifdef\@gls@setupsort@none{\@gls@setupsort@none}{}% - \def\glsxtrNoGlossaryWarning{\@glsxtr@record@noglossarywarning}% - \RequirePackage{glossaries-extra-bib2gls}% - }% + \@glsxtr@record@only@setup \or \def\glsxtr@setup@record{% \renewcommand*{\@do@seeglossary}{\@glsxtr@dosee@alsoindex@glossary}% @@ -353,6 +410,12 @@ \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% \undef\glsxtrsetaliasnoindex }% + \or + \@glsxtr@record@only@setup + \ifundef\hyperlink + {\GlossariesExtraWarning{You have requested record=nameref but + the document doesn't support hyperlinks}}% + {}% \fi } \newcommand*{\@glsxtr@docdefval}{0} @@ -382,6 +445,21 @@ \define@boolkey{glossaries-extra.sty}[@glsxtr@]{autoseeindex}[true]{% } \@glsxtr@autoseeindextrue +\define@boolkey{glossaries-extra.sty}[@glsxtr@]{equations}[true]{% +} +\@glsxtr@equationsfalse +\let\glsxtr@float\@float +\let\glsxtr@dblfloat\@dblfloat +\define@boolkey{glossaries-extra.sty}[@glsxtr@]{floats}[true]{% + \if@glsxtr@floats + \renewcommand*{\@float}[1]{\renewcommand{\glscounter}{##1}\glsxtr@float{##1}}% + \renewcommand*{\@dblfloat}[1]{\renewcommand{\glscounter}{##1}\glsxtr@dblfloat{##1}}% + \else + \let\@float\glsxtr@float + \let\@dblfloat\glsxtr@dblfloat + \fi +} +\@glsxtr@floatsfalse \newcommand*{\GlossariesExtraWarning}[1]{\PackageWarning{glossaries-extra}{#1}} \newcommand*{\GlossariesExtraWarningNoLine}[1]{% \PackageWarningNoLine{glossaries-extra}{#1}} @@ -768,6 +846,35 @@ } \let\glsxtr@saveentrycounter\@gls@saveentrycounter \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter +\renewcommand*\@gls@getcounterprefix[2]{% + \protected@edef\@gls@thisloc{#1}\protected@edef\@gls@thisHloc{#2}% + \ifx\@gls@thisloc\@gls@thisHloc + \def\@glo@counterprefix{}% + \else + \def\@gls@get@counterprefix##1.#1##2\end@getprefix{% + \def\@glo@tmp{##2}% + \ifx\@glo@tmp\@empty + \def\@glo@counterprefix{}% + \else + \def\@glo@counterprefix{##1}% + \fi + }% + \@gls@get@counterprefix#2.#1\end@getprefix + \ifx\@glo@counterprefix\@empty + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \else + \GlossariesExtraWarning{Hyper target `#2' can't be formed by + prefixing^^Jlocation `#1'. You need to modify the + definition of \string\theH\@gls@counter^^Jotherwise you + will get the warning: "`name{\@gls@counter.#1}' has been^^J + referenced but does not exist"% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only + . You may want to consider using record=nameref instead% + \fi}% + \fi + \fi + \fi +} \newcommand*{\@glsxtrdialecthook}{} \glsxtr@setup@record \AtBeginDocument{% @@ -954,8 +1061,31 @@ \newcommand*{\glsxtrusefield}[2]{% \@gls@entry@field{#1}{#2}% } -\newcommand*{\Glsxtrusefield}[2]{% - \@gls@entry@field{#1}{#2}% +\ifdef\texorpdfstring +{ + \newcommand*{\Glsxtrusefield}[2]{% + \texorpdfstring + {\@Gls@entry@field{#1}{#2}} + {\@gls@entry@field{#1}{#2}}% + } +} +{ + \newcommand*{\Glsxtrusefield}[2]{% + \@Gls@entry@field{#1}{#2}% + } +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSxtrusefield}[2]{% + \texorpdfstring + {\glsdoifexists{#1}{\mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}}}% + {\@gls@entry@field{#1}{#2}}% + } +} +{ + \newcommand*{\GLSxtrusefield}[2]{% + \glsdoifexists{#1}{\mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}}% + } } \newcommand*{\glsxtrdeffield}[2]{\csdef{glo@\glsdetoklabel{#1}@#2}} \newcommand*{\glsxtredeffield}[2]{\protected@csedef{glo@\glsdetoklabel{#1}@#2}} @@ -1405,8 +1535,58 @@ \glsseeformat[#1]{#2}{}% } \renewcommand*{\glsseeitemformat}[1]{% - \ifglshasshort{\glslabel}{\glsaccesstext{#1}}{\glsaccessname{#1}}% + \ifglshasshort{#1}{\glsaccesstext{#1}}{\glsaccessname{#1}}% +} +\newcommand*{\glsxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\glsxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {}% + \ifglshasshort{#1}{\glsaccessshort{#1}}{\glsaccessname{#1}}% + }% } +\newcommand*{\Glsxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {% + \Glsxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep + \ifglshasshort{#1}{\glsaccessshort{#1}}{\glsaccessname{#1}}% + }% + {\ifglshasshort{#1}{\Glsaccessshort{#1}}{\Glsaccessname{#1}}}% + }% +} +\newcommand*{\GlsXtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\GlsXtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {}% + \ifglshasshort{#1}{\Glsaccessshort{#1}}{\Glsaccessname{#1}}% + }% +} +\newcommand*{\GLSxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {% + \GLSxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep + \ifglshasshort{#1}{\glsaccessshort{#1}}{\glsaccessname{#1}}% + }% + {\ifglshasshort{#1}{\GLSaccessshort{#1}}{\GLSaccessname{#1}}}% + }% +} +\newcommand*{\GLSXTRhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\GLSXTRhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {} + \ifglshasshort{#1}{\GLSaccessshort{#1}}{\GLSaccessname{#1}}% + }% +} +\newcommand*{\glsxtrhiernamesep}{\,{\small$\triangleright$}\,} \newcommand*{\glsxtruseseealso}[1]{% \glsdoifexists{#1}% {% @@ -2065,6 +2245,24 @@ \protected@edef\@glsxtr@tmp{#2}% \expandafter#1\expandafter{\@glsxtr@tmp}% } +\newcommand*{\@glsxtr@use@equation@counter}{% + \@glsxtr@ifnum@mmode{\def\@gls@counter{equation}}{}% +} +\newcommand*{\glsxtr@do@autoadd}[1]{} +\newcommand*{\GlsXtrAutoAddOnFormat}[3][\glslabel]{% + \renewcommand*{\glsxtr@do@autoadd}[1]{% + \begingroup + \protected@edef\@glsxtr@do@autoadd{% + \noexpand\ifstrequal{##1}{glslink}% + {% + \noexpand\DTLifinlist{\@glsnumberformat}{#2}{\noexpand\glsadd[format={\@glsnumberformat},#3]{#1}}{}% + }% + {}% + }% + \@glsxtr@do@autoadd + \endgroup + }% +} \def\@gls@link[#1]#2#3{% \leavevmode \edef\glslabel{\glsdetoklabel{#2}}% @@ -2081,11 +2279,15 @@ \glsxtrinitwrgloss \glsxtrinithyperoutside \@gls@setdefault@glslink@opts - \glsxtr@inc@linkcount + \glsxtr@inc@linkcount + \if@glsxtr@equations + \@glsxtr@use@equation@counter + \fi \do@glsdisablehyperinlist \do@gls@link@checkfirsthyper \glslinkpresetkeys \setkeys{glslink}{#1}% + \glsxtr@do@autoadd{glslink}% \glslinkpostsetkeys \ifdefempty{\@glsxtr@thevalue}% {% @@ -2150,27 +2352,30 @@ {}% {% \@gls@adjustmode - \@glsxtr@record{#1}{#2}{glossadd}% - \glsdoifexists{#2}% - {% - \let\@glsnumberformat\@glsxtr@defaultnumberformat - \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}% - \def\@glsxtr@thevalue{}% - \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% - \glsaddpresetkeys - \setkeys{glossadd}{#1}% - \glsaddpostsetkeys - \ifdefempty{\@glsxtr@thevalue}% + \begingroup + \@glsxtr@record{#1}{#2}{glossadd}% + \glsdoifexists{#2}% {% - \@gls@saveentrycounter - }% - {% - \let\theglsentrycounter\@glsxtr@thevalue - \def\theHglsentrycounter{\@glsxtr@theHvalue}% + \let\@glsnumberformat\@glsxtr@defaultnumberformat + \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}% + \def\@glsxtr@thevalue{}% + \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% + \glsaddpresetkeys + \setkeys{glossadd}{#1}% + \glsaddpostsetkeys + \ifdefempty{\@glsxtr@thevalue}% + {% + \@gls@saveentrycounter + }% + {% + \let\theglsentrycounter\@glsxtr@thevalue + \def\theHglsentrycounter{\@glsxtr@theHvalue}% + }% + \@gls@setsort{#2}% + \KV@glslink@noindexfalse + \@@do@wrglossary{#2}% }% - \@gls@setsort{#2}% - \@@do@wrglossary{#2}% - }% + \endgroup }% } \newrobustcmd{\glsaddeach}[2][]{% @@ -2844,6 +3049,12 @@ \let\@gls@hyp@opt\@gls@alt@hyp@opt \def\@gls@alt@hyp@opt@char{#1}% \def\@gls@alt@hyp@opt@keys{#2}% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off + {}% + {% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@altmodifier}[1]{}}% + \protected@write\@auxout{}{\string\@glsxtr@altmodifier{#1}}% + }% } \let\glsxtr@org@dohyperlink\glsdohyperlink \ifdef\glsnavhyperlink @@ -3883,12 +4094,15 @@ \newcommand*{\@glsxtr@reg@glosslist}{} \let\@glsxtr@org@makeglossaries\makeglossaries \renewcommand*{\makeglossaries}[1][]{% - \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only + \@glsxtr@if@record@only + {% \PackageError{glossaries-extra}{\string\makeglossaries\space - not permitted\MessageBreak with record=only package option}% + not permitted\MessageBreak with record=\@glsxtr@record@setting\space + package option}% {You may only use \string\makeglossaries\space with record=off or record=alsoindex options}% - \else + }% + {% \ifblank{#1}% {\@glsxtr@org@makeglossaries}% {% @@ -4021,7 +4235,7 @@ \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}% \fi }% - \fi + }% } \newcommand{\@glsxtr@orgprintglossary}[2]{% \def\@glo@type{\glsdefaulttype}% @@ -4606,6 +4820,7 @@ \makeatletter \@input{#2.glstex}% \@bibgls@restoreat + \@glsxtr@check@bibgls@nameref }% {% \GlossariesExtraWarning{No file `#2.glstex'}% @@ -4613,6 +4828,17 @@ \let\@gls@see@noindex\@glsxtr@org@see@noindex } \@onlypreamble\glsxtrresourcefile +\newcommand{\@glsxtr@check@bibgls@nameref}{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \ifdef\bibglshrefchar + {}% + {% + \GlossariesExtraWarning{record=nameref requires at least + version 1.8 of bib2gls}% + }% + \fi + \let\@glsxtr@check@bibgls@nameref\relax +} \newcommand*{\glsxtrresourceinit}{} \newcount\glsxtrresourcecount \newcommand*{\GlsXtrLoadResources}[1][]{% @@ -4644,6 +4870,10 @@ \protected@write\@auxout{}{\string\glsxtr@fields{\@gls@keymap}}% \protected@write\@auxout{}% {\string\providecommand*{\string\glsxtr@record}[5]{}}% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@record@nameref}[8]{}}% + \fi \ifdef\CurrentTrackedLanguageTag {% \protected@write\@auxout{}{% @@ -4683,6 +4913,7 @@ }% } \newcommand*{\glsxtr@record}[5]{} +\newcommand*{\glsxtr@record@nameref}[8]{} \newcommand*{\glsxtr@counterrecord}[3]{% \glsxtrfieldlistgadd{#1}{record.#2}{#3}% } @@ -4712,13 +4943,16 @@ \ifglshasparent{#1}% {\GlsXtrStandaloneSubEntryItem{#1}}% {\glsentryitem{#1}}% - \glstarget{#1}{\glossentryname{#1}}% + \GlsXtrStandaloneEntryName{#1}% \endgroup }% }% {\glsentryname{#1}}% {\glsxtrheadname{#1}}% } +\newcommand*{\GlsXtrStandaloneEntryName}[1]{% + \glstarget{#1}{\glossentryname{#1}}% +} \newcommand{\GlsXtrStandaloneGlossaryType}{\glsentrytype{\glscurrententrylabel}} \newcommand*{\GlsXtrStandaloneSubEntryItem}[1]{% \GlsXtrIfFieldEqNum{level}{#1}{1}{\glssubentryitem{#1}}{}% @@ -4758,13 +4992,16 @@ \ifglshasparent{#1}% {\GlsXtrStandaloneSubEntryItem{#1}}% {\glsentryitem{#1}}% - \glstarget{#1}{\glossentrynameother{#1}{#2}}% + \GlsXtrStandaloneEntryOther{#1}% \endgroup }% }% {\@gls@entry@field{#1}{#2}}% {#3}% } +\newcommand*{\GlsXtrStandaloneEntryOther}[2]{% + \glstarget{#1}{\glossentrynameother{#1}{#2}}% +} \newcommand*{\printunsrtglossary}{% \@ifstar\s@printunsrtglossary\@printunsrtglossary } @@ -4902,11 +5139,12 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% }% \let\@gls@currentlettergroup\@glo@thislettergrp } +\newcommand*{\GlsXtrLocationField}{location} \newcommand{\@glsxtr@noidx@do}[1]{% \ifglsentryexists{#1}% {% \global\letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% - \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@location}% + \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@\GlsXtrLocationField}% \ifglshasparent{#1}% {% \gls@level=\csuse{glo@\glsdetoklabel{#1}@level}\relax @@ -4952,6 +5190,18 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% {}% } \newcount\@glsxtrnewgls@inner +\newcommand*{\@glsxtr@providenewgls}{% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@newglslike}[2]{}}% + \let\@glsxtr@providenewgls\relax +} +\newcommand{\glsxtridentifyglslike}[2]{% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off + {}% + {% + \@glsxtr@providenewgls + \protected@write\@auxout{}{\string\@glsxtr@newglslike{#1}{\string#2}}% + }% +} \newcommand*{\@glsxtrnewgls}[4]{% \ifdef{#3}% {% @@ -4959,6 +5209,7 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% defined}{}% }% {% + \glsxtridentifyglslike{#2}{#3}% \ifcsdef{@#4like@#2}% {% \advance\@glsxtrnewgls@inner by \@ne diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty index 67485ea1419..8ac6b7c7e1d 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary-bookindex}[2018/08/18 v1.36 (NLCT)] +\ProvidesPackage{glossary-bookindex}[2018/11/30 1.37 (NLCT)] \RequirePackage{multicol} \RequirePackage{glossary-tree} \newcommand{\glsxtrbookindexcols}{2} diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossary-longextra.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossary-longextra.sty new file mode 100644 index 00000000000..d4df8e8849e --- /dev/null +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossary-longextra.sty @@ -0,0 +1,910 @@ +%% +%% This is file `glossary-longextra.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% glossaries-extra.dtx (with options: `glossary-longextra.sty,package') +%% +%% glossaries-extra.dtx +%% Copyright 2018 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossary-longextra}[2018/11/30 1.37 (NLCT)] +\RequirePackage{glossary-longbooktabs} +\newcommand{\glslongextraNameFmt}[1]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{#1}}% +} +\newcommand{\glslongextraDescFmt}[1]{% + \glossentrydesc{#1}\glspostdescription +} +\newcommand{\glslongextraSymbolFmt}[1]{\glossentrysymbol{#1}} +\newcommand{\glslongextraLocationFmt}[2]{#2} +\newcommand{\glslongextraSubNameFmt}[2]{% + \glssubentryitem{#2}\glstarget{#2}{\strut}% +} +\newcommand{\glslongextraSubDescFmt}[2]{% + \glslongextraDescFmt{#2}% +} +\newcommand{\glslongextraSubSymbolFmt}[2]{% + \glslongextraSymbolFmt{#2}% +} +\newcommand{\glslongextraSubLocationFmt}[3]{#3} +\newcommand{\glslongextraNameAlign}{l} +\newcommand{\glslongextraDescAlign}{>{\raggedright}p{\glsdescwidth}} +\newcommand{\glslongextraSymbolAlign}{c} +\newcommand{\glslongextraLocationAlign}{>{\raggedright}p{\glspagelistwidth}} +\newcommand{\glslongextraGroupHeading}[2]{} +\newcommand{\glslongextraHeaderFmt}[1]{\textbf{#1}} +\newcommand{\glslongextraNameDescHeader}{% + \glslongextraNameDescTabularHeader\endhead + \glslongextraNameDescTabularFooter\endfoot +} +\newcommand{\glslongextraNameDescTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname\tabularnewline + \midrule +} +\newcommand{\glslongextraNameDescTabularFooter}{% + \bottomrule +} +\newcommand*{\glslongextraSetWidest}[1]{% + \def\@glslongextrawidestname{#1}% +} +\newcommand*{\@glslongextrawidestname}{\csuse{@glswidestname}} +\newcommand*{\glslongextraUpdateWidest}[1]{% + \ifundef\@glslongextrawidestname + {\def\@glslongextrawidestname{#1}}% + {% + \settowidth{\dimen@}{\@glslongextrawidestname}% + \settowidth{\dimen@ii}{#1}% + \ifdim\dimen@ii>\dimen@ + \def\@glslongextrawidestname{#1}% + \fi + }% +} +\newcommand*{\glslongextraUpdateWidestChild}[2]{} +\newcommand{\glslongextraSetDescWidth}{% + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\entryname}% + \settowidth{\dimen@}{\glsnamefont{\@glslongextrawidestname}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \fi + \setlength{\glsdescwidth}{\dimexpr\linewidth-4\tabcolsep-\gls@tmplen}% +} +\newcommand{\glslongextraSymSetDescWidth}{% + \glslongextraSetDescWidth + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\symbolname}% + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\gls@tmplen}% +} +\newcommand{\glslongextraLocSetDescWidth}{% + \glslongextraSetDescWidth + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% +} +\newcommand{\glslongextraSymLocSetDescWidth}{% + \glslongextraSymSetDescWidth + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% +} +\newif\ifGlsLongExtraUseTabular +\GlsLongExtraUseTabularfalse +\newcommand*{\glslongextraTabularVAlign}{c} +\newglossarystyle{long-name-desc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} + & + \glslongextraSubDescFmt{##1}{##2}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraNameDescLocationHeader}{% + \glslongextraNameDescLocationTabularHeader\endhead + \glslongextraNameDescLocationTabularFooter\endfoot +} +\newcommand{\glslongextraNameDescLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule +} +\newcommand{\glslongextraNameDescLocationTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-name-desc-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2}& + \glslongextraSubDescFmt{##1}{##2}& + \glslongextraSubLocationFmt{##1}{##2}{##3}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraDescNameHeader}{% + \glslongextraDescNameTabularHeader\endhead + \glslongextraDescNameTabularFooter\endfoot +} +\newcommand{\glslongextraDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\descriptionname& + \glslongextraHeaderFmt\entryname \tabularnewline + \midrule +} +\newcommand{\glslongextraDescNameTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraLocationDescNameHeader}{% + \glslongextraLocationDescNameTabularHeader\endhead + \glslongextraLocationDescNameTabularFooter\endfoot +} +\newcommand{\glslongextraLocationDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname& + \glslongextraHeaderFmt\descriptionname& + \glslongextraHeaderFmt\entryname \tabularnewline + \midrule +} +\newcommand{\glslongextraLocationDescNameTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-loc-desc-name}% +{% + \ifGlsLongExtraUseTabular + {% + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraNameDescSymHeader}{% + \glslongextraNameDescSymTabularHeader\endhead + \glslongextraNameDescSymTabularFooter\endfoot +} +\newcommand{\glslongextraNameDescSymTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname\tabularnewline + \midrule +} +\newcommand{\glslongextraNameDescSymTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-name-desc-sym}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescSymTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraNameDescSymLocationHeader}{% + \glslongextraNameDescSymLocationTabularHeader\endhead + \glslongextraNameDescSymLocationTabularFooter\endfoot +} +\newcommand{\glslongextraNameDescSymLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule +} +\newcommand{\glslongextraNameDescSymLocationTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-name-desc-sym-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescSymLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1}& + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2}& + \glslongextraSubLocationFmt{##1}{##2}{##3}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraNameSymDescHeader}{% + \glslongextraNameSymDescTabularHeader\endhead + \glslongextraNameSymDescTabularFooter\endfoot +} +\newcommand{\glslongextraNameSymDescTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname\tabularnewline + \midrule +} +\newcommand{\glslongextraNameSymDescTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-name-sym-desc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameSymDescTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraNameSymDescLocationHeader}{% + \glslongextraNameSymDescLocationTabularHeader\endhead + \glslongextraNameSymDescLocationTabularFooter\endfoot +} +\newcommand{\glslongextraNameSymDescLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule +} +\newcommand{\glslongextraNameSymDescLocationTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-name-sym-desc-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameSymDescLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubLocationFmt{##1}{##2}{##3}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraSymDescNameHeader}{% + \glslongextraSymDescNameTabularHeader\endhead + \glslongextraSymDescNameTabularFooter\endfoot +} +\newcommand{\glslongextraSymDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule +} +\newcommand{\glslongextraSymDescNameTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-sym-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraSymDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraSymDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraSymDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraLocationSymDescNameHeader}{% + \glslongextraLocationSymDescNameTabularHeader\endhead + \glslongextraLocationSymDescNameTabularFooter\endfoot +} +\newcommand{\glslongextraLocationSymDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule +} +\newcommand{\glslongextraLocationSymDescNameTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-loc-sym-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationSymDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationSymDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationSymDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraDescSymNameHeader}{% + \glslongextraDescSymNameTabularHeader\endhead + \glslongextraDescSymNameTabularFooter\endfoot +} +\newcommand{\glslongextraDescSymNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule +} +\newcommand{\glslongextraDescSymNameTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-desc-sym-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraDescSymNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraDescSymNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraDescSymNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\newcommand{\glslongextraLocationDescSymNameHeader}{% + \glslongextraLocationDescSymNameTabularHeader\endhead + \glslongextraLocationDescSymNameTabularFooter\endfoot +} +\newcommand{\glslongextraLocationDescSymNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule +} +\newcommand{\glslongextraLocationDescSymNameTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-loc-desc-sym-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationDescSymNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescSymNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescSymNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi +} +\endinput +%% +%% End of file `glossary-longextra.sty'. -- cgit v1.2.3