diff options
Diffstat (limited to 'Master/texmf-dist')
63 files changed, 29514 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES b/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES new file mode 100644 index 00000000000..94cfcf2f314 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/CHANGES @@ -0,0 +1,238 @@ +1.0 (2016-01-24 First stable release): + + * indexcrossrefs is now initially set to false but will + be automatically switched on if the "see" key is used. + +0.5.4 (2015-12-15): + + * Modified \glsdohyperlink and \glsdonohyperlink to ameliorate + the problems resulted from nested link-text. + + * Added per unit entry counting. + + * Modified \cglsformat etc to check for the regular attribute. + + * Added \GlsXtrEnableOnTheFly + + * Added \GlsXtrSetAltModifier and \GlsXtrSetDefaultGlsOpts + + * Added \glsxtrprotectlinks to deal with nested \gls etc. + + * Added \glsxtrpostunset, \glsxtrpostlocalunset, + \glsxtrpostreset and \gslxtrpostlocalreset + + * Added checks for entry's existence in shortcut tests + \glshasattribute and \glsifattribute and in + \glspostlinkhook + + * Added \glsxtrdowrglossaryhook + + * Added package option indexcrossrefs + + * Fixed \@newglossaryentryposthook so that it will add an empty + see value if not set. Added "see" element to field map + \@gls@keymap. + + * Added redefinition of \@gls@setdefault@glslink@opts to + set the default index value. + + * \MakeAcronymsAbbreviations now disables \setacronymstyle + +0.5.3 (2015-12-08): + + * Fixed bug in "abbreviations" package option. + + * Added support for "indexname" and "dualindex" attributes + with associated new commands. + + * Added provision for language modules (but none provided). + + * Removed \GlsXtrNoGlsWarningNoAutoMakeMain + (identical to \GlsXtrNoGlsWarningEmptyMain) + + * Added check for \glsdescwidth and \glspagelistwidth and + fixed adjustment for \glslistdottedwidth. + +0.5.2 (2015-12-08): + + * Modified the "nonumberlist" key (\printglossary) so that + it saves the number list. + + * Added \GlsXtrFormatLocationList + + * New command \GlsXtrEnableInitialTagging + + * Added \glsxtrfieldtitlecase + + * Modified \glossentrydesc to check for "glossdesc" attribute. + + * Modified \glossentryname to check for "glossname" attribute. + + * Fixed misspelt glossaries-accsupp (final letter was missing) + in \@ifpackageloaded + + * Modified commands like \@glstext@ to use \glsaccess... + instead of \glsentry... if glossaries-accsupp loaded. + + * Added: + + \GLSaccessname + \GLSaccesstext + \GLSaccessplural + \GLSaccessfirst + \GLSaccessfirstplural + \GLSaccesssymbol + \GLSaccesssymbolplural + \GLSaccessdesc + \GLSaccessdescplural + \GLSaccessshort + \GLSaccessshortpl + \GLSaccesslong + \glsaccesslongpl + \Glsaccesslongpl + \GLSaccesslongpl + + * Removed \glsxtrabbrvfmt and moved + \glssetabbrvfmt{\glscategory{\glslabel}} to \glsentryfmt + + * Added check for post-definition style switch. + + * Added \glsxtrnewabbrevpresetkeyhook + +0.5.1 (2015-12-07): + + * Removed \ifglsxtruseuchead + Now implemented through the "headuc" attribute. + Commands like \glsxtrheadshort modified to accommodate this. + + * Added: + \Glsaccessname + \Glsaccesstext + \Glsaccessplural + \Glsaccessfirst + \Glsaccessfirstplural + \Glsaccesssymbol + \Glsaccesssymbolplural + \Glsaccessdesc + \Glsaccessdescplural + + * Abbreviation styles (non-regular) now switch off regular + attribute if it has been set. (In case the style is + switched for a given category, e.g the "acronym" category.) + +0.5 (2015-12-07): + + * Renamed \glsentryfmtshort -> \glsfmtshort etc + These now use new commands \glsxtrtitleshort and + \glsxtrheadmarkshort etc to work better in page headers + that convert to upper case. + + * Added new commands for use in section headings: + \glsfmttext, \Glsfmttext, \glsfmtplural, \Glsfmtplural, + \glsfmtfirst, \Glsfmtfirst, \glsfmtfirstpl, + \Glsfmtfirstpl + + * New commands \glshascategoryattribute and \glshasattribute + + * Added \glsfirstabbrvdefaultfont and \glsfirstlongdefaultfont + Styles now set \glsfirstabbrvfont and \glsfirstlongfont + + * \markright and \markboth redefined so that they use + \glsxtrmarkhook (use \glsxtrRevertMarks to restore + original definitions). + + * Redefined \glsenableentrycount and added + \glsxtrifcounttrigger (support for "entrycount" + attribute). Added \GlsXtrEnableEntryCounting + + * Changed default behaviour of commands like \cgls + so they don't produce a warning if used without + \glsenableentrycount. Instead a warning is triggered + if \glsenableentrycount is used without setting + the "entrycount" attribute. + + * Added \cGLS, \cGLSpl + + * \acronymfont and \firstacronymfont redefined to + use \glsabbrvfont and \glsfirstabbrvfont (switched back + with \RestoreAcronyms). + + * New abbreviation styles: footnote-sc, postfootnote-sc, + long-short-sm, long-short-sm-desc, short-sm-long, + short-sm-long-desc, short-sm, short-sm-desc, short-desc, + long-sm, long-desc-sm, footnote-sm, postfootnote-sm, + long-short-em, long-short-em-desc, short-em-long, + short-em-long-desc, short-em, short-em-desc, short-desc, + long-em, long-desc-em, footnote-em, postfootnote-em. + + * New command \glsxtrsmfont for use in *-sm abbreviation + styles and \glsxtrsmsuffix for the default short plural + suffix. + + * New command \glsxtrscfont for use in *-sc abbreviation + styles and \glsxtrscsuffix for the default short plural + suffix. + +0.4 (2015-12-03): + + * The "abbreviations" option redefines \acronymtype if + the "acronym" option hasn't been used. + + * Redefinition of \newacronym sets the default type to + \acronymtype + + * Added \glsxtrifemptyglossary + + * \glsxtrnewsymbol and \glsxtrnewnumber adjusted so that the + name and label need to be supplied. + + * Fixed bug in \newterm + + * Changed \glsentryfmtshort etc to use \glsxtrshort etc + +0.3 (2015-12-03): + + * Added \glsxtrNoGlossaryWarning and "nomissingglstext" option. + + * Added \glsshortpltok and \glslongpltok. Abbreviation styles + now additionally set the first, firstplural and plural + keys even if the regular attribute isn't set to true. + (Allows the use of commands like \glsfirst, although + limitations apply.) + + * Added \glsxtrpostlinkAddDescOnFirstUse and + \glsxtrpostlinkAddSymbolOnFirstUse + + * \glsentryfmt also checks for the presence of the short key. + + * Added support for insertdots attribute. + + * Added \glsxtrpostlinkendsentence + + * Added \glsxtrshortpl etc. + + * Renamed \abbrvdefaultfont -> \glsabbrvdefaultfont + + * Added abbreviation plural shortcuts. + + * Added glossaries-accsupp support. + + * Bug fix in long-short-desc and short-long-desc abbreviation + styles + - argument of \glsxtrfullformat should be \the\glslabeltok + not \the\glsshorttok + + * Bug fix in *-sc abbreviation styles + +0.2 (2015-11-30): + + * Name changes: + + \glsxtrlongfont -> \glsfirstlongfont + \abbrvfont -> \glsabbrvfont + \firstabbrvfont -> \glsfirstabbrvfont + + * "short" abbreviation style uses "short (long)" + for the inline full style. + +0.1 (2015-11-22): Initial experimental release. diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/README b/Master/texmf-dist/doc/latex/glossaries-extra/README new file mode 100644 index 00000000000..0676db15789 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/README @@ -0,0 +1,22 @@ +LaTeX Package : glossaries-extra v1.0 + +Last Modified : 2016-01-24 + +Author : Nicola Talbot + +This package provides improvements and extra features to the +glossaries package. Some of the default glossaries.sty behaviour +is changed by glossaries-extra.sty. See the user manual +glossaries-extra-manual.pdf for further details. + +Requires the glossaries package (and, naturally, all packages +required by glossaries.sty). + +LICENCE + +This material is subject to the LaTeX Project Public License. +See http://www.ctan.org/license/lppl1.3 +for the details of that license. + +Author's home page: http://www.dickimaw-books.com/ + 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 Binary files differnew file mode 100644 index 00000000000..d4f61465667 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-code.pdf 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 new file mode 100644 index 00000000000..235453b63c0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.html @@ -0,0 +1,9067 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd--> +<html xmlns="http://www.w3.org/1999/xhtml" +> +<head><title></title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> +<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> +<!-- xhtml,fn-in,css-in,uni-html4,utf8 --> +<meta name="src" content="glossaries-extra-manual.tex" /> +<meta name="date" content="2016-01-24 17:10:00" /> + +<style type="text/css"> +<!-- + +/* start css.sty */ +.cmmi-10{font-style: italic;} +.ecrm-1728{font-size:170%;} +.ecrm-1200{font-size:120%;} +.ectt-1200{font-size:120%; font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ectt-1200{ font-family: monospace;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecbx-1000{ font-weight: bold;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ecss-1000{ font-family: sans-serif;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-0900{font-size:90%; font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecti-1000{ font-style: italic;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecsx-1000{ font-weight: bold;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +.ecit-1000{ font-style: italic; font-family: monospace;} +p.noindent { text-indent: 0em } +td p.noindent { text-indent: 0em; margin-top:0em; } +p.nopar { text-indent: 0em; } +p.indent{ text-indent: 1.5em } +@media print {div.crosslinks {visibility:hidden;}} +a img { border-top: 0; border-left: 0; border-right: 0; } +center { margin-top:1em; margin-bottom:1em; } +td center { margin-top:0em; margin-bottom:0em; } +.Canvas { position:relative; } +img.math{vertical-align:middle;} +li p.indent { text-indent: 0em } +li p:first-child{ margin-top:0em; } +li p:last-child, li div:last-child { margin-bottom:0.5em; } +li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +.enumerate1 {list-style-type:decimal;} +.enumerate2 {list-style-type:lower-alpha;} +.enumerate3 {list-style-type:lower-roman;} +.enumerate4 {list-style-type:upper-alpha;} +div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +.obeylines-h,.obeylines-v {white-space: nowrap; } +div.obeylines-v p { margin-top:0; margin-bottom:0; } +.overline{ text-decoration:overline; } +.overline img{ border-top: 1px solid black; } +td.displaylines {text-align:center; white-space:nowrap;} +.centerline {text-align:center;} +.rightline {text-align:right;} +div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.fbox {display:table} +div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.minipage{width:100%;} +div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +div.center div {text-align: left;} +div.flushright, div.flushright div.flushright {text-align: right;} +div.flushright div {text-align: left;} +div.flushleft {text-align: left;} +.underline{ text-decoration:underline; } +.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +.framebox-c {text-align:center;} +.framebox-l {text-align:left;} +.framebox-r {text-align:right;} +span.thank-mark{ vertical-align: super } +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +div.footnotes{border-top:solid 1px black; border-bottom:solid 1px black; padding-bottom:1ex; padding-top:0.5ex; margin-right:15%; margin-top:2ex; font-style:italic; font-size:85%;} +div.footnotes p{margin-top:0; margin-bottom:0; text-indent:0;} +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 1px; margin:0px; } +.tabbing-right {text-align:right;} +span.TEX {letter-spacing: -0.125em; } +span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +a span.TEX span.E {text-decoration: none; } +span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +span.LATEX span.TEX{ position:relative; left: -0.4em; } +div.float, div.figure {margin-left: auto; margin-right: auto;} +div.float img {text-align:center;} +div.figure img {text-align:center;} +.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +.marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +table.equation {width:100%;} +.equation td{text-align:center; } +td.equation { margin-top:1em; margin-bottom:1em; } +td.equation-label { width:5%; text-align:center; } +td.eqnarray4 { width:5%; white-space: normal; } +td.eqnarray2 { width:5%; } +table.eqnarray-star, table.eqnarray {width:100%;} +div.eqnarray{text-align:center;} +div.array {text-align:center;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.pmatrix img{vertical-align:middle;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.bar-css {text-decoration:overline;} +img.cdots{vertical-align:middle;} +.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +.chapterToc a, .chapterToc, .likechapterToc a, .likechapterToc, .appendixToc a, .appendixToc {line-height: 200%; font-weight:bold;} +.index-item, .index-subitem, .index-subsubitem {display:block} +div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +div.caption span.id{font-weight: bold; white-space: nowrap; } +h1.partHead{text-align: center} +p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +.subparagraphHead, .likesubparagraphHead { font-weight: bold;} +.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +.verse{white-space:nowrap; margin-left:2em} +div.maketitle {text-align:center;} +h2.titleHead{text-align:center;} +div.maketitle{ margin-bottom: 2em; } +div.author, div.date {text-align:center;} +div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +.quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } +h1.partHead{text-align: center} +.abstract p {margin-left:5%; margin-right:5%;} +div.abstract {width:100%;} +.alltt P { margin-bottom : 0em; margin-top : 0em; } +.alltt { margin-bottom : 1em; margin-top : 1em; } +.equation td{text-align:center; } +.equation-star td{text-align:center; } +table.equation-star { width:100%; } +table.equation { width:100%; } +table.align, table.alignat, table.xalignat, table.xxalignat, table.flalign {width:100%; margin-left:5%; white-space: nowrap;} +table.align-star, table.alignat-star, table.xalignat-star, table.flalign-star {margin-left:auto; margin-right:auto; white-space: nowrap;} +td.align-label { width:5%; text-align:center; } +td.align-odd { text-align:right; padding-right:0.3em;} +td.align-even { text-align:left; padding-right:0.6em;} +table.multline, table.multline-star {width:100%;} +td.gather {text-align:center; } +table.gather {width:100%;} +div.gather-star {text-align:center;} +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +div.longtable{text-align:center;} +.supertabular {text-align:center} +div.important { border : solid red; } +div.verbatim { font-family: monospace; white-space: nowrap; text-align:left; clear:both; padding-top: 2ex; padding-bottom: 2ex;} +span.HoLogo-XeLaTeX span.HoLogo-Xe{margin-right:-.13em;} +span.HoLogo-Xe span.HoLogo-e{position:relative;top:.5ex;left-margin:-.1em;} +span.HoLogo-LaTeX span.HoLogo-a{position:relative;top:-.5ex;margin-left:-.36em;margin-right:-.15em;font-size:85%;} +span.HoLogo-TeX span.HoLogo-e{position:relative;top:.5ex;margin-left:-.1667em;margin-right:-.125em;} +a span.HoLogo-TeX span.HoLogo-e{text-decoration:none;} +/* end css.sty */ + + +--> +</style> +</head><body +> +<!--l. 149--><p class="noindent" ><a + id="top"></a> +</p><!--l. 149--><p class="indent" > + + + +</p><!--l. 149--><p class="indent" > + + + +</p> +<div class="center" +> +<!--l. 149--><p class="noindent" > +</p><!--l. 149--><p class="noindent" ><span +class="ecrm-1728">glossaries-extra.sty v1.0: an extension to the</span> +<span +class="ecrm-1728">glossaries package</span> +</p> +<div class="tabular"> <table id="TBL-1" class="tabular" +cellspacing="0" cellpadding="0" +><colgroup id="TBL-1-1g"><col +id="TBL-1-1" /></colgroup><tr + style="vertical-align:baseline;" id="TBL-1-1-"><td style="white-space:nowrap; text-align:center;" id="TBL-1-1-1" +class="td11"> <span +class="ecrm-1200">Nicola L.C. Talbot </span></td> +</tr><tr +class="vspace" style="font-size:10.0pt"><td +> </td></tr><tr + style="vertical-align:baseline;" id="TBL-1-2-"><td style="white-space:nowrap; text-align:center;" id="TBL-1-2-1" +class="td11"> <span +class="ecrm-1200">Dickimaw Books </span></td> +</tr><tr + style="vertical-align:baseline;" id="TBL-1-3-"><td style="white-space:nowrap; text-align:center;" id="TBL-1-3-1" +class="td11"><a +href="http://www.dickimaw-books.com/" class="url" ><span +class="ectt-1200">http://www.dickimaw-books.com/</span></a></td></tr></table> +</div> +<!--l. 149--><p class="noindent" ><span +class="ecrm-1200">2016-01-24</span></p></div> + <div +class="abstract" +> +<!--l. 151--><p class="indent" > + + + +</p> +<div class="center" +> +<!--l. 151--><p class="noindent" > +</p><!--l. 151--><p class="noindent" ><span +class="ecbx-1000">Abstract</span></p></div> +<!--l. 152--><p class="noindent" >The <span +class="ecss-1000">glossaries-extra </span>package is an extension to the <span +class="ecss-1000">glossaries</span><a + id="dx1-2"></a> package, providing +additional features. Some of the features provided by this package are only available +with <span +class="ecss-1000">glossaries</span><a + id="dx1-3"></a> version 4.19 (or above). This document assumes familiarity with the +<span +class="ecss-1000">glossaries</span><a + id="dx1-4"></a> package. + + + +</p> + </div> +<!--l. 160--><p class="indent" > <div class="important" title="Important Note"> Since <span +class="ecss-1000">glossaries-extra </span>internally loads the <span +class="ecss-1000">glossaries</span><a + id="dx1-5"></a> package, you also need to have +<span +class="ecss-1000">glossaries</span><a + id="dx1-6"></a> installed and all the packages that <span +class="ecss-1000">glossaries</span><a + id="dx1-7"></a> depends on (including, but not +limited to, <span +class="ecss-1000">tracklang</span><a + id="dx1-8"></a>, <span +class="ecss-1000">mfirstuc</span><a + id="dx1-9"></a>, <span +class="ecss-1000">etoolbox</span><a + id="dx1-10"></a>, <span +class="ecss-1000">xkeyval</span><a + id="dx1-11"></a> (at least version dated 2006/11/18), +<span +class="ecss-1000">textcase</span><a + id="dx1-12"></a>, <span +class="ecss-1000">xfor</span><a + id="dx1-13"></a>, <span +class="ecss-1000">datatool-base</span><a + id="dx1-14"></a> and <span +class="ecss-1000">amsgen</span><a + id="dx1-15"></a>. These packages are all available in the +current <span class="TEX">T<span +class="E">E</span>X</span> Live and Mik<span class="TEX">T<span +class="E">E</span>X</span> distributions. If any of them are missing, please +update your <span class="TEX">T<span +class="E">E</span>X</span> distribution using your update manager. (For help on this see, for +example, <a +href="http://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution" >How do I update my <span class="TEX">T<span +class="E">E</span>X</span> distribution?</a> or <a +href="http://tex.stackexchange.com/questions/14925/updating-tex-on-linux" >Updating <span class="TEX">T<span +class="E">E</span>X</span> on Linux</a>.) +</div> +</p><!--l. 175--><p class="noindent" > + + + +</p> + <h2 class="likechapterHead"><a + id="x1-1000"></a>Contents</h2> <div class="tableofcontents"> + <span class="chapterToc" >1 <a +href="#sec:intro" id="QQ2-1-2">Introduction</a></span> +<br />  <span class="sectionToc" >1.1 <a +href="#sec:defaults" id="QQ2-1-3">Package Defaults</a></span> +<br />  <span class="sectionToc" >1.2 <a +href="#sec:pkgopts" id="QQ2-1-4">New or Modified Package Options</a></span> +<br />  <span class="sectionToc" >1.3 <a +href="#sec:modifications" id="QQ2-1-5">Modifications to Existing Commands or Styles</a></span> +<br />   <span class="subsectionToc" >1.3.1 <a +href="#sec:wrglossary" id="QQ2-1-6">Entry Indexing</a></span> +<br />   <span class="subsectionToc" >1.3.2 <a +href="#sec:entryfmtmods" id="QQ2-1-7">Entry Display Style Modifications</a></span> +<br />   <span class="subsectionToc" >1.3.3 <a +href="#sec:entrycountmods" id="QQ2-1-8">Entry Counting Modifications</a></span> +<br />   <span class="subsectionToc" >1.3.4 <a +href="#sec:nested" id="QQ2-1-9">Nested Links</a></span> +<br />   <span class="subsectionToc" >1.3.5 <a +href="#sec:acronymmods" id="QQ2-1-10">Acronym Style Modifications</a></span> +<br />   <span class="subsectionToc" >1.3.6 <a +href="#sec:glosstylemods" id="QQ2-1-11">Glossary Style Modifications</a></span> +<br /> <span class="chapterToc" >2 <a +href="#sec:abbreviations" id="QQ2-1-12">Abbreviations</a></span> +<br />  <span class="sectionToc" >2.1 <a +href="#sec:tagging" id="QQ2-1-13">Tagging Initials</a></span> +<br />  <span class="sectionToc" >2.2 <a +href="#sec:abbrstyle" id="QQ2-1-14">Abbreviation Styles</a></span> +<br />  <span class="sectionToc" >2.3 <a +href="#sec:abbrshortcuts" id="QQ2-1-15">Shortcut Commands</a></span> +<br />  <span class="sectionToc" >2.4 <a +href="#sec:predefabbrvstyles" id="QQ2-1-17">Predefined Abbreviation Styles</a></span> +<br />   <span class="subsectionToc" >2.4.1 <a +href="#sec:predefregabbrvstyles" id="QQ2-1-18">Predefined Abbreviation Styles that Set the Regular Attribute</a></span> +<br />   <span class="subsectionToc" >2.4.2 <a +href="#sec:predefnonregabbrvstyles" id="QQ2-1-19">Predefined Abbreviation Styles that Don’t Set the Regular Attribute</a></span> +<br />  <span class="sectionToc" >2.5 <a +href="#sec:newabbrvstyle" id="QQ2-1-20">Defining New Abbreviation Styles</a></span> +<br /> <span class="chapterToc" >3 <a +href="#sec:headtitle" id="QQ2-1-21">Entries in Sectioning Titles, Headers and Contents</a></span> +<br /> <span class="chapterToc" >4 <a +href="#sec:categories" id="QQ2-1-22">Categories</a></span> +<br /> <span class="chapterToc" >5 <a +href="#sec:entrycount" id="QQ2-1-23">Entry Counting</a></span> +<br /> <span class="chapterToc" >6 <a +href="#sec:autoindex" id="QQ2-1-24">Auto-Indexing</a></span> +<br /> <span class="chapterToc" >7 <a +href="#sec:onthefly" id="QQ2-1-25">On-the-Fly Document Definitions</a></span> +<br /> <span class="chapterToc" >8 <a +href="#sec:supplemental" id="QQ2-1-26">Supplemental Packages</a></span> +<br />  <span class="sectionToc" >8.1 <a +href="#sec:prefix" id="QQ2-1-27">Prefixes or Determiners</a></span> +<br />  <span class="sectionToc" >8.2 <a +href="#sec:accsupp" id="QQ2-1-28">Accessibility Support</a></span> +<br /> <span class="chapterToc" >9 <a +href="#sec:samples" id="QQ2-1-29">Sample Files</a></span> +<br /> <span class="chapterToc" >10 <a +href="#sec:lang" id="QQ2-1-30">Multi-Lingual Support</a></span> +<br /> <span class="chapterToc" > <a +href="#glossary">Glossary</a></span> + </div> + + + +<!--l. 180--><p class="indent" > <div class="chapter"><h2 class="chapterHead">1. <a + id="sec:intro"></a>Introduction</h2> +</p><!--l. 183--><p class="indent" > The <span +class="ecss-1000">glossaries</span><a + id="dx1-2001"></a> package is a flexible package, but it’s also a heavy-weight package +that uses a lot of resources. As package developer, I’m caught between those users +who complain about the drawbacks of a heavy-weight package with a large user +manual and those users who want more features (which necessarily adds to the +package weight and manual size). +</p><!--l. 190--><p class="indent" > The <span +class="ecss-1000">glossaries-extra </span>package is an attempt to provide a compromise for this +conflict. Version 4.21 of the <span +class="ecss-1000">glossaries </span>package is the last version to incorporate new +features. Future versions of <span +class="ecss-1000">glossaries </span>will just be bug fixes. New features will instead +be added to <span +class="ecss-1000">glossaries-extra</span>. This means that the base <span +class="ecss-1000">glossaries </span>package won’t +increase in terms of package loading time and allocation of resources, but those users +who do want extra features available will have more of a chance of getting their +feature requests accepted. +</p> +<!--l. 201--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">1.1 </span> <a + id="sec:defaults"></a>Package Defaults</h3> +<!--l. 204--><p class="noindent" >I’m not happy with some of the default settings assumed by the <span +class="ecss-1000">glossaries</span><a + id="dx1-3001"></a> package, +and, judging from code I’ve seen, other users also seem unhappy with them, as +certain package options are often used in questions posted on various sites. I can’t +change the default behaviour of <span +class="ecss-1000">glossaries </span>as it would break backward compatibility, +but since <span +class="ecss-1000">glossaries-extra </span>is a separate package, I have decided to implement some of +these commonly-used options by default. You can switch them back if they’re not +appropriate. +</p><!--l. 214--><p class="indent" > The new defaults are: </p> + <ul class="itemize1"> + <li class="itemize"><span +class="ecss-1000">toc=true</span><a + id="dx1-3002"></a> (add the glossaries to the table of contents). Use <span +class="ecss-1000">toc=false</span><a + id="dx1-3003"></a> to + switch this back off. + </li> + <li class="itemize"><span +class="ecss-1000">nopostdot=true</span><a + id="dx1-3004"></a> (suppress the terminating full stop after the description + in the glossary). Use <span +class="ecss-1000">nopostdot=false</span><a + id="dx1-3005"></a> to restore the terminating full stop + (period). + </li> + <li class="itemize"><span +class="ecss-1000">noredefwarn=true</span><a + id="dx1-3006"></a> (suppress warnings when the <span +class="ecss-1000">theglossary</span><a + id="dx1-3007"></a><a + id="dx1-3008"></a> environment + and <span +class="ectt-1000">\printglossary </span>are redefined while <span +class="ecss-1000">glossaries</span><a + id="dx1-3009"></a> is loading). To restore + the warnings, use <span +class="ecss-1000">noredefwarn=false</span><a + id="dx1-3010"></a>. Note that this won’t have any effect + if the <span +class="ecss-1000">glossaries</span><a + id="dx1-3011"></a> package has already been loaded before you use the + <span +class="ecss-1000">glossaries-extra </span>package. + </li> + <li class="itemize">If <span +class="ecss-1000">babel</span><a + id="dx1-3012"></a> has been loaded, the <span +class="ecss-1000">translate=babel</span><a + id="dx1-3013"></a> option is switched on. To + revert to using the <span +class="ecss-1000">translator</span><a + id="dx1-3014"></a> interface, use <span +class="ecss-1000">translate=true</span><a + id="dx1-3015"></a>. There is no + change to the default if <span +class="ecss-1000">babel</span><a + id="dx1-3016"></a> hasn’t been loaded. + </li></ul> + + + +<!--l. 238--><p class="indent" > Examples: + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-3018x1"> + + + + <div class="verbatim" id="verbatim-1"> + \documentclass{article} +  <br />\usepackage{glossaries-extra} +</div> + <!--l. 244--><p class="nopar" > This is like: + + + +</p> + <div class="verbatim" id="verbatim-2"> + \documentclass{article} +  <br />\usepackage[toc,nopostdot]{glossaries} +  <br />\usepackage{glossaries-extra} +</div> + <!--l. 250--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-3020x2"> + + + + <div class="verbatim" id="verbatim-3"> + \documentclass[british]{article} +  <br />\usepackage{babel} +  <br />\usepackage{glossaries-extra} +</div> + <!--l. 257--><p class="nopar" > This is like: + + + +</p> + <div class="verbatim" id="verbatim-4"> + \documentclass[british]{article} +  <br />\usepackage{babel} +  <br />\usepackage[toc,nopostdot,translate=babel]{glossaries} +  <br />\usepackage{glossaries-extra} +</div> + <!--l. 264--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-3022x3"> + + + + <div class="verbatim" id="verbatim-5"> + \documentclass{memoir} +  <br />\usepackage{glossaries-extra} +</div> + <!--l. 270--><p class="nopar" > This is like: + + + +</p> + <div class="verbatim" id="verbatim-6"> + \documentclass{memoir} +  <br />\usepackage[toc,nopostdot,noredefwarn]{glossaries} +  <br />\usepackage{glossaries-extra} +</div> + <!--l. 276--><p class="nopar" > <span +class="ecti-1000">However</span> + + + +</p> + <div class="verbatim" id="verbatim-7"> + \documentclass{memoir} +  <br />\usepackage{glossaries} +  <br />\usepackage{glossaries-extra} +</div> + <!--l. 282--><p class="nopar" > This is like: + + + +</p> + <div class="verbatim" id="verbatim-8"> + \documentclass{memoir} +  <br />\usepackage[toc,nopostdot]{glossaries} +  <br />\usepackage{glossaries-extra} +</div> + <!--l. 288--><p class="nopar" > Since by the time <span +class="ecss-1000">glossaries-extra </span>has been loaded, <span +class="ecss-1000">glossaries</span><a + id="dx1-3023"></a> has already + redefined <span +class="ecss-1000">memoir</span><a + id="dx1-3024"></a>’s glossary-related commands.</p></li></ol> +<!--l. 294--><p class="indent" > Another noticeable change is that by default <span +class="ectt-1000">\printglossary </span>will now display +information text in the document if the external glossary file doesn’t exist. This is +explanatory text to help new users who can’t work out what to do next to complete +the document build. Once the document is set up correctly and the external files have +been generated, this text will disappear. +</p><!--l. 301--><p class="indent" > This change is mostly likely to be noticed by users with one or more +redundant empty glossaries who ignore transcript messages, explicitly use +<a + id="dx1-3025"></a><a +href="#glo:makeindex"><span +class="ectt-1000">makeindex</span></a>/<a + id="dx1-3026"></a><a +href="#glo:xindy"><span +class="ectt-1000">xindy</span></a> on just the non-empty glossary (or glossaries) and use the iterative +<span +class="ectt-1000">\printglossaries</span><a + id="dx1-3027"></a> command instead of <span +class="ectt-1000">\printglossary</span><a + id="dx1-3028"></a>. For example, consider the +following: + + + +</p> + <div class="verbatim" id="verbatim-9"> +\documentclass{article} + <br />\usepackage[acronym]{glossaries} + <br />\makeglossaries + <br />\newacronym{laser}{laser}{light amplification by stimulated + <br />emission of radiation} + <br />\begin{document} + <br />\gls{laser} + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 325--><p class="nopar" > The above document will only display the list of acronyms at the place where +<span +class="ectt-1000">\printglossaries</span><a + id="dx1-3029"></a> occurs. However it will also attempt to input the <span +class="ectt-1000">.gls </span>file +associated with the <span +class="ectt-1000">main </span>glossary. +</p><!--l. 331--><p class="indent" > If you use <a + id="dx1-3030"></a><a +href="#glo:makeglossaries"><span +class="ectt-1000">makeglossaries</span></a>, you’ll get the warning message: + + + +</p> + <div class="verbatim" id="verbatim-10"> +Warning: File ’test.glo’ is empty. + <br />Have you used any entries defined in glossary ’main’? + <br />Remember to use package option ’nomain’ if you + <br />don’t want to use the main glossary. +</div> +<!--l. 337--><p class="nopar" > (where the original file is called <span +class="ectt-1000">test.tex</span>) but if you simply call <a + id="dx1-3031"></a><a +href="#glo:makeindex"><span +class="ectt-1000">makeindex</span></a> directly +to generate the <span +class="ectt-1000">.acr </span>file (without attempting to create the <span +class="ectt-1000">.gls </span>file) then the +transcript file will always contain the message: + + + +</p> + <div class="verbatim" id="verbatim-11"> +No file test.gls. +</div> +<!--l. 344--><p class="nopar" > This doesn’t occur with <a + id="dx1-3032"></a><a +href="#glo:makeglossaries"><span +class="ectt-1000">makeglossaries</span></a> as it will create the <span +class="ectt-1000">.gls </span>file containing +the single command <span +class="ectt-1000">\null</span>. +</p><!--l. 348--><p class="indent" > If you simply change from <span +class="ecss-1000">glossaries</span><a + id="dx1-3033"></a> to <span +class="ecss-1000">glossaries-extra </span>in this document, you’ll find +a change in the resulting PDF if you don’t use <a + id="dx1-3034"></a><span +class="ectt-1000">makeglossaries </span>and you only +generate the <span +class="ectt-1000">.acr </span>file with <a + id="dx1-3035"></a><a +href="#glo:makeindex"><span +class="ectt-1000">makeindex</span></a>. +</p><!--l. 353--><p class="indent" > The transcript file will still contain the message about the missing <span +class="ectt-1000">.gls</span>, but now +you’ll also see information in the actual PDF document. The simplest remedy is to +follow the advice inserted into the document at that point, which is to add the +<span +class="ecss-1000">nomain</span><a + id="dx1-3036"></a> package option: + + + +</p> + <div class="verbatim" id="verbatim-12"> +\documentclass{article} + <br />\usepackage[nomain,acronym]{glossaries-extra} + <br />\makeglossaries + <br />\newacronym{laser}{laser}{light amplification by stimulated + <br />emission of radiation} + <br />\begin{document} + <br />\gls{laser} + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 375--><p class="nopar" > +</p><!--l. 378--><p class="noindent" > +</p> +<!--l. 378--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">1.2 </span> <a + id="sec:pkgopts"></a>New or Modified Package Options</h3> +<!--l. 381--><p class="noindent" >If you haven’t already loaded <span +class="ecss-1000">glossaries</span><a + id="dx1-4001"></a>, you can use any of the package options +provided by <span +class="ecss-1000">glossaries</span><a + id="dx1-4002"></a> when you load <span +class="ecss-1000">glossaries-extra </span>and they will automatically be +passed to <span +class="ecss-1000">glossaries</span><a + id="dx1-4003"></a> (which <span +class="ecss-1000">glossaries-extra </span>will load). If <span +class="ecss-1000">glossaries</span><a + id="dx1-4004"></a> has already +been loaded, then those options will be passed to <span +class="ectt-1000">\setupglossaries</span><a + id="dx1-4005"></a>, but +remember that not all of the <span +class="ecss-1000">glossaries</span><a + id="dx1-4006"></a> package options may be used in that +command. +</p><!--l. 389--><p class="indent" > In addition to those options recognised by <span +class="ecss-1000">glossaries</span><a + id="dx1-4007"></a>, there are some new ones +provided by <span +class="ecss-1000">glossaries-extra</span>: + </p><dl class="description"><dt class="description"> +<span +class="ecsx-1000">accsupp</span><a + id="dx1-4008"></a> </dt><dd +class="description">Load the <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-4009"></a> package (if not already loaded). + <!--l. 396--><p class="noindent" >If you want to define styles that can interface with the accessibility support + provided by <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-4010"></a> use the <span +class="ectt-1000">\glsaccess</span>⟨<span +class="ecit-1000">xxx</span>⟩ type of commands + instead of <span +class="ectt-1000">\glsentry</span>⟨<span +class="ecit-1000">xxx</span>⟩ (for example, <span +class="ectt-1000">\glsaccesstext</span><a + id="dx1-4011"></a> instead of + <span +class="ectt-1000">\glsentrytext</span><a + id="dx1-4012"></a>). If <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-4013"></a> hasn’t been loaded those commands + are equivalent (for example, <span +class="ectt-1000">\glsaccesstext </span>just does <span +class="ectt-1000">\glsentrytext</span>) + but if it has been loaded, then the <span +class="ectt-1000">\glsaccess</span>⟨<span +class="ecit-1000">xxx</span>⟩ commands will add + the accessibility information. (See <a +href="#sec:accsupp">§8.2 </a><a +href="#sec:accsupp">Accessibility Support<!--tex4ht:ref: sec:accsupp --></a> for further + details.) + + + + </p><!--l. 406--><p class="noindent" >Note that the <span +class="ecss-1000">accsupp</span><a + id="dx1-4014"></a> option can only be used as a package option (not + through <span +class="ectt-1000">\glossariesextrasetup</span><a + id="dx1-4015"></a>) since the <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-4016"></a> package + must be loaded before <span +class="ecss-1000">glossaries-extra </span>if it’s required. + </p></dd><dt class="description"> +<span +class="ecsx-1000">undefaction</span><a + id="dx1-4017"></a> </dt><dd +class="description">This is a ⟨<span +class="ecti-1000">key</span>⟩=⟨<span +class="ecti-1000">value</span>⟩ option, which has two allowed values: <span +class="ecss-1000">warn</span> + and <span +class="ecss-1000">error</span>. This indicates what to do if an undefined glossary entry is + referenced. The default behaviour is <span +class="ecss-1000">undefaction=error</span><a + id="dx1-4018"></a>, which produces an + error message (the default for <span +class="ecss-1000">glossaries</span><a + id="dx1-4019"></a>). You can switch this to a warning + message (and ?? appearing in the text) with <span +class="ecss-1000">undefaction=warn</span><a + id="dx1-4020"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">docdef</span><a + id="dx1-4021"></a> </dt><dd +class="description">This is a boolean option, which indicates whether or not it’s permitted + for the command <span +class="ectt-1000">\newglossaryentry</span><a + id="dx1-4022"></a> to be used in the <span +class="ecss-1000">document</span><a + id="dx1-4023"></a><a + id="dx1-4024"></a> + environment. The <span +class="ecss-1000">glossaries</span><a + id="dx1-4025"></a> package allows <span +class="ectt-1000">\newglossaryentry </span>within the + <span +class="ecss-1000">document</span><a + id="dx1-4026"></a><a + id="dx1-4027"></a> environment (when used with <a + id="dx1-4028"></a><a +href="#glo:makeindex"><span +class="ectt-1000">makeindex</span></a> or <a + id="dx1-4029"></a><a +href="#glo:xindy"><span +class="ectt-1000">xindy</span></a>) but the user + manual warns against this usage. By default the <span +class="ecss-1000">glossaries-extra </span>package + <span +class="ecti-1000">prohibits </span>this, only allowing definitions within the preamble. If you are + really determined to define entries in the <span +class="ecss-1000">document</span><a + id="dx1-4030"></a><a + id="dx1-4031"></a> environment, despite + all the associated drawbacks, you can restore this with <span +class="ecss-1000">docdef=true</span><a + id="dx1-4032"></a>. Note + that this doesn’t change the prohibitions that the <span +class="ecss-1000">glossaries</span><a + id="dx1-4033"></a> package has + in certain circumstances (for example, when using “option 1”). See the + <span +class="ecss-1000">glossaries</span><a + id="dx1-4034"></a> user manual for further details. + <!--l. 435--><p class="noindent" >This option affects commands that internally use <span +class="ectt-1000">\newglossaryentry</span>, + such as <span +class="ectt-1000">\newabbreviation</span>, but not the “on-the-fly” commands described + in <a +href="#sec:onthefly">§7 </a><a +href="#sec:onthefly">On-the-Fly Document Definitions<!--tex4ht:ref: sec:onthefly --></a>. + </p></dd><dt class="description"> +<span +class="ecsx-1000">nomissingglstext</span><a + id="dx1-4035"></a> </dt><dd +class="description">This is a boolean option. If true, this will suppress the + warning text that will appear in the document if the external glossary files + haven’t been generated due to an incomplete document build. However, + it’s probably simpler just to fix whatever has caused the failure to build + the external file or files. + </dd><dt class="description"> +<span +class="ecsx-1000">indexcrossrefs</span><a + id="dx1-4036"></a> </dt><dd +class="description">This is a boolean option. If <span +class="ecss-1000">true</span>, this will automatically index + any cross-referenced entries that haven’t been marked as used at the end + of the document. Note that this necessarily adds to the overall document + build time, especially if you have defined a large number of entries, so this + defaults to <span +class="ecss-1000">false</span>, but it will be automatically switched on if you use the + <span +class="ecss-1000">see</span><a + id="dx1-4037"></a> key in any entries. To force it off, even if you use the <span +class="ecss-1000">see</span><a + id="dx1-4038"></a>, you need to + explicitly set <span +class="ecss-1000">indexcrossrefs</span><a + id="dx1-4039"></a> to <span +class="ecss-1000">false</span>. + </dd><dt class="description"> +<span +class="ecsx-1000">abbreviations</span><a + id="dx1-4040"></a> </dt><dd +class="description">This option has no value and can’t be cancelled. If used, it will + automatically create a new glossary with the label <span +class="ectt-1000">abbreviations </span>and + redefines <span +class="ectt-1000">\glsxtrabbrvtype </span>to this label. In addition, it defines a shortcut + command + + + + <!--l. 461--><p class="noindent" ><hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\printabbreviations</span><span +class="ectt-0900"> </span></span><a + id="dx1-4041"></a> <span +class="ectt-1000">\printabbreviations[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">] </span></div><hr> + </p><!--l. 463--><p class="noindent" > + which is equivalent to </p><div class="alltt"> + <div class="obeylines-v"> + <span +class="ectt-1000">\printglossary[type=\glsxtrabbrvtype,</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]</span> +</div> + </div> The title of the new glossary is given by + <!--l. 469--><p class="noindent" ><hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\abbreviationsname</span><span +class="ectt-0900"> </span></span><a + id="dx1-4042"></a> <span +class="ectt-1000">\abbreviationsname </span></div><hr> + </p><!--l. 471--><p class="noindent" > + If this command is already defined, it’s left unchanged. Otherwise it’s defined + to “Abbreviations” if <span +class="ecss-1000">babel</span><a + id="dx1-4043"></a> hasn’t been loaded or <span +class="ectt-1000">\acronymname </span>if + <span +class="ecss-1000">babel</span><a + id="dx1-4044"></a> has been loaded. However, if you’re using <span +class="ecss-1000">babel</span><a + id="dx1-4045"></a> it’s likely you + will need to change this. (See <a +href="#sec:lang">§10 </a><a +href="#sec:lang">Multi-Lingual Support<!--tex4ht:ref: sec:lang --></a> for further + details.) + </p><!--l. 478--><p class="noindent" ><div class="important" title="Important Note"> If you don’t use the <span +class="ecss-1000">abbreviations</span><a + id="dx1-4046"></a> package option, the <span +class="ectt-1000">\abbreviationsname</span> + command won’t be defined (unless it’s defined by an included language file). + </div> + </p><!--l. 482--><p class="noindent" > + </p><!--l. 484--><p class="noindent" >If the <span +class="ecss-1000">abbreviations</span><a + id="dx1-4047"></a> option is used and the <span +class="ecss-1000">acronym</span><a + id="dx1-4048"></a> option provided by the + <span +class="ecss-1000">glossaries</span><a + id="dx1-4049"></a> package hasn’t been used, then <span +class="ectt-1000">\acronymtype</span><a + id="dx1-4050"></a> will be set to + <span +class="ectt-1000">\glsxtrabbrvtype</span><a + id="dx1-4051"></a> so that acronyms defined with <span +class="ectt-1000">\newacronym</span><a + id="dx1-4052"></a> can be added + to the list of abbreviations. If you want acronyms in the <span +class="ectt-1000">main </span>glossary and + other abbreviations in the <span +class="ectt-1000">abbreviations </span>glossary then you will need to + redefine <span +class="ectt-1000">\acronymtype </span>to <span +class="ectt-1000">main</span>: + + + +</p> + <div class="verbatim" id="verbatim-13"> + \renewcommand*{\acronymtype}{main} +</div> + <!--l. 494--><p class="nopar" > + </p><!--l. 496--><p class="noindent" >Note that there are no analogous options to the <span +class="ecss-1000">glossaries</span><a + id="dx1-4053"></a> package’s <span +class="ecss-1000">acronymlists</span><a + id="dx1-4054"></a> + option (or associated commands) as the abbreviation mechanism is handled + differently with <span +class="ecss-1000">glossaries-extra</span>. + </p></dd><dt class="description"> +<span +class="ecsx-1000">symbols</span><a + id="dx1-4055"></a> </dt><dd +class="description">This is passed to <span +class="ecss-1000">glossaries</span><a + id="dx1-4056"></a> but will additionally define + <!--l. 503--><p class="noindent" ><hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrnewsymbol</span><span +class="ectt-0900"> </span></span><a + id="dx1-4057"></a> <span +class="ectt-1000">\glsxtrnewsymbol[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">symbol</span>⟩<span +class="ectt-1000">}</span> + </div><hr> + </p><!--l. 505--><p class="noindent" > + which is equivalent to </p><div class="alltt"> + <div class="obeylines-v"> + <span +class="ectt-1000">\newglossaryentry{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{name={</span>⟨<span +class="ecit-1000">symbol</span>⟩<span +class="ectt-1000">},</span> + <br /><span +class="ectt-1000"> sort={</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">},type=symbols,category=symbol,</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">}</span> +</div> + </div> Note that the <span +class="ecss-1000">sort</span><a + id="dx1-4058"></a> key is set to the ⟨<span +class="ecti-1000">label</span>⟩ not the ⟨<span +class="ecti-1000">symbol</span>⟩ as the symbol will + likely contain commands. + </dd><dt class="description"> +<span +class="ecsx-1000">numbers</span><a + id="dx1-4059"></a> </dt><dd +class="description">This is passed to <span +class="ecss-1000">glossaries</span><a + id="dx1-4060"></a> but will additionally define + <!--l. 516--><p class="noindent" ><hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrnewnumber</span><span +class="ectt-0900"> </span></span><a + id="dx1-4061"></a> <span +class="ectt-1000">\glsxtrnewnumber[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">number</span>⟩<span +class="ectt-1000">} </span></div><hr> + </p><!--l. 518--><p class="noindent" > + which is equivalent to </p><div class="alltt"> + <div class="obeylines-v"> + <span +class="ectt-1000">\newglossaryentry{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{name={</span>⟨<span +class="ecit-1000">number</span>⟩<span +class="ectt-1000">},</span> + <br /><span +class="ectt-1000"> sort={</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">},type=numbers,category=number,</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">}</span> +</div> + </div> + </dd><dt class="description"> +<span +class="ecsx-1000">shortcuts</span><a + id="dx1-4062"></a> </dt><dd +class="description">Unlike the <span +class="ecss-1000">glossaries</span><a + id="dx1-4063"></a> package option of the same name, this option isn’t + boolean but has multiple values: + + + + <ul class="itemize1"> + <li class="itemize"><span +class="ecss-1000">shortcuts=acronyms</span><a + id="dx1-4064"></a> (or <span +class="ecss-1000">shortcuts=acro</span><a + id="dx1-4065"></a>): set the shortcuts provided + by the <span +class="ecss-1000">glossaries</span><a + id="dx1-4066"></a> package for acronyms (such as <span +class="ectt-1000">\ac</span>). + </li> + <li class="itemize"><span +class="ecss-1000">shortcuts=abbreviations</span><a + id="dx1-4067"></a> (or <span +class="ecss-1000">shortcuts=abbr</span><a + id="dx1-4068"></a>): + set the abbreviation shortcuts provided by <span +class="ecss-1000">glossaries-extra</span>. (See <a +href="#sec:abbrshortcuts">§2.3 + </a><a +href="#sec:abbrshortcuts">Shortcut Commands<!--tex4ht:ref: sec:abbrshortcuts --></a>.) These settings don’t switch on the acronym + shortcuts provided by the <span +class="ecss-1000">glossaries</span><a + id="dx1-4069"></a> package. + </li> + <li class="itemize"><span +class="ecss-1000">shortcuts=other</span><a + id="dx1-4070"></a>: set the “other” shortcut commands, but not the shortcut + commands for abbreviations or the acronym shortcuts provided by + <span +class="ecss-1000">glossaries</span><a + id="dx1-4071"></a>. The “other” shortcuts are: + <ul class="itemize2"> + <li class="itemize"><span +class="ectt-1000">\newentry</span><a + id="dx1-4072"></a> equivalent to <span +class="ectt-1000">\newglossaryentry</span><a + id="dx1-4073"></a> + </li> + <li class="itemize"><span +class="ectt-1000">\newsym</span><a + id="dx1-4074"></a> equivalent to <span +class="ectt-1000">\glsxtrnewsymbol</span><a + id="dx1-4075"></a> (see the <span +class="ecss-1000">symbols</span><a + id="dx1-4076"></a> + option). + </li> + <li class="itemize"><span +class="ectt-1000">\newnum</span><a + id="dx1-4077"></a> equivalent to <span +class="ectt-1000">\glsxtrnewnumber</span><a + id="dx1-4078"></a> (see the <span +class="ecss-1000">numbers</span><a + id="dx1-4079"></a> + option).</li></ul> + </li> + <li class="itemize"><span +class="ecss-1000">shortcuts=all</span><a + id="dx1-4080"></a> (or <span +class="ecss-1000">shortcuts=true</span><a + id="dx1-4081"></a>): define all the shortcut commands. + </li> + <li class="itemize"><span +class="ecss-1000">shortcuts=none</span><a + id="dx1-4082"></a> (or <span +class="ecss-1000">shortcuts=false</span><a + id="dx1-4083"></a>): don’t define any of the shortcut + commands (default).</li></ul> + <!--l. 557--><p class="noindent" >Note that multiple invocations of the <span +class="ecss-1000">shortcuts</span><a + id="dx1-4084"></a> option <span +class="ecti-1000">within the same option</span> + <span +class="ecti-1000">list </span>will override each other.</p></dd></dl> +<!--l. 561--><p class="indent" > After the <span +class="ecss-1000">glossaries-extra </span>package has been loaded, you can set available options +using +</p><!--l. 563--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glossariesextrasetup</span><span +class="ectt-0900"> </span></span><a + id="dx1-4085"></a> <span +class="ectt-1000">\glossariesextrasetup{</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 565--><p class="noindent" > +The <span +class="ecss-1000">abbreviations</span><a + id="dx1-4086"></a> option may only be used in the preamble. +</p><!--l. 568--><p class="noindent" > +</p> +<!--l. 568--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">1.3 </span> <a + id="sec:modifications"></a>Modifications to Existing Commands or Styles</h3> +<!--l. 571--><p class="noindent" >The commands used by <span +class="ecss-1000">glossaries</span><a + id="dx1-5001"></a> to automatically produce an error if an entry is +undefined (such as <span +class="ectt-1000">\glsdoifexists</span><a + id="dx1-5002"></a>) are changed to take the <span +class="ecss-1000">undefaction</span><a + id="dx1-5003"></a> option into +account. +</p><!--l. 575--><p class="indent" > The <span +class="ectt-1000">\newglossaryentry </span>command has a new key called <span +class="ecss-1000">category</span><a + id="dx1-5004"></a>, which sets the +category label for the given entry. By default this is <span +class="ectt-1000">general</span>. See <a +href="#sec:categories">§4 </a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a> for +further information about categories. + + + +</p><!--l. 581--><p class="indent" > The <span +class="ectt-1000">\newterm</span><a + id="dx1-5005"></a> command (defined through the <span +class="ecss-1000">index</span><a + id="dx1-5006"></a> package option) is modified +so that the category defaults to <span +class="ecss-1000">index</span><a + id="dx1-5007"></a>. The <span +class="ectt-1000">\newacronym</span><a + id="dx1-5008"></a> command is modified +to use the new abbreviation interface provided by <span +class="ecss-1000">glossaries-extra</span>. (See <a +href="#sec:abbreviations">§2 +</a><a +href="#sec:abbreviations">Abbreviations<!--tex4ht:ref: sec:abbreviations --></a>.) +</p><!--l. 587--><p class="noindent" > +</p> +<!--l. 587--><p class="noindent" ><a +href="#top">Top</a><h4 class="subsectionHead"></p><h4 class="subsectionHead"><span class="titlemark">1.3.1 </span> <a + id="sec:wrglossary"></a>Entry Indexing</h4> +<!--l. 590--><p class="noindent" >The <span +class="ecss-1000">glossaries-extra </span>package provides an extra key for commands like <span +class="ectt-1000">\gls </span>and +<span +class="ectt-1000">\glstext </span>called <span +class="ecss-1000">noindex</span><a + id="dx1-6001"></a>. This is a boolean key. If true, this suppresses the indexing. +(That is, it prevents <span +class="ectt-1000">\gls </span>or whatever from adding a line to the external glossary +file.) This is more useful than the <span +class="ecss-1000">indexonlyfirst</span><a + id="dx1-6002"></a> package option provided by <span +class="ecss-1000">glossaries</span><a + id="dx1-6003"></a>, +as the <a + id="dx1-6004"></a><a +href="#glo:firstuse">first use</a> might not be the most pertinent use. (If you want to apply +<span +class="ecss-1000">indexonlyfirst</span><a + id="dx1-6005"></a> to selected entries, rather than all of them, you can use the <span +class="ecss-1000">indexonlyfirst</span><a + id="dx1-6006"></a> +attribute, see <a +href="#sec:categories">§4 </a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a> for further details.) Note that the <span +class="ecss-1000">noindex</span><a + id="dx1-6007"></a> key isn’t +available for <span +class="ectt-1000">\glsadd</span><a + id="dx1-6008"></a> (and <span +class="ectt-1000">\glsaddall</span><a + id="dx1-6009"></a>) since the whole purpose of that command is +to index an entry. +</p><!--l. 605--><p class="indent" > There is a new hook that’s used each time indexing information is written to the +external glossary files: +</p><!--l. 607--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrdowrglossaryhook</span><span +class="ectt-0900"> </span></span><a + id="dx1-6010"></a> <span +class="ectt-1000">\glsxtrdowrglossaryhook{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 609--><p class="noindent" > +where ⟨<span +class="ecti-1000">label</span>⟩ is the entry’s label. This does nothing by default but may be redefined. +(See, for example, the accompanying sample file <span +class="ectt-1000">sample-indexhook.tex</span>, which uses +this hook to determine which entries haven’t been indexed.) +</p><!--l. 616--><p class="indent" > The value of the <span +class="ecss-1000">see</span><a + id="dx1-6011"></a> key is now saved as a field. This isn’t the case with <span +class="ecss-1000">glossaries</span><a + id="dx1-6012"></a>, +where the <span +class="ecss-1000">see</span><a + id="dx1-6013"></a> attribute is simply used to directly write a line to the corresponding +glossary file and is then discarded. This is why the <span +class="ecss-1000">see</span><a + id="dx1-6014"></a> key can’t be used +before <span +class="ectt-1000">\makeglossaries</span><a + id="dx1-6015"></a> (since the file hasn’t been opened yet). It’s also the +reason why the <span +class="ecss-1000">see</span><a + id="dx1-6016"></a> key doesn’t have any effect when used in entries that +are defined in the <span +class="ecss-1000">document</span><a + id="dx1-6017"></a><a + id="dx1-6018"></a> environment. Since the value isn’t saved, it’s +not available when the <span +class="ectt-1000">.glsdefs </span>file is created at the end of the document +and so isn’t available at the start of the <span +class="ecss-1000">document</span><a + id="dx1-6019"></a><a + id="dx1-6020"></a> environment on the next +run. +</p><!--l. 629--><p class="indent" > This modification allows <span +class="ecss-1000">glossaries-extra </span>to provide +</p><!--l. 630--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtraddallcrossrefs</span><span +class="ectt-0900"> </span></span><a + id="dx1-6021"></a> <span +class="ectt-1000">\glsxtraddallcrossrefs </span></div><hr> +</p><!--l. 632--><p class="noindent" > +which is used at the end of the document to automatically add any unused +cross-references unless the package option <span +class="ecss-1000">indexcrossrefs</span><a + id="dx1-6022"></a> was set to false. +</p><!--l. 637--><p class="indent" > As a by-product of this enhancement, the <span +class="ecss-1000">see</span><a + id="dx1-6023"></a> key will now work for entries +defined in the document environment, but it’s still best to define entries in the +preamble, and the <span +class="ecss-1000">see</span><a + id="dx1-6024"></a> key still can’t work before the file has been opened by +<span +class="ectt-1000">\makeglossaries</span>. + + + +</p><!--l. 643--><p class="noindent" > +</p> +<!--l. 643--><p class="noindent" ><a +href="#top">Top</a><h4 class="subsectionHead"></p><h4 class="subsectionHead"><span class="titlemark">1.3.2 </span> <a + id="sec:entryfmtmods"></a>Entry Display Style Modifications</h4> +<!--l. 646--><p class="noindent" >Recall from the <span +class="ecss-1000">glossaries</span><a + id="dx1-7001"></a> package that commands such as <span +class="ectt-1000">\gls </span>display text at +that point in the document (optionally with a hyperlink to the relevant +line in the glossary). This text is referred to as the “<a + id="dx1-7002"></a><a +href="#glo:linktext">link-text</a>” regardless of +whether or not it actually has a hyperlink. The actual text and the way +it’s displayed depends on the command used (such as <span +class="ectt-1000">\gls</span>) and the entry +format. +</p><!--l. 653--><p class="indent" > The default entry format (<span +class="ectt-1000">\glsentryfmt</span><a + id="dx1-7003"></a>) used in the <a + id="dx1-7004"></a>link-text by commands like +<span +class="ectt-1000">\gls </span>(but not commands like <span +class="ectt-1000">\glstext</span>) is changed by <span +class="ecss-1000">glossaries-extra </span>to test for +regular entries, which are determined as follows: +</p> + <ul class="itemize1"> + <li class="itemize">If an entry is assigned to a category that has the <span +class="ecss-1000">regular</span><a + id="dx1-7005"></a> attribute set (see <a +href="#sec:categories">§4 + </a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a>), the entry is considered a regular entry, even if it has a value + for the <span +class="ecss-1000">short</span><a + id="dx1-7006"></a> key. In this case <span +class="ectt-1000">\glsentryfmt </span>uses <span +class="ectt-1000">\glsgenentryfmt</span><a + id="dx1-7007"></a> + (provided by <span +class="ecss-1000">glossaries</span><a + id="dx1-7008"></a>), which uses the <span +class="ecss-1000">first</span><a + id="dx1-7009"></a> (or <span +class="ecss-1000">firstplural</span><a + id="dx1-7010"></a>) value on <a + id="dx1-7011"></a><a +href="#glo:firstuse">first + use</a> and the <span +class="ecss-1000">text</span><a + id="dx1-7012"></a> (or <span +class="ecss-1000">plural</span><a + id="dx1-7013"></a>) value on subsequent use. + </li> + <li class="itemize">An entry that doesn’t have a value for the <span +class="ecss-1000">short</span><a + id="dx1-7014"></a> key is assumed to be + a regular entry, even if the <span +class="ecss-1000">regular</span><a + id="dx1-7015"></a> attribute isn’t set to “true” (since it can’t + be an abbreviation without the short form). In this case <span +class="ectt-1000">\glsentryfmt</span> + uses <span +class="ectt-1000">\glsgenentryfmt</span><a + id="dx1-7016"></a>. + </li> + <li class="itemize">If an entry does has a value for the <span +class="ecss-1000">short</span><a + id="dx1-7017"></a> key and hasn’t been marked as + a regular entry through the <span +class="ecss-1000">regular</span><a + id="dx1-7018"></a> attribute, it’s not considered a regular + entry. In this case <span +class="ectt-1000">\glsentryfmt </span>uses <span +class="ectt-1000">\glsxtrgenabbrvfmt</span><a + id="dx1-7019"></a> (defined by + <span +class="ecss-1000">glossaries-extra</span>) which is governed by the abbreviation style (see <a +href="#sec:abbrstyle">§2.2 + </a><a +href="#sec:abbrstyle">Abbreviation Styles<!--tex4ht:ref: sec:abbrstyle --></a>). + </li></ul> +<!--l. 683--><p class="indent" > 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. +</p><!--l. 687--><p class="indent" > The <span +class="ectt-1000">\glspostlinkhook </span>provided by the <span +class="ecss-1000">glossaries</span><a + id="dx1-7020"></a> package to insert information +after the <a + id="dx1-7021"></a>link-text produced by commands like <span +class="ectt-1000">\gls </span>and <span +class="ectt-1000">\glstext </span>is redefined +to +</p><!--l. 690--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrpostlinkhook</span><span +class="ectt-0900"> </span></span><a + id="dx1-7022"></a> <span +class="ectt-1000">\glsxtrpostlinkhook </span></div><hr> +</p><!--l. 692--><p class="noindent" > +This command will discard a following full stop (period) if the <span +class="ecss-1000">discardperiod</span><a + id="dx1-7023"></a> attribute +is set to “true” for the current entry’s category. It will also do +</p><!--l. 696--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrpostlink</span><span +class="ectt-0900"> </span></span><a + id="dx1-7024"></a> <span +class="ectt-1000">\glsxtrpostlink </span></div><hr> + + + +</p><!--l. 698--><p class="noindent" > +if a full stop hasn’t be discarded and +</p><!--l. 700--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrpostlinkendsentence</span><span +class="ectt-0900"> </span></span><a + id="dx1-7025"></a> <span +class="ectt-1000">\glsxtrpostlinkendsentence </span></div><hr> +</p><!--l. 702--><p class="noindent" > +if a full stop has been discarded. +</p><!--l. 705--><p class="indent" > By default <span +class="ectt-1000">\glsxtrpostlink </span>just does <span +class="ectt-1000">\glsxtrpostlink</span>⟨<span +class="ecti-1000">category</span>⟩<a + id="dx1-7026"></a> if +it exists, where ⟨<span +class="ecti-1000">category</span>⟩ is the category label for the current entry. (For +example, for the <span +class="ecss-1000">general</span><a + id="dx1-7027"></a> category, <span +class="ectt-1000">\glsxtrpostlinkgeneral </span>if it has been +defined.) +</p><!--l. 710--><p class="indent" > The sentence-ending hook is slightly more complicated. If the command +<span +class="ectt-1000">\glsxtrpostlink</span>⟨<span +class="ecti-1000">category</span>⟩<a + id="dx1-7028"></a> is defined the hook will do that and then insert a +full stop with the space factor adjusted to match the end of sentence. If +<span +class="ectt-1000">\glsxtrpostlink</span>⟨<span +class="ecti-1000">category</span>⟩<a + id="dx1-7029"></a> hasn’t been defined, the space factor is adjusted to match +the end of sentence. This means that if you have, for example, an entry that ends +with a full stop, a redundant following full stop will be discarded and the space factor +adjusted (in case the entry is in uppercase) unless the entry is followed by additional +material, in which case the following full stop is no longer redundant and needs to be +reinserted. +</p><!--l. 722--><p class="indent" > There are some convenient commands you might want to use when customizing +the post-<a + id="dx1-7030"></a><a +href="#glo:linktext">link-text</a> category hooks: +</p><!--l. 724--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrpostlinkAddDescOnFirstUse</span><span +class="ectt-0900"> </span></span><a + id="dx1-7031"></a> <span +class="ectt-1000">\glsxtrpostlinkAddDescOnFirstUse</span> +</div><hr> +</p><!--l. 726--><p class="noindent" > +This will add the description in parentheses on <a + id="dx1-7032"></a><a +href="#glo:firstuse">first use</a>. +</p><!--l. 729--><p class="indent" > For example, suppose you want to append the description in parentheses on <a + id="dx1-7033"></a>first +use for entries in the <span +class="ecss-1000">symbol</span><a + id="dx1-7034"></a> category: + + + +</p> + <div class="verbatim" id="verbatim-14"> +\newcommand*{\glsxtrpostlinksymbol}{% + <br />  \glsxtrpostlinkAddDescOnFirstUse + <br />} +</div> +<!--l. 736--><p class="nopar" > +</p><!--l. 738--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrpostlinkAddSymbolOnFirstUse</span><span +class="ectt-0900"> </span></span><a + id="dx1-7035"></a> <span +class="ectt-1000">\glsxtrpostlinkAddSymbolOnFirstUse</span> +</div><hr> +</p><!--l. 740--><p class="noindent" > +This will append the symbol (if defined) in parentheses on <a + id="dx1-7036"></a><a +href="#glo:firstuse">first use</a>. +</p><!--l. 744--><p class="indent" > If you want to provide your own custom format be aware that you can’t use +<span +class="ectt-1000">\ifglsused</span><a + id="dx1-7037"></a> within the post-<a + id="dx1-7038"></a><a +href="#glo:linktext">link-text</a> hook as by this point the <a + id="dx1-7039"></a><a +href="#glo:firstuseflag">first use flag</a> will have +been unset. Instead you can use +</p><!--l. 747--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrifwasfirstuse</span><span +class="ectt-0900"> </span></span><a + id="dx1-7040"></a> <span +class="ectt-1000">\glsxtrifwasfirstuse{</span>⟨<span +class="ecit-1000">true</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">false</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 749--><p class="noindent" > +This will do ⟨<span +class="ecti-1000">true</span>⟩ if the last used entry was the <a + id="dx1-7041"></a>first use for that entry, otherwise it +will do ⟨<span +class="ecti-1000">false</span>⟩. (Requires at least <span +class="ecss-1000">glossaries</span><a + id="dx1-7042"></a> v4.19 to work properly.) This command is +locally set by commands like <span +class="ectt-1000">\gls</span>, so don’t rely on it outside of the post-<a + id="dx1-7043"></a>link-text +hook. +</p><!--l. 757--><p class="indent" > <div class="important" title="Important Note"> Note that commands like <span +class="ectt-1000">\glsfirst</span><a + id="dx1-7044"></a> and <span +class="ectt-1000">\glsxtrfull</span><a + id="dx1-7045"></a> fake <a + id="dx1-7046"></a>first use for the +benefit of the post-<a + id="dx1-7047"></a>link-text hooks by setting <span +class="ectt-1000">\glsxtrifwasfirstuse </span>to +<span +class="ectt-1000">\@firstoftwo</span>. (Although, depending on the styles in use, they may not exactly +match the text produced by <span +class="ectt-1000">\gls</span><a + id="dx1-7048"></a>-like commands on <a + id="dx1-7049"></a>first use.) </div> +</p><!--l. 763--><p class="noindent" > +</p><!--l. 765--><p class="indent" > For example, if you want to place the description in a footnote after the <a + id="dx1-7050"></a>link-text +on <a + id="dx1-7051"></a>first use for the <span +class="ecss-1000">general</span><a + id="dx1-7052"></a> category: + + + +</p> + <div class="verbatim" id="verbatim-15"> +\newcommand*{\glsxtrpostlinkgeneral}{% + <br />  \glsxtrifwasfirstuse{\footnote{\glsentrydesc{\glslabel}}}{}% + <br />} +</div> +<!--l. 771--><p class="nopar" > +</p><!--l. 773--><p class="indent" > The <span +class="ecss-1000">postfootnote</span><a + id="dx1-7053"></a> abbreviation style uses the post-<a + id="dx1-7054"></a><a +href="#glo:linktext">link-text</a> hook to place the +footnote after trailing punctuation characters. +</p><!--l. 777--><p class="indent" > You can set the default options used by <span +class="ectt-1000">\glslink</span><a + id="dx1-7055"></a>, <span +class="ectt-1000">\gls</span><a + id="dx1-7056"></a> etc with: +</p><!--l. 779--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrSetDefaultGlsOpts</span><span +class="ectt-0900"> </span></span><a + id="dx1-7057"></a> <span +class="ectt-1000">\GlsXtrSetDefaultGlsOpts{</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 781--><p class="noindent" > +For example, if you mostly don’t want to index entries then you can do: + + + +</p> + <div class="verbatim" id="verbatim-16"> +\GlsXtrSetDefaultGlsOpts{noindex} +</div> +<!--l. 786--><p class="nopar" > and then use, for example, <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls[noindex=false]{sample}</span></span></span> when you actually want +the location added to the <a + id="dx1-7058"></a><a +href="#glo:numberlist">number list</a>. These defaults may be overridden by other +settings (such as category attributes) in addition to any settings passed in the option +argument of commands like <span +class="ectt-1000">\glslink </span>and <span +class="ectt-1000">\gls</span>. +</p><!--l. 793--><p class="indent" > Note that if you don’t want <span +class="ecti-1000">any </span>indexing, just omit <span +class="ectt-1000">\makeglossaries </span>and +<span +class="ectt-1000">\printglossaries </span>(or analogous commands). +</p><!--l. 797--><p class="indent" > Commands like <span +class="ectt-1000">\gls</span><a + id="dx1-7059"></a> have star (<span +class="ectt-1000">*</span>) and plus (<span +class="ectt-1000">+</span>) modifiers as a short cut for +<span +class="ectt-1000">hyper=false </span>and <span +class="ectt-1000">hyper=true</span>. The <span +class="ecss-1000">glossaries-extra </span>package provides a way to add a +third modifier, if required, using +</p><!--l. 801--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrSetAltModifier</span><span +class="ectt-0900"> </span></span><a + id="dx1-7060"></a> <span +class="ectt-1000">\GlsXtrSetAltModifier{</span>⟨<span +class="ecit-1000">char</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 803--><p class="noindent" > +where ⟨<span +class="ecti-1000">char</span>⟩ is the character used as the modifier and ⟨<span +class="ecti-1000">options</span>⟩ is the default set of +options (which may be overridden). Note that ⟨<span +class="ecti-1000">char</span>⟩ must be a single character (not a +UTF-8 character, unless you are using <span class="HoLogo-XeLaTeX"><span class="HoLogo-Xe">X<span class="HoLogo-e">Ǝ</span></span><span class="HoLogo-LaTeX">L<span class="HoLogo-a">A</span><span class="HoLogo-TeX">T<span class="HoLogo-e">E</span>X</span></span></span> or Lua<span class="HoLogo-LaTeX">L<span class="HoLogo-a">A</span><span class="HoLogo-TeX">T<span class="HoLogo-e">E</span>X</span></span>). +</p><!--l. 810--><p class="indent" > <div class="important" title="Important Note"> When choosing the character ⟨<span +class="ecti-1000">char</span>⟩ take care of any changes in category code. +</div> +</p><!--l. 813--><p class="noindent" > +</p><!--l. 815--><p class="indent" > Example: + + + +</p> + <div class="verbatim" id="verbatim-17"> +\GlsXtrSetAltModifier{!}{noindex} +</div> +<!--l. 818--><p class="nopar" > This means that <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls!{sample}</span></span></span> will be equivalent to <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls[noindex]{sample}</span></span></span>. It’s +not possible to mix modifiers. For example, if you want to do + + + +</p> + <div class="verbatim" id="verbatim-18"> +\gls[noindex,hyper=false]{sample} +</div> +<!--l. 824--><p class="nopar" > you can use <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls*[noindex]{sample}</span></span></span> or <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls![hyper=false]{sample}</span></span></span> but you +can’t combine the <span +class="ectt-1000">* </span>and <span +class="ectt-1000">! </span>modifiers. +</p><!--l. 829--><p class="noindent" > +</p> +<!--l. 829--><p class="noindent" ><a +href="#top">Top</a><h4 class="subsectionHead"></p><h4 class="subsectionHead"><span class="titlemark">1.3.3 </span> <a + id="sec:entrycountmods"></a>Entry Counting Modifications</h4> +<!--l. 832--><p class="noindent" >The <span +class="ectt-1000">\glsenableentrycount</span><a + id="dx1-8001"></a> command is modified to allow for the <span +class="ecss-1000">entrycount</span><a + id="dx1-8002"></a> +attribute. This means that you not only need to enable entry counting with +<span +class="ectt-1000">\glsenableentrycount</span>, but you also need to set the appropriate attribute (see <a +href="#sec:categories">§4 +</a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a>). +</p><!--l. 838--><p class="indent" > For example, instead of just doing: + + + +</p> + <div class="verbatim" id="verbatim-19"> +\glsenableentrycount +</div> +<!--l. 841--><p class="nopar" > you now need to do: + + + +</p> + <div class="verbatim" id="verbatim-20"> +\glsenableentrycount + <br />\glssetcategoryattribute{abbreviation}{entrycount}{1} +</div> +<!--l. 846--><p class="nopar" > This will enable the entry counting for entries in the <span +class="ecss-1000">abbreviation</span><a + id="dx1-8003"></a> category, but any +entries assigned to other categories will be unchanged. +</p><!--l. 851--><p class="indent" > Further information about entry counting, including the new per-unit feature, is +described in <a +href="#sec:entrycount">§5 </a><a +href="#sec:entrycount">Entry Counting<!--tex4ht:ref: sec:entrycount --></a>. +</p><!--l. 854--><p class="noindent" > +</p> +<!--l. 854--><p class="noindent" ><a +href="#top">Top</a><h4 class="subsectionHead"></p><h4 class="subsectionHead"><span class="titlemark">1.3.4 </span> <a + id="sec:nested"></a>Nested Links</h4> +<!--l. 857--><p class="noindent" >Complications arise when you use <span +class="ectt-1000">\gls</span><a + id="dx1-9001"></a> in the value of the <span +class="ecss-1000">name</span><a + id="dx1-9002"></a> field (or <span +class="ecss-1000">text</span><a + id="dx1-9003"></a> or <span +class="ecss-1000">first</span><a + id="dx1-9004"></a> +fields, if set). This tends to occur with abbreviations that extend other abbreviations. +For example, SHTML is an abbreviation for SSI enabled HTML, where SSI is an +abbreviation for Server Side Includes and HTML is an abbreviation for Hypertext +Markup Language. +</p><!--l. 865--><p class="indent" > Things can go wrong if we try the following with the <span +class="ecss-1000">glossaries</span><a + id="dx1-9005"></a> package: + + + +</p> + <div class="verbatim" id="verbatim-21"> +\newacronym{ssi}{SSI}{Server Side Includes} + <br />\newacronym{html}{HTML}{Hypertext Markup Language} + <br />\newacronym{shtml}{S\gls{html}}{\gls{ssi} enabled \gls{html}} +</div> +<!--l. 871--><p class="nopar" > +</p><!--l. 873--><p class="indent" > The main problems are: + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-9007x1">The first letter upper casing commands, such as <span +class="ectt-1000">\Gls</span><a + id="dx1-9008"></a>, won’t work for the + <span +class="ectt-1000">shtml </span>entry on <a + id="dx1-9009"></a><a +href="#glo:firstuse">first use</a> if the long form is displayed before the short + form (which is the default abbreviation style). This will attempt to + do + + + + <div class="verbatim" id="verbatim-22"> + \gls{\uppercase ssi} enabled \gls{html} +</div> + <!--l. 881--><p class="nopar" > which just doesn’t work. Grouping the <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls{ssi}</span></span></span> doesn’t work either as this + will effectively try to do + + + +</p> + <div class="verbatim" id="verbatim-23"> + \uppercase{\gls{ssi}} enabled \gls{html} +</div> + <!--l. 886--><p class="nopar" > This will upper case the label <span +class="ectt-1000">ssi </span>so the entry won’t be recognised. + This problem will also occur if you use the all capitals version, such as + <span +class="ectt-1000">\GLS</span><a + id="dx1-9010"></a>. + </p></li> + <li + class="enumerate" id="x1-9012x2">The long and abbreviated forms accessed through <span +class="ectt-1000">\glsentrylong</span><a + id="dx1-9013"></a> and + <span +class="ectt-1000">\glsentryshort</span><a + id="dx1-9014"></a> are no longer expandable and so can’t be used be used in + contexts that require this, such as PDF bookmarks. + </li> + <li + class="enumerate" id="x1-9016x3">The <span +class="ectt-1000">shtml </span>entry produces inconsistent results depending on whether the <span +class="ectt-1000">ssi </span>or + <span +class="ectt-1000">html </span>entries have been used. Suppose both <span +class="ectt-1000">ssi </span>and <span +class="ectt-1000">html </span>are used before + <span +class="ectt-1000">shtml</span>. For example: + + + + <div class="verbatim" id="verbatim-24"> + This section discusses \gls{ssi}, \gls{html} and \gls{shtml}. +</div> + <!--l. 902--><p class="nopar" > This produces: + </p><div class="quote"> + <!--l. 905--><p class="noindent" >This section discusses server side includes (SSI), hypertext + markup language (HTML) and SSI enabled HTML (SHTML).</p></div> + <!--l. 908--><p class="noindent" >So the <a + id="dx1-9017"></a><a +href="#glo:firstuse">first use</a> of the <span +class="ectt-1000">shtml </span>entry produces “SSI enabled HTML (SHTML)”. + </p><!--l. 911--><p class="noindent" >Now let’s suppose the <span +class="ectt-1000">html </span>entry is used before the <span +class="ectt-1000">shtml </span>but the <span +class="ectt-1000">ssi </span>entry is + used after the <span +class="ectt-1000">shtml </span>entry, for example: + + + +</p> + <div class="verbatim" id="verbatim-25"> + The sample files are either \gls{html} or \gls{shtml}, but let’s +  <br />first discuss \gls{ssi}. +</div> + <!--l. 917--><p class="nopar" > This produces: + </p><div class="quote"> + <!--l. 920--><p class="noindent" >The sample files are either hypertext markup language (HTML) + or server side includes (SSI) enabled HTML (SHTML), but let’s + first discuss SSI.</p></div> + <!--l. 925--><p class="noindent" >So the <a + id="dx1-9018"></a><a +href="#glo:firstuse">first use</a> of the <span +class="ectt-1000">shtml </span>entry now produces “server side includes (SSI) + enabled HTML (SHTML)”, which looks a bit strange. + </p><!--l. 929--><p class="noindent" >Now let’s suppose the <span +class="ectt-1000">shtml </span>entry is used before (or without) the other two + entries: + + + +</p> + <div class="verbatim" id="verbatim-26"> + This article is an introduction to \gls{shtml}. +</div> + <!--l. 933--><p class="nopar" > This produces: + </p><div class="quote"> + <!--l. 936--><p class="noindent" >This article is an introduction to server side includes (SSI) + enabled hypertext markup language (HTML) (SHTML).</p></div> + <!--l. 939--><p class="noindent" >So the <a + id="dx1-9019"></a><a +href="#glo:firstuse">first use</a> of the <span +class="ectt-1000">shtml </span>entry now produces “server side includes (SSI) + enabled hypertext markup language (HTML) (SHTML)”, which is even more + strange. + </p><!--l. 943--><p class="noindent" >This is all aggravated by setting the style using <span +class="ectt-1000">\setacronymstyle</span>. For + example: + + + +</p> + <div class="verbatim" id="verbatim-27"> + \setacronymstyle{long-short} +</div> + <!--l. 947--><p class="nopar" > as this references the label through the use of <span +class="ectt-1000">\glslabel </span>when displaying the + long and short forms, but this value changes with each use of <span +class="ectt-1000">\gls</span>, so + instead of displaying “(SHTML)” at the end of the <a + id="dx1-9020"></a><a +href="#glo:firstuse">first use</a>, it now + displays “(HTML)”, since <span +class="ectt-1000">\glslabel </span>has been changed to <span +class="ectt-1000">html </span>by + <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls{html}</span></span></span>. + </p><!--l. 955--><p class="noindent" >Another oddity occurs if you reset the <span +class="ectt-1000">html </span>entry between uses of the <span +class="ectt-1000">shtml</span> + entry. For example: + + + +</p> + <div class="verbatim" id="verbatim-28"> + \gls{shtml} ... \glsreset{html}\gls{shtml} +</div> + <!--l. 959--><p class="nopar" > The next use of <span +class="ectt-1000">shtml </span>produces “Shypertext markup language (HTML)”, + which is downright weird. + </p><!--l. 963--><p class="noindent" >Even without this, the short form has nested formatting commands, which + amount to <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\acronymfont{S\acronymfont{HTML}}</span></span></span>. This may not be a problem + for some styles, but if you use one of the “sm” styles (that use <span +class="ectt-1000">\textsmaller</span><a + id="dx1-9021"></a>), + this will produce an odd result. + </p></li> + <li + class="enumerate" id="x1-9023x4">Each time the <span +class="ectt-1000">shtml </span>entry is used, the <span +class="ectt-1000">html </span>entry will also be indexed and + marked as used, and on <a + id="dx1-9024"></a><a +href="#glo:firstuse">first use</a> this will happen to both the <span +class="ectt-1000">ssi </span>and <span +class="ectt-1000">html</span> + entries. This kind of duplication in the location list isn’t usually particularly + helpful to the reader. + </li> + <li + class="enumerate" id="x1-9026x5">If <span +class="ecss-1000">hyperref</span><a + id="dx1-9027"></a> is in use, you’ll get nested hyperlinks and there’s no consistent + way of dealing with this across the available PDF viewers. If on the + <a + id="dx1-9028"></a>first use case, the user clicks on the “HTML” part of the “SSI enabled + HTML (SHTML)” link, they may be directed to the HTML entry + in the glossary or they may be directed to the SHTML entry in the + glossary. + </li></ol> +<!--l. 984--><p class="indent" > For these reasons it’s better to use the simple expandable commands +like <span +class="ectt-1000">\glsentrytext</span><a + id="dx1-9029"></a> or <span +class="ectt-1000">\glsentryshort</span><a + id="dx1-9030"></a> in the definition of other entries +(although that doesn’t fix the first problem). Alternatively use something +like: + + + +</p> + <div class="verbatim" id="verbatim-29"> +\newacronym + <br /> [description={\acrshort{ssi} enabled \acrshort{html}}] + <br /> {shtml}{SHTML}{SSI enabled HTML} +</div> +<!--l. 992--><p class="nopar" > with <span +class="ecss-1000">glossaries</span><a + id="dx1-9031"></a> or: + + + +</p> + <div class="verbatim" id="verbatim-30"> +\newabbreviation + <br /> [description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}] + <br /> {shtml}{SHTML}{SSI enabled HTML} +</div> +<!--l. 998--><p class="nopar" > with <span +class="ecss-1000">glossaries-extra</span>. This fixes all the above listed problems (as long as you don’t +use <span +class="ectt-1000">\glsdesc</span><a + id="dx1-9032"></a>). Note that replacing <span +class="ectt-1000">\gls </span>with <span +class="ectt-1000">\acrshort </span>in the original example +may fix the <a + id="dx1-9033"></a><a +href="#glo:firstuse">first use</a> issue, but it doesn’t fix any of the other problems listed +above. +</p><!--l. 1005--><p class="indent" > However if you’re really determined to use <span +class="ectt-1000">\gls</span><a + id="dx1-9034"></a> in a field that may be included +within some <a + id="dx1-9035"></a><a +href="#glo:linktext">link-text</a>, <span +class="ecss-1000">glossaries-extra </span>patches internals used by the linking commands +so that if <span +class="ectt-1000">\gls </span>(or plural or case changing variants) occurs in the <a + id="dx1-9036"></a>link-text it will +behave as though you used <span +class="ectt-1000">\glstext</span><a + id="dx1-9037"></a><span +class="ectt-1000">[hyper=false,noindex] </span>instead. Grouping is +also added so that, for example, when <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls{shtml}</span></span></span> is used for the first time the long +form + + + +</p> + <div class="verbatim" id="verbatim-31"> +\gls{ssi} enabled \gls{html} +</div> +<!--l. 1016--><p class="nopar" > is treated as + + + +</p> + <div class="verbatim" id="verbatim-32"> +{\glstext[hyper=false,noindex]{ssi}} enabled + <br />{\glstext[hyper=false,noindex]{html}} +</div> +<!--l. 1021--><p class="nopar" > This overcomes the last three problems listed above, but still doesn’t fix the first +two. +</p><!--l. 1025--><p class="indent" > Additionally, any instance of the long form commands, such as <span +class="ectt-1000">\glsxtrlong</span><a + id="dx1-9038"></a> or +<span +class="ectt-1000">\acrlong</span><a + id="dx1-9039"></a> will be temporarily redefined to just use </p><div class="alltt"> +<div class="obeylines-v"> +<span +class="ectt-1000">{\glsentrylong</span><a + id="dx1-9040"></a><span +class="ectt-1000">{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">}</span> +</div> +</div> (or case-changing versions). Similarly the short form commands, such as +<span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-9041"></a> or <span +class="ectt-1000">\acrshort</span><a + id="dx1-9042"></a> will use <span +class="ectt-1000">\glsentryshort</span><a + id="dx1-9043"></a> in the argument of either +<span +class="ectt-1000">\glsabbrvfont </span>(for <span +class="ectt-1000">\glsxtrshort</span>) or <span +class="ectt-1000">\acronymfont </span>(for <span +class="ectt-1000">\acrshort</span>). So if the +<span +class="ectt-1000">shtml </span>entry had instead been defined as: + + + + <div class="verbatim" id="verbatim-33"> +\newacronym{shtml}{SHTML}{\acrshort{ssi} enabled \acrshort{html}} +</div> +<!--l. 1038--><p class="nopar" > then (using the <span +class="ecss-1000">long-short</span><a + id="dx1-9044"></a> style) the <a + id="dx1-9045"></a><a +href="#glo:firstuse">first use</a> will be like + + + +</p> + <div class="verbatim" id="verbatim-34"> +{\acronymfont{\glsentryshort{ssi}}} enabled + <br />{\acronymfont{\glsentryshort{html}}} (SHTML) +</div> +<!--l. 1044--><p class="nopar" > whereas if the entry is defined as: + + + +</p> + <div class="verbatim" id="verbatim-35"> +\newabbreviation{shtml}{SHTML}{\glsxtrshort{ssi} enabled + <br />\glsxtrshort{html}} +</div> +<!--l. 1049--><p class="nopar" > then the <a + id="dx1-9046"></a><a +href="#glo:firstuse">first use</a> will be like: + + + +</p> + <div class="verbatim" id="verbatim-36"> +{\glsabbrvfont{\glsentryshort{ssi}}} enabled + <br />{\glsabbrvfont{\glsentryshort{html}}} (SHTML) +</div> +<!--l. 1054--><p class="nopar" > Note that the first optional argument of <span +class="ectt-1000">\acrshort </span>or <span +class="ectt-1000">\glsxtrshort </span>is ignored in +this context. (The final optional argument will be inserted, if present.) The +abbreviation style that governs <span +class="ectt-1000">\glsabbrvfont</span><a + id="dx1-9047"></a> will be set for <span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-9048"></a>. Note +that <span +class="ectt-1000">\acrshort </span>doesn’t set the abbreviation style. +</p><!--l. 1062--><p class="indent" > <div class="important" title="Important Note"> If you use any of the case-changing commands, such as <span +class="ectt-1000">\Gls</span><a + id="dx1-9049"></a> or <span +class="ectt-1000">\Glstext</span><a + id="dx1-9050"></a>, (either +all caps or first letter upper casing) don’t use any of the linking commands, such as +<span +class="ectt-1000">\gls</span><a + id="dx1-9051"></a> or <span +class="ectt-1000">\glstext</span><a + id="dx1-9052"></a>, in the definition of entries for any of the fields that may be used +by those case-changing commands. </div> +</p><!--l. 1068--><p class="noindent" > +</p><!--l. 1070--><p class="noindent" > +</p> +<!--l. 1070--><p class="noindent" ><a +href="#top">Top</a><h4 class="subsectionHead"></p><h4 class="subsectionHead"><span class="titlemark">1.3.5 </span> <a + id="sec:acronymmods"></a>Acronym Style Modifications</h4> +<!--l. 1073--><p class="noindent" >The <span +class="ecss-1000">glossaries-extra </span>package provides a new way of dealing with abbreviations and +redefines <span +class="ectt-1000">\newacronym</span><a + id="dx1-10001"></a> to use <span +class="ectt-1000">\newabbreviation </span>(see <a +href="#sec:abbreviations">§2 </a><a +href="#sec:abbreviations">Abbreviations<!--tex4ht:ref: sec:abbreviations --></a>). If you want +to restore the generic acronym function provided by <span +class="ecss-1000">glossaries</span><a + id="dx1-10002"></a> you need to +use +</p><!--l. 1078--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\RestoreAcronyms</span><span +class="ectt-0900"> </span></span><a + id="dx1-10003"></a> <span +class="ectt-1000">\RestoreAcronyms </span></div><hr> +</p><!--l. 1080--><p class="noindent" > +but be careful using this if you also want abbreviations as they will clash if you +attempt to use them in the same glossary as generic acronyms from the <span +class="ecss-1000">glossaries</span><a + id="dx1-10004"></a> +package. +</p><!--l. 1085--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsacspace</span><span +class="ectt-0900"> </span></span><a + id="dx1-10005"></a> <span +class="ectt-1000">\glsacspace{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1087--><p class="noindent" > +The space command <span +class="ectt-1000">\glsacspace </span>used by the <span +class="ecss-1000">long-sp-short</span><a + id="dx1-10006"></a> acronym style provided +by <span +class="ecss-1000">glossaries</span><a + id="dx1-10007"></a> is modified so that it uses +</p><!--l. 1091--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsacspacemax</span><span +class="ectt-0900"> </span></span><a + id="dx1-10008"></a> <span +class="ectt-1000">\glsacspacemax </span></div><hr> +</p><!--l. 1093--><p class="noindent" > +instead of the hard-coded 3em. This is a command not a length and so can be +changed using <span +class="ectt-1000">\renewcommand</span>. +</p><!--l. 1097--><p class="indent" > The <a + id="dx1-10009"></a><a +href="#glo:firstuse">first use</a> acronym font command +</p><!--l. 1098--><p class="indent" > <hr><div title="Definition"> <span +class="ectt-1000">\firstacronymfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1100--><p class="noindent" > +is redefined to use the <a + id="dx1-10010"></a>first use abbreviation font command <span +class="ectt-1000">\glsfirstabbrvfont</span><a + id="dx1-10011"></a>. +This will be reset if you use <span +class="ectt-1000">\RestoreAcronyms</span>. +</p><!--l. 1105--><p class="indent" > The subsequent use acronym font command + + + +</p><!--l. 1106--><p class="indent" > <hr><div title="Definition"> <span +class="ectt-1000">\acronymfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1108--><p class="noindent" > +is redefined to use the subsequent use abbreviation font command <span +class="ectt-1000">\glsabbrvfont</span><a + id="dx1-10012"></a>. +This will be reset if you use <span +class="ectt-1000">\RestoreAcronyms</span>. +</p><!--l. 1113--><p class="noindent" > +</p> +<!--l. 1113--><p class="noindent" ><a +href="#top">Top</a><h4 class="subsectionHead"></p><h4 class="subsectionHead"><span class="titlemark">1.3.6 </span> <a + id="sec:glosstylemods"></a>Glossary Style Modifications</h4> +<!--l. 1116--><p class="noindent" >The default value of <span +class="ectt-1000">\glslistdottedwidth</span><a + id="dx1-11001"></a> 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 <span +class="ectt-1000">\hsize </span>isn’t set until the start of the +document. +</p><!--l. 1121--><p class="indent" > The commands <span +class="ectt-1000">\glossentryname</span><a + id="dx1-11002"></a> and <span +class="ectt-1000">\glossentrydesc</span><a + id="dx1-11003"></a> are modified to take +into account the <span +class="ecss-1000">glossname</span><a + id="dx1-11004"></a> and <span +class="ecss-1000">glossdesc</span><a + id="dx1-11005"></a> attributes (see <a +href="#sec:categories">§4 </a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a>). This means +you can make simple case-changing modifications to the name and description +without defining a new glossary style. +</p><!--l. 1127--><p class="indent" > There is a hook after <span +class="ectt-1000">\glossentryname</span><a + id="dx1-11006"></a> and <span +class="ectt-1000">\Glossentryname</span><a + id="dx1-11007"></a>: +</p><!--l. 1129--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrpostnamehook</span><span +class="ectt-0900"> </span></span><a + id="dx1-11008"></a> <span +class="ectt-1000">\glsxtrpostnamehook{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1131--><p class="noindent" > +By default this checks the <span +class="ecss-1000">indexname</span><a + id="dx1-11009"></a> attribute. If the attribute exists for the +category to which the label belongs, then the name is automatically indexed +using +</p><!--l. 1136--><p class="indent" > <hr><div title="Definition"><span +class="ectt-1000">\glsxtrdoautoindexname</span><a + id="dx1-11010"></a><span +class="ectt-1000">{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{indexname} </span></div><hr> +</p><!--l. 1137--><p class="noindent" > +See <a +href="#sec:autoindex">§6 </a><a +href="#sec:autoindex">Auto-Indexing<!--tex4ht:ref: sec:autoindex --></a> for further details. +</p><!--l. 1140--><p class="indent" > The post-description code used within the glossary is modified so that it also +does +</p><!--l. 1142--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrpostdescription</span><span +class="ectt-0900"> </span></span><a + id="dx1-11011"></a> <span +class="ectt-1000">\glsxtrpostdescription </span></div><hr> +</p><!--l. 1144--><p class="noindent" > +This occurs before the original <span +class="ectt-1000">\glspostdescription</span>, so if the <span +class="ecss-1000">nopostdot=false</span><a + id="dx1-11012"></a> +option is used, it will be inserted before the terminating full stop. +</p><!--l. 1149--><p class="indent" > This new command will do <span +class="ectt-1000">\glsxtrpostdesc</span>⟨<span +class="ecit-1000">category</span>⟩ if it exists, where +⟨<span +class="ecti-1000">category</span>⟩ is the category label associated with the current entry. For example +<span +class="ectt-1000">\glsxtrpostdescgeneral </span>for entries with the category set to <span +class="ecss-1000">general</span><a + id="dx1-11013"></a> or +<span +class="ectt-1000">\glsxtrpostdescacronym </span>for entries with the category set to <span +class="ecss-1000">acronym</span><a + id="dx1-11014"></a>. +</p><!--l. 1156--><p class="indent" > Since both <span +class="ectt-1000">\glossentry </span>and <span +class="ectt-1000">\subglossentry </span>set +</p><!--l. 1157--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glscurrententrylabel</span><span +class="ectt-0900"> </span></span><a + id="dx1-11015"></a> <span +class="ectt-1000">\glscurrententrylabel </span></div><hr> +</p><!--l. 1159--><p class="noindent" > +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. +</p><!--l. 1164--><p class="indent" > For example, suppose you want to insert the plural form in brackets after the +description in the glossary, but only for entries in the <span +class="ecss-1000">general</span><a + id="dx1-11016"></a> category, then you could +do: + + + +</p> + <div class="verbatim" id="verbatim-37"> +\renewcommand{\glsxtrpostdescgeneral}{\space + <br /> (plural: \glsentryplural{\glscurrententrylabel})} +</div> +<!--l. 1170--><p class="nopar" > 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.) +</p><!--l. 1175--><p class="indent" > <div class="important" title="Important Note"> This feature can’t be used for glossary styles that ignore <span +class="ectt-1000">\glspostdescription </span>or if +you redefine <span +class="ectt-1000">\glspostdescription </span>without including <span +class="ectt-1000">\glsxtrpostdescription</span>. +(For example, if you redefine <span +class="ectt-1000">\glspostdescription </span>to do nothing instead of using +the <span +class="ecss-1000">nopostdot</span><a + id="dx1-11017"></a> option to suppress the terminating full stop.) </div> +</p><!--l. 1182--><p class="noindent" > + + + +</p> +<!--l. 1184--><p class="indent" > </div> +</p><!--l. 1184--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">2. <a + id="sec:abbreviations"></a>Abbreviations</h2> +</p><!--l. 1187--><p class="indent" > 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 <span +class="ecss-1000">glossaries</span><a + id="dx1-12001"></a> +package is misnamed as it’s more often than not used for initialisms instead. +Acronyms tend not to be <span +class="ecti-1000">expanded </span>on <a + id="dx1-12002"></a><a +href="#glo:firstuse">first use</a> (although they may need +to be <span +class="ecti-1000">described </span>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. +</p><!--l. 1199--><p class="indent" > The <span +class="ecss-1000">glossaries-extra </span>package corrects this misnomer, and provides better +abbreviation handling, with +</p><!--l. 1201--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\newabbreviation</span><span +class="ectt-0900"> </span></span><a + id="dx1-12003"></a> <span +class="ectt-1000">\newabbreviation[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">short</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">long</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 1203--><p class="noindent" > +</p><!--l. 1205--><p class="indent" > This sets the <span +class="ecss-1000">category</span><a + id="dx1-12004"></a> key to <span +class="ectt-1000">abbreviation </span>by default, but that value may be +overridden in ⟨<span +class="ecti-1000">options</span>⟩. The category may have attributes that modify the way +abbreviations are defined. For example, the <span +class="ecss-1000">insertdots</span><a + id="dx1-12005"></a> attribute will automatically +insert full stops (periods) into ⟨<span +class="ecti-1000">short</span>⟩ or the <span +class="ecss-1000">noshortplural</span><a + id="dx1-12006"></a> attribute will set the default +value of the <span +class="ecss-1000">shortplural</span><a + id="dx1-12007"></a> key to just ⟨<span +class="ecti-1000">short</span>⟩ (without appending the plural suffix). See <a +href="#sec:categories">§4 +</a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a> for further details. +</p><!--l. 1215--><p class="indent" > See <a +href="#sec:nested">§1.3.4 </a><a +href="#sec:nested">Nested Links<!--tex4ht:ref: sec:nested --></a> regarding the pitfalls of using commands like <span +class="ectt-1000">\gls</span><a + id="dx1-12008"></a> or +<span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-12009"></a> within ⟨<span +class="ecti-1000">short</span>⟩ or ⟨<span +class="ecti-1000">long</span>⟩. +</p><!--l. 1219--><p class="indent" > <div class="important" title="Important Note"> Make sure that you set the category attributes before defining new abbreviations +or they may not be correctly applied. </div> +</p><!--l. 1222--><p class="noindent" > +</p><!--l. 1224--><p class="indent" > The <span +class="ectt-1000">\newacronym</span><a + id="dx1-12010"></a> command provided by the <span +class="ecss-1000">glossaries</span><a + id="dx1-12011"></a> package is redefined to +use <span +class="ectt-1000">\newabbreviation </span>with the <span +class="ecss-1000">category</span><a + id="dx1-12012"></a> set to <span +class="ectt-1000">acronym</span>. If you want to +restore the original behaviour of acronyms (as implemented by the <span +class="ecss-1000">glossaries</span><a + id="dx1-12013"></a> +package’s <span +class="ectt-1000">\newacronym</span>, <span +class="ectt-1000">\setacronymstyle</span><a + id="dx1-12014"></a> and <span +class="ectt-1000">\newacronymstyle</span><a + id="dx1-12015"></a>) you need to +use +</p><!--l. 1231--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\RestoreAcronyms</span><span +class="ectt-0900"> </span></span><a + id="dx1-12016"></a> <span +class="ectt-1000">\RestoreAcronyms </span></div><hr> +</p><!--l. 1233--><p class="noindent" > +However, if you do this take care not to mix acronyms with other types of entries +within the same glossary. (You may also need to redefine <span +class="ectt-1000">\acronymtype</span><a + id="dx1-12017"></a>.) +</p><!--l. 1238--><p class="indent" > The <span +class="ectt-1000">\newabbreviation </span>command is superficially similar to the <span +class="ecss-1000">glossaries</span><a + id="dx1-12018"></a> +package’s <span +class="ectt-1000">\newacronym </span>but you can apply different styles to different categories. The +default style is <span +class="ecss-1000">short</span><a + id="dx1-12019"></a> for entries in the <span +class="ecss-1000">acronym</span><a + id="dx1-12020"></a> category and <span +class="ecss-1000">short-long</span><a + id="dx1-12021"></a> for +entries in the <span +class="ecss-1000">abbreviation</span><a + id="dx1-12022"></a> category. (These aren’t the same as the acronym +styles provided by the <span +class="ecss-1000">glossaries</span><a + id="dx1-12023"></a> package, although they may produce similar +results.) +</p><!--l. 1247--><p class="indent" > The short form is displayed within commands like <span +class="ectt-1000">\gls </span>using + + + +</p><!--l. 1248--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfirstabbrvfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-12024"></a> <span +class="ectt-1000">\glsfirstabbrvfont{</span>⟨<span +class="ecit-1000">short-form</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1250--><p class="noindent" > +on <a + id="dx1-12025"></a><a +href="#glo:firstuse">first use</a> and +</p><!--l. 1252--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsabbrvfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-12026"></a> <span +class="ectt-1000">\glsabbrvfont{</span>⟨<span +class="ecit-1000">short-form</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1254--><p class="noindent" > +for subsequent use. +</p><!--l. 1257--><p class="indent" > <div class="important" title="Important Note"> These commands (<span +class="ectt-1000">\glsfirstabbrvfont </span>and <span +class="ectt-1000">\glsabbrvfont</span>) are reset by the +abbreviation styles and whenever an abbreviation is used by commands like <span +class="ectt-1000">\gls</span> +(but not by commands like <span +class="ectt-1000">\glsentryshort</span><a + id="dx1-12027"></a>) so don’t try redefining them outside of +an abbreviation style. </div> +</p><!--l. 1263--><p class="noindent" > +</p><!--l. 1265--><p class="indent" > If you use the <span +class="ecss-1000">long-short</span><a + id="dx1-12028"></a> style, <span +class="ectt-1000">\glsabbrvfont </span>is redefine to use +</p><!--l. 1267--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsabbrvdefaultfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-12029"></a> <span +class="ectt-1000">\glsabbrvdefaultfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1269--><p class="noindent" > +whereas the <span +class="ecss-1000">long-short-sc</span><a + id="dx1-12030"></a> style redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\glsxtrscfont</span>. If +you want to use a different font-changing command you can either redefine +<span +class="ectt-1000">\glsabbrvdefaultfont </span>and use one of the base styles, such as <span +class="ecss-1000">long-short</span><a + id="dx1-12031"></a>, or define a +new style in a similar manner to the “sc”, “sm” or “em” styles. +</p><!--l. 1277--><p class="indent" > All predefined abbreviation styles redefine <span +class="ectt-1000">\glsfirstabbrvfont </span>to use +</p><!--l. 1279--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfirstabbrvdefaultfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-12032"></a> <span +class="ectt-1000">\glsfirstabbrvdefaultfont{</span>⟨<span +class="ecit-1000">short-form</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 1281--><p class="noindent" > +By default, this just does <span +class="ectt-1000">\glsabbrvfont{</span>⟨<span +class="ecti-1000">short-form</span>⟩<span +class="ectt-1000">} </span>so the <a + id="dx1-12033"></a>first use format +matches the subsequence use format for the short form. +</p><!--l. 1286--><p class="indent" > The commands that display the full form for abbreviations use <span +class="ectt-1000">\glsfirstabbrvfont</span> +to display the short form and +</p><!--l. 1288--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfirstlongfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-12034"></a> <span +class="ectt-1000">\glsfirstlongfont{</span>⟨<span +class="ecit-1000">long-form</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1290--><p class="noindent" > +to display the long form. As with <span +class="ectt-1000">\glsabbrvfont</span><a + id="dx1-12035"></a>, this command is changed by all +styles. Currently all predefined abbreviation styles provided by <span +class="ecss-1000">glossaries-extra</span> +redefine <span +class="ectt-1000">\glsfirstlongfont </span>to use +</p><!--l. 1295--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfirstlongdefaultfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-12036"></a> <span +class="ectt-1000">\glsfirstlongdefaultfont{</span>⟨<span +class="ecit-1000">long-form</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 1297--><p class="noindent" > +You can redefine this command if you want to change the font used by the long form +on <a + id="dx1-12037"></a>first use for all your abbreviations, or you can define your own abbreviation style +that provides a different format for only those abbreviations defined with that +style. +</p><!--l. 1303--><p class="indent" > There are two types of full forms. The display full form, which is used on <a + id="dx1-12038"></a>first use +by commands like <span +class="ectt-1000">\gls</span><a + id="dx1-12039"></a> and the inline full form, which is used by commands like +<span +class="ectt-1000">\glsxtrfull</span><a + id="dx1-12040"></a>. For some of the abbreviation styles, such as <span +class="ecss-1000">long-short</span><a + id="dx1-12041"></a>, the display and +inline forms are the same. In the case of styles such as <span +class="ecss-1000">short</span><a + id="dx1-12042"></a> or <span +class="ecss-1000">footnote</span><a + id="dx1-12043"></a>, the display +and inline full forms are different. +</p><!--l. 1310--><p class="indent" > These formatting commands aren’t stored in the <span +class="ecss-1000">short</span><a + id="dx1-12044"></a>, <span +class="ecss-1000">shortplural</span><a + id="dx1-12045"></a>, <span +class="ecss-1000">long</span><a + id="dx1-12046"></a> or +<span +class="ecss-1000">longplural</span><a + id="dx1-12047"></a> fields, which means they won’t be used within commands like + + + +<span +class="ectt-1000">\glsentryshort </span>(but they are used within commands like <span +class="ectt-1000">\glsxtrshort </span>and +<span +class="ectt-1000">\glsfmtshort</span>). Note that <span +class="ectt-1000">\glsxtrlong</span><a + id="dx1-12048"></a> and the case-changing variants don’t use +<span +class="ectt-1000">\glsfirstlongfont</span>. +</p> +<!--l. 1318--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2.1 </span> <a + id="sec:tagging"></a>Tagging Initials</h3> +<!--l. 1321--><p class="noindent" >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 +</p><!--l. 1324--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrEnableInitialTagging</span><span +class="ectt-0900"> </span></span><a + id="dx1-13001"></a> <span +class="ectt-1000">\GlsXtrEnableInitialTagging{</span>⟨<span +class="ecit-1000">categories</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">cs</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 1326--><p class="noindent" > +before you define your abbreviations. +</p><!--l. 1329--><p class="indent" > This command (robustly) defines ⟨<span +class="ecti-1000">cs</span>⟩ (a control sequence) to accept a single +argument, which is the letter (or letters) that needs to be tagged. The normal +behaviour of this command within the document is to simply do its argument, but in +the glossary it’s activated for those categories that have the <span +class="ecss-1000">tagging</span><a + id="dx1-13002"></a> attribute set to +“true”. For those cases it will use +</p><!--l. 1336--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrtagfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-13003"></a> <span +class="ectt-1000">\glsxtrtagfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1338--><p class="noindent" > +This command defaults to <span +class="ectt-1000">\underline</span><a + id="dx1-13004"></a><span +class="ectt-1000">{</span>⟨<span +class="ecti-1000">text</span>⟩<span +class="ectt-1000">} </span>but may be redefined as required. +</p><!--l. 1342--><p class="indent" > The control sequence ⟨<span +class="ecti-1000">cs</span>⟩ can’t already be defined when used with the unstarred +version of <span +class="ectt-1000">\GlsXtrEnableInitialTagging </span>for safety reasons. The starred +version will overwrite any previous definition of ⟨<span +class="ecti-1000">cs</span>⟩. 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. +</p><!--l. 1351--><p class="indent" > The first argument of <span +class="ectt-1000">\GlsXtrEnableInitialTagging </span>is a comma-separated list +of category names. The <span +class="ecss-1000">tagging</span><a + id="dx1-13005"></a> attribute will automatically be set for those +categories. You can later set this attribute for other categories (see <a +href="#sec:categories">§4 </a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a>) but +this must be done before the glossary is displayed. +</p><!--l. 1358--><p class="indent" > The accompanying sample file <span +class="ectt-1000">sample-mixtures.tex </span>uses initial tagging for both +the <span +class="ecss-1000">acronym</span><a + id="dx1-13006"></a> and <span +class="ecss-1000">abbreviation</span><a + id="dx1-13007"></a> categories: + + + +</p> + <div class="verbatim" id="verbatim-38"> +\GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag} +</div> +<!--l. 1363--><p class="nopar" > This defines the command <span +class="ectt-1000">\itag </span>which can be used in the definitions. For +example: + + + +</p> + <div class="verbatim" id="verbatim-39"> +\newacronym + <br /> [description={a system for detecting the location and + <br /> speed of ships, aircraft, etc, through the use of radio + <br /> waves}% description of this term + <br /> ] + <br /> {radar}% identifying label + <br /> {radar}% short form (i.e. the word) + <br /> {\itag{ra}dio \itag{d}etection \itag{a}nd \itag{r}anging} + <br />\newabbreviation{xml}{XML} + <br /> {e\itag{x}tensible \itag{m}arkup \itag{l}anguage} +</div> +<!--l. 1378--><p class="nopar" > The underlining of the tagged letters only occurs in the glossary and then only for +entries with the <span +class="ecss-1000">tagging</span><a + id="dx1-13008"></a> attribute set. +</p><!--l. 1383--><p class="noindent" > +</p> +<!--l. 1383--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2.2 </span> <a + id="sec:abbrstyle"></a>Abbreviation Styles</h3> +<!--l. 1386--><p class="noindent" >The abbreviation style must be set before abbreviations are defined using: +</p><!--l. 1388--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\setabbreviationstyle</span><span +class="ectt-0900"> </span></span><a + id="dx1-14001"></a> <span +class="ectt-1000">\setabbreviationstyle[</span>⟨<span +class="ecit-1000">category</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">style-name</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 1390--><p class="noindent" > +where ⟨<span +class="ecti-1000">style-name</span>⟩ is the name of the style and ⟨<span +class="ecti-1000">category</span>⟩ is the category label +(<span +class="ectt-1000">abbreviation </span>by default). New abbreviations will pick up the current style +according to their given category. If there is no style set for the category, +the fallback is the style for the <span +class="ectt-1000">abbreviation </span>category. Some styles may +automatically modify one or more of the attributes associated with the given +category. For example, the <span +class="ecss-1000">long</span><a + id="dx1-14002"></a> and <span +class="ecss-1000">short</span><a + id="dx1-14003"></a> styles set the <span +class="ecss-1000">regular</span><a + id="dx1-14004"></a> attribute to +<span +class="ectt-1000">true</span>. +</p><!--l. 1401--><p class="indent" > <div class="important" title="Important Note"> 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. +</div> +</p><!--l. 1405--><p class="noindent" > +</p><!--l. 1407--><p class="indent" > Note that <span +class="ectt-1000">\setacronymstyle</span><a + id="dx1-14005"></a> is disabled by <span +class="ecss-1000">glossaries-extra</span>. Use </p><div class="alltt"> +<div class="obeylines-v"> +<span +class="ectt-1000">\setabbreviationstyle[acronym]{</span>⟨<span +class="ecit-1000">style-name</span>⟩<span +class="ectt-1000">}</span> + + + +</div> +</div> instead. The original acronym interface can be restored with <span +class="ectt-1000">\RestoreAcronyms </span>(see +<a +href="#sec:acronymmods">§1.3.5 </a><a +href="#sec:acronymmods">Acronym Style Modifications<!--tex4ht:ref: sec:acronymmods --></a>). +<!--l. 1415--><p class="indent" > Abbreviations can be used with the standard <span +class="ecss-1000">glossaries</span><a + id="dx1-14006"></a> commands, such as <span +class="ectt-1000">\gls</span><a + id="dx1-14007"></a>, +but don’t use the acronym commands like <span +class="ectt-1000">\acrshort</span><a + id="dx1-14008"></a> (which use <span +class="ectt-1000">\acronymfont</span><a + id="dx1-14009"></a>). +The short form can be produced with: +</p><!--l. 1419--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrshort</span><span +class="ectt-0900"> </span></span><a + id="dx1-14010"></a> <span +class="ectt-1000">\glsxtrshort[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1421--><p class="noindent" > +(Use this instead of <span +class="ectt-1000">\acrshort</span><a + id="dx1-14011"></a>.) +</p><!--l. 1424--><p class="indent" > The long form can be produced with +</p><!--l. 1425--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrlong</span><span +class="ectt-0900"> </span></span><a + id="dx1-14012"></a> <span +class="ectt-1000">\glsxtrlong[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1427--><p class="noindent" > +(Use this instead of <span +class="ectt-1000">\acrlong</span><a + id="dx1-14013"></a>.) +</p><!--l. 1430--><p class="indent" > The <span +class="ecti-1000">inline </span>full form can be produced with +</p><!--l. 1431--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrfull</span><span +class="ectt-0900"> </span></span><a + id="dx1-14014"></a> <span +class="ectt-1000">\glsxtrfull[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1433--><p class="noindent" > +(This this instead of <span +class="ectt-1000">\acrfull</span><a + id="dx1-14015"></a>.) +</p><!--l. 1436--><p class="indent" > As mentioned earlier, the inline full form may not necessarily match the format +used on <a + id="dx1-14016"></a><a +href="#glo:firstuse">first use</a> with <span +class="ectt-1000">\gls</span>. For example, the <span +class="ecss-1000">short</span><a + id="dx1-14017"></a> style only displays the short form +on <a + id="dx1-14018"></a>first use, but the full form will display the long form followed by the short form in +parentheses. +</p><!--l. 1442--><p class="indent" > <div class="important" title="Important Note"> If you want to use an abbreviation in a chapter or section title, use the +commands described in <a +href="#sec:headtitle">§3 </a><a +href="#sec:headtitle">Entries in Sectioning Titles, Headers and Contents<!--tex4ht:ref: sec:headtitle --></a> +instead. </div> +</p><!--l. 1446--><p class="noindent" > +</p><!--l. 1448--><p class="indent" > The arguments ⟨<span +class="ecti-1000">options</span>⟩, ⟨<span +class="ecti-1000">label</span>⟩ and ⟨<span +class="ecti-1000">insert</span>⟩ are the same as for commands such as +<span +class="ectt-1000">\glstext</span>. There are also analogous case-changing commands: +</p><!--l. 1452--><p class="indent" > First letter upper case short form: +</p><!--l. 1453--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrshort</span><span +class="ectt-0900"> </span></span><a + id="dx1-14019"></a> <span +class="ectt-1000">\Glsxtrshort[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1455--><p class="noindent" > +</p><!--l. 1457--><p class="indent" > First letter upper case long form: +</p><!--l. 1458--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrlong</span><span +class="ectt-0900"> </span></span><a + id="dx1-14020"></a> <span +class="ectt-1000">\Glsxtrlong[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1460--><p class="noindent" > +</p><!--l. 1462--><p class="indent" > First letter upper case inline full form: +</p><!--l. 1463--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrfull</span><span +class="ectt-0900"> </span></span><a + id="dx1-14021"></a> <span +class="ectt-1000">\Glsxtrfull[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1465--><p class="noindent" > +</p><!--l. 1467--><p class="indent" > All upper case short form: +</p><!--l. 1468--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrshort</span><span +class="ectt-0900"> </span></span><a + id="dx1-14022"></a> <span +class="ectt-1000">\GLSxtrshort[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1470--><p class="noindent" > +</p><!--l. 1472--><p class="indent" > All upper case long form: +</p><!--l. 1473--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrlong</span><span +class="ectt-0900"> </span></span><a + id="dx1-14023"></a> <span +class="ectt-1000">\GLSxtrlong[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> + + + +</p><!--l. 1475--><p class="noindent" > +</p><!--l. 1477--><p class="indent" > All upper case inline full form: +</p><!--l. 1478--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GLSxtrfull</span><span +class="ectt-0900"> </span></span><a + id="dx1-14024"></a> <span +class="ectt-1000">\GLSxtrfull[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1480--><p class="noindent" > +</p><!--l. 1482--><p class="indent" > Plural forms are also available. +</p><!--l. 1484--><p class="indent" > Short form plurals: +</p><!--l. 1485--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrshortpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14025"></a> <span +class="ectt-1000">\glsxtrshortpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1487--><p class="noindent" > +</p><!--l. 1488--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrshortpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14026"></a> <span +class="ectt-1000">\Glsxtrshortpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1490--><p class="noindent" > +</p><!--l. 1491--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GLSxtrshortpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14027"></a> <span +class="ectt-1000">\GLSxtrshortpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1493--><p class="noindent" > +</p><!--l. 1495--><p class="indent" > Long form plurals: +</p><!--l. 1496--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrlongpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14028"></a> <span +class="ectt-1000">\glsxtrlongpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1498--><p class="noindent" > +</p><!--l. 1499--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrlongpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14029"></a> <span +class="ectt-1000">\Glsxtrlongpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1501--><p class="noindent" > +</p><!--l. 1502--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GLSxtrlongpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14030"></a> <span +class="ectt-1000">\GLSxtrlongpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1504--><p class="noindent" > +</p><!--l. 1506--><p class="indent" > Full form plurals: +</p><!--l. 1507--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrfullpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14031"></a> <span +class="ectt-1000">\glsxtrfullpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1509--><p class="noindent" > +</p><!--l. 1510--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrfullpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14032"></a> <span +class="ectt-1000">\Glsxtrfullpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1512--><p class="noindent" > +</p><!--l. 1513--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GLSxtrfullpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-14033"></a> <span +class="ectt-1000">\GLSxtrfullpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 1515--><p class="noindent" > +</p><!--l. 1517--><p class="indent" > <div class="important" title="Important Note"> Be careful about using <span +class="ectt-1000">\glsentryfull</span>, <span +class="ectt-1000">\Glsentryfull</span>, <span +class="ectt-1000">\glsentryfullpl </span>and +<span +class="ectt-1000">\Glsentryfullpl</span>. These commands will use the currently applied style rather +than the style in use when the entry was defined. If you have mixed styles, +you’ll need to use <span +class="ectt-1000">\glsxtrfull</span><a + id="dx1-14034"></a> instead. Similarly for <span +class="ectt-1000">\glsentryshort </span>etc. +</div> +</p><!--l. 1523--><p class="noindent" > + + + +</p><!--l. 1525--><p class="noindent" > +</p> +<!--l. 1525--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2.3 </span> <a + id="sec:abbrshortcuts"></a>Shortcut Commands</h3> +<!--l. 1528--><p class="noindent" >The abbreviation shortcut commands can be enabled using the package option +<span +class="ecss-1000">shortcuts=abbreviation</span><a + id="dx1-15001"></a> (or <span +class="ecss-1000">shortcuts=abbr</span><a + id="dx1-15002"></a>). This defines the commands listed in +<a +href="#tab:abbrshortcuts">table 2.1</a>. +</p> + <div class="table"> + + + +<!--l. 1533--><p class="indent" > <a + id="tab:abbrshortcuts"></a></p><hr class="float" /><div class="float" +> + + + + <div class="caption" +><span class="id">Table 2.1: </span><span +class="content">Abbreviation Shortcut Commands</span></div><!--tex4ht:label?: x1-150031 --> +<div class="tabular"> <table id="TBL-2" class="tabular" +cellspacing="0" cellpadding="0" +><colgroup id="TBL-2-1g"><col +id="TBL-2-1" /><col +id="TBL-2-2" /></colgroup><tr + style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-1-1" +class="td11"><span +class="ecbx-1000">Shortcut</span></td><td style="white-space:nowrap; text-align:left;" id="TBL-2-1-2" +class="td11"><span +class="ecbx-1000">Equivalent Command</span></td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-2-1" +class="td11"><span +class="ectt-1000">\ab</span><a + id="dx1-15004"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-2-2" +class="td11"><span +class="ectt-1000">\cgls</span><a + id="dx1-15005"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-3-1" +class="td11"><span +class="ectt-1000">\abp</span><a + id="dx1-15006"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-3-2" +class="td11"><span +class="ectt-1000">\cglspl</span><a + id="dx1-15007"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-4-1" +class="td11"><span +class="ectt-1000">\as</span><a + id="dx1-15008"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-4-2" +class="td11"><span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-15009"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-5-1" +class="td11"><span +class="ectt-1000">\asp</span><a + id="dx1-15010"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-5-2" +class="td11"><span +class="ectt-1000">\glsxtrshortpl</span><a + id="dx1-15011"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-6-1" +class="td11"><span +class="ectt-1000">\al</span><a + id="dx1-15012"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-6-2" +class="td11"><span +class="ectt-1000">\glsxtrlong</span><a + id="dx1-15013"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-7-1" +class="td11"><span +class="ectt-1000">\alp</span><a + id="dx1-15014"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-7-2" +class="td11"><span +class="ectt-1000">\glsxtrlongpl</span><a + id="dx1-15015"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-8-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-8-1" +class="td11"><span +class="ectt-1000">\af</span><a + id="dx1-15016"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-8-2" +class="td11"><span +class="ectt-1000">\glsxtrfull</span><a + id="dx1-15017"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-9-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-9-1" +class="td11"><span +class="ectt-1000">\afp</span><a + id="dx1-15018"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-9-2" +class="td11"><span +class="ectt-1000">\glsxtrfullpl</span><a + id="dx1-15019"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-10-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-10-1" +class="td11"><span +class="ectt-1000">\As</span><a + id="dx1-15020"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-10-2" +class="td11"><span +class="ectt-1000">\Glsxtrshort</span><a + id="dx1-15021"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-11-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-11-1" +class="td11"><span +class="ectt-1000">\Asp</span><a + id="dx1-15022"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-11-2" +class="td11"><span +class="ectt-1000">\Glsxtrshortpl</span><a + id="dx1-15023"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-12-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-12-1" +class="td11"><span +class="ectt-1000">\Al</span><a + id="dx1-15024"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-12-2" +class="td11"><span +class="ectt-1000">\Glsxtrlong</span><a + id="dx1-15025"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-13-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-13-1" +class="td11"><span +class="ectt-1000">\Alp</span><a + id="dx1-15026"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-13-2" +class="td11"><span +class="ectt-1000">\Glsxtrlongpl</span><a + id="dx1-15027"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-14-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-14-1" +class="td11"><span +class="ectt-1000">\Af</span><a + id="dx1-15028"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-14-2" +class="td11"><span +class="ectt-1000">\Glsxtrfull</span><a + id="dx1-15029"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-15-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-15-1" +class="td11"><span +class="ectt-1000">\Afp</span><a + id="dx1-15030"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-15-2" +class="td11"><span +class="ectt-1000">\Glsxtrfullpl</span><a + id="dx1-15031"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-16-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-16-1" +class="td11"><span +class="ectt-1000">\AS</span><a + id="dx1-15032"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-16-2" +class="td11"><span +class="ectt-1000">\GLSxtrshort</span><a + id="dx1-15033"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-17-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-17-1" +class="td11"><span +class="ectt-1000">\ASP</span><a + id="dx1-15034"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-17-2" +class="td11"><span +class="ectt-1000">\GLSxtrshortpl</span><a + id="dx1-15035"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-18-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-18-1" +class="td11"><span +class="ectt-1000">\AL</span><a + id="dx1-15036"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-18-2" +class="td11"><span +class="ectt-1000">\GLSxtrlong</span><a + id="dx1-15037"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-19-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-19-1" +class="td11"><span +class="ectt-1000">\ALP</span><a + id="dx1-15038"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-19-2" +class="td11"><span +class="ectt-1000">\GLSxtrlongpl</span><a + id="dx1-15039"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-20-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-20-1" +class="td11"><span +class="ectt-1000">\AF</span><a + id="dx1-15040"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-20-2" +class="td11"><span +class="ectt-1000">\GLSxtrfull</span><a + id="dx1-15041"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-21-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-21-1" +class="td11"><span +class="ectt-1000">\AFP</span><a + id="dx1-15042"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-21-2" +class="td11"><span +class="ectt-1000">\GLSxtrfullpl</span><a + id="dx1-15043"></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-22-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-22-1" +class="td11"><span +class="ectt-1000">\newabbr</span><a + id="dx1-15044"></a> </td><td style="white-space:nowrap; text-align:left;" id="TBL-2-22-2" +class="td11"><span +class="ectt-1000">\newabbreviation</span><a + id="dx1-15045"></a> </td></tr></table></div> + + + + </div><hr class="endfloat" /> + </div> +<!--l. 1563--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2.4 </span> <a + id="sec:predefabbrvstyles"></a>Predefined Abbreviation Styles</h3> +<!--l. 1566--><p class="noindent" >There are two types of abbreviation styles: those that treat the abbreviation as a +regular entry (so that <span +class="ectt-1000">\gls</span><a + id="dx1-16001"></a> uses <span +class="ectt-1000">\glsgenentryfmt</span><a + id="dx1-16002"></a>) and those that don’t treat the +abbreviation as a regular entry (so that <span +class="ectt-1000">\gls</span><a + id="dx1-16003"></a> uses <span +class="ectt-1000">\glsxtrgenabbrvfmt</span><a + id="dx1-16004"></a>). +</p><!--l. 1571--><p class="indent" > The regular entry abbreviation styles set the <span +class="ecss-1000">regular</span><a + id="dx1-16005"></a> attribute to “true” for the +category assigned to each abbreviation with that style. This means that on <a + id="dx1-16006"></a><a +href="#glo:firstuse">first use</a>, +<span +class="ectt-1000">\gls</span><a + id="dx1-16007"></a> uses the value of the <span +class="ecss-1000">first</span><a + id="dx1-16008"></a> field and on subsequent use <span +class="ectt-1000">\gls</span><a + id="dx1-16009"></a> uses the value of the +<span +class="ecss-1000">text</span><a + id="dx1-16010"></a> field (and analogously for the plural and case-changing versions). The <span +class="ecss-1000">short</span><a + id="dx1-16011"></a> and +<span +class="ecss-1000">long</span><a + id="dx1-16012"></a> fields are set as appropriate and may be accessed through commands like +<span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-16013"></a>. +</p><!--l. 1580--><p class="indent" > The other abbreviation styles don’t modify the <span +class="ecss-1000">regular</span><a + id="dx1-16014"></a> attribute. The <span +class="ecss-1000">first</span><a + id="dx1-16015"></a> +and <span +class="ecss-1000">text</span><a + id="dx1-16016"></a> fields (and their plural forms) are set and can be accessed through +commands like <span +class="ectt-1000">\glsfirst</span>, but they aren’t used by commands like <span +class="ectt-1000">\gls</span><a + id="dx1-16017"></a>, which +instead use the short form (stored in the <span +class="ecss-1000">short</span><a + id="dx1-16018"></a> key) and the display full +format (through commands like <span +class="ectt-1000">\glsxtrfullformat</span><a + id="dx1-16019"></a> that are defined by the +style). +</p><!--l. 1588--><p class="indent" > In both cases, the <a + id="dx1-16020"></a>first use of <span +class="ectt-1000">\gls</span><a + id="dx1-16021"></a> may not match the text produced by +<span +class="ectt-1000">\glsfirst</span><a + id="dx1-16022"></a> (and likewise for the plural and case-changing versions). +</p><!--l. 1592--><p class="indent" > <div class="important" title="Important Note"> For the “sc” styles that use <span +class="ectt-1000">\textsc</span><a + id="dx1-16023"></a>, 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 <span +class="ecss-1000">fontenc</span><a + id="dx1-16024"></a> package with the <span +class="ecss-1000">T1</span> +option or something similar. </div> +</p><!--l. 1598--><p class="noindent" > +</p><!--l. 1600--><p class="indent" > The “sc” styles all use +</p><!--l. 1601--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrscfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-16025"></a> <span +class="ectt-1000">\glsxtrscfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1603--><p class="noindent" > +which is defined as + + + +</p> + <div class="verbatim" id="verbatim-40"> +\newcommand*{\glsxtrscfont}[1]{\textsc{#1}} +</div> +<!--l. 1607--><p class="nopar" > The default plural suffix for the short form is set to +</p><!--l. 1609--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrscsuffix</span><span +class="ectt-0900"> </span></span><a + id="dx1-16026"></a> <span +class="ectt-1000">\glsxtrscsuffix </span></div><hr> +</p><!--l. 1611--><p class="noindent" > +This just defined as + + + +</p> + <div class="verbatim" id="verbatim-41"> +\newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}} +</div> +<!--l. 1615--><p class="nopar" > The <span +class="ectt-1000">\glstextup</span><a + id="dx1-16027"></a> command is provided by <span +class="ecss-1000">glossaries</span><a + id="dx1-16028"></a> and is used to switch off the +small caps font for the suffix. If you override the default short plural using the +<span +class="ecss-1000">shortplural</span><a + id="dx1-16029"></a> 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 <span +class="ecss-1000">aposplural</span><a + id="dx1-16030"></a> and <span +class="ecss-1000">noshortplural</span><a + id="dx1-16031"></a> +attributes. See <a +href="#sec:categories">§4 </a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a> for further details.) +</p><!--l. 1626--><p class="indent" > The “sm” styles all use +</p><!--l. 1627--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrsmfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-16032"></a> <span +class="ectt-1000">\glsxtrsmfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1629--><p class="noindent" > +This is defined as: + + + +</p> + <div class="verbatim" id="verbatim-42"> +\newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} +</div> +<!--l. 1633--><p class="nopar" > If you want to use this, you must explicitly load the <span +class="ecss-1000">relsize</span><a + id="dx1-16033"></a> package which defines the +<span +class="ectt-1000">\textsmaller</span><a + id="dx1-16034"></a> command. If you want to easily switch between the “sc” and “sm” +styles, you may find it easier to redefine this command to convert to upper +case: + + + +</p> + <div class="verbatim" id="verbatim-43"> +\renewcommand*{\glsxtrsmfont}[1]{\textsmaller{\MakeTextUppercase{#1}}} +</div> +<!--l. 1640--><p class="nopar" > The default plural suffix for the short form is set to +</p><!--l. 1642--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrsmsuffix</span><span +class="ectt-0900"> </span></span><a + id="dx1-16035"></a> <span +class="ectt-1000">\glsxtrsmsuffix </span></div><hr> +</p><!--l. 1644--><p class="noindent" > +This just does <span +class="ectt-1000">\glspluralsuffix</span><a + id="dx1-16036"></a>. +</p><!--l. 1647--><p class="indent" > The “em” styles all redefine <span +class="ectt-1000">\glsabbrvfont</span><a + id="dx1-16037"></a> to use <span +class="ectt-1000">\emph</span><a + id="dx1-16038"></a>. This is done explicitly +and not through a helper command such as <span +class="ectt-1000">\glsxtrscfont</span>. +</p><!--l. 1651--><p class="indent" > Some of the styles use +</p><!--l. 1652--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrfullsep</span><span +class="ectt-0900"> </span></span><a + id="dx1-16039"></a> <span +class="ectt-1000">\glsxtrfullsep{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 1654--><p class="noindent" > +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: + + + +</p> + <div class="verbatim" id="verbatim-44"> +\renewcommand*{\glsxtrfullsep}[1]{~} +</div> +<!--l. 1659--><p class="nopar" > or + + + +</p> + <div class="verbatim" id="verbatim-45"> +\renewcommand*{\glsxtrfullsep}[1]{\glsacspace{#1}} +</div> +<!--l. 1663--><p class="nopar" > +</p><!--l. 1666--><p class="noindent" > +</p> +<!--l. 1666--><p class="noindent" ><a +href="#top">Top</a><h4 class="subsectionHead"></p><h4 class="subsectionHead"><span class="titlemark">2.4.1 </span> <a + id="sec:predefregabbrvstyles"></a>Predefined Abbreviation Styles that Set the Regular Attribute</h4> +<!--l. 1669--><p class="noindent" >The following abbreviation styles set the <span +class="ecss-1000">regular</span><a + id="dx1-17001"></a> attribute to “true” for all categories +that have abbreviations defined with any of these styles. + </p><dl class="description"><dt class="description"> +<span +class="ecsx-1000">short</span><a + id="dx1-17002"></a> </dt><dd +class="description">This only displays the short form on <a + id="dx1-17003"></a><a +href="#glo:firstuse">first use</a>. The <span +class="ecss-1000">name</span><a + id="dx1-17004"></a> is set to the + short form. The <span +class="ecss-1000">description</span><a + id="dx1-17005"></a> is set to the long form. The inline full form + displays ⟨<span +class="ecti-1000">short</span>⟩ (⟨<span +class="ecti-1000">long</span>⟩). The long form on its own can be displayed through + commands like <span +class="ectt-1000">\glsxtrlong</span><a + id="dx1-17006"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-sc</span><a + id="dx1-17007"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short</span><a + id="dx1-17008"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-17009"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-sm</span><a + id="dx1-17010"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short</span><a + id="dx1-17011"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-17012"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-em</span><a + id="dx1-17013"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short</span><a + id="dx1-17014"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\emph</span><a + id="dx1-17015"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-desc</span><a + id="dx1-17016"></a> </dt><dd +class="description">Like the <span +class="ecss-1000">short</span><a + id="dx1-17017"></a> style, but the <span +class="ecss-1000">name</span><a + id="dx1-17018"></a> is set to the full form + and the <span +class="ecss-1000">description</span><a + id="dx1-17019"></a> must be supplied by the user. You may prefer + to use the <span +class="ecss-1000">short</span><a + id="dx1-17020"></a> style with the post-description hook set to display + the long form and override the <span +class="ecss-1000">description</span><a + id="dx1-17021"></a> key. (See the sample file + <span +class="ectt-1000">sample-acronym-desc.tex</span>.) + </dd><dt class="description"> +<span +class="ecsx-1000">short-sc-desc</span><a + id="dx1-17022"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short</span><a + id="dx1-17023"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-17024"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-sm-desc</span><a + id="dx1-17025"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short-desc</span><a + id="dx1-17026"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-17027"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-em-desc</span><a + id="dx1-17028"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short-desc</span><a + id="dx1-17029"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\emph</span><a + id="dx1-17030"></a>. + + + + </dd><dt class="description"> +<span +class="ecsx-1000">long-desc</span><a + id="dx1-17031"></a> </dt><dd +class="description">This style only displays the long form, regardless of first or + subsequent use of commands <span +class="ectt-1000">\gls</span><a + id="dx1-17032"></a>. The short form may be accessed + through commands like <span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-17033"></a>. The inline full form displays ⟨<span +class="ecti-1000">long</span>⟩ + (⟨<span +class="ecti-1000">short</span>⟩). + <!--l. 1719--><p class="noindent" >The <span +class="ecss-1000">name</span><a + id="dx1-17034"></a> is set to the long form and the <span +class="ecss-1000">description</span><a + id="dx1-17035"></a> 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 ⟨<span +class="ecti-1000">long</span>⟩ (⟨<span +class="ecti-1000">short</span>⟩). + </p></dd><dt class="description"> +<span +class="ecsx-1000">long-desc-sc</span><a + id="dx1-17036"></a> </dt><dd +class="description">Like the <span +class="ecss-1000">long-desc</span><a + id="dx1-17037"></a> style but the short form (accessed through + commands like <span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-17038"></a>) use <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-17039"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-desc-sm</span><a + id="dx1-17040"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long-desc</span><a + id="dx1-17041"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-17042"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-desc-em</span><a + id="dx1-17043"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long-desc</span><a + id="dx1-17044"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\emph</span><a + id="dx1-17045"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long</span><a + id="dx1-17046"></a> </dt><dd +class="description">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 <span +class="ecss-1000">long-desc</span><a + id="dx1-17047"></a> style, but the <span +class="ecss-1000">name</span><a + id="dx1-17048"></a> is set to the short form and the <span +class="ecss-1000">description</span><a + id="dx1-17049"></a> + is set to the long form. + </dd><dt class="description"> +<span +class="ecsx-1000">long-sc</span><a + id="dx1-17050"></a> </dt><dd +class="description">Like the <span +class="ecss-1000">long</span><a + id="dx1-17051"></a> style but the short form (accessed through commands like + <span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-17052"></a>) use <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-17053"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-sm</span><a + id="dx1-17054"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long</span><a + id="dx1-17055"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-17056"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-em</span><a + id="dx1-17057"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long</span><a + id="dx1-17058"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\emph</span><a + id="dx1-17059"></a>. + </dd></dl> +<!--l. 1760--><p class="noindent" > +</p> +<!--l. 1760--><p class="noindent" ><a +href="#top">Top</a><h4 class="subsectionHead"></p><h4 class="subsectionHead"><span class="titlemark">2.4.2 </span> <a + id="sec:predefnonregabbrvstyles"></a>Predefined Abbreviation Styles that Don’t Set the Regular Attribute</h4> +<!--l. 1763--><p class="noindent" >The following abbreviation styles will set the <span +class="ecss-1000">regular</span><a + id="dx1-18001"></a> 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. + + + + </p><dl class="description"><dt class="description"> +<span +class="ecsx-1000">long-short</span><a + id="dx1-18002"></a> </dt><dd +class="description">On <a + id="dx1-18003"></a><a +href="#glo:firstuse">first use</a>, this style uses the format ⟨<span +class="ecti-1000">long</span>⟩ (⟨<span +class="ecti-1000">short</span>⟩). The inline and + display full forms are the same. The <span +class="ecss-1000">name</span><a + id="dx1-18004"></a> is set to the short form. The + <span +class="ecss-1000">description</span><a + id="dx1-18005"></a> is set to the long form. The long and short forms are separated + by <span +class="ectt-1000">\glsxtrfullsep</span>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-short-sc</span><a + id="dx1-18006"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long-short</span><a + id="dx1-18007"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-18008"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-short-sm</span><a + id="dx1-18009"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long-short</span><a + id="dx1-18010"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-18011"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-short-em</span><a + id="dx1-18012"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long-short</span><a + id="dx1-18013"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\emph</span><a + id="dx1-18014"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-short-desc</span><a + id="dx1-18015"></a> </dt><dd +class="description">On <a + id="dx1-18016"></a><a +href="#glo:firstuse">first use</a>, this style uses the format ⟨<span +class="ecti-1000">long</span>⟩ (⟨<span +class="ecti-1000">short</span>⟩). The inline + and display full forms are the same. The <span +class="ecss-1000">name</span><a + id="dx1-18017"></a> is set to the full form. The + <span +class="ecss-1000">description</span><a + id="dx1-18018"></a> must be supplied by the user. The long and short forms are + separated by <span +class="ectt-1000">\glsxtrfullsep</span>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-short-sc-desc</span><a + id="dx1-18019"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long-short-desc</span><a + id="dx1-18020"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-18021"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-short-sm-desc</span><a + id="dx1-18022"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long-short-desc</span><a + id="dx1-18023"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-18024"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">long-short-em-desc</span><a + id="dx1-18025"></a> </dt><dd +class="description">Like <span +class="ecss-1000">long-short-desc</span><a + id="dx1-18026"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\emph</span><a + id="dx1-18027"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-long</span><a + id="dx1-18028"></a> </dt><dd +class="description">On <a + id="dx1-18029"></a>first use, this style uses the format ⟨<span +class="ecti-1000">short</span>⟩ (⟨<span +class="ecti-1000">long</span>⟩). The inline and + display full forms are the same. The <span +class="ecss-1000">name</span><a + id="dx1-18030"></a> is set to the short form. The + <span +class="ecss-1000">description</span><a + id="dx1-18031"></a> is set to the long form. The short and long forms are separated + by <span +class="ectt-1000">\glsxtrfullsep</span>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-sc-long</span><a + id="dx1-18032"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short-long</span><a + id="dx1-18033"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-18034"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-sm-long</span><a + id="dx1-18035"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short-long</span><a + id="dx1-18036"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-18037"></a>. + + + + </dd><dt class="description"> +<span +class="ecsx-1000">short-em-long</span><a + id="dx1-18038"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short-long</span><a + id="dx1-18039"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\emph</span><a + id="dx1-18040"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-long-desc</span><a + id="dx1-18041"></a> </dt><dd +class="description">On <a + id="dx1-18042"></a>first use, this style uses the format ⟨<span +class="ecti-1000">short</span>⟩ (⟨<span +class="ecti-1000">long</span>⟩). The inline + and display full forms are the same. The <span +class="ecss-1000">name</span><a + id="dx1-18043"></a> is set to the full form. The + <span +class="ecss-1000">description</span><a + id="dx1-18044"></a> must be supplied by the user. The short and long forms are + separated by <span +class="ectt-1000">\glsxtrfullsep</span>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-sc-long-desc</span><a + id="dx1-18045"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short-long-desc</span><a + id="dx1-18046"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-18047"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-sm-long-desc</span><a + id="dx1-18048"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short-long-desc</span><a + id="dx1-18049"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-18050"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">short-em-long-desc</span><a + id="dx1-18051"></a> </dt><dd +class="description">Like <span +class="ecss-1000">short-long-desc</span><a + id="dx1-18052"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\emph</span><a + id="dx1-18053"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">footnote</span><a + id="dx1-18054"></a> </dt><dd +class="description">On <a + id="dx1-18055"></a><a +href="#glo:firstuse">first use</a>, this style displays the short form with the long form as a + footnote. This style automatically sets the <span +class="ecss-1000">nohyperfirst</span><a + id="dx1-18056"></a> attribute to “true” + for the supplied category, so the <a + id="dx1-18057"></a>first use won’t be hyperlinked (but the + footnote marker may be, if the <span +class="ecss-1000">hyperref</span><a + id="dx1-18058"></a> package is used). + <!--l. 1852--><p class="noindent" >The inline full form uses the ⟨<span +class="ecti-1000">short</span>⟩ (⟨<span +class="ecti-1000">long</span>⟩) style. The <span +class="ecss-1000">name</span><a + id="dx1-18059"></a> is set to the + short form. The <span +class="ecss-1000">description</span><a + id="dx1-18060"></a> is set to the long form. + </p></dd><dt class="description"> +<span +class="ecsx-1000">footnote-sc</span><a + id="dx1-18061"></a> </dt><dd +class="description">Like <span +class="ecss-1000">footnote</span><a + id="dx1-18062"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-18063"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">footnote-sm</span><a + id="dx1-18064"></a> </dt><dd +class="description">Like <span +class="ecss-1000">footnote</span><a + id="dx1-18065"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-18066"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">footnote-em</span><a + id="dx1-18067"></a> </dt><dd +class="description">Like <span +class="ecss-1000">footnote</span><a + id="dx1-18068"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\emph</span><a + id="dx1-18069"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">postfootnote</span><a + id="dx1-18070"></a> </dt><dd +class="description">This is similar to the <span +class="ecss-1000">footnote</span><a + id="dx1-18071"></a> style but doesn’t modify the + category attribute. Instead it changes <span +class="ectt-1000">\glsxtrpostlink</span>⟨<span +class="ecti-1000">category</span>⟩<a + id="dx1-18072"></a> to insert + the footnote after the <a + id="dx1-18073"></a><a +href="#glo:linktext">link-text</a> on <a + id="dx1-18074"></a>first use. This will also defer the + footnote until after any following punctuation character that’s recognised + by <span +class="ectt-1000">\glsxtrifnextpunc</span><a + id="dx1-18075"></a>. + <!--l. 1876--><p class="noindent" >The inline full form uses the ⟨<span +class="ecti-1000">short</span>⟩ (⟨<span +class="ecti-1000">long</span>⟩) style. The <span +class="ecss-1000">name</span><a + id="dx1-18076"></a> is set to the + short form. The <span +class="ecss-1000">description</span><a + id="dx1-18077"></a> is set to the long form. + + + + </p></dd><dt class="description"> +<span +class="ecsx-1000">postfootnote-sc</span><a + id="dx1-18078"></a> </dt><dd +class="description">Like <span +class="ecss-1000">postfootnote</span><a + id="dx1-18079"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrscfont</span><a + id="dx1-18080"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">postfootnote-sm</span><a + id="dx1-18081"></a> </dt><dd +class="description">Like <span +class="ecss-1000">postfootnote</span><a + id="dx1-18082"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use + <span +class="ectt-1000">\glsxtrsmfont</span><a + id="dx1-18083"></a>. + </dd><dt class="description"> +<span +class="ecsx-1000">postfootnote-em</span><a + id="dx1-18084"></a> </dt><dd +class="description">Like <span +class="ecss-1000">postfootnote</span><a + id="dx1-18085"></a> but redefines <span +class="ectt-1000">\glsabbrvfont </span>to use <span +class="ectt-1000">\emph</span><a + id="dx1-18086"></a>. + </dd></dl> +<!--l. 1894--><p class="noindent" > +</p> +<!--l. 1894--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2.5 </span> <a + id="sec:newabbrvstyle"></a>Defining New Abbreviation Styles</h3> +<!--l. 1897--><p class="noindent" >New abbreviation styles may be defined using: +</p><!--l. 1898--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\newabbreviationstyle</span><span +class="ectt-0900"> </span></span><a + id="dx1-19001"></a> <span +class="ectt-1000">\newabbreviationstyle{</span>⟨<span +class="ecit-1000">name</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">setup</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">fmts</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 1900--><p class="noindent" > +where ⟨<span +class="ecti-1000">name</span>⟩ is the name of the new style (as used in the mandatory argument of +<span +class="ectt-1000">\setabbreviationstyle</span><a + id="dx1-19002"></a>). This is similar but not identical to the <span +class="ecss-1000">glossaries</span><a + id="dx1-19003"></a> package’s +<span +class="ectt-1000">\newacronymstyle</span><a + id="dx1-19004"></a> command. +</p><!--l. 1906--><p class="indent" > <div class="important" title="Important Note"> You can’t use styles defined by <span +class="ectt-1000">\newacronymstyle </span>with <span +class="ecss-1000">glossaries-extra</span> +unless you have reverted <span +class="ectt-1000">\newacronym</span><a + id="dx1-19005"></a> back to its generic definition from +<span +class="ecss-1000">glossaries</span><a + id="dx1-19006"></a> (using <span +class="ectt-1000">\RestoreAcronyms</span><a + id="dx1-19007"></a>). The acronym styles from the <span +class="ecss-1000">glossaries</span><a + id="dx1-19008"></a> +package can’t be used with abbreviations defined with <span +class="ectt-1000">\newabbreviation</span>. +</div> +</p><!--l. 1913--><p class="noindent" > +</p><!--l. 1915--><p class="indent" > The ⟨<span +class="ecti-1000">setup</span>⟩ argument deals with the way the entry is defined and may +set attributes for the given abbreviation category. This argument should +redefine +</p><!--l. 1918--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\CustomAbbreviationFields</span><span +class="ectt-0900"> </span></span><a + id="dx1-19009"></a> <span +class="ectt-1000">\CustomAbbreviationFields </span></div><hr> +</p><!--l. 1920--><p class="noindent" > +to set the entry fields including the <span +class="ecss-1000">name</span><a + id="dx1-19010"></a> (defaults to the short form if omitted), +<span +class="ecss-1000">sort</span><a + id="dx1-19011"></a>, <span +class="ecss-1000">first</span><a + id="dx1-19012"></a>, <span +class="ecss-1000">firstplural</span><a + id="dx1-19013"></a>. Other fields may also be set, such as <span +class="ecss-1000">text</span><a + id="dx1-19014"></a>, <span +class="ecss-1000">plural</span><a + id="dx1-19015"></a> and +<span +class="ecss-1000">description</span><a + id="dx1-19016"></a>. +</p><!--l. 1927--><p class="indent" > <div class="important" title="Important Note"> <span +class="ectt-1000">\CustomAbbreviationFields </span>is expanded by <span +class="ectt-1000">\newabbreviation </span>so take care to +protect commands that shouldn’t be expanded. </div> +</p><!--l. 1930--><p class="noindent" > +</p><!--l. 1932--><p class="indent" > For example, the <span +class="ecss-1000">long-short</span><a + id="dx1-19017"></a> style has the following in ⟨<span +class="ecti-1000">setup</span>⟩: + + + +</p> + <div class="verbatim" id="verbatim-46"> +  \renewcommand*{\CustomAbbreviationFields}{% + <br />    name={\protect\glsabbrvfont{\the\glsshorttok}}, + <br />    sort={\the\glsshorttok}, + <br />    first={\protect\glsfirstlongfont{\the\glslongtok}% + <br />     \protect\glsxtrfullsep{\the\glslabeltok}% + <br />     (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + <br />    firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + <br />     \protect\glsxtrfullsep{\the\glslabeltok}% + <br />     (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + <br />    plural={\protect\glsabbvfont{\the\glsshortpltok}},% + <br />    description={\the\glslongtok}}% +</div> +<!--l. 1946--><p class="nopar" > Note that the <span +class="ecss-1000">first</span><a + id="dx1-19018"></a> and <span +class="ecss-1000">firstplural</span><a + id="dx1-19019"></a> are set even though they’re not used by +<span +class="ectt-1000">\gls</span>. +</p><!--l. 1950--><p class="indent" > The ⟨<span +class="ecti-1000">setup</span>⟩ argument may also redefine +</p><!--l. 1951--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrPostNewAbbreviation</span><span +class="ectt-0900"> </span></span><a + id="dx1-19020"></a> <span +class="ectt-1000">\GlsXtrPostNewAbbreviation </span></div><hr> +</p><!--l. 1953--><p class="noindent" > +which can be used to assign attributes. (This will automatically be initialised to do +nothing.) +</p><!--l. 1957--><p class="indent" > For example, the <span +class="ecss-1000">footnote</span><a + id="dx1-19021"></a> includes the following in ⟨<span +class="ecti-1000">setup</span>⟩: + + + +</p> + <div class="verbatim" id="verbatim-47"> +  \renewcommand*{\GlsXtrPostNewAbbreviation}{% + <br />    \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + <br />    \glshasattribute{\the\glslabeltok}{regular}% + <br />    {% + <br />      \glssetattribute{\the\glslabeltok}{regular}{false}% + <br />    }% + <br />    {}% + <br />  }% +</div> +<!--l. 1968--><p class="nopar" > This sets the <span +class="ecss-1000">nohyperfirst</span><a + id="dx1-19022"></a> attribute to “true”. It also unsets the <span +class="ecss-1000">regular</span><a + id="dx1-19023"></a> attribute if it +has previously been set. Note that the <span +class="ecss-1000">nohyperfirst</span><a + id="dx1-19024"></a> attribute doesn’t get unset by +other styles, so take care not to switch styles for the same category. +</p><!--l. 1975--><p class="indent" > You can access the short, long, short plural and long plural values through the +following token registers. +</p><!--l. 1978--><p class="indent" > Short value (defined by <span +class="ecss-1000">glossaries</span><a + id="dx1-19025"></a>): +</p><!--l. 1979--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsshorttok</span><span +class="ectt-0900"> </span></span><a + id="dx1-19026"></a> <span +class="ectt-1000">\glsshorttok </span></div><hr> +</p><!--l. 1981--><p class="noindent" > +</p><!--l. 1983--><p class="indent" > Short plural value (defined by <span +class="ecss-1000">glossaries-extra</span>): +</p><!--l. 1984--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsshortpltok</span><span +class="ectt-0900"> </span></span><a + id="dx1-19027"></a> <span +class="ectt-1000">\glsshortpltok </span></div><hr> +</p><!--l. 1986--><p class="noindent" > +(This may be the default value or, if provided, the value provided by the user +through the <span +class="ecss-1000">shortplural</span><a + id="dx1-19028"></a> key in the optional argument of <span +class="ectt-1000">\newabbreviation</span><a + id="dx1-19029"></a>.) +</p><!--l. 1991--><p class="indent" > Long value (defined by <span +class="ecss-1000">glossaries</span><a + id="dx1-19030"></a>): +</p><!--l. 1992--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glslongtok</span><span +class="ectt-0900"> </span></span><a + id="dx1-19031"></a> <span +class="ectt-1000">\glslongtok </span></div><hr> +</p><!--l. 1994--><p class="noindent" > +</p><!--l. 1996--><p class="indent" > Long plural value (defined by <span +class="ecss-1000">glossaries-extra</span>): +</p><!--l. 1997--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glslongpltok</span><span +class="ectt-0900"> </span></span><a + id="dx1-19032"></a> <span +class="ectt-1000">\glslongpltok </span></div><hr> +</p><!--l. 1999--><p class="noindent" > +(This may be the default value or, if provided, the value provided by the user +through the <span +class="ecss-1000">longplural</span><a + id="dx1-19033"></a> key in the optional argument of <span +class="ectt-1000">\newabbreviation</span><a + id="dx1-19034"></a>.) +</p><!--l. 2004--><p class="indent" > There are two other registers available that are defined by <span +class="ecss-1000">glossaries</span><a + id="dx1-19035"></a>: +</p><!--l. 2007--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glslabeltok</span><span +class="ectt-0900"> </span></span><a + id="dx1-19036"></a> <span +class="ectt-1000">\glslabeltok </span></div><hr> +</p><!--l. 2009--><p class="noindent" > +which contains the entry’s label and +</p><!--l. 2011--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glskeylisttok</span><span +class="ectt-0900"> </span></span><a + id="dx1-19037"></a> <span +class="ectt-1000">\glskeylisttok </span></div><hr> +</p><!--l. 2013--><p class="noindent" > +which contains the values provided in the optional argument of <span +class="ectt-1000">\newabbreviation</span><a + id="dx1-19038"></a>. +</p><!--l. 2017--><p class="indent" > Remember put <span +class="ectt-1000">\the </span>in front of the register command as in the examples above. +The category label can be access through the command (not a register): +</p><!--l. 2020--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glscategorylabel</span><span +class="ectt-0900"> </span></span><a + id="dx1-19039"></a> <span +class="ectt-1000">\glscategorylabel </span></div><hr> + + + +</p><!--l. 2022--><p class="noindent" > +This may be used inside the definition of <span +class="ectt-1000">\GlsXtrPostNewAbbreviation</span>. +</p><!--l. 2026--><p class="indent" > If you want to base a style on an existing style, you can use +</p><!--l. 2027--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrUseAbbrStyleSetup</span><span +class="ectt-0900"> </span></span><a + id="dx1-19040"></a> <span +class="ectt-1000">\GlsXtrUseAbbrStyleSetup{</span>⟨<span +class="ecit-1000">name</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2029--><p class="noindent" > +where ⟨<span +class="ecti-1000">name</span>⟩ is the name of the existing style. For example, the <span +class="ecss-1000">footnote-sc</span><a + id="dx1-19041"></a> and +<span +class="ecss-1000">footnote-sm</span><a + id="dx1-19042"></a> styles both simply use + + + +</p> + <div class="verbatim" id="verbatim-48"> +\GlsXtrUseAbbrStyleSetup{footnote} +</div> +<!--l. 2035--><p class="nopar" > within ⟨<span +class="ecti-1000">setup</span>⟩. +</p><!--l. 2038--><p class="indent" > The ⟨<span +class="ecti-1000">fmts</span>⟩ argument deals with the way the entry is displayed in the document. +This argument should redefine the following commands: +</p><!--l. 2042--><p class="indent" > The default suffix for the plural short form (if not overridden by the <span +class="ecss-1000">shortplural</span><a + id="dx1-19043"></a> +key): +</p><!--l. 2044--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\abbrvpluralsuffix</span><span +class="ectt-0900"> </span></span><a + id="dx1-19044"></a> <span +class="ectt-1000">\abbrvpluralsuffix </span></div><hr> +</p><!--l. 2046--><p class="noindent" > +(Note that this isn’t used for the plural long form, which just uses the regular +<span +class="ectt-1000">\glspluralsuffix</span>.) +</p><!--l. 2050--><p class="indent" > The font used for the short form on <a + id="dx1-19045"></a><a +href="#glo:firstuse">first use</a> or in the full forms: +</p><!--l. 2051--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfirstabbrvfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-19046"></a> <span +class="ectt-1000">\glsfirstabbrvfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2053--><p class="noindent" > +</p><!--l. 2055--><p class="indent" > The font used for the short form on subsequent use or through commands like +<span +class="ectt-1000">\glsxtrshort</span><a + id="dx1-19047"></a>: +</p><!--l. 2057--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsabbrvfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-19048"></a> <span +class="ectt-1000">\glsabbrvfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2059--><p class="noindent" > +</p><!--l. 2061--><p class="indent" > The font used for the long form on <a + id="dx1-19049"></a>first use or in the full forms: +</p><!--l. 2062--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfirstlongfont</span><span +class="ectt-0900"> </span></span><a + id="dx1-19050"></a> <span +class="ectt-1000">\glsfirstlongfont{</span>⟨<span +class="ecit-1000">text</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2064--><p class="noindent" > +</p><!--l. 2066--><p class="indent" > Display full form singular no case-change (used by <span +class="ectt-1000">\gls</span><a + id="dx1-19051"></a> on <a + id="dx1-19052"></a>first use for +abbreviations without the <span +class="ecss-1000">regular</span><a + id="dx1-19053"></a> attribute set): +</p><!--l. 2069--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrfullformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-19054"></a> <span +class="ectt-1000">\glsxtrfullformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2071--><p class="noindent" > +</p><!--l. 2073--><p class="indent" > Display full form singular first letter converted to upper case (used by <span +class="ectt-1000">\Gls</span><a + id="dx1-19055"></a> on +<a + id="dx1-19056"></a>first use for abbreviations without the <span +class="ecss-1000">regular</span><a + id="dx1-19057"></a> attribute set): +</p><!--l. 2076--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrfullformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-19058"></a> <span +class="ectt-1000">\Glsxtrfullformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2078--><p class="noindent" > +</p><!--l. 2080--><p class="indent" > Display full form plural no case-change (used by <span +class="ectt-1000">\glspl</span><a + id="dx1-19059"></a> on <a + id="dx1-19060"></a>first use for +abbreviations without the <span +class="ecss-1000">regular</span><a + id="dx1-19061"></a> attribute set): +</p><!--l. 2083--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrfullplformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-19062"></a> <span +class="ectt-1000">\glsxtrfullplformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2085--><p class="noindent" > +</p><!--l. 2087--><p class="indent" > Display full form plural first letter converted to upper case (used by <span +class="ectt-1000">\Glspl</span><a + id="dx1-19063"></a> on +<a + id="dx1-19064"></a>first use for abbreviations without the <span +class="ecss-1000">regular</span><a + id="dx1-19065"></a> attribute set): + + + +</p><!--l. 2090--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrfullplformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-19066"></a> <span +class="ectt-1000">\Glsxtrfullplformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2092--><p class="noindent" > +</p><!--l. 2094--><p class="indent" > In addition ⟨<span +class="ecti-1000">fmts</span>⟩ 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. +</p><!--l. 2098--><p class="indent" > Inline singular no case-change (used by <span +class="ectt-1000">\glsentryfull</span><a + id="dx1-19067"></a>, <span +class="ectt-1000">\glsxtrfull</span><a + id="dx1-19068"></a> and +<span +class="ectt-1000">\GLSxtrfull</span><a + id="dx1-19069"></a>): +</p><!--l. 2100--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrinlinefullformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-19070"></a> <span +class="ectt-1000">\glsxtrinlinefullformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2102--><p class="noindent" > +</p><!--l. 2104--><p class="indent" > Inline singular first letter converted to upper case (used by <span +class="ectt-1000">\Glsentryfull</span><a + id="dx1-19071"></a> and +<span +class="ectt-1000">\Glsxtrfull</span><a + id="dx1-19072"></a>): +</p><!--l. 2106--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrinlinefullformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-19073"></a> <span +class="ectt-1000">\Glsxtrinlinefullformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2108--><p class="noindent" > +</p><!--l. 2110--><p class="indent" > Inline plural no case-change (used by <span +class="ectt-1000">\glsentryfullpl</span><a + id="dx1-19074"></a>, <span +class="ectt-1000">\glsxtrfullpl</span><a + id="dx1-19075"></a> and +<span +class="ectt-1000">\GLSxtrfullpl</span><a + id="dx1-19076"></a>): +</p><!--l. 2112--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrinlinefullplformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-19077"></a> <span +class="ectt-1000">\glsxtrinlinefullplformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2114--><p class="noindent" > +</p><!--l. 2116--><p class="indent" > Inline plural first letter converted to upper case (used by <span +class="ectt-1000">\Glsentryfullpl</span><a + id="dx1-19078"></a> and +<span +class="ectt-1000">\Glsxtrfullpl</span><a + id="dx1-19079"></a>): +</p><!--l. 2118--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrinlinefullplformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-19080"></a> <span +class="ectt-1000">\Glsxtrinlinefullplformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2120--><p class="noindent" > +</p><!--l. 2122--><p class="indent" > If you want to provide support for <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-19081"></a> use the following +<span +class="ectt-1000">\glsaccess</span>⟨<span +class="ecit-1000">xxx</span>⟩ commands (<a +href="#sec:accsupp">§8.2 </a><a +href="#sec:accsupp">Accessibility Support<!--tex4ht:ref: sec:accsupp --></a>) within the definitions of +<span +class="ectt-1000">\glsxtrfullformat </span>etc instead of the analogous <span +class="ectt-1000">\glsentry</span>⟨<span +class="ecti-1000">xxx</span>⟩ commands. (If you +don’t use <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-19082"></a>, they will just do the corresponding <span +class="ectt-1000">\glsentry</span>⟨<span +class="ecti-1000">xxx</span>⟩ +command.) +</p><!--l. 2130--><p class="indent" > For example, the <span +class="ecss-1000">short-long</span><a + id="dx1-19083"></a> style has the following in ⟨<span +class="ecti-1000">fmts</span>⟩: + + + +</p> + <div class="verbatim" id="verbatim-49"> +  \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + <br />  \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% + <br />  \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + <br />  \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + <br />  \renewcommand*{\glsxtrfullformat}[2]{% + <br />    \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + <br />    (\glsfirstlongfont{\glsaccesslong{##1}})% + <br />  }% + <br />  \renewcommand*{\glsxtrfullplformat}[2]{% + <br />    \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + <br />    (\glsfirstlongfont{\glsaccesslongpl{##1}})% + <br />  }% + <br />  \renewcommand*{\Glsxtrfullformat}[2]{% + <br />    \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + <br />    (\glsfirstlongfont{\glsaccesslong{##1}})% + <br />  }% + <br />  \renewcommand*{\Glsxtrfullplformat}[2]{% + <br />    \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + <br />    (\glsfirstlongfont{\glsaccesslongpl{##1}})% + <br />  }% +</div> +<!--l. 2153--><p class="nopar" > Since the inline full commands aren’t redefined, they default to the same as the +display versions. +</p><!--l. 2157--><p class="indent" > If you want to base a style on an existing style, you can use +</p><!--l. 2158--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrUseAbbrStyleFmts</span><span +class="ectt-0900"> </span></span><a + id="dx1-19084"></a> <span +class="ectt-1000">\GlsXtrUseAbbrStyleFmts{</span>⟨<span +class="ecit-1000">name</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2160--><p class="noindent" > +within ⟨<span +class="ecti-1000">fmts</span>⟩, where ⟨<span +class="ecti-1000">name</span>⟩ is the name of the existing style. For example, the +<span +class="ecss-1000">short-sc-long</span><a + id="dx1-19085"></a> style has the following in ⟨<span +class="ecti-1000">fmts</span>⟩: + + + +</p> + <div class="verbatim" id="verbatim-50"> +  \GlsXtrUseAbbrStyleFmts{short-long}% + <br />  \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + <br />  \renewcommand*{\glsabbrvfont}[1]{\glsxtrscfont{##1}}% +</div> +<!--l. 2168--><p class="nopar" > and the <span +class="ecss-1000">short-sm-long</span><a + id="dx1-19086"></a> style has: + + + +</p> + <div class="verbatim" id="verbatim-51"> +  \GlsXtrUseAbbrStyleFmts{short-long-desc}% + <br />  \renewcommand*{\glsabbrvfont}[1]{\glsxtrsmfont{##1}}% + <br />  \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +</div> +<!--l. 2174--><p class="nopar" > +</p><!--l. 2176--><p class="indent" > The simplest examples of creating a new style based on an existing style are the +“em” styles, such as the <span +class="ecss-1000">short-em-long</span><a + id="dx1-19087"></a> style, which is defined as: + + + +</p> + <div class="verbatim" id="verbatim-52"> +\newabbreviationstyle + <br />{short-em-long}% label + <br />{% setup + <br />  \GlsXtrUseAbbrStyleSetup{short-long}% + <br />}% + <br />{% fmts + <br />  \GlsXtrUseAbbrStyleFmts{short-long}% + <br />  \renewcommand*{\glsabbrvfont}[1]{\emph{##1}}% + <br />} +</div> +<!--l. 2189--><p class="nopar" > + + + +</p> +<!--l. 2191--><p class="indent" > </div> +</p><!--l. 2191--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">3. <a + id="sec:headtitle"></a>Entries in Sectioning Titles, Headers and Contents</h2> +</p><!--l. 2194--><p class="indent" > The <span +class="ecss-1000">glossaries</span><a + id="dx1-20001"></a> user manual cautions against using commands like <span +class="ectt-1000">\gls </span>in chapter +or section titles. The principle problems are: </p> + <ul class="itemize1"> + <li class="itemize">if you have a table of contents, the <a + id="dx1-20002"></a><a +href="#glo:firstuseflag">first use flag</a> will be unset in the contents + rather than later in the document; + </li> + <li class="itemize">if you have the location lists displayed in the glossary, unwanted locations + will be added to it corresponding to the table of contents (if present) and + every page that contains the entry in the page header (if the page style in + use adds the chapter or section title to the header); + </li> + <li class="itemize">if the page style in use adds the chapter or section title to the header and + attempts to convert it to upper case, the entry label (in the argument + of <span +class="ectt-1000">\gls </span>etc) will be converted to upper case and the entry won’t be + recognised; + </li> + <li class="itemize">if you use <span +class="ecss-1000">hyperref</span><a + id="dx1-20003"></a>, commands like <span +class="ectt-1000">\gls </span>can’t be expanded to a simple + string and only the label will appear in the PDF bookmark (with a warning + from <span +class="ecss-1000">hyperref</span><a + id="dx1-20004"></a>); + </li> + <li class="itemize">if you use <span +class="ecss-1000">hyperref</span><a + id="dx1-20005"></a>, you will end up with nested hyperlinks in the table of + contents.</li></ul> +<!--l. 2216--><p class="indent" > To get around all these problems, the <span +class="ecss-1000">glossaries</span><a + id="dx1-20006"></a> user manual recommends using +the expandable non-hyperlink commands, like <span +class="ectt-1000">\glsentrytext</span><a + id="dx1-20007"></a> (for regular entries) or +<span +class="ectt-1000">\glsentryshort</span><a + id="dx1-20008"></a> (for abbreviations). This is the simplest solution, but doesn’t allow +for special formatting that’s applied to the entry through commands like <span +class="ectt-1000">\glstext </span>or +<span +class="ectt-1000">\glsxtrshort</span>. This means that if, for example, you are using one of the abbreviation +styles that uses <span +class="ectt-1000">\textsc</span><a + id="dx1-20009"></a> then the short form displayed with <span +class="ectt-1000">\glsentryshort </span>won’t +use small caps. If you only have one abbreviation style in use, you can explicitly +enclose <span +class="ectt-1000">\glsentryshort{</span>⟨<span +class="ecti-1000">label</span>⟩<span +class="ectt-1000">} </span>in the argument of <span +class="ectt-1000">\glsabbrvfont</span>, like +this: + + + +</p> + <div class="verbatim" id="verbatim-53"> +\chapter{A Chapter about \glsabbrvfont{\glsentryshort{html}}} +</div> +<!--l. 2229--><p class="nopar" > Or, if you are using <span +class="ecss-1000">hyperref</span><a + id="dx1-20010"></a>: + + + +</p> + <div class="verbatim" id="verbatim-54"> +\chapter{A Chapter about + <br />\texorpdfstring{\glsabbrvfont{\glsentryshort{html}}}{\glsentryshort{html}}} +</div> +<!--l. 2234--><p class="nopar" > +</p><!--l. 2236--><p class="indent" > 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 +<span +class="ectt-1000">\gls </span>and <span +class="ectt-1000">\glsxtrshort </span>redefine <span +class="ectt-1000">\glsabbrvfont </span>to match the entry’s style before +displaying it. In this case, the above example doesn’t take into account the shifting +definitions of <span +class="ectt-1000">\glsabbrvfont </span>and will use whatever happens to be the last +abbreviation style in use. More complicated solutions interfere with the upper casing +used by the standard page styles that display the chapter or section title in the page +header using <span +class="ectt-1000">\MakeUppercase</span><a + id="dx1-20011"></a>. +</p><!--l. 2247--><p class="indent" > The <span +class="ecss-1000">glossaries-extra </span>package tries to resolve this by modifying <span +class="ectt-1000">\markright</span><a + id="dx1-20012"></a> and +<span +class="ectt-1000">\markboth</span><a + id="dx1-20013"></a>. If you don’t like this change, you can restore their former definitions +using +</p><!--l. 2250--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrRevertMarks</span><span +class="ectt-0900"> </span></span><a + id="dx1-20014"></a> <span +class="ectt-1000">\glsxtrRevertMarks </span></div><hr> +</p><!--l. 2252--><p class="noindent" > +In this case, you’ll have to use the <span +class="ecss-1000">glossaries</span><a + id="dx1-20015"></a> manual’s recommendations of either +simply using <span +class="ectt-1000">\glsentryshort </span>(as above) or use the sectioning command’s option +argument to provide an alternative for the table of contents and page header. For +example: + + + +</p> + <div class="verbatim" id="verbatim-55"> +\chapter[A Chapter about \glsentryshort{html}]{A Chapter about + <br />\gls{html}} +</div> +<!--l. 2260--><p class="nopar" > +</p><!--l. 2262--><p class="indent" > If you don’t revert the mark commands back with <span +class="ectt-1000">\glsxtrRevertMarks</span>, 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. +</p><!--l. 2268--><p class="indent" > The commands listed below all use <span +class="ectt-1000">\texorpdfstring</span><a + id="dx1-20016"></a> if <span +class="ecss-1000">hyperref</span><a + id="dx1-20017"></a> 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. +</p><!--l. 2274--><p class="indent" > These commands essentially behave as though you have used <span +class="ectt-1000">\glsxtrshort </span>(or +equivalent) with the options <span +class="ecss-1000">noindex</span><a + id="dx1-20018"></a> and <span +class="ecss-1000">hyper=false</span><a + id="dx1-20019"></a>. 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 <span +class="ecss-1000">headuc</span><a + id="dx1-20020"></a> attribute to “true” for the +appropriate category. +</p><!--l. 2282--><p class="indent" > <div class="important" title="Important Note"> If you use one of the <span +class="ectt-1000">\textsc</span><a + id="dx1-20021"></a> 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 +heading style uses italic, the abbreviation may appear in upright small-caps, +<span +class="ecti-1000">even if you have set the </span><span +class="ecsi-1000">headuc</span><a + id="dx1-20022"></a> <span +class="ecti-1000">attribute </span>since the all-capitals form still uses +<span +class="ectt-1000">\glsabbrvfont</span>. You may want to consider using the <span +class="ecss-1000">slantsc</span><a + id="dx1-20023"></a> package in this case. +</div> +</p><!--l. 2293--><p class="noindent" > +</p><!--l. 2295--><p class="indent" > Display the short form: +</p><!--l. 2296--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfmtshort</span><span +class="ectt-0900"> </span></span><a + id="dx1-20024"></a> <span +class="ectt-1000">\glsfmtshort{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2298--><p class="noindent" > +</p><!--l. 2300--><p class="indent" > Display the plural short form: +</p><!--l. 2301--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfmtshortpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-20025"></a> <span +class="ectt-1000">\glsfmtshortpl{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2303--><p class="noindent" > +</p><!--l. 2305--><p class="indent" > First letter upper case singular short form: +</p><!--l. 2306--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsfmtshort</span><span +class="ectt-0900"> </span></span><a + id="dx1-20026"></a> <span +class="ectt-1000">\Glsfmtshort{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2308--><p class="noindent" > +(No case-change applied to PDF bookmarks.) +</p><!--l. 2311--><p class="indent" > First letter upper case plural short form: +</p><!--l. 2312--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsfmtshortpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-20027"></a> <span +class="ectt-1000">\Glsfmtshortpl{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> + + + +</p><!--l. 2314--><p class="noindent" > +(No case-change applied to PDF bookmarks.) +</p><!--l. 2317--><p class="indent" > There are also equivalent commands for the value of the <span +class="ecss-1000">text</span><a + id="dx1-20028"></a> field: +</p><!--l. 2319--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfmttext</span><span +class="ectt-0900"> </span></span><a + id="dx1-20029"></a> <span +class="ectt-1000">\glsfmttext{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2321--><p class="noindent" > +</p><!--l. 2323--><p class="indent" > First letter converted to upper case: +</p><!--l. 2324--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsfmttext</span><span +class="ectt-0900"> </span></span><a + id="dx1-20030"></a> <span +class="ectt-1000">\Glsfmttext{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2326--><p class="noindent" > +(No case-change applied to PDF bookmarks.) +</p><!--l. 2329--><p class="indent" > The plural equivalents: +</p><!--l. 2330--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfmtplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-20031"></a> <span +class="ectt-1000">\glsfmtplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2332--><p class="noindent" > +and +</p><!--l. 2334--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsfmtplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-20032"></a> <span +class="ectt-1000">\Glsfmtplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2336--><p class="noindent" > +</p><!--l. 2338--><p class="indent" > Similarly for the value of the <span +class="ecss-1000">first</span><a + id="dx1-20033"></a> field: +</p><!--l. 2340--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfmtfirst</span><span +class="ectt-0900"> </span></span><a + id="dx1-20034"></a> <span +class="ectt-1000">\glsfmtfirst{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2342--><p class="noindent" > +</p><!--l. 2344--><p class="indent" > First letter converted to upper case: +</p><!--l. 2345--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsfmtfirst</span><span +class="ectt-0900"> </span></span><a + id="dx1-20035"></a> <span +class="ectt-1000">\Glsfmtfirst{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2347--><p class="noindent" > +(No case-change applied to PDF bookmarks.) +</p><!--l. 2350--><p class="indent" > The plural equivalents: +</p><!--l. 2351--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsfmtfirstpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-20036"></a> <span +class="ectt-1000">\glsfmtfirstpl{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2353--><p class="noindent" > +and +</p><!--l. 2355--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsfmtfirstpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-20037"></a> <span +class="ectt-1000">\Glsfmtfirstpl{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2357--><p class="noindent" > + + + +</p> +<!--l. 2359--><p class="indent" > </div> +</p><!--l. 2359--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">4. <a + id="sec:categories"></a>Categories</h2> +</p><!--l. 2362--><p class="indent" > Each entry defined by <span +class="ectt-1000">\newglossaryentry </span>(or commands that internally use +<span +class="ectt-1000">\newglossaryentry </span>such as <span +class="ectt-1000">\newabbreviation</span>) is assigned a category through the +<span +class="ecss-1000">category</span><a + id="dx1-21001"></a> 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 <span +class="ecss-1000">babel</span><a + id="dx1-21002"></a> shorthands on that make +some characters active.) +</p><!--l. 2371--><p class="indent" > The use of categories can give you more control over the way entries are displayed +in the text or glossary. +</p><!--l. 2374--><p class="indent" > The default category assumed by <span +class="ectt-1000">\newglossaryentry </span>is labelled <span +class="ecss-1000">general</span><a + id="dx1-21003"></a>. +Abbreviations defined with <span +class="ectt-1000">\newabbreviation </span>have the category set to <span +class="ecss-1000">abbreviation</span><a + id="dx1-21004"></a> +by default. Abbreviations defined with <span +class="ectt-1000">\newacronym </span>have the category set to +<span +class="ecss-1000">acronym</span><a + id="dx1-21005"></a> by default. +</p><!--l. 2381--><p class="indent" > Additionally, if you have enabled <span +class="ectt-1000">\newterm</span><a + id="dx1-21006"></a> with the <span +class="ecss-1000">index</span><a + id="dx1-21007"></a> package option +that command will set the category to <span +class="ecss-1000">index</span><a + id="dx1-21008"></a> by default. If you have enabled +<span +class="ectt-1000">\glsxtrnewsymbol</span><a + id="dx1-21009"></a> with the <span +class="ecss-1000">symbols</span><a + id="dx1-21010"></a> package option, that command will set the +category to <span +class="ecss-1000">symbol</span><a + id="dx1-21011"></a>. If you have enabled <span +class="ectt-1000">\glsxtrnewnumber</span><a + id="dx1-21012"></a> with the <span +class="ecss-1000">numbers</span><a + id="dx1-21013"></a> package +option, that command will set the category to <span +class="ecss-1000">number</span><a + id="dx1-21014"></a>. +</p><!--l. 2389--><p class="indent" > You can obtain the category label for a given entry using +</p><!--l. 2390--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glscategory</span><span +class="ectt-0900"> </span></span><a + id="dx1-21015"></a> <span +class="ectt-1000">\glscategory{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2392--><p class="noindent" > +This is equivalent to commands like <span +class="ectt-1000">\glsentryname </span>and so may be used in an +expandable context. No error is generated if the entry doesn’t exist. +</p><!--l. 2397--><p class="indent" > You can test the category for a given entry using +</p><!--l. 2398--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsifcategory</span><span +class="ectt-0900"> </span></span><a + id="dx1-21016"></a> <span +class="ectt-1000">\glsifcategory{</span>⟨<span +class="ecit-1000">entry-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">true</span> +<span +class="ecit-1000">part</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">false part</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2401--><p class="noindent" > +This is equivalent to </p><div class="alltt"> +<div class="obeylines-v"> +<span +class="ectt-1000">\ifglsfieldeq</span><a + id="dx1-21017"></a><span +class="ectt-1000">{</span>⟨<span +class="ecit-1000">entry-label</span>⟩<span +class="ectt-1000">}{category}{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">true</span> +<br /><span +class="ecit-1000">part</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">false</span><span +class="ecit-1000"> part</span>⟩<span +class="ectt-1000">}</span> +</div> +</div> so any restrictions that apply to <span +class="ectt-1000">\ifglsfieldeq </span>also apply to <span +class="ectt-1000">\glsifcategory</span>. +<!--l. 2410--><p class="indent" > Each category may have a set of attributes. For example, the <span +class="ecss-1000">general</span><a + id="dx1-21018"></a> and <span +class="ecss-1000">acronym</span><a + id="dx1-21019"></a> +categories have the attribute <span +class="ecss-1000">regular</span><a + id="dx1-21020"></a> 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 <span +class="ectt-1000">\glsentryfmt </span>to determine whether to use +<span +class="ectt-1000">\glsgenentryfmt </span>or <span +class="ectt-1000">\glsxtrgenabbrvfmt</span>. +</p><!--l. 2418--><p class="indent" > Other attributes recognised by <span +class="ecss-1000">glossaries-extra </span>are: + </p><dl class="description"><dt class="description"> +<span +class="ecsx-1000">nohyperfirst</span><a + id="dx1-21021"></a> </dt><dd +class="description">When using commands like <span +class="ectt-1000">\gls</span><a + id="dx1-21022"></a> this will automatically suppress + the hyperlink on <a + id="dx1-21023"></a><a +href="#glo:firstuse">first use</a> for entries with a category that has this attribute + + + + set to “true”. (This settings can be overridden by explicitly setting the + <span +class="ecss-1000">hyper</span><a + id="dx1-21024"></a> key on or off in the optional argument of commands like <span +class="ectt-1000">\gls</span>.) + </dd><dt class="description"> +<span +class="ecsx-1000">nohyper</span><a + id="dx1-21025"></a> </dt><dd +class="description">When using commands like <span +class="ectt-1000">\gls</span><a + id="dx1-21026"></a> 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 <span +class="ecss-1000">hyper</span><a + id="dx1-21027"></a> key on or + off in the optional argument of commands like <span +class="ectt-1000">\gls</span>.) + </dd><dt class="description"> +<span +class="ecsx-1000">indexonlyfirst</span><a + id="dx1-21028"></a> </dt><dd +class="description">This is similar to the <span +class="ecss-1000">indexonlyfirst</span><a + id="dx1-21029"></a> package option but only for + entries that have a category with this attribute set to “true”. + </dd><dt class="description"> +<span +class="ecsx-1000">discardperiod</span><a + id="dx1-21030"></a> </dt><dd +class="description">If set to “true”, the post-<a + id="dx1-21031"></a><a +href="#glo:linktext">link-text</a> hook will discard a full + stop (period) that follows <span +class="ecti-1000">non-plural </span>commands like <span +class="ectt-1000">\gls </span>or <span +class="ectt-1000">\glstext</span>. + (Provided for entries such as abbreviations that end with a full stop.) + </dd><dt class="description"> +<span +class="ecsx-1000">pluraldiscardperiod</span><a + id="dx1-21032"></a> </dt><dd +class="description">If this attribute is set to “true” <span +class="ecti-1000">and </span>the <span +class="ecss-1000">discardperiod</span><a + id="dx1-21033"></a> + attribute is set to “true”, this will behave as above for the plural commands + like <span +class="ectt-1000">\glspl </span>or <span +class="ectt-1000">\glsplural</span>. + </dd><dt class="description"> +<span +class="ecsx-1000">insertdots</span><a + id="dx1-21034"></a> </dt><dd +class="description">If this attribute is set to “true” any entry defined using + <span +class="ectt-1000">\newabbreviation</span><a + id="dx1-21035"></a> 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 ⟨<span +class="ecti-1000">short</span>⟩ argument of <span +class="ectt-1000">\newabbreviation</span> + (rather than inserting them every time the entry is used). The short plural + form defaults to the new dotted version of the original ⟨<span +class="ecti-1000">short</span>⟩ form with + the plural suffix appended. + <!--l. 2459--><p class="noindent" ><div class="important" title="Important Note"> If you explicitly override the short plural using the <span +class="ecss-1000">shortplural</span><a + id="dx1-21036"></a> 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). + </div> + </p><!--l. 2465--><p class="noindent" > + </p><!--l. 2467--><p class="noindent" >This attribute is best used with the <span +class="ecss-1000">discardperiod</span><a + id="dx1-21037"></a> attribute set to “true”. + </p></dd><dt class="description"> +<span +class="ecsx-1000">aposplural</span><a + id="dx1-21038"></a> </dt><dd +class="description">If this attribute is set to “true”, <span +class="ectt-1000">\newabbreviation</span><a + id="dx1-21039"></a> will insert an + apostrophe (’) before the plural suffix for the <span +class="ecti-1000">short </span>plural form (unless + explicitly overridden with the <span +class="ecss-1000">shortplural</span><a + id="dx1-21040"></a> key). The long plural form is + unaffected by this setting. + </dd><dt class="description"> +<span +class="ecsx-1000">noshortplural</span><a + id="dx1-21041"></a> </dt><dd +class="description">If this attribute is set to “true”, <span +class="ectt-1000">\newabbreviation</span><a + id="dx1-21042"></a> won’t append the + + + + plural suffix for the short plural form. This means the <span +class="ecss-1000">short</span><a + id="dx1-21043"></a> and <span +class="ecss-1000">shortplural</span><a + id="dx1-21044"></a> + values will be the same unless explicitly overridden. <span +class="ecti-1000">The </span><span +class="ecsi-1000">aposplural</span><a + id="dx1-21045"></a> <span +class="ecti-1000">attribute</span> + <span +class="ecti-1000">trumps the </span><span +class="ecsi-1000">noshortplural</span><a + id="dx1-21046"></a> <span +class="ecti-1000">attribute.</span> + </dd><dt class="description"> +<span +class="ecsx-1000">headuc</span><a + id="dx1-21047"></a> </dt><dd +class="description">If this attribute is set to “true”, commands like <span +class="ectt-1000">\glsfmtshort</span><a + id="dx1-21048"></a> will use the + upper case version in the page headers. + </dd><dt class="description"> +<span +class="ecsx-1000">tagging</span><a + id="dx1-21049"></a> </dt><dd +class="description">If this attribute is set to “true”, the tagging command defined by + <span +class="ectt-1000">\GlsXtrEnableInitialTagging</span><a + id="dx1-21050"></a> will be activated to use <span +class="ectt-1000">\glsxtrtagfont</span><a + id="dx1-21051"></a> in + the glossary (see <a +href="#sec:tagging">§2.1 </a><a +href="#sec:tagging">Tagging Initials<!--tex4ht:ref: sec:tagging --></a>). + </dd><dt class="description"> +<span +class="ecsx-1000">entrycount</span><a + id="dx1-21052"></a> </dt><dd +class="description">Unlike the above attributes, this attribute isn’t boolean but instead must + be an integer value and is used in combination with <span +class="ectt-1000">\glsenableentrycount</span><a + id="dx1-21053"></a> + (see <a +href="#sec:entrycountmods">§1.3.3 </a><a +href="#sec:entrycountmods">Entry Counting Modifications<!--tex4ht:ref: sec:entrycountmods --></a>). Leave blank or undefined for + categories that shouldn’t have this facility enabled. The value of this attribute + is used by <span +class="ectt-1000">\glsxtrifcounttrigger</span><a + id="dx1-21054"></a> to determine how commands such as <span +class="ectt-1000">\cgls</span><a + id="dx1-21055"></a> + should behave. + <!--l. 2500--><p class="noindent" >With <span +class="ecss-1000">glossaries</span><a + id="dx1-21056"></a>, commands like <span +class="ectt-1000">\cgls </span>use <span +class="ectt-1000">\cglsformat </span>only if the previous + usage count for that entry was equal to 1. With <span +class="ecss-1000">glossaries-extra </span>the test is now + for entries that have the <span +class="ecss-1000">entrycount</span><a + id="dx1-21057"></a> attribute set and where the previous + usage count for that entry is less than or equal to the value of that + attribute. + </p></dd><dt class="description"> +<span +class="ecsx-1000">glossdesc</span><a + id="dx1-21058"></a> </dt><dd +class="description">The <span +class="ectt-1000">\glossentrydesc</span><a + id="dx1-21059"></a> command (used in the predefined glossary + styles) is modified by <span +class="ecss-1000">glossaries-extra </span>to check for this attribute. If the + attribute is set to “firstuc”, the first letter of the description will be + converted to upper case (using <span +class="ectt-1000">\Glsentrydesc</span><a + id="dx1-21060"></a>). If the attribute is set + to “title”, the title casing command <span +class="ectt-1000">\capitalisewords</span><a + id="dx1-21061"></a> (provided by + <span +class="ecss-1000">mfirstuc</span><a + id="dx1-21062"></a>) is used on the name. Any other values of this attribute are + ignored. + </dd><dt class="description"> +<span +class="ecsx-1000">glossname</span><a + id="dx1-21063"></a> </dt><dd +class="description">As <span +class="ecss-1000">glossdesc</span><a + id="dx1-21064"></a> but applies to <span +class="ectt-1000">\glossentryname</span><a + id="dx1-21065"></a>. Additionally, if this + attribute is set to “uc” the name is converted to all capitals. + </dd><dt class="description"> +<span +class="ecsx-1000">indexname</span><a + id="dx1-21066"></a> </dt><dd +class="description">If set, the <span +class="ectt-1000">\glsxtrpostnamehook </span>hook used at the end of <span +class="ectt-1000">\glossentyname</span><a + id="dx1-21067"></a> + will index the entry using <span +class="ectt-1000">\index</span><a + id="dx1-21068"></a>. See <a +href="#sec:autoindex">§6 </a><a +href="#sec:autoindex">Auto-Indexing<!--tex4ht:ref: sec:autoindex --></a> for further + details. + </dd><dt class="description"> +<span +class="ecsx-1000">dualindex</span><a + id="dx1-21069"></a> </dt><dd +class="description">If set, whenever a glossary entry has information written to the external + glossary file through commands like <span +class="ectt-1000">\gls</span><a + id="dx1-21070"></a> and <span +class="ectt-1000">\glsadd</span><a + id="dx1-21071"></a>, a corresponding line + will be written to the indexing file using <span +class="ectt-1000">\index</span><a + id="dx1-21072"></a>. See <a +href="#sec:autoindex">§6 </a><a +href="#sec:autoindex">Auto-Indexing<!--tex4ht:ref: sec:autoindex --></a> for + + + + further details. + </dd></dl> +<!--l. 2534--><p class="indent" > An attribute can be set using: +</p><!--l. 2535--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glssetcategoryattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21073"></a> <span +class="ectt-1000">\glssetcategoryattribute{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">value</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2537--><p class="noindent" > +where ⟨<span +class="ecti-1000">category-label</span>⟩ is the category label, ⟨<span +class="ecti-1000">attribute-label</span>⟩ is the attribute label and +⟨<span +class="ecti-1000">value</span>⟩ is the new value for the attribute. +</p><!--l. 2542--><p class="indent" > There is a shortcut version to set the <span +class="ecss-1000">regular</span><a + id="dx1-21074"></a> attribute to “true”: +</p><!--l. 2544--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glssetregularcategory</span><span +class="ectt-0900"> </span></span><a + id="dx1-21075"></a> <span +class="ectt-1000">\glssetregularcategory{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2546--><p class="noindent" > +</p><!--l. 2548--><p class="indent" > If you need to lookup the category label for a particular entry, you can use the +shortcut command: +</p><!--l. 2550--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glssetattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21076"></a> <span +class="ectt-1000">\glssetattribute{</span>⟨<span +class="ecit-1000">entry-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">value</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2552--><p class="noindent" > +This uses <span +class="ectt-1000">\glssetcategoryattribute </span>with <span +class="ectt-1000">\glscategory </span>to set the attribute. Note +that this will affect all other entries that share this entry’s category. +</p><!--l. 2557--><p class="indent" > You can fetch the value of an attribute for a particular category using: +</p><!--l. 2559--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsgetcategoryattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21077"></a> <span +class="ectt-1000">\glsgetcategoryattribute{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2561--><p class="noindent" > +Again there is a shortcut if you need to lookup the category label for a given +entry: +</p><!--l. 2564--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsgetattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21078"></a> <span +class="ectt-1000">\glsgetattribute{</span>⟨<span +class="ecit-1000">entry-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2566--><p class="noindent" > +</p><!--l. 2568--><p class="indent" > You can test if an attribute has been assigned to a given category using: +</p><!--l. 2570--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glshascategoryattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21079"></a> <span +class="ectt-1000">\glshascategoryattribute{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">true</span> +<span +class="ecit-1000">code</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">false code</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2573--><p class="noindent" > +This uses <span +class="ecss-1000">etoolbox</span><a + id="dx1-21080"></a>’s <span +class="ectt-1000">\ifcsvoid </span>and does ⟨<span +class="ecti-1000">true code</span>⟩ if the attribute has been set and +isn’t blank and isn’t <span +class="ectt-1000">\relax</span>. The shortcut if you need to lookup the category label +from an entry is: +</p><!--l. 2578--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glshasattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21081"></a> <span +class="ectt-1000">\glshasattribute{</span>⟨<span +class="ecit-1000">entry-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">true</span> +<span +class="ecit-1000">code</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">false code</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2581--><p class="noindent" > +</p><!--l. 2583--><p class="indent" > You can test the value of an attribute for a particular category using: +</p><!--l. 2585--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsifcategoryattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21082"></a> <span +class="ectt-1000">\glsifcategoryattribute{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">value</span>⟩<span +class="ectt-1000">}</span> +<span +class="ectt-1000">{</span>⟨<span +class="ecit-1000">true-part</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">false-part</span>⟩<span +class="ectt-1000">} </span></div><hr> + + + +</p><!--l. 2587--><p class="noindent" > +This tests if the attribute (given by ⟨<span +class="ecti-1000">attribute-label</span>⟩) for the category (given by +⟨<span +class="ecti-1000">category-label</span>⟩) is set and equal to ⟨<span +class="ecti-1000">value</span>⟩. If true, ⟨<span +class="ecti-1000">true-part</span>⟩ is done. If the attribute +isn’t set or is set but isn’t equal to ⟨<span +class="ecti-1000">value</span>⟩, ⟨<span +class="ecti-1000">false part</span>⟩ is done. +</p><!--l. 2594--><p class="indent" > For example: + + + +</p> + <div class="verbatim" id="verbatim-56"> +\glsifcategoryattribute{general}{nohyper}{true}{NO HYPER}{HYPER} +</div> +<!--l. 2597--><p class="nopar" > This does “NO HYPER” if the <span +class="ecss-1000">general</span><a + id="dx1-21083"></a> category has the <span +class="ecss-1000">nohyper</span><a + id="dx1-21084"></a> attribute set to <span +class="ectt-1000">true</span> +otherwise if does “HYPER”. +</p><!--l. 2602--><p class="indent" > With boolean-style attributes like <span +class="ecss-1000">nohyper</span><a + id="dx1-21085"></a>, make sure you always test for <span +class="ectt-1000">true</span> +not <span +class="ectt-1000">false </span>in case the attribute hasn’t been set. +</p><!--l. 2605--><p class="indent" > Again there’s a shortcut if you need to lookup the category label from a particular +entry: +</p><!--l. 2607--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsifattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21086"></a> <span +class="ectt-1000">\glsifattribute{</span>⟨<span +class="ecit-1000">entry-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">value</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">true-part</span>⟩<span +class="ectt-1000">}</span> +<span +class="ectt-1000">{</span>⟨<span +class="ecit-1000">false-part</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2609--><p class="noindent" > +</p><!--l. 2611--><p class="indent" > There’s also a shortcut to determine if a particular category has the <span +class="ecss-1000">regular</span><a + id="dx1-21087"></a> +attribute set: +</p><!--l. 2613--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsifregularcategory</span><span +class="ectt-0900"> </span></span><a + id="dx1-21088"></a> <span +class="ectt-1000">\glsifregularcategory{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">true-part</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">false-part</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2615--><p class="noindent" > +Alternatively, if you need to lookup the category for a particular entry: +</p><!--l. 2618--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsifregular</span><span +class="ectt-0900"> </span></span><a + id="dx1-21089"></a> <span +class="ectt-1000">\glsifregular{</span>⟨<span +class="ecit-1000">entry-label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">true-part</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">false-part</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2620--><p class="noindent" > +</p><!--l. 2622--><p class="indent" > You can iterate through all entries with a given category using: +</p><!--l. 2624--><p class="indent" > <hr><div title="Definition"><span +class="ectt-1000">\glsforeachincategory[</span>⟨<span +class="ecit-1000">glossary-labels</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}</span> +<span +class="ectt-1000">{</span>⟨<span +class="ecit-1000">glossary-cs</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">label-cs</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">body</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2625--><p class="noindent" > +This iterates through all entries in the glossaries identified by the comma-separated +list ⟨<span +class="ecti-1000">glossary-labels</span>⟩ that have the category given by ⟨<span +class="ecti-1000">category-label</span>⟩ and performs ⟨<span +class="ecti-1000">body</span>⟩ +for each match. Within ⟨<span +class="ecti-1000">body</span>⟩, you can use ⟨<span +class="ecti-1000">glossary-cs</span>⟩ and ⟨<span +class="ecti-1000">label-cs</span>⟩ (which much be +control sequences) to access the current glossary and entry label. If ⟨<span +class="ecti-1000">glossary-labels</span>⟩ is +omitted, all glossaries are assumed. +</p><!--l. 2635--><p class="indent" > Similarly, you can iterate through all entries that have a category with a given +attribute using: +</p><!--l. 2637--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsforeachwithattribute</span><span +class="ectt-0900"> </span></span><a + id="dx1-21090"></a> <span +class="ectt-1000">\glsforeachwithattribute[</span>⟨<span +class="ecit-1000">glossary-labels</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}</span> +<span +class="ectt-1000">{</span>⟨<span +class="ecit-1000">attribute-value</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">glossary-cs</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">label-cs</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">body</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2639--><p class="noindent" > +This will do ⟨<span +class="ecti-1000">body</span>⟩ for each entry that has a category with the attribute ⟨<span +class="ecti-1000">attribute-label</span>⟩ +set to ⟨<span +class="ecti-1000">attribute-value</span>⟩. The remaining arguments are as the previous command. +</p><!--l. 2644--><p class="indent" > You can change the category for a particular entry using the standard glossary +field changing commands, such as <span +class="ectt-1000">\glsfielddef</span><a + id="dx1-21091"></a>. Alternatively, you can +use + + + +</p><!--l. 2647--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrsetcategory</span><span +class="ectt-0900"> </span></span><a + id="dx1-21092"></a> <span +class="ectt-1000">\glsxtrsetcategory{</span>⟨<span +class="ecit-1000">entry-labels</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2649--><p class="noindent" > +This will change the category to ⟨<span +class="ecti-1000">category-label</span>⟩ for each entry listed in the +comma-separated list ⟨<span +class="ecti-1000">entry-labels</span>⟩. This command uses <span +class="ectt-1000">\glsfieldxdef</span><a + id="dx1-21093"></a> so it will +expand ⟨<span +class="ecti-1000">category-label</span>⟩ and make the change global. +</p><!--l. 2655--><p class="indent" > You can also change the category for all entries with a glossary or glossaries +using: +</p><!--l. 2657--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrsetcategoryforall</span><span +class="ectt-0900"> </span></span><a + id="dx1-21094"></a> <span +class="ectt-1000">\glsxtrsetcategoryforall{</span>⟨<span +class="ecit-1000">glossary-labels</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">category-label</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2659--><p class="noindent" > +where ⟨<span +class="ecti-1000">glossary-labels</span>⟩ is a comma-separated list of glossary labels. + + + +</p> +<!--l. 2663--><p class="indent" > </div> +</p><!--l. 2663--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">5. <a + id="sec:entrycount"></a>Entry Counting</h2> +</p><!--l. 2666--><p class="indent" > As mentioned in <a +href="#sec:entrycountmods">§1.3.3 </a><a +href="#sec:entrycountmods">Entry Counting Modifications<!--tex4ht:ref: sec:entrycountmods --></a>, <span +class="ecss-1000">glossaries-extra</span> +modifies the <span +class="ectt-1000">\glsenableentrycount</span><a + id="dx1-22001"></a> command to allow for the <span +class="ecss-1000">entrycount</span><a + id="dx1-22002"></a> +attribute. This means that you not only need to enable entry counting with +<span +class="ectt-1000">\glsenableentrycount</span><a + id="dx1-22003"></a>, but you also need to set the appropriate attribute (see <a +href="#sec:categories">§4 +</a><a +href="#sec:categories">Categories<!--tex4ht:ref: sec:categories --></a>). +</p><!--l. 2673--><p class="indent" > You may now use <span +class="ectt-1000">\cgls</span><a + id="dx1-22004"></a> instead of <span +class="ectt-1000">\gls</span><a + id="dx1-22005"></a> even if you haven’t enabled entry +counting. You will only get a warning if you use <span +class="ectt-1000">\glsenableentrycount </span>without +setting the <span +class="ecss-1000">entrycount</span><a + id="dx1-22006"></a> attribute. (With <span +class="ecss-1000">glossaries</span><a + id="dx1-22007"></a>, commands like <span +class="ectt-1000">\cgls</span><a + id="dx1-22008"></a> will generate +a warning if <span +class="ectt-1000">\glsenableentrycount </span>hasn’t been used.) The abbreviation shortcut +<span +class="ectt-1000">\ab</span><a + id="dx1-22009"></a> uses <span +class="ectt-1000">\cgls </span>(see <a +href="#sec:abbrshortcuts">§2.3 </a><a +href="#sec:abbrshortcuts">Shortcut Commands<!--tex4ht:ref: sec:abbrshortcuts --></a>) unlike the acronym shortcut <span +class="ectt-1000">\ac</span><a + id="dx1-22010"></a> +which uses <span +class="ectt-1000">\gls</span>. +</p><!--l. 2683--><p class="indent" > All upper case versions (not provided by <span +class="ecss-1000">glossaries</span><a + id="dx1-22011"></a>) are also available: +</p><!--l. 2685--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\cGLS</span><span +class="ectt-0900"> </span></span><a + id="dx1-22012"></a> <span +class="ectt-1000">\cGLS[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 2687--><p class="noindent" > +and +</p><!--l. 2689--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\cGLSpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-22013"></a> <span +class="ectt-1000">\cGLSpl[</span>⟨<span +class="ecit-1000">options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}[</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">] </span></div><hr> +</p><!--l. 2691--><p class="noindent" > +These are analogous to <span +class="ectt-1000">\cgls </span>and <span +class="ectt-1000">\cglspl </span>but they use +</p><!--l. 2694--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\cGLSformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-22014"></a> <span +class="ectt-1000">\cGLSformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2696--><p class="noindent" > +and +</p><!--l. 2698--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\cGLSplformat</span><span +class="ectt-0900"> </span></span><a + id="dx1-22015"></a> <span +class="ectt-1000">\cGLSplformat{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">insert</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2700--><p class="noindent" > +which convert the analogous <span +class="ectt-1000">\cglsformat </span>and <span +class="ectt-1000">\cglsplformat </span>to upper +case. +</p><!--l. 2704--><p class="indent" > [TODO: work out what to do about other commands such as <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsdisp</span></span></span> and +<span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glstext</span></span></span>.] +</p><!--l. 2707--><p class="indent" > Just using <span +class="ecss-1000">glossaries</span><a + id="dx1-22016"></a>: + + + +</p> + <div class="verbatim" id="verbatim-57"> +\documentclass{article} + <br />\usepackage{glossaries} + <br />\makeglossaries + <br />\glsenableentrycount + <br />\newacronym{html}{HTML}{hypertext markup language} + <br />\newacronym{xml}{XML}{extensible markup language} + <br />\begin{document} + <br />Used once: \cgls{html}. + <br />Used twice: \cgls{xml} and \cgls{xml}. + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 2729--><p class="nopar" > +</p><!--l. 2731--><p class="indent" > If you switch to <span +class="ecss-1000">glossaries-extra </span>you must set the <span +class="ecss-1000">entrycount</span><a + id="dx1-22017"></a> attribute: + + + +</p> + <div class="verbatim" id="verbatim-58"> +\documentclass{article} + <br />\usepackage{glossaries-extra} + <br />\makeglossaries + <br />\glsenableentrycount + <br />\glssetcategoryattribute{abbreviation}{entrycount}{1} + <br />\newabbreviation{html}{HTML}{hypertext markup language} + <br />\newabbreviation{xml}{XML}{extensible markup language} + <br />\begin{document} + <br />Used once: \cgls{html}. + <br />Used twice: \cgls{xml} and \cgls{xml}. + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 2756--><p class="nopar" > +</p><!--l. 2758--><p class="indent" > When activated with <span +class="ectt-1000">\glsenableentrycount</span>, commands such as <span +class="ectt-1000">\cgls</span><a + id="dx1-22018"></a> now +use +</p><!--l. 2760--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrifcounttrigger</span><span +class="ectt-0900"> </span></span><a + id="dx1-22019"></a> <span +class="ectt-1000">\glsxtrifcounttrigger{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">trigger code</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">normal</span> +<span +class="ecit-1000">code</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2763--><p class="noindent" > +to determine if the entry trips the entry count trigger. The ⟨<span +class="ecti-1000">trigger code</span>⟩ uses +commands like <span +class="ectt-1000">\cglsformat </span>and unsets the <a + id="dx1-22020"></a><a +href="#glo:firstuseflag">first use flag</a>. The ⟨<span +class="ecti-1000">normal code</span>⟩ is the +code that would ordinarily be performed by whatever the equivalent command is (for +example, <span +class="ectt-1000">\cgls </span>will use <span +class="ectt-1000">\cglsformat </span>in ⟨<span +class="ecti-1000">trigger code</span>⟩ but the usual <span +class="ectt-1000">\gls </span>behaviour in +⟨<span +class="ecti-1000">normal code</span>⟩). +</p><!--l. 2772--><p class="indent" > The default definition is: + + + +</p> + <div class="verbatim" id="verbatim-59"> +\newcommand*{\glsxtrifcounttrigger}[3]{% + <br /> \glshasattribute{#1}{entrycount}% + <br /> {% + <br />   \ifnum\glsentryprevcount{#1}>\glsgetattribute{#1}{entrycount}\relax + <br />    #3% + <br />   \else + <br />    #2% + <br />   \fi + <br /> }% + <br /> {#3}% + <br />} +</div> +<!--l. 2785--><p class="nopar" > This means that if an entry is assigned to a category that has the <span +class="ecss-1000">entrycount</span><a + id="dx1-22021"></a> +attribute then the ⟨<span +class="ecti-1000">trigger code</span>⟩ 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. +</p><!--l. 2792--><p class="indent" > For example, to trigger normal use if the previous count value is greater than +four: + + + +</p> + <div class="verbatim" id="verbatim-60"> +\glssetcategoryattribute{abbreviation}{entrycount}{4} +</div> +<!--l. 2796--><p class="nopar" > +</p><!--l. 2798--><p class="indent" > There is a convenient command provided to enable entry counting, set the +<span +class="ecss-1000">entrycount</span><a + id="dx1-22022"></a> attribute and redefine <span +class="ectt-1000">\gls</span><a + id="dx1-22023"></a>, etc to use <span +class="ectt-1000">\cgls</span><a + id="dx1-22024"></a> etc: +</p><!--l. 2801--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrEnableEntryCounting</span><span +class="ectt-0900"> </span></span><a + id="dx1-22025"></a> <span +class="ectt-1000">\GlsXtrEnableEntryCounting{</span>⟨<span +class="ecit-1000">categories</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">value</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2803--><p class="noindent" > +The first argument ⟨<span +class="ecti-1000">categories</span>⟩ is a comma-separated list of categories. For each +category, the <span +class="ecss-1000">entrycount</span><a + id="dx1-22026"></a> attribute is set to ⟨<span +class="ecti-1000">value</span>⟩. In addition, this does: + + + +</p> + <div class="verbatim" id="verbatim-61"> +\renewcommand*{\gls}{\cgls}% + <br />\renewcommand*{\Gls}{\cGls}% + <br />\renewcommand*{\glspl}{\cglspl}% + <br />\renewcommand*{\Glspl}{\cGlspl}% + <br />\renewcommand*{\GLS}{\cGLS}% + <br />\renewcommand*{\GLSpl}{\cGLSpl}% +</div> +<!--l. 2814--><p class="nopar" > This makes it easier to enable entry-counting on existing documents. +</p><!--l. 2818--><p class="indent" > If you use <span +class="ectt-1000">\GlsXtrEnableEntryCounting </span>more than once, subsequent uses will +just set the <span +class="ecss-1000">entrycount</span><a + id="dx1-22027"></a> attribute for each listed category. +</p><!--l. 2822--><p class="indent" > The above example document can then become: + + + +</p> + <div class="verbatim" id="verbatim-62"> +\documentclass{article} + <br />\usepackage{glossaries-extra} + <br />\makeglossaries + <br />\GlsXtrEnableEntryCounting{abbreviation}{1} + <br />\newabbreviation{html}{HTML}{hypertext markup language} + <br />\newabbreviation{xml}{XML}{extensible markup language} + <br />\begin{document} + <br />Used once: \gls{html}. + <br />Used twice: \gls{xml} and \gls{xml}. + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 2844--><p class="nopar" > +</p><!--l. 2846--><p class="indent" > 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 +</p><!--l. 2851--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrEnableEntryUnitCounting</span><span +class="ectt-0900"> </span></span><a + id="dx1-22028"></a> <span +class="ectt-1000">\GlsXtrEnableEntryUnitCounting{</span>⟨<span +class="ecit-1000">categories</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">value</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">counter-name</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 2853--><p class="noindent" > +where ⟨<span +class="ecti-1000">categories</span>⟩ is a comma-separated list of categories to which this feature should +be applied, ⟨<span +class="ecti-1000">value</span>⟩ is the trigger value and ⟨<span +class="ecti-1000">counter-name</span>⟩ is the name of the counter +used by the sectional unit. +</p><!--l. 2859--><p class="indent" > <div class="important" title="Important Note"> Due to the asynchronous nature of <span class="TEX">T<span +class="E">E</span>X</span>’s output routine, discrepancies will +occur in page spanning paragraphs if you use the <span +class="ecss-1000">page</span><a + id="dx1-22029"></a> counter. </div> +</p><!--l. 2863--><p class="noindent" > +</p><!--l. 2865--><p class="indent" > Note that you can’t use both the document-wide counting and the per-unit +counting in the same document. +</p><!--l. 2868--><p class="indent" > The counter value is used as part of a label, which means that <span +class="ectt-1000">\the</span>⟨<span +class="ecti-1000">counter-name</span>⟩ +needs to be expandable. Since <span +class="ecss-1000">hyperref</span><a + id="dx1-22030"></a> also has a similar requirement and provides +<span +class="ectt-1000">\theH</span>⟨<span +class="ecti-1000">counter-name</span>⟩ as an expandable alternative, <span +class="ecss-1000">glossaries-extra </span>will use +<span +class="ectt-1000">\theH</span>⟨<span +class="ecti-1000">counter-name</span>⟩ if it exists otherwise it will use <span +class="ectt-1000">\the</span>⟨<span +class="ecti-1000">counter-name</span>⟩. +</p><!--l. 2875--><p class="indent" > The per-unit counting function uses two attributes: <span +class="ecss-1000">entrycount</span><a + id="dx1-22031"></a> (as before) and +<span +class="ecss-1000">unitcount</span><a + id="dx1-22032"></a> (the name of the counter). + + + +</p><!--l. 2878--><p class="indent" > 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: +</p><!--l. 2881--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsentrycurrcount</span><span +class="ectt-0900"> </span></span><a + id="dx1-22033"></a> <span +class="ectt-1000">\glsentrycurrcount{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2883--><p class="noindent" > +and the final value from the previous run: +</p><!--l. 2885--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsentryprevcount</span><span +class="ectt-0900"> </span></span><a + id="dx1-22034"></a> <span +class="ectt-1000">\glsentryprevcount{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2887--><p class="noindent" > +In the case of the per-unit counting, this is the final value <span +class="ecti-1000">for the current unit</span>. In +both commands ⟨<span +class="ecti-1000">label</span>⟩ is the entry’s label. +</p><!--l. 2892--><p class="indent" > The per-unit counting mechanism additionally provides: +</p><!--l. 2893--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsentryprevtotalcount</span><span +class="ectt-0900"> </span></span><a + id="dx1-22035"></a> <span +class="ectt-1000">\glsentryprevtotalcount{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2895--><p class="noindent" > +which gives the sum of all the per-unit totals from the previous run for the entry +given by ⟨<span +class="ecti-1000">label</span>⟩, and +</p><!--l. 2898--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsentryprevmaxcount</span><span +class="ectt-0900"> </span></span><a + id="dx1-22036"></a> <span +class="ectt-1000">\glsentryprevmaxcount{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 2900--><p class="noindent" > +which gives the maximum per-unit total from the previous run. +</p><!--l. 2903--><p class="indent" > The above two commands are unavailable for the document-wide counting. +</p><!--l. 2905--><p class="indent" > Example of per-unit counting, where the unit is the chapter: + + + +</p> + <div class="verbatim" id="verbatim-63"> +\documentclass{report} + <br />\usepackage{glossaries-extra} + <br />\GlsXtrEnableEntryUnitCounting{abbreviation}{2}{chapter} + <br />\makeglossaries + <br />\newabbreviation{html}{HTML}{hypertext markup language} + <br />\newabbreviation{css}{CSS}{cascading style sheet} + <br />\newglossaryentry{sample}{name={sample},description={sample}} + <br />\begin{document} + <br />\chapter{Sample} + <br />Used once: \gls{html}. + <br />Used three times: \gls{css} and \gls{css} and \gls{css}. + <br />Used once: \gls{sample}. + <br />\chapter{Another Sample} + <br />Used once: \gls{css}. + <br />Used twice: \gls{html} and \gls{html}. + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 2936--><p class="nopar" > In this document, the <span +class="ectt-1000">css </span>entry is used three times in the first chapter. This is +more than the trigger value of 2, so <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls{css}</span></span></span> is expanded on <a + id="dx1-22037"></a><a +href="#glo:firstuse">first use</a> +with the short form used on subsequent use, and the <span +class="ectt-1000">css </span>entries in that +chapter are added to the glossary. In the second chapter, the <span +class="ectt-1000">css </span>entry is +only used once, which trips the suppression trigger, so in that chapter, the +long form is used and <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls{css}</span></span></span> doesn’t get a line added to the glossary +file. +</p><!--l. 2947--><p class="indent" > The <span +class="ectt-1000">html </span>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. +</p><!--l. 2953--><p class="indent" > The <span +class="ectt-1000">sample </span>entry has only been used once, but it doesn’t trip the indexing +suppression because it’s in the <span +class="ecss-1000">general</span><a + id="dx1-22038"></a> category, which hasn’t been listed in +<span +class="ectt-1000">\GlsXtrEnableEntryUnitCounting</span>. +</p><!--l. 2958--><p class="indent" > 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 <span +class="ectt-1000">\gls</span><a + id="dx1-22039"></a> by modifying the hook +</p><!--l. 2964--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glslinkcheckfirsthyperhook</span><span +class="ectt-0900"> </span></span><a + id="dx1-22040"></a> <span +class="ectt-1000">\glslinkcheckfirsthyperhook </span></div><hr> +</p><!--l. 2966--><p class="noindent" > +which is used at the end of the macro the determines whether or not to suppress the +hyperlink. + + + +</p> + <div class="verbatim" id="verbatim-64"> +\documentclass{article} + <br />\usepackage[colorlinks]{hyperref} + <br />\usepackage{glossaries-extra} + <br />\makeglossaries + <br />\GlsXtrEnableEntryUnitCounting{general}{0}{page} + <br />\newglossaryentry{sample}{name={sample},description={an example}} + <br />\renewcommand*{\glslinkcheckfirsthyperhook}{% + <br />  \ifnum\glsentrycurrcount\glslabel>0 + <br />   \setkeys{glslink}{hyper=false}% + <br />  \fi + <br />} + <br />\begin{document} + <br />A \gls{sample} entry. + <br />Next use: \gls{sample}. + <br />\newpage + <br />Next page: \gls{sample}. + <br />Again: \gls{sample}. + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 3001--><p class="nopar" > This only produces a hyperlink for the first instance of <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\gls{sample}</span></span></span> on each +page. +</p><!--l. 3005--><p class="indent" > The earlier warning about using the <span +class="ecss-1000">page</span><a + id="dx1-22041"></a> counter still applies. If the +first instance of <span +class="ectt-1000">\gls </span>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. + + + +</p> +<!--l. 3010--><p class="indent" > </div> +</p><!--l. 3010--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">6. <a + id="sec:autoindex"></a>Auto-Indexing</h2> +</p><!--l. 3013--><p class="indent" > 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: <span +class="ecss-1000">indexname</span><a + id="dx1-23001"></a> and +<span +class="ecss-1000">dualindex</span><a + id="dx1-23002"></a>. +</p><!--l. 3019--><p class="indent" > The <span +class="ectt-1000">\glsxtrpostnamehook</span><a + id="dx1-23003"></a> macro, used at the end of <span +class="ectt-1000">\glossentryname</span><a + id="dx1-23004"></a> and +<span +class="ectt-1000">\Glossentryname</span><a + id="dx1-23005"></a>, checks the <span +class="ecss-1000">indexname</span><a + id="dx1-23006"></a> attribute for the category associated with +that entry. Since <span +class="ectt-1000">\glossentryname </span>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 <span +class="ecss-1000">name</span><a + id="dx1-23007"></a> +key. +</p><!--l. 3028--><p class="indent" > The internal macro used by the <span +class="ecss-1000">glossaries</span><a + id="dx1-23008"></a> package to write the information to the +external glossary file is modified to check for the <span +class="ecss-1000">dualindex</span><a + id="dx1-23009"></a> attribute. +</p><!--l. 3032--><p class="indent" > In both cases, the indexing is done through +</p><!--l. 3033--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrdoautoindexname</span><span +class="ectt-0900"> </span></span><a + id="dx1-23010"></a> <span +class="ectt-1000">\glsxtrdoautoindexname{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">attribute-label</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 3035--><p class="noindent" > +This uses the standard <span +class="ectt-1000">\index</span><a + id="dx1-23011"></a> command with the sort value taken from the entry’s +<span +class="ecss-1000">sort</span><a + id="dx1-23012"></a> key and the actual value set to <span +class="ectt-1000">\glsentryname{</span>⟨<span +class="ecti-1000">label</span>⟩<span +class="ectt-1000">}</span>. If the value of the +attribute given by ⟨<span +class="ecti-1000">attribute-label</span>⟩ is “true”, no encap will be added, otherwise the +encap will be the attribute value. For example: + + + +</p> + <div class="verbatim" id="verbatim-65"> +\glssetcategoryattribute{general}{indexname}{textbf} +</div> +<!--l. 3044--><p class="nopar" > will set the encap to <span +class="ectt-1000">textbf </span>which will display the relevant page number in bold +whereas + + + +</p> + <div class="verbatim" id="verbatim-66"> +\glssetcategoryattribute{general}{dualindex}{true} +</div> +<!--l. 3049--><p class="nopar" > won’t apply any formatting to the page number in the index. +</p><!--l. 3052--><p class="indent" > <div class="important" title="Important Note"> 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 +<span +class="ectt-1000">\index </span>to use some thing else.) </div> +</p><!--l. 3057--><p class="noindent" > +</p><!--l. 3059--><p class="indent" > By default the <span +class="ecss-1000">format</span><a + id="dx1-23013"></a> key won’t be used with the <span +class="ecss-1000">dualindex</span><a + id="dx1-23014"></a> attribute. You can +allow the <span +class="ecss-1000">format</span><a + id="dx1-23015"></a> key to override the attribute value by using the preamble-only +command: +</p><!--l. 3063--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrEnableIndexFormatOverride</span><span +class="ectt-0900"> </span></span><a + id="dx1-23016"></a> <span +class="ectt-1000">\GlsXtrEnableIndexFormatOverride</span> +</div><hr> +</p><!--l. 3065--><p class="noindent" > +If you use this command and <span +class="ecss-1000">hyperref</span><a + id="dx1-23017"></a> has been loaded, then the <span +class="ecss-1000">theindex</span><a + id="dx1-23018"></a><a + id="dx1-23019"></a> environment +will be modified to redefine <span +class="ectt-1000">\glshypernumber</span><a + id="dx1-23020"></a> to allow formats that use that +command. +</p><!--l. 3070--><p class="indent" > <div class="important" title="Important Note"> The <span +class="ecss-1000">dualindex</span><a + id="dx1-23021"></a> attribute will still be used on subsequent use even if the +<span +class="ecss-1000">indexonlyfirst</span><a + id="dx1-23022"></a> attribute (or <span +class="ecss-1000">indexonlyfirst</span><a + id="dx1-23023"></a> package option) is set. However, the <span +class="ecss-1000">dualindex</span><a + id="dx1-23024"></a> +attribute will honour the <span +class="ecss-1000">noindex</span><a + id="dx1-23025"></a> key. </div> +</p><!--l. 3076--><p class="noindent" > +</p><!--l. 3078--><p class="indent" > The <span +class="ectt-1000">\glsxtrdoautoindexname </span>command will attempt to escape any of +<span +class="ectt-1000">\makeindex</span><a + id="dx1-23026"></a>’s special characters, but there may be special cases where it fails, so take +care. This assumes the default <a + id="dx1-23027"></a><a +href="#glo:makeindex"><span +class="ectt-1000">makeindex</span></a> actual, level, quote and encap values +(unless any of the commands <span +class="ectt-1000">\actualchar</span><a + id="dx1-23028"></a>, <span +class="ectt-1000">\levelchar</span><a + id="dx1-23029"></a>, <span +class="ectt-1000">\quotechar</span><a + id="dx1-23030"></a> or <span +class="ectt-1000">\encapchar</span><a + id="dx1-23031"></a> +have been defined before <span +class="ecss-1000">glossaries-extra </span>is loaded). +</p><!--l. 3086--><p class="indent" > If this isn’t the case, you can use the following preamble-only commands to set +the correct characters. +</p><!--l. 3088--><p class="indent" > <div class="important" title="Important Note"> Be very careful of possible shifting category codes! </div> +</p><!--l. 3090--><p class="noindent" > +</p><!--l. 3092--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrSetActualChar</span><span +class="ectt-0900"> </span></span><a + id="dx1-23032"></a> <span +class="ectt-1000">\GlsXtrSetActualChar{</span>⟨<span +class="ecit-1000">char</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3094--><p class="noindent" > +Set the actual character to ⟨<span +class="ecti-1000">char</span>⟩. +</p><!--l. 3097--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrSetLevelChar</span><span +class="ectt-0900"> </span></span><a + id="dx1-23033"></a> <span +class="ectt-1000">\GlsXtrSetLevelChar{</span>⟨<span +class="ecit-1000">char</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3099--><p class="noindent" > +Set the level character to ⟨<span +class="ecti-1000">char</span>⟩. +</p><!--l. 3102--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrSetEscChar</span><span +class="ectt-0900"> </span></span><a + id="dx1-23034"></a> <span +class="ectt-1000">\GlsXtrSetEscChar{</span>⟨<span +class="ecit-1000">char</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3104--><p class="noindent" > +Set the escape (quote) character to ⟨<span +class="ecti-1000">char</span>⟩. +</p><!--l. 3107--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrSetEncapChar</span><span +class="ectt-0900"> </span></span><a + id="dx1-23035"></a> <span +class="ectt-1000">\GlsXtrSetEncapChar{</span>⟨<span +class="ecit-1000">char</span>⟩<span +class="ectt-1000">} </span></div><hr> + + + +</p><!--l. 3109--><p class="noindent" > +Set the encap character to ⟨<span +class="ecti-1000">char</span>⟩. + + + +</p> +<!--l. 3112--><p class="indent" > </div> +</p><!--l. 3112--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">7. <a + id="sec:onthefly"></a>On-the-Fly Document Definitions</h2> +</p><!--l. 3115--><p class="indent" > <div class="important" title="Important Note"> The commands described here may superficially look like ⟨<span +class="ecti-1000">word</span>⟩<span +class="ectt-1000">\index{</span>⟨<span +class="ecti-1000">word</span>⟩<span +class="ectt-1000">}</span>, +but they behave rather differently. If you want to use <span +class="ectt-1000">\index </span>then just use <span +class="ectt-1000">\index</span>. +</div> +</p><!--l. 3120--><p class="noindent" > +</p><!--l. 3122--><p class="indent" > The <span +class="ecss-1000">glossaries</span><a + id="dx1-24001"></a> package advises against defining entries in the <span +class="ecss-1000">document</span><a + id="dx1-24002"></a><a + id="dx1-24003"></a> +environment. As mentioned in <a +href="#sec:pkgopts">§1.2 </a><a +href="#sec:pkgopts">New or Modified Package Options<!--tex4ht:ref: sec:pkgopts --></a> above, this +ability is disabled by default with <span +class="ecss-1000">glossaries-extra </span>but can be enabled using the +<span +class="ecss-1000">docdefs</span><a + id="dx1-24004"></a> package options. +</p><!--l. 3128--><p class="indent" > Although this can be problematic, the <span +class="ecss-1000">glossaries-extra </span>package provides a way of +defining and using entries within the <span +class="ecss-1000">document</span><a + id="dx1-24005"></a><a + id="dx1-24006"></a> environment without the tricks used +with the <span +class="ecss-1000">docdefs</span><a + id="dx1-24007"></a> option. <span +class="ecti-1000">There are limitations with this approach, so take care with it.</span> +This function is disabled by default, but can be enabled using the preamble-only +command: +</p><!--l. 3134--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrEnableOnTheFly</span><span +class="ectt-0900"> </span></span><a + id="dx1-24008"></a> <span +class="ectt-1000">\GlsXtrEnableOnTheFly </span></div><hr> +</p><!--l. 3136--><p class="noindent" > +When used, this defines the commands described below. +</p><!--l. 3139--><p class="indent" > <div class="important" title="Important Note"> The commands <span +class="ectt-1000">\glsxtr</span>, <span +class="ectt-1000">\glsxtrpl</span>, <span +class="ectt-1000">\Glsxtr </span>and <span +class="ectt-1000">\Glsxtrpl </span>can’t be used after +the glossaries have been displayed (through <span +class="ectt-1000">\printglossary</span><a + id="dx1-24009"></a> etc). It’s best not to +mix these commands with the standard glossary commands, such as <span +class="ectt-1000">\gls </span>or there +may be unexpected results. </div> +</p><!--l. 3145--><p class="noindent" > +</p><!--l. 3147--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtr</span><span +class="ectt-0900"> </span></span><a + id="dx1-24010"></a> <span +class="ectt-1000">\glsxtr[</span>⟨<span +class="ecit-1000">gls-options</span>⟩<span +class="ectt-1000">][</span>⟨<span +class="ecit-1000">dfn-options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3149--><p class="noindent" > +If an entry with the label ⟨<span +class="ecti-1000">label</span>⟩ has already been defined, this just does +<span +class="ectt-1000">\gls[</span>⟨<span +class="ecti-1000">gls-options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecti-1000">label</span>⟩<span +class="ectt-1000">}</span>. If ⟨<span +class="ecti-1000">label</span>⟩ hasn’t been defined, this will define the entry using: +</p><div class="alltt"> +<div class="obeylines-v"> +<span +class="ectt-1000">\newglossaryentry{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{name={</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">},</span> +<br /><span +class="ectt-1000"> category=\glsxtrcat,</span> +<br /><span +class="ectt-1000"> description={\nopostdesc},</span> +<br /><span +class="ectt-1000"> </span>⟨<span +class="ecit-1000">dfn-options</span>⟩<span +class="ectt-1000">}</span> +</div> +</div> +<!--l. 3161--><p class="indent" > <div class="important" title="Important Note"> The ⟨<span +class="ecti-1000">label</span>⟩ 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 ⟨<span +class="ecti-1000">label</span>⟩ and placed in the <span +class="ecss-1000">name</span><a + id="dx1-24011"></a> key must be provided in the optional +argument ⟨<span +class="ecti-1000">dfn-options</span>⟩. </div> +</p><!--l. 3167--><p class="noindent" > + + + +</p><!--l. 3169--><p class="indent" > The second optional argument ⟨<span +class="ecti-1000">dfn-options</span>⟩ 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 +</p><!--l. 3172--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrWarning</span><span +class="ectt-0900"> </span></span><a + id="dx1-24012"></a> <span +class="ectt-1000">\GlsXtrWarning{</span>⟨<span +class="ecit-1000">dfn-options</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3174--><p class="noindent" > +</p><!--l. 3176--><p class="indent" > For example, this warning will be generated on the second instance of <span +class="ectt-1000">\glsxtr</span> +below: + + + +</p> + <div class="verbatim" id="verbatim-67"> +\glsxtr[][plural=geese]{goose} + <br /> ... later + <br />\glsxtr[][plural=geese]{goose} +</div> +<!--l. 3182--><p class="nopar" > +</p><!--l. 3184--><p class="indent" > If you are considering doing something like: + + + +</p> + <div class="verbatim" id="verbatim-68"> +\newcommand*{\goose}{\glsxtr[][plural=geese]{goose}} + <br />\renewcommand*{\GlsXtrWarning}[2]{} + <br /> ... later + <br />\goose\ some more text here +</div> +<!--l. 3190--><p class="nopar" > then don’t bother. It’s simpler and less problematic to just define the entries in the +preamble with <span +class="ectt-1000">\newglossaryentry</span><a + id="dx1-24013"></a> and then use <span +class="ectt-1000">\gls </span>in the document. +</p><!--l. 3195--><p class="indent" > There are plural and case-changing alternatives to <span +class="ectt-1000">\glsxtr</span>: +</p><!--l. 3196--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsxtrpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-24014"></a> <span +class="ectt-1000">\glsxtrpl[</span>⟨<span +class="ecit-1000">gls-options</span>⟩<span +class="ectt-1000">][</span>⟨<span +class="ecit-1000">dfn-options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3198--><p class="noindent" > +This is like <span +class="ectt-1000">\glsxtr </span>but uses <span +class="ectt-1000">\glspl </span>instead of <span +class="ectt-1000">\gls</span>. +</p><!--l. 3201--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtr</span><span +class="ectt-0900"> </span></span><a + id="dx1-24015"></a> <span +class="ectt-1000">\Glsxtr[</span>⟨<span +class="ecit-1000">gls-options</span>⟩<span +class="ectt-1000">][</span>⟨<span +class="ecit-1000">dfn-options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3203--><p class="noindent" > +This is like <span +class="ectt-1000">\glsxtr </span>but uses <span +class="ectt-1000">\Gls </span>instead of <span +class="ectt-1000">\gls</span>. +</p><!--l. 3206--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsxtrpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-24016"></a> <span +class="ectt-1000">\Glsxtrpl[</span>⟨<span +class="ecit-1000">gls-options</span>⟩<span +class="ectt-1000">][</span>⟨<span +class="ecit-1000">dfn-options</span>⟩<span +class="ectt-1000">]{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3208--><p class="noindent" > +This is like <span +class="ectt-1000">\glsxtr </span>but uses <span +class="ectt-1000">\Glspl </span>instead of <span +class="ectt-1000">\gls</span>. +</p><!--l. 3211--><p class="indent" > 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 <span class="HoLogo-XeLaTeX"><span class="HoLogo-Xe">X<span class="HoLogo-e">Ǝ</span></span><span class="HoLogo-LaTeX">L<span class="HoLogo-a">A</span><span class="HoLogo-TeX">T<span class="HoLogo-e">E</span>X</span></span></span> or Lua<span class="HoLogo-LaTeX">L<span class="HoLogo-a">A</span><span class="HoLogo-TeX">T<span class="HoLogo-e">E</span>X</span></span> instead of +<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> (or pdf<span class="HoLogo-LaTeX">L<span class="HoLogo-a">A</span><span class="HoLogo-TeX">T<span class="HoLogo-e">E</span>X</span></span>). If you really desperately want to use UTF-8 entry labels +without switching to <span class="HoLogo-XeLaTeX"><span class="HoLogo-Xe">X<span class="HoLogo-e">Ǝ</span></span><span class="HoLogo-LaTeX">L<span class="HoLogo-a">A</span><span class="HoLogo-TeX">T<span class="HoLogo-e">E</span>X</span></span></span> or Lua<span class="HoLogo-LaTeX">L<span class="HoLogo-a">A</span><span class="HoLogo-TeX">T<span class="HoLogo-e">E</span>X</span></span> then there is a starred version of +<span +class="ectt-1000">\GlsXtrEnableOnTheFly </span>that allows you to use UTF-8 characters in ⟨<span +class="ecti-1000">label</span>⟩, but it’s +experimental and may not work in some cases. +</p><!--l. 3220--><p class="indent" > <div class="important" title="Important Note"> If you use the starred version of <span +class="ectt-1000">\GlsXtrEnableOnTheFly </span>don’t use any +commands in the ⟨<span +class="ecti-1000">label</span>⟩, even if they expand to just text. </div> +</p><!--l. 3224--><p class="noindent" > + + + +</p> +<!--l. 3226--><p class="indent" > </div> +</p><!--l. 3226--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">8. <a + id="sec:supplemental"></a>Supplemental Packages</h2> +</p><!--l. 3229--><p class="indent" > The <span +class="ecss-1000">glossaries</span><a + id="dx1-25001"></a> bundle provides additional support packages <span +class="ecss-1000">glossaries-prefix</span><a + id="dx1-25002"></a> (for +prefixing) and <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-25003"></a> (for accessibility support). These packages aren’t +automatically loaded. +</p> +<!--l. 3234--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">8.1 </span> <a + id="sec:prefix"></a>Prefixes or Determiners</h3> +<!--l. 3237--><p class="noindent" >If prefixing is required, you can simply load <span +class="ecss-1000">glossaries-prefix</span><a + id="dx1-26001"></a> after <span +class="ecss-1000">glossaries-extra</span>. For +example: + + + +</p> + <div class="verbatim" id="verbatim-69"> +\documentclass{article} + <br />\usepackage{glossaries-extra} + <br />\usepackage{glossaries-prefix} + <br />\makeglossaries + <br />\newabbreviation + <br /> [prefix={an\space}, + <br /> prefixfirst={a~}] + <br /> {svm}{SVM}{support vector machine} + <br />\begin{document} + <br />First use: \pgls{svm}. + <br />Next use: \pgls{svm}. + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 3260--><p class="nopar" > +</p><!--l. 3262--><p class="noindent" > +</p> +<!--l. 3262--><p class="noindent" ><a +href="#top">Top</a><h3 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">8.2 </span> <a + id="sec:accsupp"></a>Accessibility Support</h3> +<!--l. 3265--><p class="noindent" >The <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-27001"></a> needs to be loaded before <span +class="ecss-1000">glossaries-extra </span>or through the +<span +class="ecss-1000">accsupp</span><a + id="dx1-27002"></a> package option: + + + +</p> + <div class="verbatim" id="verbatim-70"> +\usepackage[accsupp]{glossaries-extra} +</div> +<!--l. 3270--><p class="nopar" > If you don’t load <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-27003"></a> or you load <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-27004"></a> after <span +class="ecss-1000">glossaries-extra</span> +the new <span +class="ectt-1000">\glsaccess</span>⟨<span +class="ecti-1000">xxx</span>⟩ commands described below will simply be equivalent to the +corresponding <span +class="ectt-1000">\glsentry</span>⟨<span +class="ecti-1000">xxx</span>⟩ commands. +</p><!--l. 3277--><p class="indent" > The following <span +class="ectt-1000">\glsaccess</span>⟨<span +class="ecti-1000">xxx</span>⟩ commands add accessibility information wrapped +around the corresponding <span +class="ectt-1000">\glsentry</span>⟨<span +class="ecti-1000">xxx</span>⟩ commands. There is no check for existence +of the entry nor do any of these commands add formatting, hyperlinks or indexing +information. +</p><!--l. 3282--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccessname</span><span +class="ectt-0900"> </span></span><a + id="dx1-27005"></a> <span +class="ectt-1000">\glsaccessname{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3284--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">name</span><a + id="dx1-27006"></a> field for the entry identified by ⟨<span +class="ecti-1000">label</span>⟩. +</p><!--l. 3288--><p class="indent" > If the <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-27007"></a> package isn’t loaded, this is simply defined as: + + + +</p> + <div class="verbatim" id="verbatim-71"> +\newcommand*{\glsaccessname}[1]{\glsentryname{#1}} +</div> +<!--l. 3292--><p class="nopar" > otherwise it’s defined as: + + + +</p> + <div class="verbatim" id="verbatim-72"> +\newcommand*{\glsaccessname}[1]{% + <br />  \glsnameaccessdisplay + <br />  {% + <br />    \glsentryname{#1}% + <br />  }% + <br />  {#1}% + <br />} +</div> +<!--l. 3302--><p class="nopar" > (<span +class="ectt-1000">\glsnameaccessdisplay</span><a + id="dx1-27008"></a> is defined by the <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-27009"></a> package.) The first +letter upper case version is: +</p><!--l. 3306--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccessname</span><span +class="ectt-0900"> </span></span><a + id="dx1-27010"></a> <span +class="ectt-1000">\Glsaccessname{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3308--><p class="noindent" > +Without the <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-27011"></a> package this is just defined as: + + + +</p> + <div class="verbatim" id="verbatim-73"> +\newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}} +</div> +<!--l. 3313--><p class="nopar" > With the <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-27012"></a> package this is defined as: + + + +</p> + <div class="verbatim" id="verbatim-74"> +\newcommand*{\Glsaccessname}[1]{% + <br />  \glsnameaccessdisplay + <br />  {% + <br />    \Glsentryname{#1}% + <br />  }% + <br />  {#1}% + <br />} +</div> +<!--l. 3323--><p class="nopar" > +</p><!--l. 3325--><p class="indent" > The following commands are all defined in an analogous manner. +</p><!--l. 3326--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccesstext</span><span +class="ectt-0900"> </span></span><a + id="dx1-27013"></a> <span +class="ectt-1000">\glsaccesstext{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3328--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">text</span><a + id="dx1-27014"></a> field. +</p><!--l. 3331--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccesstext</span><span +class="ectt-0900"> </span></span><a + id="dx1-27015"></a> <span +class="ectt-1000">\Glsaccesstext{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3333--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">text</span><a + id="dx1-27016"></a> field with the first letter converted to upper +case. +</p><!--l. 3337--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccessplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-27017"></a> <span +class="ectt-1000">\glsaccessplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3339--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">plural</span><a + id="dx1-27018"></a> field. +</p><!--l. 3342--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccessplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-27019"></a> <span +class="ectt-1000">\Glsaccessplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3344--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">plural</span><a + id="dx1-27020"></a> field with the first letter converted to upper +case. +</p><!--l. 3348--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccessfirst</span><span +class="ectt-0900"> </span></span><a + id="dx1-27021"></a> <span +class="ectt-1000">\glsaccessfirst{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3350--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">first</span><a + id="dx1-27022"></a> field. +</p><!--l. 3353--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccessfirst</span><span +class="ectt-0900"> </span></span><a + id="dx1-27023"></a> <span +class="ectt-1000">\Glsaccessfirst{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3355--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">first</span><a + id="dx1-27024"></a> field with the first letter converted to upper +case. +</p><!--l. 3359--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccessfirstplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-27025"></a> <span +class="ectt-1000">\glsaccessfirstplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3361--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">firstplural</span><a + id="dx1-27026"></a> field. +</p><!--l. 3364--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccessfirstplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-27027"></a> <span +class="ectt-1000">\Glsaccessfirstplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3366--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">firstplural</span><a + id="dx1-27028"></a> field with the first letter converted to upper +case. +</p><!--l. 3370--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccesssymbol</span><span +class="ectt-0900"> </span></span><a + id="dx1-27029"></a> <span +class="ectt-1000">\glsaccesssymbol{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3372--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">symbol</span><a + id="dx1-27030"></a> field. +</p><!--l. 3375--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccesssymbol</span><span +class="ectt-0900"> </span></span><a + id="dx1-27031"></a> <span +class="ectt-1000">\Glsaccesssymbol{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> + + + +</p><!--l. 3377--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">symbol</span><a + id="dx1-27032"></a> field with the first letter converted to upper +case. +</p><!--l. 3381--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccesssymbolplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-27033"></a> <span +class="ectt-1000">\glsaccesssymbolplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3383--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">symbolplural</span><a + id="dx1-27034"></a> field. +</p><!--l. 3386--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccesssymbolplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-27035"></a> <span +class="ectt-1000">\Glsaccesssymbolplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3388--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">symbolplural</span><a + id="dx1-27036"></a> field with the first letter converted to +upper case. +</p><!--l. 3392--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccessdesc</span><span +class="ectt-0900"> </span></span><a + id="dx1-27037"></a> <span +class="ectt-1000">\glsaccessdesc{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3394--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">desc</span><a + id="dx1-27038"></a> field. +</p><!--l. 3397--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccessdesc</span><span +class="ectt-0900"> </span></span><a + id="dx1-27039"></a> <span +class="ectt-1000">\Glsaccessdesc{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3399--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">desc</span><a + id="dx1-27040"></a> field with the first letter converted to upper +case. +</p><!--l. 3403--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccessdescplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-27041"></a> <span +class="ectt-1000">\glsaccessdescplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3405--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">descplural</span><a + id="dx1-27042"></a> field. +</p><!--l. 3408--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccessdescplural</span><span +class="ectt-0900"> </span></span><a + id="dx1-27043"></a> <span +class="ectt-1000">\Glsaccessdescplural{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3410--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">descplural</span><a + id="dx1-27044"></a> field with the first letter converted to upper +case. +</p><!--l. 3414--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccessshort</span><span +class="ectt-0900"> </span></span><a + id="dx1-27045"></a> <span +class="ectt-1000">\glsaccessshort{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3416--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">short</span><a + id="dx1-27046"></a> field. +</p><!--l. 3419--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccessshort</span><span +class="ectt-0900"> </span></span><a + id="dx1-27047"></a> <span +class="ectt-1000">\Glsaccessshort{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3421--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">short</span><a + id="dx1-27048"></a> field with the first letter converted to upper +case. +</p><!--l. 3425--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccessshortpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-27049"></a> <span +class="ectt-1000">\glsaccessshortpl{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3427--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">shortplural</span><a + id="dx1-27050"></a> field. +</p><!--l. 3430--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccessshortpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-27051"></a> <span +class="ectt-1000">\Glsaccessshortpl{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3432--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">shortplural</span><a + id="dx1-27052"></a> field with the first letter converted to upper +case. +</p><!--l. 3436--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccesslong</span><span +class="ectt-0900"> </span></span><a + id="dx1-27053"></a> <span +class="ectt-1000">\glsaccesslong{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3438--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">long</span><a + id="dx1-27054"></a> field. +</p><!--l. 3441--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccesslong</span><span +class="ectt-0900"> </span></span><a + id="dx1-27055"></a> <span +class="ectt-1000">\Glsaccesslong{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3443--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">long</span><a + id="dx1-27056"></a> field with the first letter converted to upper +case. +</p><!--l. 3447--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\glsaccesslongpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-27057"></a> <span +class="ectt-1000">\glsaccesslongpl{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> + + + +</p><!--l. 3449--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">longplural</span><a + id="dx1-27058"></a> field. +</p><!--l. 3452--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\Glsaccesslongpl</span><span +class="ectt-0900"> </span></span><a + id="dx1-27059"></a> <span +class="ectt-1000">\Glsaccesslongpl{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3454--><p class="noindent" > +This displays the value of the <span +class="ecss-1000">longplural</span><a + id="dx1-27060"></a> field with the first letter converted to upper +case. + + + +</p> +<!--l. 3458--><p class="indent" > </div> +</p><!--l. 3458--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">9. <a + id="sec:samples"></a>Sample Files</h2> +</p><!--l. 3461--><p class="indent" > The following sample files are provided with this package: + </p><dl class="description"><dt class="description"> +<span +class="ecbx-1000">sample.tex</span> </dt><dd +class="description">Simple sample file that uses one of the dummy files provided by + the <span +class="ecss-1000">glossaries</span><a + id="dx1-28001"></a> package for testing. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-mixture.tex</span> </dt><dd +class="description">General entries, acronyms and initialisms all treated + differently. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-abbrv.tex</span> </dt><dd +class="description">General abbreviations. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-acronym.tex</span> </dt><dd +class="description">Acronyms aren’t initialisms and don’t expand on <a + id="dx1-28002"></a><a +href="#glo:firstuse">first + use</a>. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-acronym-desc.tex</span> </dt><dd +class="description">Acronyms that have a separate long form and + description. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-crossref.tex</span> </dt><dd +class="description">Unused entries that have been cross-referenced + automatically are added at the end of the document. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-indexhook.tex</span> </dt><dd +class="description">Use the index hook to track which entries have been + indexed (and therefore find out which ones haven’t been indexed). + </dd><dt class="description"> +<span +class="ecbx-1000">sample-footnote.tex</span> </dt><dd +class="description">Footnote abbreviation style that moves the footnote + marker outside of the hyperlink generated by <span +class="ectt-1000">\gls </span>and moves it after + certain punctuation characters for neatness. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-undef.tex</span> </dt><dd +class="description">Warn on undefined entries instead of generating an error. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-mixed-abbrv-styles.tex</span> </dt><dd +class="description">Different abbreviation styles for different + entries. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-initialisms.tex</span> </dt><dd +class="description">Automatically insert dots into initialisms. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-postdot.tex</span> </dt><dd +class="description">Another initialisms example. + + + + </dd><dt class="description"> +<span +class="ecbx-1000">sample-postlink.tex</span> </dt><dd +class="description">Automatically inserting text after the <a + id="dx1-28003"></a><a +href="#glo:linktext">link-text</a> + produced by commands like <span +class="ectt-1000">\gls </span>(outside of hyperlink, if present). + </dd><dt class="description"> +<span +class="ecbx-1000">sample-header.tex</span> </dt><dd +class="description">Using entries in section/chapter headings. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-autoindex.tex</span> </dt><dd +class="description">Using the <span +class="ecss-1000">dualindex</span><a + id="dx1-28004"></a> and <span +class="ecss-1000">indexname</span><a + id="dx1-28005"></a> attributes to + automatically add glossary entries to the index (in addition to the glossary + <a + id="dx1-28006"></a><a +href="#glo:locationlist">location list</a>). + </dd><dt class="description"> +<span +class="ecbx-1000">sample-autoindex-hyp.tex</span> </dt><dd +class="description">As previous but uses <span +class="ecss-1000">hyperref</span><a + id="dx1-28007"></a>. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-nested.tex</span> </dt><dd +class="description">Using <span +class="ectt-1000">\gls</span><a + id="dx1-28008"></a> within the value of the <span +class="ecss-1000">name</span><a + id="dx1-28009"></a> key. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-entrycount.tex</span> </dt><dd +class="description">Enable entry-use counting (only index if used more + than <span +class="cmmi-10">n </span>times). + </dd><dt class="description"> +<span +class="ecbx-1000">sample-unitentrycount.tex</span> </dt><dd +class="description">Enable use of per-unit entry-use counting. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-onelink.tex</span> </dt><dd +class="description">Using the per-unit entry counting to only have one + hyperlink per entry per page. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-altmodifier.tex</span> </dt><dd +class="description">Set the default options for commands like <span +class="ectt-1000">\gls </span>and + add an alternative modifier. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-onthefly.tex</span> </dt><dd +class="description">Using on-the-fly commands. Terms with accents must + have the <span +class="ecss-1000">name</span><a + id="dx1-28010"></a> key explicitly set. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-onthefly-xetex.tex</span> </dt><dd +class="description">Using on-the-fly commands with <span class="HoLogo-XeLaTeX"><span class="HoLogo-Xe">X<span class="HoLogo-e">Ǝ</span></span><span class="HoLogo-LaTeX">L<span class="HoLogo-a">A</span><span class="HoLogo-TeX">T<span class="HoLogo-e">E</span>X</span></span></span>. + Terms with UTF-8 characters don’t need to have the <span +class="ecss-1000">name</span><a + id="dx1-28011"></a> key explicitly + set. Terms that contain commands must have the <span +class="ecss-1000">name</span><a + id="dx1-28012"></a> key explicitly set + with the commands removed from the label. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-onthefly-utf8.tex</span> </dt><dd +class="description">Tries to emulate the previous sample file for use + with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> through the starred version of <span +class="ectt-1000">\GlsXtrEnableOnTheFly</span><a + id="dx1-28013"></a>. + This is a bit iffy and may not always work. Terms that contain commands + must have the <span +class="ecss-1000">name</span><a + id="dx1-28014"></a> key explicitly set with the commands removed from + the label. + + + + </dd><dt class="description"> +<span +class="ecbx-1000">sample-accsupp.tex</span> </dt><dd +class="description">Integrate <span +class="ecss-1000">glossaries-accsupp</span><a + id="dx1-28015"></a>. + </dd><dt class="description"> +<span +class="ecbx-1000">sample-prefix.tex</span> </dt><dd +class="description">Integrate <span +class="ecss-1000">glossaries-prefix</span><a + id="dx1-28016"></a>. + </dd></dl> + + + +<!--l. 3547--><p class="indent" > </div> +</p><!--l. 3547--><p class="noindent" ><a +href="#top">Top</a><div class="chapter"><h2 class="chapterHead">10. <a + id="sec:lang"></a>Multi-Lingual Support</h2> +</p><!--l. 3550--><p class="indent" > There’s only one command provided by <span +class="ecss-1000">glossaries-extra </span>that you’re likely to want +to change in your document and that’s <span +class="ectt-1000">\abbreviationsname</span><a + id="dx1-29001"></a> (<a +href="#sec:pkgopts">§1.2 </a><a +href="#sec:pkgopts">New or +Modified Package Options<!--tex4ht:ref: sec:pkgopts --></a>) if you use the <span +class="ecss-1000">abbreviations</span><a + id="dx1-29002"></a> package option to +automatically create the glossary labelled <span +class="ectt-1000">abbreviations</span>. If this command +doesn’t already exist, it will be defined to “Abbreviations” if <span +class="ecss-1000">babel</span><a + id="dx1-29003"></a> hasn’t +been loaded, otherwise it will be defined as <span +class="ectt-1000">\acronymname </span>(provided by +<span +class="ecss-1000">glossaries</span><a + id="dx1-29004"></a>). +</p><!--l. 3560--><p class="indent" > You can redefine it in the usual way. For example: + + + +</p> + <div class="verbatim" id="verbatim-75"> +\renewcommand*{\abbreviationsname}{List of Abbreviations} +</div> +<!--l. 3563--><p class="nopar" > Or using <span +class="ecss-1000">babel</span><a + id="dx1-29005"></a> or <span +class="ecss-1000">polyglossia</span><a + id="dx1-29006"></a> captions hook: + + + +</p> + <div class="verbatim" id="verbatim-76"> +\appto\captionsenglish{% + <br /> \renewcommand*{\abbreviationsname}{List of Abbreviations}% + <br />} +</div> +<!--l. 3569--><p class="nopar" > +</p><!--l. 3571--><p class="indent" > Alternatively you can use the <span +class="ecss-1000">title</span><a + id="dx1-29007"></a> key when you print the list of abbreviations. +For example: + + + +</p> + <div class="verbatim" id="verbatim-77"> +\printabbreviations[title={List of Abbreviations}] +</div> +<!--l. 3575--><p class="nopar" > or + + + +</p> + <div class="verbatim" id="verbatim-78"> +\printglossary[type=abbreviations,title={List of Abbreviations}] +</div> +<!--l. 3579--><p class="nopar" > +</p><!--l. 3581--><p class="indent" > The other fixed text commands are the diagnostic messages, which shouldn’t +appear in the final draft of your document. +</p><!--l. 3584--><p class="indent" > The <span +class="ecss-1000">glossaries-extra </span>package has the facility to load language modules if they exist, +but won’t warn if they don’t. +</p><!--l. 3587--><p class="indent" > If you want to write your own language module, you just need to create a file +called <span +class="ectt-1000">glossariesxtr-</span>⟨<span +class="ecti-1000">lang</span>⟩<span +class="ectt-1000">.ldf</span>, where ⟨<span +class="ecti-1000">lang</span>⟩ is the language name (see the <span +class="ecss-1000">tracklang</span><a + id="dx1-29008"></a> +package). For example, <span +class="ectt-1000">glossariesxtr-french.ldf</span>. +</p><!--l. 3593--><p class="indent" > The simplest code for this file is: + + + +</p> + <div class="verbatim" id="verbatim-79"> +\ProvidesGlossariesExtraLang{french}[2015/12/09 v1.0] + <br />\newcommand*{\glossariesxtrcaptionsfrench}{% + <br /> \def\abbreviationsname{Abr\’eviations}% + <br />} + <br />\glossariesxtrcaptionsfrench + <br />\ifcsdef{captions\CurrentTrackedDialect} + <br />{% + <br />  \csappto{captions\CurrentTrackedDialect}% + <br />  {% + <br />    \glossariesxtrcaptionsfrench + <br />  }% + <br />}% + <br />{% + <br />  \ifcsdef{captions\CurrentTrackedLanguage} + <br />  {% + <br />    \csappto{captions\CurrentTrackedLanguage}% + <br />    {% + <br />      \glossariesxtrcaptionsfrench + <br />    }% + <br />  }% + <br />  {% + <br />  }% + <br />  \glossariesxtrcaptionsfrench + <br />} +</div> +<!--l. 3621--><p class="nopar" > +</p><!--l. 3623--><p class="indent" > You can adapt this for other languages by replacing all instances of the language +identifier <span +class="ectt-1000">french </span>and the translated text <span class="obeylines-h"><span class="verb"><span +class="ectt-1000">Abr\’eviations</span></span></span> as appropriate. This <span +class="ectt-1000">.ldf</span> +file then needs to be put somewhere on <span class="TEX">T<span +class="E">E</span>X</span>’s path so that it can be found by +<span +class="ecss-1000">glossaries-extra</span>. 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.) +</p><!--l. 3632--><p class="indent" > If you additionally want to provide translations for the diagnostic messages used +when a glossary is missing, you need to redefine the following commands: +</p><!--l. 3635--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningHead</span><span +class="ectt-0900"> </span></span><a + id="dx1-29009"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningHead{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}{</span>⟨<span +class="ecit-1000">file</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 3637--><p class="noindent" > +This produces the following text in English: + </p><div class="quote"> + <!--l. 3640--><p class="noindent" >This document is incomplete. The external file associated with the + glossary ‘⟨<span +class="ecti-1000">label</span>⟩’ (which should be called ⟨<span +class="ecit-1000">file</span>⟩) hasn’t been created.</p></div> + + + +<!--l. 3643--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningEmptyStart</span><span +class="ectt-0900"> </span></span><a + id="dx1-29010"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningEmptyStart </span></div><hr> +</p><!--l. 3645--><p class="noindent" > +This produces the following text in English: + </p><div class="quote"> + <!--l. 3648--><p class="noindent" >This has probably happened because there are no entries defined in + this glossary.</p></div> +<!--l. 3651--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningEmptyMain</span><span +class="ectt-0900"> </span></span><a + id="dx1-29011"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningEmptyMain </span></div><hr> +</p><!--l. 3653--><p class="noindent" > +This produces the following text in English: + </p><div class="quote"> + <!--l. 3656--><p class="noindent" >If you don’t want this glossary, add <span +class="ectt-1000">nomain </span>to your package option + list when you load <span +class="ectt-1000">glossaries-extra.sty</span>. For example:</p></div> +<!--l. 3659--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningEmptyNotMain</span><span +class="ectt-0900"> </span></span><a + id="dx1-29012"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningEmptyNotMain{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 3661--><p class="noindent" > +This produces the following text in English: + </p><div class="quote"> + <!--l. 3664--><p class="noindent" >Did you forget to use <span +class="ectt-1000">type=</span>⟨<span +class="ecit-1000">label</span>⟩ when you defined your entries? + If you tried to load entries into this glossary with <span +class="ectt-1000">\loadglsentries</span> + did you remember to use <span +class="ectt-1000">[</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">] </span>as the optional argument? If you + did, check that the definitions in the file you loaded all had the type + set to <span +class="ectt-1000">\glsdefaulttype</span>.</p></div> +<!--l. 3667--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningCheckFile</span><span +class="ectt-0900"> </span></span><a + id="dx1-29013"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningCheckFile{</span>⟨<span +class="ecit-1000">file</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 3669--><p class="noindent" > +This produces the following text in English: + </p><div class="quote"> + <!--l. 3672--><p class="noindent" >Check the contents of the file ⟨<span +class="ecit-1000">file</span>⟩. If it’s empty, that means you + haven’t indexed any of your entries in this glossary (using commands + like <span +class="ectt-1000">\gls </span>or <span +class="ectt-1000">\glsadd</span>) so this list can’t be generated. If the file isn’t + empty, the document build process hasn’t been completed.</p></div> +<!--l. 3675--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningMisMatch</span><span +class="ectt-0900"> </span></span><a + id="dx1-29014"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningMisMatch </span></div><hr> +</p><!--l. 3677--><p class="noindent" > +This produces the following text in English: + </p><div class="quote"> + <!--l. 3680--><p class="noindent" >You need + to either replace <span +class="ectt-1000">\makenoidxglossaries </span>with <span +class="ectt-1000">\makeglossaries </span>or + + + + replace <span +class="ectt-1000">\printglossary </span>(or <span +class="ectt-1000">\printglossaries</span>) + with <span +class="ectt-1000">\printnoidxglossary </span>(or <span +class="ectt-1000">\printnoidxglossaries</span>) and then + rebuild this document.</p></div> +<!--l. 3683--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningNoOut</span><span +class="ectt-0900"> </span></span><a + id="dx1-29015"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningNoOut{</span>⟨<span +class="ecit-1000">file</span>⟩<span +class="ectt-1000">} </span></div><hr> +</p><!--l. 3685--><p class="noindent" > +This produces the following text in English: + </p><div class="quote"> + <!--l. 3688--><p class="noindent" >The file ⟨<span +class="ecit-1000">file</span>⟩ doesn’t exist. This most likely means you haven’t used + <span +class="ectt-1000">\makeglossaries </span>or you have used <span +class="ectt-1000">\nofiles</span>. If this is just a draft + version of the document, you can suppress this message using the + <span +class="ectt-1000">nomissingglstext </span>package option.</p></div> +<!--l. 3691--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningTail</span><span +class="ectt-0900"> </span></span><a + id="dx1-29016"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningTail </span></div><hr> +</p><!--l. 3693--><p class="noindent" > +This produces the following text in English: + </p><div class="quote"> + <!--l. 3696--><p class="noindent" >This message will be removed once the problem has been fixed.</p></div> +<!--l. 3699--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningBuildInfo</span><span +class="ectt-0900"> </span></span><a + id="dx1-29017"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningBuildInfo </span></div><hr> +</p><!--l. 3701--><p class="noindent" > +This is advice on how to generate the glossary files. See the documented code +(<span +class="ectt-1000">glossaries-extra-code.pdf</span>) for further details. +</p><!--l. 3706--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ectt-0900">\GlsXtrNoGlsWarningAutoMake</span><span +class="ectt-0900"> </span></span><a + id="dx1-29018"></a> <span +class="ectt-1000">\GlsXtrNoGlsWarningAutoMake{</span>⟨<span +class="ecit-1000">label</span>⟩<span +class="ectt-1000">}</span> +</div><hr> +</p><!--l. 3708--><p class="noindent" > +This is the message produced when the <span +class="ecss-1000">automake</span><a + id="dx1-29019"></a> 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. + + + +</p><!--l. 1--><p class="indent" > <a + id="likesection.1"></a><a + id="glossary"></a> + + + +</p> +<!--l. 1--><p class="indent" > </div> +</p><!--l. 1--><p class="noindent" ><a +href="#top">Top</a></p><h2 class="likechapterHead"><a + id="x1-3000010"></a>Glossary</h2> + <dl class="description"><dt class="description"> +<a + id="glo:entrylocation"></a><span +class="ecbx-1000">entry location</span><a + id="dx1-30001"></a> </dt><dd +class="description">The location of the entry in the document. This defaults to + the page number on which the entry appears. An entry may have multiple + locations. + </dd><dt class="description"> +<a + id="glo:firstuse"></a><span +class="ecbx-1000">first use</span><a + id="dx1-30002"></a> </dt><dd +class="description">The first time a glossary entry is used (from the start of the document + or after a reset) with one of the following commands: <span +class="ectt-1000">\gls</span><a + id="dx1-30003"></a>, <span +class="ectt-1000">\Gls</span><a + id="dx1-30004"></a>, <span +class="ectt-1000">\GLS</span><a + id="dx1-30005"></a>, + <span +class="ectt-1000">\glspl</span><a + id="dx1-30006"></a>, <span +class="ectt-1000">\Glspl</span><a + id="dx1-30007"></a>, <span +class="ectt-1000">\GLSpl</span><a + id="dx1-30008"></a> or <span +class="ectt-1000">\glsdisp</span><a + id="dx1-30009"></a>. + </dd><dt class="description"> +<a + id="glo:firstuseflag"></a><span +class="ecbx-1000">first use flag</span><a + id="dx1-30010"></a> </dt><dd +class="description">A conditional that determines whether or not the entry has been + used according to the rules of <a + id="dx1-30011"></a><a +href="#glo:firstuse">first use</a>. + </dd><dt class="description"> +<a + id="glo:firstusetext"></a><span +class="ecbx-1000">first use text</span><a + id="dx1-30012"></a> </dt><dd +class="description">The text that is displayed on <a + id="dx1-30013"></a>first use, which is governed by the + <span +class="ecss-1000">first</span><a + id="dx1-30014"></a> and <span +class="ecss-1000">firstplural</span><a + id="dx1-30015"></a> keys of <span +class="ectt-1000">\newglossaryentry</span><a + id="dx1-30016"></a>. (May be overridden by + <span +class="ectt-1000">\glsdisp</span><a + id="dx1-30017"></a>.) + </dd><dt class="description"> +<a + id="glo:linktext"></a><span +class="ecbx-1000">link-text</span><a + id="dx1-30018"></a> </dt><dd +class="description">The text produced by commands such as <span +class="ectt-1000">\gls</span><a + id="dx1-30019"></a>. It may or may not + have a hyperlink to the glossary. + </dd><dt class="description"> +<a + id="glo:locationlist"></a><span +class="ecbx-1000">location list</span><a + id="dx1-30020"></a> </dt><dd +class="description">A list of <a + id="dx1-30021"></a><a +href="#glo:entrylocation">entry locations</a>. See <a + id="dx1-30022"></a><a +href="#glo:numberlist">number list</a>. + </dd><dt class="description"> +<a + id="glo:makeglossaries"></a><span +class="ectt-1000">makeglossaries</span><a + id="dx1-30023"></a> </dt><dd +class="description">A custom designed Perl script interface provided with the + <span +class="ecss-1000">glossaries </span>package to run <a + id="dx1-30024"></a><a +href="#glo:xindy"><span +class="ectt-1000">xindy</span></a> or <a + id="dx1-30025"></a><a +href="#glo:makeindex"><span +class="ectt-1000">makeindex</span></a> according to the document + settings. + </dd><dt class="description"> +<a + id="glo:makeindex"></a><span +class="ectt-1000">makeindex</span><a + id="dx1-30026"></a> </dt><dd +class="description">An indexing application. + </dd><dt class="description"> +<a + id="glo:numberlist"></a><span +class="ecbx-1000">number list</span><a + id="dx1-30027"></a> </dt><dd +class="description">A list of <a + id="dx1-30028"></a>entry locations (also called a location list). The number + list can be suppressed using the <span +class="ecss-1000">nonumberlist</span><a + id="dx1-30029"></a> package option. + + + + </dd><dt class="description"> +<a + id="glo:xindy"></a><span +class="ectt-1000">xindy</span><a + id="dx1-30030"></a> </dt><dd +class="description">An flexible indexing application with multilingual support written in + Perl.</dd></dl> + + + + <h2 class="likechapterHead"><a + id="x1-3100010"></a>Index</h2> <span +class="ecbx-1000">A</span> + <div class="theindex"><span class="index-item">abbreviation styles:<br /></span> +<span class="index-subitem">    <span +class="ecss-1000">footnote</span>  <a +href="glossaries-extra-manual.html#dx1-12043" >1</a>, <a +href="glossaries-extra-manual.html#dx1-18054" >2</a>, <a +href="glossaries-extra-manual.html#dx1-18062" >3</a>, <a +href="glossaries-extra-manual.html#dx1-18065" >4</a>, <a +href="glossaries-extra-manual.html#dx1-18068" >5</a>, <a +href="glossaries-extra-manual.html#dx1-18071" >6</a>, <a +href="glossaries-extra-manual.html#dx1-19021" >7</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">footnote-em</span>  <a +href="glossaries-extra-manual.html#dx1-18067" >8</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">footnote-sc</span>  <a +href="glossaries-extra-manual.html#dx1-18061" >9</a>, <a +href="glossaries-extra-manual.html#dx1-19041" >10</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">footnote-sm</span>  <a +href="glossaries-extra-manual.html#dx1-18064" >11</a>, <a +href="glossaries-extra-manual.html#dx1-19042" >12</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long</span>  <a +href="glossaries-extra-manual.html#dx1-14002" >13</a>, <a +href="glossaries-extra-manual.html#dx1-17046" >14</a>, <a +href="glossaries-extra-manual.html#dx1-17051" >15</a>, <a +href="glossaries-extra-manual.html#dx1-17055" >16</a>, <a +href="glossaries-extra-manual.html#dx1-17058" >17</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-desc</span>  <a +href="glossaries-extra-manual.html#dx1-17031" >18</a>, <a +href="glossaries-extra-manual.html#dx1-17037" >19</a>, <a +href="glossaries-extra-manual.html#dx1-17041" >20</a>, <a +href="glossaries-extra-manual.html#dx1-17044" >21</a>, <a +href="glossaries-extra-manual.html#dx1-17047" >22</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-desc-em</span>  <a +href="glossaries-extra-manual.html#dx1-17043" >23</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-desc-sc</span>  <a +href="glossaries-extra-manual.html#dx1-17036" >24</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-desc-sm</span>  <a +href="glossaries-extra-manual.html#dx1-17040" >25</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-em</span>  <a +href="glossaries-extra-manual.html#dx1-17057" >26</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-sc</span>  <a +href="glossaries-extra-manual.html#dx1-17050" >27</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-short</span>  <a +href="glossaries-extra-manual.html#dx1-9044" >28</a>, <a +href="glossaries-extra-manual.html#dx1-12028" >29</a>, <a +href="glossaries-extra-manual.html#dx1-12031" >30</a>, <a +href="glossaries-extra-manual.html#dx1-12041" >31</a>, <a +href="glossaries-extra-manual.html#dx1-18002" >32</a>, <a +href="glossaries-extra-manual.html#dx1-18007" >33</a>, <a +href="glossaries-extra-manual.html#dx1-18010" >34</a>, <a +href="glossaries-extra-manual.html#dx1-18013" >35</a>, <a +href="glossaries-extra-manual.html#dx1-19017" >36</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-short-desc</span>  <a +href="glossaries-extra-manual.html#dx1-18015" >37</a>, <a +href="glossaries-extra-manual.html#dx1-18020" >38</a>, <a +href="glossaries-extra-manual.html#dx1-18023" >39</a>, <a +href="glossaries-extra-manual.html#dx1-18026" >40</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-short-em</span>  <a +href="glossaries-extra-manual.html#dx1-18012" >41</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-short-em-desc</span>  <a +href="glossaries-extra-manual.html#dx1-18025" >42</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-short-sc</span>  <a +href="glossaries-extra-manual.html#dx1-12030" >43</a>, <a +href="glossaries-extra-manual.html#dx1-18006" >44</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-short-sc-desc</span>  <a +href="glossaries-extra-manual.html#dx1-18019" >45</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-short-sm</span>  <a +href="glossaries-extra-manual.html#dx1-18009" >46</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-short-sm-desc</span>  <a +href="glossaries-extra-manual.html#dx1-18022" >47</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long-sm</span>  <a +href="glossaries-extra-manual.html#dx1-17054" >48</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">postfootnote</span>  <a +href="glossaries-extra-manual.html#dx1-7053" >49</a>, <a +href="glossaries-extra-manual.html#dx1-18070" >50</a>, <a +href="glossaries-extra-manual.html#dx1-18079" >51</a>, <a +href="glossaries-extra-manual.html#dx1-18082" >52</a>, <a +href="glossaries-extra-manual.html#dx1-18085" >53</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">postfootnote-em</span>  <a +href="glossaries-extra-manual.html#dx1-18084" >54</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">postfootnote-sc</span>  <a +href="glossaries-extra-manual.html#dx1-18078" >55</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">postfootnote-sm</span>  <a +href="glossaries-extra-manual.html#dx1-18081" >56</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short</span>  <a +href="glossaries-extra-manual.html#dx1-12019" >57</a>, <a +href="glossaries-extra-manual.html#dx1-12042" >58</a>, <a +href="glossaries-extra-manual.html#dx1-14003" >59</a>, <a +href="glossaries-extra-manual.html#dx1-14017" >60</a>, <a +href="glossaries-extra-manual.html#dx1-17002" >61</a>, <a +href="glossaries-extra-manual.html#dx1-17008" >62</a>, <a +href="glossaries-extra-manual.html#dx1-17011" >63</a>, <a +href="glossaries-extra-manual.html#dx1-17014" >64</a>, <a +href="glossaries-extra-manual.html#dx1-17017" >65</a>, <a +href="glossaries-extra-manual.html#dx1-17020" >66</a>, <a +href="glossaries-extra-manual.html#dx1-17023" >67</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-desc</span>  <a +href="glossaries-extra-manual.html#dx1-17016" >68</a>, <a +href="glossaries-extra-manual.html#dx1-17026" >69</a>, <a +href="glossaries-extra-manual.html#dx1-17029" >70</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-em</span>  <a +href="glossaries-extra-manual.html#dx1-17013" >71</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-em-desc</span>  <a +href="glossaries-extra-manual.html#dx1-17028" >72</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-em-long</span>  <a +href="glossaries-extra-manual.html#dx1-18038" >73</a>, <a +href="glossaries-extra-manual.html#dx1-19087" >74</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-em-long-desc</span>  <a +href="glossaries-extra-manual.html#dx1-18051" >75</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-long</span>  <a +href="glossaries-extra-manual.html#dx1-12021" >76</a>, <a +href="glossaries-extra-manual.html#dx1-18028" >77</a>, <a +href="glossaries-extra-manual.html#dx1-18033" >78</a>, <a +href="glossaries-extra-manual.html#dx1-18036" >79</a>, <a +href="glossaries-extra-manual.html#dx1-18039" >80</a>, <a +href="glossaries-extra-manual.html#dx1-19083" >81</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-long-desc</span>  <a +href="glossaries-extra-manual.html#dx1-18041" >82</a>, <a +href="glossaries-extra-manual.html#dx1-18046" >83</a>, <a +href="glossaries-extra-manual.html#dx1-18049" >84</a>, <a +href="glossaries-extra-manual.html#dx1-18052" >85</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-sc</span>  <a +href="glossaries-extra-manual.html#dx1-17007" >86</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-sc-desc</span>  <a +href="glossaries-extra-manual.html#dx1-17022" >87</a> <br /></span> + + + +<span class="index-subitem">    <span +class="ecss-1000">short-sc-long</span>  <a +href="glossaries-extra-manual.html#dx1-18032" >88</a>, <a +href="glossaries-extra-manual.html#dx1-19085" >89</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-sc-long-desc</span>  <a +href="glossaries-extra-manual.html#dx1-18045" >90</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-sm</span>  <a +href="glossaries-extra-manual.html#dx1-17010" >91</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-sm-desc</span>  <a +href="glossaries-extra-manual.html#dx1-17025" >92</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-sm-long</span>  <a +href="glossaries-extra-manual.html#dx1-18035" >93</a>, <a +href="glossaries-extra-manual.html#dx1-19086" >94</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short-sm-long-desc</span>  <a +href="glossaries-extra-manual.html#dx1-18048" >95</a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\abbreviationsname</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-4042" ><span +class="ecti-1000">96</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\abbrvpluralsuffix</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19044" ><span +class="ecti-1000">97</span></a> <br /></span> +<span class="index-item">acronym styles (glossaries):<br /></span> +<span class="index-subitem">    <span +class="ectt-1000">long-sp-short</span>  <a +href="glossaries-extra-manual.html#dx1-10006" >98</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">amsgen </span>package  <a +href="glossaries-extra-manual.html#dx1-15" >99</a> <br /></span> +<p class="theindex"> <span +class="ecbx-1000">B</span> +<span class="index-item"><span +class="ecss-1000">babel </span>package  <a +href="glossaries-extra-manual.html#dx1-3012" >100</a>, <a +href="glossaries-extra-manual.html#dx1-3016" >101</a>, <a +href="glossaries-extra-manual.html#dx1-4043" >102</a>, <a +href="glossaries-extra-manual.html#dx1-4044" >103</a>, <a +href="glossaries-extra-manual.html#dx1-4045" >104</a>, <a +href="glossaries-extra-manual.html#dx1-21002" >105</a>, <a +href="glossaries-extra-manual.html#dx1-29003" >106</a>, <a +href="glossaries-extra-manual.html#dx1-29005" >107</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">C</span> +<span class="index-item">categories:<br /></span> +<span class="index-subitem">    <span +class="ecss-1000">abbreviation</span>  <a +href="glossaries-extra-manual.html#dx1-8003" >108</a>, <a +href="glossaries-extra-manual.html#dx1-12022" >109</a>, <a +href="glossaries-extra-manual.html#dx1-13007" >110</a>, <a +href="glossaries-extra-manual.html#dx1-21004" >111</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">acronym</span>  <a +href="glossaries-extra-manual.html#dx1-11014" >112</a>, <a +href="glossaries-extra-manual.html#dx1-12020" >113</a>, <a +href="glossaries-extra-manual.html#dx1-13006" >114</a>, <a +href="glossaries-extra-manual.html#dx1-21005" >115</a>, <a +href="glossaries-extra-manual.html#dx1-21019" >116</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">general</span>  <a +href="glossaries-extra-manual.html#dx1-7027" >117</a>, <a +href="glossaries-extra-manual.html#dx1-7052" >118</a>, <a +href="glossaries-extra-manual.html#dx1-11013" >119</a>, <a +href="glossaries-extra-manual.html#dx1-11016" >120</a>, <a +href="glossaries-extra-manual.html#dx1-21003" >121</a>, <a +href="glossaries-extra-manual.html#dx1-21018" >122</a>, <a +href="glossaries-extra-manual.html#dx1-21083" >123</a>, <a +href="glossaries-extra-manual.html#dx1-22038" >124</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">index</span>  <a +href="glossaries-extra-manual.html#dx1-5007" >125</a>, <a +href="glossaries-extra-manual.html#dx1-21008" >126</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">number</span>  <a +href="glossaries-extra-manual.html#dx1-21014" >127</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">symbol</span>  <a +href="glossaries-extra-manual.html#dx1-7034" >128</a>, <a +href="glossaries-extra-manual.html#dx1-21011" >129</a> <br /></span> +<span class="index-item">category attributes:<br /></span> +<span class="index-subitem">    <span +class="ecss-1000">aposplural</span>  <a +href="glossaries-extra-manual.html#dx1-16030" >130</a>, <a +href="glossaries-extra-manual.html#dx1-21038" >131</a>, <a +href="glossaries-extra-manual.html#dx1-21045" >132</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">discardperiod</span>  <a +href="glossaries-extra-manual.html#dx1-7023" >133</a>, <a +href="glossaries-extra-manual.html#dx1-21030" >134</a>, <a +href="glossaries-extra-manual.html#dx1-21033" >135</a>, <a +href="glossaries-extra-manual.html#dx1-21037" >136</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">dualindex</span>  <a +href="glossaries-extra-manual.html#dx1-21069" >137</a>, <a +href="glossaries-extra-manual.html#dx1-23002" >138</a>, <a +href="glossaries-extra-manual.html#dx1-23009" >139</a>, <a +href="glossaries-extra-manual.html#dx1-23014" >140</a>, <a +href="glossaries-extra-manual.html#dx1-23021" >141</a>, <a +href="glossaries-extra-manual.html#dx1-23024" >142</a>, <a +href="glossaries-extra-manual.html#dx1-28004" >143</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">entrycount</span>  <a +href="glossaries-extra-manual.html#dx1-8002" >144</a>, <a +href="glossaries-extra-manual.html#dx1-21052" >145</a>, <a +href="glossaries-extra-manual.html#dx1-21057" >146</a>, <a +href="glossaries-extra-manual.html#dx1-22002" >147</a>, <a +href="glossaries-extra-manual.html#dx1-22006" >148</a>, <a +href="glossaries-extra-manual.html#dx1-22017" >149</a>, <a +href="glossaries-extra-manual.html#dx1-22021" >150</a>, <a +href="glossaries-extra-manual.html#dx1-22022" >151</a>, <a +href="glossaries-extra-manual.html#dx1-22026" >152</a>, <a +href="glossaries-extra-manual.html#dx1-22027" >153</a>, <a +href="glossaries-extra-manual.html#dx1-22031" >154</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">glossdesc</span>  <a +href="glossaries-extra-manual.html#dx1-11005" >155</a>, <a +href="glossaries-extra-manual.html#dx1-21058" >156</a>, <a +href="glossaries-extra-manual.html#dx1-21064" >157</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">glossname</span>  <a +href="glossaries-extra-manual.html#dx1-11004" >158</a>, <a +href="glossaries-extra-manual.html#dx1-21063" >159</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">headuc</span>  <a +href="glossaries-extra-manual.html#dx1-20020" >160</a>, <a +href="glossaries-extra-manual.html#dx1-20022" >161</a>, <a +href="glossaries-extra-manual.html#dx1-21047" >162</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">indexname</span>  <a +href="glossaries-extra-manual.html#dx1-11009" >163</a>, <a +href="glossaries-extra-manual.html#dx1-21066" >164</a>, <a +href="glossaries-extra-manual.html#dx1-23001" >165</a>, <a +href="glossaries-extra-manual.html#dx1-23006" >166</a>, <a +href="glossaries-extra-manual.html#dx1-28005" >167</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">indexonlyfirst</span>  <a +href="glossaries-extra-manual.html#dx1-6006" >168</a>, <a +href="glossaries-extra-manual.html#dx1-21028" >169</a>, <a +href="glossaries-extra-manual.html#dx1-23022" >170</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">insertdots</span>  <a +href="glossaries-extra-manual.html#dx1-12005" >171</a>, <a +href="glossaries-extra-manual.html#dx1-21034" >172</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">nohyper</span>  <a +href="glossaries-extra-manual.html#dx1-21025" >173</a>, <a +href="glossaries-extra-manual.html#dx1-21084" >174</a>, <a +href="glossaries-extra-manual.html#dx1-21085" >175</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">nohyperfirst</span>  <a +href="glossaries-extra-manual.html#dx1-18056" >176</a>, <a +href="glossaries-extra-manual.html#dx1-19022" >177</a>, <a +href="glossaries-extra-manual.html#dx1-19024" >178</a>, <a +href="glossaries-extra-manual.html#dx1-21021" >179</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">noshortplural</span>  <a +href="glossaries-extra-manual.html#dx1-12006" >180</a>, <a +href="glossaries-extra-manual.html#dx1-16031" >181</a>, <a +href="glossaries-extra-manual.html#dx1-21041" >182</a>, <a +href="glossaries-extra-manual.html#dx1-21046" >183</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">pluraldiscardperiod</span>  <a +href="glossaries-extra-manual.html#dx1-21032" >184</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">regular</span>  <a +href="glossaries-extra-manual.html#dx1-7005" >185</a>, <a +href="glossaries-extra-manual.html#dx1-7015" >186</a>, <a +href="glossaries-extra-manual.html#dx1-7018" >187</a>, <a +href="glossaries-extra-manual.html#dx1-14004" >188</a>, <a +href="glossaries-extra-manual.html#dx1-16005" >189</a>, <a +href="glossaries-extra-manual.html#dx1-16014" >190</a>, <a +href="glossaries-extra-manual.html#dx1-17001" >191</a>, <a +href="glossaries-extra-manual.html#dx1-18001" >192</a>, <a +href="glossaries-extra-manual.html#dx1-19023" >193</a>, <a +href="glossaries-extra-manual.html#dx1-19053" >194</a>, <a +href="glossaries-extra-manual.html#dx1-19057" >195</a>, <a +href="glossaries-extra-manual.html#dx1-19061" >196</a>, <a +href="glossaries-extra-manual.html#dx1-19065" >197</a>, <a +href="glossaries-extra-manual.html#dx1-21020" >198</a>, <a +href="glossaries-extra-manual.html#dx1-21074" >199</a>, <a +href="glossaries-extra-manual.html#dx1-21087" >200</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">tagging</span>  <a +href="glossaries-extra-manual.html#dx1-13002" >201</a>, <a +href="glossaries-extra-manual.html#dx1-13005" >202</a>, <a +href="glossaries-extra-manual.html#dx1-13008" >203</a>, <a +href="glossaries-extra-manual.html#dx1-21049" >204</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">unitcount</span>  <a +href="glossaries-extra-manual.html#dx1-22032" >205</a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\cGLS</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22012" ><span +class="ecti-1000">206</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\cGLSformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22014" ><span +class="ecti-1000">207</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\cGLSpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22013" ><span +class="ecti-1000">208</span></a> <br /></span> + + + +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\cGLSplformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22015" ><span +class="ecti-1000">209</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\CustomAbbreviationFields</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19009" ><span +class="ecti-1000">210</span></a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">D</span> +<span class="index-item"><span +class="ecss-1000">datatool-base </span>package  <a +href="glossaries-extra-manual.html#dx1-14" >211</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">E</span> +<span class="index-item">entry location  <a +href="glossaries-extra-manual.html#dx1-30001" ><span +class="ecbx-1000">212</span></a>, <a +href="glossaries-extra-manual.html#dx1-30021" >213</a>, <a +href="glossaries-extra-manual.html#dx1-30028" >214</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">etoolbox </span>package  <a +href="glossaries-extra-manual.html#dx1-10" >215</a>, <a +href="glossaries-extra-manual.html#dx1-21080" >216</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">F</span> +<span class="index-item">first use  <a +href="glossaries-extra-manual.html#dx1-6004" >217</a>, <a +href="glossaries-extra-manual.html#dx1-7011" >218</a>, <a +href="glossaries-extra-manual.html#dx1-7032" >219</a>, <a +href="glossaries-extra-manual.html#dx1-7033" >220</a>, <a +href="glossaries-extra-manual.html#dx1-7036" >221</a>, <a +href="glossaries-extra-manual.html#dx1-7041" >222</a>, <a +href="glossaries-extra-manual.html#dx1-7046" >223</a>, <a +href="glossaries-extra-manual.html#dx1-7049" >224</a>, <a +href="glossaries-extra-manual.html#dx1-7051" >225</a>, <a +href="glossaries-extra-manual.html#dx1-9009" >226</a>, <a +href="glossaries-extra-manual.html#dx1-9017" >227</a>, <a +href="glossaries-extra-manual.html#dx1-9018" >228</a>, <a +href="glossaries-extra-manual.html#dx1-9019" >229</a>, <a +href="glossaries-extra-manual.html#dx1-9020" >230</a>, <a +href="glossaries-extra-manual.html#dx1-9024" >231</a>, <a +href="glossaries-extra-manual.html#dx1-9028" >232</a>, <a +href="glossaries-extra-manual.html#dx1-9033" >233</a>, <a +href="glossaries-extra-manual.html#dx1-9045" >234</a>, <a +href="glossaries-extra-manual.html#dx1-9046" >235</a>, <a +href="glossaries-extra-manual.html#dx1-10009" >236</a>, <a +href="glossaries-extra-manual.html#dx1-10010" >237</a>, <a +href="glossaries-extra-manual.html#dx1-12002" >238</a>, <a +href="glossaries-extra-manual.html#dx1-12025" >239</a>, <a +href="glossaries-extra-manual.html#dx1-12033" >240</a>, <a +href="glossaries-extra-manual.html#dx1-12037" >241</a>, <a +href="glossaries-extra-manual.html#dx1-12038" >242</a>, <a +href="glossaries-extra-manual.html#dx1-14016" >243</a>, <a +href="glossaries-extra-manual.html#dx1-14018" >244</a>, <a +href="glossaries-extra-manual.html#dx1-16006" >245</a>, <a +href="glossaries-extra-manual.html#dx1-16020" >246</a>, <a +href="glossaries-extra-manual.html#dx1-17003" >247</a>, <a +href="glossaries-extra-manual.html#dx1-18003" >248</a>, <a +href="glossaries-extra-manual.html#dx1-18016" >249</a>, <a +href="glossaries-extra-manual.html#dx1-18029" >250</a>, <a +href="glossaries-extra-manual.html#dx1-18042" >251</a>, <a +href="glossaries-extra-manual.html#dx1-18055" >252</a>, <a +href="glossaries-extra-manual.html#dx1-18057" >253</a>, <a +href="glossaries-extra-manual.html#dx1-18074" >254</a>, <a +href="glossaries-extra-manual.html#dx1-19045" >255</a>, <a +href="glossaries-extra-manual.html#dx1-19049" >256</a>, <a +href="glossaries-extra-manual.html#dx1-19052" >257</a>, <a +href="glossaries-extra-manual.html#dx1-19056" >258</a>, <a +href="glossaries-extra-manual.html#dx1-19060" >259</a>, <a +href="glossaries-extra-manual.html#dx1-19064" >260</a>, <a +href="glossaries-extra-manual.html#dx1-21023" >261</a>, <a +href="glossaries-extra-manual.html#dx1-22037" >262</a>, <a +href="glossaries-extra-manual.html#dx1-28002" >263</a>, <a +href="glossaries-extra-manual.html#dx1-30002" ><span +class="ecbx-1000">264</span></a>, <a +href="glossaries-extra-manual.html#dx1-30011" >265</a>, <a +href="glossaries-extra-manual.html#dx1-30013" >266</a> <br /></span> +<span class="index-item">first use flag  <a +href="glossaries-extra-manual.html#dx1-7039" >267</a>, <a +href="glossaries-extra-manual.html#dx1-20002" >268</a>, <a +href="glossaries-extra-manual.html#dx1-22020" >269</a>, <a +href="glossaries-extra-manual.html#dx1-30010" ><span +class="ecbx-1000">270</span></a> <br /></span> +<span class="index-item">first use text  <a +href="glossaries-extra-manual.html#dx1-30012" ><span +class="ecbx-1000">271</span></a>, <a +href="glossaries-extra-manual.html#dx1-30031" >272</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">fontenc </span>package  <a +href="glossaries-extra-manual.html#dx1-16024" >273</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">G</span> +<span class="index-item"><span +class="ecss-1000">glossaries </span>package  <a +href="glossaries-extra-manual.html#dx1-2" >274</a>, <a +href="glossaries-extra-manual.html#dx1-3" >275</a>, <a +href="glossaries-extra-manual.html#dx1-4" >276</a>, <a +href="glossaries-extra-manual.html#dx1-5" >277</a>, <a +href="glossaries-extra-manual.html#dx1-6" >278</a>, <a +href="glossaries-extra-manual.html#dx1-7" >279</a>, <a +href="glossaries-extra-manual.html#dx1-2001" >280</a>, <a +href="glossaries-extra-manual.html#dx1-3001" >281</a>, <a +href="glossaries-extra-manual.html#dx1-3009" >282</a>, <a +href="glossaries-extra-manual.html#dx1-3011" >283</a>, <a +href="glossaries-extra-manual.html#dx1-3023" >284</a>, <a +href="glossaries-extra-manual.html#dx1-3033" >285</a>, <a +href="glossaries-extra-manual.html#dx1-4001" >286</a>, <a +href="glossaries-extra-manual.html#dx1-4002" >287</a>, <a +href="glossaries-extra-manual.html#dx1-4003" >288</a>, <a +href="glossaries-extra-manual.html#dx1-4004" >289</a>, <a +href="glossaries-extra-manual.html#dx1-4006" >290</a>, <a +href="glossaries-extra-manual.html#dx1-4007" >291</a>, <a +href="glossaries-extra-manual.html#dx1-4019" >292</a>, <a +href="glossaries-extra-manual.html#dx1-4025" >293</a>, <a +href="glossaries-extra-manual.html#dx1-4033" >294</a>, <a +href="glossaries-extra-manual.html#dx1-4034" >295</a>, <a +href="glossaries-extra-manual.html#dx1-4049" >296</a>, <a +href="glossaries-extra-manual.html#dx1-4053" >297</a>, <a +href="glossaries-extra-manual.html#dx1-4056" >298</a>, <a +href="glossaries-extra-manual.html#dx1-4060" >299</a>, <a +href="glossaries-extra-manual.html#dx1-4063" >300</a>, <a +href="glossaries-extra-manual.html#dx1-4066" >301</a>, <a +href="glossaries-extra-manual.html#dx1-4069" >302</a>, <a +href="glossaries-extra-manual.html#dx1-4071" >303</a>, <a +href="glossaries-extra-manual.html#dx1-5001" >304</a>, <a +href="glossaries-extra-manual.html#dx1-6003" >305</a>, <a +href="glossaries-extra-manual.html#dx1-6012" >306</a>, <a +href="glossaries-extra-manual.html#dx1-7001" >307</a>, <a +href="glossaries-extra-manual.html#dx1-7008" >308</a>, <a +href="glossaries-extra-manual.html#dx1-7020" >309</a>, <a +href="glossaries-extra-manual.html#dx1-7042" >310</a>, <a +href="glossaries-extra-manual.html#dx1-9005" >311</a>, <a +href="glossaries-extra-manual.html#dx1-9031" >312</a>, <a +href="glossaries-extra-manual.html#dx1-10002" >313</a>, <a +href="glossaries-extra-manual.html#dx1-10004" >314</a>, <a +href="glossaries-extra-manual.html#dx1-10007" >315</a>, <a +href="glossaries-extra-manual.html#dx1-12001" >316</a>, <a +href="glossaries-extra-manual.html#dx1-12011" >317</a>, <a +href="glossaries-extra-manual.html#dx1-12013" >318</a>, <a +href="glossaries-extra-manual.html#dx1-12018" >319</a>, <a +href="glossaries-extra-manual.html#dx1-12023" >320</a>, <a +href="glossaries-extra-manual.html#dx1-14006" >321</a>, <a +href="glossaries-extra-manual.html#dx1-16028" >322</a>, <a +href="glossaries-extra-manual.html#dx1-19003" >323</a>, <a +href="glossaries-extra-manual.html#dx1-19006" >324</a>, <a +href="glossaries-extra-manual.html#dx1-19008" >325</a>, <a +href="glossaries-extra-manual.html#dx1-19025" >326</a>, <a +href="glossaries-extra-manual.html#dx1-19030" >327</a>, <a +href="glossaries-extra-manual.html#dx1-19035" >328</a>, <a +href="glossaries-extra-manual.html#dx1-20001" >329</a>, <a +href="glossaries-extra-manual.html#dx1-20006" >330</a>, <a +href="glossaries-extra-manual.html#dx1-20015" >331</a>, <a +href="glossaries-extra-manual.html#dx1-21056" >332</a>, <a +href="glossaries-extra-manual.html#dx1-22007" >333</a>, <a +href="glossaries-extra-manual.html#dx1-22011" >334</a>, <a +href="glossaries-extra-manual.html#dx1-22016" >335</a>, <a +href="glossaries-extra-manual.html#dx1-23008" >336</a>, <a +href="glossaries-extra-manual.html#dx1-24001" >337</a>, <a +href="glossaries-extra-manual.html#dx1-25001" >338</a>, <a +href="glossaries-extra-manual.html#dx1-28001" >339</a>, <a +href="glossaries-extra-manual.html#dx1-29004" >340</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">glossaries-accsupp </span>package  <a +href="glossaries-extra-manual.html#dx1-4009" >341</a>, <a +href="glossaries-extra-manual.html#dx1-4010" >342</a>, <a +href="glossaries-extra-manual.html#dx1-4013" >343</a>, <a +href="glossaries-extra-manual.html#dx1-4016" >344</a>, <a +href="glossaries-extra-manual.html#dx1-19081" >345</a>, <a +href="glossaries-extra-manual.html#dx1-19082" >346</a>, <a +href="glossaries-extra-manual.html#dx1-25003" >347</a>, <a +href="glossaries-extra-manual.html#dx1-27001" >348</a>, <a +href="glossaries-extra-manual.html#dx1-27003" >349</a>, <a +href="glossaries-extra-manual.html#dx1-27004" >350</a>, <a +href="glossaries-extra-manual.html#dx1-27007" >351</a>, <a +href="glossaries-extra-manual.html#dx1-27009" >352</a>, <a +href="glossaries-extra-manual.html#dx1-27011" >353</a>, <a +href="glossaries-extra-manual.html#dx1-27012" >354</a>, <a +href="glossaries-extra-manual.html#dx1-28015" >355</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">glossaries-prefix </span>package  <a +href="glossaries-extra-manual.html#dx1-25002" >356</a>, <a +href="glossaries-extra-manual.html#dx1-26001" >357</a>, <a +href="glossaries-extra-manual.html#dx1-28016" >358</a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glossariesextrasetup</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-4085" ><span +class="ecti-1000">359</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsabbrvdefaultfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-12029" ><span +class="ecti-1000">360</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsabbrvfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-12026" ><span +class="ecti-1000">361</span></a>, <a +href="glossaries-extra-manual.html#dx1-19048" ><span +class="ecti-1000">362</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccessdesc</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27039" ><span +class="ecti-1000">363</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccessdesc</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27037" ><span +class="ecti-1000">364</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccessdescplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27043" ><span +class="ecti-1000">365</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccessdescplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27041" ><span +class="ecti-1000">366</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccessfirst</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27023" ><span +class="ecti-1000">367</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccessfirst</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27021" ><span +class="ecti-1000">368</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccessfirstplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27027" ><span +class="ecti-1000">369</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccessfirstplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27025" ><span +class="ecti-1000">370</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccesslong</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27055" ><span +class="ecti-1000">371</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccesslong</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27053" ><span +class="ecti-1000">372</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccesslongpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27059" ><span +class="ecti-1000">373</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccesslongpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27057" ><span +class="ecti-1000">374</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccessname</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27010" ><span +class="ecti-1000">375</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccessname</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27005" ><span +class="ecti-1000">376</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccessplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27019" ><span +class="ecti-1000">377</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccessplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27017" ><span +class="ecti-1000">378</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccessshort</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27047" ><span +class="ecti-1000">379</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccessshort</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27045" ><span +class="ecti-1000">380</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccessshortpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27051" ><span +class="ecti-1000">381</span></a> <br /></span> + + + +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccessshortpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27049" ><span +class="ecti-1000">382</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccesssymbol</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27031" ><span +class="ecti-1000">383</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccesssymbol</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27029" ><span +class="ecti-1000">384</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccesssymbolplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27035" ><span +class="ecti-1000">385</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccesssymbolplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27033" ><span +class="ecti-1000">386</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsaccesstext</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27015" ><span +class="ecti-1000">387</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsaccesstext</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-27013" ><span +class="ecti-1000">388</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsacspace</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-10005" ><span +class="ecti-1000">389</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsacspacemax</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-10008" ><span +class="ecti-1000">390</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glscategory</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21015" ><span +class="ecti-1000">391</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glscategorylabel</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19039" ><span +class="ecti-1000">392</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glscurrententrylabel</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-11015" ><span +class="ecti-1000">393</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsentrycurrcount</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22033" ><span +class="ecti-1000">394</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsentryprevcount</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22034" ><span +class="ecti-1000">395</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsentryprevmaxcount</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22036" ><span +class="ecti-1000">396</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsentryprevtotalcount</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22035" ><span +class="ecti-1000">397</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfirstabbrvdefaultfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-12032" ><span +class="ecti-1000">398</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfirstabbrvfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-12024" ><span +class="ecti-1000">399</span></a>, <a +href="glossaries-extra-manual.html#dx1-19046" ><span +class="ecti-1000">400</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfirstlongdefaultfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-12036" ><span +class="ecti-1000">401</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfirstlongfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-12034" ><span +class="ecti-1000">402</span></a>, <a +href="glossaries-extra-manual.html#dx1-19050" ><span +class="ecti-1000">403</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsfmtfirst</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20035" ><span +class="ecti-1000">404</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfmtfirst</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20034" ><span +class="ecti-1000">405</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsfmtfirstpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20037" ><span +class="ecti-1000">406</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfmtfirstpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20036" ><span +class="ecti-1000">407</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsfmtplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20032" ><span +class="ecti-1000">408</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfmtplural</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20031" ><span +class="ecti-1000">409</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsfmtshort</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20026" ><span +class="ecti-1000">410</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfmtshort</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20024" ><span +class="ecti-1000">411</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsfmtshortpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20027" ><span +class="ecti-1000">412</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfmtshortpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20025" ><span +class="ecti-1000">413</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsfmttext</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20030" ><span +class="ecti-1000">414</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsfmttext</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20029" ><span +class="ecti-1000">415</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsforeachwithattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21090" ><span +class="ecti-1000">416</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsgetattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21078" ><span +class="ecti-1000">417</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsgetcategoryattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21077" ><span +class="ecti-1000">418</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glshasattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21081" ><span +class="ecti-1000">419</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glshascategoryattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21079" ><span +class="ecti-1000">420</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsifattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21086" ><span +class="ecti-1000">421</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsifcategory</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21016" ><span +class="ecti-1000">422</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsifcategoryattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21082" ><span +class="ecti-1000">423</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsifregular</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21089" ><span +class="ecti-1000">424</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsifregularcategory</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21088" ><span +class="ecti-1000">425</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glskeylisttok</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19037" ><span +class="ecti-1000">426</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glslabeltok</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19036" ><span +class="ecti-1000">427</span></a> <br /></span> +<span class="index-item"><span +class="ectt-1000">\glslink </span>options<br /></span> +<span class="index-subitem">    <span +class="ecss-1000">format</span>  <a +href="glossaries-extra-manual.html#dx1-23013" >428</a>, <a +href="glossaries-extra-manual.html#dx1-23015" >429</a> <br /></span> + + + +<span class="index-subitem">    <span +class="ecss-1000">hyper</span>  <a +href="glossaries-extra-manual.html#dx1-21024" >430</a>, <a +href="glossaries-extra-manual.html#dx1-21027" >431</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">noindex</span>  <a +href="glossaries-extra-manual.html#dx1-6001" >432</a>, <a +href="glossaries-extra-manual.html#dx1-6007" >433</a>, <a +href="glossaries-extra-manual.html#dx1-20018" >434</a>, <a +href="glossaries-extra-manual.html#dx1-23025" >435</a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glslinkcheckfirsthyperhook</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22040" ><span +class="ecti-1000">436</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glslongpltok</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19032" ><span +class="ecti-1000">437</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glslongtok</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19031" ><span +class="ecti-1000">438</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glssetattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21076" ><span +class="ecti-1000">439</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glssetcategoryattribute</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21073" ><span +class="ecti-1000">440</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glssetregularcategory</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21075" ><span +class="ecti-1000">441</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsshortpltok</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19027" ><span +class="ecti-1000">442</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsshorttok</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19026" ><span +class="ecti-1000">443</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtr</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-24015" ><span +class="ecti-1000">444</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtr</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-24010" ><span +class="ecti-1000">445</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtraddallcrossrefs</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-6021" ><span +class="ecti-1000">446</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrdoautoindexname</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-23010" ><span +class="ecti-1000">447</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrdowrglossaryhook</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-6010" ><span +class="ecti-1000">448</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrEnableEntryCounting</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22025" ><span +class="ecti-1000">449</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrEnableEntryUnitCounting</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22028" ><span +class="ecti-1000">450</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrEnableIndexFormatOverride</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-23016" ><span +class="ecti-1000">451</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrEnableInitialTagging</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-13001" ><span +class="ecti-1000">452</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrEnableOnTheFly</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-24008" ><span +class="ecti-1000">453</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GLSxtrfull</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14024" ><span +class="ecti-1000">454</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrfull</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14021" ><span +class="ecti-1000">455</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrfull</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14014" ><span +class="ecti-1000">456</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrfullformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19058" ><span +class="ecti-1000">457</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrfullformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19054" ><span +class="ecti-1000">458</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GLSxtrfullpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14033" ><span +class="ecti-1000">459</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrfullpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14032" ><span +class="ecti-1000">460</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrfullpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14031" ><span +class="ecti-1000">461</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrfullplformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19066" ><span +class="ecti-1000">462</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrfullplformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19062" ><span +class="ecti-1000">463</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrfullsep</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-16039" ><span +class="ecti-1000">464</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrifcounttrigger</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-22019" ><span +class="ecti-1000">465</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrifwasfirstuse</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-7040" ><span +class="ecti-1000">466</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrinlinefullformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19073" ><span +class="ecti-1000">467</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrinlinefullformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19070" ><span +class="ecti-1000">468</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrinlinefullplformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19080" ><span +class="ecti-1000">469</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrinlinefullplformat</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19077" ><span +class="ecti-1000">470</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrlong</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14020" ><span +class="ecti-1000">471</span></a>, <a +href="glossaries-extra-manual.html#dx1-14023" ><span +class="ecti-1000">472</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrlong</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14012" ><span +class="ecti-1000">473</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GLSxtrlongpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14030" ><span +class="ecti-1000">474</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrlongpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14029" ><span +class="ecti-1000">475</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrlongpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14028" ><span +class="ecti-1000">476</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrnewnumber</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-4061" ><span +class="ecti-1000">477</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrnewsymbol</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-4057" ><span +class="ecti-1000">478</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningAutoMake</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29018" ><span +class="ecti-1000">479</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningBuildInfo</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29017" ><span +class="ecti-1000">480</span></a> <br /></span> + + + +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningCheckFile</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29013" ><span +class="ecti-1000">481</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningEmptyMain</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29011" ><span +class="ecti-1000">482</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningEmptyNotMain</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29012" ><span +class="ecti-1000">483</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningEmptyStart</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29010" ><span +class="ecti-1000">484</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningHead</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29009" ><span +class="ecti-1000">485</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningMisMatch</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29014" ><span +class="ecti-1000">486</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningNoOut</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29015" ><span +class="ecti-1000">487</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrNoGlsWarningTail</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-29016" ><span +class="ecti-1000">488</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-24016" ><span +class="ecti-1000">489</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-24014" ><span +class="ecti-1000">490</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrpostdescription</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-11011" ><span +class="ecti-1000">491</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrpostlink</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-7024" ><span +class="ecti-1000">492</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrpostlinkAddDescOnFirstUse</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-7031" ><span +class="ecti-1000">493</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrpostlinkAddSymbolOnFirstUse</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-7035" ><span +class="ecti-1000">494</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrpostlinkendsentence</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-7025" ><span +class="ecti-1000">495</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrpostlinkhook</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-7022" ><span +class="ecti-1000">496</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrpostnamehook</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-11008" ><span +class="ecti-1000">497</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrPostNewAbbreviation</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19020" ><span +class="ecti-1000">498</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrRevertMarks</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-20014" ><span +class="ecti-1000">499</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrscfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-16025" ><span +class="ecti-1000">500</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrscsuffix</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-16026" ><span +class="ecti-1000">501</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrSetActualChar</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-23032" ><span +class="ecti-1000">502</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrSetAltModifier</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-7060" ><span +class="ecti-1000">503</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrsetcategory</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21092" ><span +class="ecti-1000">504</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrsetcategoryforall</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-21094" ><span +class="ecti-1000">505</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrSetDefaultGlsOpts</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-7057" ><span +class="ecti-1000">506</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrSetEncapChar</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-23035" ><span +class="ecti-1000">507</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrSetEscChar</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-23034" ><span +class="ecti-1000">508</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrSetLevelChar</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-23033" ><span +class="ecti-1000">509</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrshort</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14019" ><span +class="ecti-1000">510</span></a>, <a +href="glossaries-extra-manual.html#dx1-14022" ><span +class="ecti-1000">511</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrshort</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14010" ><span +class="ecti-1000">512</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GLSxtrshortpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14027" ><span +class="ecti-1000">513</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\Glsxtrshortpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14026" ><span +class="ecti-1000">514</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrshortpl</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14025" ><span +class="ecti-1000">515</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrsmfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-16032" ><span +class="ecti-1000">516</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrsmsuffix</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-16035" ><span +class="ecti-1000">517</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\glsxtrtagfont</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-13003" ><span +class="ecti-1000">518</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrUseAbbrStyleFmts</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19084" ><span +class="ecti-1000">519</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrUseAbbrStyleSetup</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19040" ><span +class="ecti-1000">520</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\GlsXtrWarning</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-24012" ><span +class="ecti-1000">521</span></a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">H</span> +<span class="index-item"><span +class="ecss-1000">hyperref </span>package  <a +href="glossaries-extra-manual.html#dx1-9027" >522</a>, <a +href="glossaries-extra-manual.html#dx1-18058" >523</a>, <a +href="glossaries-extra-manual.html#dx1-20003" >524</a>, <a +href="glossaries-extra-manual.html#dx1-20004" >525</a>, <a +href="glossaries-extra-manual.html#dx1-20005" >526</a>, <a +href="glossaries-extra-manual.html#dx1-20010" >527</a>, <a +href="glossaries-extra-manual.html#dx1-20017" >528</a>, <a +href="glossaries-extra-manual.html#dx1-22030" >529</a>, <a +href="glossaries-extra-manual.html#dx1-23017" >530</a>, <a +href="glossaries-extra-manual.html#dx1-28007" >531</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">L</span> + + + +<span class="index-item">link-text  <a +href="glossaries-extra-manual.html#dx1-7002" >532</a>, <a +href="glossaries-extra-manual.html#dx1-7004" >533</a>, <a +href="glossaries-extra-manual.html#dx1-7021" >534</a>, <a +href="glossaries-extra-manual.html#dx1-7030" >535</a>, <a +href="glossaries-extra-manual.html#dx1-7038" >536</a>, <a +href="glossaries-extra-manual.html#dx1-7043" >537</a>, <a +href="glossaries-extra-manual.html#dx1-7047" >538</a>, <a +href="glossaries-extra-manual.html#dx1-7050" >539</a>, <a +href="glossaries-extra-manual.html#dx1-7054" >540</a>, <a +href="glossaries-extra-manual.html#dx1-9035" >541</a>, <a +href="glossaries-extra-manual.html#dx1-9036" >542</a>, <a +href="glossaries-extra-manual.html#dx1-18073" >543</a>, <a +href="glossaries-extra-manual.html#dx1-21031" >544</a>, <a +href="glossaries-extra-manual.html#dx1-28003" >545</a>, <a +href="glossaries-extra-manual.html#dx1-30018" ><span +class="ecbx-1000">546</span></a> <br /></span> +<span class="index-item">location list  <a +href="glossaries-extra-manual.html#dx1-28006" >547</a>, <a +href="glossaries-extra-manual.html#dx1-30020" ><span +class="ecbx-1000">548</span></a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">M</span> +<span class="index-item"><span +class="ectt-1000">makeglossaries</span>  <a +href="glossaries-extra-manual.html#dx1-3030" >549</a>, <a +href="glossaries-extra-manual.html#dx1-3032" >550</a>, <a +href="glossaries-extra-manual.html#dx1-3034" >551</a>, <a +href="glossaries-extra-manual.html#dx1-30023" ><span +class="ecbx-1000">552</span></a> <br /></span> +<span class="index-item"><span +class="ectt-1000">makeindex</span>  <a +href="glossaries-extra-manual.html#dx1-3025" >553</a>, <a +href="glossaries-extra-manual.html#dx1-3031" >554</a>, <a +href="glossaries-extra-manual.html#dx1-3035" >555</a>, <a +href="glossaries-extra-manual.html#dx1-4028" >556</a>, <a +href="glossaries-extra-manual.html#dx1-23027" >557</a>, <a +href="glossaries-extra-manual.html#dx1-30025" >558</a>, <a +href="glossaries-extra-manual.html#dx1-30026" ><span +class="ecbx-1000">559</span></a> <br /></span> +<span class="index-item"><span +class="ecss-1000">memoir </span>class  <a +href="glossaries-extra-manual.html#dx1-3024" >560</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">mfirstuc </span>package  <a +href="glossaries-extra-manual.html#dx1-9" >561</a>, <a +href="glossaries-extra-manual.html#dx1-21062" >562</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">N</span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\newabbreviation</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-12003" ><span +class="ecti-1000">563</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\newabbreviationstyle</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-19001" ><span +class="ecti-1000">564</span></a> <br /></span> +<span class="index-item"><span +class="ectt-1000">\newglossaryentry </span>options<br /></span> +<span class="index-subitem">    <span +class="ecss-1000">category</span>  <a +href="glossaries-extra-manual.html#dx1-5004" >565</a>, <a +href="glossaries-extra-manual.html#dx1-12004" >566</a>, <a +href="glossaries-extra-manual.html#dx1-12012" >567</a>, <a +href="glossaries-extra-manual.html#dx1-21001" >568</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">desc</span>  <a +href="glossaries-extra-manual.html#dx1-27038" >569</a>, <a +href="glossaries-extra-manual.html#dx1-27040" >570</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">descplural</span>  <a +href="glossaries-extra-manual.html#dx1-27042" >571</a>, <a +href="glossaries-extra-manual.html#dx1-27044" >572</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">description</span>  <a +href="glossaries-extra-manual.html#dx1-17005" >573</a>, <a +href="glossaries-extra-manual.html#dx1-17019" >574</a>, <a +href="glossaries-extra-manual.html#dx1-17021" >575</a>, <a +href="glossaries-extra-manual.html#dx1-17035" >576</a>, <a +href="glossaries-extra-manual.html#dx1-17049" >577</a>, <a +href="glossaries-extra-manual.html#dx1-18005" >578</a>, <a +href="glossaries-extra-manual.html#dx1-18018" >579</a>, <a +href="glossaries-extra-manual.html#dx1-18031" >580</a>, <a +href="glossaries-extra-manual.html#dx1-18044" >581</a>, <a +href="glossaries-extra-manual.html#dx1-18060" >582</a>, <a +href="glossaries-extra-manual.html#dx1-18077" >583</a>, <a +href="glossaries-extra-manual.html#dx1-19016" >584</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">first</span>  <a +href="glossaries-extra-manual.html#dx1-7009" >585</a>, <a +href="glossaries-extra-manual.html#dx1-9004" >586</a>, <a +href="glossaries-extra-manual.html#dx1-16008" >587</a>, <a +href="glossaries-extra-manual.html#dx1-16015" >588</a>, <a +href="glossaries-extra-manual.html#dx1-19012" >589</a>, <a +href="glossaries-extra-manual.html#dx1-19018" >590</a>, <a +href="glossaries-extra-manual.html#dx1-20033" >591</a>, <a +href="glossaries-extra-manual.html#dx1-27022" >592</a>, <a +href="glossaries-extra-manual.html#dx1-27024" >593</a>, <a +href="glossaries-extra-manual.html#dx1-30014" >594</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">firstplural</span>  <a +href="glossaries-extra-manual.html#dx1-7010" >595</a>, <a +href="glossaries-extra-manual.html#dx1-19013" >596</a>, <a +href="glossaries-extra-manual.html#dx1-19019" >597</a>, <a +href="glossaries-extra-manual.html#dx1-27026" >598</a>, <a +href="glossaries-extra-manual.html#dx1-27028" >599</a>, <a +href="glossaries-extra-manual.html#dx1-30015" >600</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">long</span>  <a +href="glossaries-extra-manual.html#dx1-12046" >601</a>, <a +href="glossaries-extra-manual.html#dx1-16012" >602</a>, <a +href="glossaries-extra-manual.html#dx1-27054" >603</a>, <a +href="glossaries-extra-manual.html#dx1-27056" >604</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">longplural</span>  <a +href="glossaries-extra-manual.html#dx1-12047" >605</a>, <a +href="glossaries-extra-manual.html#dx1-19033" >606</a>, <a +href="glossaries-extra-manual.html#dx1-27058" >607</a>, <a +href="glossaries-extra-manual.html#dx1-27060" >608</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">name</span>  <a +href="glossaries-extra-manual.html#dx1-9002" >609</a>, <a +href="glossaries-extra-manual.html#dx1-17004" >610</a>, <a +href="glossaries-extra-manual.html#dx1-17018" >611</a>, <a +href="glossaries-extra-manual.html#dx1-17034" >612</a>, <a +href="glossaries-extra-manual.html#dx1-17048" >613</a>, <a +href="glossaries-extra-manual.html#dx1-18004" >614</a>, <a +href="glossaries-extra-manual.html#dx1-18017" >615</a>, <a +href="glossaries-extra-manual.html#dx1-18030" >616</a>, <a +href="glossaries-extra-manual.html#dx1-18043" >617</a>, <a +href="glossaries-extra-manual.html#dx1-18059" >618</a>, <a +href="glossaries-extra-manual.html#dx1-18076" >619</a>, <a +href="glossaries-extra-manual.html#dx1-19010" >620</a>, <a +href="glossaries-extra-manual.html#dx1-23007" >621</a>, <a +href="glossaries-extra-manual.html#dx1-24011" >622</a>, <a +href="glossaries-extra-manual.html#dx1-27006" >623</a>, <a +href="glossaries-extra-manual.html#dx1-28009" >624</a>, <a +href="glossaries-extra-manual.html#dx1-28010" >625</a>, <a +href="glossaries-extra-manual.html#dx1-28011" >626</a>, <a +href="glossaries-extra-manual.html#dx1-28012" >627</a>, <a +href="glossaries-extra-manual.html#dx1-28014" >628</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">plural</span>  <a +href="glossaries-extra-manual.html#dx1-7013" >629</a>, <a +href="glossaries-extra-manual.html#dx1-19015" >630</a>, <a +href="glossaries-extra-manual.html#dx1-27018" >631</a>, <a +href="glossaries-extra-manual.html#dx1-27020" >632</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">see</span>  <a +href="glossaries-extra-manual.html#dx1-4037" >633</a>, <a +href="glossaries-extra-manual.html#dx1-4038" >634</a>, <a +href="glossaries-extra-manual.html#dx1-6011" >635</a>, <a +href="glossaries-extra-manual.html#dx1-6013" >636</a>, <a +href="glossaries-extra-manual.html#dx1-6014" >637</a>, <a +href="glossaries-extra-manual.html#dx1-6016" >638</a>, <a +href="glossaries-extra-manual.html#dx1-6023" >639</a>, <a +href="glossaries-extra-manual.html#dx1-6024" >640</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">short</span>  <a +href="glossaries-extra-manual.html#dx1-7006" >641</a>, <a +href="glossaries-extra-manual.html#dx1-7014" >642</a>, <a +href="glossaries-extra-manual.html#dx1-7017" >643</a>, <a +href="glossaries-extra-manual.html#dx1-12044" >644</a>, <a +href="glossaries-extra-manual.html#dx1-16011" >645</a>, <a +href="glossaries-extra-manual.html#dx1-16018" >646</a>, <a +href="glossaries-extra-manual.html#dx1-21043" >647</a>, <a +href="glossaries-extra-manual.html#dx1-27046" >648</a>, <a +href="glossaries-extra-manual.html#dx1-27048" >649</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">shortplural</span>  <a +href="glossaries-extra-manual.html#dx1-12007" >650</a>, <a +href="glossaries-extra-manual.html#dx1-12045" >651</a>, <a +href="glossaries-extra-manual.html#dx1-16029" >652</a>, <a +href="glossaries-extra-manual.html#dx1-19028" >653</a>, <a +href="glossaries-extra-manual.html#dx1-19043" >654</a>, <a +href="glossaries-extra-manual.html#dx1-21036" >655</a>, <a +href="glossaries-extra-manual.html#dx1-21040" >656</a>, <a +href="glossaries-extra-manual.html#dx1-21044" >657</a>, <a +href="glossaries-extra-manual.html#dx1-27050" >658</a>, <a +href="glossaries-extra-manual.html#dx1-27052" >659</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">sort</span>  <a +href="glossaries-extra-manual.html#dx1-4058" >660</a>, <a +href="glossaries-extra-manual.html#dx1-19011" >661</a>, <a +href="glossaries-extra-manual.html#dx1-23012" >662</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">symbol</span>  <a +href="glossaries-extra-manual.html#dx1-27030" >663</a>, <a +href="glossaries-extra-manual.html#dx1-27032" >664</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">symbolplural</span>  <a +href="glossaries-extra-manual.html#dx1-27034" >665</a>, <a +href="glossaries-extra-manual.html#dx1-27036" >666</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">text</span>  <a +href="glossaries-extra-manual.html#dx1-7012" >667</a>, <a +href="glossaries-extra-manual.html#dx1-9003" >668</a>, <a +href="glossaries-extra-manual.html#dx1-16010" >669</a>, <a +href="glossaries-extra-manual.html#dx1-16016" >670</a>, <a +href="glossaries-extra-manual.html#dx1-19014" >671</a>, <a +href="glossaries-extra-manual.html#dx1-20028" >672</a>, <a +href="glossaries-extra-manual.html#dx1-27014" >673</a>, <a +href="glossaries-extra-manual.html#dx1-27016" >674</a> <br /></span> +<span class="index-item">number list  <a +href="glossaries-extra-manual.html#dx1-7058" >675</a>, <a +href="glossaries-extra-manual.html#dx1-30022" >676</a>, <a +href="glossaries-extra-manual.html#dx1-30027" ><span +class="ecbx-1000">677</span></a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">P</span> +<span class="index-item">package options:<br /></span> +<span class="index-subitem">    <span +class="ecss-1000">abbreviations</span>  <a +href="glossaries-extra-manual.html#dx1-4040" >678</a>, <a +href="glossaries-extra-manual.html#dx1-4046" >679</a>, <a +href="glossaries-extra-manual.html#dx1-4047" >680</a>, <a +href="glossaries-extra-manual.html#dx1-4086" >681</a>, <a +href="glossaries-extra-manual.html#dx1-29002" >682</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">accsupp</span>  <a +href="glossaries-extra-manual.html#dx1-4008" >683</a>, <a +href="glossaries-extra-manual.html#dx1-4014" >684</a>, <a +href="glossaries-extra-manual.html#dx1-27002" >685</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">acronym</span>  <a +href="glossaries-extra-manual.html#dx1-4048" >686</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">acronymlists</span>  <a +href="glossaries-extra-manual.html#dx1-4054" >687</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">automake</span>  <a +href="glossaries-extra-manual.html#dx1-29019" >688</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">docdef</span>  <a +href="glossaries-extra-manual.html#dx1-4021" >689</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">true</span>  <a +href="glossaries-extra-manual.html#dx1-4032" >690</a> <br /></span> + + + +<span class="index-subitem">    <span +class="ecss-1000">docdefs</span>  <a +href="glossaries-extra-manual.html#dx1-24004" >691</a>, <a +href="glossaries-extra-manual.html#dx1-24007" >692</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">index</span>  <a +href="glossaries-extra-manual.html#dx1-5006" >693</a>, <a +href="glossaries-extra-manual.html#dx1-21007" >694</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">indexcrossrefs</span>  <a +href="glossaries-extra-manual.html#dx1-4036" >695</a>, <a +href="glossaries-extra-manual.html#dx1-4039" >696</a>, <a +href="glossaries-extra-manual.html#dx1-6022" >697</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">indexonlyfirst</span>  <a +href="glossaries-extra-manual.html#dx1-6002" >698</a>, <a +href="glossaries-extra-manual.html#dx1-6005" >699</a>, <a +href="glossaries-extra-manual.html#dx1-21029" >700</a>, <a +href="glossaries-extra-manual.html#dx1-23023" >701</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">nomain</span>  <a +href="glossaries-extra-manual.html#dx1-3036" >702</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">nomissingglstext</span>  <a +href="glossaries-extra-manual.html#dx1-4035" >703</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">nonumberlist</span>  <a +href="glossaries-extra-manual.html#dx1-30029" >704</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">nopostdot</span>  <a +href="glossaries-extra-manual.html#dx1-11017" >705</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">false</span>  <a +href="glossaries-extra-manual.html#dx1-3005" >706</a>, <a +href="glossaries-extra-manual.html#dx1-11012" >707</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">true</span>  <a +href="glossaries-extra-manual.html#dx1-3004" >708</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">noredefwarn</span><br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">false</span>  <a +href="glossaries-extra-manual.html#dx1-3010" >709</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">true</span>  <a +href="glossaries-extra-manual.html#dx1-3006" >710</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">numbers</span>  <a +href="glossaries-extra-manual.html#dx1-4059" >711</a>, <a +href="glossaries-extra-manual.html#dx1-4079" >712</a>, <a +href="glossaries-extra-manual.html#dx1-21013" >713</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">shortcuts</span>  <a +href="glossaries-extra-manual.html#dx1-4062" >714</a>, <a +href="glossaries-extra-manual.html#dx1-4084" >715</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">abbr</span>  <a +href="glossaries-extra-manual.html#dx1-4068" >716</a>, <a +href="glossaries-extra-manual.html#dx1-15002" >717</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">abbreviation</span>  <a +href="glossaries-extra-manual.html#dx1-15001" >718</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">abbreviations</span>  <a +href="glossaries-extra-manual.html#dx1-4067" >719</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">acro</span>  <a +href="glossaries-extra-manual.html#dx1-4065" >720</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">acronyms</span>  <a +href="glossaries-extra-manual.html#dx1-4064" >721</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">all</span>  <a +href="glossaries-extra-manual.html#dx1-4080" >722</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">false</span>  <a +href="glossaries-extra-manual.html#dx1-4083" >723</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">none</span>  <a +href="glossaries-extra-manual.html#dx1-4082" >724</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">other</span>  <a +href="glossaries-extra-manual.html#dx1-4070" >725</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">true</span>  <a +href="glossaries-extra-manual.html#dx1-4081" >726</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">symbols</span>  <a +href="glossaries-extra-manual.html#dx1-4055" >727</a>, <a +href="glossaries-extra-manual.html#dx1-4076" >728</a>, <a +href="glossaries-extra-manual.html#dx1-21010" >729</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">toc</span><br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">false</span>  <a +href="glossaries-extra-manual.html#dx1-3003" >730</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">true</span>  <a +href="glossaries-extra-manual.html#dx1-3002" >731</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">translate</span><br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">babel</span>  <a +href="glossaries-extra-manual.html#dx1-3013" >732</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">true</span>  <a +href="glossaries-extra-manual.html#dx1-3015" >733</a> <br /></span> +<span class="index-subitem">    <span +class="ecss-1000">undefaction</span>  <a +href="glossaries-extra-manual.html#dx1-4017" >734</a>, <a +href="glossaries-extra-manual.html#dx1-5003" >735</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">error</span>  <a +href="glossaries-extra-manual.html#dx1-4018" >736</a> <br /></span> +<span class="index-subsubitem">        <span +class="ecss-1000">warn</span>  <a +href="glossaries-extra-manual.html#dx1-4020" >737</a> <br /></span> +<span class="index-item"><span +class="ectt-1000">page </span>(counter)  <a +href="glossaries-extra-manual.html#dx1-22029" >738</a>, <a +href="glossaries-extra-manual.html#dx1-22041" >739</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">polyglossia </span>package  <a +href="glossaries-extra-manual.html#dx1-29006" >740</a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\printabbreviations</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-4041" ><span +class="ecti-1000">741</span></a> <br /></span> +<span class="index-item"><span +class="ectt-1000">\printglossary </span>options<br /></span> +<span class="index-subitem">    <span +class="ecss-1000">title</span>  <a +href="glossaries-extra-manual.html#dx1-29007" >742</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">R</span> +<span class="index-item"><span +class="ecss-1000">relsize </span>package  <a +href="glossaries-extra-manual.html#dx1-16033" >743</a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\RestoreAcronyms</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-10003" ><span +class="ecti-1000">744</span></a>, <a +href="glossaries-extra-manual.html#dx1-12016" ><span +class="ecti-1000">745</span></a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">S</span> + + + +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ectt-1000">\setabbreviationstyle</span></span></span>  <a +href="glossaries-extra-manual.html#dx1-14001" ><span +class="ecti-1000">746</span></a> <br /></span> +<span class="index-item"><span +class="ecss-1000">slantsc </span>package  <a +href="glossaries-extra-manual.html#dx1-20023" >747</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">T</span> +<span class="index-item"><span +class="ecss-1000">textcase </span>package  <a +href="glossaries-extra-manual.html#dx1-12" >748</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">tracklang </span>package  <a +href="glossaries-extra-manual.html#dx1-8" >749</a>, <a +href="glossaries-extra-manual.html#dx1-29008" >750</a> <br /></span> +<span class="index-item"><span +class="ecss-1000">translator </span>package  <a +href="glossaries-extra-manual.html#dx1-3014" >751</a> <br /></span> +</p><p class="theindex"> <span +class="ecbx-1000">X</span> +<span class="index-item"><span +class="ecss-1000">xfor </span>package  <a +href="glossaries-extra-manual.html#dx1-13" >752</a> <br /></span> +<span class="index-item"><span +class="ectt-1000">xindy</span>  <a +href="glossaries-extra-manual.html#dx1-3026" >753</a>, <a +href="glossaries-extra-manual.html#dx1-4029" >754</a>, <a +href="glossaries-extra-manual.html#dx1-30024" >755</a>, <a +href="glossaries-extra-manual.html#dx1-30030" ><span +class="ecbx-1000">756</span></a> <br /></span> +<span class="index-item"><span +class="ecss-1000">xkeyval </span>package  <a +href="glossaries-extra-manual.html#dx1-11" >757</a> <br /></span> +</p></div> + <a + id="dx1-31001"></a> +</body></html> + + + + diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.pdf Binary files differnew file mode 100644 index 00000000000..91357028309 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex new file mode 100644 index 00000000000..ac2400c853e --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex @@ -0,0 +1,3718 @@ +\documentclass[report,inlinetitle,widecs]{nlctdoc} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{alltt} +\usepackage{hologo} +\usepackage[colorlinks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={glossaries-extra.sty: an extension to the glossaries +package}, + pdfkeywords={LaTeX,package,glossary,abbreviations}]{hyperref} +\usepackage[nogroupskip,nonumberlist]{glossaries-extra} + +\makeglossaries + +\GlsXtrEnableEntryUnitCounting{general}{0}{page} + +\renewcommand*{\glsxtrifcounttrigger}[3]{#3} + +\renewcommand*{\glslinkcheckfirsthyperhook}{% + \ifnum\glsentrycurrcount\glslabel>0 + \setkeys{glslink}{hyper=false}% + \fi +} + +\newcommand*{\XeLaTeX}{\hologo{XeLaTeX}} +\newcommand*{\LuaLaTeX}{\hologo{LuaLaTeX}} +\newcommand*{\pdfLaTeX}{\hologo{pdfLaTeX}} + +\IndexPrologue{\chapter*{\indexname} + \addcontentsline{toc}{chapter}{\indexname}% + \markboth{\indexname}{\indexname}} + +\renewcommand*{\main}[1]{\hyperpage{#1}} +\newcommand*{\htextbf}[1]{\textbf{\hyperpage{#1}}} + +\glssetcategoryattribute{general}{indexname}{htextbf} +\glssetcategoryattribute{general}{dualindex}{main} + +\newglossaryentry{xindy}{ + name={\appfmt{xindy}}, + sort={xindy}, + description={An flexible indexing application with multilingual + support written in Perl.} +} + +\newglossaryentry{makeindex}{% + name={\appfmt{makeindex}},% + sort={makeindex},% + description={An indexing application.}, +} + +\newglossaryentry{makeglossaries}{% +name={\appfmt{makeglossaries}},% +sort={makeglossaries},% +description={A custom designed Perl script interface +provided with the \styfmt{glossaries} package +to run \gls{xindy} or \gls{makeindex} according to +the document settings.}} + +\newglossaryentry{numberlist}{% +name={number list},% +description={A list of \glspl{entrylocation} (also +called a location list). The number list can be suppressed using the +\pkgopt{nonumberlist} package option.} +} + +\newglossaryentry{entrylocation}{% +name={entry location},% +description={The location of the entry in the document. This +defaults to the page number on which the entry appears. An entry may +have multiple locations.} +} + +\newglossaryentry{locationlist}{% +name={location list},% +description={A list of \glspl{entrylocation}. +See \gls{numberlist}.}% +} + +\newglossaryentry{linktext}{% +name={link-text}, +description={The text produced by commands such as \ics{gls}. It may +or may not have a hyperlink to the glossary.} +} + +\let\glsd\glsuseri +\let\glsation\glsuserii + +\newglossaryentry{firstuseflag}{% +name={first use flag}, +description={A conditional that determines whether or not the entry +has been used according to the rules of \gls{firstuse}.}% +} + +\newglossaryentry{firstusetext}{% +name={first use text}, +description={The text that is displayed on \gls{firstuse}, which is +governed by the \gloskey{first} and \gloskey{firstplural} keys of +\ics{newglossaryentry}. (May be overridden by +\ics{glsdisp}.)}% +} + +\newglossaryentry{firstuse}{% + name={first use}, + user1={first used}, + see={firstuseflag,firstusetext}, + description={The first time a glossary entry is used (from the start + of the document or after a reset) with one of the + following commands: \ics{gls}, \ics{Gls}, \ics{GLS}, \ics{glspl}, + \ics{Glspl}, \ics{GLSpl} or \ics{glsdisp}.}% +} + +\setcounter{IndexColumns}{2} + +\newcommand*{\igloskey}[2][newglossaryentry]{\icsopt{#1}{#2}} +\newcommand*{\gloskey}[2][newglossaryentry]{\csopt{#1}{#2}} + +\newcommand*{\glostyle}[1]{\textsf{#1}\index{glossary styles:>#1={\protect\sffamily#1}|main}} + +\newcommand*{\acrstyle}[1]{\textsf{#1}\index{acronym +styles (glossaries):>#1={\protect\ttfamily#1}|main}} + +\newcommand*{\abbrstyle}[1]{\textsf{#1}\index{abbreviation styles:>#1={\protect\sffamily#1}|main}} + +\newcommand*{\category}[1]{\textsf{#1}\index{categories:>#1={\protect\sffamily#1}|main}} + +\newcommand*{\catattr}[1]{\textsf{#1}\index{category attributes:>#1={\protect\sffamily#1}|main}} + +\newcommand*{\postlinkcat}{% + \cs{glsxtrpostlink}\meta{category}% + \index{glsxtrpostlinkcategory=\cs{glsxtrpostlink}\meta{category}|hyperpage}% +} + +\setlength\marginparwidth{70pt} + +\begin{document} +\MakeShortVerb{"} +\DeleteShortVerb{\|} + + \title{glossaries-extra.sty v1.0: + an extension to the glossaries package} + \author{Nicola L.C. Talbot\\[10pt] +Dickimaw Books\\ +\url{http://www.dickimaw-books.com/}} + + \date{2016-01-24} + \maketitle + +\begin{abstract} +The \styfmt{glossaries-extra} package is an extension to the +\sty{glossaries} package, providing additional features. +Some of the features provided by this package are only available +with \sty{glossaries} version 4.19 (or above). +This document assumes familiarity with the \sty{glossaries} package. + +\end{abstract} + +\begin{important} +Since \styfmt{glossaries-extra} internally loads the \sty{glossaries} +package, you also need to have \sty{glossaries} installed and +all the packages that \sty{glossaries} depends on (including, but +not limited to, \sty{tracklang}, \sty{mfirstuc}, \sty{etoolbox}, +\sty{xkeyval} (at least version dated 2006/11/18), \sty{textcase}, +\sty{xfor}, \sty{datatool-base} and \sty{amsgen}. These +packages are all available in the current \TeX\ Live and Mik\TeX\ +distributions. If any of them are missing, please update your +\TeX\ distribution using your update manager. +(For help on this see, for example, +\href{http://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \TeX\ distribution?} +or +\href{http://tex.stackexchange.com/questions/14925/updating-tex-on-linux}{Updating +\TeX\ on Linux}.) +\end{important} + + +\tableofcontents + +\chapter{Introduction} +\label{sec:intro} + +The \sty{glossaries} package is a flexible package, but it's also a +heavy-weight package that uses a lot of resources. As package +developer, I'm caught between those users who complain about the +drawbacks of a heavy-weight package with a large user manual and +those users who want more features (which necessarily adds to the +package weight and manual size). + +The \styfmt{glossaries-extra} package is an attempt to provide +a~compromise for this +conflict. Version 4.21 of the \styfmt{glossaries} package is +the last version to incorporate new features. Future versions of +\styfmt{glossaries} will just be bug fixes. New features will +instead be added to \styfmt{glossaries-extra}. +This means that the base \styfmt{glossaries} package won't increase +in terms of package loading time and allocation of resources, but +those users who do want extra features available will have more of a +chance of getting their feature requests accepted. + +\section{Package Defaults} +\label{sec:defaults} + +I'm not happy with some of the default settings assumed by the +\sty{glossaries} package, and, judging from code I've seen, other +users also seem unhappy with them, as certain package options are +often used in questions posted on various sites. I can't change the default +behaviour of \styfmt{glossaries} as it would break backward +compatibility, but since \styfmt{glossaries-extra} is a separate +package, I have decided to implement some of these commonly-used +options by default. You can switch them back if they're not +appropriate. + +The new defaults are: +\begin{itemize} +\item \pkgopt[true]{toc} (add the glossaries to the table of +contents). Use \pkgopt[false]{toc} to switch this back off. + +\item \pkgopt[true]{nopostdot} (suppress the terminating full stop +after the description in the glossary). Use +\pkgopt[false]{nopostdot} to restore the terminating full stop +(period). + +\item \pkgopt[true]{noredefwarn} (suppress warnings when +the \env{theglossary} environment and \cs{printglossary} are redefined while +\sty{glossaries} is loading). To restore the warnings, use +\pkgopt[false]{noredefwarn}. Note that this won't have any effect if +the \sty{glossaries} package has already been loaded before you use +the \styfmt{glossaries-extra} package. + +\item If \sty{babel} has been loaded, the \pkgopt[babel]{translate} +option is switched on. To revert to using the \sty{translator} +interface, use \pkgopt[true]{translate}. There is no change to the +default if \sty{babel} hasn't been loaded. + +\end{itemize} + +Examples: +\begin{enumerate} +\item +\begin{verbatim} +\documentclass{article} +\usepackage{glossaries-extra} +\end{verbatim} +This is like: +\begin{verbatim} +\documentclass{article} +\usepackage[toc,nopostdot]{glossaries} +\usepackage{glossaries-extra} +\end{verbatim} + +\item +\begin{verbatim} +\documentclass[british]{article} +\usepackage{babel} +\usepackage{glossaries-extra} +\end{verbatim} +This is like: +\begin{verbatim} +\documentclass[british]{article} +\usepackage{babel} +\usepackage[toc,nopostdot,translate=babel]{glossaries} +\usepackage{glossaries-extra} +\end{verbatim} + +\item +\begin{verbatim} +\documentclass{memoir} +\usepackage{glossaries-extra} +\end{verbatim} +This is like: +\begin{verbatim} +\documentclass{memoir} +\usepackage[toc,nopostdot,noredefwarn]{glossaries} +\usepackage{glossaries-extra} +\end{verbatim} +\emph{However} +\begin{verbatim} +\documentclass{memoir} +\usepackage{glossaries} +\usepackage{glossaries-extra} +\end{verbatim} +This is like: +\begin{verbatim} +\documentclass{memoir} +\usepackage[toc,nopostdot]{glossaries} +\usepackage{glossaries-extra} +\end{verbatim} +Since by the time \styfmt{glossaries-extra} has been loaded, +\sty{glossaries} has already redefined \cls{memoir}'s +glossary-related commands. +\end{enumerate} + +Another noticeable change is that by default \cs{printglossary} +will now display information text in the document if the external +glossary file doesn't exist. This is explanatory text to help new +users who can't work out what to do next to complete the document +build. Once the document is set up correctly and the external files +have been generated, this text will disappear. + +This change is mostly likely to be noticed by users +with one or more redundant empty glossaries who ignore +transcript messages, explicitly use \gls{makeindex}\slash\gls{xindy} +on just the non-empty glossary (or glossaries) and use +the iterative +\ics{printglossaries} command instead of \ics{printglossary}. For example, +consider the following: +\begin{verbatim} +\documentclass{article} + +\usepackage[acronym]{glossaries} + +\makeglossaries + +\newacronym{laser}{laser}{light amplification by stimulated +emission of radiation} + +\begin{document} + +\gls{laser} + +\printglossaries + +\end{document} +\end{verbatim} +The above document will only display the list of +acronyms at the place where \ics{printglossaries} occurs. However it +will also attempt to input the \texttt{.gls} file associated with +the \texttt{main} glossary. + +If you use \gls{makeglossaries}, you'll get the warning message: +\begin{verbatim} +Warning: File 'test.glo' is empty. +Have you used any entries defined in glossary 'main'? +Remember to use package option 'nomain' if you +don't want to use the main glossary. +\end{verbatim} +(where the original file is called \texttt{test.tex}) +but if you simply call \gls{makeindex} directly to generate the +\texttt{.acr} file (without attempting to create the \texttt{.gls} +file) then the transcript file will always contain the message: +\begin{verbatim} +No file test.gls. +\end{verbatim} +This doesn't occur with \gls{makeglossaries} as it will create +the \texttt{.gls} file containing the single command \cs{null}. + +If you simply change from \sty{glossaries} to +\styfmt{glossaries-extra} in this document, you'll find a change in the +resulting PDF if you don't use \gls{makeglossaries} and you only +generate the \texttt{.acr} file with \gls{makeindex}. + +The transcript file will still contain the message +about the missing \texttt{.gls}, but now you'll also see +information in the actual PDF document. The simplest remedy is to +follow the advice inserted into the document at that point, which is +to add the \pkgopt{nomain} package option: +\begin{verbatim} +\documentclass{article} + +\usepackage[nomain,acronym]{glossaries-extra} + +\makeglossaries + +\newacronym{laser}{laser}{light amplification by stimulated +emission of radiation} + +\begin{document} + +\gls{laser} + +\printglossaries + +\end{document} +\end{verbatim} + + +\section{New or Modified Package Options} +\label{sec:pkgopts} + +If you haven't already loaded \sty{glossaries}, you can use any of +the package options provided by \sty{glossaries} when you load +\styfmt{glossaries-extra} and they will automatically be passed to +\sty{glossaries} (which \styfmt{glossaries-extra} will load). If +\sty{glossaries} has already been loaded, then those options will be +passed to \ics{setupglossaries}, but remember that not all of the +\sty{glossaries} package options may be used in that command. + +In addition to those options recognised by \sty{glossaries}, +there are some new ones provided by \styfmt{glossaries-extra}: + +\begin{description} +\item[{\pkgopt{accsupp}}] Load the \sty{glossaries-accsupp} +package (if not already loaded). + +If you want to define styles that can interface with the +accessibility support provided by \sty{glossaries-accsupp} use +the \cs{glsaccess\meta{xxx}} type of commands instead of +\cs{glsentry\meta{xxx}} (for example, \ics{glsaccesstext} instead of +\ics{glsentrytext}). If \sty{glossaries-accsupp} hasn't been loaded +those commands are equivalent (for example, \cs{glsaccesstext} +just does \cs{glsentrytext}) but if it has been loaded, then the +\cs{glsaccess\meta{xxx}} commands will add the accessibility +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} +package must be loaded before \styfmt{glossaries-extra} if it's +required. + +\item[{\pkgopt{undefaction}}] This is a \meta{key}=\meta{value} +option, which has two allowed values: \pkgoptfmt{warn} and +\pkgoptfmt{error}. This indicates what to do if an undefined +glossary entry is referenced. The default behaviour is +\pkgopt[error]{undefaction}, which produces an error message (the +default for \sty{glossaries}). You can switch this to a warning +message (and ?? appearing in the text) with +\pkgopt[warn]{undefaction}. + +\item[{\pkgopt{docdef}}] This is a boolean option, which indicates +whether or not it's permitted for the command \ics{newglossaryentry} +to be used in the +\env{document} environment. The \sty{glossaries} package allows +\cs{newglossaryentry} within the \env{document} environment (when +used with \gls{makeindex} or \gls{xindy}) but the user manual warns +against this usage. By default the \styfmt{glossaries-extra} package +\emph{prohibits} this, only allowing definitions within the +preamble. If you are really determined to define entries in the +\env{document} environment, despite all the associated drawbacks, +you can restore this with \pkgopt[true]{docdef}. Note that this +doesn't change the prohibitions that the \sty{glossaries} +package has in certain circumstances (for example, when using +\qt{option~1}). See the \sty{glossaries} user manual for further details. + +This option affects commands that internally use +\cs{newglossaryentry}, such as \cs{newabbreviation}, but not +the \qt{on-the-fly} commands described in \sectionref{sec:onthefly}. + +\item[{\pkgopt{nomissingglstext}}] This is a boolean option. +If true, this will suppress the warning text that will appear in the +document if the external glossary files haven't been generated due +to an incomplete document build. However, it's probably simpler +just to fix whatever has caused the failure to build the external +file or files. + +\item[{\pkgopt{indexcrossrefs}}] This is a boolean option. +If \pkgoptfmt{true}, this will automatically index any +cross-referenced entries that haven't been marked as used at +the end of the document. Note that this necessarily adds to +the overall document build time, especially if you have defined +a large number of entries, so this defaults to \pkgoptfmt{false}, +but it will be automatically switched on if you use the \gloskey{see} key in any +entries. To force it off, even if you use the \gloskey{see}, you +need to explicitly set \pkgopt{indexcrossrefs} to \pkgoptfmt{false}. + +\item[{\pkgopt{abbreviations}}] This option has no value and can't +be cancelled. If used, +it will automatically create a new glossary with the label +\texttt{abbreviations} and redefines \cs{glsxtrabbrvtype} to this +label. In addition, it defines a shortcut command +\begin{definition}[\DescribeMacro\printabbreviations] +\cs{printabbreviations}\oarg{options} +\end{definition} +which is equivalent to +\begin{alltt} +\cs{printglossary}[type=\cs{glsxtrabbrvtype},\meta{options}] +\end{alltt} +The title of the new glossary is given by +\begin{definition}[\DescribeMacro\abbreviationsname] +\cs{abbreviationsname} +\end{definition} +If this command is already defined, it's left unchanged. Otherwise +it's defined to \qt{Abbreviations} if \sty{babel} hasn't been loaded +or \cs{acronymname} if \sty{babel} has been loaded. However, if +you're using \sty{babel} it's likely you will need to change this. +(See \sectionref{sec:lang} for further details.) + +\begin{important} +If you don't use the \pkgopt{abbreviations} package option, +the \cs{abbreviationsname} command won't be defined (unless it's +defined by an included language file). +\end{important} + +If the \pkgopt{abbreviations} option is used and the +\pkgopt{acronym} option provided by the \sty{glossaries} +package hasn't been used, then \ics{acronymtype} +will be set to \ics{glsxtrabbrvtype} so that acronyms defined with +\ics{newacronym} can be added to the list of abbreviations. If you +want acronyms in the \texttt{main} glossary and other abbreviations in the +\texttt{abbreviations} glossary then you will need to redefine +\cs{acronymtype} to \texttt{main}: +\begin{verbatim} +\renewcommand*{\acronymtype}{main} +\end{verbatim} + +Note that there are no analogous options to the \sty{glossaries} +package's \pkgopt{acronymlists} option (or associated commands) +as the abbreviation mechanism is handled differently with +\styfmt{glossaries-extra}. + +\item[{\pkgopt{symbols}}] This is passed to \sty{glossaries} but +will additionally define +\begin{definition}[\DescribeMacro\glsxtrnewsymbol] +\cs{glsxtrnewsymbol}\oarg{options}\marg{label}\marg{symbol} +\end{definition} +which is equivalent to +\begin{alltt} +\cs{newglossaryentry}\marg{label}\{name=\marg{symbol}, + sort=\marg{label},type=symbols,category=symbol,\meta{options}\} +\end{alltt} +Note that the \gloskey{sort} key is set to the \meta{label} +not the \meta{symbol} as the symbol will likely contain commands. + +\item[{\pkgopt{numbers}}] This is passed to \sty{glossaries} but +will additionally define +\begin{definition}[\DescribeMacro\glsxtrnewnumber] +\cs{glsxtrnewnumber}\oarg{options}\marg{number} +\end{definition} +which is equivalent to +\begin{alltt} +\cs{newglossaryentry}\marg{label}\{name=\marg{number}, + sort=\marg{label},type=numbers,category=number,\meta{options}\} +\end{alltt} + +\item[{\pkgopt{shortcuts}}] Unlike the \sty{glossaries} package +option of the same name, this option isn't boolean but has multiple +values: +\begin{itemize} +\item \pkgopt[acronyms]{shortcuts} (or \pkgopt[acro]{shortcuts}): +set the shortcuts provided by the \sty{glossaries} package for acronyms (such as \cs{ac}). + +\item \pkgopt[abbreviations]{shortcuts} (or +\pkgopt[abbr]{shortcuts}): +set the abbreviation shortcuts provided by \styfmt{glossaries-extra}. (See +\sectionref{sec:abbrshortcuts}.) These settings don't switch on the +acronym shortcuts provided by the \sty{glossaries} package. + +\item \pkgopt[other]{shortcuts}: set the \qt{other} +shortcut commands, but not the shortcut commands for abbreviations +or the acronym shortcuts provided by \sty{glossaries}. +The \qt{other} shortcuts are: +\begin{itemize} +\item \ics{newentry} equivalent to \ics{newglossaryentry} +\item \ics{newsym} equivalent to \ics{glsxtrnewsymbol} (see the +\pkgopt{symbols} option). +\item \ics{newnum} equivalent to \ics{glsxtrnewnumber} (see the +\pkgopt{numbers} option). +\end{itemize} + +\item \pkgopt[all]{shortcuts} (or \pkgopt[true]{shortcuts}): +define all the shortcut commands. + +\item \pkgopt[none]{shortcuts} (or \pkgopt[false]{shortcuts}): +don't define any of the shortcut commands (default). +\end{itemize} + +Note that multiple invocations of the \pkgopt{shortcuts} option +\emph{within the same option list} will override each other. +\end{description} + +After the \styfmt{glossaries-extra} package has been loaded, you can +set available options using +\begin{definition}[\DescribeMacro\glossariesextrasetup] +\cs{glossariesextrasetup}\marg{options} +\end{definition} +The \pkgopt{abbreviations} option may only be used in the preamble. + +\section{Modifications to Existing Commands or Styles} +\label{sec:modifications} + +The commands used by \sty{glossaries} to automatically produce an +error if an entry is undefined (such as \ics{glsdoifexists}) are +changed to take the \pkgopt{undefaction} option into account. + +The \cs{newglossaryentry} command has a new key called +\gloskey{category}, which sets the category label for the given +entry. By default this is \texttt{general}. See +\sectionref{sec:categories} for further information about +categories. + +The \ics{newterm} command (defined through the \pkgopt{index} package +option) is modified so that the category defaults to \category{index}. +The \ics{newacronym} command is modified to use the new abbreviation +interface provided by \styfmt{glossaries-extra}. +(See \sectionref{sec:abbreviations}.) + +\subsection{Entry Indexing} +\label{sec:wrglossary} + +The \styfmt{glossaries-extra} package provides an extra key for +commands like \cs{gls} and \cs{glstext} called +\gloskey[glslink]{noindex}. This is a boolean key. If true, +this suppresses the indexing. (That is, it prevents \cs{gls} or +whatever from adding a line to the external glossary file.) +This is more useful than the \pkgopt{indexonlyfirst} package option +provided by \sty{glossaries}, as the \gls{firstuse} might not be the most +pertinent use. (If you want to apply \pkgopt{indexonlyfirst} +to selected entries, rather than all of them, you can use +the \catattr{indexonlyfirst} attribute, see +\sectionref{sec:categories} for further details.) +Note that the \gloskey[glslink]{noindex} key isn't available +for \ics{glsadd} (and \ics{glsaddall}) since the whole purpose +of that command is to index an entry. + +There is a new hook that's used each time indexing information is +written to the external glossary files: +\begin{definition}[\DescribeMacro\glsxtrdowrglossaryhook] +\cs{glsxtrdowrglossaryhook}\marg{label} +\end{definition} +where \meta{label} is the entry's label. This does nothing by +default but may be redefined. (See, for example, the +accompanying sample file \texttt{sample-indexhook.tex}, +which uses this hook to determine which entries haven't been +indexed.) + +The value of the \gloskey{see} key is now saved +as a field. This isn't the case with \sty{glossaries}, where +the \gloskey{see} attribute is simply used to directly +write a line to the corresponding glossary file and is then +discarded. This is why the \gloskey{see} key can't be +used before \ics{makeglossaries} (since the file hasn't been opened +yet). It's also the reason why the \gloskey{see} key doesn't +have any effect when used in entries that are defined in the +\env{document} environment. Since the value isn't saved, it's not +available when the \texttt{.glsdefs} file is created at the end +of the document and so isn't available at the start of the +\env{document} environment on the next run. + +This modification allows \styfmt{glossaries-extra} to provide +\begin{definition}[\DescribeMacro\glsxtraddallcrossrefs] +\cs{glsxtraddallcrossrefs} +\end{definition} +which is used at the end of the document to automatically add +any unused cross-references unless the package option +\pkgopt{indexcrossrefs} was set to false. + +As a by-product of this enhancement, the \gloskey{see} key will now +work for entries defined in the document environment, but it's still +best to define entries in the preamble, and the \gloskey{see} key +still can't work before the file has been opened by +\cs{makeglossaries}. + +\subsection{Entry Display Style Modifications} +\label{sec:entryfmtmods} + +Recall from the \sty{glossaries} package that commands such as \cs{gls} +display text at that point in the document (optionally with a +hyperlink to the relevant line in the glossary). This text is +referred to as the \qt{\gls{linktext}} regardless of whether or not it +actually has a hyperlink. The actual text and the way it's displayed +depends on the command used (such as \cs{gls}) and the entry format. + +The default entry format (\ics{glsentryfmt}) used in the +\gls{linktext} by commands like \cs{gls} (but not commands like +\cs{glstext}) is changed by \styfmt{glossaries-extra} to test for +regular entries, which are determined as follows: + +\begin{itemize} +\item If an entry is assigned to a category that has the +\catattr{regular} attribute set (see \sectionref{sec:categories}), the entry is considered a~regular +entry, even if it has a~value for the \gloskey{short} key. +In this case \cs{glsentryfmt} uses \ics{glsgenentryfmt} +(provided by \sty{glossaries}), which uses the \gloskey{first} +(or \gloskey{firstplural}) value on \gls{firstuse} and the +\gloskey{text} (or \gloskey{plural}) value on subsequent use. + +\item An entry that doesn't have a~value for the \gloskey{short} +key is assumed to be a~regular entry, even if the +\catattr{regular} attribute isn't set to \qt{true} (since it can't +be an abbreviation without the short form). +In this case \cs{glsentryfmt} uses \ics{glsgenentryfmt}. + +\item If an entry does has a~value for the \gloskey{short} key +and hasn't been marked as a~regular entry through the +\catattr{regular} attribute, it's not +considered a regular entry. +In this case \cs{glsentryfmt} uses \ics{glsxtrgenabbrvfmt} +(defined by \styfmt{glossaries-extra}) which is governed +by the abbreviation style (see \sectionref{sec:abbrstyle}). + +\end{itemize} + +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. + +The \cs{glspostlinkhook} provided by the \sty{glossaries} package to +insert information after the \gls{linktext} produced by commands like \cs{gls} and \cs{glstext} is +redefined to +\begin{definition}[\DescribeMacro\glsxtrpostlinkhook] +\cs{glsxtrpostlinkhook} +\end{definition} +This command will discard a following full stop (period) if the +\catattr{discardperiod} attribute is set to \qt{true} for the +current entry's category. It will also do +\begin{definition}[\DescribeMacro\glsxtrpostlink] +\cs{glsxtrpostlink} +\end{definition} +if a full stop hasn't be discarded and +\begin{definition}[\DescribeMacro\glsxtrpostlinkendsentence] +\cs{glsxtrpostlinkendsentence} +\end{definition} +if a full stop has been discarded. + +By default \cs{glsxtrpostlink} just does \postlinkcat\ if it exists, where +\meta{category} is the category label for the current entry. +(For example, for the \category{general} category, +\cs{glsxtrpostlinkgeneral} if it has been defined.) + +The sentence-ending hook is slightly more complicated. +If the command \postlinkcat\ is defined the hook will do that +and then insert a full stop with the space factor adjusted to match +the end of sentence. If \postlinkcat\ hasn't +been defined, the space factor is adjusted to match the end of +sentence. This means that if you have, for example, an entry that +ends with a full stop, a redundant following full stop will be +discarded and the space factor adjusted (in case the entry is in +uppercase) unless the entry is followed by additional material, in +which case the following full stop is no longer redundant and needs +to be reinserted. + +There are some convenient commands you might want to use +when customizing the post-\gls{linktext} category hooks: +\begin{definition}[\DescribeMacro\glsxtrpostlinkAddDescOnFirstUse] +\cs{glsxtrpostlinkAddDescOnFirstUse} +\end{definition} +This will add the description in parentheses on \gls{firstuse}. + +For example, suppose you want to append the description in +parentheses on \gls{firstuse} for entries in the \category{symbol} +category: +\begin{verbatim} +\newcommand*{\glsxtrpostlinksymbol}{% + \glsxtrpostlinkAddDescOnFirstUse +} +\end{verbatim} + +\begin{definition}[\DescribeMacro\glsxtrpostlinkAddSymbolOnFirstUse] +\cs{glsxtrpostlinkAddSymbolOnFirstUse} +\end{definition} +This will append the symbol (if defined) in parentheses on +\gls{firstuse}. + +If you want to provide your own custom format be aware that you +can't use \ics{ifglsused} within the post-\gls{linktext} hook as by this point +the \gls{firstuseflag} will have been unset. Instead you can use +\begin{definition}[\DescribeMacro\glsxtrifwasfirstuse] +\cs{glsxtrifwasfirstuse}\marg{true}\marg{false} +\end{definition} +This will do \meta{true} if the last used entry was the +\gls{firstuse} +for that entry, otherwise it will do \meta{false}. (Requires at +least \sty{glossaries} v4.19 to work properly.) This command is +locally set by commands like \cs{gls}, so don't rely on it outside +of the post-\gls{linktext} hook. + +\begin{important} +Note that commands like \ics{glsfirst} and \ics{glsxtrfull} fake +\gls{firstuse} for the benefit of the post-\gls{linktext} hooks by setting +\cs{glsxtrifwasfirstuse} to \cs{@firstoftwo}. +(Although, depending on the styles in use, they may not exactly match +the text produced by \ics{gls}-like commands on \gls{firstuse}.) +\end{important} + +For example, if you want to place the description in a footnote +after the \gls{linktext} on \gls{firstuse} for the \category{general} category: +\begin{verbatim} +\newcommand*{\glsxtrpostlinkgeneral}{% + \glsxtrifwasfirstuse{\footnote{\glsentrydesc{\glslabel}}}{}% +} +\end{verbatim} + +The \abbrstyle{postfootnote} abbreviation style uses the +post-\gls{linktext} hook to +place the footnote after trailing punctuation characters. + +You can set the default options used by \ics{glslink}, \ics{gls} +etc with: +\begin{definition}[\DescribeMacro\GlsXtrSetDefaultGlsOpts] +\cs{GlsXtrSetDefaultGlsOpts}\marg{options} +\end{definition} +For example, if you mostly don't want to index entries then +you can do: +\begin{verbatim} +\GlsXtrSetDefaultGlsOpts{noindex} +\end{verbatim} +and then use, for example, \verb|\gls[noindex=false]{sample}| +when you actually want the location added to the \gls{numberlist}. +These defaults may be overridden by other settings (such as +category attributes) in addition to any settings passed in the +option argument of commands like \cs{glslink} and \cs{gls}. + +Note that if you don't want \emph{any} indexing, just omit +\cs{makeglossaries} and \cs{printglossaries} (or analogous +commands). + +Commands like \ics{gls} have star (\texttt{*}) and plus +(\texttt{+}) modifiers as a short cut for \texttt{hyper=false} +and \texttt{hyper=true}. The \styfmt{glossaries-extra} package +provides a way to add a third modifier, if required, using +\begin{definition}[\DescribeMacro\GlsXtrSetAltModifier] +\cs{GlsXtrSetAltModifier}\marg{char}\marg{options} +\end{definition} +where \meta{char} is the character used as the modifier and +\meta{options} is the default set of options (which may be +overridden). Note that \meta{char} must be a single character +(not a UTF-8 character, unless you are using \XeLaTeX\ or +\LuaLaTeX). + +\begin{important} +When choosing the character \meta{char} take care of any +changes in category code. +\end{important} + +Example: +\begin{verbatim} +\GlsXtrSetAltModifier{!}{noindex} +\end{verbatim} +This means that \verb|\gls!{sample}| will be equivalent to +\verb|\gls[noindex]{sample}|. It's not possible to mix modifiers. +For example, if you want to do +\begin{verbatim} +\gls[noindex,hyper=false]{sample} +\end{verbatim} +you can use \verb|\gls*[noindex]{sample}| or +\verb|\gls![hyper=false]{sample}| but you can't combine the +\texttt{*} and \texttt{!} modifiers. + +\subsection{Entry Counting Modifications} +\label{sec:entrycountmods} + +The \ics{glsenableentrycount} command is modified to allow +for the \catattr{entrycount} attribute. This means that +you not only need to enable entry counting with +\cs{glsenableentrycount}, but you also need +to set the appropriate attribute (see \sectionref{sec:categories}). + +For example, instead of just doing: +\begin{verbatim} +\glsenableentrycount +\end{verbatim} +you now need to do: +\begin{verbatim} +\glsenableentrycount +\glssetcategoryattribute{abbreviation}{entrycount}{1} +\end{verbatim} +This will enable the entry counting for entries in the +\category{abbreviation} category, but any entries assigned to +other categories will be unchanged. + +Further information about entry counting, including the +new per-unit feature, is described in \sectionref{sec:entrycount}. + +\subsection{Nested Links} +\label{sec:nested} + +Complications arise when you use \ics{gls} in the +value of the \gloskey{name} field (or \gloskey{text} +or \gloskey{first} fields, if set). This tends to occur with +abbreviations that extend other abbreviations. For example, +SHTML is an abbreviation for SSI enabled HTML, where SSI +is an abbreviation for Server Side Includes and HTML +is an abbreviation for Hypertext Markup Language. + +Things can go wrong if we try the following with the +\sty{glossaries} package: +\begin{verbatim} +\newacronym{ssi}{SSI}{Server Side Includes} +\newacronym{html}{HTML}{Hypertext Markup Language} +\newacronym{shtml}{S\gls{html}}{\gls{ssi} enabled \gls{html}} +\end{verbatim} + +The main problems are: +\begin{enumerate} +\item The first letter upper casing commands, such as \ics{Gls}, +won't work for the \texttt{shtml} entry on \gls{firstuse} if the +long form is displayed before the short form (which is the +default abbreviation style). This will attempt to do +\begin{verbatim} +\gls{\uppercase ssi} enabled \gls{html} +\end{verbatim} +which just doesn't work. Grouping the \verb|\gls{ssi}| doesn't +work either as this will effectively try to do +\begin{verbatim} +\uppercase{\gls{ssi}} enabled \gls{html} +\end{verbatim} +This will upper case the label \texttt{ssi} so the entry won't be +recognised. This problem will also occur if you use the all capitals +version, such as \ics{GLS}. + +\item The long and abbreviated forms accessed through +\ics{glsentrylong} and \ics{glsentryshort} are no longer expandable +and so can't be used be used in contexts that require this, +such as PDF bookmarks. + +\item The \texttt{shtml} entry produces inconsistent results +depending on whether the \texttt{ssi} or \texttt{html} entries have +been used. Suppose both \texttt{ssi} and \texttt{html} are used +before \texttt{shtml}. For example: +\begin{verbatim} +This section discusses \gls{ssi}, \gls{html} and \gls{shtml}. +\end{verbatim} +This produces: +\begin{quote} +This section discusses server side includes (SSI), hypertext markup +language (HTML) and SSI enabled HTML (SHTML). +\end{quote} +So the \gls{firstuse} of the \texttt{shtml} entry produces +\qt{SSI enabled HTML (SHTML)}. + +Now let's suppose the \texttt{html} entry is used before the +\texttt{shtml} but the \texttt{ssi} entry is used after the +\texttt{shtml} entry, for example: +\begin{verbatim} +The sample files are either \gls{html} or \gls{shtml}, but let's +first discuss \gls{ssi}. +\end{verbatim} +This produces: +\begin{quote} +The sample files are either hypertext markup language (HTML) or +server +side includes (SSI) enabled HTML (SHTML), but let’s first discuss +SSI. +\end{quote} +So the \gls{firstuse} of the \texttt{shtml} entry now produces +\qt{server side includes (SSI) enabled HTML (SHTML)}, which looks +a bit strange. + +Now let's suppose the \texttt{shtml} entry is used before (or +without) the other two entries: +\begin{verbatim} +This article is an introduction to \gls{shtml}. +\end{verbatim} +This produces: +\begin{quote} +This article is an introduction to server side includes (SSI) +enabled hypertext markup language (HTML) (SHTML). +\end{quote} +So the \gls{firstuse} of the \texttt{shtml} entry now produces +\qt{server side includes (SSI) enabled hypertext markup language (HTML) +(SHTML)}, which is even more strange. + +This is all aggravated by setting the style using +\cs{setacronymstyle}. For example: +\begin{verbatim} +\setacronymstyle{long-short} +\end{verbatim} +as this references the label through the use of \cs{glslabel} +when displaying the long and short forms, but this value +changes with each use of \cs{gls}, so instead of displaying +\qt{(SHTML)} at the end of the \gls{firstuse}, it now displays +\qt{(HTML)}, since \cs{glslabel} has been changed to \texttt{html} +by \verb|\gls{html}|. + +Another oddity occurs if you reset the \texttt{html} entry between +uses of the \texttt{shtml} entry. For example: +\begin{verbatim} +\gls{shtml} ... \glsreset{html}\gls{shtml} +\end{verbatim} +The next use of \texttt{shtml} produces \qt{Shypertext markup +language (HTML)}, which is downright weird. + +Even without this, the short form has nested formatting commands, +which amount to \verb|\acronymfont{S\acronymfont{HTML}}|. This +may not be a problem for some styles, but if you use one of the +\qt{sm} styles (that use \ics{textsmaller}), this will produce +an odd result. + +\item Each time the \texttt{shtml} entry is used, the +\texttt{html} entry will also be indexed and marked as used, +and on \gls{firstuse} this will happen to both the \texttt{ssi} +and \texttt{html} entries. This kind of duplication in the location +list isn't usually particularly helpful to the reader. + +\item If \sty{hyperref} is in use, you'll get nested hyperlinks +and there's no consistent way of dealing with this across the +available PDF viewers. If on the \gls{firstuse} case, the user +clicks on the \qt{HTML} part of the \qt{SSI enabled HTML (SHTML)} +link, they may be directed to the HTML entry in the glossary or +they may be directed to the SHTML entry in the glossary. + +\end{enumerate} + +For these reasons it's better to use the simple expandable commands like +\ics{glsentrytext} or \ics{glsentryshort} in the definition +of other entries (although that doesn't fix the first problem). +Alternatively use something like: +\begin{verbatim} +\newacronym + [description={\acrshort{ssi} enabled \acrshort{html}}] + {shtml}{SHTML}{SSI enabled HTML} +\end{verbatim} +with \sty{glossaries} or: +\begin{verbatim} +\newabbreviation + [description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}] + {shtml}{SHTML}{SSI enabled HTML} +\end{verbatim} +with \styfmt{glossaries-extra}. This fixes all the above +listed problems (as long as you don't use \ics{glsdesc}). +Note that replacing \cs{gls} with \cs{acrshort} in the original +example may fix the \gls{firstuse} issue, but it doesn't +fix any of the other problems listed above. + +However if you're really determined to use +\ics{gls} in a field that may be included within +some \gls{linktext}, \styfmt{glossaries-extra} patches internals +used by the linking commands so that if \cs{gls} (or plural or +case changing variants) occurs in the \gls{linktext} it will +behave as though you used +\texttt{\ics{glstext}[hyper=false,noindex]} +instead. Grouping is also added so that, for example, when +\verb|\gls{shtml}| is used for the first time the long form +\begin{verbatim} +\gls{ssi} enabled \gls{html} +\end{verbatim} +is treated as +\begin{verbatim} +{\glstext[hyper=false,noindex]{ssi}} enabled +{\glstext[hyper=false,noindex]{html}} +\end{verbatim} +This overcomes the last three problems listed +above, but still doesn't fix the first two. + +Additionally, any instance of the long form commands, such +as \ics{glsxtrlong} or \ics{acrlong} will be temporarily +redefined to just use +\begin{alltt} +\{\ics{glsentrylong}\marg{label}\meta{insert}\} +\end{alltt} +(or case-changing versions). Similarly the short form commands, +such as \ics{glsxtrshort} or \ics{acrshort} will use +\ics{glsentryshort} in the argument of either \cs{glsabbrvfont} +(for \cs{glsxtrshort}) or \cs{acronymfont} (for \cs{acrshort}). +So if the \texttt{shtml} entry had instead been defined as: +\begin{verbatim} +\newacronym{shtml}{SHTML}{\acrshort{ssi} enabled \acrshort{html}} +\end{verbatim} +then (using the \abbrstyle{long-short} style) the \gls{firstuse} +will be like +\begin{verbatim} +{\acronymfont{\glsentryshort{ssi}}} enabled +{\acronymfont{\glsentryshort{html}}} (SHTML) +\end{verbatim} +whereas if the entry is defined as: +\begin{verbatim} +\newabbreviation{shtml}{SHTML}{\glsxtrshort{ssi} enabled +\glsxtrshort{html}} +\end{verbatim} +then the \gls{firstuse} will be like: +\begin{verbatim} +{\glsabbrvfont{\glsentryshort{ssi}}} enabled +{\glsabbrvfont{\glsentryshort{html}}} (SHTML) +\end{verbatim} +Note that the first optional argument of +\cs{acrshort} or \cs{glsxtrshort} is ignored in this context. +(The final optional argument will be inserted, if present.) +The abbreviation style that governs \ics{glsabbrvfont} will be +set for \ics{glsxtrshort}. Note that \cs{acrshort} doesn't +set the abbreviation style. + +\begin{important} +If you use any of the case-changing commands, such as \ics{Gls} +or \ics{Glstext}, (either all caps or first letter upper casing) +don't use any of the linking commands, such as \ics{gls} or +\ics{glstext}, in the definition of entries for any of the +fields that may be used by those case-changing commands. +\end{important} + +\subsection{Acronym Style Modifications} +\label{sec:acronymmods} + +The \styfmt{glossaries-extra} package provides a new way of dealing +with abbreviations and redefines \ics{newacronym} to +use \cs{newabbreviation} (see \sectionref{sec:abbreviations}). +If you want to restore the generic acronym function provided +by \sty{glossaries} you need to use +\begin{definition}[\DescribeMacro\RestoreAcronyms] +\cs{RestoreAcronyms} +\end{definition} +but be careful using this if you also want abbreviations as +they will clash if you attempt to use them in the same glossary as +generic acronyms from the \sty{glossaries} package. + +\begin{definition}[\DescribeMacro\glsacspace] +\cs{glsacspace}\marg{label} +\end{definition} +The space command \cs{glsacspace} used by the +\acrstyle{long-sp-short} acronym style provided by \sty{glossaries} +is modified so that it uses +\begin{definition}[\DescribeMacro\glsacspacemax] +\cs{glsacspacemax} +\end{definition} +instead of the hard-coded 3em. This is a command not a length +and so can be changed using \cs{renewcommand}. + +The \gls{firstuse} acronym font command +\begin{definition}[\firstacronymfont] +\cs{firstacronymfont}\marg{text} +\end{definition} +is redefined to use the \gls{firstuse} abbreviation font command +\ics{glsfirstabbrvfont}. This will be reset if you use +\cs{RestoreAcronyms}. + +The subsequent use acronym font command +\begin{definition}[\acronymfont] +\cs{acronymfont}\marg{text} +\end{definition} +is redefined to use the subsequent use abbreviation font command +\ics{glsabbrvfont}. This will be reset if you use +\cs{RestoreAcronyms}. + +\subsection{Glossary Style Modifications} +\label{sec:glosstylemods} + +The default value of \ics{glslistdottedwidth} 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 +\cs{hsize} isn't set until the start of the document. + +The commands \ics{glossentryname} and \ics{glossentrydesc} are +modified to take into account the \catattr{glossname} and +\catattr{glossdesc} attributes (see \sectionref{sec:categories}). +This means you can make simple case-changing modifications to +the name and description without defining a new glossary style. + +There is a hook after \ics{glossentryname} and +\ics{Glossentryname}: +\begin{definition}[\DescribeMacro\glsxtrpostnamehook] +\cs{glsxtrpostnamehook}\marg{label} +\end{definition} +By default this checks the \catattr{indexname} attribute. +If the attribute exists for the category to which the label belongs, +then the name is automatically indexed using +\begin{definition} +\ics{glsxtrdoautoindexname}\marg{label}\texttt{\{indexname\}} +\end{definition} +See \sectionref{sec:autoindex} for further details. + +The post-description code used within the glossary is modified so +that it also does +\begin{definition}[\DescribeMacro\glsxtrpostdescription] +\cs{glsxtrpostdescription} +\end{definition} +This occurs before the original \cs{glspostdescription}, so if the +\pkgopt[false]{nopostdot} option is used, it will be inserted before +the terminating full stop. + +This new command will do \cs{glsxtrpostdesc\meta{category}} +if it exists, where \meta{category} is the category label associated +with the current entry. For example \cs{glsxtrpostdescgeneral} +for entries with the category set to \category{general} +or \cs{glsxtrpostdescacronym} for entries with the category set to +\category{acronym}. + +Since both \cs{glossentry} and \cs{subglossentry} set +\begin{definition}[\DescribeMacro\glscurrententrylabel] +\cs{glscurrententrylabel} +\end{definition} +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 description in the glossary, but only for entries in the +\category{general} category, then you could do: +\begin{verbatim} +\renewcommand{\glsxtrpostdescgeneral}{\space + (plural: \glsentryplural{\glscurrententrylabel})} +\end{verbatim} +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.) + +\begin{important} +This feature can't be used for glossary styles that ignore +\cs{glspostdescription} or if you redefine +\cs{glspostdescription} without including \cs{glsxtrpostdescription}. +(For example, if you redefine \cs{glspostdescription} to do +nothing instead of using the \pkgopt{nopostdot} option to suppress +the terminating full stop.) +\end{important} + +\chapter{Abbreviations} +\label{sec:abbreviations} + +Abbreviations include acronyms (words formed from initial letters, +such as \qt{laser}), +initialisms (initial letters of a phrase, such as \qt{html}, that +aren't pronounced as words) and contractions (where +parts of words are omitted, often replaced by an apostrophe, such as +\qt{don't}). +The \qt{acronym} code provided by the \sty{glossaries} package is +misnamed as it's more often than not used for initialisms instead. +Acronyms tend not to be \emph{expanded} on \gls{firstuse} (although they may +need to be \emph{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 \styfmt{glossaries-extra} package corrects this misnomer, and +provides better abbreviation handling, with +\begin{definition}[\DescribeMacro\newabbreviation] +\cs{newabbreviation}\oarg{options}\marg{label}\marg{short}\marg{long} +\end{definition} + +This sets the \gloskey{category} key to \texttt{abbreviation} by +default, but that value may be overridden in \meta{options}. +The category may have attributes that modify the way abbreviations +are defined. For example, the \catattr{insertdots} attribute will +automatically insert full stops (periods) into \meta{short} or the +\catattr{noshortplural} attribute will set the default value +of the \gloskey{shortplural} key to just \meta{short} (without +appending the plural suffix). See \sectionref{sec:categories} for +further details. + +See \sectionref{sec:nested} regarding the pitfalls of using +commands like \ics{gls} or \ics{glsxtrshort} within +\meta{short} or \meta{long}. + +\begin{important} +Make sure that you set the category attributes before defining new +abbreviations or they may not be correctly applied. +\end{important} + +The \ics{newacronym} command provided by the \sty{glossaries} +package is redefined to use +\cs{newabbreviation} with the \gloskey{category} set to +\texttt{acronym}. If you want to restore the original behaviour of +acronyms (as implemented by the \sty{glossaries} package's +\cs{newacronym}, \ics{setacronymstyle} and \ics{newacronymstyle}) +you need to use +\begin{definition}[\DescribeMacro\RestoreAcronyms] +\cs{RestoreAcronyms} +\end{definition} +However, if you do this take care not to mix acronyms with other +types of entries within the same glossary. (You may also need to +redefine \ics{acronymtype}.) + +The \cs{newabbreviation} command is superficially similar to the +\sty{glossaries} package's \cs{newacronym} but you can apply +different styles to different categories. The default style is +\abbrstyle{short} for entries in the \category{acronym} category and +\abbrstyle{short-long} for entries in the \category{abbreviation} +category. (These aren't the same as the acronym styles provided by +the \sty{glossaries} package, although they may produce similar +results.) + +The short form is displayed within commands like \cs{gls} using +\begin{definition}[\DescribeMacro\glsfirstabbrvfont] +\cs{glsfirstabbrvfont}\marg{short-form} +\end{definition} +on \gls{firstuse} and +\begin{definition}[\DescribeMacro\glsabbrvfont] +\cs{glsabbrvfont}\marg{short-form} +\end{definition} +for subsequent use. + +\begin{important} +These commands (\cs{glsfirstabbrvfont} and \cs{glsabbrvfont}) are +reset by the abbreviation styles and whenever an abbreviation is +used by commands like \cs{gls} (but not by commands like +\ics{glsentryshort}) so don't try redefining them outside of an +abbreviation style. +\end{important} + +If you use the \abbrstyle{long-short} style, +\cs{glsabbrvfont} is redefine to use +\begin{definition}[\DescribeMacro\glsabbrvdefaultfont] +\cs{glsabbrvdefaultfont}\marg{text} +\end{definition} +whereas the \abbrstyle{long-short-sc} style redefines +\cs{glsabbrvfont} to use \cs{glsxtrscfont}. If you want to use a different +font-changing command you can either redefine \cs{glsabbrvdefaultfont} and +use one of the base styles, such as \abbrstyle{long-short}, or +define a new style in a similar manner to the \qt{sc}, \qt{sm} +or \qt{em} styles. + +All predefined abbreviation styles redefine \cs{glsfirstabbrvfont} +to use +\begin{definition}[\DescribeMacro\glsfirstabbrvdefaultfont] +\cs{glsfirstabbrvdefaultfont}\marg{short-form} +\end{definition} +By default, this just does \cs{glsabbrvfont}\marg{short-form} +so the \gls{firstuse} format matches the subsequence use format +for the short form. + +The commands that display the full form for abbreviations use +\cs{glsfirstabbrvfont} to display the short form and +\begin{definition}[\DescribeMacro\glsfirstlongfont] +\cs{glsfirstlongfont}\marg{long-form} +\end{definition} +to display the long form. As with \ics{glsabbrvfont}, this command +is changed by all styles. Currently all predefined abbreviation +styles provided by \styfmt{glossaries-extra} redefine +\cs{glsfirstlongfont} to use +\begin{definition}[\DescribeMacro\glsfirstlongdefaultfont] +\cs{glsfirstlongdefaultfont}\marg{long-form} +\end{definition} +You can redefine this command if you want to change the font used by +the long form on \gls{firstuse} for all your abbreviations, or you can +define your own abbreviation style that provides a different format +for only those abbreviations defined with that style. + +There are two types of full forms. The display full form, which is +used on \gls{firstuse} by commands like \ics{gls} and the inline full +form, which is used by commands like \ics{glsxtrfull}. +For some of the abbreviation styles, such as \abbrstyle{long-short}, the display and inline forms +are the same. In the case of styles such as \abbrstyle{short} or +\abbrstyle{footnote}, the display and inline full forms are different. + +These formatting commands aren't stored in the \gloskey{short}, +\gloskey{shortplural}, \gloskey{long} or \gloskey{longplural} +fields, which means they won't be used within commands like +\cs{glsentryshort} (but they are used within commands like +\cs{glsxtrshort} and \cs{glsfmtshort}). +Note that \ics{glsxtrlong} and the case-changing variants don't use +\cs{glsfirstlongfont}. + +\section{Tagging Initials} +\label{sec:tagging} + +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 +\begin{definition}[\DescribeMacro\GlsXtrEnableInitialTagging] +\cs{GlsXtrEnableInitialTagging}\marg{categories}\marg{cs} +\end{definition} +before you define your abbreviations. + +This command (robustly) defines \meta{cs} (a control sequence) +to accept a single argument, which is the letter (or letters) +that needs to be tagged. The normal behaviour of this command +within the document is to simply do its argument, but in the +glossary it's activated for those categories that have +the \catattr{tagging} attribute set to \qt{true}. For those +cases it will use +\begin{definition}[\DescribeMacro\glsxtrtagfont] +\cs{glsxtrtagfont}\marg{text} +\end{definition} +This command defaults to \ics{underline}\marg{text} +but may be redefined as required. + +The control sequence \meta{cs} can't already be defined when +used with the unstarred version of +\cs{GlsXtrEnableInitialTagging} for safety reasons. +The starred version will overwrite any previous definition +of \meta{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 \cs{GlsXtrEnableInitialTagging} is a +comma-separated list of category names. The \catattr{tagging} +attribute will automatically be set for those categories. +You can later set this attribute for other categories (see +\sectionref{sec:categories}) but this must be done before the +glossary is displayed. + +The accompanying sample file \texttt{sample-mixtures.tex} +uses initial tagging for both the \category{acronym} and +\category{abbreviation} categories: +\begin{verbatim} +\GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag} +\end{verbatim} +This defines the command \cs{itag} which can be used in the +definitions. For example: +\begin{verbatim} +\newacronym + [description={a system for detecting the location and + speed of ships, aircraft, etc, through the use of radio + waves}% description of this term + ] + {radar}% identifying label + {radar}% short form (i.e. the word) + {\itag{ra}dio \itag{d}etection \itag{a}nd \itag{r}anging} + +\newabbreviation{xml}{XML} + {e\itag{x}tensible \itag{m}arkup \itag{l}anguage} +\end{verbatim} +The underlining of the tagged letters only occurs in the +glossary and then only for entries with the \catattr{tagging} +attribute set. + +\section{Abbreviation Styles} +\label{sec:abbrstyle} + +The abbreviation style must be set before abbreviations are defined +using: +\begin{definition}[\DescribeMacro\setabbreviationstyle] +\cs{setabbreviationstyle}\oarg{category}\marg{style-name} +\end{definition} +where \meta{style-name} is the name of the style and \meta{category} +is the category label (\texttt{abbreviation} by default). New +abbreviations will pick up the current style according to their +given category. If there is no style set for the category, the +fallback is the style for the \texttt{abbreviation} category. +Some styles may automatically modify one or more of the attributes +associated with the given category. For example, the +\abbrstyle{long} and \abbrstyle{short} styles set the +\catattr{regular} attribute to \texttt{true}. + +\begin{important} +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. +\end{important} + +Note that \ics{setacronymstyle} is disabled by +\styfmt{glossaries-extra}. Use +\begin{alltt} +\cs{setabbreviationstyle}[acronym]\marg{style-name} +\end{alltt} +instead. The original acronym interface can be restored with +\cs{RestoreAcronyms} (see \sectionref{sec:acronymmods}). + +Abbreviations can be used with the standard \sty{glossaries} +commands, such as \ics{gls}, but don't use the acronym commands +like \ics{acrshort} (which use \ics{acronymfont}). The short form can be +produced with: +\begin{definition}[\DescribeMacro\glsxtrshort] +\cs{glsxtrshort}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(Use this instead of \ics{acrshort}.) + +The long form can be produced with +\begin{definition}[\DescribeMacro\glsxtrlong] +\cs{glsxtrlong}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(Use this instead of \ics{acrlong}.) + +The \emph{inline} full form can be produced with +\begin{definition}[\DescribeMacro\glsxtrfull] +\cs{glsxtrfull}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +(This this instead of \ics{acrfull}.) + +As mentioned earlier, the inline full form may not necessarily match the format used on +\gls{firstuse} with \cs{gls}. For example, the \abbrstyle{short} style +only displays the short form on \gls{firstuse}, but the full +form will display the long form followed by the short form in +parentheses. + +\begin{important} +If you want to use an abbreviation in a chapter or section +title, use the commands described in \sectionref{sec:headtitle} +instead. +\end{important} + +The arguments \meta{options}, \meta{label} and \meta{insert} are the +same as for commands such as \cs{glstext}. There are also analogous +case-changing commands: + +First letter upper case short form: +\begin{definition}[\DescribeMacro\Glsxtrshort] +\cs{Glsxtrshort}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +First letter upper case long form: +\begin{definition}[\DescribeMacro\Glsxtrlong] +\cs{Glsxtrlong}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +First letter upper case inline full form: +\begin{definition}[\DescribeMacro\Glsxtrfull] +\cs{Glsxtrfull}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +All upper case short form: +\begin{definition}[\DescribeMacro\Glsxtrshort] +\cs{GLSxtrshort}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +All upper case long form: +\begin{definition}[\DescribeMacro\Glsxtrlong] +\cs{GLSxtrlong}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +All upper case inline full form: +\begin{definition}[\DescribeMacro\GLSxtrfull] +\cs{GLSxtrfull}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +Plural forms are also available. + +Short form plurals: +\begin{definition}[\DescribeMacro\glsxtrshortpl] +\cs{glsxtrshortpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro\Glsxtrshortpl] +\cs{Glsxtrshortpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro\GLSxtrshortpl] +\cs{GLSxtrshortpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +Long form plurals: +\begin{definition}[\DescribeMacro\glsxtrlongpl] +\cs{glsxtrlongpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro\Glsxtrlongpl] +\cs{Glsxtrlongpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro\GLSxtrlongpl] +\cs{GLSxtrlongpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +Full form plurals: +\begin{definition}[\DescribeMacro\glsxtrfullpl] +\cs{glsxtrfullpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro\Glsxtrfullpl] +\cs{Glsxtrfullpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +\begin{definition}[\DescribeMacro\GLSxtrfullpl] +\cs{GLSxtrfullpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} + +\begin{important} +Be careful about using \cs{glsentryfull}, \cs{Glsentryfull}, +\cs{glsentryfullpl} and \cs{Glsentryfullpl}. These commands will use +the currently applied style rather than the style in use when the +entry was defined. If you have mixed styles, you'll need to use +\ics{glsxtrfull} instead. Similarly for \cs{glsentryshort} etc. +\end{important} + +\section{Shortcut Commands} +\label{sec:abbrshortcuts} + +The abbreviation shortcut commands can be enabled using +the package option \pkgopt[abbreviation]{shortcuts} +(or \pkgopt[abbr]{shortcuts}). This defines the commands listed in +\tableref{tab:abbrshortcuts}. + +\begin{table}[htbp] +\caption{Abbreviation Shortcut Commands} +\label{tab:abbrshortcuts} +\centering +\begin{tabular}{ll} +\bfseries Shortcut & \bfseries Equivalent Command\\ +\ics{ab} & \ics{cgls}\\ +\ics{abp} & \ics{cglspl}\\ +\ics{as} & \ics{glsxtrshort}\\ +\ics{asp} & \ics{glsxtrshortpl}\\ +\ics{al} & \ics{glsxtrlong}\\ +\ics{alp} & \ics{glsxtrlongpl}\\ +\ics{af} & \ics{glsxtrfull}\\ +\ics{afp} & \ics{glsxtrfullpl}\\ +\ics{As} & \ics{Glsxtrshort}\\ +\ics{Asp} & \ics{Glsxtrshortpl}\\ +\ics{Al} & \ics{Glsxtrlong}\\ +\ics{Alp} & \ics{Glsxtrlongpl}\\ +\ics{Af} & \ics{Glsxtrfull}\\ +\ics{Afp} & \ics{Glsxtrfullpl}\\ +\ics{AS} & \ics{GLSxtrshort}\\ +\ics{ASP} & \ics{GLSxtrshortpl}\\ +\ics{AL} & \ics{GLSxtrlong}\\ +\ics{ALP} & \ics{GLSxtrlongpl}\\ +\ics{AF} & \ics{GLSxtrfull}\\ +\ics{AFP} & \ics{GLSxtrfullpl}\\ +\ics{newabbr} & \ics{newabbreviation} +\end{tabular} +\end{table} + +\section{Predefined Abbreviation Styles} +\label{sec:predefabbrvstyles} + +There are two types of abbreviation styles: those that treat the +abbreviation as a regular entry (so that \ics{gls} uses +\ics{glsgenentryfmt}) and those that don't treat the abbreviation as +a regular entry (so that \ics{gls} uses \ics{glsxtrgenabbrvfmt}). + +The regular entry abbreviation styles set the \catattr{regular} +attribute to \qt{true} for the category assigned to each +abbreviation with that style. This means that on \gls{firstuse}, +\ics{gls} uses the value of the \gloskey{first} field and on +subsequent use \ics{gls} uses the value of the \gloskey{text} field +(and analogously for the plural and case-changing versions). The +\gloskey{short} and \gloskey{long} fields are set as appropriate +and may be accessed through commands like \ics{glsxtrshort}. + +The other abbreviation styles don't modify the \catattr{regular} +attribute. The \gloskey{first} and \gloskey{text} fields (and their +plural forms) are set and can be accessed through commands like +\cs{glsfirst}, but they aren't used by commands like \ics{gls}, +which instead use the short form (stored in the \gloskey{short} key) +and the display full format (through commands like +\ics{glsxtrfullformat} that are defined by the style). + +In both cases, the \gls{firstuse} of \ics{gls} may not match the +text produced by \ics{glsfirst} (and likewise for the plural +and case-changing versions). + +\begin{important} +For the \qt{sc} styles that use \ics{textsc}, 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 \sty{fontenc} package with the +\pkgoptfmt{T1} option or something similar. +\end{important} + +The \qt{sc} styles all use +\begin{definition}[\DescribeMacro\glsxtrscfont] +\cs{glsxtrscfont}\marg{text} +\end{definition} +which is defined as +\begin{verbatim} +\newcommand*{\glsxtrscfont}[1]{\textsc{#1}} +\end{verbatim} +The default plural suffix for the short form is set to +\begin{definition}[\DescribeMacro\glsxtrscsuffix] +\cs{glsxtrscsuffix} +\end{definition} +This just defined as +\begin{verbatim} +\newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}} +\end{verbatim} +The \ics{glstextup} command is provided by \sty{glossaries} +and is used to switch off the small caps font for the suffix. +If you override the default short plural using the +\gloskey{shortplural} 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 \catattr{aposplural} and +\catattr{noshortplural} attributes. See +\sectionref{sec:categories} for further details.) + +The \qt{sm} styles all use +\begin{definition}[\DescribeMacro\glsxtrsmfont] +\cs{glsxtrsmfont}\marg{text} +\end{definition} +This is defined as: +\begin{verbatim} +\newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} +\end{verbatim} +If you want to use this, you must explicitly load the \sty{relsize} +package which defines the \ics{textsmaller} command. If you want to +easily switch between the \qt{sc} and \qt{sm} styles, you may find +it easier to redefine this command to convert to upper case: +\begin{verbatim} +\renewcommand*{\glsxtrsmfont}[1]{\textsmaller{\MakeTextUppercase{#1}}} +\end{verbatim} +The default plural suffix for the short form is set to +\begin{definition}[\DescribeMacro\glsxtrsmsuffix] +\cs{glsxtrsmsuffix} +\end{definition} +This just does \ics{glspluralsuffix}. + +The \qt{em} styles all redefine \ics{glsabbrvfont} to use +\ics{emph}. This is done explicitly and not through a helper +command such as \cs{glsxtrscfont}. + +Some of the styles use +\begin{definition}[\DescribeMacro\glsxtrfullsep] +\cs{glsxtrfullsep}\marg{label} +\end{definition} +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: +\begin{verbatim} +\renewcommand*{\glsxtrfullsep}[1]{~} +\end{verbatim} +or +\begin{verbatim} +\renewcommand*{\glsxtrfullsep}[1]{\glsacspace{#1}} +\end{verbatim} + +\subsection{Predefined Abbreviation Styles that Set the Regular +Attribute} +\label{sec:predefregabbrvstyles} + +The following abbreviation styles set the \catattr{regular} +attribute to \qt{true} for all categories that have abbreviations +defined with any of these styles. + +\begin{description} +\item[\abbrstyle{short}] +This only displays the short form on \gls{firstuse}. The \gloskey{name} +is set to the short form. The \gloskey{description} is set to the +long form. The inline full form displays +\meta{short} (\meta{long}). The long form on its own can be +displayed through commands like \ics{glsxtrlong}. + +\item[\abbrstyle{short-sc}] +Like \abbrstyle{short} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrscfont}. + +\item[\abbrstyle{short-sm}] +Like \abbrstyle{short} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{short-em}] +Like \abbrstyle{short} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\item[\abbrstyle{short-desc}] +Like the \abbrstyle{short} style, but the \gloskey{name} is set to +the full form and the \gloskey{description} must be supplied by the +user. You may prefer to use the \abbrstyle{short} style with the +post-description hook set to display the long form and override +the \gloskey{description} key. (See the sample file +\texttt{sample-acronym-desc.tex}.) + +\item[\abbrstyle{short-sc-desc}] +Like \abbrstyle{short} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrscfont}. + +\item[\abbrstyle{short-sm-desc}] +Like \abbrstyle{short-desc} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{short-em-desc}] +Like \abbrstyle{short-desc} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\item[\abbrstyle{long-desc}] +This style only displays the long form, regardless of first or +subsequent use of commands \ics{gls}. The short form may be +accessed through commands like \ics{glsxtrshort}. The inline full +form displays \meta{long} (\meta{short}). + +The \gloskey{name} is set to the long form and the +\gloskey{description} 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 \meta{long} +(\meta{short}). + +\item[\abbrstyle{long-desc-sc}] +Like the \abbrstyle{long-desc} style but the short form (accessed +through commands like \ics{glsxtrshort}) use \ics{glsxtrscfont}. + +\item[\abbrstyle{long-desc-sm}] +Like \abbrstyle{long-desc} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{long-desc-em}] +Like \abbrstyle{long-desc} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\item[\abbrstyle{long}] +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 \abbrstyle{long-desc} style, but the \gloskey{name} +is set to the short form and the \gloskey{description} is set to the +long form. + +\item[\abbrstyle{long-sc}] +Like the \abbrstyle{long} style but the short form (accessed +through commands like \ics{glsxtrshort}) use \ics{glsxtrscfont}. + +\item[\abbrstyle{long-sm}] +Like \abbrstyle{long} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{long-em}] +Like \abbrstyle{long} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\end{description} + +\subsection{Predefined Abbreviation Styles that Don't Set the Regular +Attribute} +\label{sec:predefnonregabbrvstyles} + +The following abbreviation styles will set the +\catattr{regular} attribute to \qt{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. + +\begin{description} +\item[\abbrstyle{long-short}] +On \gls{firstuse}, this style uses the format \meta{long} (\meta{short}). +The inline and display full forms are the same. The \gloskey{name} +is set to the short form. The +\gloskey{description} is set to the long form. The long and short +forms are separated by \cs{glsxtrfullsep}. + +\item[\abbrstyle{long-short-sc}] +Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrscfont}. + +\item[\abbrstyle{long-short-sm}] +Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{long-short-em}] +Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\item[\abbrstyle{long-short-desc}] +On \gls{firstuse}, this style uses the format \meta{long} (\meta{short}). +The inline and display full forms are the same. The \gloskey{name} +is set to the full form. The +\gloskey{description} must be supplied by the user. +The long and short forms are separated by \cs{glsxtrfullsep}. + +\item[\abbrstyle{long-short-sc-desc}] +Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrscfont}. + +\item[\abbrstyle{long-short-sm-desc}] +Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{long-short-em-desc}] +Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\item[\abbrstyle{short-long}] +On \gls{firstuse}, this style uses the format \meta{short} (\meta{long}). +The inline and display full forms are the same. The \gloskey{name} +is set to the short form. The +\gloskey{description} is set to the long form. +The short and long forms are separated by \cs{glsxtrfullsep}. + +\item[\abbrstyle{short-sc-long}] +Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrscfont}. + +\item[\abbrstyle{short-sm-long}] +Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{short-em-long}] +Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\item[\abbrstyle{short-long-desc}] +On \gls{firstuse}, this style uses the format \meta{short} (\meta{long}). +The inline and display full forms are the same. The \gloskey{name} +is set to the full form. The +\gloskey{description} must be supplied by the user. +The short and long forms are separated by \cs{glsxtrfullsep}. + +\item[\abbrstyle{short-sc-long-desc}] +Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrscfont}. + +\item[\abbrstyle{short-sm-long-desc}] +Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{short-em-long-desc}] +Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\item[\abbrstyle{footnote}] +On \gls{firstuse}, this style displays the short form with the long form +as a footnote. This style automatically sets the +\catattr{nohyperfirst} attribute to \qt{true} for the supplied +category, so the \gls{firstuse} won't be hyperlinked (but the footnote +marker may be, if the \sty{hyperref} package is used). + +The inline full form uses the \meta{short} +(\meta{long}) style. The \gloskey{name} is set to the short form. +The \gloskey{description} is set to the long form. + +\item[\abbrstyle{footnote-sc}] +Like \abbrstyle{footnote} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrscfont}. + +\item[\abbrstyle{footnote-sm}] +Like \abbrstyle{footnote} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{footnote-em}] +Like \abbrstyle{footnote} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\item[\abbrstyle{postfootnote}] +This is similar to the \abbrstyle{footnote} style but doesn't modify +the category attribute. Instead it changes \postlinkcat\ to +insert the footnote after the +\gls{linktext} on \gls{firstuse}. This will also defer the footnote until after any +following punctuation character that's recognised by +\ics{glsxtrifnextpunc}. + +The inline full form uses the \meta{short} +(\meta{long}) style. The \gloskey{name} is set to the short form. +The \gloskey{description} is set to the long form. + +\item[\abbrstyle{postfootnote-sc}] +Like \abbrstyle{postfootnote} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrscfont}. + +\item[\abbrstyle{postfootnote-sm}] +Like \abbrstyle{postfootnote} but redefines \cs{glsabbrvfont} to +use \ics{glsxtrsmfont}. + +\item[\abbrstyle{postfootnote-em}] +Like \abbrstyle{postfootnote} but redefines \cs{glsabbrvfont} to +use \ics{emph}. + +\end{description} + +\section{Defining New Abbreviation Styles} +\label{sec:newabbrvstyle} + +New abbreviation styles may be defined using: +\begin{definition}[\DescribeMacro\newabbreviationstyle] +\cs{newabbreviationstyle}\marg{name}\marg{setup}\marg{fmts} +\end{definition} +where \meta{name} is the name of the new style (as used in the +mandatory argument of \ics{setabbreviationstyle}). This is similar +but not identical to the \sty{glossaries} package's +\ics{newacronymstyle} command. + +\begin{important} +You can't use styles defined by +\cs{newacronymstyle} with \styfmt{glossaries-extra} unless you have +reverted \ics{newacronym} back to its generic definition from \sty{glossaries} +(using \ics{RestoreAcronyms}). The acronym styles from the +\sty{glossaries} package can't be used with abbreviations defined +with \cs{newabbreviation}. +\end{important} + +The \meta{setup} argument deals with the way the entry is defined +and may set attributes for the given abbreviation +category. This argument should redefine +\begin{definition}[\DescribeMacro\CustomAbbreviationFields] +\cs{CustomAbbreviationFields} +\end{definition} +to set the entry fields including the \gloskey{name} (defaults to +the short form if omitted), +\gloskey{sort}, \gloskey{first}, \gloskey{firstplural}. Other fields +may also be set, such as \gloskey{text}, \gloskey{plural} and +\gloskey{description}. + +\begin{important} +\cs{CustomAbbreviationFields} is expanded by \cs{newabbreviation} +so take care to protect commands that shouldn't be expanded. +\end{important} + +For example, the \abbrstyle{long-short} style has the following in +\meta{setup}: +\begin{verbatim} + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% +\end{verbatim} +Note that the \gloskey{first} and \gloskey{firstplural} are +set even though they're not used by \cs{gls}. + +The \meta{setup} argument may also redefine +\begin{definition}[\DescribeMacro\GlsXtrPostNewAbbreviation] +\cs{GlsXtrPostNewAbbreviation} +\end{definition} +which can be used to assign attributes. (This will automatically +be initialised to do nothing.) + +For example, the \abbrstyle{footnote} includes the following in +\meta{setup}: +\begin{verbatim} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +\end{verbatim} +This sets the \catattr{nohyperfirst} attribute to \qt{true}. +It also unsets the \catattr{regular} attribute if it has +previously been set. Note that the \catattr{nohyperfirst} +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 following token registers. + +Short value (defined by \sty{glossaries}): +\begin{definition}[\DescribeMacro\glsshorttok] +\cs{glsshorttok} +\end{definition} + +Short plural value (defined by \styfmt{glossaries-extra}): +\begin{definition}[\DescribeMacro\glsshortpltok] +\cs{glsshortpltok} +\end{definition} +(This may be the default value or, if provided, the value provided by the user +through the \gloskey{shortplural} key in the optional argument +of \ics{newabbreviation}.) + +Long value (defined by \sty{glossaries}): +\begin{definition}[\DescribeMacro\glslongtok] +\cs{glslongtok} +\end{definition} + +Long plural value (defined by \styfmt{glossaries-extra}): +\begin{definition}[\DescribeMacro\glslongpltok] +\cs{glslongpltok} +\end{definition} +(This may be the default value or, if provided, the value provided by the user +through the \gloskey{longplural} key in the optional argument +of \ics{newabbreviation}.) + +There are two other registers available that are defined by +\sty{glossaries}: + +\begin{definition}[\DescribeMacro\glslabeltok] +\cs{glslabeltok} +\end{definition} +which contains the entry's label and +\begin{definition}[\DescribeMacro\glskeylisttok] +\cs{glskeylisttok} +\end{definition} +which contains the values provided in the optional argument +of \ics{newabbreviation}. + +Remember put \cs{the} in front of the register command as in the +examples above. The category label can be access through +the command (not a register): +\begin{definition}[\DescribeMacro\glscategorylabel] +\cs{glscategorylabel} +\end{definition} +This may be used inside the definition of +\cs{GlsXtrPostNewAbbreviation}. + +If you want to base a style on an existing style, you can use +\begin{definition}[\DescribeMacro\GlsXtrUseAbbrStyleSetup] +\cs{GlsXtrUseAbbrStyleSetup}\marg{name} +\end{definition} +where \meta{name} is the name of the existing style. +For example, the \abbrstyle{footnote-sc} and \abbrstyle{footnote-sm} +styles both simply use +\begin{verbatim} +\GlsXtrUseAbbrStyleSetup{footnote} +\end{verbatim} +within \meta{setup}. + +The \meta{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 \gloskey{shortplural} key): +\begin{definition}[\DescribeMacro\abbrvpluralsuffix] +\cs{abbrvpluralsuffix} +\end{definition} +(Note that this isn't used for the plural long form, which +just uses the regular \cs{glspluralsuffix}.) + +The font used for the short form on \gls{firstuse} or in the full forms: +\begin{definition}[\DescribeMacro\glsfirstabbrvfont] +\cs{glsfirstabbrvfont}\marg{text} +\end{definition} + +The font used for the short form on subsequent use or through +commands like \ics{glsxtrshort}: +\begin{definition}[\DescribeMacro\glsabbrvfont] +\cs{glsabbrvfont}\marg{text} +\end{definition} + +The font used for the long form on \gls{firstuse} or in the full forms: +\begin{definition}[\DescribeMacro\glsfirstlongfont] +\cs{glsfirstlongfont}\marg{text} +\end{definition} + +Display full form singular no case-change (used by \ics{gls} on +\gls{firstuse} for abbreviations without the \catattr{regular} attribute +set): +\begin{definition}[\DescribeMacro\glsxtrfullformat] +\cs{glsxtrfullformat}\marg{label}\marg{insert} +\end{definition} + +Display full form singular first letter converted to upper case +(used by \ics{Gls} on \gls{firstuse} for abbreviations without the +\catattr{regular} attribute set): +\begin{definition}[\DescribeMacro\Glsxtrfullformat] +\cs{Glsxtrfullformat}\marg{label}\marg{insert} +\end{definition} + +Display full form plural no case-change +(used by \ics{glspl} on \gls{firstuse} for abbreviations without the +\catattr{regular} attribute set): +\begin{definition}[\DescribeMacro\glsxtrfullplformat] +\cs{glsxtrfullplformat}\marg{label}\marg{insert} +\end{definition} + +Display full form plural first letter converted to upper case +(used by \ics{Glspl} on \gls{firstuse} for abbreviations without the +\catattr{regular} attribute set): +\begin{definition}[\DescribeMacro\Glsxtrfullplformat] +\cs{Glsxtrfullplformat}\marg{label}\marg{insert} +\end{definition} + +In addition \meta{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 +\ics{glsentryfull}, \ics{glsxtrfull} and \ics{GLSxtrfull}): +\begin{definition}[\DescribeMacro\glsxtrinlinefullformat] +\cs{glsxtrinlinefullformat}\marg{label}\marg{insert} +\end{definition} + +Inline singular first letter converted to upper case (used by +\ics{Glsentryfull} and \ics{Glsxtrfull}): +\begin{definition}[\DescribeMacro\Glsxtrinlinefullformat] +\cs{Glsxtrinlinefullformat}\marg{label}\marg{insert} +\end{definition} + +Inline plural no case-change (used by +\ics{glsentryfullpl}, \ics{glsxtrfullpl} and \ics{GLSxtrfullpl}): +\begin{definition}[\DescribeMacro\glsxtrinlinefullplformat] +\cs{glsxtrinlinefullplformat}\marg{label}\marg{insert} +\end{definition} + +Inline plural first letter converted to upper case (used by +\ics{Glsentryfullpl} and \ics{Glsxtrfullpl}): +\begin{definition}[\DescribeMacro\Glsxtrinlinefullplformat] +\cs{Glsxtrinlinefullplformat}\marg{label}\marg{insert} +\end{definition} + +If you want to provide support for \sty{glossaries-accsupp} +use the following \cs{glsaccess\meta{xxx}} commands +(\sectionref{sec:accsupp}) within the definitions of +\cs{glsxtrfullformat} etc instead of the analogous +\cs{glsentry}\meta{xxx} commands. (If you don't use +\sty{glossaries-accsupp}, they will just do the corresponding +\cs{glsentry}\meta{xxx} command.) + +For example, the \abbrstyle{short-long} style has the following in +\meta{fmts}: +\begin{verbatim} + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% +\end{verbatim} +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 +\begin{definition}[\DescribeMacro\GlsXtrUseAbbrStyleFmts] +\cs{GlsXtrUseAbbrStyleFmts}\marg{name} +\end{definition} +within \meta{fmts}, where \meta{name} is the name of the existing +style. For example, the \abbrstyle{short-sc-long} style has the +following in \meta{fmts}: +\begin{verbatim} + \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsxtrscfont{##1}}% +\end{verbatim} +and the \abbrstyle{short-sm-long} style has: +\begin{verbatim} + \GlsXtrUseAbbrStyleFmts{short-long-desc}% + \renewcommand*{\glsabbrvfont}[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +\end{verbatim} + +The simplest examples of creating a new style based on an +existing style are the \qt{em} styles, such as the +\abbrstyle{short-em-long} style, which is defined as: +\begin{verbatim} +\newabbreviationstyle +{short-em-long}% label +{% setup + \GlsXtrUseAbbrStyleSetup{short-long}% +}% +{% fmts + \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*{\glsabbrvfont}[1]{\emph{##1}}% +} +\end{verbatim} + +\chapter{Entries in Sectioning Titles, Headers and Contents} +\label{sec:headtitle} + +The \sty{glossaries} user manual cautions against using commands +like \cs{gls} in chapter or section titles. The principle problems +are: +\begin{itemize} +\item if you have a table of contents, the \gls{firstuseflag} +will be unset in the contents rather than later in the document; +\item if you have the location lists displayed in the glossary, +unwanted locations will be added to it corresponding to the table of +contents (if present) and every page that contains the entry in the +page header (if the page style in use adds the chapter or section +title to the header); +\item if the page style in use adds the chapter or section title to +the header and attempts to convert it to upper case, the entry label +(in the argument of \cs{gls} etc) will be converted to upper case +and the entry won't be recognised; +\item if you use \sty{hyperref}, commands like \cs{gls} can't be +expanded to a simple string and only the label will appear in the +PDF bookmark (with a warning from \sty{hyperref}); +\item if you use \sty{hyperref}, you will end up with nested hyperlinks +in the table of contents. +\end{itemize} + +To get around all these problems, the \sty{glossaries} user manual +recommends using the expandable non-hyperlink commands, like +\ics{glsentrytext} (for regular entries) or \ics{glsentryshort} +(for abbreviations). This is the simplest solution, but doesn't +allow for special formatting that's applied to the entry through +commands like \cs{glstext} or \cs{glsxtrshort}. This means that if, +for example, you are using one of the abbreviation styles that uses +\ics{textsc} then the short form displayed with \cs{glsentryshort} won't use small +caps. If you only have one abbreviation style in use, you can +explicitly enclose \cs{glsentryshort}\marg{label} in the argument of +\cs{glsabbrvfont}, like this: +\begin{verbatim} +\chapter{A Chapter about \glsabbrvfont{\glsentryshort{html}}} +\end{verbatim} +Or, if you are using \sty{hyperref}: +\begin{verbatim} +\chapter{A Chapter about +\texorpdfstring{\glsabbrvfont{\glsentryshort{html}}}{\glsentryshort{html}}} +\end{verbatim} + +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 \cs{gls} and \cs{glsxtrshort} redefine +\cs{glsabbrvfont} to match the entry's style before displaying it. +In this case, the above example doesn't take into account the +shifting definitions of \cs{glsabbrvfont} and will use whatever +happens to be the last abbreviation style in use. More complicated +solutions interfere with the upper casing used by the standard +page styles that display the chapter or section title in the page +header using \ics{MakeUppercase}. + +The \styfmt{glossaries-extra} package tries to resolve this by +modifying \ics{markright} and \ics{markboth}. If you don't like this +change, you can restore their former definitions using +\begin{definition}[\DescribeMacro\glsxtrRevertMarks] +\cs{glsxtrRevertMarks} +\end{definition} +In this case, you'll have to use the \sty{glossaries} manual's +recommendations of either simply using \cs{glsentryshort} (as above) +or use the sectioning command's option argument to provide an +alternative for the table of contents and page header. For example: +\begin{verbatim} +\chapter[A Chapter about \glsentryshort{html}]{A Chapter about +\gls{html}} +\end{verbatim} + +If you don't revert the mark commands back with +\cs{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 \ics{texorpdfstring} if +\sty{hyperref} 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 +\cs{glsxtrshort} (or equivalent) with the options +\gloskey[glslink]{noindex} and \gloskey[glslink]{hyper=false}. +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 \catattr{headuc} attribute to \qt{true} +for the appropriate category. + +\begin{important} +If you use one of the \ics{textsc} 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 heading style uses +italic, the abbreviation may appear in upright small-caps, +\emph{even if you have set the \catattr{headuc} attribute} since +the all-capitals form still uses \cs{glsabbrvfont}. +You may want to consider using the \sty{slantsc} package in this +case. +\end{important} + +Display the short form: +\begin{definition}[\DescribeMacro\glsfmtshort] +\cs{glsfmtshort}\marg{label} +\end{definition} + +Display the plural short form: +\begin{definition}[\DescribeMacro\glsfmtshortpl] +\cs{glsfmtshortpl}\marg{label} +\end{definition} + +First letter upper case singular short form: +\begin{definition}[\DescribeMacro\Glsfmtshort] +\cs{Glsfmtshort}\marg{label} +\end{definition} +(No case-change applied to PDF bookmarks.) + +First letter upper case plural short form: +\begin{definition}[\DescribeMacro\Glsfmtshortpl] +\cs{Glsfmtshortpl}\marg{label} +\end{definition} +(No case-change applied to PDF bookmarks.) + +There are also equivalent commands for the value of the +\gloskey{text} field: +\begin{definition}[\DescribeMacro\glsfmttext] +\cs{glsfmttext}\marg{label} +\end{definition} + +First letter converted to upper case: +\begin{definition}[\DescribeMacro\Glsfmttext] +\cs{Glsfmttext}\marg{label} +\end{definition} +(No case-change applied to PDF bookmarks.) + +The plural equivalents: +\begin{definition}[\DescribeMacro\glsfmtplural] +\cs{glsfmtplural}\marg{label} +\end{definition} +and +\begin{definition}[\DescribeMacro\Glsfmtplural] +\cs{Glsfmtplural}\marg{label} +\end{definition} + +Similarly for the value of the +\gloskey{first} field: +\begin{definition}[\DescribeMacro\glsfmtfirst] +\cs{glsfmtfirst}\marg{label} +\end{definition} + +First letter converted to upper case: +\begin{definition}[\DescribeMacro\Glsfmtfirst] +\cs{Glsfmtfirst}\marg{label} +\end{definition} +(No case-change applied to PDF bookmarks.) + +The plural equivalents: +\begin{definition}[\DescribeMacro\glsfmtfirstpl] +\cs{glsfmtfirstpl}\marg{label} +\end{definition} +and +\begin{definition}[\DescribeMacro\Glsfmtfirstpl] +\cs{Glsfmtfirstpl}\marg{label} +\end{definition} + +\chapter{Categories} +\label{sec:categories} + +Each entry defined by \cs{newglossaryentry} (or commands that +internally use \cs{newglossaryentry} such as \cs{newabbreviation}) +is assigned a category +through the \gloskey{category} 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 \sty{babel} shorthands on +that make some characters active.) + +The use of categories can give you more control over the way entries +are displayed in the text or glossary. + +The default category assumed by +\cs{newglossaryentry} is labelled \category{general}. Abbreviations +defined with \cs{newabbreviation} have the category set to +\category{abbreviation} by default. Abbreviations defined with +\cs{newacronym} have the category set to \category{acronym} by +default. + +Additionally, if you have enabled \ics{newterm} with the +\pkgopt{index} package option that command +will set the category to \category{index} by default. If you have +enabled \ics{glsxtrnewsymbol} with the \pkgopt{symbols} package +option, that command will set the category to \category{symbol}. If you have +enabled \ics{glsxtrnewnumber} with the \pkgopt{numbers} package +option, that command will set the category to \category{number}. + +You can obtain the category label for a given entry using +\begin{definition}[\DescribeMacro\glscategory] +\cs{glscategory}\marg{label} +\end{definition} +This is equivalent to commands like \cs{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 +\begin{definition}[\DescribeMacro\glsifcategory] +\cs{glsifcategory}\marg{entry-label}\marg{category-label}\marg{true +part}\marg{false part} +\end{definition} +This is equivalent to +\begin{alltt} +\ics{ifglsfieldeq}\marg{entry-label}\{category\}\marg{category-label}\marg{true +part}\marg{false part} +\end{alltt} +so any restrictions that apply to \cs{ifglsfieldeq} also apply to +\cs{glsifcategory}. + +Each category may have a set of attributes. For example, the +\category{general} and \category{acronym} categories have the +attribute \catattr{regular} set to \qt{true} to indicate that all +entries with either of those categories are regular entries (as +opposed to abbreviations). This attribute is accessed by +\cs{glsentryfmt} to determine whether to use \cs{glsgenentryfmt} or +\cs{glsxtrgenabbrvfmt}. + +Other attributes recognised by \styfmt{glossaries-extra} are: + +\begin{description} + +\item[\catattr{nohyperfirst}] When using commands like \ics{gls} +this will automatically suppress the hyperlink on \gls{firstuse} for entries with a +category that has this attribute set to \qt{true}. +(This settings can be overridden by explicitly setting +the \gloskey[glslink]{hyper} key on or off in the optional argument of +commands like \cs{gls}.) + +\item[\catattr{nohyper}] When using commands like \ics{gls} +this will automatically suppress the hyperlink for entries with a +category that has this attribute set to \qt{true}. +(This settings can be overridden by explicitly setting +the \gloskey[glslink]{hyper} key on or off in the optional argument of +commands like \cs{gls}.) + +\item[\catattr{indexonlyfirst}] This is similar to the +\pkgopt{indexonlyfirst} package option but only for entries +that have a category with this attribute set to \qt{true}. + +\item[\catattr{discardperiod}] If set to \qt{true}, the +post-\gls{linktext} hook will +discard a~full stop (period) that follows \emph{non-plural} commands like \cs{gls} or +\cs{glstext}. (Provided for entries such as abbreviations that end with a full stop.) + +\item[\catattr{pluraldiscardperiod}] If this attribute is set to +\qt{true} \emph{and} the \catattr{discardperiod} attribute is set to +\qt{true}, this will behave as above for the plural commands like +\cs{glspl} or \cs{glsplural}. + +\item[\catattr{insertdots}] If this attribute is set to \qt{true} +any entry defined using \ics{newabbreviation} 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 \meta{short} argument of \cs{newabbreviation} (rather than +inserting them every time the entry is used). The short plural +form defaults to the new dotted version of the original \meta{short} +form with the plural suffix appended. + +\begin{important} +If you explicitly override +the short plural using the \gloskey{shortplural} 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). +\end{important} + +This attribute is best used with the \catattr{discardperiod} +attribute set to \qt{true}. + +\item[\catattr{aposplural}] If this attribute is set to \qt{true}, +\ics{newabbreviation} will insert an apostrophe (') before +the plural suffix for the \emph{short} plural form (unless explicitly +overridden with the \gloskey{shortplural} key). The long plural form +is unaffected by this setting. + +\item[\catattr{noshortplural}] If this attribute is set to +\qt{true}, \ics{newabbreviation} won't append the plural suffix for +the short plural form. This means the \gloskey{short} and +\gloskey{shortplural} values will be the same unless explicitly +overridden. \emph{The \catattr{aposplural} attribute trumps +the \catattr{noshortplural} attribute.} + +\item[\catattr{headuc}] If this attribute is set to \qt{true}, +commands like \ics{glsfmtshort} will use the upper case version +in the page headers. + +\item[\catattr{tagging}] If this attribute is set to \qt{true}, +the tagging command defined by \ics{GlsXtrEnableInitialTagging} +will be activated to use \ics{glsxtrtagfont} in the glossary +(see \sectionref{sec:tagging}). + +\item[\catattr{entrycount}] Unlike the above attributes, +this attribute isn't boolean but instead must be an integer +value and is used in combination with \ics{glsenableentrycount} +(see \sectionref{sec:entrycountmods}). Leave blank or undefined +for categories that shouldn't have this facility enabled. The +value of this attribute is used by \ics{glsxtrifcounttrigger} +to determine how commands such as \ics{cgls} should behave. + +With \sty{glossaries}, commands like \cs{cgls} use \cs{cglsformat} +only if the previous usage count for that entry was equal to~1. +With \styfmt{glossaries-extra} the test is now for entries that +have the \catattr{entrycount} attribute set and +where the previous usage count for that entry is less than or +equal to the value of that attribute. + +\item[\catattr{glossdesc}] The \ics{glossentrydesc} command +(used in the predefined glossary styles) is modified by +\styfmt{glossaries-extra} to check for this attribute. +If the attribute is set to \qt{firstuc}, the first letter +of the description will be converted to upper case (using +\ics{Glsentrydesc}). If the attribute is set to \qt{title}, +the title casing command \ics{capitalisewords} (provided +by \sty{mfirstuc}) is used on the name. Any other values of +this attribute are ignored. + +\item[\catattr{glossname}] As \catattr{glossdesc} but applies +to \ics{glossentryname}. Additionally, if this attribute is +set to \qt{uc} the name is converted to all capitals. + +\item[\catattr{indexname}] If set, the \cs{glsxtrpostnamehook} hook +used at the end of \ics{glossentyname} +will index the entry using \ics{index}. See +\sectionref{sec:autoindex} for further details. + +\item[\catattr{dualindex}] If set, whenever a glossary entry +has information written to the external glossary file +through commands like \ics{gls} and \ics{glsadd}, a~corresponding +line will be written to the indexing file using \ics{index}. See +\sectionref{sec:autoindex} for further details. + +\end{description} + +An attribute can be set using: +\begin{definition}[\DescribeMacro\glssetcategoryattribute] +\cs{glssetcategoryattribute}\marg{category-label}\marg{attribute-label}\marg{value} +\end{definition} +where \meta{category-label} is the category label, +\meta{attribute-label} is the attribute label and \meta{value} is +the new value for the attribute. + +There is a shortcut version to set the \catattr{regular} attribute +to \qt{true}: +\begin{definition}[\DescribeMacro\glssetregularcategory] +\cs{glssetregularcategory}\marg{category-label} +\end{definition} + +If you need to lookup the category label for a particular entry, you +can use the shortcut command: +\begin{definition}[\DescribeMacro\glssetattribute] +\cs{glssetattribute}\marg{entry-label}\marg{attribute-label}\marg{value} +\end{definition} +This uses \cs{glssetcategoryattribute} with \cs{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: +\begin{definition}[\DescribeMacro\glsgetcategoryattribute] +\cs{glsgetcategoryattribute}\marg{category-label}\marg{attribute-label} +\end{definition} +Again there is a shortcut if you need to lookup the category label +for a given entry: +\begin{definition}[\DescribeMacro\glsgetattribute] +\cs{glsgetattribute}\marg{entry-label}\marg{attribute-label} +\end{definition} + +You can test if an attribute has been assigned to a given +category using: +\begin{definition}[\DescribeMacro\glshascategoryattribute] +\cs{glshascategoryattribute}\marg{category-label}\marg{attribute-label}\marg{true +code}\marg{false code} +\end{definition} +This uses \sty{etoolbox}'s +\cs{ifcsvoid} and does \meta{true code} if the attribute has been +set and isn't blank and isn't \cs{relax}. The shortcut if you need +to lookup the category label from an entry is: +\begin{definition}[\DescribeMacro\glshasattribute] +\cs{glshasattribute}\marg{entry-label}\marg{attribute-label}\marg{true +code}\marg{false code} +\end{definition} + +You can test the value of an attribute for a particular category +using: +\begin{definition}[\DescribeMacro\glsifcategoryattribute] +\cs{glsifcategoryattribute}\marg{category-label}\marg{attribute-label}\marg{value} \marg{true-part}\marg{false-part} +\end{definition} +This tests if the attribute (given by \meta{attribute-label}) for +the category (given by \meta{category-label}) is set and equal to +\meta{value}. If true, \meta{true-part} is done. If the attribute +isn't set or is set but isn't equal to \meta{value}, \meta{false +part} is done. + +For example: +\begin{verbatim} +\glsifcategoryattribute{general}{nohyper}{true}{NO HYPER}{HYPER} +\end{verbatim} +This does \qt{NO HYPER} if the \category{general} category has the +\catattr{nohyper} attribute set to \texttt{true} otherwise if +does \qt{HYPER}. + +With boolean-style attributes like \catattr{nohyper}, make sure you +always test for \texttt{true} not \texttt{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 entry: +\begin{definition}[\DescribeMacro\glsifattribute] +\cs{glsifattribute}\marg{entry-label}\marg{attribute-label}\marg{value}\marg{true-part} \marg{false-part} +\end{definition} + +There's also a shortcut to determine if a particular category has +the \catattr{regular} attribute set: +\begin{definition}[\DescribeMacro\glsifregularcategory] +\cs{glsifregularcategory}\marg{category-label}\marg{true-part}\marg{false-part} +\end{definition} +Alternatively, if you need to lookup the category for a particular +entry: +\begin{definition}[\DescribeMacro\glsifregular] +\cs{glsifregular}\marg{entry-label}\marg{true-part}\marg{false-part} +\end{definition} + +You can iterate through all entries with a given category using: +\begin{definition} +\cs{glsforeachincategory}\oarg{glossary-labels}\marg{category-label} \marg{glossary-cs}\marg{label-cs}\marg{body} +\end{definition} +This iterates through all entries in the glossaries identified by +the comma-separated list \meta{glossary-labels} that have the +category given by \meta{category-label} and performs \meta{body} for +each match. Within \meta{body}, you can use \meta{glossary-cs} and +\meta{label-cs} +(which much be control sequences) to access the current glossary and +entry label. If \meta{glossary-labels} is omitted, all glossaries +are assumed. + +Similarly, you can iterate through all entries that have a category +with a given attribute using: +\begin{definition}[\DescribeMacro\glsforeachwithattribute] +\cs{glsforeachwithattribute}\oarg{glossary-labels}\marg{attribute-label} \marg{attribute-value}\marg{glossary-cs}\marg{label-cs}\marg{body} +\end{definition} +This will do \meta{body} for each entry that has a category with the +attribute \meta{attribute-label} set to \meta{attribute-value}. +The remaining arguments are as the previous command. + +You can change the category for a particular entry using the +standard glossary field changing commands, such as +\ics{glsfielddef}. Alternatively, you can use +\begin{definition}[\DescribeMacro\glsxtrsetcategory] +\cs{glsxtrsetcategory}\marg{entry-labels}\marg{category-label} +\end{definition} +This will change the category to \meta{category-label} for each +entry listed in the comma-separated list \meta{entry-labels}. This +command uses \ics{glsfieldxdef} so it will expand +\meta{category-label} and make the change global. + +You can also change the category for all entries with a glossary or +glossaries using: +\begin{definition}[\DescribeMacro\glsxtrsetcategoryforall] +\cs{glsxtrsetcategoryforall}\marg{glossary-labels}\marg{category-label} +\end{definition} +where \meta{glossary-labels} is a comma-separated list of glossary +labels. + +\chapter{Entry Counting} +\label{sec:entrycount} + +As mentioned in \sectionref{sec:entrycountmods}, +\styfmt{glossaries-extra} modifies the \ics{glsenableentrycount} command to allow +for the \catattr{entrycount} attribute. This means that +you not only need to enable entry counting with +\ics{glsenableentrycount}, but you also need +to set the appropriate attribute (see \sectionref{sec:categories}). + +You may now use \ics{cgls} instead of \ics{gls} even if +you haven't enabled entry counting. You will only get a warning +if you use \cs{glsenableentrycount} without setting the +\catattr{entrycount} attribute. +(With \sty{glossaries}, commands like \ics{cgls} will generate +a warning if \cs{glsenableentrycount} hasn't been used.) +The abbreviation shortcut \ics{ab} uses \cs{cgls} +(see \sectionref{sec:abbrshortcuts}) unlike the acronym shortcut +\ics{ac} which uses \cs{gls}. + +All upper case versions (not provided by \sty{glossaries}) are +also available: +\begin{definition}[\DescribeMacro\cGLS] +\cs{cGLS}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +and +\begin{definition}[\DescribeMacro\cGLSpl] +\cs{cGLSpl}\oarg{options}\marg{label}\oarg{insert} +\end{definition} +These are analogous to \cs{cgls} and \cs{cglspl} but they +use +\begin{definition}[\DescribeMacro\cGLSformat] +\cs{cGLSformat}\marg{label}\marg{insert} +\end{definition} +and +\begin{definition}[\DescribeMacro\cGLSplformat] +\cs{cGLSplformat}\marg{label}\marg{insert} +\end{definition} +which convert the analogous \cs{cglsformat} and +\cs{cglsplformat} to upper case. + +[TODO: work out what to do about other commands such +as \verb|\glsdisp| and \verb|\glstext|.] + +Just using \sty{glossaries}: +\begin{verbatim} +\documentclass{article} + +\usepackage{glossaries} + +\makeglossaries + +\glsenableentrycount + +\newacronym{html}{HTML}{hypertext markup language} +\newacronym{xml}{XML}{extensible markup language} + +\begin{document} + +Used once: \cgls{html}. + +Used twice: \cgls{xml} and \cgls{xml}. + +\printglossaries + +\end{document} +\end{verbatim} + +If you switch to \styfmt{glossaries-extra} you must set the +\catattr{entrycount} attribute: +\begin{verbatim} +\documentclass{article} + +\usepackage{glossaries-extra} + +\makeglossaries + +\glsenableentrycount + +\glssetcategoryattribute{abbreviation}{entrycount}{1} + +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{xml}{XML}{extensible markup language} + +\begin{document} + +Used once: \cgls{html}. + +Used twice: \cgls{xml} and \cgls{xml}. + +\printglossaries + +\end{document} +\end{verbatim} + +When activated with \cs{glsenableentrycount}, commands such as +\ics{cgls} now use +\begin{definition}[\DescribeMacro\glsxtrifcounttrigger] +\cs{glsxtrifcounttrigger}\marg{label}\marg{trigger code}\marg{normal +code} +\end{definition} +to determine if the entry trips the entry count trigger. +The \meta{trigger code} uses commands like \cs{cglsformat} and +unsets the \gls{firstuseflag}. The \meta{normal code} is the code that +would ordinarily be performed by whatever the equivalent +command is (for example, \cs{cgls} will use \cs{cglsformat} in +\meta{trigger code} but the usual \cs{gls} behaviour in \meta{normal +code}). + +The default definition is: +\begin{verbatim} +\newcommand*{\glsxtrifcounttrigger}[3]{% + \glshasattribute{#1}{entrycount}% + {% + \ifnum\glsentryprevcount{#1}>\glsgetattribute{#1}{entrycount}\relax + #3% + \else + #2% + \fi + }% + {#3}% +} +\end{verbatim} +This means that if an entry is assigned to a category that has +the \catattr{entrycount} attribute then the \meta{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 four: +\begin{verbatim} +\glssetcategoryattribute{abbreviation}{entrycount}{4} +\end{verbatim} + +There is a convenient command provided to enable entry counting, +set the \catattr{entrycount} attribute and redefine \ics{gls}, +etc to use \ics{cgls} etc: +\begin{definition}[\DescribeMacro\GlsXtrEnableEntryCounting] +\cs{GlsXtrEnableEntryCounting}\marg{categories}\marg{value} +\end{definition} +The first argument \meta{categories} is a comma-separated list +of categories. For each category, the \catattr{entrycount} +attribute is set to \meta{value}. In addition, this does: +\begin{verbatim} +\renewcommand*{\gls}{\cgls}% +\renewcommand*{\Gls}{\cGls}% +\renewcommand*{\glspl}{\cglspl}% +\renewcommand*{\Glspl}{\cGlspl}% +\renewcommand*{\GLS}{\cGLS}% +\renewcommand*{\GLSpl}{\cGLSpl}% +\end{verbatim} +This makes it easier to enable entry-counting on existing +documents. + +If you use \cs{GlsXtrEnableEntryCounting} more than once, subsequent uses will +just set the \catattr{entrycount} attribute for each listed +category. + +The above example document can then become: +\begin{verbatim} +\documentclass{article} + +\usepackage{glossaries-extra} + +\makeglossaries + +\GlsXtrEnableEntryCounting{abbreviation}{1} + +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{xml}{XML}{extensible markup language} + +\begin{document} + +Used once: \gls{html}. + +Used twice: \gls{xml} and \gls{xml}. + +\printglossaries + +\end{document} +\end{verbatim} + +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 +\begin{definition}[\DescribeMacro\GlsXtrEnableEntryUnitCounting] +\cs{GlsXtrEnableEntryUnitCounting}\marg{categories}\marg{value}\marg{counter-name} +\end{definition} +where \meta{categories} is a comma-separated list of categories +to which this feature should be applied, \meta{value} is the +trigger value and \meta{counter-name} is the name of the counter +used by the sectional unit. + +\begin{important} +Due to the asynchronous nature of \TeX's output routine, +discrepancies will occur in page spanning paragraphs if you +use the \ctr{page} counter. +\end{important} + +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 \cs{the}\meta{counter-name} needs to be expandable. +Since \sty{hyperref} also has a similar requirement and provides +\cs{theH}\meta{counter-name} as an expandable alternative, +\styfmt{glossaries-extra} will use \cs{theH}\meta{counter-name} +if it exists otherwise it will use \cs{the}\meta{counter-name}. + +The per-unit counting function uses two attributes: \catattr{entrycount} +(as before) and \catattr{unitcount} (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: +\begin{definition}[\DescribeMacro\glsentrycurrcount] +\cs{glsentrycurrcount}\marg{label} +\end{definition} +and the final value from the previous run: +\begin{definition}[\DescribeMacro\glsentryprevcount] +\cs{glsentryprevcount}\marg{label} +\end{definition} +In the case of the per-unit counting, this is the final value +\emph{for the current unit}. In both commands \meta{label} +is the entry's label. + +The per-unit counting mechanism additionally provides: +\begin{definition}[\DescribeMacro\glsentryprevtotalcount] +\cs{glsentryprevtotalcount}\marg{label} +\end{definition} +which gives the sum of all the per-unit totals from the previous run +for the entry given by \meta{label}, and +\begin{definition}[\DescribeMacro\glsentryprevmaxcount] +\cs{glsentryprevmaxcount}\marg{label} +\end{definition} +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: +\begin{verbatim} +\documentclass{report} +\usepackage{glossaries-extra} + +\GlsXtrEnableEntryUnitCounting{abbreviation}{2}{chapter} + +\makeglossaries + +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{css}{CSS}{cascading style sheet} + +\newglossaryentry{sample}{name={sample},description={sample}} + +\begin{document} +\chapter{Sample} + +Used once: \gls{html}. + +Used three times: \gls{css} and \gls{css} and \gls{css}. + +Used once: \gls{sample}. + +\chapter{Another Sample} + +Used once: \gls{css}. + +Used twice: \gls{html} and \gls{html}. + +\printglossaries +\end{document} +\end{verbatim} +In this document, the \texttt{css} entry is used three times in the +first chapter. This is more than the trigger value of 2, so +\verb|\gls{css}| is expanded on \gls{firstuse} with the short +form used on subsequent use, and the \texttt{css} entries in +that chapter are added to the glossary. In the second chapter, +the \texttt{css} entry is only used once, which trips the +suppression trigger, so in that chapter, the long form +is used and \verb|\gls{css}| doesn't get a line added to +the glossary file. + +The \texttt{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 \texttt{sample} entry has only been used once, but it doesn't +trip the indexing suppression because it's in the \category{general} +category, which hasn't been listed in +\cs{GlsXtrEnableEntryUnitCounting}. + +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 \ics{gls} by modifying the +hook +\begin{definition}[\DescribeMacro\glslinkcheckfirsthyperhook] +\cs{glslinkcheckfirsthyperhook} +\end{definition} +which is used at the end of the macro the determines whether +or not to suppress the hyperlink. + +\begin{verbatim} +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\GlsXtrEnableEntryUnitCounting{general}{0}{page} + +\newglossaryentry{sample}{name={sample},description={an example}} + +\renewcommand*{\glslinkcheckfirsthyperhook}{% + \ifnum\glsentrycurrcount\glslabel>0 + \setkeys{glslink}{hyper=false}% + \fi +} + +\begin{document} + +A \gls{sample} entry. +Next use: \gls{sample}. + +\newpage + +Next page: \gls{sample}. +Again: \gls{sample}. + +\printglossaries + +\end{document} +\end{verbatim} +This only produces a hyperlink for the first instance of +\verb|\gls{sample}| on each page. + +The earlier warning about using the \ctr{page} counter still +applies. If the first instance of \cs{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. + +\chapter{Auto-Indexing} +\label{sec:autoindex} + +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: \catattr{indexname} +and \catattr{dualindex}. + +The \ics{glsxtrpostnamehook} macro, used +at the end of \ics{glossentryname} and \ics{Glossentryname}, +checks the \catattr{indexname} attribute for the category +associated with that entry. +Since \cs{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 \gloskey{name} key. + +The internal macro used by the \sty{glossaries} package to +write the information to the external glossary file is +modified to check for the \catattr{dualindex} attribute. + +In both cases, the indexing is done through +\begin{definition}[\DescribeMacro\glsxtrdoautoindexname] +\cs{glsxtrdoautoindexname}\marg{label}\marg{attribute-label} +\end{definition} +This uses the standard \ics{index} command with the sort value +taken from the entry's \gloskey{sort} key and the actual value +set to \cs{glsentryname}\marg{label}. If the value of the +attribute given by \meta{attribute-label} is \qt{true}, no encap +will be added, otherwise the encap will be the +attribute value. For example: +\begin{verbatim} +\glssetcategoryattribute{general}{indexname}{textbf} +\end{verbatim} +will set the encap to \texttt{textbf} which will display the +relevant page number in bold whereas +\begin{verbatim} +\glssetcategoryattribute{general}{dualindex}{true} +\end{verbatim} +won't apply any formatting to the page number in the index. + +\begin{important} +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 \cs{index} to use +some thing else.) +\end{important} + +By default the \gloskey[glslink]{format} key won't be used with +the \catattr{dualindex} attribute. You can allow the +\gloskey[glslink]{format} key to override the attribute value +by using the preamble-only command: +\begin{definition}[\DescribeMacro\GlsXtrEnableIndexFormatOverride] +\cs{GlsXtrEnableIndexFormatOverride} +\end{definition} +If you use this command and \sty{hyperref} has been loaded, +then the \env{theindex} environment will be modified to redefine +\ics{glshypernumber} to allow formats that use that command. + +\begin{important} +The \catattr{dualindex} attribute will still be used on +subsequent use even if the \catattr{indexonlyfirst} attribute +(or \pkgopt{indexonlyfirst} package option) is set. However, +the \catattr{dualindex} attribute will honour the +\gloskey[glslink]{noindex} key. +\end{important} + +The \cs{glsxtrdoautoindexname} command will attempt to escape any of +\ics{makeindex}'s special characters, but there may be special cases +where it fails, so take care. This assumes the default \gls{makeindex} actual, +level, quote and encap values (unless any of the commands +\ics{actualchar}, \ics{levelchar}, \ics{quotechar} or +\ics{encapchar} have been defined before \styfmt{glossaries-extra} +is loaded). + +If this isn't the case, you can use the following preamble-only +commands to set the correct characters. +\begin{important} +Be very careful of possible shifting category codes! +\end{important} + +\begin{definition}[\DescribeMacro\GlsXtrSetActualChar] +\cs{GlsXtrSetActualChar}\marg{char} +\end{definition} +Set the actual character to \meta{char}. + +\begin{definition}[\DescribeMacro\GlsXtrSetLevelChar] +\cs{GlsXtrSetLevelChar}\marg{char} +\end{definition} +Set the level character to \meta{char}. + +\begin{definition}[\DescribeMacro\GlsXtrSetEscChar] +\cs{GlsXtrSetEscChar}\marg{char} +\end{definition} +Set the escape (quote) character to \meta{char}. + +\begin{definition}[\DescribeMacro\GlsXtrSetEncapChar] +\cs{GlsXtrSetEncapChar}\marg{char} +\end{definition} +Set the encap character to \meta{char}. + +\chapter{On-the-Fly Document Definitions} +\label{sec:onthefly} + +\begin{important} +The commands described here may superficially look like +\meta{word}\cs{index}\marg{word}, but they behave rather +differently. If you want to use \cs{index} then just use +\cs{index}. +\end{important} + +The \sty{glossaries} package advises against defining entries +in the \env{document} environment. As mentioned in +\sectionref{sec:pkgopts} above, this ability is disabled by +default with \styfmt{glossaries-extra} but can be enabled using +the \pkgopt{docdefs} package options. + +Although this can be problematic, the \styfmt{glossaries-extra} +package provides a way of defining and using entries within +the \env{document} environment without the tricks used with the +\pkgopt{docdefs} option. \emph{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: +\begin{definition}[\DescribeMacro\GlsXtrEnableOnTheFly] +\cs{GlsXtrEnableOnTheFly} +\end{definition} +When used, this defines the commands described below. + +\begin{important} +The commands \cs{glsxtr}, \cs{glsxtrpl}, \cs{Glsxtr} +and \cs{Glsxtrpl} can't be used after the glossaries have been +displayed (through \ics{printglossary} etc). It's best not to mix +these commands with the standard glossary commands, such +as \cs{gls} or there may be unexpected results. +\end{important} + +\begin{definition}[\DescribeMacro\glsxtr] +\cs{glsxtr}\oarg{gls-options}\oarg{dfn-options}\marg{label} +\end{definition} +If an entry with the label \meta{label} has already been defined, +this just does \cs{gls}\oarg{gls-options}\marg{label}. If +\meta{label} hasn't been defined, this will define the entry +using: +\begin{alltt} +\cs{newglossaryentry}\marg{label}\{name=\marg{label}, + category=\cs{glsxtrcat}, + description=\{\cs{nopostdesc}\}, + \meta{dfn-options}\} +\end{alltt} + +\begin{important} +The \meta{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 +\meta{label} and placed in the \gloskey{name} key must be provided +in the optional argument \meta{dfn-options}. +\end{important} + +The second optional argument \meta{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 +\begin{definition}[\DescribeMacro\GlsXtrWarning] +\cs{GlsXtrWarning}\marg{dfn-options}\marg{label} +\end{definition} + +For example, this warning will be generated on the second instance +of \cs{glsxtr} below: +\begin{verbatim} +\glsxtr[][plural=geese]{goose} +% ... later +\glsxtr[][plural=geese]{goose} +\end{verbatim} + +If you are considering doing something like: +\begin{verbatim} +\newcommand*{\goose}{\glsxtr[][plural=geese]{goose}} +\renewcommand*{\GlsXtrWarning}[2]{} +% ... later +\goose\ some more text here +\end{verbatim} +then don't bother. It's simpler and less problematic to just +define the entries in the preamble with \ics{newglossaryentry} +and then use \cs{gls} in the document. + +There are plural and case-changing alternatives to \cs{glsxtr}: +\begin{definition}[\DescribeMacro\glsxtrpl] +\cs{glsxtrpl}\oarg{gls-options}\oarg{dfn-options}\marg{label} +\end{definition} +This is like \cs{glsxtr} but uses \cs{glspl} instead of \cs{gls}. + +\begin{definition}[\DescribeMacro\Glsxtr] +\cs{Glsxtr}\oarg{gls-options}\oarg{dfn-options}\marg{label} +\end{definition} +This is like \cs{glsxtr} but uses \cs{Gls} instead of \cs{gls}. + +\begin{definition}[\DescribeMacro\Glsxtrpl] +\cs{Glsxtrpl}\oarg{gls-options}\oarg{dfn-options}\marg{label} +\end{definition} +This is like \cs{glsxtr} but uses \cs{Glspl} instead of \cs{gls}. + +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 +\XeLaTeX\ or \LuaLaTeX\ instead of \LaTeX\ (or \pdfLaTeX). +If you really desperately want to use UTF-8 entry labels without +switching to \XeLaTeX\ or \LuaLaTeX\ then there is a starred +version of \cs{GlsXtrEnableOnTheFly} that allows you to +use UTF-8 characters in \meta{label}, but it's experimental and +may not work in some cases. + +\begin{important} +If you use the starred version of \cs{GlsXtrEnableOnTheFly} +don't use any commands in the \meta{label}, even if they expand +to just text. +\end{important} + +\chapter{Supplemental Packages} +\label{sec:supplemental} + +The \sty{glossaries} bundle provides additional support packages +\sty{glossaries-prefix} (for prefixing) and \sty{glossaries-accsupp} +(for accessibility support). These packages aren't automatically +loaded. + +\section{Prefixes or Determiners} +\label{sec:prefix} + +If prefixing is required, you can simply load +\sty{glossaries-prefix} after \styfmt{glossaries-extra}. For example: +\begin{verbatim} +\documentclass{article} + +\usepackage{glossaries-extra} +\usepackage{glossaries-prefix} + +\makeglossaries + +\newabbreviation + [prefix={an\space}, + prefixfirst={a~}] + {svm}{SVM}{support vector machine} + +\begin{document} + +First use: \pgls{svm}. +Next use: \pgls{svm}. + +\printglossaries + +\end{document} +\end{verbatim} + +\section{Accessibility Support} +\label{sec:accsupp} + +The \sty{glossaries-accsupp} needs to be loaded before +\styfmt{glossaries-extra} or through the \pkgopt{accsupp} package +option: +\begin{verbatim} +\usepackage[accsupp]{glossaries-extra} +\end{verbatim} +If you don't load \sty{glossaries-accsupp} or you load +\sty{glossaries-accsupp} after \styfmt{glossaries-extra} +the new \cs{glsaccess}\meta{xxx} commands described below will +simply be equivalent to the corresponding \cs{glsentry}\meta{xxx} +commands. + +The following \cs{glsaccess}\meta{xxx} commands add accessibility information wrapped around +the corresponding \cs{glsentry}\meta{xxx} commands. There is +no check for existence of the entry nor do any of these commands +add formatting, hyperlinks or indexing information. + +\begin{definition}[\DescribeMacro\glsaccessname] +\cs{glsaccessname}\marg{label} +\end{definition} +This displays the value of the \gloskey{name} field for the entry +identified by \meta{label}. + +If the \sty{glossaries-accsupp} package isn't loaded, this is +simply defined as: +\begin{verbatim} +\newcommand*{\glsaccessname}[1]{\glsentryname{#1}} +\end{verbatim} +otherwise it's defined as: +\begin{verbatim} +\newcommand*{\glsaccessname}[1]{% + \glsnameaccessdisplay + {% + \glsentryname{#1}% + }% + {#1}% +} +\end{verbatim} +(\ics{glsnameaccessdisplay} is defined by the +\sty{glossaries-accsupp} package.) The first letter upper case +version is: +\begin{definition}[\DescribeMacro\Glsaccessname] +\cs{Glsaccessname}\marg{label} +\end{definition} +Without the \sty{glossaries-accsupp} package this is just defined +as: +\begin{verbatim} +\newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}} +\end{verbatim} +With the \sty{glossaries-accsupp} package this is defined as: +\begin{verbatim} +\newcommand*{\Glsaccessname}[1]{% + \glsnameaccessdisplay + {% + \Glsentryname{#1}% + }% + {#1}% +} +\end{verbatim} + +The following commands are all defined in an analogous manner. +\begin{definition}[\DescribeMacro\glsaccesstext] +\cs{glsaccesstext}\marg{label} +\end{definition} +This displays the value of the \gloskey{text} field. + +\begin{definition}[\DescribeMacro\Glsaccesstext] +\cs{Glsaccesstext}\marg{label} +\end{definition} +This displays the value of the \gloskey{text} field with the first +letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccessplural] +\cs{glsaccessplural}\marg{label} +\end{definition} +This displays the value of the \gloskey{plural} field. + +\begin{definition}[\DescribeMacro\Glsaccessplural] +\cs{Glsaccessplural}\marg{label} +\end{definition} +This displays the value of the \gloskey{plural} field +with the first letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccessfirst] +\cs{glsaccessfirst}\marg{label} +\end{definition} +This displays the value of the \gloskey{first} field. + +\begin{definition}[\DescribeMacro\Glsaccessfirst] +\cs{Glsaccessfirst}\marg{label} +\end{definition} +This displays the value of the \gloskey{first} field +with the first letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccessfirstplural] +\cs{glsaccessfirstplural}\marg{label} +\end{definition} +This displays the value of the \gloskey{firstplural} field. + +\begin{definition}[\DescribeMacro\Glsaccessfirstplural] +\cs{Glsaccessfirstplural}\marg{label} +\end{definition} +This displays the value of the \gloskey{firstplural} field +with the first letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccesssymbol] +\cs{glsaccesssymbol}\marg{label} +\end{definition} +This displays the value of the \gloskey{symbol} field. + +\begin{definition}[\DescribeMacro\Glsaccesssymbol] +\cs{Glsaccesssymbol}\marg{label} +\end{definition} +This displays the value of the \gloskey{symbol} field +with the first letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccesssymbolplural] +\cs{glsaccesssymbolplural}\marg{label} +\end{definition} +This displays the value of the \gloskey{symbolplural} field. + +\begin{definition}[\DescribeMacro\Glsaccesssymbolplural] +\cs{Glsaccesssymbolplural}\marg{label} +\end{definition} +This displays the value of the \gloskey{symbolplural} field +with the first letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccessdesc] +\cs{glsaccessdesc}\marg{label} +\end{definition} +This displays the value of the \gloskey{desc} field. + +\begin{definition}[\DescribeMacro\Glsaccessdesc] +\cs{Glsaccessdesc}\marg{label} +\end{definition} +This displays the value of the \gloskey{desc} field +with the first letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccessdescplural] +\cs{glsaccessdescplural}\marg{label} +\end{definition} +This displays the value of the \gloskey{descplural} field. + +\begin{definition}[\DescribeMacro\Glsaccessdescplural] +\cs{Glsaccessdescplural}\marg{label} +\end{definition} +This displays the value of the \gloskey{descplural} field +with the first letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccessshort] +\cs{glsaccessshort}\marg{label} +\end{definition} +This displays the value of the \gloskey{short} field. + +\begin{definition}[\DescribeMacro\Glsaccessshort] +\cs{Glsaccessshort}\marg{label} +\end{definition} +This displays the value of the \gloskey{short} field with the first +letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccessshortpl] +\cs{glsaccessshortpl}\marg{label} +\end{definition} +This displays the value of the \gloskey{shortplural} field. + +\begin{definition}[\DescribeMacro\Glsaccessshortpl] +\cs{Glsaccessshortpl}\marg{label} +\end{definition} +This displays the value of the \gloskey{shortplural} field with the first +letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccesslong] +\cs{glsaccesslong}\marg{label} +\end{definition} +This displays the value of the \gloskey{long} field. + +\begin{definition}[\DescribeMacro\Glsaccesslong] +\cs{Glsaccesslong}\marg{label} +\end{definition} +This displays the value of the \gloskey{long} field with the first +letter converted to upper case. + +\begin{definition}[\DescribeMacro\glsaccesslongpl] +\cs{glsaccesslongpl}\marg{label} +\end{definition} +This displays the value of the \gloskey{longplural} field. + +\begin{definition}[\DescribeMacro\Glsaccesslongpl] +\cs{Glsaccesslongpl}\marg{label} +\end{definition} +This displays the value of the \gloskey{longplural} field with the first +letter converted to upper case. + +\chapter{Sample Files} +\label{sec:samples} + +The following sample files are provided with this package: +\begin{description} +\item[sample.tex] Simple sample file that uses one of the dummy +files provided by the \sty{glossaries} package for testing. + +\item[sample-mixture.tex] General entries, acronyms and initialisms +all treated differently. + +\item[sample-abbrv.tex] General abbreviations. + +\item[sample-acronym.tex] Acronyms aren't initialisms and don't +expand on \gls{firstuse}. + +\item[sample-acronym-desc.tex] Acronyms that have a separate long +form and description. + +\item[sample-crossref.tex] Unused entries that have been +cross-referenced automatically are added at the end of the document. + +\item[sample-indexhook.tex] Use the index hook to track +which entries have been indexed (and therefore find out +which ones haven't been indexed). + +\item[sample-footnote.tex] Footnote abbreviation style that moves +the footnote marker outside of the hyperlink generated by \cs{gls} +and moves it after certain punctuation characters for neatness. + +\item[sample-undef.tex] Warn on undefined entries instead of +generating an error. + +\item[sample-mixed-abbrv-styles.tex] Different abbreviation styles +for different entries. + +\item[sample-initialisms.tex] Automatically insert dots into +initialisms. + +\item[sample-postdot.tex] Another initialisms example. + +\item[sample-postlink.tex] Automatically inserting text after +the \gls{linktext} produced by commands like \cs{gls} (outside +of hyperlink, if present). + +\item[sample-header.tex] Using entries in section/chapter headings. + +\item[sample-autoindex.tex] Using the \catattr{dualindex} and +\catattr{indexname} attributes to automatically add glossary +entries to the index (in addition to the glossary \gls{locationlist}). + +\item[sample-autoindex-hyp.tex] As previous but uses \sty{hyperref}. + +\item[sample-nested.tex] Using \ics{gls} within the +value of the \gloskey{name} key. + +\item[sample-entrycount.tex] Enable entry-use counting (only index +if used more than $n$ times). + +\item[sample-unitentrycount.tex] Enable use of per-unit entry-use counting. + +\item[sample-onelink.tex] Using the per-unit entry counting +to only have one hyperlink per entry per page. + +\item[sample-altmodifier.tex] Set the default options for +commands like \cs{gls} and add an alternative modifier. + +\item[sample-onthefly.tex] Using on-the-fly commands. Terms with +accents must have the \gloskey{name} key explicitly set. + +\item[sample-onthefly-xetex.tex] Using on-the-fly commands +with \XeLaTeX. Terms with UTF-8 characters don't need to +have the \gloskey{name} key explicitly set. Terms that contain +commands must have the \gloskey{name} key explicitly set +with the commands removed from the label. + +\item[sample-onthefly-utf8.tex] Tries to emulate the previous +sample file for use with \LaTeX\ through the starred version +of \ics{GlsXtrEnableOnTheFly}. This is a bit iffy and may not +always work. Terms that contain commands must have the +\gloskey{name} key explicitly set with the commands removed from +the label. + +\item[sample-accsupp.tex] Integrate \sty{glossaries-accsupp}. + +\item[sample-prefix.tex] Integrate \sty{glossaries-prefix}. + +\end{description} + +\chapter{Multi-Lingual Support} +\label{sec:lang} + +There's only one command provided by \styfmt{glossaries-extra} +that you're likely to want to change in your document and that's +\ics{abbreviationsname} (\sectionref{sec:pkgopts}) if you use +the \pkgopt{abbreviations} package option to automatically +create the glossary labelled \texttt{abbreviations}. If this +command doesn't already exist, it will be defined to +\qt{Abbreviations} if \sty{babel} hasn't been loaded, otherwise +it will be defined as \cs{acronymname} (provided by +\sty{glossaries}). + +You can redefine it in the usual way. For example: +\begin{verbatim} +\renewcommand*{\abbreviationsname}{List of Abbreviations} +\end{verbatim} +Or using \sty{babel} or \sty{polyglossia} captions hook: +\begin{verbatim} +\appto\captionsenglish{% + \renewcommand*{\abbreviationsname}{List of Abbreviations}% +} +\end{verbatim} + +Alternatively you can use the \gloskey[printglossary]{title} +key when you print the list of abbreviations. For example: +\begin{verbatim} +\printabbreviations[title={List of Abbreviations}] +\end{verbatim} +or +\begin{verbatim} +\printglossary[type=abbreviations,title={List of Abbreviations}] +\end{verbatim} + +The other fixed text commands are the diagnostic messages, which +shouldn't appear in the final draft of your document. + +The \styfmt{glossaries-extra} package has the facility to load +language modules if they exist, but won't warn if they don't. + +If you want to write your own language module, you just need to +create a file called +\texttt{glossariesxtr-}\meta{lang}\texttt{.ldf}, where \meta{lang} +is the language name (see the \sty{tracklang} package). For example, +\texttt{glossariesxtr-french.ldf}. + +The simplest code for this file is: +\begin{verbatim} +\ProvidesGlossariesExtraLang{french}[2015/12/09 v1.0] + +\newcommand*{\glossariesxtrcaptionsfrench}{% + \def\abbreviationsname{Abr\'eviations}% +} +\glossariesxtrcaptionsfrench + +\ifcsdef{captions\CurrentTrackedDialect} +{% + \csappto{captions\CurrentTrackedDialect}% + {% + \glossariesxtrcaptionsfrench + }% +}% +{% + \ifcsdef{captions\CurrentTrackedLanguage} + {% + \csappto{captions\CurrentTrackedLanguage}% + {% + \glossariesxtrcaptionsfrench + }% + }% + {% + }% + \glossariesxtrcaptionsfrench +} +\end{verbatim} + +You can adapt this for other languages by replacing +all instances of the language identifier \texttt{french} and +the translated text \verb|Abr\'eviations| as appropriate. +This \texttt{.ldf} file then needs to be put somewhere on \TeX's +path so that it can be found by \styfmt{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 when a glossary is missing, you need to redefine +the following commands: +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningHead] +\cs{GlsXtrNoGlsWarningHead}\marg{label}\marg{file} +\end{definition} +This produces the following text in English: +\begin{quote} +\GlsXtrNoGlsWarningHead{\meta{label}}{\meta{file}} +\end{quote} + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyStart] +\cs{GlsXtrNoGlsWarningEmptyStart} +\end{definition} +This produces the following text in English: +\begin{quote} +\GlsXtrNoGlsWarningEmptyStart +\end{quote} + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyMain] +\cs{GlsXtrNoGlsWarningEmptyMain} +\end{definition} +This produces the following text in English: +\begin{quote} +\GlsXtrNoGlsWarningEmptyMain +\end{quote} + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyNotMain] +\cs{GlsXtrNoGlsWarningEmptyNotMain}\marg{label} +\end{definition} +This produces the following text in English: +\begin{quote} +\GlsXtrNoGlsWarningEmptyNotMain{\meta{label}} +\end{quote} + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningCheckFile] +\cs{GlsXtrNoGlsWarningCheckFile}\marg{file} +\end{definition} +This produces the following text in English: +\begin{quote} +\GlsXtrNoGlsWarningCheckFile{\meta{file}} +\end{quote} + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningMisMatch] +\cs{GlsXtrNoGlsWarningMisMatch} +\end{definition} +This produces the following text in English: +\begin{quote} +\GlsXtrNoGlsWarningMisMatch +\end{quote} + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningNoOut] +\cs{GlsXtrNoGlsWarningNoOut}\marg{file} +\end{definition} +This produces the following text in English: +\begin{quote} +\GlsXtrNoGlsWarningNoOut{\meta{file}} +\end{quote} + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningTail] +\cs{GlsXtrNoGlsWarningTail} +\end{definition} +This produces the following text in English: +\begin{quote} +\GlsXtrNoGlsWarningTail +\end{quote} + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningBuildInfo] +\cs{GlsXtrNoGlsWarningBuildInfo} +\end{definition} +This is advice on how to generate the glossary files. +See the documented code (\texttt{glossaries-extra-code.pdf}) +for further details. + +\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningAutoMake] +\cs{GlsXtrNoGlsWarningAutoMake}\marg{label} +\end{definition} +This is the message produced when the \pkgopt{automake} 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. + +\printglossaries +\PrintIndex + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.pdf Binary files differnew file mode 100644 index 00000000000..c7670a86f51 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.tex new file mode 100644 index 00000000000..5d7f10c8c7c --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-abbrv.tex @@ -0,0 +1,27 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdflatex +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{xml}{XML}{extensible markup language} +\newabbreviation{svg}{SVG}{scalable vector graphics} + +\begin{document} +\tableofcontents + +\chapter{Sample} + +First use: \gls{html}, \gls{xml} and \gls{svg}. + +Next use: \gls{html}, \gls{xml} and \gls{svg}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.pdf Binary files differnew file mode 100644 index 00000000000..e5694a46241 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.tex new file mode 100644 index 00000000000..5ff870ab85f --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.tex @@ -0,0 +1,105 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[T1]{fontenc} +\usepackage{cmap} + +\usepackage[accsupp,% use glossaries-accsupp + %nonumberlist,% suppress location list in glossary + nopostdot=false% insert dot after description in glossary +]{glossaries-extra} + +\makeglossaries + +% Change the format of the location lists: +\renewcommand{\GlsXtrFormatLocationList}[1]{Page list: #1.} + +% Default uses "ActualText" instead of "E". Redefine if required. +% Support in PDF viewers is variable. +%\renewcommand*{\glsaccsupp}[2]{% +% \BeginAccSupp{E=#1}#2\EndAccSupp{}% +%} + +\newabbreviation + [% add accessibility information: + %shortaccess={specific learning difference},% short access + %access={specific learning difference},% name access + textaccess={specific learning difference},% text access + ] + {spld}{SpLD}{specific learning difference} + +% \ensuremath is required in the following as the +% accessibility support clashes with math-mode. + +% The firstaccess key defaults to the access key if omitted. +% This means that on first use if firstaccess hasn't been +% set but access has been set it will use the access text +% that's used for the name field in the glossary (not the +% value of the textaccess field). If this is inappropriate +% you need to explicitly add the firstaccess key. + +\newglossaryentry{R}{name={\ensuremath{\Re}}, + access={set of real numbers symbol},% name access + textaccess={set of real numbers},% text access + %firstaccess={set of real numbers},% first access + description={set of real numbers}} + +\newglossaryentry{in}{name={\ensuremath{\in}}, + access={is element of set symbol},% name access + textaccess={in},% text access + %firstaccess={in},% first access + description={is an element of}} + +\begin{document} +This is a sample document testing the accsupp option. +If your PDF viewer doesn't provide a text-to-speech facility +try copying the text on this page and pasting to a text file +to see the difference. + +\section{An Abbreviation} + +First use: \gls{spld}. +Next use: \gls{spld}. + +Access text: \glsentrytextaccess{spld}. + +Access short: \glsentryshortaccess{spld}. + +If the access field isn't set in the above, no replacement text +is used in the corresponding \verb|\glstext|, \verb|\glsaccesstext| etc commands. + +Text field: \glstext{spld} (\glsaccesstext{spld}). +Short field: \glsxtrshort{spld} (\glsaccessshort{spld}). + +\section{A Symbol} + +First use: \gls{R}. Next use: \gls{R}. +Text field: \glstext{R}. Name field: \glsname{R}. + +First use: \gls{in}. Next use: \gls{in}. +Text field: \glstext{in}. Name field: \glsname{in}. + +Now test in math-mode: +\[ +x \gls{in} \gls{R} +\] + +The ``firstaccess'' field is used on first use. If this hasn't +been set the ``access'' field is used instead. The ``textaccess'' +field is used on subsequent use. If this hasn't been set the +``access'' field is used instead. The ``access'' field is used +for the entry name in the glossary list. + +Access field: \glsentryaccess{R}. +First Access field: \glsentryfirstaccess{R}. +Text Access field: \glsentrytextaccess{R}. + +Access field: \glsentryaccess{in}. +First Access field: \glsentryfirstaccess{in}. +Text Access field: \glsentrytextaccess{in}. + +\printglossaries + +\end{document} 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 Binary files differnew file mode 100644 index 00000000000..9153e4c7bdc --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym-desc.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym-desc.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym-desc.tex new file mode 100644 index 00000000000..f3c85c8c94f --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym-desc.tex @@ -0,0 +1,43 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[nopostdot=false]{glossaries-extra} + +\makeglossaries + +\renewcommand*{\glsxtrpostdescacronym}{% + \space(\textsc{origin:} \glsentrylong{\glscurrententrylabel})% +} + +\newacronym[description={a device that emits a narrow intense +beam of light}]{laser}{laser}{light amplification by stimulated +emission of radiation} + +\newacronym[description={a form of \gls{laser} generating a beam of +microwaves}]{maser}{maser}{microwave amplification by stimulated +emission of radiation} + +\newacronym[description={a system for detecting the location and +speed of ships, aircraft, etc, through the use of radio waves}]{radar}{radar}{radio detection and ranging} + +\newacronym[description={portable breathing apparatus for divers}]{scuba}{scuba}{self-contained underwater breathing +apparatus} + +\begin{document} +\tableofcontents + +\chapter{Sample} + +An acronym is a word formed from the initial letters of other words. +Since it's a word, an acronym is pronounced as a word rather than as +a series of letters. Examples of acronyms: \gls{laser}, \gls{maser}, +\gls{radar} and \gls{scuba}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.pdf Binary files differnew file mode 100644 index 00000000000..40c05cdf684 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.tex new file mode 100644 index 00000000000..1301d14cc4b --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-acronym.tex @@ -0,0 +1,30 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\newacronym{laser}{laser}{light amplification by stimulated +emission of radiation} + +\newacronym{maser}{maser}{microwave amplification by stimulated +emission of radiation} + +\newacronym{radar}{radar}{radio detection and ranging} + +\newacronym{scuba}{scuba}{self-contained underwater breathing +apparatus} + +\begin{document} +An acronym is a word formed from the initial letters of other words. +Since it's a word, an acronym is pronounced as a word rather than as +a series of letters. Examples of acronyms: \gls{laser}, \gls{maser}, +\gls{radar} and \gls{scuba}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.pdf Binary files differnew file mode 100644 index 00000000000..e573156966e --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.tex new file mode 100644 index 00000000000..201c55c26f5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-altmodifier.tex @@ -0,0 +1,32 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +% Don't use with indexonlyfirst setting! + +\GlsXtrSetDefaultGlsOpts{noindex} +\GlsXtrSetAltModifier{>}{noindex=false} + +\newglossaryentry{sample}{name={sample},description={an example}} + +\begin{document} +This is a sample document. +The \gls{sample} entry is used on this page but isn't indexed. + +\newpage +The \gls>{sample} entry is used on this page and is indexed. + +\newpage +The \gls{sample} entry is used on this page but isn't indexed. + +\newpage +\printglossaries + +\end{document} 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 Binary files differnew file mode 100644 index 00000000000..0b08cd4b6e7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex-hyp.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex-hyp.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex-hyp.tex new file mode 100644 index 00000000000..c7f1f01c226 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex-hyp.tex @@ -0,0 +1,126 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: makeindex +% arara: pdflatex +\documentclass[index=totoc]{scrreprt} + +\usepackage[T1]{fontenc} + +\usepackage{makeidx} +\usepackage[colorlinks, + hyperindex=false% necessary for the encap entry + ]{hyperref} +\usepackage[abbreviations]{glossaries-extra} + +\renewcommand{\abbreviationsname}{List of Abbreviations} + +\makeindex +\makeglossaries + +% Provided by koma classes: +\setindexpreamble{Page numbers in bold indicate an entry +in the glossary or list of abbreviations.\par\medskip} + +% Automatically index the location of entry in the glossary +% for those entries that are in the "general" category and +% use "htextbf" as the encap value: + +% (Without the troublesome "encap" entry, hyperref's default +% hyperindex=true option could've been used and the attribute +% could simply be set to "textbf" and there'd be no need +% to define "htextbf".) + +\glssetcategoryattribute{general}{indexname}{htextbf} +\glssetcategoryattribute{general}{dualindex}{hyperpage} + +% Automatically index the location of entry in the glossary +% for those entries that are in the "abbreviation" category +% and use "htextbf" as the encap value: + +\newcommand*{\htextbf}[1]{\textbf{\hyperpage{#1}}} +\glssetcategoryattribute{abbreviation}{indexname}{htextbf} +\glssetcategoryattribute{abbreviation}{dualindex}{hyperpage} + +% Allow "format" key to override "dualindex" attribute. +\GlsXtrEnableIndexFormatOverride + +% Convert the first letter of the name to upper case in the +% glossary for general entries: +\glssetcategoryattribute{general}{glossname}{firstuc} + +% Convert the name to upper case in the glossary for +% abbreviations: +\glssetcategoryattribute{abbreviation}{glossname}{uc} + +% Define general entries: + +\newglossaryentry{duck}{name=duck,% + description={a waterbird with webbed feet}} + +\newglossaryentry{parrot}{name=parrot,% + description={mainly tropical bird with bright plumage}} + +\newglossaryentry{at}{name={@},% + description={makeindex's default for the ``actual value''}} + +\newglossaryentry{esc}{name={"},% + description={makeindex's default for the ``escape value''}} + +\newglossaryentry{encap}{name={|},% + description={makeindex's default for the ``encap value''}} + +% Set abbreviation style: + +\setabbreviationstyle{long-short-sc} + +% Define abbreviations: + +\newabbreviation + {html}% identifying label + {html}% short form + {hypertext markup language}% long form + +\newabbreviation + {xml}% identifying label + {xml}% short form + {extensible markup language}% long form + +\title{Sample document testing the glossaries-extra package} +\author{Nicola Talbot} + +\begin{document} +\maketitle + +\tableofcontents + +\chapter{Introduction} + +% If hyperref's default hyperindex=true option is in use +% the indexed term here won't need the |hyperpage bit. +This is a sample\index{sample|hyperpage} document testing the +\texttt{glossaries-extra} package. + +\chapter{General Entries} + +Sample entries: \gls{duck} and \gls{parrot}. + +Test makeindex's special characters: \gls{at} (actual) +\gls{esc} (escape) and \gls{encap} (encap). + +\newpage + +Use some entries again: \gls{duck} and \gls[format=hyperit]{parrot}. + +\chapter{Abbreviations} + +First use: \gls{html} and \gls{xml}. + +Next use: \gls{html} and \gls{xml}. + +\printglossaries + +\printindex + +\end{document} + diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.pdf Binary files differnew file mode 100644 index 00000000000..c78d94f2dfd --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.tex new file mode 100644 index 00000000000..a6e595d9493 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-autoindex.tex @@ -0,0 +1,114 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: makeindex +% arara: pdflatex +\documentclass{report} + +\usepackage[T1]{fontenc} + +\usepackage{makeidx} +\usepackage[abbreviations,counter=chapter,nopostdot=false]{glossaries-extra} + +\renewcommand*{\abbreviationsname}{List of Abbreviations} +\renewcommand*{\glossarypreamble}{\emph{Numbers refer to the chapter +where the entry was referenced.}} + +\makeindex +\makeglossaries + +% Automatically index the location of entry in the glossary +% for those entries that are in the "general" category: + +\glssetcategoryattribute{general}{indexname}{textbf} +\glssetcategoryattribute{general}{dualindex}{true} + +% Only index first use for the glossary location lists +% (doesn't affect the indexing from "dualindex" attribute): +%\glssetcategoryattribute{general}{indexonlyfirst}{true} + +% Automatically index the location of entry in the glossary +% for those entries that are in the "abbreviation" category +% and use "textbf" as the encap: + +\glssetcategoryattribute{abbreviation}{indexname}{textbf} +\glssetcategoryattribute{abbreviation}{dualindex}{true} + +% Only index first use for the glossary location lists +% (doesn't affect the indexing from "dualindex" attribute): +%\glssetcategoryattribute{abbreviation}{indexonlyfirst}{true} + +% Convert the first letter of the name to upper case in the +% glossary for general entries: +\glssetcategoryattribute{general}{glossname}{firstuc} + +% Allow "format" key to override "dualindex" attribute. +\GlsXtrEnableIndexFormatOverride + +% Define general entries: + +\newglossaryentry{duck}{name=duck,% + description={a waterbird with webbed feet}} + +\newglossaryentry{parrot}{name=parrot,% + description={mainly tropical bird with bright plumage}} + +\newglossaryentry{at}{name={@},% + description={makeindex's default for the ``actual value''}} + +\newglossaryentry{esc}{name={"},% + description={makeindex's default for the ``escape value''}} + +\newglossaryentry{encap}{name={|},% + description={makeindex's default for the ``encap value''}} + +% Set abbreviation style: + +\setabbreviationstyle{long-short-sc} + +% Define abbreviations: + +\newabbreviation + {html}% identifying label + {html}% short form + {hypertext markup language}% long form + +\newabbreviation + {xml}% identifying label + {xml}% short form + {extensible markup language}% long form + +\title{Sample document testing the glossaries-extra package} +\author{Nicola Talbot} + +\begin{document} +\maketitle + +\chapter{Introduction} + +This is a sample\index{sample} document testing the +\texttt{glossaries-extra} package. + +\chapter{General Entries} + +Sample entries: \gls{duck} and \gls{parrot}. + +Test makeindex's special characters: \gls{at} (actual) +\gls{esc} (escape) and \gls{encap} (encap). + +\chapter{Abbreviations} + +First use: \gls{html} and \gls{xml}. + +Next use: \gls{html} and \gls{xml}. + +\newpage + +Uses some entries again: \gls{duck} and \gls[format=textit]{parrot}. + +\printglossaries + +\printindex + +\end{document} + diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.pdf Binary files differnew file mode 100644 index 00000000000..9e021058ad6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.tex new file mode 100644 index 00000000000..886a4c1e523 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-crossref.tex @@ -0,0 +1,21 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage{glossaries-extra} + +\makeglossaries + +\newglossaryentry{sample1}{name={sample 1},description={an example}} +\newglossaryentry{sample2}{name={sample 2},description={an +example},see={sample1}} +\newglossaryentry{sample3}{name={sample 3},description={an +example},see={sample2}} + +\begin{document} +\gls{sample3}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.pdf Binary files differnew file mode 100644 index 00000000000..2e7b8661974 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.tex new file mode 100644 index 00000000000..ebf1383e3e7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-docdef.tex @@ -0,0 +1,27 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[docdef]{glossaries-extra} + +\makeglossaries + +\begin{document} +\printglossaries + +This is a sample document testing the use of document definitions +for those who are happy to accept all the associated drawbacks +of not following the advice in the glossaries manual about +defining all your entries in the preamble. Use it at your own +peril. + +\newglossaryentry{sample}{name=sample,description={an example}} +\newglossaryentry{sample2}{name={another sample}, + description={another example},see={sample}} +\newabbreviation{ab}{AB}{sample abbreviation} + +Use \gls{sample2}. + +Use \gls{ab}. +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.pdf Binary files differnew file mode 100644 index 00000000000..5c55c8e7643 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.tex new file mode 100644 index 00000000000..0a96a885fbd --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-entrycount.tex @@ -0,0 +1,44 @@ +% arara: pdflatex +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\GlsXtrEnableEntryCounting + {abbreviation}% list of categories to use entry counting + {2}% trigger value + +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{xml}{XML}{extensible markup language} +\newabbreviation{css}{CSS}{cascading style sheet} + +\newglossaryentry{sample}{name={sample},description={sample}} + +\begin{document} +This is a sample document to entry counting. The entry counting +has been enabled on the \texttt{abbreviation} category. +This means that abbreviations will only be added to the glossary +if they have been used more than $n$ times, where in this +document $n$ has been set to +\glsgetcategoryattribute{abbreviation}{entrycount}. +Entries in other categories behave as normal. + + +Used once: \gls{html}. + +Used twice: \gls{xml} and \gls{xml}. + +Used three times: \gls{css} and \gls{css} and \gls{css}. + +Used once but this entry is in the ``general'' category +which doesn't have the ``entrycount'' attribute set: +\gls{sample}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.pdf Binary files differnew file mode 100644 index 00000000000..0f47fd994bd --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.tex new file mode 100644 index 00000000000..eed767a5c07 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-footnote.tex @@ -0,0 +1,30 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +%\setabbreviationstyle{footnote}% similar to glossaries.sty acronym style of the same name +\setabbreviationstyle{postfootnote}% put the footnote after following punctuation if present + +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{xml}{XML}{extensible markup language} + +\begin{document} +\chapter{Sample} + +First use: \gls{xml} and \gls{html}. + +\chapter{Another Sample} + +Next use: \gls{xml} and \gls{html}. + +Short form: \glsxtrshort{xml}\@. Long form: \glsxtrlong{html}. +Full form: \glsxtrfull{xml}. + +\printglossaries +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.pdf Binary files differnew file mode 100644 index 00000000000..fda80ec6370 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex new file mode 100644 index 00000000000..c0fd7b39926 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-header.tex @@ -0,0 +1,73 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdflatex +\documentclass{report} + +\usepackage[T1]{fontenc}% provide bold small caps +\usepackage[utf8]{inputenc} +\usepackage{slantsc}% provide slanted small caps +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\setabbreviationstyle{long-short-sc} +\newabbreviation{html}{html}{hypertext markup language} + +\newglossaryentry{sample}{name=sample, + description={an example}} + +\pagestyle{headings} + +% entries with the headuc attribute set to "true" +% will ensure the \glsfmttext etc commands use the +% upper case version in page headers. +\glssetcategoryattribute{general}{headuc}{true} + +% This attribute isn't set for the "abbreviation" category +% which keeps the abbreviation as small caps in the header. + +% Uncomment the following to set the attribute for the +% abbreviations as well: +%\glssetcategoryattribute{abbreviation}{headuc}{true} + +\begin{document} +\begin{abstract} +This is a sample document that tests the use of entries +in sectioning commands through commands like \verb|\glsfmtshort| +and \verb|glsfmttext|. +\end{abstract} + +\tableofcontents + +\chapter{\Glsfmttext{sample} Chapter with \glsfmtshort{html} Abbreviation} +\label{ch:sample} + +First use: \gls{html}. Next use: \gls{html}. +Note that the \gls{sample} entry that occurs at the start of +the chapter title appears in lower case in the PDF bookmarks, since +the case-changing command can't be used there. + +\newpage + +Page break to test header. + +\chapter{Another + \texorpdfstring{\Glsfmttext{sample}}{Sample} + Chapter with \glsfmtshort{html} Abbreviation} + +The case-changing commands can't be used in PDF bookmarks, +so this chapter has used \verb|\texorpdfstring| to provide +an alternative for the PDF bookmark. The first chapter +(\nameref{ch:sample}) +didn't do this so ``\Gls{sample}'' appeared in lower case in +the PDF bookmark. + +\newpage + +Page break to test header. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.pdf Binary files differnew file mode 100644 index 00000000000..be927463ae3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.tex new file mode 100644 index 00000000000..459888c0b4c --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-indexhook.tex @@ -0,0 +1,42 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage{etoolbox} +\usepackage + [ + indexcrossrefs=false% cross-ref indexing performed explicitly + ] + {glossaries-extra} + +\makeglossaries + +% Keep a list of entries that have been indexed +\newcommand*{\indexedlist}{} +\renewcommand*{\glsxtrdowrglossaryhook}[1]{% + \xifinlist{#1}{\indexedlist}{}{\listxadd{\indexedlist}{#1}}% +} + +\newglossaryentry{sample1}{name={sample 1},description={an example}} +\newglossaryentry{sample2}{name={sample 2},description={an +example},see={sample1}} +\newglossaryentry{sample3}{name={sample 3},description={an +example},see={sample2}} + +\newglossaryentry{sample4}{name={sample 4},description={an example}} + +\begin{document} +This is sample document. + +\gls{sample3}. + +\printglossaries + +% index all the cross-referenced entries that haven't been used: +\glsxtraddallcrossrefs + +Entries that haven't been indexed: +\forglsentries{\thislabel}{\xifinlist{\thislabel}{\indexedlist}{}{\space\thislabel}}. + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.pdf Binary files differnew file mode 100644 index 00000000000..fed6e2064b8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.tex new file mode 100644 index 00000000000..612083ed554 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.tex @@ -0,0 +1,58 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +% set up the styles: +\setabbreviationstyle{long-short-sc} + +\setabbreviationstyle[initialism]{short-long} +\glssetcategoryattribute{initialism}{insertdots}{true} +\glssetcategoryattribute{initialism}{discardperiod}{true} + +% define the entries: + +\newabbreviation{html}{html}{hypertext markup language} + +\newabbreviation[category=initialism]{eg}{eg}{for example} +\newabbreviation[category=initialism]{si}{SI}{sample initials} + +\begin{document} +Abbreviations with dots \gls{eg} and \gls{si} and abbreviation +without dots \gls{html} and the end of the sentence. + +(Next use.) Abbreviations with dots \gls{eg} and \gls{si} and abbreviation +without dots \gls{html} and the end of the sentence. + +Plural: \glspl{si} and at the end of a sentence \glspl{si}. + +Test the space factors. (More visible if we switch to a monospaced +font.) + +\begin{ttfamily} +Initialisms in the middle \gls{eg} and \gls{si} of a sentence. + +Initialism at the end of a sentence \gls{eg}. +Initialism at the end of a sentence \gls{si}. +Another sentence. +\end{ttfamily} + +Compare with explicitly writing the text without \verb|\gls| +and judicious use of \verb*|\ | and \verb|\@|: + +\begin{ttfamily} +Initialisms in the middle e.g.\ and S.I. of a sentence. + +Initialism at the end of a sentence e.g. +Initialism at the end of a sentence S.I\@. +Another sentence. +\end{ttfamily} + +\printglossaries + +\end{document} 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 Binary files differnew file mode 100644 index 00000000000..5e149b7982a --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixed-abbrv-styles.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixed-abbrv-styles.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixed-abbrv-styles.tex new file mode 100644 index 00000000000..421a5af0bad --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixed-abbrv-styles.tex @@ -0,0 +1,25 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage{glossaries-extra} + +\makeglossaries + +\setabbreviationstyle[inline]{long-short} +\setabbreviationstyle[footer]{footnote} + +\newabbreviation[category=inline]{html}{HTML}{hypertext markup language} + +\newabbreviation[category=footer]{shtml}{SHTML}{server-parsed HTML} + +\begin{document} + +First use: \gls{shtml} and \gls{html}. + +Next use: \gls{shtml} and \gls{html}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.pdf Binary files differnew file mode 100644 index 00000000000..ee272c9c825 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.tex new file mode 100644 index 00000000000..b4fcb875202 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-mixture.tex @@ -0,0 +1,305 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{report} + +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage[nopostdot=false]{glossaries-extra} + +\makeglossaries + +% regular terms: + +% The following will make the first letter of the name upper case +% in the glossary for the general entries: +\glssetcategoryattribute{general}{glossname}{firstuc} + +% The following will make the first letter of the description upper case +% in the glossary for the general entries: +\glssetcategoryattribute{general}{glossdesc}{firstuc} + +\newglossaryentry{duck}{name=duck,% + description={a waterbird with webbed feet}} + +\newglossaryentry{parrot}{name=parrot,% + description={mainly tropical bird with bright plumage}} + +% acronyms: + +% The following redefinition will add the provided text to the end of the +% description in the glossary. + +\renewcommand*{\glsxtrpostdescacronym}{% + \space(\textsc{acronym:} \glsentrylong{\glscurrententrylabel})% +} + +% The following will make the first letter of the name upper case +% in the glossary for the acronym entries: +\glssetcategoryattribute{acronym}{glossname}{firstuc} + +% The following will make the first letter of the description upper case +% in the glossary for the acronym entries: +\glssetcategoryattribute{acronym}{glossdesc}{firstuc} + +% Enable tagging of initials. The second argument is the name of +% the command you want to use to tag initial letters. The +% command will be defined robustly and will only be activated +% in the glossary for the categories listed in the first +% argument. +% If the specified tagging command (\itag here) is used +% anywhere else it will just do its argument. +\GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag} + +\newacronym[description={a device that emits a narrow intense +beam of light}]{laser}{laser} +{\itag{l}ight \itag{a}mplification by \itag{s}timulated +\itag{e}mission of \itag{r}adiation} + +\newacronym[description={a form of \gls{laser} generating a beam of +microwaves}]{maser}{maser} +{\itag{m}icrowave \itag{a}mplification by \itag{s}timulated +\itag{e}mission of \itag{r}adiation} + +\newacronym[description={a system for detecting the location and +speed of ships, aircraft, etc, through the use of radio waves}]{radar}{radar} +{\itag{ra}dio \itag{d}etection \itag{a}nd \itag{r}anging} + +\newacronym[description={portable breathing apparatus for divers}]{scuba}{scuba} +{\itag{s}elf-\itag{c}ontained \itag{u}nderwater +\itag{b}reathing \itag{a}pparatus} + +% The following redefinition will add the provided text to the end of the +% description in the glossary. + +\renewcommand*{\glsxtrpostdescabbreviation}{% + \space (abbreviation)% +} + +% The following will set the description in title case +% in the glossary for the abbreviations: +\glssetcategoryattribute{abbreviation}{glossdesc}{title} + +% The following will convert the abbreviations to all capitals +% in the glossary: +\glssetcategoryattribute{abbreviation}{glossname}{uc} + +% Use \textsc in the abbreviations: +\setabbreviationstyle{long-short-sc} + +% Some other attributes you might want to try: + +% Use 's (apostrophe s) for the plural suffix +% (only affects the short plural not the long plural) +%\glssetcategoryattribute{abbreviation}{aposplural}{true} + +% Suppress the default suffix for the short plural. +% (Don't use with the above for the same category.) +%\glssetcategoryattribute{abbreviation}{noshortplural}{true} + +% abbreviations: + +\newabbreviation + {html}% identifying label + {html}% short form + {\itag{h}yper\itag{t}ext \itag{m}arkup \itag{l}anguage}% long form + +\newabbreviation + {xml}% identifying label + {xml}% short form + {e\itag{x}tensible \itag{m}arkup \itag{l}anguage}% long form + +\newabbreviation + {svg}% identifying label + {svg}% short form + {\itag{s}calable \itag{v}ector \itag{g}raphics}% long form + +\newabbreviation + {svm}% identifying label + {svm}% short form + {\itag{s}upport \itag{v}ector \itag{m}achine}% long form + +\title{Sample Document Illustrating the glossaries-extra Package} +\author{Nicola Talbot} + +\begin{document} +\pagenumbering{alph} +\maketitle + +\pagenumbering{roman} +\tableofcontents + +\pagenumbering{arabic} +\chapter{Categories} + +The \texttt{glossaries-extra} package provides an extra key called +\texttt{category}, which is used to assign a category to each entry. +For example, the category for the ``duck'' entry is: +\glscategory{duck}. + +The category value is just a label, which needs to be expandable, so +make sure you avoid problematic characters in it. You can test the +category with \verb|\glsifcategory|. + +The entry ``duck'' \glsifcategory{duck}{general}{is}{isn't} a +general entry. +The entry ``laser'' \glsifcategory{laser}{general}{is}{isn't} a +general entry. + +A category can have attributes set. For example, both the +``general'' category and the ``acronym'' category have the attribute +``regular'' set to ``true''. + +You can obtain the value of an attribute for a given category with +\begin{verbatim} +\glsgetcategoryattribute{category}{attribute} +\end{verbatim} +This does nothing if the category +or attribute aren't defined. + +Category ``general'' has the attribute ``regular'' set to +``\glsgetcategoryattribute{general}{regular}''. +Category ``acronym'' has the attribute ``regular'' set to +``\glsgetcategoryattribute{acronym}{regular}''. +Category ``abbreviation'' has the attribute ``regular'' set to +``\glsgetcategoryattribute{abbreviation}{regular}''. + +You can test if a category has an attribute set to a given value +with +\begin{verbatim} +\glsifcategoryattribute{category}{attribute}{value}{true code}{false +code} +\end{verbatim} + +Category ``general'' +\glsifcategoryattribute{general}{regular}{true}{has}{doesn't have} +the ``regular'' attribute set to ``true''. +Category ``acronym'' +\glsifcategoryattribute{acronym}{regular}{true}{has}{doesn't have} +the ``regular'' attribute set to ``true''. +Category ``abbreviation'' +\glsifcategoryattribute{abbreviation}{regular}{true}{has}{doesn't have} +the ``regular'' attribute set to ``true''. + +\chapter{Regular Terms} + +By default glossary entries have the category ``general''. +For +example\glsforeachincategory{general}{\thistype}{\thislabel}{, +\gls{\thislabel}} have the category field set to ``general''. + +Commands like \verb|\newabbreviation| and \verb|\newacronym| +override this. + +Regular terms are those entries whose category has the ``regular'' +attribute set to ``true''. There's a convenient shortcut to +determine if an entry has a category with the ``regular'' attribute +set: +\begin{verbatim} +\glsifregular{entry-label}{true code}{false code} +\end{verbatim} + +For example: \gls{duck} \glsifregular{duck}{is}{isn't} a regular +term; +\gls{laser} \glsifregular{laser}{is}{isn't} a regular +term. + +The regular attribute determines what \verb|\gls| (and plural and +case-changing variants) should do. A regular entry (even if +it's been defined using \verb|\newacronym| or +\verb|\newabbreviation|) uses the \texttt{first} (or +\texttt{firstplural}) key on first use and the \texttt{text} +(or \texttt{plural}) key on subsequent use. + +An abbreviation whose category doesn't have the regular attribute +set to ``true'' will use the abbreviation style assigned +to that category for first and subsequent use, which will use +the values of the \texttt{long} (or \texttt{longplural}) +and \texttt{short} (or \texttt{shortplural}) keys. +The first use of \verb|\gls| may or may not match \verb|\glsfirst| +for non-regular entries, depending on the abbreviation style. + +\chapter{Abbreviations} + +Abbreviations include acronyms, initialisms and contractions. +Some abbreviation styles may set category attributes. +For example, the ``short'' style sets the ``regular'' attribute for +the category used by the abbreviations with that style applied. +Whereas the ``long-short'' style will switch off the ``regular'' attribute +if it has previously been switched on. +Styles must be set before defining abbreviations, but you may set +different styles for different categories. + +For example, by default the ``short'' style is set for abbreviations +with the ``acronym'' category using: +\begin{verbatim} +\setabbreviationstyle[acronym]{short} +\end{verbatim} +whereas the ``short-long'' style is set for abbreviations with the +``abbreviation'' category: +\begin{verbatim} +\setabbreviationstyle{long-short} +\end{verbatim} +(The optional argument defaults to ``abbreviation''.) + +If no style has been set for a particular category, the style for the +``abbreviation'' category is used instead. + +\section{Acronyms} + +An acronym is a word formed from the initial letters of other words. +Since it's a word, an acronym is pronounced as a word rather than as +a series of letters. Examples of acronyms: \gls{laser}, \gls{maser}, +\gls{radar} and \gls{scuba}. + +Since acronyms are treated as words, the ``acronym'' category +has the ``regular'' attribute set to ``true''. The default +abbreviation style for acronyms is ``short'', which doesn't expand +the entry on first use. + +The description defaults to the long +form with the ``short'' style. This example document overrides +the default description by using the \texttt{description} +key in the optional argument of \verb|\newacronym|. This +document also sets the post description hook +(\verb|\glsxtrpostdescacronym|) to insert the long form in +parentheses after the description when it's displayed in the glossary. + +\section{Initialism} + +Initialisms are formed from initial letters of words where the +letters are sounded out. Examples of initialisms: +\gls{svm}, \gls{html}, \gls{svg} and \gls{xml}. + +The \texttt{glossaries-extra} package sets the default abbreviation +style to \texttt{long-short}. This document has changed it to +\texttt{long-short-sc} (use small caps). Next use: +\gls{svm}, \gls{html}, \gls{svg} and \gls{xml}. + +Note that the acronyms (like \gls{laser}) don't use small caps. +This is because the acronyms and initialisms have separate styles +applied since they are in separate categories. + +\section{Plurals} + +The default plural for the short form is obtained by appending +the abbreviation plural suffix to the singular form. You can +override this on a per-entry basis using the \texttt{shortplural} +key in the optional argument of \verb|\newabbreviation| +(or \verb|\newacronym|) or you can prevent the suffix from +being added to all entries in a particular category (or categories) +by setting the \texttt{noshortplural} attribute to ``true'' for +the relevant category (before defining the entries). + +Alternatively you can automatically insert an apostrophe before +the plural suffix by setting the \texttt{aposplural} attribute to +``true''. The \texttt{aposplural} attribute overrides the +\texttt{noshortplural} attribute. + +Plurals: \glspl{svm}, \glspl{laser}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.pdf Binary files differnew file mode 100644 index 00000000000..ed4ae880a37 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.tex new file mode 100644 index 00000000000..d5a481604fb --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-nested.tex @@ -0,0 +1,41 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\setabbreviationstyle{long-short-sc} + +\newabbreviation{ssi}{ssi}{server side includes} +\newabbreviation{html}{html}{hypertext markup language} + +%DON'T use this with upper casing commands! +\newabbreviation{shtml}{shtml}{\gls{ssi} enabled \gls{html}} + +% Alternatively +%\newabbreviation{shtml}{shtml}{\glsxtrshort{ssi} enabled \glsxtrshort{html}} + +\begin{document} + +This is a sample document testing nested link text. +The \texttt{glossaries-extra} package temporarily modifies +commands like \verb|\gls| or \verb|\glsxtrshort| that occur +in fields, when any of those field is accessed through linking +commands. + +First use: \gls{shtml}. + +\newpage + +Next use: \gls{shtml}. + +\newpage + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.pdf Binary files differnew file mode 100644 index 00000000000..e674c1effd0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.tex new file mode 100644 index 00000000000..1d9a71876c6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onelink.tex @@ -0,0 +1,49 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage{lipsum} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\GlsXtrEnableEntryUnitCounting{general}{0}{page} + +\newglossaryentry{sample}{name={sample},description={an example}} +\newglossaryentry{sample2}{name={another sample},description={another example}} + +\renewcommand*{\glslinkcheckfirsthyperhook}{% + \ifnum\glsentrycurrcount\glslabel>0 + \setkeys{glslink}{hyper=false}% + \fi +} + +\begin{document} + +A \gls{sample} entry. \Gls{sample2}. +Next use: \gls{sample}, \gls{sample2}. + +\lipsum[1] + +\Gls{sample} and more \glspl{sample}. +\Gls{sample2} and \gls{sample2}. + +\newpage + +Next page: \gls{sample} and \gls{sample2}. + +Again: \gls{sample} and \gls{sample2}. + +\lipsum[2-5] + +Now for a \gls{sample} paragraph that spans the page break. +\lipsum*[6-7] The entry in the final sentence in this \gls{sample} paragraph +is incrementing and testing the count from the previous page. + +Another \gls{sample} paragraph. + +\printglossaries + +\end{document} 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 Binary files differnew file mode 100644 index 00000000000..2f6f3fee1f3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex new file mode 100644 index 00000000000..51b91b2530e --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex @@ -0,0 +1,60 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[xindy]{glossaries-extra} + +\makeglossaries + +% The starred version will attempt to allow UTF8 characters +% in the label, but this may fail! +\GlsXtrEnableOnTheFly* + +\begin{document} +This is a \glsxtr{sample} document illustrating on-the-fly +simultaneous \glsxtr{definition} and \glsxtr{usage} +for \glsxtr[format=textbf][plural=glossaries]{glossary} +\glsxtrpl[][plural=entries]{entry}. This has +drawbacks and it's really much better to define entries in the +\glsxtr{preamble}, but you may find it useful for simple +indexing. + +\newpage + +\Glsxtr{preamble} \glsxtrpl{definition} are much better, +but here is a \glsxtr{sample} of what you can do. + +\newpage +The \glsxtrpl{glossary} must come at the end of the document +with this usage. + +\newpage +Commands can't occur in the label. The ``name'' key has to be +used instead, but the starred version of +\verb|\GlsXtrEnableOnTheFly| attempts to allow non-ASCII +characters in the label, but this may break some commands, +so take care! + +The \glsxtr{naïve} +\glsxtr[][plural={phÅ“nixes}]{phÅ“nix} sent +off its \glsxtr{résumé} covered in +\glsxtr{pâté} from the \glsxtr{soirée}. + +Terms that contain commands must have the ``name'' set and the +command removed from the label +\glsxtr[][name={\emph{e.g.}}]{eg} like this, but +really it's much better to define the entry in the preamble +and use the standard \verb|\gls| instead. + +\newpage +The previous page presupposes the existence of +\glsxtrpl{phÅ“nix}. + +\newpage + +\printglossaries + +\end{document} 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 Binary files differnew file mode 100644 index 00000000000..90373cdd356 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.tex new file mode 100644 index 00000000000..2ca31d13542 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.tex @@ -0,0 +1,55 @@ +% arara: xelatex +% arara: makeglossaries +% arara: xelatex +\documentclass{article} + +\usepackage{fontspec} +\usepackage[xindy]{glossaries-extra} + +\makeglossaries + +\GlsXtrEnableOnTheFly + +\begin{document} +This is a \glsxtr{sample} document illustrating on-the-fly +simultaneous \glsxtr{definition} and \glsxtr{usage} +for \glsxtr[format=textbf][plural=glossaries]{glossary} +\glsxtrpl[][plural=entries]{entry}. This has +drawbacks and it's really much better to define entries in the +\glsxtr{preamble}, but you may find it useful for simple +indexing. + +\newpage + +\Glsxtr{preamble} \glsxtrpl{definition} are much better, +but here is a \glsxtr{sample} of what you can do. + +\newpage +The \glsxtrpl{glossary} must come at the end of the document +with this usage. + +\newpage +Commands can't occur in the label. The ``name'' key has to be +used instead, but XeTeX makes life a bit easier for non-ASCII +characters. + +The \glsxtr{naïve} +\glsxtr[][plural={phÅ“nixes}]{phÅ“nix} sent +off its \glsxtr{résumé} covered in +\glsxtr{pâté} from the \glsxtr{soirée}. + +Terms that contain commands must have the ``name'' set and the +command removed from the label +\glsxtr[][name={\emph{e.g.}}]{eg} like this, but +really it's much better to define the entry in the preamble +and use the standard \verb|\gls| instead. + +\newpage +The previous page presupposes the existence of +\glsxtrpl{phÅ“nix}. + +\newpage + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.pdf Binary files differnew file mode 100644 index 00000000000..42bf8cbfc85 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.tex new file mode 100644 index 00000000000..8431c6abe26 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly.tex @@ -0,0 +1,50 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage{glossaries-extra} + +\makeglossaries + +\GlsXtrEnableOnTheFly + +\begin{document} +This is a \glsxtr{sample} document illustrating on-the-fly +simultaneous \glsxtr{definition} and \glsxtr{usage} +for \glsxtr[format=textbf][plural=glossaries]{glossary} +\glsxtrpl[][plural=entries]{entry}. This has +drawbacks and it's really much better to define entries in the +\glsxtr{preamble}, but you may find it useful for simple +indexing. + +\newpage + +\Glsxtr{preamble} \glsxtrpl{definition} are much better, +but here is a \glsxtr{sample} of what you can do. + +\newpage +The \glsxtrpl{glossary} must come at the end of the document +with this usage. + +\newpage +Commands can't occur in the label. The ``name'' key has to be +used instead. Isn't this fiddly and not really worth the +effort. May as well just define all the \glspl{entry} in the +\glsxtr{preamble} instead. + +The \glsxtr[][name={na\"{\i}ve}]{naive} +\glsxtr[][plural={ph\oe nixes},name={ph\oe nix}]{phoenix} sent +off its \glsxtr[][name={r\'esum\'e}]{resume} covered in +\glsxtr[][name={p\^at\'e}]{pate} from +the \glsxtr[][name={soir\'ee}]{soiree}. + +\newpage +The previous page presupposes the existence of +\glsxtrpl{phoenix}. + +\newpage + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.pdf Binary files differnew file mode 100644 index 00000000000..7593d10a722 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.tex new file mode 100644 index 00000000000..c54e3dcede7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postdot.tex @@ -0,0 +1,47 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +% Sample entry in the "general" category: + +\newglossaryentry{sample}{name={sample},description={an example}} + +\setabbreviationstyle[initialism]{short} + +% Set the attribute "insertdots" set to "true" to automatically +% insert periods between the letters in initialism: +\glssetcategoryattribute{initialism}{insertdots}{true} + +% This can cause a problem if any of the initialisms occur at the +% end of a sentence so set the attribute "discardperiod" set to "true": +\glssetcategoryattribute{initialism}{discardperiod}{true} + +\newabbreviation + [category=initialism,description={for example}] + {eg}{eg}{exempli gratia} + +% Now for an abbreviation without dots. This is strictly speaking +% also an initialism, but it's going to be assigned the standard +% "abbreviation" category: +\newabbreviation{html}{HTML}{hypertext markup language} +% (This will use the style currently set for the "abbreviation" +% category, which is the short-long style by default.) + +\begin{document} + +Entry occurs at the end of a sentence: \gls{eg}. +Entry occurs at the end of a sentence: \gls{sample}. +Entry occurs at the end of a sentence: \gls{html}. + +Entry \gls{eg} occurs in the middle of a sentence. +Entry \gls{sample} occurs in the middle of a sentence. +Entry \gls{html} occurs in the middle of a sentence. + +\printglossaries +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.pdf Binary files differnew file mode 100644 index 00000000000..c6cf36a78be --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.tex new file mode 100644 index 00000000000..42adeda7df4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-postlink.tex @@ -0,0 +1,77 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage[style=tree]{glossaries-extra} + +\makeglossaries + +% Append the description in parentheses on first use +% for entries with the "describe" category: + +\glssetregularcategory{describe} + +\newcommand*{\glsxtrpostlinkdescribe}{% + \glsxtrpostlinkAddDescOnFirstUse +} + +\newglossaryentry{sample1}{name={sample1}, + category=describe, + description={the first sample entry}} + +% Append the symbol in parentheses on first use for +% entries with the "symbol" category: + +\glssetregularcategory{symbol} + +\newcommand*{\glsxtrpostlinksymbol}{% + \glsxtrifwasfirstuse + {% + \space (denoted: \glsentrysymbol{\glslabel})% + }% + {}% +} + +\newglossaryentry{sample2}{name={sample2}, + symbol={\ensuremath{\mathcal{S}_2}}, + category=symbol, + description={the second sample entry}} + +% Append the description as a footnote for general entries +% on first use: + +%\newcommand*{\glsxtrpostlinkgeneral}{% +% \glsxtrifwasfirstuse{\footnote{\glsentrydesc{\glslabel}}}{}% +%} + +% or (defer footnote mark until after any following punctuation): + +\newcommand*{\glsxtrpostlinkgeneral}{% + \glsxtrifwasfirstuse + {\glsxtrdopostpunc{\footnote{\glsentrydesc{\glslabel}}}}% + {}% +} + +% Disable hyperlink of first use for those entries in the "general" +% category: + +\glssetcategoryattribute{general}{nohyperfirst}{true} + +\newglossaryentry{sample3}{name={sample3}, + description={the third sample entry}} + +\begin{document} + +First use: \gls{sample1}, \gls{sample2} and \gls{sample3}. + +Next use: \gls{sample1}, \gls{sample2} and \gls{sample3}. + +Value of first field (post-link hook is still used): \glsfirst{sample1}, \glsfirst{sample2} +and \glsfirst{sample3}. (The last one isn't considered first use by +the hook that determines whether or not to hyperlink on first use.) + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.pdf Binary files differnew file mode 100644 index 00000000000..921d9c58c2c --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.tex new file mode 100644 index 00000000000..7fa2f325fb4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-prefix.tex @@ -0,0 +1,24 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage{glossaries-extra} +\usepackage{glossaries-prefix} + +\makeglossaries + +\newabbreviation + [prefix={an\space}, + prefixfirst={a~}] + {svm}{SVM}{support vector machine} + +\begin{document} + +This is a sample document to test prefixes. +First use: \pgls{svm}. +Next use: \pgls{svm}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.pdf Binary files differnew file mode 100644 index 00000000000..c2e1b926fcc --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.tex new file mode 100644 index 00000000000..194f4a4bc89 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-undef.tex @@ -0,0 +1,21 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage[undefaction=warn]{glossaries-extra} + +\makeglossaries + +\newglossaryentry{sample}{name=sample,description={an example}} + +\begin{document} + +Defined entry: \gls{sample}, \glslink{sample}{text}. + +Undefined entry: \gls{undefined}, \glslink{undefined}{text}. + +\printglossaries +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.pdf Binary files differnew file mode 100644 index 00000000000..7ecd515b3e2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.tex new file mode 100644 index 00000000000..03623a42023 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-unitentrycount.tex @@ -0,0 +1,90 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\GlsXtrEnableEntryUnitCounting{abbreviation}{2}{chapter} + +\makeglossaries + +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{xml}{XML}{extensible markup language} +\newabbreviation{css}{CSS}{cascading style sheet} + +\newglossaryentry{sample}{name={sample},description={sample}} + +\newcommand*{\lastruncount}[1]{% +Overall number of times the \texttt{#1} entry is used in +this chapter: \glsentryprevcount{#1}. (Information obtained +from previous run.)% +} + +\newcommand*{\currentruncount}[1]{% +Number of times the \texttt{#1} entry has been used this +chapter so far: \glsentrycurrcount{#1}.% +} + +\newcommand*{\triggertest}[1]{% +Normal usage of \texttt{\char`\\gls} \glsxtrifcounttrigger{#1}{has}{hasn't} been +suppressed for the \texttt{#1} entry in this chapter.% +} + +\begin{document} + +This is a sample document to entry counting per unit. The unit entry counting +has been enabled on the \texttt{abbreviation} category. +The unit has been set to +``\glsgetcategoryattribute{abbreviation}{unitcount}''. +This means that abbreviations will only be added to the glossary if +they are used more than $n$ times per +\glsgetcategoryattribute{abbreviation}{unitcount}, +where in this document $n$ has been set to +\glsgetcategoryattribute{abbreviation}{entrycount}. +Entries in other categories behave as normal. + +\chapter{Sample} + +\lastruncount{xml} + +Used once: \gls{html}. + +Used twice: \gls{xml} and \gls{xml}. + +Used three times: \gls{css} and \gls{css} and \gls{css}. + +Used once but this entry is in the ``general'' category +which doesn't have the entry unit counting set: +\gls{sample}. + +\currentruncount{xml} + +\triggertest{xml} + +\currentruncount{css} + +\triggertest{css} + +\chapter{Another Sample} + +Used once in this chapter: \gls{xml}. + +Used twice in this chapter: \gls{css} and \gls{css}. + +\currentruncount{css} + +\triggertest{css} + +Total number of times the \texttt{css} entry was used +throughout the document on the previous run: +\glsentryprevtotalcount{css}. + +Total number of times the \texttt{xml} entry was used +throughout the document on the previous run: +\glsentryprevtotalcount{xml}. + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample.pdf b/Master/texmf-dist/doc/latex/glossaries-extra/sample.pdf Binary files differnew file mode 100644 index 00000000000..a61cb117186 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample.tex new file mode 100644 index 00000000000..42e2f4d6777 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample.tex @@ -0,0 +1,26 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\usepackage{glossary-mcols} +\setglossarystyle{mcolindex} + +\makeglossaries + +\loadglsentries{example-glossaries-brief} + +\begin{document} + +\tableofcontents + +\section{Sample} + +Entries: \forglsentries{\thislabel}{\gls{\thislabel}. } + +\printglossaries + +\end{document} diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx new file mode 100644 index 00000000000..79b243129a4 --- /dev/null +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx @@ -0,0 +1,9943 @@ +%\iffalse +% glossaries-extra.dtx generated using makedtx version 1.1 (c) Nicola Talbot +% Command line args: +% -author "Nicola Talbot" +% -doc "glossaries-extra-codedoc.tex" +% -codetitle "Main Package Code" +% -src "glossaries-extra.sty\Z=>glossaries-extra.sty" +% -section "chapter" +% glossaries-extra +% Created on 2016/1/24 16:56 +%\fi +%\iffalse +%<*package> +%% \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 \~} +%</package> +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2016 Nicola Talbot, all rights reserved. +% \fi +% \iffalse +%<*driver> +\documentclass[report,widecs]{nlctdoc} + +\iffalse +glossaries-extra-codedoc.tex is a stub file used by makedtx to create +glossaries-extra.dtx +\fi + +\usepackage{alltt} +\usepackage{pifont} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={glossaries-extra.sty: an extension to the glossaries +package}, + pdfkeywords={LaTeX,package,glossary,abbreviations}]{hyperref} +\usepackage{glossaries-extra} + +\RecordChanges + +\makeglossaries + +\renewcommand*{\main}[1]{\hyperpage{#1}} +\newcommand*{\htextbf}[1]{\textbf{\hyperpage{#1}}} +\newcommand*{\itermdef}[1]{\index{#1|htextbf}} + +\newglossaryentry{xindy}{ + name={\appfmt{xindy}\index{xindy|htextbf}}, + sort={xindy}, + text={\protect\app{xindy}}, + description={An flexible indexing application with multilingual + support written in Perl} +} + +\newglossaryentry{makeindex}{% + name={\appfmt{makeindex}\index{makeindex|htextbf}},% + sort={makeindex},% + text={\protect\app{makeindex}},% + description={An indexing application}, +} + +\let\glsd\glsuseri +\let\glsation\glsuserii + +\newglossaryentry{firstuse}{% + name={First use\ifirstuse}, + sort={first use},% + text={first use},% + user1={first used}, + description={The first time a glossary entry is used (from the start + of the document or after a reset) with one of the + following commands: \ics{gls}, \ics{Gls}, \ics{GLS}, \ics{glspl}, + \ics{Glspl}, \ics{GLSpl} or \ics{glsdisp}. + \glsseeformat{firstuseflag,firstusetext}{}\nopostdesc}% +} + +\newglossaryentry{firstuseflag}{% +name={First use flag\ifirstuseflag}, +sort={first use flag},% +text={first use flag},% +description={A conditional that determines whether or not the entry +has been used according to the rules of \gls{firstuse}}% +} + +\newglossaryentry{firstusetext}{% +name={First use text\ifirstusetext}, +sort={first use text},% +text={first use text},% +description={The text that is displayed on \gls{firstuse}, which is +governed by the \gloskey{first} and \gloskey{firstplural} keys of +\ics{newglossaryentry}. (May be overridden by +\ics{glsdisp}.)\nopostdesc}% +} + +\doxitem{Option}{option}{package options} +\doxitem{Counter}{counter}{glossary counters} +\doxitem{AbbrvStyle}{abbrvstyle}{abbreviation styles} + +\setcounter{IndexColumns}{2} + +\CheckSum{6805} + +\newcommand*{\ifirstuse}{\iterm{first use}} +\newcommand*{\firstuse}{\gls{firstuse}} +\newcommand*{\firstuseflag}{\gls{firstuseflag}} +\newcommand*{\firstusetext}{\gls{firstusetext}} + +\newcommand*{\ifirstuseflag}{\iterm{first use>flag}} +\newcommand*{\ifirstusetext}{\iterm{first use>text}} + +\newcommand*{\istkey}[1]{\appfmt{#1}\index{makeindex=\appfmt{makeindex}>#1=\texttt{#1}|hyperpage}} +\newcommand*{\locfmt}[1]{\texttt{#1}\SpecialMainIndex{#1}} +\newcommand*{\mkidxspch}{\index{makeindex=\appfmt{makeindex}>special characters|hyperpage}} + +\newcommand*{\igloskey}[2][newglossaryentry]{\icsopt{#1}{#2}} +\newcommand*{\gloskey}[2][newglossaryentry]{\csopt{#1}{#2}} + +\newcommand*{\glostyle}[1]{\textsf{#1}\index{glossary styles:>#1={\protect\sffamily#1}|main}} + +\newcommand*{\acrstyle}[1]{\textsf{#1}\index{acronym +styles (glossaries):>#1={\protect\ttfamily#1}|main}} + +\newcommand*{\abbrstyle}[1]{\textsf{#1}\index{abbreviation styles:>#1={\protect\sffamily#1}|main}} + +\newcommand*{\category}[1]{\textsf{#1}\index{entry categories:>#1={\protect\sffamily#1}|main}} + +\newcommand*{\catattr}[1]{\textsf{#1}\index{category attributes:>#1={\protect\sffamily#1}|main}} + +\GlossaryPrologue{% + \chapter*{{Change History}}% + \markboth{{Change History}}{{Change History}}% + \phantomsection + \addcontentsline{toc}{chapter}{Change History}% + \raggedright +} + +\title{glossaries-extra.sty v1.0: + documented code} +\author{Nicola L.C. Talbot\\[10pt] +Dickimaw Books\\ +\url{http://www.dickimaw-books.com/}} + +\date{2016-01-24} + +\begin{document} +\DocInput{glossaries-extra.dtx} +\end{document} +%</driver> +%\fi +%\MakeShortVerb{"} +%\DeleteShortVerb{\|} +% +% \maketitle +% +%\begin{abstract} +%This is the documented code for the \sty{glossaries-extra} package. +%See glossaries-extra-manual.pdf for the user manual. +% +%\begin{important} +%This package is experimental and not stable. It's provided for +%testing purposes only. Future versions may not be compatible with +%this version. Once it has stabilised I'll add it to CTAN, at which +%point compatibility with the first stable version will be +%maintained. +%\end{important} +%\end{abstract} +% +%\tableofcontents +% +%\StopEventually{% +% \printglossaries +% \PrintChanges +% \PrintIndex +%} +% +% +% +%\chapter{Main Package Code} +%\iffalse +% \begin{macrocode} +%<*glossaries-extra.sty> +% \end{macrocode} +%\fi +%\changes{0.1}{2015-11-22}{Initial experimental release} +%\section{Package Initialisation and Options} +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-extra}[2016/01/24 v1.0 (NLCT)] +% \end{macrocode} +% Requires \sty{xkeyval} to define package options. +% \begin{macrocode} +\RequirePackage{xkeyval} +% \end{macrocode} +% Requires \sty{etoolbox} package. +% \begin{macrocode} +\RequirePackage{etoolbox} +% \end{macrocode} +% Has \sty{glossaries} already been loaded? +% \begin{macrocode} +\@ifpackageloaded{glossaries} +{% +% \end{macrocode} +% Already loaded so pass any options to \cs{setupglossaries}. +% This means that the options that can only be set when +% \sty{glossaries} is loaded can't be used. +% \begin{macrocode} + \newcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}% + \let\@glsxtr@declareoption\@gls@declareoption +} +{% +% \end{macrocode} +% Not already loaded, so pass options to \sty{glossaries}. +% \begin{macrocode} + \newcommand{\glsxtr@dooption}[1]{% + \PassOptionsToPackage{#1}{glossaries}% + }% +% \end{macrocode} +% Set the defaults. +% \begin{macrocode} + \PassOptionsToPackage{toc}{glossaries} + \PassOptionsToPackage{nopostdot}{glossaries} + \PassOptionsToPackage{noredefwarn}{glossaries} + \@ifpackageloaded{polyglossia}% + {}% + {% + \@ifpackageloaded{babel}% + {\PassOptionsToPackage{translate=babel}{glossaries}}% + {}% + }% + \newcommand*{\@glsxtr@declareoption}[2]{% + \DeclareOptionX{#1}{#2}% + \DeclareOption{#1}{#2}% + } +} +% \end{macrocode} +% Declare package options. +%\begin{macro}{\glsxtrundefaction} +% Determines what to do if an entry hasn't been defined. +% The two arguments are the error or warning message and the help +% message if an error should be produced. +% \begin{macrocode} +\newcommand*{\glsxtrundefaction}[2]{% + \@glsxtrundeftag\PackageError{glossaries-extra}{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtr@warnonexistsordo} +% If user wants \pkgopt[warn]{undefaction}, then \sty{glossaries} +% v4.19 is required. +% \begin{macrocode} +\newcommand*{\glsxtr@warnonexistsordo}[1]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrundeftag} +% Text to display when an entry doesn't exist. +% \begin{macrocode} +\newcommand*{\glsxtrundeftag}{??} +\newcommand*{\@glsxtrundeftag}{} +% \end{macrocode} +% This text is switched on at the start of the document to prevent +% unwanted text inserted into the preamble if any tests are made +% before the start of the document. +%\end{macro} +% \begin{macrocode} +\define@choicekey{glossaries-extra.sty}{undefaction}[\val\nr]% + {warn,error}% + {% + \ifcase\nr\relax + \renewcommand*{\glsxtrundefaction}[2]{% + \@glsxtrundeftag\GlossariesExtraWarning{##1}% + }% + \renewcommand*{\glsxtr@warnonexistsordo}[1]{% + \GlossariesExtraWarning{glossaries-extra}{% + \string##1\space hasn't been defined, so + some errors won't be converted to warnings. + (This most likely means your version of + glossaries.sty is below version 4.19.)}% + }% + \or + \renewcommand*{\glsxtrundefaction}[2]{% + \@glsxtrundeftag\PackageError{glossaries-extra}{##1}{##2}% + }% + \renewcommand*{\glsxtr@warnonexistsordo}[1]{}% + \fi + } +% \end{macrocode} +% +% By default don't allow entries to be defined in the document to +% encourage the user to define them in the preamble, but if the user +% is really determined to define them in the document allow them to +% request this. +% \begin{macrocode} +\define@boolkey{glossaries-extra.sty}[@glsxtr]{docdef}[true]{} +% \end{macrocode} +% +%\begin{option}{indexcrossrefs} +% Automatically index cross references at the end of the document +% \begin{macrocode} +\define@boolkey{glossaries-extra.sty}[@glsxtr]{indexcrossrefs}[true]{% + \if@glsxtrindexcrossrefs + \else + \renewcommand*{\@glsxtr@autoindexcrossrefs}{}% + \fi +} +% \end{macrocode} +%\end{option} +% Switch off since this can increase the build time. +% \begin{macrocode} +\@glsxtrindexcrossrefsfalse +% \end{macrocode} +% But allow \gloskey{see} key to switch it on automatically. +%\begin{macro}{\@glsxtr@autoindexcrossrefs} +%\changes{1.0}{2016-01-24}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@autoindexcrossrefs}{\@glsxtrindexcrossrefstrue} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlossariesExtraWarning} +%Allow users to suppress warnings. +% \begin{macrocode} +\newcommand*{\GlossariesExtraWarning}[1]{\PackageWarning{glossaries-extra}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlossariesExtraWarningNoLine} +%Allow users to suppress warnings. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\GlossariesExtraWarningNoLine}[1]{% + \PackageWarningNoLine{glossaries-extra}{#1}} +% \end{macrocode} +%\end{macro} +% +% \begin{macrocode} +\@glsxtr@declareoption{nowarn}{% + \let\GlossariesExtraWarning\@gobble + \let\GlossariesExtraWarningNoLine\@gobble + \glsxtr@dooption{nowarn}% +} +% \end{macrocode} +% +%\begin{macro}{\glsxtrabbrvtype} +% Glossary type for abbreviations. +% \begin{macrocode} +\newcommand*{\glsxtrabbrvtype}{\glsdefaulttype} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@abbreviationsdef} +% Set by \pkgopt{abbreviations} option. +% \begin{macrocode} +\newcommand*{\@glsxtr@abbreviationsdef}{} +% \end{macrocode} +%\end{macro} + +%\begin{macro}{\@glsxtr@doabbreviationsdef} +%\changes{0.5.3}{2015-12-09}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@doabbreviationsdef}{% + \@ifpackageloaded{babel}% + {\providecommand{\abbreviationsname}{\acronymname}}% + {\providecommand{\abbreviationsname}{Abbreviations}}% + \newglossary[glg-abr]{abbreviations}{gls-abr}{glo-abr}{\abbreviationsname}% + \renewcommand*{\glsxtrabbrvtype}{abbreviations}% + \newcommand*{\printabbreviations}[1][]{% + \printglossary[type=\glsxtrabbrvtype,##1]% + }% + \disable@keys{glossaries-extra.sty}{abbreviations}% +% \end{macrocode} +% If the \pkgopt{acronym} option hasn't been used, change +% \ics{acronymtype} to \ics{glsxtrabbrvtype}. +%\changes{0.4}{2015-12-03}{added redefinition of \cs{acronymtype}} +% \begin{macrocode} + \ifglsacronym + \else + \renewcommand*{\acronymtype}{\glsxtrabbrvtype}% + \fi +}% +% \end{macrocode} +%\end{macro} +% +%\begin{option}{abbreviations} +% If \pkgopt{abbreviations}, create a new glossary type for abbreviations. +% \begin{macrocode} +\@glsxtr@declareoption{abbreviations}{% + \let\@glsxtr@abbreviationsdef\@glsxtr@doabbreviationsdef +} +% \end{macrocode} +%\end{option} +% +%\begin{macro}{\GlsXtrDefineAbbreviationShortcuts} +% Enable shortcut commands for the abbreviations. Unlike the analogous +% command provided by \sty{glossaries}, this uses \cs{newcommand} +% instead of \cs{let} as a safety feature. +% \begin{macrocode} +\newcommand*{\GlsXtrDefineAbbreviationShortcuts}{% + \newcommand*{\ab}{\cgls}% + \newcommand*{\abp}{\cglspl}% + \newcommand*{\as}{\glsxtrshort}% + \newcommand*{\asp}{\glsxtrshortpl}% + \newcommand*{\al}{\glsxtrlong}% + \newcommand*{\alp}{\glsxtrlongpl}% + \newcommand*{\af}{\glsxtrfull}% + \newcommand*{\afp}{\glsxtrfullpl}% + \newcommand*{\Ab}{\cGls}% + \newcommand*{\Abp}{\cGlspl}% + \newcommand*{\As}{\Glsxtrshort}% + \newcommand*{\Asp}{\Glsxtrshortpl}% + \newcommand*{\Al}{\Glsxtrlong}% + \newcommand*{\Alp}{\Glsxtrlongpl}% + \newcommand*{\Af}{\Glsxtrfull}% + \newcommand*{\Afp}{\Glsxtrfullpl}% + \newcommand*{\AB}{\cGLS}% + \newcommand*{\ABP}{\cGLSpl}% + \newcommand*{\AS}{\GLSxtrshort}% + \newcommand*{\ASP}{\GLSxtrshortpl}% + \newcommand*{\AL}{\GLSxtrlong}% + \newcommand*{\ALP}{\GLSxtrlongpl}% + \newcommand*{\AF}{\GLSxtrfull}% + \newcommand*{\AFP}{\GLSxtrfullpl}% + \newcommand*{\newabbr}{\newabbreviation}% +% \end{macrocode} +% Disable this command after it's been used. +% \begin{macrocode} + \let\GlsXtrDefineAbbreviationShortcuts\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrDefineOtherShortcuts} +% Similarly provide shortcut versions for the commands provided by +% the \pkgopt{symbols} and \pkgopt{numbers} options. +% \begin{macrocode} +\newcommand*{\GlsXtrDefineOtherShortcuts}{% + \newcommand*{\newentry}{\newglossaryentry}% + \ifdef\printsymbols + {% + \newcommand*{\newsym}{\glsxtrnewsymbol}% + }{}% + \ifdef\printnumbers + {% + \newcommand*{\newnum}{\glsxtrnewnumber}% + }{}% + \let\GlsXtrDefineOtherShortcuts\relax +} +% \end{macrocode} +%\end{macro} +% +% Always use the long forms, not the shortcuts, where portablity is +% an issue. (For example, when defining entries in a file that may +% be input by multiple documents.) +% +%\begin{macro}{\@glsxtr@setupshortcuts} +% Command used to set the shortcuts option. +% \begin{macrocode} +\newcommand*{\@glsxtr@setupshortcuts}{} +% \end{macrocode} +%\end{macro} +% +%Provide \pkgopt{shortcuts} option. Unlike the \sty{glossaries} +%version, this is a choice rather than a boolean key but it also provides +%\pkgopt[true]{shortcuts} and \pkgopt[false]{shortcuts}, which are +%equivalent to \pkgopt[all]{shortcuts} and +%\pkgopt[none]{shortcuts}. Multiple use of this option in the +%\emph{same} option list will override each other. +% \begin{macrocode} +\define@choicekey{glossaries-extra.sty}{shortcuts}[\val\nr]% + {acronyms,acro,abbreviations,abbr,other,all,true,none,false}[true]{% + \ifcase\nr\relax % acronyms + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + }% + \or % acro + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + }% + \or % abbreviations + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineAbbreviationShortcuts + }% + \or % abbr + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineAbbreviationShortcuts + }% + \or % other + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineOtherShortcuts + }% + \or % all + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + \GlsXtrDefineAbbreviationShortcuts + \GlsXtrDefineOtherShortcuts + }% + \or % true + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + \GlsXtrDefineAbbreviationShortcuts + \GlsXtrDefineOtherShortcuts + }% + \else % none, false + \renewcommand*{\@glsxtr@setupshortcuts}{}% + \fi + } +% \end{macrocode} +% +%\begin{macro}{\@glsxtr@doaccsupp} +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@doaccsupp}{} +% \end{macrocode} +%\end{macro} +% +%\begin{option}{accsupp} +% If \pkgopt{accsupp}, load \sty{glossaries-accsupp} package. +% \begin{macrocode} +\@glsxtr@declareoption{accsupp}{% + \renewcommand*{\@glsxtr@doaccsupp}{\RequirePackage{glossaries-accsupp}}} +% \end{macrocode} +%\end{option} +% +%\begin{macro}{\glsxtrNoGlossaryWarning} +%\changes{0.3}{2015-12-02}{new} +% Warning text displayed in document if the external glossary file +% given by the argument is missing. +% \begin{macrocode} +\newcommand{\glsxtrNoGlossaryWarning}[1]{% + \@glsxtr@defaultnoglossarywarning{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{option}{nomissingglstext} +% If true, suppress the text produced if the external glossary file +% is missing. +% \begin{macrocode} +\define@choicekey{glossaries-extra.sty}{nomissingglstext}[\val\nr]% + {true,false}[true]{% + \ifcase\nr\relax % true + \renewcommand{\glsxtrNoGlossaryWarning}[1]{% + \null + }% + \else % false + \renewcommand{\glsxtrNoGlossaryWarning}[1]{% + \@glsxtr@defaultnoglossarywarning{#1}% + }% + \fi + } +% \end{macrocode} +%\end{option} +% +% Pass all other options to \sty{glossaries}. +% \begin{macrocode} +\DeclareOptionX*{% + \expandafter\glsxtr@dooption\expandafter{\CurrentOption}} +% \end{macrocode} +% Process options. +% \begin{macrocode} +\ProcessOptionsX +% \end{macrocode} +% Load \sty{glossaries} if not already loaded. +% \begin{macrocode} +\RequirePackage{glossaries} +% \end{macrocode} +% Load the \sty{glossaries-accsupp} package if required. +% \begin{macrocode} +\@glsxtr@doaccsupp +% \end{macrocode} +% +% Define abbreviations glossaries if required. +% \begin{macrocode} +\@glsxtr@abbreviationsdef +\let\@glsxtr@abbreviationsdef\relax +% \end{macrocode} +% Setup shortcuts if required. +% \begin{macrocode} +\@glsxtr@setupshortcuts +% \end{macrocode} +% +%\begin{macro}{\glossariesextrasetup} +%Allow user to set options after the package has been loaded. +% First modify \cs{glsxtr@dooption} so that it now uses +% \cs{setupglossaries}: +% \begin{macrocode} +\renewcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}% +% \end{macrocode} +% Now define the user command: +% \begin{macrocode} +\newcommand*{\glossariesextrasetup}[1]{% + \let\@glsxtr@setupshortcuts\relax + \setkeys{glossaries-extra.sty}{#1}% + \@glsxtr@abbreviationsdef + \let\@glsxtr@abbreviationsdef\relax + \@glsxtr@setupshortcuts +} +% \end{macrocode} +%\end{macro} +% +% Disable preamble-only options and switch on the undefined tag at +% the start of the document. +% \begin{macrocode} +\AtBeginDocument{% + \disable@keys{glossaries-extra.sty}{abbreviations}% + \def\@glsxtrundeftag{\glsxtrundeftag}% +} +% \end{macrocode} +% +%\section{Extra Utilities} +%\begin{macro}{\glsxtrifemptyglossary} +%\begin{definition} +%\cs{glsxtrifemptyglossary}\marg{type}\marg{true}\marg{false} +%\end{definition} +% Provide command to determine if any entries have been added to the +% glossary (where the glossary label is provided in the first +% argument). The entries are stored in the comma-separated list +% \cs{glolist@\meta{type}}. If this hasn't been defined, the glosary +% doesn't exist. If it has been defined and is simply a comma, the +% glossary exists and is empty. (It's initialised to a comma.) +%\changes{0.4}{2015-12-03}{new} +% \begin{macrocode} +\newcommand{\glsxtrifemptyglossary}[3]{% + \ifglossaryexists{#1}% + {% + \ifcsstring{glolist@#1}{,}{#2}{#3}% + }% + {% + \glsxtrundefaction{Glossary type `#1' doesn't exist}{}% + #2% + }% +} +% \end{macrocode} +%\end{macro} +% +%\section{Modifications to Commands Provided by \sty{glossaries}} +% Some of the commands provided by \sty{glossaries} are modified +% to take into account new options or to change default behaviour. +% +%\subsection{Existence Checks} +%\begin{macro}{\glsdoifexists} +% Modify \cs{glsdoifexists} to take account of the +% \pkgopt{undefaction} setting. +% \begin{macrocode} +\renewcommand{\glsdoifexists}[2]{% + \ifglsentryexists{#1}{#2}% + {% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry before + you can reference it.}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsdoifnoexists} +% Modify \cs{glsdoifnoexists} to take account of the +% \pkgopt{undefaction} setting. +% \begin{macrocode} +\renewcommand{\glsdoifnoexists}[2]{% + \ifglsentryexists{#1}{% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has already been defined}{}}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsdoifexistsordo} +% Modify \cs{glsdoifexistsordo} to take account of the +% \pkgopt{undefaction} setting. This command was introduced in +% \sty{glossaries} version 4.19, so check if it has been defined first. +% \begin{macrocode} +\ifdef\glsdoifexistsordo +{% + \renewcommand{\glsdoifexistsordo}[3]{% + \ifglsentryexists{#1}{#2}% + {% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry + before you can use it.}% + #3% + }% + }% +} +{% + \glsxtr@warnonexistsordo\glsdoifexistsordo + \newcommand{\glsdoifexistsordo}[3]{% + \ifglsentryexists{#1}{#2}% + {% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry + before you can use it.}% + #3% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\doifglossarynoexistsordo} +% Similarly for \cs{doifglossarynoexistsordo}. +% \begin{macrocode} +\ifdef\doifglossarynoexistsordo +{% + \renewcommand{\doifglossarynoexistsordo}[3]{% + \ifglossaryexists{#1}% + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + #3% + }% + {#2}% + }% +} +{% + \glsxtr@warnonexistsordo\doifglossarynoexistsordo + \newcommand{\doifglossarynoexistsordo}[3]{% + \ifglossaryexists{#1}% + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + #3% + }% + {#2}% + }% +} + +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@newglossaryentryposthook} +% Hook into end of \cs{newglossaryentry} to add \qt{see} value as a +% field. +%\changes{0.5.4}{2015-12-15}{added empty see value if not set and added +% `see' to field key map} +% \begin{macrocode} +\appto\@newglossaryentryposthook{% + \ifdefvoid\@glo@see + {\csxdef{glo@\@glo@label @see}{}}% + {% + \csxdef{glo@\@glo@label @see}{\@glo@see}% + \@glsxtr@autoindexcrossrefs + }% +} +\appto\@gls@keymap{,{see}{see}} +% \end{macrocode} +%\end{macro} +% +% Add all unused cross-references at the end of the document. +% \begin{macrocode} +\AtEndDocument{\if@glsxtrindexcrossrefs\glsxtraddallcrossrefs\fi} +% \end{macrocode} +% +%\begin{macro}{\glsxtraddallcrossrefs} +% Iterate through all used entries and if they have a +% cross-reference, make sure the cross-reference has been added. +% \begin{macrocode} +\newcommand*{\glsxtraddallcrossrefs}{% + \forallglossaries{\@glo@type}% + {% + \forglsentries[\@glo@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}{\@glsxtr@addunusedxrefs{\@glo@label}}{}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@addunusedxrefs} +% If the given entry has a see field add all unused +% cross-references. +% \begin{macrocode} +\newcommand*{\@glsxtr@addunusedxrefs}[1]{% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@see}% + \ifdefvoid\@glo@see + {}% + {% + \expandafter\glsxtr@addunused\@glo@see\@end@glsxtr@addunused + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@addunused} +% Adds all the entries if they haven't been used. +% \begin{macrocode} +\newcommand*{\glsxtr@addunused}[1][]{% + \@glsxtr@addunused +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@addunused} +% Adds all the entries if they haven't been used. +% \begin{macrocode} +\def\@glsxtr@addunused#1\@end@glsxtr@addunused{% + \@for\@glsxtr@label:=#1\do + {% + \ifglsused{\@glsxtr@label}{}% + {% + \glsadd[format=glsxtrunusedformat]{\@glsxtr@label}% + \glsunset{\@glsxtr@label}% + \@glsxtr@addunusedxrefs{\@glsxtr@label}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrunusedformat} +% \begin{macrocode} +\newcommand*{\glsxtrunusedformat}[1]{\unskip} +% \end{macrocode} +%\end{macro} +% +%\subsection{Document Definitions} +% +%\begin{macro}{\makenoidxglossaries} +%Modify \cs{makenoidxglossaries} so that it automatically switches +%off and disables the \pkgopt{docdef} key. +% \begin{macrocode} +\let\glsxtr@orgmakenoidxglossaries\makenoidxglossaries +\renewcommand{\makenoidxglossaries}{% + \glsxtr@orgmakenoidxglossaries + \@glsxtrdocdeffalse + \disable@keys{glossaries-extra.sty}{docdef}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\gls@defdocnewglossaryentry} +% Modify \cs{gls@defdocnewglossaryentry} so that it checks +% the \pkgopt{docdef} value. +% \begin{macrocode} +\renewcommand*{\gls@defdocnewglossaryentry}{% + \if@glsxtrdocdef +% \end{macrocode} +% Since the \gloskey{see} value is now saved in a field, it +% can be used by entries that have been defined in the document. +% \begin{macrocode} + \let\gls@checkseeallowed\relax + \let\newglossaryentry\new@glossaryentry + \else + \renewcommand*{\newglossaryentry}[2]{% + \PackageError{glossaries-extra}{Glossary entries must + be \MessageBreak defined in the preamble with \MessageBreak + package option `docdef=false'}{Move your glossary definitions to + the preamble. You can also put them in a \MessageBreak separate file + and load them with \string\loadglsentries.}% + }% + \fi +}% +% \end{macrocode} +%\end{macro} +% +% Permit a special form of document definition, but only allow +% it if the glossaries come at the end of the document. These +% commands behave a little like a combination of \cs{newterm} +% and \cs{gls}. This must be explicitly enabled with +% the following. +% +%\begin{macro}{\GlsXtrEnableOnTheFly} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrEnableOnTheFly}{% + \@ifstar\@sGlsXtrEnableOnTheFly\@GlsXtrEnableOnTheFly +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@sGlsXtrEnableOnTheFly} +%\changes{0.5.4}{2015-12-15}{new} +% The starred version attempts to allow UTF8 characters in the +% label, but this may break! (Formatting commands mustn't be used in the +% label, but the label may be a command whose replacement text is the +% actual label. This doesn't take into account a command that's +% defined in terms of another command that may eventually expand to +% the label text.) +% \begin{macrocode} +\newcommand*{\@sGlsXtrEnableOnTheFly}{% + \renewcommand*{\glsdetoklabel}[1]{% + \expandafter\@glsxtr@ifcsstart\string##1 \@glsxtr@end@ + {% + \expandafter\detokenize\expandafter{##1}% + }% + {\detokenize{##1}}% + }% + \@GlsXtrEnableOnTheFly +} +\def\@glsxtr@ifcsstart#1#2\@glsxtr@end@#3#4{% + \expandafter\if\glsbackslash#1% + #3% + \else + #4% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrstarflywarn} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\glsxtrstarflywarn}{% + \GlossariesExtraWarning{Experimental starred version of + \string\GlsXtrEnableOnTheFly\space in use (please ensure you have + read the warnings in the glossaries-extra user manual)}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GlsXtrEnableOnTheFly} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@GlsXtrEnableOnTheFly}{% +% \end{macrocode} +%\end{macro} +% Don't redefine \cs{glsdetoklabel} if LuaTeX or XeTeX is being +% used, since it's mainly to allow accented characters in the +% label. +% +% These definitions are all assigned the category given by: +%\begin{macro}{\glsxtrcat} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\glsxtrcat}{general} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\glsxtr}[1][]{% + \def\glsxtr@keylist{##1}% + \@glsxtr + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\@glsxtr}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\gls\expandafter[\glsxtr@keylist]{##2}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtr} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\Glsxtr}[1][]{% + \def\glsxtr@keylist{##1}% + \@Glsxtr + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\@Glsxtr}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\Gls\expandafter[\glsxtr@keylist]{##2}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpl} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\glsxtrpl}[1][]{% + \def\glsxtr@keylist{##1}% + \@glsxtrpl + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrpl} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\@glsxtrpl}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\glspl\expandafter[\glsxtr@keylist]{##2}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrpl} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\Glsxtrpl}[1][]{% + \def\glsxtr@keylist{##1}% + \@Glsxtrpl + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtrpl} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\@Glsxtrpl}[2][]{% + \ifglsentryexists{##2} + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\Glspl\expandafter[\glsxtr@keylist]{##2}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrWarning} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} + \newcommand*{\GlsXtrWarning}[2]{% + \def\@glsxtr@optlist{##1}% + \@onelevel@sanitize\@glsxtr@optlist + \GlossariesExtraWarning{The options `\@glsxtr@optlist' have + been ignored for entry `##2' as it has already been defined}% + } +% \end{macrocode} +%\end{macro} +% Disable commands after the glossary: +% \begin{macrocode} + \let\@glsxtr@orgprintglossary\@printglossary + \renewcommand\@printglossary[2]{% + \@glsxtr@orgprintglossary{##1}{##2}% + \def\@glsxtr{\@glsxtr@disabledflycommand\glsxtr}% + \def\@glsxtrpl{\@glsxtr@disabledflycommand\glsxtrpl}% + \def\@Glsxtr{\@glsxtr@disabledflycommand\Glsxtr}% + \def\@Glsxtrpl{\@glsxtr@disabledflycommand\Glsxtrpl}% + } +% \end{macrocode} +% +%\begin{macro}{\@glsxtr@disabledflycommand} +% \begin{macrocode} + \newcommand*{\@glsxtr@disabledflycommand}[1]{% + \PackageError{glossaries-extra}% + {\string##1\space can't be used after any of the \MessageBreak + glossaries have been displayed}% + {The on-the-fly commands enabled by + \string\GlsXtrEnableOnTheFly\space may only be used \MessageBreak + before the glossaries. If you want to use any entries \MessageBreak + after any of the glossaries, you must use the standard \MessageBreak + method of first defining the entry and then using the \MessageBreak + entry with commands like \string\gls}% + \@@glsxtr@disabledflycommand + }% + \newcommand*{\@@glsxtr@disabledflycommand}[2][]{##2} +% \end{macrocode} +%\end{macro} +% +% End of \cs{GlsXtrEnableOnTheFly}. Disable since it can only +% be used once. +% \begin{macrocode} + \let\GlsXtrEnableOnTheFly\relax +} +\@onlypreamble\GlsXtrEnableOnTheFly +% \end{macrocode} +% +%\subsection{Existing Glossary Style Modifications} +% +%\begin{macro}{\glslistdottedwidth} +%If \cs{glslistdottedwidth} has been defined and is currently equal +%to \verb|.5\hsize| then make the modification suggested in +%\href{http://www.dickimaw-books.com/cgi-bin/bugtracker.cgi?action=view&key=92}{bug report \#92} +% \begin{macrocode} +\ifdef\glslistdottedwidth +{% + \ifdim\glslistdottedwidth=.5\hsize + \setlength{\glslistdottedwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glslistdottedwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glslistdottedwidth}{.5\columnwidth}% + \fi + }% + \fi +} +{}% +% \end{macrocode} +%\end{macro} +% +%Similarly for \cs{glsdescwidth}: +%\begin{macro}{\glsdescwidth} +%\changes{0.5.3}{2015-12-09}{added} +% \begin{macrocode} +\ifdef\glsdescwidth +{% + \ifdim\glsdescwidth=.6\hsize + \setlength{\glsdescwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glsdescwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glsdescwidth}{.6\columnwidth}% + \fi + }% + \fi +} +{}% +% \end{macrocode} +%\end{macro} +%and for \cs{glspagelistwidth}: +%\begin{macro}{\glspagelistwidth} +%\changes{0.5.3}{2015-12-09}{added} +% \begin{macrocode} +\ifdef\glspagelistwidth +{% + \ifdim\glspagelistwidth=.1\hsize + \setlength{\glspagelistwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glspagelistwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glspagelistwidth}{.1\columnwidth}% + \fi + }% + \fi +} +{}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glossaryentrynumbers} +% Has the \pkgopt{nonumberlist} option been used? +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} + \def\org@glossaryentrynumbers#1{#1\gls@save@numberlist{#1}}% + \ifx\org@glossaryentrynumbers\glossaryentrynumbers + \glsnonumberlistfalse + \renewcommand*{\glossaryentrynumbers}[1]{% + \GlsXtrFormatLocationList{#1}\gls@save@numberlist{#1}}% + \else + \glsnonumberlisttrue + \renewcommand*{\glossaryentrynumbers}[1]{\gls@save@numberlist{#1}}% + \fi +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrFormatLocationList} +%\changes{0.5.2}{2015-12-08}{new} +% Provide an easy interface to change the format of the location +% list without removing the save number list stuff. +% \begin{macrocode} +\newcommand*{\GlsXtrFormatLocationList}[1]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\KV@printgloss@nonumberlist} +% Modify the \gloskey[printglossary]{nonumberlist} key to +% use \cs{GlsXtrFormatLocationList} (and also save the number list): +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\renewcommand*{\KV@printgloss@nonumberlist}[1]{% + \XKV@plfalse + \XKV@sttrue + \XKV@checkchoice[\XKV@resa]{#1}{true,false}% + {% + \csname glsnonumberlist\XKV@resa\endcsname + \ifglsnonumberlist + \def\glossaryentrynumbers##1{\gls@save@numberlist{##1}}% + \else + \def\glossaryentrynumbers##1{% + \GlsXtrFormatLocationList{##1}% + \gls@save@numberlist{##1}}% + \fi + }% +} +% \end{macrocode} +%\end{macro} +% +%\subsection{Entry Formatting, Hyperlinks and Indexing} +% +%\begin{macro}{\glsentryfmt} +% Change default entry format. Use the generic format for regular +% terms (that is, entries that have a category with the \catattr{regular} +% attribute set) or non-regular terms without a short value and use the abbreviation format for non-regular +% terms that have a short value. If further attributes need to be checked, then +% \cs{glsentryfmt} will need redefining as appropriate (or use +% \cs{defglsentryfmt}). +%\changes{0.3}{2015-12-02}{added check for short} +% The abbreviation format is set here for entries that have a short +% form, even if they are regular entries to ensure the abbreviation +% fonts are correct. +%\changes{0.5.2}{2015-12-08}{moved \cs{glssetabbrvfmt} from +%\cs{glsxtrabbrvfmt} to here} +% \begin{macrocode} +\renewcommand*{\glsentryfmt}{% + \ifglshasshort{\glslabel}{\glssetabbrvfmt{\glscategory{\glslabel}}}{}% + \glsifregular{\glslabel}% + {\glsgenentryfmt}% + {\ifglshasshort{\glslabel}{\glsxtrgenabbrvfmt}{\glsgenentryfmt}}% +} +% \end{macrocode} +%\end{macro} +% +% Commands like \cs{glsifplural} are only used by the \cs{gls}-like +% commands in the \sty{glossaries} package, but it might be useful +% for the postlink hook to know if the user has used, say, +% \cs{glsfirst} or \cs{glsplural}. This can provide better +% consistency with the formatting of the \cs{gls}-like commands, +% even though they don't use \cs{glsentryfmt}. +% +%\begin{macro}{\@gls@field@link} +% Redefine \cs{@gls@field@link} so that commands like \cs{glsfirst} +% can setup \cs{glsxtrifwasfirstuse} etc to allow the postlink hook +% to work better. This now has an optional argument that sets up the +% defaults. +%\changes{0.3}{2015-12-02}{added optional argument} +% \begin{macrocode} +\renewcommand{\@gls@field@link}[4][]{% + \glsdoifexists{#3}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \def\glscustomtext{#4}% + \@glsxtr@field@linkdefs + #1% + \@gls@link[#2]{#3}{#4}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@field@linkdefs} +% Default settings for \cs{@gls@field@link} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@field@linkdefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty +} +% \end{macrocode} +%\end{macro} +% +%Redefine the field link commands that need to modify the above. +%\begin{macro}{\@GLStext@} +% All uppercase version of \cs{glstext}. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLStext@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdofthree]{#1}{#2}% + {\mfirstucMakeUppercase{\glsentrytext{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glstext@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glstext@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@secondofthree]{#1}{#2}% + {\Glsentrytext{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsfirst@} +% No case changing version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@glsfirst@#1#2[#3]{% + \@gls@field@link[\let\glsxtrifwasfirstuse\@firstoftwo]{#1}{#2}% + {\glsentryfirst{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsfirst@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsfirst@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glscapscase\@secondofthree + ]% + {#1}{#2}{\Glsentryfirst{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSfirst@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSfirst@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glscapscase\@thirdofthree + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryfirst{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsplural} +% No case changing version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@glsplural#1#2[#3]{% + \@gls@field@link[\let\glsifplural\@firstoftwo]{#1}{#2}% + {\glsentryplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsplural} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsplural#1#2[#3]{% + \@gls@field@link + [\let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + ]% + {#1}{#2}{\Glsentryplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSplural} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSplural#1#2[#3]{% + \@gls@field@link + [\let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryplural{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsfirstplural@} +% No case changing version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + ]% + {#1}{#2}{\glsentryfirstplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsfirstplural@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + ]% + {#1}{#2}{\Glsentryfirstplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsfirstplural@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryfirstplural{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsname@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsname@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryname{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSname@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSname@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryname{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsdesc@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsdesc@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentrydesc{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSdesc@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentrydesc{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsdescplural@} +% No case-changing version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@glsdescplural@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\glsentrydescplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsdescplural@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsdescplural@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\Glsentrydescplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSdescplural@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@thirdoftwo + \let\glsifplural\@firstoftwo + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentrydescplural{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glssymbol@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glssymbol@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentrysymbol{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSsymbol@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbol{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glssymbolplural@} +% No case-changing version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@glssymbolplural@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\glsentrysymbolplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glssymbolplural@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glssymbolplural@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\Glsentrysymbolplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSsymbolplural@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@thirdoftwo + \let\glsifplural\@firstoftwo + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuseri@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsuseri@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseri{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuseri@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSuseri@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuserii@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsuserii@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuserii{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuserii@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSuserii@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuseriii@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsuseriii@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseriii{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuseriii@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSuseriii@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuseriv@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsuseriv@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseriv{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuseriv@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSuseriv@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuserv@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsuserv@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuserv{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuserv@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSuserv@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuservi@} +% First letter uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@Glsuservi@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuservi{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuservi@} +% All uppercase version. +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\def\@GLSuservi@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% +%Commands like \cs{acrshort} already set \cs{glsifplural}, but they +%don't set \cs{glsxtrifwasfirstuse} so they need adjusting. +% +%\begin{macro}{\@acrshort} +%\changes{0.3}{2015-12-02}{added redefinition} +% No case change. +% \begin{macrocode} +\def\@acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Acrshort} +%\changes{0.3}{2015-12-02}{added redefinition} +% First letter uppercase. +% \begin{macrocode} +\def\@Acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@ACRshort} +%\changes{0.3}{2015-12-02}{added redefinition} +% All uppercase. +% \begin{macrocode} +\def\@ACRshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccessshort{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@acrshortpl} +%\changes{0.3}{2015-12-02}{added redefinition} +% No case change. +% \begin{macrocode} +\def\@acrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Acrshortpl} +%\changes{0.3}{2015-12-02}{added redefinition} +% First letter uppercase. +% \begin{macrocode} +\def\@Acrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@ACRshortpl} +%\changes{0.3}{2015-12-02}{added redefinition} +% All uppercase. +% \begin{macrocode} +\def\@ACRshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccessshortpl{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@acrlong} +%\changes{0.3}{2015-12-02}{added redefinition} +% No case change. +% \begin{macrocode} +\def\@acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccesslong{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Acrlong} +%\changes{0.3}{2015-12-02}{added redefinition} +% First letter uppercase. +% \begin{macrocode} +\def\@Acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccesslong{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@ACRlong} +%\changes{0.3}{2015-12-02}{added redefinition} +% All uppercase. +% \begin{macrocode} +\def\@ACRlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccesslong{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@acrlongpl} +%\changes{0.3}{2015-12-02}{added redefinition} +% No case change. +% \begin{macrocode} +\def\@acrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccesslongpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Acrlongpl} +%\changes{0.3}{2015-12-02}{added redefinition} +% First letter uppercase. +% \begin{macrocode} +\def\@Acrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccesslongpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@ACRlongpl} +%\changes{0.3}{2015-12-02}{added redefinition} +% All uppercase. +% \begin{macrocode} +\def\@ACRlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccesslongpl{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%Modify \cs{@glsaddkey} so additional keys provided by the user can +%be treated in a similar way. +%\begin{macro}{\@glsaddkey} +% \begin{macrocode} +\renewcommand*{\@glsaddkey}[7]{% + \key@ifundefined{glossentry}{#1}% + {% + \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}% + \appto\@gls@keymap{,{#1}{#1}}% + \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}% + \appto\@newglossaryentryposthook{% + \letcs{\@glo@tmp}{@glo@#1}% + \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}% + }% + \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + \newcommand*{#4}[1]{\@Gls@entry@field{##1}{#1}}% +% \end{macrocode} +% Now for the commands with links. First the version with no case +% change (same as before): +% \begin{macrocode} + \ifcsdef{@gls@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#5' as helper command + `\expandafter\string\csname @gls@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @gls@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@gls@user@#1@}{##1}{##2}}% + {\csuse{@gls@user@#1@}{##1}{##2}[]}}% + \csdef{@gls@user@#1@}##1##2[##3]{% + \@gls@field@link{##1}{##2}{#3{##2}##3}% + }% + \newrobustcmd*{#5}{% + \expandafter\@gls@hyp@opt\csname @gls@user@#1\endcsname}% + }% +% \end{macrocode} +% Next the version with the first letter converted to upper case +% (modified): +% \begin{macrocode} + \ifcsdef{@Gls@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#6' as helper command + `\expandafter\string\csname @Gls@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @Gls@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@Gls@user@#1@}{##1}{##2}}% + {\csuse{@Gls@user@#1@}{##1}{##2}[]}}% + \csdef{@Gls@user@#1@}##1##2[##3]{% + \@gls@field@link[\let\glscapscase\@secondofthree]% + {##1}{##2}{#4{##2}##3}% + }% + \newrobustcmd*{#6}{% + \expandafter\@gls@hyp@opt\csname @Gls@user@#1\endcsname}% + }% +% \end{macrocode} +% Finally the all caps version (modified): +% \begin{macrocode} + \ifcsdef{@GLS@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#7' as helper command + `\expandafter\string\csname @GLS@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @GLS@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@GLS@user@#1@}{##1}{##2}}% + {\csuse{@GLS@user@#1@}{##1}{##2}[]}}% + \csdef{@GLS@user@#1@}##1##2[##3]{% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {##1}{##2}{\mfirstucMakeUppercase{#3{##2}##3}}% + }% + \newrobustcmd*{#7}{% + \expandafter\@gls@hyp@opt\csname @GLS@user@#1\endcsname}% + }% + }% + {% + \PackageError{glossaries-extra}{Key `#1' already exists}{}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@link@nocheckfirsthyper} +% Old versions of \sty{glossaries} don't define +% this, so provide it just in case it hasn't been defined. +% \begin{macrocode} +\providecommand*{\@gls@link@nocheckfirsthyper}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@link@checkfirsthyper} +% Modify check to determine if the hyperlink should be automatically +% suppressed, but save the original in case the acronyms are restored. +% \begin{macrocode} +\let\@glsxtr@org@checkfirsthyper\@gls@link@checkfirsthyper +\renewcommand*{\@gls@link@checkfirsthyper}{% +% \end{macrocode} +% \cs{ifglsused} isn't useful in the post link hook as it's already +% been unset by then, so define a command that can be used in the +% post link hook. Since \cs{@gls@link@checkfirsthyper} is only used +% by commands like \cs{gls} but not by other commands, this seems +% the best place to put it. +% \begin{macrocode} + \ifglsused{\glslabel}% + {\let\glsxtrifwasfirstuse\@secondoftwo} + {\let\glsxtrifwasfirstuse\@firstoftwo}% +% \end{macrocode} +% Store the category label for convenience. +% \begin{macrocode} + \edef\glscategorylabel{\glscategory{\glslabel}}% + \ifglsused{\glslabel}% + {% + \glsifcategoryattribute{\glscategorylabel}{nohypernext}{true}% + {\KV@glslink@hyperfalse}{}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{nohyperfirst}{true}% + {\KV@glslink@hyperfalse}{}% + }% + \glslinkcheckfirsthyperhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\do@glsdisablehyperinlist} +% This command was introduced in \sty{glossaries} v4.19. If it +% hasn't been defined, we're using an earlier version, in which case +% the \catattr{nohyper} attribute can't be implemented. +% \begin{macrocode} +\ifdef\do@glsdisablehyperinlist +{% + \let\@glsxtr@do@glsdisablehyperinlist\do@glsdisablehyperinlist + \renewcommand*{\do@glsdisablehyperinlist}{% + \@glsxtr@do@glsdisablehyperinlist + \glsifattribute{\glslabel}{nohyper}{true}{\KV@glslink@hyperfalse}{}% + } +} +{} +% \end{macrocode} +%\end{macro} +% +% Define a \gloskey[glslink]{noindex} key to prevent writing information to the +% external file. +% \begin{macrocode} +\define@boolkey{glslink}{noindex}[true]{} +\KV@glslink@noindexfalse +% \end{macrocode} +% +%If \cs{@gls@setdefault@glslink@opts} has been defined +%(\sty{glossaries} v4.20) use it to set the default keys in +%\cs{@glslink}. +%\begin{macro}{\@gls@setdefault@glslink@opts} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\ifdef\@gls@setdefault@glslink@opts +{ + \renewcommand*{\@gls@setdefault@glslink@opts}{% + \KV@glslink@noindexfalse + } +} +{ +% \end{macrocode} +% Not defined so prepend it to \cs{do@glsdisablehyperinlist} to +% achieve the same effect. +% \begin{macrocode} + \newcommand*{\@gls@setdefault@glslink@opts}{% + \KV@glslink@noindexfalse + } + \preto\do@glsdisablehyperinlist{\@gls@setdefault@glslink@opts} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetDefaultGlsOpts} +%\changes{0.5.4}{2015-12-15}{new} +% Set the default options for \cs{glslink} etc. +% \begin{macrocode} +\newcommand*{\GlsXtrSetDefaultGlsOpts}[1]{% + \renewcommand*{\@gls@setdefault@glslink@opts}{\setkeys{glslink}{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifindexing} +% Provide user level command to access it in \cs{glswriteentry}. +% \begin{macrocode} +\newcommand*{\glsxtrifindexing}[2]{% + \ifKV@glslink@noindex #2\else #1\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glswriteentry} +% Redefine to test for \catattr{indexonlyfirst} category attribute. +% \begin{macrocode} +\renewcommand*{\glswriteentry}[2]{% + \glsxtrifindexing + {% + \ifglsindexonlyfirst + \ifglsused{#1} + {\glsxtrdoautoindexname{#1}{dualindex}}% + {#2}% + \else + \glsifattribute{#1}{indexonlyfirst}{true}% + {\ifglsused{#1} + {\glsxtrdoautoindexname{#1}{dualindex}}% + {#2}}% + {#2}% + \fi + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@do@@wrglossary} +% Hook into glossary indexing command so that it can also use +% \ics{index} at the same time if required and add user hook. +% \begin{macrocode} +\appto\@@do@@wrglossary{\@glsxtr@do@@wrindex + \glsxtrdowrglossaryhook{\@gls@label}% +} +% \end{macrocode} +% (The label can be obtained from \cs{@gls@label} at this point.) +%\end{macro} +% Similarly for the \qt{noidx} version: +%\begin{macro}{\gls@noidxglossary} +% \begin{macrocode} +\appto\gls@noidxglossary{\@glsxtr@do@@wrindex + \glsxtrdowrglossaryhook{\@gls@label}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@do@@wrindex} +% \begin{macrocode} +\newcommand*{\@glsxtr@do@@wrindex}{% + \glsxtrdoautoindexname{\@gls@label}{dualindex}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdowrglossaryhook} +% Allow user to hook into indexing code. (Always used by +% \cs{glsadd}. Used by \cs{gls} when indexing, which may or may not occur +% depending on the indexing settings.) +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\glsxtrdowrglossaryhook}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@alt@hyp@opt} +%\changes{0.5.4}{2015-12-15}{new} +% Commands like \cs{gls} have a star or plus version. Provide a +% third symbol that the user can adapt for convenience. +% \begin{macrocode} +\newcommand*{\@gls@alt@hyp@opt}[1]{% + \let\glslinkvar\@firstofthree + \let\@gls@hyp@opt@cs#1\relax + \@ifstar{\s@gls@hyp@opt}% + {\@ifnextchar+% + {\@firstoftwo{\p@gls@hyp@opt}}% + {% + \expandafter\@ifnextchar\@gls@alt@hyp@opt@char + {\@firstoftwo{\@alt@gls@hyp@opt}}% + {#1}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@alt@gls@hyp@opt} +% User version +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@alt@gls@hyp@opt}[1][]{% + \let\glslinkvar\@firstofthree + \expandafter\@gls@hyp@opt@cs\expandafter[\@gls@alt@hyp@opt@keys,#1]} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@alt@hyp@opt@char} +%\changes{0.5.4}{2015-12-15}{new} +%Contains the character used as the command modifier. +% \begin{macrocode} +\newcommand*{\@gls@alt@hyp@opt@char}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@alt@hyp@opt@keys} +%\changes{0.5.4}{2015-12-15}{new} +%Contains the option list used as the command modifier. +% \begin{macrocode} +\newcommand*{\@gls@alt@hyp@opt@keys}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetAltModifier} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrSetAltModifier}[2]{% + \let\@gls@hyp@opt\@gls@alt@hyp@opt + \def\@gls@alt@hyp@opt@char{#1}% + \def\@gls@alt@hyp@opt@keys{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsdohyperlink} +% Unpleasant complications can occur if the \gloskey{text} or +% \gloskey{first} key etc contains \cs{gls}, particularly if there +% are hyperlinks. To get around this problem, patch +% \cs{glsdohyperlink} so that it temporarily makes \ics{gls} behave +% like \ics{glstext}\oarg{hyper=false,noindex}. (This will be +% overridden if the user explicitly cancels either of those options +% in the optional argument of \cs{gls} or using the plus version.) +% This also patches the short form commands like \cs{acrshort} +% and \cs{glsxtrshort} to use \cs{glsentryshort} and, similarly, the +% long form commands like \cs{acrlong} and \cs{glsxtrlong} to use +% \cs{glsentrylong}. +%\changes{0.5.4}{2015-12-15}{added} +% \begin{macrocode} +\renewcommand*{\glsdohyperlink}[2]{% + \hyperlink{#1}{{\glsxtrprotectlinks#2}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsdisablehyper} +%\changes{0.5.4}{2015-12-15}{added} +% Redefine in case we have an old version of \sty{glossaries}. +% \begin{macrocode} +\ifundef\glsdonohyperlink +{% + \renewcommand{\glsdisablehyper}{% + \KV@glslink@hyperfalse + \let\@glslink\glsdonohyperlink + \let\@glstarget\@secondoftwo + } +} +{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsdonohyperlink} +% This command was only introduced in \sty{glossaries} v4.20, so it may +% not be defined. For older \sty{glossaries} versions, this won't be +% used if \sty{hyperref} hasn't been loaded, which means the +% indexing will still take place. +%\changes{0.5.4}{2015-12-15}{added} +% \begin{macrocode} +\def\glsdonohyperlink#1#2{{\glsxtrprotectlinks #2}} +% \end{macrocode} +%\end{macro} +% +% Reset \cs{@glslink} with patched versions: +% \begin{macrocode} +\ifcsundef{hyperlink}% +{% + \let\@glslink\glsdonohyperlink +}% +{% + \let\@glslink\glsdohyperlink +} +% \end{macrocode} +% +%\begin{macro}{\glsxtrprotectlinks} +%\changes{0.5.4}{2015-12-15}{new} +% Make \cs{gls} (and variants) behave like the corresponding +% \cs{glstext} (and variants) with hyperlinking and indexing off. +% \begin{macrocode} +\newcommand*{\glsxtrprotectlinks}{% + \KV@glslink@hyperfalse + \KV@glslink@noindextrue + \let\@gls@\@glsxtr@p@text@ + \let\@Gls@\@Glsxtr@p@text@ + \let\@GLS@\@GLSxtr@p@text@ + \let\@glspl@\@glsxtr@p@plural@ + \let\@Glspl@\@Glsxtr@p@plural@ + \let\@GLSpl@\@GLSxtr@p@plural@ + \let\@glsxtrshort\@glsxtr@p@short@ + \let\@Glsxtrshort\@Glsxtr@p@short@ + \let\@GLSxtrshort\@GLSxtr@p@short@ + \let\@glsxtrlong\@glsxtr@p@long@ + \let\@Glsxtrlong\@Glsxtr@p@long@ + \let\@GLSxtrlong\@GLSxtr@p@long@ + \let\@glsxtrshortpl\@glsxtr@p@shortpl@ + \let\@Glsxtrshortpl\@Glsxtr@p@shortpl@ + \let\@GLSxtrshortpl\@GLSxtr@p@shortpl@ + \let\@glsxtrlongpl\@glsxtr@p@longpl@ + \let\@Glsxtrlongpl\@Glsxtr@p@longpl@ + \let\@GLSxtrlongpl\@GLSxtr@p@longpl@ + \let\@acrshort\@glsxtr@p@acrshort@ + \let\@Acrshort\@Glsxtr@p@acrshort@ + \let\@ACRshort\@GLSxtr@p@acrshort@ + \let\@acrshortpl\@glsxtr@p@acrshortpl@ + \let\@Acrshortpl\@Glsxtr@p@acrshortpl@ + \let\@ACRshortpl\@GLSxtr@p@acrshortpl@ + \let\@acrlong\@glsxtr@p@acrlong@ + \let\@Acrlong\@Glsxtr@p@acrlong@ + \let\@ACRlong\@GLSxtr@p@acrlong@ + \let\@acrlongpl\@glsxtr@p@acrlongpl@ + \let\@Acrlongpl\@Glsxtr@p@acrlongpl@ + \let\@ACRlongpl\@GLSxtr@p@acrlongpl@ +} +% \end{macrocode} +%\end{macro} +% +% These protected versions need grouping to prevent the label from +% getting confused. +%\begin{macro}{\@glsxtr@p@text@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@text@#1#2[#3]{{\@glstext@{#1}{#2}[#3]}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@text@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@text@#1#2[#3]{{\@Glstext@{#1}{#2}[#3]}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@text@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@text@#1#2[#3]{{\@GLStext@{#1}{#2}[#3]}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@plural@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@plural@#1#2[#3]{{\@glsplural@{#1}{#2}[#3]}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@plural@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@plural@#1#2[#3]{{\@Glsplural@{#1}{#2}[#3]}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@plural@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@plural@#1#2[#3]{{\@GLSplural@{#1}{#2}[#3]}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@short@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\glsentryshort{#2}}#3% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@short@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\Glsentryshort{#2}}#3% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@short@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \mfirstucMakeUppercase{\glsabbrvfont{\glsentryshort{#2}}#3}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@shortpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\glsentryshortpl{#2}}#3% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@shortpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\Glsentryshortpl{#2}}#3% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@shortpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \mfirstucMakeUppercase{\glsabbrvfont{\glsentryshortpl{#2}}#3}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@long@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@long@#1#2[#3]{{\glsentrylong{#2}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@long@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@long@#1#2[#3]{{\Glsentrylong{#2}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@long@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@long@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylong{#2}#3}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@longpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@longpl@#1#2[#3]{{\glsentrylongpl{#2}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@longpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@longpl@#1#2[#3]{{\Glsentrylongpl{#2}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@longpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@longpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylongpl{#2}#3}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@acrshort@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@acrshort@#1#2[#3]{{\acronymfont{\glsentryshort{#2}}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@acrshort@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@acrshort@#1#2[#3]{{\acronymfont{\Glsentryshort{#2}}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@acrshort@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@acrshort@#1#2[#3]{% + {\mfirstucMakeUppercase{\acronymfont{\glsentryshort{#2}}#3}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@acrshortpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@acrshortpl@#1#2[#3]{{\acronymfont{\glsentryshortpl{#2}}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@acrshortpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@acrshortpl@#1#2[#3]{{\acronymfont{\Glsentryshortpl{#2}}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@acrshortpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@acrshortpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\acronymfont{\glsentryshortpl{#2}}#3}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@acrlong@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@acrlong@#1#2[#3]{{\glsentrylong{#2}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@acrlong@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@acrlong@#1#2[#3]{{\Glsentrylong{#2}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@acrlong@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@acrlong@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylong{#2}#3}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@p@acrlongpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@glsxtr@p@acrlongpl@#1#2[#3]{{\glsentrylongpl{#2}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsxtr@p@acrlongpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@Glsxtr@p@acrlongpl@#1#2[#3]{{\Glsentrylongpl{#2}#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSxtr@p@acrlongpl@} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\def\@GLSxtr@p@acrlongpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylongpl{#2}#3}}} +% \end{macrocode} +%\end{macro} +% +%\subsection{Entry Counting} +% +% The entry counting mechanism from \sty{glossaries} is adjusted +% here to work with category attributes. Provide a convenient +% command to enable entry counting, set the \catattr{entrycount} +% attribute for given categories and redefine \ics{gls} etc to +% use \cs{cgls} instead. +% +% First adjust definitions of the unset and reset commands to +% provide a hook. +% +%\begin{macro}{\@glsunset} +% Global unset. +% \begin{macrocode} +\renewcommand*{\@glsunset}[1]{% + \@@glsunset{#1}% + \glsxtrpostunset{#1}% +}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrpostunset} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\glsxtrpostunset}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glslocalunset} +% Local unset. +% \begin{macrocode} + \renewcommand*{\@glslocalunset}[1]{% + \@@glslocalunset{#1}% + \glsxtrpostlocalunset{#1}% + }% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrpostlocalunset} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\glsxtrpostlocalunset}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsreset} +% Global reset. +% \begin{macrocode} +\renewcommand*{\@glsreset}[1]{% + \@@glsreset{#1}% + \glsxtrpostreset{#1}% +}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrpostreset} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\glsxtrpostreset}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glslocalreset} +% Local reset. +% \begin{macrocode} +\renewcommand*{\@glslocalreset}[1]{% + \@@glslocalreset{#1}% + \glsxtrpostlocalreset{#1}% +}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrpostlocalreset} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\glsxtrpostlocalreset}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrEnableEntryCounting} +% The first argument is the list of categories and the second +% argument is the value of the \catattr{entrycount} attribute. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrEnableEntryCounting}[2]{% +% \end{macrocode} +% Enable entry counting: +% \begin{macrocode} + \glsenableentrycount +% \end{macrocode} +% Redefine \cs{gls} etc: +% \begin{macrocode} + \renewcommand*{\gls}{\cgls}% + \renewcommand*{\Gls}{\cGls}% + \renewcommand*{\glspl}{\cglspl}% + \renewcommand*{\Glspl}{\cGlspl}% + \renewcommand*{\GLS}{\cGLS}% + \renewcommand*{\GLSpl}{\cGLSpl}% +% \end{macrocode} +% Set the \catattr{entrycount} attribute: +% \begin{macrocode} + \@glsxtr@setentrycountunsetattr{#1}{#2}% +% \end{macrocode} +% In case this command is used again: +% \begin{macrocode} + \let\GlsXtrEnableEntryCounting\@glsxtr@setentrycountunsetattr + \renewcommand*{\GlsXtrEnableEntryUnitCounting}[3]{% + \PackageError{glossaries-extra}{\string\GlsXtrEnableEntryUnitCounting\space + can't be used with \string\GlsXtrEnableEntryCounting}% + {Use one or other but not both commands}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@setentrycountunsetattr} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@setentrycountunsetattr}[2]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty{\@glsxtr@cat}{}% + {% + \glssetcategoryattribute{\@glsxtr@cat}{entrycount}{#2}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +% Redefine the entry counting commands to take into account the +%\catattr{entrycount} attribute. +%\begin{macro}{\glsenableentrycount} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\renewcommand*{\glsenableentrycount}{% +% \end{macrocode} +% Enable new fields: +% \begin{macrocode} + \appto\@newglossaryentry@defcounters{\@@newglossaryentry@defcounters}% +% \end{macrocode} +% Just in case the user has switched on the \pkgopt{docdef} option. +% \begin{macrocode} + \renewcommand*{\gls@defdocnewglossaryentry}{% + \renewcommand*\newglossaryentry[2]{% + \PackageError{glossaries}{\string\newglossaryentry\space + may only be used in the preamble when entry counting has + been activated}{If you use \string\glsenableentrycount\space + you must place all entry definitions in the preamble not in + the document environment}% + }% + }% +% \end{macrocode} +% New commands to access new fields: +% \begin{macrocode} + \newcommand*{\glsentrycurrcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@currcount}% + {0}{\@gls@entry@field{##1}{currcount}}% + }% + \newcommand*{\glsentryprevcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevcount}% + {0}{\@gls@entry@field{##1}{prevcount}}% + }% +% \end{macrocode} +% Adjust post unset and reset: +% \begin{macrocode} + \let\@glsxtr@entrycount@org@unset\glsxtrpostunset + \renewcommand*{\glsxtrpostunset}[1]{% + \@glsxtr@entrycount@org@unset{##1}% + \@gls@increment@currcount{##1}% + }% + \let\@glsxtr@entrycount@org@localunset\glsxtrpostlocalunset + \renewcommand*{\glsxtrpostlocalunset}[1]{% + \@glsxtr@entrycount@org@localunset{##1}% + \@gls@local@increment@currcount{##1}% + }% + \let\@glsxtr@entrycount@org@reset\glsxtrpostreset + \renewcommand*{\glsxtrpostreset}[1]{% + \@glsxtr@entrycount@org@reset{##1}% + \csgdef{glo@\glsdetoklabel{##1}@currcount}{0}% + }% + \let\@glsxtr@entrycount@org@localreset\glsxtrpostlocalreset + \renewcommand*{\glsxtrpostlocalreset}[1]{% + \@glsxtr@entrycount@org@localreset{##1}% + \csdef{glo@\glsdetoklabel{##1}@currcount}{0}% + }% +% \end{macrocode} +% Modifications to take into account the attributes that govern +% whether the entry should be unset. +% \begin{macrocode} + \let\@cgls@\@@cgls@ + \let\@cglspl@\@@cglspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGlspl@\@@cGlspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGLSpl@\@@cGLSpl@ +% \end{macrocode} +% The rest is as the original definition. +% \begin{macrocode} + \AtEndDocument{\@gls@write@entrycounts}% + \renewcommand*{\@gls@entry@count}[2]{% + \csgdef{glo@\glsdetoklabel{##1}@prevcount}{##2}% + }% + \let\glsenableentrycount\relax + \renewcommand*{\glsenableentryunitcount}{% + \PackageError{glossaries-extra}{\string\glsenableentryunitcount\space + can't be used with \string\glsenableentrycount}% + {Use one or other but not both commands}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@write@entrycounts} +% Modify this command so that it only writes the information for +% entries with the \catattr{entrycount} attribute and issue +% warning if no entries have this attribute set. +% \begin{macrocode} +\renewcommand*{\@gls@write@entrycounts}{% + \immediate\write\@auxout + {\string\providecommand*{\string\@gls@entry@count}[2]{}}% + \count@=0\relax + \forallglsentries{\@glsentry}{% + \glshasattribute{\@glsentry}{entrycount}% + {% + \ifglsused{\@glsentry}% + {% + \immediate\write\@auxout + {\string\@gls@entry@count{\@glsentry}{\glsentrycurrcount{\@glsentry}}}% + }% + {}% + \advance\count@ by \@ne + }% + {}% + }% + \ifnum\count@=0 + \GlossariesExtraWarningNoLine{Entry counting has been enabled + \MessageBreak with \string\glsenableentrycount\space but the + \MessageBreak attribute `entrycount' hasn't + \MessageBreak been assigned to any of the defined + \MessageBreak entries}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifcounttrigger} +%\begin{definition} +%\cs{glsxtrifcounttrigger}\marg{label}\marg{trigger format}\marg{normal} +%\end{definition} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\glsxtrifcounttrigger}[3]{% + \glshasattribute{#1}{entrycount}% + {% + \ifnum\glsentryprevcount{#1}>\glsgetattribute{#1}{entrycount}\relax + #3% + \else + #2% + \fi + }% + {#3}% +} +% \end{macrocode} +%\end{macro} +% +% Actual internal definitions of \cs{cgls} used when entry counting +% is enabled. +% +%\begin{macro}{\@@cgls@} +% \begin{macrocode} +\def\@@cgls@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cglsformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@gls@{#1}{#2}[#3]% + }% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@cgls@} +% \begin{macrocode} +\def\@@cglspl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cglsplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@glspl@{#1}{#2}[#3]% + }% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@cGls@} +% \begin{macrocode} +\def\@@cGls@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGlsformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@Gls@{#1}{#2}[#3]% + }% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@cGlspl@} +% \begin{macrocode} +\def\@@cGlspl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGlsplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@Glspl@{#1}{#2}[#3]% + }% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@cGLS@} +% \begin{macrocode} +\def\@@cGLS@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGLSformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@GLS@{#1}{#2}[#3]% + }% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@cGLSpl@} +% \begin{macrocode} +\def\@@cGLSpl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGLSplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@GLSpl@{#1}{#2}[#3]% + }% +}% +% +% Remove default warnings from \cs{cgls} etc so that it can be used +% interchangeable with \cs{gls} etc. +%\begin{macro}{\@cgls@} +% \begin{macrocode} +\def\@cgls@#1#2[#3]{\@gls@{#1}{#2}[#3]} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@cGls@} +% \begin{macrocode} +\def\@cGls@#1#2[#3]{\@Gls@{#1}{#2}[#3]} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@cglspl@} +% \begin{macrocode} +\def\@cglspl@#1#2[#3]{\@glspl@{#1}{#2}[#3]} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@cGlspl@} +% \begin{macrocode} +\def\@cGlspl@#1#2[#3]{\@Glspl@{#1}{#2}[#3]} +% \end{macrocode} +%\end{macro} +% +% Add all upper case versions not provided by \sty{glossaries}. +%\begin{macro}{\cGLS} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newrobustcmd*{\cGLS}{\@gls@hyp@opt\@cGLS} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@cGLS} +%\changes{0.5}{2015-12-07}{new} +% Defined the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\@cGLS}[2][]{% + \new@ifnextchar[{\@cGLS@{#1}{#2}}{\@cGLS@{#1}{#2}[]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@cGLS@} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\def\@cGLS@#1#2[#3]{\@GLS@{#1}{#2}[#3]} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\cGLSformat} +%\changes{0.5}{2015-12-07}{new} +% Format used by \cs{cGLS} if entry only used once on previous run. +% The first argument is the label, the second argument is the insert +% text. +% \begin{macrocode} +\newcommand*{\cGLSformat}[2]{% + \expandafter\mfirstucMakeUppercase\expandafter{\cglsformat{#1}{#2}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\cGLSpl} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newrobustcmd*{\cGLSpl}{\@gls@hyp@opt\@cGLSpl} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@cGLSpl} +%\changes{0.5}{2015-12-07}{new} +% Defined the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\@cGLSpl}[2][]{% + \new@ifnextchar[{\@cGLSpl@{#1}{#2}}{\@cGLSpl@{#1}{#2}[]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@cGLSpl@} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\def\@cGLSpl@#1#2[#3]{\@GLSpl@{#1}{#2}[#3]} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\cGLSplformat} +%\changes{0.5}{2015-12-07}{new} +% Format used by \cs{cGLSpl} if entry only used once on previous run. +% The first argument is the label, the second argument is the insert +% text. +% \begin{macrocode} +\newcommand*{\cGLSplformat}[2]{% + \expandafter\mfirstucMakeUppercase\expandafter{\cglsplformat{#1}{#2}}% +} +% \end{macrocode} +%\end{macro} +% +% Modify the trigger formats to check for the \catattr{regular} attribute. +%\begin{macro}{\cglsformat} +%\changes{0.5.4}{2015-12-15}{added} +% \begin{macrocode} +\renewcommand*{\cglsformat}[2]{% + \glsifregular{#1} + {\glsentryfirst{#1}}% + {\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}}#2% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\cGlsformat} +%\changes{0.5.4}{2015-12-15}{added} +% \begin{macrocode} +\renewcommand*{\cGlsformat}[2]{% + \glsifregular{#1} + {\Glsentryfirst{#1}}% + {\ifglshaslong{#1}{\Glsentrylong{#1}}{\Glsentryfirst{#1}}}#2% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\cglsplformat} +%\changes{0.5.4}{2015-12-15}{added} +% \begin{macrocode} +\renewcommand*{\cglsplformat}[2]{% + \glsifregular{#1} + {\glsentryfirstplural{#1}}% + {\ifglshaslong{#1}{\glsentrylongpl{#1}}{\glsentryfirstplural{#1}}}#2% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\cGlsplformat} +%\changes{0.5.4}{2015-12-15}{added} +% \begin{macrocode} +\renewcommand*{\cGlsplformat}[2]{% + \glsifregular{#1} + {\Glsentryfirstplural{#1}}% + {\ifglshaslong{#1}{\Glsentrylongpl{#1}}{\Glsentryfirstplural{#1}}}#2% +} +% \end{macrocode} +%\end{macro} +% +%New code similar to above for unit counting. +% +%\begin{macro}{\@@newglossaryentry@defunitcounters} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@@newglossaryentry@defunitcounters}{% + \edef\@glo@countunit{\csuse{@glsxtr@categoryattr@@\@glo@category @unitcount}}% + \ifdefvoid\@glo@countunit + {}% + {% + \@glsxtr@ifunitcounter{\@glo@countunit}% + {}% + {\expandafter\@glsxtr@addunitcounter\expandafter{\@glo@countunit}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@unitcountlist} +%\changes{0.5.4}{2015-12-15}{new} +% List to keep track of which counters are being used by the entry +% unit count facility. +% \begin{macrocode} +\newcommand*{\@glsxtr@unitcountlist}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@addunitcounter} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@addunitcounter}[1]{% + \listadd{\@glsxtr@unitcountlist}{#1}% + \ifcsundef{glsxtr@theunit@#1} + {% + \ifcsdef{theH#1}% + {\csdef{glsxtr@theunit@#1}{\csuse{theH#1}}}% + {\csdef{glsxtr@theunit@#1}{\csuse{the#1}}}% + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@ifunitcounter} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@ifunitcounter}[3]{% + \xifinlist{#1}{\@glsxtr@unitcountlist}{#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@currentunitcount} +% \begin{macrocode} +\newcommand*\@glsxtr@currentunitcount[1]{% + glo@\glsdetoklabel{#1}@currunit@\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@previousunitcount} +% \begin{macrocode} +\newcommand*\@glsxtr@previousunitcount[1]{% + glo@\glsdetoklabel{#1}@prevunit@\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@increment@currunitcount} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@gls@increment@currunitcount}[1]{% + \glshasattribute{#1}{unitcount}% + {% + \edef\@glsxtr@csname{\@glsxtr@currentunitcount{#1}}% + \ifcsundef{\@glsxtr@csname}% + {% + \csgdef{\@glsxtr@csname}{1}% + \listcsxadd + {glo@\glsdetoklabel{#1}@unitlist}% + {\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% + }% + }% + {% + \csxdef{\@glsxtr@csname}% + {\number\numexpr\csname\@glsxtr@csname\endcsname+1}% + }% + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@local@increment@currunitcount} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@gls@local@increment@currunitcount}[1]{% + \glshasattribute{#1}{unitcount}% + {% + \edef\@glsxtr@csname{\@glsxtr@currentunitcount{#1}}% + \ifcsundef{\@glsxtr@csname}% + {% + \csdef{\@glsxtr@csname}{1}% + \listcseadd + {glo@\glsdetoklabel{#1}@unitlist}% + {\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% + }% + }% + {% + \csedef{\@glsxtr@csname}% + {\number\numexpr\csname\@glsxtr@csname\endcsname+1}% + }% + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@currunitcount} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@currunitcount}[2]{% + \ifcsundef + {glo@\glsdetoklabel{#1}@currunit@#2}% + {0}% + {\csuse{glo@\glsdetoklabel{#1}@currunit@#2}}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@prevunitcount} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@prevunitcount}[2]{% + \ifcsundef + {glo@\glsdetoklabel{#1}@prevunit@#2}% + {0}% + {\csuse{glo@\glsdetoklabel{#1}@prevunit@#2}}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsenableentryunitcount} +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\glsenableentryunitcount}{% +% \end{macrocode} +% Enable new fields: +% \begin{macrocode} + \appto\@newglossaryentry@defcounters{\@@newglossaryentry@defunitcounters}% +% \end{macrocode} +% Just in case the user has switched on the \pkgopt{docdef} option. +% \begin{macrocode} + \renewcommand*{\gls@defdocnewglossaryentry}{% + \renewcommand*\newglossaryentry[2]{% + \PackageError{glossaries}{\string\newglossaryentry\space + may only be used in the preamble when entry counting has + been activated}{If you use \string\glsenableentryunitcount\space + you must place all entry definitions in the preamble not in + the document environment}% + }% + }% +% \end{macrocode} +% New commands to access new fields: +% \begin{macrocode} + \newcommand*{\glsentrycurrcount}[1]{% + \@glsxtr@currunitcount{##1}{\glsgetattribute{##1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{##1}{unitcount}}}% + }% + \newcommand*{\glsentryprevcount}[1]{% + \@glsxtr@prevunitcount{##1}{\glsgetattribute{##1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{##1}{unitcount}}}% + }% +% \end{macrocode} +% Access total count: +% \begin{macrocode} + \newcommand*{\glsentryprevtotalcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunittotal}% + {0}% + {% + \number\csuse{glo@\glsdetoklabel{##1}@prevunittotal} + }% + }% +% \end{macrocode} +% Access max value: +% \begin{macrocode} + \newcommand*{\glsentryprevmaxcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunitmax}% + {0}% + {% + \number\csuse{glo@\glsdetoklabel{##1}@prevunitmax} + }% + }% +% \end{macrocode} +% Adjust post unset and reset: +% \begin{macrocode} + \let\@glsxtr@entryunitcount@org@unset\glsxtrpostunset + \renewcommand*{\glsxtrpostunset}[1]{% + \@glsxtr@entryunitcount@org@unset{##1}% + \@gls@increment@currunitcount{##1}% + }% + \let\@glsxtr@entryunitcount@org@localunset\glsxtrpostlocalunset + \renewcommand*{\glsxtrpostlocalunset}[1]{% + \@glsxtr@entryunitcount@org@localunset{##1}% + \@gls@local@increment@currunitcount{##1}% + }% + \let\@glsxtr@entryunitcount@org@reset\glsxtrpostreset + \renewcommand*{\glsxtrpostreset}[1]{% + \glshasattribute{##1}{unitcount}% + {% + \edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}% + \ifcsundef{\@glsxtr@csname}% + {}% + {\csgdef{\@glsxtr@csname}{0}}% + }% + {}% + }% + \let\@glsxtr@entryunitcount@org@localreset\glsxtrpostlocalreset + \renewcommand*{\glsxtrpostlocalreset}[1]{% + \@glsxtr@entryunitcount@org@localreset{##1}% + \glshasattribute{##1}{unitcount}% + {% + \edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}% + \ifcsundef{\@glsxtr@csname}% + {}% + {\csdef{\@glsxtr@csname}{0}}% + }% + {}% + }% +% \end{macrocode} +% Modifications to take into account the attributes that govern +% whether the entry should be unset. +% \begin{macrocode} + \let\@cgls@\@@cgls@ + \let\@cglspl@\@@cglspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGlspl@\@@cGlspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGLSpl@\@@cGLSpl@ +% \end{macrocode} +% Write information to the aux file. +% \begin{macrocode} + \AtEndDocument{\@gls@write@entryunitcounts}% + \renewcommand*{\@gls@entry@unitcount}[3]{% + \csgdef{glo@\glsdetoklabel{##1}@prevunit@##3}{##2}% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunittotal}% + {\csgdef{glo@\glsdetoklabel{##1}@prevunittotal}{##2}}% + {% + \csxdef{glo@\glsdetoklabel{##1}@prevunittotal}{ + \number\numexpr\csuse{glo@\glsdetoklabel{##1}@prevunittotal}+##2}% + }% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunitmax}% + {\csgdef{glo@\glsdetoklabel{##1}@prevunitmax}{##2}}% + {% + \ifnum\csuse{glo@\glsdetoklabel{##1}@prevunitmax}<##2 + \csgdef{glo@\glsdetoklabel{##1}@prevunitmax}{##2}% + \fi + }% + }% + \let\glsenableentryunitcount\relax + \renewcommand*{\glsenableentrycount}{% + \PackageError{glossaries-extra}{\string\glsenableentrycount\space + can't be used with \string\glsenableentryunitcount}% + {Use one or other but not both commands}% + }% +} +\@onlypreamble\glsenableentryunitcount +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@entry@unitcount} +% \begin{macrocode} +\newcommand*{\@gls@entry@unitcount}[3]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@write@entryunitcounts@do} +% \begin{macrocode} +\newcommand*{\@gls@write@entryunitcounts@do}[1]{% + \immediate\write\@auxout + {\string\@gls@entry@unitcount + {\@glsentry}% + {\@glsxtr@currunitcount{\@glsentry}{#1}% + }% + {#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@write@entryunitcounts} +% \begin{macrocode} +\newcommand*{\@gls@write@entryunitcounts}{% + \immediate\write\@auxout + {\string\providecommand*{\string\@gls@entry@unitcount}[3]{}}% + \count@=0\relax + \forallglsentries{\@glsentry}{% + \glshasattribute{\@glsentry}{unitcount}% + {% + \ifglsused{\@glsentry}% + {% + \forlistcsloop + {\@gls@write@entryunitcounts@do}% + {glo@\glsdetoklabel{\@glsentry}@unitlist}% + }% + {}% + \advance\count@ by \@ne + }% + {}% + }% + \ifnum\count@=0 + \GlossariesExtraWarningNoLine{Entry counting has been enabled + \MessageBreak with \string\glsenableentryunitcount\space but the + \MessageBreak attribute `unitcount' hasn't + \MessageBreak been assigned to any of the defined + \MessageBreak entries}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrEnableEntryUnitCounting} +% The first argument is the list of categories, the second +% argument is the value of the \catattr{entrycount} attribute +% and the third is the counter name. +%\changes{0.5.4}{2015-12-15}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrEnableEntryUnitCounting}[3]{% +% \end{macrocode} +% Enable entry counting: +% \begin{macrocode} + \glsenableentryunitcount +% \end{macrocode} +% Redefine \cs{gls} etc: +% \begin{macrocode} + \renewcommand*{\gls}{\cgls}% + \renewcommand*{\Gls}{\cGls}% + \renewcommand*{\glspl}{\cglspl}% + \renewcommand*{\Glspl}{\cGlspl}% + \renewcommand*{\GLS}{\cGLS}% + \renewcommand*{\GLSpl}{\cGLSpl}% +% \end{macrocode} +% Set the \catattr{entrycount} attribute: +% \begin{macrocode} + \@glsxtr@setentryunitcountunsetattr{#1}{#2}{#3}% +% \end{macrocode} +% In case this command is used again: +% \begin{macrocode} + \let\GlsXtrEnableEntryUnitCounting\@glsxtr@setentryunitcountunsetattr + \renewcommand*{\GlsXtrEnableEntryCounting}[2]{% + \PackageError{glossaries-extra}{\string\GlsXtrEnableEntryCounting\space + can't be used with \string\GlsXtrEnableEntryUnitCounting}% + {Use one or other but not both commands}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@setentryunitcountunsetattr} +%\changes{0.5.4}{}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@setentryunitcountunsetattr}[3]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty{\@glsxtr@cat}{}% + {% + \glssetcategoryattribute{\@glsxtr@cat}{entrycount}{#2}% + \glssetcategoryattribute{\@glsxtr@cat}{unitcount}{#3}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +% +%\subsection{Acronym Modifications} +% It's more consistent to use the abbreviation code for acronyms, +% but make some adjustments to allow for continued use of the +% \sty{glossaries} package's custom acronym format. (For example, +% user may already have defined some acronym styles with +% \cs{newacronymstyle} which they would like to continue to use.) +% The original \sty{glossaries} acronym code can be restored +% with \cs{RestoreAcronyms}, but adjust \cs{SetGenericNewAcronym} +% so that \cs{newacronym} adds the category. +% +%\begin{macro}{\SetGenericNewAcronym} +% \begin{macrocode} +\renewcommand*{\SetGenericNewAcronym}{% + \let\@Gls@entryname\@Gls@acrentryname + \renewcommand{\newacronym}[4][]{% + \ifdefempty{\@glsacronymlists}% + {% + \def\@glo@type{\acronymtype}% + \setkeys{glossentry}{##1}% + \DeclareAcronymList{\@glo@type}% + }% + {}% + \glskeylisttok{##1}% + \glslabeltok{##2}% + \glsshorttok{##3}% + \glslongtok{##4}% + \newacronymhook + \protected@edef\@do@newglossaryentry{% + \noexpand\newglossaryentry{\the\glslabeltok}% + {% + type=\acronymtype,% + name={\expandonce{\acronymentry{##2}}},% + sort={\acronymsort{\the\glsshorttok}{\the\glslongtok}},% + text={\the\glsshorttok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% + category=acronym, + \GenericAcronymFields,% + \the\glskeylisttok + }% + }% + \@do@newglossaryentry + }% + \renewcommand*{\acrfullfmt}[3]{% + \glslink[##1]{##2}{\genacrfullformat{##2}{##3}}}% + \renewcommand*{\Acrfullfmt}[3]{% + \glslink[##1]{##2}{\Genacrfullformat{##2}{##3}}}% + \renewcommand*{\ACRfullfmt}[3]{% + \glslink[##1]{##2}{% + \mfirstucMakeUppercase{\genacrfullformat{##2}{##3}}}}% + \renewcommand*{\acrfullplfmt}[3]{% + \glslink[##1]{##2}{\genplacrfullformat{##2}{##3}}}% + \renewcommand*{\Acrfullplfmt}[3]{% + \glslink[##1]{##2}{\Genplacrfullformat{##2}{##3}}}% + \renewcommand*{\ACRfullplfmt}[3]{% + \glslink[##1]{##2}{% + \mfirstucMakeUppercase{\genplacrfullformat{##2}{##3}}}}% + \renewcommand*{\glsentryfull}[1]{\genacrfullformat{##1}{}}% + \renewcommand*{\Glsentryfull}[1]{\Genacrfullformat{##1}{}}% + \renewcommand*{\glsentryfullpl}[1]{\genplacrfullformat{##1}{}}% + \renewcommand*{\Glsentryfullpl}[1]{\Genplacrfullformat{##1}{}}% +} +% \end{macrocode} +%\end{macro} +% +% This will cause a problem for glossaries that contain a mixture of +% acronyms and abbreviations, so redefine \cs{newacronym} to use the +% new abbreviation interface. +% +% First save the original definitions: +% \begin{macrocode} +\let\@glsxtr@org@setacronymstyle\setacronymstyle +\let\@glsxtr@org@newacronymstyle\newacronymstyle +% \end{macrocode} +% +%\begin{macro}{\MakeAcronymsAbbreviations} +% Make acronyms use the same interface as abbreviations. +% Note that \cs{newacronymstyle} has a different implementation to +% \cs{newabbrevationstyle} so disable \cs{newacronymstyle} and +% \cs{setacronymstyle}. +%\changes{0.4}{2015-12-03}{set the default type to \cs{acronymtype}} +%\changes{0.5.4}{2015-12-15}{now disables \cs{setacronymstyle}} +% \begin{macrocode} +\newcommand*{\MakeAcronymsAbbreviations}{% + \renewcommand*{\newacronym}[4][]{% + \newabbreviation[type=\acronymtype,category=acronym,##1]{##2}{##3}{##4}% + }% + \renewcommand*{\firstacronymfont}[1]{\glsfirstabbrvfont{##1}}% + \renewcommand*{\acronymfont}[1]{\glsabbrvfont{##1}}% + \renewcommand*{\setacronymstyle}[1]{% + \PackageError{glossaries-extra}{\string\setacronymstyle{##1} + unavailable. + Use \string\setabbreviationstyle\space instead. + The original acronym interface can be restored with + \string\RestoreAcronyms}{}% + }% + \renewcommand*{\newacronymstyle}[1]{% + \GlossariesExtraWarning{New acronym style `##1' won't be + available unless you restore the original acronym interface with + \string\RestoreAcronyms}% + \@glsxtr@org@newacronymstyle{##1}% + }% +} +% \end{macrocode} +%\end{macro} +% +% Switch acronyms to abbreviations: +% \begin{macrocode} +\MakeAcronymsAbbreviations +% \end{macrocode} +% +%\begin{macro}{\RestoreAcronyms} +% Restore acronyms to \sty{glossaries} interface. +% \begin{macrocode} +\newcommand*{\RestoreAcronyms}{% + \SetGenericNewAcronym + \renewcommand{\firstacronymfont}[1]{\acronymfont{##1}}% + \renewcommand{\acronymfont}[1]{##1}% + \let\setacronymstyle\@glsxtr@org@setacronymstyle + \let\newacronymstyle\@glsxtr@org@newacronymstyle + \let\@gls@link@checkfirsthyper\@glsxtr@org@checkfirsthyper + \glssetcategoryattribute{acronym}{regular}{false}% + \setacronymstyle{long-short}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsacspace} +% Allow the user to customise the maximum value. +% \begin{macrocode} +\renewcommand*{\glsacspace}[1]{% + \settowidth{\dimen@}{(\firstacronymfont{\glsentryshort{#1}})}% + \ifdim\dimen@<\glsacspacemax~\else\space\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsacspacemax} +% Value used in the above. +% \begin{macrocode} +\newcommand*{\glsacspacemax}{3em} +% \end{macrocode} +%\end{macro} +% +%\subsection{Indexing and Displaying Glossaries} +%From time-to-time users ask if they can have one glossary sorted +%normally and another sorted by definition or usage. With the +% base \sty{glossaries} package this can only be achieved with the +% \qt{noidx} commands (Option~1). This is an attempt to mix and +% match. +% +%First we need a list of the glossaries that require +%\gls{makeindex}\slash\gls{xindy}. +%\begin{macro}{\@glsxtr@reg@glosslist} +%\changes{0.5.5}{??}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@reg@glosslist}{} +% \end{macrocode} +%\end{macro} +% Save the original definition of \cs{makeglossaries}: +% \begin{macrocode} +\let\@glsxtr@org@makeglossaries\makeglossaries +% \end{macrocode} +% +% Redefine \cs{makeglossaries} to take an optional argument. +% This should be empty for the usual behaviour (all glossaries +% need processing with an indexing application) or a comma-separated +% list of glossary labels indicating those glossaries that should be +% processed with an indexing application. +%\begin{macro}{\makeglossaries} +%\changes{0.5.5}{??}{new} +% \begin{macrocode} +\renewcommand*{\makeglossaries}[1][]{% + \ifblank{#1}% + {\@glsxtr@org@makeglossaries}% + {% + \edef\@glsxtr@reg@glosslist{#1}% + \ifundef{\glswrite}{\newwrite\glswrite}{}% + \protected@write\@auxout{}{\string\providecommand + \string\@glsorder[1]{}} + \protected@write\@auxout{}{\string\providecommand + \string\@istfilename[1]{}} + \protected@write\@auxout{}{\string\@istfilename{\istfilename}}% + \protected@write\@auxout{}{\string\@glsorder{\glsorder}} + \write\@auxout{\string\providecommand\string\@gls@reference[3]{}}% +% \end{macrocode} +% Iterate through each supplied glossary type and activate it. +% \begin{macrocode} + \@for\@glo@type:=#1\do{% + \ifdefempty{\@glo@type}{}{\@makeglossary{\@glo@type}}% + }% +% \end{macrocode} +% New glossaries must be created before \cs{makeglossaries}: +% \begin{macrocode} + \renewcommand*\newglossary[4][]{% + \PackageError{glossaries}{New glossaries + must be created before \string\makeglossaries}{You need + to move \string\makeglossaries\space after all your + \string\newglossary\space commands}}% +% \end{macrocode} +% Any subsequence instances of this command should have no effect +% \begin{macrocode} + \let\@makeglossary\relax + \let\makeglossary\relax + \let\makeglossaries\relax +% \end{macrocode} +% Disable all commands that have no effect after \cs{makeglossaries} +% \begin{macrocode} + \@disable@onlypremakeg +% \end{macrocode} +% Allow \gloskey{see} key: +% \begin{macrocode} + \let\gls@checkseeallowed\relax +% \end{macrocode} +% Suppress warning about no \cs{makeglossaries} +% \begin{macrocode} + \let\warn@nomakeglossaries\relax + \def\warn@noprintglossary{% + \GlossariesWarningNoLine{No \string\printglossary\space + or \string\printglossaries\space + found.^^J(Remove \string\makeglossaries\space if you don't +want + any glossaries.)^^JThis document will not have a glossary}% + }% +% \end{macrocode} +% Adjust display number list to check for type: +% \begin{macrocode} + \renewcommand*{\glsdisplaynumberlist}[1]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {\@glsxtr@idx@displaynumberlist{##1}}% + {\@glsxtr@noidx@displaynumberlist{##1}}% + }% +% \end{macrocode} +% Adjust entry list: +% \begin{macrocode} + \renewcommand*{\glsentrynumberlist}[1]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {\@glsxtr@idx@entrynumberlist{##1}}% + {\@glsxtr@noidx@entrynumberlist{##1}}% + }% +% \end{macrocode} +% Adjust number list loop +% \begin{macrocode} + \renewcommand*{\glsnumberlistloop}[2]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {% + \PackageError{glossaries-extra}{\string\glsnumberlistloop\space + not available for glossary `##1'}{}% + }% + {\@glsxtr@noidx@numberlistloop{##1}{##2}}% + }% +% \end{macrocode} +% Only sanitize sort for normal indexing glossaries. +% \begin{macrocode} + \renewcommand*{\glsprestandardsort}[3]{% + \expandafter\DTLifinlist\expandafter{##2}{\@glsxtr@reg@glosslist}% + {% + \glsdosanitizesort + }% + {% + \ifglssanitizesort + \@gls@noidx@sanitizesort + \else + \@gls@noidx@nosanitizesort + \fi + }% + }% +% \end{macrocode} +% Unlike \cs{makenoidxglossaries} we can't automatically set +% sanitizesort=false. All entries must be defined in the preamble. +% \begin{macrocode} + \renewcommand*\new@glossaryentry[2]{% + \PackageError{glossaries-extra}{Glossary entries must be defined + in the preamble\MessageBreak when you use the optional argument + of \string\makeglossaries}{Either move your definitions to the + preamble or don't use the optional argument of + \string\makeglossaries}% + }% +% \end{macrocode} +% Only activate sort key for glossaries that aren't listed in +% \verb|#1| (glossary label is stored in \cs{@glo@type} but this +% defaults to \cs{glsdefaulttype} so some expansion is required). +% \begin{macrocode} + \renewcommand*{\@printgloss@setsort}{% + \renewcommand*{\@glo@assign@sortkey}{% + \edef\@glo@type{\@glo@type}% + \expandafter\DTLifinlist\expandafter{\@glo@type}{\@glsxtr@reg@glosslist}% + {% + \@@glo@no@assign@sortkey + }% + {% + \@@glo@assign@sortkey + }% + }% + \def\@glo@sorttype{\@glo@default@sorttype}% + }% +% \end{macrocode} +% Check \pkgopt{automake} setting: +% \begin{macrocode} + \ifglsautomake + \renewcommand*{\@gls@doautomake}{% + \@for\@gls@type:=\@glsxtr@reg@glosslist\do{% + \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}% + }% + }% + \fi + }% +} +% \end{macrocode} +%\end{macro} +% +% Display number list for the regular version: +%\begin{macro}{\@glsxtr@idx@displaynumberlist} +%\changes{0.5.5}{??}{new} +% \begin{macrocode} +\let\@glsxtr@idx@displaynumberlist\glsdisplaynumberlist +% \end{macrocode} +%\end{macro} +% +% Display number list for the \qt{noidx} version: +%\begin{macro}{\@glsxtr@noidx@displaynumberlist} +%\changes{0.5.5}{??}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@noidx@displaynumberlist}[1]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \ifdef\@gls@loclist + {% + \def\@gls@noidxloclist@sep{% + \def\@gls@noidxloclist@sep{% + \def\@gls@noidxloclist@sep{% + \glsnumlistsep + }% + \def\@gls@noidxloclist@finalsep{\glsnumlistlastsep}% + }% + }% + \def\@gls@noidxloclist@finalsep{}% + \def\@gls@noidxloclist@prev{}% + \forlistloop{\glsnoidxdisplayloclisthandler}{\@gls@loclist}% + \@gls@noidxloclist@finalsep + \@gls@noidxloclist@prev + }% + {% + ??\glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `#1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% +}% + +% \end{macrocode} +%\end{macro} +%And for the number list loop: +%\begin{macro}{\@glsxtr@noidx@numberlistloop} +%\changes{0.5.5}{??}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@noidx@numberlistloop}[3]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \let\@gls@org@glsnoidxdisplayloc\glsnoidxdisplayloc + \let\@gls@org@glsseeformat\glsseeformat + \let\glsnoidxdisplayloc#2\relax + \let\glsseeformat#3\relax + \ifdef\@gls@loclist + {% + \forlistloop{\glsnoidxnumberlistloophandler}{\@gls@loclist}% + }% + {% + ??\glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `##1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% + \let\glsnoidxdisplayloc\@gls@org@glsnoidxdisplayloc + \let\glsseeformat\@gls@org@glsseeformat +}% +% \end{macrocode} +%\end{macro} +% +%Same for entry number list. +%\begin{macro}{\@glsxtr@noidx@entrynumberlist} +%\changes{0.5.5}{??}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@noidx@entrynumberlist}[1]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \ifdef\@gls@loclist + {% + \glsnoidxloclist{\@gls@loclist}% + }% + {% + ??\glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `#1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@idx@entrynumberlist} +%\changes{0.5.5}{??}{new} +% \begin{macrocode} +\let\@glsxtr@idx@entrynumberlist\glsentrynumberlist +% \end{macrocode} +%\end{macro} +% +% Give a bit of assistance to new users who are confused and don't +% know how to read transcript messages. +%\begin{macro}{\@print@glossary} +%\changes{0.3}{2015-12-02}{added redefinition} +% \begin{macrocode} +\renewcommand{\@print@glossary}{% + \makeatletter + \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% + \IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}% + {}% + {\glsxtrNoGlossaryWarning{\@glo@type}}% + \ifglsxindy + \ifcsundef{@xdy@\@glo@type @language}% + {% + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@xdylanguage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}% + }% + }% + }% + {% + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@xdylanguage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type + @language\endcsname}}% + }% + }% + }% + \@do@auxoutstuff + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@gls@codepage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@gls@codepage{\@glo@type}{\gls@codepage}}% + }% + }% + \@do@auxoutstuff + \fi + \renewcommand*{\@warn@nomakeglossaries}{% + \GlossariesWarningNoLine{\string\makeglossaries\space + hasn't been used,^^Jthe glossaries will not be updated}% + }% +} +% \end{macrocode} +%\end{macro} +% +% Setup the warning text to display if the external file for the given +% glossary is missing. +% +%\begin{macro}{\GlsXtrNoGlsWarningHead} +% Header message. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningHead}[2]{% + This document is incomplete. The external file associated with + the glossary `#1' (which should be called \texttt{#2}) + hasn't been created.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrNoGlsWarningEmptyStart} +% No entries have been added to the glossary. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningEmptyStart}{% + This has probably happened because there are no entries defined + in this glossary.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrNoGlsWarningEmptyMain} +% The default \qt{main} glossary is empty. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningEmptyMain}{% + If you don't want this glossary, + add \texttt{nomain} to your package option list when you load + \texttt{glossaries-extra.sty}. For example:% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrNoGlsWarningEmptyNotMain} +% A glossary that isn't the default \qt{main} glossary is empty. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningEmptyNotMain}[1]{% + Did you forget to use \texttt{type=#1} when you defined your + entries? If you tried to load entries into this glossary with + \texttt{\string\loadglsentries} did you remember to use + \texttt{[#1]} as the optional argument? If you did, check that + the definitions in the file you loaded all had the type set + to \texttt{\string\glsdefaulttype}.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrNoGlsWarningCheckFile} +% Advisory message to check the file contents. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningCheckFile}[1]{% + Check the contents of the file \texttt{#1}. If + it's empty, that means you haven't indexed any of your entries in this + glossary (using commands like \texttt{\string\gls} or + \texttt{\string\glsadd}) so this list can't be generated. + If the file isn't empty, the document build process hasn't been + completed.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrNoGlsWarningAutoMake} +% Message when \pkgopt{automake} option has been used. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningAutoMake}[1]{% + You may need to rerun \LaTeX. If you already have, it may be that + \TeX's shell escape doesn't allow you to run + \ifglsxindy xindy\else makeindex\fi. Check the + transcript file \texttt{\jobname.log}. If the shell escape is + disabled, try one of the following: + + \begin{itemize} + \item Run the external (Lua) application: + + \texttt{makeglossaries-lite \string"\jobname\string"} + + \item Run the external (Perl) application: + + \texttt{makeglossaries \string"\jobname\string"} + \end{itemize} + + Then rerun \LaTeX\ on this document. + \GlossariesExtraWarning{Rerun required to build the + glossary `#1' or check TeX's shell escape allows + you to run \ifglsxindy xindy\else makeindex\fi}% +} +% \end{macrocode} +%\end{macro} +% +%\changes{0.5.3}{2015-12-09}{removed \cs{GlsXtrNoGlsWarningNoAutoMakeMain}} +% +%\begin{macro}{\GlsXtrNoGlsWarningMisMatch} +% Mismatching \cs{makenoidxglossaries}. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningMisMatch}{% + You need to either replace \texttt{\string\makenoidxglossaries} + with \texttt{\string\makeglossaries} or replace + \texttt{\string\printglossary} (or \texttt{\string\printglossaries}) with + \texttt{\string\printnoidxglossary} + (or \texttt{\string\printnoidxglossaries}) and then rebuild + this document.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrNoGlsWarningBuildInfo} +% Build advice. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningBuildInfo}{% + Try one of the following: + \begin{itemize} + \item Add \texttt{automake} to your package option list when you load + \texttt{glossaries-extra.sty}. For example: + + \texttt{\string\usepackage[automake]% + \glsopenbrace glossaries-extra\glsclosebrace} + + \item Run the external (Lua) application: + + \texttt{makeglossaries-lite \string"\jobname\string"} + + \item Run the external (Perl) application: + + \texttt{makeglossaries \string"\jobname\string"} + \end{itemize} + + Then rerun \LaTeX\ on this document.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrNoGlsWarningTail} +% Final paragraph. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningTail}{% + This message will be removed once the problem has been fixed.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrNoGlsWarningNoOut} +% No out file created. +% Build advice. +% \begin{macrocode} +\newcommand{\GlsXtrNoGlsWarningNoOut}[1]{% + The file \texttt{#1} doesn't exist. This most likely means you haven't used + \texttt{\string\makeglossaries} or you have used + \texttt{\string\nofiles}. If this is just a draft version of the + document, you can suppress this message using the + \texttt{nomissingglstext} package option.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@defaultnoglossarywarning} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@defaultnoglossarywarning}[1]{% + \glossarysection[\glossarytoctitle]{\glossarytitle} + \GlsXtrNoGlsWarningHead{#1}{\jobname.\csname @glotype@\@glo@type @in\endcsname} + \par + \glsxtrifemptyglossary{#1}% + {% + \GlsXtrNoGlsWarningEmptyStart\space + \ifthenelse{\equal{#1}{main}}{\GlsXtrNoGlsWarningEmptyMain\par + \medskip + \noindent\texttt{\string\usepackage[nomain\ifglsacronym ,acronym\fi]% + \glsopenbrace glossaries-extra\glsclosebrace} + \medskip + }% + {\GlsXtrNoGlsWarningEmptyNotMain{#1}}% + }% + {% + \IfFileExists{\jobname.\csname @glotype@\@glo@type @out\endcsname} + {% + \GlsXtrNoGlsWarningCheckFile + {\jobname.\csname @glotype@\@glo@type @out\endcsname} + + \ifglsautomake + + \GlsXtrNoGlsWarningAutoMake{#1} + + \else + + \ifthenelse{\equal{#1}{main}}% + {% + \GlsXtrNoGlsWarningEmptyMain\par + \medskip + \noindent\texttt{\string\usepackage[nomain]% + \glsopenbrace glossaries-extra\glsclosebrace} + \medskip + }% + {}% + + \ifdefequal\makeglossaries\@no@makeglossaries + {% + \GlsXtrNoGlsWarningMisMatch + }% + {% + \GlsXtrNoGlsWarningBuildInfo + }% + \fi + }% + {% + \GlsXtrNoGlsWarningNoOut + {\jobname.\csname @glotype@\@glo@type @out\endcsname}% + }% + }% + \par + \GlsXtrNoGlsWarningTail +} +% \end{macrocode} +%\end{macro} +% +%\section{Integration with glossaries-accsupp} +% Provide better integration with the \sty{glossaries-accsupp} +% package. (Must be loaded before the main code of +% \sty{glossaries-extra} either explicitly or through the +% \pkgopt{accsupp} package option.) +% +% These commands have their definitions set according to whether +% or not \sty{glossaries-extra} has been loaded. +%\changes{0.5.2}{2015-12-08}{fixed typo in glossaries-accsupp and tidied up code to use +% just one \cs{@ifpackageloaded}} +% \begin{macrocode} +\@ifpackageloaded{glossaries-accsupp} +{ +% \end{macrocode} +% Define (or redefine) commands to use the accessibility +% information. +%\begin{macro}{\glsaccessname} +% Display the \gloskey{name} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccessname}[1]{% + \glsnameaccessdisplay + {% + \glsentryname{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsname@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessname{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessname} +% Display the \gloskey{name} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessname}[1]{% + \glsnameaccessdisplay + {% + \Glsentryname{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsname@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@Glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessname{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessname} +% Display the \gloskey{name} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessname}[1]{% + \glsnameaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryname{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSname@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLSname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessname{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesstext} +% Display the \gloskey{text} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccesstext}[1]{% + \glstextaccessdisplay + {% + \glsentrytext{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glstext@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccesstext{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesstext} +% Display the \gloskey{text} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\Glsaccesstext}[1]{% + \glstextaccessdisplay + {% + \Glsentrytext{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glstext@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@Glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccesstext{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesstext} +% Display the \gloskey{text} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesstext}[1]{% + \glstextaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrytext{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLStext@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLStext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccesstext{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessplural} +% Display the \gloskey{plural} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccessplural}[1]{% + \glspluralaccessdisplay + {% + \glsentryplural{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessplural} +% Display the \gloskey{plural} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessplural}[1]{% + \glspluralaccessdisplay + {% + \Glsentryplural{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessplural} +% Display the \gloskey{plural} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessplural}[1]{% + \glspluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryplural{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLSplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfirst} +% Display the \gloskey{first} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \glsentryfirst{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsfirst@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessfirst{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfirst} +% Display the \gloskey{first} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \Glsentryfirst{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsfirst@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@Glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessfirst{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfirst} +% Display the \gloskey{first} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryfirst{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSfirst@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLSfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessfirst{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfirstplural} +% Display the \gloskey{firstplural} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \glsentryfirstplural{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsfirstplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessfirstplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfirstplural} +% Display the \gloskey{firstplural} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \Glsentryfirstplural{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsfirstplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@Glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessfirstplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfirstplural} +% Display the \gloskey{firstplural} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryfirstplural{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSfirstplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLSfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessfirstplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesssymbol} +% Display the \gloskey{symbol} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \glsentrysymbol{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glssymbol@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccesssymbol{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesssymbol} +% Display the \gloskey{symbol} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} + \newcommand*{\Glsaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \Glsentrysymbol{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glssymbol@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@Glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccesssymbol{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesssymbol} +% Display the \gloskey{symbol} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrysymbol{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSsymbol@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccesssymbol{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesssymbolplural} +% Display the \gloskey{symbolplural} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \glsentrysymbolplural{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glssymbolplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccesssymbolplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesssymbolplural} +% Display the \gloskey{symbolplural} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} + \newcommand*{\Glsaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \Glsentrysymbolplural{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glssymbolplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@Glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccesssymbolplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesssymbolplural} +% Display the \gloskey{symbolplural} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrysymbolplural{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSsymbolplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLSsymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccesssymbolplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessdesc} +% Display the \gloskey{desc} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \glsentrydesc{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsdesc@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessdesc{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessdesc} +% Display the \gloskey{desc} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \Glsentrydesc{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsdesc@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@Glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessdesc{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessdesc} +% Display the \gloskey{desc} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrydesc{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSdesc@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessdesc{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessdescplural} +% Display the \gloskey{descplural} value (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \glsentrydescplural{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsdescplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessdescplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessdescplural} +% Display the \gloskey{descplural} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \Glsentrydescplural{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsdescplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@Glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessdescplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessdescplural} +% Display the \gloskey{descplural} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrydescplural{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSdescplural@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\def\@GLSdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessdescplural{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessshort} +% Display the short form (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccessshort}[1]{% + \glsshortaccessdisplay + {% + \glsentryshort{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessshort} +% Display the short form with first letter converted to uppercase +% (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessshort}[1]{% + \glsshortaccessdisplay + {% + \Glsentryshort{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessshort} +% Display the \gloskey{short} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessshort}[1]{% + \glsshortaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryshort{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessshortpl} +% Display the short plural form (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \glsentryshortpl{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessshortpl} +% Display the short plural form with first letter converted to +% uppercase (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \Glsentryshortpl{#1}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessshortpl} +% Display the \gloskey{shortplural} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryshortpl{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesslong} +% Display the long form (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + \newcommand*{\glsaccesslong}[1]{% + \glslongaccessdisplay{\glsentrylong{#1}}{#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesslong} +% Display the long form (no link and no check for existence). +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} + + \newcommand*{\Glsaccesslong}[1]{% + \glslongaccessdisplay{\Glsentrylong{#1}}{#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesslong} +% Display the \gloskey{long} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesslong}[1]{% + \glslongaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrylong{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesslongpl} +% Display the long plural form (no link and no check for existence). +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\glsaccesslongpl}[1]{% + \glslongpluralaccessdisplay{\glsentrylongpl{#1}}{#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesslongpl} +% Display the long plural form (no link and no check for existence). +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + + \newcommand*{\Glsaccesslongpl}[1]{% + \glslongpluralaccessdisplay{\Glsentrylongpl{#1}}{#1}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesslongpl} +% Display the \gloskey{longplural} value (no link and no check for existence) +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesslongpl}[1]{% + \glslongpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrylongpl{#1}}% + }% + {#1}% + } +% \end{macrocode} +%\end{macro} +% +% End of if part +% \begin{macrocode} +} +{ +% \end{macrocode} +% No accessibility support. Just define these commands to do +% \cs{glsentry}\meta{xxx} +%\begin{macro}{\glsaccessname} +% Display the \gloskey{name} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccessname}[1]{\glsentryname{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessname} +% Display the \gloskey{name} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessname} +% Display the \gloskey{name} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessname}[1]{% + \protect\mfirstucMakeUppercase{\glsentryname{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesstext} +% Display the \gloskey{text} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccesstext}[1]{\glsentrytext{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesstext} +% Display the \gloskey{text} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccesstext}[1]{\Glsentrytext{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesstext} +% Display the \gloskey{text} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesstext}[1]{% + \protect\mfirstucMakeUppercase{\glsentrytext{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessplural} +% Display the \gloskey{plural} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccessplural}[1]{\glsentryplural{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessplural} +% Display the \gloskey{plural} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccessplural}[1]{\Glsentryplural{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessplural} +% Display the \gloskey{plural} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentryplural{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfirst} +% Display the \gloskey{first} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccessfirst}[1]{\glsentryfirst{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfirst} +% Display the \gloskey{first} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccessfirst}[1]{\Glsentryfirst{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfirst} +% Display the \gloskey{first} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfirst}[1]{% + \protect\mfirstucMakeUppercase{\glsentryfirst{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfirstplural} +% Display the \gloskey{firstplural} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccessfirstplural}[1]{\glsentryfirstplural{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfirstplural} +% Display the \gloskey{firstplural} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccessfirstplural}[1]{\Glsentryfirstplural{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfirstplural} +% Display the \gloskey{firstplural} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfirstplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentryfirstplural{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesssymbol} +% Display the \gloskey{symbol} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccesssymbol}[1]{\glsentrysymbol{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesssymbol} +% Display the \gloskey{symbol} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccesssymbol}[1]{\Glsentrysymbol{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesssymbol} +% Display the \gloskey{symbol} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesssymbol}[1]{% + \protect\mfirstucMakeUppercase{\glsentrysymbol{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesssymbolplural} +% Display the \gloskey{symbolplural} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccesssymbolplural}[1]{\glsentrysymbolplural{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesssymbolplural} +% Display the \gloskey{symbolplural} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccesssymbolplural}[1]{\Glsentrysymbolplural{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesssymbolplural} +% Display the \gloskey{symbolplural} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesssymbolplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentrysymbolplural{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessdesc} +% Display the \gloskey{desc} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccessdesc}[1]{\glsentrydesc{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessdesc} +% Display the \gloskey{desc} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccessdesc}[1]{\Glsentrydesc{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessdesc} +% Display the \gloskey{desc} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessdesc}[1]{% + \protect\mfirstucMakeUppercase{\glsentrydesc{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessdescplural} +% Display the \gloskey{descplural} value (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccessdescplural}[1]{\glsentrydescplural{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessdescplural} +% Display the \gloskey{descplural} value (no link and no check for existence) +% with the first letter converted to upper case. +% \begin{macrocode} + \newcommand*{\Glsaccessdescplural}[1]{\Glsentrydescplural{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessdescplural} +% Display the \gloskey{descplural} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessdescplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentrydescplural{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessshort} +% Display the short form (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccessshort}[1]{\glsentryshort{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessshort} +% Display the short form with first letter converted to uppercase +% (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\Glsaccessshort}[1]{\Glsentryshort{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessshort} +% Display the \gloskey{short} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessshort}[1]{% + \protect\mfirstucMakeUppercase{\glsentryshort{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessshortpl} +% Display the short plural form (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccessshortpl}[1]{\glsentryshortpl{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessshortpl} +% Display the short plural form with first letter converted to +% uppercase (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\Glsaccessshortpl}[1]{\Glsentryshortpl{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessshortpl} +% Display the \gloskey{shortplural} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessshortpl}[1]{% + \protect\mfirstucMakeUppercase{\glsentryshortpl{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesslong} +% Display the long form (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccesslong}[1]{\glsentrylong{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesslong} +% Display the long form (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\Glsaccesslong}[1]{\Glsentrylong{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesslong} +% Display the \gloskey{long} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesslong}[1]{% + \protect\mfirstucMakeUppercase{\glsentrylong{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccesslongpl} +% Display the long plural form (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\glsaccesslongpl}[1]{\glsentrylongpl{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccesslongpl} +% Display the long plural form (no link and no check for existence). +% \begin{macrocode} + \newcommand*{\Glsaccesslongpl}[1]{\Glsentrylongpl{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccesslongpl} +% Display the \gloskey{longplural} value (no link and no check for existence). +% converted to upper case. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} + \newcommand*{\GLSaccesslongpl}[1]{% + \protect\mfirstucMakeUppercase{\glsentrylongpl{#1}}} +% \end{macrocode} +%\end{macro} +% +% End of else part +% \begin{macrocode} +} +% \end{macrocode} +% +%\section{Categories} +%\begin{macro}{\glscategory} +% Add a new storage key that can be used to indicate a category. The +% default category is \category{general}. +% \begin{macrocode} +\glsaddstoragekey{category}{general}{\glscategory} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifcategory} +% Convenient shortcut to determine if an entry has the given +% category. +% \begin{macrocode} +\newcommand{\glsifcategory}[4]{% + \ifglsfieldeq{#1}{category}{#2}{#3}{#4}% +} +% \end{macrocode} +%\end{macro} +% +% Categories can have attributes. +%\begin{macro}{\glssetcategoryattribute} +%\begin{definition} +%\cs{glssetcategoryattribute}\marg{category}\marg{attribute-label}\marg{value} +%\end{definition} +% Set (or override if already set) an attribute for the given +% category. +% \begin{macrocode} +\newcommand*{\glssetcategoryattribute}[3]{% + \csdef{@glsxtr@categoryattr@@#1@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsgetcategoryattribute} +%\begin{definition} +%\cs{glsgetcategoryattribute}\marg{category}\marg{attribute-label} +%\end{definition} +% Get the value of the given attribute for the given +% category. Does nothing if the attribute isn't defined. +% \begin{macrocode} +\newcommand*{\glsgetcategoryattribute}[2]{% + \csuse{@glsxtr@categoryattr@@#1@#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glshascategoryattribute} +%\begin{definition} +%\cs{glshascategoryattribute}\marg{category}\marg{attribute-label}\marg{true}\marg{false} +%\end{definition} +%\changes{0.5}{2015-12-07}{new} +% Tests if the category has the given attribute set. +% \begin{macrocode} +\newcommand*{\glshascategoryattribute}[4]{% + \ifcsvoid{@glsxtr@categoryattr@@#1@#2}{#4}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glssetattribute} +%\begin{definition} +%\cs{glssetattribute}\marg{entry label}\marg{attribute-label}\marg{value} +%\end{definition} +% Short cut where the category label is obtained from the entry +% information. +% \begin{macrocode} +\newcommand*{\glssetattribute}[3]{% + \glssetcategoryattribute{\glscategory{#1}}{#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsgetattribute} +%\begin{definition} +%\cs{glsgetattribute}\marg{entry label}\marg{attribute-label} +%\end{definition} +% Short cut where the category label is obtained from the entry +% information. +% \begin{macrocode} +\newcommand*{\glsgetattribute}[2]{% + \glsgetcategoryattribute{\glscategory{#1}}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glshasattribute} +%\begin{definition} +%\cs{glshasattribute}\marg{entry +%label}\marg{attribute-label}\marg{true}\marg{false} +%\end{definition} +%\changes{0.5}{2015-12-07}{new} +%\changes{0.5.4}{2015-12-15}{added check for entry's existence} +% Short cut to test if the given attribute has been set where the +% category label is obtained from the entry information. +% \begin{macrocode} +\newcommand*{\glshasattribute}[4]{% + \ifglsentryexists{#1}% + {\glshascategoryattribute{\glscategory{#1}}{#2}{#3}{#4}}% + {#4}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifcategoryattribute} +%\begin{definition} +%\cs{glsifcategoryattribute}\marg{category}\marg{attribute-label}\marg{value}\marg{true +%part}\marg{false part} +%\end{definition} +% True if category has the attribute with the given value. +% \begin{macrocode} +\newcommand{\glsifcategoryattribute}[5]{% + \ifcsundef{@glsxtr@categoryattr@@#1@#2}% + {#5}% + {\ifcsstring{@glsxtr@categoryattr@@#1@#2}{#3}{#4}{#5}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifattribute} +%\begin{definition} +%\cs{glsifattribute}\marg{entry label}\marg{attribute-label}\marg{value}\marg{true +%part}\marg{false part} +%\end{definition} +%Short cut to determine if the given entry has a category with the +%given attribute set. +%\changes{0.5.4}{2015-12-15}{added check for entry's existence} +% \begin{macrocode} +\newcommand{\glsifattribute}[5]{% + \ifglsentryexists{#1}% + {\glsifcategoryattribute{\glscategory{#1}}{#2}{#3}{#4}{#5}}% + {#5}% +} +% \end{macrocode} +%\end{macro} +% +% Set attributes for the default \category{general} category: +% \begin{macrocode} +\glssetcategoryattribute{general}{regular}{true} +% \end{macrocode} +% Acronyms are regular by default, since they're typically just +% treated like normal words. +% \begin{macrocode} +\glssetcategoryattribute{acronym}{regular}{true} +% \end{macrocode} +% +%\begin{macro}{\glssetregularcategory} +%Convenient shortcut to create add the regular attribute. +% \begin{macrocode} +\newcommand*{\glssetregularcategory}[1]{% + \glssetcategoryattribute{#1}{regular}{true}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifregularcategory} +%\begin{definition} +%\cs{glsifregularcategory}\marg{category}\marg{true part}\marg{false part} +%\end{definition} +% Short cut to determine if a category has the regular attribute. +% \begin{macrocode} +\newcommand{\glsifregularcategory}[3]{% + \glsifcategoryattribute{#1}{regular}{true}{#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifregular} +%\begin{definition} +%\cs{glsifregular}\marg{entry label}\marg{true part}\marg{false part} +%\end{definition} +% Short cut to determine if an entry has a regular category. +% \begin{macrocode} +\newcommand{\glsifregular}[3]{% + \glsifregularcategory{\glscategory{#1}}{#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsforeachincategory} +%\begin{definition} +%\cs{glsforeachincategory}\oarg{glossary +%labels}\marg{category-label}\marg{glossary-cs}\marg{label-cs}\marg{body} +%\end{definition} +% Iterates through all entries in all the glossaries (or just those +% listed in \meta{glossary labels}) and does \meta{body} if the +% category matches \meta{category-label}. The control sequences +% \meta{glossary-cs} and \meta{label-cs} may be used in \meta{body} +% to access the glossary label and entry label for the current +% iteration. +% \begin{macrocode} +\newcommand{\glsforeachincategory}[5][\@glo@types]{% + \forallglossaries[#1]{#3}% + {% + \forglsentries[#3]{#4}% + {% + \glsifcategory{#4}{#2}{#5}{}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsforeachwithattribute} +%\begin{definition} +%\cs{glsforeachwithattribute}\oarg{glossary +%labels}\marg{attribute-label}\marg{attribute-value}\marg{glossary-cs}\marg{label-cs}\marg{body} +%\end{definition} +% Iterates through all entries in all the glossaries (or just those +% listed in \meta{glossary labels}) and does \meta{body} if the +% category attribute \meta{attribute-label} matches +% \meta{attribute-value}. The control sequences +% \meta{glossary-cs} and \meta{label-cs} may be used in \meta{body} +% to access the glossary label and entry label for the current +% iteration. +% \begin{macrocode} +\newcommand{\glsforeachwithattribute}[6][\@glo@types]{% + \forallglossaries[#1]{#4}% + {% + \forglsentries[#4]{#5}% + {% + \glsifattribute{#5}{#2}{#3}{#6}{}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +% If \cs{newterm} has been defined, redefine it so that it +% automatically sets the category label to \category{index} and add +% \cs{glsxtrpostdescription}. +% \begin{macrocode} +\ifdef\newterm +{% +% \end{macrocode} +%\begin{macro}{\newterm} +%\changes{0.4}{2015-12-03}{fixed name argument} +% \begin{macrocode} + \renewcommand*{\newterm}[2][]{% + \newglossaryentry{#2}% + {type={index},category=index,name={#2},% + description={\glsxtrpostdescription\nopostdesc},#1}% + } +% \end{macrocode} +%\end{macro} +% Indexed terms are regular by default. +% \begin{macrocode} + \glssetcategoryattribute{index}{regular}{true} +% \end{macrocode} +%\begin{macro}{\glsxtrpostdescindex} +% \begin{macrocode} + \newcommand*{\glsxtrpostdescindex}{} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +} +{} +% \end{macrocode} +% +%If the \pkgopt{symbols} package option was used, define a similar +%command for symbols, but set the default sort to the label rather +%than the name as the symbols will typically contain commands that +%will confuse makeindex and xindy. +% \begin{macrocode} +\ifdef\printsymbols +{% +% \end{macrocode} +%\begin{macro}{\glsxtrnewsymbol} +%\changes{0.4}{2015-12-03}{added extra argument} +% Unlike \cs{newterm}, this has a separate argument for the label +% (since the symbol will likely contain commands). +% \begin{macrocode} + \newcommand*{\glsxtrnewsymbol}[3][]{% + \newglossaryentry{#2}{name={#3},sort={#2},type=symbols,category=symbol,#1}% + } +% \end{macrocode} +%\end{macro} +% Symbols are regular by default. +% \begin{macrocode} + \glssetcategoryattribute{symbol}{regular}{true} +% \end{macrocode} +%\begin{macro}{\glsxtrpostdescsymbol} +% \begin{macrocode} + \newcommand*{\glsxtrpostdescsymbol}{} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +} +{} +% \end{macrocode} +% +% Similar for the numbers option. +% \begin{macrocode} +\ifdef\printnumbers +{% +% \end{macrocode} +%\begin{macro}{\glsxtrnewnumber} +%\changes{0.4}{2015-12-03}{added extra argument} +% \begin{macrocode} +\ifdef\printnumbers + \newcommand*{\glsxtrnewnumber}[3][]{% + \newglossaryentry{#2}{name={#3},sort={#2},type=numbers,category=number,#1}% + } +% \end{macrocode} +%\end{macro} +% Numbers are regular by default. +% \begin{macrocode} + \glssetcategoryattribute{number}{regular}{true} +% \end{macrocode} +%\begin{macro}{\glsxtrpostdescnumber} +% \begin{macrocode} + \newcommand*{\glsxtrpostdescnumber}{} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +} +{} +% \end{macrocode} +% +%\begin{macro}{\glsxtrsetcategory} +% Set the category for all listed labels. The first argument is the +% list of entry labels and the second argument is the category label. +% \begin{macrocode} +\newcommand*{\glsxtrsetcategory}[2]{% + \@for\@glsxtr@label:=#1\do + {% + \glsfieldxdef{\@glsxtr@label}{category}{#2}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrsetcategoryforall} +% Set the category for all entries in the listed glossaries. The first argument +% is the list of glossary labels and the second argument is the category label. +% \begin{macrocode} +\newcommand*{\glsxtrsetcategoryforall}[2]{% + \forallglossaries[#1]{\@glsxtr@type}{% + \forglsentries[\@glsxtr@type]{\@glsxtr@label}% + {% + \glsfieldxdef{\@glsxtr@label}{category}{#2}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldtitlecase} +%\begin{definition} +%\cs{glsxtrfieldtitlecase}\marg{label}\marg{field} +%\end{definition} +% Apply title casing to the contents of the given field. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfieldtitlecase}[2]{% + \expandafter\xcapitalisewords\expandafter + {\csname glo@\glsdetoklabel{#1}@#2\endcsname}% +} +% \end{macrocode} +%\end{macro} +% +% Provide a convenient way to modify glossary styles without having +% to define a new style just to convert the first letter of fields +% to upper case. +%\begin{macro}{\glossentrydesc} +% If the \catattr{glossdesc} attribute is \qt{firstuc} convert first +% letter to upper case. If the attribute is \qt{title} use title +% case. +% \begin{macrocode} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifattribute{#1}{glossdesc}{firstuc}% + {% + \Glsaccessdesc{#1}% + }% + {% + \glsifattribute{#1}{glossdesc}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsdescriptionaccessdisplay + {% + \glsxtrfieldtitlecase{#1}{desc}% + }% + {#1}% + }% + {% + \glsaccessdesc{#1}% + }% + }% + }% + } +} +{ + \renewcommand*{\glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifattribute{#1}{glossdesc}{firstuc}% + {% + \Glsentrydesc{#1}% + }% + {% + \glsifattribute{#1}{glossdesc}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsxtrfieldtitlecase{#1}{desc}% + }% + {% + \glsentrydesc{#1}% + }% + }% + }% + } +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glossentryname} +% If the \catattr{glossname} attribute is \qt{firstuc} convert first +% letter to upper case. If the attribute is \qt{title} use title +% case. +% \begin{macrocode} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\glossentryname}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifattribute{#1}{glossname}{firstuc}% + {% + \glsnameaccessdisplay + {% + \glsnamefont{\Glsentryname{#1}}% + }% + {#1}% + }% + {% + \glsifattribute{#1}{glossname}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsnameaccessdisplay + {% + \glsnamefont{\glsxtrfieldtitlecase{#1}{name}}% + }% + {#1}% + }% + {% + \glsifattribute{#1}{glossname}{uc}% + {% + \glsnameaccessdisplay + {% +% \end{macrocode} +% Hide the label from the upper-casing command. +% \begin{macrocode} + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \glsnamefont{\mfirstucMakeUppercase{\glo@name}}% + }% + {#1}% + }% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \glsnameaccessdisplay + {% + \expandafter\glsnamefont\expandafter{\glo@name}% + }% + {#1}% + }% + }% + }% +% \end{macrocode} +% Do post-name hook: +% \begin{macrocode} + \glsxtrpostnamehook{#1}% + }% + } +} +{ + \renewcommand*{\glossentryname}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifattribute{#1}{glossname}{firstuc}% + {% + \glsnamefont{\Glsentryname{#1}}% + }% + {% + \glsifattribute{#1}{glossname}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsnamefont{\glsxtrfieldtitlecase{#1}{name}}% + }% + {% + \glsifattribute{#1}{glossname}{uc}% + {% +% \end{macrocode} +% Hide the label from the upper-casing command. +% \begin{macrocode} + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \glsnamefont{\mfirstucMakeUppercase{\glo@name}}% + }% + {% +% \end{macrocode} +% This little trick is used by \sty{glossaries} to allow the user to +% redefine \ics{glsnamefont} to use \cs{makefirstuc}. Support it +% even though they can now use the \catattr{firstuc} attribute. +% \begin{macrocode} + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \expandafter\glsnamefont\expandafter{\glo@name}% + }% + }% + }% + }% +% \end{macrocode} +% Do post-name hook: +% \begin{macrocode} + \glsxtrpostnamehook{#1}% + } +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glossentryname} +% Redefine to set the abbreviation format and accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\Glossentryname}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsnameaccessdisplay + {% + \glsnamefont{\Glsentryname{#1}}% + }% + {#1}% +% \end{macrocode} +% Do post-name hook: +% \begin{macrocode} + \glsxtrpostnamehook{#1}% + }% + } +} +{ + \renewcommand*{\Glossentryname}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsnamefont{\Glsentryname{#1}}% +% \end{macrocode} +% Do post-name hook: +% \begin{macrocode} + \glsxtrpostnamehook{#1}% + }% + } +} +% \end{macrocode} +%\end{macro} +% +% Provide a convenient way to also index the entries using the +% standard \ics{index} mechanism. This may use different actual, +% encap and escape characters to those used for the glossaries. +% +%\begin{macro}{\glsxtrpostnamehook} +%\changes{0.5.3}{2015-12-09}{new} +% Hook to append stuff after the name is displayed in the glossary. +% The argument is the entry's label. +% \begin{macrocode} +\newcommand*{\glsxtrpostnamehook}[1]{% + \def\@glsnumberformat{glsnumberformat}% + \glsxtrdoautoindexname{#1}{indexname}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\if@glsxtr@format@override} +%\changes{0.5.3}{2015-12-09}{new} +% Determines if the \gloskey[glslink]{format} key should override +% the indexing attribute value. +% \begin{macrocode} +\newif\if@glsxtr@format@override +\@glsxtr@format@overridefalse +% \end{macrocode} +%\end{macro} +% +%If overriding is enabled, the \ics{glshypernumber} command will have to +%be redefined in the index to use \cs{hyperpage} instead. +%\begin{macro}{\GlsXtrEnableIndexFormatOverride} +% \begin{macrocode} +\@ifpackageloaded{hyperref} +{ +% \end{macrocode} +% If \sty{hyperref}'s \pkgoptfmt{hyperindex} option is on, then +% \sty{hyperref} will automatically add \cs{hyperpage}, so don't +% add it. +% \begin{macrocode} + \ifHy@hyperindex + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + \appto\theindex{\let\glshypernumber\@firstofone}% + } + \else + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + \appto\theindex{\let\glshypernumber\hyperpage}% + } + \fi +} +{ + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + } +} +\@onlypreamble\GlsXtrEnableIndexFormatOverride +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdoautoindexname} +%\changes{0.5.3}{2015-12-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrdoautoindexname}[2]{% + \glshasattribute{#1}{#2}% + {% +% \end{macrocode} +% Escape any makeindex/xindy characters in the value of the \gloskey{name} +% field. Take care with \sty{babel} as this won't work if the +% category code has changed for those characters. +% \begin{macrocode} + \@glsxtr@autoindex@setname{#1}% +% \end{macrocode} +% If the attribute value is simply \qt{true} don't add an encap, +% otherwise use the value as the encap. +% \begin{macrocode} + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{#2}}% + \if@glsxtr@format@override + \ifdefstring{\@glsnumberformat}{glsnumberformat}{}% + {\let\@glsxtr@attrval\@glsnumberformat}% + \fi + \ifdefstring{\@glsxtr@attrval}{true}% + {}% + {\eappto\@glo@name{\@glsxtr@autoindex@encap\@glsxtr@attrval}}% + \expandafter\index\expandafter{\@glo@name}% + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@autoindex@setname} +%\changes{0.5.3}{2015-12-09}{new} +% Assign \cs{@glo@name} for use with \catattr{indexname} attribute. +% \begin{macrocode} +\newcommand*{\@glsxtr@autoindex@setname}[1]{% + \def\@glo@name{\string\glsentryname{#1}}% + \glsletentryfield{\@glo@sort}{#1}{sort}% + \@gls@checkmkidxchars\@glo@sort + \@glsxtr@autoindex@doextra@esc\@glo@sort + \epreto\@glo@name{\@glo@sort\@glsxtr@autoindex@at}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@autoindex@doextra@esc} +% \begin{macrocode} +\newcommand*{\@glsxtr@autoindex@doextra@esc}[1]{% +% \end{macrocode} +% Escape the escape character unless it has already been escaped. +% \begin{macrocode} + \ifx\@glsxtr@autoindex@esc\@gls@quotechar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escquote\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@esc\noexpand\@nnil + \@glsxtr@autoindex@esc\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi +% \end{macrocode} +% Escape actual character unless it has already been escaped. +% \begin{macrocode} + \ifx\@glsxtr@autoindex@at\@gls@actualchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escat\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@at\noexpand\@nnil + \@glsxtr@autoindex@at\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi +% \end{macrocode} +% Escape level character unless it has already been escaped. +% \begin{macrocode} + \ifx\@glsxtr@autoindex@level\@gls@levelchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@esclevel\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@level\noexpand\@nnil + \@glsxtr@autoindex@level\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi +% \end{macrocode} +% Escape encap character unless it has already been escaped. +% \begin{macrocode} + \ifx\@glsxtr@autoindex@encap\@gls@encapchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escencap\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@encap\noexpand\@nnil + \@glsxtr@autoindex@encap\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi +} +% \end{macrocode} +%\end{macro} +% +% The user commands here have a preamble-only restriction to ensure +% they are set before required and also to reduce the chances of +% complications caused by \sty{babel}'s shorthands. +% +%\begin{macro}{\@glsxtr@autoindex@at} +%\changes{0.5.3}{2015-12-09}{new} +% Actual character for use with \cs{index}. +% \begin{macrocode} +\newcommand*{\@glsxtr@autoindex@at}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetActualChar} +% Set the actual character. +% \begin{macrocode} +\newcommand*{\GlsXtrSetActualChar}[1]{% + \gdef\@glsxtr@autoindex@at{#1}% + \def\@glsxtr@autoindex@escat##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escat}{##1}{##2}{##3}% + }% +} +\@onlypreamble\GlsXtrSetActualChar +\makeatother +\GlsXtrSetActualChar{@} +\makeatletter +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@autoindex@encap} +%\changes{0.5.3}{2015-12-09}{new} +% Encap character for use with \cs{index}. +% \begin{macrocode} +\newcommand*{\@glsxtr@autoindex@encap}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetEncapChar} +% Set the encap character. +% \begin{macrocode} +\newcommand*{\GlsXtrSetEncapChar}[1]{% + \gdef\@glsxtr@autoindex@encap{#1}% + \def\@glsxtr@autoindex@escencap##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escencap}{##1}{##2}{##3}% + }% +} +\GlsXtrSetEncapChar{|} +\@onlypreamble\GlsXtrSetEncapChar +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@autoindex@level} +%\changes{0.5.3}{2015-12-09}{new} +% Level character for use with \cs{index}. +% \begin{macrocode} +\newcommand*{\@glsxtr@autoindex@level}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetLevelChar} +% Set the encap character. +% \begin{macrocode} +\newcommand*{\GlsXtrSetLevelChar}[1]{% + \gdef\@glsxtr@autoindex@level{#1}% + \def\@glsxtr@autoindex@esclevel##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@esclevel}{##1}{##2}{##3}% + }% +} +\GlsXtrSetLevelChar{!} +\@onlypreamble\GlsXtrSetLevelChar +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@autoindex@esc} +%\changes{0.5.3}{2015-12-09}{new} +% Escape character for use with \cs{index}. +% \begin{macrocode} +\newcommand*{\@glsxtr@autoindex@esc}{"} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetEscChar} +% Set the escape character. +% \begin{macrocode} +\newcommand*{\GlsXtrSetEscChar}[1]{% + \gdef\@glsxtr@autoindex@esc{#1}% + \def\@glsxtr@autoindex@escquote##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escquote}{##1}{##2}{##3}% + }% +} +\GlsXtrSetEscChar{"} +\@onlypreamble\GlsXtrSetEscChar +% \end{macrocode} +%\end{macro} +% +% Set if defined. (For example, if \sty{doc} package has been +% loaded.) Actual character \ics{actualchar}: +% \begin{macrocode} +\ifdef\actualchar + {\expandafter\GlsXtrSetActualChar\expandafter{\actualchar}} + {} +% \end{macrocode} +% Quote character \ics{quotechar}: +% \begin{macrocode} +\ifdef\quotechar + {\expandafter\GlsXtrSetEscChar\expandafter{\quotechar}} + {} +% \end{macrocode} +% Level character \ics{levelchar}: +% \begin{macrocode} +\ifdef\levelchar + {\expandafter\GlsXtrSetLevelChar\expandafter{\levelchar}} + {} +% \end{macrocode} +% Encap character \ics{encapchar}: +% \begin{macrocode} +\ifdef\encapchar + {\expandafter\GlsXtrSetEncapChar\expandafter{\encapchar}} + {} +% \end{macrocode} +% +%\begin{macro}{\@glsxtr@gobbleto@endescspch} +% \begin{macrocode} +\def\@glsxtr@gobbleto@endescspch#1\@glsxtr@endescspch{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@glsxtr@autoindex@esc@spch} +%\begin{definition} +%\cs{@@glsxtr@autoindex@escspch}\marg{char}\marg{cs}\marg{pre}\marg{mid}\marg{post} +%\end{definition} +% \begin{macrocode} +\newcommand*{\@@glsxtr@autoindex@escspch}[5]{% + \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% + \toks@={#3}% + \ifx\@nnil#3\relax + \def\@@glsxtr@checkspch{\@glsxtr@gobbleto@endescspch#5\@glsxtr@endescspch}% + \else + \ifx\@nnil#4\relax + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@glsxtr@checkspch{\@glsxtr@gobbleto@endescspch + #4#5\@glsxtr@endescspch}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@glsxtr@autoindex@esc#1}% + \def\@@glsxtr@checkspch{#2#5#1\@nnil#1\@glsxtr@endescspch}% + \fi + \fi + \@@glsxtr@checkspch +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glossentrydesc} +% Redefine to set the abbreviation format and accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\renewcommand*{\Glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \Glsaccessdesc{#1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glossentrysymbol} +% Redefine to set the abbreviation format and accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\renewcommand*{\glossentrysymbol}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsaccesssymbol{#1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glossentrysymbol} +% Redefine to set the abbreviation format and accessibility support. +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\renewcommand*{\Glossentrysymbol}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \Glsaccesssymbol{#1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%Allow initials to be marked but only use the formatting for the +%tag in the glossary. +%\begin{macro}{\GlsXtrEnableInitialTagging} +% Allow initial tagging. The first argument is a list of categories +% to apply this to. The second argument is the name of the command to +% use to tag the initials. This can't already be defined for safety +% unless the starred version is used. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrEnableInitialTagging}{% + \@ifstar\s@glsxtr@enabletagging\@glsxtr@enabletagging +} +\@onlypreamble\GlsXtrEnableInitialTagging +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@enabletagging} +% Starred version undefines command. +% \begin{macrocode} +\newcommand*{\s@glsxtr@enabletagging}[2]{% + \undef#2% + \@glsxtr@enabletagging{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@enabletagging} +% Internal command. +% \begin{macrocode} +\newcommand*{\@glsxtr@enabletagging}[2]{% +% \end{macrocode} +% Set attributes for categories given in the first argument. +% \begin{macrocode} + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty\@glsxtr@cat + {}% + {\glssetcategoryattribute{\@glsxtr@cat}{tagging}{true}}% + }% + \newrobustcmd*#2[1]{##1}% + \def\@glsxtr@taggingcs{#2}% + \renewcommand*\@glsxtr@activate@initialtagging{% + \let#2\@glsxtr@tag + }% + \ifundef\@gls@preglossaryhook + {\GlossariesExtraWarning{Initial tagging requires at least + glossaries.sty v4.19 to work correctly}}% + {}% +} +% \end{macrocode} +%\end{macro} +% +%Are we using an old version of \sty{mfirstuc} that has a bug in +%\cs{capitalisewords}? If so, patch it so we don't have a problem +% with a combination of tagging and title case. +%\begin{macro}{\mfu@checkword@do} +%If this command hasn't been defined, then we have pre v2.02 of +%\sty{mfirstuc} +%\changes{0.5.2}{2015-12-08}{added} +% \begin{macrocode} +\ifundef\mfu@checkword@do +{ + \newcommand*{\mfu@checkword@do}[1]{% + \ifdefstring{\mfu@checkword@arg}{#1}% + {% + \let\@mfu@domakefirstuc\@firstofone + \listbreak + }% + {}% + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\mfu@checkword} +% \cs{capitalisewords} was introduced in \sty{mfirstuc} v1.06. +% If \cs{mfu@checkword} hasn't been defined \sty{mfirstuc} is too +% old to support the title case attribute. +% \begin{macrocode} + \ifundef\mfu@checkword + { + \newcommand{\@glsxtr@do@titlecaps@warn}{% + \GlossariesExtraWarning{mfirstuc.sty too old. Title Caps + support not available}% +% \end{macrocode} +% One warning should suffice. +% \begin{macrocode} + \let\@glsxtr@do@titlecaps@warn\relax + } + } + { + \renewcommand*{\mfu@checkword}[1]{% + \def\mfu@checkword@arg{#1}% + \let\@mfu@domakefirstuc\makefirstuc + \forlistloop\mfu@checkword@do\@mfu@nocaplist + } + } +} +{}% no patch required +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@do@titlecaps@warn} +% Do warning if title case not supported. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@do@titlecaps@warn}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@activate@initialtagging} +% Used in \cs{printglossary} but at least v4.19 of \sty{glossaries} +% required. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} +\newcommand*\@glsxtr@activate@initialtagging{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@tag} +%\changes{0.5.2}{2015-12-08}{new} +% Definition of tagging command when used in glossary. +% \begin{macrocode} +\newrobustcmd*{\@glsxtr@tag}[1]{% + \glsifattribute{\glscurrententrylabel}{tagging}{true}% + {\glsxtrtagfont{#1}}{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrtagfont} +% Used in the glossary. +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} +\newcommand*{\glsxtrtagfont}[1]{\underline{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@preglossaryhook} +% This macro was introduced in \sty{glossaries} version 4.19, so it +% may not be defined. If it hasn't been defined this feature is +% unavailable. +% \begin{macrocode} +\ifdef\@gls@preglossaryhook +{ + \renewcommand*{\@gls@preglossaryhook}{% + \@glsxtr@activate@initialtagging + \let\@glsxtr@org@postdescription\glspostdescription + \renewcommand*{\glspostdescription}{% + \glsxtrpostdescription + \@glsxtr@org@postdescription + }% + }% +} +{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostdescription} +%This command will only be used if \cs{@gls@preglossaryhook} is +%available \emph{and} the glossary style uses +%\cs{glspostdescription} without modifying it. (The nopostdesc +%option will suppress this.) +% \begin{macrocode} +\newcommand*{\glsxtrpostdescription}{% + \csuse{glsxtrpostdesc\glscategory{\glscurrententrylabel}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostdescgeneral} +% \begin{macrocode} +\newcommand*{\glsxtrpostdescgeneral}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostdescterm} +% \begin{macrocode} +\newcommand*{\glsxtrpostdescterm}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostdescacronym} +% \begin{macrocode} +\newcommand*{\glsxtrpostdescacronym}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostdescabbreviation} +% \begin{macrocode} +\newcommand*{\glsxtrpostdescabbreviation}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glspostlinkhook} +% Redefine the post link hook used by commands like \cs{gls} to +% make it easier for categories or attributes to modify this action. +% Since this hook occurs outside the existence check of commands like +% \cs{gls}, this needs to be checked again here. Do nothing if the +% entry hasn't been defined. +%\changes{0.5.4}{2015-12-15}{added existence check} +% \begin{macrocode} +\renewcommand*{\glspostlinkhook}{% + \ifglsentryexists{\glslabel}{\glsxtrpostlinkhook}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostlinkhook} +% The entry label should already be stored in \cs{glslabel} by +% \cs{@gls@link}. +% \begin{macrocode} +\newcommand*{\glsxtrpostlinkhook}{% + \glsxtrdiscardperiod{\glslabel}% + {\glsxtrpostlinkendsentence}% + {\glsxtrpostlink}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostlink} +% \begin{macrocode} +\newcommand*{\glsxtrpostlink}{% + \csuse{glsxtrpostlink\glscategory{\glslabel}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostlinkendsentence} +%\changes{0.3}{2015-12-02}{new} +% Done by \cs{glsxtrpostlinkhook} if a full stop is discarded. +% \begin{macrocode} +\newcommand*{\glsxtrpostlinkendsentence}{% + \ifcsdef{glsxtrpostlink\glscategory{\glslabel}} + {% + \csuse{glsxtrpostlink\glscategory{\glslabel}}% +% \end{macrocode} +% Put the full stop back. +% \begin{macrocode} + .\spacefactor\sfcode`\. \relax + }% + {% +% \end{macrocode} +% Assume the full stop was discarded because the entry ends with a +% period, so adjust the spacefactor. +% \begin{macrocode} + \spacefactor\sfcode`\. \relax + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostlinkAddDescOnFirstUse} +%\changes{0.3}{2015-12-02}{new} +% Provide a command for appending the description in parentheses on +% first use, for the convenience of users wanting to add this to the +% post link hook. +% \begin{macrocode} +\newcommand*{\glsxtrpostlinkAddDescOnFirstUse}{% + \glsxtrifwasfirstuse{\space(\glsaccessdesc{\glslabel})}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostlinkAddSymbolOnFirstUse} +%\changes{0.3}{2015-12-02}{new} +% Provide a command for appending the symbol (if defined) in parentheses on +% first use, for the convenience of users wanting to add this to the +% post link hook. +% \begin{macrocode} +\newcommand*{\glsxtrpostlinkAddSymbolOnFirstUse}{% + \glsxtrifwasfirstuse + {% + \ifglshassymbol{\glslabel}{\space(\glsaccesssymbol{\glslabel})}{}% + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdiscardperiod} +% Discard following period (if present) if the +% \catattr{discardperiod} attribute is true. If a period is +% discarded, do the second argument otherwise do the third +% argument. The entry label is in the first argument. +% Since this is designed for abbreviations that end with a period, +% check if the plural form was used (which typically won't end with +% a period). +%\changes{0.3}{2015-12-02}{added check for plural} +% \begin{macrocode} +\newcommand*{\glsxtrdiscardperiod}[3]{% + \glsifattribute{#1}{discardperiod}{true}% + {% + \glsifplural + {% + \glsifattribute{#1}{pluraldiscardperiod}{true}% + {\glsxtrifperiod{#2}{#3}}% + {#3}% + }% + {% + \glsxtrifperiod{#2}{#3}% + }% + }% + {#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifperiod} +% Make a convenient user command to check if the next character is a +% full stop (period). Works like \cs{@ifstar} but uses +% \cs{new@ifnextchar} rather than \cs{@ifnextchar} +% \begin{macrocode} +\newcommand*{\glsxtrifperiod}[1]{\new@ifnextchar.{\@firstoftwo{#1}}} +% \end{macrocode} +%\end{macro} +% +% Sometimes it's useful to test if there's a punctuation character +% following the glossary entry. +%\begin{macro}{\glsxtr@punclist} +% List of characters identified as punctuation marks. (Be careful of +% \sty{babel} shorthands!) This doesn't allow for punctuation marks +% made up from multiple characters (such as \verb|''|). +% \begin{macrocode} +\newcommand*{\glsxtr@punclist}{.,:;?!} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtraddpunctuationmark} +% Add character to punctuation list. +% \begin{macrocode} +\newcommand*{\glsxtraddpunctuationmark}[1]{\appto\glsxtr@punclist{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrsetpunctuationmarks} +% Reset the punctuation list. +% \begin{macrocode} +\newcommand*{\glsxtrsetpunctuationmarks}[1]{\def\glsxtr@punclist{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifpunc} +%\begin{definition} +%\cs{glsxtrifnextpunc}\marg{true part}\marg{false part} +%\end{definition} +%Test if this is followed by a punctuation mark. (Adapted from +%\cs{new@ifnextchar}.) +% \begin{macrocode} +\newcommand*{\glsxtrifnextpunc}[2]{% + \def\reserved@a{#1}% + \def\reserved@b{#2}% + \futurelet\@glspunc@token\glsxtr@ifnextpunc +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@ifnextpunc} +% \begin{macrocode} +\newcommand*{\glsxtr@ifnextpunc}{% + \glsxtr@ifpunctoken{\@glspunc@token}{\let\reserved@b\reserved@a}{}% + \reserved@b +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@ifpunctoken} +% Test if the token given in the first argument is in the +% punctuation list. +% \begin{macrocode} +\newcommand*{\glsxtr@ifpunctoken}[1]{% + \expandafter\@glsxtr@ifpunctoken\expandafter#1\glsxtr@punclist\@nnil +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@ifpunctoken} +% \begin{macrocode} +\def\@glsxtr@ifpunctoken#1#2{% + \let\reserved@d=#2% + \ifx\reserved@d\@nnil + \let\glsxtr@next\@glsxtr@notfoundinlist + \else + \ifx#1\reserved@d + \let\glsxtr@next\@glsxtr@foundinlist + \else + \let\glsxtr@next\@glsxtr@ifpunctoken + \fi + \fi + \glsxtr@next#1% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@foundinlist} +% \begin{macrocode} +\def\@glsxtr@foundinlist#1\@nnil{\@firstoftwo} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@notfoundinlist} +% \begin{macrocode} +\def\@glsxtr@notfoundinlist#1{\@secondoftwo} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdopostpunc} +%\begin{definition} +%\cs{glsxtrdopostpunc}\marg{code} +%\end{definition} +% If this is followed be a punctuation character, do \meta{code} +% after the character otherwise do \meta{code} before whatever comes +% next. +% \begin{macrocode} +\newcommand{\glsxtrdopostpunc}[1]{% + \glsxtrifnextpunc{\@glsxtr@swaptwo{#1}}{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@swaptwo} +% \begin{macrocode} +\newcommand{\@glsxtr@swaptwo}[2]{#2#1} +% \end{macrocode} +%\end{macro} +% +%\section{Abbreviations} +% +%The \qt{acronym} code from \sty{glossaries} is misnamed as it's more +%often used for other forms of abbreviations. This code corrects +%this inconsistency, but rather than just having synonyms, provide +% commands for abbreviations that have a similar, but not identical, +% underlying mechanism to acronyms. +% +% If there's a style for the given category, apply it. +% \begin{macrocode} +\define@key{glsxtrabbrv}{category}{% + \edef\glscategorylabel{#1}% + \ifcsdef{@glsabbrv@current@#1}% + {% + \glsxtr@applyabbrvstyle{\csname @glsabbrv@current@#1\endcsname}% + }% + {}% +} +% \end{macrocode} +% Save the short plural form. This may be needed before the entry is +% defined. +% \begin{macrocode} +\define@key{glsxtrabbrv}{shortplural}{% + \def\@gls@shortpl{#1}% +} +% \end{macrocode} +% Similarly for the long plural form. +% \begin{macrocode} +\define@key{glsxtrabbrv}{longplural}{% + \def\@gls@longpl{#1}% +} +% \end{macrocode} +% +% Token registers for the short plural and long plural, provided for +% use in the abbreviation style definitions. +%\begin{macro}{\glsshortpltok} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newtoks\glsshortpltok +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glslongpltok} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newtoks\glslongpltok +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@insertdots} +%\changes{0.3}{2015-12-02}{new} +% Provided in case user wants to automatically insert dots between +% each letter of the abbreviation. This should be applied before +% defining the abbreviation to optimise the document build. +% (Otherwise, it would have to be done each time the short form is +% required, which is an unnecessary waste of time.) For this to work +% the short form must be expanded when passed to +% \cs{newabbreviation}. Note that explicitly using the +% \gloskey{short} or \gloskey{shortplural} keys will override this. +% \begin{macrocode} +\newcommand*{\@glsxtr@insertdots}[2]{% + \def#1{}% + \@glsxtr@insert@dots#1#2\@nnil +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@insert@dots} +% \begin{macrocode} +\newcommand*{\@glsxtr@insert@dots}[2]{% + \ifx\@nnil#2\relax + \let\@glsxtr@insert@dots@next\@gobble + \else + \ifx\relax#2\relax + \else + \appto#1{#2.}% + \fi + \let\@glsxtr@insert@dots@next\@glsxtr@insert@dots + \fi + \@glsxtr@insert@dots@next#1% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\newabbreviation} +% Define a new generic abbreviation. +% \begin{macrocode} +\newcommand*{\newabbreviation}[4][]{% + \glskeylisttok{#1}% + \glslabeltok{#2}% + \glsshorttok{#3}% + \glslongtok{#4}% +% \end{macrocode} +% Get the category. +%\changes{0.3}{2015-12-02}{fixed family name in \cs{setkeys}} +% \begin{macrocode} + \def\glscategorylabel{abbreviation}% + \glsxtr@applyabbrvstyle{\@glsabbrv@current@abbreviation}% + \setkeys*{glsxtrabbrv}[shortplural,longplural]{#1}% +% \end{macrocode} +% Set the default long plural +% \begin{macrocode} + \def\@gls@longpl{#4\glspluralsuffix}% +% \end{macrocode} +% Has the \catattr{insertdots} attribute been set? +% \begin{macrocode} + \glsifcategoryattribute{\glscategorylabel}{insertdots}{true}% + {% + \@glsxtr@insertdots\@gls@short{#3}% + \expandafter\glsshorttok\expandafter{\@gls@short\spacefactor1000 \relax}% + \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}% + {% + \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short + '\abbrvpluralsuffix}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}% + {% + \let\@gls@shortpl\@gls@short + }% + {% + \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short + \abbrvpluralsuffix}% + }% + }% + }% + {% +% \end{macrocode} +% \catattr{insertdots} not true. +% \begin{macrocode} + \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}% + {% + \def\@gls@shortpl{#3'\abbrvpluralsuffix}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}% + {% + \def\@gls@shortpl{#3}% + }% + {% + \def\@gls@shortpl{#3\abbrvpluralsuffix}% + }% + }% + }% +% \end{macrocode} +% Hook for further customisation if required: +% \begin{macrocode} + \glsxtrnewabbrevpresetkeyhook{#1}{#2}{#3}% +% \end{macrocode} +% Get the short and long plurals provided by user in optional +% argument to override defaults, if necessary. +% \begin{macrocode} + \setkeys*{glsxtrabbrv}[category]{#1}% +% \end{macrocode} +% Set the plural token registers so the values can be accessed by +% the abbreviation styles. +% \begin{macrocode} + \expandafter\glsshortpltok\expandafter{\@gls@shortpl}% + \expandafter\glslongpltok\expandafter{\@gls@longpl}% +% \end{macrocode} +% Do any extra setup provided by hook: +% \begin{macrocode} + \newabbreviationhook +% \end{macrocode} +% Define this entry: +% \begin{macrocode} + \protected@edef\@do@newglossaryentry{% + \noexpand\newglossaryentry{\the\glslabeltok}% + {% + type=\glsxtrabbrvtype,% + category=abbreviation,% + short={\the\glsshorttok},% + shortplural={\the\glsshortpltok},% + long={\the\glslongtok},% + longplural={\the\glslongpltok},% + name={\the\glsshorttok},% + \CustomAbbreviationFields,% + \the\glskeylisttok + }% + }% + \@do@newglossaryentry + \GlsXtrPostNewAbbreviation +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrnewabbrevpresetkeyhook} +% Hook for extra stuff in \cs{newabbreviation} +%\changes{0.5.2}{2015-12-08}{new} +% \begin{macrocode} +\newcommand*{\glsxtrnewabbrevpresetkeyhook}[3]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrPostNewAbbreviation} +% Hook used by abbreviation styles. +% \begin{macrocode} +\newcommand*{\GlsXtrPostNewAbbreviation}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\newabbreviationhook} +% Hook for use with \cs{newabbreviation}. +% \begin{macrocode} +\newcommand*{\newabbreviationhook}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\CustomAbbreviationFields} +% \begin{macrocode} +\newcommand*{\CustomAbbreviationFields}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfullformat} +% Full format without case change. +% \begin{macrocode} +\newcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{#1}}#2\glsxtrfullsep{#1}% + (\protect\glsfirstabbrvfont{\glsaccessshort{#1}})% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrfullformat} +% Full format with case change. +% \begin{macrocode} +\newcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{#1}}#2\glsxtrfullsep{#1}% + (\protect\glsfirstabbrvfont{\glsaccessshort{#1}})% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfullplformat} +% Plural full format without case change. +% \begin{macrocode} +\newcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% + (\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}})% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrfullplformat} +% Plural full format with case change. +% \begin{macrocode} +\newcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% + (\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}})% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfullsep} +% Separator used by full format is a space by default. The argument +% is the entry's label. +% \begin{macrocode} +\newcommand*{\glsxtrfullsep}[1]{\space} +% \end{macrocode} +%\end{macro} +% +% In-line formats in case first use isn't compatible with +% \cs{glsentryfull} (for example, first use suppresses the long form +% or uses a footnote). +%\begin{macro}{\glsxtrinlinefullformat} +% Full format without case change. +% \begin{macrocode} +\newcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrinlinefullformat} +% Full format with case change. +% \begin{macrocode} +\newcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfullplformat} +% Plural full format without case change. +% \begin{macrocode} +\newcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrinlinefullplformat} +% Plural full format with case change. +% \begin{macrocode} +\newcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat} +% \end{macrocode} +%\end{macro} +% +% Redefine \cs{glsentryfull} etc to use the inline format. +% Since these commands as supposed to be expandable, they can only +% use the currently applied style. If there are mixed styles, you'll +% need to use the \cs{glsxtrfull} set of commands instead. +%\begin{macro}{\glsentryfull} +% \begin{macrocode} +\renewcommand*{\glsentryfull}[1]{\glsxtrinlinefullformat{#1}{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsentryfull} +% \begin{macrocode} +\renewcommand*{\Glsentryfull}[1]{\Glsxtrinlinefullformat{#1}{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsentryfullpl} +% \begin{macrocode} +\renewcommand*{\glsentryfullpl}[1]{\glsxtrinlinefullplformat{#1}{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsentryfullpl} +% \begin{macrocode} +\renewcommand*{\Glsentryfullpl}[1]{\Glsxtrinlinefullplformat{#1}{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfirstabbrvfont} +% Font changing command used for the abbreviation on first use or in +% the full format. +% \begin{macrocode} +\newcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfirstabbrvdefaultfont} +% Font changing command used for the abbreviation on first use or in +% the full format. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\glsfirstabbrvdefaultfont}[1]{\glsabbrvfont{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsabbrvfont} +% Font changing command used for the abbreviation on subsequent use. +% \begin{macrocode} +\newcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsabbrvdefaultfont} +%\changes{0.3}{2015-12-02}{renamed from \cs{abbrvdefaultfont}} +% \begin{macrocode} +\newcommand*{\glsabbrvdefaultfont}[1]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfirstlongfont} +% Font changing command used for the long form on first use or in +% the full format. +% \begin{macrocode} +\newcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfirstlongdefaultfont} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\glsfirstlongdefaultfont}[1]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\abbrvpluralsuffix} +% Default plural suffix. +% \begin{macrocode} +\newcommand*{\abbrvpluralsuffix}{\glspluralsuffix} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfull} +% Full form (no case-change). +% \begin{macrocode} +\newrobustcmd*{\glsxtrfull}{\@gls@hyp@opt\ns@glsxtrfull} +\newcommand*\ns@glsxtrfull[2][]{% + \new@ifnextchar[{\@glsxtr@full{#1}{#2}}% + {\@glsxtr@full{#1}{#2}[]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@full} +% Low-level macro: +% \begin{macrocode} +\def\@glsxtr@full#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsxtrinlinefullformat{#2}{#3}}% +% \end{macrocode} +% What should \cs{glsxtrifwasfirstuse} be set to here? Where the inline +% and display full forms are the same, this is essentially emulating +% first use, to it make sense for the postlink hook to pretend it +% was a first use instance. It makes less sense if the inline and +% display forms are different. Provide a hook to make it easier to +% reconfigure. +% \begin{macrocode} + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrsetupfulldefs} +% \begin{macrocode} +\newcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@firstoftwo +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrfull} +% Full form (first letter uppercase). +% \begin{macrocode} +\newrobustcmd*{\Glsxtrfull}{\@gls@hyp@opt\ns@Glsxtrfull} +\newcommand*\ns@Glsxtrfull[2][]{% + \new@ifnextchar[{\@Glsxtr@full{#1}{#2}}% + {\@Glsxtr@full{#1}{#2}[]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@Glsxtr@full} +% Low-level macro: +% \begin{macrocode} +\def\@Glsxtr@full#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsxtrinlinefullformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrfull} +% Full form (all uppercase). +% \begin{macrocode} +\newrobustcmd*{\GLSxtrfull}{\@gls@hyp@opt\ns@GLSxtrfull} +\newcommand*\ns@GLSxtrfull[2][]{% + \new@ifnextchar[{\@GLSxtr@full{#1}{#2}}% + {\@GLSxtr@full{#1}{#2}[]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@GLSxtr@full} +% Low-level macro: +% \begin{macrocode} +\def\@GLSxtr@full#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{\mfirstucMakeUppercase{\glsxtrinlinefullformat{#2}{#3}}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfullpl} +% Plural full form (no case-change). +% \begin{macrocode} +\newrobustcmd*{\glsxtrfullpl}{\@gls@hyp@opt\ns@glsxtrfullpl} +\newcommand*\ns@glsxtrfullpl[2][]{% + \new@ifnextchar[{\@glsxtr@fullpl{#1}{#2}}% + {\@glsxtr@fullpl{#1}{#2}[]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@fullpl} +% Low-level macro: +% \begin{macrocode} +\def\@glsxtr@fullpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsxtrinlinefullplformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrfullpl} +% Plural full form (first letter uppercase). +% \begin{macrocode} +\newrobustcmd*{\Glsxtrfullpl}{\@gls@hyp@opt\ns@Glsxtrfullpl} +\newcommand*\ns@Glsxtrfullpl[2][]{% + \new@ifnextchar[{\@Glsxtr@fullpl{#1}{#2}}% + {\@Glsxtr@fullpl{#1}{#2}[]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@Glsxtr@fullpl} +% Low-level macro: +% \begin{macrocode} +\def\@Glsxtr@fullpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsxtrinlinefullplformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrfullpl} +% Plural full form (all upper case). +% \begin{macrocode} +\newrobustcmd*{\GLSxtrfullpl}{\@gls@hyp@opt\ns@GLSxtrfullpl} +\newcommand*\ns@GLSxtrfullpl[2][]{% + \new@ifnextchar[{\@GLSxtr@fullpl{#1}{#2}}% + {\@GLSxtr@fullpl{#1}{#2}[]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@GLSxtr@fullpl} +% Low-level macro: +% \begin{macrocode} +\def\@GLSxtr@fullpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\glsxtrinlinefullplformat{#2}{#3}}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +% The short and long forms work in a similar way to acronyms. +%\begin{macro}{\glsxtrshort} +% \begin{macrocode} +\newrobustcmd*{\glsxtrshort}{\@gls@hyp@opt\ns@glsxtrshort} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@glsxtrshort}[2][]{% + \new@ifnextchar[{\@glsxtrshort{#1}{#2}}{\@glsxtrshort{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@glsxtrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% +% \end{macrocode} +% Need to make sure \cs{glsabbrvfont} is set correctly. +% \begin{macrocode} + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrshort} +% \begin{macrocode} +\newrobustcmd*{\Glsxtrshort}{\@gls@hyp@opt\ns@Glsxtrshort} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@Glsxtrshort}[2][]{% + \new@ifnextchar[{\@Glsxtrshort{#1}{#2}}{\@Glsxtrshort{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@Glsxtrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\Glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrshort} +% \begin{macrocode} +\newrobustcmd*{\GLSxtrshort}{\@gls@hyp@opt\ns@GLSxtrshort} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@GLSxtrshort}[2][]{% + \new@ifnextchar[{\@GLSxtrshort{#1}{#2}}{\@GLSxtrshort{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@GLSxtrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\glsabbrvfont{\glsaccessshort{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrlong} +% \begin{macrocode} +\newrobustcmd*{\glsxtrlong}{\@gls@hyp@opt\ns@glsxtrlong} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@glsxtrlong}[2][]{% + \new@ifnextchar[{\@glsxtrlong{#1}{#2}}{\@glsxtrlong{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@glsxtrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsaccesslong{#2}#3}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrlong} +% \begin{macrocode} +\newrobustcmd*{\Glsxtrlong}{\@gls@hyp@opt\ns@Glsxtrlong} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@Glsxtrlong}[2][]{% + \new@ifnextchar[{\@Glsxtrlong{#1}{#2}}{\@Glsxtrlong{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@Glsxtrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsaccesslong{#2}#3}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrlong} +% \begin{macrocode} +\newrobustcmd*{\GLSxtrlong}{\@gls@hyp@opt\ns@GLSxtrlong} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@GLSxtrlong}[2][]{% + \new@ifnextchar[{\@GLSxtrlong{#1}{#2}}{\@GLSxtrlong{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@GLSxtrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{\mfirstucMakeUppercase{\glsaccesslong{#2}#3}}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +% Plural short forms: +%\begin{macro}{\glsxtrshortpl} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newrobustcmd*{\glsxtrshortpl}{\@gls@hyp@opt\ns@glsxtrshortpl} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@glsxtrshortpl}[2][]{% + \new@ifnextchar[{\@glsxtrshortpl{#1}{#2}}{\@glsxtrshortpl{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@glsxtrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrshortpl} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newrobustcmd*{\Glsxtrshortpl}{\@gls@hyp@opt\ns@Glsxtrshortpl} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@Glsxtrshortpl}[2][]{% + \new@ifnextchar[{\@Glsxtrshortpl{#1}{#2}}{\@Glsxtrshortpl{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@Glsxtrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\Glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrshortpl} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newrobustcmd*{\GLSxtrshortpl}{\@gls@hyp@opt\ns@GLSxtrshortpl} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@GLSxtrshortpl}[2][]{% + \new@ifnextchar[{\@GLSxtrshortpl{#1}{#2}}{\@GLSxtrshortpl{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@GLSxtrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\glsabbrvfont{\glsaccessshortpl{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +% Plural long forms: +%\begin{macro}{\glsxtrlongpl} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newrobustcmd*{\glsxtrlongpl}{\@gls@hyp@opt\ns@glsxtrlongpl} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@glsxtrlongpl}[2][]{% + \new@ifnextchar[{\@glsxtrlongpl{#1}{#2}}{\@glsxtrlongpl{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@glsxtrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsaccesslongpl{#2}#3}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrlongpl} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newrobustcmd*{\Glsxtrlongpl}{\@gls@hyp@opt\ns@Glsxtrlongpl} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@Glsxtrlongpl}[2][]{% + \new@ifnextchar[{\@Glsxtrlongpl{#1}{#2}}{\@Glsxtrlongpl{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@Glsxtrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsaccesslongpl{#2}#3}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrlongpl} +%\changes{0.3}{2015-12-02}{new} +% \begin{macrocode} +\newrobustcmd*{\GLSxtrlongpl}{\@gls@hyp@opt\ns@GLSxtrlongpl} +% \end{macrocode} +% Define the un-starred form. Need to determine if there is +% a final optional argument +% \begin{macrocode} +\newcommand*{\ns@GLSxtrlongpl}[2][]{% + \new@ifnextchar[{\@GLSxtrlongpl{#1}{#2}}{\@GLSxtrlongpl{#1}{#2}[]}% +} +% \end{macrocode} +% Read in the final optional argument: +% \begin{macrocode} +\def\@GLSxtrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{\mfirstucMakeUppercase{\glsaccesslongpl{#2}#3}}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glssetabbrvfmt} +% Set the current format for the given category (or the +% \category{abbreviation} category if unset). +% \begin{macrocode} +\newcommand*{\glssetabbrvfmt}[1]{% + \ifcsdef{@glsabbrv@current@#1}% + {\glsxtr@applyabbrvfmt{\csname @glsabbrv@current@#1\endcsname}}% + {\glsxtr@applyabbrvfmt{\@glsabbrv@current@abbreviation}}% +} +% \end{macrocode} +%\end{macro} +% +%\changes{0.5.2}{2015-12-08}{removed \cs{glsxtrabbrvfmt}} +%\begin{macro}{\glsxtrgenabbrvfmt} +% Similar to \cs{glsgenacfmt}, but for abbreviations. +% \begin{macrocode} +\newcommand*{\glsxtrgenabbrvfmt}{% + \ifdefempty\glscustomtext + {% + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use: +% \begin{macrocode} + \glsifplural + {% +% \end{macrocode} +% Subsequent plural form: +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Subsequent plural form, don't adjust case: +% \begin{macrocode} + \glsabbrvfont{\glsaccessshortpl{\glslabel}}\glsinsert + }% + {% +% \end{macrocode} +% Subsequent plural form, make first letter upper case: +% \begin{macrocode} + \glsabbrvfont{\Glsaccessshortpl{\glslabel}}\glsinsert + }% + {% +% \end{macrocode} +% Subsequent plural form, all caps: +% \begin{macrocode} + \mfirstucMakeUppercase + {\glsabbrvfont{\glsaccessshortpl{\glslabel}}\glsinsert}% + }% + }% + {% +% \end{macrocode} +% Subsequent singular form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Subsequent singular form, don't adjust case: +% \begin{macrocode} + \glsabbrvfont{\glsaccessshort{\glslabel}}\glsinsert + }% + {% +% \end{macrocode} +% Subsequent singular form, make first letter upper case: +% \begin{macrocode} + \glsabbrvfont{\Glsaccessshort{\glslabel}}\glsinsert + }% + {% +% \end{macrocode} +% Subsequent singular form, all caps: +% \begin{macrocode} + \mfirstucMakeUppercase + {\glsabbrvfont{\glsaccessshort{\glslabel}}\glsinsert}% + }% + }% + }% + {% +% \end{macrocode} +% First use: +% \begin{macrocode} + \glsifplural + {% +% \end{macrocode} +% First use plural form: +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% First use plural form, don't adjust case: +% \begin{macrocode} + \glsxtrfullplformat{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% First use plural form, make first letter upper case: +% \begin{macrocode} + \Glsxtrfullplformat{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% First use plural form, all caps: +% \begin{macrocode} + \mfirstucMakeUppercase + {\glsxtrfullplformat{\glslabel}{\glsinsert}}% + }% + }% + {% +% \end{macrocode} +% First use singular form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% First use singular form, don't adjust case: +% \begin{macrocode} + \glsxtrfullformat{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% First use singular form, make first letter upper case: +% \begin{macrocode} + \Glsxtrfullformat{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% First use singular form, all caps: +% \begin{macrocode} + \mfirstucMakeUppercase + {\glsxtrfullformat{\glslabel}{\glsinsert}}% + }% + }% + }% + }% + {% +% \end{macrocode} +% User supplied text. +% \begin{macrocode} + \glscustomtext + }% +} +% \end{macrocode} +%\end{macro} +% +%\subsection{Abbreviation Styles Setup} +% +%\begin{macro}{\setabbreviationstyle} +% \begin{macrocode} +\newcommand*{\setabbreviationstyle}[2][abbreviation]{% + \ifcsundef{@glsabbrv@dispstyle@setup@#2} + {% + \PackageError{glossaries-extra}{Undefined abbreviation style `#2'}{}% + }% + {% +% \end{macrocode} +% Have abbreviations already been defined for this category? +%\changes{0.5.2}{2015-12-08}{added check for post-definition style switch} +% \begin{macrocode} + \ifcsstring{@glsabbrv@current@#1}{#2}% + {% +% \end{macrocode} +% Style already set. +% \begin{macrocode} + }% + {% + \def\@glsxtr@dostylewarn{}% + \glsforeachincategory{#1}{\@gls@type}{\@gls@label}% + {% + \def\@glsxtr@dostylewarn{\GlossariesWarning{Abbreviation + style has been switched \MessageBreak + for category `#1', \MessageBreak + but there have already been entries \MessageBreak + defined for this category. Unwanted \MessageBreak + side-effects may result}}% + \@endfortrue + }% + \@glsxtr@dostylewarn +% \end{macrocode} +% Set up the style for the given category. +% \begin{macrocode} + \csdef{@glsabbrv@current@#1}{#2}% + \glsxtr@applyabbrvstyle{#2}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@applyabbrvstyle} +% Apply the abbreviation style without existence check. +% \begin{macrocode} +\newcommand*{\glsxtr@applyabbrvstyle}[1]{% + \csuse{@glsabbrv@dispstyle@setup@#1}% + \csuse{@glsabbrv@dispstyle@fmts@#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@applyabbrvfmt} +% Only apply the style formats. +% \begin{macrocode} +\newcommand*{\glsxtr@applyabbrvfmt}[1]{% + \csuse{@glsabbrv@dispstyle@fmts@#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\newabbreviationstyle} +% This is different from \cs{newacronymstyle}. The first argument is +% the label, the second argument sets the information required when +% defining the new abbreviation and the third argument sets the +% commands used to display the full format. +% \begin{macrocode} +\newcommand*{\newabbreviationstyle}[3]{% + \ifcsdef{@glsabbrv@dispstyle@#1} + {% + \PackageError{glossaries-extra}{Abbreviation style `#1' already + defined}{}% + }% + {% + \csdef{@glsabbrv@dispstyle@setup@#1}{% +% \end{macrocode} +% Initialise hook to do nothing. The style may change this. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{}% + #2}% + \csdef{@glsabbrv@dispstyle@fmts@#1}{% +% \end{macrocode} +% Assume in-line form is the same as first use. The style may change +% this. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}% + \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}% + \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}% + \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}% + #3}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrUseAbbrStyleSetup} +% \begin{macrocode} +\newcommand*{\GlsXtrUseAbbrStyleSetup}[1]{% + \ifcsundef{@glsabbrv@dispstyle@setup@#1}% + {% + \PackageError{glossaries-extra}% + {Unknown abbreviation style definitions `#1'}{}% + }% + {% + \csname @glsabbrv@dispstyle@setup@#1\endcsname + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrUseAbbrStyleFmts} +% \begin{macrocode} +\newcommand*{\GlsXtrUseAbbrStyleFmts}[1]{% + \ifcsundef{@glsabbrv@dispstyle@fmts@#1}% + {% + \PackageError{glossaries-extra}% + {Unknown abbreviation style formats `#1'}{}% + }% + {% + \csname @glsabbrv@dispstyle@fmts@#1\endcsname + }% +} +% \end{macrocode} +%\end{macro} +% +%\subsection{Predefined Styles (Default Font)} +% Define some common styles. These will set the \gloskey{first}, +% \gloskey{firstplural}, \gloskey{text} and \gloskey{plural} +% keys, even if the \catattr{regular} attribute isn't set to +% \qt{true}. If this attribute is set, commands like \cs{gls} will +% use them as per a regular entry, otherwise those keys will be +% ignored unless explicitly invoked by the user with commands like +% \cs{glsfirst}. In order for the first letter uppercase versions to +% work correctly, \cs{glsxtrfullformat} needs to be expanded when +% those keys are set. The final optional argument of \cs{glsfirst} +% will behave differently to the final optional argument of \cs{gls} +% with some styles. +%\begin{abbrvstyle}{long-short} +% \begin{macrocode} +\newabbreviationstyle{long-short}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% +% \end{macrocode} +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% +% \end{macrocode} +% The first use full form and the inline full form are the same for +% this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstabbrvfont{\glsaccessshort{##1}})% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstabbrvfont{\glsaccessshort{##1}})% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +% Set this as the default style for general abbreviations: +% \begin{macrocode} +\setabbreviationstyle{long-short} +% \end{macrocode} +% +%\begin{abbrvstyle}{long-short-desc} +% User supplies description. The long form is included in the name. +%\changes{0.3}{2015-12-02}{fixed name to use \cs{glslabeltok}} +% \begin{macrocode} +\newabbreviationstyle{long-short-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsxtrfullformat{\the\glslabeltok}{}}, + sort={\the\glsshorttok},% + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% +% \end{macrocode} +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-long} +% Short form followed by long form in parenthesis on first use. +% \begin{macrocode} +\newabbreviationstyle{short-long}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongtok})},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% +% \end{macrocode} +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% +% \end{macrocode} +% The first use full form and the inline full form are the same for +% this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-long-desc} +% User supplies description. The long form is included in the name. +%\changes{0.3}{2015-12-02}{fixed name to use \cs{glslabeltok}} +% \begin{macrocode} +\newabbreviationstyle{short-long-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsxtrfullformat{\the\glslabeltok}{}}, + sort={\the\glsshorttok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongtok})},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% +% \end{macrocode} +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{footnote} +% Short form followed by long form in footnote on first use. +% Take care about using \cs{glsfirst} as this won't suppress the +% hyperlink. (Perhaps modify \cs{glsfirst} to reflect +% \catattr{nohyperfirst} attribute?) +% \begin{macrocode} +\newabbreviationstyle{footnote}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\footnote{\protect\glsfirstlongfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\footnote{\protect\glsfirstlongfont{\the\glslongpltok}}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% +% \end{macrocode} +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% +% \end{macrocode} +% The full format displays the short form followed by the long form +% as a footnote. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + \protect\footnote{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + \protect\footnote{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2% + \protect\footnote{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2% + \protect\footnote{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{postfootnote} +% Similar to the above but the footnote is placed afterwards, +% outside the link. This avoids nested links and can also move the +% footnote marker after any following punctuation mark. +% This deferment won't occur with \cs{glsfirst}. +% \begin{macrocode} +\newabbreviationstyle{postfootnote}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\footnote{\protect\glsfirstlongfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\footnote{\protect\glsfirstlongfont{\the\glslongpltok}}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% +% \end{macrocode} +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse{\glsxtrdopostpunc{\protect\footnote + {\glsfirstlongfont{\glsentrylong{\glslabel}}}}}{}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% +% \end{macrocode} +% The full format displays the short form. The long form is +% deferred. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2% + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +% +%\begin{abbrvstyle}{short} +% Provide a style that only displays the short form on first use, +% but the short and long form can be displayed with the \qt{full} +% commands that use the inline format. If the user supplies a +% description, the long form won't be displayed in the predefined +% glossary styles, but the post description hook can be employed to +% automatically insert it. +% \begin{macrocode} +\newabbreviationstyle{short}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, + text={\protect\glsabbrvfont{\the\glsshorttok}}, + plural={\protect\glsabbrvfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% +% \end{macrocode} +% The inline full form displays the short form followed by the +% long form in parentheses. +%\changes{0.2}{2015-11-30}{switched inline full form to short (long)} +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\Glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\Glsaccesslongpl{##1}})% + }% +% \end{macrocode} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% Set this as the default style for acronyms: +% \begin{macrocode} +\setabbreviationstyle[acronym]{short} +% \end{macrocode} +% +%\begin{abbrvstyle}{short-desc} +% The user must supply the description in this style. The long form +% is added to the name. The \abbrstyle{short} style (possibly with the +% post-description hooks set) might be a better option. +% \begin{macrocode} +\newabbreviationstyle{short-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsextrinlinefullformat{\the\glslabeltok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, + text={\protect\glsabbrvfont{\the\glsshorttok}}, + plural={\protect\glsabbrvfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% +% \end{macrocode} +% The inline full form displays the short format followed by the +% long form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% +% \end{macrocode} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-desc} +% Provide a style that only displays the long form, +% but the long and short form can be displayed with the \qt{full} +% commands that use the inline format. The predefined glossary styles +% won't show the short form. The user must supply a description for +% this style. +% \begin{macrocode} +\newabbreviationstyle{long-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\protect\glsfirstlongfont{\the\glslongtok}}, + sort={\the\glslongtok}, + first={\protect\glsfirstlongfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, + text={\the\glslongtok}, + plural={\the\glslongpltok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}}##2\glsxtrfullsep{##1}% + (\protect\glsfirstabbrvfont{\glsaccessshort{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}}##2\glsxtrfullsep{##1}% + (\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}}##2\glsxtrfullsep{##1}% + (\protect\glsfirstabbrvfont{\glsaccessshort{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}}##2\glsxtrfullsep{##1}% + (\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}}##2% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}}##2% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}}##2% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}}##2% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long} +% It doesn't really make a great deal of sense to have a long-only +% style that doesn't have a description, but the best course of +% action here is to use the short form as the name and the long +% form as the description. +% \begin{macrocode} +\newabbreviationstyle{long}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, + text={\the\glslongtok}, + plural={\the\glslongpltok},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-desc}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\subsection{Predefined Styles (Small Capitals)} +%These styles use: +%\begin{macro}{\glsxtrscfont} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\glsxtrscfont}[1]{\textsc{#1}} +% \end{macrocode} +%\end{macro} +% and for the default short form suffix: +%\begin{macro}{\glsxtrscsuffix} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-short-sc} +% \begin{macrocode} +\newabbreviationstyle{long-short-sc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short}% +}% +{% +% \end{macrocode} +% Mostly as long-short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-short}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +% +%\begin{abbrvstyle}{long-short-sc-desc} +% \begin{macrocode} +\newabbreviationstyle{long-short-sc-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short-desc}% +}% +{% +% \end{macrocode} +% Mostly as long-short-desc style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-short-desc}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +% +% Now the short (long) version +% \begin{macrocode} +\newabbreviationstyle{short-sc-long}% +{% + \GlsXtrUseAbbrStyleSetup{short-long}% +}% +{% +% \end{macrocode} +% Mostly as short-long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-long}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +% As before but user provides description +% \begin{macrocode} +\newabbreviationstyle{short-sc-long-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-long-desc}% +}% +{% +% \end{macrocode} +% Mostly as short-long-desc style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-long-desc}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sc} +% \begin{macrocode} +\newabbreviationstyle{short-sc}% +{% + \GlsXtrUseAbbrStyleSetup{short}% +}% +{% +% \end{macrocode} +% Mostly as short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sc-desc} +% \begin{macrocode} +\newabbreviationstyle{short-sc-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-desc}% +}% +{% +% \end{macrocode} +% Mostly as short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-desc}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-sc} +% The smallcaps font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsshort}. +% \begin{macrocode} +\newabbreviationstyle{long-sc}% +{% + \GlsXtrUseAbbrStyleSetup{long}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-desc-sc} +% The smallcaps font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsshort}. +% \begin{macrocode} +\newabbreviationstyle{long-desc-sc}% +{% + \GlsXtrUseAbbrStyleSetup{long-desc}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-desc}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{footnote-sc} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{footnote-sc}% +{% + \GlsXtrUseAbbrStyleSetup{footnote}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{footnote}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{postfootnote-sc} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{postfootnote-sc}% +{% + \GlsXtrUseAbbrStyleSetup{postfootnote}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{postfootnote}% +% \end{macrocode} +% Use smallcaps and adjust the plural suffix to revert to upright. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\subsection{Predefined Styles (Fake Small Capitals)} +% These styles require the \sty{relsize} package, which must be +% loaded by the user. These styles all use: +%\begin{macro}{\glsxtrsmfont} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} +% \end{macrocode} +%\end{macro} +% and for the default short form suffix: +%\begin{macro}{\glsxtrsmsuffix} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\glsxtrsmsuffix}{\glspluralsuffix} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-short-sm} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{long-short-sm}% +{% + \GlsXtrUseAbbrStyleSetup{long-short}% +}% +{% +% \end{macrocode} +% Mostly as long-short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-short}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-short-sm-desc} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{long-short-sm-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short-desc}% +}% +{% +% \end{macrocode} +% Mostly as long-short-desc style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-short-desc}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sm-long} +% Now the short (long) version +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{short-sm-long}% +{% + \GlsXtrUseAbbrStyleSetup{short-long}% +}% +{% +% \end{macrocode} +% Mostly as short-long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sm-long-desc} +% As before but user provides description +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{short-sm-long-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-long-desc}% +}% +{% +% \end{macrocode} +% Mostly as short-long-desc style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-long-desc}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sm} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{short-sm}% +{% + \GlsXtrUseAbbrStyleSetup{short}% +}% +{% +% \end{macrocode} +% Mostly as short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sm-desc} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{short-sm-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-desc}% +}% +{% +% \end{macrocode} +% Mostly as short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-desc}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-sm} +%\changes{0.5}{2015-12-07}{new} +% The smallcaps font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsshort}. +% \begin{macrocode} +\newabbreviationstyle{long-sm}% +{% + \GlsXtrUseAbbrStyleSetup{long}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-desc-sm} +%\changes{0.5}{2015-12-07}{new} +% The smaller font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsshort}. +% \begin{macrocode} +\newabbreviationstyle{long-desc-sm}% +{% + \GlsXtrUseAbbrStyleSetup{long-desc}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-desc}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{footnote-sm} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{footnote-sm}% +{% + \GlsXtrUseAbbrStyleSetup{footnote}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{footnote}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{postfootnote-sm} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{postfootnote-sm}% +{% + \GlsXtrUseAbbrStyleSetup{postfootnote}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{postfootnote}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\subsection{Predefined Styles (Emphasized)} +% These styles use \ics{emph} for the short form. +% +%\begin{abbrvstyle}{long-short-em} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{long-short-em}% +{% + \GlsXtrUseAbbrStyleSetup{long-short}% +}% +{% +% \end{macrocode} +% Mostly as long-short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-short}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-short-em-desc} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{long-short-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short-desc}% +}% +{% +% \end{macrocode} +% Mostly as long-short-desc style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-short-desc}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-long} +% Now the short (long) version +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{short-em-long}% +{% + \GlsXtrUseAbbrStyleSetup{short-long}% +}% +{% +% \end{macrocode} +% Mostly as short-long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-long-desc} +% As before but user provides description +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{short-em-long-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-long-desc}% +}% +{% +% \end{macrocode} +% Mostly as short-long-desc style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-long-desc}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{short-em}% +{% + \GlsXtrUseAbbrStyleSetup{short}% +}% +{% +% \end{macrocode} +% Mostly as short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-desc} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{short-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-desc}% +}% +{% +% \end{macrocode} +% Mostly as short style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-desc}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-em} +%\changes{0.5}{2015-12-07}{new} +% The emphasized font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsshort}. +% \begin{macrocode} +\newabbreviationstyle{long-em}% +{% + \GlsXtrUseAbbrStyleSetup{long}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-desc-em} +%\changes{0.5}{2015-12-07}{new} +% The emphasized font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsshort}. +% \begin{macrocode} +\newabbreviationstyle{long-desc-em}% +{% + \GlsXtrUseAbbrStyleSetup{long-desc}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-desc}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{footnote-em} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{footnote-em}% +{% + \GlsXtrUseAbbrStyleSetup{footnote}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{footnote}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{postfootnote-em} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newabbreviationstyle{postfootnote-em}% +{% + \GlsXtrUseAbbrStyleSetup{postfootnote}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{postfootnote}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\section{Using Entries in Headings} +% +% There are four main problems with using entries in sectioning +% commands: they can mess with the first use flag if they end up in +% the table of contents, they can add unwanted numbers to the +% entry's location list, the label is corrupted if used inside +% \ics{MakeUppercase} (which is used by the default headings style) +% and they need to be expandable for PDF bookmarks. The +% \sty{glossaries} package therefore recommends the use of the +% expandable commands, such as \cs{glsentryshort}, instead but this +% doesn't reflect the formatting since it doesn't include +% \cs{glsabbrvfont}. The commands below are an attempt to get around +% these problems. +% +% The PDF bookmark issue can easily be fixed with \sty{hyperref}'s +% \cs{texorpdfstring} which can simply use the expandable command +% in the PDF string case. The \TeX\ string case can now use +% \cs{glsxtrshort} with the \gloskey{noindex} key set, which +% prevents the unwanted additions to the location list, and the +% \gloskey{hyper} key set to false, which prevents the problem of +% nested links. This just leaves one thing left that needs to be +% dealt with, and that's what to do if the heading style +% uses \cs{MakeUppercase}. +% +% Note that \sty{glossaries} automatically loads \sty{textcase}, so +% the label can be protected from case change with \sty{textcase}'s +% \cs{NoCaseChange}. This means that we don't have a problem +% provided the page style uses \cs{MakeTextUppercase}, but the +% default heading page style uses \cs{MakeUppercase}. +% +% To get around this, save the original definition of \cs{markboth} +% and \cs{markright} and adjust it so that \cs{MakeUppercase} is +% temporarily redefined to \cs{MakeTextUppercase}. Some packages or +% classes redefine these commands, so we can't just assume they +% still have the original kernel definition. +% +%\begin{macro}{\markright} +% Save original definition: +% \begin{macrocode} +\let\@glsxtr@org@markright\markright +% \end{macrocode} +% Redefine (grouping not added in case it interferes with the +% original code): +% \begin{macrocode} +\renewcommand*{\markright}[1]{% + \glsxtrmarkhook + \@glsxtr@org@markright{#1}% + \glsxtrrestoremarkhook +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\markboth} +% Save original definition: +% \begin{macrocode} +\let\@glsxtr@org@markboth\markboth +% \end{macrocode} +% Redefine (grouping not added in case it interferes with the +% original code): +% \begin{macrocode} +\renewcommand*{\markboth}[2]{% + \glsxtrmarkhook + \@glsxtr@org@markboth{#1}{#2}% + \glsxtrrestoremarkhook +} +% \end{macrocode} +%\end{macro} +% +% If this causes a problem provide a simple way of switching back to +% the original definitions: +%\begin{macro}{\glsxtrRevertMarks} +% \begin{macrocode} +\newcommand*{\glsxtrRevertMarks}{% + \let\markright\@glsxtr@org@markright + \let\markboth\@glsxtr@org@markboth +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrmarkhook} +% Hook used in new definition of \cs{markboth} and \cs{markright} +% to make some changes to apply to the marks: +% \begin{macrocode} +\newcommand*{\glsxtrmarkhook}{% +% \end{macrocode} +% Save current definitions: +% \begin{macrocode} + \let\@glsxtr@org@MakeUppercase\MakeUppercase + \let\@glsxtr@org@glsxtrtitleshort\glsxtrtitleshort + \let\@glsxtr@org@glsxtrtitleshortpl\glsxtrtitleshortpl + \let\@glsxtr@org@Glsxtrtitleshort\Glsxtrtitleshort + \let\@glsxtr@org@Glsxtrtitleshortpl\Glsxtrtitleshortpl + \let\@glsxtr@org@glsxtrtitletext\glsxtrtitletext + \let\@glsxtr@org@Glsxtrtitletext\Glsxtrtitletext + \let\@glsxtr@org@glsxtrtitleplural\glsxtrtitleplural + \let\@glsxtr@org@Glsxtrtitleplural\Glsxtrtitleplural + \let\@glsxtr@org@glsxtrtitlefirst\glsxtrtitlefirst + \let\@glsxtr@org@Glsxtrtitlefirst\Glsxtrtitlefirst + \let\@glsxtr@org@glsxtrtitlefirstplural\glsxtrtitlefirstplural + \let\@glsxtr@org@Glsxtrtitlefirstplural\Glsxtrtitlefirstplural +% \end{macrocode} +% New definitions +% \begin{macrocode} + \let\MakeUppercase\MakeTextUppercase + \let\glsxtrtitleshort\glsxtrheadshort + \let\glsxtrtitleshortpl\glsxtrheadshortpl + \let\Glsxtrtitleshort\Glsxtrheadshort + \let\Glsxtrtitleshortpl\Glsxtrheadshortpl + \let\glsxtrtitletext\glsxtrheadtext + \let\Glsxtrtitletext\Glsxtrheadtext + \let\glsxtrtitleplural\glsxtrheadplural + \let\Glsxtrtitleplural\Glsxtrheadplural + \let\glsxtrtitlefirst\glsxtrheadfirst + \let\Glsxtrtitlefirst\Glsxtrheadfirst + \let\glsxtrtitlefirstplural\glsxtrheadfirstplural + \let\Glsxtrtitlefirstplural\Glsxtrheadfirstplural +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrrestoremarkhook} +% Hook used in new definition of \cs{markboth} and \cs{markright} +% to restore the modified definitions. (This is in case the original +% \cs{markboth} and \cs{markright} shouldn't be grouped for some +% reason. There already is some grouping within those original +% definitions, but some of the code lies outside that grouping, and +% possibly there's a reason for it.) +% \begin{macrocode} +\newcommand*{\glsxtrrestoremarkhook}{% + \let\MakeUppercase\@glsxtr@org@MakeUppercase + \let\glsxtrtitleshort\@glsxtr@org@glsxtrtitleshort + \let\glsxtrtitleshortpl\@glsxtr@org@glsxtrtitleshortpl + \let\Glsxtrtitleshort\@glsxtr@org@Glsxtrtitleshort + \let\Glsxtrtitleshortpl\@glsxtr@org@Glsxtrtitleshortpl + \let\glsxtrtitletext\@glsxtr@org@glsxtrtitletext + \let\Glsxtrtitletext\@glsxtr@org@Glsxtrtitletext + \let\glsxtrtitleplural\@glsxtr@org@glsxtrtitleplural + \let\Glsxtrtitleplural\@glsxtr@org@Glsxtrtitleplural + \let\glsxtrtitlefirst\@glsxtr@org@glsxtrtitlefirst + \let\Glsxtrtitlefirst\@glsxtr@org@Glsxtrtitlefirst + \let\glsxtrtitlefirstplural\@glsxtr@org@glsxtrtitlefirstplural + \let\Glsxtrtitlefirstplural\@glsxtr@org@Glsxtrtitlefirstplural +} +% \end{macrocode} +%\end{macro} +% +%\changes{0.5.1}{2015-12-07}{removed \cs{ifglsxtruseuchead}} +% Instead of using one document-wide conditional, use +% \catattr{headuc} attribute to determine whether or not to use the +% all upper case form. +% +%\begin{macro}{\glsxtrheadshort} +% Command used to display short form in the page header. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\glsxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrshort[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrtitleshort} +% Command to display short form of abbreviation in section title and +% table of contents. +% \begin{macrocode} +\newrobustcmd*{\glsxtrtitleshort}[1]{% + \glsxtrshort[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrheadshortpl} +% Command used to display plural short form in the page header. +% If you want the text converted to upper case, this needs to be +% redefined to use \cs{GLSxtrshortpl} instead. If you are using a +% smallcaps style, the default fonts don't provide italic smallcaps. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\glsxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrshortpl[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrtitleshortpl} +% Command to display plural short form of abbreviation in section title and +% table of contents. +% \begin{macrocode} +\newrobustcmd*{\glsxtrtitleshortpl}[1]{% + \glsxtrshort[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrheadshort} +% Command used to display short form in the page header with the +% first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\Glsxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrshort[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitleshort} +% Command to display short form of abbreviation in section title and +% table of contents with the first letter converted to upper case. +% \begin{macrocode} +\newrobustcmd*{\Glsxtrtitleshort}[1]{% + \Glsxtrshort[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrheadshortpl} +% Command used to display plural short form in the page header with the +% first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\Glsxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrshortpl[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitleshortpl} +% Command to display plural short form of abbreviation in section title and +% table of contents with the first letter converted to upper case. +% \begin{macrocode} +\newrobustcmd*{\Glsxtrtitleshortpl}[1]{% + \Glsxtrshortpl[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrheadtext} +% As above but for the \gloskey{text} value. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\glsxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% + {% + \glstext[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrtitletext} +% Command to display \gloskey{text} value in section title and +% table of contents. +% \begin{macrocode} +\newrobustcmd*{\glsxtrtitletext}[1]{% + \glstext[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\Glsxtrheadtext} +% First letter converted to upper case +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\Glsxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% + {% + \Glstext[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitletext} +% Command to display \gloskey{text} value in section title and +% table of contents with the first letter changed to upper case. +% \begin{macrocode} +\newrobustcmd*{\Glsxtrtitletext}[1]{% + \Glstext[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrheadplural} +% As above but for the \gloskey{plural} value. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\glsxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% + {% + \glsplural[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrtitleplural} +% Command to display \gloskey{plural} value in section title and +% table of contents. +% \begin{macrocode} +\newrobustcmd*{\glsxtrtitleplural}[1]{% + \glsplural[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrheadplural} +% Convert first letter to upper case. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\Glsxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% + {% + \Glsplural[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitleplural} +% Command to display \gloskey{plural} value in section title and +% table of contents with the first letter changed to upper case. +% \begin{macrocode} +\newrobustcmd*{\Glsxtrtitleplural}[1]{% + \Glsplural[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrheadfirst} +% As above but for the \gloskey{first} value. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\glsxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% + {% + \glsfirst[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrtitlefirst} +% Command to display \gloskey{first} value in section title and +% table of contents. +% \begin{macrocode} +\newrobustcmd*{\glsxtrtitlefirst}[1]{% + \glsfirst[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrheadfirst} +% First letter converted to upper case +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\Glsxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% + {% + \Glsfirst[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitlefirst} +% Command to display \gloskey{first} value in section title and +% table of contents with the first letter changed to upper case. +% \begin{macrocode} +\newrobustcmd*{\Glsxtrtitlefirst}[1]{% + \Glsfirst[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrheadfirstplural} +% As above but for the \gloskey{firstplural} value. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\glsxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% + {% + \glsfirstplural[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrtitlefirstplural} +% Command to display \gloskey{firstplural} value in section title and +% table of contents. +% \begin{macrocode} +\newrobustcmd*{\glsxtrtitlefirstplural}[1]{% + \glsfirstplural[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrheadfirstplural} +% First letter converted to upper case +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% \begin{macrocode} +\newcommand*{\Glsxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% + {% + \Glsfirstplural[noindex,hyper=false]{#1}[]% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitlefirstplural} +% Command to display \gloskey{first} value in section title and +% table of contents with the first letter changed to upper case. +% \begin{macrocode} +\newrobustcmd*{\Glsxtrtitlefirstplural}[1]{% + \Glsfirstplural[noindex,hyper=false]{#1}[]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfmtshort} +% Provide a way of using the formatted short form in section +% headings. If \sty{hyperref} has been loaded, use +% \cs{texorpdfstring} for convenience in PDF bookmarks. +%\changes{0.2}{2015-11-30}{new} +%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshort}} +%\changes{0.5}{2015-12-07}{changed to use \cs{glsxtrtitleshort}} +%\changes{0.5}{2015-12-07}{renamed from \cs{glsentryfmtshort}} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtshort}[1]{% + \texorpdfstring + {\glsxtrtitleshort{#1}}% + {\glsentryshort{#1}}% + } +} +{ + \newcommand*{\glsfmtshort}[1]{% + \glsxtrtitleshort{#1}} +} +% \end{macrocode} +%\end{macro} +%Similarly for the plural version. +%\begin{macro}{\glsfmtshortpl} +%\changes{0.2}{2015-11-30}{new} +%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshortpl}} +%\changes{0.5}{2015-12-07}{changed to use \cs{glsxtrtitleshortpl}} +%\changes{0.5}{2015-12-07}{renamed from \cs{glsentryfmtshortpl}} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtshortpl}[1]{% + \texorpdfstring + {\glsxtrtitleshortpl{#1}}% + {\glsentryshortpl{#1}}% + } +} +{ + \newcommand*{\glsfmtshortpl}[1]{% + \glsxtrtitleshortpl{#1}} +} +% \end{macrocode} +%\end{macro} +% The case-changing version isn't suitable for PDF bookmarks, so the +% PDF alternative uses the non-case-changing version. +%\begin{macro}{\Glsfmtshort} +% Singular form (first letter uppercase). +%\changes{0.2}{2015-11-30}{new} +%\changes{0.4}{2015-12-03}{changed to use \cs{Glsxtrshort}} +%\changes{0.5}{2015-12-07}{changed to use \cs{Glsxtrtitleshort}} +%\changes{0.5}{2015-12-07}{renamed from \cs{Glsentryfmtshort}} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtshort}[1]{% + \texorpdfstring + {\Glsxtrtitleshort{#1}}% + {\glsentryshort{#1}}% + } +} +{ + \newcommand*{\Glsfmtshort}[1]{% + \Glsxtrtitleshort{#1}} +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Glsfmtshortpl} +%Plural form (first letter uppercase). +%\changes{0.2}{2015-11-30}{new} +%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshortpl}} +%\changes{0.5}{2015-12-07}{changed to use \cs{Glsxtrtitleshortpl}} +%\changes{0.5}{2015-12-07}{renamed from \cs{Glsentryfmtshortpl}} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtshortpl}[1]{% + \texorpdfstring + {\Glsxtrtitleshortpl{#1}}% + {\glsentryshortpl{#1}}% + } +} +{ + \newcommand*{\Glsfmtshortpl}[1]{% + \Glsxtrtitleshortpl{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfmttext} +%As above but for the \gloskey{text} value. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmttext}[1]{% + \texorpdfstring + {\glsxtrtitletext{#1}}% + {\glsentrytext{#1}}% + } +} +{ + \newcommand*{\glsfmttext}[1]{% + \glsxtrtitletext{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsfmttext} +%First letter converted to upper case. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmttext}[1]{% + \texorpdfstring + {\Glsxtrtitletext{#1}}% + {\glsentrytext{#1}}% + } +} +{ + \newcommand*{\Glsfmttext}[1]{% + \Glsxtrtitletext{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfmtplural} +%As above but for the \gloskey{plural} value. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtplural}[1]{% + \texorpdfstring + {\glsxtrtitleplural{#1}}% + {\glsentryplural{#1}}% + } +} +{ + \newcommand*{\glsfmtplural}[1]{% + \glsxtrtitleplural{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsfmtplural} +%First letter converted to upper case. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtplural}[1]{% + \texorpdfstring + {\Glsxtrtitleplural{#1}}% + {\glsentryplural{#1}}% + } +} +{ + \newcommand*{\Glsfmtplural}[1]{% + \Glsxtrtitleplural{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfmtfirst} +%As above but for the \gloskey{first} value. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtfirst}[1]{% + \texorpdfstring + {\glsxtrtitlefirst{#1}}% + {\glsentryfirst{#1}}% + } +} +{ + \newcommand*{\glsfmtfirst}[1]{% + \glsxtrtitlefirst{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsfmtfirst} +%First letter converted to upper case. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtfirst}[1]{% + \texorpdfstring + {\Glsxtrtitlefirst{#1}}% + {\glsentryfirst{#1}}% + } +} +{ + \newcommand*{\Glsfmtfirst}[1]{% + \Glsxtrtitlefirst{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfmtfirstpl} +%As above but for the \gloskey{firstplural} value. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtfirstpl}[1]{% + \texorpdfstring + {\glsxtrtitlefirstplural{#1}}% + {\glsentryfirstplural{#1}}% + } +} +{ + \newcommand*{\glsfmtfirstpl}[1]{% + \glsxtrtitlefirstplural{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsfmtfirstpl} +%First letter converted to upper case. +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtfirstpl}[1]{% + \texorpdfstring + {\Glsxtrtitlefirstplural{#1}}% + {\glsentryfirstplural{#1}}% + } +} +{ + \newcommand*{\Glsfmtfirstpl}[1]{% + \Glsxtrtitlefirstplural{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\section{Multi-Lingual Support} +% Add the facility to load language modules, if they are installed, +% but none are provided with this package. +% +%\begin{macro}{\RequireGlossariesExtraLang} +%\changes{0.5.3}{2015-12-09}{new} +% \begin{macrocode} +\newcommand*{\RequireGlossariesExtraLang}[1]{% + \@ifundefined{ver@glossariesxtr-#1.ldf}{\input{glossariesxtr-#1.ldf}}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\ProvidesGlossariesExtraLang} +%\changes{0.5.3}{2015-12-09}{new} +% \begin{macrocode} +\newcommand*{\ProvidesGlossariesExtraLang}[1]{% + \ProvidesFile{glossariesxtr-#1.ldf}% +} +% \end{macrocode} +%\end{macro} +% +% Load any required language modules that are available. This +% doesn't generate any warning if none are found, since they're not +% essential. (The only command that really needs defining for the +% document is \ics{abbreviationsname}, which can simply be redefined.) +% \begin{macrocode} +\@ifpackageloaded{tracklang} +{% + \AnyTrackedLanguages + {% + \ForEachTrackedDialect{\this@dialect}{% + \IfTrackedLanguageFileExists{\this@dialect}% + {glossariesxtr-}% prefix + {.ldf}% + {% + \RequireGlossariesExtraLang{\CurrentTrackedTag}% + }% + {% + }% + }% + }% + {}% +} +{} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +%</glossaries-extra.sty> +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins new file mode 100644 index 00000000000..989d375febe --- /dev/null +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins @@ -0,0 +1,31 @@ +% glossaries-extra.ins generated using makedtx version 1.1 2016/1/24 16:56 +\input docstrip + +\preamble + + glossaries-extra.dtx + Copyright 2016 Nicola Talbot + + This work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either version 1.3 + of this license of (at your option) any later version. + The latest version of this license is in + http://www.latex-project.org/lppl.txt + and version 1.3 or later is part of all distributions of LaTeX + version 2005/12/01 or later. + + This work has the LPPL maintenance status `maintained'. + + The Current Maintainer of this work is Nicola Talbot. + + This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived file glossaries-extra.sty. + +\endpreamble + +\askforoverwritefalse + +\generate{\file{glossaries-extra.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra.sty,package}} +} + +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty new file mode 100644 index 00000000000..fc0517ef5de --- /dev/null +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty @@ -0,0 +1,4853 @@ +%% +%% This is file `glossaries-extra.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% glossaries-extra.dtx (with options: `glossaries-extra.sty,package') +%% +%% glossaries-extra.dtx +%% Copyright 2016 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license of (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived file glossaries-extra.sty. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-extra}[2016/01/24 v1.0 (NLCT)] +\RequirePackage{xkeyval} +\RequirePackage{etoolbox} +\@ifpackageloaded{glossaries} +{% + \newcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}% + \let\@glsxtr@declareoption\@gls@declareoption +} +{% + \newcommand{\glsxtr@dooption}[1]{% + \PassOptionsToPackage{#1}{glossaries}% + }% + \PassOptionsToPackage{toc}{glossaries} + \PassOptionsToPackage{nopostdot}{glossaries} + \PassOptionsToPackage{noredefwarn}{glossaries} + \@ifpackageloaded{polyglossia}% + {}% + {% + \@ifpackageloaded{babel}% + {\PassOptionsToPackage{translate=babel}{glossaries}}% + {}% + }% + \newcommand*{\@glsxtr@declareoption}[2]{% + \DeclareOptionX{#1}{#2}% + \DeclareOption{#1}{#2}% + } +} +\newcommand*{\glsxtrundefaction}[2]{% + \@glsxtrundeftag\PackageError{glossaries-extra}{#1}{#2}% +} +\newcommand*{\glsxtr@warnonexistsordo}[1]{} +\newcommand*{\glsxtrundeftag}{??} +\newcommand*{\@glsxtrundeftag}{} +\define@choicekey{glossaries-extra.sty}{undefaction}[\val\nr]% + {warn,error}% + {% + \ifcase\nr\relax + \renewcommand*{\glsxtrundefaction}[2]{% + \@glsxtrundeftag\GlossariesExtraWarning{##1}% + }% + \renewcommand*{\glsxtr@warnonexistsordo}[1]{% + \GlossariesExtraWarning{glossaries-extra}{% + \string##1\space hasn't been defined, so + some errors won't be converted to warnings. + (This most likely means your version of + glossaries.sty is below version 4.19.)}% + }% + \or + \renewcommand*{\glsxtrundefaction}[2]{% + \@glsxtrundeftag\PackageError{glossaries-extra}{##1}{##2}% + }% + \renewcommand*{\glsxtr@warnonexistsordo}[1]{}% + \fi + } +\define@boolkey{glossaries-extra.sty}[@glsxtr]{docdef}[true]{} +\define@boolkey{glossaries-extra.sty}[@glsxtr]{indexcrossrefs}[true]{% + \if@glsxtrindexcrossrefs + \else + \renewcommand*{\@glsxtr@autoindexcrossrefs}{}% + \fi +} +\@glsxtrindexcrossrefsfalse +\newcommand*{\@glsxtr@autoindexcrossrefs}{\@glsxtrindexcrossrefstrue} +\newcommand*{\GlossariesExtraWarning}[1]{\PackageWarning{glossaries-extra}{#1}} +\newcommand*{\GlossariesExtraWarningNoLine}[1]{% + \PackageWarningNoLine{glossaries-extra}{#1}} +\@glsxtr@declareoption{nowarn}{% + \let\GlossariesExtraWarning\@gobble + \let\GlossariesExtraWarningNoLine\@gobble + \glsxtr@dooption{nowarn}% +} +\newcommand*{\glsxtrabbrvtype}{\glsdefaulttype} +\newcommand*{\@glsxtr@abbreviationsdef}{} + +\newcommand*{\@glsxtr@doabbreviationsdef}{% + \@ifpackageloaded{babel}% + {\providecommand{\abbreviationsname}{\acronymname}}% + {\providecommand{\abbreviationsname}{Abbreviations}}% + \newglossary[glg-abr]{abbreviations}{gls-abr}{glo-abr}{\abbreviationsname}% + \renewcommand*{\glsxtrabbrvtype}{abbreviations}% + \newcommand*{\printabbreviations}[1][]{% + \printglossary[type=\glsxtrabbrvtype,##1]% + }% + \disable@keys{glossaries-extra.sty}{abbreviations}% + \ifglsacronym + \else + \renewcommand*{\acronymtype}{\glsxtrabbrvtype}% + \fi +}% +\@glsxtr@declareoption{abbreviations}{% + \let\@glsxtr@abbreviationsdef\@glsxtr@doabbreviationsdef +} +\newcommand*{\GlsXtrDefineAbbreviationShortcuts}{% + \newcommand*{\ab}{\cgls}% + \newcommand*{\abp}{\cglspl}% + \newcommand*{\as}{\glsxtrshort}% + \newcommand*{\asp}{\glsxtrshortpl}% + \newcommand*{\al}{\glsxtrlong}% + \newcommand*{\alp}{\glsxtrlongpl}% + \newcommand*{\af}{\glsxtrfull}% + \newcommand*{\afp}{\glsxtrfullpl}% + \newcommand*{\Ab}{\cGls}% + \newcommand*{\Abp}{\cGlspl}% + \newcommand*{\As}{\Glsxtrshort}% + \newcommand*{\Asp}{\Glsxtrshortpl}% + \newcommand*{\Al}{\Glsxtrlong}% + \newcommand*{\Alp}{\Glsxtrlongpl}% + \newcommand*{\Af}{\Glsxtrfull}% + \newcommand*{\Afp}{\Glsxtrfullpl}% + \newcommand*{\AB}{\cGLS}% + \newcommand*{\ABP}{\cGLSpl}% + \newcommand*{\AS}{\GLSxtrshort}% + \newcommand*{\ASP}{\GLSxtrshortpl}% + \newcommand*{\AL}{\GLSxtrlong}% + \newcommand*{\ALP}{\GLSxtrlongpl}% + \newcommand*{\AF}{\GLSxtrfull}% + \newcommand*{\AFP}{\GLSxtrfullpl}% + \newcommand*{\newabbr}{\newabbreviation}% + \let\GlsXtrDefineAbbreviationShortcuts\relax +} +\newcommand*{\GlsXtrDefineOtherShortcuts}{% + \newcommand*{\newentry}{\newglossaryentry}% + \ifdef\printsymbols + {% + \newcommand*{\newsym}{\glsxtrnewsymbol}% + }{}% + \ifdef\printnumbers + {% + \newcommand*{\newnum}{\glsxtrnewnumber}% + }{}% + \let\GlsXtrDefineOtherShortcuts\relax +} +\newcommand*{\@glsxtr@setupshortcuts}{} +\define@choicekey{glossaries-extra.sty}{shortcuts}[\val\nr]% + {acronyms,acro,abbreviations,abbr,other,all,true,none,false}[true]{% + \ifcase\nr\relax % acronyms + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + }% + \or % acro + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + }% + \or % abbreviations + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineAbbreviationShortcuts + }% + \or % abbr + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineAbbreviationShortcuts + }% + \or % other + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineOtherShortcuts + }% + \or % all + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + \GlsXtrDefineAbbreviationShortcuts + \GlsXtrDefineOtherShortcuts + }% + \or % true + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + \GlsXtrDefineAbbreviationShortcuts + \GlsXtrDefineOtherShortcuts + }% + \else % none, false + \renewcommand*{\@glsxtr@setupshortcuts}{}% + \fi + } +\newcommand*{\@glsxtr@doaccsupp}{} +\@glsxtr@declareoption{accsupp}{% + \renewcommand*{\@glsxtr@doaccsupp}{\RequirePackage{glossaries-accsupp}}} +\newcommand{\glsxtrNoGlossaryWarning}[1]{% + \@glsxtr@defaultnoglossarywarning{#1}% +} +\define@choicekey{glossaries-extra.sty}{nomissingglstext}[\val\nr]% + {true,false}[true]{% + \ifcase\nr\relax % true + \renewcommand{\glsxtrNoGlossaryWarning}[1]{% + \null + }% + \else % false + \renewcommand{\glsxtrNoGlossaryWarning}[1]{% + \@glsxtr@defaultnoglossarywarning{#1}% + }% + \fi + } +\DeclareOptionX*{% + \expandafter\glsxtr@dooption\expandafter{\CurrentOption}} +\ProcessOptionsX +\RequirePackage{glossaries} +\@glsxtr@doaccsupp +\@glsxtr@abbreviationsdef +\let\@glsxtr@abbreviationsdef\relax +\@glsxtr@setupshortcuts +\renewcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}% +\newcommand*{\glossariesextrasetup}[1]{% + \let\@glsxtr@setupshortcuts\relax + \setkeys{glossaries-extra.sty}{#1}% + \@glsxtr@abbreviationsdef + \let\@glsxtr@abbreviationsdef\relax + \@glsxtr@setupshortcuts +} +\AtBeginDocument{% + \disable@keys{glossaries-extra.sty}{abbreviations}% + \def\@glsxtrundeftag{\glsxtrundeftag}% +} +\newcommand{\glsxtrifemptyglossary}[3]{% + \ifglossaryexists{#1}% + {% + \ifcsstring{glolist@#1}{,}{#2}{#3}% + }% + {% + \glsxtrundefaction{Glossary type `#1' doesn't exist}{}% + #2% + }% +} +\renewcommand{\glsdoifexists}[2]{% + \ifglsentryexists{#1}{#2}% + {% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry before + you can reference it.}% + }% +} +\renewcommand{\glsdoifnoexists}[2]{% + \ifglsentryexists{#1}{% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has already been defined}{}}{#2}% +} +\ifdef\glsdoifexistsordo +{% + \renewcommand{\glsdoifexistsordo}[3]{% + \ifglsentryexists{#1}{#2}% + {% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry + before you can use it.}% + #3% + }% + }% +} +{% + \glsxtr@warnonexistsordo\glsdoifexistsordo + \newcommand{\glsdoifexistsordo}[3]{% + \ifglsentryexists{#1}{#2}% + {% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry + before you can use it.}% + #3% + }% + }% +} +\ifdef\doifglossarynoexistsordo +{% + \renewcommand{\doifglossarynoexistsordo}[3]{% + \ifglossaryexists{#1}% + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + #3% + }% + {#2}% + }% +} +{% + \glsxtr@warnonexistsordo\doifglossarynoexistsordo + \newcommand{\doifglossarynoexistsordo}[3]{% + \ifglossaryexists{#1}% + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + #3% + }% + {#2}% + }% +} + +\appto\@newglossaryentryposthook{% + \ifdefvoid\@glo@see + {\csxdef{glo@\@glo@label @see}{}}% + {% + \csxdef{glo@\@glo@label @see}{\@glo@see}% + \@glsxtr@autoindexcrossrefs + }% +} +\appto\@gls@keymap{,{see}{see}} +\AtEndDocument{\if@glsxtrindexcrossrefs\glsxtraddallcrossrefs\fi} +\newcommand*{\glsxtraddallcrossrefs}{% + \forallglossaries{\@glo@type}% + {% + \forglsentries[\@glo@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}{\@glsxtr@addunusedxrefs{\@glo@label}}{}% + }% + }% +} +\newcommand*{\@glsxtr@addunusedxrefs}[1]{% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@see}% + \ifdefvoid\@glo@see + {}% + {% + \expandafter\glsxtr@addunused\@glo@see\@end@glsxtr@addunused + }% +} +\newcommand*{\glsxtr@addunused}[1][]{% + \@glsxtr@addunused +} +\def\@glsxtr@addunused#1\@end@glsxtr@addunused{% + \@for\@glsxtr@label:=#1\do + {% + \ifglsused{\@glsxtr@label}{}% + {% + \glsadd[format=glsxtrunusedformat]{\@glsxtr@label}% + \glsunset{\@glsxtr@label}% + \@glsxtr@addunusedxrefs{\@glsxtr@label}% + }% + }% +} +\newcommand*{\glsxtrunusedformat}[1]{\unskip} +\let\glsxtr@orgmakenoidxglossaries\makenoidxglossaries +\renewcommand{\makenoidxglossaries}{% + \glsxtr@orgmakenoidxglossaries + \@glsxtrdocdeffalse + \disable@keys{glossaries-extra.sty}{docdef}% +} +\renewcommand*{\gls@defdocnewglossaryentry}{% + \if@glsxtrdocdef + \let\gls@checkseeallowed\relax + \let\newglossaryentry\new@glossaryentry + \else + \renewcommand*{\newglossaryentry}[2]{% + \PackageError{glossaries-extra}{Glossary entries must + be \MessageBreak defined in the preamble with \MessageBreak + package option `docdef=false'}{Move your glossary definitions to + the preamble. You can also put them in a \MessageBreak separate file + and load them with \string\loadglsentries.}% + }% + \fi +}% +\newcommand*{\GlsXtrEnableOnTheFly}{% + \@ifstar\@sGlsXtrEnableOnTheFly\@GlsXtrEnableOnTheFly +} +\newcommand*{\@sGlsXtrEnableOnTheFly}{% + \renewcommand*{\glsdetoklabel}[1]{% + \expandafter\@glsxtr@ifcsstart\string##1 \@glsxtr@end@ + {% + \expandafter\detokenize\expandafter{##1}% + }% + {\detokenize{##1}}% + }% + \@GlsXtrEnableOnTheFly +} +\def\@glsxtr@ifcsstart#1#2\@glsxtr@end@#3#4{% + \expandafter\if\glsbackslash#1% + #3% + \else + #4% + \fi +} +\newcommand*{\glsxtrstarflywarn}{% + \GlossariesExtraWarning{Experimental starred version of + \string\GlsXtrEnableOnTheFly\space in use (please ensure you have + read the warnings in the glossaries-extra user manual)}% +} +\newcommand*{\@GlsXtrEnableOnTheFly}{% + \newcommand*{\glsxtrcat}{general} + \newcommand*{\glsxtr}[1][]{% + \def\glsxtr@keylist{##1}% + \@glsxtr + } + \newcommand*{\@glsxtr}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\gls\expandafter[\glsxtr@keylist]{##2}% + } + \newcommand*{\Glsxtr}[1][]{% + \def\glsxtr@keylist{##1}% + \@Glsxtr + } + \newcommand*{\@Glsxtr}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\Gls\expandafter[\glsxtr@keylist]{##2}% + } + \newcommand*{\glsxtrpl}[1][]{% + \def\glsxtr@keylist{##1}% + \@glsxtrpl + } + \newcommand*{\@glsxtrpl}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\glspl\expandafter[\glsxtr@keylist]{##2}% + } + \newcommand*{\Glsxtrpl}[1][]{% + \def\glsxtr@keylist{##1}% + \@Glsxtrpl + } + \newcommand*{\@Glsxtrpl}[2][]{% + \ifglsentryexists{##2} + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\Glspl\expandafter[\glsxtr@keylist]{##2}% + } + \newcommand*{\GlsXtrWarning}[2]{% + \def\@glsxtr@optlist{##1}% + \@onelevel@sanitize\@glsxtr@optlist + \GlossariesExtraWarning{The options `\@glsxtr@optlist' have + been ignored for entry `##2' as it has already been defined}% + } + \let\@glsxtr@orgprintglossary\@printglossary + \renewcommand\@printglossary[2]{% + \@glsxtr@orgprintglossary{##1}{##2}% + \def\@glsxtr{\@glsxtr@disabledflycommand\glsxtr}% + \def\@glsxtrpl{\@glsxtr@disabledflycommand\glsxtrpl}% + \def\@Glsxtr{\@glsxtr@disabledflycommand\Glsxtr}% + \def\@Glsxtrpl{\@glsxtr@disabledflycommand\Glsxtrpl}% + } + \newcommand*{\@glsxtr@disabledflycommand}[1]{% + \PackageError{glossaries-extra}% + {\string##1\space can't be used after any of the \MessageBreak + glossaries have been displayed}% + {The on-the-fly commands enabled by + \string\GlsXtrEnableOnTheFly\space may only be used \MessageBreak + before the glossaries. If you want to use any entries \MessageBreak + after any of the glossaries, you must use the standard \MessageBreak + method of first defining the entry and then using the \MessageBreak + entry with commands like \string\gls}% + \@@glsxtr@disabledflycommand + }% + \newcommand*{\@@glsxtr@disabledflycommand}[2][]{##2} + \let\GlsXtrEnableOnTheFly\relax +} +\@onlypreamble\GlsXtrEnableOnTheFly +\ifdef\glslistdottedwidth +{% + \ifdim\glslistdottedwidth=.5\hsize + \setlength{\glslistdottedwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glslistdottedwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glslistdottedwidth}{.5\columnwidth}% + \fi + }% + \fi +} +{}% +\ifdef\glsdescwidth +{% + \ifdim\glsdescwidth=.6\hsize + \setlength{\glsdescwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glsdescwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glsdescwidth}{.6\columnwidth}% + \fi + }% + \fi +} +{}% +\ifdef\glspagelistwidth +{% + \ifdim\glspagelistwidth=.1\hsize + \setlength{\glspagelistwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glspagelistwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glspagelistwidth}{.1\columnwidth}% + \fi + }% + \fi +} +{}% + \def\org@glossaryentrynumbers#1{#1\gls@save@numberlist{#1}}% + \ifx\org@glossaryentrynumbers\glossaryentrynumbers + \glsnonumberlistfalse + \renewcommand*{\glossaryentrynumbers}[1]{% + \GlsXtrFormatLocationList{#1}\gls@save@numberlist{#1}}% + \else + \glsnonumberlisttrue + \renewcommand*{\glossaryentrynumbers}[1]{\gls@save@numberlist{#1}}% + \fi +\newcommand*{\GlsXtrFormatLocationList}[1]{#1} +\renewcommand*{\KV@printgloss@nonumberlist}[1]{% + \XKV@plfalse + \XKV@sttrue + \XKV@checkchoice[\XKV@resa]{#1}{true,false}% + {% + \csname glsnonumberlist\XKV@resa\endcsname + \ifglsnonumberlist + \def\glossaryentrynumbers##1{\gls@save@numberlist{##1}}% + \else + \def\glossaryentrynumbers##1{% + \GlsXtrFormatLocationList{##1}% + \gls@save@numberlist{##1}}% + \fi + }% +} +\renewcommand*{\glsentryfmt}{% + \ifglshasshort{\glslabel}{\glssetabbrvfmt{\glscategory{\glslabel}}}{}% + \glsifregular{\glslabel}% + {\glsgenentryfmt}% + {\ifglshasshort{\glslabel}{\glsxtrgenabbrvfmt}{\glsgenentryfmt}}% +} +\renewcommand{\@gls@field@link}[4][]{% + \glsdoifexists{#3}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \def\glscustomtext{#4}% + \@glsxtr@field@linkdefs + #1% + \@gls@link[#2]{#3}{#4}% + }% + \glspostlinkhook +} +\newcommand*{\@glsxtr@field@linkdefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty +} +\def\@GLStext@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdofthree]{#1}{#2}% + {\mfirstucMakeUppercase{\glsentrytext{#2}#3}}% +} +\def\@Glstext@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@secondofthree]{#1}{#2}% + {\Glsentrytext{#2}#3}% +} +\def\@glsfirst@#1#2[#3]{% + \@gls@field@link[\let\glsxtrifwasfirstuse\@firstoftwo]{#1}{#2}% + {\glsentryfirst{#2}#3}% +} +\def\@Glsfirst@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glscapscase\@secondofthree + ]% + {#1}{#2}{\Glsentryfirst{#2}#3}% +} +\def\@GLSfirst@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glscapscase\@thirdofthree + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryfirst{#2}#3}}% +} +\def\@glsplural#1#2[#3]{% + \@gls@field@link[\let\glsifplural\@firstoftwo]{#1}{#2}% + {\glsentryplural{#2}#3}% +} +\def\@Glsplural#1#2[#3]{% + \@gls@field@link + [\let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + ]% + {#1}{#2}{\Glsentryplural{#2}#3}% +} +\def\@GLSplural#1#2[#3]{% + \@gls@field@link + [\let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryplural{#2}#3}}% +} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + ]% + {#1}{#2}{\glsentryfirstplural{#2}#3}% +} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + ]% + {#1}{#2}{\Glsentryfirstplural{#2}#3}% +} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryfirstplural{#2}#3}}% +} +\def\@Glsname@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryname{#2}#3}% +} +\def\@GLSname@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryname{#2}#3}}% +} +\def\@Glsdesc@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentrydesc{#2}#3}% +} +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentrydesc{#2}#3}}% +} +\def\@glsdescplural@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\glsentrydescplural{#2}#3}% +} +\def\@Glsdescplural@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\Glsentrydescplural{#2}#3}% +} +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@thirdoftwo + \let\glsifplural\@firstoftwo + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentrydescplural{#2}#3}}% +} +\def\@Glssymbol@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentrysymbol{#2}#3}% +} +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbol{#2}#3}}% +} +\def\@glssymbolplural@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\glsentrysymbolplural{#2}#3}% +} +\def\@Glssymbolplural@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\Glsentrysymbolplural{#2}#3}% +} +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@thirdoftwo + \let\glsifplural\@firstoftwo + ]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}#3}}% +} +\def\@Glsuseri@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseri{#2}#3}% +} +\def\@GLSuseri@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}% +} +\def\@Glsuserii@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuserii{#2}#3}% +} +\def\@GLSuserii@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}% +} +\def\@Glsuseriii@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseriii{#2}#3}% +} +\def\@GLSuseriii@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}% +} +\def\@Glsuseriv@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseriv{#2}#3}% +} +\def\@GLSuseriv@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}% +} +\def\@Glsuserv@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuserv{#2}#3}% +} +\def\@GLSuserv@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}% +} +\def\@Glsuservi@#1#2[#3]{% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuservi{#2}#3}% +} +\def\@GLSuservi@#1#2[#3]{% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}% +} +\def\@acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@Acrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@ACRshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccessshort{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@acrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@Acrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@ACRshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccessshortpl{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccesslong{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@Acrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccesslong{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@ACRlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccesslong{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@acrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccesslongpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@Acrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccesslongpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@ACRlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccesslongpl{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\renewcommand*{\@glsaddkey}[7]{% + \key@ifundefined{glossentry}{#1}% + {% + \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}% + \appto\@gls@keymap{,{#1}{#1}}% + \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}% + \appto\@newglossaryentryposthook{% + \letcs{\@glo@tmp}{@glo@#1}% + \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}% + }% + \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + \newcommand*{#4}[1]{\@Gls@entry@field{##1}{#1}}% + \ifcsdef{@gls@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#5' as helper command + `\expandafter\string\csname @gls@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @gls@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@gls@user@#1@}{##1}{##2}}% + {\csuse{@gls@user@#1@}{##1}{##2}[]}}% + \csdef{@gls@user@#1@}##1##2[##3]{% + \@gls@field@link{##1}{##2}{#3{##2}##3}% + }% + \newrobustcmd*{#5}{% + \expandafter\@gls@hyp@opt\csname @gls@user@#1\endcsname}% + }% + \ifcsdef{@Gls@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#6' as helper command + `\expandafter\string\csname @Gls@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @Gls@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@Gls@user@#1@}{##1}{##2}}% + {\csuse{@Gls@user@#1@}{##1}{##2}[]}}% + \csdef{@Gls@user@#1@}##1##2[##3]{% + \@gls@field@link[\let\glscapscase\@secondofthree]% + {##1}{##2}{#4{##2}##3}% + }% + \newrobustcmd*{#6}{% + \expandafter\@gls@hyp@opt\csname @Gls@user@#1\endcsname}% + }% + \ifcsdef{@GLS@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#7' as helper command + `\expandafter\string\csname @GLS@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @GLS@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@GLS@user@#1@}{##1}{##2}}% + {\csuse{@GLS@user@#1@}{##1}{##2}[]}}% + \csdef{@GLS@user@#1@}##1##2[##3]{% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {##1}{##2}{\mfirstucMakeUppercase{#3{##2}##3}}% + }% + \newrobustcmd*{#7}{% + \expandafter\@gls@hyp@opt\csname @GLS@user@#1\endcsname}% + }% + }% + {% + \PackageError{glossaries-extra}{Key `#1' already exists}{}% + }% +} +\providecommand*{\@gls@link@nocheckfirsthyper}{} +\let\@glsxtr@org@checkfirsthyper\@gls@link@checkfirsthyper +\renewcommand*{\@gls@link@checkfirsthyper}{% + \ifglsused{\glslabel}% + {\let\glsxtrifwasfirstuse\@secondoftwo} + {\let\glsxtrifwasfirstuse\@firstoftwo}% + \edef\glscategorylabel{\glscategory{\glslabel}}% + \ifglsused{\glslabel}% + {% + \glsifcategoryattribute{\glscategorylabel}{nohypernext}{true}% + {\KV@glslink@hyperfalse}{}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{nohyperfirst}{true}% + {\KV@glslink@hyperfalse}{}% + }% + \glslinkcheckfirsthyperhook +} +\ifdef\do@glsdisablehyperinlist +{% + \let\@glsxtr@do@glsdisablehyperinlist\do@glsdisablehyperinlist + \renewcommand*{\do@glsdisablehyperinlist}{% + \@glsxtr@do@glsdisablehyperinlist + \glsifattribute{\glslabel}{nohyper}{true}{\KV@glslink@hyperfalse}{}% + } +} +{} +\define@boolkey{glslink}{noindex}[true]{} +\KV@glslink@noindexfalse +\ifdef\@gls@setdefault@glslink@opts +{ + \renewcommand*{\@gls@setdefault@glslink@opts}{% + \KV@glslink@noindexfalse + } +} +{ + \newcommand*{\@gls@setdefault@glslink@opts}{% + \KV@glslink@noindexfalse + } + \preto\do@glsdisablehyperinlist{\@gls@setdefault@glslink@opts} +} +\newcommand*{\GlsXtrSetDefaultGlsOpts}[1]{% + \renewcommand*{\@gls@setdefault@glslink@opts}{\setkeys{glslink}{#1}}% +} +\newcommand*{\glsxtrifindexing}[2]{% + \ifKV@glslink@noindex #2\else #1\fi +} +\renewcommand*{\glswriteentry}[2]{% + \glsxtrifindexing + {% + \ifglsindexonlyfirst + \ifglsused{#1} + {\glsxtrdoautoindexname{#1}{dualindex}}% + {#2}% + \else + \glsifattribute{#1}{indexonlyfirst}{true}% + {\ifglsused{#1} + {\glsxtrdoautoindexname{#1}{dualindex}}% + {#2}}% + {#2}% + \fi + }% + {}% +} +\appto\@@do@@wrglossary{\@glsxtr@do@@wrindex + \glsxtrdowrglossaryhook{\@gls@label}% +} +\appto\gls@noidxglossary{\@glsxtr@do@@wrindex + \glsxtrdowrglossaryhook{\@gls@label}% +} +\newcommand*{\@glsxtr@do@@wrindex}{% + \glsxtrdoautoindexname{\@gls@label}{dualindex}% +} +\newcommand*{\glsxtrdowrglossaryhook}[1]{} +\newcommand*{\@gls@alt@hyp@opt}[1]{% + \let\glslinkvar\@firstofthree + \let\@gls@hyp@opt@cs#1\relax + \@ifstar{\s@gls@hyp@opt}% + {\@ifnextchar+% + {\@firstoftwo{\p@gls@hyp@opt}}% + {% + \expandafter\@ifnextchar\@gls@alt@hyp@opt@char + {\@firstoftwo{\@alt@gls@hyp@opt}}% + {#1}% + }% + }% +} +\newcommand*{\@alt@gls@hyp@opt}[1][]{% + \let\glslinkvar\@firstofthree + \expandafter\@gls@hyp@opt@cs\expandafter[\@gls@alt@hyp@opt@keys,#1]} +\newcommand*{\@gls@alt@hyp@opt@char}{} +\newcommand*{\@gls@alt@hyp@opt@keys}{} +\newcommand*{\GlsXtrSetAltModifier}[2]{% + \let\@gls@hyp@opt\@gls@alt@hyp@opt + \def\@gls@alt@hyp@opt@char{#1}% + \def\@gls@alt@hyp@opt@keys{#2}% +} +\renewcommand*{\glsdohyperlink}[2]{% + \hyperlink{#1}{{\glsxtrprotectlinks#2}}} +\ifundef\glsdonohyperlink +{% + \renewcommand{\glsdisablehyper}{% + \KV@glslink@hyperfalse + \let\@glslink\glsdonohyperlink + \let\@glstarget\@secondoftwo + } +} +{} +\def\glsdonohyperlink#1#2{{\glsxtrprotectlinks #2}} +\ifcsundef{hyperlink}% +{% + \let\@glslink\glsdonohyperlink +}% +{% + \let\@glslink\glsdohyperlink +} +\newcommand*{\glsxtrprotectlinks}{% + \KV@glslink@hyperfalse + \KV@glslink@noindextrue + \let\@gls@\@glsxtr@p@text@ + \let\@Gls@\@Glsxtr@p@text@ + \let\@GLS@\@GLSxtr@p@text@ + \let\@glspl@\@glsxtr@p@plural@ + \let\@Glspl@\@Glsxtr@p@plural@ + \let\@GLSpl@\@GLSxtr@p@plural@ + \let\@glsxtrshort\@glsxtr@p@short@ + \let\@Glsxtrshort\@Glsxtr@p@short@ + \let\@GLSxtrshort\@GLSxtr@p@short@ + \let\@glsxtrlong\@glsxtr@p@long@ + \let\@Glsxtrlong\@Glsxtr@p@long@ + \let\@GLSxtrlong\@GLSxtr@p@long@ + \let\@glsxtrshortpl\@glsxtr@p@shortpl@ + \let\@Glsxtrshortpl\@Glsxtr@p@shortpl@ + \let\@GLSxtrshortpl\@GLSxtr@p@shortpl@ + \let\@glsxtrlongpl\@glsxtr@p@longpl@ + \let\@Glsxtrlongpl\@Glsxtr@p@longpl@ + \let\@GLSxtrlongpl\@GLSxtr@p@longpl@ + \let\@acrshort\@glsxtr@p@acrshort@ + \let\@Acrshort\@Glsxtr@p@acrshort@ + \let\@ACRshort\@GLSxtr@p@acrshort@ + \let\@acrshortpl\@glsxtr@p@acrshortpl@ + \let\@Acrshortpl\@Glsxtr@p@acrshortpl@ + \let\@ACRshortpl\@GLSxtr@p@acrshortpl@ + \let\@acrlong\@glsxtr@p@acrlong@ + \let\@Acrlong\@Glsxtr@p@acrlong@ + \let\@ACRlong\@GLSxtr@p@acrlong@ + \let\@acrlongpl\@glsxtr@p@acrlongpl@ + \let\@Acrlongpl\@Glsxtr@p@acrlongpl@ + \let\@ACRlongpl\@GLSxtr@p@acrlongpl@ +} +\def\@glsxtr@p@text@#1#2[#3]{{\@glstext@{#1}{#2}[#3]}} +\def\@Glsxtr@p@text@#1#2[#3]{{\@Glstext@{#1}{#2}[#3]}} +\def\@GLSxtr@p@text@#1#2[#3]{{\@GLStext@{#1}{#2}[#3]}} +\def\@glsxtr@p@plural@#1#2[#3]{{\@glsplural@{#1}{#2}[#3]}} +\def\@Glsxtr@p@plural@#1#2[#3]{{\@Glsplural@{#1}{#2}[#3]}} +\def\@GLSxtr@p@plural@#1#2[#3]{{\@GLSplural@{#1}{#2}[#3]}} +\def\@glsxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\glsentryshort{#2}}#3% + }% +} +\def\@Glsxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\Glsentryshort{#2}}#3% + }% +} +\def\@GLSxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \mfirstucMakeUppercase{\glsabbrvfont{\glsentryshort{#2}}#3}% + }% +} +\def\@glsxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\glsentryshortpl{#2}}#3% + }% +} +\def\@Glsxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\Glsentryshortpl{#2}}#3% + }% +} +\def\@GLSxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \mfirstucMakeUppercase{\glsabbrvfont{\glsentryshortpl{#2}}#3}% + }% +} +\def\@glsxtr@p@long@#1#2[#3]{{\glsentrylong{#2}#3}} +\def\@Glsxtr@p@long@#1#2[#3]{{\Glsentrylong{#2}#3}} +\def\@GLSxtr@p@long@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylong{#2}#3}}} +\def\@glsxtr@p@longpl@#1#2[#3]{{\glsentrylongpl{#2}#3}} +\def\@Glsxtr@p@longpl@#1#2[#3]{{\Glsentrylongpl{#2}#3}} +\def\@GLSxtr@p@longpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylongpl{#2}#3}}} +\def\@glsxtr@p@acrshort@#1#2[#3]{{\acronymfont{\glsentryshort{#2}}#3}} +\def\@Glsxtr@p@acrshort@#1#2[#3]{{\acronymfont{\Glsentryshort{#2}}#3}} +\def\@GLSxtr@p@acrshort@#1#2[#3]{% + {\mfirstucMakeUppercase{\acronymfont{\glsentryshort{#2}}#3}}} +\def\@glsxtr@p@acrshortpl@#1#2[#3]{{\acronymfont{\glsentryshortpl{#2}}#3}} +\def\@Glsxtr@p@acrshortpl@#1#2[#3]{{\acronymfont{\Glsentryshortpl{#2}}#3}} +\def\@GLSxtr@p@acrshortpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\acronymfont{\glsentryshortpl{#2}}#3}}} +\def\@glsxtr@p@acrlong@#1#2[#3]{{\glsentrylong{#2}#3}} +\def\@Glsxtr@p@acrlong@#1#2[#3]{{\Glsentrylong{#2}#3}} +\def\@GLSxtr@p@acrlong@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylong{#2}#3}}} +\def\@glsxtr@p@acrlongpl@#1#2[#3]{{\glsentrylongpl{#2}#3}} +\def\@Glsxtr@p@acrlongpl@#1#2[#3]{{\Glsentrylongpl{#2}#3}} +\def\@GLSxtr@p@acrlongpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylongpl{#2}#3}}} +\renewcommand*{\@glsunset}[1]{% + \@@glsunset{#1}% + \glsxtrpostunset{#1}% +}% +\newcommand*{\glsxtrpostunset}[1]{} + \renewcommand*{\@glslocalunset}[1]{% + \@@glslocalunset{#1}% + \glsxtrpostlocalunset{#1}% + }% +\newcommand*{\glsxtrpostlocalunset}[1]{} +\renewcommand*{\@glsreset}[1]{% + \@@glsreset{#1}% + \glsxtrpostreset{#1}% +}% +\newcommand*{\glsxtrpostreset}[1]{} +\renewcommand*{\@glslocalreset}[1]{% + \@@glslocalreset{#1}% + \glsxtrpostlocalreset{#1}% +}% +\newcommand*{\glsxtrpostlocalreset}[1]{} +\newcommand*{\GlsXtrEnableEntryCounting}[2]{% + \glsenableentrycount + \renewcommand*{\gls}{\cgls}% + \renewcommand*{\Gls}{\cGls}% + \renewcommand*{\glspl}{\cglspl}% + \renewcommand*{\Glspl}{\cGlspl}% + \renewcommand*{\GLS}{\cGLS}% + \renewcommand*{\GLSpl}{\cGLSpl}% + \@glsxtr@setentrycountunsetattr{#1}{#2}% + \let\GlsXtrEnableEntryCounting\@glsxtr@setentrycountunsetattr + \renewcommand*{\GlsXtrEnableEntryUnitCounting}[3]{% + \PackageError{glossaries-extra}{\string\GlsXtrEnableEntryUnitCounting\space + can't be used with \string\GlsXtrEnableEntryCounting}% + {Use one or other but not both commands}}% +} +\newcommand*{\@glsxtr@setentrycountunsetattr}[2]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty{\@glsxtr@cat}{}% + {% + \glssetcategoryattribute{\@glsxtr@cat}{entrycount}{#2}% + }% + }% +} +\renewcommand*{\glsenableentrycount}{% + \appto\@newglossaryentry@defcounters{\@@newglossaryentry@defcounters}% + \renewcommand*{\gls@defdocnewglossaryentry}{% + \renewcommand*\newglossaryentry[2]{% + \PackageError{glossaries}{\string\newglossaryentry\space + may only be used in the preamble when entry counting has + been activated}{If you use \string\glsenableentrycount\space + you must place all entry definitions in the preamble not in + the document environment}% + }% + }% + \newcommand*{\glsentrycurrcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@currcount}% + {0}{\@gls@entry@field{##1}{currcount}}% + }% + \newcommand*{\glsentryprevcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevcount}% + {0}{\@gls@entry@field{##1}{prevcount}}% + }% + \let\@glsxtr@entrycount@org@unset\glsxtrpostunset + \renewcommand*{\glsxtrpostunset}[1]{% + \@glsxtr@entrycount@org@unset{##1}% + \@gls@increment@currcount{##1}% + }% + \let\@glsxtr@entrycount@org@localunset\glsxtrpostlocalunset + \renewcommand*{\glsxtrpostlocalunset}[1]{% + \@glsxtr@entrycount@org@localunset{##1}% + \@gls@local@increment@currcount{##1}% + }% + \let\@glsxtr@entrycount@org@reset\glsxtrpostreset + \renewcommand*{\glsxtrpostreset}[1]{% + \@glsxtr@entrycount@org@reset{##1}% + \csgdef{glo@\glsdetoklabel{##1}@currcount}{0}% + }% + \let\@glsxtr@entrycount@org@localreset\glsxtrpostlocalreset + \renewcommand*{\glsxtrpostlocalreset}[1]{% + \@glsxtr@entrycount@org@localreset{##1}% + \csdef{glo@\glsdetoklabel{##1}@currcount}{0}% + }% + \let\@cgls@\@@cgls@ + \let\@cglspl@\@@cglspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGlspl@\@@cGlspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGLSpl@\@@cGLSpl@ + \AtEndDocument{\@gls@write@entrycounts}% + \renewcommand*{\@gls@entry@count}[2]{% + \csgdef{glo@\glsdetoklabel{##1}@prevcount}{##2}% + }% + \let\glsenableentrycount\relax + \renewcommand*{\glsenableentryunitcount}{% + \PackageError{glossaries-extra}{\string\glsenableentryunitcount\space + can't be used with \string\glsenableentrycount}% + {Use one or other but not both commands}% + }% +} +\renewcommand*{\@gls@write@entrycounts}{% + \immediate\write\@auxout + {\string\providecommand*{\string\@gls@entry@count}[2]{}}% + \count@=0\relax + \forallglsentries{\@glsentry}{% + \glshasattribute{\@glsentry}{entrycount}% + {% + \ifglsused{\@glsentry}% + {% + \immediate\write\@auxout + {\string\@gls@entry@count{\@glsentry}{\glsentrycurrcount{\@glsentry}}}% + }% + {}% + \advance\count@ by \@ne + }% + {}% + }% + \ifnum\count@=0 + \GlossariesExtraWarningNoLine{Entry counting has been enabled + \MessageBreak with \string\glsenableentrycount\space but the + \MessageBreak attribute `entrycount' hasn't + \MessageBreak been assigned to any of the defined + \MessageBreak entries}% + \fi +} +\newcommand*{\glsxtrifcounttrigger}[3]{% + \glshasattribute{#1}{entrycount}% + {% + \ifnum\glsentryprevcount{#1}>\glsgetattribute{#1}{entrycount}\relax + #3% + \else + #2% + \fi + }% + {#3}% +} +\def\@@cgls@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cglsformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@gls@{#1}{#2}[#3]% + }% +}% +\def\@@cglspl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cglsplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@glspl@{#1}{#2}[#3]% + }% +}% +\def\@@cGls@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGlsformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@Gls@{#1}{#2}[#3]% + }% +}% +\def\@@cGlspl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGlsplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@Glspl@{#1}{#2}[#3]% + }% +}% +\def\@@cGLS@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGLSformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@GLS@{#1}{#2}[#3]% + }% +}% +\def\@@cGLSpl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGLSplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@GLSpl@{#1}{#2}[#3]% + }% +}% +\def\@cgls@#1#2[#3]{\@gls@{#1}{#2}[#3]} +\def\@cGls@#1#2[#3]{\@Gls@{#1}{#2}[#3]} +\def\@cglspl@#1#2[#3]{\@glspl@{#1}{#2}[#3]} +\def\@cGlspl@#1#2[#3]{\@Glspl@{#1}{#2}[#3]} +\newrobustcmd*{\cGLS}{\@gls@hyp@opt\@cGLS} +\newcommand*{\@cGLS}[2][]{% + \new@ifnextchar[{\@cGLS@{#1}{#2}}{\@cGLS@{#1}{#2}[]}% +} +\def\@cGLS@#1#2[#3]{\@GLS@{#1}{#2}[#3]} +\newcommand*{\cGLSformat}[2]{% + \expandafter\mfirstucMakeUppercase\expandafter{\cglsformat{#1}{#2}}% +} +\newrobustcmd*{\cGLSpl}{\@gls@hyp@opt\@cGLSpl} +\newcommand*{\@cGLSpl}[2][]{% + \new@ifnextchar[{\@cGLSpl@{#1}{#2}}{\@cGLSpl@{#1}{#2}[]}% +} +\def\@cGLSpl@#1#2[#3]{\@GLSpl@{#1}{#2}[#3]} +\newcommand*{\cGLSplformat}[2]{% + \expandafter\mfirstucMakeUppercase\expandafter{\cglsplformat{#1}{#2}}% +} +\renewcommand*{\cglsformat}[2]{% + \glsifregular{#1} + {\glsentryfirst{#1}}% + {\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}}#2% +} +\renewcommand*{\cGlsformat}[2]{% + \glsifregular{#1} + {\Glsentryfirst{#1}}% + {\ifglshaslong{#1}{\Glsentrylong{#1}}{\Glsentryfirst{#1}}}#2% +} +\renewcommand*{\cglsplformat}[2]{% + \glsifregular{#1} + {\glsentryfirstplural{#1}}% + {\ifglshaslong{#1}{\glsentrylongpl{#1}}{\glsentryfirstplural{#1}}}#2% +} +\renewcommand*{\cGlsplformat}[2]{% + \glsifregular{#1} + {\Glsentryfirstplural{#1}}% + {\ifglshaslong{#1}{\Glsentrylongpl{#1}}{\Glsentryfirstplural{#1}}}#2% +} +\newcommand*{\@@newglossaryentry@defunitcounters}{% + \edef\@glo@countunit{\csuse{@glsxtr@categoryattr@@\@glo@category @unitcount}}% + \ifdefvoid\@glo@countunit + {}% + {% + \@glsxtr@ifunitcounter{\@glo@countunit}% + {}% + {\expandafter\@glsxtr@addunitcounter\expandafter{\@glo@countunit}}% + }% +} +\newcommand*{\@glsxtr@unitcountlist}{} +\newcommand*{\@glsxtr@addunitcounter}[1]{% + \listadd{\@glsxtr@unitcountlist}{#1}% + \ifcsundef{glsxtr@theunit@#1} + {% + \ifcsdef{theH#1}% + {\csdef{glsxtr@theunit@#1}{\csuse{theH#1}}}% + {\csdef{glsxtr@theunit@#1}{\csuse{the#1}}}% + }% + {}% +} +\newcommand*{\@glsxtr@ifunitcounter}[3]{% + \xifinlist{#1}{\@glsxtr@unitcountlist}{#2}{#3}% +} +\newcommand*\@glsxtr@currentunitcount[1]{% + glo@\glsdetoklabel{#1}@currunit@\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% +} +\newcommand*\@glsxtr@previousunitcount[1]{% + glo@\glsdetoklabel{#1}@prevunit@\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% +} +\newcommand*{\@gls@increment@currunitcount}[1]{% + \glshasattribute{#1}{unitcount}% + {% + \edef\@glsxtr@csname{\@glsxtr@currentunitcount{#1}}% + \ifcsundef{\@glsxtr@csname}% + {% + \csgdef{\@glsxtr@csname}{1}% + \listcsxadd + {glo@\glsdetoklabel{#1}@unitlist}% + {\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% + }% + }% + {% + \csxdef{\@glsxtr@csname}% + {\number\numexpr\csname\@glsxtr@csname\endcsname+1}% + }% + }% + {}% +} +\newcommand*{\@gls@local@increment@currunitcount}[1]{% + \glshasattribute{#1}{unitcount}% + {% + \edef\@glsxtr@csname{\@glsxtr@currentunitcount{#1}}% + \ifcsundef{\@glsxtr@csname}% + {% + \csdef{\@glsxtr@csname}{1}% + \listcseadd + {glo@\glsdetoklabel{#1}@unitlist}% + {\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% + }% + }% + {% + \csedef{\@glsxtr@csname}% + {\number\numexpr\csname\@glsxtr@csname\endcsname+1}% + }% + }% + {}% +} +\newcommand*{\@glsxtr@currunitcount}[2]{% + \ifcsundef + {glo@\glsdetoklabel{#1}@currunit@#2}% + {0}% + {\csuse{glo@\glsdetoklabel{#1}@currunit@#2}}% +}% +\newcommand*{\@glsxtr@prevunitcount}[2]{% + \ifcsundef + {glo@\glsdetoklabel{#1}@prevunit@#2}% + {0}% + {\csuse{glo@\glsdetoklabel{#1}@prevunit@#2}}% +}% +\newcommand*{\glsenableentryunitcount}{% + \appto\@newglossaryentry@defcounters{\@@newglossaryentry@defunitcounters}% + \renewcommand*{\gls@defdocnewglossaryentry}{% + \renewcommand*\newglossaryentry[2]{% + \PackageError{glossaries}{\string\newglossaryentry\space + may only be used in the preamble when entry counting has + been activated}{If you use \string\glsenableentryunitcount\space + you must place all entry definitions in the preamble not in + the document environment}% + }% + }% + \newcommand*{\glsentrycurrcount}[1]{% + \@glsxtr@currunitcount{##1}{\glsgetattribute{##1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{##1}{unitcount}}}% + }% + \newcommand*{\glsentryprevcount}[1]{% + \@glsxtr@prevunitcount{##1}{\glsgetattribute{##1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{##1}{unitcount}}}% + }% + \newcommand*{\glsentryprevtotalcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunittotal}% + {0}% + {% + \number\csuse{glo@\glsdetoklabel{##1}@prevunittotal} + }% + }% + \newcommand*{\glsentryprevmaxcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunitmax}% + {0}% + {% + \number\csuse{glo@\glsdetoklabel{##1}@prevunitmax} + }% + }% + \let\@glsxtr@entryunitcount@org@unset\glsxtrpostunset + \renewcommand*{\glsxtrpostunset}[1]{% + \@glsxtr@entryunitcount@org@unset{##1}% + \@gls@increment@currunitcount{##1}% + }% + \let\@glsxtr@entryunitcount@org@localunset\glsxtrpostlocalunset + \renewcommand*{\glsxtrpostlocalunset}[1]{% + \@glsxtr@entryunitcount@org@localunset{##1}% + \@gls@local@increment@currunitcount{##1}% + }% + \let\@glsxtr@entryunitcount@org@reset\glsxtrpostreset + \renewcommand*{\glsxtrpostreset}[1]{% + \glshasattribute{##1}{unitcount}% + {% + \edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}% + \ifcsundef{\@glsxtr@csname}% + {}% + {\csgdef{\@glsxtr@csname}{0}}% + }% + {}% + }% + \let\@glsxtr@entryunitcount@org@localreset\glsxtrpostlocalreset + \renewcommand*{\glsxtrpostlocalreset}[1]{% + \@glsxtr@entryunitcount@org@localreset{##1}% + \glshasattribute{##1}{unitcount}% + {% + \edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}% + \ifcsundef{\@glsxtr@csname}% + {}% + {\csdef{\@glsxtr@csname}{0}}% + }% + {}% + }% + \let\@cgls@\@@cgls@ + \let\@cglspl@\@@cglspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGlspl@\@@cGlspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGLSpl@\@@cGLSpl@ + \AtEndDocument{\@gls@write@entryunitcounts}% + \renewcommand*{\@gls@entry@unitcount}[3]{% + \csgdef{glo@\glsdetoklabel{##1}@prevunit@##3}{##2}% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunittotal}% + {\csgdef{glo@\glsdetoklabel{##1}@prevunittotal}{##2}}% + {% + \csxdef{glo@\glsdetoklabel{##1}@prevunittotal}{ + \number\numexpr\csuse{glo@\glsdetoklabel{##1}@prevunittotal}+##2}% + }% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunitmax}% + {\csgdef{glo@\glsdetoklabel{##1}@prevunitmax}{##2}}% + {% + \ifnum\csuse{glo@\glsdetoklabel{##1}@prevunitmax}<##2 + \csgdef{glo@\glsdetoklabel{##1}@prevunitmax}{##2}% + \fi + }% + }% + \let\glsenableentryunitcount\relax + \renewcommand*{\glsenableentrycount}{% + \PackageError{glossaries-extra}{\string\glsenableentrycount\space + can't be used with \string\glsenableentryunitcount}% + {Use one or other but not both commands}% + }% +} +\@onlypreamble\glsenableentryunitcount +\newcommand*{\@gls@entry@unitcount}[3]{} +\newcommand*{\@gls@write@entryunitcounts@do}[1]{% + \immediate\write\@auxout + {\string\@gls@entry@unitcount + {\@glsentry}% + {\@glsxtr@currunitcount{\@glsentry}{#1}% + }% + {#1}}% +} +\newcommand*{\@gls@write@entryunitcounts}{% + \immediate\write\@auxout + {\string\providecommand*{\string\@gls@entry@unitcount}[3]{}}% + \count@=0\relax + \forallglsentries{\@glsentry}{% + \glshasattribute{\@glsentry}{unitcount}% + {% + \ifglsused{\@glsentry}% + {% + \forlistcsloop + {\@gls@write@entryunitcounts@do}% + {glo@\glsdetoklabel{\@glsentry}@unitlist}% + }% + {}% + \advance\count@ by \@ne + }% + {}% + }% + \ifnum\count@=0 + \GlossariesExtraWarningNoLine{Entry counting has been enabled + \MessageBreak with \string\glsenableentryunitcount\space but the + \MessageBreak attribute `unitcount' hasn't + \MessageBreak been assigned to any of the defined + \MessageBreak entries}% + \fi +} +\newcommand*{\GlsXtrEnableEntryUnitCounting}[3]{% + \glsenableentryunitcount + \renewcommand*{\gls}{\cgls}% + \renewcommand*{\Gls}{\cGls}% + \renewcommand*{\glspl}{\cglspl}% + \renewcommand*{\Glspl}{\cGlspl}% + \renewcommand*{\GLS}{\cGLS}% + \renewcommand*{\GLSpl}{\cGLSpl}% + \@glsxtr@setentryunitcountunsetattr{#1}{#2}{#3}% + \let\GlsXtrEnableEntryUnitCounting\@glsxtr@setentryunitcountunsetattr + \renewcommand*{\GlsXtrEnableEntryCounting}[2]{% + \PackageError{glossaries-extra}{\string\GlsXtrEnableEntryCounting\space + can't be used with \string\GlsXtrEnableEntryUnitCounting}% + {Use one or other but not both commands}}% +} +\newcommand*{\@glsxtr@setentryunitcountunsetattr}[3]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty{\@glsxtr@cat}{}% + {% + \glssetcategoryattribute{\@glsxtr@cat}{entrycount}{#2}% + \glssetcategoryattribute{\@glsxtr@cat}{unitcount}{#3}% + }% + }% +} +\renewcommand*{\SetGenericNewAcronym}{% + \let\@Gls@entryname\@Gls@acrentryname + \renewcommand{\newacronym}[4][]{% + \ifdefempty{\@glsacronymlists}% + {% + \def\@glo@type{\acronymtype}% + \setkeys{glossentry}{##1}% + \DeclareAcronymList{\@glo@type}% + }% + {}% + \glskeylisttok{##1}% + \glslabeltok{##2}% + \glsshorttok{##3}% + \glslongtok{##4}% + \newacronymhook + \protected@edef\@do@newglossaryentry{% + \noexpand\newglossaryentry{\the\glslabeltok}% + {% + type=\acronymtype,% + name={\expandonce{\acronymentry{##2}}},% + sort={\acronymsort{\the\glsshorttok}{\the\glslongtok}},% + text={\the\glsshorttok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% + category=acronym, + \GenericAcronymFields,% + \the\glskeylisttok + }% + }% + \@do@newglossaryentry + }% + \renewcommand*{\acrfullfmt}[3]{% + \glslink[##1]{##2}{\genacrfullformat{##2}{##3}}}% + \renewcommand*{\Acrfullfmt}[3]{% + \glslink[##1]{##2}{\Genacrfullformat{##2}{##3}}}% + \renewcommand*{\ACRfullfmt}[3]{% + \glslink[##1]{##2}{% + \mfirstucMakeUppercase{\genacrfullformat{##2}{##3}}}}% + \renewcommand*{\acrfullplfmt}[3]{% + \glslink[##1]{##2}{\genplacrfullformat{##2}{##3}}}% + \renewcommand*{\Acrfullplfmt}[3]{% + \glslink[##1]{##2}{\Genplacrfullformat{##2}{##3}}}% + \renewcommand*{\ACRfullplfmt}[3]{% + \glslink[##1]{##2}{% + \mfirstucMakeUppercase{\genplacrfullformat{##2}{##3}}}}% + \renewcommand*{\glsentryfull}[1]{\genacrfullformat{##1}{}}% + \renewcommand*{\Glsentryfull}[1]{\Genacrfullformat{##1}{}}% + \renewcommand*{\glsentryfullpl}[1]{\genplacrfullformat{##1}{}}% + \renewcommand*{\Glsentryfullpl}[1]{\Genplacrfullformat{##1}{}}% +} +\let\@glsxtr@org@setacronymstyle\setacronymstyle +\let\@glsxtr@org@newacronymstyle\newacronymstyle +\newcommand*{\MakeAcronymsAbbreviations}{% + \renewcommand*{\newacronym}[4][]{% + \newabbreviation[type=\acronymtype,category=acronym,##1]{##2}{##3}{##4}% + }% + \renewcommand*{\firstacronymfont}[1]{\glsfirstabbrvfont{##1}}% + \renewcommand*{\acronymfont}[1]{\glsabbrvfont{##1}}% + \renewcommand*{\setacronymstyle}[1]{% + \PackageError{glossaries-extra}{\string\setacronymstyle{##1} + unavailable. + Use \string\setabbreviationstyle\space instead. + The original acronym interface can be restored with + \string\RestoreAcronyms}{}% + }% + \renewcommand*{\newacronymstyle}[1]{% + \GlossariesExtraWarning{New acronym style `##1' won't be + available unless you restore the original acronym interface with + \string\RestoreAcronyms}% + \@glsxtr@org@newacronymstyle{##1}% + }% +} +\MakeAcronymsAbbreviations +\newcommand*{\RestoreAcronyms}{% + \SetGenericNewAcronym + \renewcommand{\firstacronymfont}[1]{\acronymfont{##1}}% + \renewcommand{\acronymfont}[1]{##1}% + \let\setacronymstyle\@glsxtr@org@setacronymstyle + \let\newacronymstyle\@glsxtr@org@newacronymstyle + \let\@gls@link@checkfirsthyper\@glsxtr@org@checkfirsthyper + \glssetcategoryattribute{acronym}{regular}{false}% + \setacronymstyle{long-short}% +} +\renewcommand*{\glsacspace}[1]{% + \settowidth{\dimen@}{(\firstacronymfont{\glsentryshort{#1}})}% + \ifdim\dimen@<\glsacspacemax~\else\space\fi +} +\newcommand*{\glsacspacemax}{3em} +\newcommand*{\@glsxtr@reg@glosslist}{} +\let\@glsxtr@org@makeglossaries\makeglossaries +\renewcommand*{\makeglossaries}[1][]{% + \ifblank{#1}% + {\@glsxtr@org@makeglossaries}% + {% + \edef\@glsxtr@reg@glosslist{#1}% + \ifundef{\glswrite}{\newwrite\glswrite}{}% + \protected@write\@auxout{}{\string\providecommand + \string\@glsorder[1]{}} + \protected@write\@auxout{}{\string\providecommand + \string\@istfilename[1]{}} + \protected@write\@auxout{}{\string\@istfilename{\istfilename}}% + \protected@write\@auxout{}{\string\@glsorder{\glsorder}} + \write\@auxout{\string\providecommand\string\@gls@reference[3]{}}% + \@for\@glo@type:=#1\do{% + \ifdefempty{\@glo@type}{}{\@makeglossary{\@glo@type}}% + }% + \renewcommand*\newglossary[4][]{% + \PackageError{glossaries}{New glossaries + must be created before \string\makeglossaries}{You need + to move \string\makeglossaries\space after all your + \string\newglossary\space commands}}% + \let\@makeglossary\relax + \let\makeglossary\relax + \let\makeglossaries\relax + \@disable@onlypremakeg + \let\gls@checkseeallowed\relax + \let\warn@nomakeglossaries\relax + \def\warn@noprintglossary{% + \GlossariesWarningNoLine{No \string\printglossary\space + or \string\printglossaries\space + found.^^J(Remove \string\makeglossaries\space if you don't +want + any glossaries.)^^JThis document will not have a glossary}% + }% + \renewcommand*{\glsdisplaynumberlist}[1]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {\@glsxtr@idx@displaynumberlist{##1}}% + {\@glsxtr@noidx@displaynumberlist{##1}}% + }% + \renewcommand*{\glsentrynumberlist}[1]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {\@glsxtr@idx@entrynumberlist{##1}}% + {\@glsxtr@noidx@entrynumberlist{##1}}% + }% + \renewcommand*{\glsnumberlistloop}[2]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {% + \PackageError{glossaries-extra}{\string\glsnumberlistloop\space + not available for glossary `##1'}{}% + }% + {\@glsxtr@noidx@numberlistloop{##1}{##2}}% + }% + \renewcommand*{\glsprestandardsort}[3]{% + \expandafter\DTLifinlist\expandafter{##2}{\@glsxtr@reg@glosslist}% + {% + \glsdosanitizesort + }% + {% + \ifglssanitizesort + \@gls@noidx@sanitizesort + \else + \@gls@noidx@nosanitizesort + \fi + }% + }% + \renewcommand*\new@glossaryentry[2]{% + \PackageError{glossaries-extra}{Glossary entries must be defined + in the preamble\MessageBreak when you use the optional argument + of \string\makeglossaries}{Either move your definitions to the + preamble or don't use the optional argument of + \string\makeglossaries}% + }% + \renewcommand*{\@printgloss@setsort}{% + \renewcommand*{\@glo@assign@sortkey}{% + \edef\@glo@type{\@glo@type}% + \expandafter\DTLifinlist\expandafter{\@glo@type}{\@glsxtr@reg@glosslist}% + {% + \@@glo@no@assign@sortkey + }% + {% + \@@glo@assign@sortkey + }% + }% + \def\@glo@sorttype{\@glo@default@sorttype}% + }% + \ifglsautomake + \renewcommand*{\@gls@doautomake}{% + \@for\@gls@type:=\@glsxtr@reg@glosslist\do{% + \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}% + }% + }% + \fi + }% +} +\let\@glsxtr@idx@displaynumberlist\glsdisplaynumberlist +\newcommand*{\@glsxtr@noidx@displaynumberlist}[1]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \ifdef\@gls@loclist + {% + \def\@gls@noidxloclist@sep{% + \def\@gls@noidxloclist@sep{% + \def\@gls@noidxloclist@sep{% + \glsnumlistsep + }% + \def\@gls@noidxloclist@finalsep{\glsnumlistlastsep}% + }% + }% + \def\@gls@noidxloclist@finalsep{}% + \def\@gls@noidxloclist@prev{}% + \forlistloop{\glsnoidxdisplayloclisthandler}{\@gls@loclist}% + \@gls@noidxloclist@finalsep + \@gls@noidxloclist@prev + }% + {% + ??\glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `#1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% +}% + +\newcommand*{\@glsxtr@noidx@numberlistloop}[3]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \let\@gls@org@glsnoidxdisplayloc\glsnoidxdisplayloc + \let\@gls@org@glsseeformat\glsseeformat + \let\glsnoidxdisplayloc#2\relax + \let\glsseeformat#3\relax + \ifdef\@gls@loclist + {% + \forlistloop{\glsnoidxnumberlistloophandler}{\@gls@loclist}% + }% + {% + ??\glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `##1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% + \let\glsnoidxdisplayloc\@gls@org@glsnoidxdisplayloc + \let\glsseeformat\@gls@org@glsseeformat +}% +\newcommand*{\@glsxtr@noidx@entrynumberlist}[1]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \ifdef\@gls@loclist + {% + \glsnoidxloclist{\@gls@loclist}% + }% + {% + ??\glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `#1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% +}% +\let\@glsxtr@idx@entrynumberlist\glsentrynumberlist +\renewcommand{\@print@glossary}{% + \makeatletter + \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% + \IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}% + {}% + {\glsxtrNoGlossaryWarning{\@glo@type}}% + \ifglsxindy + \ifcsundef{@xdy@\@glo@type @language}% + {% + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@xdylanguage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}% + }% + }% + }% + {% + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@xdylanguage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type + @language\endcsname}}% + }% + }% + }% + \@do@auxoutstuff + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@gls@codepage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@gls@codepage{\@glo@type}{\gls@codepage}}% + }% + }% + \@do@auxoutstuff + \fi + \renewcommand*{\@warn@nomakeglossaries}{% + \GlossariesWarningNoLine{\string\makeglossaries\space + hasn't been used,^^Jthe glossaries will not be updated}% + }% +} +\newcommand{\GlsXtrNoGlsWarningHead}[2]{% + This document is incomplete. The external file associated with + the glossary `#1' (which should be called \texttt{#2}) + hasn't been created.% +} +\newcommand{\GlsXtrNoGlsWarningEmptyStart}{% + This has probably happened because there are no entries defined + in this glossary.% +} +\newcommand{\GlsXtrNoGlsWarningEmptyMain}{% + If you don't want this glossary, + add \texttt{nomain} to your package option list when you load + \texttt{glossaries-extra.sty}. For example:% +} +\newcommand{\GlsXtrNoGlsWarningEmptyNotMain}[1]{% + Did you forget to use \texttt{type=#1} when you defined your + entries? If you tried to load entries into this glossary with + \texttt{\string\loadglsentries} did you remember to use + \texttt{[#1]} as the optional argument? If you did, check that + the definitions in the file you loaded all had the type set + to \texttt{\string\glsdefaulttype}.% +} +\newcommand{\GlsXtrNoGlsWarningCheckFile}[1]{% + Check the contents of the file \texttt{#1}. If + it's empty, that means you haven't indexed any of your entries in this + glossary (using commands like \texttt{\string\gls} or + \texttt{\string\glsadd}) so this list can't be generated. + If the file isn't empty, the document build process hasn't been + completed.% +} +\newcommand{\GlsXtrNoGlsWarningAutoMake}[1]{% + You may need to rerun \LaTeX. If you already have, it may be that + \TeX's shell escape doesn't allow you to run + \ifglsxindy xindy\else makeindex\fi. Check the + transcript file \texttt{\jobname.log}. If the shell escape is + disabled, try one of the following: + + \begin{itemize} + \item Run the external (Lua) application: + + \texttt{makeglossaries-lite \string"\jobname\string"} + + \item Run the external (Perl) application: + + \texttt{makeglossaries \string"\jobname\string"} + \end{itemize} + + Then rerun \LaTeX\ on this document. + \GlossariesExtraWarning{Rerun required to build the + glossary `#1' or check TeX's shell escape allows + you to run \ifglsxindy xindy\else makeindex\fi}% +} +\newcommand{\GlsXtrNoGlsWarningMisMatch}{% + You need to either replace \texttt{\string\makenoidxglossaries} + with \texttt{\string\makeglossaries} or replace + \texttt{\string\printglossary} (or \texttt{\string\printglossaries}) with + \texttt{\string\printnoidxglossary} + (or \texttt{\string\printnoidxglossaries}) and then rebuild + this document.% +} +\newcommand{\GlsXtrNoGlsWarningBuildInfo}{% + Try one of the following: + \begin{itemize} + \item Add \texttt{automake} to your package option list when you load + \texttt{glossaries-extra.sty}. For example: + + \texttt{\string\usepackage[automake]% + \glsopenbrace glossaries-extra\glsclosebrace} + + \item Run the external (Lua) application: + + \texttt{makeglossaries-lite \string"\jobname\string"} + + \item Run the external (Perl) application: + + \texttt{makeglossaries \string"\jobname\string"} + \end{itemize} + + Then rerun \LaTeX\ on this document.% +} +\newcommand{\GlsXtrNoGlsWarningTail}{% + This message will be removed once the problem has been fixed.% +} +\newcommand{\GlsXtrNoGlsWarningNoOut}[1]{% + The file \texttt{#1} doesn't exist. This most likely means you haven't used + \texttt{\string\makeglossaries} or you have used + \texttt{\string\nofiles}. If this is just a draft version of the + document, you can suppress this message using the + \texttt{nomissingglstext} package option.% +} +\newcommand*{\@glsxtr@defaultnoglossarywarning}[1]{% + \glossarysection[\glossarytoctitle]{\glossarytitle} + \GlsXtrNoGlsWarningHead{#1}{\jobname.\csname @glotype@\@glo@type @in\endcsname} + \par + \glsxtrifemptyglossary{#1}% + {% + \GlsXtrNoGlsWarningEmptyStart\space + \ifthenelse{\equal{#1}{main}}{\GlsXtrNoGlsWarningEmptyMain\par + \medskip + \noindent\texttt{\string\usepackage[nomain\ifglsacronym ,acronym\fi]% + \glsopenbrace glossaries-extra\glsclosebrace} + \medskip + }% + {\GlsXtrNoGlsWarningEmptyNotMain{#1}}% + }% + {% + \IfFileExists{\jobname.\csname @glotype@\@glo@type @out\endcsname} + {% + \GlsXtrNoGlsWarningCheckFile + {\jobname.\csname @glotype@\@glo@type @out\endcsname} + + \ifglsautomake + + \GlsXtrNoGlsWarningAutoMake{#1} + + \else + + \ifthenelse{\equal{#1}{main}}% + {% + \GlsXtrNoGlsWarningEmptyMain\par + \medskip + \noindent\texttt{\string\usepackage[nomain]% + \glsopenbrace glossaries-extra\glsclosebrace} + \medskip + }% + {}% + + \ifdefequal\makeglossaries\@no@makeglossaries + {% + \GlsXtrNoGlsWarningMisMatch + }% + {% + \GlsXtrNoGlsWarningBuildInfo + }% + \fi + }% + {% + \GlsXtrNoGlsWarningNoOut + {\jobname.\csname @glotype@\@glo@type @out\endcsname}% + }% + }% + \par + \GlsXtrNoGlsWarningTail +} +\@ifpackageloaded{glossaries-accsupp} +{ + \newcommand*{\glsaccessname}[1]{% + \glsnameaccessdisplay + {% + \glsentryname{#1}% + }% + {#1}% + } +\def\@glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessname{#2}#3}% +} + \newcommand*{\Glsaccessname}[1]{% + \glsnameaccessdisplay + {% + \Glsentryname{#1}% + }% + {#1}% + } +\def\@Glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessname{#2}#3}% +} + \newcommand*{\GLSaccessname}[1]{% + \glsnameaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryname{#1}}% + }% + {#1}% + } +\def\@GLSname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessname{#2}#3}% +} + \newcommand*{\glsaccesstext}[1]{% + \glstextaccessdisplay + {% + \glsentrytext{#1}% + }% + {#1}% + } +\def\@glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccesstext{#2}#3}% +} + \newcommand*{\Glsaccesstext}[1]{% + \glstextaccessdisplay + {% + \Glsentrytext{#1}% + }% + {#1}% + } +\def\@Glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccesstext{#2}#3}% +} + \newcommand*{\GLSaccesstext}[1]{% + \glstextaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrytext{#1}}% + }% + {#1}% + } +\def\@GLStext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccesstext{#2}#3}% +} + \newcommand*{\glsaccessplural}[1]{% + \glspluralaccessdisplay + {% + \glsentryplural{#1}% + }% + {#1}% + } +\def\@glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessplural{#2}#3}% +} + \newcommand*{\Glsaccessplural}[1]{% + \glspluralaccessdisplay + {% + \Glsentryplural{#1}% + }% + {#1}% + } +\def\@glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessplural{#2}#3}% +} + \newcommand*{\GLSaccessplural}[1]{% + \glspluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryplural{#1}}% + }% + {#1}% + } +\def\@GLSplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessplural{#2}#3}% +} + \newcommand*{\glsaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \glsentryfirst{#1}% + }% + {#1}% + } +\def\@glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessfirst{#2}#3}% +} + \newcommand*{\Glsaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \Glsentryfirst{#1}% + }% + {#1}% + } +\def\@Glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessfirst{#2}#3}% +} + \newcommand*{\GLSaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryfirst{#1}}% + }% + {#1}% + } +\def\@GLSfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessfirst{#2}#3}% +} + \newcommand*{\glsaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \glsentryfirstplural{#1}% + }% + {#1}% + } +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessfirstplural{#2}#3}% +} + \newcommand*{\Glsaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \Glsentryfirstplural{#1}% + }% + {#1}% + } +\def\@Glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessfirstplural{#2}#3}% +} + \newcommand*{\GLSaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryfirstplural{#1}}% + }% + {#1}% + } +\def\@GLSfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessfirstplural{#2}#3}% +} + \newcommand*{\glsaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \glsentrysymbol{#1}% + }% + {#1}% + } +\def\@glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccesssymbol{#2}#3}% +} + \newcommand*{\Glsaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \Glsentrysymbol{#1}% + }% + {#1}% + } +\def\@Glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccesssymbol{#2}#3}% +} + \newcommand*{\GLSaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrysymbol{#1}}% + }% + {#1}% + } +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccesssymbol{#2}#3}% +} + \newcommand*{\glsaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \glsentrysymbolplural{#1}% + }% + {#1}% + } +\def\@glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccesssymbolplural{#2}#3}% +} + \newcommand*{\Glsaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \Glsentrysymbolplural{#1}% + }% + {#1}% + } +\def\@Glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccesssymbolplural{#2}#3}% +} + \newcommand*{\GLSaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrysymbolplural{#1}}% + }% + {#1}% + } +\def\@GLSsymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccesssymbolplural{#2}#3}% +} + \newcommand*{\glsaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \glsentrydesc{#1}% + }% + {#1}% + } +\def\@glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessdesc{#2}#3}% +} + \newcommand*{\Glsaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \Glsentrydesc{#1}% + }% + {#1}% + } +\def\@Glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessdesc{#2}#3}% +} + \newcommand*{\GLSaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrydesc{#1}}% + }% + {#1}% + } +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessdesc{#2}#3}% +} + \newcommand*{\glsaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \glsentrydescplural{#1}% + }% + {#1}% + } +\def\@glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsaccessdescplural{#2}#3}% +} + \newcommand*{\Glsaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \Glsentrydescplural{#1}% + }% + {#1}% + } +\def\@Glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsaccessdescplural{#2}#3}% +} + \newcommand*{\GLSaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrydescplural{#1}}% + }% + {#1}% + } +\def\@GLSdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSaccessdescplural{#2}#3}% +} + \newcommand*{\glsaccessshort}[1]{% + \glsshortaccessdisplay + {% + \glsentryshort{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessshort}[1]{% + \glsshortaccessdisplay + {% + \Glsentryshort{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessshort}[1]{% + \glsshortaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryshort{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \glsentryshortpl{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \Glsentryshortpl{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryshortpl{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccesslong}[1]{% + \glslongaccessdisplay{\glsentrylong{#1}}{#1}% + } + + \newcommand*{\Glsaccesslong}[1]{% + \glslongaccessdisplay{\Glsentrylong{#1}}{#1}% + } + \newcommand*{\GLSaccesslong}[1]{% + \glslongaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrylong{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccesslongpl}[1]{% + \glslongpluralaccessdisplay{\glsentrylongpl{#1}}{#1}% + } + + \newcommand*{\Glsaccesslongpl}[1]{% + \glslongpluralaccessdisplay{\Glsentrylongpl{#1}}{#1}% + } + \newcommand*{\GLSaccesslongpl}[1]{% + \glslongpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrylongpl{#1}}% + }% + {#1}% + } +} +{ + \newcommand*{\glsaccessname}[1]{\glsentryname{#1}} + \newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}} + \newcommand*{\GLSaccessname}[1]{% + \protect\mfirstucMakeUppercase{\glsentryname{#1}}} + \newcommand*{\glsaccesstext}[1]{\glsentrytext{#1}} + \newcommand*{\Glsaccesstext}[1]{\Glsentrytext{#1}} + \newcommand*{\GLSaccesstext}[1]{% + \protect\mfirstucMakeUppercase{\glsentrytext{#1}}} + \newcommand*{\glsaccessplural}[1]{\glsentryplural{#1}} + \newcommand*{\Glsaccessplural}[1]{\Glsentryplural{#1}} + \newcommand*{\GLSaccessplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentryplural{#1}}} + \newcommand*{\glsaccessfirst}[1]{\glsentryfirst{#1}} + \newcommand*{\Glsaccessfirst}[1]{\Glsentryfirst{#1}} + \newcommand*{\GLSaccessfirst}[1]{% + \protect\mfirstucMakeUppercase{\glsentryfirst{#1}}} + \newcommand*{\glsaccessfirstplural}[1]{\glsentryfirstplural{#1}} + \newcommand*{\Glsaccessfirstplural}[1]{\Glsentryfirstplural{#1}} + \newcommand*{\GLSaccessfirstplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentryfirstplural{#1}}} + \newcommand*{\glsaccesssymbol}[1]{\glsentrysymbol{#1}} + \newcommand*{\Glsaccesssymbol}[1]{\Glsentrysymbol{#1}} + \newcommand*{\GLSaccesssymbol}[1]{% + \protect\mfirstucMakeUppercase{\glsentrysymbol{#1}}} + \newcommand*{\glsaccesssymbolplural}[1]{\glsentrysymbolplural{#1}} + \newcommand*{\Glsaccesssymbolplural}[1]{\Glsentrysymbolplural{#1}} + \newcommand*{\GLSaccesssymbolplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentrysymbolplural{#1}}} + \newcommand*{\glsaccessdesc}[1]{\glsentrydesc{#1}} + \newcommand*{\Glsaccessdesc}[1]{\Glsentrydesc{#1}} + \newcommand*{\GLSaccessdesc}[1]{% + \protect\mfirstucMakeUppercase{\glsentrydesc{#1}}} + \newcommand*{\glsaccessdescplural}[1]{\glsentrydescplural{#1}} + \newcommand*{\Glsaccessdescplural}[1]{\Glsentrydescplural{#1}} + \newcommand*{\GLSaccessdescplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentrydescplural{#1}}} + \newcommand*{\glsaccessshort}[1]{\glsentryshort{#1}} + \newcommand*{\Glsaccessshort}[1]{\Glsentryshort{#1}} + \newcommand*{\GLSaccessshort}[1]{% + \protect\mfirstucMakeUppercase{\glsentryshort{#1}}} + \newcommand*{\glsaccessshortpl}[1]{\glsentryshortpl{#1}} + \newcommand*{\Glsaccessshortpl}[1]{\Glsentryshortpl{#1}} + \newcommand*{\GLSaccessshortpl}[1]{% + \protect\mfirstucMakeUppercase{\glsentryshortpl{#1}}} + \newcommand*{\glsaccesslong}[1]{\glsentrylong{#1}} + \newcommand*{\Glsaccesslong}[1]{\Glsentrylong{#1}} + \newcommand*{\GLSaccesslong}[1]{% + \protect\mfirstucMakeUppercase{\glsentrylong{#1}}} + \newcommand*{\glsaccesslongpl}[1]{\glsentrylongpl{#1}} + \newcommand*{\Glsaccesslongpl}[1]{\Glsentrylongpl{#1}} + \newcommand*{\GLSaccesslongpl}[1]{% + \protect\mfirstucMakeUppercase{\glsentrylongpl{#1}}} +} +\glsaddstoragekey{category}{general}{\glscategory} +\newcommand{\glsifcategory}[4]{% + \ifglsfieldeq{#1}{category}{#2}{#3}{#4}% +} +\newcommand*{\glssetcategoryattribute}[3]{% + \csdef{@glsxtr@categoryattr@@#1@#2}{#3}% +} +\newcommand*{\glsgetcategoryattribute}[2]{% + \csuse{@glsxtr@categoryattr@@#1@#2}% +} +\newcommand*{\glshascategoryattribute}[4]{% + \ifcsvoid{@glsxtr@categoryattr@@#1@#2}{#4}{#3}% +} +\newcommand*{\glssetattribute}[3]{% + \glssetcategoryattribute{\glscategory{#1}}{#2}{#3}% +} +\newcommand*{\glsgetattribute}[2]{% + \glsgetcategoryattribute{\glscategory{#1}}{#2}% +} +\newcommand*{\glshasattribute}[4]{% + \ifglsentryexists{#1}% + {\glshascategoryattribute{\glscategory{#1}}{#2}{#3}{#4}}% + {#4}% +} +\newcommand{\glsifcategoryattribute}[5]{% + \ifcsundef{@glsxtr@categoryattr@@#1@#2}% + {#5}% + {\ifcsstring{@glsxtr@categoryattr@@#1@#2}{#3}{#4}{#5}}% +} +\newcommand{\glsifattribute}[5]{% + \ifglsentryexists{#1}% + {\glsifcategoryattribute{\glscategory{#1}}{#2}{#3}{#4}{#5}}% + {#5}% +} +\glssetcategoryattribute{general}{regular}{true} +\glssetcategoryattribute{acronym}{regular}{true} +\newcommand*{\glssetregularcategory}[1]{% + \glssetcategoryattribute{#1}{regular}{true}% +} +\newcommand{\glsifregularcategory}[3]{% + \glsifcategoryattribute{#1}{regular}{true}{#2}{#3}% +} +\newcommand{\glsifregular}[3]{% + \glsifregularcategory{\glscategory{#1}}{#2}{#3}% +} +\newcommand{\glsforeachincategory}[5][\@glo@types]{% + \forallglossaries[#1]{#3}% + {% + \forglsentries[#3]{#4}% + {% + \glsifcategory{#4}{#2}{#5}{}% + }% + }% +} +\newcommand{\glsforeachwithattribute}[6][\@glo@types]{% + \forallglossaries[#1]{#4}% + {% + \forglsentries[#4]{#5}% + {% + \glsifattribute{#5}{#2}{#3}{#6}{}% + }% + }% +} +\ifdef\newterm +{% + \renewcommand*{\newterm}[2][]{% + \newglossaryentry{#2}% + {type={index},category=index,name={#2},% + description={\glsxtrpostdescription\nopostdesc},#1}% + } + \glssetcategoryattribute{index}{regular}{true} + \newcommand*{\glsxtrpostdescindex}{} +} +{} +\ifdef\printsymbols +{% + \newcommand*{\glsxtrnewsymbol}[3][]{% + \newglossaryentry{#2}{name={#3},sort={#2},type=symbols,category=symbol,#1}% + } + \glssetcategoryattribute{symbol}{regular}{true} + \newcommand*{\glsxtrpostdescsymbol}{} +} +{} +\ifdef\printnumbers +{% +\ifdef\printnumbers + \newcommand*{\glsxtrnewnumber}[3][]{% + \newglossaryentry{#2}{name={#3},sort={#2},type=numbers,category=number,#1}% + } + \glssetcategoryattribute{number}{regular}{true} + \newcommand*{\glsxtrpostdescnumber}{} +} +{} +\newcommand*{\glsxtrsetcategory}[2]{% + \@for\@glsxtr@label:=#1\do + {% + \glsfieldxdef{\@glsxtr@label}{category}{#2}% + }% +} +\newcommand*{\glsxtrsetcategoryforall}[2]{% + \forallglossaries[#1]{\@glsxtr@type}{% + \forglsentries[\@glsxtr@type]{\@glsxtr@label}% + {% + \glsfieldxdef{\@glsxtr@label}{category}{#2}% + }% + }% +} +\newcommand*{\glsxtrfieldtitlecase}[2]{% + \expandafter\xcapitalisewords\expandafter + {\csname glo@\glsdetoklabel{#1}@#2\endcsname}% +} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifattribute{#1}{glossdesc}{firstuc}% + {% + \Glsaccessdesc{#1}% + }% + {% + \glsifattribute{#1}{glossdesc}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsdescriptionaccessdisplay + {% + \glsxtrfieldtitlecase{#1}{desc}% + }% + {#1}% + }% + {% + \glsaccessdesc{#1}% + }% + }% + }% + } +} +{ + \renewcommand*{\glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifattribute{#1}{glossdesc}{firstuc}% + {% + \Glsentrydesc{#1}% + }% + {% + \glsifattribute{#1}{glossdesc}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsxtrfieldtitlecase{#1}{desc}% + }% + {% + \glsentrydesc{#1}% + }% + }% + }% + } +} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\glossentryname}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifattribute{#1}{glossname}{firstuc}% + {% + \glsnameaccessdisplay + {% + \glsnamefont{\Glsentryname{#1}}% + }% + {#1}% + }% + {% + \glsifattribute{#1}{glossname}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsnameaccessdisplay + {% + \glsnamefont{\glsxtrfieldtitlecase{#1}{name}}% + }% + {#1}% + }% + {% + \glsifattribute{#1}{glossname}{uc}% + {% + \glsnameaccessdisplay + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \glsnamefont{\mfirstucMakeUppercase{\glo@name}}% + }% + {#1}% + }% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \glsnameaccessdisplay + {% + \expandafter\glsnamefont\expandafter{\glo@name}% + }% + {#1}% + }% + }% + }% + \glsxtrpostnamehook{#1}% + }% + } +} +{ + \renewcommand*{\glossentryname}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifattribute{#1}{glossname}{firstuc}% + {% + \glsnamefont{\Glsentryname{#1}}% + }% + {% + \glsifattribute{#1}{glossname}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsnamefont{\glsxtrfieldtitlecase{#1}{name}}% + }% + {% + \glsifattribute{#1}{glossname}{uc}% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \glsnamefont{\mfirstucMakeUppercase{\glo@name}}% + }% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \expandafter\glsnamefont\expandafter{\glo@name}% + }% + }% + }% + }% + \glsxtrpostnamehook{#1}% + } +} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\Glossentryname}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsnameaccessdisplay + {% + \glsnamefont{\Glsentryname{#1}}% + }% + {#1}% + \glsxtrpostnamehook{#1}% + }% + } +} +{ + \renewcommand*{\Glossentryname}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsnamefont{\Glsentryname{#1}}% + \glsxtrpostnamehook{#1}% + }% + } +} +\newcommand*{\glsxtrpostnamehook}[1]{% + \def\@glsnumberformat{glsnumberformat}% + \glsxtrdoautoindexname{#1}{indexname}% +} +\newif\if@glsxtr@format@override +\@glsxtr@format@overridefalse +\@ifpackageloaded{hyperref} +{ + \ifHy@hyperindex + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + \appto\theindex{\let\glshypernumber\@firstofone}% + } + \else + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + \appto\theindex{\let\glshypernumber\hyperpage}% + } + \fi +} +{ + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + } +} +\@onlypreamble\GlsXtrEnableIndexFormatOverride +\newcommand*{\glsxtrdoautoindexname}[2]{% + \glshasattribute{#1}{#2}% + {% + \@glsxtr@autoindex@setname{#1}% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{#2}}% + \if@glsxtr@format@override + \ifdefstring{\@glsnumberformat}{glsnumberformat}{}% + {\let\@glsxtr@attrval\@glsnumberformat}% + \fi + \ifdefstring{\@glsxtr@attrval}{true}% + {}% + {\eappto\@glo@name{\@glsxtr@autoindex@encap\@glsxtr@attrval}}% + \expandafter\index\expandafter{\@glo@name}% + }% + {}% +} +\newcommand*{\@glsxtr@autoindex@setname}[1]{% + \def\@glo@name{\string\glsentryname{#1}}% + \glsletentryfield{\@glo@sort}{#1}{sort}% + \@gls@checkmkidxchars\@glo@sort + \@glsxtr@autoindex@doextra@esc\@glo@sort + \epreto\@glo@name{\@glo@sort\@glsxtr@autoindex@at}% +} +\newcommand*{\@glsxtr@autoindex@doextra@esc}[1]{% + \ifx\@glsxtr@autoindex@esc\@gls@quotechar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escquote\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@esc\noexpand\@nnil + \@glsxtr@autoindex@esc\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi + \ifx\@glsxtr@autoindex@at\@gls@actualchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escat\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@at\noexpand\@nnil + \@glsxtr@autoindex@at\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi + \ifx\@glsxtr@autoindex@level\@gls@levelchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@esclevel\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@level\noexpand\@nnil + \@glsxtr@autoindex@level\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi + \ifx\@glsxtr@autoindex@encap\@gls@encapchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escencap\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@encap\noexpand\@nnil + \@glsxtr@autoindex@encap\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi +} +\newcommand*{\@glsxtr@autoindex@at}{} +\newcommand*{\GlsXtrSetActualChar}[1]{% + \gdef\@glsxtr@autoindex@at{#1}% + \def\@glsxtr@autoindex@escat##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escat}{##1}{##2}{##3}% + }% +} +\@onlypreamble\GlsXtrSetActualChar +\makeatother +\GlsXtrSetActualChar{@} +\makeatletter +\newcommand*{\@glsxtr@autoindex@encap}{} +\newcommand*{\GlsXtrSetEncapChar}[1]{% + \gdef\@glsxtr@autoindex@encap{#1}% + \def\@glsxtr@autoindex@escencap##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escencap}{##1}{##2}{##3}% + }% +} +\GlsXtrSetEncapChar{|} +\@onlypreamble\GlsXtrSetEncapChar +\newcommand*{\@glsxtr@autoindex@level}{} +\newcommand*{\GlsXtrSetLevelChar}[1]{% + \gdef\@glsxtr@autoindex@level{#1}% + \def\@glsxtr@autoindex@esclevel##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@esclevel}{##1}{##2}{##3}% + }% +} +\GlsXtrSetLevelChar{!} +\@onlypreamble\GlsXtrSetLevelChar +\newcommand*{\@glsxtr@autoindex@esc}{"} +\newcommand*{\GlsXtrSetEscChar}[1]{% + \gdef\@glsxtr@autoindex@esc{#1}% + \def\@glsxtr@autoindex@escquote##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escquote}{##1}{##2}{##3}% + }% +} +\GlsXtrSetEscChar{"} +\@onlypreamble\GlsXtrSetEscChar +\ifdef\actualchar + {\expandafter\GlsXtrSetActualChar\expandafter{\actualchar}} + {} +\ifdef\quotechar + {\expandafter\GlsXtrSetEscChar\expandafter{\quotechar}} + {} +\ifdef\levelchar + {\expandafter\GlsXtrSetLevelChar\expandafter{\levelchar}} + {} +\ifdef\encapchar + {\expandafter\GlsXtrSetEncapChar\expandafter{\encapchar}} + {} +\def\@glsxtr@gobbleto@endescspch#1\@glsxtr@endescspch{} +\newcommand*{\@@glsxtr@autoindex@escspch}[5]{% + \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% + \toks@={#3}% + \ifx\@nnil#3\relax + \def\@@glsxtr@checkspch{\@glsxtr@gobbleto@endescspch#5\@glsxtr@endescspch}% + \else + \ifx\@nnil#4\relax + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@glsxtr@checkspch{\@glsxtr@gobbleto@endescspch + #4#5\@glsxtr@endescspch}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@glsxtr@autoindex@esc#1}% + \def\@@glsxtr@checkspch{#2#5#1\@nnil#1\@glsxtr@endescspch}% + \fi + \fi + \@@glsxtr@checkspch +} +\renewcommand*{\Glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \Glsaccessdesc{#1}% + }% +} +\renewcommand*{\glossentrysymbol}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsaccesssymbol{#1}% + }% +} +\renewcommand*{\Glossentrysymbol}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \Glsaccesssymbol{#1}% + }% +} +\newcommand*{\GlsXtrEnableInitialTagging}{% + \@ifstar\s@glsxtr@enabletagging\@glsxtr@enabletagging +} +\@onlypreamble\GlsXtrEnableInitialTagging +\newcommand*{\s@glsxtr@enabletagging}[2]{% + \undef#2% + \@glsxtr@enabletagging{#1}{#2}% +} +\newcommand*{\@glsxtr@enabletagging}[2]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty\@glsxtr@cat + {}% + {\glssetcategoryattribute{\@glsxtr@cat}{tagging}{true}}% + }% + \newrobustcmd*#2[1]{##1}% + \def\@glsxtr@taggingcs{#2}% + \renewcommand*\@glsxtr@activate@initialtagging{% + \let#2\@glsxtr@tag + }% + \ifundef\@gls@preglossaryhook + {\GlossariesExtraWarning{Initial tagging requires at least + glossaries.sty v4.19 to work correctly}}% + {}% +} +\ifundef\mfu@checkword@do +{ + \newcommand*{\mfu@checkword@do}[1]{% + \ifdefstring{\mfu@checkword@arg}{#1}% + {% + \let\@mfu@domakefirstuc\@firstofone + \listbreak + }% + {}% + } + \ifundef\mfu@checkword + { + \newcommand{\@glsxtr@do@titlecaps@warn}{% + \GlossariesExtraWarning{mfirstuc.sty too old. Title Caps + support not available}% + \let\@glsxtr@do@titlecaps@warn\relax + } + } + { + \renewcommand*{\mfu@checkword}[1]{% + \def\mfu@checkword@arg{#1}% + \let\@mfu@domakefirstuc\makefirstuc + \forlistloop\mfu@checkword@do\@mfu@nocaplist + } + } +} +{}% no patch required +\newcommand*{\@glsxtr@do@titlecaps@warn}{} +\newcommand*\@glsxtr@activate@initialtagging{} +\newrobustcmd*{\@glsxtr@tag}[1]{% + \glsifattribute{\glscurrententrylabel}{tagging}{true}% + {\glsxtrtagfont{#1}}{#1}% +} +\newcommand*{\glsxtrtagfont}[1]{\underline{#1}} +\ifdef\@gls@preglossaryhook +{ + \renewcommand*{\@gls@preglossaryhook}{% + \@glsxtr@activate@initialtagging + \let\@glsxtr@org@postdescription\glspostdescription + \renewcommand*{\glspostdescription}{% + \glsxtrpostdescription + \@glsxtr@org@postdescription + }% + }% +} +{} +\newcommand*{\glsxtrpostdescription}{% + \csuse{glsxtrpostdesc\glscategory{\glscurrententrylabel}}% +} +\newcommand*{\glsxtrpostdescgeneral}{} +\newcommand*{\glsxtrpostdescterm}{} +\newcommand*{\glsxtrpostdescacronym}{} +\newcommand*{\glsxtrpostdescabbreviation}{} +\renewcommand*{\glspostlinkhook}{% + \ifglsentryexists{\glslabel}{\glsxtrpostlinkhook}{}% +} +\newcommand*{\glsxtrpostlinkhook}{% + \glsxtrdiscardperiod{\glslabel}% + {\glsxtrpostlinkendsentence}% + {\glsxtrpostlink}% +} +\newcommand*{\glsxtrpostlink}{% + \csuse{glsxtrpostlink\glscategory{\glslabel}}% +} +\newcommand*{\glsxtrpostlinkendsentence}{% + \ifcsdef{glsxtrpostlink\glscategory{\glslabel}} + {% + \csuse{glsxtrpostlink\glscategory{\glslabel}}% + .\spacefactor\sfcode`\. \relax + }% + {% + \spacefactor\sfcode`\. \relax + }% +} +\newcommand*{\glsxtrpostlinkAddDescOnFirstUse}{% + \glsxtrifwasfirstuse{\space(\glsaccessdesc{\glslabel})}{}% +} +\newcommand*{\glsxtrpostlinkAddSymbolOnFirstUse}{% + \glsxtrifwasfirstuse + {% + \ifglshassymbol{\glslabel}{\space(\glsaccesssymbol{\glslabel})}{}% + }% + {}% +} +\newcommand*{\glsxtrdiscardperiod}[3]{% + \glsifattribute{#1}{discardperiod}{true}% + {% + \glsifplural + {% + \glsifattribute{#1}{pluraldiscardperiod}{true}% + {\glsxtrifperiod{#2}{#3}}% + {#3}% + }% + {% + \glsxtrifperiod{#2}{#3}% + }% + }% + {#3}% +} +\newcommand*{\glsxtrifperiod}[1]{\new@ifnextchar.{\@firstoftwo{#1}}} +\newcommand*{\glsxtr@punclist}{.,:;?!} +\newcommand*{\glsxtraddpunctuationmark}[1]{\appto\glsxtr@punclist{#1}} +\newcommand*{\glsxtrsetpunctuationmarks}[1]{\def\glsxtr@punclist{#1}} +\newcommand*{\glsxtrifnextpunc}[2]{% + \def\reserved@a{#1}% + \def\reserved@b{#2}% + \futurelet\@glspunc@token\glsxtr@ifnextpunc +} +\newcommand*{\glsxtr@ifnextpunc}{% + \glsxtr@ifpunctoken{\@glspunc@token}{\let\reserved@b\reserved@a}{}% + \reserved@b +} +\newcommand*{\glsxtr@ifpunctoken}[1]{% + \expandafter\@glsxtr@ifpunctoken\expandafter#1\glsxtr@punclist\@nnil +} +\def\@glsxtr@ifpunctoken#1#2{% + \let\reserved@d=#2% + \ifx\reserved@d\@nnil + \let\glsxtr@next\@glsxtr@notfoundinlist + \else + \ifx#1\reserved@d + \let\glsxtr@next\@glsxtr@foundinlist + \else + \let\glsxtr@next\@glsxtr@ifpunctoken + \fi + \fi + \glsxtr@next#1% +} +\def\@glsxtr@foundinlist#1\@nnil{\@firstoftwo} +\def\@glsxtr@notfoundinlist#1{\@secondoftwo} +\newcommand{\glsxtrdopostpunc}[1]{% + \glsxtrifnextpunc{\@glsxtr@swaptwo{#1}}{#1}% +} +\newcommand{\@glsxtr@swaptwo}[2]{#2#1} +\define@key{glsxtrabbrv}{category}{% + \edef\glscategorylabel{#1}% + \ifcsdef{@glsabbrv@current@#1}% + {% + \glsxtr@applyabbrvstyle{\csname @glsabbrv@current@#1\endcsname}% + }% + {}% +} +\define@key{glsxtrabbrv}{shortplural}{% + \def\@gls@shortpl{#1}% +} +\define@key{glsxtrabbrv}{longplural}{% + \def\@gls@longpl{#1}% +} +\newtoks\glsshortpltok +\newtoks\glslongpltok +\newcommand*{\@glsxtr@insertdots}[2]{% + \def#1{}% + \@glsxtr@insert@dots#1#2\@nnil +} +\newcommand*{\@glsxtr@insert@dots}[2]{% + \ifx\@nnil#2\relax + \let\@glsxtr@insert@dots@next\@gobble + \else + \ifx\relax#2\relax + \else + \appto#1{#2.}% + \fi + \let\@glsxtr@insert@dots@next\@glsxtr@insert@dots + \fi + \@glsxtr@insert@dots@next#1% +} +\newcommand*{\newabbreviation}[4][]{% + \glskeylisttok{#1}% + \glslabeltok{#2}% + \glsshorttok{#3}% + \glslongtok{#4}% + \def\glscategorylabel{abbreviation}% + \glsxtr@applyabbrvstyle{\@glsabbrv@current@abbreviation}% + \setkeys*{glsxtrabbrv}[shortplural,longplural]{#1}% + \def\@gls@longpl{#4\glspluralsuffix}% + \glsifcategoryattribute{\glscategorylabel}{insertdots}{true}% + {% + \@glsxtr@insertdots\@gls@short{#3}% + \expandafter\glsshorttok\expandafter{\@gls@short\spacefactor1000 \relax}% + \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}% + {% + \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short + '\abbrvpluralsuffix}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}% + {% + \let\@gls@shortpl\@gls@short + }% + {% + \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short + \abbrvpluralsuffix}% + }% + }% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}% + {% + \def\@gls@shortpl{#3'\abbrvpluralsuffix}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}% + {% + \def\@gls@shortpl{#3}% + }% + {% + \def\@gls@shortpl{#3\abbrvpluralsuffix}% + }% + }% + }% + \glsxtrnewabbrevpresetkeyhook{#1}{#2}{#3}% + \setkeys*{glsxtrabbrv}[category]{#1}% + \expandafter\glsshortpltok\expandafter{\@gls@shortpl}% + \expandafter\glslongpltok\expandafter{\@gls@longpl}% + \newabbreviationhook + \protected@edef\@do@newglossaryentry{% + \noexpand\newglossaryentry{\the\glslabeltok}% + {% + type=\glsxtrabbrvtype,% + category=abbreviation,% + short={\the\glsshorttok},% + shortplural={\the\glsshortpltok},% + long={\the\glslongtok},% + longplural={\the\glslongpltok},% + name={\the\glsshorttok},% + \CustomAbbreviationFields,% + \the\glskeylisttok + }% + }% + \@do@newglossaryentry + \GlsXtrPostNewAbbreviation +} +\newcommand*{\glsxtrnewabbrevpresetkeyhook}[3]{} +\newcommand*{\GlsXtrPostNewAbbreviation}{} +\newcommand*{\newabbreviationhook}{} +\newcommand*{\CustomAbbreviationFields}{} +\newcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{#1}}#2\glsxtrfullsep{#1}% + (\protect\glsfirstabbrvfont{\glsaccessshort{#1}})% +} +\newcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{#1}}#2\glsxtrfullsep{#1}% + (\protect\glsfirstabbrvfont{\glsaccessshort{#1}})% +} +\newcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% + (\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}})% +} +\newcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% + (\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}})% +} +\newcommand*{\glsxtrfullsep}[1]{\space} +\newcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat} +\newcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat} +\newcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat} +\newcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat} +\renewcommand*{\glsentryfull}[1]{\glsxtrinlinefullformat{#1}{}} +\renewcommand*{\Glsentryfull}[1]{\Glsxtrinlinefullformat{#1}{}} +\renewcommand*{\glsentryfullpl}[1]{\glsxtrinlinefullplformat{#1}{}} +\renewcommand*{\Glsentryfullpl}[1]{\Glsxtrinlinefullplformat{#1}{}} +\newcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{#1}} +\newcommand*{\glsfirstabbrvdefaultfont}[1]{\glsabbrvfont{#1}} +\newcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{#1}} +\newcommand*{\glsabbrvdefaultfont}[1]{#1} +\newcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{#1}} +\newcommand*{\glsfirstlongdefaultfont}[1]{#1} +\newcommand*{\abbrvpluralsuffix}{\glspluralsuffix} +\newrobustcmd*{\glsxtrfull}{\@gls@hyp@opt\ns@glsxtrfull} +\newcommand*\ns@glsxtrfull[2][]{% + \new@ifnextchar[{\@glsxtr@full{#1}{#2}}% + {\@glsxtr@full{#1}{#2}[]}% +} +\def\@glsxtr@full#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsxtrinlinefullformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@firstoftwo +} +\newrobustcmd*{\Glsxtrfull}{\@gls@hyp@opt\ns@Glsxtrfull} +\newcommand*\ns@Glsxtrfull[2][]{% + \new@ifnextchar[{\@Glsxtr@full{#1}{#2}}% + {\@Glsxtr@full{#1}{#2}[]}% +} +\def\@Glsxtr@full#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsxtrinlinefullformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrfull}{\@gls@hyp@opt\ns@GLSxtrfull} +\newcommand*\ns@GLSxtrfull[2][]{% + \new@ifnextchar[{\@GLSxtr@full{#1}{#2}}% + {\@GLSxtr@full{#1}{#2}[]}% +} +\def\@GLSxtr@full#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{\mfirstucMakeUppercase{\glsxtrinlinefullformat{#2}{#3}}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrfullpl}{\@gls@hyp@opt\ns@glsxtrfullpl} +\newcommand*\ns@glsxtrfullpl[2][]{% + \new@ifnextchar[{\@glsxtr@fullpl{#1}{#2}}% + {\@glsxtr@fullpl{#1}{#2}[]}% +} +\def\@glsxtr@fullpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsxtrinlinefullplformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrfullpl}{\@gls@hyp@opt\ns@Glsxtrfullpl} +\newcommand*\ns@Glsxtrfullpl[2][]{% + \new@ifnextchar[{\@Glsxtr@fullpl{#1}{#2}}% + {\@Glsxtr@fullpl{#1}{#2}[]}% +} +\def\@Glsxtr@fullpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsxtrinlinefullplformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrfullpl}{\@gls@hyp@opt\ns@GLSxtrfullpl} +\newcommand*\ns@GLSxtrfullpl[2][]{% + \new@ifnextchar[{\@GLSxtr@fullpl{#1}{#2}}% + {\@GLSxtr@fullpl{#1}{#2}[]}% +} +\def\@GLSxtr@fullpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\glsxtrinlinefullplformat{#2}{#3}}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrshort}{\@gls@hyp@opt\ns@glsxtrshort} +\newcommand*{\ns@glsxtrshort}[2][]{% + \new@ifnextchar[{\@glsxtrshort{#1}{#2}}{\@glsxtrshort{#1}{#2}[]}% +} +\def\@glsxtrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrshort}{\@gls@hyp@opt\ns@Glsxtrshort} +\newcommand*{\ns@Glsxtrshort}[2][]{% + \new@ifnextchar[{\@Glsxtrshort{#1}{#2}}{\@Glsxtrshort{#1}{#2}[]}% +} +\def\@Glsxtrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\Glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrshort}{\@gls@hyp@opt\ns@GLSxtrshort} +\newcommand*{\ns@GLSxtrshort}[2][]{% + \new@ifnextchar[{\@GLSxtrshort{#1}{#2}}{\@GLSxtrshort{#1}{#2}[]}% +} +\def\@GLSxtrshort#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\glsabbrvfont{\glsaccessshort{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrlong}{\@gls@hyp@opt\ns@glsxtrlong} +\newcommand*{\ns@glsxtrlong}[2][]{% + \new@ifnextchar[{\@glsxtrlong{#1}{#2}}{\@glsxtrlong{#1}{#2}[]}% +} +\def\@glsxtrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsaccesslong{#2}#3}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrlong}{\@gls@hyp@opt\ns@Glsxtrlong} +\newcommand*{\ns@Glsxtrlong}[2][]{% + \new@ifnextchar[{\@Glsxtrlong{#1}{#2}}{\@Glsxtrlong{#1}{#2}[]}% +} +\def\@Glsxtrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsaccesslong{#2}#3}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrlong}{\@gls@hyp@opt\ns@GLSxtrlong} +\newcommand*{\ns@GLSxtrlong}[2][]{% + \new@ifnextchar[{\@GLSxtrlong{#1}{#2}}{\@GLSxtrlong{#1}{#2}[]}% +} +\def\@GLSxtrlong#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{\mfirstucMakeUppercase{\glsaccesslong{#2}#3}}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrshortpl}{\@gls@hyp@opt\ns@glsxtrshortpl} +\newcommand*{\ns@glsxtrshortpl}[2][]{% + \new@ifnextchar[{\@glsxtrshortpl{#1}{#2}}{\@glsxtrshortpl{#1}{#2}[]}% +} +\def\@glsxtrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrshortpl}{\@gls@hyp@opt\ns@Glsxtrshortpl} +\newcommand*{\ns@Glsxtrshortpl}[2][]{% + \new@ifnextchar[{\@Glsxtrshortpl{#1}{#2}}{\@Glsxtrshortpl{#1}{#2}[]}% +} +\def\@Glsxtrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\Glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrshortpl}{\@gls@hyp@opt\ns@GLSxtrshortpl} +\newcommand*{\ns@GLSxtrshortpl}[2][]{% + \new@ifnextchar[{\@GLSxtrshortpl{#1}{#2}}{\@GLSxtrshortpl{#1}{#2}[]}% +} +\def\@GLSxtrshortpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\glsabbrvfont{\glsaccessshortpl{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrlongpl}{\@gls@hyp@opt\ns@glsxtrlongpl} +\newcommand*{\ns@glsxtrlongpl}[2][]{% + \new@ifnextchar[{\@glsxtrlongpl{#1}{#2}}{\@glsxtrlongpl{#1}{#2}[]}% +} +\def\@glsxtrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsaccesslongpl{#2}#3}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrlongpl}{\@gls@hyp@opt\ns@Glsxtrlongpl} +\newcommand*{\ns@Glsxtrlongpl}[2][]{% + \new@ifnextchar[{\@Glsxtrlongpl{#1}{#2}}{\@Glsxtrlongpl{#1}{#2}[]}% +} +\def\@Glsxtrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsaccesslongpl{#2}#3}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrlongpl}{\@gls@hyp@opt\ns@GLSxtrlongpl} +\newcommand*{\ns@GLSxtrlongpl}[2][]{% + \new@ifnextchar[{\@GLSxtrlongpl{#1}{#2}}{\@GLSxtrlongpl{#1}{#2}[]}% +} +\def\@GLSxtrlongpl#1#2[#3]{% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{\mfirstucMakeUppercase{\glsaccesslongpl{#2}#3}}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newcommand*{\glssetabbrvfmt}[1]{% + \ifcsdef{@glsabbrv@current@#1}% + {\glsxtr@applyabbrvfmt{\csname @glsabbrv@current@#1\endcsname}}% + {\glsxtr@applyabbrvfmt{\@glsabbrv@current@abbreviation}}% +} +\newcommand*{\glsxtrgenabbrvfmt}{% + \ifdefempty\glscustomtext + {% + \ifglsused\glslabel + {% + \glsifplural + {% + \glscapscase + {% + \glsabbrvfont{\glsaccessshortpl{\glslabel}}\glsinsert + }% + {% + \glsabbrvfont{\Glsaccessshortpl{\glslabel}}\glsinsert + }% + {% + \mfirstucMakeUppercase + {\glsabbrvfont{\glsaccessshortpl{\glslabel}}\glsinsert}% + }% + }% + {% + \glscapscase + {% + \glsabbrvfont{\glsaccessshort{\glslabel}}\glsinsert + }% + {% + \glsabbrvfont{\Glsaccessshort{\glslabel}}\glsinsert + }% + {% + \mfirstucMakeUppercase + {\glsabbrvfont{\glsaccessshort{\glslabel}}\glsinsert}% + }% + }% + }% + {% + \glsifplural + {% + \glscapscase + {% + \glsxtrfullplformat{\glslabel}{\glsinsert}% + }% + {% + \Glsxtrfullplformat{\glslabel}{\glsinsert}% + }% + {% + \mfirstucMakeUppercase + {\glsxtrfullplformat{\glslabel}{\glsinsert}}% + }% + }% + {% + \glscapscase + {% + \glsxtrfullformat{\glslabel}{\glsinsert}% + }% + {% + \Glsxtrfullformat{\glslabel}{\glsinsert}% + }% + {% + \mfirstucMakeUppercase + {\glsxtrfullformat{\glslabel}{\glsinsert}}% + }% + }% + }% + }% + {% + \glscustomtext + }% +} +\newcommand*{\setabbreviationstyle}[2][abbreviation]{% + \ifcsundef{@glsabbrv@dispstyle@setup@#2} + {% + \PackageError{glossaries-extra}{Undefined abbreviation style `#2'}{}% + }% + {% + \ifcsstring{@glsabbrv@current@#1}{#2}% + {% + }% + {% + \def\@glsxtr@dostylewarn{}% + \glsforeachincategory{#1}{\@gls@type}{\@gls@label}% + {% + \def\@glsxtr@dostylewarn{\GlossariesWarning{Abbreviation + style has been switched \MessageBreak + for category `#1', \MessageBreak + but there have already been entries \MessageBreak + defined for this category. Unwanted \MessageBreak + side-effects may result}}% + \@endfortrue + }% + \@glsxtr@dostylewarn + \csdef{@glsabbrv@current@#1}{#2}% + \glsxtr@applyabbrvstyle{#2}% + }% + }% +} +\newcommand*{\glsxtr@applyabbrvstyle}[1]{% + \csuse{@glsabbrv@dispstyle@setup@#1}% + \csuse{@glsabbrv@dispstyle@fmts@#1}% +} +\newcommand*{\glsxtr@applyabbrvfmt}[1]{% + \csuse{@glsabbrv@dispstyle@fmts@#1}% +} +\newcommand*{\newabbreviationstyle}[3]{% + \ifcsdef{@glsabbrv@dispstyle@#1} + {% + \PackageError{glossaries-extra}{Abbreviation style `#1' already + defined}{}% + }% + {% + \csdef{@glsabbrv@dispstyle@setup@#1}{% + \renewcommand*{\GlsXtrPostNewAbbreviation}{}% + #2}% + \csdef{@glsabbrv@dispstyle@fmts@#1}{% + \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}% + \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}% + \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}% + \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}% + #3}% + }% +} +\newcommand*{\GlsXtrUseAbbrStyleSetup}[1]{% + \ifcsundef{@glsabbrv@dispstyle@setup@#1}% + {% + \PackageError{glossaries-extra}% + {Unknown abbreviation style definitions `#1'}{}% + }% + {% + \csname @glsabbrv@dispstyle@setup@#1\endcsname + }% +} +\newcommand*{\GlsXtrUseAbbrStyleFmts}[1]{% + \ifcsundef{@glsabbrv@dispstyle@fmts@#1}% + {% + \PackageError{glossaries-extra}% + {Unknown abbreviation style formats `#1'}{}% + }% + {% + \csname @glsabbrv@dispstyle@fmts@#1\endcsname + }% +} +\newabbreviationstyle{long-short}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstabbrvfont{\glsaccessshort{##1}})% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstabbrvfont{\glsaccessshort{##1}})% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + }% +} +\setabbreviationstyle{long-short} +\newabbreviationstyle{long-short-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsxtrfullformat{\the\glslabeltok}{}}, + sort={\the\glsshorttok},% + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short}% +} +\newabbreviationstyle{short-long}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongtok})},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% +} +\newabbreviationstyle{short-long-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsxtrfullformat{\the\glslabeltok}{}}, + sort={\the\glsshorttok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongtok})},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long}% +} +\newabbreviationstyle{footnote}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\footnote{\protect\glsfirstlongfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\footnote{\protect\glsfirstlongfont{\the\glslongpltok}}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + \protect\footnote{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + \protect\footnote{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2% + \protect\footnote{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2% + \protect\footnote{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% +} +\newabbreviationstyle{postfootnote}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\footnote{\protect\glsfirstlongfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\footnote{\protect\glsfirstlongfont{\the\glslongpltok}}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse{\glsxtrdopostpunc{\protect\footnote + {\glsfirstlongfont{\glsentrylong{\glslabel}}}}}{}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% +} +\newabbreviationstyle{short}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, + text={\protect\glsabbrvfont{\the\glsshorttok}}, + plural={\protect\glsabbrvfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\Glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\Glsaccesslongpl{##1}})% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% +} +\setabbreviationstyle[acronym]{short} +\newabbreviationstyle{short-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsextrinlinefullformat{\the\glslabeltok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, + text={\protect\glsabbrvfont{\the\glsshorttok}}, + plural={\protect\glsabbrvfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslong{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}% + (\glsfirstlongfont{\glsaccesslongpl{##1}})% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}}##2% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2% + }% +} +\newabbreviationstyle{long-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\protect\glsfirstlongfont{\the\glslongtok}}, + sort={\the\glslongtok}, + first={\protect\glsfirstlongfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, + text={\the\glslongtok}, + plural={\the\glslongpltok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}}##2\glsxtrfullsep{##1}% + (\protect\glsfirstabbrvfont{\glsaccessshort{##1}})% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}}##2\glsxtrfullsep{##1}% + (\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}}##2\glsxtrfullsep{##1}% + (\protect\glsfirstabbrvfont{\glsaccessshort{##1}})% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}}##2\glsxtrfullsep{##1}% + (\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}}##2% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}}##2% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}}##2% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}}##2% + }% +} +\newabbreviationstyle{long}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, + text={\the\glslongtok}, + plural={\the\glslongpltok},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-desc}% +} +\newcommand*{\glsxtrscfont}[1]{\textsc{#1}} +\newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}} +\newabbreviationstyle{long-short-sc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{long-short-sc-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-desc}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{short-sc-long}% +{% + \GlsXtrUseAbbrStyleSetup{short-long}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{short-sc-long-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-long-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long-desc}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{short-sc}% +{% + \GlsXtrUseAbbrStyleSetup{short}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{short-sc-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-desc}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{long-sc}% +{% + \GlsXtrUseAbbrStyleSetup{long}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{long-desc-sc}% +{% + \GlsXtrUseAbbrStyleSetup{long-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-desc}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{footnote-sc}% +{% + \GlsXtrUseAbbrStyleSetup{footnote}% +}% +{% + \GlsXtrUseAbbrStyleFmts{footnote}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newabbreviationstyle{postfootnote-sc}% +{% + \GlsXtrUseAbbrStyleSetup{postfootnote}% +}% +{% + \GlsXtrUseAbbrStyleFmts{postfootnote}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% +} +\newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} +\newcommand*{\glsxtrsmsuffix}{\glspluralsuffix} +\newabbreviationstyle{long-short-sm}% +{% + \GlsXtrUseAbbrStyleSetup{long-short}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{long-short-sm-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-desc}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{short-sm-long}% +{% + \GlsXtrUseAbbrStyleSetup{short-long}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{short-sm-long-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-long-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long-desc}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{short-sm}% +{% + \GlsXtrUseAbbrStyleSetup{short}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{short-sm-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-desc}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{long-sm}% +{% + \GlsXtrUseAbbrStyleSetup{long}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{long-desc-sm}% +{% + \GlsXtrUseAbbrStyleSetup{long-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-desc}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{footnote-sm}% +{% + \GlsXtrUseAbbrStyleSetup{footnote}% +}% +{% + \GlsXtrUseAbbrStyleFmts{footnote}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{postfootnote-sm}% +{% + \GlsXtrUseAbbrStyleSetup{postfootnote}% +}% +{% + \GlsXtrUseAbbrStyleFmts{postfootnote}% + \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% +} +\newabbreviationstyle{long-short-em}% +{% + \GlsXtrUseAbbrStyleSetup{long-short}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{long-short-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-desc}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{short-em-long}% +{% + \GlsXtrUseAbbrStyleSetup{short-long}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{short-em-long-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-long-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long-desc}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{short-em}% +{% + \GlsXtrUseAbbrStyleSetup{short}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{short-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-desc}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{long-em}% +{% + \GlsXtrUseAbbrStyleSetup{long}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{long-desc-em}% +{% + \GlsXtrUseAbbrStyleSetup{long-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-desc}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{footnote-em}% +{% + \GlsXtrUseAbbrStyleSetup{footnote}% +}% +{% + \GlsXtrUseAbbrStyleFmts{footnote}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\newabbreviationstyle{postfootnote-em}% +{% + \GlsXtrUseAbbrStyleSetup{postfootnote}% +}% +{% + \GlsXtrUseAbbrStyleFmts{postfootnote}% + \renewcommand*\glsabbrvfont[1]{\emph{##1}}% +} +\let\@glsxtr@org@markright\markright +\renewcommand*{\markright}[1]{% + \glsxtrmarkhook + \@glsxtr@org@markright{#1}% + \glsxtrrestoremarkhook +} +\let\@glsxtr@org@markboth\markboth +\renewcommand*{\markboth}[2]{% + \glsxtrmarkhook + \@glsxtr@org@markboth{#1}{#2}% + \glsxtrrestoremarkhook +} +\newcommand*{\glsxtrRevertMarks}{% + \let\markright\@glsxtr@org@markright + \let\markboth\@glsxtr@org@markboth +} +\newcommand*{\glsxtrmarkhook}{% + \let\@glsxtr@org@MakeUppercase\MakeUppercase + \let\@glsxtr@org@glsxtrtitleshort\glsxtrtitleshort + \let\@glsxtr@org@glsxtrtitleshortpl\glsxtrtitleshortpl + \let\@glsxtr@org@Glsxtrtitleshort\Glsxtrtitleshort + \let\@glsxtr@org@Glsxtrtitleshortpl\Glsxtrtitleshortpl + \let\@glsxtr@org@glsxtrtitletext\glsxtrtitletext + \let\@glsxtr@org@Glsxtrtitletext\Glsxtrtitletext + \let\@glsxtr@org@glsxtrtitleplural\glsxtrtitleplural + \let\@glsxtr@org@Glsxtrtitleplural\Glsxtrtitleplural + \let\@glsxtr@org@glsxtrtitlefirst\glsxtrtitlefirst + \let\@glsxtr@org@Glsxtrtitlefirst\Glsxtrtitlefirst + \let\@glsxtr@org@glsxtrtitlefirstplural\glsxtrtitlefirstplural + \let\@glsxtr@org@Glsxtrtitlefirstplural\Glsxtrtitlefirstplural + \let\MakeUppercase\MakeTextUppercase + \let\glsxtrtitleshort\glsxtrheadshort + \let\glsxtrtitleshortpl\glsxtrheadshortpl + \let\Glsxtrtitleshort\Glsxtrheadshort + \let\Glsxtrtitleshortpl\Glsxtrheadshortpl + \let\glsxtrtitletext\glsxtrheadtext + \let\Glsxtrtitletext\Glsxtrheadtext + \let\glsxtrtitleplural\glsxtrheadplural + \let\Glsxtrtitleplural\Glsxtrheadplural + \let\glsxtrtitlefirst\glsxtrheadfirst + \let\Glsxtrtitlefirst\Glsxtrheadfirst + \let\glsxtrtitlefirstplural\glsxtrheadfirstplural + \let\Glsxtrtitlefirstplural\Glsxtrheadfirstplural +} +\newcommand*{\glsxtrrestoremarkhook}{% + \let\MakeUppercase\@glsxtr@org@MakeUppercase + \let\glsxtrtitleshort\@glsxtr@org@glsxtrtitleshort + \let\glsxtrtitleshortpl\@glsxtr@org@glsxtrtitleshortpl + \let\Glsxtrtitleshort\@glsxtr@org@Glsxtrtitleshort + \let\Glsxtrtitleshortpl\@glsxtr@org@Glsxtrtitleshortpl + \let\glsxtrtitletext\@glsxtr@org@glsxtrtitletext + \let\Glsxtrtitletext\@glsxtr@org@Glsxtrtitletext + \let\glsxtrtitleplural\@glsxtr@org@glsxtrtitleplural + \let\Glsxtrtitleplural\@glsxtr@org@Glsxtrtitleplural + \let\glsxtrtitlefirst\@glsxtr@org@glsxtrtitlefirst + \let\Glsxtrtitlefirst\@glsxtr@org@Glsxtrtitlefirst + \let\glsxtrtitlefirstplural\@glsxtr@org@glsxtrtitlefirstplural + \let\Glsxtrtitlefirstplural\@glsxtr@org@Glsxtrtitlefirstplural +} +\newcommand*{\glsxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrshort[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitleshort}[1]{% + \glsxtrshort[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrshortpl[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitleshortpl}[1]{% + \glsxtrshort[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrshort[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitleshort}[1]{% + \Glsxtrshort[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrshortpl[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitleshortpl}[1]{% + \Glsxtrshortpl[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% + {% + \glstext[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitletext}[1]{% + \glstext[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% + {% + \Glstext[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitletext}[1]{% + \Glstext[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% + {% + \glsplural[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitleplural}[1]{% + \glsplural[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% + {% + \Glsplural[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitleplural}[1]{% + \Glsplural[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% + {% + \glsfirst[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlefirst}[1]{% + \glsfirst[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% + {% + \Glsfirst[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlefirst}[1]{% + \Glsfirst[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% + {% + \glsfirstplural[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlefirstplural}[1]{% + \glsfirstplural[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% + {% + \Glsfirstplural[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlefirstplural}[1]{% + \Glsfirstplural[noindex,hyper=false]{#1}[]% +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtshort}[1]{% + \texorpdfstring + {\glsxtrtitleshort{#1}}% + {\glsentryshort{#1}}% + } +} +{ + \newcommand*{\glsfmtshort}[1]{% + \glsxtrtitleshort{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtshortpl}[1]{% + \texorpdfstring + {\glsxtrtitleshortpl{#1}}% + {\glsentryshortpl{#1}}% + } +} +{ + \newcommand*{\glsfmtshortpl}[1]{% + \glsxtrtitleshortpl{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtshort}[1]{% + \texorpdfstring + {\Glsxtrtitleshort{#1}}% + {\glsentryshort{#1}}% + } +} +{ + \newcommand*{\Glsfmtshort}[1]{% + \Glsxtrtitleshort{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtshortpl}[1]{% + \texorpdfstring + {\Glsxtrtitleshortpl{#1}}% + {\glsentryshortpl{#1}}% + } +} +{ + \newcommand*{\Glsfmtshortpl}[1]{% + \Glsxtrtitleshortpl{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmttext}[1]{% + \texorpdfstring + {\glsxtrtitletext{#1}}% + {\glsentrytext{#1}}% + } +} +{ + \newcommand*{\glsfmttext}[1]{% + \glsxtrtitletext{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmttext}[1]{% + \texorpdfstring + {\Glsxtrtitletext{#1}}% + {\glsentrytext{#1}}% + } +} +{ + \newcommand*{\Glsfmttext}[1]{% + \Glsxtrtitletext{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtplural}[1]{% + \texorpdfstring + {\glsxtrtitleplural{#1}}% + {\glsentryplural{#1}}% + } +} +{ + \newcommand*{\glsfmtplural}[1]{% + \glsxtrtitleplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtplural}[1]{% + \texorpdfstring + {\Glsxtrtitleplural{#1}}% + {\glsentryplural{#1}}% + } +} +{ + \newcommand*{\Glsfmtplural}[1]{% + \Glsxtrtitleplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtfirst}[1]{% + \texorpdfstring + {\glsxtrtitlefirst{#1}}% + {\glsentryfirst{#1}}% + } +} +{ + \newcommand*{\glsfmtfirst}[1]{% + \glsxtrtitlefirst{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtfirst}[1]{% + \texorpdfstring + {\Glsxtrtitlefirst{#1}}% + {\glsentryfirst{#1}}% + } +} +{ + \newcommand*{\Glsfmtfirst}[1]{% + \Glsxtrtitlefirst{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtfirstpl}[1]{% + \texorpdfstring + {\glsxtrtitlefirstplural{#1}}% + {\glsentryfirstplural{#1}}% + } +} +{ + \newcommand*{\glsfmtfirstpl}[1]{% + \glsxtrtitlefirstplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtfirstpl}[1]{% + \texorpdfstring + {\Glsxtrtitlefirstplural{#1}}% + {\glsentryfirstplural{#1}}% + } +} +{ + \newcommand*{\Glsfmtfirstpl}[1]{% + \Glsxtrtitlefirstplural{#1}} +} +\newcommand*{\RequireGlossariesExtraLang}[1]{% + \@ifundefined{ver@glossariesxtr-#1.ldf}{\input{glossariesxtr-#1.ldf}}{}% +} +\newcommand*{\ProvidesGlossariesExtraLang}[1]{% + \ProvidesFile{glossariesxtr-#1.ldf}% +} +\@ifpackageloaded{tracklang} +{% + \AnyTrackedLanguages + {% + \ForEachTrackedDialect{\this@dialect}{% + \IfTrackedLanguageFileExists{\this@dialect}% + {glossariesxtr-}% prefix + {.ldf}% + {% + \RequireGlossariesExtraLang{\CurrentTrackedTag}% + }% + {% + }% + }% + }% + {}% +} +{} +\endinput +%% +%% End of file `glossaries-extra.sty'. |