% This document takes a *long* time to compile from scratch. See
% notes below.
%
% arara: lualatex if missing("glstex")
% arara: bib2gls: { group: on, packages: [ mfirstuc-english ] } if missing("glstex")
% arara: lualatex: { shell: yes }
% arara: bib2gls: { group: on, packages: [ mfirstuc-english ] }
% arara: lualatex
% arara: lualatex if found("log", "Rerun to get")
%
% This manual creates example documents on the fly in the 
% directory created by the following line:
\directlua{os.execute("mkdir -p glossaries-extra-manual-examples")}
% If the above doesn't work, you'll have to create the directory
% manually.

% If the shell escape is enabled the example documents will be
% automatically built with arara. If you already have the example .tex and
% .pdf files in the above directory, the shell escape isn't
% required. You'll need to run pdfcrop on the example pdf files if
% you don't have the *-crop.pdf files. If you only have the .tex
% files in the examples directory, then you need to run arara on
% each .tex file (which will call pdfcrop where applicable).
%
% This document requires glossaries-extra v1.49, bib2gls v3.0
% and nlctuserguide.sty. Some of the example documents require
% glossaries v4.50 and mfirstuc v2.08. If they haven't already 
% been uploaded to CTAN, they will be shortly.

\documentclass[titlepage=false,oneside,
 fontsize=12pt,captions=tableheading]{scrbook}

%\usepackage[autooneside=false]{scrlayer-scrpage}

\usepackage{relsize}
\usepackage{mfirstuc-english}
\usepackage[
   deephierarchy,
   numberedsection,
   abbreviations,
   tikzsymbols,
   indexmarks,
   novref,
   %debug=showwrgloss,
   %showtargets=annoteleft
 ]{nlctuserguide}

\hypersetup{pdfauthor={Nicola Talbot},
 pdftitle={glossaries-extra manual},
 bookmarksdepth=5}

\tcbuselibrary{hooks}
\tcbset{floatplacement=htbp}

\renewcommand*{\thispackagename}{glossaries-extra}
\renewcommand{\cmdnotefmt}[1]{}
\renewcommand*{\summarynotefmt}[1]{{\small(#1)}}

\appto\terminaldesc{. See also
\qt{\dickimawhref{latex/buildglossaries}{Incorporating
makeglossaries or makeglossaries-lite or bib2gls into the document
build}}}

\newfontfamily\noto{Noto Serif}
\newcommand{\textnoto}[1]{{\noto #1}}

\providecommand{\eth}{\char"00F0}
\providecommand{\Eth}{\char"00D0}
\providecommand{\thorn}{\char"00FE}
\providecommand{\Thorn}{\char"00DE}
\providecommand{\wynn}{\char"01BF}
\providecommand{\Wynn}{\char"01F7}
\newcommand{\insularg}{\textnoto{\char"1D79}}
\newcommand{\InsularG}{\textnoto{\char"A77D}}
\providecommand{\longs}{\char"017F}
\providecommand{\Schwa}{\char"018F}
\providecommand{\schwa}{\char"0259}

\newcommand{\attr}{\idxc{categoryattribute}{attribute}}
\newcommand{\attrs}{\idxc{categoryattribute}{attributes}}
\newcommand{\location}{\idxc{entrylocation}{location}}
\newcommand{\locations}{\idxc{entrylocation}{locations}}
\newcommand{\encap}[2][]{{\let\csfmt\csfmtcolourfont\gls[#1]{#2}}}
\newcommand{\indexed}{\idxc{indexing}{indexed}}
\newcommand{\recorded}{\idxc{indexing}{recorded}}
\newcommand{\record}{\idxc{indexing}{record}}
\newcommand{\records}{\idxc{indexing}{records}}
\newcommand{\atentry}[1]{\texorpdfstring{\code{@#1}}{@#1}}
\newcommand{\thecounter}[1]{\glslink{thecounter}{\csfmt{the\-#1}}}
\newcommand{\theHcounter}[1]{\glslink{theHcounter}{\csfmt{the\-H\-#1}}}
\newcommand{\thecountername}{\glslink{thecounter}{\csfmt{the\-\meta{counter-name}}}}
\newcommand{\theHcountername}{\glslink{theHcounter}{\csfmt{the\-\meta{counter-name}}}}
\newcommand{\recordcounterfield}[1]{%
 \glslink{opt.glosfield.recordcount.counter}{\csoptfmt{record\-count\dfullstop#1}}}
\newcommand{\recordcounterlocationfield}[2]{%
 \glslink{opt.glosfield.recordcount.counter.location}{\csoptfmt{record\-count\dfullstop#1\dfullstop#2}}}

\newcommand{\bibglsswitchopt}[1]{\glslink{switch.#1}{\optfmt{#1}}}
\newcommand{\bibglsswitchoptval}[2]{\bibglsswitchopt{#1}\dequals#2}
\newcommand{\bibglsswitchoptvalm}[2]{\bibglsswitchoptval{#1}{\marg{#2}}}
\newcommand{\bibglsswitchoptfalse}[1]{\glslink{switch.no-#1}{\optfmt{#1}}\dequals false}

\MFUhyphentrue
\setabbreviationstyle[termacronym]{short-sm-desc}

\glsxtrnewgls{opt.printgloss.}{\printglossopt}
\newcommand{\printglossoptval}[2]{\optval{printgloss.#1}{#2}}
\newcommand{\printglossoptvalm}[2]{\optval{printgloss.#1}{\marg{#2}}}

\glsxtrnewgls{opt.printunsrttab.}{\glstableopt}
\newcommand{\glstableoptval}[2]{\optval{printunsrttab.#1}{#2}}
\newcommand{\glstableoptvalm}[2]{\optval{printunsrttab.#1}{\marg{#2}}}
\glsxtrnewgls{optval.printunsrttab.block-style.}{\glstableblockstyle}
\newcommand{\glstableblockstyledef}[1]{\optionvaldef{printunsrttab.block-style}{#1}}

\glsxtrnewgls{opt.glsopt.}{\glsopt}
\newcommand{\glsoptval}[2]{\optval{glsopt.#1}{#2}}
\glsxtrnewgls{opt.mglsopt.}{\mglsopt}
\newcommand{\mglsoptval}[2]{\optval{mglsopt.#1}{#2}}
\newcommand{\mglsoptvalm}[2]{\optvalm{mglsopt.#1}{#2}}
\glsxtrnewgls{opt.gloskey.}{\gloskey}
\newcommand{\gloskeyval}[2]{\optval{gloskey.#1}{\marg{#2}}}
\glsxtrnewgls{opt.glosfield.}{\glosfield}
\newcommand{\glosfielddisp}[3][]{\glsdisp[#1]{opt.glosfield.#2}{\csoptfmt{#3}}}
\glsxtrnewgls{opt.cat.}{\cat}
\glsxtrnewgls{opt.catattr.}{\catattr}
\glsxtrnewgls{opt.resource.}{\resourceopt}
\newcommand{\resourceoptval}[2]{\optval{resource.#1}{#2}}
\newcommand{\resourceoptvalm}[2]{\optval{resource.#1}{\marg{#2}}}

\glsxtrnewgls{opt.glostyle.}{\glostyle}
\glsxtrnewgls{opt.abbrstyle.}{\abbrstyle}
\glsxtrnewgls{opt.acrstyle.}{\acrstyle}

\newcommand*{\abbrstyledef}[1]{\optiondef{abbrstyle.#1}}

\defsemanticcmd[style1]{\fieldfmt}{\texttt}{}
\defsemanticcmd[style2]{\entryfmt}{\texttt}{}
\newcommand*{\atentryfmt}[1]{\entryfmt{@#1}}

\defsemanticcmd{\acrstylefmt}{\textsf}{}
\defsemanticcmd[style3]{\abbrstylefmt}{\textsf}{}
\defsemanticcmd{\glostylefmt}{\textsf}{}
\defsemanticcmd[style4]{\catattrfmt}{\textsf}{}

\newcommand*{\catfmt}{\csoptfmt}

\newcommand{\hierarchical}{\glslink{hierarchicallevel}{hierarchical}}

\renewcommand{\nlctuserguidecustomentryaliases}{%
   glossarystyle=index,
   abbreviationstyle=index,
   acronymstyle=index,
}

\appto{\nlctexampledisablecmds}{%
 \letcs{\opt}{@firstofone}%
 \letcs{\cat}{@firstofone}%
 \letcs{\catattr}{@firstofone}%
 \letcs{\resourceopt}{@firstofone}%
 \letcs{\abbrstyle}{@firstofone}%
 \letcs{\glostyle}{@firstofone}%
 \letcs{\glsopt}{@firstofone}%
 \letcs{\mglsopt}{@firstofone}%
 \letcs{\gloskey}{@firstofone}%
 \letcs{\glosfield}{@firstofone}%
 \letcs{\printglossopt}{@firstofone}%
 \let\resourceoptval\keyeqvalue
 \let\resourceoptvalm\keyeqvaluem
 \let\optval\keyeqvalue
 \let\opteqvalref\keyeqvalue
 \let\gloskeyval\keyeqvaluem
 \let\glsoptval\keyeqvaluem
 \let\mglsoptval\keyeqvaluem
 \let\printglossoptval\keyeqvalue
 \let\printglossoptvalm\keyeqvaluem
}

\newcommand{\genabbrvstyleexamplecode}[6]{%
\gls{setabbreviationstyle}\allowbreak\marg{\abbrstyle{#2}}
\codepar
#6\gls{newabbreviation}#4\marg{ex}\marg{#3}\marg{long form}
\codepar
\cbeg{document}\nl
First: \gls{gls}\marg{ex}[-insert]. Next: \gls{gls}\marg{ex}\oargnobr{-insert}.\nl
Full: \gls{glsxtrfull}\marg{ex}\oargnobr{-insert}.\nl
First plural: \gls{glspl}\oargnobr{\glsopt{prereset}}\marg{ex}\oargnobr{-insert}.\nl
First no insert: \gls{gls}\oargnobr{\glsopt{prereset}}\marg{ex}.\nl
\gls{printunsrtglossaries}\nl
\cend{document}
}

\newcommand{\genabbrvstyleexampleresult}[6]{%
\createexample*[fontsize={20},title={The \optfmt{#2} abbreviation style},
 description={Example document demonstrating the #2 abbreviation style},
 label={ex:abbrvstyle#2},#1]
{%
  #5\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J%
  \cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
  \cmd{usepackage}\marg{glossaries-extra}^^J%
  #6\gls{setabbreviationstyle}\marg{#2}^^J%
  \gls{newabbreviation}#4\marg{ex}\marg{#3}\marg{long form}
}
{%
First: \gls{gls}\marg{ex}[-insert]. Next: \gls{gls}\marg{ex}[-insert].^^J%
Full: \gls{glsxtrfull}\marg{ex}[-insert].
First plural: \gls{glspl}\oarg{prereset}\marg{ex}[-insert].^^J%
First no insert: \gls{gls}\oarg{prereset}\marg{ex}.^^J%
\gls{printunsrtglossaries}
}
}

\newcommand{\genabbrvstyleexampleside}[6]{%
\begin{coderesult}[before upper app=\small]
\genabbrvstyleexamplecode{#1}{#2}{#3}{#4}{#5}{#6}%
\tcblower
\genabbrvstyleexampleresult{#1}{#2}{#3}{#4}{#5}{#6}%
\end{coderesult}%
}

\newcommand{\genabbrvstyleexamplestack}[6]{%
\begin{codebox}
\genabbrvstyleexamplecode{#1}{#2}{#3}{#4}{#5}{#6}%
\end{codebox}
\begin{resultbox}
\genabbrvstyleexampleresult{fontsize={11},#1}{#2}{#3}{#4}{#5}{#6}%
\end{resultbox}%
}

\newcommand*{\abbrvstyleexampleucfn}[2][]{%
  \genabbrvstyleexampleside{#1}{#2}{SHRT FM}{}{}{}%
}

\newcommand*{\abbrvstyleexampleucdescfn}[2][]{%
  \genabbrvstyleexampleside{#1}{#2}{SHRT FM}%
   {\oarg{\gloskeyval{description}{sample description}}\newline}%
   {}{}%
}

\newcommand*{\abbrvstyleexamplelcfn}[2][]{%
  \genabbrvstyleexampleside{#1}{#2}{shrt fm}{}{}{}%
}

\newcommand*{\abbrvstyleexamplelcdescfn}[2][]{%
  \genabbrvstyleexampleside{#1}{#2}{shrt fm}%
    {\oarg{\gloskeyval{description}{sample description}}\newline}%
    {}{}%
}

\newcommand*{\abbrvstyleexamplesmfn}[2][]{%
  \genabbrvstyleexampleside{#1}{#2}{SHRT FM}{}%
  {^^J\cmd{usepackage}\marg{relsize}}{}%
}

\newcommand*{\abbrvstyleexamplesmdescfn}[2][]{%
  \genabbrvstyleexampleside{#1}{#2}{SHRT FM}%
  {\oarg{\gloskeyval{description}{sample description}}\newline}%
  {^^J\cmd{usepackage}\marg{relsize}}{}%
}

\newcommand*{\abbrvstyleexampleuc}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}{}{}{}%
}

\newcommand*{\abbrvstyleexamplelc}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{shrt fm}{}{}{}%
}

\newcommand*{\abbrvstyleexamplesm}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}{}%
  {^^J\cmd{usepackage}\marg{relsize}}{}%
}

\newcommand*{\abbrvstyleexampleucdesc}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}%
   {\oarg{\gloskeyval{description}{sample description}}\nl}%
   {}{}%
}

\newcommand*{\abbrvstyleexamplelcdesc}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{shrt fm}%
    {\oarg{\gloskeyval{description}{sample description}}\nl}%
    {}{}%
}

\newcommand*{\abbrvstyleexamplesmdesc}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}%
  {\oarg{\gloskeyval{description}{sample description}}\nl}%
  {^^J\cmd{usepackage}\marg{relsize}}{}%
}

\newcommand*{\abbrvstyleexamplelcuser}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{shrt fm}%
   {\oarg{\gloskeyval{user1}{extra info}}}%
   {}{}%
}

\newcommand*{\abbrvstyleexampleucuser}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}%
   {\oarg{\gloskeyval{user1}{extra info}}}%
   {}{}%
}

\newcommand*{\abbrvstyleexamplelcuserdesc}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{shrt fm}%
   {\oarg{\gloskeyval{description}{sample description},\nlsp
    \gloskeyval{user1}{extra info}}}{}{}%
}

\newcommand*{\abbrvstyleexampleucuserdesc}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}%
   {\oarg{\gloskeyval{description}{sample description},\nlsp
    \gloskeyval{user1}{extra info}}}{}{}%
}

\newcommand*{\abbrvstyleexampleuchyp}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}%
   {}%
   {}{\gls{glssetcategoryattributes}\marg{\cat{abbreviation}}\nlsp
    \marg{\catattr{markwords},\catattr{markshortwords}}\marg{true}\nl}%
}

\newcommand*{\abbrvstyleexampleuchypdesc}[2][]{%
  \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}%
   {\oarg{\gloskeyval{description}{sample description}}\nl}%
   {}%
   {%
     \gls{glssetcategoryattributes}\marg{\cat{abbreviation}}\nlsp
       \marg{\catattr{markwords},\catattr{markshortwords}}\marg{true}\nl
   }%
}

\newcommand{\summaryentryglossarystyle}[1]{%
 {%
   \renewcommand*{\glostylefmt}[1]{\texttt{##1}}%
   \genericsummaryentryoption{#1}%
 }%
}

\newcommand{\summaryentryabbreviationstyle}[1]{%
 {%
   \renewcommand*{\abbrstylefmt}[1]{\texttt{##1}}%
   \genericsummaryentryoption{#1}%
 }%
}

\renewcommand{\nlctuserguideletterrules}{%
 \glsxtrGeneralLatinAtoGrules
 \string<glo,Glo,GLO\string<gls,Gls,GLS\string<glsxtr,Glsxtr,GlsXtr,GLSxtr,GLSXTR
 \glsxtrGeneralLatinHtoMrules
 \glsxtrGeneralLatinNtoZrules
}

\nlctuserguidegls[selection=all]
{
  \gmod{star}{\common\name{\texttt{*} (modifier)}\field{text}{*}
    \field{see}{GlsXtrSetStarModifier}}%
  \gmod{plus}{\common\name{\texttt{+} (modifier)}\field{text}{+}
    \field{see}{GlsXtrSetPlusModifier}}%
  \gmod{alt-mod}{\common\name{\meta{alt-mod} (modifier)}\field{text}{\meta{alt-mod}}
    \field{see}{GlsXtrSetAltModifier}}%
  \def\gcmdspa#1#2{\glsbibwriteentry{command}{#1}{\field{name}{\csfmt{#1}}\field{modifiers}{star,plus,alt-mod}#2}}%
  \def\gprintglossopt#1#2{%
   \glsbibwriteentry{commandoption}{opt.printgloss.#1}{%
    \field{name}{\csoptfmt{#1}}\parent{idx.printglossopt}#2}}%
  \def\gprintunsrttableopt#1#2{%
   \glsbibwriteentry{commandoption}{opt.printunsrttab.#1}{%
    \parent{printunsrttable}%
    \field{name}{\csoptfmt{#1}}#2}}%
  \def\gtableblockstyle#1#2{%
   \glsbibwriteentry{commandoption}{optval.printunsrttab.block-style.#1}{%
    \parent{opt.printunsrttab.block-style}%
    \field{name}{\optfmt{#1}}#2}}%
  \def\gglsopt#1#2{%
   \glsbibwriteentry{commandoption}{opt.glsopt.#1}{%
    \field{name}{\csoptfmt{#1}}\parent{idx.glsopt}#2}}%
  \def\gmglsopt#1#2{%
   \glsbibwriteentry{commandoption}{opt.mglsopt.#1}{%
    \field{name}{\csoptfmt{#1}}\parent{idx.mglsopt}#2}}%
  \def\ggloskey#1#2{%
   \glsbibwriteentry{commandoption}{opt.gloskey.#1}{%
    \field{name}{\csoptfmt{#1}}\parent{idx.gloskey}#2}}%
  \def\gglosfield#1#2{%
   \glsbibwriteentry{commandoption}{opt.glosfield.#1}{%
    \field{name}{\csoptfmt{#1}}\parent{idx.glosfield}#2}}%
  \def\gcat#1#2{%
   \glsbibwriteentry{optionvalue}{opt.cat.#1}{%
    \field{name}{\catfmt{#1}}\parent{idx.category}#2}}%
  \def\gcatattr#1#2{%
   \glsbibwriteentry{optionvalue}{opt.catattr.#1}{%
    \field{name}{\csoptfmt{#1}}\parent{idx.categoryattribute}#2}}%
  \def\gglosty#1#2{\glsbibwriteentry{glossarystyle}{opt.glostyle.#1}%
    {\field{name}{\glostylefmt{#1}}\parent{idx.glossarystyle}#2}}%
  \def\gabbrsty#1#2{\glsbibwriteentry{abbreviationstyle}{opt.abbrstyle.#1}%
    {\field{name}{\abbrstylefmt{#1}}\parent{idx.abbrvstyle}#2}}%
  \def\gabbrstyalias#1#2{\gabbrsty{#1}{\field{alias}{opt.abbrstyle.#2}}}%
  \def\gdepabbrsty#1#2{\gabbrsty{#1}{\deprecated\field{alias}{opt.abbrstyle.#2}}}%
  \def\gacrsty#1#2{\glsbibwriteentry{acronymstyle}{opt.acrstyle.#1}%
    {\field{name}{\acrstylefmt{#1}}\parent{idx.acronymstyle}#2}}%
  \def\gresourceopt#1#2{%
   \glsbibwriteentry{commandoption}{opt.resource.#1}{%
    \field{name}{\csoptfmt{#1}}\parent{idx.resourceopt}#2}}%
  % sample files:
  \gidx{samplefile}{\name{sample files}\field{text}{sample file}}%
  \gfile{sample.tex}{}% file: sample.tex
  \gfile{sample\dhyphen abbr\dhyphen styles.tex}{}% file: sample-abbr-styles.tex
  \gfile{sample\dhyphen mix\-ture.tex}{}% file: sample-mixture.tex
  \gfile{sample\dhyphen name\dhyphen font.tex}{}% file: sample-name-font.tex
  \gfile{sample\dhyphen abbrv.tex}{}% file: sample-abbrv.tex
  \gfile{sample\dhyphen acronym.tex}{}% file: sample-acronym.tex
  \gfile{sample\dhyphen acronym\dhyphen desc.tex}{}% file: sample-acronym-desc.tex
  \gfile{sample\dhyphen cross\-ref.tex}{}% file: sample-crossref.tex
  \gfile{sample\dhyphen index\-hook.tex}{}% file: sample-indexhook.tex
  \gfile{sample\dhyphen foot\-note.tex}{}% file: sample-footnote.tex
  \gfile{sample\dhyphen un\-def.tex}{}% file: sample-undef.tex
  \gfile{sample\dhyphen mixed\dhyphen abbrv\dhyphen styles.tex}{}% file: sample-mixed-abbrv-styles.tex
  \gfile{sample\dhyphen initialisms.tex}{}% file: sample-initialisms.tex
  \gfile{sample\dhyphen post\-dot.tex}{}% file: sample-postdot.tex
  \gfile{sample\dhyphen post\-link.tex}{}% file: sample-postlink.tex
  \gfile{sample\dhyphen head\-er.tex}{}% file: sample-header.tex
  \gfile{sample\dhyphen auto\-index.tex}{}% file: sample-autoindex.tex
  \gfile{sample\dhyphen auto\-index\dhyphen hyp.tex}{}% file: sample-autoindex-hyp.tex
  \gfile{sample\dhyphen nest\-ed.tex}{}% file: sample-nested.tex
  \gfile{sample\dhyphen en\-try\-count.tex}{}% file: sample-entrycount.tex
  \gfile{sample\dhyphen unit\-en\-try\-count.tex}{}% file: sample-unitentrycount.tex
  \gfile{sample\dhyphen one\-link.tex}{}% file: sample-onelink.tex
  \gfile{sample\dhyphen link\-count.tex}{}% file: sample-linkcount.tex
  \gfile{sample\dhyphen pages.tex}{}% file: sample-pages.tex
  \gfile{sample\dhyphen alt\-mod\-i\-fier.tex}{}% file: sample-altmodifier.tex
  \gfile{sample\dhyphen mix\-ed\-sort.tex}{}% file: sample-mixedsort.tex
  \gfile{sample\dhyphen ext\-er\-nal.tex}{}% file: sample-external.tex
  \gfile{sample\dhyphen fmt.tex}{}% file: sample-fmt.tex
  \gfile{sample\dhyphen alias.tex}{}% file: sample-alias.tex
  \gfile{sample\dhyphen alt\-tree.tex}{}% file: sample-alttree.tex
  \gfile{sample\dhyphen alt\-tree\dhyphen sym.tex}{}% file: sample-alttree-sym.tex
  \gfile{sample\dhyphen alt\-tree\dhyphen mar\-gin\-par.tex}{}% file: sample-alttree-marginpar.tex
  \gfile{sample\dhyphen on\-the\-fly.tex}{}% file: sample-onthefly.tex
  \gfile{sample\dhyphen on\-the\-fly\dhyphen xetex.tex}{}% file: sample-onthefly-xetex.tex
  \gfile{sample\dhyphen on\-the\-fly\dhyphen utf8.tex}{}% file: sample-onthefly-utf8.tex
  \gfile{sample\dhyphen acc\-supp.tex}{}% file: sample-accsupp.tex
  \gfile{sample\dhyphen pre\-fix.tex}{}% file: sample-prefix.tex
  \gfile{sample\dhyphen suppl.tex}{}% file: sample-suppl.tex
  \gfile{sample\dhyphen suppl\dhyphen main.tex}{}% file: sample-suppl-main.tex
  \gfile{sample\dhyphen suppl\dhyphen hyp.tex}{}% file: sample-suppl-hyp.tex
  \gfile{sample\dhyphen suppl\dhyphen main\dhyphen hyp.tex}{}% file: sample-suppl-main-hyp.tex
  % example files with dummy entries for testing
  % example-glossaries-xr.tex
  \gfile{example\dhyphen glos\-saries\dhyphen xr.tex}%
   {\providedby{\sty{glossaries-extra} v1.16+}}%
  % example-glossaries-xr.bib
  \gfile{example\dhyphen glos\-saries\dhyphen xr.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-symbolsnames.bib
  \gfile{example\dhyphen glos\-saries\dhyphen symbolsnames.bib}%
   {\providedby{\sty{glossaries-extra} v1.39+}}%
   % example-glossaries-acronym-desc.bib
  \gfile{example\dhyphen glos\-saries\dhyphen acronym\dhyphen desc.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
   % example-glossaries-longchild.bib
  \gfile{example\dhyphen glos\-saries\dhyphen longchild.bib}%
  {\providedby{\sty{glossaries-extra} v1.19+}}%
   % example-glossaries-acronyms-lang.bib
  \gfile{example\dhyphen glos\-saries\dhyphen acronyms\dhyphen lang.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-long.bib
  \gfile{example\dhyphen glos\-saries\dhyphen long.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-acronym.bib
  \gfile{example\dhyphen glos\-saries\dhyphen acronym.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-multipar.bib
  \gfile{example\dhyphen glossaries\dhyphen multipar.bib}%
   {\providedby{\sty{glos\-saries-extra} v1.19+}}%
  % example-glossaries-brief.bib
  \gfile{example\dhyphen glos\-saries\dhyphen brief.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-utf8.bib
  \gfile{example\dhyphen glos\-saries\dhyphen utf8.bib}%
   {\providedby{\sty{glossaries-extra} v1.53+}}%
  % example-glossaries-parent.bib
  \gfile{example\dhyphen glos\-saries\dhyphen parent.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-childmultipar.bib
  \gfile{example\dhyphen glos\-saries\dhyphen childmultipar.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-symbolnames.bib
  \gfile{example\dhyphen glos\-saries\dhyphen symbolnames.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-childnoname.bib
  \gfile{example\dhyphen glos\-saries\dhyphen childnoname.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-symbols.bib
  \gfile{example\dhyphen glos\-saries\dhyphen symbols.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-cite.bib
  \gfile{example\dhyphen glos\-saries\dhyphen cite.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-url.bib
  \gfile{example\dhyphen glos\-saries\dhyphen url.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-images.bib
  \gfile{example\dhyphen glos\-saries\dhyphen images.bib}%
   {\providedby{\sty{glossaries-extra} v1.19+}}%
  % example-glossaries-user.bib
  \gfile{example\dhyphen glos\-saries\dhyphen user.bib}%
   {\providedby{\sty{glossaries-extra} v1.50+}}%
  % example-glossaries-constants.bib
  \gfile{example\dhyphen glos\-saries\dhyphen constants.bib}%
   {\providedby{\sty{glossaries-extra} v1.6+}}%
  % packages:
  \gpkg{glos\-saries}% glossaries.sty
  {%
    \common
    \syntax{\meta{options}}%
    \note{automatically loaded with 
    \code{\csfmt{usepackage}\marg{glossaries-extra}}}
    \desc{base package. When loaded implicitly with
     \sty{glossaries-extra}, any relevant options will be passed to the
     base \sty{glossaries} package}
  }
  \gpkg{glos\-saries\dhyphen extra}% glossaries-extra.sty
  {%
    \common
    \syntax{\meta{options}}%
    \desc{extension package that loads \sty{glossaries}, provides
      additional commands, and modifies some of the base
      \sty{glossaries} commands to integrate them with the new
      commands or to make them more flexible}
  }
  \gpkg{glos\-saries\dhyphen extra\dhyphen style\-mods}% glossaries-extra-stylemods.sty
  {%
    \syntax{\meta{options}}%
    \note{or \code{\csfmt{usepackage}[\optval{stylemods}{\meta{options}}]\marg{glossaries-extra}}}
    \desc{modifies the \idxpl{glossarystyle} supplied with the base \sty{glossaries}
      package to make them more flexible and to integrate support
     for features provided by \sty{glossaries-extra} or \app{bib2gls}}
  }
  % glossaries-extra-bib2gls.sty
  \gpkg{glos\-saries\dhyphen extra\dhyphen bib\-2\-gls}%
  {%
    \note{automatically loaded with
     \code{\csfmt{usepackage}[\opt{record}]\marg{glossaries-extra}}
     or
     \code{\csfmt{usepackage}[\opteqvalref{record}{nameref}]\marg{glossaries-extra}}}%
    \desc{provides additional commands that may be used with
    \app{bib2gls}}
  }
  % glossaries-prefix.sty
  \gpkg{glos\-saries\dhyphen pre\-fix}%
  {%
    \syntax{\meta{options}}%
    \note{automatically loaded with 
    \code{\csfmt{usepackage}[\opt{prefix}]\marg{glossaries-extra}}}
    \desc{provides additional keys and commands to associated
    prefixes with \idx{glossary} entries. If loaded on its own, it will
    automatically load \sty{glossaries} with the given options}
  }
  % glossaries-accsupp.sty
  \gpkg{glos\-saries\dhyphen acc\-supp}%
  {%
    \syntax{\meta{options}}%
    \note{automatically loaded with 
    \code{\csfmt{usepackage}[\opt{accsupp}]\marg{glossaries-extra}}}
    \desc{provides additional keys and commands to make it easier to
    integrate accessibility support into \idx{glossary} entry definitions. 
    If loaded on its own, it will automatically load \sty{glossaries} 
    with the given options}
  }
  % glossaries-hypernav.sty
  \gpkg{glos\-sary\dhyphen hyper\-nav}%
  {%
    \note{automatically loaded with \code{\csfmt{usepackage}\marg{glossaries}}}
    \desc{provides support for \idxpl{glossarystyle}, such as \glostyle{listhypergroup}}
  }
  % glossaries-list.sty
  \gpkg{glos\-sary\dhyphen list}%
  {%
    \note{automatically loaded with \code{\csfmt{usepackage}\marg{glossaries}}}
    \desc{provides list-like \idxpl{glossarystyle}, such as
    \glostyle{list}. These styles are patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-tree.sty
  \gpkg{glos\-sary\dhyphen tree}%
  {%
    \note{automatically loaded with \code{\csfmt{usepackage}\marg{glossaries}}}
    \desc{provides \hierarchical\ index or tree-like \idxpl{glossarystyle}, such as
    \glostyle{index} and \glostyle{tree}. 
    These styles are patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-mcols.sty
  \gpkg{glos\-sary\dhyphen mcols}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\opt{stylemods}\dequals mcols]\marg{glossaries-extra}}}
    \desc{provides multicolumn \hierarchical\ index and tree-like 
    \idxpl{glossarystyle},
    such as \glostyle{mcolindex} and \glostyle{mcoltree}. This package
    automatically loads \sty{glossary-tree} and \sty{multicol}.
    These styles are patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-inline.sty
  \gpkg{glos\-sary\dhyphen in\-line}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\optval{stylemods}{inline}]\marg{glossaries-extra}}}
    \desc{provides the \glostyle{inline} \idx{glossarystyle}. 
    This style is patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-long.sty
  \gpkg{glos\-sary\dhyphen long}%
  {%
    \note{automatically loaded with \code{\csfmt{usepackage}\marg{glossaries}}}
    \desc{provides tabular-like \idxpl{glossarystyle}, such as
    \glostyle{long} that use the \sty{longtable} package.
    These styles are patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-longbooktabs.sty
  \gpkg{glos\-sary\dhyphen long\-book\-tabs}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\optval{stylemods}{longbooktabs}]\marg{glossaries-extra}}}
    \desc{provides tabular-like \idxpl{glossarystyle}, such as
    \glostyle{long\dhyphen booktabs} that use the \sty{longtable} package with
    the \sty{booktabs} package to provide horizontal rules.
    These styles are patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-longragged.sty
  \gpkg{glos\-sary\dhyphen long\-ragged}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\optval{stylemods}{longragged}]\marg{glossaries-extra}}}
    \desc{provides tabular-like \idxpl{glossarystyle}, such as
    \glostyle{longragged} that use the \sty{longtable} package with
    the \sty{array} package to left-justify the description column.
    These styles are patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-super.sty
  \gpkg{glos\-sary\dhyphen super}%
  {%
    \note{automatically loaded with \code{\csfmt{usepackage}\marg{glossaries}}}
    \desc{provides tabular-like \idxpl{glossarystyle}, such as
    \glostyle{super} that use the \sty{supertabular} package.
    These styles are patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-superragged.sty
  \gpkg{glos\-sary\dhyphen super\-ragged}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\optval{stylemods}{superragged}]\marg{glossaries-extra}}}
    \desc{provides tabular-like \idxpl{glossarystyle}, such as
    \glostyle{superragged} that use the \sty{supertabular} package with
    the \sty{array} package to left-justify the description column.
    These styles are patched by \sty{glossaries-extra-stylemods}}
  }
  % glossaries-bookindex.sty
  \gpkg{glos\-sary\dhyphen book\-index}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\optval{stylemods}{bookindex}]\marg{glossaries-extra}}}
    \desc{provides the \glostyle{bookindex} \idx{glossarystyle}, which
     doesn't show descriptions. This package is distributed with
     \sty{glossaries-extra}}
  }
  % glossaries-longextra.sty
  \gpkg{glos\-sary\dhyphen long\-extra}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\optval{stylemods}{longextra}]\marg{glossaries-extra}}}
    \desc{provides more flexible tabular-like \idxpl{glossarystyle}, such
     as \glostyle{long-name-desc}. This package is distributed with
     \sty{glossaries-extra} and automatically loads
     \sty{glossary-longbooktabs}}
  }
  % glossaries-topic.sty
  \gpkg{glos\-sary\dhyphen topic}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\optval{stylemods}{topic}]\marg{glossaries-extra}}}
    \desc{provides the \hierarchical\ \glostyle{topic} and \glostyle{topicmcols}
     \idxpl{glossarystyle}. This package is distributed with
     \sty{glossaries-extra} and automatically loads \sty{multicol}}
  }
  % glossaries-table.sty
  \gpkg{glos\-sary\dhyphen table}%
  {%
    \note{load explicitly or with 
    \code{\csfmt{usepackage}[\optval{stylemods}{table}]\marg{glossaries-extra}}}
    \desc{provides \gls{printunsrttable} and its custom style.
     This package is distributed with
     \sty{glossaries-extra} and automatically loads
     \sty{glossary-longbooktabs}}
  }
  % OTHER PACKAGES:
  \gpkg{long\-table}{}% longtable.sty
  \gpkg{super\-tabular}{}% supertabular.sty
  \gpkg{array}{}% array.sty
  \gpkg{book\-tabs}{}% booktabs.sty
  \gpkg{multi\-col}{}% multicol.sty
  \gpkg{babel}{}% babel.sty
  \gpkg{poly\-glossia}{}% polyglossia.sty
  \gpkg{translator}{}% translator.sty
  \gcls{memoir}{}% memoir.cls
  \gcls{beamer}{}% beamer.cls
  \gpkg{hyper\-ref}{}% hyperref.sty
  \gpkg{get\-title\-string}{}% gettitlestring
  \gpkg{name\-ref}{}% nameref
  \gpkg{ams\-math}{}% amsmath.sty
  \gpkg{etool\-box}{}% etoolbox.sty
  \gpkg{soul}{}% soul.sty
  \gpkg{input\-enc}{}% inputenc.sty
  \gpkg{font\-enc}{}% fontenc.sty
  \gpkg{rel\-size}{}% relsize.sty
  \gpkg{acc\-supp}{}% accsupp.sty
  \gpkg{text\-case}{}% textcase.sty
  \gpkg{up\-greek}{}% upgreek.sty
  \gpkg{title\-string}{}% titlestring.sty
  \gpkg{xfor}{}% xfor.sty
  \gpkg{fancy\-hdr}{}% fancyhdr.sty
  % mfirstuc package
  \gpkg{mfirst\-uc}{}% mfirstuc.sty
  % \makefirstuc
  \gcmd{make\-first\-uc}%
  {%
    \syntax{\margm{text}}
    \providedby{\sty{mfirstuc}}
    \desc{robust command that converts the first character of \meta{text} to
    \idx{uppercase}\glsadd{idx.sentencecase} unless \meta{text}
    starts with a command, in which case it will attempt to apply
    the \idx{casechange} to the first character of the first
    argument following the command, if the command is followed by a
    group. As from  \sty{mfirstuc} v2.08, this command internally
    uses \gls{MFUsentencecase} to perform the actual case-change. 
    See the \sty{mfirstuc} documentation for further details, either:
    \texdocref{mfirstuc} or visit \ctanpkg{mfirstuc}}
  }
  % \MFUsentencecase
  \gcmd{MFU\-sentence\-case}%
  {%
    \syntax{\margm{text}}
    \providedby{\sty{mfirstuc} v2.08+}
    \desc{fully expands \meta{text} and converts the first letter to
    \idx{uppercase}\glsadd{idx.sentencecase}. Unlike
    \gls{makefirstuc}, this command is expandable, but only
    recognises commands identified as exclusions. See the
    \sty{mfirstuc} documentation for further details. This command
    is provided by \sty{glossaries-extra} v1.49+ if an old version
    of \sty{mfirstuc} is detected}
  }
  % \glsmakefirstuc
  \gcmd{gls\-make\-first\-uc}%
  {%
    \syntax{\margm{text}}
    \providedby{\sty{mfirstuc} v1.05+}
    \desc{used by \gls{makefirstuc} to perform the actual
    case-change. As from \sty{mfirstuc} v2.08+ this just uses
    \gls{MFUsentencecase}}
  }
  % \MFUexcl
  \gcmd{MFU\-excl}
  {
    \providedby{\sty{mfirstuc} v2.08+}
    \syntax{\margm{cs}}%
    \desc{locally identifies \meta{cs} as an exclusion command,
     which will be recognised by both \gls{makefirstuc} and
    \gls{MFUsentencecase}}
    \field{seealso}{MFUblocker,MFUaddmap}
  }
  % \MFUblocker
  \gcmd{MFU\-blocker}
  {
    \providedby{\sty{mfirstuc} v2.08+}
    \syntax{\margm{cs}}%
    \desc{locally identifies \meta{cs} as a blocker command for
     \gls{makefirstuc} and an exclusion for \gls{MFUsentencecase}
     (which doesn't support blockers)}
    \field{seealso}{MFUexcl,MFUaddmap}
  }
  % \MFUaddmap
  \gcmd{MFU\-add\-map}
  {
    \providedby{\sty{mfirstuc} v2.08+}
    \syntax{\margm{cs1}\margm{cs2}}%
    \desc{identifies a mapping from the command \meta{cs1} to
    command \meta{cs2} for \gls{makefirstuc} and also identifies
    \meta{cs2} as a blocker. Mappings and blockers aren't supported 
    by \gls{MFUsentencecase}, so both \meta{cs1} and \meta{cs2} are
    identified as exclusions for \gls{MFUsentencecase}}
    \field{seealso}{MFUexcl,MFUblocker}
  }
  % \glsmfuexcl
  \gcmd{gls\-mfu\-excl}
  {
    \providedby{\sty{glossaries} v4.50+ \& \sty{glossaries-extra} v1.49+}
    \syntax{\margm{cs}}%
    \desc{if \sty{mfirstuc} v2.08+ is installed, this will use
    \gls+{MFUexcl}, otherwise it will implement something similar.
    See \sectionref{sec:firstuc} for further details}
  }
  % \glsmfublocker
  \gcmd{gls\-mfu\-block\-er}
  {
    \providedby{\sty{glossaries} v4.50+ \& \sty{glossaries-extra} v1.49+}
    \syntax{\margm{cs}}%
    \desc{if \sty{mfirstuc} v2.08+ is installed, this will use
    \gls+{MFUblocker}, otherwise it will use \gls{glsmfuexcl} instead.
    See \sectionref{sec:firstuc} for further details}
  }
  % \glsmfuaddmap
  \gcmd{gls\-mfu\-add\-map}
  {
    \providedby{\sty{glossaries} v4.50+ \& \sty{glossaries-extra} v1.49+}
    \syntax{\margm{cs1}\margm{cs2}}%
    \desc{if \sty{mfirstuc} v2.08+ is installed, this will use
    \gls+{MFUaddmap}, otherwise it will use \gls{glsmfuexcl} instead.
    See \sectionref{sec:firstuc} for further details}
  }
  % \glssentencecase
  \gcmd{gls\-sentence\-case}
  {
    \providedby{\sty{glossaries} v4.50+ \& \sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{used by \idx{sentencecase} commands, such as \gls{Gls}, to
    perform the case change. This is simply defined to use
    \gls{makefirstuc}}
  }
  % \capitalisewords
  \gcmd{capitalise\-words}%
  {%
    \providedby{\sty{mfirstuc} v1.06+}
    \syntax{\margm{text}}
    \desc{converts \meta{text} to \idx{titlecase}. Limitations
    apply, see the \sty{mfirstuc} documentation for further details, either:
    \texdocref{mfirstuc} or visit \ctanpkg{mfirstuc}}
  }
  % \capitalisefmtwords
  \gcmd{capitalise\-fmt\-words}%
  {%
    \providedby{\sty{mfirstuc} v2.03+}
    \syntax{\margm{text}}
    \desc{converts \meta{text} to \idx{titlecase}, where \meta{text}
    may contain text-block commands. The starred form only permits a
    text-block command at the start of the argument. Limitations
    apply, see the \sty{mfirstuc} documentation for further details, either:
    \texdocref{mfirstuc} or visit \ctanpkg{mfirstuc}}
  }
  % \xcapitalisefmtwords
  \gcmd{xcapitalise\-fmt\-words}%
  {%
    \providedby{\sty{mfirstuc} v2.03+}
    \syntax{\margm{text}}
    \desc{passes the argument to \gls{capitalisefmtwords} but with the
     first token in \meta{text} expanded. The starred version uses
     the starred version of \gls{capitalisefmtwords}}
  }
  % \mfirstucMakeUppercase
  \gcmd{mfirst\-uc\-Make\-Upper\-case}
  {
    \providedby{\sty{mfirstuc}}
    \syntax{\margm{text}}
    \desc{this command was used by \gls{makefirstuc} to convert its argument to
    \idx{allcaps} and was redefined by \sty{glossaries} to use
    \gls{MakeTextUppercase}, but with \sty{mfirstuc} v2.08+ and 
     \sty{glossaries} v4.50+ this command is instead defined
     to use the \LaTeX3 \idx{allcaps} command, which is expandable.
     This command is no longer used by \gls{makefirstuc} (which instead uses
    \gls{MFUsentencecase}) or by \sty{glossaries} v4.50+ (which now
     uses \gls{glsuppercase} for \idx{allcaps} commands such as \gls{GLS})}
  }
  % \MFUsaveatend
  \gcmd{MFU\-save\-at\-end}
  {
    \providedby{\sty{mfirstuc} v2.08+}
    \desc{saves the list of exclusions, blockers
     and mappings to the \ext{aux} file (if required by some
     external tool, such as \app{bib2gls}) at the end of the document.
     This command sets itself to \cmd{relax} so it
     doesn't repeat the action if used multiple times, but it can
     be overridden by \gls{MFUsave}}
  }
  % \MFUsave
  \gcmd{MFU\-save}
  {
    \providedby{\sty{mfirstuc} v2.08+}
    \desc{saves the list of exclusions, blockers
     and mappings to the \ext{aux} file (if required by some
     external tool, such as \app{bib2gls}).
     This command sets itself to \cmd{relax} so it
     doesn't repeat the action if used multiple times, and
     counteracts any use of \gls{MFUsaveatend}}
  }
  % \glslowercase
  \gcmd{gls\-lower\-case}
  {
    \providedby{\sty{glossaries} v4.50+}
    \syntax{\margm{text}}
    \desc{converts \meta{text} to \idx{lowercase}}
  }
  % \glsuppercase
  \gcmd{gls\-upper\-case}
  {
    \providedby{\sty{glossaries} v4.50+}
    \syntax{\margm{text}}
    \desc{converts \meta{text} to \idx{uppercase}}
  }
  % \glspdfsentencecase
  \gcmd{gls\-pdf\-sentence\-case}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{text}}
    \desc{provided primarily for use in the second argument of \gls{texorpdfstring},
     this is a shortcut that expands \meta{text} before applying \gls{MFUsentencecase}}
  }
  \gpkg{datatool}{}% datatool.sty
  \gpkg{datatool\dhyphen base}{}% datatool-base.sty
  % \DTLformatlist
  \gcmd{DTL\-format\-list}
  {
    \providedby{\sty{datatool-base} v2.28+}
    \syntax{\margm{csv-list}}
    \desc{formats the comma-separated list \meta{csv-list}.
     One-level expansion is performed on \meta{csv-list}. See the
    \sty{datatool} documentation for further details, either:
    \texdocref{datatool} or visit \ctanpkg{datatool}}
  }
  % \DTLifinlist
  \gcmd{DTL\-if\-in\-list}
  {
    \providedby{\sty{datatool-base}}
    \syntax{\margm{element}\margm{csv-list}\margm{true}\margm{false}}
    \desc{does \meta{true} if \meta{element} is contained in the comma-separated
     list \meta{csv-list}, otherwise does \meta{false}.
     One-level expansion is performed on \meta{csv-list}, but not on
     \meta{element}. See the \sty{datatool} documentation for further 
     details, either:
    \texdocref{datatool} or visit \ctanpkg{datatool}}
  }
  % \DTLsortwordlist
  \gcmd{DTL\-sort\-word\-list}
  {
    \providedby{\sty{datatool-base} v3.0+}
    \syntax{\margm{clist-var}\margm{handler-cs}}
    \desc{sorts the given comma-separated list variable, where the values
     are preprocessed by the given sort handler function. See the
    \sty{datatool} documentation for further details, either:
    \texdocref{datatool} or visit \ctanpkg{datatool}}
  }
  \gpkg{track\-lang}{}% tracklang.sty
  % \CurrentTrackedLanguage
  \gcmd{Current\-Tracked\-Language}
  {
    \providedby{\sty{tracklang}}
    \syntax{placeholder for use in \ext{ldf} files, expands to the
    current language label}
  }
  % \CurrentTrackedDialect
  \gcmd{Current\-Tracked\-Dialect}
  {
    \providedby{\sty{tracklang}}
    \syntax{placeholder for use in \ext{ldf} files, expands to the
     current dialect label}
  }
  % applications:
  \gapp{make\-index}% makeidnex
  {%
    \common
    \syntax{\meta{options} \meta{\idx{indexing} file}}%
    \desc{a general purpose \idx{indexingapp}}%
  }
  \gapp{xindy}%
  {%
    \common
    \syntax{\meta{options} \meta{\idx{indexing} file}}%
    \desc{a flexible \idx{indexingapp} with multilingual support
    written in Perl}
  }
  \gapp{texindy}%
  {%
    \syntax{\meta{options} \meta{\idx{indexing} file}}%
    \desc{runs \app{xindy} with modules set up for input written in
     \app{makeindex}['s] syntax}
  }
  \gapp{make\-glos\-saries}% makeglossaries
  {%
    \syntax{\meta{options} \meta{aux-file}}%
    \desc{A custom designed Perl script interface
    to \app+{xindy} and \app+{makeindex} provided with the \sty{glossaries}
    package}
  }
  \gapp{make\-glos\-saries\dhyphen lite}% makeglossaries-lite
  {%
    \syntax{\meta{options} \meta{aux-file}}%
    \desc{A custom designed Lua script interface
    to \app+{xindy} and \app+{makeindex} provided with the \sty{glossaries}
    package. This is a cut-down alternative to the Perl
    \app{makeglossaries} script. If you have Perl installed, use the
    Perl script instead}
  }
  \gapp{make\-glos\-saries\-gui}% makeglossariesgui
  {%
    \syntax{\meta{options} \meta{aux-file}}%
    \desc{A Java \gls{gui} alternative to \app{makeglossaries} that
    also provides diagnostic tools. Available separately on
    \CTANpkg{makeglossariesgui}}
  }
  \gapp{bib2gls}%
  {%
    \common
    \syntax{\meta{options} \meta{aux-file}}%
    \desc{an \idx{indexingapp} that combines two functions in
    one: (1) fetches entry definition from a \ext+{bib} file
    based on information provided in the \ext+{aux} file (similar
    to \BibTeX); (2) hierarchically sorts and collates location
    lists (similar to \app{makeindex} and \app{xindy}).
    This application is designed for use with \sty{glossaries-extra}
    and can't be used with just the base \sty{glossaries} package.
    Available separately on \CTANpkg{bib2gls}}
  }
  \gapp{con\-vert\-gls2bib}% convertgls2bib
  {%
    \syntax{\meta{options} \meta{tex-file} \meta{bib-file}}%
    \desc{An application provided with \app{bib2gls} that
     converts \ext+{tex} files containing entry definitions to
     \ext+{bib} files suitable for use with \app{bib2gls}.
     This application is designed for files that just contain entry
     definitions, but it can work on a complete document file.
     However, there will be a lot of \qt{undefined command} warnings as
     \app{convertgls2bib} only has a limited set of known commands. You
     can limit it so that it only parses the preamble with the
     \switch{preamble-only} switch (requires at least \app{bib2gls}
     v2.0)}
  }
  \gapp{xindex}{}
  \gapp{arara}{}
  % switches
  % --preamble-only
  \glongswitch{preamble\dhyphen only}{\inapp{convertgls2bib}}
  % --index-conversion
  \glongswitch{index\dhyphen conversion}{\inapp{convertgls2bib}}
  % -i
  \gshortswitch{i}{\inapp{bib2gls}\field{alias}{switch.index-conversion}}
  % --group
  \glongswitch{group}{\inapp{bib2gls}}
  % -g
  \gshortswitch{g}{\inapp{bib2gls}\field{alias}{switch.group}}
  % --no-group
  \glongswitch{no\dhyphen group}{\inapp{bib2gls}}
  % --log-file
  \glongswitch{log\dhyphen file}{\inapp{bib2gls}}
  % -t
  \gshortswitch{t}{\inapp{bib2gls}\field{alias}{switch.log-file}}
  % --record-count
  \glongswitch{record\dhyphen count}{\inapp{bib2gls}}
  % --record-count-rule
  \glongswitch{record\dhyphen count\dhyphen rule}{\inapp{bib2gls}}
  % --record-count-unit
  \glongswitch{record\dhyphen count\dhyphen unit}{\inapp{bib2gls}}
  % --merge-nameref-on
  \glongswitch{merge\dhyphen nameref\dhyphen on}{\inapp{bib2gls}}
  % --mfirstuc-protection
  \glongswitch{mfirstuc\dhyphen protection}{\inapp{bib2gls}}
  % --datatool-sort-markers
  \glongswitch{datatool\dhyphen sort\dhyphen markers}{\inapp{bib2gls}}
  % --collapse-same-location-range
  \glongswitch{collapse\dhyphen same\dhyphen location\dhyphen range}{\inapp{bib2gls}}
  % --no-collapse-same-location-range
  \glongswitch{no\dhyphen collapse\dhyphen same\dhyphen location\dhyphen range}{\inapp{bib2gls}}
  % COMMANDS: ABBREVIATIONS
  % \newabbreviation
  \gcmd{new\-ab\-bre\-vi\-a\-tion}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\margm{short}\margm{long}}
    \desc{defines a new entry that represents an abbreviation.
     This internally uses \gls{newglossaryentry} and any provided
     \meta{options} (\idxpl{gloskey}) will be appended. The
     \gloskey{category} is set to \cat{abbreviation} by default, but
     may be overridden in \meta{options}. The
     appropriate style should be set before the abbreviation is
     defined with \gls{setabbreviationstyle}}
  }
  % \newacronym
  \gcmd{new\-acronym}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\margm{short}\margm{long}}
    \desc{this command is provided by the base \sty{glossaries}
     package but is redefined by \sty{glossaries-extra} to use
     \gls{newabbreviation} with the \gloskey{category} key set to 
     \cat{acronym}.  The
     appropriate style should be set before the abbreviation is
     defined with
    \code{\gls{setabbreviationstyle}\oarg{acronym}\margm{style}}.
    You can override the \gloskey{category} in \meta{options} but
    remember to change the optional argument of
    \gls{setabbreviationstyle} to match}
  }%
  % \GlsXtrEnableInitialTagging
  \gcmds{Gls\-Xtr\-Enable\-Initial\-Tagging}%
  {
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{categories}\margm{cs}}
    \desc{robustly defines the command \meta{cs} to accept a single
    argument, which is a letter (or letters) that needs to be
    tagged. The unstarred version triggers an error if \meta{cs} is
    already defined. The unstarred version will redefine \meta{cs} if
    it already exists}
  }
  % \glsxtrtagfont
  \gcmd{gls\-xtr\-tag\-font}%
  {
    %\providedby{\sty{glossaries-extra} v0.5.2+}
     \syntax{\margm{text}}
     \desc{used by the tagging command defined with \gls{GlsXtrEnableInitialTagging}}
  }
  % \GlsXtrDefineAbbreviationShortcuts
  \gcmd{Gls\-Xtr\-Define\-Abbreviation\-Shortcuts}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{used by \opteqvalref{shortcuts}{abbreviations} and
     \opteqvalref{shortcuts}{all}. This
     command redefines itself to do nothing because it can only be
     used once}
  }
  % \GlsXtrDefineAcronymShortcuts
  \gcmd{Gls\-Xtr\-Define\-Acronym\-Shortcuts}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
    \desc{used by \opteqvalref{shortcuts}{ac} and
     \opteqvalref{shortcuts}{acother}. This
     command redefines itself to do nothing because it can only be
     used once}
  }
  % \GlsXtrDefineOtherShortcuts
  \gcmd{Gls\-Xtr\-Define\-Other\-Shortcuts}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{used by \opteqvalref{shortcuts}{other} and
     \opteqvalref{shortcuts}{all}. This
     command redefines itself to do nothing because it can only be
     used once}
  }
  % COMMANDS: ABBREVIATION STYLES
  % \setabbreviationstyle
  \gcmd{set\-ab\-bre\-vi\-a\-tion\-style}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{category}\margm{style-name}}
     \desc{sets the current \idx{abbrvstyle} to \meta{style-name}
      for the category identified by \meta{category}. If the
      optional argument is omitted, \cat{abbreviation} is assumed}
  }
  % \setacronymstyle
  \gcmd{set\-acronym\-style}%
  {%
    \providedby{\sty{glossaries} v4.02+}
    \syntax{\margm{acronym-style-name}}
    \banned
    \desc{sets the style for the base \sty{glossaries} package's
    acronym mechanism. These styles are not compatible with 
    \sty{glossaries-extra}, which redefines \gls{newacronym}
    to use \gls{newabbreviation}. Use:
\begin{compactcodebox}
\gls{setabbreviationstyle}\oarg{acronym}\margm{abbreviation-style-name}
\end{compactcodebox}
    with the closest matching \idx{abbrvstyle} instead}
  }
  % \RestoreAcronyms
  \gcmd{Restore\-Acronyms}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{restores \gls{newacronym} to the base \sty{glossaries}
     mechanism. Not recommended}
  }
  % \MakeAcronymsAbbreviations
  \gcmd{Make\-Acronyms\-Ab\-bre\-vi\-a\-tions}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \desc{counteracts \gls{RestoreAcronyms}. Not recommended}
  }
  % \newacronymstyle
  \gcmd{new\-acronym\-style}%
  {
    \providedby{\sty{glossaries} v4.02+}
    \syntax{\margm{name}\margm{format def}\margm{display defs}}
    \banned
    \desc{defines an acronym style for use with the base
    \sty{glossaries} package's acronym mechanism. These styles are not
    compatible with \sty{glossaries-extra}. Use
    \gls{newabbreviationstyle} instead}
  }
  % \glsabspace
  \gcmd{gls\-ab\-space}%
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{label}}
    \desc{as \gls{glsacspace} but includes \idx{innerformatting}.
     Unlike \gls{glsacspace}, this command is robust}
  }
  % \glsacspace
  \gcmd{gls\-ac\-space}%
  {
     \providedby{\sty{glossaries} v4.16+}
     \syntax{\margm{label}}
     \desc{uses a non-breakable space if the short form is less than
      \gls{glsacspacemax} otherwise uses \csfmt{space}. This command
       is provided by \sty{glossaries} but has a hard-coded maximum of 3em.
       This command is redefined by \sty{glossaries-extra} to use
       \gls{glsacspacemax}}
  }
  % \glsacspacemax
  \gcmd{gls\-ac\-space\-max}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \desc{expands to the maximum value used by \gls{glsacspace}.
     This is a macro not a register. The default is \code{3em}}
  }
  % \firstacronymfont
  \gcmd{first\-acronym\-font}
  {
    \providedby{\sty{glossaries} v1.14+}
     \syntax{\margm{text}}
     \desc{used to encapsulate the acronym short form on
     \idx{firstuse} by the base \sty{glossaries} package. This is
     redefined by \sty{glossaries-extra} to use \gls{glsfirstabbrvfont}}
  }
  % \acronymfont
  \gcmd{acronym\-font}
  {
    \providedby{\sty{glossaries} v1.0+}
     \syntax{\margm{text}}
     \desc{used to encapsulate the acronym short form on
     \idx{subsequentuse} by the base \sty{glossaries} package. This is
     redefined by \sty{glossaries-extra} to use \gls{glsabbrvfont}}
  }
  % \newabbreviationstyle
  \gcmd{new\-ab\-bre\-vi\-a\-tion\-style}%
  {% 
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{style-name}\margm{setup}\margm{display definitions}}
    \desc{defines an abbreviation style, which can be set with
    \gls{setabbreviationstyle}}
  }
  % \renewabbreviationstyle
  \gcmd{re\-new\-ab\-bre\-vi\-a\-tion\-style}%
  {% 
    \providedby{\sty{glossaries-extra} v1.04+}
    \syntax{\margm{style-name}\margm{setup}\margm{display definitions}}
    \desc{redefines an abbreviation style}
    \field{seealso}{newabbreviationstyle}
  }
  % \letabbreviationstyle
  \gcmd{let\-ab\-bre\-vi\-a\-tion\-style}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{new style}\margm{existing style}}
     \desc{defines a synonym for an existing abbreviation style}
  }
  % \ExtraCustomAbbreviationFields
  \gcmd{Extra\-Custom\-Ab\-bre\-vi\-a\-tion\-Fields}
  {
    \providedby{\sty{glossaries-extra} v1.31+}
     \desc{expands to additional fields that need to be set with \gls{newabbreviation}}
  }
  % \glsxtrnewabbrevpresetkeyhook
  \gcmd{gls\-xtr\-new\-ab\-brev\-preset\-key\-hook}
  {
    %\providedby{\sty{glossaries-extra} v0.5.2+}
     \syntax{\margm{options}\margm{label}\margm{short}}
     \desc{hook provided to adjust initialisation within
      \gls{newabbreviation}}
  }
  % \newabbreviationhook
  \gcmd{new\-ab\-bre\-vi\-a\-tion\-hook}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \desc{hook provided within \gls{newabbreviation} just before the entry is defined}
  }
  % \CustomAbbreviationFields
  \gcmd{Custom\-Ab\-bre\-vi\-a\-tion\-Fields}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{expands to the default field definitions for the entry}
  }
  % \GlsXtrPostNewAbbreviation
  \gcmd{Gls\-Xtr\-Post\-New\-Ab\-bre\-vi\-a\-tion}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{a hook that's performed after the entry has been defined}
  }
  % \glsxtrsetcomplexstyle
  \gcmd{gls\-xtr\-set\-complex\-style}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{n}}
     \desc{indicates that the entry given by \meta{entry-label} uses a
     complex abbreviation style. The second argument \meta{n} should
     be numeric, which indicates why it doesn't work with the
     variations of \gls{glsfirst}: 1 (all caps doesn't work), 2 (all caps and insert
    doesn't work), 3 (insert doesn't work)}
  }
  % \glscategorylabel
  \gcmd{gls\-cat\-e\-gory\-label}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \desc{expands to the category label of the abbreviation that is
     in the process of being defined by \gls{newabbreviation}. Maybe used
     in the style hooks (but take care to expand this command, if
     necessary)}
  }
  % \glsxtrorgkeylist
  \gcmd{gls\-xtr\-org\-key\-list}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \desc{expands to the original option list as it was supplied to 
      \gls{newabbreviation}}
  }
  % \glsxtrorgshort
  \gcmd{gls\-xtr\-org\-short}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \desc{expands to the original short form as it was supplied to 
      \gls{newabbreviation}}
  }
  % \glsxtrorglong
  \gcmd{gls\-xtr\-org\-long}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \desc{expands to the original long form as it was supplied to 
      \gls{newabbreviation}}
  }
  % \glskeylisttok
  \gcmd{gls\-key\-list\-tok}
  {
    \providedby{\sty{glossaries}}
     \desc{a token register that stores the options passed to
      \gls{newabbreviation}}
  }
  % \glslabeltok
  \gcmd{gls\-label\-tok}
  {
    \providedby{\sty{glossaries}}
     \desc{a token register that stores the entry's label}
  }
  % \glsshorttok
  \gcmd{gls\-short\-tok}
  {
    \providedby{\sty{glossaries}}
     \desc{a token register that stores the short form (which may
      have been modified after being passed to \gls{newabbreviation})}
  }
  % \glsshortpltok
  \gcmd{gls\-short\-pl\-tok}
  {
    %\providedby{\sty{glossaries-extra} v0.3+}
     \desc{a token register that stores the short plural form (which may
      have been modified after being passed to \gls{newabbreviation})}
  }
  % \glslongtok
  \gcmd{gls\-long\-tok}
  {
    \providedby{\sty{glossaries}}
     \desc{a token register that stores the long form (which may
      have been modified after being passed to \gls{newabbreviation})}
  }
  % \glslongpltok
  \gcmd{gls\-long\-pl\-tok}
  {
    %\providedby{\sty{glossaries-extra} v0.3+}
     \desc{a token register that stores the long plural form (which may
      have been modified after being passed to \gls{newabbreviation})}
  }
  % \glsxtrword
  \gcmd{gls\-xtr\-word}%
  {%
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{word}}
     \desc{used to mark each word by the \catattr{markwords}
     and \catattr{markshortwords} attributes}
  }
  % \glsxtrwordsep
  \gcmd{gls\-xtr\-word\-sep}%
  {%
    \providedby{\sty{glossaries-extra} v1.17+}
     \desc{used to mark word separator space by the \catattr{markwords}
     and \catattr{markshortwords} attributes}
  }
  % \glsxtrwordsephyphen
  \gcmd{gls\-xtr\-word\-sep\-hyphen}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
     \desc{used to mark compound word separator hyphen by the \catattr{markwords}
     and \catattr{markshortwords} attributes}
  }
  % \glsxtrsubsequentfmt
  \gcmd{gls\-xtr\-sub\-sequent\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{glsxtrgenabbrvfmt} to display the subsequent
     singular form (defined by the abbreviation style)}
  }
  % \glsxtrsubsequentplfmt
  \gcmd{gls\-xtr\-sub\-sequent\-pl\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{glsxtrgenabbrvfmt} to display the subsequent
     plural form (defined by the abbreviation style)}
  }
  % \Glsxtrsubsequentfmt
  \gcmd{Gls\-xtr\-sub\-sequent\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{glsxtrgenabbrvfmt} to display the
     \idx{sentencecase} subsequent
     singular form (defined by the abbreviation style)}
  }
  % \Glsxtrsubsequentplfmt
  \gcmd{Gls\-xtr\-sub\-sequent\-pl\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{glsxtrgenabbrvfmt} to display the
     \idx{sentencecase} subsequent
     plural form (defined by the abbreviation style)}
  }
  % \GLSxtrsubsequentfmt
  \gcmd{GLS\-xtr\-sub\-sequent\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{glsxtrgenabbrvfmt} to display the
     \idx{allcaps} subsequent
     singular form (defined by the abbreviation style)}
  }
  % \GLSxtrsubsequentplfmt
  \gcmd{GLS\-xtr\-sub\-sequent\-pl\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{glsxtrgenabbrvfmt} to display the
     \idx{allcaps} subsequent
     plural form (defined by the abbreviation style)}
  }
  % \glsxtrdefaultsubsequentfmt
  \gcmd{gls\-xtr\-de\-fault\-sub\-sequent\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the default subsequent format style that only shows the
     short form and insert (with support for \glsopt{innertextformat})}
  }
  % \glsxtrdefaultsubsequentplfmt
  \gcmd{gls\-xtr\-de\-fault\-sub\-sequent\-pl\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the default subsequent plural format style that only shows the
     short form and insert (with support for \glsopt{innertextformat})}
  }
  % \Glsxtrdefaultsubsequentfmt
  \gcmd{Gls\-xtr\-de\-fault\-sub\-sequent\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the default \idx{sentencecase} subsequent format style that only shows the
     short form and insert (with support for \glsopt{innertextformat})}
  }
  % \Glsxtrdefaultsubsequentplfmt
  \gcmd{Gls\-xtr\-de\-fault\-sub\-sequent\-pl\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the default \idx{sentencecase} subsequent plural format style that only shows the
     short form and insert (with support for \glsopt{innertextformat})}
  }
  % \GLSxtrdefaultsubsequentfmt
  \gcmd{GLS\-xtr\-de\-fault\-sub\-sequent\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the default \idx{allcaps} subsequent format style that only shows the
     short form and insert (with support for \glsopt{innertextformat})}
  }
  % \GLSxtrdefaultsubsequentplfmt
  \gcmd{GLS\-xtr\-de\-fault\-sub\-sequent\-pl\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the default \idx{allcaps} subsequent plural format style that only shows the
     short form and insert (with support for \glsopt{innertextformat})}
  }
  % \glsxtrfullformat
  \gcmd{gls\-xtr\-full\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the singular \idx{displayfullform} (defined by the abbreviation style)}
  }
  % \glsxtrfullplformat
  \gcmd{gls\-xtr\-full\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the plural \idx{displayfullform} (defined by the abbreviation style)}
  }
  % \Glsxtrfullformat
  \gcmd{Gls\-xtr\-full\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the \idx{sentencecase} singular \idx{displayfullform} (defined by the abbreviation style)}
  }
  % \Glsxtrfullplformat
  \gcmd{Gls\-xtr\-full\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the \idx{sentencecase} plural \idx{displayfullform} (defined by the abbreviation style)}
  }
  % \GLSxtrfullformat
  \gcmd{GLS\-xtr\-full\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the \idx{allcaps} singular \idx{displayfullform} (defined by the abbreviation style)}
  }
  % \GLSxtrfullplformat
  \gcmd{GLS\-xtr\-full\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{the \idx{allcaps} plural \idx{displayfullform} (defined by the abbreviation style)}
  }
  % \glsxtrinlinefullformat
  \gcmd{gls\-xtr\-in\-line\-full\-format}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{glsxtrfull} to display the \idx{inlinefullform}
     form (defined by the abbreviation style)}
  }
  % \Glsxtrinlinefullformat
  \gcmd{Gls\-xtr\-in\-line\-full\-format}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{Glsxtrfull} to display the \idx{sentencecase} \idx{inlinefullform}
     form (defined by the abbreviation style)}
  }
  % \GLSxtrinlinefullformat
  \gcmd{GLS\-xtr\-in\-line\-full\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{GLSxtrfull} to display the \idx{allcaps} \idx{inlinefullform}
     form (defined by the abbreviation style)}
  }
  % \glsxtrinlinefullplformat
  \gcmd{gls\-xtr\-in\-line\-full\-pl\-format}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{glsxtrfullpl} to display the plural \idx{inlinefullform}
     form (defined by the abbreviation style)}
  }
  % \Glsxtrinlinefullplformat
  \gcmd{Gls\-xtr\-in\-line\-full\-pl\-format}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{Glsxtrfullpl} to display the plural \idx{sentencecase} \idx{inlinefullform}
     form (defined by the abbreviation style)}
  }
  % \GLSxtrinlinefullplformat
  \gcmd{GLS\-xtr\-in\-line\-full\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used by \gls{GLSxtrfullpl} to display the plural \idx{allcaps} \idx{inlinefullform}
     form (defined by the abbreviation style)}
  }
  % \glsfirstabbrvfont
  \gcmd{gls\-first\-abbrv\-font}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{text}}
     \desc{font formatting command for the short form on \idx{firstuse}, initialised by
      the abbreviation style}
  }
  % \glsabbrvfont
  \gcmd{gls\-abbrv\-font}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{text}}
     \desc{font formatting command for the short form, initialised by
      the abbreviation style}
  }
  % \glsxtrrevert
  \gcmd{gls\-xtr\-revert}{
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{style-sensitive abbreviation command designed to
    counteract any font change applied by the style}
  }
  % \glsxtrdefaultrevert
  \gcmd{gls\-xtr\-de\-fault\-revert}{
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{the default definition of \gls{glsxtrrevert}. Simply does
    \meta{text}}
  }
  % \glsxtrscrevert
  \gcmd{gls\-xtr\-sc\-revert}{
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{the definition of \gls{glsxtrrevert} used by the \idx{smallcaps} (\qt{sc})
    \idxpl{abbrvstyle}. Uses \gls{glstextup}}
  }
  % \glsxtrscuserrevert
  \gcmd{gls\-xtr\-sc\-user\-revert}{
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{the definition of \gls{glsxtrrevert} used by 
    styles like \abbrstyle{long-postshort-sc-user}. Uses \gls{glsxtrscrevert}}
  }
  % \glsxtrsconlyrevert
  \gcmd{gls\-xtr\-sc\-only\-revert}{
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{the definition of \gls{glsxtrrevert} used by 
    styles like \abbrstyle{long-only-short-sc-only}. Uses \gls{glsxtrscrevert}}
  }
  % \glsxtrsmrevert
  \gcmd{gls\-xtr\-sm\-revert}{
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{the definition of \gls{glsxtrrevert} used by the smaller (\qt{sm})
    \idxpl{abbrvstyle}. Uses \gls{textlarger}}
  }
  % \glsxtremrevert
  \gcmd{gls\-xtr\-em\-revert}{
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{the definition of \gls{glsxtrrevert} used by the emphasized (\qt{em})
    \idxpl{abbrvstyle}. Uses \gls{textup}}
  }
  % \glsinnerfmtabbrvfont
  \gcmd{gls\-inner\-fmt\-abbrv\-font}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{text}}
     \desc{robust command that applies both \gls{glsabbrvfont} and
      \gls{glsxtrgenentrytextfmt} to \meta{text}}
  }
  % \glsfirstlongfont
  \gcmd{gls\-first\-long\-font}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{text}}
     \desc{font formatting command for the long form on \idx{firstuse}, initialised by
      the abbreviation style}
  }
  % \glslongfont
  \gcmd{gls\-long\-font}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{text}}
     \desc{font formatting command for the long form, initialised by
      the abbreviation style}
  }
  % \glsxtrlongformat
  \gcmd{gls\-xtr\-long\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{encapsulates the \gloskey{long} field for the given entry 
     with \meta{fmt-cs}. The \meta{insert} argument is the insertion
     material supplied in the final optional argument of the
     \idx{glslike} or \idx{glstextlike} commands. The
     \gls{ifglsxtrinsertinside}, \idx{innerformatting}, 
      and accessibility settings are supported}
  }
  % \Glsxtrlongformat
  \gcmd{Gls\-xtr\-long\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongformat} but \idx{sentencecase}}
  }
  % \GLSxtrlongformat
  \gcmd{GLS\-xtr\-long\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongformat} but \idx{sentencecase}}
  }
  % \glsxtrlongplformat
  \gcmd{gls\-xtr\-long\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongformat} but for the \gloskey{longplural} field}
  }
  % \Glsxtrlongplformat
  \gcmd{Gls\-xtr\-long\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongplformat} but \idx{sentencecase}}
  }
  % \GLSxtrlongplformat
  \gcmd{GLS\-xtr\-long\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongplformat} but \idx{allcaps}}
  }
  % \glsxtrlongformatgrp
  \gcmd{gls\-xtr\-long\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongformat} but adds grouping around \meta{insert}
     (with the \idx{innerformatting} inside the group)}
  }
  % \Glsxtrlongformatgrp
  \gcmd{Gls\-xtr\-long\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongformatgrp} but \idx{sentencecase}}
  }
  % \GLSxtrlongformatgrp
  \gcmd{GLS\-xtr\-long\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongformatgrp} but \idx{allcaps}}
  }
  % \glsxtrlongplformatgrp
  \gcmd{gls\-xtr\-long\-pl\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongplformat} but adds grouping around \meta{insert}
     (with the \idx{innerformatting} inside the group)}
  }
  % \Glsxtrlongplformatgrp
  \gcmd{Gls\-xtr\-long\-pl\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongplformatgrp} but \idx{sentencecase}}
  }
  % \GLSxtrlongplformatgrp
  \gcmd{GLS\-xtr\-long\-pl\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrlongplformatgrp} but \idx{allcaps}}
  }
  % \glsxtrshortformat
  \gcmd{gls\-xtr\-short\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{encapsulates the \gloskey{short} field for the given entry 
     with \meta{fmt-cs}. The \meta{insert} argument is the insertion
     material supplied in the final optional argument of the
     \idx{glslike} or \idx{glstextlike} commands. The
     \gls{ifglsxtrinsertinside}, \idx{innerformatting}, 
    and accessibility settings are supported}
  }
  % \Glsxtrshortformat
  \gcmd{Gls\-xtr\-short\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortformat} but \idx{sentencecase}}
  }
  % \GLSxtrshortformat
  \gcmd{GLS\-xtr\-short\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortformat} but \idx{allcaps}}
  }
  % \glsxtrshortplformat
  \gcmd{gls\-xtr\-short\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortformat} but for the \gloskey{shortplural} field}
  }
  % \Glsxtrshortplformat
  \gcmd{Gls\-xtr\-short\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortplformat} but \idx{sentencecase}}
  }
  % \GLSxtrshortplformat
  \gcmd{GLS\-xtr\-short\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortplformat} but \idx{allcaps}}
  }
  % \glsxtrshortformatgrp
  \gcmd{gls\-xtr\-short\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortformat} but adds grouping around \meta{insert}
     (with the \idx{innerformatting} inside the group)}
  }
  % \Glsxtrshortformatgrp
  \gcmd{Gls\-xtr\-short\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortformatgrp} but \idx{sentencecase}}
  }
  % \GLSxtrshortformatgrp
  \gcmd{GLS\-xtr\-short\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortformatgrp} but \idx{allcaps}}
  }
  % \glsxtrshortplformatgrp
  \gcmd{gls\-xtr\-short\-pl\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortplformat} but adds grouping around \meta{insert}
     (with the \idx{innerformatting} inside the group)}
  }
  % \Glsxtrshortplformatgrp
  \gcmd{Gls\-xtr\-short\-pl\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortplformatgrp} but \idx{sentencecase}}
  }
  % \GLSxtrshortplformatgrp
  \gcmd{GLS\-xtr\-short\-pl\-for\-mat\-grp}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{fmt-cs}}
    \desc{as \gls{glsxtrshortplformatgrp} but \idx{allcaps}}
  }
  % \glsxtrlongshortformat
  \gcmd{gls\-xtr\-long\-short\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{formats the long form with \gls{glsxtrlongformat} and the
     short form in parentheses with \gls{glsxtrshortformat}}
  }
  % \Glsxtrlongshortformat
  \gcmd{Gls\-xtr\-long\-short\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrlongshortformat} but \idx{sentencecase}}
  }
  % \GLSxtrlongshortformat
  \gcmd{GLS\-xtr\-long\-short\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrlongshortformat} but \idx{allcaps}}
  }
  % \glsxtrlongshortplformat
  \gcmd{gls\-xtr\-long\-short\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrlongshortformat} but for the plurals}
  }
  % \Glsxtrlongshortplformat
  \gcmd{Gls\-xtr\-long\-short\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrlongshortplformat} but \idx{sentencecase}}
  }
  % \GLSxtrlongshortplformat
  \gcmd{GLS\-xtr\-long\-short\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrlongshortplformat} but \idx{allcaps}}
  }
  % \glsxtrshortlongformat
  \gcmd{gls\-xtr\-short\-long\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{formats the short form with \gls{glsxtrshortformat} and the
     long form in parentheses with \gls{glsxtrlongformat}}
  }
  % \Glsxtrshortlongformat
  \gcmd{Gls\-xtr\-short\-long\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrshortlongformat} but \idx{sentencecase}}
  }
  % \GLSxtrshortlongformat
  \gcmd{GLS\-xtr\-short\-long\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrshortlongformat} but \idx{allcaps}}
  }
  % \glsxtrshortlongplformat
  \gcmd{gls\-xtr\-short\-long\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrshortlongformat} but for the plurals}
  }
  % \Glsxtrshortlongplformat
  \gcmd{Gls\-xtr\-short\-long\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrshortlongplformat} but \idx{sentencecase}}
  }
  % \GLSxtrshortlongplformat
  \gcmd{GLS\-xtr\-short\-long\-pl\-for\-mat}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrshortlongplformat} but \idx{allcaps}}
  }
  % \glsxtrAccSuppAbbrSetNoLongAttrs
  \gcmd{gls\-xtr\-Acc\-Supp\-Abbr\-Set\-No\-Long\-Attrs}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{category}}
     \desc{initialised accessibility support for the \gloskey{name},
     \gloskey{first}, \gloskey{firstplural}, \gloskey{text} and \gloskey{plural} 
     fields (if enabled with
     \opt{accsupp}). This command is provided for abbreviation styles
     where the \gloskey{name}, \gloskey{first} and \gloskey{text} are 
     just the formatted abbreviation}
  }
  % \glsxtrAccSuppAbbrSetFirstLongAttrs
  \gcmd{gls\-xtr\-Acc\-Supp\-Abbr\-Set\-First\-Long\-Attrs}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{category}}
     \desc{initialised accessibility support for the \gloskey{name},
     \gloskey{text} and \gloskey{plural} fields (if enabled with
     \opt{accsupp}). This command is provided for abbreviation styles
     where the \gloskey{name} and \gloskey{text} are just the 
     formatted abbreviation}
  }
  % \glsxtrAccSuppAbbrSetTextShortAttrs
  \gcmd{gls\-xtr\-Acc\-Supp\-Abbr\-Set\-Text\-Short\-Attrs}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{category}}
     \desc{initialised accessibility support for the 
     \gloskey{text} and \gloskey{plural} fields (if enabled with
     \opt{accsupp}). This command is provided for abbreviation styles
     where the \gloskey{text} is just the 
     formatted abbreviation}
  }
  % \glsxtrAccSuppAbbrSetNameShortAttrs
  \gcmd{gls\-xtr\-Acc\-Supp\-Abbr\-Set\-Name\-Short\-Attrs}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{category}}
     \desc{initialised accessibility support for the 
     \gloskey{name} field (if enabled with
     \opt{accsupp}). This command is provided for abbreviation styles
     where only the \gloskey{name} is just the 
     formatted abbreviation}
  }
  % \glsxtrAccSuppAbbrSetNameLongAttrs
  \gcmd{gls\-xtr\-Acc\-Supp\-Abbr\-Set\-Name\-Long\-Attrs}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{category}}
     \desc{initialised accessibility support for the 
     \gloskey{first}, \gloskey{firstplural}, \gloskey{text} and \gloskey{plural} 
     fields (if enabled with
     \opt{accsupp}). This command is provided for abbreviation styles
     where the \gloskey{first} and \gloskey{text} are 
     just the formatted abbreviation}
  }
  % \glsxtrprovideaccsuppcmd
  \gcmd{gls\-xtr\-provide\-acc\-supp\-cmd}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
     \note{requires \opt{accsupp}}
     \syntax{\margm{category}\margm{field}}
     \desc{defines \gls{glsxtrcategoryfieldaccsupp} to
       \gls{glsshortaccsupp}, if not already defined}
  }
  % COMMANDS: ABBREVIATION STYLE USER COMMANDS
  % \ifglsxtrinsertinside
  \gcond{if\-gls\-xtr\-insert\-inside}
  {
    \providedby{\sty{glossaries-extra} v1.02}
    \initvalcs{iffalse}
    \desc{a conditional used by the predefined abbreviation styles to determine 
     whether the \meta{insert} part should go inside or outside of the style's font 
     formatting commands}
  }
  % \glsxtrinsertinsidetrue
  \gcmd{gls\-xtr\-insert\-inside\-true}
  {
    \providedby{\sty{glossaries-extra} v1.02}
    \desc{sets the \gls{ifglsxtrinsertinside} to true}
  }
  % \glsxtrinsertinsidefalse
  \gcmd{gls\-xtr\-insert\-inside\-false}
  {
    \providedby{\sty{glossaries-extra} v1.02}
    \desc{sets the \gls{ifglsxtrinsertinside} conditional to false}
  }
  % \glsxtrfullsep
  \gcmd{gls\-xtr\-full\-sep}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-label}}
     \desc{Separator used by the parenthetical \idx{inlinefullform}
      and also for some \idxpl{displayfullform}}
  }
  % \glsxtrparen
  \gcmd{gls\-xtr\-paren}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{used to encapsulate \meta{text} in parentheses}
  }
  % \glsxtrlongshortname
  \gcmd{gls\-xtr\-long\-short\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
    \desc{expands to the name value for \abbrstyle{long-short} styles}
  }
  % \glsxtrlongshortdescsort
  \gcmd{gls\-xtr\-long\-short\-desc\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
    \desc{expands to the sort value for \abbrstyle{long-short-desc} styles}
  }
  % \glsxtrlongshortdescname
  \gcmd{gls\-xtr\-long\-short\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
    \desc{expands to the name value for \abbrstyle{long-short-desc} styles}
  }
  % \glsxtrshortlongname
  \gcmd{gls\-xtr\-short\-long\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
    \desc{expands to the name value for \abbrstyle{short-long} styles}
  }
  % \glsxtrshortlongdescsort
  \gcmd{gls\-xtr\-short\-long\-desc\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
    \desc{expands to the sort value for \abbrstyle{short-long-desc} styles}
  }
  % \glsxtrshortlongdescname
  \gcmd{gls\-xtr\-short\-long\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
    \desc{expands to the name value for \abbrstyle{short-long-desc} styles}
  }
  % \glsxtrshortnolongname
  \gcmd{gls\-xtr\-short\-no\-long\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
    \desc{expands to the name value for \abbrstyle{short-nolong} styles}
  }
  % \glsxtrlonghyphenshortsort
  \gcmd{gls\-xtr\-long\-hyphen\-short\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{expands to the sort value for the \abbrstyle{long-hyphen-short-hyphen}
    styles}
  }
  % \glsxtrshorthyphenlongsort
  \gcmd{gls\-xtr\-short\-hyphen\-long\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{expands to the sort value for the \abbrstyle{short-hyphen-long-hyphen}
    styles}
  }
  % \glsxtrlonghyphennoshortdescsort
  \gcmd{gls\-xtr\-long\-hyphen\-no\-short\-desc\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{expands to the sort value for the \abbrstyle{long-hyphen-noshort-desc-noreg}
    styles}
  }
  % \glsxtrlonghyphennoshortsort
  \gcmd{gls\-xtr\-long\-hyphen\-no\-short\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{expands to the sort value for the \abbrstyle{long-hyphen-noshort-noreg}
    styles}
  }
  % \glsxtruserparen
  \gcmd{gls\-xtr\-user\-paren}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{used by the \qt{user} abbreviation styles, such as
     \abbrstyle{long-short-user}, to insert the
     space separator (\gls{glsxtrfullsep}) followed by the parenthetical 
     material (\gls{glsxtrparen}) consisting of \meta{text} and, if set, 
     the value of the field given by \gls{glsxtruserfield}, separated by
    \gls{glsxtruserparensep}}
    \field{seealso}{GLSxtruserparen,glsxtruserparensep,glsxtruserfieldfmt}
  }
  % \GLSxtruserparen
  \gcmd{GLS\-xtr\-user\-paren}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{as \gls{glsxtruserparen} but the value of the field given
    by \gls{glsxtruserfield} is converted to \idx{allcaps}. The
    \meta{text} argument should already be in \idx{allcaps}}
  }
  % \glsxtruserparensep
  \gcmd{gls\-xtr\-user\-paren\-sep}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \desc{the separator used in the parenthetical content of
      \gls{glsxtruserparen} and \gls{GLSxtruserparen}}
  }
  % \glsxtruserfieldfmt
  \gcmd{gls\-xtr\-user\-field\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{text}}
     \desc{used to format the value of the field given by
     \gls{glsxtruserfield} within \gls{glsxtruserparen} and \gls{GLSxtruserparen}}
  }
  % \glsxtruserfield
  \gcmd{gls\-xtr\-user\-field}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \desc{expands to the \idxc{internalfieldlabel}{internal label}
     of the field used to store additional information for the
    \qt{user} abbreviation styles, such as \abbrstyle{long-short-user}}
  }
  % \glsxtruserlongshortformat
  \gcmd{gls\-xtr\-user\-long\-short\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{used by styles like \abbrstyle{long-short-user} to format
     the long and short form}
  }
  % \Glsxtruserlongshortformat
  \gcmd{Gls\-xtr\-user\-long\-short\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtruserlongshortformat} but \idx{sentencecase}}
  }
  % \GLSxtruserlongshortformat
  \gcmd{GLS\-xtr\-user\-long\-short\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtruserlongshortformat} but \idx{allcaps}}
  }
  % \glsxtruserlongshortplformat
  \gcmd{gls\-xtr\-user\-long\-short\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{used by styles like \abbrstyle{long-short-user} to format
     the plural long and plural short form}
  }
  % \Glsxtruserlongshortplformat
  \gcmd{Gls\-xtr\-user\-long\-short\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtruserlongshortplformat} but \idx{sentencecase}}
  }
  % \GLSxtruserlongshortplformat
  \gcmd{GLS\-xtr\-user\-long\-short\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtruserlongshortplformat} but \idx{allcaps}}
  }
  % \glsxtrusershortlongformat
  \gcmd{gls\-xtr\-user\-short\-long\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{used by styles like \abbrstyle{short-long-user} to format
     the short and long form}
  }
  % \Glsxtrusershortlongformat
  \gcmd{Gls\-xtr\-user\-short\-long\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrusershortlongformat} but \idx{sentencecase}}
  }
  % \GLSxtrusershortlongformat
  \gcmd{GLS\-xtr\-user\-short\-long\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrusershortlongformat} but \idx{allcaps}}
  }
  % \glsxtrusershortlongplformat
  \gcmd{gls\-xtr\-user\-short\-long\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{used by styles like \abbrstyle{short-long-user} to format
     the plural short and plural long form}
  }
  % \Glsxtrusershortlongplformat
  \gcmd{Gls\-xtr\-user\-short\-long\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrusershortlongplformat} but \idx{sentencecase}}
  }
  % \GLSxtrusershortlongplformat
  \gcmd{GLS\-xtr\-user\-short\-long\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\margm{short-fmt-cs}}
    \desc{as \gls{glsxtrusershortlongplformat} but \idx{allcaps}}
  }
  % \glsxtrusershortformat
  \gcmd{gls\-xtr\-user\-short\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{formats the singular short form in parentheses
     (with \gls{glsxtruserparen}) in styles like \abbrstyle{long-short-user}}
  }
  % \GLSxtrusershortformat
  \gcmd{GLS\-xtr\-user\-short\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{as \gls{glsxtrusershortformat} but \idx{allcaps}}
  }
  % \glsxtrusershortplformat
  \gcmd{gls\-xtr\-user\-short\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{formats the plural short form in parentheses
     (with \gls{glsxtruserparen}) in styles like \abbrstyle{long-short-user}}
  }
  % \GLSxtrusershortplformat
  \gcmd{GLS\-xtr\-user\-short\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{as \gls{glsxtrusershortplformat} but \idx{allcaps}}
  }
  % \glsxtrpostusershortformat
  \gcmd{gls\-xtr\-post\-user\-short\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{formats the short form in parentheses
     (with \gls{glsxtruserparen}) in styles like \abbrstyle{long-postshort-user}}
  }
  % \glsxtruserlongformat
  \gcmd{gls\-xtr\-user\-long\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{formats the singular long form in parentheses
     (with \gls{glsxtruserparen}) in styles like \abbrstyle{short-long-user}}
  }
  % \glsxtruserlongplformat
  \gcmd{gls\-xtr\-user\-long\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{formats the plural long form in parentheses
     (with \gls{glsxtruserparen}) in styles like \abbrstyle{short-long-user}}
  }
  % \GLSxtruserlongformat
  \gcmd{GLS\-xtr\-user\-long\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{as \gls{glsxtruserlongformat} but \idx{allcaps}}
  }
  % \GLSxtruserlongplformat
  \gcmd{GLS\-xtr\-user\-long\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{as \gls{glsxtruserlongplformat} but \idx{allcaps}}
  }
  % \glsxtrpostuserlongformat
  \gcmd{gls\-xtr\-post\-user\-long\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{fmt-cs}}
     \desc{formats the long form in parentheses
     (with \gls{glsxtruserparen}) in styles like \abbrstyle{short-postlong-user}}
  }
  % \glsxtrfootnotelongformat
  \gcmd{gls\-xtr\-foot\-note\-long\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{fmt-cs}}
    \desc{used in the footnote text to format the singular long form}
  }
  % \glsxtrfootnotelongplformat
  \gcmd{gls\-xtr\-foot\-note\-long\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{fmt-cs}}
    \desc{used in the footnote text to format the plural long form}
  }
  % \glsxtrpostfootnotelongformat
  \gcmd{gls\-xtr\-post\-foot\-note\-long\-format}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{fmt-cs}}
    \desc{used in the footnote text to format the long form
     for styles like \abbrstyle{short-postfootnote}}
  }
  % \glsabbrvdefaultfont
  \gcmd{gls\-abbrv\-de\-fault\-font}
  {
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{text}}
    \desc{formatting command for the short form 
     used by the abbreviation styles that don't apply a font change
     by default}
  }
  % \glsfirstabbrvdefaultfont
  \gcmd{gls\-first\-abbrv\-de\-fault\-font}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{text}}
    \desc{formatting command for the short form on \idx{firstuse}
     used by the abbreviation styles that don't apply a font change
     by default}
  }
  % \glsfirstinnerfmtabbrvfont
  \gcmd{gls\-first\-inner\-fmt\-abbrv\-font}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{applies both \gls{glsfirstabbrvfont} and
      \gls{glsxtrgenentrytextfmt} to \meta{text}}
  }
  % \glsfirstxpabbrvfont
  \gcmd{gls\-first\-xp\-abbrv\-font}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}\margm{category}}
    \desc{if the \catattr{markshortwords} attribute is set for the
    given category, this encapsulates \meta{text} with
    \gls{glsfirstabbrvfont} otherwise with
    \gls{glsfirstinnerfmtabbrvfont}. This command has to expand, so
    protect any content that shouldn't expand}
  }
  % \glsxpabbrvfont
  \gcmd{gls\-xp\-abbrv\-font}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}\margm{category}}
    \desc{if the \catattr{markshortwords} attribute is set for the
    given category, this encapsulates \meta{text} with
    \gls{glsabbrvfont} otherwise with
    \gls{glsinnerfmtabbrvfont}. This command has to expand, so
    protect any content that shouldn't expand}
  }
  % \glsfirstlongdefaultfont
  \gcmd{gls\-first\-long\-de\-fault\-font}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{text}}
    \desc{formatting command for the long form on \idx{firstuse}
     used by the abbreviation styles that don't apply a font change
     by default}
  }
  % \glslongdefaultfont
  \gcmd{gls\-long\-de\-fault\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
    \syntax{\margm{text}}
    \desc{formatting command for the long form 
     used by the abbreviation styles that don't apply a font change
     by default}
  }
  % \glslongfootnotefont
  \gcmd{gls\-long\-foot\-note\-font}
  {
    \providedby{\sty{glossaries-extra} v1.05+}
    \syntax{\margm{text}}
    \desc{formatting command for the long form 
     used by the footnote abbreviation styles}
  }
  % \glsfirstlongfootnotefont
  \gcmd{gls\-first\-long\-foot\-note\-font}
  {
    \providedby{\sty{glossaries-extra} v1.05+}
    \syntax{\margm{text}}
    \desc{formatting command for the \idx{firstuse} long form 
     used by the footnote abbreviation styles}
  }
  % \glsxtrabbrvfootnote
  \gcmd{gls\-xtr\-abbrv\-foot\-note}
  {
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{command that produces the footnote for the footnote
    abbreviation styles, such as \abbrstyle{short-footnote}
    and \abbrstyle{short-postfootnote}}
  }
  % \glsxtrpostabbrvfootnote
  \gcmd{gls\-xtr\-post\-abbrv\-foot\-note}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{fmt-code}}
    \desc{command used in the \idx{postlinkhook} for styles like
     \abbrstyle{short-postfootnote}}
  }
  % \xpglsxtrpostabbrvfootnote
  \gcmd{xp\-gls\-xtr\-post\-abbrv\-foot\-note}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \desc{expands to the footnote code required for styles like
      \abbrstyle{short-postfootnote}}
  }
  % \glsxtrfootnotename
  \gcmd{gls\-xtr\-foot\-note\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
    \desc{expands to the name value for styles like \abbrstyle{short-footnote}}
  }
  % \glsxtrfootnotedescname
  \gcmd{gls\-xtr\-foot\-note\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
    \desc{expands to the name value for styles like
     \abbrstyle{short-footnote-desc}}
  }
  % \glsxtrfootnotedescsort
  \gcmd{gls\-xtr\-foot\-note\-desc\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
    \desc{expands to the sort value for styles like
     \abbrstyle{short-footnote-desc}}
  }
  % \glsxtrshortdescname
  \gcmd{gls\-xtr\-short\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
    \desc{expands to the name value for styles like
     \abbrstyle{short-nolong-desc}}
  }
  % \glsxtrlongnoshortdescname
  \gcmd{gls\-xtr\-long\-no\-short\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
    \desc{expands to the name value for styles like
     \abbrstyle{long-noshort-desc}}
  }
  % \glsxtrlongnoshortname
  \gcmd{gls\-xtr\-long\-no\-short\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
    \desc{expands to the name value for styles like \abbrstyle{long-noshort}}
  }
  % \glsxtrscfont
  \gcmd{gls\-xtr\-sc\-font}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{text}}
     \desc{maintained for backwards-compatibility used to typeset
       \meta{text} in small capitals (\gls{textsc}) for the \qt{sc}
        abbreviation styles}
  }
  % \glsxtrfirstscfont
  \gcmd{gls\-xtr\-first\-sc\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{maintained for backwards-compatibility used to typeset
       \meta{text} in small capitals (\gls{textsc}) for the \qt{sc}
        abbreviation styles on \idx{firstuse}}
  }
  % \glsabbrvscfont
  \gcmd{gls\-abbrv\-sc\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{short form font used by the \idx{smallcaps} \qt{sc} abbreviation styles}
  }
  % \glsfirstabbrvscfont
  \gcmd{gls\-first\-abbrv\-sc\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{short form font used by the \idx{smallcaps} \qt{sc} abbreviation 
     styles on \idx{firstuse}}
  }
  % \glsabbrvscuserfont
  \gcmd{gls\-abbrv\-sc\-user\-font}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{text}}
     \desc{short form font used by the \idx{smallcaps} \qt{sc-user} abbreviation styles}
  }
  % \glsfirstabbrvscuserfont
  \gcmd{gls\-first\-abbrv\-sc\-user\-font}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{text}}
     \desc{short form font used by the \idx{smallcaps} \qt{sc-user} abbreviation 
     styles on \idx{firstuse}}
  }
  % \glstextup
  \gcmd{gls\-text\-up}
  {
     \providedby{\sty{glossaries} v3.09a+}
     \syntax{\margm{text}}
     \desc{counteracts the effect of \gls{textsc}}
  }
  % \glsxtrsmfont
  \gcmd{gls\-xtr\-sm\-font}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{text}}
     \desc{maintained for backwards-compatibility used to typeset
       \meta{text} in a smaller font (\gls{textsmaller}) for the \qt{sm}
        abbreviation styles}
  }
  % \glsxtrfirstsmfont
  \gcmd{gls\-xtr\-first\-sm\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{maintained for backwards-compatibility used to typeset
       \meta{text} in a smaller font (\gls{textsmaller}) for the \qt{sm}
        abbreviation styles on \idx{firstuse}}
  }
  % \glsabbrvsmfont
  \gcmd{gls\-abbrv\-sm\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{sm} abbreviation styles}
  }
  % \glsfirstabbrvsmfont
  \gcmd{gls\-first\-abbrv\-sm\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{sm} abbreviation styles on \idx{firstuse}}
  }
  % \glsabbrvemfont
  \gcmd{gls\-abbrv\-em\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{em} abbreviation styles}
  }
  % \glsfirstabbrvemfont
  \gcmd{gls\-first\-abbrv\-em\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{em} abbreviation styles on \idx{firstuse}}
  }
  % \glslongemfont
  \gcmd{gls\-long\-em\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{long form font used by the \qt{em} abbreviation styles}
  }
  % \glsfirstlongemfont
  \gcmd{gls\-first\-long\-em\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{long form font used by the \qt{em} abbreviation styles on \idx{firstuse}}
  }
  % \glsabbrvuserfont
  \gcmd{gls\-abbrv\-user\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{user} abbreviation styles}
  }
  % \glsfirstabbrvuserfont
  \gcmd{gls\-first\-abbrv\-user\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{user} abbreviation styles on \idx{firstuse}}
  }
  % \glslonguserfont
  \gcmd{gls\-long\-user\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{long form font used by the \qt{user} abbreviation styles}
  }
  % \glsfirstlonguserfont
  \gcmd{gls\-first\-long\-user\-font}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{text}}
     \desc{long form font used by the \qt{user} abbreviation styles on \idx{firstuse}}
  }
  % \glsuserdescription
  \gcmd{gls\-user\-de\-scrip\-tion}
  {
    \providedby{\sty{glossaries-extra} v1.30+}
     \syntax{\margm{text}\margm{entry-label}}
     \desc{description encapsulator for styles like
      \abbrstyle{long-short-user}}
  }
  % \glsxtrlongshortscusername
  \gcmd{gls\-xtr\-long\-short\-sc\-user\-name}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \desc{expands to the value for the \gloskey{name} key for
     styles like \abbrstyle{long-postshort-sc-user}}
  }
  % \glsxtrlongshortuserdescname
  \gcmd{gls\-xtr\-long\-short\-user\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
     \desc{expands to the value for the \gloskey{name} key for
     styles like \abbrstyle{long-short-user-desc}}
  }
  % \glsxtrlongshortscuserdescname
  \gcmd{gls\-xtr\-long\-short\-sc\-user\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \desc{expands to the value for the \gloskey{name} key for
     styles like \abbrstyle{long-postshort-sc-user-desc}}
  }
  % \glsxtrshortlonguserdescname
  \gcmd{gls\-xtr\-short\-long\-user\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
     \desc{expands to the value for the \gloskey{name} key for
     styles like \abbrstyle{short-long-user-desc}}
  }
  % \glsxtrifhyphenstart
  \gcmd{gls\-xtr\-if\-hyphen\-start}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}\margm{true}\margm{false}}
     \desc{if \meta{text} starts with a hyphen this does \meta{true}
      otherwise it does \meta{false}}
  }
  % \glsxtrlonghyphenshort
  \gcmd{gls\-xtr\-long\-hyphen\-short}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{long}\margm{short}\margm{insert}}
     \desc{formats the long and short form according to the
       \abbrstyle{long-hyphen-short-hyphen} style}
  }
  % \GLSxtrlonghyphenshort
  \gcmd{GLS\-xtr\-long\-hyphen\-short}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{long}\margm{short}\margm{insert}}
     \desc{as \gls{glsxtrlonghyphenshort} but converts \meta{insert}
      to \idx{allcaps}. The \meta{long} and \meta{short} arguments
      should be supplied as \idx{allcaps}}
  }
  % \glsxtrlonghyphennoshort
  \gcmd{gls\-xtr\-long\-hyphen\-noshort}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{long}\margm{insert}}
     \desc{formats the long form according to the
       \abbrstyle{long-hyphen-noshort-desc-noreg} style}
  }
  % \GLSxtrlonghyphennoshort
  \gcmd{GLS\-xtr\-long\-hyphen\-noshort}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{long}\margm{insert}}
     \desc{as \gls{glsxtrlonghyphennoshort} but converts
     \meta{insert} to \idx{allcaps} The \meta{long} argument
      should be supplied as \idx{allcaps}}
  }
  % \glsxtrlonghyphen
  \gcmd{gls\-xtr\-long\-hyphen}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{long}\margm{insert}}
     \desc{formats the long form according to the
       \abbrstyle{long-hyphen-postshort-hyphen} style}
  }
  % \xpglsxtrposthyphenshort
  \gcmd{xp\-gls\-xtr\-post\-hyphen\-short}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \desc{used within the \idx{postlinkhook} for the
       \abbrstyle{long-hyphen-postshort-hyphen} style on
       \idx{firstuse}. This expands the placeholder commands and uses 
        either \gls{glsxtrposthyphenshort} or \gls{GLSxtrposthyphenshort}}
  }
  % \glsxtrposthyphenshort
  \gcmd{gls\-xtr\-post\-hyphen\-short}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used within the \idx{postlinkhook} to format the short form according to the
       \abbrstyle{long-hyphen-postshort-hyphen} style on \idx{firstuse}}
  }
  % \GLSxtrposthyphenshort
  \gcmd{GLS\-xtr\-post\-hyphen\-short}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{as \gls{glsxtrposthyphenshort} but \idx{allcaps}}
  }
  % \glsxtrposthyphenshortpl
  \gcmd{gls\-xtr\-post\-hyphen\-short\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{as \gls{glsxtrposthyphenshort} but plural}
  }
  % \GLSxtrposthyphenshortpl
  \gcmd{GLS\-xtr\-post\-hyphen\-short\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{as \gls{glsxtrposthyphenshortpl} but \idx{allcaps}}
  }
  % \glsxtrposthyphensubsequent
  \gcmd{gls\-xtr\-post\-hyphen\-sub\-sequent}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used within the \idx{postlinkhook} to format the insert according to the
       \abbrstyle{long-hyphen-postshort-hyphen} style on
       \idx{subsequentuse}}
  }
  % \GLSxtrposthyphensubsequent
  \gcmd{GLS\-xtr\-post\-hyphen\-sub\-sequent}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{as \gls{glsxtrposthyphensubsequent} but \idx{allcaps}}
  }
  % \xpglsxtrposthyphensubsequent
  \gcmd{xp\-gls\-xtr\-post\-hyphen\-subsequent}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \desc{used within the \idx{postlinkhook} for the
       \abbrstyle{long-hyphen-postshort-hyphen} style on
       \idx{subsequentuse}. This expands the placeholder commands and uses 
        either \gls{glsxtrposthyphensubsequent} or
       \gls{GLSxtrposthyphensubsequent}}
  }
  % \glsxtrshorthyphenlong
  \gcmd{gls\-xtr\-short\-hyphen\-long}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{short}\margm{long}\margm{insert}}
     \desc{formats the short and long form according to the
       \abbrstyle{short-hyphen-long-hyphen} style}
  }
  % \GLSxtrshorthyphenlong
  \gcmd{GLS\-xtr\-short\-hyphen\-long}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{short}\margm{long}\margm{insert}}
     \desc{as \gls{glsxtrshorthyphenlong} but \meta{insert} is
      converted to \idx{allcaps}}
  }
  % \glsxtrshorthyphen
  \gcmd{gls\-xtr\-short\-hyphen}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{short}\margm{entry-label}\margm{insert}}
     \desc{formats the short form according to the
       \abbrstyle{short-hyphen-postlong-hyphen} style}
  }
  % \glsxtrposthyphenlong
  \gcmd{gls\-xtr\-post\-hyphen\-long}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{used within the \idx{postlinkhook} to format the long form according to the
       \abbrstyle{short-hyphen-postlong-hyphen} style on \idx{firstuse}}
  }
  % \GLSxtrposthyphenlong
  \gcmd{GLS\-xtr\-post\-hyphen\-long}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{as \gls{glsxtrposthyphenlong} but \idx{allcaps}}
  }
  % \xpglsxtrposthyphenlong
  \gcmd{xp\-gls\-xtr\-post\-hyphen\-long}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \desc{used within the \idx{postlinkhook} for the
       \abbrstyle{short-hyphen-postlong-hyphen} style on
       \idx{firstuse}. This expands the placeholder commands and uses 
        either \gls{glsxtrposthyphenlong} or \gls{GLSxtrposthyphenlong}}
  }
  % \glsxtrposthyphenlongpl
  \gcmd{gls\-xtr\-post\-hyphen\-long\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{as \gls{glsxtrposthyphenlong} but shows the plural}
  }
  % \GLSxtrposthyphenlongpl
  \gcmd{GLS\-xtr\-post\-hyphen\-long\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{as \gls{glsxtrposthyphenlongpl} but \idx{allcaps}}
  }
  % \glsabbrvhyphenfont
  \gcmd{gls\-abbrv\-hyphen\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{hyphen} abbreviation styles}
  }
  % \glsfirstabbrvhyphenfont
  \gcmd{gls\-first\-abbrv\-hyphen\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{hyphen} abbreviation
     styles on \idx{firstuse}}
  }
  % \glslonghyphenfont
  \gcmd{gls\-long\-hyphen\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{long form font used by the \qt{hyphen} abbreviation styles}
  }
  % \glsfirstlonghyphenfont
  \gcmd{gls\-first\-long\-hyphen\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{long form font used by the \qt{hyphen} abbreviation
      styles on \idx{firstuse}}
  }
  % \glsabbrvonlyfont
  \gcmd{gls\-abbrv\-only\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{only} abbreviation styles}
  }
  % \glsfirstabbrvonlyfont
  \gcmd{gls\-first\-abbrv\-only\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{only} abbreviation
     styles on \idx{firstuse}}
  }
  % \glslongonlyfont
  \gcmd{gls\-long\-only\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{long form font used by the \qt{only} abbreviation styles}
  }
  % \glsfirstlongonlyfont
  \gcmd{gls\-first\-long\-only\-font}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \syntax{\margm{text}}
     \desc{long form font used by the \qt{only} abbreviation
      styles on \idx{firstuse}}
  }
  % \glsxtronlyname
  \gcmd{gls\-xtr\-only\-name}
  {
    \providedby{\sty{glossaries-extra} v1.25+}
     \desc{expands to the name value for styles like
     \abbrstyle{long-only-short-only}}
  }
  % \glsxtronlydescname
  \gcmd{gls\-xtr\-only\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \desc{expands to the name value for styles like
      \abbrstyle{long-only-short-only-desc}}
  }
  % \glsxtronlydescsort
  \gcmd{gls\-xtr\-only\-desc\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.17+}
     \desc{expands to the name value for styles like
       \abbrstyle{long-only-short-only-desc}}
  }
  % \glsabbrvsconlyfont
  \gcmd{gls\-abbrv\-sc\-only\-font}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{sc-only} styles, such as 
      \abbrstyle{long-only-short-sc-only}}
  }
  % \glsfirstabbrvsconlyfont
  \gcmd{gls\-first\-abbrv\-sc\-only\-font}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{text}}
     \desc{short form font used by the \qt{sc-only} abbreviation
     styles on \idx{firstuse}}
  }
  % \glsxtrsconlyname
  \gcmd{gls\-xtr\-sc\-only\-name}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \desc{expands to the name value for styles like 
        \abbrstyle{long-only-short-sc-only}}
  }
  % \glsxtrsconlydescsort
  \gcmd{gls\-xtr\-sc\-only\-desc\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \desc{expands to the sort value for styles like 
        \abbrstyle{long-only-short-sc-only-desc}}
  }
  % \glsxtrsconlydescname
  \gcmd{gls\-xtr\-sc\-only\-desc\-name}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \desc{expands to the name value for styles like 
        \abbrstyle{long-only-short-sc-only-desc}}
  }
  % \glsfirstinnerfmtlongfont
  \gcmd{gls\-first\-inner\-fmt\-long\-font}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{applies both \gls{glsfirstlongfont} and
      \gls{glsxtrgenentrytextfmt} to \meta{text}}
  }
  % \glsinnerfmtlongfont
  \gcmd{gls\-inner\-fmt\-long\-font}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{applies both \gls{glslongfont} and
      \gls{glsxtrgenentrytextfmt} to \meta{text}}
  }
  % \glsfirstxplongfont
  \gcmd{gls\-first\-xp\-long\-font}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{category}\margm{text}}
    \desc{if the \catattr{markwords} attribute is set for the
    given category, this encapsulates \meta{text} with
    \gls{glsfirstlongfont} otherwise with
    \gls{glsinnerfmtlongfont}. This command has to expand, so
    protect any content that shouldn't expand}
  }
  % \glsxplongfont
  \gcmd{gls\-xp\-long\-font}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}\margm{category}}
    \desc{if the \catattr{markwords} attribute is set for the
    given category, this encapsulates \meta{text} with
    \gls{glslongfont} otherwise with
    \gls{glsinnerfmtlongfont}. This command has to expand, so
    protect any content that shouldn't expand}
  }
  % \glsxtr<category><field>accsupp
  \gcmdmetameta{gls\-xtr}{category}{}{field}{acc\-supp}
  {%
    \note{user defined}
    \desc{expands to the accessibility support command for the given
     \idx{internalfieldlabel} and category, which is used by \gls{glsfieldaccsupp}}
  }
  % \glsfieldaccsupp
  \gcmd{gls\-field\-acc\-supp}
  {
     \providedby{\sty{glossaries-accsupp} v4.45+}
     \syntax{\margm{replacement}\margm{content}\margm{field}\margm{entry-label}}
     \desc{if \sty{glossaries-extra} has been loaded, this command
     will first check for the existence of the command 
     \gls{glsxtrcategoryfieldaccsupp}. If that command doesn't
     exist or if \sty{glossaries-extra} hasn't been loaded, it then
     checks for the existence of \csmetafmt{gls}{field}{accsupp} (for
     example, \gls{glsshortaccsupp}).
     Failing that it will use \gls{glsaccsupp}. Whichever command is
     found first, \code{\meta{cs}\margm{replacement}\margm{content}}
     is performed.}
  }
  % \glsaccsupp
  \gcmd{gls\-acc\-supp}
  {
     \providedby{\sty{glossaries-accsupp}}
     \syntax{\margm{replacement}\margm{content}}
     \desc{applies \meta{replacement} as the ActualText for
     \meta{content} using \gls{glsaccessibility}}
  }
  % \glsshortaccsupp
  \gcmd{gls\-short\-acc\-supp}
  {
     \providedby{\sty{glossaries-accsupp} v4.45+}
     \syntax{\margm{replacement}\margm{content}}
     \desc{applies \meta{replacement} as the expansion (E) attribute for
     \meta{content} using \gls{glsaccessibility}}
  }
  % \glsaccessibility
  \gcmd{gls\-ac\-ces\-si\-bil\-ity}
  {
     \providedby{\sty{glossaries-accsupp} v4.45+}
     \syntax{\oargm{options}\margm{PDF element}\margm{value}\margm{content}}
     \desc{applies \meta{value} as the accessibility attribute
     \meta{PDF element} for the given \meta{content}. This
     internally uses the accessibility support provided by \sty{accsupp}}
  }
  % 
  % ABBREVIATION STYLES
  \gidxpl{abbrvstyle}%
  {%
    \common
    \field{text}{abbreviation style}%
    \desc{abbreviations defined using \gls{newabbreviation} will
    follow the style associated with the entry's category. If there
    is no style associated with the entry's category, the style for
    the \cat{abbreviation} category is used (the default is
    \abbrstyle{long-short}). Note that
    \sty{glossaries-extra} redefines \gls{newacronym} to use
    \gls{newabbreviation} with \code{\gloskey{category}\dequals\cat{acronym}}
    so any entry defined with \gls{newacronym} will use the
    abbreviation style for the \cat{acronym} category (the
    default is \abbrstyle{short-nolong})}
  }
  % long-short
  \gabbrsty{long\dhyphen short}%
  {%
    \desc{an \idx{abbrvstyle} that shows the long form followed by the
    short form on \idx{firstuse}. If the \meta{insert} argument is
    used with the \idx{glslike} or \idx{glstextlike} commands, it will
    be placed after the long form on \idx{firstuse}. On
    \idx{subsequentuse}, only the short form is shown (followed by
    \meta{insert}, if provided). This style sets the
    \catattr{regular} attribute to \code{false} (which means that 
    the \idx{glslike} commands won't use the
    \gloskey{first}\slash\gloskey{firstplural} or
    \gloskey{text}\slash\gloskey{plural} values)}
  }
  % long-short-desc
  \gabbrsty{long\dhyphen short\dhyphen desc}%
  {%
    \desc{as \abbrstyle{long-short} but the \gloskey{description}
     must be supplied in \meta{options}}
  }
  % short-long
  \gabbrsty{short\dhyphen long}%
  {%
    \desc{an \idx{abbrvstyle} that shows the short form followed by the
    long form on \idx{firstuse}. If the \meta{insert} argument is
    used with the \idx{glslike} or \idx{glstextlike} commands, it will
    be placed after the short form on \idx{firstuse}. On
    \idx{subsequentuse}, only the short form is shown (followed by
    \meta{insert}, if provided). This style sets the
    \catattr{regular} attribute to \code{false} (which means that 
    the \idx{glslike} commands won't use the
    \gloskey{first}\slash\gloskey{firstplural} or
    \gloskey{text}\slash\gloskey{plural} values)}
  }
  % short-long-desc
  \gabbrsty{short\dhyphen long\dhyphen desc}%
  {%
    \desc{as \abbrstyle{short-long} but the \gloskey{description}
     must be supplied in \meta{options}}
  }
  % short-nolong
  \gabbrsty{short\dhyphen nolong}%
  {%
    \desc{an \idx{abbrvstyle} that only shows the short form on 
    \idx{firstuse} and \idx{subsequentuse}. The long form won't be
    showed unless you use a command like \gls{glsxtrlong}. The full
    form will only be shown with commands like \gls{glsxtrfull}.  
    This style sets the \catattr{regular} attribute to \code{true}}
  }
  % short
  \gabbrstyalias{short}{short-nolong}
  % short-nolong-desc
  \gabbrsty{short\dhyphen nolong\dhyphen desc}%
  {%
    \desc{as \abbrstyle{short-nolong} but the \gloskey{description}
     must be supplied in \meta{options}}
  }
  % short-desc
  \gabbrstyalias{short\dhyphen desc}{short-nolong-desc}
  % short-nolong-noreg
  \gabbrsty{short\dhyphen nolong\dhyphen noreg}%
  {%
    \desc{as \abbrstyle{short-nolong} but it will set the
    \catattr{regular} attribute to \code{false}}
  }
  % short-nolong-desc-noreg
  \gabbrsty{short\dhyphen nolong\dhyphen desc\dhyphen noreg}%
  {%
    \desc{as \abbrstyle{short-nolong-desc} but it will set the
    \catattr{regular} attribute to \code{false}}
  }
  % short-sc-nolong
  \gabbrsty{short\dhyphen sc\dhyphen nolong}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % short-sc
  \gabbrstyalias{short\dhyphen sc}{short-sc-nolong}
  % short-sc-nolong-desc
  \gabbrsty{short\dhyphen sc\dhyphen nolong\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong-desc} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % short-sc-desc
  \gabbrstyalias{short\dhyphen sc\dhyphen desc}{short-sc-nolong-desc}
  % nolong-short
  \gabbrsty{nolong\dhyphen short}%
  {%
     \desc{as \abbrstyle{short-nolong} but the \idx{inlinefullform}
      shows the long form followed by the short form in parentheses}
  }
  % nolong-short-noreg
  \gabbrsty{nolong\dhyphen short\dhyphen noreg}%
  {%
    \desc{as \abbrstyle{nolong-short} but it will set the
    \catattr{regular} attribute to \code{false}}
  }
  % nolong-short-sc
  \gabbrsty{nolong\dhyphen short\dhyphen sc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{nolong-short} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % long-noshort
  \gabbrsty{long\dhyphen noshort}%
  {%
    \desc{an \idx{abbrvstyle} that only shows the long form on 
    \idx{firstuse} and \idx{subsequentuse}. The short form won't be
    showed unless you use a command like \gls{glsxtrshort}. The full
    form will only be shown with commands like \gls{glsxtrfull}.  
    This style sets the \catattr{regular} attribute to \code{true}}
  }
  % long
  \gabbrstyalias{long}{long-noshort}
  % long-noshort-desc
  \gabbrsty{long\dhyphen noshort\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} that only shows the long form on 
    \idx{firstuse} and \idx{subsequentuse}. The short form won't be
    showed unless you use a command like \gls{glsxtrshort}. The
    \gloskey{description} key must be supplied. The full
    form will only be shown with commands like \gls{glsxtrfull}.  
    This style sets the \catattr{regular} attribute to \code{true}}
  }
  % long-desc
  \gabbrstyalias{long-desc}{long-noshort-desc}
  % long-noshort-desc-noreg
  \gabbrsty{long\dhyphen noshort\dhyphen desc\dhyphen noreg}%
  {%
    \desc{as \abbrstyle{long-noshort-desc} but it will set the
    \catattr{regular} attribute to \code{false}}
  }
  % long-noshort-noreg
  \gabbrsty{long\dhyphen noshort\dhyphen noreg}%
  {%
    \desc{as \abbrstyle{long-noshort} but it will set the
    \catattr{regular} attribute to \code{false}}
  }
  % long-noshort-sc
  \gabbrsty{long\dhyphen noshort\dhyphen sc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % long-noshort-sc-desc
  \gabbrsty{long\dhyphen noshort\dhyphen sc\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % long-short-sc
  \gabbrsty{long\dhyphen short\dhyphen sc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % long-short-sc-desc
  \gabbrsty{long\dhyphen short\dhyphen sc\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-desc} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % short-sc-long
  \gabbrsty{short\dhyphen sc\dhyphen long}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % short-sc-long-desc
  \gabbrsty{short\dhyphen sc\dhyphen long\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-desc} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % long-short-sm
  \gabbrsty{long\dhyphen short\dhyphen sm}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % long-short-sm-desc
  \gabbrsty{long\dhyphen short\dhyphen sm\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-desc} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % long-short-em
  \gabbrsty{long\dhyphen short\dhyphen em}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % long-short-em-desc
  \gabbrsty{long\dhyphen short\dhyphen em\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-desc} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % long-em-short-em
  \gabbrsty{long\dhyphen em\dhyphen short\dhyphen em}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but
      formats both the long and short form in an emphasized font (\gls{emph})}
  }
  % long-em-short-em-desc
  \gabbrsty{long\dhyphen em\dhyphen short\dhyphen em\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-desc} but
      formats both the long and short form in an emphasized font (\gls{emph})}
  }
  % short-sm-long
  \gabbrsty{short\dhyphen sm\dhyphen long}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-sm-long-desc
  \gabbrsty{short\dhyphen sm\dhyphen long\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-desc} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-sm-nolong
  \gabbrsty{short\dhyphen sm\dhyphen nolong}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-sm
  \gabbrstyalias{short\dhyphen sm}{short-sm-nolong}
  % short-sm-nolong-desc
  \gabbrsty{short\dhyphen sm\dhyphen nolong\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong-desc} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-sm-desc
  \gabbrstyalias{short\dhyphen sm\dhyphen desc}{short-sm-nolong-desc}
  % nolong-short-sm
  \gabbrsty{nolong\dhyphen short\dhyphen sm}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{nolong-short} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % long-noshort-sm
  \gabbrsty{long\dhyphen noshort\dhyphen sm}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % long-noshort-sm-desc
  \gabbrsty{long\dhyphen noshort\dhyphen sm\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-em-long
  \gabbrsty{short\dhyphen em\dhyphen long}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % short-em-long-desc
  \gabbrsty{short\dhyphen em\dhyphen long\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-desc} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % short-em-long-em
  \gabbrsty{short\dhyphen em\dhyphen long\dhyphen em}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but
      formats both the long and short form in an emphasized font (\gls{emph})}
  }
  % short-em-long-em-desc
  \gabbrsty{short\dhyphen em\dhyphen long\dhyphen em\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-desc} but
      formats both the long and short form in an emphasized font (\gls{emph})}
  }
  % short-em-nolong
  \gabbrsty{short\dhyphen em\dhyphen nolong}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % short-em
  \gabbrstyalias{short\dhyphen em}{short-em-nolong}
  % short-em-nolong-desc
  \gabbrsty{short\dhyphen em\dhyphen nolong\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong-desc} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % short-em-desc
  \gabbrstyalias{short\dhyphen em\dhyphen desc}{short-em-nolong-desc}
  % nolong-short-em
  \gabbrsty{nolong\dhyphen short\dhyphen em}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{nolong-short} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % long-noshort-em
  \gabbrsty{long\dhyphen noshort\dhyphen em}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % long-noshort-em-desc
  \gabbrsty{long\dhyphen noshort\dhyphen em\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % long-em-noshort-em
  \gabbrsty{long\dhyphen em\dhyphen noshort\dhyphen em}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort} but
      formats both the long and short form in an emphasized font (\gls{emph})}
  }
  % long-em-noshort-em-desc
  \gabbrsty{long\dhyphen em\dhyphen noshort\dhyphen em\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but
      formats both the long and short form in an emphasized font (\gls{emph})}
  }
  % long-em-noshort-em-noreg
  \gabbrsty{long\dhyphen em\dhyphen noshort\dhyphen em\dhyphen noreg}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-em-noshort-em} but
      sets the \catattr{regular} attribute to \code{false}}
  }
  % long-em-noshort-em-desc-noreg
  \gabbrsty{long\dhyphen em\dhyphen noshort\dhyphen em\dhyphen desc\dhyphen noreg}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-em-noshort-em-desc} but
      sets the \catattr{regular} attribute to \code{false}}
  }
  % short-footnote
  \gabbrsty{short\dhyphen footnote}%
  {%
    \desc{an \idx{abbrvstyle} that shows the short form with the
    long form as a footnote on \idx{firstuse}. If the \meta{insert} argument is
    used with the \idx{glslike} or \idx{glstextlike} commands, it will
    be placed after the short form, before the footnote marker, on \idx{firstuse}. On
    \idx{subsequentuse}, only the short form is shown (followed by
    \meta{insert}, if provided). The \idx{inlinefullform} shows the
    short form followed by the long form in parentheses. This style sets the
    \catattr{regular} attribute to \code{false} (which means that 
    the \idx{glslike} commands won't use the
    \gloskey{first}\slash\gloskey{firstplural} or
    \gloskey{text}\slash\gloskey{plural} values). This style also
    sets the \catattr{nohyperfirst} attribute to \code{true} to
    avoid nesting the footnote marker link. If you want hyperlinks
    on \idx{firstuse}, use the \abbrstyle{short-postfootnote} style
    instead}
  }
  % footnote
  \gabbrstyalias{footnote}{short-footnote}
  % short-footnote-desc
  \gabbrsty{short\dhyphen footnote\dhyphen desc}%
  {%
    \desc{as \abbrstyle{short-footnote} but the \gloskey{description}
     must be supplied in \meta{options}}
  }
  % footnote-desc
  \gabbrstyalias{footnote\dhyphen desc}{short-footnote-desc}
  % short-postfootnote
  \gabbrsty{short\dhyphen postfootnote}%
  {%
    \desc{similar to \abbrstyle{short-footnote} but the footnote is
     placed in the \idx{postlinkhook}}
  }
  % postfootnote
  \gabbrstyalias{postfootnote}{short-postfootnote}
  % short-postfootnote-desc
  \gabbrsty{short\dhyphen postfootnote\dhyphen desc}%
  {%
    \desc{as \abbrstyle{short-postfootnote} but the \gloskey{description}
     must be supplied in \meta{options}}
  }
  % postfootnote-desc
  \gabbrstyalias{postfootnote\dhyphen desc}{short-postfootnote-desc}
  % short-sc-footnote
  \gabbrsty{short\dhyphen sc\dhyphen footnote}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % short-sc-footnote-desc
  \gabbrsty{short\dhyphen sc\dhyphen footnote\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote-desc} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % short-sc-postfootnote
  \gabbrsty{short\dhyphen sc\dhyphen postfootnote}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % short-sc-postfootnote-desc
  \gabbrsty{short\dhyphen sc\dhyphen postfootnote\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote-desc} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % short-sm-footnote
  \gabbrsty{short\dhyphen sm\dhyphen footnote}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-sm-footnote-desc
  \gabbrsty{short\dhyphen sm\dhyphen footnote\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote-desc} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-sm-postfootnote
  \gabbrsty{short\dhyphen sm\dhyphen postfootnote}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-sm-postfootnote-desc
  \gabbrsty{short\dhyphen sm\dhyphen postfootnote\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote-desc} but
      formats the short form in a smaller font (\gls{textsmaller}).
      The \sty{relsize} package is must be loaded}
  }
  % short-em-footnote
  \gabbrsty{short\dhyphen em\dhyphen footnote}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % short-em-footnote-desc
  \gabbrsty{short\dhyphen em\dhyphen footnote\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote-desc} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % short-em-postfootnote
  \gabbrsty{short\dhyphen em\dhyphen postfootnote}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % short-em-postfootnote-desc
  \gabbrsty{short\dhyphen em\dhyphen postfootnote\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote-desc} but
      formats the short form in an emphasized font (\gls{emph})}
  }
  % long-short-user
  \gabbrsty{long\dhyphen short\dhyphen user}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but
      includes the value of the field identified by
     \gls{glsxtruserfield} (if set) in the parenthetical content}
  }
  % long-postshort-user
  \gabbrsty{long\dhyphen postshort\dhyphen user}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-user} but
      the parenthetical content is placed in the \idx{postlinkhook}}
  }
  % long-short-user-desc
  \gabbrsty{long\dhyphen short\dhyphen user\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-user} but
      the description must be supplied}
  }
  % long-postshort-user-desc
  \gabbrsty{long\dhyphen postshort\dhyphen user\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-postshort-user} but
      the description must be supplied}
  }
  % long-postshort-sc-user
  \gabbrsty{long\dhyphen postshort\dhyphen sc\dhyphen user}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-postshort-user} but
      formats the short form in a small caps font (\gls{textsc}).
      The short form should therefore be in lowercase}
  }
  % long-postshort-sc-user-desc
  \gabbrsty{long\dhyphen postshort\dhyphen sc\dhyphen user\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-postshort-sc-user} but
      the description must be supplied}
  }
  % short-postlong-user
  \gabbrsty{short\dhyphen postlong\dhyphen user}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but
      includes the value of the field identified by
     \gls{glsxtruserfield} (if set) in the parenthetical content,
     which is placed in the \idx{postlinkhook}}
  }
  % short-postlong-user-desc
  \gabbrsty{short\dhyphen postlong\dhyphen user\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-postlong-user} but
      the description must be supplied}
  }
  % short-long-user
  \gabbrsty{short\dhyphen long\dhyphen user}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but
      includes the value of the field identified by
     \gls{glsxtruserfield} (if set) in the parenthetical content}
  }
  % short-long-user-desc
  \gabbrsty{short\dhyphen long\dhyphen user\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-user} but
      the description must be supplied}
  }
  % long-hyphen-short-hyphen
  \gabbrsty{long\dhyphen hyphen\dhyphen short\dhyphen hyphen}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but
      checks if the inserted material starts with a hyphen (use with
      \catattr{markwords} or \catattr{markshortwords} attributes)}
  }
  % long-hyphen-postshort-hyphen
  \gabbrsty{long\dhyphen hyphen\dhyphen postshort\dhyphen hyphen}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-hyphen-short-hyphen} but
      places the insert and parenthetical material in the \idx{postlinkhook}}
  }
  % long-hyphen-short-hyphen-desc
  \gabbrsty{long\dhyphen hyphen\dhyphen short\dhyphen hyphen\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-hyphen-short-hyphen} but
      the description must be supplied}
  }
  % long-hyphen-postshort-hyphen-desc
  \gabbrsty{long\dhyphen hyphen\dhyphen postshort\dhyphen hyphen\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-hyphen-short-hyphen-desc} but
      places the insert and parenthetical material in the \idx{postlinkhook}}
  }
  % long-hyphen-noshort-desc-noreg
  \gabbrsty{long\dhyphen hyphen\dhyphen noshort\dhyphen desc\dhyphen noreg}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but
      checks if the inserted material starts with a hyphen (use with
      \catattr{markwords} attribute)}
  }
  % long-hyphen-noshort-noreg
  \gabbrsty{long\dhyphen hyphen\dhyphen noshort\dhyphen noreg}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-hyphen-short-hyphen} but
      doesn't show the short form on \idx{firstuse}}
  }
  % short-hyphen-long-hyphen
  \gabbrsty{short\dhyphen hyphen\dhyphen long\dhyphen hyphen}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but
      checks if the inserted material starts with a hyphen (use with
      \catattr{markwords} or \catattr{markshortwords} attributes)}
  }
  % short-hyphen-long-hyphen-desc
  \gabbrsty{short\dhyphen hyphen\dhyphen long\dhyphen hyphen\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-hyphen-long-hyphen} but
      the description must be supplied}
  }
  % short-hyphen-postlong-hyphen
  \gabbrsty{short\dhyphen hyphen\dhyphen postlong\dhyphen hyphen}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-hyphen-long-hyphen} but
      the insert and parenthetical material are placed in the \idx{postlinkhook}}
  }
  % short-hyphen-postlong-hyphen-desc
  \gabbrsty{short\dhyphen hyphen\dhyphen postlong\dhyphen hyphen\dhyphen desc}%
  {%
    \desc{an \idx{abbrvstyle} like \abbrstyle{short-hyphen-long-hyphen-desc} but
      the insert and parenthetical material are placed in the \idx{postlinkhook}}
  }
  % long-only-short-only
  \gabbrsty{long\dhyphen only\dhyphen short\dhyphen only}
  {
    \desc{an \idx{abbrvstyle} that only shows the long form on
     \idx{firstuse} and only shows the short form on \idx{subsequentuse}}
  }
  % long-only-short-only-desc
  \gabbrsty{long\dhyphen only\dhyphen short\dhyphen only\dhyphen desc}
  {
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-only-short-only}
     but the description must be supplied}
  }
  % long-only-short-sc-only
  \gabbrsty{long\dhyphen only\dhyphen short\dhyphen sc\dhyphen only}
  {
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-only-short-only}
     but uses \idx{smallcaps} for the short form}
  }
  % long-only-short-sc-only-desc
  \gabbrsty{long\dhyphen only\dhyphen short\dhyphen sc\dhyphen only\dhyphen desc}
  {
    \desc{an \idx{abbrvstyle} like \abbrstyle{long-only-short-sc-only}
     but the description must be supplied}
  }
  % long-sc
  \gdepabbrsty{long\dhyphen sc}{long-noshort-sc}
  % long-desc-sc
  \gdepabbrsty{long\dhyphen desc\dhyphen sc}{long-noshort-sc-desc}
  % footnote-sc
  \gdepabbrsty{footnote\dhyphen sc}{short-sc-footnote}
  % postfootnote-sc
  \gdepabbrsty{postfootnote\dhyphen sc}{short-sc-postfootnote}
  % long-sm
  \gdepabbrsty{long\dhyphen sm}{long-noshort-sm}
  % long-desc-sm
  \gdepabbrsty{long\dhyphen desc\dhyphen sm}{long-noshort-sm-desc}
  % footnote-sm
  \gdepabbrsty{footnote\dhyphen sm}{short-sm-footnote}
  % postfootnote-sm
  \gdepabbrsty{postfootnote\dhyphen sm}{short-sm-postfootnote}
  % long-em
  \gdepabbrsty{long\dhyphen em}{long-noshort-em}
  % long-desc-em
  \gdepabbrsty{long\dhyphen desc\dhyphen em}{long-noshort-em-desc}
  % footnote-em
  \gdepabbrsty{footnote\dhyphen em}{short-em-footnote}
  % postfootnote-em
  \gdepabbrsty{postfootnote\dhyphen em}{short-em-postfootnote}
  % base acronym styles
  \gidx{acronymstyle}{\name{acronym (base) style}%
     \field{text}{acronym style}
  }
  \gacrsty{long\dhyphen short}{}
  \gacrsty{long\dhyphen sc\dhyphen short}{}
  \gacrsty{long\dhyphen sm\dhyphen short}{}
  \gacrsty{long\dhyphen sp\dhyphen short}{}
  \gacrsty{short\dhyphen long}{}
  \gacrsty{sc\dhyphen short\dhyphen long}{}
  \gacrsty{sm\dhyphen short\dhyphen long}{}
  \gacrsty{long\dhyphen short\dhyphen desc}{}
  \gacrsty{long\dhyphen sc\dhyphen short\dhyphen desc}{}
  \gacrsty{long\dhyphen sm\dhyphen short\dhyphen desc}{}
  \gacrsty{long\dhyphen sp\dhyphen short\dhyphen desc}{}
  \gacrsty{short\dhyphen long\dhyphen desc}{}
  \gacrsty{sc\dhyphen short\dhyphen long\dhyphen desc}{}
  \gacrsty{sm\dhyphen short\dhyphen long\dhyphen desc}{}
  \gacrsty{dua}{}
  \gacrsty{dua\dhyphen desc}{}
  \gacrsty{footnote}{}
  \gacrsty{footnote\dhyphen sc}{}
  \gacrsty{footnote\dhyphen sm}{}
  \gacrsty{footnote\dhyphen desc}{}
  \gacrsty{footnote\dhyphen sc\dhyphen desc}{}
  \gacrsty{footnote\dhyphen sm\dhyphen desc}{}
  % GLOSSARY STYLES:
  % \setglossarystyle
  \gcmd{set\-glossary\-style}%
  {%
    \providedby{\sty{glossaries} v3.08a+}%
    \syntax{\margm{style-name}}
    \desc{set the current \idx{glossarystyle} to \meta{style-name}.
     Redefined by \sty{glossaries-extra} to include \gls{glsxtrpreglossarystyle}}
  }
  % \glsxtrpreglossarystyle
  \gcmd{gls\-xtr\-pre\-glossary\-style}
  {
    \providedby{\sty{glossaries-extra} v1.49+}%
    \desc{hook performed by \gls{setglossarystyle} to initialise
    default definitions of style commands}
  }
  \gidxpl{glossarystyle}%
  {%
    \common
    \field{text}{glossary style}%
    \desc{the default style may be set with \gls{setglossarystyle}
or use:
\begin{compactcodebox}
\csfmt{usepackage}[\optval{stylemods}{\meta{name}},\optval{style}{\meta{style-name}}]\marg{glossaries-extra}
\end{compactcodebox}
where the style is provided by package \styfmt{glossary-\meta{name}}. 
The default style can be overridden for individual \idxpl{glossary}
with the \printglossopt{style} option. For a summary of all
available styles, see \gallerypage{glossaries-styles}{Gallery:
Predefined Styles}}
  }
  % glossary style: inline
  \gglosty{inline}%
  {%
    \providedby{\sty{glossary-inline}}%
    \desc{a compact style with all entries listed in the
    same paragraph and no \idxpl{group}, locations or symbols}
  }
  % glossary style: list
  \gglosty{list}%
  {%
    \providedby{\sty{glossary-list}}%
    \desc{this style uses the \env{description} environment
     and places the entry name in the optional argument of
     \gls{item}. Symbols and sub-entry names are not shown}
  }
  % glossary style: listgroup
  \gglosty{list\-group}%
  {%
    \providedby{\sty{glossary-list}}%
    \desc{as \glostyle{list} but has headers at the start of each
      \idx{group}}
  }
  % glossary style: listhypergroup
  \gglosty{list\-hyper\-group}%
  {%
    \providedby{\sty{glossary-list}}%
    \desc{as \glostyle{listgroup} but has a row at the start with
    hyperlinks to each \idx{group}}
  }
  % glossary style: altlist
  \gglosty{alt\-list}%
  {%
    \providedby{\sty{glossary-list}}%
    \desc{as \glostyle{list} but starts the description on a new line}
  }
  % glossary style: listdotted
  \gglosty{list\-dotted}%
  {%
    \providedby{\sty{glossary-list}}%
    \desc{a \glostyle{list}-like style that has a dotted leader
between the name and description. The \idx{locationlist} isn't shown}
  }
  % glossary style: long
  \gglosty{long}%
  {%
    \providedby{\sty{glossary-long}}%
    \desc{this style uses the \env{longtable} environment
     (provided by the \sty{longtable} package). Symbols and 
     sub-entry names are not shown}
  }
  % glossary style: longheader
  \gglosty{longheader}%
  {%
    \providedby{\sty{glossary-long}}%
    \desc{this style uses the \env{longtable} environment
     (provided by the \sty{longtable} package) with a header row. Symbols and 
     sub-entry names are not shown}
  }
  % glossary style: long-name-desc
  \gglosty{long\dhyphen name\dhyphen desc}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with two columns: the
     name and the description}
  }
  % glossary style: long-desc-name
  \gglosty{long\dhyphen desc\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with two columns: the
     description and the name}
  }
  % glossary style: long-name-desc-loc
  \gglosty{long\dhyphen name\dhyphen desc\dhyphen loc}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     name, description and \idx{locationlist}}
  }
  % glossary style: long-loc-desc-name
  \gglosty{long\dhyphen loc\dhyphen desc\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     \idx{locationlist}, description and name}
  }
  % glossary style: long-name-desc-sym
  \gglosty{long\dhyphen name\dhyphen desc\dhyphen sym}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     name, description and symbol}
  }
  % glossary style: long-name-desc-sym-loc
  \gglosty{long\dhyphen name\dhyphen desc\dhyphen sym\dhyphen loc}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with four columns: the
     name, description, symbol and \idx{locationlist}}
  }
  % glossary style: long-name-sym-desc
  \gglosty{long\dhyphen name\dhyphen sym\dhyphen desc}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     name, symbol and description}
  }
  % glossary style: long-name-sym-desc-loc
  \gglosty{long\dhyphen name\dhyphen sym\dhyphen desc\dhyphen loc}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with four columns: the
     name, symbol, description and \idx{locationlist}}
  }
  % glossary style: long-sym-desc-name
  \gglosty{long\dhyphen sym\dhyphen desc\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     symbol, description and name}
  }
  % glossary style: long-loc-sym-desc-name
  \gglosty{long\dhyphen loc\dhyphen sym\dhyphen desc\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with four columns: the
     \idx{locationlist}, symbol, description and name}
  }
  % glossary style: long-desc-sym-name
  \gglosty{long\dhyphen desc\dhyphen sym\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     description, symbol and name}
  }
  % glossary style: long-loc-desc-sym-name
  \gglosty{long\dhyphen loc\dhyphen desc\dhyphen sym\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.37+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with four columns: the
     \idx{locationlist}, description, symbol and name}
  }
  % glossary style: long-sym-desc
  \gglosty{long\dhyphen sym\dhyphen desc}%
  {%
    \providedby{\sty{glossary-longextra} v1.49+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with two columns: the
     symbol and the description}
  }
  % glossary style: long-desc-sym
  \gglosty{long\dhyphen desc\dhyphen sym}%
  {%
    \providedby{\sty{glossary-longextra} v1.49+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with two columns: the
     description and the symbol}
  }
  % glossary style: abbr-short-long
  \gglosty{abbr\dhyphen short\dhyphen long}%
  {%
    \providedby{\sty{glossary-longextra} v1.49+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with two columns: the
     short form and the long form}
  }
  % glossary style: abbr-long-short
  \gglosty{abbr\dhyphen long\dhyphen short}%
  {%
    \providedby{\sty{glossary-longextra} v1.49+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with two columns: the
     long form and the short form}
  }
  % glossary style: long-name-custom1
  \gglosty{long\dhyphen name\dhyphen custom1}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with two columns: the
     name and the custom 1 field}
  }
  % glossary style: long-name-custom2
  \gglosty{long\dhyphen name\dhyphen custom2}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     name, custom 1 field and custom 2 field}
  }
  % glossary style: long-name-custom3
  \gglosty{long\dhyphen name\dhyphen custom3}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with four columns: the
     name, custom 1 field, custom 2 field and custom 3 field}
  }
  % glossary style: long-name-custom1-desc
  \gglosty{long\dhyphen name\dhyphen custom1\dhyphen desc}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     name, the custom 1 field and the description}
  }
  % glossary style: long-name-custom2-desc
  \gglosty{long\dhyphen name\dhyphen custom2\dhyphen desc}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with four columns: the
     name, the custom 1 field, the custom 2 field and the description}
  }
  % glossary style: long-name-custom3-desc
  \gglosty{long\dhyphen name\dhyphen custom3\dhyphen desc}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with five columns: the
     name, the custom 1 field, the custom 2 field, the custom 3
     field and the description}
  }
  % glossary style: long-custom1-name
  \gglosty{long\dhyphen custom1\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with two columns: the
     custom 1 field and the name}
  }
  % glossary style: long-custom2-name
  \gglosty{long\dhyphen custom2\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: 
     the custom 1 field, custom 2 field, and the name}
  }
  % glossary style: long-custom3-name
  \gglosty{long\dhyphen custom3\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with four columns: the
     custom 1 field, custom 2 field, custom 3 field, and the name}
  }
  % glossary style: long-desc-custom1-name
  \gglosty{long\dhyphen desc\dhyphen custom1\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with three columns: the
     description, the custom 1 field and the name}
  }
  % glossary style: long-desc-custom2-name
  \gglosty{long\dhyphen desc\dhyphen custom2\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with four columns: the
     description, the custom 1 field, the custom 2 field and the name}
  }
  % glossary style: long-desc-custom3-name
  \gglosty{long\dhyphen desc\dhyphen custom3\dhyphen name}%
  {%
    \providedby{\sty{glossary-longextra} v1.50+}%
    \desc{this style displays the \idx{glossary} in a table for
    (either \env{longtable} or \env{tabular}) with five columns: the
     description, the custom 1 field, the custom 2 field, the custom 3
     field and the name}
  }
  % glossary style: long-booktabs
  \gglosty{long\dhyphen booktabs}
  {%
    \providedby{\sty{glossary-longbooktabs} v4.21+}%
    \desc{this style displays the \idx{glossary} using
    \env{longtable} and horizontal rules from the \sty{booktabs} package}
  }
  % glossary style: longragged
  \gglosty{longragged}
  {%
    \providedby{\sty{glossary-longragged}}%
    \desc{this style displays the \idx{glossary} using
    \env{longtable} with ragged right paragraph formatting for the
    description column}
  }
  % glossary style: super
  \gglosty{super}
  {%
    \providedby{\sty{glossary-super}}%
    \desc{this style displays the \idx{glossary} using
    \env{supertabular}}
  }
  % glossary style: superragged
  \gglosty{superragged}
  {%
    \providedby{\sty{glossary-superragged}}%
    \desc{this style displays the \idx{glossary} using
    \env{supertabular} with ragged right paragraph formatting for the
    description column}
  }
  % glossary style: topic
  \gglosty{topic}
  {
    \providedby{\sty{glossary-topic}}%
    \desc{this style is designed for hierarchical glossaries where
    the top-level entry represents a topic}
  }
  % glossary style: topicmcols
  \gglosty{topicmcols}
  {
    \providedby{\sty{glossary-topic}}%
    \desc{similar to \glostyle{topic} but the sub-entries are placed
    in a \env{multicols} environment}
  }
  % glossary style: table
  \gglosty{table}
  {
    \providedby{\sty{glossary-table}}%
    \desc{this style is specific to \gls{printunsrttable}}
  }
  % glossary style: bookindex
  \gglosty{bookindex}%
  {%
    \providedby{\sty{glossary-bookindex}}%
    \desc{this style is designed for indexes. Symbols and 
     descriptions are not shown. Since descriptions aren't shown,
     there's no \gls{postdeschook}}
  }
  % glossary style: index
  \gglosty{index}%
  {
    \providedby{\sty{glossary-tree}}%
    \desc{a hierarchical style that supports up to level~2, similar to normal indexes, but
     symbols and descriptions are shown}
  }
  % glossary style: tree
  \gglosty{tree}%
  {
    \providedby{\sty{glossary-tree}}%
    \desc{a hierarchical style that supports unlimited levels
     (although a deep hierarchy may not fit the available line width)
      with that shows symbols and descriptions}
  }
  % glossary style: treegroup
  \gglosty{tree\-group}%
  {
    \providedby{\sty{glossary-tree}}%
    \desc{as \glostyle{tree} but has headers at the start of each
      \idx{group}}
  }
  % glossary style: treehypergroup
  \gglosty{tree\-hyper\-group}%
  {%
    \providedby{\sty{glossary-tree}}%
    \desc{as \glostyle{treegroup} but has a row at the start with
    hyperlinks to each \idx{group}}
  }
  % glossary style: indexgroup
  \gglosty{index\-group}%
  {
    \providedby{\sty{glossary-tree}}%
    \desc{as \glostyle{index} but has headers at the start of each
      \idx{group}}
  }
  % glossary style: alttree
  \gglosty{alt\-tree}%
  {
    \providedby{\sty{glossary-tree}}%
    \desc{like \glostyle{tree} but the width of the widest name must
     be supplied (using a command like \gls{glssetwidest})}
  }
  % glossary style: alttreegroup
  \gglosty{alt\-tree\-group}%
  {
    \providedby{\sty{glossary-tree}}%
    \desc{as \glostyle{alttree} but has headers at the start of each
      \idx{group}}
  }
  % glossary style: treenoname
  \gglosty{tree\-no\-name}%
  {
    \providedby{\sty{glossary-tree}}%
    \desc{like \glostyle{tree} but the child entries don't have their
    name shown}
  }
  % glossary style: mcolindex
  \gglosty{mcol\-index}%
  {
    \providedby{\sty{glossary-mcols}}%
    \desc{as \glostyle{index} but puts the content inside a
      \env{multicols} environment}
  }
  % glossary style: mcolindexgroup
  \gglosty{mcol\-index\-group}%
  {
    \providedby{\sty{glossary-mcols}}%
    \desc{as \glostyle{mcolindex} but has headers at the start of each
      \idx{group}}
  }
  % glossary style: mcoltree
  \gglosty{mcol\-tree}%
  {
    \providedby{\sty{glossary-mcols}}%
    \desc{as \glostyle{tree} but puts the content inside a
      \env{multicols} environment}
  }
  % PACKAGE OPTIONS
  % package option prefix
  \gstyopt{prefix}
  {%
    \inpackage{glossaries-extra}
    \desc{loads \sty{glossaries-prefix}}
  }
  % package option accsupp
  \gstyopt{accsupp}
  {%
    \inpackage{glossaries-extra}
    \desc{loads \sty{glossaries-accsupp}}
  }
  % package option style
  \gstyopt{style}%
  {%
    \inpackage{glossaries}%
    \syntax{\meta{style-name}}
    \desc{sets the default \idx{glossarystyle} to \meta{style-name}}%
  }
  % package option nostyles
  \gstyopt{nostyles}%
  {%
    \inpackage{glossaries}%
    \desc{don't load the default set of predefined styles. Note that
    if \sty{glossaries} is loaded before \sty{glossaries-extra},
    then this option should be passed directly to \sty{glossaries}
    not \sty{glossaries-extra} otherwise it will be too late to
    implement}%
  }
  % package option nolist
  \gstyopt{nolist}%
  {%
    \inpackage{glossaries}%
    \desc{don't load \sty{glossary-list}, which is normally loaded
    automatically. Note that if \sty{glossaries} is loaded before 
    \sty{glossaries-extra},
    then this option should be passed directly to \sty{glossaries}
    not \sty{glossaries-extra} otherwise it will be too late to
    implement}%
  }
  % package option nolong
  \gstyopt{nolong}%
  {%
    \inpackage{glossaries}%
    \desc{don't load \sty{glossary-long}, which is normally loaded
    automatically. Note that if \sty{glossaries} is loaded before 
    \sty{glossaries-extra},
    then this option should be passed directly to \sty{glossaries}
    not \sty{glossaries-extra} otherwise it will be too late to
    implement}%
  }
  % package option nosuper
  \gstyopt{nosuper}%
  {%
    \inpackage{glossaries}%
    \desc{don't load \sty{glossary-super}, which is normally loaded
    automatically. Note that if \sty{glossaries} is loaded before 
    \sty{glossaries-extra},
    then this option should be passed directly to \sty{glossaries}
    not \sty{glossaries-extra} otherwise it will be too late to
    implement}%
  }
  % package option notree
  \gstyopt{notree}%
  {%
    \inpackage{glossaries}%
    \desc{don't load \sty{glossary-tree}, which is normally loaded
    automatically. Note that if \sty{glossaries} is loaded before 
    \sty{glossaries-extra},
    then this option should be passed directly to \sty{glossaries}
    not \sty{glossaries-extra} otherwise it will be too late to
    implement}%
  }
  % package option stylemods
  \gstyopt{stylemods}
  {%
    \inpackage{glossaries-extra}
    \syntax{\meta{value}}
    \defval{default}
    \desc{loads \sty{glossaries-extra-stylemods} with the given
    options. If \opteqvalref{stylemods}{default} then no options are
    passed to \sty{glossaries-extra-stylemods}}
  }
  % package option stylemods values
  % stylemods=default
  \goptval{stylemods}{default}{\desc{load
   \sty{glossaries-extra-stylemods} with no options (patches any
   predefined styles that have been loaded)}%
  }
  % stylemods=all
  \goptval{stylemods}{all}%
  {%
    \desc{load \sty{glossaries-extra-stylemods} with all predefined styles}%
  }
  % stylemods=<list>
  \goptmetaval{stylemods}{list}%
  {%
    \desc{load \sty{glossaries-extra-stylemods} with all the listed styles}%
  }
  \gstyopt{all}%
  {%
    \inpackage{glossaries-extra-stylemods}%
    \desc{load all predefined styles}%
  }
  \gstyopt{name}%
  {%
    \name{{}\meta{name}}%
    \inpackage{glossaries-extra-stylemods}%
    \desc{load package \styfmt{glossary-\meta{name}}}%
  }
  % package option section
  \gstyopt{section}
  {
    \inpackage{glossaries}%
    \syntax{\meta{value}}
    \defval{section}
    \desc{indicates which section heading command to use for the
    \idx{glossary}. The value may be one of the standard sectioning
    command's control sequence name (without the leading backslash),
    such as \code{chapter} or \code{section}}
  }
  % package option sort
  \gstyopt{sort}%
  {%
    \inpackage{glossaries}%
    \syntax{\meta{value}}
    \initval{standard}
    \desc{indicates how the \gloskey{sort} key should automatically
     be assigned if not explicitly provided (for \gls{makeglossaries}
     and \gls{makenoidxglossaries} only)}
  }
  \goptval{sort}{none}%
  {%
    \providedby{\sty{glossaries} v4.30+}
    \desc{don't process the \gloskey{sort} key. Use this option 
     if no \idx{indexing} is required for a slightly faster build}%
  }
  \goptval{sort}{clear}%
  {%
    \providedby{\sty{glossaries} v4.50+}
    \desc{sets the \gloskey{sort} key to an empty value. Use this option if no
     \idx{indexing} is required for a slightly faster build}%
  }%
  \goptval{sort}{standard}%
  {%
    \desc{use the value of the \gloskey{name} key as the default for the
     \gloskey{sort} key and implement the \gls{glsprestandardsort} hook}%
  }
  \goptval{sort}{def}%
  {%
    \desc{use the (zero-padded) order of definition as the default for the
     \gloskey{sort} key}%
  }
  \goptval{sort}{use}%
  {%
    \desc{use the (zero-padded) order of use as the default for the
     \gloskey{sort} key}%
  }
  % package option sanitizesort
  \gstyopt{sanitize\-sort}%
  {%
    \inpackage{glossaries}%
    \syntax{\meta{boolean}}
    \initvalvaries
    \defval{true}
    \desc{indicates whether the default sort value should be sanitized
      (only applicable with \opteqvalref{sort}{standard})}
  }
  % package option debug (base)
  \glsbibwriteentry{packageoption}{opt.base.debug}%
  {%
    \providedby{\sty{glossaries} v4.24+}%
    \field{name}{{}\styoptfmt{debug}}%
    \initval{false}%
    \syntax{\meta{value}}
    \inpackage{glossaries}
    \note{modified by \sty{glossaries-extra}['s] \opt{debug} option}
    \desc{adds markers to the document for debugging purposes}
  }
  % package option debug
  \gstyopt{debug}%
  {%
    \syntax{\meta{value}}
    \defval{true}%
    \initval{false}%
    \inpackage{glossaries-extra}
    \desc{provides debugging information. Some options are also
    available with just the base \sty{glossaries} package}
  }
  % package option debug values
  \goptval{debug}{true}%
  {%
    \providedby{\sty{glossaries} v4.24+}%
    \desc{writes \code{wrglossary(\meta{type})(\meta{\idx{indexing} info})} 
    to the \ext+{log} file if there is an attempt to index an entry 
    before the associated \idx{indexing} file has been opened (\app{makeindex} 
    and \app{xindy} only). With \sty{glossaries-extra}, this setting will
    also display the label of any undefined entries that are
    referenced in the document}
  }
  \goptval{debug}{false}%
  {%
    \providedby{\sty{glossaries} v4.24+}%
    \desc{disable debugging actions}
  }
  \goptval{debug}{showtargets}%
  {%
    \providedby{\sty{glossaries} v4.24+}%
    \desc{implements \optval{debug}{true} and also shows target
     markers in the document}%
    \field{seealso}{opt.showtargets}
  }
  \goptval{debug}{showaccsupp}%
  {%
    \providedby{\sty{glossaries} v4.45+}%
    \desc{implements \optval{debug}{true} and also shows accessibility information
    in the document}
  }
  \goptval{debug}{showwrgloss}%
  {%
    \providedby{\sty{glossaries-extra} v1.21+}%
    \desc{implements \optval{debug}{true} and also shows a marker
    in the document whenever the entry is \indexed\ and (if used
    with \opt{indexcounter}) will mark where the \ctr{wrglossary}
    counter is incremented}
  }
  \goptval{debug}{all}%
  {%
    \providedby{\sty{glossaries-extra} v1.21+}%
    \desc{implements all debugging options}
  }
  % package option showtargets
  \gstyopt{show\-targets}%
  {%
    \inpackage{glossaries-extra}
    \providedby{\sty{glossaries-extra} v1.48+}%
    \syntax{\meta{value}}
    \desc{implements \opteqvalref{debug}{showtargets}}
  }
  \goptval{showtargets}{left}%
  {%
     \desc{a marker is placed to the left of the link/target and
      a marginal note is used in outer mode}
  }
  \goptval{showtargets}{right}%
  {%
     \desc{a marker is placed to the right of the link/target and
      a marginal note is used in outer mode}
  }
  \goptval{showtargets}{innerleft}%
  {%
     \desc{a marker and annotation are placed to the left of the
      link/target in all modes}
  }
  \goptval{showtargets}{innerright}%
  {%
     \desc{a marker and annotation are placed to the left of the
      link/target in all modes}
  }
  \goptval{showtargets}{annoteleft}%
  {%
     \desc{markers are placed on either side of the 
      link/target with the annotation on the left in all modes}
  }
  \goptval{showtargets}{annoteright}%
  {%
     \desc{markers are placed on either side of the 
      link/target with the annotation on the right in all modes}
  }
  % package option undefaction
  \gstyopt{undef\-action}%
  {%
    \syntax{\meta{value}}
    \initval{error}
    \inpackage{glossaries-extra}
    \desc{indicates whether to trigger an error or warning if an
     unknown entry label is referenced}
  }
  \goptval{undefaction}{error}%
  {%
    \desc{trigger an error if an unknown entry label is referenced}
  }
  \goptval{undefaction}{warn}%
  {%
    \desc{trigger a warning if an unknown entry label is referenced}
  }
  % package option makeindex
  \gstyopt{makeindex}
  {
    \inpackage{glossaries}
    \desc{indicates that the \idx{indexing} should be performed by
     \app+{makeindex} (default)}
  }
  % package option xindy
  \gstyopt{xindy}
  {
    \syntax{\margm{options}}
    \inpackage{glossaries}
    \desc{indicates that the \idx{indexing} should be performed by \app+{xindy}}
  }
  % package option hyperfirst
  \gstyopt{hyper\-first}%
  {%
    \syntax{\meta{boolean}}
    \initval{true}
    \defval{true}
    \inpackage{glossaries}
    \desc{indicates whether or not to use hyperlinks on
      \idx{firstuse} (if hyperlinks are supported)}
  }
  % package option indexonlyfirst
  \gstyopt{index\-only\-first}%
  {%
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \inpackage{glossaries}
    \desc{indicates whether or not to only \idxc{indexing}{index}
    the \idx{firstuse}}
  }
  % package option indexcrossrefs
  \gstyopt{index\-cross\-refs}%
  {%
    \syntax{\meta{boolean}}
    \initvalvaries
    \defval{true}
    \inpackage{glossaries-extra}
    \desc{indicates whether or not to enable automatic \idx{indexing} of
cross-referenced entries}
  }
  \goptval{indexcrossrefs}{true}%
  {%
    \desc{enables automatic \idx{indexing} of cross-referenced entries}
  }
  \goptval{indexcrossrefs}{false}%
  {%
    \desc{disables automatic \idx{indexing} of cross-referenced entries}
  }
  % package option autoseeindex
  \gstyopt{auto\-see\-index}%
  {%
    \syntax{\meta{boolean}}
    \initval{true}
    \defval{true}
    \inpackage{glossaries-extra}
    \desc{indicates whether or not to enable automatic \idx{indexing} of
    \gloskey{see} and \gloskey{seealso} fields}
  }
  \goptval{autoseeindex}{true}%
  {%
    \desc{enables automatic \idx{indexing} of \gloskey{see} and \gloskey{seealso} fields}
  }
  \goptval{autoseeindex}{false}%
  {%
    \desc{disables automatic \idx{indexing} of \gloskey{see} and \gloskey{seealso} fields}
  }
  % package option seenoindex
  \gstyopt{see\-no\-index}%
  {%
    \syntax{\meta{value}}
    \initval{error}
    \inpackage{glossaries}
    \desc{indicates what to do if the \gloskey{see} key is used
    before the associated \idx{indexing} files have been opened by
     \gls{makeglossaries}}
  }
  \goptval{seenoindex}{error}%
  {%
    \desc{triggers an error if the \gloskey{see} key is used before
      \gls{makeglossaries}}
  }
  \goptval{seenoindex}{warn}%
  {%
    \desc{triggers a warning if the \gloskey{see} key is used before
      \gls{makeglossaries}}
  }
  \goptval{seenoindex}{ignore}%
  {%
    \desc{does nothing if the \gloskey{see} key is used before
      \gls{makeglossaries}}
  }
  % package option record
  \gstyopt{record}%
  {%
    \common
    \syntax{\meta{value}}
    \initval{off}
    \defval{only}
    \inpackage{glossaries-extra}
    \desc{indicates whether or not \app{bib2gls} is being used (in
    which case entry \idx{indexing} is performed by adding \app{bib2gls}
    \records\ in the \ext{aux} file)}
  }
  % package option record=off
  \goptval{record}{off}%
  {%
    \desc{entry \idx{indexing} is performed as per the base \sty{glossaries} package, using
       either \gls{makeglossaries} or \gls{makenoidxglossaries}}
  }
  % package option record=only
  \goptval{record}{only}%
  {%
    \desc{entry \idx{indexing} is performed by adding \app{bib2gls}
     \records\ in the \ext{aux} file. Glossaries should be displayed with the \idx{unsrtfam}}
  }
  % package option record=nameref
  \goptval{record}{name\-ref}%
  {%
    \desc{entry \idx{indexing} is performed by adding \app{bib2gls}
     nameref \records\ in the \ext{aux} file. Glossaries should be displayed with the \idx{unsrtfam}}
  }
  % package option record=hybrid
  \goptval{record}{hybrid}%
  {%
    \desc{performs a mixture of \app{bib2gls} \records\ in the
     \ext{aux} file (to select entries from a \ext{bib} file) 
     and \app+{makeindex}\slash\app+{xindy} 
     \idx{indexing} in their associated files. The actual sorting and
     collation is performed by the \idx{indexingapp}, so 
     \resourceoptval{sort}{none} and
     \resourceoptval{save-locations}{false}
     should be used in \gls{GlsXtrLoadResources} (because it's
     redundant to make \app{bib2gls} sort and collate as well).
     This setting should be used with
     \gls{makeglossaries} before \gls{GlsXtrLoadResources} and
     \idxpl{glossary} should be displayed with \gls{printglossary} (or
     \gls{printglossaries}). There's little point in using this
     setting unless you have a custom \app{xindy} module that you can't
     convert to an equivalent set of \app{bib2gls} options}
  }
  % package option record=alsoindex
  \goptval{record}{also\-index}%
  {%
    \deprecated
    \field{alias}{optval.record.hybrid}
  }
  % package option bibglsaux
  \gstyopt{bib\-gls\-aux}%
  {%
    \inpackage{glossaries-extra}
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \app{bib2gls} v3.0+}
    \initvalempty
    \syntax{\meta{basename}}
    \desc{if set, an additional \ext+{aux} file called
      \metafilefmt{}{basename}{.aux} will be created in which to
     store the \app{bib2gls} records. This file will be skipped by
     \LaTeX\ when the main \ext{aux} file is input but will be read
    by \app{bib2gls}}
  }
  % package option numberedsection
  \gstyopt{numbered\-section}
  {
    \syntax{\meta{value}}
    \initval{false}
    \defval{nolabel}
    \inpackage{glossaries}
    \desc{indicates whether or not \idx{glossary} section headers will be numbered
     and also if they should automatically be labelled}
  }
  % package option savenumberlist
  \gstyopt{save\-number\-list}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \inpackage{glossaries}
    \desc{if true, patches the \idx{locationlist} encapsulator to
    save the \idx{locationlist}. With \app{bib2gls}, use the
     \resourceopt{save-locations} resource option}
  }
  % package option equations
  \gstyopt{equations}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \inpackage{glossaries-extra}
    \desc{automatically switch the \idx{locationcounter} to
    \ctr{equation} when inside a numbered equation environment}
  }
  % package option floats
  \gstyopt{floats}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \inpackage{glossaries-extra}
    \desc{automatically switch the \idx{locationcounter} to
    the corresponding counter when inside a floating environment}
  }
  % package option indexcounter
  \gstyopt{index\-counter}
  {
    \inpackage{glossaries-extra}
    \desc{defines the index counter \ctr{wrglossary} and implements
     \optval{counter}{wrglossary}}
  }
  % counter wrglossary
  \gctr{wr\-glossary}
  {
    \providedby{\sty{glossaries-extra}}
    \desc{a counter that is incremented every time an entry is \indexed}
  }
  % package option counter
  \gstyopt{counter}%
  {%
    \inpackage{glossaries}%
    \syntax{\meta{counter-name}}
    \initval{page}
    \desc{sets the default \idx{locationcounter}}%
  }
  % package option nonumberlist
  \gstyopt{no\-number\-list}%
  {
    \inpackage{glossaries}
    \desc{set no \idxpl{locationlist} as the default for all
     \idxpl{glossary}. May be overridden for individual \idxpl{glossary} with
     \printglossoptval{nonumberlist}{true}}
  }
  % package option entrycounter
  \gstyopt{en\-try\-counter}%
  {
    \inpackage{glossaries}
    \desc{enables the entry counter for top-level entries}
  }
  % package option subentrycounter
  \gstyopt{sub\-en\-try\-counter}%
  {
    \inpackage{glossaries}
    \desc{enables the entry counter for level~1 entries}
  }
  % package option writeglslabels
  \gstyopt{write\-gls\-labels}%
  {
    \inpackage{glossaries}
    \desc{creates a file called \csfmt{jobname}\filefmt{.}\ext+{glslabels}
     that contains all defined entry labels (for the benefit of
     autocompletion tools)}
  }
  % package option writeglslabelnames
  \gstyopt{write\-gls\-label\-names}%
  {
    \inpackage{glossaries}
    \desc{creates a file called \csfmt{jobname}\filefmt{.}\ext+{glslabels}
     that contains all defined entry labels and names (for the benefit of
     autocompletion tools)}
  }
  % package option nomain
  \gstyopt{nomain}%
  {%
    \inpackage{glossaries}%
    \desc{prevents the definition of the \code{main} \idx{glossary}. You
    will need to define another \idx{glossary} to use instead. For
    example, with the \opt{acronyms} package option}%
  }
  % package option acronymlists
  \gstyopt{acronym\-lists}%
  {
    \inpackage{glossaries}
    \syntax{\margm{label-list}}
    \banned
    \desc{identifies the \idxpl{glossary} that contain acronyms
    (defined with the base \sty{glossaries} packages acronym mechanism)}
  }
  % package option shortcuts
  \gstyopt{shortcuts}%
  {
    \inpackage{glossaries-extra}
    \syntax{\margm{value}}
    \initval{none}
    \desc{defines various shortcut commands (boolean only with just
     the base \sty{glossaries} package)}
  }
  % package option shortcuts=none
  \goptval{shortcuts}{none}%
  {%
     \desc{don't define any shortcut commands}
  }
  % package option shortcuts=all
  \goptval{shortcuts}{all}%
  {%
     \desc{implements \optval{shortcuts}{ac},
       \optval{shortcuts}{abbreviations}, \optval{shortcuts}{other}}
  }
  % package option shortcuts=acother
  \goptval{shortcuts}{acother}%
  {%
     \desc{implements \optval{shortcuts}{ac} and \optval{shortcuts}{other}}
  }
  % package option shortcuts=abother
  \goptval{shortcuts}{abother}%
  {%
     \desc{implements \optval{shortcuts}{abbreviations} and \optval{shortcuts}{other}}
  }
  % package option shortcuts=true
  \goptval{shortcuts}{true}%
  {%
     \field{alias}{optval.shortcuts.all}
  }
  % package option shortcuts=false
  \goptval{shortcuts}{false}%
  {%
     \field{alias}{optval.shortcuts.all}
  }
  % package option shortcuts=ac
  \goptval{shortcuts}{ac}%
  {%
     \desc{implements the acronym shortcuts that are compatible with
      \gls{newabbreviation}}
  }
  % package option shortcuts=abbreviations
  \goptval{shortcuts}{abbreviations}%
  {%
     \desc{implements the abbreviation shortcuts}
  }
  % package option shortcuts=abbr
  \goptval{shortcuts}{abbr}%
  {%
    \field{alias}{optval.shortcuts.abbreviations}
  }
  % package option shortcuts=other
  \goptval{shortcuts}{other}%
  {%
     \desc{implements the shortcuts \gls{newentry}, \gls{newsym} and
       \gls{newnum}}
  }
  % package option shortcuts=acronyms
  \goptval{shortcuts}{acronyms}%
  {%
     \desc{implements the acronym shortcuts. Don't use this option
unless you have reverted \gls{newacronym} back to the base
\sty{glossaries} package's acronym mechanism}
  }
  % package option shortcuts=acro
  \goptval{shortcuts}{acro}%
  {%
     \field{alias}{optval.shortcuts.acronyms}
  }
  % package option acronyms
  \gstyopt{acronyms}%
  {
    \inpackage{glossaries}
    \desc{provides a new \idx{glossary} with the label \code{acronym},
     redefines \gls{acronymtype} to \code{acronym}, and provides
     \gls{printacronyms}}
  }
  % package option acronym
  \gstyopt{acronym}%
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \inpackage{glossaries}
    \desc{if true, provides a new \idx{glossary} with the label
     \code{acronym} and title given by \gls{acronymname},
     redefines \gls{acronymtype} to \code{acronym}, and provides
     \gls{printacronyms}}
  }
  % package option abbreviations
  \gstyopt{abbreviations}%
  {
    \inpackage{glossaries-extra}
    \desc{provides a new \idx{glossary} with the label
     \code{abbreviations} and title given by \gls{abbreviationsname},
     redefines \gls{glsxtrabbrvtype} to \code{abbreviations},
     redefines \gls{acronymtype} to \gls{glsxtrabbrvtype} (unless
     the \opt{acronym} or \opt{acronyms} option has been used), and provides
     \gls{printabbreviations}}
  }
  % package option symbols
  \gstyopt{symbols}%
  {
    \inpackage{glossaries}
    \desc{provides a new \idx{glossary} with the label \code{symbols} and
     the title \gls{glssymbolsgroupname}, and provides
     \gls{printsymbols}. With \sty{glossaries-extra}, this additionally
     defines \gls{glsxtrnewsymbol}}
  }
  % package option numbers
  \gstyopt{numbers}%
  {
    \inpackage{glossaries}
    \desc{provides a new \idx{glossary} with the label \code{numbers} and
     the title \gls{glsnumbersgroupname}, and provides \gls{printnumbers}.
     With \sty{glossaries-extra}, this additionally
     defines \gls{glsxtrnewnumber}}
  }
  % package option index
  \gstyopt{index}%
  {
    \inpackage{glossaries}
    \desc{provides a new \idx{glossary} with the label \code{index} and
     the title \gls{indexname}, and provides \gls{printindex} and
     \gls{newterm}}
  }
  % package option nomissingglstext
  \gstyopt{no\-missing\-gls\-text}%
  {%
    \inpackage{glossaries-extra}
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{determines whether or not to display warning text if the
     external \idx{glossary} file hasn't been generated due to an
     incomplete build}
  }
  % package option nopostdot
  \gstyopt{no\-post\-dot}%
  {%
    \inpackage{glossaries}
    \syntax{\meta{boolean}}
    \initval{true}
    \defval{true}
    \desc{if true, suppresses the automatic insertion of a
    \idx{fullstop} after each entry's description in the \idx{glossary}
    (for styles that support this). The default is
    \optval{nopostdot}{true} for \sty{glossaries-extra} and
    \optval{nopostdot}{false} for just \sty{glossaries}}
    \field{seealso}{opt.postdot,opt.postpunc}
  }
  % package option postdot
  \gstyopt{post\-dot}%
  {%
    \inpackage{glossaries-extra}
    \providedby{\sty{glossaries-extra} v1.12+}%
    \desc{a shortcut for \optval{nopostdot}{false}}
    \field{seealso}{opt.nopostdot,opt.postpunc}
  }
  % package option postpunc
  \gstyopt{post\-punc}%
  {%
    \inpackage{glossaries-extra}
    \providedby{\sty{glossaries-extra} v1.21+}%
    \syntax{\meta{value}}
    \desc{an alternative to \opt{postdot}, this can be used to
     insert a different punctuation character after the description}
  }
  % package option postpunc values
  \goptval{postpunc}{dot}%
  {%
    \desc{equivalent to \opt{postdot} or \optval{nopostdot}{false}}
  }
  \goptval{postpunc}{comma}%
  {%
    \desc{inserts a comma after the description}
  }
  \goptval{postpunc}{none}%
  {%
    \desc{switches off automatic post-description punctuation insertion}
  }
  \goptval{postpunc}{other}%
  {%
    \name{{}\meta{punctuation}}
    \desc{inserts \meta{punctuation} after the description}
  }
  % package option nowarn
  \gstyopt{no\-warn}%
  {%
    \inpackage{glossaries}
    \desc{suppresses warnings}
  }
  % package option noredefwarn
  \gstyopt{no\-re\-def\-warn}%
  {%
    \inpackage{glossaries}
    \desc{suppresses a warning if \env{theglossary} or
    \gls{printglossary} have already been defined (which indicates
     that the document class or another package also provides a mechanism
     for creating a \idx{glossary} that could potentially conflict with
     \sty{glossaries}). This option is automatically implemented with
     \sty{glossaries-extra}}
  }
  % package option translate
  \gstyopt{trans\-late}%
  {%
    \inpackage{glossaries}
    \syntax{\meta{value}}
    \initval{babel}
    \desc{indicates how multilingual support should be provided, if 
     applicable}
  }
  % package option translate values
  \goptval{translate}{babel}%
  {%
    \desc{uses \sty{babel}['s] language hooks to implement
      multilingual support (default for \sty{glossaries-extra} if 
      \sty{babel} has been detected)}
  }
  \goptval{translate}{true}%
  {%
    \desc{uses \sty{translator}['s] language hooks to implement
      multilingual support (default for \sty{glossaries} if a
      language package has been detected)}
  }
  \goptval{translate}{false}%
  {%
    \desc{don't implement multilingual support (default if no
     language package has been detected)}
  }
  % package option notranslate
  \gstyopt{no\-trans\-late}%
  {%
    \inpackage{glossaries}
    \desc{equivalent to \optval{translate}{false}}
  }
  % package option nogroupskip
  \gstyopt{no\-group\-skip}%
  {%
    \inpackage{glossaries}
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{if true, suppress the gap between letter \idxpl{group} in the
     \idxpl{glossary} by default}
  }
  % package option toc
  \gstyopt{toc}%
  {%
    \inpackage{glossaries}
    \syntax{\meta{boolean}}
    \initval{true}
    \defval{true}
    \desc{if true, each \idx{glossary} will be automatically added to the
    table of contents. The default is \optval{toc}{false} with
     \sty{glossaries} and \optval{toc}{true} with \sty{glossaries-extra}}
  }
  % package option docdef
  \gstyopt{doc\-def}%
  {%
    \inpackage{glossaries-extra}
    \syntax{\meta{value}}
    \initval{false}
    \defval{true}
    \desc{determines whether or not \gls{newglossaryentry} is
     permitted in the \env{document} environment}
  }
  \goptval{docdef}{false}%
  {%
    \desc{don't allow \gls{newglossaryentry} in the \env{document}
     environment}
  }
  \goptval{docdef}{true}%
  {%
    \desc{allow \gls{newglossaryentry} in the \env{document}
     environment if the base \sty{glossaries} package would allow it}
  }
  \goptval{docdef}{restricted}%
  {%
    \desc{allow \gls{newglossaryentry} in the \env{document}
     environment, but only before any \idxpl{glossary}}
  }
  \goptval{docdef}{atom}%
  {%
    \desc{as \optfmt{restricted} but creates the \ext{glsdefs} file
     for atom's autocomplete support}
  }
  % package option automake
  \gstyopt{auto\-make}%
  {%
    \inpackage{glossaries}
    \syntax{\meta{value}}
    \initval{false}
    \defval{true}
    \desc{indicates whether or not to attempt to use \TeX's shell
     escape to run an \idx{indexingapp}}
  }
  % package option mfirstuc
  \gstyopt{mfirst\-uc}
  {
    \inpackage{glossaries}
    \providedby{\sty{glossaries} v4.50+}
    \initval{unexpanded}
    \desc{implements the \optfmt{expanded} and \optfmt{unexpanded}
    options provided by \sty{mfirstuc}}
  }
  % COMMANDS
  % COMMANDS: OPTIONS
  % \setupglossaries
  \gcmd{set\-up\-glos\-saries}%
  {%
    \providedby{\sty{glossaries} v3.11a+}
    \syntax{\margm{options}}
    \desc{change allowed options that are defined by the base
    \sty{glossaries} package. Note that some options can only be
    passed as package options. To change options defined or modified
    by the \sty{glossaries-extra} package, use
    \gls{glossariesextrasetup}}
  }
  % \glossariesextrasetup
  \gcmd{glos\-saries\-extra\-setup}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{options}}
    \desc{change allowed options that are defined or modified by the 
    \sty{glossaries-extra} package.  Note that some options can only be
    passed as package options}
  }
  % \glsindexingsetting
  \gcmd{gls\-index\-ing\-setting}
  {
    \providedby{\sty{glossaries} v4.50+ \& \sty{glossaries-extra} v1.49+}
    \desc{indicates what \idx{indexing} option has been chosen}
  }
  % \glsxtrsetbibglsaux
  \gcmd{gls\-xtr\-set\-bib\-gls\-aux}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \app{bib2gls} v3.0+}
    \syntax{\margm{basename}}
    \desc{as the \opt{bibglsaux} option}
  }
  % COMMANDS: DEBUGGING
  % \glsshowtargetinner
  \gcmd{gls\-show\-target\-inner}%
  {%
    \providedby{\sty{glossaries} v4.50+}
    \syntax{\margm{target-name}}
    \desc{formats the target name for inner and maths mode when
     \opteqvalref{debug}{showtargets} is enabled}
  }
  % \glsshowtargetouter
  \gcmd{gls\-show\-target\-outer}%
  {%
    \providedby{\sty{glossaries} v4.50+}
    \syntax{\margm{target-name}}
    \desc{formats the target name for outer mode when
     \opteqvalref{debug}{showtargets} is enabled. This places a
     marker (\gls{glsshowtargetsymbol}) in the text and 
     \meta{target-name} in the margin}
  }
  % \glsshowtarget
  \gcmd{gls\-show\-target}%
  {%
    \providedby{\sty{glossaries} v4.32+}
    \syntax{\margm{target-name}}
    \desc{formats the target name when
     \opteqvalref{debug}{showtargets} is enabled using either
     \gls{glsshowtargetinner} or \gls{glsshowtargetouter}, depending
     on the current mode}
  }
  % \glsshowtargetfont
  \gcmd{gls\-show\-target\-font}%
  {%
    \providedby{\sty{glossaries} v4.45+}
    \desc{font declaration used by debugging annotations}
  }
  % \glsshowtargetfonttext
  \gcmd{gls\-show\-target\-font\-text}%
  {%
    \providedby{\sty{glossaries} v4.50+}
    \syntax{\margm{text}}
    \desc{text-block command that checks for math mode and switches
    to the font given by the \gls{glsshowtargetfont} declaration}
  }
  % \glsshowtargetsymbol
  \gcmd{gls\-show\-target\-symbol}%
  {%
    \providedby{\sty{glossaries} v4.45+}
    \desc{marker (\glsshowtargetsymbol) used in debugging annotations}
  }
  % \glsxtrwrglossmark
  \gcmd{gls\-xtr\-wr\-gloss\-mark}%
  {%
    \providedby{\sty{glossaries-extra} v1.21+}
    \desc{marker (\glsxtrwrglossmark) used to mark write operations
     with \opteqvalref{debug}{showwrgloss}}
  }
  % \glsxtrwrglosscountermark
  \gcmd{gls\-xtr\-wr\-gloss\-counter\-mark}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{number}}
    \desc{used to mark where the \ctr{wrglossary} counter is
     incrememented with \opteqvalref{debug}{showwrgloss}}
  }
  % \glsxtrshowtargetouter
  \gcmd{gls\-xtr\-show\-target\-outer}%
  {%
    \syntax{\margm{target-name}}
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{used in outer mode for debugging, this defaults to 
    \gls{glsshowtargetouter} but is changed by the
    \opt{showtargets} options}
  }
  % \glsxtrshowtargetinner
  \gcmd{gls\-xtr\-show\-target\-inner}%
  {%
    \syntax{\margm{target-name}}
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{used in inner mode for debugging, this defaults to 
    \gls{glsshowtargetinner} but is changed by the
    \opt{showtargets} options}
  }
  % \glsshowtargetinnersymleft
  \gcmd{gls\-show\-target\-inner\-sym\-left}%
  {%
    \syntax{\marg{name}}
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{shows the left inner annotation followed by the left
    marker symbol \gls{glsxtrshowtargetsymbolleft}}
  }
  % \glsshowtargetinnersymright
  \gcmd{gls\-show\-target\-inner\-sym\-right}%
  {%
    \syntax{\marg{name}}
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{shows the right marker symbol
    \gls{glsxtrshowtargetsymbolright} followed by the right inner annotation}
  }
  % \glsxtrshowtargetsymbolleft
  \gcmd{gls\-xtr\-show\-target\-symbol\-left}%
  {%
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{the left marker debugging symbol~(\glsxtrshowtargetsymbolleft)}
  }
  % \glsxtrshowtargetsymbolright
  \gcmd{gls\-xtr\-show\-target\-symbol\-right}%
  {%
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{the right marker debugging symbol~(\glsxtrshowtargetsymbolright)}
  }
  % COMMANDS: INDEXING INITIALISATION
  % \glsprestandardsort
  \gcmd{gls\-pre\-standard\-sort}
  {
    \providedby{\sty{glossaries} v3.13a+}
    \syntax{\margm{sort cs}\margm{type}\margm{entry-label}}
    \desc{hook used with \opteqvalref{sort}{standard} to adjust the
     default sort value (with \gls{makeglossaries} or
     \gls{makenoidxglossaries} only)}
  }
  % \makeglossaries
  \gcmd{make\-glossaries}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{types}}
    \desc{opens the associated \idx{glossary} files that need to be
     processed by \app+{makeindex} or \app+{xindy}. The optional
     argument is only available with \sty{glossaries-extra} and is
     used for a hybrid approach. All \idxpl{glossary} (or each \idx{glossary}
     identified in \meta{types}) should be displayed with
     \gls{printglossary}. If the optional argument is present, any
     \idxpl{glossary} not identified in \meta{types} should be displayed with
     \gls{printnoidxglossary}}
  }
  % \makenoidxglossaries
  \gcmd{make\-noidx\-glossaries}%
  {%
    \providedby{\sty{glossaries} v4.04+}
    \desc{sets up all non-\idxpl{ignoredglossary} so that they can be displayed
    with \gls{printnoidxglossary}}
  }
  % COMMANDS: GLOSSARIES
  % \glsdefaulttype
  \gcmd{gls\-de\-fault\-type}%
  {%
    \providedby{\sty{glossaries}}
    \initval{main}%
    \desc{expands to the label of the default \idx{glossary}, which is
    normally \code{main} but if \opt{nomain} is used, it will be the
    label of the first \idx{glossary} to be defined}
  }%
  % \acronymtype
  \gcmd{acronym\-type}%
  {%
    \providedby{\sty{glossaries}}
    \initvalcs{glsdefaulttype}%
    \desc{expands to the label of the default acronym \idx{glossary}. The
    \opt{acronym} or \opt{acronyms} package option will redefine
     this to \code{acronym}. The \opt{abbreviations} package option
     will redefine this to \gls{glsxtrabbrvtype} if
    \opt{acronyms}\slash\opt{acronym} isn't used}
  }%
  % \glsxtrabbrvtype
  \gcmd{gls\-xtr\-abbrv\-type}%
  {%
    \initvalcs{glsdefaulttype}%
    \providedby{\sty{glossaries-extra}}
    \desc{expands to the label of the default abbreviation \idx{glossary}. The
    \opt{abbreviations} package option will redefine
     this to \code{abbreviations}}
  }%
  % \newglossary
  \gcmd{new\-glos\-sary}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{log-ext}\margm{glossary-label}\margm{in-ext}\margm{out-ext}\margm{title}\oargm{counter}}
    \desc{defines a \idx{glossary} identified by \meta{glossary-label} (which can
    be referenced by the \gloskey{type} key when defining an entry).
    The \meta{title} will be used when displaying the \idx{glossary}
    (using commands like \gls{printglossary}), but this title can be
    overridden by the \printglossopt{title} option. The optional
    \meta{counter} indicates which \idxc{locationcounter}{counter} should be used by default
    for the \location\ when \idx{indexing} any entries that have been assigned to this
    \idx{glossary}. (This can be overridden by the \glsopt{counter}
    option.) The other arguments are file extensions for use with
    \app{makeindex} or \app{xindy}. These arguments aren't relevant
    for other \idx{indexing} options (in which case, you may prefer to use
    \gls{newglossary*})}
  }
  % \newglossary*
  \gcmd{new\-glos\-sary*}%
  {%
    \providedby{\sty{glossaries} v4.08+}
    \syntax{\margm{glossary-label}\margm{title}\oargm{counter}}
    \desc{a shortcut that supplies file extensions based on the
    \idx{glossary} label:\begin{compactcodebox}%
\gls{newglossary}\oarg{\meta{glossary-label}-glg}\margm{glossary-label}\marg{\meta{glossary-label}-gls}\margm{\meta{glossary-label}-glo}\margm{title}\oargm{counter}%
\end{compactcodebox}\glsxtrnopostpunc
}
  }
  % \newignoredglossary
  \gcmd{new\-ignored\-glos\-sary}%
  {%
    \providedby{\sty{glossaries} v4.08+}
    \syntax{\margm{glossary-label}}
    \desc{defines a \idx{glossary} that should be ignored by iterative
     commands, such as \gls{printglossaries}. This \idx{glossary} has no
     associated \idx{indexing} files and has hyperlinks disabled. You can
     use an \idx{ignoredglossary} for common terms or abbreviations that don't need to be
     included in any listing (but you may want these terms defined
     as entries to allow automated formatting with the \idx{glslike}
     commands). An \idx{ignoredglossary} can't be displayed with
     \gls{printglossary} but may be displayed with the \idx{unsrtfam}, such as
     \gls{printunsrtglossary}}
  }
  % \newignoredglossary*
  \gcmd{new\-ignored\-glos\-sary*}%
  {%
    \providedby{\sty{glossaries-extra} v1.11+}
    \syntax{\margm{glossary-label}}
    \desc{this is like the unstarred \gls{newignoredglossary} but
    doesn't disable hyperlinks. You will need to ensure that the
    hypertargets are defined. For example, with
    \gls{printunsrtglossary} or through \idxpl{standaloneentry}}
  }
  % \provideignoredglossary
  \gcmds{provide\-ignored\-glos\-sary}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{glossary-label}}
    \desc{as \gls{newignoredglossary} but does nothing if the
    \idx{glossary} has already been defined}
  }
  % \ifglossaryexists
  \gcmds{if\-glos\-sary\-exists}
  {
    \providedby{\sty{glossaries}}
    \syntax{\margm{glossary-type}\margm{true}\margm{false}}
    \desc{if the \idx{glossary} given by \meta{glossary-type} exists,
    this does \meta{true}, otherwise it does \meta{false}. The
    unstarred form treats \idxpl{ignoredglossary} as non-existent. The
    starred form (v4.46+) will do \meta{true} if \meta{glossary-type} matches
    an ignored glossary}
    \field{seealso}{doifglossarynoexistsordo,glsxtrifemptyglossary}
  }
  % \doifglossarynoexistsordo
  \gcmd{do\-if\-glos\-sary\-no\-exists\-or\-do}
  {
    \providedby{\sty{glossaries} v4.19+}
    \syntax{\margm{glossary-type}\margm{true}\margm{false}}
    \desc{if the \idx{glossary} given by \meta{glossary-type} doesn't
    exist, this does \meta{true}, otherwise it generates an error
    and does \meta{false}. This uses the starred form of
    \gls{ifglossaryexists} to test for existence}
    \field{seealso}{ifglossaryexists,glsxtrifemptyglossary}
  }
  % \glsxtrifemptyglossary
  \gcmd{gls\-xtr\-if\-empty\-glos\-sary}
  {
    %\providedby{\sty{glossaries-extra} v0.4+}
    \syntax{\margm{glossary-type}\margm{true}\margm{false}}
    \desc{does \meta{true} if the glossary identified by
    \meta{glossary-type} is empty, otherwise does \meta{false}.
    If the \idx{glossary} doesn't exist, this does \meta{true} and
    will either generate an error (\opteqvalref{undefaction}{error})
    or a warning (\opteqvalref{undefaction}{warn}). This command
    considers \idxpl{ignoredglossary} as existing}
    \field{seealso}{ifglossaryexists,GlsXtrIfInGlossary}
  }
  % \GlsXtrIfInGlossary
  \gcmd{Gls\-Xtr\-If\-In\-Glossary}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{glossary-type}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry given by \meta{entry-label}
    is in the internal list of the \idx{glossary} identified by
    \meta{glossary-type}, otherwise it does \meta{false}. If the
    \idx{glossary} doesn't exist, this does \meta{false} and
    will either generate an error (\opteqvalref{undefaction}{error})
    or a warning (\opteqvalref{undefaction}{warn}). This command
    considers \idxpl{ignoredglossary} as existing}
    \field{seealso}{ifglossaryexists,glsxtrifemptyglossary}
  }
  % \glsxtrcopytoglossary
  \gcmds{gls\-xtr\-copy\-to\-glos\-sary}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{glossary-type}}
    \desc{copies the entry to the internal \idx{glossary} list for
    the given \idx{glossary}. The starred version performs a global
    change. The unstarred version can be localised. Only for use with 
    the \idx{unsrtfam}}
  }
  % \glsxtrgroupfield
  \gcmd{gls\-xtr\-group\-field}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \initval{group}
    \desc{expands to the \idx{internalfieldlabel} used to store the
     group label (requires \opt{record})}
  }
  % \glsautoprefix
  \gcmd{gls\-auto\-pre\-fix}
  {
    \providedby{\sty{glossaries} v1.14+}
    \desc{expands to the prefix for the label used by
     \optval{numberedsection}{autolabel} and \optval{numberedsection}{nameref}}
  }
  % \glsxtrsetglossarylabel
  \gcmd{gls\-xtr\-set\-glos\-sary\-label}
  {
    \providedby{\sty{glossaries-extra} v1.39+}
    \syntax{\margm{label}}
    \desc{sets the label to add (using
     \code{\gls{label}\margm{label}}) after the \idx{glossary} section
     heading}
  }
  % COMMANDS: GLOSSARY STYLES
  % \ifglsnogroupskip
  \gcond{if\-gls\-no\-group\-skip}
  {
    \providedby{\sty{glossaries} v3.03+}
    \initvalcs{iffalse}
    \desc{conditional set by the \opt{nogroupskip} option}
  }
  % \glossentryname
  \gcmd{gloss\-en\-try\-name}
  {%
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}}
    \desc{used by \idx{glossary} styles to display the entry's name}
  }
  % \Glossentryname
  \gcmd{Gloss\-en\-try\-name}
  {%
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}}
    \desc{as \gls{glossentryname} but \idx{sentencecase}}
  }
  % \GLOSSentryname
  \gcmd{GLOSS\-en\-try\-name}
  {%
    \providedby{\sty{glossaries} v4.59+}
    \syntax{\margm{entry-label}}
    \desc{as \gls{glossentryname} but all \idx{uppercase}}
  }
  % \GlossEntryName
  \gcmd{Gloss\-En\-try\-Name}
  {%
    \providedby{\sty{glossaries} v4.59+}
    \syntax{\margm{entry-label}}
    \desc{as \gls{glossentryname} but \idx{titlecase}}
  }
  % \glossentrynameother
  \gcmd{gloss\-en\-try\-name\-other}
  {%
    \providedby{\sty{glossaries-extra} v1.22+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{behaves like \gls{glossentryname} but uses the given field
     (identified by its \idxc{internalfieldlabel}{internal label})
     instead of \gloskey{name}}
  }
  % \Glossentrynameother
  \gcmd{Gloss\-en\-try\-name\-other}
  {%
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{behaves like \gls{Glossentryname} but uses the given field
     (identified by its \idxc{internalfieldlabel}{internal label})
     instead of \gloskey{name}}
  }
  % \GLOSSentrynameother
  \gcmd{GLOSS\-en\-try\-name\-other}
  {%
    \providedby{\sty{glossaries-extra} v1.6+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{behaves like \gls{GLOSSentryname} but uses the given field
     (identified by its \idxc{internalfieldlabel}{internal label})
     instead of \gloskey{name}}
  }
  % \GlossEntryNameOther
  \gcmd{Gloss\-En\-try\-Name\-Other}
  {%
    \providedby{\sty{glossaries-extra} v1.6+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{behaves like \gls{GlossEntryName} but uses the given field
     (identified by its \idxc{internalfieldlabel}{internal label})
     instead of \gloskey{name}}
  }
  % \glossentrysymbol
  \gcmd{gloss\-en\-try\-symbol}
  {%
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}}
    \desc{used by \idx{glossary} styles to display the entry's symbol}
  }
  % \Glossentrysymbol
  \gcmd{Gloss\-en\-try\-symbol}
  {%
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}}
    \desc{as \gls{glossentrysymbol} but \idx{sentencecase}}
  }
  % \glsentrypdfsymbol
  \gcmd{gls\-en\-try\-pdf\-symbol}
  {%
    \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{used when \gls{glossentrysymbol} occurs in a PDF bookmark}
  }
  % \glossentrydesc
  \gcmd{gloss\-en\-try\-desc}
  {%
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}}
    \desc{used by \idx{glossary} styles to display the entry's
    description}
  }
  % \Glossentrydesc
  \gcmd{Gloss\-en\-try\-desc}
  {%
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}}
    \desc{as \gls{glossentrydesc} but \idx{sentencecase}}
  }
  % \GlsXtrFormatLocationList
  \gcmd{Gls\-Xtr\-Format\-Location\-List}
  {
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{location list}}
    \desc{used by \gls{glossaryentrynumbers} to encapsulate the entire 
    \idx{locationlist} in the
     \idx{glossary}}
  }
  % \glossaryentrynumbers
  \gcmd{glos\-sary\-en\-try\-num\-bers}
  {
    \providedby{\sty{glossaries}}
    \syntax{\margm{location list}}
    \desc{used within the \idx{glossary} to encapsulate the
    \idx{locationlist} (redefined by the \opt{nonumberlist} option)}
  }
  % \GlsXtrEnablePreLocationTag
  \gcmd{Gls\-Xtr\-Enable\-Pre\-Location\-Tag}
  {
    \providedby{\sty{glossaries-extra} v1.04+}
    \syntax{\margm{page tag}\margm{pages tag}}
    \desc{enables the \idx{locationlist} tag}
  }
  % \glsnoidxdisplayloc
  \gcmd{gls\-no\-idx\-display\-loc}
  {
    \providedby{\sty{glossaries} v4.04+}
    \syntax{\margm{prefix}\margm{counter}\margm{format}\margm{location}}
    \desc{used to display a location in the location list}
  }
  % \glsxtrdisplaysingleloc
  \gcmd{gls\-xtr\-display\-single\-loc}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{format}\margm{location}}
    \desc{used to display a single location}
  }
  % \glsxtrdisplaystartloc
  \gcmd{gls\-xtr\-display\-start\-loc}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{format}\margm{location}}
    \desc{used to display a start location from an explicit range}
  }
  % \glsxtrdisplayendloc
  \gcmd{gls\-xtr\-display\-end\-loc}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{format}\margm{location}}
    \desc{used to display an end location from an explicit range}
  }
  % \glsxtrlocrangefmt
  \gcmd{gls\-xtr\-loc\-range\-fmt}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \desc{expands to the range format (set by \gls{glsxtrdisplaystartloc})}
  }
  % \glsxtrdisplayendlochook
  \gcmd{gls\-xtr\-display\-end\-loc\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \desc{hook used by \gls{glsxtrdisplayendloc}}
  }
  % theglossary environment
  \genv{the\-glossary}%
  {%
    \providedby{\sty{glossaries}}
    \desc{redefined by \idxpl{glossarystyle} to set up the way the
     \idx{glossary} is displayed. For example, to start and end the 
     \env{description} environment for the \glostyle{list} styles}
  }
  % \glsnumberformat
  \gcmd{gls\-number\-format}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{location(s)}}
    \desc{the default \idxc{locationencap}{format} for \idxpl{entrylocation}. If
     hyperlinks are defined, this will use \gls{glshypernumber}
     otherwise it will simply display its argument, which may be a
     single \location, or locations delimited by \gls{delimR} or
     \gls{delimN}}
  }
  % \delimR
  \gcmd{delimR}%
  {%
    \providedby{\sty{glossaries}}
    \desc{used between the start and end of a \location\ range}
  }
  % \delimN
  \gcmd{delimN}%
  {%
    \providedby{\sty{glossaries}}
    \desc{used as a separator between \locations}
  }
  % \glshypernumber
  \gcmd{gls\-hyper\-number}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{location(s)}}
    \desc{this will encapsulate each location with a hyperlink, if
    supported. This may be used as a \idx{locationencap}.
    The argument may be a single location or locations
    delimited by \gls{delimR} or \gls{delimN}. This command should
    not be used outside of \idxpl{locationlist} as it
    requires additional information in order to correctly form the
    hyperlinks}
  }
  % \hyperbf
  \gcmd{hyper\-bf}
  {
    \providedby{\sty{glossaries}}
    \syntax{\margm{location(s)}}
    \desc{if hyperlinks are supported this does
    \code{\cmd{textbf}\marg{\gls{glshypernumber}\margm{location(s)}}} otherwise it just
    does \code{\cmd{textbf}\margm{location(s)}}}
  }
  % \glstarget
  \gcmd{gls\-target}%
  {%
    \providedby{\sty{glossaries} v1.18+}
     \syntax{\margm{entry-label}\margm{text}}
     \desc{used by \idxpl{glossarystyle} to create a hypertarget (if enabled) for
      the entry (identified by \meta{entry-label}). The \meta{text} is usually
      \gls{glossentryname}\margm{entry-label}, but it can be something
      else}
  }
  % \glsxtrtarget
  \gcmd{gls\-xtr\-target}
  {
    \providedby{\sty{glossaries-extra} v1.51+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{like \gls{glstarget} but only creates the target if the
    field given by \gls{glsxtrtarget} field hasn't been set (if
    hyperlinks are supported). If that field hasn't been set, the
    target is created and the field is set to the target name.
    Otherwise, \gls{glsxtrtargetdup} will be used}
  }
  % \glsxtrtargetdup
  \gcmd{gls\-xtr\-target\-dup}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{behaviour of \gls{glsxtrtarget} if the target has already
be set}
  }
  % \glsxtrtargetfield
  \gcmd{gls\-xtr\-target\-field}
  {
    \providedby{\sty{glossaries-extra} v1.51+}
    \initval{target}
    \desc{expands to the field label used by \gls{glsxtrtarget}}
  }
  % \setentrycounter
  \gcmd{set\-en\-try\-counter}
  {
    \providedby{\sty{glossaries}}
    \syntax{\oargm{prefix}\margm{counter}}
    \desc{used to set the \idx{locationcounter} and prefix required
    for \gls{glshypernumber}}
  }
  % \glsentryitem
  \gcmd{gls\-en\-try\-item}
  {
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{does nothing if \optval{entrycounter}{false},
     otherwise increments and displays the associated counter}
  }
  % \glssubentryitem
  \gcmd{gls\-sub\-en\-try\-item}
  {
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{does nothing if \optval{subentrycounter}{false},
     otherwise increments and displays the associated counter}
  }
  % \glsentrycounterlabel
  \gcmd{gls\-en\-try\-counter\-label}
  {
    \providedby{\sty{glossaries} v3.0+}
    \desc{used by \gls{glsentryitem} to display the entry counter label}
  }
  % \theglossaryentry
  \gcmd{the\-glossary\-en\-try}
  {
    \providedby{\sty{glossaries} v3.0+}
    \desc{the value of the \ctr{glossaryentry} counter}
  }
  % counter glossaryentry
  \gctr{glossary\-en\-try}
  {
    \providedby{\sty{glossaries} v3.0+}
    \desc{the counter associated with the \opt{entrycounter} package option}
  }
  % \glsnamefont
  \gcmd{gls\-name\-font}
  {
    \providedby{\sty{glossaries}}
    \syntax{\margm{text}}
    \desc{used by \gls{glossentryname} to apply a font change to the
    \gloskey{name}, unless (with \sty{glossaries-extra}) the 
    \catattr{glossnamefont} attribute has been set}
  }
  % \glsxtrprenamehook
  \gcmd{gls\-xtr\-pre\-name\-hook}{%
    \providedby{\sty{glossaries-extra} v1.54+}%
    \syntax{\margm{entry-label}}
    \desc{a hook that's performed within \gls{glossentryname}
     and \gls{glossentrynameother} before the entry name is
     displayed (but after the abbreviation style is set for the
     entry's category, if applicable). Does nothing by default}
  }
  % \glsxtrpostname<category>
  \gcmdmeta{gls\-xtr\-post\-name}{cat\-e\-gory}{}{%
    \providedby{\sty{glossaries-extra} v1.04+}%
    \desc{the \gls{postnamehook} associated with the category
    identified by the label \meta{category}}
  }
  % \glsxtrpostnamehook
  \gcmd{gls\-xtr\-post\-name\-hook}{%
    %\providedby{\sty{glossaries-extra} v0.5.3+}%
    \syntax{\margm{entry-label}}
    \desc{a hook that's performed within \gls{glossentryname}
     and \gls{glossentrynameother} after the entry name is
     displayed. This hook implements auto-indexing (see
     \sectionref{sec:autoindex}), then the general hook
     \gls{glsextrapostnamehook} and finally the
     \gls{glsxtrpostnamecategory} hook}
  }
  % \glsextrapostnamehook
  \gcmd{gls\-extra\-post\-name\-hook}{%
    \providedby{\sty{glossaries-extra} v1.25+}%
    \syntax{\margm{entry-label}}
    \desc{a general purpose hook that's performed within \gls{glsxtrpostnamehook}}
  }
  % \glsdefpostname
  \gcmd{gls\-def\-post\-name}{%
    \providedby{\sty{glossaries-extra} v1.31+}%
    \syntax{\margm{category}\margm{definition}}
    \desc{defines \idx{postnamehook} associated with the category
    identified by the label \meta{category}. This simply (re)defines
    \gls{glsxtrpostnamecategory} for the given \meta{category} to
    \meta{definition}}
  }
  % \glspostdescription
  \gcmd{gls\-post\-de\-scrip\-tion}%
  {%
     \providedby{\sty{glossaries}}
     \desc{a hook that is usually placed after the description in
      \idxpl{glossarystyle}. Some of the styles provided with the
      \sty{glossaries} package don't use this hook. The
      \sty{glossaries-extra-stylemods} redefines those styles to
      include the hook. The default definition of this command
      tests for the \opt{nopostdot} option, but the \opt{postpunc}
      option redefines the command to implement the chosen punctuation}
  }
  % \glsxtrpostdescription
  \gcmd{gls\-xtr\-post\-de\-scrip\-tion}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \desc{an additional hook used within \gls{glspostdescription}
      that implements the \idx{catpostdeschook}}
  }
  % \glsxtrpostdesc<category>
  \gcmdmeta{gls\-xtr\-post\-desc}{cat\-e\-gory}{}{%
    \providedby{\sty{glossaries-extra}}
    \desc{the \gls{postdeschook} associated with the category
    identified by the label \meta{category}}
  }
  % \glsdefpostdesc
  \gcmd{gls\-def\-post\-desc}{%
    \providedby{\sty{glossaries-extra} v1.31+}
    \syntax{\margm{category}\margm{definition}}
    \desc{defines \idx{postdeschook} associated with the category
    identified by the label \meta{category}. This simply (re)defines
    \gls{glsxtrpostdesccategory} for the given \meta{category} to
    \meta{definition}}
  }
  % \glsxtrpostdescgeneral
  \gcmd{gls\-xtr\-post\-desc\-general}%
  {%
    \initvalempty
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{the default post-description hook for the \cat{general} category}
  }
  % \glsxtrpostdescsymbol
  \gcmd{gls\-xtr\-post\-desc\-symbol}%
  {%
    \initvalempty
    %\providedby{\sty{glossaries-extra} v1.0+}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{symbols}}\marg{glossaries-extra}}}
    \desc{the default \gls{postdeschook} for the \cat{symbol} category}
  }
  % \glsxtrpostdescnumber
  \gcmd{gls\-xtr\-post\-desc\-number}%
  {%
    \initvalempty
    %\providedby{\sty{glossaries-extra} v1.0+}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{numbers}}\marg{glossaries-extra}}}
    \desc{the default post-description hook for the \cat{number} category}
  }
  % \glsxtrpostdescindex
  \gcmd{gls\-xtr\-post\-desc\-index}%
  {%
    \initvalempty
    %\providedby{\sty{glossaries-extra} v1.0+}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{index}}\marg{glossaries-extra}}}
    \desc{the default post-description hook for the \cat{index} category}
  }
  % \glsxtrpostdescterm
  \gcmd{gls\-xtr\-post\-desc\-term}%
  {%
    \initvalempty
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{the default post-description hook for the \catfmt{term} category
    (which isn't used by \sty{glossaries-extra})}
  }
  % \glsxtrpostdescacronym
  \gcmd{gls\-xtr\-post\-desc\-acronym}%
  {%
    \initvalempty
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{the default post-description hook for the \cat{acronym} category}
  }
  % \glsxtrpostdescabbreviation
  \gcmd{gls\-xtr\-post\-desc\-ab\-bre\-vi\-a\-tion}%
  {%
    \initvalempty
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{the default post-description hook for the \cat{abbreviation} category}
  }
  % \glsxtrrestorepostpunc
  \gcmd{glsxtrrestorepostpunc}
  {
    \providedby{\sty{glossaries-extra} v1.23+}
    \desc{used in the \gloskey{description} to counteract the use of
     \gls{glsxtrnopostpunc}. Does nothing outside of the \idx{glossary}}
  }
  % \glsxtrnopostpunc
  \gcmd{gls\-xtr\-no\-post\-punc}
  {%
    \providedby{\sty{glossaries-extra} v1.22+}
    \desc{when placed at the end of the \gloskey{description}, this 
    switches off the post-description punctuation (inserted
    automatically via options such as \opt{postdot}) but doesn't
    suppress the \idx{postdeschook}. Does nothing outside of the
    \idx{glossary}}
    \field{seealso}{nopostdesc}
  }
  % \nopostdesc
  \gcmd{no\-post\-desc}
  {%
    \providedby{\sty{glossaries} v1.17+}
    \desc{when placed at the end of the \gloskey{description}, this 
    switches off the \idx{postdeschook} (including the
    post-description punctuation). Does nothing outside of the
    \idx{glossary}}
    \field{seealso}{glsxtrnopostpunc}
  }
  % \glscurrententrylabel
  \gcmd{gls\-current\-en\-try\-label}
  {
    \providedby{\sty{glossaries} v3.02+}
    \desc{assigned at the start of each entry item within the
      glossary. This command may be used by glossary hooks, such
      as the \idx{postdeschook}, to reference the current entry}
  }
  % COMMANDS: longextra
  % \glslongextraNameFmt
  \gcmd{gls\-long\-extra\-Name\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{entry-label}}
    \desc{used by the \sty{glossary-longextra} styles to add the
     hypertarget (if supported) and display a top-level entry's name}
  }
  % \glslongextraSubNameFmt
  \gcmd{gls\-long\-extra\-Sub\-Name\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{used by the \sty{glossary-longextra} styles to add the
     hypertarget (if supported) for child-entries. The name isn't
     shown by default}
  }
  % \glslongextraDescFmt
  \gcmd{gls\-long\-extra\-Desc\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{entry-label}}
    \desc{used by the \sty{glossary-longextra} styles to display a
     top-level entry's description and \idx{postdeschook}}
  }
  % \glslongextraSubDescFmt
  \gcmd{gls\-long\-extra\-Sub\-Desc\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{used by the \sty{glossary-longextra} styles to display a
     child entry's description and \idx{postdeschook}}
  }
  % \glslongextraSymbolFmt
  \gcmd{gls\-long\-extra\-Symbol\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{entry-label}}
    \desc{used by the \sty{glossary-longextra} styles to display a
     top-level entry's symbol}
  }
  % \glslongextraSubSymbolFmt
  \gcmd{gls\-long\-extra\-Sub\-Symbol\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{used by the \sty{glossary-longextra} styles to display a
     child entry's symbol}
  }
  % \glslongextraSymbolTargetFmt
  \gcmd{gls\-long\-extra\-Symbol\-Target\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{adds the hypertarget (if supported) and displays the
     symbol for top-level entries}
  }
  % \glslongextraSubSymbolTargetFmt
  \gcmd{gls\-long\-extra\-Sub\-Symbol\-Target\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{adds the hypertarget (if supported) and displays the
     symbol for child entries}
  }
  % \glslongextraSymbolOrName
  \gcmd{gls\-long\-extra\-Symbol\-Or\-Name}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{adds the hypertarget (if supported) and displays the
     symbol if set or the name otherwise for top-level entries}
  }
  % \glslongextraSubSymbolOrName
  \gcmd{gls\-long\-extra\-Sub\-Symbol\-Or\-Name}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{adds the hypertarget (if supported) and displays the
     symbol if set or the name otherwise for child entries}
  }
  % \glslongextraLocationFmt
  \gcmd{gls\-long\-extra\-Location\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{used by the \sty{glossary-longextra} styles to display a
     top-level entry's \idx{locationlist}}
  }
  % \glslongextraSubLocationFmt
  \gcmd{gls\-long\-extra\-Sub\-Location\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{level}\margm{entry-label}\margm{location list}}
    \desc{used by the \sty{glossary-longextra} styles to display a
     child entry's \idx{locationlist}}
  }
  % \glslongextraHeaderFmt
  \gcmd{gls\-long\-extra\-Header\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{text}}
    \desc{used to format the column headers}
  }
  % \ifGlsLongExtraUseTabular
  \gcond{if\-Gls\-Long\-Extra\-Use\-Tabular}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \initvalcs{iffalse}
    \desc{conditional that determines whether or not to use
     \env{tabular} instead of \env{longtable}. If this conditional is
     changed, it must be changed before the style is set}
  }
  % \GlsLongExtraUseTabulartrue
  \gcmd{Gls\-Long\-Extra\-Use\-Tabular\-true}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets \gls{ifGlsLongExtraUseTabular} to true (if this
     setting is required, the style must be set after this command)}
  }
  % \GlsLongExtraUseTabularfalse
  \gcmd{Gls\-Long\-Extra\-Use\-Tabular\-false}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets \gls{ifGlsLongExtraUseTabular} to false (if this
     setting is required, the style must be set after this command)}
  }
  % \glslongextraTabularVAlign
  \gcmd{gls\-long\-extra\-Tabular\-V\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \initval{c}
    \desc{only for use with the \env{tabular} setting, this should
     expand to the \env{tabular} environment's vertical alignment
     specifier}
  }
  % \glslongextraNameAlign
  \gcmd{gls\-long\-extra\-Name\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \initval{l}
    \desc{the horizontal alignment for the name column}
  }
  % \glslongextraSymbolAlign
  \gcmd{gls\-long\-extra\-Symbol\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \initval{c}
    \desc{the horizontal alignment for the symbol column}
  }
  % \glslongextraSymbolNameAlign
  \gcmd{gls\-long\-extra\-Symbol\-Name\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \initval{l}
    \desc{the horizontal alignment for the symbol column when it's
    being used instead of the name}
  }
  % \glslongextraDescAlign
  \gcmd{gls\-long\-extra\-Desc\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{the horizontal alignment for the description column}
  }
  % \glslongextraLocationAlign
  \gcmd{gls\-long\-extra\-Location\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{the horizontal alignment for the \idx{locationlist} column}
  }
  % \glslongextraGroupHeading
  \gcmd{gls\-long\-extra\-Group\-Head\-ing}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{number columns}\margm{group-label}}
    \desc{formats the top-level \idx{group} heading}
  }
  % \glslongextraSubGroupHeading
  \gcmd{gls\-long\-extra\-Sub\-Group\-Head\-ing}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{number columns}\margm{prev group
    level}\margm{group level}\margm{parent-entry-label}\margm{group-label}}
    \desc{formats the sub-\idx{group} heading, if supported}
  }
  % \glslongextraNameDescHeader
  \gcmd{gls\-long\-extra\-Name\-Desc\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-name-desc}
     style with \env{longtable}}
  }
  % \glslongextraNameDescTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Desc\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-name-desc} style}
  }
  % \glslongextraNameDescTabularFooter
  \gcmd{gls\-long\-extra\-Name\-Desc\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-name-desc} style}
  }
  % \glslongextraNameDescLocationHeader
  \gcmd{gls\-long\-extra\-Name\-Desc\-Location\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-name-desc-loc}
     style with \env{longtable}}
  }
  % \glslongextraNameDescLocationTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Desc\-Location\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-name-desc-loc} style}
  }
  % \glslongextraNameDescLocationTabularFooter
  \gcmd{gls\-long\-extra\-Name\-Desc\-Location\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-name-desc-loc} style}
  }
  % \glslongextraDescNameHeader
  \gcmd{gls\-long\-extra\-Desc\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-desc-name}
     style with \env{longtable}}
  }
  % \glslongextraDescNameTabularHeader
  \gcmd{gls\-long\-extra\-Desc\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-desc-name} style}
  }
  % \glslongextraDescNameTabularFooter
  \gcmd{gls\-long\-extra\-Desc\-Name\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-desc-name} style}
  }
  % \glslongextraLocationDescNameHeader
  \gcmd{gls\-long\-extra\-Location\-Desc\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-loc-desc-name}
     style with \env{longtable}}
  }
  % \glslongextraLocationDescNameTabularHeader
  \gcmd{gls\-long\-extra\-Location\-Desc\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-loc-desc-name} style}
  }
  % \glslongextraLocationDescNameTabularFooter
  \gcmd{gls\-long\-extra\-Location\-Desc\-Name\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-loc-desc-name} style}
  }
  % \glslongextraNameDescSymHeader
  \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-name-desc-sym}
     style with \env{longtable}}
  }
  % \glslongextraNameDescSymTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-name-desc-sym} style}
  }
  % \glslongextraNameDescSymTabularFooter
  \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-name-desc-sym} style}
  }
  % \glslongextraNameDescSymLocationHeader
  \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Location\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-name-desc-sym-loc}
     style with \env{longtable}}
  }
  % \glslongextraNameDescSymLocationTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Location\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-name-desc-sym-loc} style}
  }
  % \glslongextraNameDescSymLocationTabularFooter
  \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Location\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-name-desc-sym-loc} style}
  }
  % \glslongextraNameSymDescHeader
  \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-name-sym-desc}
     style with \env{longtable}}
  }
  % \glslongextraNameSymDescTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-name-sym-desc} style}
  }
  % \glslongextraNameSymDescTabularFooter
  \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-name-sym-desc} style}
  }
  % \glslongextraNameSymDescLocationHeader
  \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Location\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-name-sym-desc-loc}
     style with \env{longtable}}
  }
  % \glslongextraNameSymDescLocationTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Location\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-name-sym-desc-loc} style}
  }
  % \glslongextraNameSymDescLocationTabularFooter
  \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Location\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-name-sym-desc-loc} style}
  }
  % \glslongextraSymDescNameHeader
  \gcmd{gls\-long\-extra\-Sym\-Desc\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-sym-desc-name}
     style with \env{longtable}}
  }
  % \glslongextraSymDescNameTabularHeader
  \gcmd{gls\-long\-extra\-Sym\-Desc\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-sym-desc-name} style}
  }
  % \glslongextraSymDescNameTabularFooter
  \gcmd{gls\-long\-extra\-Sym\-Desc\-Name\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-sym-desc-name} style}
  }
  % \glslongextraLocationSymDescNameHeader
  \gcmd{gls\-long\-extra\-Location\-Sym\-Desc\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-loc-sym-desc-name}
     style with \env{longtable}}
  }
  % \glslongextraLocationSymDescNameTabularHeader
  \gcmd{gls\-long\-extra\-Location\-Sym\-Desc\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-loc-sym-desc-name} style}
  }
  % \glslongextraLocationSymDescNameTabularFooter
  \gcmd{gls\-long\-extra\-Location\-Sym\-Desc\-Name\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-loc-sym-desc-name} style}
  }
  % \glslongextraDescSymNameHeader
  \gcmd{gls\-long\-extra\-Desc\-Sym\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-desc-sym-name}
     style with \env{longtable}}
  }
  % \glslongextraDescSymNameTabularHeader
  \gcmd{gls\-long\-extra\-Desc\-Sym\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-desc-sym-name} style}
  }
  % \glslongextraDescSymNameTabularFooter
  \gcmd{gls\-long\-extra\-Desc\-Sym\-Name\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-desc-sym-name} style}
  }
  % \glslongextraLocationDescSymNameHeader
  \gcmd{gls\-long\-extra\-Location\-Desc\-Sym\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{sets the header and footer for the \glostyle{long-loc-desc-sym-name}
     style with \env{longtable}}
  }
  % \glslongextraLocationDescSymNameTabularHeader
  \gcmd{gls\-long\-extra\-Location\-Desc\-Sym\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the header for the \glostyle{long-loc-desc-sym-name} style}
  }
  % \glslongextraLocationDescSymNameTabularFooter
  \gcmd{gls\-long\-extra\-Location\-Desc\-Sym\-Name\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{displays the footer for the \glostyle{long-loc-desc-sym-name} style}
  }
  % \glslongextraDescSymHeader
  \gcmd{gls\-long\-extra\-Desc\-Sym\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{sets the header and footer for the \glostyle{long-desc-sym}
     style with \env{longtable}}
  }
  % \glslongextraDescSymTabularHeader
  \gcmd{gls\-long\-extra\-Desc\-Sym\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{displays the header for the \glostyle{long-desc-sym} style}
  }
  % \glslongextraDescSymTabularFooter
  \gcmd{gls\-long\-extra\-Desc\-Sym\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{displays the footer for the \glostyle{long-desc-sym} style}
  }
  % \glslongextraSymDescHeader
  \gcmd{gls\-long\-extra\-Sym\-Desc\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{sets the header and footer for the \glostyle{long-sym-desc}
     style with \env{longtable}}
  }
  % \glslongextraSymDescTabularHeader
  \gcmd{gls\-long\-extra\-Sym\-Desc\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{displays the header for the \glostyle{long-sym-desc} style}
  }
  % \glslongextraSymDescTabularFooter
  \gcmd{gls\-long\-extra\-Sym\-Desc\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{displays the footer for the \glostyle{long-sym-desc} style}
  }
  % \glslongextraShortLongTabularHeader
  \gcmd{gls\-long\-extra\-Short\-Long\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{displays the header for the \glostyle{abbr-short-long} style}
  }
  % \glslongextraShortLongTabularFooter
  \gcmd{gls\-long\-extra\-Short\-Long\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{displays the footer for the \glostyle{abbr-short-long} style}
  }
  % \glslongextraShortLongHeader
  \gcmd{gls\-long\-extra\-Short\-Long\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{sets the header and footer for the \glostyle{abbr-short-long}
     style with \env{longtable}}
  }
  % \glslongextraLongShortTabularHeader
  \gcmd{gls\-long\-extra\-Long\-Short\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{displays the header for the \glostyle{abbr-short-long} style}
  }
  % \glslongextraLongShortTabularFooter
  \gcmd{gls\-long\-extra\-Long\-Short\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{displays the footer for the \glostyle{abbr-short-long} style}
  }
  % \glslongextraLongShortHeader
  \gcmd{gls\-long\-extra\-Long\-Short\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{sets the header and footer for the \glostyle{abbr-short-long}
     style with \env{longtable}}
  }
  % \glslongextraShortNoNameSetDescWidth
  \gcmd{gls\-long\-extra\-Short\-No\-Name\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{sets the value of \gls{glsdescwidth} for the 
     \glostyle{abbr-long-short} and \glostyle{abbr-short-long}
     styles}
  }
  % \glslongextraShortHeader
  \gcmd{gls\-long\-extra\-Short\-Head\-er}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \initvalcs{entryname}
    \desc{the short column header for the 
     \glostyle{abbr-long-short} and \glostyle{abbr-short-long}
     styles}
  }
  % \glslongextraLongHeader
  \gcmd{gls\-long\-extra\-Long\-Head\-er}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \initvalcs{descriptionname}
    \desc{the long column header for the 
     \glostyle{abbr-long-short} and \glostyle{abbr-short-long}
     styles}
  }
  % \glslongextraShortTargetFmt
  \gcmd{gls\-long\-extra\-Short\-Target\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the formatting, including the target, for the short form in the 
     \glostyle{abbr-long-short} and \glostyle{abbr-short-long}
     styles}
  }
  % \glslongextraLongFmt
  \gcmd{gls\-long\-extra\-Long\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the formatting for the long form in the 
     \glostyle{abbr-long-short} and \glostyle{abbr-short-long}
     styles}
  }
  % \glslongextraSubShortTargetFmt
  \gcmd{gls\-long\-extra\-Sub\-Short\-Target\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{the formatting, including the target, for child entry short forms in the 
     \glostyle{abbr-long-short} and \glostyle{abbr-short-long}
     styles}
  }
  % \glslongextraSubLongFmt
  \gcmd{gls\-long\-extra\-Sub\-Long\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{the formatting for child entry long forms in the 
     \glostyle{abbr-long-short} and \glostyle{abbr-short-long}
     styles}
  }
  % \glslongextraSetWidest
  \gcmd{gls\-long\-extra\-Set\-Widest}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{widest-name}}
    \desc{identifies \meta{widest-name} as the widest top-level name}
  }
  % \glslongextraUpdateWidest
  \gcmd{gls\-long\-extra\-Update\-Widest}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{name}}
    \desc{if \meta{name} is wider than the current widest name, it
     will be set as the new widest name}
  }
  % \glslongextraUpdateWidestChild
  \gcmd{gls\-long\-extra\-Update\-Widest\-Child}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \syntax{\margm{level}\margm{name}}
    \desc{as \gls{glslongextraUpdateWidest} but for child entries.
     Does nothing by default}
  }
  % \glslongextraSetDescWidth
  \gcmd{gls\-long\-extra\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{computes the value of \gls{glsdescwidth} according to the
    widest name for styles that only show the name and description}
  }
  % \glslongextraSymSetDescWidth
  \gcmd{gls\-long\-extra\-Sym\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{computes the value of \gls{glsdescwidth} according to the
    widest name for styles that only show the name, symbol and description}
  }
  % \glslongextraSymNoNameSetDescWidth
  \gcmd{gls\-long\-extra\-Sym\-No\-Name\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.49+}
    \desc{computes the value of \gls{glsdescwidth} according to the
    widest name for styles that only show the symbol and description}
  }
  % \glslongextraLocSetDescWidth
  \gcmd{gls\-long\-extra\-Loc\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{computes the value of \gls{glsdescwidth} according to the
    widest name for styles that only show the name, \idx{locationlist} and description}
  }
  % \glslongextraSymLocSetDescWidth
  \gcmd{gls\-long\-extra\-Sym\-Loc\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.37+}
    \desc{computes the value of \gls{glsdescwidth} according to the
    widest name for styles that show the name, symbol, \idx{locationlist} and description}
  }
  % \glslongextraCustomIField
  \gcmd{gls\-long\-extra\-Custom\-I\-Field}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \initval{\glosfield{useri}}
    \desc{expands to the \idx{internalfieldname} of the first custom field}
  }
  % \glslongextraCustomIIField
  \gcmd{gls\-long\-extra\-Custom\-II\-Field}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \initval{\glosfield{userii}}
    \desc{expands to the \idx{internalfieldname} of the second custom field}
  }
  % \glslongextraCustomIIIField
  \gcmd{gls\-long\-extra\-Custom\-III\-Field}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \initval{\glosfield{useriii}}
    \desc{expands to the \idx{internalfieldname} of the third custom field}
  }
  % \glslongextraCustomIHeader
  \gcmd{gls\-long\-extra\-Custom\-I\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{expands to the header name of the first custom column}
  }
  % \glslongextraCustomIIHeader
  \gcmd{gls\-long\-extra\-Custom\-II\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{expands to the header name of the second custom column}
  }
  % \glslongextraCustomIIIHeader
  \gcmd{gls\-long\-extra\-Custom\-III\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{expands to the header name of the third custom column}
  }
  % \glslongextraCustomIFmt
  \gcmd{gls\-long\-extra\-Custom\-I\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \syntax{\margm{entry-label}}
    \desc{the format of the first custom entry}
  }
  % \glslongextraCustomIIFmt
  \gcmd{gls\-long\-extra\-Custom\-II\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \syntax{\margm{entry-label}}
    \desc{the format of the second custom entry}
  }
  % \glslongextraCustomIIIFmt
  \gcmd{gls\-long\-extra\-Custom\-III\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \syntax{\margm{entry-label}}
    \desc{the format of the third custom entry}
  }
  % \glslongextraSubCustomIFmt
  \gcmd{gls\-long\-extra\-Sub\-Custom\-I\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{the format of the first custom sub-entry}
  }
  % \glslongextraSubCustomIIFmt
  \gcmd{gls\-long\-extra\-Sub\-Custom\-II\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{the format of the second custom sub-entry}
  }
  % \glslongextraSubCustomIIIFmt
  \gcmd{gls\-long\-extra\-Sub\-Custom\-III\-Fmt}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \syntax{\margm{level}\margm{entry-label}}
    \desc{the format of the third custom sub-entry}
  }
  % \glslongextraCustomIAlign
  \gcmd{gls\-long\-extra\-Custom\-I\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \initval{l}
    \desc{expands to the column alignment for the first custom field}
  }
  % \glslongextraCustomIIAlign
  \gcmd{gls\-long\-extra\-Custom\-II\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \initval{l}
    \desc{expands to the column alignment for the second custom field}
  }
  % \glslongextraCustomIIIAlign
  \gcmd{gls\-long\-extra\-Custom\-III\-Align}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \initval{l}
    \desc{expands to the column alignment for the third custom field}
  }
  % \glslongextraCustomTabularFooter
  \gcmd{gls\-long\-extra\-Custom\-Tabular\-Footer}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the footer for the custom styles}
  }
  % \glslongextraNameCustomIHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-I\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-name-custom1} style}
  }
  % \glslongextraNameCustomITabularHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-I\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-name-custom1} style}
  }
  % \glslongextraNameCustomIIHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-II\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-name-custom2} style}
  }
  % \glslongextraNameCustomIITabularHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-II\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-name-custom2} style}
  }
  % \glslongextraNameCustomIIIHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-III\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-name-custom3} style}
  }
  % \glslongextraNameCustomIIITabularHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-III\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-name-custom3} style}
  }
  % \glslongextraCustomINameHeader
  \gcmd{gls\-long\-extra\-Custom\-I\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-custom1-name} style}
  }
  % \glslongextraCustomINameTabularHeader
  \gcmd{gls\-long\-extra\-Custom\-I\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-custom1-name} style}
  }
  % \glslongextraCustomIINameHeader
  \gcmd{gls\-long\-extra\-Custom\-II\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-custom2-name} style}
  }
  % \glslongextraCustomIINameTabularHeader
  \gcmd{gls\-long\-extra\-Custom\-II\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-custom2-name} style}
  }
  % \glslongextraCustomIIINameHeader
  \gcmd{gls\-long\-extra\-Custom\-III\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-custom3-name} style}
  }
  % \glslongextraCustomIIINameTabularHeader
  \gcmd{gls\-long\-extra\-Custom\-III\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-custom3-name} style}
  }
  % \glslongextraCustomISetDescWidth
  \gcmd{gls\-long\-extra\-Custom\-I\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{used to set the length \gls{glsdescwidth} for
    \glostyle{long-name-custom1-desc} style}
  }
  % \glslongextraCustomIISetDescWidth
  \gcmd{gls\-long\-extra\-Custom\-II\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{used to set the length \gls{glsdescwidth} for
    \glostyle{long-name-custom2-desc} style}
  }
  % \glslongextraCustomIIISetDescWidth
  \gcmd{gls\-long\-extra\-Custom\-III\-Set\-Desc\-Width}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{used to set the length \gls{glsdescwidth} for
    \glostyle{long-name-custom3-desc} style}
  }
  % \glslongextraNameCustomIDescHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-I\-Desc\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-name-custom1-desc} style}
  }
  % \glslongextraNameCustomIDescTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-I\-Desc\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-name-custom1-desc} style}
  }
  % \glslongextraNameCustomIIDescHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-II\-Desc\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-name-custom2-desc} style}
  }
  % \glslongextraNameCustomIIDescTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-II\-Desc\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-name-custom2-desc} style}
  }
  % \glslongextraNameCustomIIIDescHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-III\-Desc\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-name-custom3-desc} style}
  }
  % \glslongextraNameCustomIIIDescTabularHeader
  \gcmd{gls\-long\-extra\-Name\-Custom\-III\-Desc\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-name-custom3-desc} style}
  }
  % \glslongextraDescCustomINameHeader
  \gcmd{gls\-long\-extra\-Desc\-Custom\-I\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-desc-custom1-name} style}
  }
  % \glslongextraDescCustomINameTabularHeader
  \gcmd{gls\-long\-extra\-Desc\-Custom\-I\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-desc-custom1-name} style}
  }
  % \glslongextraDescCustomIINameHeader
  \gcmd{gls\-long\-extra\-Desc\-Custom\-II\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-desc-custom2-name} style}
  }
  % \glslongextraDescCustomIINameTabularHeader
  \gcmd{gls\-long\-extra\-Desc\-Custom\-II\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-desc-custom2-name} style}
  }
  % \glslongextraDescCustomIIINameHeader
  \gcmd{gls\-long\-extra\-Desc\-Custom\-III\-Name\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \env{longtable} \glostyle{long-desc-custom3-name} style}
  }
  % \glslongextraDescCustomIIINameTabularHeader
  \gcmd{gls\-long\-extra\-Desc\-Custom\-III\-Name\-Tabular\-Header}
  {
    \providedby{\sty{glossary-longextra} v1.50+}
    \desc{the header for the \glostyle{long-desc-custom3-name} style}
  }
  % COMMANDS: bookindex
  % \glsxtrbookindexname
  \gcmd{gls\-xtr\-book\-index\-name}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style to display a
     top-level entry's name}
  }
  % \glsxtrbookindexsubname
  \gcmd{gls\-xtr\-book\-index\-sub\-name}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style to display a
     child entry's name}
  }
  % \glsxtrbookindextarget
  \gcmd{gls\-xtr\-book\-index\-target}
  {
    \providedby{\sty{glossary-bookindex} v1.54+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{used by the \glostyle{bookindex} style to create the
target for top-level items}
  }
  % \glsxtrbookindexsubtarget
  \gcmd{gls\-xtr\-book\-index\-sub\-target}
  {
    \providedby{\sty{glossary-bookindex} v1.54+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{used by the \glostyle{bookindex} style to create the
target for child items}
  }
  % \glsxtrbookindexpregroupskip
  \gcmd{gls\-xtr\-book\-index\-pre\-group\-skip}
  {
    \providedby{\sty{glossary-bookindex} v1.49+}
    \syntax{\margm{skip}}
    \desc{used by the \glostyle{bookindex} style insert \meta{skip}
     after a \idx{group} header}
  }
  % \glsxtrbookindexcols
  \gcmd{gls\-xtr\-book\-index\-cols}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \initval{2}
    \desc{expands to the number of columns for the \glostyle{bookindex} style}
  }
  % \glsxtrbookindexformatsubheader
  \gcmd{gls\-xtr\-book\-index\-format\-sub\-header}
  {
    \providedby{\sty{glossary-bookindex} v1.49+}
    \syntax{\margm{previous level}\margm{level}\margm{parent-label}\margm{group-label}\margm{title}}
    \desc{formats the sub-group header}
  }
  % \glsxtrbookindexsubsubitem
  \gcmd{gls\-xtr\-book\-index\-sub\-sub\-item}
  {
    \providedby{\sty{glossary-bookindex} v1.54+}
    \syntax{\margm{level}}
    \desc{used to start sub-sub items and lower. The \meta{level}
will be 2 or more}
  }
  % \glsxtrbookindexcolspread
  \gcmd{gls\-xtr\-book\-index\-col\-spread}
  {
    \providedby{\sty{glossary-bookindex} v1.12+}
    \desc{if not empty this should expand to the option argument for
      \env{multicols}}
  }
  % \glsxtrbookindexmulticolsenv
  \gcmd{gls\-xtr\-book\-index\-multi\-cols\-env}
  {
    \providedby{\sty{glossary-bookindex} v1.25+}
    \desc{expands to the name of the \env{multicols} environment to use}
  }
  % \glsxtrbookindexprelocation
  \gcmd{gls\-xtr\-book\-index\-pre\-lo\-ca\-tion}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style to display 
     a separator before top-level \idxpl{locationlist}}
  }
  % \glsxtrbookindexsubprelocation
  \gcmd{gls\-xtr\-book\-index\-sub\-pre\-lo\-ca\-tion}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style to display 
     a separator before child \idxpl{locationlist}}
  }
  % \glsxtrbookindexlocation
  \gcmd{gls\-xtr\-book\-index\-lo\-ca\-tion}
  {
    \providedby{\sty{glossary-bookindex} v1.39+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{used by the \glostyle{bookindex} style to display 
     top-level \idxpl{locationlist}}
  }
  % \glsxtrbookindexsublocation
  \gcmd{gls\-xtr\-book\-index\-sub\-lo\-ca\-tion}
  {
    \providedby{\sty{glossary-bookindex} v1.39+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{used by the \glostyle{bookindex} style to display 
     child \idxpl{locationlist}}
  }
  % \glsxtrbookindexparentchildsep
  \gcmd{gls\-xtr\-book\-index\-parent\-child\-sep}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \desc{used by the \glostyle{bookindex} style to separate
     a top-level parent and child entry}
  }
  % \glsxtrbookindexparentsubchildsep
  \gcmd{gls\-xtr\-book\-index\-parent\-sub\-child\-sep}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \desc{used by the \glostyle{bookindex} style to separate
     a sub-level parent and child entry}
  }
  % \glsxtrbookindexbetween
  \gcmd{gls\-xtr\-book\-index\-between}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry1-label}\margm{entry2-label}}
    \desc{used by the \glostyle{bookindex} style between two
     entries where \meta{entry1-label} is the last top-level entry
    and \meta{entry2-label} is the next entry, which is a top-level
   entry}
  }
  % \glsxtrbookindexsubbetween
  \gcmd{gls\-xtr\-book\-index\-sub\-between}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry1-label}\margm{entry2-label}}
    \desc{as \gls{glsxtrbookindexbetween} but for level~1 entries}
  }
  % \glsxtrbookindexsubsubbetween
  \gcmd{gls\-xtr\-book\-index\-sub\-sub\-between}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry1-label}\margm{entry2-label}}
    \desc{as \gls{glsxtrbookindexbetween} but for level~2 entries}
  }
  % \glsxtrbookindexatendgroup
  \gcmd{gls\-xtr\-book\-index\-at\-end\-group}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style at the end of a
     letter group (where the last top-level entry is given by \meta{entry-label})}
  }
  % \glsxtrbookindexsubatendgroup
  \gcmd{gls\-xtr\-book\-index\-sub\-at\-end\-group}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style at the end of a
     letter group (where the last level~1 entry is given by \meta{entry-label})}
  }
  % \glsxtrbookindexsubsubatendgroup
  \gcmd{gls\-xtr\-book\-index\-sub\-sub\-at\-end\-group}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style at the end of a
     letter group (where the last level~2 entry is given by \meta{entry-label})}
  }
  % \glsxtrbookindexbookmark
  \gcmd{gls\-xtr\-book\-index\-bookmark}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{group-title}\margm{bookmark-name}}
    \desc{adds a bookmark with \gls{pdfbookmark}, if supported}
  }
  % \glsxtrbookindexformatheader
  \gcmd{gls\-xtr\-book\-index\-format\-header}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{group-title}}
    \desc{used by the \glostyle{bookindex} style to format a \idx{group} header}
  }
  % \glsxtrbookindexmarkentry
  \gcmd{gls\-xtr\-book\-index\-mark\-en\-try}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style to mark an entry in
     the \ext{aux} file}
  }
  % \glsxtrbookindexfirstmarkfmt
  \gcmd{gls\-xtr\-book\-index\-first\-mark\-fmt}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style to format the first mark}
  }
  % \glsxtrbookindexfirstmark
  \gcmd{gls\-xtr\-book\-index\-first\-mark}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \desc{used by the \glostyle{bookindex} style to obtain the first mark
     and, if found, format it with \gls{glsxtrbookindexfirstmarkfmt}}
  }
  % \glsxtrbookindexlastmarkfmt
  \gcmd{gls\-xtr\-book\-index\-last\-mark\-fmt}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used by the \glostyle{bookindex} style to format the last mark}
  }
  % \glsxtrbookindexlastmark
  \gcmd{gls\-xtr\-book\-index\-last\-mark}
  {
    \providedby{\sty{glossary-bookindex} v1.21+}
    \desc{used by the \glostyle{bookindex} style to obtain the last mark
     and, if found, format it with \gls{glsxtrbookindexlastmarkfmt}}
  }
  % COMMANDS: topic
  % \glstopicGroupHeading
  \gcmd{gls\-topic\-Group\-Heading}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{group-label}}
    \desc{used to format the top-level group headings, if required}
  }
  % \glstopicSubGroupHeading
  \gcmd{gls\-topic\-Sub\-Group\-Heading}
  {
    \providedby{\sty{glossary-topic} v1.49+}
    \syntax{\margm{prev group level}\margm{group level}\margm{parent entry}\margm{group-label}}
    \desc{used to format the sub-group headings, if supported}
  }
  % \glstopicItem
  \gcmd{gls\-topic\-Item}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{used to format top-level entries}
  }
  % \glstopicSubItem
  \gcmd{gls\-topic\-Sub\-Item}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{level}\margm{entry-label}\margm{location list}}
    \desc{used to format child entries}
  }
  % \glstopicSubItemSep
  \gcmd{gls\-topic\-Sub\-Item\-Sep}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{horizontal separator used after child names}
  }
  % \glstopicSubItemBox
  \gcmd{gls\-topic\-Sub\-Item\-Box}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{level}\margm{text}}
    \desc{horizontal box used for child name if a widest name has
     been provided}
  }
  % \glstopicSubNameFont
  \gcmd{gls\-topic\-Sub\-Name\-Font}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{text}}
    \desc{font command to apply to the child entry name}
  }
  % \glstopicSubPreLocSep
  \gcmd{gls\-topic\-Sub\-Pre\-Loc\-Sep}
  {
    \providedby{\sty{glossary-topic} v1.41+}
    \desc{separator before the child \idxpl{locationlist}}
  }
  % \glstopicSubLoc
  \gcmd{gls\-topic\-Sub\-Loc}
  {
    \providedby{\sty{glossary-topic} v1.41+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{formats the child \idxpl{locationlist}}
  }
  % \glstopicPreSkip
  \gcmd{gls\-topic\-Pre\-Skip}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{vertical space inserted before a top-level entry}
  }
  % \glstopicMidSkip
  \gcmd{gls\-topic\-Mid\-Skip}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{vertical space inserted before the description for a top-level entry}
  }
  % \glstopicPostSkip
  \gcmd{gls\-topic\-Post\-Skip}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{vertical space inserted after the description for a top-level entry}
  }
  % \glstopicMarker
  \gcmd{gls\-topic\-Marker}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{entry-label}}
    \desc{hook inserted before a top-level entry}
  }
  % \glstopicTitleFont
  \gcmd{gls\-topic\-Title\-Font}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{text}}
    \desc{font command to apply to the top-level entry title}
  }
  % \glstopicTitle
  \gcmd{gls\-topic\-Title}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{entry-label}}
    \desc{used to format the name and (if provided) symbol for the top-level entry title}
  }
  % \glstopicDesc
  \gcmd{gls\-topic\-Desc}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{entry-label}}
    \desc{used to format the top-level description}
  }
  % \glstopicLoc
  \gcmd{gls\-topic\-Loc}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{used to format the top-level \idx{locationlist}}
  }
  % \glstopicParIndent
  \gcmd{gls\-topic\-Par\-Indent}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{length register used for the top-level paragraph indent}
  }
  % \glstopicSubIndent
  \gcmd{gls\-topic\-Sub\-Indent}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{length register used for the child indent}
  }
  % \glstopicSubItemParIndent
  \gcmd{gls\-topic\-Sub\-Item\-Par\-Indent}
  {
    \providedby{\sty{glossary-topic} v1.46+}
    \desc{length register used for the child paragraph indent}
  }
  % \glstopicInit
  \gcmd{gls\-topic\-Init}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{initialisation hook}
  }
  % \glstopicAssignSubIndent
  \gcmd{gls\-topic\-Assign\-Sub\-Indent}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{level}}
    \desc{used to set the indentation for sub-levels}
  }
  % \glstopicAssignWidest
  \gcmd{gls\-topic\-Assign\-Widest}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \syntax{\margm{level}}
    \desc{used by \gls{glstopicAssignSubIndent} to calculate the
    width of the widest name for the given level}
  }
  % \glstopicCols
  \gcmd{gls\-topic\-Cols}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{expands to the number of columns for \glostyle{topicmcols}}
  }
  % \glstopicColsEnv
  \gcmd{gls\-topic\-Cols\-Env}
  {
    \providedby{\sty{glossary-topic} v1.40+}
    \desc{expands to the \env{multicols} environment name to use 
     for \glostyle{topicmcols}}
  }
  % COMMANDS: table
  % \printunsrttable
  \gcmd{print\-unsrt\-table}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \syntax{\oargm{options}}
    \desc{internally uses \gls{printunsrtglossary} with the 
    \glostyle{table} style}
  }
  % \glstablesetstyle
  \gcmd{gls\-table\-set\-style}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \syntax{\margm{style-name}}
    \desc{sets the default block style}
  }
  % \glstablenewline
  \gcmd{gls\-table\-new\-line}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \desc{used to start a new row}
  }
  % \glstablecaption
  \gcmd{gls\-table\-caption}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \syntax{\margm{lot title}\margm{title}\margm{label code}}
    \desc{produces the caption for the first page of the table}
  }
  % \glstablenextcaption
  \gcmd{gls\-table\-next\-caption}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \syntax{\margm{lot title}\margm{title}}
    \desc{produces the caption for following pages of the table}
  }
  % \glstablepostnextcaption
  \gcmd{gls\-table\-post\-next\-caption}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \initval{\textvisiblespace Cont./}
    \desc{appended to the caption in \gls{glstablenextcaption}}
  }
  % \glstableiffilter
  \gcmd{gls\-table\-if\-filter}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{internally used by the custom handler in \gls{printunsrttable}
     to perform additional filtering. This command should do \meta{true} if the 
     entry identified by \meta{entry-label} should be filtered and
     \meta{false} otherwise}
  }
  % \glstableiffilterchild
  \gcmd{gls\-table\-if\-filter\-child}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{internally used by \gls{glstableChildEntries} to filter
     child entries. This command should do \meta{true} if the child
     entry identified by \meta{entry-label} should be filtered and
     \meta{false} otherwise}
  }
  % \glstableblocksubentrysep
  \gcmd{gls\-table\-block\-sub\-en\-try\-sep}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{separator used by \gls{glstableChildEntries} between child
    entries}
  }
  % \glstableblocksubentry
  \gcmd{gls\-table\-block\-sub\-en\-try}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{displays the child entry identified by \meta{entry-label}.
    This command is redefined by block styles}
  }
  % glstablesubentries ENVIRONMENT
  \genv{gls\-table\-sub\-entries}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{encapsulates the child list}
  }
  % \glstablesubentryalign
  \gcmd{gls\-table\-sub\-en\-try\-align}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \desc{expands to the column alignment used by \env{glstablesubentries}}
  }
  % \glstableleftalign
  \gcmd{gls\-table\-left\-align}
  {
     \providedby{\sty{glossary-table} v1.49+}
     \syntax{\margm{width}}
     \desc{expands to \code{l} or \code{p\margm{width}}
     or \code{>{\cmd{protect}\cmd{raggedright}p\margm{width}}}, 
     depending on the \glstableopt{par} setting}
  }
  % \glstablerightalign
  \gcmd{gls\-table\-right\-align}
  {
     \providedby{\sty{glossary-table} v1.49+}
     \syntax{\margm{width}}
     \desc{expands to \code{r} or \code{p\margm{width}}
     or \code{>{\cmd{protect}\cmd{raggedleft}p\margm{width}}}, 
     depending on the \glstableopt{par} setting}
  }
  % \glstablecenteralign
  \gcmd{gls\-table\-center\-align}
  {
     \providedby{\sty{glossary-table} v1.49+}
     \syntax{\margm{width}}
     \desc{expands to \code{c} or \code{p\margm{width}}
     or \code{>{\cmd{protect}\cmd{centering}p\margm{width}}}, 
     depending on the \glstableopt{par} setting}
  }
  % \glstablenamecolalign
  \gcmd{gls\-table\-name\-col\-align}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{expands to the alignment of the name column}
  }
  % \glstabledesccolalign
  \gcmd{gls\-table\-desc\-col\-align}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{expands to the alignment of the description column}
  }
  % \glstableothercolalign
  \gcmd{gls\-table\-other\-col\-align}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{expands to the alignment of the other column}
  }
  % \glstablesymbolcolalign
  \gcmd{gls\-table\-symbol\-col\-align}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{expands to the alignment of the symbol column}
  }
  % \glstablenamewidth
  \gcmd{gls\-table\-name\-width}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{length register used for the width of the name column with
    \glstableoptval{par}{justified} or \glstableoptval{par}{ragged}.
    Set by the block style}
  }
  % \glstabledescwidth
  \gcmd{gls\-table\-desc\-width}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{length register used for the width of the description column with
    \glstableoptval{par}{justified} or \glstableoptval{par}{ragged}.
    Set by the block style}
  }
  % \glstablesymbolwidth
  \gcmd{gls\-table\-symbol\-width}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{length register used for the width of the symbol column with
    \glstableoptval{par}{justified} or \glstableoptval{par}{ragged}.
    Set by the block style}
  }
  % \glstableotherwidth
  \gcmd{gls\-table\-other\-width}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \desc{length register used for the width of the other column with
    \glstableoptval{par}{justified} or \glstableoptval{par}{ragged}.
    Set by the block style}
  }
  % \glstableblockwidth
  \gcmd{gls\-table\-block\-width}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{length register used for the width of each block with
    \glstableoptval{par}{justified} or \glstableoptval{par}{ragged}.
    Set by the block style}
  }
  % \glstablepostpreambleskip
  \gcmd{gls\-table\-post\-pre\-amble\-skip}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \initval{5pt}
    \desc{length register that specifies the vertical skip after
    the preamble}
  }
  % \glstableprepostambleskip
  \gcmd{gls\-table\-pre\-post\-amble\-skip}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \initval{5pt}
    \desc{length register that specifies the vertical skip before
    the postamble}
  }
  % \glstableNameFmt
  \gcmd{gls\-table\-Name\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{text}}
    \desc{formatting applied to the name}
  }
  % \glstableSubNameFmt
  \gcmd{gls\-table\-Sub\-Name\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{text}}
    \desc{formatting applied to the child name}
  }
  % \glstableSymbolFmt
  \gcmd{gls\-table\-Symbol\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{text}}
    \desc{formatting applied to the symbol}
  }
  % \glstableSubSymbolFmt
  \gcmd{gls\-table\-Sub\-Symbol\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{text}}
    \desc{formatting applied to the child symbol}
  }
  % \glstableDescFmt
  \gcmd{gls\-table\-Desc\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{text}}
    \desc{formatting applied to the description}
  }
  % \glstableSubDescFmt
  \gcmd{gls\-table\-Sub\-Desc\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{text}}
    \desc{formatting applied to the child description}
  }
  % \glstableotherfield
  \gcmd{gls\-table\-other\-field}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \initvalempty
    \desc{expands to the \idx{internalfieldlabel} of the other field}
  }
  % \glstableOtherFmt
  \gcmd{gls\-table\-Other\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{text}}
    \desc{formatting applied to the other field}
  }
  % \glstableSubOtherFmt
  \gcmd{gls\-table\-Sub\-Other\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{text}}
    \desc{formatting applied to the other field}
  }
  % \glstableOther
  \gcmd{gls\-table\-Other}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{entry-label}}
    \desc{used to display the other field}
  }
  % \glstableSubOther
  \gcmd{gls\-table\-Sub\-Other}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{entry-label}}
    \desc{used to display the sub-entry other field}
  }
  % \glstableifhasotherfield
  \gcmd{gls\-table\-if\-has\-other\-field}
  {
    \providedby{\sty{glossary-table} v1.50+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{expands to \meta{true} if the other field is non-void for
the given entry otherwise expands to \meta{false}}
  }
  % \glstablenameheader
  \gcmd{gls\-table\-name\-header}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{header for the name column}
  }
  % \glstabledescheader
  \gcmd{gls\-table\-desc\-header}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{header for the description column}
  }
  % \glstablesymbolheader
  \gcmd{gls\-table\-symbol\-header}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{header for the symbol column}
  }
  % \glstableotherheader
  \gcmd{gls\-table\-other\-header}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{header for the other column}
  }
  % \glstableHeaderFmt
  \gcmd{gls\-table\-Header\-Fmt}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \syntax{\margm{text}}
    \desc{formats the header}
  }
  % \glstableChildEntries
  \gcmd{gls\-table\-Child\-Entries}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{iterates over the \glosfield{childlist} field and formats
    each child entry in the list for use in the block styles. Does
     nothing if the list is empty}
  }
  % \glstablePreChildren
  \gcmd{glstablePreChildren}
  {
    \providedby{\sty{glossary-table} v1.49+}
    \desc{code performed by \gls{glstableChildEntries} before the child list}
  }
  % \printunsrttable OPTIONS
  \gprintunsrttableopt{blocks}%
  {%
     \syntax{\meta{n}}
     \initval{2}
     \desc{number of blocks per row}
  }
  \gprintunsrttableopt{caption}%
  {%
    \providedby{\sty{glossary-table} v1.50+}
     \syntax{\meta{boolean}}
     \initval{true}
     \defval{true}
     \desc{include a caption}
  }
  \gprintunsrttableopt{header}%
  {%
     \syntax{\meta{boolean}}
     \initval{true}
     \defval{true}
     \desc{include header row}
  }
  \gprintunsrttableopt{rules}%
  {%
     \syntax{\meta{boolean}}
     \initval{true}
     \defval{true}
     \desc{include horizontal rules}
  }
  \gprintunsrttableopt{blocksep}%
  {%
     \syntax{\meta{alignment spec}}
     \initval{|}
     \desc{between block table alignment specifier}
  }
  \gprintunsrttableopt{par}%
  {%
     \syntax{\meta{value}}
     \initval{false}
     \desc{indicates whether or not to use a paragraph column
specifier}
  }
  \gprintunsrttableopt{block-style}%
  {%
     \syntax{\meta{value}}
     \initval{name-desc}
     \desc{indicates the block style}
  }
  \gprintunsrttableopt{other}%
  {%
     \syntax{\meta{field-label}}
     \initvalempty
     \desc{indicates the other field to use}
  }
  \gprintunsrttableopt{init}%
  {%
     \syntax{\margm{code}}
     \initvalempty
     \desc{initialisation code}
  }
  % \printunsrttable BLOCK STYLES
  % name-desc
  \gtableblockstyle{name\dhyphen desc}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % name
  \gtableblockstyle{name}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % name-symbol
  \gtableblockstyle{name\dhyphen symbol}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % desc-name
  \gtableblockstyle{desc\dhyphen name}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % symbol-name
  \gtableblockstyle{symbol\dhyphen name}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % name-symbol-desc
  \gtableblockstyle{name\dhyphen symbol\dhyphen desc}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % name-desc-symbol
  \gtableblockstyle{name\dhyphen desc\dhyphen symbol}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % name-other
  \gtableblockstyle{name\dhyphen other}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % symbol-other
  \gtableblockstyle{symbol\dhyphen other}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % other-name
  \gtableblockstyle{other\dhyphen name}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % other-symbol
  \gtableblockstyle{other\dhyphen symbol}%
  {\providedby{\sty{glossary-table} v1.49+}}
  % name-symbol-other-desc
  \gtableblockstyle{name\dhyphen symbol\dhyphen other\dhyphen desc}%
  {\providedby{\sty{glossary-table} v1.50+}}
  % name-other-symbol-desc
  \gtableblockstyle{name\dhyphen other\dhyphen symbol\dhyphen desc}%
  {\providedby{\sty{glossary-table} v1.50+}}
  % desc-symbol-other-name
  \gtableblockstyle{desc\dhyphen symbol\dhyphen other\dhyphen name}%
  {\providedby{\sty{glossary-table} v1.50+}}
  % desc-other-symbol-name
  \gtableblockstyle{desc\dhyphen other\dhyphen symbol\dhyphen name}%
  {\providedby{\sty{glossary-table} v1.50+}}
  % name-other-desc
  \gtableblockstyle{name\dhyphen other\dhyphen desc}%
  {\providedby{\sty{glossary-table} v1.50+}}
  % desc-other-name
  \gtableblockstyle{desc\dhyphen other\dhyphen name}%
  {\providedby{\sty{glossary-table} v1.50+}}
  % COMMANDS: long
  % \glsdescwidth
  \gcmd{gls\-desc\-width}
  {
    \providedby{\sty{glossary-long} \& \sty{glossary-super}}
    \desc{a length register used to set the width of the description
     column for \env{tabular}-like styles}
  }
  % \glspagelistwidth
  \gcmd{gls\-page\-list\-width}
  {
    \providedby{\sty{glossary-long} \& \sty{glossary-super}}
    \desc{a length register used to set the width of the
    \idx{locationlist} column for \env{tabular}-like styles}
  }
  % COMMANDS: longbooktabs style
  % \glspatchLToutput
  \gcmd{gls\-patch\-LT\-output}
  {
    \providedby{\sty{glossary-longbooktabs} v4.21+}
    \desc{applies a patch to \env{longtable} to check for instances
    of the group skip occurring at a page break}
  }
  % \glspenaltygroupskip
  \gcmd{gls\-penalty\-group\-skip}
  {
    \providedby{\sty{glossary-longbooktabs} v4.21+}
    \desc{the definition of \gls{glsgroupskip} with
     \optval{nogroupskip}{false} for the \sty{glossary-longbooktabs}
     styles}
  }
  % COMMANDS: tree
  % \glstreepredesc
  \gcmd{gls\-tree\-pre\-desc}
  {
    \providedby{\sty{glossary-tree} v4.26+}
    \desc{space inserted before top-level descriptions}
  }
  % \glstreechildpredesc
  \gcmd{gls\-tree\-child\-pre\-desc}
  {
    \providedby{\sty{glossary-tree} v4.26+}
    \desc{space inserted before child descriptions}
  }
  % \glstreenamefmt
  \gcmd{gls\-tree\-name\-fmt}
  {
    \providedby{\sty{glossary-tree} v4.08+}
    \syntax{\margm{text}}
    \desc{used to format the name for the \glostyle{tree} and
     \glostyle{index} styles}
  }
  % \glstreegroupheaderfmt
  \gcmd{gls\-tree\-group\-header\-fmt}
  {
    \providedby{\sty{glossary-tree} v4.22+}
    \syntax{\margm{text}}
    \desc{used to format the \idx{group} title for the \glostyle{treegroup} and
     \glostyle{indexgroup} styles}
  }
  % \glstreenavigationfmt
  \gcmd{gls\-tree\-navigation\-fmt}
  {
    \providedby{\sty{glossary-tree} v4.22+}
    \syntax{\margm{text}}
    \desc{used to format the navigation element for styles like \glostyle{treehypergroup}}
  }
  % \glstreeitem
  \gcmd{gls\-tree\-item}
  {
    \providedby{\sty{glossary-tree} v4.26+}
    \desc{used to indent the top-level entries for the \glostyle{index} styles}
  }
  % \glstreesubitem
  \gcmd{gls\-tree\-sub\-item}
  {
    \providedby{\sty{glossary-tree} v4.26+}
    \desc{used to indent the level~1 entries for the \glostyle{index} styles}
  }
  % \glstreesubsubitem
  \gcmd{gls\-tree\-sub\-sub\-item}
  {
    \providedby{\sty{glossary-tree} v4.26+}
    \desc{used to indent the level~2 entries for the \glostyle{index} styles}
  }
  % COMMANDS: list style
  % \glslistdottedwidth
  \gcmd{glslistdottedwidth}
  {
    \providedby{\sty{glossary-list}}
    \desc{a length register used by \glostyle{listdotted}}
  }
  % \glslistinit
  \gcmd{gls\-list\-init}
  {%
    \providedby{\sty{glossary-list} v4.48+}
    \desc{used to disable problematic commands at the start the
    \glostyle{list} styles to provide better integration with
    \sty{gettitlestring}}
  }
  % \glslistexpandedname
  \gcmd{gls\-list\-expanded\-name}
  {%
    \providedby{\sty{glossary-list} v4.48+}
    \syntax{\margm{entry-label}}
    \desc{used by \gls{glslistinit} to provide better integration with
    \sty{gettitlestring}}
  }
  % COMMANDS: inline style
  % \glsinlinedescformat
  \gcmd{gls\-in\-line\-desc\-format}
  {
    \providedby{\sty{glossary-inline} v3.03+}
    \syntax{\margm{description}\margm{symbol}\margm{location list}}
    \desc{formats the description, symbol and \idx{locationlist} for
     top-level entries}
  }
  % \glsinlinesubdescformat
  \gcmd{gls\-in\-line\-sub\-desc\-format}
  {
    \providedby{\sty{glossary-inline} v3.03+}
    \syntax{\margm{description}\margm{symbol}\margm{location list}}
    \desc{formats the description, symbol and \idx{locationlist} for
     child entries}
  }
  % \glspostinline
  \gcmd{gls\-post\-in\-line}
  {%
    \providedby{\sty{glossary-inline} v3.03+}
    \desc{used at the end of the \env{theglossary} environment}
  }
  % \glspostinlinedescformat
  \gcmd{gls\-post\-in\-line\-desc\-format}
  {%
    \providedby{\sty{glossary-inline} v3.03+}
    \syntax{\margm{description}\margm{symbol}\margm{location list}}
    \desc{formats the top-level entry's description, symbol and \idx{locationlist}}
  }
  % \glspostinlinesubdescformat
  \gcmd{gls\-post\-in\-line\-sub\-desc\-format}
  {%
    \providedby{\sty{glossary-inline} v3.03+}
    \syntax{\margm{description}\margm{symbol}\margm{location list}}
    \desc{formats the child entry's description, symbol and \idx{locationlist}}
  }
  % COMMANDS: STYLE MODIFICATIONS
  % \glsxtrprelocation
  \gcmd{gls\-xtr\-pre\-location}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.21+}
    \initvalcs{space}
    \desc{used before the \idx{locationlist} in the predefined
     styles provided by \sty{glossaries-extra} or modified by
     \sty{glossaries-extra-stylemods}}
  }
  % \glslistprelocation
  \gcmd{gls\-list\-pre\-location}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.21+}
    \initvalcs{glsxtrprelocation}
    \desc{used before the top-level entry \idx{locationlist} 
     for the \glostyle{list} styles}
  }
  % \glslistchildprelocation
  \gcmd{gls\-list\-child\-pre\-location}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.21+}
    \initvalcs{glslistprelocation}
    \desc{used before the child entry \idx{locationlist} 
     for the \glostyle{list} styles}
  }
  % \glslistchildpostlocation
  \gcmd{gls\-list\-child\-post\-location}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.21+}
    \initval{.}
    \desc{used after the child entry \idx{locationlist} 
     for the \glostyle{list} styles}
  }
  % \glslistdesc
  \gcmd{gls\-list\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{entry-label}}
    \desc{used to display the description for the \glostyle{list} styles}
  }
  % \glslistgroupskip
  \gcmd{gls\-list\-group\-skip}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \desc{used for the group skip in the \glostyle{list} styles}
  }
  % \glslistitem
  \gcmd{gls\-list\-item}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.47+}
    \syntax{\margm{entry-label}}
    \desc{used to display the top-level entry item in the \glostyle{list} styles}
  }
  % \glsaltlistitem
  \gcmd{gls\-alt\-list\-item}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.47+}
    \syntax{\margm{entry-label}}
    \desc{used to display the top-level entry item in the \glostyle{altlist} styles}
  }
  % \glslistgroupheaderitem
  \gcmd{gls\-list\-group\-header\-item}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.47+}
    \syntax{\margm{group-label}\margm{header code}}
    \desc{used to display the \idx{group} headings in the \glostyle{listgroup} styles}
  }
  % \glslistgroupafterheader
  \gcmd{gls\-list\-group\-after\-header}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.47+}
    \desc{used after \idx{group} headings in the \glostyle{listgroup} styles}
  }
  % \glstreedefaultnamefmt
  \gcmd{gls\-tree\-de\-fault\-name\-fmt}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{text}}
    \desc{used as the default name format for the \glostyle{tree}
     and \glostyle{index} styles}
  }
  % \glstreePreHeader
  \gcmd{gls\-tree\-Pre\-Header}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.41+}
    \syntax{\margm{group-label}\margm{group-title}}
    \desc{pre \idx{group} header hook the \glostyle{treegroup}
     and \glostyle{indexgroup} styles}
  }
  % \glstreeSubPreHeader
  \gcmd{gls\-tree\-Sub\-Pre\-Header}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.49+}
    \syntax{\margm{previous group level}\margm{level}\margm{parent label}\margm{group label}\margm{group title}}
    \desc{pre sub-\idx{group} header hook the \glostyle{treegroup}
     and \glostyle{indexgroup} styles}
  }
  % \glstreeprelocation
  \gcmd{gls\-tree\-pre\-location}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.21+}
    \initvalcs{glsxtrprelocation}
    \desc{used before the top-level entry \idx{locationlist} 
     for the \glostyle{tree} and \glostyle{index} styles}
  }
  % \glstreechildprelocation
  \gcmd{gls\-tree\-child\-pre\-location}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.21+}
    \initvalcs{glstreeprelocation}
    \desc{used before the child entry \idx{locationlist} 
     for the \glostyle{tree} and \glostyle{index} styles}
  }
  % \glstreegroupskip
  \gcmd{gls\-tree\-group\-skip}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.41+}
    \desc{group skip for the \glostyle{tree} and \glostyle{index} styles}
  }
  % \glstreegroupheaderskip
  \gcmd{gls\-tree\-group\-header\-skip}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.42+}
    \desc{after group header skip for the \glostyle{treegroup} and 
      \glostyle{indexgroup} styles}
  }
  % \glsindexsubgroupitem
  \gcmd{gls\-index\-sub\-group\-item}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.49+}
    \syntax{\margm{previous group level}\margm{level}\margm{parent
label}\margm{group label}\margm{group title}}
    \desc{used to format sub-\idx{group} headers for the 
      \glostyle{indexgroup} styles}
  }
  % \glsxtrtreepredesc
  \gcmd{gls\-xtr\-tree\-pre\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.46+}
    \initvalcs{glstreepredesc}
    \desc{inserted before the top-level descriptions for the \glostyle{tree} styles}
  }
  % \glsxtrtreechildpredesc
  \gcmd{gls\-xtr\-tree\-child\-pre\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.46+}
    \initvalcs{glstreechildpredesc}
    \desc{inserted before the child descriptions for the \glostyle{tree} styles}
  }
  % \glstreedesc
  \gcmd{gls\-tree\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{entry-label}}
    \desc{displays the given top-level entry's description with pre and post hooks for the \glostyle{tree} styles}
  }
  % \glstreechilddesc
  \gcmd{gls\-tree\-child\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{entry-label}}
    \desc{displays the given child entry's description with pre and post hooks for the \glostyle{tree} styles}
  }
  % \glstreeDescLoc
  \gcmd{gls\-tree\-Desc\-Loc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.41+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{formats the top-level description (if set) and \idx{locationlist} for the \glostyle{tree} styles}
  }
  % \glstreeChildDescLoc
  \gcmd{gls\-tree\-Child\-Desc\-Loc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.41+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{formats the child description (if set) and \idx{locationlist} for the \glostyle{tree} styles}
  }
  % \glstreeNoDescSymbolPreLocation
  \gcmd{gls\-tree\-No\-Desc\-Symbol\-Pre\-Location}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.42+}
    \desc{inserted before the \idx{locationlist} when there's no
     description or symbol for the \glostyle{tree} styles}
  }
  % \glstreesymbol
  \gcmd{gls\-tree\-symbol}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{entry-label}}
    \desc{displays the top-level symbol in parentheses, if set, for the \glostyle{tree} styles}
  }
  % \glstreechildsymbol
  \gcmd{gls\-tree\-child\-symbol}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{entry-label}}
    \desc{displays the top-level symbol in parentheses, if set, for the \glostyle{tree} styles}
  }
  % \glstreesubgroupitem
  \gcmd{gls\-tree\-sub\-group\-item}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.49+}
    \syntax{\marg{previous group level}\marg{level}\marg{parent label}\marg{group label}\marg{group title}}
    \desc{used to display the sub-group header in the \glostyle{treegroup} styles}
  }
  % \glstreenonamedesc
  \gcmd{gls\-tree\-no\-name\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{entry-label}}
    \desc{displays the given top-level entry's description with pre
     and post hooks for the \glostyle{treenoname} styles}
  }
  % \glstreenonamesymbol
  \gcmd{gls\-tree\-no\-name\-symbol}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{entry-label}}
    \desc{displays the given top-level entry's symbol in parentheses for 
     the \glostyle{treenoname} styles}
  }
  % \glstreenonameDescLoc
  \gcmd{gls\-tree\-no\-name\-Desc\-Loc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.45+}
    \syntax{\margm{entry-label}}
    \desc{displays the given top-level entry's description and
    \idx{locationlist} for the \glostyle{treenoname} styles}
  }
  % \glstreenonamechilddesc
  \gcmd{gls\-tree\-no\-name\-child\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.31+}
    \syntax{\margm{entry-label}}
    \desc{displays the given child entry's description and 
     post hook for the \glostyle{treenoname} styles}
  }
  % \glstreenonameChildDescLoc
  \gcmd{gls\-tree\-no\-name\-Child\-Desc\-Loc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.45+}
    \syntax{\margm{entry-label}}
    \desc{displays the given child entry's description and
    \idx{locationlist} for the \glostyle{treenoname} styles}
  }
  % \glsalttreepredesc
  \gcmd{gls\-alt\-tree\-pre\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.46+}
    \desc{inserted before the top-level descriptions for the \glostyle{alttree} styles}
  }
  % \glsalttreechildpredesc
  \gcmd{gls\-alt\-tree\-child\-pre\-desc}
  {%
    \providedby{\sty{glossaries-extra-stylemods} v1.46+}
    \desc{inserted before the child descriptions for the \glostyle{alttree} styles}
  }
  % \glssetwidest
  \gcmd{gls\-set\-widest}
  {
    \providedby{\sty{glossary-tree}}
    \syntax{\oargm{level}\margm{name}}
    \desc{indicates that \meta{name} is the widest name for the
      given \idx{hierarchicallevel}}
  }
  % \gglssetwidest
  \gcmd{ggls\-set\-widest}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.21+}
    \syntax{\oargm{level}\margm{name}}
    \desc{as \gls{glssetwidest} but global}
  }
  % \eglssetwidest
  \gcmd{egls\-set\-widest}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{level}\margm{name}}
    \desc{as \gls{glssetwidest} but expands \meta{text}}
  }
  % \xglssetwidest
  \gcmd{xgls\-set\-widest}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{level}\margm{name}}
    \desc{as \gls{eglssetwidest} but global}
  }
  % \glsupdatewidest
  \gcmd{gls\-update\-widest}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.23+}
    \syntax{\oargm{level}\margm{name}}
    \desc{similar to \gls{glssetwidest} but only if \meta{name} is
    wider than the current widest value for the given
    \idx{hierarchicallevel}}
  }
  % \gglsupdatewidest
  \gcmd{ggls\-update\-widest}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.23+}
    \syntax{\oargm{level}\margm{name}}
    \desc{as \gls{glsupdatewidest} but global}
  }
  % \eglsupdatewidest
  \gcmd{egls\-update\-widest}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.23+}
    \syntax{\oargm{level}\margm{name}}
    \desc{as \gls{glsupdatewidest} but expands \meta{name}}
  }
  % \xglsupdatewidest
  \gcmd{xgls\-update\-widest}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.23+}
    \syntax{\oargm{level}\margm{name}}
    \desc{as \gls{eglsupdatewidest} but global}
  }
  % \glsgetwidestname
  \gcmd{gls\-get\-widest\-name}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \desc{expands to the widest top-level name}
  }
  % \glsgetwidestsubname
  \gcmd{gls\-get\-widest\-sub\-name}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\margm{level}}
    \desc{expands to the widest name for the given
     \idx{hierarchicallevel} or to the widest top-level name, if no
     widest name set for \meta{level}}
  }
  % \glsfindwidesttoplevelname
  \gcmd{gls\-find\-widest\-top\-level\-name}
  {
    \providedby{\sty{glossary-tree} v4.22+}
    \syntax{\oargm{glossary labels}}
    \desc{finds and sets the widest name for all top-level entries
    in the given \idxpl{glossary}. If the optional argument is
    omitted, the list of all non-\idxpl{ignoredglossary} is assumed}
  }
  % \glsFindWidestTopLevelName
  \gcmd{gls\-Find\-Widest\-Top\-Level\-Name}
  {
    \providedby{\sty{glossaries-extra-stylemods}}% v1.0+
    \desc{a synonym for \gls{glsfindwidesttoplevelname}}
  }
  % \glsFindWidestUsedTopLevelName
  \gcmd{gls\-Find\-Widest\-Used\-Top\-Level\-Name}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}}
    \desc{finds and sets the widest name for all top-level entries
    that have been marked as \idxc{firstuseflag}{used} in the given \idxpl{glossary}}
  }
  % \glsFindWidestUsedAnyName
  \gcmd{gls\-Find\-Widest\-Used\-Any\-Name}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}}
    \desc{finds and sets the widest name for all entries
    that have been marked as \idxc{firstuseflag}{used} in the given \idxpl{glossary}}
  }
  % \glsFindWidestAnyName
  \gcmd{gls\-Find\-Widest\-Any\-Name}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}}
    \desc{finds and sets the widest name for all entries
    in the given \idxpl{glossary}}
  }
  % \glsFindWidestUsedLevelTwo
  \gcmd{gls\-Find\-Widest\-Used\-Level\-Two}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}}
    \desc{finds and sets the widest name for all entries
    that have been marked as \idxc{firstuseflag}{used} with
    \idx{hierarchicallevel} less than or equal to 2 in the given \idxpl{glossary}}
  }
  % \glsFindWidestLevelTwo
  \gcmd{gls\-Find\-Widest\-Level\-Two}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}}
    \desc{finds and sets the widest name for all entries with
    \idx{hierarchicallevel} less than or equal to 2 in the given \idxpl{glossary}}
  }
  % \glsFindWidestUsedAnyNameSymbol
  \gcmd{gls\-Find\-Widest\-Used\-Any\-Name\-Symbol}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}\margm{register}}
    \desc{like \gls{glsFindWidestUsedAnyName} but also also measures the
     symbol. The length of the widest symbol is stored in
     \meta{register} which should be a length register}
  }
  % \glsFindWidestAnyNameSymbol
  \gcmd{gls\-Find\-Widest\-Any\-Name\-Symbol}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}\margm{register}}
    \desc{like \gls{glsFindWidestAnyName} but also also measures the
     symbol. The length of the widest symbol is stored in
     \meta{register} which should be a length register}
  }
  % \glsFindWidestUsedAnyNameSymbolLocation
  \gcmd{gls\-Find\-Widest\-Used\-Any\-Name\-Symbol\-Location}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}\margm{register1}\margm{register2}}
    \desc{like \gls{glsFindWidestUsedAnyNameSymbol} but also also measures the
     \idx{locationlist}. The length of the widest symbol is stored in
     \meta{register1} and the length of the widest location is
     stored in \meta{register2}, which should both be length registers}
  }
  % \glsFindWidestAnyNameSymbolLocation
  \gcmd{gls\-Find\-Widest\-Any\-Name\-Symbol\-Location}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}\margm{register1}\margm{register2}}
    \desc{like \gls{glsFindWidestAnyNameSymbol} but also also measures the
     \idx{locationlist}. The length of the widest symbol is stored in
     \meta{register1} and the length of the widest location is
     stored in \meta{register2}, which should both be length registers}
  }
  % \glsFindWidestUsedAnyNameLocation
  \gcmd{gls\-Find\-Widest\-Used\-Any\-Name\-Location}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}\margm{register}}
    \desc{like \gls{glsFindWidestUsedAnyName} but also also measures the
     \idx{locationlist}. The length of the widest location is
     stored in \meta{register}, which should be a length register}
  }
  % \glsFindWidestAnyNameLocation
  \gcmd{gls\-Find\-Widest\-Any\-Name\-Location}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\oargm{glossary labels}\margm{register}}
    \desc{like \gls{glsFindWidestAnyName} but also also measures the
     \idx{locationlist}. The length of the widest location is
     stored in \meta{register}, which should be a length register}
  }
  % \glsxtralttreeSymbolDescLocation
  \gcmd{gls\-xtr\-alt\-tree\-Symbol\-Desc\-Location}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{formats the symbol, description and location for top-level entries
    for the \glostyle{alttree}-like styles}
  }
  % \glsxtralttreeSubSymbolDescLocation
  \gcmd{gls\-xtr\-alt\-tree\-Sub\-Symbol\-Desc\-Location}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \syntax{\margm{entry-label}\margm{location list}}
    \desc{formats the symbol, description and location for child entries
    for the \glostyle{alttree}-like styles}
  }
  % \glsxtralttreeInit
  \gcmd{gls\-xtr\-alt\-tree\-Init}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \desc{initialisation code performed by the \glostyle{alttree}-like styles}
  }
  % \glsxtrAltTreeIndent
  \gcmd{gls\-xtr\-Alt\-Tree\-Indent}
  {
    \providedby{\sty{glossaries-extra-stylemods} v1.05+}
    \desc{length register for the subsequent paragraph indentation for 
   the \glostyle{alttree}-like styles}
  }
  % COMMANDS: DISPLAYING GLOSSARIES
  % \glossarysection
  \gcmd{glos\-sary\-section}
  {
    \providedby{\sty{glossaries}}
    \syntax{\oargm{toc-title}\margm{title}}
    \desc{occurs at the start of a \idx{glossary} (except with
    \gls{printunsrtinnerglossary}). This will typically be defined
    to use a sectioning command, such as \gls{section} or
    \gls{chapter}. The default definition follows the \opt{section}
    and \opt{numberedsection} options}
  }
  % \glossarytitle
  \gcmd{glos\-sary\-title}
  {
    \providedby{\sty{glossaries}}
    \desc{initialised by the \csfmt{print\ldots glossary} set of
    commands (such as \gls{printglossary}) to the current
    \idx{glossary}['s] title}
  }
  % \glossarytoctitle
  \gcmd{glos\-sary\-toc\-title}
  {
    \providedby{\sty{glossaries}}
    \desc{initialised by the \csfmt{print\ldots glossary} set of
    commands (such as \gls{printglossary}) to the current
    \idx{glossary}['s] table of contents title}
  }
  % \glossaryheader
  \gcmd{glos\-sary\-header}
  {
    \providedby{\sty{glossaries}}
    \desc{inserted after \code{\cbeg{\env{theglossary}}}. This
     command should be redefined by the \idx{glossarystyle}}
  }
  % \glossentry
  \gcmd{gloss\-en\-try}
  {
    \providedby{\sty{glossaries} v3.08+}
    \syntax{\margm{entry label}\margm{location list}}
    \desc{used to format a top-level entry. This 
     command should be redefined by the \idx{glossarystyle}}
  }
  % \subglossentry
  \gcmd{sub\-gloss\-en\-try}
  {
    \providedby{\sty{glossaries} v3.08+}
    \syntax{\margm{level}\margm{entry label}\margm{location list}}
    \desc{used to format a child entry. This 
     command should be redefined by the \idx{glossarystyle}}
  }
  % \glsresetentrylist
  \gcmd{gls\-reset\-en\-try\-list}
  {
    \providedby{\sty{glossaries}}
    \desc{inserted into the \idx{glossary} code to counteract the
     effect of \gls{glsnonextpages}}
  }
  % \glsnonextpages
  \gcmd{gls\-no\-next\-pages}
  {
    \providedby{\sty{glossaries} v1.17+}
    \desc{designed for use with \app{makeindex} and \app{xindy},
    this may be placed in an entry's description to suppress the
    entry's \idx{locationlist}}
  }
  % \glsnextpages
  \gcmd{gls\-next\-pages}
  {
    \providedby{\sty{glossaries} v3.0+}
    \desc{designed for use with \app{makeindex} and \app{xindy},
    this may be placed in an entry's description to override
    \opt{nonumberlist}}
  }
  % \glsgroupskip
  \gcmd{gls\-group\-skip}
  {
    \providedby{\sty{glossaries}}
    \desc{inserted before each \idx{group} heading (except the
    first) in a \idx{glossary} (unless \printglossoptval{groups}{false}). 
    This command is defined by \idxpl{glossarystyle} as appropriate.
    Most of the predefined styles define this command to check the
    \opt{nogroupskip} option}
  }
  % \glsgroupheading
  \gcmd{gls\-group\-head\-ing}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{group-label}}
    \desc{inserted at the start of each \idx{group} in a \idx{glossary} 
    (unless \printglossoptval{groups}{false}) to display the
    \idx{group}['s] heading, if applicable, using the title
    associated with \meta{group-label} or, if no title provided,
    just \meta{group-label}. 
    This command is defined by \idxpl{glossarystyle} as appropriate}
  }
  % \glssubgroupheading
  \gcmd{gls\-sub\-group\-head\-ing}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{previous level}\margm{level}\margm{parent\dhyphen label}\allowbreak\margm{group\dhyphen label}}
    \desc{used to format sub-\idx{group} headings. Only applicable
    with the \idx{unsrtfam}. This command won't occur in
    \idxpl{glossary} that use \gls{printglossary} or
    \gls{printnoidxglossary}}
  }
  % \glossarypostamble
  \gcmd{glos\-sary\-post\-amble}%
  {%
    \providedby{\sty{glossaries}}
    \desc{used at the end of the \idx{glossary}}
  }
  % \glossarypreamble
  \gcmd{glos\-sary\-pre\-amble}%
  {%
    \providedby{\sty{glossaries}}
    \desc{used at the start of the \idx{glossary}. This will be 
    locally redefined to the preamble associated with 
    the current glossary, if one has been set}
    \field{seealso}{setglossarypreamble}
  }
  % \setglossarypreamble
  \gcmd{set\-glos\-sary\-pre\-amble}%
  {%
    \providedby{\sty{glossaries} v3.07+}
    \syntax{\oargm{type}\margm{text}}
    \desc{globally sets the preamble for the glossary identified by
    \meta{type} to \meta{text}. If \meta{type} is omitted, 
    \gls{glsdefaulttype} is assumed}
  }
  % \apptoglossarypreamble
  \gcmd{app\-to\-glos\-sary\-pre\-amble}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\oargm{type}\margm{text}}
    \desc{appends (locally) \meta{text} to the preamble for the glossary identified by
    \meta{type}. If \meta{type} is omitted, 
    \gls{glsdefaulttype} is assumed}
  }
  % \pretoglossarypreamble
  \gcmd{pre\-to\-glos\-sary\-pre\-amble}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\oargm{type}\margm{text}}
    \desc{prepends (locally) \meta{text} to the preamble for the glossary identified by
    \meta{type}. If \meta{type} is omitted, 
    \gls{glsdefaulttype} is assumed}
  }
  % \printglossaries
  \gcmd{print\-glos\-saries}%
  {%
    \providedby{\sty{glossaries}}
    \desc{iterates over all non-\idxpl{ignoredglossary} and does 
     \code{\gls{printglossary}\oarg{\printglossoptval{type}{\meta{type}}}}
     for each \idx{glossary}}
  }
  % \printnoidxglossaries
  \gcmd{print\-noidx\-glos\-saries}%
  {%
    \providedby{\sty{glossaries} v4.04+}
    \desc{iterates over all non-\idxpl{ignoredglossary} and does 
     \code{\gls{printnoidxglossary}\oarg{\printglossoptval{type}{\meta{type}}}}
     for each \idx{glossary}}
  }
  % \printunsrtglossaries
  \gcmd{print\-unsrt\-glos\-saries}%
  {%
    \providedby{\sty{glossaries-extra} v1.08+}
    \desc{iterates over all non-\idxpl{ignoredglossary} and does 
     \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{\meta{type}}}}
     for each \idx{glossary}}
  }
  % \printglossary
  \gcmd{print\-glos\-sary}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}}
    \desc{displays the \idx{glossary} by inputting a file created by 
     \app+{makeindex} or \app+{xindy}. Must be used with
     \gls{makeglossaries} and either \app{makeindex} or \app{xindy}}
  }%
  % \printacronyms
  \gcmd{print\-acronyms}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}}
    \note{requires the \opt{acronyms} package option}
    \desc{shortcut for
     \code{\gls{printglossary}\oarg{\printglossoptval{type}{\gls{acronymtype}}}}}
  }%
  % \printunsrtacronyms
  \gcmd{print\-unsrt\-acronyms}%
  {%
    \providedby{\sty{glossaries-extra-bib2gls} v1.40+}
    \syntax{\oargm{options}}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{acronyms},\opt{record}}\marg{glossaries-extra}}}
    \desc{shortcut for
     \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{\gls{acronymtype}}}}}
  }%
  % \printabbreviations
  \gcmd{print\-ab\-bre\-vi\-a\-tions}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{abbreviations}}\marg{glossaries-extra}}}
    \desc{shortcut for
     \code{\gls{printglossary}\oarg{\printglossoptval{type}{\gls{glsxtrabbrvtype}}}}}
  }%
  % \printunsrtabbreviations
  \gcmd{print\-unsrt\-ab\-bre\-vi\-a\-tions}%
  {%
    \providedby{\sty{glossaries-extra-bib2gls} v1.40+}
    \syntax{\oargm{options}}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{abbreviations},\opt{record}}\marg{glossaries-extra}}}
    \desc{shortcut for
     \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{\gls{glsxtrabbrvtype}}}}}
  }%
  % \printsymbols
  \gcmd{print\-sym\-bols}%
  {%
    \providedby{\sty{glossaries} v4.02+}
    \syntax{\oargm{options}}
    \note{requires the \opt{symbols} package option}
    \desc{shortcut for
     \code{\gls{printglossary}\oarg{\printglossoptval{type}{symbols}}}}
  }%
  % \printunsrtsymbols
  \gcmd{print\-unsrt\-sym\-bols}%
  {%
    \providedby{\sty{glossaries-extra-bib2gls} v1.40+}
    \syntax{\oargm{options}}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{symbols},\opt{record}}\marg{glossaries-extra}}}
    \desc{shortcut for
     \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{symbols}}}}
  }%
  % \printnumbers
  \gcmd{print\-num\-bers}%
  {%
    \providedby{\sty{glossaries} v4.02+}
    \syntax{\oargm{options}}
    \note{requires the \opt{numbers} package option}
    \desc{shortcut for
     \code{\gls{printglossary}\oarg{\printglossoptval{type}{numbers}}}}
  }%
  % \printunsrtnumbers
  \gcmd{print\-unsrt\-num\-bers}%
  {%
    \providedby{\sty{glossaries-extra-bib2gls} v1.40+}
    \syntax{\oargm{options}}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{numbers},\opt{record}}\marg{glossaries-extra}}}
    \desc{shortcut provided by the \opt{numbers} package option combined
     with \sty{glossaries-extra-bib2gls} that simply does
     \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{numbers}}}}
  }%
  % \printindex
  \gcmd{print\-index}%
  {%
    \syntax{\oargm{options} v4.02+}
    \note{requires  the \opt{index} package option}
    \desc{shortcut provided by the \opt{index} package option that simply does
     \code{\gls{printglossary}\oarg{\printglossoptval{type}{index}}}}
  }%
  % \printunsrtindex
  \gcmd{print\-unsrt\-index}%
  {%
    \providedby{\sty{glossaries-extra-bib2gls} v1.40+}
    \syntax{\oargm{options}}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{index},\opt{record}}\marg{glossaries-extra}}}
    \desc{shortcut provided by the \opt{index} package option combined
     with \sty{glossaries-extra-bib2gls} that simply does
     \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{index}}}}
  }%
  % \printnoidxglossary
  \gcmd{print\-noidx\-glos\-sary}%
  {%
    \providedby{\sty{glossaries} v4.04+}
    \syntax{\oargm{options}}
    \desc{displays the \idx{glossary} by obtaining the \idx{indexing} information from
     the \ext+{aux} file and using \TeX\ to sort and collate. Must be used with
     \gls{makenoidxglossaries} or with the \idxpl{glossary} not identified
     in the optional argument of \gls{makeglossaries} when using the
     hybrid method. This method can be very slow and has limitations}
  }%
  % \printunsrtglossary
  \gcmd{print\-unsrt\-glos\-sary}%
  {%
    \providedby{\sty{glossaries-extra} v1.08+}
    \syntax{\oargm{options}}
    \desc{displays the \idx{glossary} by iterating over all entries
     associated with the given \idx{glossary} (in the order in which they
     were added to the \idx{glossary}). \Idx{group} headers will only be
     inserted if the \gloskey{group} key has been defined and has
     been set (typically with the \opt{record} option and
     \app{bib2gls}). \Idxpl{locationlist} will only be shown if the
     \gloskey{location} or \glosfield{loclist} fields have been set
     (typically by \app{bib2gls})}
  }%
  % \printunsrtglossary*
  \gcmd{print\-unsrt\-glos\-sary*}%
  {%
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\oargm{options}\margm{init-code}}
    \desc{does \code{\marg{\meta{init-code}\gls{printunsrtglossary}\oargm{options}}}
     which localises \meta{init-code}}
  }
  % \printunsrtglossaryunit
  \gcmd{print\-unsrt\-glos\-sary\-unit}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\oargm{options}\margm{counter-name}}
    \desc{provided for use with \gls{GlsXtrRecordCounter} to display
    a glossary with \gls{printunsrtglossary*} that filters entries that
    don't have a match for the current \meta{counter-name} value}
  }
  % \printunsrtglossaryunitsetup
  \gcmd{print\-unsrt\-glos\-sary\-unit\-set\-up}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{counter-name}}
    \desc{sets up the filtering used by \gls{printunsrtglossaryunit}}
  }
  % \printunsrtglossaryunitpostskip
  \gcmd{print\-unsrt\-glos\-sary\-unit\-post\-skip}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{the vertical space at the end of the \idx{glossary} appended 
    by \gls{printunsrtglossaryunit}}
  }
  % \printunsrtinnerglossary
  \gcmd{print\-unsrt\-in\-ner\-glos\-sary}%
  {%
    \providedby{\sty{glossaries-extra} v1.44+}
    \syntax{\oargm{options}\margm{pre-code}\margm{post-code}}
    \desc{similar to \gls{printunsrtglossary} but doesn't contain
     the code that starts and ends the \idx{glossary} (such as 
     beginning and ending the \env{theglossary} environment), so
     this command needs to be
     either placed inside \env{printunsrtglossarywrap} or in the 
     \gls{printunsrtglossary} entry handler \gls{printunsrtglossaryhandler}}
  }%
  % \glsxtrnoidxgroups
  \gcmd{gls\-xtr\-no\-idx\-groups}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{makes the group titling mechanism used with the
     \idx{unsrtfam} use the same method as for
    \gls{printnoidxglossary}. This command can't
     be used with \gls{makeglossaries} or with \opt{record}}
  }
  % \printunsrtglossaryentryprocesshook
  \gcmd{print\-unsrt\-glos\-sary\-en\-try\-pro\-cess\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{hook used within the \idx{unsrtfam} while the
     \idx{glossary} is being constructed}
  }
  % \printunsrtglossaryskipentry
  \gcmd{print\-unsrt\-glos\-sary\-skip\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \desc{may be used within
     \gls{printunsrtglossaryentryprocesshook} to skip the current entry}
  }
  % \printunsrtglossarypreentryprocesshook
  \gcmd{print\-unsrt\-glos\-sary\-pre\-en\-try\-pro\-cess\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.50+}
    \syntax{\margm{internal cs}}
    \desc{hook used within the \idx{unsrtfam} while the
     \idx{glossary} is being constructed before the entry line has
been added}
  }
  % \printunsrtglossarypostentryprocesshook
  \gcmd{print\-unsrt\-glos\-sary\-post\-en\-try\-pro\-cess\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.50+}
    \syntax{\margm{internal cs}}
    \desc{hook used within the \idx{unsrtfam} while the
     \idx{glossary} is being constructed after the entry line has
been added}
  }
  % \printunsrtglossarygrouphook
  \gcmd{print\-unsrt\-glos\-sary\-group\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.50+}
    \syntax{\margm{internal cs}}
    \desc{hook used within the \idx{unsrtfam} while the
     \idx{group} header is being constructed}
  }
  % \printunsrtglossarypostbegin
  \gcmd{print\-unsrt\-glos\-sary\-post\-begin}
  {
    \providedby{\sty{glossaries-extra} v1.50+}
    \syntax{\margm{internal cs}}
    \desc{hook used within the \idx{unsrtfam} while the
     \idx{glossary} is being constructed just after 
     \code{\cbeg{theglossary}} is added}
  }
  % \printunsrtglossarypreend
  \gcmd{print\-unsrt\-glos\-sary\-pre\-end}
  {
    \providedby{\sty{glossaries-extra} v1.50+}
    \syntax{\margm{internal cs}}
    \desc{hook used within the \idx{unsrtfam} while the
     \idx{glossary} is being constructed just before 
     \code{\cend{theglossary}} is added}
  }
  % \glscurrenttoplevelentry
  \gcmd{gls\-current\-top\-level\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{may be used within
     \gls{printunsrtglossaryentryprocesshook} to reference the most
recent top level entry label (allowing for \printglossopt{flatten} and \printglossopt{leveloffset})}
  }
  % \glscurrentrootentry
  \gcmd{gls\-current\-root\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{may be used within
     \gls{printunsrtglossaryentryprocesshook} to reference the most
recent top level entry label (allowing for \printglossopt{flatten}
but not \printglossopt{leveloffset})}
  }
  % \currentglossary
  \gcmd{cur\-rent\-glos\-sary}
  {
    \providedby{\sty{glossaries} v3.0+}
    \desc{defined by the \csfmt{print\ldots glossary} commands to
      the current \idx{glossary} label}
  }
  % \printunsrtglossarypredoglossary
  \gcmd{print\-unsrt\-glos\-sary\-pre\-do\-glos\-sary}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \desc{hook performed by the \idx{unsrtfam} just before the
     \idx{glossary} body is displayed}
  }
  % \@glsxtr@doglossary
  \gcmd{@gls\-xtr\-@do\-glos\-sary}
  {
    \providedby{\sty{glossaries-extra} v1.08+}
    \desc{internal command used within the construction of the
     \idx{glossary} code by the \idx{unsrtfam}. Should not be used
     or modified but \gls{printunsrtglossarypredoglossary} can be
     defined to show the definition of this command for debugging
     purposes}
  }
  % \printunsrtglossaryhandler
  \gcmd{print\-unsrt\-glos\-sary\-handler}
  {
    \providedby{\sty{glossaries-extra} v1.16+}
    \syntax{\margm{entry-label}}
    \desc{used within the \idx{unsrtfam} to process the current entry}
  }
  % \glsxtrunsrtdo
  \gcmd{gls\-xtr\-unsrt\-do}%
  {%
    \syntax{\margm{entry-label}}
    \providedby{\sty{glossaries-extra} v1.12+}
    \desc{used by the \idx{unsrtfam}, 
     this displays the \idx{glossary} entry according to the current
     \idx{glossarystyle} (taking the \idx{hierarchicallevel} into account,
     which may have been adjusted by \printglossopt{leveloffset} or
      \printglossopt{flatten})}
  }
  % \GlsXtrLocationField
  \gcmd{Gls\-Xtr\-Location\-Field}
  {
    \providedby{\sty{glossaries-extra} v1.37+}
    \initval{location}
    \desc{expands to the \idx{internalfieldlabel} used to obtain the
     formatted \idx{locationlist} for the \idx{unsrtfam}}
  }
  % \glsxtriflabelinlist
  \gcmd{gls\-xtr\-if\-label\-in\-list}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{label}\margm{label-list}\margm{true}\margm{false}}
    \desc{does \meta{true} if the given label is in the given comma-separated
    list of labels, otherwise does \meta{false}. The label and list are fully
    expanded}
  }
  % prinunsrtglossarywrap environment
  \genv{print\-unsrt\-glos\-sary\-wrap}%
  {%
    \providedby{\sty{glossaries-extra} v1.44+}
    \syntax{\oargm{options}}
    \desc{sets up the start and end of the \idx{glossary} (including
     beginning and ending the \env{theglossary} environment). Use
    \gls{printunsrtinnerglossary} within the body for each block of
    entries}
  }%
  % print*glossary options
  \gidx{printglossopt}{\name{print [unsrt|noidx] glossary options}%
    \field{text}{print glossary option}%
    \desc{most (but not all) of these options can be used in the optional argument 
    of all the print \idx{glossary} commands: \gls{printglossary}, \gls{printnoidxglossary},
    \gls{printunsrtglossary} and \gls{printunsrtinnerglossary}.
    Some may be used in the optional argument of 
    the \env{printunsrtglossarywrap} environment}
  }
  % printgloss type
  \gprintglossopt{type}{%
    \syntax{\meta{\idx{glossary}-label}}
    \defval{\gls{glsdefaulttype}}%
    \desc{identifies the \idx{glossary} to display}}
  % printgloss sort
  \gprintglossopt{sort}{%
    \syntax{\meta{method}}
    \defval{standard}
    \desc{only available with \gls{printnoidxglossary}, this
    indicates how the \idx{glossary} should be ordered}}
  % printgloss title
  \gprintglossopt{title}{%
    \syntax{\meta{text}}
    \desc{sets the glossary title (overriding the default)}}
  % printgloss toctitle
  \gprintglossopt{toc\-title}{%
    \syntax{\meta{text}}
    \desc{sets the glossary toc title (overriding the default)}}
  % printgloss target
  \gprintglossopt{target}{%
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\meta{boolean}}
    \initval{true}%
    \defval{true}%
    \desc{if true, each entry in the \idx{glossary} should have a
    hypertarget created, if supported by the \idx{glossarystyle} and if
    hyperlinks are enabled}
  }
  % printgloss targetnameprefix
  \gprintglossopt{target\-name\-pre\-fix}{%
    \providedby{\sty{glossaries-extra} v1.20+}
    \syntax{\meta{prefix}}
    \desc{inserts \meta{prefix} at the start of the hypertarget names}}
  % printgloss prefix
  \gprintglossopt{prefix}{%
    \providedby{\sty{glossaries-extra} v1.31+}
    \syntax{\meta{prefix}}
    \desc{redefines \gls{glolinkprefix} to \meta{prefix}}}
  % printgloss label
  \gprintglossopt{label}{%
    \providedby{\sty{glossaries-extra} v1.39+}
    \syntax{\meta{label}}
    \desc{adds \code{\gls{label}\margm{label}} to the start of the
    \idx{glossary} (after the title). Not available with 
    \gls{printunsrtinnerglossary}}
  }
  % printgloss preamble
  \gprintglossopt{preamble}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\meta{text}}
    \desc{redefines \gls{glossarypreamble} to \meta{text}}
  }
  % printgloss postamble
  \gprintglossopt{postamble}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\meta{text}}
    \desc{redefines \gls{glossarypostamble} to \meta{text}}
  }
  % printgloss nonumberlist
  \gprintglossopt{no\-number\-list}{%
    \syntax{\meta{boolean}}
    \initval{false}%
    \defval{true}%
    \desc{suppress the \idx{locationlist}. Note that
     \printglossoptval{nonumberlist}{false}
     will have no effect with the \resourceoptval{save-locations}{false}
     \idx{resourceopt} as there won't be any \idxpl{locationlist} to
     display}
  }
  % printgloss nogroupskip
  \gprintglossopt{no\-group\-skip}{%
    \syntax{\meta{boolean}}
    \initval{false}%
    \defval{true}%
    \desc{suppress the gap implemented by some \idxpl{glossarystyle} 
     between \idxpl{group}}
  }
  % printgloss numberedsection
  \gprintglossopt{numbered\-section}{%
    \syntax{\meta{value}}
    \initval{false}%
    \defval{nolabel}%
    \desc{indicates whether or not \idx{glossary} section headers will be numbered
     and also if they should automatically be labelled.
     The \opt{numberedsection} package option will change the default
     setting to match}
  }
  % printgloss style
  \gprintglossopt{style}{%
    \syntax{\meta{style-name}}
    \desc{use the \meta{style-name} \idx{glossarystyle}}
  }
  % printgloss leveloffset
  \gprintglossopt{level\-offset}{%
    \providedby{\sty{glossaries-extra} v1.44+}
    \syntax{\meta{offset}}
    \initval{0}%
    \desc{set or increment the \gls{hierarchicallevel} offset. If
    \meta{offset} starts with \code{++} then the current offset is
    incremented by the given amount otherwise the current offset is
    set to \meta{offset}. For example, an entry with a normal 
    \gls{hierarchicallevel} of 1 will be treated as though it has
    \gls{hierarchicallevel} $1+\meta{offset}$. This option is only available for the
    \idx{unsrtfam} and the \env{printunsrtglossarywrap}
    environment}%
  }
  % printgloss groups
  \gprintglossopt{groups}{%
    \providedby{\sty{glossaries-extra} v1.44+}
    \syntax{\meta{boolean}}
    \initval{true}%
    \defval{true}%
    \desc{enables \idx{group} formation. This option is only available for the
    \idx{unsrtfam} and the \env{printunsrtglossarywrap}
    environment. Note that no \idxpl{group} will be formed when
    invoking \app{bib2gls} with the default \switch{no-group}, regardless of 
    this setting}
  }
  % printgloss flatten
  \gprintglossopt{flatten}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\meta{boolean}}
    \initval{false}%
    \defval{true}%
    \desc{if true, treats all entries as though they have the same
      hierarchical level (the value of \printglossopt{leveloffset}). 
      This option is only available for the
     \idx{unsrtfam} and the \env{printunsrtglossarywrap}
     environment}
  }
  % printgloss nopostdot
  \gprintglossopt{no\-post\-dot}{%
    \providedby{\sty{glossaries} v4.08+}
    \syntax{\meta{boolean}}
    \initval{false}%
    \defval{true}%
    \desc{suppress the post-description punctuation}
  }
  % printgloss entrycounter
  \gprintglossopt{en\-try\-counter}{%
    \providedby{\sty{glossaries} v4.08+}
    \syntax{\meta{boolean}}
    \initval{false}%
    \defval{true}%
    \desc{if true, enable the entry counter}
  }
  % printgloss subentrycounter
  \gprintglossopt{sub\-en\-try\-counter}{%
    \providedby{\sty{glossaries} v4.08+}
    \syntax{\meta{boolean}}
    \initval{false}%
    \defval{true}%
    \desc{if true, enable the sub-entry counter}
  }
  % \ifglsxtrprintglossflatten
  \gcond{if\-gls\-xtr\-print\-gloss\-flatten}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \initvalcs{iffalse}
    \desc{conditional set by the \printglossopt{flatten} option}
  }
  % \glsxtraddgroup
  \gcmd{gls\-xtr\-add\-group}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{code}}
    \desc{used by the \idx{unsrtfam} to perform \meta{code} if the
    entry identified by \meta{entry-label} should have support for
    \idxpl{group}}
  }
  % \glscurrententrylevel
  \gcmd{gls\-current\-en\-try\-level}
  {
    \providedby{\sty{glossaries-extra} v1.44+}
    \desc{defined within the \idx{unsrtfam} to the current
    \idx{hierarchicallevel} (taking \printglossopt{leveloffset} into
    account)}
  }
  % \glsxtrsetgrouptitle
  \gcmd{gls\-xtr\-set\-group\-title}
  {
    \providedby{\sty{glossaries-extra} v1.14+}
    \syntax{\margm{group-label}\margm{group-title}}
    \desc{globally assigns the given title \meta{group-title} to the
    \idx{group} identified by \meta{group-label}}
  }
  % \glsxtrlocalsetgrouptitle
  \gcmd{gls\-xtr\-local\-set\-group\-title}
  {
    \providedby{\sty{glossaries-extra} v1.24+}
    \syntax{\margm{group-label}\margm{group-title}}
    \desc{locally assigns the given title \meta{group-title} to the
    \idx{group} identified by \meta{group-label}}
  }
  % \glsxtrgetgrouptitle
  \gcmd{gls\-xtr\-get\-group\-title}
  {
    \providedby{\sty{glossaries-extra} v1.14+}
    \syntax{\margm{group-label}\margm{cs}}
    \desc{obtains the title corresponding to the \idx{group}
    identified by \meta{group-label} and stores the result in the
    control sequence \meta{cs}}
  }
  % \glsxtrdetoklocation
  \gcmd{gls\-xtr\-de\-tok\-location}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{location}}
     \desc{just expands to \meta{location} by default but may be
      redefined to help protect awkward characters}
  }
  % \glsdisplaynumberlist
  \gcmd{gls\-display\-number\-list}
  {
     \providedby{\sty{glossaries} v3.02+}
     \syntax{\margm{entry-label}}
     \desc{formats the \idx{locationlist} for the given entry.
     Redefined by \sty{glossaries-extra-bib2gls} to obtain the
     \idx{locationlist} from the \gloskey{location} field}
  }
  % \glsentrynumberlist
  \gcmd{gls\-en\-try\-num\-ber\-list}
  {
     \providedby{\sty{glossaries} v3.02+}
     \syntax{\margm{entry-label}}
     \desc{displays the \idx{locationlist} for the given entry.
     Redefined by \sty{glossaries-extra-bib2gls} to obtain the
     \idx{locationlist} from the \gloskey{location} field}
  }
  % COMMANDS: STANDALONE
  % \glsxtrglossentry
  \gcmd{gls\-xtr\-gloss\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used for standalone entries to display the name with
     \gls{glossentryname}, with appropriate hooks}
  }
  % \Glsxtrglossentry
  \gcmd{Gls\-xtr\-gloss\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}}
    \desc{as \gls{glsxtrglossentry} but applies \idx{sentencecase}}
  }
  % \GlsXtrStandaloneGlossaryType
  \gcmd{Gls\-Xtr\-Stand\-alone\-Glossary\-Type}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \desc{expands to the \idx{glossary} type for standalone entries}
  }
  % \GlsXtrStandaloneSubEntryItem
  \gcmd{Gls\-Xtr\-Stand\-alone\-Sub\-Entry\-Item}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used to display standalone entries that have the
    \gloskey{parent} field set}
  }
  % \GlsXtrStandaloneEntryName
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Name}
  {
    \providedby{\sty{glossaries-extra} v1.37+}
    \syntax{\margm{entry-label}}
    \desc{used by \gls{glsxtrglossentry} to display the standalone entry name and create the
     associated hypertarget, if supported}
  }
  % \GlsXtrStandaloneEntryPdfName
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Pdf\-Name}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used by \gls{glsxtrglossentry} for the PDF bookmark}
  }
  % \GlsXtrStandaloneEntryHeadName
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Head\-Name}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used by \gls{glsxtrglossentry} for the header and toc}
  }
  % \GlsXtrStandaloneEntryNameFirstUc
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Name\-First\-Uc}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}}
    \desc{used by \gls{Glsxtrglossentry} to display the standalone entry name and create the
     associated hypertarget, if supported}
  }
  % \GlsXtrStandaloneEntryPdfNameFirstUc
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Pdf\-Name\-First\-Uc}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}}
    \desc{used by \gls{Glsxtrglossentry} for the PDF bookmark}
  }
  % \GlsXtrStandaloneEntryHeadNameFirstUc
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Head\-Name\-First\-Uc}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}}
    \desc{used by \gls{Glsxtrglossentry} for the header and toc}
  }
  % \GlsXtrStandaloneEntryOther
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Other}
  {
    \providedby{\sty{glossaries-extra} v1.37+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{as \gls{GlsXtrStandaloneEntryName} but where the text is
    obtained from the given field instead of \gloskey{name}}
  }
  % \GlsXtrStandaloneEntryPdfOther
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Pdf\-Other}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{used by \gls{glsxtrglossentryother} for the PDF bookmark}
  }
  % \GlsXtrStandaloneEntryHeadOther
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Head\-Other}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{used by \gls{glsxtrglossentryother} for the header and toc}
  }
  % \GlsXtrStandaloneEntryOtherFirstUc
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Other\-First\-Uc}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{as \gls{Glsxtrglossentryother} to produce the
\idx{sentencecase} field text}
  }
  % \GlsXtrStandaloneEntryPdfOtherFirstUc
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Pdf\-Other\-First\-Uc}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{used by \gls{Glsxtrglossentryother} for the PDF bookmark}
  }
  % \GlsXtrStandaloneEntryHeadOtherFirstUc
  \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Head\-Other\-First\-Uc}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{used by \gls{Glsxtrglossentryother} for the header and toc}
  }
  % \glsxtractivatenopost
  \gcmd{gls\-xtr\-activate\-no\-post}
  {
    \providedby{\sty{glossaries-extra} v1.22+}
    \desc{activates \gls{nopostdesc} and \gls{glsxtrnopostpunc}}
  }
  % \glsxtrglossentryother
  \gcmd{gls\-xtr\-gloss\-en\-try\-other}
  {
    \providedby{\sty{glossaries-extra} v1.22+}
    \syntax{\margm{header}\margm{entry-label}\margm{field-label}}
    \desc{like \gls{glsxtrglossentry} but uses the given field
    instead of \gloskey{name}}
  }
  % \Glsxtrglossentryother
  \gcmd{Gls\-xtr\-gloss\-en\-try\-other}
  {
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{header}\margm{entry-label}\margm{field-label}}
    \desc{as \gls{glsxtrglossentryother} but applies \idx{sentencecase}}
  }
  % COMMANDS: DEFINING ENTRIES
  % \glsnoexpandfields
  \gcmd{gls\-no\-expand\-fields}
  {
     \providedby{\sty{glossaries} v3.08a+}
    \desc{don't expand field values when defining entries, except
     for those that explicitly have expansion enabled with
     \gls{glssetexpandfield}}
  }
  % \glsexpandfields
  \gcmd{gls\-expand\-fields}
  {
     \providedby{\sty{glossaries} v3.08a+}
    \desc{expand field values when defining entries, except
     for those that explicitly have expansion disabled with
     \gls{glssetnoexpandfield}}
  }
  % \glssetnoexpandfield
  \gcmd{gls\-set\-no\-expand\-field}
  {
     \providedby{\sty{glossaries} v3.13a+}
     \syntax{\margm{field}}
     \desc{don't expand the value of the field identified by its
      \idx{internalfieldlabel} when defining entries (overrides \gls{glsexpandfields})}
  }
  % \glssetexpandfield
  \gcmd{gls\-set\-expand\-field}
  {
     \providedby{\sty{glossaries} v3.13a+}
     \syntax{\margm{field}}
     \desc{expand the value of the field identified by its
      \idx{internalfieldlabel} when defining entries (overrides \gls{glsnoexpandfields})}
  }
  % \ifglsentryexists
  \gcmd{if\-gls\-en\-try\-exists}
  {
     \providedby{\sty{glossaries}}
     \syntax{\margm{entry-label}\margm{true}\margm{false}}
     \desc{does \meta{true} if the entry given by \meta{entry-label}
     exists, otherwise does \meta{false}}
     \field{seealso}{glsdoifexistsordo,glsdoifexists,glsdoifnoexists}
  }
  % \glsdoifexistsordo
  \gcmd{gls\-do\-if\-exists\-or\-do}
  {
    \providedby{\sty{glossaries} v4.19+}
     \syntax{\margm{entry-label}\margm{true}\margm{false}}
     \desc{similar to \gls{ifglsentryexists}, this does \meta{true} if the entry 
     given by \meta{entry-label}
     exists. If the entry doesn't it exist, this does \meta{false}
     and generates an error (\opteqvalref{undefaction}{error}) or a warning
     (\opteqvalref{undefaction}{warn}). The unknown marker
     \idx{unknowntag} will be placed before the \meta{false} code}
     \field{seealso}{ifglsentryexists,glsdoifexists,glsdoifnoexists}
  }
  % \glsdoifexists
  \gcmd{gls\-do\-if\-exists}
  {
    \providedby{\sty{glossaries}}
     \syntax{\margm{entry-label}\margm{code}}
     \desc{does \meta{code} if the entry given by \meta{entry-label}
     exists. If the entry doesn't exist, this will either generate
     an error (\opteqvalref{undefaction}{error}) or a warning
     (\opteqvalref{undefaction}{warn}) and, within the document
     environment, it will insert the unknown marker \idx{unknowntag}}
     \field{seealso}{ifglsentryexists,glsdoifexistsordo,glsdoifnoexists}
  }
  % \glsdoifexistsorwarn
  \gcmd{gls\-do\-if\-exists\-or\-warn}
  {
    \providedby{\sty{glossaries} v4.03+}
     \syntax{\margm{entry-label}\margm{code}}
     \desc{like \gls{glsdoifexists}, but always warns (no error) if
     the entry doesn't exist, regardless of the \opt{undefaction}
     setting, and doesn't show the unknown marker}
  }
  % \glsdoifnoexists
  \gcmd{gls\-do\-if\-no\-exists}
  {
    \providedby{\sty{glossaries}}
     \syntax{\margm{entry-label}\margm{code}}
     \desc{does \meta{code} if the entry given by \meta{entry-label}
     does not exist. If the entry does exist, this will either generate
     an error (\opteqvalref{undefaction}{error}) or a warning
     (\opteqvalref{undefaction}{warn})}
     \field{seealso}{ifglsentryexists,glsdoifexistsordo,glsdoifexists}
  }
  % \loadglsentries
  \gcmd{load\-gls\-entries}
  {
    \providedby{\sty{glossaries}}%
     \syntax{\oargm{type}\margm{filename}}
     \desc{locally assigns \gls{glsdefaulttype} to \meta{type} and
      inputs \meta{filename}. If the optional argument is omitted,
      the default glossary is assumed. Note that if any entries with
      \meta{filename} have the \gloskey{type} key set (including
      implicitly in commands like \gls{newabbreviation}), then this will
      override the type given in the optional argument}
  }
  % \newglossaryentry
  \gcmd{new\-glos\-sary\-en\-try}%
  {%
    \providedby{\sty{glossaries}}%
    \syntax{\margm{entry-label}\margm{key=value list}}
    \desc{defines a new \idx{glossary} entry with the given label. The
    second argument is a comma-separated list of \idxpl{gloskey}}
  }
  % \longnewglossaryentry
  \gcmd{long\-new\-glos\-sary\-en\-try}%
  {%
    \providedby{\sty{glossaries} v3.11a}%
    \syntax{\margm{entry-label}\margm{key=value list}\margm{description}}
    \desc{defines a new \idx{glossary} entry with the given label. The
    second argument is a comma-separated list of \idxpl{gloskey}.
    The third argument is the description, which may include
    paragraph breaks}
  }
  % \longnewglossaryentry*
  \gcmd{long\-new\-glos\-sary\-en\-try*}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{key=value list}\margm{description}}
    \desc{like the unstarred \gls{longnewglossaryentry} but doesn't
          add the \gls{glsxtrpostlongdescription} hook}
  }%
  % \glsxtrpostlongdescription
  \gcmd{gls\-xtr\-post\-long\-descrip\-tion}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
    \desc{hook added to the end of the \gloskey{description} field
          by the unstarred version of \gls{longnewglossaryentry}}
  }%
  % \newterm
  \gcmd{new\-term}%
  {%
    \providedby{\sty{glossaries} v4.02+}
    \syntax{\oargm{key=value list}\margm{entry-label}}
    \note{requires \opt{index} package option}
    \desc{defines a new \idx{glossary} entry with the given label, 
    \gloskey{type} set to \code{index}, the \gloskey{name}
    set to \meta{entry-label} and the \gloskey{description}
    set to \gls{nopostdesc}. The
    optional argument is a comma-separated list of \idxpl{gloskey},
    which can be used to override the defaults}
  }
  % \glsxtrnewsymbol
  \gcmd{gls\-xtr\-new\-sym\-bol}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{key=value list}\margm{entry-label}\margm{sym}}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{symbols}}\marg{glossaries-extra}}}
    \desc{defines a new \idx{glossary} entry with the given label, 
    \gloskey{type} set to \code{symbols}, the \gloskey{category} set
    to \code{symbol}, the \gloskey{name} set to \meta{sym} and the \gloskey{sort}
    set to \meta{entry-label}. The optional argument is a comma-separated list of \idxpl{gloskey},
    which can be used to override the defaults}
  }
  % \glsxtrnewnumber
  \gcmd{gls\-xtr\-new\-num\-ber}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{key=value list}\margm{entry-label}\margm{num}}
    \note{requires \code{\csfmt{usepackage}\oarg{\opt{numbers}}\marg{glossaries-extra}}}
    \desc{defines a new \idx{glossary} entry with the given label, 
    \gloskey{type} set to \code{numbers}, the \gloskey{category} set
    to \code{number}, the \gloskey{name} set to \meta{num} and the \gloskey{sort}
    set to \meta{entry-label}. The optional argument is a comma-separated list of \idxpl{gloskey},
    which can be used to override the defaults}
  }
  % \newentry
  \gcmd{new\-en\-try}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{entry-label}\margm{options}}
    \desc{a synonym for \gls{newglossaryentry} defined by the
     \opteqvalref{shortcuts}{other} package option}
  }
  % \newsym
  \gcmd{new\-sym}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{key=value list}\margm{entry-label}\margm{sym}}
    \desc{a synonym for \gls{glsxtrnewsymbol} defined by the
     \opteqvalref{shortcuts}{other} package option (provided
      the \opt{symbols} option is also used)}
  }
  % \newnum
  \gcmd{new\-num}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{key=value list}\margm{entry-label}\margm{num}}
    \desc{a synonym for \gls{glsxtrnewnumber} defined by the
     \opteqvalref{shortcuts}{other} package option (provided
      the \opt{numbers} option is also used)}
  }
  % \newabbr
  \gcmd{new\-abbr}%
  {%
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\margm{short}\margm{long}}
    \desc{a synonym for \gls{newabbreviation} defined by the
     \opteqvalref{shortcuts}{abbreviations} or
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \glsaddkey
  \gcmd{gls\-add\-key}
  {
     \providedby{\sty{glossaries} v3.12a}
     \syntax{\margm{key}\margm{default value}\margm{no link cs}\margm{no link ucfirst
      cs}\margm{link cs}\margm{link ucfirst cs}\margm{link allcaps cs}}
     \desc{defines a new \idx{gloskey} with the given default value
     and commands that are analogous to \gls{glsentrytext} (\meta{no
     link cs}), \gls{Glsentrytext} (\meta{no link ucfirst cs}), 
     \gls{glstext} (\meta{link cs}), \gls{Glstext} (\meta{link ucfirst cs}), 
     \gls{GLStext} (\meta{link allcaps cs}). The starred version switches on field
     expansion for the given key}
     \field{seealso}{glsaddstoragekey,glsxtrprovidestoragekey}
  }
  % \glsaddstoragekey
  \gcmd{gls\-add\-storage\-key}
  {%
    \providedby{\sty{glossaries} v4.16}
    \syntax{\margm{key}\margm{default value}\margm{no link cs}}
    \desc{provides a new \idx{gloskey} with a default value and a
          command for simply accessing the value (without indexing
          or hyperlinks). The starred version switches on field
          expansion for the given key}
     \field{seealso}{glsaddkey,glsxtrprovidestoragekey}
  }
  % \glsxtrprovidestoragekey
  \gcmds{gls\-xtr\-provide\-storage\-key}
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{key}\margm{default value}\margm{no link cs}}
    \desc{like \gls{glsaddstoragekey} but does nothing if the key
     has already been defined}
  }
  % \glsxtrifkeydefined
  \gcmd{gls\-xtr\-if\-key\-defined}
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{key}\margm{true}\margm{false}}
     \desc{tests if the given \meta{key} has been defined as a
     \idx{gloskey}. Does \meta{true} if the key has been defined,
      otherwise does false}
  }
  % \newglossaryentry (glossentry) keys
  \gidxpl{gloskey}{%
    \common
    \field{text}{glossary entry key}
    \desc{these are options that can be passed to commands that
     define entries, such as \gls{newglossaryentry} or
     \gls{newabbreviation}}
  }
  % glossentry name
  \ggloskey{name}%
  {%
    \syntax{\margm{text}}
    \desc{the entry's name, as displayed in the \idx{glossary}. This
     typically isn't used outside of the \idx{glossary} (the \gloskey{text} and
     \gloskey{plural} keys are used instead). However, if there is a
     need to specifically display the entry name, 
     use \gls{glsname} (if \idx{indexing} and hyperlinks
     are required) or \gls{glsentryname}. Glossary styles should use
     \gls{glossentryname}, which uses \gls{glsentryname} and
     incorporates the \idxpl{postnamehook} and related \attrs}
  }
  % glossentry description
  \ggloskey{de\-scrip\-tion}%
  {%
    \syntax{\margm{text}}
    \desc{the entry's description, as displayed in the \idx{glossary}. If
     required in the text, use \gls{glsdesc} (if \idx{indexing} and hyperlinks
     are required) or \gls{glsentrydesc}. Glossary styles should use
     \gls{glossentrydesc} and \gls{glspostdescription} to
     incorporate the \idx{postdeschook}}
  }
  % glossentry descriptionplural
  \ggloskey{de\-scrip\-tion\-plu\-ral}%
  {%
    \syntax{\margm{text}}
    \desc{the plural form of the entry's description, if applicable.
    If omitted, this is set to the same value as the
    \gloskey{description}, since descriptions tend not to be a singular
    entity}
  }
  % glossentry type
  \ggloskey{type}%
  {%
    \syntax{\meta{\idx{glossary}-label}}
    \initvalcs{glsdefaulttype}%
    \desc{assigns the entry to the \idx{glossary} identified by
      \meta{\idx{glossary}-label}}
  }
  % glossentry parent
  \ggloskey{parent}%
  {%
    \syntax{\meta{parent-label}}
    \desc{the label of the entry's parent (from which the entry's
    \idx{hierarchicallevel} is obtained)}
  }
  % glossentry category
  \ggloskey{cat\-e\-gory}%
  {%
    \syntax{\meta{category-label}}%
    \initval{general}%
    \providedby{\sty{glossaries-extra}}
    \desc{the entry's \idx{category} (must be a simple label)}
  }
  % glossentry sort
  \ggloskey{sort}%
  {%
    \syntax{\meta{value}}
    \initval{\meta{entry name}}
    \desc{specifies the value to use for sorting (overrides the
     default). This key is usually required for \app+{xindy} if the
      \gloskey{name} key only contains commands (for example, the
      entry is a symbol), but explicitly using this key in other
      contexts can break certain sort methods.
      \gallerypage{bib2gls-sorting}{Don't use the \gloskey{sort} field
      with \app{bib2gls}}}
  }
  % glossentry text
  \ggloskey{text}%
  {%
    \syntax{\margm{text}}
    \desc{the entry's text, as displayed on \idx{subsequentuse} of
     \idx{glslike} commands. If omitted, this value is assumed to be
     the same as the \gloskey{name} key}
  }
  % glossentry plural
  \ggloskey{plu\-ral}%
  {%
    \syntax{\margm{text}}
    \desc{the entry's plural form, as displayed on \idx{subsequentuse} of
     plural \idx{glslike} commands, such as \gls{glspl}. This should
     be the appropriate plural form of the value provided by the
    \gloskey{text} key. If omitted, this value is assumed to be the
    value of the \gloskey{text} key with \gls{glspluralsuffix}
    appended}
  }
  % glossentry symbol
  \ggloskey{sym\-bol}%
  {%
    \initvalcs{relax}
    \syntax{\margm{symbol}}
    \desc{the entry's associated symbol (optional), which can be
     displayed with \gls{glssymbol} (if \idx{indexing} and hyperlinks are
     required) or with \gls{glsentrysymbol}}
  }
  % glossentry symbolplural
  \ggloskey{sym\-bol\-plu\-ral}%
  {%
    \syntax{\margm{symbol plural}}
    \desc{The plural form of the \gloskey{symbol}, if applicable,
     which can be displayed with \gls{glssymbolplural} (if \idx{indexing}
     and hyperlinks are required) or with \gls{glsentrysymbolplural}. 
     If omitted, this value is set to the same as the
     \gloskey{symbol} key (since symbols usually don't have a plural
     form)}
  }
  % glossentry first
  \ggloskey{first}%
  {%
    \syntax{\margm{first}}
    \desc{the entry's text, as displayed on \idx{firstuse} of
     \idx{glslike} commands. Note that using an \idx{abbrvstyle}
     or \glspl{postlinkhook} is a more flexible approach. If omitted, 
     this value is assumed to be the same as the \gloskey{text} key}
  }
  % glossentry firstplural
  \ggloskey{first\-plu\-ral}%
  {%
    \syntax{\margm{text}}
    \desc{the entry's plural form, as displayed on \idx{firstuse} of
     plural \idx{glslike} commands, such as \gls{glspl}. If this key
    is omitted, then the value will either be the same as the
    \gloskey{plural} field, if the \gloskey{first} key wasn't used, or
    the value will be taken from the \gloskey{first} key with
    \gls{glspluralsuffix} appended}
  }
  % glossentry short
  \ggloskey{short}%
  {%
    \syntax{\margm{short-form}}
    \desc{a \idx{field} that is set by \gls{newabbreviation}
    (and \gls{newacronym}) to the entry's short (abbreviated) form. It
     typically shouldn't be used explicitly with
     \gls{newglossaryentry} as \gls{newabbreviation}
     makes other modifications to ensure that when the entry is 
     referenced with the \idx{glslike} commands, it will obey the
     appropriate \idx{abbrvstyle}. If you are using \app{bib2gls}
     then this field should be used in the \ext{bib} file when
     defining abbreviations}
  }
  % glossentry shortplural
  \ggloskey{short\-plu\-ral}%
  {%
    \syntax{\margm{short-form}}
    \desc{as \gloskey{short} but the plural form. The default is
    obtained by appending the abbreviation plural suffix, but this
    behaviour can be altered by \idxpl{categoryattribute}. See
    \sectionref{sec:abbreviations} for further details}
  }
  % glossentry long
  \ggloskey{long}%
  {%
    \syntax{\margm{long-form}}
    \desc{a \idx{field} that is set by \gls{newabbreviation} to
     the entry's long (unabbreviated) form. It
     typically shouldn't be used explicitly with
     \gls{newglossaryentry} as \gls{newabbreviation}
     makes other modifications to ensure that when the entry is 
     referenced with the \idx{glslike} commands, it will obey the
     appropriate \idx{abbrvstyle}. If you are using \app{bib2gls}
     then this field should be used in the \ext{bib} file when
     defining abbreviations}
  }
  % glossentry longplural
  \ggloskey{long\-plu\-ral}%
  {%
    \syntax{\margm{long-form}}
    \desc{as \gloskey{long} but the plural form}
  }
  % glossentry user1
  \ggloskey{user1}%
  {%
    \syntax{\margm{text}}
    \desc{a generic field, which can be
     displayed with \gls{glsuseri} (if \idx{indexing} and hyperlinks are
     required) or with \gls{glsentryuseri}}
  }
  % glossentry user2
  \ggloskey{user2}%
  {%
    \syntax{\margm{text}}
    \desc{a generic field, which can be
     displayed with \gls{glsuserii} (if \idx{indexing} and hyperlinks are
     required) or with \gls{glsentryuserii}}
  }
  % glossentry user3
  \ggloskey{user3}%
  {%
    \syntax{\margm{text}}
    \desc{a generic field, which can be
     displayed with \gls{glsuseriii} (if \idx{indexing} and hyperlinks are
     required) or with \gls{glsentryuseriii}}
  }
  % glossentry user4
  \ggloskey{user4}%
  {%
    \syntax{\margm{text}}
    \desc{a generic field, which can be
     displayed with \gls{glsuseriv} (if \idx{indexing} and hyperlinks are
     required) or with \gls{glsentryuseriv}}
  }
  % glossentry user5
  \ggloskey{user5}%
  {%
    \syntax{\margm{text}}
    \desc{a generic field, which can be
     displayed with \gls{glsuserv} (if \idx{indexing} and hyperlinks are
     required) or with \gls{glsentryuserv}}
  }
  % glossentry user6
  \ggloskey{user6}%
  {%
    \syntax{\margm{text}}
    \desc{a generic field, which can be
     displayed with \gls{glsuservi} (if \idx{indexing} and hyperlinks are
     required) or with \gls{glsentryuservi}}
  }
  % glossentry counter
  \ggloskey{counter}%
  {%
    \syntax{\margm{counter-name}}
    \desc{if set, the value indicates the \idx{locationcounter} to use
     by default when \idx{indexing} this entry (overrides the
     counter associated with the \idx{glossary} or the \opt{counter}
     package option)}
  }
  % glossentry see
  \ggloskey{see}%
  {%
    \syntax{\marg{\oargm{tag}\meta{xr-list}}}
    \desc{with the base \sty{glossaries} package this simply
    triggers an automatic cross-reference with \gls{glssee}. The
    \sty{glossaries-extra} package additionally saves the value.
    Use \opteqvalref{autoseeindex}{false} to prevent the automatic
    cross-reference. The \meta{tag} defaults to \gls{seename} and
    \meta{xr-list} should be a comma-separated list of entries that
    have already been defined}
  }
  % glossentry seealso
  \ggloskey{see\-also}%
  {%
    \providedby{\sty{glossaries-extra}}
    \syntax{\margm{xr-list}}
    \desc{behaves in a similar manner to
     \gloskeyval{see}{\oarg{\gls{seealsoname}}\meta{xr-list}}}
  }
  % glossentry alias
  \ggloskey{alias}%
  {%
    \providedby{\sty{glossaries-extra}}
    \syntax{\margm{xr-label}}
    \desc{behaves in a similar manner to
     \gloskeyval{see}{\oarg{\gls{seealsoname}}\meta{xr-label}} but also
     sets up aliasing which makes the \idx{linktext} hyperlink to
     \meta{xr-label} instead}
  }
  % glossentry group
  \ggloskey{group}%
  {%
    \providedby{\sty{glossaries-extra}}
    \syntax{\margm{group-label}}
    \desc{the \idx{group} label that identifies which \idx{group} the
     entry belongs to. This key is only available with the 
     \opteqvalref{record}{only} and \opteqvalref{record}{nameref} options, 
     and is set by \app{bib2gls}, if invoked with \switch{group} or \switch{g}. 
     This is an \idxc{bib2glsinternalfield}{internal key} assigned by 
     \app{bib2gls} as a by-product of sorting.
     Explicit use without reference to the order of entries can result in
     fragmented groups. The corresponding title can be set with
     \gls{glsxtrsetgrouptitle}, although this is more commonly done
     implicitly within the \ext{glstex} file}
  }
  % glossentry location
  \ggloskey{location}%
  {%
    \providedby{\sty{glossaries-extra}}
    \syntax{\margm{location-list}}
    \desc{the formatted \idx{locationlist} used by the \idx{unsrtfam}. This key
    is only available with the \opt{record} option and is set by \app{bib2gls} 
    unless \resourceopt{save-locations}{false} is set}
  }
  % ACCESSIBILITY KEYS
  % glossentry access
  \ggloskey{ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{name} field. 
      This field will be automatically set by
     \gls{newabbreviation}, if not provided and the
     \catattr{nameshortaccess} attribute is set. See \sectionref{sec:accessabbr}}
  }
  % glossentry textaccess
  \ggloskey{text\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{text} field. 
      This field will be automatically set by
     \gls{newabbreviation}, if not provided and the
     \catattr{textshortaccess} attribute is set. See \sectionref{sec:accessabbr}}
  }
  % glossentry pluralaccess
  \ggloskey{plu\-ral\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{plural} field. 
      This field will be automatically set by
     \gls{newabbreviation}, if not provided and the
     \catattr{textshortaccess} attribute is set. See \sectionref{sec:accessabbr}}
  }
  % glossentry firstaccess
  \ggloskey{first\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{first} field. 
      This field will be automatically set by
     \gls{newabbreviation}, if not provided and the
     \catattr{firstshortaccess} attribute is set. See \sectionref{sec:accessabbr}}
  }
  % glossentry firstpluralaccess
  \ggloskey{first\-plu\-ral\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{firstplural} field. 
      This field will be automatically set by
     \gls{newabbreviation}, if not provided and the
     \catattr{firstshortaccess} attribute is set. See \sectionref{sec:accessabbr}}
  }
  % glossentry shortaccess
  \ggloskey{short\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{short}
     field. This field will be automatically set by
     \gls{newabbreviation}, if not provided. See \sectionref{sec:accessabbr}}
  }
  % glossentry shortpluralaccess
  \ggloskey{short\-plu\-ral\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{shortplural} field. This field will be automatically set by
     \gls{newabbreviation}, if not provided. See \sectionref{sec:accessabbr}}
  }
  % glossentry longaccess
  \ggloskey{long\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{long} field}
  }
  % glossentry longpluralaccess
  \ggloskey{long\-plu\-ral\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{longplural} field}
  }
  % glossentry descriptionaccess
  \ggloskey{de\-scrip\-tion\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{description} field}
  }
  % glossentry descriptionpluralaccess
  \ggloskey{de\-scrip\-tion\-plu\-ral\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{descriptionplural} field}
  }
  % glossentry symbolaccess
  \ggloskey{sym\-bol\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{symbol} field}
  }
  % glossentry symbolpluralaccess
  \ggloskey{sym\-bol\-plu\-ral\-ac\-cess}%
  {%
    \note{requires \opt{accsupp}}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{symbolplural} field}
  }
  % glossentry user1access
  \ggloskey{user1\-ac\-cess}%
  {%
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{user1} field}
  }
  % glossentry user2access
  \ggloskey{user2\-ac\-cess}%
  {%
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{user2} field}
  }
  % glossentry user3access
  \ggloskey{user3\-ac\-cess}%
  {%
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{user3} field}
  }
  % glossentry user4access
  \ggloskey{user4\-ac\-cess}%
  {%
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{user4} field}
  }
  % glossentry user5access
  \ggloskey{user5\-ac\-cess}%
  {%
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{user5} field}
  }
  % glossentry user6access
  \ggloskey{user6\-ac\-cess}%
  {%
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}}
    \desc{accessibility text corresponding to the \gloskey{user6} field}
  }
  % PREFIX KEYS
  % glossentry prefix
  \ggloskey{pre\-fix}%
  {%
    \providedby{\sty{glossaries-prefix} v3.14a+}
    \syntax{\margm{text}}
    \desc{the \idx{subsequentuse} singular prefix}
  }
  % glossentry prefixplural
  \ggloskey{pre\-fix\-plu\-ral}%
  {%
    \providedby{\sty{glossaries-prefix} v3.14a+}
    \syntax{\margm{text}}
    \desc{the \idx{subsequentuse} plural prefix}
  }
  % glossentry prefixfirst
  \ggloskey{pre\-fix\-first}%
  {%
    \providedby{\sty{glossaries-prefix} v3.14a+}
    \syntax{\margm{text}}
    \desc{the \idx{firstuse} singular prefix}
  }
  % glossentry prefixfirstplural
  \ggloskey{pre\-fix\-first\-plu\-ral}%
  {%
    \providedby{\sty{glossaries-prefix} v3.14a+}
    \syntax{\margm{text}}
    \desc{the \idx{firstuse} plural prefix}
  }
  % COMMANDS: FIELDS
  \gidxpl{glosfield}{%
    \common
    \field{text}{glossary entry field}
    \desc{these are internal fields that don't have a corresponding 
     \idxc{gloskey}{key}}
  }
  \gidx{internalfieldname}{\name{internal field name}\field{alias}{idx.glosfield}}
  % field loclist
  \gglosfield{loc\-list}%
  {%
    \providedby{\sty{glossaries} v4.04+}
    \syntax{\margm{\sty{etoolbox} list}}
    \desc{used by \gls{printnoidxglossary} to provide the locations.
    The value is an \sty{etoolbox} list of individual locations
    which are obtained from the \ext+{aux} file. This field will also
    be used by the \idx{unsrtfam} if \gloskey{location} isn't set}
  }
  % field indexcounter
  \gglosfield{index\-counter}%
  {%
    \syntax{\margm{target-name}}
    \desc{used with the \opt{indexcounter} package option and the
     \resourceopt{save-index-counter} resource option. The value is
     set to the hyperlink target of the first \ctr{wrglossary} \location\ 
     or the first instance for a specific \idx{locationencap}}
  }
  % field childcount
  \gglosfield{child\-count}%
  {%
    \syntax{\margm{number}}
    \desc{used with the \resourceopt{save-child-count} resource
     option to store the entry's child count (may also be set with
\gls{printnoidxglossary} under certain circumstances)}
  }
  % field childlist
  \gglosfield{child\-list}%
  {%
    \syntax{\margm{entry-label-list}}
    \desc{used with the \resourceopt{save-child-count} resource
     option to store the entry's children as an \sty{etoolbox}
     internal list}
  }
  % field recordcount
  \gglosfield{record\-count}%
  {%
    \syntax{\margm{number}}
    \desc{used with the \switch{record-count} switch to store the
     total number of \records\ for the associated entry}
  }
  % field record.<counter>
  \gglosfield{record.counter}%
  {%
    \name{\csoptfmt{record\dfullstop\meta{counter}}}
    \syntax{\margm{location}}
    \desc{used with \gls{GlsXtrRecordCounter} to store an
     \sty{etoolbox} internal list of locations (without encap) corresponding to the
     given counter}
  }
  % field recordcount.<counter>
  \gglosfield{record\-count.counter}%
  {%
    \name{\csoptfmt{record\-count\dfullstop\meta{counter}}}
    \syntax{\margm{number}}
    \desc{used with the \switch{record-count} switch to store the
     total number of \records\ with the \idx{locationcounter} \meta{counter} 
     for the associated entry}
  }
  % field recordcount.<counter>.<location>
  \gglosfield{record\-count.counter.location}%
  {%
    \name{\csoptfmt{record\-count\dfullstop\meta{counter}\dfullstop\meta{location}}}
    \syntax{\margm{number}}
    \desc{used with the \switch{record-count-unit} switch to store the
     total number of \records\ with the \idx{locationcounter}
     \meta{counter} set to \meta{location} for the associated entry}
  }
  % field secondarygroup
  \gglosfield{sec\-ondary\-group}
  {
     \syntax{\margm{group-label}}
     \desc{used by \app{bib2gls} to store the \idx{group} label
     obtained from the secondary sort}
  }
  % internal field useri
  \gglosfield{useri}
  { 
    \desc{corresponds to \gloskey{user1} key}
  }
  % internal field userii
  \gglosfield{userii}
  {
    \desc{corresponds to \gloskey{user2} key}
  }
  % internal field useriii
  \gglosfield{useriii}
  {
    \desc{corresponds to \gloskey{user3} key}
  }
  % internal field dtlsortgroup
  \gglosfield{dtlsortgroup}
  {
    \desc{as from \sty{glossaries} v4.57, used to sort the letter
group information with \gls{printnoidxglossary}}
  }
  % \glscategory
  \gcmd{gls\-category}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{entry-label}}
    \desc{expands to the entry's category}
  }
  % \glsfieldxdef
  \gcmd{gls\-field\-xdef}
  {
    \providedby{\sty{glossaries} v4.16+}
    \syntax{\margm{entry-label}\margm{field}\margm{value}}
    \desc{as \gls{glsfieldedef} but does a global assignment}
  }
  % \glsfieldedef
  \gcmd{gls\-field\-edef}
  {
    \providedby{\sty{glossaries} v4.16+}
    \syntax{\margm{entry-label}\margm{field}\margm{value}}
    \desc{locally assigns the full expansion of \meta{value} to the given \idx{field} 
    (identified by the \idx{internalfieldlabel} \meta{field}) for the entry identified by
    \meta{entry-label}. Produces an error (or warning with
    \opteqvalref{undefaction}{warn}) if the entry or field doesn't
    exist. Note that this doesn't update any associated fields}
  }
  % \glsfieldgdef
  \gcmd{gls\-field\-gdef}
  {
    \providedby{\sty{glossaries} v4.16+}
    \syntax{\margm{entry-label}\margm{field}\margm{value}}
    \desc{as \gls{glsfielddef} but does a global assignment}
  }
  % \glsfielddef
  \gcmd{gls\-field\-def}
  {
    \providedby{\sty{glossaries} v4.16+}
    \syntax{\margm{entry-label}\margm{field}\margm{value}}
    \desc{locally assigns the \meta{value} to the given \idx{field} 
    (identified by the \idx{internalfieldlabel} \meta{field}) for the entry identified by
    \meta{entry-label}. Produces an error (or warning with
    \opteqvalref{undefaction}{warn}) if the entry or field doesn't
    exist. Note that this doesn't update any associated fields}
  }
  % \glsxtrdeffield
  \gcmd{gls\-xtr\-def\-field}
  {
     \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field-label}\margm{value}}
    \desc{like \gls{GlsXtrSetField} but doesn't perform any
      existence checks}
  }
  % \glsxtredeffield
  \gcmd{gls\-xtr\-edef\-field}
  {
     \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field-label}\margm{value}}
    \desc{like \gls{glsxtrdeffield} but (protected) expands
     \meta{value}}
  }
  % \glsxtrapptocsvfield
  \gcmd{gls\-xtr\-app\-to\-csv\-field}
  {
     \providedby{\sty{glossaries-extra} v1.47+}
    \syntax{\margm{entry-label}\margm{field-label}\margm{element}}
    \desc{For use with fields that should contain comma-separated
    lists, this will append a command followed by \meta{element} to
    the field value. If the field isn't defined, this command will
    behave like \gls{glsxtrdeffield}. No existence check is performed}
  }
  % \glsxtrsetfieldifexists
  \gcmd{gls\-xtr\-set\-field\-if\-exists}
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{code}}
     \desc{used by commands like \gls{GlsXtrSetField} to check if
     the entry exists before assigning a value to the field. The
     \meta{code} part is the assignment code, which is only done if
     the required condition is met. This can be redefined if the
     condition needs to be altered}
  }
  % \glsxtrfieldlistadd
  \gcmd{gls\-xtr\-field\-list\-add}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field}\margm{value}}
    \desc{appends \meta{value} to the given field using
    \sty{etoolbox}['s] \gls{listcsadd}}
  }
  % \glsxtrfieldlistgadd
  \gcmd{gls\-xtr\-field\-list\-gadd}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field}\margm{value}}
    \desc{appends \meta{value} to the given field using
    \sty{etoolbox}['s] \gls{listcsgadd}}
  }
  % \glsxtrfieldlisteadd
  \gcmd{gls\-xtr\-field\-list\-eadd}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field}\margm{value}}
    \desc{appends \meta{value} to the given field using
    \sty{etoolbox}['s] \gls{listcseadd}}
  }
  % \glsxtrfieldlistxadd
  \gcmd{gls\-xtr\-field\-list\-xadd}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field}\margm{value}}
    \desc{appends \meta{value} to the given field using
    \sty{etoolbox}['s] \gls{listcsxadd}}
  }
  % \glsxtrfieldformatlist
  \gcmd{gls\-xtr\-field\-format\-list}
  { 
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}\margm{field-label}}
     \desc{formats the value of the given field, which should be
     an \sty{etoolbox} internal list, using the same list handler
     macro as \sty{datatool}['s] \gls{DTLformatlist}}
  }
  % \glsxtrfielddolistloop
  \gcmd{gls\-xtr\-field\-do\-list\-loop}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field}}
    \desc{iterates over the given field's value using
    \sty{etoolbox}['s] \gls{dolistcsloop}}
  }
  % \glsxtrfieldforlistloop
  \gcmd{gls\-xtr\-field\-for\-list\-loop}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field}\margm{handler-cs}}
    \desc{iterates over the given field's value using
    \sty{etoolbox}['s] \gls{forlistcsloop}}
  }
  % \glsxtrfieldifinlist
  \gcmd{gls\-xtr\-field\-if\-in\-list}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field}\margm{item}\margm{true}\margm{false}}
    \desc{uses \sty{etoolbox}['s] \gls{ifinlistcs} to determine if
     \meta{item} is in the list stored in the given field}
  }
  % \glsxtrfieldxifinlist
  \gcmd{gls\-xtr\-field\-x\-if\-in\-list}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{field}\margm{item}\margm{true}\margm{false}}
    \desc{uses \sty{etoolbox}['s] \gls{xifinlistcs} to determine if
     \meta{item} is in the list stored in the given field}
  }
  % \GlsXtrSetField
  \gcmd{Gls\-Xtr\-Set\-Field}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{value}}
     \desc{assigns \meta{value} to the field identified by its
     \idxc{internalfieldlabel}{internal label} \meta{field-label} 
     for the entry identified by \meta{entry-label}. An error (or
     warning with \opteqvalref{undefaction}{warn}) occurs
     if the entry hasn't been defined}
  }
  % \gGlsXtrSetField
  \gcmd{gGls\-Xtr\-Set\-Field}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{value}}
     \desc{as \gls{GlsXtrSetField} but globally assigns the value}
  }
  % \eGlsXtrSetField
  \gcmd{eGls\-Xtr\-Set\-Field}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{value}}
     \desc{as \gls{GlsXtrSetField} but expands the value}
  }
  % \xGlsXtrSetField
  \gcmd{xGls\-Xtr\-Set\-Field}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{value}}
     \desc{as \gls{GlsXtrSetField} but expands the value and uses a
      global assignment}
  }
  % \GlsXtrLetField
  \gcmd{Gls\-Xtr\-Let\-Field}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{cs}}
     \desc{like \gls{GlsXtrSetField} but internally uses
     (\sty{etoolbox}['s]) \gls{cslet} instead of \gls{csdef}}
  }
  % \csGlsXtrLetField
  \gcmd{cs\-Gls\-Xtr\-Let\-Field}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{cs-name}}
     \desc{like \gls{GlsXtrLetField} but internally uses
     (\sty{etoolbox}['s]) \gls{csletcs} instead of \gls{cslet}}
  }
  % \GlsXtrLetFieldToField
  \gcmd{Gls\-Xtr\-Let\-Field\-To\-Field}%
  {%
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry1-label}\margm{field1-label}\margm{entry2-label}\margm{field2-label}}
     \desc{assigns the \idx{field} identified by its
     \idxc{internalfieldlabel}{internal label} \meta{field1-label} 
     for the entry identified by \meta{entry1-label} to the
     value of the \idx{field} identified by \meta{field2-label} for the
     entry identified by \meta{entry2-label}}
  }
  % \GlsXtrIfFieldUndef
  \gcmd{Gls\-Xtr\-If\-Field\-Undef}
  {
     \providedby{\sty{glossaries-extra} v1.23+}
    \syntax{\margm{field-label}\margm{entry-label}\margm{true}\margm{false}}
    \desc{expandable command that tests if the given \idx{field} (identified by its
     \idxc{internalfieldlabel}{internal label}) is undefined for the
     entry given by \meta{entry-label}. Internally uses \sty{etoolbox}['s] 
     \gls{ifcsundef} command. Unlike \gls{glsxtrifhasfield} there is no 
     grouping or starred version}
     \field{seealso}{ifglsfieldvoid}
  }
  % \glsxtrifhasfield
  \gcmds{gls\-xtr\-if\-has\-field}
  {
     \providedby{\sty{glossaries-extra} v1.19+}
    \syntax{\margm{field-label}\margm{entry-label}\margm{true}\margm{false}}
    \desc{tests if the \idx{field} identified by its 
     \idxc{internalfieldlabel}{internal label} \meta{field-label} for the entry 
     given by \meta{entry-label} is defined and is not empty. This is like 
    \gls{ifglshasfield} but doesn't produce a warning if the entry or field 
    doesn't exist.  This sets \gls{glscurrentfieldvalue} to the field value and 
    does \meta{true} if its defined and not empty, otherwise it does
    \meta{false}. The unstarred version adds implicit grouping to
    make nesting easier. The starred version doesn't (to make
    assignments easier)}
  }
  % \ifglsfieldeq
  \gcmd{if\-gls\-field\-eq}
  {
     \providedby{\sty{glossaries} v4.16+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{string}\margm{true}\margm{false}}
     \desc{tests if the value of the given field is equal to the
     given string using \sty{etoolbox}['s] \gls{ifcsstring}.
     Triggers an error if the given field (identified by its
     \idx{internalfieldlabel}) hasn't been defined. Uses
     \gls{glsdoifexists}}
  }
  % \ifglsfielddefeq
  \gcmd{if\-gls\-field\-def\-eq}
  {
     \providedby{\sty{glossaries} v4.16+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{cs}\margm{true}\margm{false}}
     \desc{tests if the value of the given field is equal to the
     replacement text of the given command \meta{cs} using \sty{etoolbox}['s] 
    \csfmt{ifdefstrequal}.
     Triggers an error if the given field (identified by its
     \idx{internalfieldlabel}) hasn't been defined. Uses
     \gls{glsdoifexists}}
  }
  % \ifglsfieldcseq
  \gcmd{if\-gls\-field\-cs\-eq}
  {
     \providedby{\sty{glossaries} v4.16+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{cs-name}\margm{true}\margm{false}}
     \desc{tests if the value of the given field is equal to the
     replacement text of the command given by the control sequence
     name \meta{cs-name} using \sty{etoolbox}['s] \csfmt{ifcsstrequal}.
     Triggers an error if the given field (identified by its
     \idx{internalfieldlabel}) hasn't been defined. Uses
     \gls{glsdoifexists}}
  }
  % \glsfieldfetch
  \gcmd{gls\-field\-fetch}
  {
     \providedby{\sty{glossaries} v4.16+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{cs}}
     \desc{fetches the value of the given field for the given entry and stores it in
     the command \meta{cs}.  Triggers an error if the given field (identified by its
     \idx{internalfieldlabel}) hasn't been defined. Uses
     \gls{glsdoifexists}}
  }
  % \glsunexpandedfieldvalue
  \gcmd{gls\-un\-expanded\-field\-value}
  {
     \providedby{\sty{glossaries} v4.48+}
     \syntax{\margm{entry-label}\margm{field-label}}
     \desc{for use in expandable contexts where the field value is
     required but the contents should not be expanded. The field
     should be identified by its \idx{internalfieldlabel}. Expands
     to nothing with no error or warning if the entry or field aren't defined}
  }
  % \GlsXtrIfFieldCmpNum
  \gcmds{Gls\-Xtr\-If\-Field\-Cmp\-Num}
  {
     \providedby{\sty{glossaries-extra} v1.31+}
     \syntax{\margm{field-label}\margm{entry-label}\margm{op}\margm{number}\margm{true}\margm{false}}
     \desc{compares the (numeric) value of the \idx{field} identified by its 
     \idxc{internalfieldlabel}{internal label}
     \meta{field-label} for the entry identified by
     \meta{entry-label} with \meta{number} where \meta{op} is
     the comparison operator (\code{=}, \code{<} or \code{>}). The
     unstarred version adds implicit grouping. The starred version
     doesn't}
  }
  % \GlsXtrIfFieldEqNum
  \gcmds{Gls\-Xtr\-If\-Field\-Eq\-Num}
  {
     \providedby{\sty{glossaries-extra} v1.31+}
     \syntax{\margm{field-label}\margm{entry-label}\margm{number}\margm{true}\margm{false}}
     \desc{a shortcut that uses \gls{GlsXtrIfFieldCmpNum} with
     \meta{op} set to \code{=}. The
     unstarred version adds implicit grouping. The starred version
     doesn't}
  }
  % \GlsXtrIfFieldNonZero
  \gcmds{Gls\-Xtr\-If\-Field\-Non\-Zero}
  {
     \providedby{\sty{glossaries-extra} v1.31+}
     \syntax{\margm{field-label}\margm{entry-label}\margm{true}\margm{false}}
     \desc{a shortcut that uses \gls{GlsXtrIfFieldCmpNum} to test if
     the (numeric) value of the \idx{field} identified by its 
     \idxc{internalfieldlabel}{internal label}
     \meta{field-label} for the entry identified by
     \meta{entry-label} is non-zero. An empty or undefined field is
     treated as 0. The unstarred version adds implicit grouping. The starred version
     doesn't. The value can be referenced within \meta{true} (where
     it will be 0) or within \meta{false} using \gls{glscurrentfieldvalue}}
  }
  % \GlsXtrIfFieldEqStr
  \gcmds{Gls\-Xtr\-If\-Field\-Eq\-Str}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{field-label}\margm{entry-label}\margm{value}\margm{true}\margm{false}}
     \desc{tests if the entry given by \meta{entry-label} has the
    \idx{field} identified by its \idxc{internalfieldlabel}{internal label}
    \meta{field-label} set to \meta{value}. This internally uses
     \gls{glsxtrifhasfield} and compares \gls{glscurrentfieldvalue}
     to \meta{value} using \sty{etoolbox}['s] \gls{ifdefstring}. The
     unstarred version adds implicit grouping. The starred version
     doesn't}
  }
  % \GlsXtrIfFieldEqXpStr
  \gcmds{Gls\-Xtr\-If\-Field\-Eq\-Xp\-Str}
  {
     \providedby{\sty{glossaries-extra} v1.31+}
     \syntax{\margm{field-label}\margm{entry-label}\margm{value}\margm{true}\margm{false}}
     \desc{like \gls{GlsXtrIfFieldEqStr} but first (protected) expands
      \meta{value}}
  }
  % \GlsXtrIfXpFieldEqXpStr
  \gcmds{Gls\-Xtr\-If\-Xp\-Field\-Eq\-Xp\-Str}
  {
     \providedby{\sty{glossaries-extra} v1.31+}
     \syntax{\margm{field-label}\margm{entry-label}\margm{value}\margm{true}\margm{false}}
     \desc{like \gls{GlsXtrIfFieldEqStr} but first (protected) expands
      both the field value and the supplied \meta{value}}
  }
  % \glossaries_if_field_exists_p:nn
  % \glossaries_if_field_exists:nnT
  % \glossaries_if_field_exists:nnF
  % \glossaries_if_field_exists:nnTF
  \gexplpred{glossaries\dsb if\dsb field\dsb exists}{nn}
  {
    \providedby{\sty{glossaries-extra} v1.55+}
    \syntax{\ \margm{entry-label} \margm{field-label} \TFsyntax}
    \desc{true if the entry identified by \meta{entry-label} exists and has an 
\idxc{internalfieldlabel}{internal field} identified by \meta{field-label} (which may or may not be empty)}
  }
  % \glossaries_if_field_set_p:nn
  % \glossaries_if_field_set:nnT
  % \glossaries_if_field_set:nnF
  % \glossaries_if_field_set:nnTF
  \gexplpred{glossaries\dsb if\dsb field\dsb set}{nn}
  {
    \providedby{\sty{glossaries-extra} v1.55+}
    \syntax{\ \margm{entry-label} \margm{field-label} \TFsyntax}
    \desc{true if the entry identified by \meta{entry-label} exists and has an 
\idxc{internalfieldlabel}{internal field} identified by \meta{field-label} set to a value
that is not empty and not \gls{relax}}
  }
  % \glossaries_if_field_eq_p:nnN
  % \glossaries_if_field_eq:nnTN
  % \glossaries_if_field_eq:nnFN
  % \glossaries_if_field_eq:nnTFN
  \gexplpred{glossaries\dsb if\dsb field\dsb eq}{nnN}
  {
    \providedby{\sty{glossaries-extra} v1.55+}
    \syntax{\ \margm{entry-label} \margm{field-label} \meta{value-tl-var} \TFsyntax}
    \desc{true if the entry identified by \meta{entry-label} exists and has an 
\idxc{internalfieldlabel}{internal field} identified by \meta{field-label} that
has the same value as the given token list variable}
  }
  % \glossaries_if_field_eq:nnnT
  % \glossaries_if_field_eq:nnnF
  % \glossaries_if_field_eq:nnnTF
  \gexplcond{glossaries\dsb if\dsb field\dsb eq}{nnn}
  {
    \providedby{\sty{glossaries-extra} v1.55+}
    \syntax{\ \margm{entry-label} \margm{field-label} \margm{value-tl} \TFsyntax}
    \desc{true if the entry identified by \meta{entry-label} exists and has an 
\idxc{internalfieldlabel}{internal field} identified by \meta{field-label} that
has the given value}
  }
  % \glossaries_if_field_eq_field_p:nnnN
  % \glossaries_if_field_eq_field:nnnTN
  % \glossaries_if_field_eq_field:nnnFN
  % \glossaries_if_field_eq_field:nnnTFN
  \gexplpred{glossaries\dsb if\dsb field\dsb eq\dsb field}{nnn}
  {
    \providedby{\sty{glossaries-extra} v1.55+}
    \syntax{\ \margm{entry-label} \margm{field-label} \meta{field2-label} \TFsyntax}
    \desc{true if the entry identified by \meta{entry-label} exists and has an 
\idxc{internalfieldlabel}{internal field} identified by \meta{field-label} that
has the same value as the second field identified by \meta{field2-label}
(for the same entry)}
  }
  % \glossaries_if_field_eq_field_p:nnnnN
  % \glossaries_if_field_eq_field:nnnnTN
  % \glossaries_if_field_eq_field:nnnnFN
  % \glossaries_if_field_eq_field:nnnnTFN
  \gexplpred{glossaries\dsb if\dsb field\dsb eq\dsb field}{nnnn}
  {
    \providedby{\sty{glossaries-extra} v1.55+}
    \syntax{\ \margm{entry-label} \margm{field-label} \margm{entry2-label} \meta{field2-label} \TFsyntax}
    \desc{true if the entry identified by \meta{entry-label} exists and has an internal field
identified by \meta{field-label}
and the entry identified by \meta{entry2-label} exists and has an internal field
identified by \meta{field2-label} and both field values are the same}
  }
  % \glossaries_use_field:nn
  \gcmd{glossaries\dsb use\dsb field:nn}
   {
    \providedby{\sty{glossaries-extra} v1.55+}
    \syntax{\ \margm{entry-label} \margm{field-label}}
    \desc{expands to the value of the field identified by its \idx{internalfieldlabel}
for the entry identifed by \meta{entry-label} (produces an error if either the field or entry are undefined)}
   }
  % \glsxtrforcsvfield
  \gcmds{gls\-xtr\-for\-csv\-field}
  {
     \providedby{\sty{glossaries-extra} v1.24+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{handler cs}}
     \desc{iterates over the comma-separated list stored in the given \idx{field} 
     (identified by its \idxc{internalfieldlabel}{internal label})
     for the entry identified by \meta{entry-label} and performs
     \code{\meta{handler cs}\margm{element}} for each element of the
     list. This command uses \gls{glsxtrifhasfield} so the complete
     list can be obtained with \gls{glscurrentfieldvalue}. The
     unstarred version adds implicit grouping. The starred version
     doesn't}
  }
  % \glsxtrendfor
  \gcmd{glsxtrendfor}
  {
     \providedby{\sty{glossaries-extra} v1.24+}
    \desc{when used within \gls{glsxtrforcsvfield} signifies that
     the loop should break at the end of the current iteration}
  }
  % \glsxtrfieldformatcsvlist
  \gcmd{gls\-xtr\-field\-format\-csv\-list}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}\margm{field-label}}
     \desc{formats the comma-separated list stored in the given \idx{field} 
     (identified by its \idxc{internalfieldlabel}{internal label})
     for the entry identified by \meta{entry-label} using \sty{datatool-base}['s]
     \gls{DTLformatlist}. 
     This command uses \gls{glsxtrifhasfield} so the complete
     list can be obtained with \gls{glscurrentfieldvalue}. 
     This adds implicit grouping. There is no starred version}
  }
  % \GlsXtrIfFieldValueInCsvList
  \gcmds{Gls\-Xtr\-If\-Field\-Value\-In\-Csv\-List}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{csv-list}\margm{true}\margm{false}}
     \desc{tests if the value stored in the given \idx{field} 
     (identified by its \idxc{internalfieldlabel}{internal label})
     for the entry identified by \meta{entry-label} is contained in
     the comma-separated list \meta{csv-list} using
     \gls{DTLifinlist} (provided by \sty{datatool-base}, which is
     automatically loaded by the \sty{glossaries} package). 
     One level expansion is performed on \meta{csv-list}.
     This command uses \gls{glsxtrifhasfield} so the field value 
     can be obtained with \gls{glscurrentfieldvalue}. 
     The unstarred version adds implicit grouping. The starred version doesn't}
  }
  % \GlsXtrIfValueInFieldCsvList
  \gcmds{Gls\-Xtr\-If\-Value\-In\-Field\-Csv\-List}
  {
     \providedby{\sty{glossaries-extra} v1.47+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{value}\margm{true}\margm{false}}
     \desc{tests if the given value (\meta{value}) is contained in
     the comma-separated list stored in the given \idx{field} 
     (identified by its \idxc{internalfieldlabel}{internal label})
     for the entry identified by \meta{entry-label} using
     \gls{DTLifinlist} (provided by \sty{datatool-base}, which is
     automatically loaded by the \sty{glossaries} package). 
     No expansion is performed on \meta{value}.
     This command uses \gls{glsxtrifhasfield} so the complete
     list can be obtained with \gls{glscurrentfieldvalue}. 
     The unstarred version adds implicit grouping. The starred version doesn't}
  }
  % \xGlsXtrIfValueInFieldCsvList
  \gcmds{xGls\-Xtr\-If\-Value\-In\-Field\-Csv\-List}
  {
     \providedby{\sty{glossaries-extra} v1.47+}
     \syntax{\margm{entry-label}\margm{field-label}\margm{value}\margm{true}\margm{false}}
     \desc{as \gls{GlsXtrIfValueInFieldCsvList} but fully expands
      \meta{value}}
  }
  % \glsxtrusefield
  \gcmd{gls\-xtr\-use\-field}
  {
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}}
     \desc{expands to the value of the given \idx{field} 
      (identified by its \idxc{internalfieldlabel}{internal label}
       \meta{field-label}) for the entry given by
       \meta{entry-label}. Expands to \gls{relax} if the entry or field are undefined}
  }
  % \Glsxtrusefield
  \gcmd{Gls\-xtr\-use\-field}
  {
     \providedby{\sty{glossaries-extra} v1.12+}
     \syntax{\margm{entry-label}\margm{field-label}}
     \desc{as \gls{glsxtrusefield} but uses \idx{sentencecase}}
  }
  % \GLSxtrusefield
  \gcmd{GLS\-xtr\-use\-field}
  {
     \providedby{\sty{glossaries-extra} v1.37+}
     \syntax{\margm{entry-label}\margm{field-label}}
     \desc{as \gls{glsxtrusefield} but converts the field value
     to \idx{allcaps}}
  }
  % \glsxtrfieldtitlecase
  \gcmd{gls\-xtr\-field\-title\-case}
  {
     %\providedby{\sty{glossaries-extra} v0.5.2+}
     \syntax{\margm{entry-label}\margm{field-label}}
     \desc{as \gls{glsxtrusefield} but converts the field value
     to \idx{titlecase}}
  }
  % \glsxtrfieldtitlecasecs
  \gcmd{gls\-xtr\-field\-title\-case\-cs}
  {
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{content}}
    \desc{converts \meta{content} to \idx{titlecase} (expanding the
     first token once). Uses \gls{glscapitalisewords}, if defined,
     otherwise uses \gls{capitalisewords}}
  }
  % \glscapitalisewords
  \gcmd{gls\-capitalise\-words}
  {
    \providedby{\sty{glossaries} v4.48+}
    \syntax{\margm{content}}
    \desc{just does \gls{capitalisewords} but may be redefined to
    use \gls{capitalisefmtwords}, if required}
  }
  % \glsentrytitlecase
  \gcmd{gls\-en\-try\-title\-case}
  {
    \providedby{\sty{glossaries} v4.22+}
    \syntax{\margm{entry-label}\margm{field-label}}
    \desc{applies \idx{titlecase} to the value supplied in the given
    field (which is obtained with \gls{glsfieldfetch})}
  }
  % \glsletentryfield
  \gcmd{gls\-let\-en\-try\-field}
  {
    \providedby{\sty{glossaries} v4.07+}
     \syntax{\margm{cs}\margm{entry-label}\margm{field-label}}
     \desc{fetches the value of the given \idx{field} 
       (identified by its \idxc{internalfieldlabel}{internal label}
       \meta{field-label}) for the entry given by
       \meta{entry-label} and stores it in the command \meta{cs}}
  }
  % \glsxtrentryparentname
  \gcmd{gls\-xtr\-en\-try\-parent\-name}
  {
     \providedby{\sty{glossaries-extra} v1.39+}
     \syntax{\margm{entry-name}}
     \desc{expands to the \gloskey{name} field of the given entry's
      parent or does nothing if the entry doesn't have the
      \gloskey{parent} field set or isn't defined}
  }
  % COMMANDS: FORMATTING HOOKS
  % \glsexclapplyinnerfmtfield
  \gcmd{gls\-excl\-apply\-inner\-fmt\-field}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{internal-field}}
     \desc{locally adds the field given by its \idx{internalfieldlabel}
     \meta{internal-field} to the \idx{innerformatting} exclusion list
     for the entry identified by \meta{entry-label}. This typically
     means that the field value already contains the \idx{innerformatting}}
  }
  % \glsifapplyinnerfmtfield
  \gcmd{gls\-if\-apply\-inner\-fmt\-field}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{internal-field}\margm{true}\margm{false}}
     \desc{tests if the field given by its \idx{internalfieldlabel}
     \meta{internal-field} has been added to the \idx{innerformatting}
     exclusion list for the entry identified by \meta{entry-label}}
     \field{seealso}{glsexclapplyinnerfmtfield}
  }
  % \glsxtrattrentrytextfmt
  \gcmd{gls\-xtr\-attr\-en\-try\-text\-fmt}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{text}}
     \desc{applies the command obtained from the control sequence
     name supplied in the \catattr{innertextformat} attribute for 
     the category assigned to the entry given by \gls{glslabel}. This command isn't
     used by default as it should rarely be needed an increases
     complexity}
  }
  % \glsxtrgenentrytextfmt
  \gcmd{gls\-xtr\-gen\-en\-try\-text\-fmt}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{redefined by the \idx{glslike} and \idx{glstextlike} hooks
      to set up the \idx{innerformatting}.
     Initialised to \gls{glsxtrdefaultentrytextfmt}}
  }
  % \glsxtrdefaultentrytextfmt
  \gcmd{gls\-xtr\-de\-fault\-en\-try\-text\-fmt}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{text}}
    \desc{default \idx{innerformatting}.  Initialised to just do \meta{text}}
  }
  % \glsfmtfield
  \gcmd{gls\-fmt\-field}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}\margm{internal-field}}
    \desc{applies the formatting command \meta{cs} (which takes one
    argument) to the entry's field value identified by the given
    \idx{internalfieldlabel}, including \meta{insert} appended. Used
    by the \idx{innerformatting} commands.
    Note that \gls{glsfmtfield} should not be robust as it needs to
    expand if it's inside a case-changing command}
  }
  % \Glsfmtfield
  \gcmd{Gls\-fmt\-field}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}\margm{internal-field}}
    \desc{as \gls{glsfmtfield} but uses \gls{makefirstuc} to change
    the field value to \idx{sentencecase}}
  }
  % \GLSfmtfield
  \gcmd{GLS\-fmt\-field}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}\margm{internal-field}}
    \desc{as \gls{glsfmtfield} but changes the field value to \idx{allcaps}}
  }
  % \glsfmtinsert
  \gcmd{gls\-fmt\-insert}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{a shortcut that applies \gls{glsxtrgenentrytextfmt} to
      \gls{glsinsert} if \gls{glsinsert} isn't empty}
  }
  % \GLSfmtinsert
  \gcmd{GLS\-fmt\-insert}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{as \gls{glsfmtinsert} but converts to \idx{allcaps}}
  }
  % \glsxtrsaveinsert
  \gcmd{gls\-xtr\-save\-insert}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{implemented at the start of all the \idx{glstextlike}
     commands (except the \idx{inlinefullform} commands like \gls{glsxtrfull})
     to save the \gls{glsinsert} placeholder. By default, this sets
     \gls{glsinsert} to empty}
  }
  % \glsxtrfullsaveinsert
  \gcmd{gls\-xtr\-full\-save\-insert}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}\margm{insert}}
     \desc{implemented at the start of all the \idx{inlinefullform} commands 
     like \gls{glsxtrfull} to save the \gls{glsinsert} placeholder. 
     By default, this just does \gls{glsxtrsaveinsert}}
  }
  % \glsxtrsetlongfirstuse
  \gcmd{gls\-xtr\-set\-long\-first\-use}
  {
     \providedby{\sty{glossaries} v1.49+}
     \syntax{\margm{entry-label}}
     \desc{implemented by the \gls{glsxtrlong} set of commands to
      assign \gls{glsxtrifwasfirstuse}}
  }
  % \glsxtrsetupfulldefs
  \gcmd{gls\-xtr\-set\-up\-full\-defs}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \desc{hook used by \gls{glsxtrfull} (and case-changing and
      plural variations)}
  }
  % COMMANDS: REFERENCING ENTRIES
  % \gls
  \gcmdspa{gls}{%
    \common
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced depends on whether or not this is the \idx{firstuse}
    and whether or not the \catattr{regular} attribute has been set.
    The \meta{insert} argument may be inserted at the end of the
    \idx{linktext} or may be inserted at a different point (for
    example, after the long form on \idx{firstuse} for some abbreviation
    styles. For the first optional argument, see \idxpl{glsopt}}
  }
  % \Gls
  \gcmdspa{Gls}{%
    \common
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{gls} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}}
  }
  % \GLS
  \gcmdspa{GLS}{%
    \common
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{gls} but converts the \idx{linktext} to \idx{allcaps}}
  }
  % \glspl
  \gcmdspa{glspl}{%
    \common
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{gls} but uses the relevant plural form}
  }
  % \Glspl
  \gcmdspa{Glspl}{%
    \common
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glspl} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}}
  }
  % \GLSpl
  \gcmdspa{GLSpl}{%
    \common
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glspl} but converts the \idx{linktext} to \idx{allcaps}}
  }
  % \glsdisp
  \gcmdspa{gls\-disp}{%
    \providedby{\sty{glossaries} v1.19+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{references the entry identified by \meta{entry-label} with the
     given \meta{text} as the \idx{linktext}. This command unsets the 
    \idx{firstuseflag} (use \gls{glslink} instead, if the
    \idx{firstuseflag} should not be altered).
    This command is considered a \idx{glslike} command.
    For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsdisp
  \gcmdspa{Gls\-disp}{%
    \providedby{\sty{glossaries} v4.50+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{as \gls{glsdisp} but sets the \idx{linktext} to 
    \code{\gls{glssentencecase}\margm{text}}. This is provided to
    allow a \idx{sentencecase} mapping in the event that \gls{glsdisp}
    occurs at the start of content that has automated case-changing}
  }
  % \glslink
  \gcmdspa{gls\-link}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{references the entry identified by \meta{entry-label} with the
     given \meta{text} as the \idx{linktext}. This command does not 
     alter or depend on the \idx{firstuseflag} (use \gls{glsdisp} instead, if the
    \idx{firstuseflag} needs to be unset).
    This command is considered a \idx{glstextlike} command.
    For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glslink
  \gcmdspa{Gls\-link}{%
    \providedby{\sty{glossaries} v4.50+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{as \gls{glslink} but sets the \idx{linktext} to 
    \code{\gls{glssentencecase}\margm{text}}. This is provided to
    allow a \idx{sentencecase} mapping in the event that \gls{glslink}
    occurs at the start of content that has automated case-changing}
  }
  % \glstext
  \gcmdspa{gls\-text}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{text} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. If you have defined the entry with
    \gls{newabbreviation} use \gls{glsxtrshort} for the short form or 
    \code{\gls{gls}\oarg{\glsopt{preunset}}}, as some
    abbreviation styles are too complicated to work with \gls{glstext}.
    For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glstext
  \gcmdspa{Gls\-text}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glstext} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}. 
    If you have defined the entry with
    \gls{newabbreviation} use \gls{Glsxtrshort} or 
    \code{\gls{Gls}\oarg{\glsopt{preunset}}} instead}
  }
  % \GLStext
  \gcmdspa{GLS\-text}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glstext} but converts the \idx{linktext} to \idx{allcaps}. 
    If you have defined the entry with
    \gls{newabbreviation} use \gls{GLSxtrshort} or 
    \code{\gls{GLS}\oarg{\glsopt{preunset}}} instead}
  }
  % \glsplural
  \gcmdspa{gls\-plural}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{plural} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. If you have defined the entry with
    \gls{newabbreviation} use \gls{glsxtrshortpl} for the short form or 
    \code{\gls{gls}\oarg{\glsopt{preunset}}}, as some
    abbreviation styles are too complicated to work with \gls{glsplural}.
    For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsplural
  \gcmdspa{Gls\-plural}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsplural} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}. 
    If you have defined the entry with
    \gls{newabbreviation} use \gls{Glsxtrshortpl} or 
    \code{\gls{Glspl}\oarg{\glsopt{preunset}}} instead}
  }
  % \GLSplural
  \gcmdspa{GLS\-plural}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsplural} but converts the \idx{linktext} to \idx{allcaps}. 
    If you have defined the entry with
    \gls{newabbreviation} use \gls{GLSxtrshortpl} or 
    \code{\gls{GLSpl}\oarg{\glsopt{preunset}}} instead}
  }
  % \glsfirst
  \gcmdspa{gls\-first}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{first} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. If you have defined the entry with
    \gls{newabbreviation} use \gls{glsxtrfull}
    for the full form or \gls{glsxtrlong} for the long form or use
    \code{\gls{gls}\oarg{\glsopt{prereset}}}, as some
    abbreviation styles are too complicated to work with \gls{glsfirst}.
    For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsfirst
  \gcmdspa{Gls\-first}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsfirst} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}. 
    If you have defined the entry with
    \gls{newabbreviation} use \gls{Glsxtrfull} or 
    \code{\gls{Gls}\oarg{\glsopt{prereset}}} instead}
  }
  % \GLSfirst
  \gcmdspa{GLS\-first}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsfirst} but converts the \idx{linktext} to \idx{allcaps}. 
    If you have defined the entry with
    \gls{newabbreviation} use \gls{GLSxtrfull} or 
    \code{\gls{GLS}\oarg{\glsopt{prereset}}} instead}
  }
  % \glsfirstplural
  \gcmdspa{gls\-first\-plural}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{firstplural} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. If you have defined the entry with
    \gls{newabbreviation} use \gls{glsxtrfullpl}
    for the full form or \gls{glsxtrlongpl} for the long form or use
    \code{\gls{glspl}\oarg{\glsopt{prereset}}}, as some
    abbreviation styles are too complicated to work with \gls{glsfirstplural}.
    For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsfirstplural
  \gcmdspa{Gls\-first\-plural}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsfirstplural} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}. 
    If you have defined the entry with
    \gls{newabbreviation} use \gls{Glsxtrfullpl} or 
    \code{\gls{Glspl}\oarg{\glsopt{prereset}}} instead}
  }
  % \GLSfirstplural
  \gcmdspa{GLS\-first\-plural}{%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsfirstplural} but converts the \idx{linktext} to \idx{allcaps}. 
    If you have defined the entry with
    \gls{newabbreviation} use \gls{GLSxtrfullpl} or 
    \code{\gls{GLSpl}\oarg{\glsopt{prereset}}} instead}
  }
  % \glsxtrshort
  \gcmdspa{gls\-xtr\-short}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{short} value, formatted
    according to the \idx{abbrvstyle} associated with the entry's \idx{category}.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsxtrshort
  \gcmdspa{Gls\-xtr\-short}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrshort} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}}
  }
  % \GLSxtrshort
  \gcmdspa{GLS\-xtr\-short}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrshort} but converts the \idx{linktext} to \idx{allcaps}}
  }
  % \glsxtrshortpl
  \gcmdspa{gls\-xtr\-shortpl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{shortplural} value, formatted
    according to the \idx{abbrvstyle} associated with the entry's \idx{category}.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsxtrshortpl
  \gcmdspa{Gls\-xtr\-shortpl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrshortpl} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}}
  }
  % \GLSxtrshortpl
  \gcmdspa{GLS\-xtr\-shortpl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrshort} but converts the \idx{linktext} to \idx{allcaps}}
  }
  % \glsxtrlong
  \gcmdspa{gls\-xtr\-long}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{long} value, formatted
    according to the \idx{abbrvstyle} associated with the entry's \idx{category}.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsxtrlong
  \gcmdspa{Gls\-xtr\-long}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrlong} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}}
  }
  % \GLSxtrlong
  \gcmdspa{GLS\-xtr\-long}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrlong} but converts the \idx{linktext} to \idx{allcaps}}
  }
  % \glsxtrlongpl
  \gcmdspa{gls\-xtr\-long\-pl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{longplural} value, formatted
    according to the \idx{abbrvstyle} associated with the entry's \idx{category}.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsxtrlongpl
  \gcmdspa{Gls\-xtr\-long\-pl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrlongpl} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}}
  }
  % \GLSxtrlongpl
  \gcmdspa{GLS\-xtr\-long\-pl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrlongpl} but converts the \idx{linktext} to \idx{allcaps}}
  }
  % \glsxtrfull
  \gcmdspa{gls\-xtr\-full}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{short} and \gloskey{long} values, formatted
    according to the \idx{abbrvstyle} associated with the entry's \idx{category}.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. The format produced by this command may not
    match the format produced by the \idx{firstuse} of
    \code{\gls{gls}\margm{entry-label}}, depending on the abbreviation
    style. For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsxtrfull
  \gcmdspa{Gls\-xtr\-full}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrfull} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}}
  }
  % \GLSxtrfull
  \gcmdspa{GLS\-xtr\-full}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrfull} but converts the \idx{linktext} to \idx{allcaps}}
  }
  % \glsxtrfullpl
  \gcmdspa{gls\-xtr\-fullpl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{shortplural} and
    \gloskey{longplural} values, formatted
    according to the \idx{abbrvstyle} associated with the entry's \idx{category}.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. The format produced by this command may not
    match the format produced by the \idx{firstuse} of
    \code{\gls{glspl}\margm{entry-label}}, depending on the abbreviation
    style. For the first optional argument, see \idxpl{glsopt}}
  }
  % \Glsxtrfullpl
  \gcmdspa{Gls\-xtr\-fullpl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrfullpl} but converts the first character of the
    \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for
    the start of a sentence) using \gls{makefirstuc}}
  }
  % \GLSxtrfullpl
  \gcmdspa{GLS\-xtr\-fullpl}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrfullpl} but converts the \idx{linktext} to \idx{allcaps}}
  }
  % \glsname
  \gcmdspa{gls\-name}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{name} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}. 
    Use \gls{glossentryname} within custom glossary styles
    instead of this command}
  }
  % \Glsname
  \gcmdspa{Gls\-name}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsname} but converts the \idx{linktext} to
    \idx{sentencecase}. Use \gls{Glossentryname} within custom glossary styles
    instead of this command}
  }
  % \GLSname
  \gcmdspa{GLS\-name}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsname} but converts the \idx{linktext} to
   \idx{allcaps}. This command is incompatible with some
    abbreviation styles}
  }
  % \glsdesc
  \gcmdspa{gls\-desc}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{description} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see
    \idxpl{glsopt}. Use \gls{glossentrydesc} within custom glossary styles
    instead of this command}
  }
  % \Glsdesc
  \gcmdspa{Gls\-desc}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsdesc} but converts the 
    \idx{linktext} to \idx{sentencecase}. Use 
    \gls{Glossentrydesc} within custom glossary styles
    instead of this command}
  }
  % \GLSdesc
  \gcmdspa{GLS\-desc}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsdesc} but converts the \idx{linktext} to
   \idx{allcaps}}
  }
  % \glsdescplural
  \gcmdspa{gls\-desc\-plural}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsdesc} but for the \gloskey{descriptionplural} field}
  }
  % \glssymbol
  \gcmdspa{gls\-symbol}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{symbol} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see
    \idxpl{glsopt}. Use \gls{glossentrysymbol} within custom glossary styles
    instead of this command}
  }
  % \Glssymbol
  \gcmdspa{Gls\-symbol}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glssymbol} but converts the 
    \idx{linktext} to \idx{sentencecase}. Use 
    \gls{Glossentrysymbol} within custom glossary styles
    instead of this command}
  }
  % \GLSsymbol
  \gcmdspa{GLS\-symbol}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glssymbol} but converts the \idx{linktext} to
   \idx{allcaps}}
  }
  % \glssymbolplural
  \gcmdspa{gls\-symbol\-plural}{%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glssymbol} but for the \gloskey{symbolplural} field}
  }
  % \glsuseri
  \gcmdspa{gls\-useri}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{user1} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see
    \idxpl{glsopt}}
  }
  % \Glsuseri
  \gcmdspa{Gls\-useri}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuseri} but converts the 
    \idx{linktext} to \idx{sentencecase}}
  }
  % \GLSuseri
  \gcmdspa{GLS\-useri}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuseri} but converts the \idx{linktext} to
   \idx{allcaps}}
  }
  % \glsuserii
  \gcmdspa{gls\-userii}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{user2} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see
    \idxpl{glsopt}}
  }
  % \Glsuserii
  \gcmdspa{Gls\-userii}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuserii} but converts the 
    \idx{linktext} to \idx{sentencecase}}
  }
  % \GLSuserii
  \gcmdspa{GLS\-userii}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuserii} but converts the \idx{linktext} to
   \idx{allcaps}}
  }
  % \glsuseriii
  \gcmdspa{gls\-useriii}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{user3} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see
    \idxpl{glsopt}}
  }
  % \Glsuseriii
  \gcmdspa{Gls\-useriii}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuseriii} but converts the 
    \idx{linktext} to \idx{sentencecase}}
  }
  % \GLSuseriii
  \gcmdspa{GLS\-useriii}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuseriii} but converts the \idx{linktext} to
   \idx{allcaps}}
  }
  % \glsuseriv
  \gcmdspa{gls\-useriv}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{user4} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see
    \idxpl{glsopt}}
  }
  % \Glsuseriv
  \gcmdspa{Gls\-useriv}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuseriv} but converts the 
    \idx{linktext} to \idx{sentencecase}}
  }
  % \GLSuseriv
  \gcmdspa{GLS\-useriv}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuseriv} but converts the \idx{linktext} to
   \idx{allcaps}}
  }
  % \glsuserv
  \gcmdspa{gls\-userv}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{user5} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see
    \idxpl{glsopt}}
  }
  % \Glsuserv
  \gcmdspa{Gls\-userv}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuserv} but converts the 
    \idx{linktext} to \idx{sentencecase}}
  }
  % \GLSuserv
  \gcmdspa{GLS\-userv}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuserv} but converts the \idx{linktext} to
   \idx{allcaps}}
  }
  % \glsuservi
  \gcmdspa{gls\-uservi}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{references the entry identified by \meta{entry-label}. The text
    produced is obtained from the \gloskey{user6} value.
    The \meta{insert} argument will be inserted at the end of the
    \idx{linktext}. This command does not alter or depend on the
    \idx{firstuseflag}. For the first optional argument, see
    \idxpl{glsopt}}
  }
  % \Glsuservi
  \gcmdspa{Gls\-uservi}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuservi} but converts the 
    \idx{linktext} to \idx{sentencecase}}
  }
  % \GLSuservi
  \gcmdspa{GLS\-uservi}{%
     \providedby{\sty{glossaries} v2.04+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsuservi} but converts the \idx{linktext} to
   \idx{allcaps}}
  }
  % \glshyperlink
  \gcmd{gls\-hyper\-link}
  {
     \providedby{\sty{glossaries} v1.17+}
     \syntax{\oargm{text}\margm{entry-label}}
     \desc{creates a hyperlink to the given entry with the hyperlink
      text provided in the optional argument. If omitted, the default is
      \code{\gls{glsentrytext}\margm{entry-label}}}
  }
  % \acrshort
  \gcmdspa{acr\-short}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{displays the short form of an acronym. Only for use with 
     the base \sty{glossaries} package's acronym mechanism. This
     command is not compatible with \gls{newabbreviation}}
  }
  % \acrshortpl
  \gcmdspa{acr\-shortpl}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{displays the plural short form of an acronym. Only for use with 
     the base \sty{glossaries} package's acronym mechanism. This
     command is not compatible with \gls{newabbreviation}}
  }
  % \Acrshort
  \gcmdspa{Acr\-short}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{acrshort} but \idx{sentencecase}}
  }
  % \Acrshortpl
  \gcmdspa{Acr\-shortpl}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{acrshort} but \idx{sentencecase}}
  }
  % \acrlong
  \gcmdspa{acr\-long}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{displays the long form of an acronym. Only for use with 
     the base \sty{glossaries} package's acronym mechanism. This
     command is not compatible with \gls{newabbreviation}}
  }
  % \acrlongpl
  \gcmdspa{acr\-longpl}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{displays the plural long form of an acronym. Only for use with 
     the base \sty{glossaries} package's acronym mechanism. This
     command is not compatible with \gls{newabbreviation}}
  }
  % \Acrlong
  \gcmdspa{Acr\-long}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{acrlong} but \idx{sentencecase}}
  }
  % \Acrlongpl
  \gcmdspa{Acr\-longpl}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{acrlong} but \idx{sentencecase}}
  }
  % \acrfull
  \gcmdspa{acr\-full}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{displays the full form of an acronym. Only for use with 
     the base \sty{glossaries} package's acronym mechanism. This
     command is not compatible with \gls{newabbreviation}}
  }
  % \acrfullpl
  \gcmdspa{acr\-fullpl}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{displays the plural full form of an acronym. Only for use with 
     the base \sty{glossaries} package's acronym mechanism. This
     command is not compatible with \gls{newabbreviation}}
  }
  % \Acrfull
  \gcmdspa{Acr\-full}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{acrfull} but \idx{sentencecase}}
  }
  % \Acrfullpl
  \gcmdspa{Acr\-full\-pl}{%
    \banned
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{acrfullpl} but \idx{sentencecase}}
  }
  % \ac
  \gcmdspa{ac}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cgls} or \gls{gls} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \Ac
  \gcmdspa{Ac}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cGls} or \gls{Gls} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \AC
  \gcmdspa{AC}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cGLS} defined by the
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \acp
  \gcmdspa{acp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cglspl} or \gls{glspl} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
     option, respectively}
  }
  % \Acp
  \gcmdspa{Acp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cGlspl} or \gls{glspl} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
     option, respectively}
  }
  % \ACP
  \gcmdspa{ACP}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cGLSpl} defined by the
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \acs
  \gcmdspa{acs}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrshort} or \gls{acrshort} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \Acs
  \gcmdspa{Acs}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrshort} or \gls{Acrshort} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  \gcmdspa{ACS}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrshort} defined by the
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \acsp
  \gcmdspa{acsp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrshortpl} or \gls{acrshortpl} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \Acsp
  \gcmdspa{Acsp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrshortpl} or \gls{Acrshortpl} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \ACSP
  \gcmdspa{ACSP}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrshortpl} defined by the
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \acl
  \gcmdspa{acl}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrlong} or \gls{acrlong} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \aclp
  \gcmdspa{aclp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrlongpl} or \gls{acrlongpl} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \Acl
  \gcmdspa{Acl}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrlong} or \gls{Acrlong} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \ACL
  \gcmdspa{ACL}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrlong} defined by the
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \Aclp
  \gcmdspa{Aclp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrlongpl} or \gls{Acrlongpl} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \ACLP
  \gcmdspa{ACLP}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrlongpl} defined by the
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \acf
  \gcmdspa{acf}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrfull} or \gls{acrfull} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \acfp
  \gcmdspa{acfp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrfullpl} or \gls{acrfullpl} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \Acf
  \gcmdspa{Acf}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrfull} or \gls{Acrfull} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \ACF
  \gcmdspa{ACF}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrfull} defined by the
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \Acfp
  \gcmdspa{Acfp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrfullpl} or \gls{Acrfullpl} defined by the
     \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package
      option, respectively}
  }
  % \ACFP
  \gcmdspa{ACFP}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrfullpl} defined by the
     \opteqvalref{shortcuts}{ac} package option}
  }
  % \ab
  \gcmdspa{ab}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cgls} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \Ab
  \gcmdspa{Ab}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cGls} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \AB
  \gcmdspa{AB}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cGLS} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \abp
  \gcmdspa{abp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cglspl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \Abp
  \gcmdspa{Abp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cGlspl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \ABP
  \gcmdspa{ABP}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{cGLSpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \as
  \gcmdspa{as}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrshort} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \As
  \gcmdspa{As}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrshort} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \AS
  \gcmdspa{AS}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrshort} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \asp
  \gcmdspa{asp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrshortpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \Asp
  \gcmdspa{Asp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrshortpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \ASP
  \gcmdspa{ASP}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrshortpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \al
  \gcmdspa{al}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrlong} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \Al
  \gcmdspa{Al}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrlong} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \AL
  \gcmdspa{AL}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrlong} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \alp
  \gcmdspa{alp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrlongpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \Alp
  \gcmdspa{Alp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrlongpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \ALP
  \gcmdspa{ALP}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrlongpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \af
  \gcmdspa{af}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrfull} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \Af
  \gcmdspa{Af}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrfull} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \AF
  \gcmdspa{AF}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrfull} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \afp
  \gcmdspa{afp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{glsxtrfullpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \Afp
  \gcmdspa{Afp}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{Glsxtrfullpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \AFP
  \gcmdspa{AFP}%
  {%
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{a synonym for \gls{GLSxtrfullpl} defined by the
     \opteqvalref{shortcuts}{abbreviations} package option}
  }
  % \glsentrytype
  \gcmd{gls\-en\-try\-type}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{type} key.
     Does nothing if the entry hasn't been defined}
  }
  % \glsentryname
  \gcmd{gls\-en\-try\-name}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{name} key.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{name} key doesn't
     contain any fragile commands}
  }
  % \Glsentryname
  \gcmd{Gls\-en\-try\-name}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{name} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
    expand to a robust internal command}
  }
  % \glsentryparent
  \gcmd{gls\-en\-try\-parent}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{expands to the value of the \gloskey{parent} \idx{field}.
     Expands to nothing if the \gloskey{parent} \idx{field} hasn't been set
     and expands to \gls{relax} if the entry hasn't been defined}
  }
  % \glsentrytext
  \gcmd{gls\-en\-try\-text}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{text} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{text} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentrytext
  \gcmd{Gls\-en\-try\-text}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{text} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
    expand to a robust internal command}
  }
  % \glsentryplural
  \gcmd{gls\-en\-try\-plural}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{plural} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{plural} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryplural
  \gcmd{Gls\-en\-try\-plural}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{plural} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
    expand to a robust internal command}
  }
  % \glsentryfirst
  \gcmd{gls\-en\-try\-first}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{first} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{first} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryfirst
  \gcmd{Gls\-en\-try\-first}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{first} \idx{field} with the first letter converted to
     \idx{uppercase}. As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
    expand to a robust internal command}
  }
  % \glsentryfirstplural
  \gcmd{gls\-en\-try\-first\-plural}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{firstplural} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{firstplural} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryfirstplural
  \gcmd{Gls\-en\-try\-first\-plural}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{firstplural} \idx{field} with \idx{sentencecase}
     applied. As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
    expand to a robust internal command}
  }
  % \glsentrydesc
  \gcmd{gls\-en\-try\-desc}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{description} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{description} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentrydesc
  \gcmd{Gls\-en\-try\-desc}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{description} \idx{field} with \idx{sentencecase}
     applied. As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
    expand to a robust internal command}
  }
  % \glsentrydescplural
  \gcmd{gls\-en\-try\-desc\-plural}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{descriptionplural} 
    \idx{field}.  Does nothing if the entry hasn't been defined. 
    May be used in expandable contexts provided that the 
    \gloskey{descriptionplural} \idx{field} doesn't contain any fragile commands}
  }
  % \glsentryshort
  \gcmd{gls\-en\-try\-short}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{short} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{short} \idx{field} doesn't
     contain any fragile commands}
  }
  % \glsentryshortpl
  \gcmd{gls\-en\-try\-short\-pl}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{shortplural} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{shortplural} \idx{field} doesn't
     contain any fragile commands}
  }
  % \glsentrylong
  \gcmd{gls\-en\-try\-long}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{long} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{long} \idx{field} doesn't
     contain any fragile commands}
  }
  % \glsentrylongpl
  \gcmd{gls\-en\-try\-long\-pl}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{longplural} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{longplural} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryshort
  \gcmd{Gls\-en\-try\-short}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{displays the value of the \gloskey{short} \idx{field} with
     \idx{sentencecase} applied.
     Does nothing if the entry hasn't been defined. 
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \Glsentrylong
  \gcmd{Gls\-en\-try\-long}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{displays the value of the \gloskey{long} \idx{field} with
     \idx{sentencecase} applied.
     Does nothing if the entry hasn't been defined.  
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \Glsentryshortpl
  \gcmd{Gls\-en\-try\-short\-pl}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{displays the value of the \gloskey{shortplural} \idx{field} with
     \idx{sentencecase} applied.
     Does nothing if the entry hasn't been defined. As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \Glsentrylong
  \gcmd{Gls\-en\-try\-long\-pl}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{displays the value of the \gloskey{longplural} \idx{field} with
     \idx{sentencecase} applied.
     Does nothing if the entry hasn't been defined. As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \glsentrysymbol
  \gcmd{gls\-en\-try\-symbol}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{symbol} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{symbol} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentrysymbol
  \gcmd{Gls\-en\-try\-symbol}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{symbol} \idx{field} with \idx{sentencecase} applied. 
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \glsentrysymbolplural
  \gcmd{gls\-en\-try\-symbol\-plural}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{symbolplural} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{symbolplural} \idx{field} doesn't
     contain any fragile commands}
  }
  % \glsentryuseri
  \gcmd{gls\-en\-try\-useri}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{user1} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{user1} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryuseri
  \gcmd{Gls\-en\-try\-useri}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{user1} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \glsentryuserii
  \gcmd{gls\-en\-try\-user\-ii}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{user2} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{user2} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryuserii
  \gcmd{Gls\-en\-try\-user\-ii}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{user2} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \glsentryuseriii
  \gcmd{gls\-en\-try\-user\-iii}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{user3} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{user3} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryuseriii
  \gcmd{Gls\-en\-try\-user\-iii}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{user3} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \glsentryuseriv
  \gcmd{gls\-en\-try\-user\-iv}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{user4} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{user4} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryuseriv
  \gcmd{Gls\-en\-try\-user\-iv}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{user4} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \glsentryuserv
  \gcmd{gls\-en\-try\-user\-v}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{user5} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{user5} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryuserv
  \gcmd{Gls\-en\-try\-user\-v}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{user5} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \glsentryuservi
  \gcmd{gls\-en\-try\-user\-vi}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{simply expands to the value of the \gloskey{user6} \idx{field}.
     Does nothing if the entry hasn't been defined. May be used in
     expandable contexts provided that the \gloskey{user6} \idx{field} doesn't
     contain any fragile commands}
  }
  % \Glsentryuservi
  \gcmd{Gls\-en\-try\-user\-vi}
  {%
    \providedby{\sty{glossaries} v2.04+}
    \syntax{\margm{entry-label}}
    \desc{partially robust command that displays the value of the
     \gloskey{user6} \idx{field} with \idx{sentencecase} applied.
     As from \sty{glossaries} v4.50, this command
     can expand in PDF bookmarks. Outside of PDF bookmarks it will
     expand to a robust internal command}
  }
  % \glsxtrhiername
  \gcmd{gls\-xtr\-hier\-name}
  {
     \providedby{\sty{glossaries-extra} v1.37+}
     \syntax{\margm{entry-label}}
     \desc{displays the entry's hierarchical name}
  }
  % \Glsxtrhiername
  \gcmd{Gls\-xtr\-hier\-name}
  {
     \providedby{\sty{glossaries-extra} v1.37+}
     \syntax{\margm{entry-label}}
     \desc{displays the entry's hierarchical name using
      \idx{sentencecase}}
  }
  % \GlsXtrhiername
  \gcmd{Gls\-Xtr\-hier\-name}
  {
     \providedby{\sty{glossaries-extra} v1.37+}
     \syntax{\margm{entry-label}}
     \desc{displays the entry's hierarchical name where each element
      name has its first character converted to \idx{uppercase}}
  }
  % \GLSxtrhiername
  \gcmd{GLS\-xtr\-hier\-name}
  {
     \providedby{\sty{glossaries-extra} v1.37+}
     \syntax{\margm{entry-label}}
     \desc{displays the entry's hierarchical name where the first 
      name is converted to \idx{uppercase}}
  }
  % \GLSXTRhiername
  \gcmd{GLS\-XTR\-hier\-name}
  {
     \providedby{\sty{glossaries-extra} v1.37+}
     \syntax{\margm{entry-label}}
     \desc{displays the entry's hierarchical name where each 
      name is converted to \idx{uppercase}}
  }
  % \glsxtrhiernamesep
  \gcmd{gls\-xtr\-hier\-name\-sep}
  {
     \providedby{\sty{glossaries-extra} v1.37+}
     \desc{separator used by commands like \gls{glsxtrhiername}}
  }
  % \GlsXtrForeignText
  \gcmd{Gls\-Xtr\-Foreign\-Text}
  {%
     \providedby{\sty{glossaries-extra} v1.32+}
     \syntax{\margm{entry-label}\margm{text}}
     \desc{If the entry given by \meta{entry-label} has the field identified by 
       \gls{GlsXtrForeignTextField} then \meta{text} will be
       encapsulated according to the language tag stored in that
       field (using \sty{tracklang}['s] interface)}
  }
  % \GlsXtrForeignTextField
  \gcmd{Gls\-Xtr\-Foreign\-Text\-Field}
  {%
     \providedby{\sty{glossaries-extra} v1.32+}
    \desc{expands to the \idx{internalfieldlabel} used by
    \gls{GlsXtrForeignText}}
  }
  % \glsxtrfmt
  \gcmd{gls\-xtr\-fmt}{%
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{behaves like
\code{\gls{glslink}\oargm{options}\margm{entry-label}\marg{\cmd{\meta{csname}}\margm{text}\meta{insert}}}
     where the control sequence name \meta{csname} is obtained from the
     field given by \gls{GlsXtrFmtField}. The actual format of the
     \idx{linktext} is governed by \gls{glsxtrfmtdisplay}}
  }
  % \glsxtrfmt*
  \gcmd{gls\-xtr\-fmt*}{%
    \providedby{\sty{glossaries-extra} v1.23+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}\oargm{insert}}
    \desc{as the unstarred version \gls{glsxtrfmt} but accepts the
final \meta{insert} option}
  }
  % \Glsxtrfmt
  \gcmd{Gls\-xtr\-fmt}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{as \gls{glsxtrfmt} but applies a \idx{sentencecase} change
    to \meta{text}}
  }
  % \Glsxtrfmt*
  \gcmd{Gls\-xtr\-fmt*}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}\oargm{insert}}
    \desc{as \gls{glsxtrfmt*} but applies a \idx{sentencecase} change
    to \meta{text}}
  }
  % \glsxtrfmtdisplay
  \gcmd{gls\-xtr\-fmt\-display}{%
     \providedby{\sty{glossaries-extra} v1.23+}
    \syntax{\margm{csname}\margm{text}\margm{insert}}
    \desc{formats the \idx{linktext} used in \gls{glsxtrfmt}}
  }
  % \GlsXtrFmtDefaultOptions
  \gcmd{Gls\-Xtr\-Fmt\-De\-fault\-Options}
  {%
    \providedby{\sty{glossaries-extra} v1.12+}
    \initval{noindex}
    \desc{expands to the default options for \gls{glsxtrfmt}}
  }
  % \GlsXtrFmtField
  \gcmd{Gls\-Xtr\-Fmt\-Field}{%
    \providedby{\sty{glossaries-extra} v1.12+}
    \initval{useri}
    \desc{expands to the name of the \idxc{internalfieldlabel} used by \gls{glsxtrfmt}}
  }
  % \glsxtrentryfmt
  \gcmd{gls\-xtr\-en\-try\-fmt}{%
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{does \code{\cmd{\meta{csname}}\margm{text}}
     where the control sequence name \meta{csname} is obtained from the
     field given by \gls{GlsXtrFmtField}. If \sty{hyperref} has been loaded and
     this command will expand to \gls{glsxtrpdfentryfmt}\margm{entry-label}\margm{text}
     in a PDF bookmark}
  }
  % \Glsxtrentryfmt
  \gcmd{Gls\-xtr\-en\-try\-fmt}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{as \gls{glsxtrentryfmt} but converts \meta{text} to
    \idx{sentencecase}}
  }
  % \glsxtrpdfentryfmt
  \gcmd{gls\-xtr\-pdf\-en\-try\-fmt}{%
    \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{just does \meta{text}}
  }
  % \Glsxtrpdfentryfmt
  \gcmd{Gls\-xtr\-pdf\-en\-try\-fmt}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{text}}
    \desc{does \code{\gls{MFUsentencecase}\margm{text}}}
  }
  % \setupglslink
  \gcmd{setup\-gls\-link}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{options}}
     \desc{set the default \idxpl{glsopt}}
     \field{seealso}{setupglsadd}
  }
  % \setupglsadd
  \gcmd{setup\-gls\-add}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{options}}
     \desc{set the default options for \gls{glsadd}}
     \field{seealso}{setupglslink}
  }
  % all \gls... options
  \gidx{glsopt}{\name{{}\csfmt{gls}-like and {}\csfmt{glstext}-like options}%
    \common
    \field{text}{\csfmt{glslink} option}%
    \desc{most (but not all) of these options can be used in the optional argument 
    of all the \idx{glslike}, \idx{glstextlike} and \gls{glsadd} commands}
  }
  % format
  \gglsopt{format}%
  {%
    \common
    \providedby{\sty{glossaries}}
    \syntax{\meta{cs-name}}
    \desc{the control sequence name (without the leading backslash)
    that should be used to \idxc{locationencap}{encapsulate} the \idx{entrylocation}}%
  }%
  % counter
  \gglsopt{counter}%
  {%
    \providedby{\sty{glossaries}}
    \syntax{\meta{counter-name}}
    \desc{the \idx{locationcounter}}%
  }%
  % local
  \gglsopt{local}%
  {%
    \providedby{\sty{glossaries} v3.04+}
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{if true use \gls{glslocalunset} to unset the
     \idx{firstuseflag}, otherwise use \gls{glsunset} (only applies
     to \idx{glslike} commands)}%
  }%
  % postunset
  \gglsopt{post\-unset}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\meta{value}}
    \initval{global}
    \defval{global}
    \desc{determines whether or not to unset the \idx{firstuseflag}
     after the \idx{linktext}. The value may be one of:
     \code{global}, \code{local} or \code{none}
    (only applies to \idx{glslike} commands)}%
  }%
  % prefix
  \gglsopt{prefix}%
  {%
    \providedby{\sty{glossaries-extra} v1.31+}
    \syntax{\meta{link-prefix}}
    \desc{the prefix to use for the entry's hyperlink target}%
  }%
  % textformat
  \gglsopt{text\-format}%
  {%
    \providedby{\sty{glossaries-extra} v1.30+}
    \syntax{\meta{csname}}
    \desc{the name of the control sequence to use instead of \gls{glstextformat}
to encapsulate the \idx{linktext}}%
  }%
  % innertextformat
  \gglsopt{inner\-text\-format}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\meta{csname}}
    \initval{glsxtrdefaultentrytextfmt}%
    \desc{the name of the control sequence to use for the \idx{innerformatting}}%
  }%
  % hyperoutside
  \gglsopt{hyper\-outside}%
  {%
    \providedby{\sty{glossaries-extra} v1.21+}
    \initval{true}
    \defval{true}
    \syntax{\meta{boolean}}
    \desc{determines whether the hyperlink should be inside or outside of \gls{glstextformat}}%
  }%
  % wrgloss
  \gglsopt{wr\-gloss}%
  {%
    \providedby{\sty{glossaries-extra} v1.14+}
    \initval{before}
    \syntax{\meta{position}}
    \desc{determines whether to do the \idx{indexing} before or after the
\idx{linktext}. Allowed values: \optfmt{before} and \optfmt{after}}%
  }%
  % noindex
  \gglsopt{no\-index}%
  {%
    \providedby{\sty{glossaries-extra}}
    \initval{false}
    \defval{true}
    \syntax{\meta{boolean}}
    \desc{if \optfmt{true} this option will suppress \idx{indexing}.
    If you are using \app{bib2gls}, you may want to consider using
    \glsoptval{format}{glsignore} to prevent a \location\ but
    ensure that the entry is selected}%
  }%
  % hyper
  \gglsopt{hyper}%
  {%
    \providedby{\sty{glossaries}}
    \initval{true}
    \defval{true}
    \syntax{\meta{boolean}}
    \desc{determines whether or not the \idx{linktext} should have a
     hyperlink (provided hyperlinks are supported)}%
  }%
  % thevalue
  \gglsopt{the\-value}%
  {%
    \providedby{\sty{glossaries-extra} v1.19+}
    \syntax{\meta{location}}
    \desc{set the \location\ to this value instead of obtaining it from the
     \idx{locationcounter}}%
  }%
  % theHvalue
  \gglsopt{the\-H\-value}%
  {%
    \providedby{\sty{glossaries-extra} v1.19+}
    \syntax{\meta{the-H-value}}
    \desc{set the hyper \location\ to this value instead of obtaining it
from \gls{theHcounter}}%
  }%
  % types
  \gglsopt{types}%
  {
    \providedby{\sty{glossaries}}
     \syntax{\margm{glossary list}}
     \desc{only available with \gls{glsaddall}, the value is the
     list of glossaries to iterate over}
  }
  % prereset
  \gglsopt{pre\-reset}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \initval{none}
    \defval{local}
    \syntax{\meta{value}}
    \desc{determines whether or not to reset the entry before the
    \idx{linktext}. Allowed values: \optfmt{none} (no reset),
    \optfmt{local} (localise the reset) and \optfmt{global}}%
  }%
  % preunset
  \gglsopt{pre\-unset}%
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \initval{none}
    \defval{local}
    \syntax{\meta{value}}
    \desc{determines whether or not to unset the entry before the
    \idx{linktext}. Allowed values: \optfmt{none} (no unset),
    \optfmt{local} (localise the unset) and \optfmt{global}}%
  }%
  % \glolinkprefix
  \gcmd{glo\-link\-pre\-fix}
  {
    \providedby{\sty{glossaries}}
    \initval{glo:}
    \desc{expands to the default prefix for the entry's hypertarget anchor
     in the glossary}
  }
  % \glstextformat
  \gcmd{gls\-text\-format}
  {
    \providedby{\sty{glossaries} v1.04+}
    \syntax{\margm{text}}
    \desc{the default outer text formatting command used by the
     \idx{glslike} and \idx{glstextlike} commands}
  }
  % \glsrefentry
  \gcmd{gls\-ref\-en\-try}
  {%
    \providedby{\sty{glossaries} v3.0+}
    \syntax{\margm{entry-label}}
    \desc{references (using \gls{ref}) the entry counter or sub-counter (if
     \opt{entrycounter} or \opt{subentrycounter} options are set)
     otherwise just does \gls{gls}\margm{entry-label}}
  }
  % \glsxtrpageref
  \gcmd{gls\-xtr\-page\-ref}
  {%
     \providedby{\sty{glossaries-extra} v1.11+}
    \syntax{\margm{entry-label}}
    \desc{as \gls{glsrefentry} but uses \gls{pageref} instead of
    \gls{ref}. As with \gls{glsrefentry}, this will use \gls{gls}
     instead if the corresponding entry counter is disabled}
  }
  % \glsxtrpInit
  \gcmd{gls\-xtr\-p\-Init}
  {
    \providedby{\sty{glossaries-extra} v1.51+}
    \syntax{\margm{cs-name}\margm{entry-label}}
    \desc{hook implemented at the start of \gls{glsxtrp} (and
    case-changing variants) inside the added scoping. By default
    this disables the \idx{postlinkhook} and ignores its arguments}
  }
  % \glsxtrp
  \gcmd{gls\-xtrp}
  {
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{field}\margm{entry-label}}
    \desc{for use in headings and captions (instead of the
     \gls{glslike} or \gls{glstextlike} commands). This command is
      designed to expand to the field value if used in a PDF
      bookmark and can also expand to a more appropriate command if
      it ends up in the page header. Note that there's no optional
      argument. Options should be set beforehand using
      \gls{glsxtrsetpopts}, which is done automatically in the
      glossary with \gls{glossxtrsetpopts}}
  }
  % \Glsxtrp
  \gcmd{Gls\-xtrp}
  {
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{field}\margm{entry-label}}
    \desc{as \gls{glsxtrp} but converts the first letter to
     uppercase (but not in the PDF bookmark)}
  }
  % \GLSxtrp
  \gcmd{GLS\-xtrp}
  {
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{field}\margm{entry-label}}
    \desc{as \gls{glsxtrp} but converts to
     uppercase (but not in the PDF bookmark)}
  }
  % \glsps
  \gcmd{gls\-ps}
  {
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{entry-label}}
    \desc{shortcut for \code{\gls{glsxtrp}\marg{short}\margm{entry-label}}}
  }
  % \glspt
  \gcmd{gls\-pt}
  {%
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{entry-label}}
    \desc{shortcut for \code{\gls{glsxtrp}\marg{text}\margm{entry-label}}}
  }
  % \Glsps
  \gcmd{Gls\-ps}
  {
    \providedby{\sty{glossaries-extra} v1.51+}
    \syntax{\margm{entry-label}}
    \desc{shortcut for \code{\gls{Glsxtrp}\marg{short}\margm{entry-label}}}
  }
  % \Glspt
  \gcmd{Gls\-pt}
  {%
    \providedby{\sty{glossaries-extra} v1.51+}
    \syntax{\margm{entry-label}}
    \desc{shortcut for \code{\gls{Glsxtrp}\marg{text}\margm{entry-label}}}
  }
  % \GLSps
  \gcmd{GLS\-ps}
  {
    \providedby{\sty{glossaries-extra} v1.51+}
    \syntax{\margm{entry-label}}
    \desc{shortcut for \code{\gls{GLSxtrp}\marg{short}\margm{entry-label}}}
  }
  % \GLSpt
  \gcmd{GLS\-pt}
  {%
    \providedby{\sty{glossaries-extra} v1.51+}
    \syntax{\margm{entry-label}}
    \desc{shortcut for \code{\gls{GLSxtrp}\marg{text}\margm{entry-label}}}
  }
  % \glsxtrsetpopts
  \gcmd{gls\-xtr\-set\-p\-opts}
  {%
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{options}}
    \desc{sets the options that \gls{glsxtrp} (and case-change
    variants) pass to the relevant \gls{glstextlike} command}
  }
  % \glossxtrsetpopts
  \gcmd{gloss\-xtr\-set\-p\-opts}
  {
    \providedby{\sty{glossaries-extra} v1.07+}
    \desc{used at the start of each glossary to set the current
    options for the \gls{glsxtrp} set of commands (with
    \gls{glsxtrsetpopts})}
  }
  % \glsxtridentifyglslike
  \gcmd{gls\-xtr\-identify\-gls\-like}
  {
     \providedby{\sty{glossaries-extra} v1.37+}
     \syntax{\margm{label-prefix}\margm{cs}}
     \desc{used to inform \app{bib2gls} to include the given command
      when it searches for dependencies}
  }
  % \glsxtraddlabelprefix
  \gcmd{gls\-xtr\-add\-label\-pre\-fix}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
     \syntax{\margm{label-prefix}}
     \desc{appends \meta{label-prefix} to the list of known labels}
  }
  % \glsxtrprependlabelprefix
  \gcmd{gls\-xtr\-prepend\-label\-pre\-fix}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
     \syntax{\margm{label-prefix}}
     \desc{prepends \meta{label-prefix} to the list of known labels}
  }
  % \glsxtrclearlabelprefixes
  \gcmd{gls\-xtr\-clear\-label\-pre\-fixes}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
     \desc{clears the list of known prefixes}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \glsxtrifinlabelprefixlist
  \gcmd{gls\-xtr\-if\-in\-label\-pre\-fix\-list}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
     \syntax{\margm{label-prefix}\margm{true}\margm{false}}
     \desc{does \meta{true} if \meta{label-prefix} has been
      identified as a label prefix}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \ifGlsXtrPrefixLabelFallbackLast
  \gcond{if\-Gls\-Xtr\-Pre\-fix\-Label\-Fall\-back\-Last}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
     \initvalcs{iftrue}
     \desc{conditional that determines whether or not to use the
      last label prefix as the default}
  }
  % \GlsXtrPrefixLabelFallbackLasttrue
  \gcmd{Gls\-Xtr\-Pre\-fix\-Label\-Fall\-back\-Last\-true}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
     \desc{sets the \gls{ifGlsXtrPrefixLabelFallbackLast} conditional to true}
  }
  % \GlsXtrPrefixLabelFallbackLastfalse
  \gcmd{Gls\-Xtr\-Pre\-fix\-Label\-Fall\-back\-Last\-false}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
     \desc{sets the \gls{ifGlsXtrPrefixLabelFallbackLast} conditional to false}
  }
  % \predglshook
  \gcmd{pre\-dgls\-hook}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.8+}
    \syntax{\margm{entry-label}}
    \desc{hook used by \gls{dgls}-like commands}
  }
  % \predglslinkhook
  \gcmd{pre\-dgls\-link\-hook}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.8+}
    \syntax{\margm{entry-label}}
    \desc{hook used by \gls{dglslink} and \gls{dglsdisp}}
  }
  % \predglsfieldhook
  \gcmd{pre\-dgls\-field\-hook}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.8+}
    \syntax{\margm{entry-label}}
    \desc{hook used by \gls{dglsfield}-like commands}
  }
  % \dgls
  \gcmdspa{dgls}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{does \code{\gls{gls}\oargm{options}\marg{\meta{prefix}\marg{entry-label}}\oargm{insert}}
     for the first prefix in the prefix list that matches a defined entry}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dGls
  \gcmdspa{dGls}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{dgls} but uses \gls{Gls}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dGLS
  \gcmdspa{dGLS}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{dgls} but uses \gls{GLS}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dglspl
  \gcmdspa{dgls\-pl}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{dgls} but uses \gls{glspl}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dGlspl
  \gcmdspa{dGls\-pl}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{dgls} but uses \gls{Glspl}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dGLSpl
  \gcmdspa{dGLS\-pl}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{dgls} but uses \gls{GLSpl}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dglslink
  \gcmdspa{dgls\-link}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{as \gls{dgls} but uses \gls{glslink}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dGlslink
  \gcmdspa{dGls\-link}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{as \gls{dglslink} but applies \idx{sentencecase}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dglsdisp
  \gcmdspa{dgls\-disp}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{as \gls{dgls} but uses \gls{glsdisp}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dGlsdisp
  \gcmdspa{dGls\-disp}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\oargm{options}\margm{entry-label}\margm{text}}
    \desc{as \gls{dglsdisp} but applies \idx{sentencecase}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dglsfield
  \gcmdspa{dgls\-field}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\oargm{options}\margm{entry-label}\margm{field-label}\oargm{insert}}
    \desc{as \gls{dgls} but selects the first matching label that
     has an entry with the field set}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dGlsfield
  \gcmdspa{dGls\-field}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\oargm{options}\margm{entry-label}\margm{field-label}\oargm{insert}}
    \desc{as \gls{dglsfield} but applies \idx{sentencecase}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dGLSfield
  \gcmdspa{dGLS\-field}{%
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\oargm{options}\margm{entry-label}\margm{field-label}\oargm{insert}}
    \desc{as \gls{dglsfield} but \idx{allcaps}}
     \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix}
  }
  % \dglsfieldcurrentfieldlabel
  \gcmd{dgls\-field\-current\-field\-label}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{set by the \gls{dglsfield} family of commands to the given
    \meta{field-label}}
  }
  % \dglsfieldfallbackfieldlabel
  \gcmd{dgls\-field\-fallback\-field\-label}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \initvalopt{gloskey}{text}
    \desc{expands to the fallback field to use for the
     \gls{dglsfield} family of commands}
  }
  % \dglsfieldactualfieldlabel
  \gcmd{dgls\-field\-actual\-field\-label}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{set by the \gls{dglsfield} family of commands to the
    actual field used. This will either be the requested field or
    the fallback field}
  }
  % \newdglsfield
  \gcmd{new\-d\-gls\-field}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
     \syntax{\oargm{default-options}\margm{field}\margm{cs}}
     \desc{defines the command
\meta{cs}\oargm{options}\margm{entry-label} to behave like
      \code{\gls{dglsfield}\oarg{\meta{default-options},\meta{options}}\margm{entry-label}\margm{field}}}
  }
  % \newdglsfieldlike
  \gcmd{new\-d\-gls\-field\-like}
  {
     \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
     \syntax{\oargm{default-options}\margm{field}\margm{cs}\margm{Cs}\margm{CS}}
     \desc{similar to \gls{newdglsfield} but also defines
     \idx{sentencecase} (\meta{Cs}) and \idx{allcaps} (\meta{CS}) commands 
     with mappings}
  }
  % \glsxtrnewgls
  \gcmd{gls\-xtr\-new\-gls}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\oargm{default-options}\margm{prefix}\margm{cs}}
     \desc{defines the command
\meta{cs}\oargm{options}\margm{entry-label} to behave like
      \code{\gls{gls}\oarg{\meta{default-options},\meta{options}}\marg{\meta{prefix}\meta{entry-label}}}}
  }
  % \glsxtrnewglslike
  \gcmd{gls\-xtr\-new\-gls\-like}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\oargm{default-options}\margm{prefix}\margm{\gls{gls}-like
cs}\margm{\gls{glspl}-like cs}\margm{\gls{Gls}-like cs}\margm{\gls{Glspl}-like cs}}
     \desc{like \gls{glsxtrnewgls} but provides plural and
      \idx{sentencecase} commands as well}
  }
  % \glsxtrnewGLSlike
  \gcmd{gls\-xtr\-new\-GLS\-like}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\oargm{default-options}\margm{prefix}\margm{\gls{GLS}-like
cs}\margm{\gls{GLSpl}-like cs}}
     \desc{like \gls{glsxtrnewgls} but provides \idx+{allcaps} commands}
  }
  % \glsxtrnewrgls
  \gcmd{gls\-xtr\-new\-rgls}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\oargm{default-options}\margm{prefix}\margm{cs}}
     \desc{like \gls{glsxtrnewgls} but uses \gls{rgls}}
  }
  % \glsxtrnewrglslike
  \gcmd{gls\-xtr\-new\-rgls\-like}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\oargm{default-options}\margm{prefix}\margm{\gls{rgls}-like
cs}\margm{\gls{rglspl}-like cs}\margm{\gls{rGls}-like
cs}\margm{\gls{rGlspl}-like cs}}
     \desc{like \gls{glsxtrnewrgls} but provides plural and
      \idx{sentencecase} commands as well}
  }
  % \glsxtrnewrGLSlike
  \gcmd{gls\-xtr\-new\-rGLS\-like}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\oargm{default-options}\margm{prefix}\margm{\gls{rGLS}-like
cs}\margm{\gls{rGLSpl}-like cs}}
     \desc{like \gls{glsxtrnewrgls} but provides \idx+{allcaps} commands}
  }
  % \glsxtrnewglslink
  \gcmd{gls\-xtr\-new\-gls\-link}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\oargm{default-options}\margm{prefix}\margm{cs}}
     \desc{defines the command \code{\meta{cs}\oargm{options}\margm{label}\margm{text}} to behave like
     \code{\gls{glslink}\oarg{\meta{default-options},\meta{options}}\marg{\meta{prefix}\meta{label}}\margm{text}}}
  }
  % \glsxtrnewglsdisp
  \gcmd{gls\-xtr\-new\-gls\-disp}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\oargm{default-options}\margm{prefix}\margm{cs}}
     \desc{defines the command \code{\meta{cs}\oargm{options}\margm{label}\margm{text}} to behave like
     \code{\gls{glsdisp}\oarg{\meta{default-options},\meta{options}}\marg{\meta{prefix}\meta{label}}\margm{text}}}
  }
  % \GlsXtrRecordCounter
  \gcmd{Gls\-Xtr\-Record\-Counter}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{counter-name}}
    \desc{activates recording for the given counter}
    \note{preamble only}
  }
  % \glsxtr@counterrecord
  \gcmd{gls\-xtr\-@\-counter\-record}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}\margm{counter}\margm{value}}
    \desc{an \ext{aux} file command used with \gls{GlsXtrRecordCounter} 
     to append \meta{value} to the \glosfield{record.counter} field.
     Also implements \gls{glsxtrAddCounterRecordHook}}
  }
  % \glsxtrAddCounterRecordHook
  \gcmd{gls\-xtr\-Add\-Counter\-Record\-Hook}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{counter}\margm{value}}
    \desc{user-level hook used by \gls{glsxtr@counterrecord}. If
    this command is redefined, it must be done so in the preamble before
    the \ext{aux} file is input}
  }
  % \glsxtrsupphypernumber
  \gcmd{gls\-xtr\-supp\-hyper\-number}
  {
    \providedby{\sty{glossaries-extra} v1.14+}
    \syntax{\margm{location}}
    \desc{used to hyperlink to a location in an external document if
    the \catattr{externallocation} attribute has been set. This will
    define \gls{glsxtrsupplocationurl} to the location provided by the
    attribute or to empty if the attribute isn't set}
  }
  % \glsxtrsupplocationurl
  \gcmd{gls\-xtr\-supp\-lo\-ca\-tion\-url}
  {
    \providedby{\sty{glossaries-extra} v1.14+}
    \desc{defined by \gls{glsxtrsupphypernumber} to the external
    location or empty if not provided}
  }
  % COMMANDS: ENTRY COUNTING
  % \ifglsresetcurrcount
  \gcond{if\-gls\-re\-set\-curr\-count}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \initvalcs{iffalse}
    \desc{conditional that determines whether or not to reset the
    entry counter to 0 when the \idx{firstuseflag} is reset}
  }
  % \glsresetcurrcounttrue
  \gcmd{gls\-re\-set\-curr\-count\-true}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{sets \gls{ifglsresetcurrcount} to true}
  }
  % \glsresetcurrcountfalse
  \gcmd{gls\-re\-set\-curr\-count\-false}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{sets \gls{ifglsresetcurrcount} to false}
  }
  % \glsenableentrycount
  \gcmd{gls\-en\-able\-en\-try\-count}
  {
    \providedby{\sty{glossaries} v4.14+}
    \desc{enables entry counting}
  }
  % \glsenableentryunitcount
  \gcmd{gls\-en\-able\-en\-try\-unit\-count}
  {
    %\providedby{\sty{glossaries-extra} v0.5.4+}
    \desc{enables entry unit counting}
  }
  % \glsentrycurrcount
  \gcmd{gls\-en\-try\-curr\-count}
  {
    \syntax{\margm{entry-label}}
    \providedby{\sty{glossaries} v4.14+}
    \desc{expands to the current entry count running total or 0 if
     not available (needs to be enabled with
    \gls{glsenableentrycount} or \gls{glsenableentryunitcount}). 
     With unit entry counting, this
     expands to the total for the current unit}
  }
  % \glsentryprevcount
  \gcmd{gls\-en\-try\-prev\-count}
  {
    \syntax{\margm{entry-label}}
    \providedby{\sty{glossaries} v4.14+}
    \desc{expands to the final entry count total from the previous
    \LaTeX\ run or if 0 if not available (needs to be enabled with 
    \gls{glsenableentrycount} or \gls{glsenableentryunitcount}). 
    With unit entry counting, this
     expands to the total for the current unit}
  }
  % \glsentryprevtotalcount
  \gcmd{gls\-en\-try\-prev\-total\-count}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\margm{entry-label}}
    \desc{expands to the final entry count total from the previous
    \LaTeX\ run or if 0 if not available (needs to be enabled with 
    \gls{glsenableentryunitcount})}
  }
  % \glsentryprevmaxcount
  \gcmd{gls\-en\-try\-prev\-max\-count}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\margm{entry-label}}
    \desc{expands to the maximum entry unit count total from the previous
    \LaTeX\ run or if 0 if not available (needs to be enabled with 
    \gls{glsenableentryunitcount})}
  }
  % \cgls
  \gcmdspa{cgls}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{gls} but hooks into the entry counting mechanism}
    \field{seealso}{glsenableentrycount,cglsformat}
  }
  % \cglspl
  \gcmdspa{cglspl}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{glspl} but hooks into the entry counting mechanism}
    \field{seealso}{glsenableentrycount,cglsplformat}
  }
  % \cGls
  \gcmdspa{cGls}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{Gls} but hooks into the entry counting mechanism}
    \field{seealso}{glsenableentrycount,cGlsformat}
  }
  % \cGlspl
  \gcmdspa{cGlspl}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{Glspl} but hooks into the entry counting mechanism}
    \field{seealso}{glsenableentrycount,cGlsplformat}
  }
  % \cglsformat
  \gcmd{cgls\-format}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{cgls} if the entry was not used more
    than the given trigger value on the previous run}
  }
  % \cglsplformat
  \gcmd{cgls\-pl\-format}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{cglspl} if the entry was not used more
    than the given trigger value on the previous run}
  }
  % \cGlsformat
  \gcmd{cGls\-format}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{cGls} if the entry was not used more
    than the given trigger value on the previous run}
  }
  % \cGlsplformat
  \gcmd{cGls\-pl\-format}
  {
    \providedby{\sty{glossaries} v4.14+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{cGlspl} if the entry was not used more
    than the given trigger value on the previous run}
  }
  % \cGLS
  \gcmdspa{cGLS}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{GLS} but hooks into the entry counting mechanism}
    \field{seealso}{glsenableentrycount,cGLSformat}
  }
  % \cGLSpl
  \gcmdspa{cGLSpl}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{GLSpl} but hooks into the entry counting mechanism}
    \field{seealso}{glsenableentrycount,cGLSplformat}
  }
  % \cGLSformat
  \gcmd{cGLS\-format}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{cGLS} if the entry was not used more
    than the given trigger value on the previous run}
  }
  % \cGLSplformat
  \gcmd{cGLS\-pl\-format}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{cGLSpl} if the entry was not used more
    than the given trigger value on the previous run}
  }
  % \glsxtrifcounttrigger
  \gcmd{gls\-xtr\-if\-count\-trigger}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry's total use count at the end 
    of the previous run exceeds the trigger value assigned to the
    entry's category, otherwise does \meta{false}}
  }
  % \GlsXtrEnableEntryCounting
  \gcmd{Gls\-Xtr\-Enable\-Entry\-Count\-ing}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{category-list}\margm{trigger-value}}
    \desc{enables entry counting for the given list of categories
    with the given trigger value (which must be an integer)}
  }
  % \GlsXtrEnableEntryUnitCounting
  \gcmd{Gls\-Xtr\-Enable\-Entry\-Unit\-Count\-ing}
  {
    %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{category-list}\margm{trigger-value}\margm{counter}}
    \desc{enables unit entry counting for the given list of categories
    with the given trigger value (which must be an integer) and the
    associated counter}
  }
  % \GlsXtrStartUnsetBuffering
  \gcmds{Gls\-Xtr\-Start\-Unset\-Buffering}
  {
     \providedby{\sty{glossaries-extra} v1.30+}
    \desc{enables unset buffering. The starred version doesn't check
    for duplicates}
    \field{seealso}{GlsXtrStopUnsetBuffering,GlsXtrDiscardUnsetBuffering}
  }
  % \GlsXtrStopUnsetBuffering
  \gcmds{Gls\-Xtr\-Stop\-Unset\-Buffering}
  {
     \providedby{\sty{glossaries-extra} v1.30+}
    \desc{stops buffering. The starred version performs a global unset}
    \field{seealso}{GlsXtrStartUnsetBuffering,GlsXtrDiscardUnsetBuffering,GlsXtrForUnsetBufferedList}
  }
  % \GlsXtrDiscardUnsetBuffering
  \gcmd{Gls\-Xtr\-Discard\-Unset\-Buffering}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \desc{discards the pending buffer and restores \gls{glsunset}}
    \field{seealso}{GlsXtrStartUnsetBuffering,GlsXtrStopUnsetBuffering}
  }
  % \GlsXtrForUnsetBufferedList
  \gcmd{Gls\-Xtr\-For\-Unset\-Buffered\-List}
  {
     \providedby{\sty{glossaries-extra} v1.31+}
    \syntax{\margm{handler-cs}}
    \desc{iterates over the labels stored in the current buffer}
  }
  % \GlsXtrClearUnsetBuffer
  \gcmd{Gls\-Xtr\-Clear\-Unset\-Buffer}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{locally clears the buffer, but doesn't stop buffering}
  }
  % \GlsXtrUnsetBufferEnableRepeatLocal
  \gcmd{Gls\-Xtr\-Unset\-Buffer\-Enable\-Repeat\-Local}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{allows repeat entries within the buffering code to be
     locally unset before the \idx{linktext}}
     \field{seealso}{GlsXtrResetLocalBuffer}
  }
  % \GlsXtrResetLocalBuffer
  \gcmd{Gls\-Xtr\-Reset\-Local\-Buffer}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{if local unset for repeat entries has been enabled with
      \gls{GlsXtrUnsetBufferEnableRepeatLocal}, this will locally
      reset all entries that are in the buffer that hadn't been
     marked as used before the function was enabled}
     \field{seealso}{GlsXtrUnsetBufferEnableRepeatLocal}
  }
  % \GlsXtrUnsetBufferDisableRepeatLocal
  \gcmd{Gls\-Xtr\-Un\-set\-Buffer\-Disable\-Repeat\-Local}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{disables GlsXtrUnsetBufferEnableRepeatLocal}
  }
  % \glsxtrpostlocalunset
  \gcmd{gls\-xtr\-post\-local\-unset}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{entry-label}}
    \desc{hook performed by \gls{glslocalunset}. This hook is
    modified by \gls{glsenableentrycount} and \gls{glsenableentryunitcount}}
  }
  % \glsxtrpostunset
  \gcmd{gls\-xtr\-post\-unset}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{entry-label}}
    \desc{hook performed by \gls{glsunset}. This hook is
    modified by \gls{glsenableentrycount} and \gls{glsenableentryunitcount}}
  }
  % \glsxtrpostlocalreset
  \gcmd{gls\-xtr\-post\-local\-reset}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{entry-label}}
    \desc{hook performed by \gls{glslocalreset}. This hook is
    modified by \gls{glsenableentrycount} and \gls{glsenableentryunitcount}}
  }
  % \glsxtrpostreset
  \gcmd{gls\-xtr\-post\-reset}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{entry-label}}
    \desc{hook performed by \gls{glsreset}. This hook is
    modified by \gls{glsenableentrycount} and \gls{glsenableentryunitcount}}
  }
  % \GlsXtrEnableLinkCounting
  \gcmd{Gls\-Xtr\-Enable\-Link\-Count\-ing}
  {
    \providedby{\sty{glossaries-extra} v1.26+}
    \syntax{\oargm{parent counter}\margm{categories}}
    \desc{enables link counting for the given categories}
    \note{preamble only}
  }
  % \glsxtrinclinkcounter
  \gcmd{gls\-xtr\-inc\-link\-counter}
  {
    \providedby{\sty{glossaries-extra} v1.26+}
    \syntax{\margm{counter}}
    \desc{increments the link counter with \gls{stepcounter}}
  }
  % \GlsXtrLinkCounterValue
  \gcmd{Gls\-Xtr\-Link\-Counter\-Value}
  {
    \providedby{\sty{glossaries-extra} v1.26+}
    \syntax{\margm{entry-label}}
    \desc{expands to the internal link count register associated
    with the given register or 0 if it hasn't been defined}
  }
  % \GlsXtrTheLinkCounter
  \gcmd{Gls\-Xtr\-The\-Link\-Counter}
  {
    \providedby{\sty{glossaries-extra} v1.26+}
    \syntax{\margm{entry-label}}
    \desc{expands to the value of the link counter associated
    with the given entry or 0 if it hasn't been defined}
  }
  % \GlsXtrIfLinkCounterDef
  \gcmd{Gls\-Xtr\-If\-Link\-Counter\-Def}
  {
    \providedby{\sty{glossaries-extra} v1.26+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{expands to \meta{true} if the link counter associated
    with the given entry has been defined, otherwise expands to \meta{false}}
  }
  % \GlsXtrLinkCounterName
  \gcmd{Gls\-Xtr\-Link\-Counter\-Name}
  {
    \providedby{\sty{glossaries-extra} v1.26+}
    \syntax{\margm{entry-label}}
    \desc{expands to the name of the link counter associated with the given entry
    (no check for existence)}
  }
  % COMMANDS: MULTI-ENTRY
  % \multiglossaryentry
  \gcmd{multi\-glossary\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\oargm{options}\margm{multi-label}\oargm{main-label}\margm{entry-label-list}}
    \desc{defines a multi-entry set with the label
    \meta{multi-label}, consisting of the entries whose labels are
    listed in \meta{entry-label-list}, where the main entry (which must be
    present in \meta{entry-label-list}) is identified by \meta{main-label}
    (or the final element in \meta{entry-label-list}, if \meta{main-label} is
    omitted)}
  }
  % \providemultiglossaryentry
  \gcmd{provide\-multi\-glossary\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\oargm{options}\margm{multi-label}\oargm{main-label}\margm{entry-label-list}}
    \desc{as \gls{multiglossaryentry} but does nothing if a
    multi-entry set has already been defined with the given label}
  }
  % \ifmultiglossaryentryglobal
  \gcond{if\-multi\-glossary\-en\-try\-global}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \initvalcs{iffalse}
    \desc{if true, subsequent multi-entry definitions will be global}
  }
  % \multiglossaryentryglobaltrue
  \gcmd{multi\-glossary\-en\-try\-global\-true}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{sets \gls{ifmultiglossaryentryglobal} to true}
  }
  % \multiglossaryentryglobalfalse
  \gcmd{multi\-glossary\-en\-try\-global\-false}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{sets \gls{ifmultiglossaryentryglobal} to false}
  }
  % \mglsSetOptions
  \gcmd{mgls\-Set\-Options}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{multi-label}\margm{new-options}}
    \desc{locally sets the options associated with the given
     multi-entry}
  }
  % \mglsAddOptions
  \gcmd{mgls\-Add\-Options}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{multi-label}\margm{new-options}}
    \desc{locally appends to the options associated with the given
     multi-entry}
  }
  % \GlsXtrMglsOrGls
  \gcmd{Gls\-Xtr\-Mgls\-Or\-Gls}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{mgls cs}\margm{gls cs}\meta{modifier}\oargm{options}\allowbreak\margm{label}\oargm{insert}}
    \desc{if \meta{label} matches a defined multi-entry, this will
    do \meta{mgls cls} otherwise it will do \meta{gls cs}. The
    \meta{modifier} (\code{*} or \code{+} or the token identified
    with \gls{GlsXtrSetAltModifier}) may be omitted}
  }
  % \multiglossaryentrysetup
  \gcmd{multi\-glos\-sary\-en\-try\-set\-up}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{options}}
    \desc{specifies a general set of options to apply to all multi-entries}
  }
  % \mglsdefcategoryprefix
  \gcmd{mgls\-def\-cat\-e\-gory\-pre\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{category-label}\margm{definition}}
    \desc{defines the prefix for the given multi-entry category}
  }
  % \mglshascategoryprefix
  \gcmd{mgls\-has\-cat\-e\-gory\-pre\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{category-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the given multi-entry category has a
     prefix set otherwise does \meta{false}}
  }
  % \mglsusecategoryprefix
  \gcmd{mgls\-use\-cat\-e\-gory\-pre\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{category-label}}
    \desc{expands to the prefix assigned to the given multi-entry
    category or does nothing if no prefix assigned}
  }
  % \mglsdefcategorysuffix
  \gcmd{mgls\-def\-cat\-e\-gory\-suf\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{category-label}\margm{definition}}
    \desc{defines the suffix for the given multi-entry category}
  }
  % \mglsprefix
  \gcmd{mgls\-pre\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{code used to typeset the multi-entry prefix}
  }
  % \mglshascategorysuffix
  \gcmd{mgls\-has\-cat\-e\-gory\-suf\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{category-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the given multi-entry category has a
     suffix set otherwise does \meta{false}}
  }
  % \mglsusecategorysuffix
  \gcmd{mgls\-use\-cat\-e\-gory\-suf\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{category-label}}
    \desc{expands to the suffix assigned to the given multi-entry
    category or does nothing if no suffix assigned}
  }
  % \mglssuffix
  \gcmd{mgls\-suf\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{code used to typeset the multi-entry suffix}
  }
  % \glscombinedsep
  \gcmd{gls\-combined\-sep}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{prev label}\margm{next label}}
    \desc{separator used between elements of a multi-entry set where
     both elements have been marked as used}
  }
  % \glscombinedfirstsep
  \gcmd{gls\-combined\-first\-sep}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{prev label}\margm{next label}}
    \desc{separator used between elements of a multi-entry set where
     only the next element have been marked as used}
  }
  % \glscombinedsepfirst
  \gcmd{gls\-combined\-sep\-first}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{prev label}\margm{next label}}
    \desc{separator used between elements of a multi-entry set where
     only the previous element have been marked as used}
  }
  % \glscombinedfirstsepfirst
  \gcmd{gls\-combined\-first\-sep\-first}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{prev label}\margm{next label}}
    \desc{separator used between elements of a multi-entry set where
     neither the previous nor the next element has been marked as used}
  }
  % \glssetcombinedsepabbrvnbsp
  \gcmd{gls\-set\-combined\-sep\-abbrv\-nbsp}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{defines the multi-entry separators to use a
    \idx{nbsp} for abbreviations}
  }
  % \glssetcombinedsepabbrvnone
  \gcmd{gls\-set\-combined\-sep\-abbrv\-none}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{defines the multi-entry separators to use no
    separator for abbreviations}
  }
  % \glssetcombinedsepnarrow
  \gcmd{gls\-set\-combined\-sep\-narrow}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{width}\margm{narrow-sep}}
    \desc{defines the multi-entry separators to use
     \meta{narrow-sep} if the width of associated field values is less
     than \meta{width}}
  }
  % \mglselementprehook
  \gcmd{mgls\-element\-pre\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{hook performed before each (non-skipped) element in a
    multi-entry set}
  }
  % \mglselementposthook
  \gcmd{mgls\-element\-post\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{hook performed after each (non-skipped) element in a
    multi-entry set}
  }
  % \mglscurrentmultilabel
  \gcmd{mgls\-current\-multi\-label}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the multi-entry label}
  }
  % \mglscurrentmainlabel
  \gcmd{mgls\-current\-main\-label}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the label of the main element}
  }
  % \mglscurrentlist
  \gcmd{mgls\-current\-list}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the complete comma-separated list of elements}
  }
  % \mglscurrentoptions
  \gcmd{mgls\-current\-options}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the options used when the multi-entry was defined}
  }
  % \mglscurrentcategory
  \gcmd{mgls\-current\-category}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the multi-entry category current in effect}
  }
  % \glsxtrcurrentmglscsname
  \gcmd{gls\-xtr\-current\-mgls\-cs\-name}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the control sequence name of the calling command}
  }
  % \mglscurrentlabel
  \gcmd{mgls\-current\-label}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the current element label}
  }
  % \mglselementindex
  \gcmd{mgls\-element\-index}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{a count register used in multi-entry hooks, this
     is set to the element index}
  }
  % \mglscurrentprefix
  \gcmd{mgls\-current\-pre\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the current prefix}
  }
  % \mglscurrentsuffix
  \gcmd{mgls\-current\-suf\-fix}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{placeholder command for use in multi-entry hooks, this
     expands to the current suffix}
  }
  % \mglsisfirstuse
  \gcmd{mgls\-is\-first\-use}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry hooks, this expands to \meta{true}
    if this is the first use otherwise expands to \meta{false}}
  }
  % \mglsiflast
  \gcmd{mgls\-if\-last}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry hooks, this expands to \meta{true}
    if this is the last iteration otherwise expands to \meta{false}}
  }
  % \mglslastmultilabel
  \gcmd{mgls\-last\-multi\-label}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    multi-entry label}
  }
  % \mglslastcategory
  \gcmd{mgls\-last\-cat\-e\-gory}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    multi-entry category or nothing, if no category assigned}
  }
  % \mglswasfirstuse
  \gcmd{mgls\-was\-first\-use}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{true} if this was the first use of the multi-entry,
     otherwise to \meta{false}}
  }
  % \mglslastelementlabel
  \gcmd{mgls\-last\-element\-label}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    label of the last non-skipped element}
  }
  % \mglsiflastelementskipped
  \gcmd{mgls\-if\-last\-element\-skipped}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{true} if the last element was skipped,
     otherwise to \meta{false}}
  }
  % \mglsiflastelementwasfirstuse
  \gcmd{mgls\-if\-last\-element\-was\-first\-use}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{true} if the last element was used for the first time,
     otherwise to \meta{false}}
  }
  % \mglsiflastelementwasplural
  \gcmd{mgls\-if\-last\-element\-was\-plural}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{true} if the last element had the plural form displayed,
     otherwise to \meta{false}}
  }
  % \mglsiflastelementcapscase
  \gcmd{mgls\-if\-last\-element\-caps\-case}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{no-change}\margm{firstuc}\margm{all caps}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{no-change} if the last element had no case-change applied,
     to \meta{firstuc} if the last element had \idx+{sentencecase}
    applied or to \meta{all caps} if the last element had \idx+{allcaps}
    applied}
  }
  % \mglslastmainlabel
  \gcmd{mgls\-last\-main\-label}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    label of the main element that was just referenced}
  }
  % \mglsiflastmainskipped
  \gcmd{mgls\-if\-last\-main\-skipped}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{true} if the main element from the multi-entry just
     referenced was skipped, otherwise to \meta{false}}
  }
  % \mglsiflastmainwasfirstuse
  \gcmd{mgls\-if\-last\-main\-was\-first\-use}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{true} if the main element from the multi-entry just
     referenced was used for the first time, otherwise to \meta{false}}
  }
  % \mglsiflastmainwasplural
  \gcmd{mgls\-if\-last\-main\-was\-plural}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{true}\margm{false}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{true} if the main element from the multi-entry just
     referenced had the plural form shown, otherwise to \meta{false}}
  }
  % \mglsiflastmaincapscase
  \gcmd{mgls\-if\-last\-main\-caps\-case}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{no-change}\margm{firstuc}\margm{all caps}}
    \desc{for use in multi-entry suffix and post-link hooks, this expands to the
    \meta{no-change} if the main element from the multi-entry just
     referenced had no case-change applied,
     to \meta{firstuc} if the last element had \idx+{sentencecase}
    applied or to \meta{all caps} if the last element had \idx+{allcaps}
    applied}
  }
  % \mglscustompostlinkhook
  \gcmd{mgls\-custom\-post\-link\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{hook used with the \mglsoptval{mpostlinkelement}{custom} option}
  }
  % \mglslastelementpostlinkhook
  \gcmd{mgls\-last\-element\-post\-link\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{hook used with the \mglsoptval{mpostlinkelement}{last} option}
  }
  % \mglslastmainpostlinkhook
  \gcmd{mgls\-last\-main\-post\-link\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{hook used with the \mglsoptval{mpostlinkelement}{main} option}
  }
  % \ifmglsused
  \gcmd{if\-mgls\-used}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{multi-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the given multi-entry has been marked
    as used, otherwise does \meta{false}}
  }
  % \mglsunset
  \gcmd{mgls\-unset}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{multi-label}}
    \desc{globally unsets the first use flag for the given multi-entry}
  }
  % \mglsreset
  \gcmd{mgls\-reset}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{multi-label}}
    \desc{globally resets the first use flag for the given multi-entry}
  }
  % \mglslocalunset
  \gcmd{mgls\-local\-unset}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{multi-label}}
    \desc{locally unsets the first use flag for the given multi-entry}
  }
  % \mglslocalreset
  \gcmd{mgls\-local\-reset}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{multi-label}}
    \desc{locally resets the first use flag for the given multi-entry}
  }
  % \mglsunsetall
  \gcmd{mgls\-unset\-all}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{unsets the first use flag for all multi-entries}
  }
  % \mglsresetall
  \gcmd{mgls\-reset\-all}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \desc{resets the first use flag for all multi-entries}
  }
  % \mglsSetMain
  \gcmd{mgls\-Set\-Main}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{multi-label}\margm{new-main-label}}
    \desc{locally changes the main element for the given multi-entry}
  }
  % \mgls
  \gcmdspa{mgls}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{references a multi-entry identified by the given
     \meta{multi-label}}
  }
  % \mglspl
  \gcmdspa{mgls\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses the plural form for each element}
  }
  % \mglsmainpl
  \gcmdspa{mgls\-main\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses the plural form for the main element}
  }
  % \Mgls
  \gcmdspa{Mgls}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{Gls} for the first element}
  }
  % \MGls
  \gcmdspa{MGls}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{Gls} for all elements}
  }
  % \Mglspl
  \gcmdspa{Mglspl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{Glspl} for the first element
     and \gls{glspl} for the remaining elements}
  }
  % \Mglsmainpl
  \gcmdspa{Mglsmainpl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} uses \idx{sentencecase} for the first
     element and the plural form for the main element}
  }
  % \MGlspl
  \gcmdspa{MGls\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{Glspl} for each element}
  }
  % \MGlsmainpl
  \gcmdspa{MGls\-main\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{Glspl} for the main entry and
     \gls{Gls} for the others}
  }
  % \MGLS
  \gcmdspa{MGLS}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{GLS} for each element}
  }
  % \MGLSpl
  \gcmdspa{MGLS\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{GLSpl} for each element}
  }
  % \MGLSmainpl
  \gcmdspa{MGLS\-main\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{GLSpl} for the main element
     and \gls{GLS} for the others}
  }
  % \mglsshort
  \gcmdspa{mgls\-short}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{glsxtrshort} for any elements
    that have the \gloskey{short} field set and \gls{glstext} otherwise}
  }
  % \mglslong
  \gcmdspa{mgls\-long}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{glsxtrlong} for any elements
    that have the \gloskey{long} field set and \gls{glstext} otherwise}
  }
  % \mglsfull
  \gcmdspa{mgls\-full}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{glsxtrfull} for any elements
    that have the \gloskey{short} field set and \gls{glsfirst} otherwise}
  }
  % \Mglsshort
  \gcmdspa{Mgls\-short}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mglsshort} but \idx{sentencecase}}
  }
  % \Mglslong
  \gcmdspa{Mgls\-long}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mglslong} but \idx{sentencecase}}
  }
  % \Mglsfull
  \gcmdspa{Mgls\-full}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mglsfull} but \idx{sentencecase}}
  }
  % \mglsname
  \gcmdspa{mgls\-name}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{glsname}}
  }
  % \MGlsname
  \gcmdspa{MGls\-name}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{Glsname}}
  }
  % \Mglsname
  \gcmdspa{Mgls\-name}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{Glsname} for the first entry
     and \gls{glsname} for the remaining entries}
  }
  % \mglssymbol
  \gcmdspa{mgls\-symbol}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{glssymbol} if the
      \gloskey{symbol} field is set and \gls{gls} otherwise}
  }
  % \MGlssymbol
  \gcmdspa{MGls\-symbol}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{glssymbol} if the
      \gloskey{symbol} field is set and \gls{Gls} otherwise}
  }
  % \Mglssymbol
  \gcmdspa{Mgls\-symbol}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{glssymbol} if the
      \gloskey{symbol} field is set, otherwise it uses \gls{Gls} for
      the first element and \gls{gls} for the remaining elements}
  }
  % \mglsusefield
  \gcmdspa{mgls\-use\-field}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{glsdisp} if the field
     identified by \gls{mglsfield} exists with the
     \idx{linktext} obtained from the field value}
  }
  % \Mglsusefield
  \gcmdspa{Mgls\-use\-field}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
    \desc{as \gls{mglsusefield} but \idx{sentencecase} for the first
element}
  }
  % \MGlsusefield
  \gcmdspa{MGls\-use\-field}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
    \desc{as \gls{mglsusefield} but \idx{sentencecase} for each element}
  }
  % \mglsfield
  \gcmd{mgls\-field}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \initval{useri}
    \desc{expands to the \idx{internalfieldlabel} required by
    \gls{mglsusefield}}
  }
  % \mpgls
  \gcmdspa{mpgls}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{pgls} for the first element}
  }
  % \mpglspl
  \gcmdspa{mpgls\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{pglspl} for the first element
     and \gls{glspl} for the remaining elements}
  }
  % \mpglsmainpl
  \gcmdspa{mpgls\-main\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mgls} but uses \gls{pglspl} for the first element
     if its the main element otherwise \gls{pgls} and, for the remaining
     elements, uses \gls{glspl} if the element is the main entry or
     \gls{gls} otherwise}
  }
  % \Mpgls
  \gcmdspa{Mpgls}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mpgls} but \idx{sentencecase} for the first element}
  }
  % \Mpglsmain
  \gcmdspa{Mpglsmainpl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mpglspl} but \idx{sentencecase} for the first element}
  }
  % \MPGls
  \gcmdspa{MPGls}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mpgls} but \idx{sentencecase} for all elements}
  }
  % \MPGlspl
  \gcmdspa{MPGls\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mpglspl} but \idx{sentencecase} for all elements}
  }
  % \MPGlsmainpl
  \gcmdspa{MPGls\-main\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mpglsmainpl} but \idx{sentencecase} for all elements}
  }
  % \MPGLS
  \gcmdspa{MPGLS}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mpgls} but \idx{allcaps} for the all elements}
  }
  % \MPGLSpl
  \gcmdspa{MPGLSpl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mpglspl} but \idx{allcaps} for the all elements}
  }
  % \MPGLSmainpl
  \gcmdspa{MPGLS\-main\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\oargm{options}\margm{multi-label}\oargm{insert}}
     \desc{as \gls{mpglsmainpl} but \idx{allcaps} for the all elements}
  }
  % \mglsseefirstitem
  \gcmd{mgls\-see\-first\-item}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{formatting command used by cross-reference lists for the
      first item if the item is a multi-entry}
  }
  % \mglsseeitem
  \gcmd{mgls\-see\-item}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{formatting command used by cross-reference lists for
      subsequent items if the item is a multi-entry}
  }
  % \glsxtrifmulti
  \gcmd{gls\-xtr\-if\-multi}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}\margm{true}\margm{false}}
     \desc{does \meta{true} if a multi-entry has been defined with
     the label \meta{multi-label} otherwise does \meta{false}}
  }
  % \glsxtrmultimain
  \gcmd{gls\-xtr\-multi\-main}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{expands to the main label for the multi-entry identified
by \meta{multi-label} or nothing if not defined}
  }
  % \glsxtrmultilist
  \gcmd{gls\-xtr\-multi\-list}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{expands to the list of element labels for the multi-entry identified
by \meta{multi-label} or nothing if not defined}
  }
  % \mglsforelements
  \gcmd{mgls\-for\-elements}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}\margm{cs}\margm{body}}
     \desc{iterates over the list of element labels for the multi-entry identified
by \meta{multi-label}}
  }
  % \mglsforotherelements
  \gcmd{mgls\-for\-other\-elements}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}\margm{cs}\margm{body}}
     \desc{as \gls{mglsforelements} but skips the main entry label}
  }
  % \glsxtrmultitotalelements
  \gcmd{gls\-xtr\-multi\-total\-elements}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{expands to the total number of elements in the given
      multi-entry or nothing if \meta{multi-label} hasn't been defined}
  }
  % \glsxtrmultimainindex
  \gcmd{gls\-xtr\-multi\-main\-index}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{expands to the index of the main element in the given
      multi-entry or nothing if \meta{multi-label} hasn't been defined}
  }
  % \glsxtrmultilastotherindex
  \gcmd{gls\-xtr\-multi\-last\-other\-index}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{expands to the index of the final non-main element in the given
      multi-entry or nothing if \meta{multi-label} hasn't been defined}
  }
  % \writemultiglossentry
  \gcmd{write\-multi\-gloss\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{options}\margm{multi-label}\margm{main-label}\margm{list}}
     \desc{writes multi-entry information to the \ext{aux} file}
  }
  % \@glsxtr@multientry
  \gcmd{@gls\-xtr\-@multi\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{options}\margm{multi-label}\margm{main-label}\margm{list}}
     \desc{information in the \ext{aux} about a multi-label defined
     in the previous \LaTeX\ run}
  }
  % \glsxtrmultientryadjustedname
  \gcmd{gls\-xtr\-multi\-en\-try\-adjust\-ed\-name}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{sublist1}\margm{name}\margm{sublist2}\margm{multi-label}}
     \desc{used by \resourceopt{compound-adjust-name}}
  }
  % \Glsxtrmultientryadjustedname
  \gcmd{Gls\-xtr\-multi\-en\-try\-adjust\-ed\-name}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{sublist1}\margm{name}\margm{sublist2}\margm{multi-label}}
     \desc{as \gls{glsxtrmultientryadjustedname} but \idx{sentencecase}}
  }
  % \GlsXtrmultientryadjustedname
  \gcmd{Gls\-Xtr\-multi\-en\-try\-adjust\-ed\-name}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{sublist1}\margm{name}\margm{sublist2}\margm{multi-label}}
     \desc{as \gls{glsxtrmultientryadjustedname} but \idx{titlecase}}
  }
  % \GLSxtrmultientryadjustedname
  \gcmd{GLS\-xtr\-multi\-en\-try\-adjust\-ed\-name}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{sublist1}\margm{name}\margm{sublist2}\margm{multi-label}}
     \desc{as \gls{glsxtrmultientryadjustedname} but \idx{allcaps}}
  }
  % \glsxtrmultientryadjustednamesep
  \gcmd{gls\-xtr\-multi\-en\-try\-adjusted\-name\-sep}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{pre-label}\margm{post-label}}
     \desc{separator used by \gls{glsxtrmultientryadjustedname}}
  }
  % \glsxtrmultientryadjustednamepresep
  \gcmd{gls\-xtr\-multi\-en\-try\-adjusted\-name\-pre\-sep}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{pre-label}\margm{post-label}}
     \desc{separator used by \gls{glsxtrmultientryadjustedname}
     between the last element of the first sublist and the main element}
  }
  % \glsxtrmultientryadjustednamepostsep
  \gcmd{gls\-xtr\-multi\-en\-try\-adjusted\-name\-post\-sep}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{pre-label}\margm{post-label}}
     \desc{separator used by \gls{glsxtrmultientryadjustedname}
     between the main element and the first element of the second
    sublist}
  }
  % \glsxtrmultientryadjustednamefmt
  \gcmd{gls\-xtr\-multi\-en\-try\-adjusted\-name\-fmt}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{text}}
     \desc{used by \gls{glsxtrmultientryadjustedname}
     to encapsulate the main entry name}
  }
  % \Glsxtrmultientryadjustednamefmt
  \gcmd{Gls\-xtr\-multi\-en\-try\-adjusted\-name\-fmt}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{text}}
     \desc{used by \gls{Glsxtrmultientryadjustedname}
     to encapsulate the main entry name if the first sublist is empty}
  }
  % \GlsXtrmultientryadjustednamefmt
  \gcmd{Gls\-Xtr\-multi\-en\-try\-adjusted\-name\-fmt}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{text}}
     \desc{used by \gls{GlsXtrmultientryadjustedname}
     to encapsulate the main entry name}
  }
  % \GLSxtrmultientryadjustednamefmt
  \gcmd{GLS\-xtr\-multi\-en\-try\-adjusted\-name\-fmt}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{text}}
     \desc{used by \gls{GLSxtrmultientryadjustedname}
     to encapsulate the main entry name}
  }
  % \glsxtrmultientryadjustednameother
  \gcmd{gls\-xtr\-multi\-en\-try\-adjusted\-name\-other}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{text}}
     \desc{used by \gls{glsxtrmultientryadjustedname}
     to encapsulate the other (not main) entries}
  }
  % \Glsxtrmultientryadjustednameother
  \gcmd{Gls\-xtr\-multi\-en\-try\-adjusted\-name\-other}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{text}}
     \desc{used by \gls{Glsxtrmultientryadjustedname}
     to encapsulate the other (not main) entries}
  }
  % \GlsXtrmultientryadjustednameother
  \gcmd{Gls\-Xtr\-multi\-en\-try\-adjusted\-name\-other}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{text}}
     \desc{used by \gls{GlsXtrmultientryadjustedname}
     to encapsulate the other (not main) entries}
  }
  % \GLSxtrmultientryadjustednameother
  \gcmd{GLS\-xtr\-multi\-en\-try\-adjusted\-name\-other}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.48+}
     \syntax{\margm{text}}
     \desc{used by \gls{GLSxtrmultientryadjustedname}
     to encapsulate the other (not main) entries}
  }
  % \mglselementreset
  \gcmd{mgls\-element\-reset}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{entry-label}}
     \desc{used by options such as \mglsopt{resetall} to reset an
     element's \idx{firstuseflag} (taking the \mglsopt{presetlocal}
     option into account)}
  }
  % \mglselementunset
  \gcmd{mgls\-element\-unset}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{entry-label}}
     \desc{used by options such as \mglsopt{unsetall} to unset an
     element's \idx{firstuseflag} (taking the \mglsopt{presetlocal}
     option into account)}
  }
  % \mglsunsetothers
  \gcmd{mgls\-unset\-others}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{globally unsets the \idx{firstuseflag} for the other (not main) elements
     of the given multi-entry}
  }
  % \mglslocalunsetothers
  \gcmd{mgls\-local\-unset\-others}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{multi-label}}
     \desc{locally unsets the \idx{firstuseflag} for the other (not main) elements
     of the given multi-entry}
  }
  % MULTI-ENTRY OPTIONS:
  \gidx{mglsopt}{\name{multi-entry set options}}
  % option: indexmain
  \gmglsopt{index\-main}
  {
    \syntax{\meta{value}}
    \initval{true}
    \defval{true}
    \desc{indicates if the main element should
    be \indexed, should only be \indexed\ on \idx{firstuse} or should not indexed}
  }
  % option: indexothers
  \gmglsopt{index\-others}
  {
    \syntax{\meta{value}}
    \initval{true}
    \defval{true}
    \desc{indicates if the \qt{other} elements should
    be \indexed, should only be \indexed\ on \idx{firstuse} or should not indexed}
  }
  % option: encapmain
  \gmglsopt{encap\-main}
  {
    \syntax{\meta{value}}
    \initval{glsnumberformat}
    \desc{the value to pass to the \glsopt{format} option for the
     main entry}
  }
  % option: encapothers
  \gmglsopt{encap\-others}
  {
    \syntax{\meta{value}}
    \initval{glsnumberformat}
    \desc{the value to pass to the \glsopt{format} option for the
     \qt{other} elements}
  }
  % option: postlinks
  \gmglsopt{post\-links}
  {
    \syntax{\meta{value}}
    \initval{none}
    \desc{indicates which \idxpl{postlinkhook} should be enabled}
  }
  % option: mpostlink
  \gmglsopt{mpost\-link}
  {
    \syntax{\meta{value}}
    \initval{true}
    \defval{true}
    \desc{indicates whether or not the multi-entry post-link hook
    should be enabled and, if so, whether it should only be enabled
    on \idxc{mfirstuse}{first} or \idxc{msubsequentuse}{subsequent} use}
  }
  % option: mpostlinkelement
  \gmglsopt{mpost\-link\-el\-e\-ment}
  {
    \syntax{\meta{value}}
    \initval{last}
    \desc{indicates which \idx{postlinkhook} to use if the
     multi-entry post-link hook has been enabled}
  }
  % option: firstprefix
  \gmglsopt{first\-pre\-fix}
  {
    \syntax{\meta{value}}
    \desc{the prefix to use on \idx{firstuse} of the multi-entry}
  }
  % option: usedprefix
  \gmglsopt{used\-pre\-fix}
  {
    \syntax{\meta{value}}
    \desc{the prefix to use on \idx{subsequentuse} of the multi-entry}
  }
  % option: firstsuffix
  \gmglsopt{first\-suf\-fix}
  {
    \syntax{\meta{value}}
    \desc{the suffix to use on \idx{mfirstuse} of the multi-entry}
  }
  % option: usedsuffix
  \gmglsopt{used\-suf\-fix}
  {
    \syntax{\meta{value}}
    \desc{the suffix to use on \idx{msubsequentuse} of the multi-entry}
  }
  % option: firstskipmain
  \gmglsopt{first\-skip\-main}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{determines whether or not to skip the main entry on \idx{mfirstuse}}
  }
  % option: firstskipothers
  \gmglsopt{first\-skip\-others}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{determines whether or not to skip the \qt{other} elements on \idx{mfirstuse}}
  }
  % option: usedskipmain
  \gmglsopt{used\-skip\-main}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{determines whether or not to skip the main entry on
     \idx{msubsequentuse}}
  }
  % option: usedskipothers
  \gmglsopt{used\-skip\-others}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{determines whether or not to skip the \qt{other} elements
      on \idx{msubsequentuse}}
  }
  % option: hyper (\multiglossaryentry)
  \gmglsopt{multi.hyper}
  {
    \name{\csoptfmt{hyper}}
    \syntax{\meta{value}}
    \initval{individual}
    \desc{indicates which elements should have hyperlinks, if
    supported. This option is a multi-entry setting, see
    \sectionref{sec:multiglsoptions}}
  }
  % option: hyper (\mgls)
  \gmglsopt{hyper}
  {
    \syntax{\meta{boolean}}
    \defval{true}
    \desc{indicates whether or not to use hyperlinks, if supported,
    for all elements. This option is for use in the optional
    argument of \gls{mgls} and can be set implicitly with the
    default behaviour of the \cmdmod{star} and \cmdmod{plus} modifiers}
  }
  % option: textformat
  \gmglsopt{text\-format}
  {
    \syntax{\meta{value}}
    \initval{@firstofone}
    \desc{the control sequence name of the command that should
    encapsulate the entire content}
  }
  % option: category
  \gmglsopt{category}
  {
    \syntax{\meta{category-label}}
    \desc{the category to assign to the multi-entry set}
  }
  % option: mglsopts
  \gmglsopt{mgls\-opts}
  {
    \syntax{\meta{option list}}
    \desc{the default options to pass to commands like \gls{mgls}}
  }
  % option: setup
  \gmglsopt{set\-up}
  {
    \syntax{\meta{option list}}
    \desc{multi-entry options that will override any conflicting
    options already assigned to the multi-entry}
  }
  % option: all
  \gmglsopt{all}
  {
    \syntax{\meta{option list}}
    \desc{options to pass to the \idx{glslike} command for each element}
  }
  % option: main
  \gmglsopt{main}
  {
    \syntax{\meta{option list}}
    \desc{options to pass to the \idx{glslike} command for the main entry}
  }
  % option: others
  \gmglsopt{others}
  {
    \syntax{\meta{option list}}
    \desc{options to pass to the \idx{glslike} command for the \qt{other}
    elements}
  }
  % option: multiunset
  \gmglsopt{multi\-un\-set}
  {
    \syntax{\meta{value}}
    \initval{global}
    \desc{indicates whether or not the \idx{mfirstuseflag} should be unset}
  }
  % option: presetlocal
  \gmglsopt{pre\-set\-local}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{indicates whether or not the prereset options should have
     a local or global effect}
  }
  % option: resetall
  \gmglsopt{reset\-all}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{indicates whether or not to reset all elements'
    \idx{firstuseflag} before using \gls{gls}}
  }
  % option: resetmain
  \gmglsopt{reset\-main}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{indicates whether or not to reset the main entry's
    \idx{firstuseflag} before using \gls{gls}}
  }
  % option: resetothers
  \gmglsopt{reset\-others}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{indicates whether or not to reset all \qt{other} elements'
    \idx{firstuseflag} before using \gls{gls}}
  }
  % option: unsetall
  \gmglsopt{unset\-all}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{indicates whether or not to unset all elements'
    \idx{firstuseflag} before using \gls{gls}}
  }
  % option: unsetmain
  \gmglsopt{unset\-main}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{indicates whether or not to unset the main entry's
    \idx{firstuseflag} before using \gls{gls}}
  }
  % option: unsetothers
  \gmglsopt{unset\-others}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{indicates whether or not to unset all \qt{other} elements'
    \idx{firstuseflag} before using \gls{gls}}
  }
  % COMMANDS: PREFIXES
  % \pgls
  \gcmdspa{pgls}{%
    \providedby{\sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{similar to \gls{gls} but inserts the appropriate prefix,
     if provided}
  }
  % \Pgls
  \gcmdspa{Pgls}{%
    \providedby{\sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pgls} but \idx{sentencecase}}
  }
  % \PGLS
  \gcmdspa{PGLS}{%
    \providedby{\sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pgls} but \idx{allcaps}}
  }
  % \pglspl
  \gcmdspa{pgls\-pl}{%
    \providedby{\sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{similar to \gls{glspl} but inserts the appropriate prefix,
     if provided}
  }
  % \Pglspl
  \gcmdspa{Pgls\-pl}{%
    \providedby{\sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pgls} but \idx{sentencecase}}
  }
  % \PGLSpl
  \gcmdspa{PGLS\-pl}{%
    \providedby{\sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pgls} but \idx{allcaps}}
  }
  % \glsprefixsep
  \gcmd{glsprefixsep}
  {
    \providedby{\sty{glossaries-prefix} v4.45+}
    \initvalempty
    \desc{separator between the prefix and the term}
  }
  % COMMANDS: PREFIXES (glossaries-extra)
  % \pglsxtrshort
  \gcmdspa{pgls\-xtr\-short}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrshort} but inserts the \gloskey{prefix}
    field and separator in front if set}
  }
  % \pglsxtrshortpl
  \gcmdspa{pgls\-xtr\-short\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrshortpl} but inserts the \gloskey{prefixplural}
    field and separator in front if set}
  }
  % \pglsxtrlong
  \gcmdspa{pgls\-xtr\-long}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrlong} but inserts the \gloskey{prefixfirst}
    field and separator in front if set}
  }
  % \pglsxtrlongpl
  \gcmdspa{pgls\-xtr\-long\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsxtrlongpl} but inserts the \gloskey{prefixfirstplural}
    field and separator in front if set}
  }
  % \Pglsxtrshort
  \gcmdspa{Pgls\-xtr\-short}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsxtrshort} but \idx{sentencecase}}
  }
  % \Pglsxtrshortpl
  \gcmdspa{Pgls\-xtr\-short\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsxtrshortpl} but \idx{sentencecase}}
  }
  % \Pglsxtrlong
  \gcmdspa{Pgls\-xtr\-long}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsxtrlong} but \idx{sentencecase}}
  }
  % \Pglsxtrlongpl
  \gcmdspa{Pgls\-xtr\-long\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsxtrlongpl} but \idx{sentencecase}}
  }
  % \PGLSxtrshort
  \gcmdspa{PGLS\-xtr\-short}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsxtrshort} but \idx{allcaps}}
  }
  % \PGLSxtrshortpl
  \gcmdspa{PGLS\-xtr\-short\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsxtrshortpl} but \idx{allcaps}}
  }
  % \PGLSxtrlong
  \gcmdspa{PGLS\-xtr\-long}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsxtrlong} but \idx{allcaps}}
  }
  % \PGLSxtrlongpl
  \gcmdspa{PGLS\-xtr\-long\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsxtrlongpl} but \idx{allcaps}}
  }
  % \pglsfmtshort
  \gcmdspa{pgls\-fmt\-short}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsfmtshort} but inserts the \gloskey{prefix}
    field and separator in front if set}
  }
  % \pglsfmtshortpl
  \gcmdspa{pgls\-fmt\-short\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsfmtshortpl} but inserts the \gloskey{prefixplural}
    field and separator in front if set}
  }
  % \pglsfmtlong
  \gcmdspa{pgls\-fmt\-long}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsfmtlong} but inserts the \gloskey{prefixfirst}
    field and separator in front if set}
  }
  % \pglsfmtlongpl
  \gcmdspa{pgls\-fmt\-long\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{glsfmtlongpl} but inserts the \gloskey{prefixfirstplural}
    field and separator in front if set}
  }
  % \Pglsfmtshort
  \gcmdspa{Pgls\-fmt\-short}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsfmtshort} but \idx{sentencecase}}
  }
  % \Pglsfmtshortpl
  \gcmdspa{Pgls\-fmt\-short\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsfmtshortpl} but \idx{sentencecase}}
  }
  % \PGLSfmtshort
  \gcmdspa{PGLS\-fmt\-short}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsfmtshort} but \idx{allcaps}}
  }
  % \PGLSfmtshortpl
  \gcmdspa{PGLS\-fmt\-short\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsfmtshortpl} but \idx{allcaps}}
  }
  % \Pglsfmtlong
  \gcmdspa{Pgls\-fmt\-long}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsfmtlong} but \idx{sentencecase}}
  }
  % \Pglsfmtlongpl
  \gcmdspa{Pgls\-fmt\-long\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsfmtlongpl} but \idx{sentencecase}}
  }
  % \PGLSfmtlong
  \gcmdspa{PGLS\-fmt\-long}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsfmtlong} but \idx{allcaps}}
  }
  % \PGLSfmtlongpl
  \gcmdspa{PGLS\-fmt\-long\-pl}{%
    \providedby{\sty{glossaries-extra} v1.49+}
    \note{requires \sty{glossaries-prefix}}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{as \gls{pglsfmtlongpl} but \idx{allcaps}}
  }
  % \Pglsxtrtitleshort
  \gcmd{Pgls\-xtr\-title\-short}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \note{requires \sty{glossaries-prefix}}
     \desc{the normal behaviour of \gls{Pglsfmtshort}}
  }
  % \Pglsxtrtitleshortpl
  \gcmd{Pgls\-xtr\-title\-short\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \note{requires \sty{glossaries-prefix}}
     \desc{the normal behaviour of \gls{Pglsfmtshortpl}}
  }
  % \Pglsxtrtitlelong
  \gcmd{Pgls\-xtr\-title\-long}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \note{requires \sty{glossaries-prefix}}
     \desc{the normal behaviour of \gls{Pglsfmtlong}}
  }
  % \Pglsxtrtitlelongpl
  \gcmd{Pgls\-xtr\-title\-long\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \note{requires \sty{glossaries-prefix}}
     \desc{the normal behaviour of \gls{Pglsfmtlongpl}}
  }
  % COMMANDS: ACCESSIBILITY
  % \glsentrysymbolaccess
  \gcmd{gls\-en\-try\-symbol\-access}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{entry-label}}
    \desc{as \gls{glsentrysymbol} but for the \gloskey{symbolaccess} field}
  }
  % \glsxtrassignactualsetup
  \gcmd{gls\-xtr\-assign\-actual\-set\-up}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
    \note{requires \opt{accsupp}}
    \desc{used to strip common formatting commands from a field
    value to supply the text-only accessibility content when
    initialising the default \gloskey{shortaccess} and
   \gloskey{shortpluralaccess} values}
  }
  % \glsdefaultshortaccess
  \gcmd{gls\-de\-fault\-short\-access}
  {
    \note{requires \opt{accsupp}}
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{long}\margm{short}}
    \desc{used when \gls{newabbreviation} automatically assigns
     \gloskey{shortaccess}.  This is defined by
     \sty{glossaries-accsupp} to just do \meta{long} but is redefined by
     \sty{glossaries-extra} to do \code{\meta{long} (\meta{short})}}
  }
  % \glsnameaccessdisplay
  \gcmd{gls\-name\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{access} replacement
     text (if set)}
  }
  % \glstextaccessdisplay
  \gcmd{gls\-text\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{textaccess} replacement
     text (if set)}
  }
  % \glspluralaccessdisplay
  \gcmd{gls\-plu\-ral\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{pluralaccess} replacement
     text (if set)}
  }
  % \glsfirstaccessdisplay
  \gcmd{gls\-first\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{firstaccess} replacement
     text (if set)}
  }
  % \glsfirstpluralaccessdisplay
  \gcmd{gls\-first\-plu\-ral\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{firstpluralaccess} replacement
     text (if set)}
  }
  % \glssymbolaccessdisplay
  \gcmd{gls\-sym\-bol\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{symbolaccess} replacement
     text (if set)}
  }
  % \glssymbolpluralaccessdisplay
  \gcmd{gls\-sym\-bol\-plu\-ral\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{symbolpluralaccess} replacement
     text (if set)}
  }
  % \glsdescriptionaccessdisplay
  \gcmd{gls\-de\-scrip\-tion\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{descriptionaccess} replacement
     text (if set)}
  }
  % \glsdescriptionpluralaccessdisplay
  \gcmd{gls\-de\-scrip\-tion\-plu\-ral\-access\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{descriptionpluralaccess} replacement
     text (if set)}
  }
  % \glsshortaccessdisplay
  \gcmd{gls\-short\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{shortaccess} replacement
     text (if set)}
  }
  % \glsshortpluralaccessdisplay
  \gcmd{gls\-short\-plu\-ral\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{shortpluralaccess} replacement
     text (if set)}
  }
  % \glslongaccessdisplay
  \gcmd{gls\-long\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{longaccess} replacement
     text (if set)}
  }
  % \glslongpluralaccessdisplay
  \gcmd{gls\-long\-plu\-ral\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp}}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{longpluralaccess} replacement
     text (if set)}
  }
  % \glsuseriaccessdisplay
  \gcmd{gls\-user\-i\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{user1access} replacement
     text (if set)}
  }
  % \glsuseriiaccessdisplay
  \gcmd{gls\-user\-ii\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{user2access} replacement
     text (if set)}
  }
  % \glsuseriiiaccessdisplay
  \gcmd{gls\-user\-iii\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{user3access} replacement
     text (if set)}
  }
  % \glsuserivaccessdisplay
  \gcmd{gls\-user\-iv\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{user4access} replacement
     text (if set)}
  }
  % \glsuservaccessdisplay
  \gcmd{gls\-user\-v\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{user5access} replacement
     text (if set)}
  }
  % \glsuserviaccessdisplay
  \gcmd{gls\-user\-vi\-ac\-cess\-dis\-play}
  {
    \providedby{\sty{glossaries-accsupp} v4.45+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{does \meta{text} with the \gloskey{user6access} replacement
     text (if set)}
  }
  % \glsaccessname
  \gcmd{gls\-ac\-cess\-name}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{name} key with the accessibility
     support enabled for that key (\gloskey{access}). If there is no accessibility
     support, this just uses \gls{glsentryname}}
  }
  % \Glsaccessname
  \gcmd{Gls\-ac\-cess\-name}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessname}}
  }
  % \GLSaccessname
  \gcmd{GLS\-ac\-cess\-name}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessname}}
  }
  % \glsaccesstext
  \gcmd{gls\-ac\-cess\-text}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{text} key with the accessibility
     support enabled for that key (\gloskey{textaccess}). If there is no accessibility
     support, this just uses \gls{glsentrytext}}
  }
  % \Glsaccesstext
  \gcmd{Gls\-ac\-cess\-text}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccesstext}}
  }
  % \GLSaccesstext
  \gcmd{GLS\-ac\-cess\-text}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccesstext}}
  }
  % \glsaccessplural
  \gcmd{gls\-ac\-cess\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{plural} key with the accessibility
     support enabled for that key (\gloskey{pluralaccess}). If there is 
     no accessibility support, this just uses \gls{glsentryplural}}
  }
  % \Glsaccessplural
  \gcmd{Gls\-ac\-cess\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessplural}}
  }
  % \GLSaccessplural
  \gcmd{GLS\-ac\-cess\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessplural}}
  }
  % \glsaccessfirst
  \gcmd{gls\-ac\-cess\-first}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{first} key with the accessibility
     support enabled for that key (\gloskey{firstaccess}). If there is 
     no accessibility support, this just uses \gls{glsentryfirst}}
  }
  % \Glsaccessfirst
  \gcmd{Gls\-ac\-cess\-first}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessfirst}}
  }
  % \GLSaccessfirst
  \gcmd{GLS\-ac\-cess\-first}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessfirst}}
  }
  % \glsaccessfirstplural
  \gcmd{gls\-ac\-cess\-first\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{firstplural} key with the accessibility
     support enabled for that key (\gloskey{firstpluralaccess}). If there is 
     no accessibility support, this just uses \gls{glsentryfirstplural}}
  }
  % \Glsaccessfirstplural
  \gcmd{Gls\-ac\-cess\-first\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessfirstplural}}
  }
  % \GLSaccessfirstplural
  \gcmd{GLS\-ac\-cess\-first\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessfirstplural}}
  }
  % \glsaccesssymbol
  \gcmd{gls\-ac\-cess\-sym\-bol}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{symbol} key with the accessibility
     support enabled for that key (\gloskey{symbolaccess}). If there is 
     no accessibility support, this just uses \gls{glsentrysymbol}}
  }
  % \Glsaccesssymbol
  \gcmd{Gls\-ac\-cess\-sym\-bol}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccesssymbol}}
  }
  % \GLSaccesssymbol
  \gcmd{GLS\-ac\-cess\-sym\-bol}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccesssymbol}}
  }
  % \glsaccesssymbolplural
  \gcmd{gls\-ac\-cess\-sym\-bol\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{symbolplural} key with the accessibility
     support enabled for that key (\gloskey{symbolpluralaccess}). If there is 
     no accessibility support, this just uses \gls{glsentrysymbolplural}}
  }
  % \Glsaccesssymbolplural
  \gcmd{Gls\-ac\-cess\-sym\-bol\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccesssymbolplural}}
  }
  % \GLSaccesssymbolplural
  \gcmd{GLS\-ac\-cess\-sym\-bol\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccesssymbolplural}}
  }
  % \glsaccessdesc
  \gcmd{gls\-ac\-cess\-desc}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{description} key with the accessibility
     support enabled for that key (\gloskey{descriptionaccess}). If there is 
     no accessibility support, this just uses \gls{glsentrydesc}}
  }
  % \Glsaccessdesc
  \gcmd{Gls\-ac\-cess\-desc}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessdesc}}
  }
  % \GLSaccessdesc
  \gcmd{GLS\-ac\-cess\-desc}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessdesc}}
  }
  % \glsaccessdescplural
  \gcmd{gls\-ac\-cess\-desc\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{descriptionplural} key with the accessibility
     support enabled for that key (\gloskey{descriptionpluralaccess}). If there is 
     no accessibility support, this just uses \gls{glsentrydescplural}}
  }
  % \Glsaccessdescplural
  \gcmd{Gls\-ac\-cess\-desc\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessdescplural}}
  }
  % \GLSaccessdescplural
  \gcmd{GLS\-ac\-cess\-desc\-plu\-ral}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessdescplural}}
  }
  % \glsaccessshort
  \gcmd{gls\-ac\-cess\-short}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{short} key with the accessibility
     support enabled for that key (\gloskey{shortaccess}). If there is 
     no accessibility support, this just uses \gls{glsentryshort}}
  }
  % \Glsaccessshort
  \gcmd{Gls\-ac\-cess\-short}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessshort}}
  }
  % \GLSaccessshort
  \gcmd{GLS\-ac\-cess\-short}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessshort}}
  }
  % \glsaccessshortpl
  \gcmd{gls\-ac\-cess\-short\-pl}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{shortplural} key with the accessibility
     support enabled for that key (\gloskey{shortpluralaccess}). If there is 
     no accessibility support, this just uses \gls{glsentryshortpl}}
  }
  % \Glsaccessshortpl
  \gcmd{Gls\-ac\-cess\-short\-pl}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessshortpl}}
  }
  % \GLSaccessshortpl
  \gcmd{GLS\-ac\-cess\-short\-pl}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessshortpl}}
  }
  % \glsaccesslong
  \gcmd{gls\-ac\-cess\-long}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{long} key with the accessibility
     support enabled for that key (\gloskey{longaccess}). If there is 
     no accessibility support, this just uses \gls{glsentrylong}}
  }
  % \Glsaccesslong
  \gcmd{Gls\-ac\-cess\-long}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccesslong}}
  }
  % \GLSaccesslong
  \gcmd{GLS\-ac\-cess\-long}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccesslong}}
  }
  % \glsaccesslongpl
  \gcmd{gls\-ac\-cess\-longpl}
  {%
    %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{longplural} key with the accessibility
     support enabled for that key (\gloskey{longpluralaccess}). If there is 
     no accessibility support, this just uses \gls{glsentrylongpl}}
  }
  % \Glsaccesslongpl
  \gcmd{Gls\-ac\-cess\-longpl}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.1+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccesslongpl}}
  }
  % \GLSaccesslongpl
  \gcmd{GLS\-ac\-cess\-longpl}
  {%
    %\providedby{\sty{glossaries-extra} v0.5.2+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccesslongpl}}
  }
  % \glsaccessuseri
  \gcmd{gls\-ac\-cess\-useri}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{user1} key with the accessibility
     support enabled for that key (\gloskey{user1access}). If there is 
     no accessibility support, this just uses \gls{glsentryuseri}}
  }
  % \Glsaccessuseri
  \gcmd{Gls\-ac\-cess\-useri}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessuseri}}
  }
  % \GLSaccessuseri
  \gcmd{GLS\-ac\-cess\-useri}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessuseri}}
  }
  % \glsaccessuserii
  \gcmd{gls\-ac\-cess\-user\-ii}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{user2} key with the accessibility
     support enabled for that key (\gloskey{user2access}). If there is 
     no accessibility support, this just uses \gls{glsentryuserii}}
  }
  % \Glsaccessuserii
  \gcmd{Gls\-ac\-cess\-user\-ii}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessuserii}}
  }
  % \GLSaccessuserii
  \gcmd{GLS\-ac\-cess\-user\-ii}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessuserii}}
  }
  % \glsaccessuseriii
  \gcmd{gls\-ac\-cess\-user\-iii}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{user3} key with the accessibility
     support enabled for that key (\gloskey{user3access}). If there is 
     no accessibility support, this just uses \gls{glsentryuseriii}}
  }
  % \Glsaccessuseriii
  \gcmd{Gls\-ac\-cess\-user\-iii}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessuseriii}}
  }
  % \GLSaccessuseriii
  \gcmd{GLS\-ac\-cess\-user\-iii}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessuseriii}}
  }
  % \glsaccessuseriv
  \gcmd{gls\-ac\-cess\-user\-iv}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{user4} key with the accessibility
     support enabled for that key (\gloskey{user4access}). If there is 
     no accessibility support, this just uses \gls{glsentryuseriv}}
  }
  % \Glsaccessuseriv
  \gcmd{Gls\-ac\-cess\-user\-iv}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessuseriv}}
  }
  % \GLSaccessuseriv
  \gcmd{GLS\-ac\-cess\-user\-iv}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessuseriv}}
  }
  % \glsaccessuserv
  \gcmd{gls\-ac\-cess\-userv}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{user5} key with the accessibility
     support enabled for that key (\gloskey{user5access}). If there is 
     no accessibility support, this just uses \gls{glsentryuserv}}
  }
  % \Glsaccessuserv
  \gcmd{Gls\-ac\-cess\-userv}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessuserv}}
  }
  % \GLSaccessuserv
  \gcmd{GLS\-ac\-cess\-userv}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessuserv}}
  }
  % \glsaccessuservi
  \gcmd{gls\-ac\-cess\-user\-vi}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{if accessibility support was enabled when
     \sty{glossaries-extra} was loaded (\opt{accsupp}) this will
     display the value of the \gloskey{user6} key with the accessibility
     support enabled for that key (\gloskey{user6access}). If there is 
     no accessibility support, this just uses \gls{glsentryuservi}}
  }
  % \Glsaccessuservi
  \gcmd{Gls\-ac\-cess\-user\-vi}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{sentencecase} version of \gls{glsaccessuservi}}
  }
  % \GLSaccessuservi
  \gcmd{GLS\-ac\-cess\-user\-vi}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{the \idx{allcaps} version of \gls{glsaccessuservi}}
  }
  % \glsaccessfmtname
  \gcmd{gls\-ac\-cess\-fmt\-name}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessname} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtname
  \gcmd{Gls\-ac\-cess\-fmt\-name}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessname} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtname
  \gcmd{GLS\-ac\-cess\-fmt\-name}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessname} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmttext
  \gcmd{gls\-ac\-cess\-fmt\-text}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccesstext} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmttext
  \gcmd{Gls\-ac\-cess\-fmt\-text}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccesstext} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmttext
  \gcmd{GLS\-ac\-cess\-fmt\-text}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccesstext} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtplural
  \gcmd{gls\-ac\-cess\-fmt\-plural}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessplural} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtplural
  \gcmd{Gls\-ac\-cess\-fmt\-plural}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessplural} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtplural
  \gcmd{GLS\-ac\-cess\-fmt\-plural}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessplural} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtfirst
  \gcmd{gls\-ac\-cess\-fmt\-first}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessfirst} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtfirst
  \gcmd{Gls\-ac\-cess\-fmt\-first}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessfirst} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtfirst
  \gcmd{GLS\-ac\-cess\-fmt\-first}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessfirst} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtfirstplural
  \gcmd{gls\-ac\-cess\-fmt\-first\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessfirstplural} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtfirstplural
  \gcmd{Gls\-ac\-cess\-fmt\-first\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessfirstplural} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtfirstplural
  \gcmd{GLS\-ac\-cess\-fmt\-first\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessfirstplural} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtsymbol
  \gcmd{gls\-ac\-cess\-fmt\-sym\-bol}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccesssymbol} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtsymbol
  \gcmd{Gls\-ac\-cess\-fmt\-sym\-bol}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccesssymbol} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtsymbol
  \gcmd{GLS\-ac\-cess\-fmt\-sym\-bol}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccesssymbol} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtsymbolplural
  \gcmd{gls\-ac\-cess\-fmt\-sym\-bol\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccesssymbolplural} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtsymbolplural
  \gcmd{Gls\-ac\-cess\-fmt\-sym\-bol\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccesssymbolplural} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtsymbolplural
  \gcmd{GLS\-ac\-cess\-fmt\-sym\-bol\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccesssymbolplural} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtdesc
  \gcmd{gls\-ac\-cess\-fmt\-desc}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessdesc} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtdesc
  \gcmd{Gls\-ac\-cess\-fmt\-desc}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessdesc} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtdesc
  \gcmd{GLS\-ac\-cess\-fmt\-desc}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessdesc} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtdescplural
  \gcmd{gls\-ac\-cess\-fmt\-desc\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessdescplural} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtdescplural
  \gcmd{Gls\-ac\-cess\-fmt\-desc\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessdescplural} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtdescplural
  \gcmd{GLS\-ac\-cess\-fmt\-desc\-plu\-ral}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessdescplural} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtshort
  \gcmd{gls\-ac\-cess\-fmt\-short}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessshort} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtshort
  \gcmd{Gls\-ac\-cess\-fmt\-short}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessshort} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtshort
  \gcmd{GLS\-ac\-cess\-fmt\-short}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessshort} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtshortpl
  \gcmd{gls\-ac\-cess\-fmt\-short\-pl}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessshortpl} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtshortpl
  \gcmd{Gls\-ac\-cess\-fmt\-short\-pl}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessshortpl} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtshortpl
  \gcmd{GLS\-ac\-cess\-fmt\-short\-pl}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessshortpl} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtlong
  \gcmd{gls\-ac\-cess\-fmt\-long}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccesslong} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtlong
  \gcmd{Gls\-ac\-cess\-fmt\-long}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccesslong} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtlong
  \gcmd{GLS\-ac\-cess\-fmt\-long}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccesslong} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtlongpl
  \gcmd{gls\-ac\-cess\-fmt\-long\-pl}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccesslongpl} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtlongpl
  \gcmd{Gls\-ac\-cess\-fmt\-long\-pl}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccesslongpl} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtlongpl
  \gcmd{GLS\-ac\-cess\-fmt\-long\-pl}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccesslongpl} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtuseri
  \gcmd{gls\-ac\-cess\-fmt\-useri}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessuseri} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtuseri
  \gcmd{Gls\-ac\-cess\-fmt\-useri}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessuseri} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtuseri
  \gcmd{GLS\-ac\-cess\-fmt\-useri}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessuseri} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtuserii
  \gcmd{gls\-ac\-cess\-fmt\-user\-ii}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessuserii} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtuserii
  \gcmd{Gls\-ac\-cess\-fmt\-user\-ii}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessuserii} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtuserii
  \gcmd{GLS\-ac\-cess\-fmt\-user\-ii}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessuserii} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtuseriii
  \gcmd{gls\-ac\-cess\-fmt\-user\-iii}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessuseriii} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtuseriii
  \gcmd{Gls\-ac\-cess\-fmt\-user\-iii}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessuseriii} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtuseriii
  \gcmd{GLS\-ac\-cess\-fmt\-user\-iii}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessuseriii} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtuseriv
  \gcmd{gls\-ac\-cess\-fmt\-user\-iv}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessuseriv} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtuseriv
  \gcmd{Gls\-ac\-cess\-fmt\-user\-iv}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessuseriv} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtuseriv
  \gcmd{GLS\-ac\-cess\-fmt\-user\-iv}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessuseriv} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtuserv
  \gcmd{gls\-ac\-cess\-fmt\-userv}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessuserv} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtuserv
  \gcmd{Gls\-ac\-cess\-fmt\-userv}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessuserv} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtuserv
  \gcmd{GLS\-ac\-cess\-fmt\-userv}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessuserv} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % \glsaccessfmtuservi
  \gcmd{gls\-ac\-cess\-fmt\-user\-vi}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{glsaccessuservi} but formats the displayed
     text with \gls{glsfmtfield}}
  }
  % \Glsaccessfmtuservi
  \gcmd{Gls\-ac\-cess\-fmt\-user\-vi}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{Glsaccessuservi} but formats the displayed
     text with \gls{Glsfmtfield}}
  }
  % \GLSaccessfmtuservi
  \gcmd{GLS\-ac\-cess\-fmt\-user\-vi}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{insert}\margm{cs}\margm{entry-label}}
    \desc{similar to \gls{GLSaccessuservi} but formats the displayed
     text with \gls{GLSfmtfield}}
  }
  % COMMANDS: HEADINGS AND CAPTIONS
  % \glsxtrRevertMarks
  \gcmd{gls\-xtr\-Revert\-Marks}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \desc{restores \gls{markright}, \gls{markboth} and
     \gls{@starttoc} to their previous definitions}
     \field{seealso}{glsxtrRevertTocMarks}
  }
  % \glsxtrRevertTocMarks
  \gcmd{gls\-xtr\-Revert\-Toc\-Marks}
  {
     \providedby{\sty{glossaries-extra} v1.31+}
     \desc{restores \gls{@starttoc} to its previous definition}
     \field{seealso}{glsxtrRevertMarks}
  }
  % \glsxtrifinmark
  \gcmd{glsxtrifinmark}
  {
     \providedby{\sty{glossaries-extra} v1.07+}
     \syntax{\margm{true}\margm{false}}
     \desc{does \meta{true} if within \gls{markright},
      \gls{markboth} or \gls{@starttoc} otherwise does \meta{false}}
  }
  % \@glsxtrinmark
  \gcmd{@gls\-xtr\-in\-mark}
  {
     \providedby{\sty{glossaries-extra} v1.07+}
     \desc{redefines \gls{glsxtrifinmark} to do its first argument
      (\meta{true})}
  }
  % \@glsxtrnotinmark
  \gcmd{@gls\-xtr\-not\-in\-mark}
  {
     \providedby{\sty{glossaries-extra} v1.07+}
     \desc{redefines \gls{glsxtrifinmark} to do its first argument
      (\meta{true})}
  }
  % \@glsxtr@org@markboth
  \gcmd{@gls\-xtr\-@org\-@mark\-both}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{left text}\margm{right text}}
    \desc{set to the definition of \gls{markboth} when
     \sty{glossaries-extra} loads}
  }
  % \@glsxtr@org@markright
  \gcmd{@gls\-xtr\-@org\-@mark\-right}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{text}}
    \desc{set to the definition of \gls{markright} when
     \sty{glossaries-extra} loads}
  }
  % \@glsxtr@org@@starttoc
  \gcmd{@gls\-xtr\-@org\-@@start\-toc}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{toc}}
    \desc{set to the definition of \gls{@starttoc} when
     \sty{glossaries-extra} loads}
  }
  % \glsxtrmarkhook
  \gcmd{gls\-xtr\-mark\-hook}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{hook that's performed at the start of \gls{markright},
      \gls{markboth} and \gls{@starttoc} to redefine commands that
       need to change when they occur within page headers or
       contents. This must be counteracted with \gls{glsxtrrestoremarkhook}
       afterwards}
  }
  % \glsxtrrestoremarkhook
  \gcmd{gls\-xtr\-restore\-mark\-hook}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{counteracts \gls{glsxtrmarkhook}}
  }
  % \glsxtrtitleorpdforheading
  \gcmd{gls\-xtr\-title\-or\-pdf\-or\-heading}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{title}\margm{PDF bookmarks}\margm{heading}}
     \desc{does the applicable argument depending on whether the
      command occurs within a title\slash caption or PDF bookmark or
      heading}
  }
  % \glsxtrifheaduc
  \gcmd{gls\-xtr\-if\-head\-uc}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{if the category associated with the entry given by
     \meta{entry-label} has the \catattr{headuc} attribute set to
     \code{true} this does \meta{true} otherwise it does \meta{false}}
  }
  % \glsxtrifintoc
  \gcmd{gls\-xtr\-if\-in\-toc}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{true}\margm{false}}
    \desc{normally just expands to \meta{false} but \gls{@starttoc}
     is redefined to temporarily set this macro to expand to \meta{true}
     instead. Will always expand to \meta{false} if \gls{glsxtrRevertTocMarks}
     or \gls{glsxtrRevertMarks} are used to revert \gls{@starttoc}
     to its former definition}
  }
  % \glsfmtshort
  \gcmd{gls\-fmt\-short}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted short form}
  }
  % \Glsfmtshort
  \gcmd{Gls\-fmt\-short}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} short form}
  }
  % \GLSfmtshort
  \gcmd{GLS\-fmt\-short}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} short form}
  }
  % \glsfmtshortpl
  \gcmd{gls\-fmt\-short\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted short plural form}
  }
  % \Glsfmtshortpl
  \gcmd{Gls\-fmt\-short\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} short plural form}
  }
  % \GLSfmtshortpl
  \gcmd{GLS\-fmt\-short\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} short plural form}
  }
  % \glsfmtlong
  \gcmd{gls\-fmt\-long}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted long form}
  }
  % \Glsfmtlong
  \gcmd{Gls\-fmt\-long}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} long form}
  }
  % \GLSfmtlong
  \gcmd{GLS\-fmt\-long}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} long form}
  }
  % \glsfmtlongpl
  \gcmd{gls\-fmt\-long\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted long plural form}
  }
  % \Glsfmtlongpl
  \gcmd{Gls\-fmt\-long\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} long plural form}
  }
  % \GLSfmtlongpl
  \gcmd{GLS\-fmt\-long\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.2+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} long plural form}
  }
  % \glspdffmtfull
  \gcmd{gls\-pdf\-fmt\-full}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{shortcut for \code{\gls{glsentrylong}\margm{entry-label}
      (\gls{glsentryshort}\margm{entry-label})} for use in PDF
      bookmarks or other text-only contexts}
  }
  % \glspdffmtfullpl
  \gcmd{gls\-pdf\-fmt\-full\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{shortcut for \code{\gls{glsentrylongpl}\margm{entry-label}
      (\gls{glsentryshortpl}\margm{entry-label})} for use in PDF
      bookmarks or other text-only contexts}
  }
  % \glsfmtfull
  \gcmd{gls\-fmt\-full}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{designed for use in section headings or captions, this
     expands to just \code{\gls{glspdffmtfull}\margm{entry-label}} 
     in PDF bookmarks, otherwise it
     expands to \code{\gls{glsxtrtitlefull}\margm{entry-label}}}
  }
  % \Glsfmtfull
  \gcmd{Gls\-fmt\-full}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{designed for use in section headings or captions, this
     expands to just \code{\gls{glspdffmtfull}\margm{entry-label}} 
     in PDF bookmarks (no case-change), otherwise it
     expands to \code{\gls{Glsxtrtitlefull}\margm{entry-label}}}
  }
  % \GLSfmtfull
  \gcmd{GLS\-fmt\-full}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{designed for use in section headings or captions, this
     expands to just \code{\gls{glspdffmtfull}\margm{entry-label}} 
     in PDF bookmarks (no case-change), otherwise it
     expands to \code{\gls{GLSxtrtitlefull}\margm{entry-label}}}
  }
  % \glsfmtfullpl
  \gcmd{gls\-fmt\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{designed for use in section headings or captions, this
     expands to just \code{\gls{glspdffmtfullpl}\margm{entry-label}} 
     in PDF bookmarks, otherwise it
     expands to \code{\gls{glsxtrtitlefullpl}\margm{entry-label}}}
  }
  % \Glsfmtfullpl
  \gcmd{Gls\-fmt\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{designed for use in section headings or captions, this
     expands to just \code{\gls{glspdffmtfullpl}\margm{entry-label}} 
     in PDF bookmarks (no case-change), otherwise it
     expands to \code{\gls{Glsxtrtitlefullpl}\margm{entry-label}}}
  }
  % \GLSfmtfullpl
  \gcmd{GLS\-fmt\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{designed for use in section headings or captions, this
     expands to just \code{\gls{glspdffmtfullpl}\margm{entry-label}} 
     in PDF bookmarks (no case-change), otherwise it
     expands to \code{\gls{GLSxtrtitlefullpl}\margm{entry-label}}}
  }
  % \glsfmtname
  \gcmd{gls\-fmt\-name}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \gloskey{name}}
  }
  % \Glsfmtname
  \gcmd{Gls\-fmt\-name}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} \gloskey{name}}
  }
  % \GLSfmtname
  \gcmd{GLS\-fmt\-name}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} \gloskey{name}}
  }
  % \glsfmttext
  \gcmd{gls\-fmt\-text}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \gloskey{text}}
  }
  % \Glsfmttext
  \gcmd{Gls\-fmt\-text}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} \gloskey{text}}
  }
  % \GLSfmttext
  \gcmd{GLS\-fmt\-text}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} \gloskey{text}}
  }
  % \glsfmtplural
  \gcmd{gls\-fmt\-plural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \gloskey{plural}}
  }
  % \Glsfmtplural
  \gcmd{Gls\-fmt\-plural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} \gloskey{plural}}
  }
  % \GLSfmtplural
  \gcmd{GLS\-fmt\-plural}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} \gloskey{plural}}
  }
  % \glsfmtfirst
  \gcmd{gls\-fmt\-first}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \gloskey{first}}
  }
  % \Glsfmtfirst
  \gcmd{Gls\-fmt\-first}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} \gloskey{first}}
  }
  % \GLSfmtfirst
  \gcmd{GLS\-fmt\-first}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} \gloskey{first}}
  }
  % \glsfmtfirstpl
  \gcmd{gls\-fmt\-firstpl}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \gloskey{firstplural}}
  }
  % \Glsfmtfirstpl
  \gcmd{Gls\-fmt\-firstpl}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{sentencecase} \gloskey{firstplural}}
  }
  % \GLSfmtfirstpl
  \gcmd{GLS\-fmt\-firstpl}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}}
     \desc{for use within captions or section titles to display the
      formatted \idx{allcaps} \gloskey{firstplural}}
  }
  % COMMANDS: INNER HEAD AND TITLE
  % \glsxtrtitleopts
  \gcmd{gls\-xtr\-title\-opts}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \desc{expands to the options that commands like
    \gls{glsfmtshort} should use in the title or caption within the 
    document text}
  }
  % \glsxtrheadshort
  \gcmd{gls\-xtr\-head\-short}
  {
     %\providedby{\sty{glossaries-extra} v0.5.1+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{glsfmtshort} when it occurs in a
      page header}
  }
  % \glsxtrtitleshort
  \gcmd{gls\-xtr\-title\-short}
  {
     %\providedby{\sty{glossaries-extra} v0.5.1+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{glsfmtshort}}
  }
  % \Glsxtrheadshort
  \gcmd{Gls\-xtr\-head\-short}
  {
     %\providedby{\sty{glossaries-extra} v0.5.1+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{Glsfmtshort} when it occurs in a
      page header}
  }
  % \Glsxtrtitleshort
  \gcmd{Gls\-xtr\-title\-short}
  {
     %\providedby{\sty{glossaries-extra} v0.5.1+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{Glsfmtshort}}
  }
  % \GLSxtrheadshort
  \gcmd{GLS\-xtr\-head\-short}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{GLSfmtshort} when it occurs in a
      page header}
  }
  % \GLSxtrtitleshort
  \gcmd{GLS\-xtr\-title\-short}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{GLSfmtshort}}
  }
  % \glsxtrheadshortpl
  \gcmd{gls\-xtr\-head\-short\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{glsfmtshortpl} when it occurs in a
      page header}
  }
  % \glsxtrtitleshortpl
  \gcmd{gls\-xtr\-title\-short\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.03+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{glsfmtshortpl}}
  }
  % \Glsxtrheadshortpl
  \gcmd{Gls\-xtr\-head\-short\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{Glsfmtshortpl} when it occurs in a
      page header}
  }
  % \Glsxtrtitleshortpl
  \gcmd{Gls\-xtr\-title\-short\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{Glsfmtshortpl}}
  }
  % \GLSxtrheadshortpl
  \gcmd{GLS\-xtr\-head\-short\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{GLSfmtshortpl} when it occurs in a
      page header}
  }
  % \GLSxtrtitleshortpl
  \gcmd{GLS\-xtr\-title\-short\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{GLSfmtshortpl}}
  }
  % \glsxtrheadlong
  \gcmd{gls\-xtr\-head\-long}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{glsfmtlong} when it occurs in a
      page header}
  }
  % \glsxtrtitlelong
  \gcmd{gls\-xtr\-title\-long}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{glsfmtlong}}
  }
  % \Glsxtrheadlong
  \gcmd{Gls\-xtr\-head\-long}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{Glsfmtlong} when it occurs in a
      page header}
  }
  % \Glsxtrtitlelong
  \gcmd{Gls\-xtr\-title\-long}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{Glsfmtlong}}
  }
  % \GLSxtrheadlong
  \gcmd{GLS\-xtr\-head\-long}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{GLSfmtlong} when it occurs in a
      page header}
  }
  % \GLSxtrtitlelong
  \gcmd{GLS\-xtr\-title\-long}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{GLSfmtlong}}
  }
  % \glsxtrheadlongpl
  \gcmd{gls\-xtr\-head\-long\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{glsfmtlongpl} when it occurs in a
      page header}
  }
  % \glsxtrtitlelongpl
  \gcmd{gls\-xtr\-title\-long\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{glsfmtlongpl}}
  }
  % \Glsxtrheadlongpl
  \gcmd{Gls\-xtr\-head\-long\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{Glsfmtlongpl} when it occurs in a
      page header}
  }
  % \Glsxtrtitlelongpl
  \gcmd{Gls\-xtr\-title\-long\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{Glsfmtlongpl}}
  }
  % \GLSxtrheadlongpl
  \gcmd{GLS\-xtr\-head\-long\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{entry-label}}
     \desc{the behaviour of \gls{GLSfmtlongpl} when it occurs in a
      page header}
  }
  % \GLSxtrtitlelongpl
  \gcmd{GLS\-xtr\-title\-long\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
     \syntax{\margm{entry-label}}
     \desc{the normal behaviour of \gls{GLSfmtlongpl}}
  }
  % \glsxtrheadfull
  \gcmd{gls\-xtr\-head\-full}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's full form in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{glsfmtfull,glsxtrtitlefull}
  }
  % \glsxtrtitlefull
  \gcmd{gls\-xtr\-title\-full}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's full form in the section title and
     table of contents}
    \field{seealso}{glsfmtfull,glsxtrheadfull}
  }
  % \glsxtrheadfullpl
  \gcmd{gls\-xtr\-head\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's full plural form in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{glsfmtfullpl,glsxtrtitlefullpl}
  }
  % \glsxtrtitlefullpl
  \gcmd{gls\-xtr\-title\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's full plural form in the section title and
     table of contents}
    \field{seealso}{glsfmtfullpl,glsxtrheadfullpl}
  }
  % \Glsxtrheadfull
  \gcmd{Gls\-xtr\-head\-full}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \idx{sentencecase} full form in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{Glsfmtfull,Glsxtrtitlefull}
  }
  % \Glsxtrtitlefull
  \gcmd{Gls\-xtr\-title\-full}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \idx{sentencecase} full form in the section title and
     table of contents}
    \field{seealso}{Glsfmtfull,Glsxtrheadfull}
  }
  % \GLSxtrheadfull
  \gcmd{GLS\-xtr\-head\-full}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \idx{allcaps} full form in the page header}
    \field{seealso}{GLSfmtfull,GLSxtrtitlefull}
  }
  % \GLSxtrtitlefull
  \gcmd{GLS\-xtr\-title\-full}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \idx{allcaps} full form in the section title and
     table of contents}
    \field{seealso}{GLSfmtfull}
  }
  % \Glsxtrheadfullpl
  \gcmd{Gls\-xtr\-head\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \idx{sentencecase} full plural form in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{Glsfmtfullpl,Glsxtrtitlefullpl}
  }
  % \Glsxtrtitlefullpl
  \gcmd{Gls\-xtr\-title\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.02+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \idx{sentencecase} full plural form in the section title and
     table of contents}
    \field{seealso}{Glsfmtfullpl,Glsxtrheadfullpl}
  }
  % \GLSxtrheadfullpl
  \gcmd{GLS\-xtr\-head\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \idx{allcaps} full plural form in the 
       page header}
    \field{seealso}{GLSfmtfullpl,GLSxtrtitlefullpl}
  }
  % \GLSxtrtitlefullpl
  \gcmd{GLS\-xtr\-title\-full\-pl}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \idx{allcaps} full plural form in the section title and
     table of contents}
    \field{seealso}{GLSfmtfullpl}
  }
  % \glsxtrheadname
  \gcmd{gls\-xtr\-head\-name}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's name in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{glsfmtname,glsxtrtitlename}
  }
  % \glsxtrtitlename
  \gcmd{gls\-xtr\-title\-name}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's name in the section title and
     table of contents}
    \field{seealso}{glsfmtname,glsxtrheadname}
  }
  % \Glsxtrheadname
  \gcmd{Gls\-xtr\-head\-name}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's name in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{Glsfmtname,Glsxtrtitlename}
  }
  % \Glsxtrtitlename
  \gcmd{Gls\-xtr\-title\-name}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's name in the section title and
     table of contents}
    \field{seealso}{Glsfmtname,Glsxtrheadname}
  }
  % \GLSxtrheadname
  \gcmd{GLS\-xtr\-head\-name}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's
    \gloskey{name} \idx{field} in the page header}
    \field{seealso}{GLSfmtname,GLSxtrtitlename}
  }
  % \GLSxtrtitlename
  \gcmd{GLS\-xtr\-title\-name}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's name in the section title and
     table of contents}
    \field{seealso}{GLSfmtname,GLSxtrheadname}
  }
  % \glsxtrheadtext
  \gcmd{gls\-xtr\-head\-text}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \gloskey{text} \idx{field} in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{glsfmttext,glsxtrtitletext}
  }
  % \glsxtrtitletext
  \gcmd{gls\-xtr\-title\-text}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \gloskey{text} \idx{field} in the section title and
     table of contents}
    \field{seealso}{glsfmttext,glsxtrheadtext}
  }
  % \Glsxtrheadtext
  \gcmd{Gls\-xtr\-head\-text}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's
    \gloskey{text} \idx{field} in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{Glsfmttext,Glsxtrtitletext}
  }
  % \Glsxtrtitletext
  \gcmd{Gls\-xtr\-title\-text}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's
    \gloskey{text} \idx{field} in the section title and
     table of contents}
    \field{seealso}{Glsfmttext,Glsxtrheadtext}
  }
  % \GLSxtrheadtext
  \gcmd{GLS\-xtr\-head\-text}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's
    \gloskey{text} \idx{field} in the page header}
    \field{seealso}{GLSfmttext,GLSxtrtitletext}
  }
  % \GLSxtrtitletext
  \gcmd{GLS\-xtr\-title\-text}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's \gloskey{text} \idx{field}
     in the section title and table of contents}
    \field{seealso}{GLSfmttext,GLSxtrheadtext}
  }
  % \glsxtrheadplural
  \gcmd{gls\-xtr\-head\-plural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \gloskey{plural} \idx{field} in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{glsfmtplural,glsxtrtitleplural}
  }
  % \glsxtrtitleplural
  \gcmd{gls\-xtr\-title\-plural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \gloskey{plural} \idx{field} in the section title and
     table of contents}
    \field{seealso}{glsfmtplural,glsxtrheadplural}
  }
  % \Glsxtrheadplural
  \gcmd{Gls\-xtr\-head\-plural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's
    \gloskey{plural} \idx{field} in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{Glsfmtplural,Glsxtrtitleplural}
  }
  % \Glsxtrtitleplural
  \gcmd{Gls\-xtr\-title\-plural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's
    \gloskey{plural} \idx{field} in the section title and
     table of contents}
    \field{seealso}{Glsfmtplural,Glsxtrheadplural}
  }
  % \GLSxtrheadplural
  \gcmd{GLS\-xtr\-head\-plural}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's
    \gloskey{plural} \idx{field} in the page header}
    \field{seealso}{GLSfmtplural,GLSxtrtitleplural}
  }
  % \GLSxtrtitleplural
  \gcmd{GLS\-xtr\-title\-plural}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's \gloskey{plural} \idx{field} in the section title and
     table of contents}
    \field{seealso}{GLSfmtplural,GLSxtrheadplural}
  }
  % \glsxtrheadfirst
  \gcmd{gls\-xtr\-head\-first}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \gloskey{first} \idx{field} in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{glsfmtfirst,glsxtrtitlefirst}
  }
  % \glsxtrtitlefirst
  \gcmd{gls\-xtr\-title\-first}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \gloskey{first} \idx{field} in the section title and
     table of contents}
    \field{seealso}{glsfmtfirst,glsxtrheadfirst}
  }
  % \Glsxtrheadfirst
  \gcmd{Gls\-xtr\-head\-first}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's
    \gloskey{first} \idx{field} in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{Glsfmtfirst,Glsxtrtitlefirst}
  }
  % \Glsxtrtitlefirst
  \gcmd{Gls\-xtr\-title\-first}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's
    \gloskey{first} \idx{field} in the section title and
     table of contents}
    \field{seealso}{Glsfmtfirst,Glsxtrheadfirst}
  }
  % \GLSxtrheadfirst
  \gcmd{GLS\-xtr\-head\-first}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's
    \gloskey{first} \idx{field} in the page header}
    \field{seealso}{GLSfmtfirst,GLSxtrtitlefirst}
  }
  % \GLSxtrtitlefirst
  \gcmd{GLS\-xtr\-title\-first}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's \gloskey{first} \idx{field} in the section title and
     table of contents}
    \field{seealso}{GLSfmtfirst,GLSxtrheadfirst}
  }
  % \glsxtrheadfirstplural
  \gcmd{gls\-xtr\-head\-firstplural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \gloskey{firstplural} \idx{field} in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{glsfmtfirstpl,glsxtrtitlefirstplural}
  }
  % \glsxtrtitlefirstplural
  \gcmd{gls\-xtr\-title\-firstplural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the entry's \gloskey{firstplural} \idx{field} in the section title and
     table of contents}
    \field{seealso}{glsfmtfirstpl,glsxtrheadfirstplural}
  }
  % \Glsxtrheadfirstplural
  \gcmd{Gls\-xtr\-head\-firstplural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's
    \gloskey{firstplural} \idx{field} in the page header
    (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})}
    \field{seealso}{Glsfmtfirstpl,Glsxtrtitlefirstplural}
  }
  % \Glsxtrtitlefirstplural
  \gcmd{Gls\-xtr\-title\-firstplural}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{sentencecase} entry's
    \gloskey{firstplural} \idx{field} in the section title and
     table of contents}
    \field{seealso}{Glsfmtfirstpl,Glsxtrheadfirstplural}
  }
  % \GLSxtrheadfirstplural
  \gcmd{GLS\-xtr\-head\-first\-plural}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's
    \gloskey{firstplural} \idx{field} in the page header}
    \field{seealso}{GLSfmtfirstpl,GLSxtrtitlefirstplural}
  }
  % \GLSxtrtitlefirstplural
  \gcmd{GLS\-xtr\-title\-firstplural}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{used to display the \idx{allcaps} entry's \gloskey{firstplural} \idx{field} in the section title and
     table of contents}
    \field{seealso}{GLSfmtfirstpl,GLSxtrheadfirstplural}
  }
  % COMMANDS: FORMATTING
  % \glsxtrassignfieldfont
  \gcmd{gls\-xtr\-assign\-field\-font}
  {
     \providedby{\sty{glossaries-extra} v1.04+}
    \syntax{\margm{entry-label}}
    \desc{used by the \idx{glstextlike} commands to initialise the
    formatting commands required for the given entry}
  }
  % \glssetabbrvfmt
  \gcmd{gls\-set\-abbrv\-fmt}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{category}}
    \desc{implements the \meta{display definitions} code for the 
     abbreviation style associated with the given category}
  }
  % \GlsXtrUseAbbrStyleSetup
  \gcmd{Gls\-Xtr\-Use\-Abbr\-Style\-Set\-up}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{style-name}}
    \desc{implements the \meta{setup} code for the given
     abbreviation style}
  }
  % \GlsXtrUseAbbrStyleFmts
  \gcmd{Gls\-Xtr\-Use\-Abbr\-Style\-Fmts}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{style-name}}
    \desc{implements the \meta{display definitions} code for the given
     abbreviation style}
  }
  % \glsuseabbrvfont
  \gcmd{gls\-use\-abbrv\-font}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{style-name}\margm{text}}
    \desc{formats \meta{text} according to the short format for the
     given abbreviation style}
  }
  % \glsuselongfont
  \gcmd{gls\-use\-long\-font}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{style-name}\margm{text}}
    \desc{formats \meta{text} according to the long format for the
     given abbreviation style}
  }
  % \glsxtrgenabbrvfmt
  \gcmd{gls\-xtr\-gen\-abbrv\-fmt}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \desc{the display format used by \gls{glsentryfmt} for entries that have
     the \gloskey{short} field set and have the \catattr{regular}
     attribute set to \code{false}}
  }
  % \glsgenentryfmt
  \gcmd{gls\-gen\-en\-try\-fmt}
  {
     \providedby{\sty{glossaries} v3.11a+}
     \desc{the display format used by \gls{glsentryfmt} for regular entries}
  }
  % \glsentryfmt
  \gcmd{gls\-en\-try\-fmt}
  {
     \providedby{\sty{glossaries} v3.11a+}
     \desc{the default display format used by the \idx{glslike}
      commands. This checks if the \gloskey{short} field has been
      set for the current entry and, if set, initialises the
     abbreviation formatting commands (with \gls{glssetabbrvfmt}).
     This command will do \gls{glsgenentryfmt} (encapsulated with
     \gls{glsxtrregularfont}) if the entry is considered a regular
     entry (\gls{glsifregular}) or if the entry doesn't have the
     \gloskey{short} field set. Otherwise it will do \gls{glsxtrgenabbrvfmt}
     encapsulated with \gls{glsxtrabbreviationfont}}
  }
  % \glsxtrregularfont
  \gcmd{gls\-xtr\-regular\-font}
  {
     \providedby{\sty{glossaries-extra} v1.04+}
    \syntax{\margm{text}}
    \desc{used by \gls{glsentryfmt} to encapsulate regular entries.
     Also used by \gls{glsxtrassignfieldfont} for regular entries}
  }
  % \glsxtrabbreviationfont
  \gcmd{gls\-xtr\-ab\-bre\-vi\-a\-tion\-font}
  {
     \providedby{\sty{glossaries-extra} v1.30+}
    \syntax{\margm{text}}
    \desc{used by \gls{glsentryfmt} to encapsulate non-regular entries
      the have the \gloskey{short} field set}
  }
  % \defglsentryfmt
  \gcmd{def\-gls\-en\-try\-fmt}
  {
     \providedby{\sty{glossaries} v3.11a+}
    \providedby{\sty{glossaries}}
    \syntax{\oargm{type}\margm{display}}
    \desc{overrides the default display format (\gls{glsentryfmt})
    for the given glossary. If \meta{type} is omitted,
    \gls{glsdefaulttype} is assumed. This will make the
    \idx{glslike} commands do \meta{display} for any entries that
    have the \gloskey{type} field set to the given \meta{type}. If
    you want to support any abbreviation styles, you need to include
    \gls{glssetabbrvfmt} in \meta{display}. Non-regular abbreviation
    styles are designed to work with \gls{glsxtrgenabbrvfmt}}
  }
  % \glslabel
  \gcmd{gls\-label}
  {
     \providedby{\sty{glossaries}}
     \desc{the current entry label, initialised by the \idx{glslike}
     and \idx{glstextlike} commands. This command may be used
     within associated hooks, entry display styles
    (\gls{defglsentryfmt}), and the \idx{postlinkhook}}
  }
  % \glsinsert
  \gcmd{gls\-insert}
  {
     \providedby{\sty{glossaries}}
     \desc{the final \meta{insert} argument passed to the
     \idx{glslike} commands (but not to the \idx{glstextlike} commands,
     where the \meta{insert} is added to \gls{glscustomtext}). This command may be used
     within associated hooks, entry display styles
    (\gls{defglsentryfmt}), and the \idx{postlinkhook}}
    \field{seealso}{glsxtrsaveinsert,glsxtrfullsaveinsert}
  }
  % \glscustomtext
  \gcmd{gls\-custom\-text}
  {
     \providedby{\sty{glossaries}}
     \desc{the custom text provided by \gls{glsdisp} or the
     \idx{linktext} for the \idx{glstextlike} commands. This command may be used
     within associated hooks, entry display styles
    (\gls{defglsentryfmt}), and the \idx{postlinkhook}}
  }
  % \glsifplural
  \gcmd{gls\-if\-plural}
  {
     \providedby{\sty{glossaries}}
     \syntax{\margm{true}\margm{false}}
     \desc{initialised by the \idx{glslike}
     and \idx{glstextlike} commands, this expands to \meta{true} if
     the calling command accesses a plural field (such as \gls{glspl} or
     \gls{glsplural}) otherwise it expands to \meta{false}. This command may be used
     within associated hooks, entry display styles
    (\gls{defglsentryfmt}), and the \idx{postlinkhook}}
  }
  % \glscapscase
  \gcmd{gls\-caps\-case}
  {
     \providedby{\sty{glossaries}}
     \syntax{\margm{no change}\margm{sentence}\margm{all caps}}
     \desc{initialised by the \idx{glslike}
     and \idx{glstextlike} commands, this expands to \meta{no change} if
     the calling command doesn't apply a case-change (such as \gls{gls} or
     \gls{glstext}), to \meta{sentence} if the calling command
     converts to \idx+{sentencecase} (such as \gls{Gls} or \gls{Glstext}),
     or to \meta{all caps} if the calling command converts to
     \idx+{allcaps} (such as \gls{GLS} or \gls{GLStext}). This command may be used
     within associated hooks, entry display styles
    (\gls{defglsentryfmt}), and the \idx{postlinkhook}}
  }
  % \glsxtrifallcaps
  \gcmd{gls\-xtr\-if\-all\-caps}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{all caps}\margm{not all caps}}
     \desc{shortcut for \code{\gls{glscapscase}\margm{not all caps}\margm{not all caps}\margm{all caps}}}
  }
  % \glsxtrifwasfirstuse
  \gcmd{gls\-xtr\-if\-was\-first\-use}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{true}\margm{false}}
     \desc{initialised by the \idx{glslike}
     and \idx{glstextlike} commands, this expands to \meta{true} if
     the calling command was considered the \idx{firstuse}, 
     otherwise it expands to \meta{false}. This command may be used
     within the \idx{postlinkhook} (where it's too late to test the
     \idx{firstuseflag} with \gls{ifglsused})}
  }
  % \glsxtrifwasglslike
  \gcmd{gls\-xtr\-if\-was\-gls\-like}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{true}\margm{false}}
     \desc{initialised by the \idx{glslike}
     and \idx{glstextlike} commands, this expands to \meta{true} if
     the calling command was a \idx{glslike} command, 
     otherwise it expands to \meta{false}. This command may be used
     within the \idx{postlinkhook}}
  }
  % \glsxtrifwasglslikeandfirstuse
  \gcmd{gls\-xtr\-if\-was\-gls\-like\-and\-first\-use}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{true}\margm{false}}
     \desc{a shortcut that nests \gls{glsxtrifwasglslike}
     and \gls{glsxtrifwasfirstuse}. This does \meta{true}
     if the calling command was both a \idx{glslike} command and
     was considered the \idx{firstuse}}
  }
  % \glsxtrifwassubsequentuse
  \gcmd{gls\-xtr\-if\-was\-subsequent\-use}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{true}\margm{false}}
     \desc{a shortcut that nests \gls{glsxtrifwasglslike}
     and \gls{glsxtrifwasfirstuse}. This does \meta{true}
     if the calling command was a \idx{glslike} command but
     was not considered the \idx{firstuse}}
  }
  % \glsxtrifwassubsequentorshort
  \gcmd{gls\-xtr\-if\-was\-subsequent\-or\-short}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{true}\margm{false}}
     \desc{expands to \meta{true} if the calling command was a
     \idx{glslike} command and was the \idx{subsequentuse} or if 
     \gls{glsxtrcurrentfield} was set to \code{short}}
  }
  % \glsxtrcurrentfield
  \gcmd{gls\-xtr\-current\-field}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{placeholder command for use in \idxpl{postlinkhook}. This
    expands to empty if the calling command was one of the
    \idx{glslike} commands or it was one of the \idx{inlinefullform}
    commands, otherwise it will expand to the name of the key
    associated with the \emph{singular} form of the command}
  }
  % \glsxtrassignlinktextfmt
  \gcmd{gls\-xtr\-assign\-link\-text\-fmt}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{initialised by the \idx{glslike}
      and \idx{glstextlike} commands, this contains the definitions of
      \gls{glslabel}, \gls{glstextformat},
      \gls{glsxtrgenentrytextfmt}}
  }
  % COMMANDS: CATEGORIES
  % \glsifcategory
  \gcmd{gls\-if\-category}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-label}\margm{category}\margm{true}\margm{false}}
     \desc{tests if the entry identified by \meta{entry-label} has
     the \gloskey{category} set to \meta{category} (uses
     \gls{ifglsfieldeq} for the test)}
  }
  % \glsifregularcategory
  \gcmd{gls\-if\-regular\-category}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{category}\margm{true}\margm{false}}
     \desc{does \meta{true} if the given category has the
     \catattr{regular} attribute explicitly set to \code{true},
     otherwise does \meta{false}}
  }
  % \glsifnotregularcategory
  \gcmd{gls\-if\-not\-regular\-category}
  {
     \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{category}\margm{true}\margm{false}}
     \desc{does \meta{true} if the given category has the
     \catattr{regular} attribute explicitly set to \code{false},
     otherwise does \meta{false}}
  }
  % \glsifregular
  \gcmd{gls\-if\-regular}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-label}\margm{true}\margm{false}}
     \desc{does \meta{true} if the category for the given entry has the
     \catattr{regular} attribute explicitly set to \code{true},
     otherwise does \meta{false}}
  }
  % \glsifnotregular
  \gcmd{gls\-if\-not\-regular}
  {
     \providedby{\sty{glossaries-extra} v1.04+}
     \syntax{\margm{entry-label}\margm{true}\margm{false}}
     \desc{does \meta{true} if the category for the given entry has the
     \catattr{regular} attribute explicitly set to \code{false},
     otherwise does \meta{false}}
  }
  % \glsforeachincategory
  \gcmd{gls\-for\-each\-in\-category}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{glossary-types}\margm{category}\margm{glossary-cs}\margm{label-cs}\margm{body}}
    \desc{iterates over all entry in the given list of
    \idxpl{glossary} (or all non-\idxpl{ignoredglossary}, if the optional
    argument is omitted) and performs \meta{body} for those entries that
    have the \gloskey{category} set to \meta{category}. Within
    \meta{body}, the current entry can be referenced with
    \meta{label-cs} and the \idx{glossary} can be referenced with
    \meta{glossary-cs}}
  }
  % \glsforeachwithattribute
  \gcmd{gls\-for\-each\-with\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\oargm{glossary-types}\margm{attribute-label}\margm{attribute-value}\margm{glossary-cs}\margm{label-cs}\margm{body}}
    \desc{iterates over all entry in the given list of
    \idxpl{glossary} (or all non-\idxpl{ignoredglossary}, if the optional
    argument is omitted) and performs \meta{body} for those entries that
    have the attribute given by \meta{attribute-label} set to
    \meta{attribute-value}. Within
    \meta{body}, the current entry can be referenced with
    \meta{label-cs} and the \idx{glossary} can be referenced with
    \meta{glossary-cs}}
  }
  % \glssetcategoryattribute
  \gcmd{gls\-set\-category\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{category}\margm{attribute}\margm{value}}
     \desc{locally sets the given attribute to \meta{value} for the given
      category}
  }
  % \glssetcategoriesattribute
  \gcmd{gls\-set\-categories\-attribute}
  {
     \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{category list}\margm{attribute}\margm{value}}
     \desc{globally sets the given attribute to \meta{value} for all the
     categories in the comma-separated list \meta{category list}}
  }
  % \glssetcategoriesattributes
  \gcmd{gls\-set\-categories\-attributes}
  {
     \providedby{\sty{glossaries-extra} v1.48+}
     \syntax{\margm{category list}\margm{attribute list}\margm{value}}
     \desc{globally sets each attribute in the comma separated
     \meta{attribute list} to \meta{value} for each
     category in the comma-separated list \meta{category list}}
  }
  % \glssetcategoryattributes
  \gcmd{gls\-set\-category\-attributes}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{category}\margm{attribute list}\margm{value}}
     \desc{globally sets each attribute in the comma separated
     \meta{attribute list} to \meta{value} for the given \meta{category}}
  }
  % \glssetregularcategory
  \gcmd{gls\-set\-regular\-category}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{category}}
     \desc{locally sets the \catattr{regular} attribute to
      \code{true} for the given category}
  }
  % \glsgetcategoryattribute
  \gcmd{gls\-get\-category\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{category}\margm{attribute}}
    \desc{expands to the value of the given attribute for the given
    category. Expands to nothing if the attribute hasn't been set}
  }
  % \glsunsetcategoryattribute
  \gcmd{gls\-unset\-category\-attribute}%
  {%
     \providedby{\sty{glossaries-extra} v1.47+}
    \syntax{\margm{category}\margm{attribute}}
    \desc{locally unsets the given attribute for the given category}
  }
  % \glshascategoryattribute
  \gcmd{gls\-has\-category\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{category}\margm{attribute}\margm{true}\margm{false}}
    \desc{tests if the given attribute has been set for the given
    category (using \sty{etoolbox}['s] \gls{ifcsvoid})}
  }
  % \glssetattribute
  \gcmd{gls\-set\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-label}\margm{attribute}\margm{value}}
     \desc{locally sets the given attribute to \meta{value} for the
     category associated with the entry identified by
     \meta{entry-label}}
  }
  % \glsgetattribute
  \gcmd{gls\-get\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{entry-label}\margm{attribute}}
    \desc{expands to the value of the given attribute for the
    category associated with the entry identified by \meta{entry-label}. 
    Expands to nothing if the attribute hasn't been set}
  }
  % \glsxtrsetcategory
  \gcmd{gls\-xtr\-set\-category}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{entry-labels}\margm{category-label}}
     \desc{globally sets the \gloskey{category} field to the fully
      expanded \meta{category-label} for each entry listed in
     \meta{entry-labels}}
  }
  % \glsxtrsetcategoryforall
  \gcmd{gls\-xtr\-set\-category\-for\-all}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
     \syntax{\margm{glossary-labels}\margm{category-label}}
     \desc{globally sets the \gloskey{category} field to the fully
      expanded \meta{category-label} for each entry belonging to the
     \idxpl{glossary} listed in \meta{glossary-labels}}
  }
  % \glshasattribute
  \gcmd{gls\-has\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v0.5+}
    \syntax{\margm{entry-label}\margm{attribute}\margm{true}\margm{false}}
    \desc{tests if the given attribute has been set for the category
    associated with the entry identified by \meta{entry-label} 
    (using \sty{etoolbox}['s] \gls{ifcsvoid}). Does \meta{false}
    if the entry hasn't been defined}
  }
  % \glsifcategoryattribute
  \gcmd{gls\-if\-category\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{category}\margm{attribute}\margm{value}\margm{true}\margm{false}}
    \desc{tests if the given category has the given attribute set to
    \meta{value}. Does \meta{true} if the attribute is
    \meta{value} and \meta{false} otherwise. Does \meta{false} if there's 
    no such attribute for the given category}
  }
  % \glsifattribute
  \gcmd{gls\-if\-attribute}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{entry-label}\margm{attribute}\margm{value}\margm{true}\margm{false}}
    \desc{tests if the category associated with the entry identified
    by \meta{entry-label} has the given attribute set to
    \meta{value}. Does \meta{true} if the attribute is
    \meta{value} and \meta{false} otherwise. Does \meta{false} if there's 
    no such attribute for the given category or if the entry hasn't
    been defined}
  }
  % \glsifcategoryattributetrue
  \gcmd{gls\-if\-category\-attribute\-true}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{category}\margm{attribute}\margm{true}\margm{false}}
    \desc{tests if the given category has the given attribute set to
    \code{true}. Does \meta{true} if the attribute is
    \code{true} and \meta{false} otherwise. Does \meta{false} if there's 
    no such attribute for the given category}
  }
  % \glsifattributetrue
  \gcmd{gls\-if\-attribute\-true}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{attribute}\margm{true}\margm{false}}
    \desc{tests if the category associated with the entry given by
    \meta{entry-label} has the given attribute set to
    \code{true}. Does \meta{true} if the attribute is
    \code{true} and \meta{false} otherwise. Does \meta{false} if there's 
    no such attribute for the given category or if the entry hasn't
    been defined}
  }
  % \glsifcategoryattributehasitem
  \gcmd{gls\-if\-category\-attribute\-has\-item}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{category}\margm{attribute}\margm{item}\margm{true}\margm{false}}
    \desc{does \meta{true} if the category has the attribute (whose
    value is a comma-separated list) contains the given item and \meta{false} 
    otherwise. Does \meta{false} if there's 
    no such attribute for the given category. The item and list are
    expanded and passed to \sty{datatool}['s] \gls{DTLifinlist} to perform the test}
  }
  % \glsxtrchecknohyperfirst
  \gcmd{gls\-xtr\-check\-no\-hyper\-first}
  {
    \providedby{\sty{glossaries-extra} v1.07+}
    \syntax{\margm{entry-label}}
    \desc{sets \glsoptval{hyper}{false} if the
     \catattr{nohyperfirst} attribute is set}
  }
  % COMMANDS: INDEXING
  % \glsignore
  \gcmd{gls\-ignore}
  {
    \providedby{\sty{glossaries} v4.12+}
    \syntax{\margm{text}}
    \desc{does nothing. When used as a \idx{locationencap}, this
    signifies to \app{bib2gls} that the entry is required but the
    \location\ shouldn't be added to the \idx{locationlist}. With
    other \idx{indexing} methods, this simply creates an invisible
    \location}
  }
  % \glsxtrdowrglossaryhook
  \gcmd{gls\-xtr\-do\-wr\-glossary\-hook}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{hook used whenever an entry is \indexed. Does nothing by default}
  }
  % \glsadd
  \gcmd{gls\-add}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}\margm{entry-label}}
    \desc{indexes the entry identified by \meta{entry-label}}
  }
  % \glsaddall
  \gcmd{gls\-add\-all}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{options}}
    \desc{iterates over all \idxpl{glossary} (or all those
    listed in the \glsopt{types} option)
    and \idxc{indexing}{indexes} each entry in the \idx{glossary}. The optional
    argument \meta{options} are passed to \gls{glsadd}.
    This command can't be used with \app{bib2gls}. Use the
    \resourceoptval{selection}{all} \idx{resourceopt} instead}
  }
  % \glsaddallunused
  \gcmd{gls\-add\-all\-unused}
  {%
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\oargm{glossary types}}
    \desc{iterates over all \idxpl{glossary} listed in
     \meta{glossary types} and \idxc{indexing}{indexes} each entry
     (with \glsoptval{format}{glsignore}) that hasn't been used.
    This command can't be used with \app{bib2gls}. Use the
    \resourceoptval{selection}{all} \idx{resourceopt} instead}
  }
  % \glsaddallunindexed
  \gcmd{gls\-add\-all\-un\-indexed}
  {%
    \syntax{\oargm{glossary types}}
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{iterates over all \idxpl{glossary} listed in
     \meta{glossary types} and \idxc{indexing}{indexes} each entry
     (with \glsoptval{format}{glsignore}) that hasn't already been indexed.
    This command can't be used with \app{bib2gls}. Use the
    \resourceoptval{selection}{all} \idx{resourceopt} instead}
  }
  % \glsaddeach
  \gcmd{gls\-add\-each}
  {
     \providedby{\sty{glossaries-extra} v1.31+}
     \syntax{\oargm{options}\margm{entry label list}}
     \desc{does \code{\gls{glsadd}\oargm{options}\margm{entry-label}} for each label
       in the supplied comma-separated list}
  }
  % \glsstartrange
  \gcmd{gls\-start\-range}
  {
    \providedby{\sty{glossaries-extra} v1.50+}
    \syntax{\oargm{options}\margm{entry label list}}
    \desc{essentially does
\code{\gls{glsaddeach}\oarg{\meta{options},\glsoptval{format}{\sym{startrange}\meta{encap}}}\margm{entry label
list}}
where \meta{encap} can either be provided by the \glsopt{format} key
in \meta{options} or will default to the format given in \gls{GlsXtrSetDefaultRangeFormat}}
  }
  % \glsendrange
  \gcmd{gls\-end\-range}
  {
    \providedby{\sty{glossaries-extra} v1.50+}
    \syntax{\oargm{options}\margm{entry label list}}
    \desc{as \gls{glsstartrange} but with the end range marker
    \sym{endrange}}
  }
  % \GlsXtrAutoAddOnFormat
  \gcmd{Gls\-Xtr\-Auto\-Add\-On\-Format}
  {
    \providedby{\sty{glossaries-extra} v1.37+}
    \syntax{\oargm{entry-label}\margm{format list}\margm{gls\-add options}}
    \desc{identifies formats that should trigger an automatic
     \gls{glsadd} by the \idx{glslike} and \idx{glstextlike}
commands}
  }
  % \GlsXtrClearAutoAddOnFormat
  \gcmd{Gls\-Xtr\-Clear\-Auto\-Add\-On\-Format}
  {
    \providedby{\sty{glossaries-extra} v1.59+}
    \desc{clears the formats that should trigger an automatic
    \gls{glsadd}}
  }
  % \glsxtrdoautoindexname
  \gcmd{gls\-xtr\-do\-auto\-index\-name}
  {
     %\providedby{\sty{glossaries-extra} v0.5.3+}
     \syntax{\margm{entry-label}\margm{attribute}}
     \desc{used to automatically index (using \gls{glsxtrautoindex}) 
     the entry's name, if the given attribute is set for the entry's category}
  }
  % \glsxtrautoindex
  \gcmd{gls\-xtr\-auto\-index}
  {
     \providedby{\sty{glossaries-extra} v1.16+}
     \initvalcs{index}
     \desc{the indexing command used by by the auto-indexing feature}
  }
  % \glsxtrautoindexesc
  \gcmd{gls\-xtr\-auto\-index\-esc}
  {
    \providedby{\sty{glossaries-extra} v1.36+}
    \desc{escapes the sort value used by the auto-indexing feature}
  }
  % \glsxtrautoindexentry
  \gcmd{gls\-xtr\-auto\-index\-en\-try}
  {
    \providedby{\sty{glossaries-extra} v1.16+}
    \syntax{\margm{entry-label}}
    \desc{expands to the \qt{actual} part for the auto-indexing feature}
  }
  % \glsxtrautoindexassignsort
  \gcmd{gls\-xtr\-auto\-index\-assign\-sort}
  {
    \providedby{\sty{glossaries-extra} v1.16+}
    \syntax{\margm{entry-label}}
    \desc{used to assign the sort value for the auto-indexing feature}
  }
  % \GlsXtrEnableIndexFormatOverride
  \gcmd{Gls\-Xtr\-Enable\-Index\-Format\-Override}
  {
    %\providedby{\sty{glossaries-extra}}
    \desc{allows the \glsopt{format} key to override the attribute value}
    \note{preamble only}
  }
  % \GlsXtrSetActualChar
  \gcmd{Gls\-Xtr\-Set\-Actual\-Char}
  {
    %\providedby{\sty{glossaries-extra}}
    \syntax{\margm{character}}
    \desc{sets the \qt{actual character} for the auto-indexing feature}
    \note{preamble only}
  }
  % \GlsXtrSetEncapChar
  \gcmd{Gls\-Xtr\-Set\-Encap\-Char}
  {
    %\providedby{\sty{glossaries-extra}}
    \syntax{\margm{character}}
    \desc{sets the \qt{encap character} for the auto-indexing feature}
    \note{preamble only}
  }
  % \GlsXtrSetLevelChar
  \gcmd{Gls\-Xtr\-Set\-Level\-Char}
  {
    %\providedby{\sty{glossaries-extra}}
    \syntax{\margm{character}}
    \desc{sets the \qt{level character} for the auto-indexing feature}
    \note{preamble only}
  }
  % \GlsXtrSetEscChar
  \gcmd{Gls\-Xtr\-Set\-Esc\-Char}
  {
    %\providedby{\sty{glossaries-extra}}
    \syntax{\margm{character}}
    \desc{sets the \qt{escape character} for the auto-indexing feature}
    \note{preamble only}
  }
  % \glssee
  \gcmd{gls\-see}
  {%
     \providedby{\sty{glossaries} v1.17+}
    \syntax{\oargm{tag}\margm{entry-label}\margm{xr-list}}
    \desc{indexes the entry identified by \meta{entry-label} as a
     general cross-reference to the entries identified in the comma-separated
     list \meta{xr-list}. The optional argument is the textual tag
     that's inserted before the cross-reference list and defaults to
     \gls{seename}}
    \field{seealso}{glsxtrindexseealso}
  }
  % \glsseeformat
  \gcmd{gls\-see\-format}
  {
     \providedby{\sty{glossaries} v1.17+}
    \syntax{\oargm{tag}\margm{xr-list}\margm{location}}
    \desc{used to format the \gloskey{see} cross-reference in the
     \idx{locationlist}. This requires a \location\ argument for
      \app{makeindex} even though it isn't required. The default
      definition is \code{\csfmt{emph}\margm{tag} \gls{glsseelist}\margm{xr-list}}}
  }
  % \glsseelist
  \gcmd{gls\-see\-list}
  {
     \providedby{\sty{glossaries} v1.17+}
    \syntax{\margm{csv-list}}
    \desc{iterates over a comma-separated list of entry labels
     \meta{csv-list} and formats them. Each label in the list is
     encapsulated with \gls{glsseeitem} (or \gls{mglsseeitem}, the
     label corresponds to a multi-entry). The separators are 
     \gls{glsseelastsep} (between the penultimate and last items)
     and \gls{glsseesep} (between all the other items). With
     \sty{glossaries-extra}, the first label is encapsulated with
     \gls{glsseefirstitem} (or \gls{mglsseefirstitem}) and the final separator for a list
     consisting of at least three items is given by
     \gls{glsseelastoxfordsep}}
    \field{seealso}{glsxtrseelist}
  }
  % \glsseeitem
  \gcmd{gls\-see\-item}
  {
     \providedby{\sty{glossaries} v1.17+}
     \syntax{\margm{entry-label}}
     \desc{used by \gls{glsseelist} to format each entry}
     \field{seealso}{glsseefirstitem}
  }
  % \glsseeitemformat
  \gcmd{gls\-see\-item\-format}
  {
     \providedby{\sty{glossaries} v3.0+}
     \syntax{\margm{entry-label}}
     \desc{used by \gls{glsseeitem} to produce the hyperlink text}
  }
  % \glsseefirstitem
  \gcmd{gls\-see\-first\-item}
  {
     \providedby{\sty{glossaries-extra} v1.47+}
     \syntax{\margm{entry-label}}
     \desc{used by \gls{glsseelist} to format the first entry}
     \field{seealso}{glsseeitem}
  }
  % \glsseesep
  \gcmd{gls\-see\-sep}
  {
    \providedby{\sty{glossaries} v1.17+}
    \initval{{,\textvisiblespace}}
    \desc{used by \gls{glsseelist} as a separator between each entry
     except the last pair}
     \field{seealso}{glsseelastsep,glsseelastoxfordsep}
  }
  % \glsseelastsep
  \gcmd{gls\-see\-last\-sep}
  {
    \providedby{\sty{glossaries} v1.17+}
    \desc{used by \gls{glsseelist} as a separator between
      penultimate and final entry in the list}
     \field{seealso}{glsseelastsep,glsseelastoxfordsep}
  }
  % \glsseelastoxfordsep
  \gcmd{gls\-see\-last\-oxford\-sep}
  {
     \providedby{\sty{glossaries-extra} v1.47+}
    \desc{used by \gls{glsseelist} as a separator between
      penultimate and final entry in the list if there are at least
      three entries in the list}
     \field{seealso}{glsseelastsep,glsseelastoxfordsep}
  }
  % \andname
  \gcmd{and\-name}
  {
    \initvalcs{amp}
    \desc{used by \gls{glsseelastsep} (provided by \sty{glossaries}
     if not already defined)}
  }
  % \glsxtrseelist
  \gcmd{glsxtrseelist}
  {
     \providedby{\sty{glossaries-extra} v1.16+}
    \syntax{\margm{csv-list}}
    \desc{fully expands \meta{csv-list} and passes it to
    \gls{glsseelist}}
  }
  % \glsxtrtaggedlist
  \gcmd{gls\-xtr\-tagged\-list}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{singular tag}\margm{plural tag}\margm{label prefix}\margm{csv-list}}
    \desc{similar to \gls{glsseelist}, this will start the list with
    \meta{singular tag} if the list only contains one element and
    \meta{plural tag} if the list contains more than one element.
    Each element is prefixed with \meta{label prefix}. The tag is
    separated from the start of the list with
    \gls{glsxtrtaggedlistsep}. The actual list separators as as for
    \gls{glsseelist}. The \meta{csv-list} is expanded before being
    iterated over. Does nothing if \meta{csv-list} is empty}
  }
  % \glsxtrtaggedlistsep
  \gcmd{gls\-xtr\-tagged\-list\-sep}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \initvalcs{space}
    \desc{separator used by \gls{glsxtrtaggedlist} between the tag and the list}
  }
  % \glsxtrusesee
  \gcmd{gls\-xtr\-use\-see}
  {
     \providedby{\sty{glossaries-extra} v1.06+}
    \syntax{\margm{entry-label}}
    \desc{if the entry given by \meta{entry-label} has the
    \gloskey{see} field set, this will display the cross reference
    according to \gls{glsxtruseseeformat}}
    \field{seealso}{glsxtrusealias,glsxtruseseealso,glsxtrseelists}
  }
  % \glsxtrusealias
  \gcmd{gls\-xtr\-use\-alias}
  {
     \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{entry-label}}
    \desc{if the entry given by \meta{entry-label} has the
    \gloskey{alias} field set, this will display the cross reference
    according to \gls{glsxtruseseeformat}}
    \field{seealso}{glsxtrusesee,glsxtruseseealso,glsxtrseelists}
  }
  % \glsxtruseseealso
  \gcmd{gls\-xtr\-use\-see\-also}
  {
     \providedby{\sty{glossaries-extra} v1.16+}
    \syntax{\margm{entry-label}}
    \desc{if the entry given by \meta{entry-label} has the
    \gloskey{seealso} field set, this will display the cross reference
    according to \gls{glsxtruseseealsoformat}}
    \field{seealso}{glsxtrusesee,glsxtrusealias,glsxtrseelists}
  }
  % \glsxtrseelists
  \gcmd{gls\-xtr\-see\-lists}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{if the entry given by \meta{entry-label} has the
    \gloskey{see}, \gloskey{seealso} or \gloskey{alias} fields set, 
    this will display the cross reference
    according to \gls{glsxtruseseeformat} (for \gloskey{see} and
    \gloskey{alias}) or \gls{glsxtruseseealsoformat} (for
    \gloskey{seealso}). If any of these fields are set, the list is
    encapsulated with \gls{glsxtrseelistsencap}}
    \field{seealso}{glsxtrseelistsencap,glsxtrseelistsdelim}
  }
  % \glsxtrseelistsencap
  \gcmd{gls\-xtr\-see\-lists\-encap}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{content}}
     \desc{used by \gls{glsxtrseelists} to encapsulate the lists}
  }
  % \glsxtrseelistsdelim
  \gcmd{gls\-xtr\-see\-lists\-delim}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{used by \gls{glsxtrseelists} to as separator between sub-lists}
  }
  % \glsxtruseseeformat
  \gcmd{gls\-xtr\-use\-see\-format}
  {
     \providedby{\sty{glossaries-extra} v1.06+}
    \syntax{\margm{tag}\margm{xr-list}}
    \desc{format used by \gls{glsxtrusesee}. This internally uses
     \gls{glsseeformat}}
  }
  % \glsxtruseseealsoformat
  \gcmd{gls\-xtr\-use\-see\-also\-format}
  {
     \providedby{\sty{glossaries-extra} v1.16+}
    \syntax{\margm{csv-list}}
    \desc{formats the comma-separated list of entry labels as a
     \qt{see also} cross-reference}
  }
  % \glsxtrindexseealso
  \gcmd{gls\-xtr\-index\-see\-also}
  {%
     \providedby{\sty{glossaries-extra} v1.16+}
    \syntax{\margm{entry-label}\margm{xr-list}}
    \desc{indexes the entry identified by \meta{entry-label} as a
     \qt{see also} cross-reference to the entries identified in the comma-separated
     list \meta{xr-list}. The cross-reference list is prefixed with
     \gls{seealsoname}}
    \field{seealso}{glssee}
  }
  % \glsxtrsetaliasnoindex
  \gcmd{gls\-xtr\-set\-alias\-no\-index}
  {
    \providedby{\sty{glossaries-extra} v1.12+}
    \desc{hook used to switch off indexing for aliases}
  }
  % \glsxtrindexaliased
  \gcmd{gls\-xtr\-index\-aliased}
  {
     \providedby{\sty{glossaries-extra} v1.12+}
    \desc{index the current entry's alias. May only be used within
    the definition of \gls{glsxtrsetaliasnoindex}}
  }
  % \glsxtralias
  \gcmd{gls\-xtr\-alias}
  {
     \providedby{\sty{glossaries-extra} v1.12+}
    \syntax{\margm{entry-label}}
    \desc{expands to the value of the \gloskey{alias} field for the
     entry identified by \meta{entry-label}. If the field isn't set, this
     will expand to nothing. If the entry isn't defined, this will expand
     to \gls{relax}}
  }
  % \glsxtraliashook
  \gcmd{gls\-xtr\-alias\-hook}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{hook implemented when the \gloskey{alias} key is provided when an
    entry is defined}
  }
  % \glsxtrseealsolabels
  \gcmd{gls\-xtr\-see\-also\-labels}
  {
     \providedby{\sty{glossaries-extra} v1.16+}
    \syntax{\margm{entry-label}}
    \desc{expands to the value of the \gloskey{seealso} field for the
     entry identified by \meta{entry-label}. If the field isn't set, this
     will expand to nothing. If the entry isn't defined, this will expand
     to \gls{relax}}
  }
  % \glsxtraddallcrossrefs
  \gcmd{gls\-xtr\-add\-all\-cross\-refs}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{iterates over all defined entries and indexes any
          cross-references (identified by the \gloskey{see} or \gloskey{seealso}
           keys) that haven't been used}
    \field{seealso}{opt.indexcrossrefs}
  }
  % \glsxtraddunusedxrefs
  \gcmd{gls\-xtr\-add\-un\-used\-xrefs}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \desc{indexes any cross-references (identified by the \gloskey{see} or \gloskey{seealso}
          keys) that haven't been used}
  }
  % \glsxtrunusedformat
  \gcmd{gls\-xtr\-un\-used\-format}
  {
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{location}}
    \desc{the \idxc{locationencap}{format} used by \gls{glsxtraddallcrossrefs}}
  }
  % \glsxtrdowrglossaryhook
  \gcmd{gls\-xtr\-wr\-glossary\-hook}
  {%
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{entry-label}}
    \desc{hook implemented everytime an entry is indexed}
  }
  % \GlsXtrSetAltModifier
  \gcmd{Gls\-Xtr\-Set\-Alt\-Modifier}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{token}\margm{options}}
    \desc{sets \meta{token} as a modifier for the \idx{glslike} and
    \idx{glstextlike} commands that will automatically implement the
    given options}
  }
  % \GlsXtrSetStarModifier
  \gcmd{Gls\-Xtr\-Set\-Star\-Modifier}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{options}}
    \desc{overrides the options that should be implemented by the
     star (\cmdmod{star}) modifier for \idx{glslike} and
    \idx{glstextlike} commands}
  }
  % \GlsXtrSetPlusModifier
  \gcmd{Gls\-Xtr\-Set\-Plus\-Modifier}
  {
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{options}}
    \desc{overrides the options that should be implemented by the
     plus (\cmdmod{plus}) modifier for \idx{glslike} and
    \idx{glstextlike} commands}
  }
  % \glslinkwrcontent
  \gcmd{gls\-link\-wr\-content}
  {
     \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{code}}
    \desc{encapsulates the \idx{linktext} and \idx{indexing}. Just
     does \meta{code} by default}
  }
  % \glsencapwrcontent
  \gcmd{gls\-encap\-wr\-content}
  {
     \providedby{\sty{glossaries} v4.50+ \& \sty{glossaries-extra} v1.49+}
    \syntax{\margm{code}}
    \desc{encapsulates the \idx{indexing} code (within \gls{glslinkwrcontent})}
  }
  % \glsentryindexcount
  \gcmd{gls\-en\-try\-index\-count}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}}
    \desc{expands to the number of times the given entry has been indexed. This
     will expand to 0 if the entry hasn't been indexed or hasn't been defined}
  }
  % \glsifindexed
  \gcmd{gls\-if\-indexed}
  {%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{tests if the value obtained from \gls{glsentryindexcount} is greater than 0}
  }
  % \glswriteentry
  \gcmd{gls\-write\-en\-try}
  {%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{entry-label}\margm{code}}
    \desc{performs the indexing code unless indexing should be suppressed}
  }
  % \glsxtrifindexing
  \gcmd{gls\-xtr\-if\-indexing}
  {%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{true}\margm{false}}
    \desc{tests whether or not the \glsopt{noindex} has been set. Does 
     \meta{false} if \glsoptval{noindex}{true} otherwise does \meta{true}}
  }
  % \ifglsindexonlyfirst
  \gcond{if\-gls\-index\-only\-first}
  {%
    \providedby{\sty{glossaries} v3.02+}
    \initvalcs{iffalse}
    \desc{a conditional that corresponds to the \opt{indexonlyfirst} option}
  }
  % \ifglsxtrinitwrglossbefore
  \gcond{if\-gls\-xtr\-init\-wr\-gloss\-before}
  {%
    \providedby{\sty{glossaries-extra} v1.14+}
    \initvalcs{iftrue}
    \desc{a conditional that indicates whether or not
    \glsoptval{wrgloss}{before} is set}
  }
  % \glsxtrinitwrglossbeforetrue
  \gcmd{gls\-xtr\-init\-wr\-gloss\-before\-true}
  {%
     \providedby{\sty{glossaries-extra} v1.14+}
    \desc{corresponds to \glsoptval{wrgloss}{before}}
  }
  % \glsxtrinitwrglossbeforefalse
  \gcmd{gls\-xtr\-init\-wr\-gloss\-before\-false}
  {%
     \providedby{\sty{glossaries-extra} v1.14+}
    \desc{corresponds to \glsoptval{wrgloss}{after}}
  }
  % \GlsXtrSetDefaultNumberFormat
  \gcmd{Gls\-Xtr\-Set\-De\-fault\-Number\-Format}
  {
    \providedby{\sty{glossaries-extra} v1.19+}
    \syntax{\margm{encap}}
    \desc{sets the default \glsopt{format} to \meta{encap} (without
    the leading backslash)}
  }
  % \GlsXtrSetDefaultRangeFormat
  \gcmd{Gls\-Xtr\-Set\-De\-fault\-Range\-Format}
  {
    \providedby{\sty{glossaries-extra} v1.50+}
    \syntax{\margm{encap}}
    \desc{sets the default \glsopt{format} to \meta{encap} (without
    the leading backslash) for \gls{glsstartrange} and
    \gls{glsendrange}}
  }
  % \GlsXtrSetDefaultGlsOpts
  \gcmd{Gls\-Xtr\-Set\-De\-fault\-Gls\-Opts}
  {%
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{options}}
    \desc{locally set the default options for the
      \idx{glslike} and \idx{glstextlike} commands}
  }
  % \GlsXtrAppToDefaultGlsOpts
  \gcmd{Gls\-Xtr\-App\-To\-De\-fault\-Gls\-Opts}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{options}}
    \desc{locally append \meta{options} to the default options for the
      \idx{glslike} and \idx{glstextlike} commands}
  }
  % \GlsXtrPreToDefaultGlsOpts
  \gcmd{Gls\-Xtr\-Pre\-To\-De\-fault\-Gls\-Opts}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{options}}
    \desc{locally prepend \meta{options} to the default options for the
      \idx{glslike} and \idx{glstextlike} commands}
  }
  % \glslinkpresetkeys
  \gcmd{gls\-link\-pre\-set\-keys}
  {%
    \providedby{\sty{glossaries-extra} v1.26+}
    \desc{hook implemented before setting the options passed to the
      \idx{glslike} and \idx{glstextlike} commands}
  }
  % \glslinkpostsetkeys
  \gcmd{gls\-link\-post\-set\-keys}
  {%
    \providedby{\sty{glossaries} v4.16+}
    \desc{hook implemented after setting the options passed to the
      \idx{glslike} and \idx{glstextlike} commands}
  }
  % \glslinkcheckfirsthyperhook
  \gcmd{gls\-link\-check\-first\-hyper\-hook}
  {
    \providedby{\sty{glossaries} v4.08+}
    \desc{hook used at the end of the code in the \idx{glslike}
     commands that tests if the hyperlink should be switched off on \idx{firstuse}}
  }
  % \glsaddpresetkeys
  \gcmd{gls\-add\-pre\-set\-keys}
  {%
    \providedby{\sty{glossaries-extra} v1.30+}
    \desc{hook implemented before setting the options passed to \gls{glsadd}}
  }
  % \glsaddpostsetkeys
  \gcmd{gls\-add\-post\-set\-keys}
  {%
    \providedby{\sty{glossaries-extra} v1.30+}
    \desc{hook implemented after setting the options passed to \gls{glsadd}}
  }
  % \glsxtrinitwrgloss
  \gcmd{gls\-xtr\-init\-wr\-gloss}
  {%
    \providedby{\sty{glossaries-extra} v1.14+}
    \desc{hook that initialises the \glsopt{wrgloss} setting}
  }
  % \glsxtrinithyperoutside
  \gcmd{gls\-xtr\-init\-hyper\-out\-side}
  {%
    \providedby{\sty{glossaries-extra} v1.21+}
    \desc{hook that initialises the \glsopt{hyperoutside} setting}
  }
  % \glsinitreunsets
  \gcmd{gls\-init\-re\-un\-sets}
  {%
    \providedby{\sty{glossaries-extra} v1.49+}
    \desc{hook that initialises the \glsopt{prereset},
     \glsopt{preunset} and \glsopt{postunset} settings}
  }
  % COMMANDS: CONDITIONALS
  % \glsunset
  \gcmd{gls\-unset}
  {%
     \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{globally unsets the entry's \idx{firstuseflag}. That is, this marks the entry 
     as \qt{used}}
    \field{seealso}{glslocalunset,glsreset,ifglsused,GlsXtrIfUnusedOrUndefined}
  }
  % \glslocalunset
  \gcmd{gls\-local\-unset}
  {%
     \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{locally unsets the entry's \idx{firstuseflag}. That is, this marks the entry 
     as \qt{used}}
    \field{seealso}{glsunset,glslocalreset,ifglsused,GlsXtrIfUnusedOrUndefined}
  }
  % \glslocalunseteach
  \gcmd{gls\-local\-unset\-each}
  {%
    \providedby{\sty{glossaries-extra} v1.31+}
    \syntax{\margm{entry-labels}}
    \desc{locally unsets each listed entry's \idx{firstuseflag}}
    \field{seealso}{glsunset,glslocalreset,ifglsused,GlsXtrIfUnusedOrUndefined}
  }
  % \glsreset
  \gcmd{gls\-reset}
  {%
     \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{globally resets the entry's \idx{firstuseflag}. That is, this marks the entry 
     as \qt{not used}}
    \field{seealso}{glslocalreset,glsunset,ifglsused,GlsXtrIfUnusedOrUndefined}
  }
  % \glslocalreset
  \gcmd{gls\-local\-reset}
  {%
     \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}}
    \desc{locally resets the entry's \idx{firstuseflag}. That is, this marks the entry 
     as \qt{not used}}
    \field{seealso}{glsreset,glslocalunset,ifglsused,GlsXtrIfUnusedOrUndefined}
  }
  % \glslocalreseteach
  \gcmd{gls\-local\-reset\-each}
  {%
    \providedby{\sty{glossaries-extra} v1.31+}
    \syntax{\margm{entry-labels}}
    \desc{locally resets each listed entry's \idx{firstuseflag}}
    \field{seealso}{glsreset,glslocalreset,ifglsused,GlsXtrIfUnusedOrUndefined}
  }
  % \glsunsetall
  \gcmd{gls\-unset\-all}
  {%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{types}}
    \desc{globally unsets all entries associated with the listed
     glossaries or all glossaries if \meta{types} is omitted}
    \field{seealso}{glsunset,glsresetall,ifglsused,GlsXtrIfUnusedOrUndefined}
  }
  % \glsresetall
  \gcmd{gls\-reset\-all}
  {%
     \providedby{\sty{glossaries}}
    \syntax{\oargm{types}}
    \desc{globally resets all entries associated with the listed
     glossaries or all glossaries if \meta{types} is omitted}
    \field{seealso}{glsreset,glsunsetall,ifglsused,GlsXtrIfUnusedOrUndefined}
  }
  % \glslocalunsetall
  \gcmd{gls\-local\-un\-set\-all}
  {
    \providedby{\sty{glossaries}}
    \syntax{\oargm{glossary labels list}}
    \desc{locally unsets the \idx+{firstuseflag} for all
     entries in whose labels are listed in the \meta{glossary
     labels list} comma-separated list. If the optional argument is
     omitted, the list of all non-\idxpl{ignoredglossary} is assumed}
    \field{seealso}{glsunset,glslocalunset,glsunsetall,glslocalresetall}
  }
  % \glslocalresetall
  \gcmd{gls\-local\-re\-set\-all}
  {
    \providedby{\sty{glossaries}}
    \syntax{\oargm{glossary labels list}}
    \desc{locally resets the \idx+{firstuseflag} for all
    entries in whose labels are listed in the \meta{glossary
     labels list} comma-separated list. If the optional argument is
     omitted, the list of all non-\idxpl{ignoredglossary} is assumed}
    \field{seealso}{glsreset,glslocalreset,glsresetall,glslocalunsetall}
  }
  % \ifglsused
  \gcmd{if\-gls\-used}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry has been marked as
    \idxc{firstuseflag}{used}, does \meta{false} if the entry is
    marked as \idxc{firstuseflag}{unused}, and does neither if 
    the entry hasn't been defined (but will generate an error or
     warning according to \opt{undefaction})}
    \field{seealso}{GlsXtrIfUnusedOrUndefined,glsxtrifwasfirstuse}
  }
  % \GlsXtrIfUnusedOrUndefined
  \gcmd{Gls\-Xtr\-If\-Unused\-Or\-Undefined}
  {
     \providedby{\sty{glossaries-extra} v1.34+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry hasn't been defined or hasn't been marked as
    \idxc{firstuseflag}{used}, otherwise does \meta{true}. Note
    that this command will generate an error or warning (according to 
    \opt{undefaction}) if the entry hasn't been defined, but will
    still do \meta{true}}
    \field{seealso}{ifglsused,glsxtrifwasfirstuse}
  }
  % \glscurrentfieldvalue
  \gcmd{gls\-current\-field\-value}
  {
     \providedby{\sty{glossaries} v4.23+}
     \desc{conditional commands such as \gls{ifglshasfield} set this
      to the field's value for use within the \meta{true} code}
  }
  % \ifglshasfield
  \gcmd{if\-gls\-has\-field}
  {
    \providedby{\sty{glossaries} v4.03+}
    \syntax{\margm{field}\margm{entry-label}\margm{true}\margm{false}}
    \desc{if the field identified by either its key or its
    \idx{internalfieldlabel} \meta{field} for the entry identified by
    \meta{entry-label} is set and non-empty, this sets
    \gls{glscurrentfieldvalue} to the field value and does \meta{true}
     otherwise it does \meta{false}}
    \field{seealso}{glsxtrifhasfield,ifglsfieldvoid}
  }
  % \ifglsfieldvoid
  \gcmd{if\-gls\-field\-void}
  {
    \providedby{\sty{glossaries} v4.50+}
    \syntax{\margm{field-label}\margm{entry-label}\margm{true}\margm{false}}
    \desc{an expandable test to determine if the entry is undefined
    or the field is undefined or empty. The \meta{field-label}
    must be the field's \idxc{internalfieldlabel}{internal label}}
    \field{seealso}{GlsXtrIfFieldUndef}
  }%
  % \ifglshasparent
  \gcmd{if\-gls\-has\-parent}
  {
    \providedby{\sty{glossaries} v3.02+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry's \gloskey{parent} field is
    set otherwise does \meta{false}}
  }
  % \ifglshasdesc
  \gcmd{if\-gls\-has\-desc}
  {
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry's \gloskey{description} field is
    set otherwise does \meta{false}}
  }
  % \ifglshasdescsuppressed
  \gcmd{if\-gls\-has\-desc\-suppressed}
  {
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry's \gloskey{description} field is
    just \gls{nopostdesc} otherwise does \meta{false}}
  }
  % \ifglshassymbol
  \gcmd{if\-gls\-has\-symbol}
  {
    \providedby{\sty{glossaries} v3.08a+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry's \gloskey{symbol} field is
    set otherwise does \meta{false}}
  }
  % \ifglshaslong
  \gcmd{if\-gls\-has\-long}
  {
    \providedby{\sty{glossaries} v3.11a+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry's \gloskey{long} field is
    set otherwise does \meta{false}}
  }
  % \ifglshasshort
  \gcmd{if\-gls\-has\-short}
  {
    \providedby{\sty{glossaries} v3.11a+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry's \gloskey{short} field is
    set otherwise does \meta{false}}
  }
  % \ifglshaschildren
  \gcmd{if\-gls\-has\-children}
  {
    \providedby{\sty{glossaries} v3.02+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the given entry has child entries
    otherwise does \meta{false}. Note that this has to iterate over
    the set of defined entries for the entry's \idx{glossary} to
    find one that has the entry identified in its \gloskey{parent}
    field. A more efficient approach can be achieved with
    \app{bib2gls} and the \resourceopt{save-child-count} resource option}
    \field{seealso}{GlsXtrIfHasNonZeroChildCount}
  }
  % COMMANDS: LOOPS
  % \forglsentries
  \gcmd{for\-gls\-entries}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{type}\margm{cs}\margm{body}}
    \desc{iterates over all entries in the given \idx{glossary} 
    and, at each iteration, defines the command \meta{cs} 
    to the current entry label and does \meta{body}. The optional
    argument \meta{type} is the \idx{glossary}
    label and defaults to \gls{glsdefaulttype} if omitted. 
    This command can't be used with \app{bib2gls} since there are no
    defined entries until \app{bib2gls} has selected them and added
    them to the \ext{glstex} file}
    \field{seealso}{forallglsentries}
  }
  % \forallglsentries
  \gcmd{for\-all\-gls\-entries}
  {%
    \providedby{\sty{glossaries}}
    \syntax{\oargm{types}\margm{cs}\margm{body}}
    \desc{does \gls{forglsentries} for each \idx{glossary}. The optional
    argument \meta{types} is a comma-separated list of \idx{glossary}
    labels. If omitted, all non-\idxpl{ignoredglossary} is assumed}
  }
  % \forallglossaries
  \gcmd{for\-all\-glossaries}
  {
    \providedby{\sty{glossaries}}
    \syntax{\oargm{types}\margm{cs}\margm{body}}
    \desc{iterates overall all the \idx{glossary} labels given in
    the \meta{types} argument, defines the command \meta{cs} to the
    current label and does \meta{body}. If the optional argument is
    omitted, the list of all non-\idxpl{ignoredglossary} is assumed}
  }
  % \forallacronyms
  \gcmd{for\-all\-acronyms}
  {
    \banned
    \providedby{\sty{glossaries} v4.08+}
    \syntax{\margm{cs}\margm{body}}
    \desc{iterates overall all \idxpl{glossary} that have been
    declared lists of acronyms, defines the command \meta{cs} to the
    current label and does \meta{body}. Use
    \gls{forallabbreviationlists} with \sty{glossaries-extra}}
  }
  % \forallabbreviationlists
  \gcmd{forallabbreviationlists}
  {
    \providedby{\sty{glossaries-extra} v1.42+}
    \syntax{\margm{cs}\margm{body}}
    \desc{iterates overall all lists of abbreviations, defines the
    command \meta{cs} to the current label and does \meta{body}}
    \field{seealso}{forallglossaries}
  }
  % CATEGORIES
  \gidxpl{category}{\field{plural}{categories}
    \common
    \desc{with \sty{glossaries-extra}, each entry has an associated
    category (a simple label) assigned with the \gloskey{category} key. Each category
    can have a set of \attrs\ (assigned with 
    commands like \gls{glssetcategoryattribute}), which can affect the way the entry
    is formatted. Some categories, such as \cat{general}, are supplied by
    \sty{glossaries-extra}}
  }
  % general category
  \gcat{general}{\desc{the default \idx{category} for
    \gls{newglossaryentry} and similar commands. This
    category has the \catattr{regular} attribute set to \code{true}}}%
  % abbreviation category
  \gcat{abbreviation}{\desc{the default \idx{category} for
    \gls{newabbreviation}}}%
  % acronym category
  \gcat{acronym}{\desc{the default \idx{category} for
    \gls{newacronym} (as redefined by \sty{glossaries-extra}). This
    category has the \catattr{regular} attribute set to \code{true}
    by default but this may be changed to \code{false} by certain 
    \idx{abbrvstyle}}}%
  % symbol category
  \gcat{symbol}{\desc{the default \idx{category} for
    \gls{glsxtrnewsymbol}. This
    category has the \catattr{regular} attribute set to \code{true}}}%
  % number category
  \gcat{number}{\desc{the default \idx{category} for
    \gls{glsxtrnewnumber}. This
    category has the \catattr{regular} attribute set to \code{true}}}%
  % index category
  \gcat{index}{\desc{the default \idx{category} for
    \gls{newterm} (as redefined by \sty{glossaries-extra}). This
    category has the \catattr{regular} attribute set to \code{true}}}%
  % term category
  \gcat{term}{\desc{a \idx{catpostdeschook} is provided for this
category, but no commands are provided that set the
\gloskey{category} key to this label}}
  % CATEGORY ATTRIBUTES
  \gidxpl{categoryattribute}{\field{text}{category attribute}%
    \desc{a category can have a set of attributes (assigned with commands like 
    \gls{glssetcategoryattribute}), which can affect the way the entry
    is formatted. Some attributes are recognised by certain
    commands. Custom attributes can also be defined and referenced
    in hooks or custom commands as required}
  }
  % regular
  \gcatattr{regular}%
  {%
    \common
    \syntax{\meta{boolean}}
    \desc{if set to \code{true}, this attribute indicates that the
     entry should be treated as a regular entry (the
     \gloskey{first}\slash\gloskey{firstplural} key is used on
     \idx{firstuse} and the \gloskey{text}\slash\gloskey{plural} key
     is used on subsequent use). If set to \code{false}, the entry
     is assumed to be governed by the \idx{abbrvstyle} associated
     with the category or the default style for the
     \cat{abbreviation} category, if no style is associated with the
     entry's category. If this attribute isn't set, \code{true} is
     assumed. Certain \idxpl{abbrvstyle} set this attribute to
     \code{true} or \code{false}, depending on the complexity of the
     style}
  }
  % markwords
  \gcatattr{mark\-words}%
  {%
    \syntax{\meta{boolean}}
    \desc{if set to \code{true}, this attribute indicates that
     abbreviations should have the words in the long form marked up
     with \gls{glsxtrword} and separated by \gls{glsxtrwordsep}. If
     this attribute isn't set, \code{false} is assumed}
  }
  % markshortwords
  \gcatattr{mark\-short\-words}%
  {%
    \syntax{\meta{boolean}}
    \desc{if set to \code{true}, this attribute indicates that
     abbreviations should have the words in the short form marked up
     with \gls{glsxtrword} and separated by \gls{glsxtrwordsep}. If
     this attribute isn't set, \code{false} is assumed}
  }
  % discardperiod
  \gcatattr{dis\-card\-pe\-riod}%
  {
    \syntax{\meta{boolean}}
    \desc{this attribute is provided for abbreviations that end in a
     \idx{fullstop}. If set to \code{true}, indicates that
    the \idx{postlinkhook} will discard a \idx{fullstop} that
    follows \emph{non-plural} commands like \gls{gls} or \gls{glstext}}
  }
  % pluraldiscardperiod
  \gcatattr{plu\-ral\-dis\-card\-pe\-riod}%
  {
    \syntax{\meta{boolean}}
    \desc{as \catattr{discardperiod} but for plural commands like \gls{glspl}}
  }
  % insertdots
  \gcatattr{insert\-dots}%
  {
    \syntax{\meta{boolean}}
    \desc{if set to \code{true}, this attribute indicates that
    the abbreviation short form should have a \idx{fullstop} automatically
    inserted after every character}
  }
  % accessinsertdots
  \gcatattr{access\-insert\-dots}%
  {
    \syntax{\meta{boolean}}
    \desc{if set to \code{true}, this attribute indicates that
    the abbreviation accessibility replacement (provided in the
    \gloskey{shortaccess} key) should have a \idx{fullstop} automatically
    inserted after every character. Only checked if
   \catattr{insertdots} hasn't been set}
  }
  % retainfirstuseperiod
  \gcatattr{retain\-first\-use\-pe\-riod}
  {
    \providedby{\sty{glossaries-extra} v1.01+}
    \syntax{\meta{boolean}}
    \desc{if set, the \idx{fullstop} won't be discarded for
    \idx{firstuse} with \catattr{discardperiod} or
    \catattr{pluraldiscardperiod}}
  }
  % noshortplural
  \gcatattr{no\-short\-plural}%
  {%
     \syntax{\meta{boolean}}
     \desc{if set to \code{true}, this attribute indicates that
     abbreviations should have the \gloskey{shortplural} field set to the
     same as the \gloskey{short} value by default}
  }
  % accessnoshortplural
  \gcatattr{access\-no\-short\-plural}%
  {%
     \syntax{\meta{boolean}}
     \desc{if set to \code{true} and \gloskey{shortpluralaccess}
     hasn't been set, this attribute indicates that
     abbreviations should have the \gloskey{shortpluralaccess} field set to the
     same as the \gloskey{shortaccess} value by default}
  }
  % aposplural
  \gcatattr{apos\-plural}%
  {%
     \syntax{\meta{boolean}}
     \desc{if set to \code{true}, this attribute indicates that
     abbreviations should have the \gloskey{shortplural} field set to the
     short form followed by \code{'\gls{abbrvpluralsuffix}} by default}
  }
  % accessaposplural
  \gcatattr{access\-apos\-plural}%
  {%
     \syntax{\meta{boolean}}
     \desc{if set to \code{true} and \gloskey{shortpluralaccess}
     hasn't been set, this attribute indicates that
     abbreviations should have the \gloskey{shortpluralaccess} field set to the
     short form followed by \code{'\gls{glsxtrpluralsuffix}} by default}
  }
  % nameshortaccess
  \gcatattr{name\-short\-access}
  {%
     \syntax{\meta{boolean}}
     \desc{if the \gloskey{access} hasn't been set then if this
     attribute is \code{true}, the \gloskey{access} field will be
     set to the \gloskey{shortaccess}}
  }
  % textshortaccess
  \gcatattr{text\-short\-access}
  {%
     \syntax{\meta{boolean}}
     \desc{if the \gloskey{textaccess} hasn't been set then if this
     attribute is \code{true}, the \gloskey{textaccess} field will be
     set to the \gloskey{shortaccess} and, likewise, if the
     \gloskey{pluralaccess} field hasn't been set it will be set to the
     \gloskey{shortpluralaccess}}
  }
  % firstshortaccess
  \gcatattr{first\-short\-access}
  {%
     \syntax{\meta{boolean}}
     \desc{if the \gloskey{firstaccess} hasn't been set then if this
     attribute is \code{true}, the \gloskey{firstaccess} field will be
     set to the \gloskey{shortaccess} and, likewise, if the
     \gloskey{firstpluralaccess} field hasn't been set it will be set to the
     \gloskey{shortpluralaccess}}
  }
  % tagging
  \gcatattr{tagging}%
  {
     \syntax{\meta{boolean}}
     \desc{if set to \code{true}, this attribute indicates that
     abbreviations with the associated category use the command
     defined with \gls{GlsXtrEnableInitialTagging} to tag initials}
  }
  % textformat
  \gcatattr{text\-format}%
  {
    \syntax{\meta{cs-name}}
    \desc{if set, the value should be the name of a control sequence
    (without the leading backslash) that should be used to
    encapsulate the link text (instead of \gls{glstextformat})}
  }
  % innertextformat
  \gcatattr{inner\-text\-format}%
  {
    \syntax{\meta{cs-name}}
    \desc{when used with \gls{glsxtrattrentrytextfmt}, the value
     should be the name of a control sequence (without the leading
     backslash)}
  }
  % nohyper
  \gcatattr{no\-hyper}
  {
     \syntax{\meta{boolean}}
     \desc{if set to \code{true}, this attribute indicates that
     the hyperlink should be switched off for commands like \gls{gls}}
  }
  % nohyperfirst
  \gcatattr{no\-hyper\-first}
  {
     \syntax{\meta{boolean}}
     \desc{if set to \code{true}, this attribute indicates that
     the hyperlink should be switched off on \idx{firstuse} of the
     \idx{glslike} commands}
  }
  % nohypernext
  \gcatattr{no\-hyper\-next}
  {
     \syntax{\meta{boolean}}
     \desc{if set to \code{true}, this attribute indicates that
     the hyperlink should be switched off on \idx{subsequentuse} of the
     \idx{glslike} commands}
  }
  % indexonlyfirst
  \gcatattr{index\-only\-first}
  {
     \syntax{\meta{boolean}}
     \desc{if set to \code{true}, this attribute indicates that
     \idx{indexing} should only occur on \idx{firstuse}}
  }
  % indexname
  \gcatattr{index\-name}
  {
    \providedby{\sty{glossaries-extra}}
     \syntax{\margm{value}}
    \desc{used by the \idx{postnamehook} with
     \gls{glsxtrdoautoindexname} to indicate that an entry
     needs to be automatically indexed with \gls{index}. The value
     may be \code{true} or the encap}
  }
  % wrgloss
  \gcatattr{wr\-gloss}
  {
    \syntax{\meta{value}}
    \desc{determines whether the \idx{indexing} is performed before or
     after the \idx{linktext}. If the value is \code{after} then
     \glsoptval{wrgloss}{after} otherwise it implements
     \glsoptval{wrgloss}{before}}
  }
  % hyperoutside
  \gcatattr{hyper\-out\-side}
  {
     \syntax{\meta{boolean}}
     \desc{if set to \code{true}, this attribute indicates that
     the hyperlink should be outside of the outer formatting command}
  }
  % headuc
  \gcatattr{head\-uc}%
  {%
    \syntax{\meta{boolean}}
    \desc{if set to \code{true}, this attribute indicates that the
      text produced by commands like \gls{glsfmttext} should be converted
      to \idx+{allcaps} when they appear in a page header}
  }
  % encapnocase
  \gcatattr{en\-cap\-no\-case}
  {
    \syntax{\meta{internal field list}}
    \desc{if set, all the listed fields (identified by their
     \idx{internalfieldlabel}) will have their values encapsulated
     with \gls{NoCaseChange} when an entry with the associated category is defined}
  }
  % encapinnerfmt
  \gcatattr{en\-cap\-inner\-fmt}
  {
    \syntax{\meta{internal field list}}
    \desc{if set, all the listed fields (identified by their
     \idx{internalfieldlabel}) will have their values encapsulated
     with the inner formatting command \gls{glsxtrgenentrytextfmt}
    when an entry with the associated category is defined}
  }
  % encapnocaseinnerfmt
  \gcatattr{en\-cap\-no\-case\-inner\-fmt}
  {
    \syntax{\meta{internal field list}}
    \desc{combines \catattr{encapnocase} and \catattr{encapinnerfmt}
     for the same field set}
  }
  % entrycount
  \gcatattr{en\-try\-count}
  {
    \syntax{\meta{trigger-value}}
    \desc{when used with entry counting, this attribute provides the trigger value}
  }
  % unitcount
  \gcatattr{unit\-count}
  {
    \syntax{\meta{counter}}
    \desc{when used with unit entry counting, this attribute
     provides the name of the counter associated with the unit}
  }
  % recordcount
  \gcatattr{record\-count}
  {
    \syntax{\meta{trigger-value}}
    \desc{when used with record counting, this attribute provides the trigger value}
  }
  % multioptions
  \gcatattr{multi\-options}
  {
     \syntax{\meta{options}}
     \desc{default options to apply to any multi-entry set for the
      given category}
  }
  % glossname
  \gcatattr{gloss\-name}
  {
     \syntax{\meta{value}}
     \desc{indicates if any \idx{casechange} should be applied
     within \gls{glossentryname}}
  }
  % glossdesc
  \gcatattr{gloss\-desc}
  {
     \syntax{\meta{value}}
     \desc{indicates if any \idx{casechange} should be applied
     within \gls{glossentrydesc}}
  }
  % glossnamefont
  \gcatattr{gloss\-name\-font}
  {
     \syntax{\meta{cs-name}}
     \desc{the control sequence name (without the leading backslash)
     to format the name within \gls{glossentryname}}
  }
  % glossdescfont
  \gcatattr{gloss\-desc\-font}
  {
     \syntax{\meta{cs-name}}
     \desc{the control sequence name (without the leading backslash)
     to format the description within \gls{glossentrydesc}}
  }
  % glosssymbolfont
  \gcatattr{gloss\-symbol\-font}
  {
     \syntax{\meta{cs-name}}
     \desc{the control sequence name (without the leading backslash)
     to format the symbol within \gls{glossentrysymbol}}
  }
  % linkcount
  \gcatattr{link\-count}
  {
    \syntax{\meta{boolean}}
    \desc{if true, link counting is enabled}
  }
  % linkcountmaster
  \gcatattr{link\-count\-master}
  {
    \syntax{\meta{counter-name}}
    \desc{if link counting is enabled, the value should be the name
     of the counter that needs to have its reset list updated}
  }
  % dualindex
  \gcatattr{dual\-index}
  {
    \syntax{\meta{value}}
    \desc{if set, implement dual indexing}
  }
  % targeturl
  \gcatattr{target\-url}
  {
    \syntax{\meta{url}}
    \desc{if set, indicates the target URL for the hyperlinks
    created by the \idx{glslike} and \idx{glstextlike} commands}
  }
  % targetname
  \gcatattr{target\-name}
  {
    \syntax{\meta{anchor}}
    \desc{if set, the named anchor within the URL provided by
     \catattr{targeturl}}
  }
  % targetcategory
  \gcatattr{target\-category}
  {
    \syntax{\meta{anchor}}
    \desc{if set, the named anchor category within the URL provided by
     \catattr{targeturl} (combined with \catattr{targetname})}
  }
  % externallocation
  \gcatattr{external\-location}
  {
    \providedby{\sty{glossaries-extra} v1.14+}
    \syntax{\meta{PDF filename}}
    \desc{if set, the value is the filename of the external target PDF document
      (used by \gls{glsxtrsupphypernumber})}
  }
  % combinedsep
  \gcatattr{combined\-sep}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\meta{separator}}
    \desc{if set, indicates separator to use in \gls{glscombinedsep}}
  }
  % combinedsepfirst
  \gcatattr{combined\-sep\-first}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\meta{separator}}
    \desc{if set, indicates separator to use in \gls{glscombinedsepfirst}}
  }
  % combinedfirstsepfirst
  \gcatattr{combined\-first\-sep\-first}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\meta{separator}}
    \desc{if set, indicates separator to use in \gls{glscombinedfirstsepfirst}}
  }
  % combinedfirstsep
  \gcatattr{combined\-first\-sep}
  {
    \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\meta{separator}}
    \desc{if set, indicates separator to use in \gls{glscombinedfirstsep}}
  }
  % COMMANDS: bib2gls
  % \BibGlsOptions
  \gcmd{Bib\-Gls\-Options}%
  {%
    \providedby{\sty{glossaries-extra} v1.54+}
    \syntax{\margm{options}}
    \desc{supply global \app{bib2gls} options (instead of using
command line switches)}
  }
  % \glsxtrresourcefile
  \gcmd{gls\-xtr\-re\-source\-file}%
  {%
    \deprecated
    \providedby{\sty{glossaries-extra} v1.11+}
    \syntax{\oargm{options}\margm{basename}}
    \field{seealso}{idx.resourceopt,GlsXtrLoadResources}
    \desc{for use with \app{bib2gls}, this both sets up the options
     for the \idx{resourceset} (which \app{bib2gls} can detect from the
     \ext{aux} file) and inputs the file \metafilefmt{}{basename}{.glstex} file 
     created by \app{bib2gls}. This command is now deprecated. Use
     \gls{glsbibdata} instead}
  }
  % \glsbibdata
  \gcmd{gls\-bib\-data}%
  {%
    \providedby{\sty{glossaries-extra} v1.55+}
    \syntax{\oargm{options}\margm{bib-list}}
    \field{seealso}{idx.resourceopt,GlsXtrLoadResources}
    \desc{shortcut that uses \gls{GlsXtrLoadResources} with
    \resourceopt{src} set to \meta{bib-list}}
  }
  % \GlsXtrLoadResources
  \gcmd{Gls\-Xtr\-Load\-Re\-sources}%
  {%
    \providedby{\sty{glossaries-extra} v1.11+}
    \syntax{\oargm{options}}
    \field{seealso}{idx.resourceopt}
    \desc{for use with \app{bib2gls}, this both sets up the options
     for the \idx{resourceset} (which \app{bib2gls} can detect from the
     \ext{aux} file) and inputs the file \metafilefmt{}{basename}{.glstex} 
     created by \app{bib2gls} (if it exists), where
     the \meta{basename} is obtained from \gls{jobname} and
     \gls{glsxtrresourcecount}}
  }
  % \glsxtrresourcecount
  \gcmd{gls\-xtr\-re\-source\-count}%
  {%
    \providedby{\sty{glossaries-extra} v1.12+}
    \desc{a count register that is incremented on each use of
     \gls{GlsXtrLoadResources} to provide a unique basename for each
     \idx{resourceset}}
  }
  % \glsxtrresourceinit
  \gcmd{gls\-xtr\-re\-source\-init}%
  {%
    \providedby{\sty{glossaries-extra} v1.21+}
    \desc{may be defined to temporarily change command definitions
    before information is written to the \ext{aux} file by the protected
    write used by \gls{GlsXtrLoadResources}}
    \field{seealso}{GlsXtrResourceInitEscSequences}
  }
  % \GlsXtrResourceInitEscSequences
  \gcmd{Gls\-Xtr\-Re\-source\-Init\-Esc\-Sequences}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.51+}
    \desc{may be added to the definition of \gls{glsxtrresourceinit}
    to temporarily change the definitions of commands that may be used
    in regular expressions or within the \resourceopt{assign-fields}
    resource option}
  }
  % \GlsXtrDefaultResourceOptions
  \gcmd{Gls\-Xtr\-De\-fault\-Re\-source\-Options}%
  {%
    \providedby{\sty{glossaries-extra} v1.40+}
    \desc{expands to default \idxpl{resourceopt}}
  }
  % \glsxtr@resource
  \gcmd{gls\-xtr\-@\-re\-source}%
  {%
     \providedby{\sty{glossaries-extra} v1.08+}
    \syntax{\margm{options}\margm{basename}}
    \desc{used in the \ext{aux} file to provide the
          \idxpl{resourceopt} for \app{bib2gls} for each \idx{resourceset}.
          Ignored by \LaTeX}
  }
  % \glsxtr@record
  \gcmd{gls\-xtr\-@\-record}%
  {%
     \providedby{\sty{glossaries-extra} v1.08+}
    \syntax{\margm{entry-label}\margm{h-prefix}\margm{counter}\margm{encap}\margm{location}}
    \desc{used in the \ext{aux} file to provide the \record\ for
    \app{bib2gls} (\opteqvalref{record}{only}). Ignored by \LaTeX}
  }
  % \glsxtr@record@nameref
  \gcmd{gls\-xtr\-@\-record\-@\-name\-ref}%
  {%
     \providedby{\sty{glossaries-extra} v1.37+}
    \syntax{\margm{entry-label}\margm{h-prefix}\margm{counter}\margm{encap}\margm{location}\margm{current title}\margm{current anchor}\margm{the-h-counter}}
    \desc{used in the \ext{aux} file to provide the
          \optvalref{record}{nameref} \record\ for \app{bib2gls}. Ignored by \LaTeX}
  }
  % \glsxtrMFUsave
  \gcmd{gls\-xtr\-MFU\-save}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \desc{used on the first instance of \gls{GlsXtrLoadResources},
      this will add \gls{MFUsave} to the begin document hook and
      then disable itself. This is provided to help \app{bib2gls}
      pick up any of \sty{mfirstuc}['s] exclusions, blockers and
      mappings to assist with its \idx{sentencecase} function}
  }
  % \bibgls@input
  \gcmd{bib\-gls\-@\-in\-put}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
     \syntax{\margm{filename}}
     \desc{indicates that the \app{bib2gls} records are in the file
     identified in the argument \meta{filename}, which corresponds 
     to the file \metafilefmt{}{basename}{.aux} identified in the option 
     \optval{bibglsaux}{\meta{basename}}}
  }
  % \IfTeXParserLib
  \gcmd{If\-TeX\-Parser\-Lib}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\margm{\TeX\ parser lib code}\margm{\LaTeX\ code}}
    \desc{defined by \sty{glossaries-extra-bib2gls} to \meta{\LaTeX\ code}
     but defined by the \TeX\ parser library to expand to
     \meta{\TeX\ parser lib code}}
    \field{seealso}{IfNotBibGls}
  }
  % \IfNotBibGls
  \gcmd{If\-Not\-Bib\-Gls}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.54+}
    \syntax{\margm{\LaTeX\ code}\margm{bib2gls code}}
    \desc{defined by \sty{glossaries-extra-bib2gls} to \meta{\LaTeX\ code}
     but defined by \app{bib2gls}['s] interpreter to expand to
     \meta{bib2gls code}}
    \field{seealso}{IfTeXParserLib}
  }
  % \glshex
  \gcmd{gls\-hex}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.21+}
    \syntax{\meta{hex}}
    \desc{expands to \code{\gls{string}\gls{u}\meta{hex}}}
    \field{seealso}{GlsXtrResourceInitEscSequences}
  }
  % \u
  \gcmd{u}
  {
    \syntax{\meta{hex}}
    \desc{recognised by \app{bib2gls} within some \idxpl{resourceopt}
    as identifying the Unicode character given by \meta{hex}. Since
    \csfmt{u} is defined by the \LaTeX\ kernel as an accent
    command, you need to protect it from expansion while the options 
    are written to the \ext{aux} file (\code{\gls{string}\csfmt{u}\meta{hex}})}
    \field{seealso}{glshex,GlsXtrResourceInitEscSequences}
  }
  % \glscapturedgroup
  \gcmd{gls\-captured\-group}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.31+}
    \syntax{\meta{n}}
    \desc{expands to \code{\gls{string}\gls{dollar}\meta{n}}. Note
    that this isn't the same as \gls{MGP}}
  }
  % \glshashchar
  \gcmd{gls\-hash\-char}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{expands to a literal hash \idx{sym.hash}}
  }
  % \cs
  \gcmd{cs}
  {
     \syntax{\margm{csname}}
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{csname}}
  }
  % \CS
  \gcmd{CS}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{CS}}
  }
  % \NULL
  \gcmd{NULL}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{NULL}}
  }
  % \IN
  \gcmd{IN}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{IN}}
  }
  % \NIN
  \gcmd{NIN}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{NIN}}
  }
  % \PREFIXOF
  \gcmd{PREFIX\-OF}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{PREFIXOF}}
  }
  % \NOTPREFIXOF
  \gcmd{NOT\-PREFIX\-OF}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{NOTPREFIXOF}}
  }
  % \SUFFIXOF
  \gcmd{SUFFIX\-OF}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{SUFFIXOF}}
  }
  % \NOTSUFFIXOF
  \gcmd{NOT\-SUFFIX\-OF}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{NOTSUFFIXOF}}
  }
  % \LC
  \gcmd{LC}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{LC}}
  }
  % \UC
  \gcmd{UC}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{UC}}
  }
  % \TITLE
  \gcmd{TITLE}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{TITLE}}
  }
  % \FIRSTLC
  \gcmd{FIRSTLC}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{FIRSTLC}}
  }
  % \FIRSTUC
  \gcmd{FIRSTUC}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{FIRSTUC}}
  }
  % \MGP
  \gcmd{MGP}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{MGP}. Note that this isn't the same as
    \gls{glscapturedgroup}}
  }
  % \LEN
  \gcmd{LEN}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{LEN}}
  }
  % \CAT
  \gcmd{CAT}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{CAT}}
  }
  % \TRIM
  \gcmd{TRIM}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{TRIM}}
  }
  % \INTERPRET
  \gcmd{INTERPRET}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{INTERPRET}}
  }
  % \LABELIFY
  \gcmd{LABELIFY}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{LABELIFY}}
  }
  % \LABELIFYLIST
  \gcmd{LABELIFYLIST}
  {
     \desc{defined by \gls{GlsXtrResourceInitEscSequences} to expand
     to detokenized \csfmt{LABELIFYLIST}}
  }
  % \GlsXtrBibTeXEntryAliases
  \gcmd{Gls\-Xtr\-Bib\-TeX\-Entry\-Aliases}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.29+}
    \desc{expands to the \BibTeX\ to \app{bib2gls} entry aliases
     for use in \resourceopt{entry-type-aliases}}
  }
  % \GlsXtrProvideBibTeXFields
  \gcmd{Gls\-Xtr\-Provide\-Bib\-TeX\-Fields}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.29+}
    \desc{provides the standard \BibTeX\ fields as glossary entry
    keys (using \gls{glsaddstoragekey})}
  }
  % \glsxtrbibaddress
  \gcmd{gls\-xtr\-bib\-address}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{address} field}
  }
  % \glsxtrbibauthor
  \gcmd{gls\-xtr\-bib\-author}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{author} field}
  }
  % \glsxtrbibbooktitle
  \gcmd{gls\-xtr\-bib\-book\-title}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{booktitle} field}
  }
  % \glsxtrbibchapter
  \gcmd{gls\-xtr\-bib\-chapter}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{chapter} field}
  }
  % \glsxtrbibedition
  \gcmd{gls\-xtr\-bib\-edition}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{edition} field}
  }
  % \glsxtrbibhowpublished
  \gcmd{gls\-xtr\-bib\-how\-published}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{howpublished} field}
  }
  % \glsxtrbibinstitution
  \gcmd{gls\-xtr\-bib\-institution}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{institution} field}
  }
  % \glsxtrbibjournal
  \gcmd{gls\-xtr\-bib\-journal}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{journal} field}
  }
  % \glsxtrbibmonth
  \gcmd{gls\-xtr\-bib\-month}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{month} field}
  }
  % \glsxtrbibnote
  \gcmd{gls\-xtr\-bib\-note}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{note} field}
  }
  % \glsxtrbibnumber
  \gcmd{gls\-xtr\-bib\-number}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{number} field}
  }
  % \glsxtrbiborganization
  \gcmd{gls\-xtr\-bib\-organization}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{organization} field}
  }
  % \glsxtrbibpages
  \gcmd{gls\-xtr\-bib\-pages}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{pages} field}
  }
  % \glsxtrbibpublisher
  \gcmd{gls\-xtr\-bib\-publisher}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{publisher} field}
  }
  % \glsxtrbibschool
  \gcmd{gls\-xtr\-bib\-school}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{school} field}
  }
  % \glsxtrbibseries
  \gcmd{gls\-xtr\-bib\-series}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{series} field}
  }
  % \glsxtrbibtitle
  \gcmd{gls\-xtr\-bib\-title}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{title} field}
  }
  % \glsxtrbibvolume
  \gcmd{gls\-xtr\-bib\-volume}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{volume} field}
  }
  % \glsxtrbibtype
  \gcmd{gls\-xtr\-bib\-type}
  {
    \note{defined by \gls{GlsXtrProvideBibTeXFields}}
    \syntax{\margm{entry-label}}
    \desc{accesses the \fieldfmt{bibtextype} field}
  }
  % \glsxtrprovidecommand
  \gcmds{gls\-xtr\-provide\-command}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \syntax{\margm{cs}\oargm{n}\oargm{default}\margm{definition}}
    \desc{just uses \gls{providecommand} within the \LaTeX\ document
    but is treated as \gls{renewcommand} by \app{bib2gls}['s]
    interpreter}
  }
  % \glsrenewcommand
  \gcmds{gls\-re\-new\-command}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\margm{cs}\oargm{n}\oargm{default}\margm{definition}}
    \desc{like \gls{renewcommand} but only issues a warning instead
     of an error if the command hasn't been defined}
  }
  % \GlsXtrIndexCounterLink
  \gcmd{Gls\-Xtr\-Index\-Counter\-Link}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.29+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{creates a hyperlink (if supported) to the target
     obtained from \glosfield{indexcounter}, if the field has been
     defined with the given hyperlink text (otherwise just does
     \meta{text})}
  }
  % \Alpha
  \gcmd{Alpha}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{A}}}
  }
  % \Beta
  \gcmd{Beta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{B}}}
  }
  % \Epsilon
  \gcmd{Epsilon}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{E}}}
  }
  % \Zeta
  \gcmd{Zeta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{Z}}}
  }
  % \Eta
  \gcmd{Eta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{H}}}
  }
  % \Iota
  \gcmd{Iota}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{I}}}
  }
  % \Kappa
  \gcmd{Kappa}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{K}}}
  }
  % \Mu
  \gcmd{Mu}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{M}}}
  }
  % \Nu
  \gcmd{Nu}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{N}}}
  }
  % \Omicron
  \gcmd{Omicron}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{O}}}
  }
  % \omicron
  \gcmd{omicron}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{O}}}
  }
  % \Rho
  \gcmd{Rho}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{P}}}
  }
  % \Tau
  \gcmd{Tau}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{T}}}
  }
  % \Chi
  \gcmd{Chi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{X}}}
  }
  % \Digamma
  \gcmd{Digamma}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand}, this just does 
    \code{\cmd{mathrm}\marg{F}}}
  }
  % \Upalpha
  \gcmd{Upalpha}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{A}}}
  }
  % \Upbeta
  \gcmd{Upbeta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{B}}}
  }
  % \Upepsilon
  \gcmd{Upepsilon}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{E}}}
  }
  % \Upzeta
  \gcmd{Upzeta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{Z}}}
  }
  % \Upeta
  \gcmd{Upeta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{H}}}
  }
  % \Upiota
  \gcmd{Upiota}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{I}}}
  }
  % \Upkappa
  \gcmd{Upkappa}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{K}}}
  }
  % \Upmu
  \gcmd{Upmu}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{M}}}
  }
  % \Upnu
  \gcmd{Upnu}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{N}}}
  }
  % \Upomicron
  \gcmd{Upomicron}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{O}}}
  }
  % \upomicron
  \gcmd{upomicron}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{o}}}
  }
  % \Uprho
  \gcmd{Uprho}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{P}}}
  }
  % \Uptau
  \gcmd{Uptau}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{T}}}
  }
  % \Upchi
  \gcmd{Upchi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{defined with \gls{providecommand} and only if
     \sty{upgreek} has been loaded, this just does 
    \code{\cmd{mathrm}\marg{X}}}
  }
  % \glsxtrcontrolrules
  \gcmd{gls\-xtr\-control\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to control character sort rules}
  }
  % \glsxtrcontrolIrules
  \gcmd{gls\-xtr\-control\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.54+}
    \desc{expands to a subset of equivalent control character sort rules}
  }
  % \glsxtrcontrolIIrules
  \gcmd{gls\-xtr\-control\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.54+}
    \desc{expands to a subset of ordered control character sort rules
     (information separators)}
  }
  % \glsxtrspacerules
  \gcmd{gls\-xtr\-space\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to space character sort rules}
  }
  % \glsxtrnonprintablerules
  \gcmd{gls\-xtr\-non\-printable\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to non-printable character sort rules}
  }
  % \glsxtrcombiningdiacriticrules
  \gcmd{gls\-xtr\-combining\-diacritic\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to all the combining diacritic sort rules}
  }
  % \glsxtrcombiningdiacriticIrules
  \gcmd{gls\-xtr\-combining\-diacritic\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the first set of combining diacritic sort rules}
  }
  % \glsxtrcombiningdiacriticIIrules
  \gcmd{gls\-xtr\-combining\-diacritic\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the second set of combining diacritic sort rules}
  }
  % \glsxtrcombiningdiacriticIIIrules
  \gcmd{gls\-xtr\-combining\-diacritic\-III\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the third set of combining diacritic sort rules}
  }
  % \glsxtrcombiningdiacriticIVrules
  \gcmd{gls\-xtr\-combining\-diacritic\-IV\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the fourth set of combining diacritic sort rules}
  }
  % \glsxtrhyphenrules
  \gcmd{gls\-xtr\-hyphen\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{combines the hyphen character sort rules \gls{glsxtrhyphenIrules}
    and the minus sort rules \gls{glsxtrminusrules}}
  }
  % \glsxtrhyphenIrules
  \gcmd{gls\-xtr\-hyphen\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{expands to equivalent hyphen character sort rules (excluding minus
signs)}
  }
  % \glsxtrhyphenIIrules
  \gcmd{gls\-xtr\-hyphen\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{expands to ordered hyphen character sort rules}
  }
  % \glsxtrminusrules
  \gcmd{gls\-xtr\-minus\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{expands to minus character sort rules (excluding the
     \gls{ascii} hyphen/minus character)}
  }
  % \glsxtrgeneralpuncrules
  \gcmd{gls\-xtr\-general\-punc\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to all sets of general punctuation sort rules}
  }
  % \glsxtrgeneralpuncIrules
  \gcmd{gls\-xtr\-general\-punc\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the first set of general punctuation (including
    currency) sort rules}
  }
  % \glsxtrgeneralpuncmarksrules
  \gcmd{gls\-xtr\-general\-punc\-marks\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{punctuation mark subset of \gls{glsxtrgeneralpuncIrules}}
  }
  % \glsxtrgeneralpuncdotrules
  \gcmd{gls\-xtr\-general\-punc\-dot\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{punctuation dot marks subset}
  }
  % \glsxtrgeneralpuncaccentsrules
  \gcmd{gls\-xtr\-general\-punc\-accents\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{punctuation accent subset of \gls{glsxtrgeneralpuncIrules}}
  }
  % \glsxtrgeneralpuncquoterules
  \gcmd{gls\-xtr\-general\-punc\-quote\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{punctuation quote subset of \gls{glsxtrgeneralpuncIrules}}
  }
  % \glsxtrgeneralpuncbracketrules
  \gcmd{gls\-xtr\-general\-punc\-bracket\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{punctuation bracket subset of \gls{glsxtrgeneralpuncIrules}}
  }
  % \glsxtrgeneralpuncbracketIrules
  \gcmd{gls\-xtr\-general\-punc\-bracket\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{first punctuation bracket subset}
  }
  % \glsxtrgeneralpuncbracketIIrules
  \gcmd{gls\-xtr\-general\-punc\-bracket\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{second punctuation bracket subset (mathematical brackets)}
  }
  % \glsxtrgeneralpuncbracketIIIrules
  \gcmd{gls\-xtr\-general\-punc\-bracket\-III\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{third punctuation bracket subset (extra mathematical brackets)}
  }
  % \glsxtrgeneralpuncbracketIVrules
  \gcmd{gls\-xtr\-general\-punc\-bracket\-IV\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{fourth punctuation bracket subset (ornamental brackets)}
  }
  % \glsxtrgeneralpuncsignrules
  \gcmd{gls\-xtr\-general\-punc\-sign\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{punctuation sign subset of \gls{glsxtrgeneralpuncIrules}}
  }
  % \glsxtrgeneralpuncIIrules
  \gcmd{gls\-xtr\-general\-punc\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the second set of general punctuation sort rules}
  }
  % \glsxtrgeneralpuncIIIrules
  \gcmd{gls\-xtr\-general\-punc\-III\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{expands to the third set of general punctuation sort rules
      (includes \gls{glsxtrminusrules} before plus)}
  }
  % \glsxtrcurrencyrules
  \gcmd{gls\-xtr\-currency\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to currency character sort rules}
  }
  % \glsxtrdigitrules
  \gcmd{gls\-xtr\-digit\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to 0--9 digit character sort rules (includes
   superscript and subscript digits)}
  }
  % \glsxtrBasicDigitrules
  \gcmd{gls\-xtr\-Basic\-Digit\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the Basic Latin digit character sort rules}
  }
  % \glsxtrSubScriptDigitrules
  \gcmd{gls\-xtr\-Sub\-Script\-Digit\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the 0--9 subscript digit character sort rules}
  }
  % \glsxtrSuperScriptDigitrules
  \gcmd{gls\-xtr\-Super\-Script\-Digit\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the 0--9 superscript digit character sort rules}
  }
  % \glsxtrfractionrules
  \gcmd{gls\-xtr\-fraction\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the number forms fraction character sort rules}
  }
  % \glsxtrIgnorableRules
  \gcmd{gls\-xtr\-Ignorable\-Rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{a shortcut that expands to the control rules, space rules
     and non-printable rules}
  }
  % \glsxtrGeneralInitRules
  \gcmd{gls\-xtr\-General\-Init\-Rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{a shortcut that expands to the ignorable rules, 
     combining diacritic rules, hyphen rules, general punctuation
    rules, digit rules, and fraction rules}
  }
  % \glsxtrGeneralPuncRules
  \gcmd{gls\-xtr\-General\-Punc\-Rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.56+}
    \desc{a shortcut that expands to common punctuation
    rules, currency rules, digit rules, and fraction rules}
  }
  % \glsxtrLatinA
  \gcmd{gls\-xtr\-LatinA}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin A (includes 0x00AA and 0x2090)}
  }
  % \glsxtrLatinE
  \gcmd{gls\-xtr\-LatinE}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin E (includes 0x2091)}
  }
  % \glsxtrLatinH
  \gcmd{gls\-xtr\-LatinH}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin H (includes 0x2095)}
  }
  % \glsxtrLatinI
  \gcmd{gls\-xtr\-LatinI}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin I (includes 0x2071)}
  }
  % \glsxtrLatinK
  \gcmd{gls\-xtr\-LatinK}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin K (includes 0x2096)}
  }
  % \glsxtrLatinL
  \gcmd{gls\-xtr\-LatinL}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin L (includes 0x2097)}
  }
  % \glsxtrLatinM
  \gcmd{gls\-xtr\-LatinM}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin M (includes 0x2098)}
  }
  % \glsxtrLatinN
  \gcmd{gls\-xtr\-LatinN}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin N (includes 0x2099)}
  }
  % \glsxtrLatinO
  \gcmd{gls\-xtr\-LatinO}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin O (includes 0x00BA and 0x2092)}
  }
  % \glsxtrLatinP
  \gcmd{gls\-xtr\-LatinP}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin P (includes 0x209A)}
  }
  % \glsxtrLatinS
  \gcmd{gls\-xtr\-LatinS}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin S (includes 0x209B)}
  }
  % \glsxtrLatinT
  \gcmd{gls\-xtr\-LatinT}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin T (includes 0x209C)}
  }
  % \glsxtrLatinX
  \gcmd{gls\-xtr\-LatinX}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin X (includes 0x2093)}
  }
  % \glsxtrLatinSchwa
  \gcmd{gls\-xtr\-Latin\-Schwa}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin schwa}
  }
  % \glsxtrLatinEszettSs
  \gcmd{gls\-xtr\-Latin\-EszettSs}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to rule for \ss and \char"017F\relax s}
  }
  % \glsxtrLatinEszettSz
  \gcmd{gls\-xtr\-Latin\-EszettSz}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to rule for \ss and \char"017F\relax z}
  }
  % \glsxtrLatinEth
  \gcmd{gls\-xtr\-Latin\-Eth}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin eth}
  }
  % \glsxtrLatinThorn
  \gcmd{gls\-xtr\-Latin\-Thorn}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin thorn}
  }
  % \glsxtrLatinAELigature
  \gcmd{gls\-xtr\-Latin\-AE\-Ligature}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin ae-ligature}
  }
  % \glsxtrLatinOELigature
  \gcmd{gls\-xtr\-Latin\-OE\-Ligature}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin oe-ligature}
  }
  % \glsxtrLatinAA
  \gcmd{gls\-xtr\-Latin\-AA}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin \aa}
  }
  % \glsxtrLatinWynn
  \gcmd{gls\-xtr\-Latin\-Wynn}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin wynn}
  }
  % \glsxtrLatinInsularG
  \gcmd{gls\-xtr\-Latin\-InsularG}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin insular G and g, G}
  }
  % \glsxtrLatinOslash
  \gcmd{gls\-xtr\-Latin\-O\-slash}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin \o}
  }
  % \glsxtrLatinLslash
  \gcmd{gls\-xtr\-Latin\-L\-slash}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of Latin \l}
  }
  % \glsxtrGeneralLatinAtoMrules
  \gcmd{gls\-xtr\-General\-Latin\-A\-to\-M\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{expands to the A--M subset of General Latin I sort rules}
  }
  % \glsxtrGeneralLatinNtoZrules
  \gcmd{gls\-xtr\-General\-Latin\-N\-to\-Z\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{expands to the N--Z subset of General Latin I sort rules}
  }
  % \glsxtrGeneralLatinAtoGrules
  \gcmd{gls\-xtr\-General\-Latin\-A\-to\-G\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{expands to the A--G subset of General Latin I sort rules}
  }
  % \glsxtrGeneralLatinHtoMrules
  \gcmd{gls\-xtr\-General\-Latin\-H\-to\-M\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{expands to the H--M subset of General Latin I sort rules}
  }
  % \glsxtrGeneralLatinNtoSrules
  \gcmd{gls\-xtr\-General\-Latin\-N\-to\-S\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{expands to the N--S subset of General Latin I sort rules}
  }
  % \glsxtrGeneralLatinTtoZrules
  \gcmd{gls\-xtr\-General\-Latin\-T\-to\-Z\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{expands to the T--Z subset of General Latin I sort rules}
  }
  % \glsxtrGeneralLatinIrules
  \gcmd{gls\-xtr\-General\-Latin\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the first set of General Latin sort rules}
  }
  % \glsxtrGeneralLatinIIrules
  \gcmd{gls\-xtr\-General\-Latin\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the second set of General Latin sort rules}
  }
  % \glsxtrGeneralLatinIIIrules
  \gcmd{gls\-xtr\-General\-Latin\-III\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the third set of General Latin sort rules}
  }
  % \glsxtrGeneralLatinIVrules
  \gcmd{gls\-xtr\-General\-Latin\-IV\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the fourth set of General Latin sort rules}
  }
  % \glsxtrGeneralLatinVrules
  \gcmd{gls\-xtr\-General\-Latin\-V\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the fifth set of General Latin sort rules}
  }
  % \glsxtrGeneralLatinVIrules
  \gcmd{gls\-xtr\-General\-Latin\-VI\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the sixth set of General Latin sort rules}
  }
  % \glsxtrGeneralLatinVIIrules
  \gcmd{gls\-xtr\-General\-Latin\-VII\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the seventh set of General Latin sort rules}
  }
  % \glsxtrGeneralLatinVIIIrules
  \gcmd{gls\-xtr\-General\-Latin\-VIII\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the eighth set of General Latin sort rules}
  }
  % \glsxtrMathUpGreekIrules
  \gcmd{gls\-xtr\-Math\-Up\-Greek\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the first set of math upright Greek sort rules}
  }
  % \glsxtrMathUpGreekIIrules
  \gcmd{gls\-xtr\-Math\-Up\-Greek\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the second set of math upright Greek sort rules}
  }
  % \glsxtrMathItalicGreekIrules
  \gcmd{gls\-xtr\-Math\-Italic\-Greek\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the first set of math italic Greek sort rules}
  }
  % \glsxtrMathItalicGreekIIrules
  \gcmd{gls\-xtr\-Math\-Italic\-Greek\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the second set of math italic Greek sort rules}
  }
  % \glsxtrMathItalicUpperGreekIrules
  \gcmd{gls\-xtr\-Math\-Italic\-Upper\-Greek\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the first set of math italic \idx{uppercase} Greek sort rules}
  }
  % \glsxtrMathItalicUpperGreekIIrules
  \gcmd{gls\-xtr\-Math\-Italic\-Upper\-Greek\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the second set of math italic \idx{uppercase} Greek sort rules}
  }
  % \glsxtrMathItalicLowerGreekIrules
  \gcmd{gls\-xtr\-Math\-Italic\-Lower\-Greek\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the first set of math italic \idx{lowercase} Greek sort rules}
  }
  % \glsxtrMathItalicLowerGreekIIrules
  \gcmd{gls\-xtr\-Math\-Italic\-Lower\-Greek\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the second set of math italic \idx{lowercase} Greek sort rules}
  }
  % \glsxtrMathGreekIrules
  \gcmd{gls\-xtr\-Math\-Greek\-I\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the first set of math Greek sort rules}
  }
  % \glsxtrMathGreekIIrules
  \gcmd{gls\-xtr\-Math\-Greek\-II\-rules}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{expands to the second set of math Greek sort rules}
  }
  % \glsxtrUpAlpha
  \gcmd{gls\-xtr\-Up\-Alpha}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright alpha}
  }
  % \glsxtrUpBeta
  \gcmd{gls\-xtr\-Up\-Beta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright beta}
  }
  % \glsxtrUpGamma
  \gcmd{gls\-xtr\-Up\-Gamma}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright gamma}
  }
  % \glsxtrUpDelta
  \gcmd{gls\-xtr\-Up\-Delta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright delta}
  }
  % \glsxtrUpEpsilon
  \gcmd{gls\-xtr\-Up\-Epsilon}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright epsilon}
  }
  % \glsxtrUpDigamma
  \gcmd{gls\-xtr\-Up\-Digamma}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright digamma}
  }
  % \glsxtrUpZeta
  \gcmd{gls\-xtr\-Up\-Zeta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright zeta}
  }
  % \glsxtrUpEta
  \gcmd{gls\-xtr\-Up\-Eta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright eta}
  }
  % \glsxtrUpTheta
  \gcmd{gls\-xtr\-Up\-Theta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright theta}
  }
  % \glsxtrUpIota
  \gcmd{gls\-xtr\-Up\-Iota}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright iota}
  }
  % \glsxtrUpKappa
  \gcmd{gls\-xtr\-Up\-Kappa}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright kappa}
  }
  % \glsxtrUpLambda
  \gcmd{gls\-xtr\-Up\-Lambda}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright lambda}
  }
  % \glsxtrUpMu
  \gcmd{gls\-xtr\-Up\-Mu}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright mu}
  }
  % \glsxtrUpNu
  \gcmd{gls\-xtr\-Up\-Nu}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright nu}
  }
  % \glsxtrUpXi
  \gcmd{gls\-xtr\-Up\-Xi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright xi}
  }
  % \glsxtrUpOmicron
  \gcmd{gls\-xtr\-Up\-Omicron}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright omicron}
  }
  % \glsxtrUpPi
  \gcmd{gls\-xtr\-Up\-Pi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright pi}
  }
  % \glsxtrUpRho
  \gcmd{gls\-xtr\-Up\-Rho}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright rho}
  }
  % \glsxtrUpSigma
  \gcmd{gls\-xtr\-Up\-Sigma}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright sigma}
  }
  % \glsxtrUpTau
  \gcmd{gls\-xtr\-Up\-Tau}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright tau}
  }
  % \glsxtrUpUpsilon
  \gcmd{gls\-xtr\-Up\-Upsilon}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright upsilon}
  }
  % \glsxtrUpPhi
  \gcmd{gls\-xtr\-Up\-Phi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright phi}
  }
  % \glsxtrUpChi
  \gcmd{gls\-xtr\-Up\-Chi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright chi}
  }
  % \glsxtrUpPsi
  \gcmd{gls\-xtr\-Up\-Psi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright psi}
  }
  % \glsxtrUpOmega
  \gcmd{gls\-xtr\-Up\-Omega}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math Greek upright omega}
  }
  % \glsxtrMathItalicAlpha
  \gcmd{gls\-xtr\-Math\-Italic\-Alpha}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek alpha}
  }
  % \glsxtrMathItalicBeta
  \gcmd{gls\-xtr\-Math\-Italic\-Beta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek beta}
  }
  % \glsxtrMathItalicGamma
  \gcmd{gls\-xtr\-Math\-Italic\-Gamma}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek gamma}
  }
  % \glsxtrMathItalicDelta
  \gcmd{gls\-xtr\-Math\-Italic\-Delta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek delta}
  }
  % \glsxtrMathItalicEpsilon
  \gcmd{gls\-xtr\-Math\-Italic\-Epsilon}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek epsilon}
  }
  % \glsxtrMathItalicDigamma
  \gcmd{gls\-xtr\-Math\-Italic\-Digamma}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek digamma}
  }
  % \glsxtrMathItalicZeta
  \gcmd{gls\-xtr\-Math\-Italic\-Zeta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek zeta}
  }
  % \glsxtrMathItalicEta
  \gcmd{gls\-xtr\-Math\-Italic\-Eta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek eta}
  }
  % \glsxtrMathItalicTheta
  \gcmd{gls\-xtr\-Math\-Italic\-Theta}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek theta}
  }
  % \glsxtrMathItalicIota
  \gcmd{gls\-xtr\-Math\-Italic\-Iota}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek iota}
  }
  % \glsxtrMathItalicKappa
  \gcmd{gls\-xtr\-Math\-Italic\-Kappa}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek kappa}
  }
  % \glsxtrMathItalicLambda
  \gcmd{gls\-xtr\-Math\-Italic\-Lambda}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek lambda}
  }
  % \glsxtrMathItalicMu
  \gcmd{gls\-xtr\-Math\-Italic\-Mu}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek mu}
  }
  % \glsxtrMathItalicNu
  \gcmd{gls\-xtr\-Math\-Italic\-Nu}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek nu}
  }
  % \glsxtrMathItalicXi
  \gcmd{gls\-xtr\-Math\-Italic\-Xi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek xi}
  }
  % \glsxtrMathItalicOmicron
  \gcmd{gls\-xtr\-Math\-Italic\-Omicron}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek omicron}
  }
  % \glsxtrMathItalicPi
  \gcmd{gls\-xtr\-Math\-Italic\-Pi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek pi}
  }
  % \glsxtrMathItalicRho
  \gcmd{gls\-xtr\-Math\-Italic\-Rho}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek rho}
  }
  % \glsxtrMathItalicSigma
  \gcmd{gls\-xtr\-Math\-Italic\-Sigma}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek sigma}
  }
  % \glsxtrMathItalicTau
  \gcmd{gls\-xtr\-Math\-Italic\-Tau}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek tau}
  }
  % \glsxtrMathItalicUpsilon
  \gcmd{gls\-xtr\-Math\-Italic\-Upsilon}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek upsilon}
  }
  % \glsxtrMathItalicPhi
  \gcmd{gls\-xtr\-Math\-Italic\-Phi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek phi}
  }
  % \glsxtrMathItalicChi
  \gcmd{gls\-xtr\-Math\-Italic\-Chi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek chi}
  }
  % \glsxtrMathItalicPsi
  \gcmd{gls\-xtr\-Math\-Italic\-Psi}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek psi}
  }
  % \glsxtrMathItalicOmega
  \gcmd{gls\-xtr\-Math\-Italic\-Omega}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the variations of math italic Greek omega}
  }
  % \glsxtrMathItalicPartial
  \gcmd{gls\-xtr\-Math\-Italic\-Partial}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the Unicode codepoint for math italic partial differential}
  }
  % \glsxtrMathItalicNabla
  \gcmd{gls\-xtr\-Math\-Italic\-Nabla}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.27+}
    \desc{(sort rule) expands to the Unicode codepoint for nabla}
  }
  % \glsxtrSetWidest
  \gcmd{gls\-xtr\-Set\-Widest}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\margm{type}\margm{level}}
    \desc{written to the \ext{glstex} by the
     \resourceopt{set-widest} option}
  }
  % \glsxtrSetWidestFalback
  \gcmd{gls\-xtr\-Set\-Widest\-Fallback}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\margm{type}\margm{level}}
    \desc{written to the \ext{glstex} by the
     \resourceopt{set-widest} option if \app{bib2gls} can't
      determine the widest name}
  }
  % \GlsXtrIfHasNonZeroChildCount
  \gcmds{Gls\-Xtr\-If\-Has\-Non\-Zero\-Child\-Count}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.47+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{tests if the value in the \glosfield{childcount} field is
    non-zero (using \gls{GlsXtrIfFieldNonZero}). This requires the
    \resourceopt{save-child-count} resource option}
  }
  % \glsxtrdisplaysupploc
  \gcmds{gls\-xtr\-display\-supp\-loc}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.36+}
    \syntax{\margm{prefix}\margm{counter}\margm{format}\margm{src}\margm{location}}
    \desc{like \gls{glsnoidxdisplayloc} but used for supplementary
    locations}
  }
  % \glsxtrmultisupplocation
  \gcmds{gls\-xtr\-multi\-supp\-location}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.36+}
    \syntax{\margm{src}\margm{location}\margm{format}}
    \desc{used by \gls{glsxtrdisplaysupploc} to format the
    location}
  }
  % \glsxtrdisplaylocnameref
  \gcmd{gls\-xtr\-display\-loc\-name\-ref}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\margm{prefix}\margm{counter}\margm{format}\margm{location}\margm{title}\margm{href}\margm{hcounter}\margm{file}}
    \desc{used to display \records\ created with
     \opteqvalref{record}{nameref}}
  }
  % \glsxtrtitlednamereflink
  \gcmd{gls\-xtr\-titled\-name\-ref\-link}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\margm{format}\margm{location}\margm{title}\margm{file}}
    \desc{used by \gls{glsxtrdisplaylocnameref} to display locations
    that have a title and are not associated with the \ctr{page} counter
    and don't have an associated \gls{glsxtrcounterlocfmt} command.
    The anchor is obtained from \gls{glsxtrrecentanchor}}
  }
  % \glsxtrlocationanchor
  \gcmd{gls\-xtr\-location\-anchor}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{defined by \gls{glsxtrdisplaylocnameref} to expand to the
    anchor constructed from \meta{counter} and \meta{hcounter},
    which corresponds to the record counter}
  }
  % \glsxtrrecentanchor
  \gcmd{gls\-xtr\-recent\-anchor}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{defined by \gls{glsxtrdisplaylocnameref} to expand to 
    the \meta{href} argument. This corresponds to the value of
    \gls{@currentHref} when the record was created}
  }
  % \glsxtractualanchor
  \gcmd{gls\-xtr\-actual\-anchor}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \desc{expands to the anchor required by \gls{glsxtrdisplaylocnameref}}
  }
  % \glsxtrsetactualanchor
  \gcmd{gls\-xtr\-set\-actual\-anchor}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\margm{counter}}
    \desc{hook used by \gls{glsxtrdisplaylocnameref} to override
     the default definition of \gls{glsxtractualanchor}}
  }
  % \glsxtr<counter>locfmt
  \gcmdmeta{gls\-xtr}{counter}{loc\-fmt}
  {
    \note{user defined}
    \syntax{\margm{location}\margm{title}}
    \desc{used by \gls{glsxtrdisplaylocnameref} for format a
     \location\ where the counter matches \meta{counter}}
  }
  % \glsxtrequationlocfmt
  \gcmd{gls\-xtr\-equation\-loc\-fmt}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.42+}
    \syntax{\margm{location}\margm{title}}
    \desc{used by \gls{glsxtrdisplaylocnameref} to format a
     \location\ where the counter is \ctr{equation}}
  }
  % \glsxtrwrglossarylocfmt
  \gcmd{gls\-xtr\-wr\-glossary\-loc\-fmt}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.49+}
    \syntax{\margm{location}\margm{title}}
    \desc{used by \gls{glsxtrdisplaylocnameref} to format a
     \location\ where the counter is \ctr{wrglossary}}
  }
  % \glsxtrnamereflink
  \gcmd{gls\-xtr\-name\-ref\-link}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\margm{format}\margm{title}\margm{target}\margm{file}}
    \desc{used by \gls{glsxtrdisplaylocnameref} to create a
     \location\ hyperlink}
  }
  % \glsxtrfmtinternalnameref
  \gcmd{gls\-xtr\-fmt\-internal\-name\-ref}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\margm{target}\margm{format}\margm{file}}
    \desc{used by \gls{glsxtrnamereflink} to create an internal
     \location\ hyperlink}
  }
  % \glsxtrfmtexternalnameref
  \gcmd{gls\-xtr\-fmt\-external\-name\-ref}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\margm{target}\margm{format}\margm{title}\margm{file}}
    \desc{used by \gls{glsxtrnamereflink} to create an external
     \location\ hyperlink}
  }
  % \glsxtrnameloclink
  \gcmd{gls\-xtr\-name\-loc\-link}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.37+}
    \syntax{\margm{prefix}\margm{counter}\margm{format}\margm{location}\margm{text}\margm{file}}
    \desc{create an external \location\ hyperlink using the prefix and counter}
  }
  % RESOURCE OPTIONS
  \gidx{resourceopt}{\name{resource options}%
    \field{text}{resource option}%
    \desc{these options may be used in the optional argument of
    \gls{GlsXtrLoadResources} and \gls{glsbibdata}}
  }
  % resource option loc-prefix
  \gresourceopt{loc\dhyphen prefix}%
  {%
    \syntax{\meta{value}}
    \initval{false}
    \desc{inserts a prefix in front of \idxpl{locationlist}}
  }
  % resource option loc-suffix
  \gresourceopt{loc\dhyphen suffix}%
  {%
    \syntax{\meta{value}}
    \initval{false}
    \desc{inserts a suffix at the end of \idxpl{locationlist}}
  }
  % resource option group-level
  \gresourceopt{group\dhyphen level}
  {
    \syntax{\meta{value}}
    \initval{0}
    \desc{if the \switch{group} switch is used, this indicates which
     \idxpl{hierarchicallevel} should have the \gloskey{group} field
     set. The default is 0, which means the \idx{group} is only set for
     top-level entries. This option has no effect if the default
      \switch{no-group} is in effect}
  }
  % resource option label-prefix
  \gresourceopt{label\dhyphen prefix}%
  {%
    \syntax{\meta{value}}
    \desc{inserts a prefix in front of primary entry labels}
  }
  % resource option dual-prefix
  \gresourceopt{dual\dhyphen prefix}%
  {%
    \syntax{\meta{value}}
    \initval{dual.}
    \desc{inserts a prefix in front of dual entry labels}
  }
  % resource option src
  \gresourceopt{src}%
  {%
    \syntax{\meta{list}}
    \initvalcs{jobname}
    \desc{a comma-separated list of \ext+{bib} files that contain the 
      entry data (the file extension may be omitted)}
  }
  % resource option selection
  \gresourceopt{selection}%
  {%
    \syntax{\meta{value}}
    \initval{recorded and deps and see}
    \desc{the selection criteria}
  }
  % resource option master
  \gresourceopt{master}%
  {%
    \syntax{\meta{basename}}
    \desc{indicates that the resources identified in the given
     \metafilefmt{}{basename}{.aux} file (from another document)
     should be used}
  }
  % resource option copy-to-glossary
  \gresourceopt{copy\dhyphen to\dhyphen glossary}%
  {%
    \syntax{\meta{list}}
    \desc{copy entries to the glossary (or glossaries) whose 
    label is obtained from evaluating the complex string concatenation
    in \meta{list}. See the \app{bib2gls} user guide for the full syntax}
  }
  % resource option omit-fields
  \gresourceopt{omit\dhyphen fields}%
  {%
    \syntax{\meta{list}}
    \desc{omit any field or fields whose 
    field name is obtained from evaluating the complex string concatenation
    in \meta{list}. See the \app{bib2gls} user guide for the full syntax}
  }
  % resource option gather-parsed-dependencies
  \gresourceopt{gather\dhyphen parsed\dhyphen dependencies}%
  {%
    \syntax{\meta{field}}
    \desc{gather the labels of any dependencies found from parsing field
     values and add them as a comma-separated list in the named field.
     If the \meta{field} is omitted, \gloskey{seealso} is assumed}
  }
  % resource option ignored-type
  \gresourceopt{ignored\dhyphen type}%
  {%
    \syntax{\meta{type}}
    \desc{sets the \gloskey{type} field to \meta{type} for all
ignored entries}
  }
  % resource option sort-field
  \gresourceopt{sort\dhyphen field}%
  {%
    \syntax{\meta{value}}
    \initval{sort}
    \desc{the field to use for sorting}
  }
  % resource option break-at
  \gresourceopt{break\dhyphen at}%
  {%
    \syntax{\meta{setting}}
    \initval{word}
    \desc{set the break point construction method}
  }
  % resource option break-marker
  \gresourceopt{break\dhyphen marker}%
  {%
    \syntax{\meta{char}}
    \initval{|}
    \desc{the break point marker used when \resourceopt{break-at} is
     not set to \optfmt{none}}
  }
  % resource option sort-replace
  \gresourceopt{sort\dhyphen replace}%
  {%
    \syntax{\meta{regex list}}
    \desc{the value is a command separated list of
    \margm{regex}\margm{replacement} pairs to perform on the sort value}
  }
  % resource option save-locations
  \gresourceopt{save\dhyphen locations}%
  {%
    \syntax{\meta{value}}
    \initval{true}
    \defval{true}
    \desc{determines whether or not to save the \idx{locationlist}.
This was originally a boolean option but as from \app{bib2gls} v3.0 it
now takes additional values}
  }
  % resource option loc-counters
  \gresourceopt{loc\dhyphen counters}%
  {%
    \syntax{\meta{counter list}}
    \desc{indicates that the \idx{locationlist} should be divided up
    into counter groups corresponding to the listed counters}
  }
  % resource option sort
  \gresourceopt{sort}%
  {%
    \syntax{\meta{value}}
    \initval{resource}
    \desc{identifies the sort method. The default is to use the
    language-sensitive alphabetical sort that matches the resource set's 
    \resourceopt{locale}}
  }
  % resource option locale
  \gresourceopt{locale}%
  {%
    \syntax{\meta{lang-tag}}
    \desc{identifies the resource set's locale. The default is to use the
    document's language or (if not set) the default locale for the Java Runtime Environment}
  }
  % resource option save-index-counter
  \gresourceopt{save\dhyphen index\dhyphen counter}%
  {%
    \syntax{\meta{value}}
    \initval{false}
    \desc{determines whether or not to create the
    \glosfield{indexcounter} \idx{internalfield} with the value set to the first
    \ctr{wrglossary} \location. This option is designed to be used
     with the \opt{indexcounter} package option}
  }
  % resource option save-child-count
  \gresourceopt{save\dhyphen child\dhyphen count}%
  {%
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{if true, each entry will have the total number of child
     entries stored in the \glosfield{childcount} field and the list of
     children will be stored in the \glosfield{childlist} field}
  }
  % resource option post-description-dot
  \gresourceopt{post\dhyphen description\dhyphen dot}%
  {%
    \syntax{\meta{value}}
    \initval{none}
    \desc{appends a \idx{fullstop} to the \gloskey{description} field. 
    Allowed values: \optfmt{none} (no change), \optfmt{all} (append for all selected entries),
    \optfmt{check} (only appends according to certain criteria). Note this inserts the
    punctuation into the field value not in the \idx{postdeschook}.
    See the \app{bib2gls} manual for further details.}
  }
  % resource option alias-loc
  \gresourceopt{alias\dhyphen loc}
  {
    \syntax{\meta{value}}
    \initval{transfer}
    \desc{if an entry has an \gloskey{alias} field, this setting indicates
    whether to keep the \idx{locationlist}, transfer it, or omit it}
  }
  % resource option see
  \gresourceopt{see}
  {
    \syntax{\meta{value}}
    \initval{transfer}
    \desc{if an entry has an \gloskey{see} field, this setting indicates
    whether to show the cross-reference at the start or end of the \idx{locationlist}
    or omit it}
  }
  % resource option seealso
  \gresourceopt{seealso}
  {
    \syntax{\meta{value}}
    \initval{transfer}
    \desc{if an entry has an \gloskey{seealso} field, this setting indicates
    whether to show the cross-reference at the start or end of the \idx{locationlist}
    or omit it}
  }
  % resource option alias
  \gresourceopt{alias}
  {
    \syntax{\meta{value}}
    \initval{transfer}
    \desc{if an entry has an \gloskey{alias} field, this setting indicates
    whether to show the cross-reference at the start or end of the \idx{locationlist}
    or omit it}
  }
  % resource option supplemental-locations
  \gresourceopt{supplemental\dhyphen locations}
  {
    \syntax{\meta{basename list}}
    \desc{add \locations\ from the supplemental documents to the
    corresponding entry's \idx{locationlist}}
  }
  % resource option prune-xr
  \gresourceopt{prune\dhyphen xr}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \desc{shortcut option that enables pruning for both the
    \gloskey{see} and \gloskey{seealso} fields}
  }
  % resource option sort-label-list
  \gresourceopt{sort\dhyphen label\dhyphen list}
  {
    \syntax{\meta{field-list}:\meta{sort}:\meta{csname}}
    \desc{instructs \app{bib2gls} to sort the given field values
    (which must contain comma-separated lists of labels) according 
    to the given sort method. The final \code{:\meta{csname}} is
    optional and indicates that the sort value should be obtained by
    encapsulating the item with the command with the given control
    sequence name (which needs to be recognised by \app{bib2gls})}
  }
  % resource option compound-adjust-name
  \gresourceopt{compound\dhyphen adjust\dhyphen name}
  {
    \syntax{\meta{value}}
    \desc{adjusts the \gloskey{name} of main entries in compound sets}
  }
  % resource option description-case-change
  \gresourceopt{description\dhyphen case\dhyphen change}
  {
    \syntax{\meta{value}}
    \desc{applies a \idx{casechange} to the \gloskey{description} field}
  }
  % resource option name-case-change
  \gresourceopt{name\dhyphen case\dhyphen change}
  {
    \syntax{\meta{value}}
    \desc{applies a \idx{casechange} to the \gloskey{name} field}
  }
  % resource option entry-type-aliases
  \gresourceopt{entry\dhyphen type\dhyphen aliases}
  {
    \syntax{\meta{key=val list}}
    \desc{the value is a comma-separated list of
     \code{\meta{org type}\dequals\meta{new type}} elements, where
     \meta{org type} is the original entry type given in the
     \ext{bib} file (without the leading \code{@}) and \meta{new type}
     is the entry type it should be treated as}
  }
  % resource option combine-dual-locations
  \gresourceopt{combine\dhyphen dual\dhyphen locations}
  {
    \syntax{\meta{value}}
    \desc{indicates whether or not to combine the
     \idxpl{locationlist} for the primary and dual entries, and
      indicates which entry (either or both) should have the \idx{locationlist}}
  }
  % resource option type
  \gresourceopt{type}
  {
    \syntax{\meta{glossary-type}}
    \desc{indicates that primary entries should be
     assigned to the given \idx{glossary}}
  }
  % resource option category
  \gresourceopt{category}
  {
    \syntax{\meta{category-label}}
    \desc{indicates that primary entries should be
     assigned to the given category}
  }
  % resource option group
  \gresourceopt{group}
  {
    \syntax{\meta{group-label}}
    \desc{indicates that primary entries should have the
     \gloskey{group} field set to the given value}
  }
  % resource option trigger-type
  \gresourceopt{trigger\dhyphen type}
  {
    \syntax{\meta{glossary-type}}
    \desc{indicates that entries with trigger records should be
     assigned to the given \idx{glossary}}
  }
  % resource option dual-type
  \gresourceopt{dual\dhyphen type}
  {
    \syntax{\meta{glossary-type}}
    \desc{indicates that dual entries should be
     assigned to the given \idx{glossary}}
  }
  % resource option dual-field
  \gresourceopt{dual\dhyphen field}
  {
    \syntax{\meta{field-name}}
    \initval{false}
    \defval{dual}
    \desc{indicates that dual entry labels should be stored in the
      given field}
  }
  % resource option dual-backlink
  \gresourceopt{dual\dhyphen backlink}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{switches on all the dual backlink settings}
  }
  % resource option flatten
  \gresourceopt{flatten}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{if true, sorting will ignore hierarchy and the
    \gloskey{parent} key won't be used in the \ext{glstex} file, but the
     parent entry will still be considered a dependency (unlike
    \resourceoptvalm{ignore-fields}{parent})}
  }
  % resource option ignore-fields
  \gresourceopt{ignore\dhyphen fields}
  {
    \syntax{\margm{field list}}
    \desc{instructs \app{bib2gls} to ignore the listed fields}
  }
  % resource option short-case-change
  \gresourceopt{short\dhyphen case\dhyphen change}
  {
    \syntax{\meta{setting}}
    \desc{instructs \app{bib2gls} to change the case of any \gloskey{short} fields
according to the given \meta{setting}}
  }
  % resource option secondary
  \gresourceopt{secondary}
  {
    \syntax{\meta{sort}:\meta{field}:\meta{type}}
    \desc{re-sorts the entries according to the given sort
    method, using the value in the given \meta{field} as the sort
    value, and copies the entry to the glossary identified by
    \meta{type}.  The \code{:\meta{field}} may be omitted, in which case
    the \gloskey{sort} field is assumed}
  }
  % resource option symbol-sort-fallback
  \gresourceopt{symbol\dhyphen sort\dhyphen fallback}
  {
    \syntax{\margm{field}}
    \desc{if the \gloskey{sort} key is being used to obtain the sort
     value but the \gloskey{sort} key hasn't been set for any symbol
     entries (for example, \atentry{symbol} or \atentry{number}) then the
     sort value will be obtained from the given \meta{field} instead. If
     the \gloskey{sort} key has been set or if a different field is being
     used for sorting, then this option has no effect}
  }
  % resource option abbreviation-sort-fallback
  \gresourceopt{abbreviation\dhyphen sort\dhyphen fallback}
  {
    \syntax{\margm{field}}
    \desc{if the \gloskey{sort} key is being used to obtain the sort
     value but the \gloskey{sort} key hasn't been set for any abbreviation
     entries (for example, \atentry{abbreviation} or \atentry{acronym}) then the
     sort value will be obtained from the given \meta{field} instead. The
     \meta{field} may be a composite in the form \code{\meta{field1}+\meta{field2}+\ldots}
     (such as \code{\gloskey{long}+\gloskey{short}}). If
     the \gloskey{sort} key has been set or if a different field is being
     used for sorting, then this option has no effect}
  }
  % resource option field-aliases
  \gresourceopt{field\dhyphen aliases}
  {
    \syntax{\margm{src-field=target-field list}}
    \desc{makes \meta{src-field} an alias of \meta{target-field} for
      each pair in the list}
  }
  % resource option replicate-fields
  \gresourceopt{replicate\dhyphen fields}
  {
    \syntax{\margm{key=value list}}
    \desc{where each element in the \meta{key=value list} is in the
     form \code{\meta{src-field}\dequals\meta{dest-field list}}, 
     this copies the value of the field identified by \meta{src-field} to 
     each field in the comma-separated \meta{dest-field list}}
  }
  % resource option assign-fields
  \gresourceopt{assign\dhyphen fields}
  {
    \syntax{\margm{key=value list}}
    \desc{where each element in the \meta{key=value list} is in the
     form \code{\meta{dest-field}\dequals\meta{expression}} that
     assigns the value of \meta{dest-field} to the value obtained
     from \meta{expression}, providing a more complex alternative to 
     \resourceopt{replicate-fields}}
  }
  % resource option interpret-fields
  \gresourceopt{interpret\dhyphen fields}
  {
    \syntax{\margm{field list}}
    \desc{replaces each field in the list with its interpreted value}
  }
  % resource option set-widest
  \gresourceopt{set\dhyphen widest}
  {
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{instructs \app{bib2gls} to determine the widest entry name
     for use with styles like \glostyle{alttree}. Only suitable for
     textual names}
  }
  % resource option sort-rule
  \gresourceopt{sort\dhyphen rule}
  {
    \syntax{\margm{value}}
    \desc{the comparator rule to use with \resourceoptval{sort}{custom}}
  }
  % COMMANDS: LANGUAGE-SENSITIVE
  % \glossaryname
  \gcmd{glossary\-name}%
  {%
    \initval{Glossary}%
    \note{language-sensitive}
    \desc{expands to the default \idx{glossary} title (provided by
    \sty{glossaries} if not already defined)}
  }%
  % \indexname
  \gcmd{index\-name}%
  {%
    \initval{Index}%
    \note{language-sensitive}
    \desc{expands to the index title}
  }%
  % \acronymname
  \gcmd{acronym\-name}%
  {%
    \providedby{\sty{glossaries}}
    \initval{Acronyms}%
    \note{language-sensitive}
    \desc{expands to the title of the \code{acronym} \idx{glossary}}
  }%
  % \abbreviationsname
  \gcmd{abbre\-vi\-a\-tions\-name}%
  {%
    \initval{Abbreviations}%
    \providedby{\sty{glossaries-extra}}
    \note{language-sensitive}
    \desc{expands to the title of the \code{abbreviations} \idx{glossary}.
     The default is \qt{Abbreviations} or \gls{acronymname} if \sty{babel} 
     has been detected}
  }%
  % \glsnumbersgroupname
  \gcmd{gls\-numbers\-group\-name}%
  {%
    \providedby{\sty{glossaries}}
    \initval{Numbers}%
    \note{language-sensitive}
    \desc{expands to the title of the \code{numbers} \idx{group} and
     (if the \opt{numbers} package option is used) the 
     \code{numbers} \idx{glossary}}
  }%
  % \glssymbolsgroupname
  \gcmd{gls\-symbols\-group\-name}%
  {%
    \providedby{\sty{glossaries}}
    \initval{Symbols}%
    \note{language-sensitive}
    \desc{expands to the title of the \code{symbols} \idx{group} and
     (if the \opt{symbols} package option is used) the
     \code{symbols} \idx{glossary}}
  }%
  % \seename
  \gcmd{see\-name}%
  {%
    \initval{see}%
    \note{language-sensitive}
    \desc{used as a cross-reference tag (provided by
     \sty{glossaries} if not already defined)}
  }%
  % \seealsoname
  \gcmd{see\-also\-name}%
  {%
    \providedby{\sty{glossaries-extra} v1.16+}
    \initval{see also}%
    \note{language-sensitive}
    \desc{used as a cross-reference tag. The default value is
    \gls{alsoname}, if that command has been defined, or \qt{see also}}
  }%
  % \alsoname
  \gcmd{also\-name}%
  {%
    \initval{see also}%
    \note{language-sensitive}
    \desc{used as a cross-reference tag (provided by language
     packages, such as \sty{babel})}
  }%
  % \entryname
  \gcmd{entry\-name}%
  {%
    \providedby{\sty{glossaries}}
    \initval{Notation}%
    \note{language-sensitive}
    \desc{expands to the title of the name column for headed
    \env{tabular}-like styles}
  }%
  % \descriptionname
  \gcmd{description\-name}%
  {%
    \providedby{\sty{glossaries}}
    \initval{Description}%
    \note{language-sensitive}
    \desc{expands to the title of the description column for headed
    \env{tabular}-like styles}
  }%
  % \symbolname
  \gcmd{symbol\-name}%
  {%
    \providedby{\sty{glossaries}}
    \initval{Symbol}%
    \note{language-sensitive}
    \desc{expands to the title of the symbol column for headed
    \env{tabular}-like styles}
  }%
  % \pagelistname
  \gcmd{page\-list\-name}%
  {%
    \providedby{\sty{glossaries}}
    \initval{Page List}%
    \note{language-sensitive}
    \desc{expands to the title of the \idx{locationlist} column for headed
    \env{tabular}-like styles}
  }%
  % COMMANDS: PLURAL SUFFIXES
  % \glspluralsuffix
  \gcmd{gls\-plural\-suffix}{
    \desc{expands to the letter \qt{s} and is used to form default
     plurals. This command isn't language-sensitive as there's
     guarantee when it will be expanded. (It may be expanded when
     the entry is defined or it may be expanded when the entry is
     used). If you need to suppress this suffix for abbreviations,
     use the \catattr{noshortplural} attribute. If you need an
     apostrophe before the \qt{s} for single-letter abbreviations to
     avoid ambiguity, use the \catattr{aposplural} attribute}
  }
  % \acrpluralsuffix
  \gcmd{acr\-plural\-suffix}{
    \banned
    \desc{used for the plural suffixes for the base package's
     acronym mechanism. Not used with \sty{glossaries-extra}'s abbreviations,
     which use \gls{glsxtrabbrvpluralsuffix},
    \gls{abbrvpluralsuffix} and commands provided for use with
     particular \idxpl{abbrvstyle}. This command should not be used
     with \sty{glossaries-extra}}
  }
  % \glsxtrabbrvpluralsuffix
  \gcmd{gls\-xtr\-abbrv\-plural\-suffix}{
     \providedby{\sty{glossaries-extra} v1.12+}
    \initvalcs{glspluralsuffix}
    \desc{the default plural suffix used for abbreviations}
  }
  % \abbrvpluralsuffix
  \gcmd{abbrv\-plural\-suffix}{
     %\providedby{\sty{glossaries-extra} v1.0+}
    \initvalcs{glsxtrabbrvpluralsuffix}
    \desc{style-sensitive abbreviation suffix. This is the command
    that's actually used in the value of the \gloskey{shortplural} key
    when an entry is defined with \gls{newabbreviation} (unless
    suppressed with the \catattr{noshortplural} attribute). This command is 
    redefined by the \idxpl{abbrvstyle} to
    \gls{glsxtrabbrvpluralsuffix} or the style's custom suffix command
    (such as \gls{glsxtrscsuffix})}
  }
  % \glsxtrscsuffix
  \gcmd{gls\-xtr\-sc\-suffix}{
    %\providedby{\sty{glossaries-extra} 0.5+}
    \desc{the plural suffix used by the \idx{smallcaps} (\qt{sc})
    \idxpl{abbrvstyle}. This switches off the \idx{smallcaps} font to
    prevent the suffix from also appearing in \idx{smallcaps}}
  }
  % \glsxtrsmsuffix
  \gcmd{gls\-xtr\-sm\-suffix}{
    %\providedby{\sty{glossaries-extra} 0.5+}
    \initvalcs{glsxtrabbrvpluralsuffix}
    \desc{the plural suffix used by the smaller (\qt{sm}) \idxpl{abbrvstyle}
    (such as \abbrstyle{short-sm-long})}
  }
  % \glsxtremsuffix
  \gcmd{gls\-xtr\-em\-suffix}{
    %\providedby{\sty{glossaries-extra} 0.5+}
    \initvalcs{glsxtrabbrvpluralsuffix}
    \desc{the plural suffix used by the emphasized (\qt{em}) \idxpl{abbrvstyle}}
  }
  % \glsxtrusersuffix
  \gcmd{gls\-xtr\-user\-suffix}{
    \providedby{\sty{glossaries-extra} v1.04+}
    \initvalcs{glsxtrabbrvpluralsuffix}
    \desc{the plural suffix used by styles like \abbrstyle{short-long-user}}
  }
  % \glsxtrscusersuffix
  \gcmd{gls\-xtr\-sc\-user\-suffix}{
     \providedby{\sty{glossaries-extra} v1.48+}
    \desc{the plural suffix used by styles like
      \abbrstyle{long-postshort-sc-user}}
  }
  % \glsxtrhyphensuffix
  \gcmd{gls\-xtr\-hyphen\-suffix}{
     \providedby{\sty{glossaries-extra} v1.17+}
    \initvalcs{glsxtrabbrvpluralsuffix}
    \desc{the plural suffix used by the \qt{hyphen} \idxpl{abbrvstyle}
    (such as \abbrstyle{short-hyphen-long-hyphen})}
  }
  % \glsxtronlysuffix
  \gcmd{gls\-xtr\-only\-suffix}{
     \providedby{\sty{glossaries-extra} v1.17+}
    \initvalcs{glsxtrabbrvpluralsuffix}
    \desc{the plural suffix used by the \qt{only} \idxpl{abbrvstyle}
    (such as \abbrstyle{long-only-short-only})}
  }
  % \glsxtrsconlysuffix
  \gcmd{gls\-xtr\-sc\-only\-suffix}{
     \providedby{\sty{glossaries-extra} v1.48+}
    \initvalcs{glsxtrscsuffix}
    \desc{the plural suffix used by the \qt{sc-only} \idxpl{abbrvstyle}
    (such as \abbrstyle{long-only-short-sc-only})}
  }
  % COMMANDS: POST-LINK HOOKS
  % \glspostlinkhook
  \gcmd{gls\-post\-link\-hook}{%
   \providedby{\sty{glossaries} v4.16+}
    \desc{a \idx{postlinkhook} used after all the \idx{glslike} and
    \idx{glstextlike} commands. This is redefined by
    \sty{glossaries-extra} to use \gls{glsxtrpostlinkhook}}
  }
  % \glsxtrpostlinkhook
  \gcmd{gls\-xtr\-post\-link\-hook}{%
   %\providedby{\sty{glossaries-extra} v1.0+}%
   \desc{a \idx{postlinkhook} that 
   checks if a following \idx{fullstop} needs to be discarded, in which case
   it does \gls{glsxtrpostlinkendsentence}, otherwise it does
   \gls{glsxtrpostlink}}
  }
  % \glsxtrpostlinkendsentence
  \gcmd{gls\-xtr\-post\-link\-end\-sentence}
  {
   %\providedby{\sty{glossaries-extra} v1.0+}%
   \desc{a \idx{postlinkhook} that's used if a \idx{fullstop} is
   discarded in order to adjust the space factor (to denote the end
   of a sentence). If the \idx{catpostlinkhook} exists, and will be applied and the
   \idx{fullstop} will be restored}
  }
  % \glsxtrpostlink
  \gcmd{gls\-xtr\-post\-link}{%
    %\providedby{\sty{glossaries-extra} v1.0+}%
    \desc{a \idx{postlinkhook} that does \gls{glsxtrpostlinkcat} if
    that command has been defined, where the category label is
    obtained from the entry that has just been referenced with a
    \idx{glslike} or \idx{glstextlike} command (using \gls{glslabel}).
    Does nothing if \gls{glsxtrpostlinkcat} isn't defined}
  }
  % \glsxtrpostlink<category>
  \gcmd{glsxtrpostlinkcat}{%
    \name{{}\csfmt{gls\-xtr\-post\-link\meta{category}}}
    %\providedby{\sty{glossaries-extra} v1.0+}%
    \desc{the \idx{postlinkhook} associated with the category
    identified by the label \meta{category}}
  }
  % \glsdefpostlink
  \gcmd{gls\-def\-post\-link}{%
    \syntax{\margm{category}\margm{definition}}
    \providedby{\sty{glossaries-extra} v1.31+}%
    \desc{defines \idx{postlinkhook} associated with the category
    identified by the label \meta{category}. This simply (re)defines
    \gls{glsxtrpostlinkcat} for the given \meta{category} to
    \meta{definition}}
  }
  % \glspretopostlink
  \gcmd{gls\-pre\-to\-post\-link}{%
    \syntax{\margm{category}\margm{code}}
    \providedby{\sty{glossaries-extra} v1.49+}%
    \desc{prepends \meta{code} to \idx{postlinkhook} associated with the category
    identified by the label \meta{category} (or simply defines it,
    if it doesn't already exist)}
  }
  % \glsapptopostlink
  \gcmd{gls\-app\-to\-post\-link}{%
    \syntax{\margm{category}\margm{code}}
    \providedby{\sty{glossaries-extra} v1.49+}%
    \desc{appends \meta{code} to \idx{postlinkhook} associated with the category
    identified by the label \meta{category} (or simply defines it,
    if it doesn't already exist)}
  }
  % \glsxtrpostlinkAddDescOnFirstUse
  \gcmd{gls\-xtr\-post\-link\-Add\-Desc\-On\-First\-Use}{%
    %\providedby{\sty{glossaries-extra} v0.3+}%
    \desc{may be used within a \idx{postlinkhook} to display the
    description in parentheses on \idx{firstuse}}
  }
  % \glsxtrpostlinkAddSymbolOnFirstUse
  \gcmd{gls\-xtr\-post\-link\-Add\-Symbol\-On\-First\-Use}{%
    %\providedby{\sty{glossaries-extra} v0.3+}%
    \desc{may be used within a \idx{postlinkhook} to display the
    symbol in parentheses on \idx{firstuse}}
  }
  % \glsxtrpostlinkAddSymbolDescOnFirstUse
  \gcmd{gls\-xtr\-post\-link\-Add\-Symbol\-Desc\-On\-First\-Use}{%
    \providedby{\sty{glossaries-extra} v1.31+}%
    \desc{may be used within a \idx{postlinkhook} to display the
    symbol and description in parentheses on \idx{firstuse}}
  }
  % \glsxtrpostlinkSymbolDescSep
  \gcmd{gls\-xtr\-post\-link\-Symbol\-Desc\-Sep}{%
    \providedby{\sty{glossaries-extra} v1.49+}%
    \desc{used by \gls{glsxtrpostlinkAddSymbolDescOnFirstUse} to
     separate the symbol and description, if both are set}
  }
  % \glsxtrdiscardperiod
  \gcmd{gls\-xtr\-dis\-card\-pe\-riod}{%
   %\providedby{\sty{glossaries-extra} v1.0+}
   \syntax{\margm{entry-label}\margm{discarded}\margm{no discard}\meta{token}}
   \providedby{\sty{glossaries-extra}}%
   \desc{if \meta{token} is a \idx{fullstop} and the entry's
   \idxpl{categoryattribute} indicate that a \idx{fullstop} should be discarded
    (such as \catattr{discardperiod}),
    then \meta{discarded} is performed, otherwise 
    \meta{no discard} is done and the \meta{token} is processed. The actual test to
    determine if \meta{token} is a \idx{fullstop} is performed by 
    \gls{glsxtrifperiod}. This command is used in \glspl{postlinkhook}}
  }
  % \glsxtrifcustomdiscardperiod
  \gcmd{gls\-xtr\-if\-custom\-dis\-card\-pe\-riod}
  {
    \providedby{\sty{glossaries-extra} v1.23+}
    \syntax{\margm{true}\margm{false}}
    \initval{\meta{false}}
    \desc{user hook to trigger a check for a following \idx{fullstop}. 
    This should do \meta{true} if there should be a check for a
    following \idx{fullstop} otherwise should do \meta{false}}
  }
  % \glsxtrifperiod
  \gcmd{gls\-xtr\-if\-pe\-riod}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{true}\margm{false}\meta{token}}
    \providedby{\sty{glossaries-extra}}%
    \desc{does \meta{true} if \meta{token} is a \idx{fullstop}, otherwise
    does \meta{false}}
  }
  % \glsxtrdiscardperiodretainfirstuse
  \gcmd{gls\-xtr\-dis\-card\-pe\-riod\-retain\-first\-use}{%
   \providedby{\sty{glossaries-extra} v1.49+}%
   \syntax{\margm{entry-label}\margm{discarded}\margm{no discard}\meta{token}}
   \desc{used to discard a following \idx{fullstop} when the
   \catattr{retainfirstuseperiod} attribute is set}
  }
  % \glsxtrdopostpunc
  \gcmd{gls\-xtr\-do\-post\-punc}{%
     \providedby{\sty{glossaries-extra} v1.49+}
    \syntax{\margm{code}\meta{token}}
    \desc{if \meta{token} is a recognised punctuation character
     (see \gls{glsxtrifnextpunc}) this does the punctuation
     character and then \meta{code}, otherwise if does \meta{code}
     followed by \meta{token}}
  }
  % \glsxtrifnextpunc
  \gcmd{gls\-xtr\-if\-next\-punc}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{true}\margm{false}}
    \providedby{\sty{glossaries-extra}}%
    \desc{performs \meta{true} if this command is followed by a
     recognised punctuation character otherwise does \meta{false}.
    The list of recognised punctuation marks is initialised to \code{.,:;?!}
    (\idx{fullstop}, comma, colon, semicolon, question mark, and
    exclamation mark). Additional punctuation characters can be
    added with \gls{glsxtraddpunctuationmark}}
  }
  % \glsxtraddpunctuationmark
  \gcmd{gls\-xtr\-add\-punctuation\-mark}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{token(s)}}
    \desc{adds \meta{token(s)} to the list of punctuation characters
    used by \gls{glsxtrifnextpunc}. You may list multiple characters
    at the same time to add a batch, but don't add any separators
    (including spaces). Note that each character must be a
    single token, which means a single-byte character for \pdfLaTeX.
    Multi-byte characters (\idx{utf8}) will required a native
    Unicode engine (\XeLaTeX\ or \LuaLaTeX)}
  }
  % \glsxtrsetpunctuationmarks
  \gcmd{gls\-xtr\-set\-punctuation\-marks}{%
     %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{token list}}
    \desc{sets the punctuation list used by \gls{glsxtrifnextpunc}.
     The \meta{token list} must be a non-delimited list of single
     tokens that represent each punctuation character. Note that the
     element of the list must be a single token, which means a single-byte 
     character for \pdfLaTeX\ (for example, \idx{ascii}).  Multi-byte 
     characters (\idx{utf8}) will required a native Unicode engine 
     (\XeLaTeX\ or \LuaLaTeX)}
  }
  % COMMANDS: bib2gls
  % \bibglssettotalrecordcount
  \gcmd{bib\-gls\-set\-total\-record\-count}
  {
     \providedby{\app{bib2gls} v1.1+}
     \syntax{\margm{entry-label}\margm{value}}
     \desc{sets the total record count for the given entry}
     \field{seealso}{switch.record-count}
  }
  % \bibglssetrecordcount
  \gcmd{bib\-gls\-set\-record\-count}
  {
     \providedby{\app{bib2gls} v1.1+}
     \syntax{\margm{entry-label}\margm{counter}\margm{value}}
     \desc{sets the \meta{counter} record count for the given entry}
     \field{seealso}{switch.record-count}
  }
  % \bibglssetlocationrecordcount
  \gcmd{bib\-gls\-set\-location\-record\-count}
  {
     \providedby{\app{bib2gls} v1.1+}
     \syntax{\margm{entry-label}\margm{counter}\margm{location}\margm{value}}
     \desc{sets the location record count for the given entry}
     \field{seealso}{switch.record-count-unit}
  }
  % \bibglsprimaryprefixlabel
  \gcmd{bib\-gls\-primary\-pre\-fix\-label}
  {
     \providedby{\app{bib2gls} v1.8+}
     \syntax{\margm{label-prefix}}
     \desc{hook written to the \ext{glstex} file identifying the
     primary label prefix}
  }
  % \bibglsdualprefixlabel
  \gcmd{bib\-gls\-dual\-pre\-fix\-label}
  {
     \providedby{\app{bib2gls} v1.8+}
     \syntax{\margm{label-prefix}}
     \desc{hook written to the \ext{glstex} file identifying the
      dual label prefix}
  }
  % \bibglstertiaryprefixlabel
  \gcmd{bib\-gls\-tertiary\-pre\-fix\-label}
  {
     \providedby{\app{bib2gls} v1.8+}
     \syntax{\margm{label-prefix}}
     \desc{hook written to the \ext{glstex} file identifying the
     tertiary label prefix}
  }
  % \bibglscopytoglossary
  \gcmd{bib\-gls\-copy\-to\-glos\-sary}
  {
     \providedby{\app{bib2gls} v3.3+}
     \syntax{\margm{entry-label}\margm{glossary-type}}
     \desc{command definition provided in the \ext{glstex} file used 
     with the \resourceopt{copy-to-glossary} option to copy an entry to another glossary}
  }
  % \BibGlsNoCaseChange
  \gcmd{Bib\-Gls\-No\-Case\-Change}
  {
     \providedby{\app{bib2gls} v4.1+}
     \syntax{\margm{text}}
     \desc{prevents case-changing within \app{bib2gls} but simply expands
      to \meta{text} within the \LaTeX\ document}
  }
  % \GlsXtrTotalRecordCount
  \gcmd{Gls\-Xtr\-Total\-Record\-Count}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{entry-label}}
     \desc{expands to the entry's total record count (stored in
     the \glosfield{recordcount} field) or to 0 if not set}
  }
  % \GlsXtrRecordCount
  \gcmd{Gls\-Xtr\-Record\-Count}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{entry-label}\margm{counter}}
     \desc{expands to the entry's record count for the given
     \idxc{locationcounter}{counter} (stored in
     the \glosfield{recordcount.counter} field) or to 0 if not set}
  }
  % \GlsXtrLocationRecordCount
  \gcmd{Gls\-Xtr\-Location\-Record\-Count}
  {
     \providedby{\sty{glossaries-extra} v1.21+}
     \syntax{\margm{entry-label}\margm{counter}\margm{location}}
     \desc{expands to the entry's record count for the given 
     \idxc{locationcounter}{counter} and \location\ (stored in 
     the \glosfield{recordcount.counter.location} field) or 
      to 0 if not set}
  }
  % \glsxtrenablerecordcount
  \gcmd{gls\-xtr\-enable\-record\-count}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \desc{redefines the \idx{glslike} commands (except \gls{glsdisp})
    to use the analogous record count commands (\gls{rgls} etc)}
  }
  % \rgls
  \gcmdspa{rgls}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{gls} but hooks into the entry's record count}
    \field{seealso}{glsxtrifrecordtrigger,rglsformat,switch.record-count}
  }
  % \rglspl
  \gcmdspa{rgls\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{glspl} but hooks into the entry's record count}
    \field{seealso}{glsxtrifrecordtrigger,rglsplformat,switch.record-count}
  }
  % \rGls
  \gcmdspa{rGls}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{Gls} but hooks into the entry's record count}
    \field{seealso}{glsxtrifrecordtrigger,rGlsformat,switch.record-count}
  }
  % \rGlspl
  \gcmdspa{rGls\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{Glspl} but hooks into the entry's record count}
    \field{seealso}{glsxtrifrecordtrigger,rGlsplformat,switch.record-count}
  }
  % \rGLS
  \gcmdspa{rGLS}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{GLS} but hooks into the entry's record count}
    \field{seealso}{glsxtrifrecordtrigger,rGLSformat,switch.record-count}
  }
  % \rGLSpl
  \gcmdspa{rGLS\-pl}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\oargm{options}\margm{entry-label}\oargm{insert}}
    \desc{like \gls{GLSpl} but hooks into the entry's record count}
    \field{seealso}{glsxtrifrecordtrigger,rGlsplformat,switch.record-count}
  }
  % \glsxtrifrecordtrigger
  \gcmd{gls\-xtr\-if\-record\-trigger}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}\margm{true}\margm{false}}
    \desc{does \meta{true} if the entry's total record count 
    (obtained with \gls{glsxtrrecordtriggervalue}) exceeds the value
    supplied by the \catattr{recordcount} attribute, 
    otherwise does \meta{false}}
    \field{seealso}{rgls,GlsXtrSetRecordCountAttribute,switch.record-count}
  }
  % \glsxtrrecordtriggervalue
  \gcmd{gls\-xtr\-record\-trigger\-value}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}}
    \desc{expands to the trigger value used by \gls{glsxtrifrecordtrigger}}
    \field{seealso}{rgls,switch.record-count}
  }
  % \glstriggerrecordformat
  \gcmd{gls\-trigger\-record\-format}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{location}}
    \desc{used as a special location format that indicates that the
    record is a trigger record}
    \field{seealso}{rgls,switch.record-count}
  }
  % \GlsXtrSetRecordCountAttribute
  \gcmd{Gls\-Xtr\-Set\-Record\-Count\-Attribute}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{category-list}\margm{value}}
    \desc{sets the \catattr{recordcount} attribute to \meta{value}
     for each of the listed categories}
  }
  % \rglsformat
  \gcmd{rgls\-format}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{rgls} if the entry's record count is more
    than the given trigger value}
  }
  % \rglsplformat
  \gcmd{rgls\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{rglspl} if the entry's record count is more
    than the given trigger value}
  }
  % \rGlsformat
  \gcmd{rGls\-format}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{rGls} if the entry's record count is more
    than the given trigger value}
  }
  % \rGlsplformat
  \gcmd{rGls\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{rGlspl} if the entry's record count is more
    than the given trigger value}
  }
  % \rGLSformat
  \gcmd{rGLS\-format}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{rGLS} if the entry's record count is more
    than the given trigger value}
  }
  % \rGLSplformat
  \gcmd{rGLS\-pl\-format}
  {
    \providedby{\sty{glossaries-extra} v1.21+}
    \syntax{\margm{entry-label}\margm{insert}}
    \desc{format used by \gls{rGLSpl} if the entry's record count is more
    than the given trigger value}
  }
  % \bibglsnewdualindexsymbolsecondary
  \gcmd{bib\-gls\-new\-dual\-index\-symbol\-secondary}
  {
    \providedby{\app{bib2gls}}
    \syntax{\margm{label}\margm{options}\margm{name}\margm{description}}
    \desc{defines secondary terms provided with \atentry{dualindexsymbol}}
  }
  % \bibglssetlastgrouptitle
  \gcmd{bib\-gls\-set\-last\-group\-title}
  {
    \providedby{\app{bib2gls}}
    \syntax{\margm{cs}\margm{specs}}
    \desc{sets the last group title}
  }
  % \GlsXtrDualField
  \gcmd{Gls\-Xtr\-Dual\-Field}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.30+}
    \initval{dual}
    \desc{expands to the \idx{internalfieldlabel} used by \gls{GlsXtrDualBackLink}}
  }
  % \GlsXtrDualBackLink
  \gcmd{Gls\-Xtr\-Dual\-Back\-Link}
  {
    \providedby{\sty{glossaries-extra-bib2gls} v1.30+}
    \syntax{\margm{text}\margm{entry-label}}
    \desc{Adds a hyperlink to the given entry's dual (whose label is
     stored in the field given by \gls{GlsXtrDualField}) with the
     given hyperlink text}
  }
  % COMMANDS: ON THE FLY
  % \GlsXtrEnableOnTheFly
  \gcmds{Gls\-Xtr\-Enable\-On\-The\-Fly}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \desc{enables on the fly commands, such as \gls{glsxtr}}
  }
  % \glsxtr
  \gcmd{gls\-xtr}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\oargm{gls-options}\oargm{dfn-options}\margm{entry-label}}
    \desc{if \meta{entry-label} has already been defined, this just
    references it, otherwise the entry is defined. This command must
    be enabled with \gls{GlsXtrEnableOnTheFly}}
  }
  % \glsxtrpl
  \gcmd{gls\-xtr\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\oargm{gls-options}\oargm{dfn-options}\margm{entry-label}}
    \desc{as \gls{glsxtr} but shows the plural form}
  }
  % \Glsxtr
  \gcmd{Gls\-xtr}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\oargm{gls-options}\oargm{dfn-options}\margm{entry-label}}
    \desc{as \gls{glsxtr} but applies \idx{sentencecase}}
  }
  % \Glsxtrpl
  \gcmd{Gls\-xtr\-pl}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\oargm{gls-options}\oargm{dfn-options}\margm{entry-label}}
    \desc{as \gls{glsxtrpl} but applies \idx{sentencecase}}
  }
  % \glsxtrcat
  \gcmd{gls\-xtr\-cat}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
     \initval{general}
     \desc{expands to the default category set by commands like \gls{glsxtr}}
  }
  % COMMANDS: OTHER
  % \GlsXtrInternalLocationHyperlink
  \gcmd{Gls\-Xtr\-Internal\-Location\-Hyper\-link}
  {
    \providedby{\sty{glossaries-extra} v1.29+}
    \syntax{\margm{counter}\margm{prefix}\margm{location}}
    \desc{used by \gls{glsxtrlocationhyperlink} to create an
    internal hyperlink to the given location (advanced command, see
     documented code for use)}
  }
  % \glsxtrlocationhyperlink
  \gcmd{gls\-xtr\-location\-hyper\-link}
  {
    \providedby{\sty{glossaries-extra} v1.14+}
    \syntax{\margm{counter}\margm{prefix}\margm{location}}
    \desc{used to create a hyperlink to either an external or an
    internal location, depending on whether or not
    \gls{glsxtrsupplocationurl} is defined and not empty (advanced command, see
     documented code for use)}
  }
  % \glsxtrundefaction
  \gcmd{gls\-xtr\-un\-def\-action}
  {
    \providedby{\sty{glossaries-extra} v1.08+}
    \syntax{\margm{message}\margm{additional help}}
    \desc{will either produce an error or a warning, depending on
     the \opt{undefaction} setting. In the \envfmt{document} environment
     this will also generate the unknown marker (\idx{unknowntag})}
  }
  % \glsxtrundeftag
  \gcmd{gls\-xtr\-un\-def\-tag}
  {
    \providedby{\sty{glossaries-extra} v1.08+}
    \initval{\glsxtrundeftag}
    \desc{expands to the unknown marker (\idx{unknowntag})}
  }
  % \ProvidesGlossariesExtraLang
  \gcmd{Provides\-Glossaries\-Extra\-Lang}
  {
    %\providedby{\sty{glossaries-extra} v0.5.3+}
    \syntax{\margm{tag}}
    \desc{should be placed at the start of a \sty{glossaries-extra}
     \ext{ldf} file}
  }
  % \RequireGlossariesExtraLang
  \gcmd{Require\-Glossaries\-Extra\-Lang}
  {
    %\providedby{\sty{glossaries-extra} v0.5.3+}
    \syntax{\margm{tag}}
    \desc{indicates that a \sty{glossaries-extra}
     \ext{ldf} file should be input, if it hasn't already been input}
  }
  % \GlsXtrNoGlsWarningHead
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Head}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{glossary-label}\margm{file}}
    \desc{produces the header boilerplate text if a glossary file is missing}
  }
  % \GlsXtrNoGlsWarningEmptyStart
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Empty\-Start}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{produces the boilerplate text if a glossary is
    probably empty}
  }
  % \GlsXtrNoGlsWarningEmptyMain
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Empty\-Main}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{produces the boilerplate text if the probably empty
     glossary is the \code{main} one}
  }
  % \GlsXtrNoGlsWarningEmptyNotMain
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Empty\-Not\-Main}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{glossary-label}}
    \desc{produces the boilerplate text if the probably empty 
    glossary is not the \code{main} one}
  }
  % \GlsXtrNoGlsWarningCheckFile
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Check\-File}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{file}}
    \desc{advisory message to check the file contents}
  }
  % \GlsXtrNoGlsWarningAutoMake
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Auto\-Make}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{glossary-label}}
    \desc{advisory message when \opt{automake} has been used}
  }
  % \GlsXtrNoGlsWarningMisMatch
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Mis\-Match}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{advisory message on mis-matching \gls{makenoidxglossaries}}
  }
  % \GlsXtrNoGlsWarningBuildInfo
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Build\-Info}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{build advice}
  }
  % \GlsXtrRecordWarning
  \gcmd{Gls\-Xtr\-Record\-Warning}
  {
    \providedby{\sty{glossaries-extra} v1.31+}
    \syntax{\margm{glossary-type}}
    \desc{incorrect use of \gls{printglossary} with non-hybrid \opt{record}}
  }
  % \GlsXtrNoGlsWarningTail
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Tail}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \desc{final paragraph of missing glossary boilerplate text}
  }
  % \GlsXtrNoGlsWarningNoOut
  \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-No\-Out}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{file}}
    \desc{advisory if no output file was created}
  }
  % \glspar
  \gcmd{gls\-par}
  {
    \providedby{\sty{glossaries}}
    \desc{paragraph break (for instances where \gls{par} can't be used directly)}
  }
  % \glsbackslash
  \gcmd{gls\-back\-slash}
  {
    \providedby{\sty{glossaries} v4.11+}
    \desc{expands to a literal backslash}
  }
  % \glspercentchar
  \gcmd{gls\-percent\-char}
  {
    \providedby{\sty{glossaries} v4.10+}
    \desc{expands to a literal percent sign}
  }
  % \glstildechar
  \gcmd{gls\-tilde\-char}
  {
    \providedby{\sty{glossaries} v4.10+}
    \desc{expands to a literal tilde character}
  }
  % \GlsXtrExpandedFmt
  \gcmd{Gls\-Xtr\-Expanded\-Fmt}
  {
    \providedby{\sty{glossaries-extra} v1.30+}
    \syntax{\margm{cs}\margm{content}}
    \desc{fully-expands \meta{content} and passes it to \meta{cs},
     which must be a command that takes a single argument}
  }
  % \GlossariesExtraWarning
  \gcmd{Glossaries\-Extra\-Warning}
  {
    %\providedby{\sty{glossaries-extra} v1.0+}
    \syntax{\margm{message}}
    \desc{writes a warning in the transcript with the current line
    number. The \opt{nowarn} option redefines this command to do nothing}
  }
  % \GlossariesExtraWarningNoLine
  \gcmd{Glossaries\-Extra\-Warning\-No\-Line}
  {
    %\providedby{\sty{glossaries-extra} v0.5+}
    \providedby{\sty{glossaries-extra}}
    \syntax{\margm{message}}
    \desc{writes a warning in the transcript without a
     corresponding line number. The \opt{nowarn}
    option redefines this command to do nothing}
  }
  % \GlossariesExtraInfo
  \gcmd{Glossaries\-Extra\-Info}
  {
    \providedby{\sty{glossaries-extra} v1.51+}
    \syntax{\margm{message}}
    \desc{writes an information message to the transcript}
  }
  % \GlsXtrWarnDeprecatedAbbrStyle
  \gcmd{Gls\-Xtr\-Warn\-Deprecated\-Abbr\-Style}
  {
     \providedby{\sty{glossaries-extra} v1.04+}
    \syntax{\margm{old-name}\margm{new-name}}
    \desc{issues a warning with \gls{GlossariesExtraWarning}
     indicating that a deprecated abbreviation style has been used}
  }
  % \glsxtrNoGlossaryWarning
  \gcmd{gls\-xtr\-No\-Glossary\-Warning}
  {
     %\providedby{\sty{glossaries-extra} v0.3+}
    \syntax{\margm{glossary-type}}
    \desc{issues a warning with \gls{GlossariesExtraWarning}
     indicating that the given glossary is missing}
  }
  % \GlsXtrUnknownDialectWarning
  \gcmd{Gls\-Xtr\-Unknown\-Dialect\-Warning}
  {
     \providedby{\sty{glossaries-extra} v1.32+}
    \syntax{\margm{locale}\margm{root language}}
    \desc{issues a warning with \gls{GlossariesExtraWarning}
     indicating that a valid dialect label can't be determined for
     the given locale and root language}
  }
  % \glsxtrstarflywarn 
  \gcmd{gls\-xtr\-star\-fly\-warn}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \desc{issues a warning with \gls{GlossariesExtraWarning}
     indicating that the experimental starred version of
     \gls{GlsXtrEnableOnTheFly} has been used}
  }
  % \GlsXtrWarning
  \gcmd{Gls\-Xtr\-Warning}
  {
     %\providedby{\sty{glossaries-extra} v0.5.4+}
    \syntax{\margm{options}\margm{entry}}
    \desc{issues a warning with \gls{GlossariesExtraWarning}
     indicating that the given options list has been ignored by the
     given entry because it has already been defined}
  }
  % \glsxtrmglsWarnAllSkipped
  \gcmd{gls\-xtr\-mgls\-Warn\-All\-Skipped}
  {
     \providedby{\sty{glossaries-extra} v1.48+}
    \syntax{\margm{message}\margm{insert}\margm{fmt-cs}}
    \desc{issues the given warning message with \gls{GlossariesExtraWarning}
     and does \code{\meta{fmt-cs}\margm{insert}} (this warning is used if all 
     elements of a multi-entry set are skipped)}
  }
  % \mpglsWarning
  \gcmd{mp\-gls\-Warning}
  {
     \providedby{\sty{glossaries-extra} v1.48+}
    \desc{issues a warning with \gls{GlossariesExtraWarning}
     indicating that \sty{glossaries-prefix} is required for
     \gls{mpgls} family of commands}
  }
  % \GlossariesAbbrStyleTooComplexWarning
  \gcmd{Glossaries\-Abbr\-Style\-Too\-Complex\-Warning}
  {
     \providedby{\sty{glossaries-extra} v1.49+}
    \desc{issues a warning with \gls{GlossariesExtraWarning}
       when a command is used that isn't supported by a complex
       abbreviation style}
  }
  % GENERAL COMMANDS AND ENVIRONMENTS (index only)
  \genv{document}{}
  \genv{description}{}
  \genv{equation}{}
  \genv{align}{}
  \genv{figure}{}
  \genv{table}{}
  \genv{tabular}{}
  \genv{long\-table}{}% longtable
  \genv{super\-tabular}{}% supertabular
  \genv{the\-index}{}% theindex
  \genv{multi\-cols}{}% multicols
  \genv{multi\-cols*}{}% multicols*
  \gcmd{item}{\syntax{\oarg{marker}}}% \item
  \gcmd{index\-space}{}% \indexspace
  \gcmd{hsize}{}% \hsize
  \gcmd{index}{}% \index
  \gcmd{actual\-char}{}% \actualchar
  \gcmd{level\-char}{}% \levelchar
  \gcmd{quote\-char}{}% \quotechar
  \gcmd{encap\-char}{}% \encapchar
  \gcmd{table\-of\-contents}{}% \tableofcontents
  \gcmd{char}{}% \char
  \gcmd{null}{}% \null
  \gcmd{relax}{}% \relax
  \gcmd{tab\-u\-lar\-new\-line}{}% \tabularnewline
  \gcmd{top\-rule}{}% \toprule
  \gcmd{mid\-rule}{}% \midrule
  \gcmd{bottom\-rule}{}% \bottomrule
  \gcmd{par\-indent}{}% \parindent
  \gcmd{line\-width}{}% \linewidth
  \gcmd{tab\-col\-sep}{}% \tabcolsep
  \gcmd{@gobble}{}% \@gobble
  \gcmd{@first\-of\-one}{}% \@firstofone
  \gcmd{@first\-of\-two}{}% \@firstoftwo
  \gcmd{@second\-of\-two}{}% \@secondoftwo
  \gcmd{par}{}% \par
  \gcmd{protect}{}% \protect
  \gcmd{string}{}% \string
  \gcmd{chapter}{}% \chapter
  \gcmd{section}{}% \section
  \gcmd{part}{}% \part
  \gcmd{expand\-after}{}% \expandafter
  \gcmd{expand\-once}{}% \expandonce
  \gcmd{un\-skip}{}% \unskip
  \gcmd{leave\-v\-mode}{}% \leavevmode
  \gcmd{let}{}% \let
  \gcmd{hfil}{}% \hfil
  \gcmd{caption}{}% \caption
  \gcmd{label}{}% \label
  \gcmd{ref}{}% \ref
  \gcmd{name\-ref}{}% \nameref
  \gcmd{Get\-Title\-String\-Disable\-Commands}{}% \GetTitleStringDisableCommands
  \gcmd{Get\-Title\-String\-Set\-up}{}% \GetTitleStringSetup
  \gcmd{textsc}{}% \textsc
  \gcmd{textbf}{}% \textbf
  \gcmd{textup}{}% \textup
  \gcmd{emph}{}% \emph
  \gcmd{underline}{}% \underline
  \gcmd{text\-smaller}{}% \textsmaller
  \gcmd{text\-larger}{}% \textlarger
  \gcmd{page\-ref}{}% \pageref
  \gcmd{job\-name}{}% \jobname
  \gcmd{input}{}% \input
  \gcmd{the\-page}{}% \thepage
  \gcmdmeta{the}{counter}{}{}% \the<counter>
  \gcmdmeta{theH}{counter}{}{}% \theH<counter>
  \gcmd{for\-eign\-lan\-guage}{}% \foreignlanguage
  \gpunccmd{amp}{\&}{}% \&
  \gpunccmd{dollar}{\$}{}% \$
  \gpunccmd{bksl}{\glsbackslash}{}% \\
  \gpunccmd{cs.dot}{.}{}% \.
  \gpunccmd{cs.slash}{/}{}% \/
  \gpunccmd{cs.pipe}{|}{}% \|
  \gpunccmd{cs.plus}{+}{}% \+
  \gpunccmd{cs.lt}{<}{}% \<
  \gpunccmd{cs.gt}{<}{}% \>
  \gpunccmd{cs.star}{*}{}% \*
  \gpunccmd{cs.circum}{\textasciicircum}{}% \^
  \gpunccmd{cs.openparen}{(}{}% \(
  \gpunccmd{cs.closeparen}{)}{}% \)
  \gpunccmd{cs.opensq}{[}{}% \[
  \gpunccmd{cs.closesq}{]}{}% \]
  \gpunccmd{cs.quote}{"}{}% \"
  \gpunccmd{cs.tilde}{\textasciitilde}{}% \~
  \gpunccmd{cs.hyphen}{-}{}% \-
  \gpunccmd{cs.question}{?}{}% \?
  \gpunccmd{cs.hash}{\#}{}% \#
  \gpunccmd{cs.colon}{:}{}% \:
  \gcmd{new\-command}{}% \newcommand
  \gcmd{re\-new\-command}{}% \renewcommand
  \gcmd{provide\-command}{}% \providecommand
  \gcmd{step\-counter}{}% \stepcounter
  \gcmd{ref\-step\-counter}{}% \refstepcounter
  \gcmd{@current\-label}{}% \@currentlabel
  \gcmd{@current\-label\-name}{}% \@currentlabelname
  \gcmd{@current\-Href}{}% \@currentHref
  \gcmd{cs\-def}{}% \csdef
  \gcmd{cs\-let}{}% \cslet
  \gcmd{cs\-let\-cs}{}% \csletcs
  \gcmd{let\-cs}{}% \letcs
  \gcmd{if\-cs\-undef}{}% \ifcsundef
  \gcmd{if\-undef}{}% \ifundef
  \gcmd{if\-def\-empty}{}% \ifdefempty
  \gcmd{if\-def\-string}{}% \ifdefstring
  \gcmd{if\-cs\-string}{}% \ifcsstring
  \gcmd{if\-cs\-void}{}% \ifcsvoid
  \gcmd{app\-to}{}% \appto
  \gcmd{pre\-to}{}% \preto
  \gcmd{list\-cs\-add}{}% \listcsadd
  \gcmd{list\-cs\-gadd}{}% \listcsgadd
  \gcmd{list\-cs\-eadd}{}% \listcseadd
  \gcmd{list\-cs\-xadd}{}% \listcsxadd
  \gcmd{do\-list\-cs\-loop}{}% \dolistcsloop
  \gcmd{for\-list\-cs\-loop}{}% \forlistcsloop
  \gcmd{if\-in\-list\-cs}{}% \ifinlistcs
  \gcmd{xif\-in\-list\-cs}{}% \xifinlistcs
  \gcmd{hyper\-target}{}% \hypertarget
  \gcmd{hyper\-link}{}% \hyperlink
  \gcmd{hyper\-ref}{}% \hyperref
  \gcmd{pdf\-string\-def\-Dis\-able\-Com\-mands}{}% \pdfstringdefDisableCommands
  \gcmd{hl}{}% \hl
  \gcmd{so}{}% \so
  \gcmd{ul}{}% \ul
  \gcmd{mbox}{}% \mbox
  \gcmd{fbox}{}% \fbox
  \gcmd{text\-super\-script}{}% \textsuperscript
  \gcmd{text\-sub\-script}{}% \textsubscript
  \gcmd{foot\-note}{}% \footnote
  \gcmd{upper\-case}{}% \uppercase
  \gcmd{Make\-Upper\-case}{}% \MakeUppercase
  \gcmd{Make\-Text\-Upper\-case}{}% \MakeTextUppercase
  \gcmd{Make\-Text\-Lower\-case}{}% \MakeTextLowercase
  \gcmd{Make\-Lower\-case}{}% \MakeLowercase
  \gcmd{main\-matter}{}% \mainmatter
  \gcmd{front\-matter}{}% \frontmatter
  \gcmd{back\-matter}{}% \backmatter
  \gcmd{@start\-toc}{}% \@starttoc
  \gcmd{mark\-right}{}% \markright
  \gcmd{mark\-both}{}% \markboth
  \gcmd{pdf\-book\-mark}{}% \pdfbookmark
  \gcmd{tex\-or\-pdf\-string}{}% \texorpdfstring
  \gcmd{No\-Case\-Change}{}% \NoCaseChange
  \gcmd{pagestyle}{}% \pagestyle
  \gcmd{alph}{}% \alph
  \gcmd{Alph}{}% \Alph
  \gcmd{arabic}{}% \arabic
  \gcmd{roman}{}% \roman
  \gcmd{Roman}{}% \Roman
  \gcmd{@for}{}% \@for
  \gcmd{@endfortrue}{}% \@endfortrue
  \gcmd{alpha}{}% \alpha
  \gcmd{beta}{}% \beta
  \gcmd{Delta}{}% \Delta
  \gcmd{digamma}{}% \digamma
  \gcmd{up\-alpha}{}% \upalpha
  \gcmd{up\-beta}{}% \upbeta
  \gcmd{If\-Track\-ed\-Language\-File\-Exists}{}% \IfTrackedLanguageFileExists
  % GENERAL COUNTERS
  \gctr{page}{}
  \gctr{section}{}
  \gctr{chapter}{}
  \gctr{part}{}
  \gctr{equation}{}
  \gctr{figure}{}
  \gctr{table}{}
  % TERMS
  \gterm{indexingapp}{\name{indexing application}%
   \desc{an application (piece of software) separate from
    \protect\TeX/\protect\LaTeX\ that collates and sorts information that has an
    associated page reference. Generally the information is an index
    entry but in this case the information is a \idx{glossary} entry.
    There are two main indexing applications that are used with \TeX:
    \app+{makeindex} and \app+{xindy}. (There is also a new
    application called \app{xindex}, but this isn't supported by
    \sty{glossaries} or \sty{glossaries-extra}.) The \sty{glossaries-extra}
    package additionally supports \app{bib2gls}. These are all
    \idx{cli} applications.}%
  }%
  \gterm{indexing}{%
    \name{indexing (or recording)}
    \field{text}{indexing}
    \desc{the process of saving the \idx+{entrylocation} and any
      associated information that is required in the \idx{glossary}. In
      the case of \app{makeindex} and \app{xindy}, the
      \idx{entrylocation}, \idxc{locationencap}{encap}, entry item and sort value are written 
      to a supplementary file associated with the \idx{glossary} that is
      subsequently read by \app{makeindex}\slash\app{xindy}. In the
      case of \app{bib2gls} and the \qt{noidx} method, the
      \idx{entrylocation}, \idxc{locationencap}{encap} and label is written to the
      \ext+{aux} file. With \opteqvalref{record}{nameref}, the
      current title and hyperlink target are also included. With
      \app{bib2gls}, each line of data in the \ext{aux} is referred
      to as a \qt{record} and indexing is referred to as
      \qt{recording}. The \optval{record}{hybrid} option indexes
      twice: a \app{bib2gls} record in the \ext{aux} file and a
      \app{makeindex}\slash\app{xindy} line in the corresponding file, See
      \sectionref{sec:wrglossary}}
  } 
  \gterm{glossary}%
  {%
    \common
    \name{glossary}
    \field{plural}{glossaries}
    \desc{technically a glossary is an alphabetical list of words
    relating to a particular topic. For the purposes of describing 
    the \sty{glossaries} and \sty{glossaries-extra} packages, a
    glossary is either the list produced by commands like
    \gls{printglossary} or \gls{printunsrtglossary} (which may or
    may not be ordered alphabetically) or a glossary is a set of
    entry labels where the set is identified by the glossary label
    or type}
  }
  \gidx{mini-glossary}{\field{plural}{mini-glossaries}}
  \gidx{glossmini}{\name{glossary, mini}\field{see}{idx.mini-glossary}}
  \gtermacr{cli}{CLI}{command-line interface}%
  {%
    \desc{an application that doesn't have a graphical user
     interface. That is, an application that doesn't have any windows,
     buttons or menus and can be run in
     \dickimawhref{latex/novices/html/terminal.html}{a command
     prompt or terminal}}%
  }%
  \gtermacr{gui}{GUI}{graphical user interface}%
  {%
    \desc{an application that has windows, buttons or menus}
  }
  \gtermacr{ascii}{ASCII}{American Standard Code for Information Interchange}
  {%
    \desc{a single-byte character encoding. Related blog article:
    \blog{binary-files-text-files-and-file-encodings/}{Binary
    Files, Text Files and File Encodings}}
  }
  \gtermacr{utf8}{UTF\glsxtrrevert{-8}}{Unicode Transformation Format (8-bit)}
  {%
    \desc{a variable-width encoding that uses 8-bit code units. This
    means that some characters are represented by more that one byte.
    \XeLaTeX\ and \LuaLaTeX\ treat the multi-byte sequence as a single
    token, but the older \LaTeX\ formats have single-byte tokens, which
    can cause complications, although these have mostly been addressed with
    the newer kernels introduced over the past few years. Related blog article:
    \blog{binary-files-text-files-and-file-encodings/}{Binary Files,
    Text Files and File Encodings}}
  }
  \gterm{idx.group}{\name{group (letters, numbers, symbols)}
   \field{text}{group}%
   \desc{a logical division within a \idx{glossary} that is typically a
    by-product of the \idx{indexingapp}['s] sorting algorithm. See also
    \gallerypage{logicaldivisions}{Gallery: Logical Glossary Divisions 
    (type vs group vs parent)}}%
  }%
  \gterm{hierarchicallevel}{\name{hierarchical level}%
   \desc{a number that indicates how many ancestors an entry has.
    An entry with no parent has hierarchical level~0. If an entry
    has a parent then the hierarchical level for the entry is one
    more than the hierarchical level of the parent. Most styles will
    format an entry according to its hierarchical level, giving
    prominence to level~0 entries, although some may have a maximum
    supported limit. The \idx{unsrtfam} allow the
    hierarchical level to be locally adjusted by adding an offset
    (\printglossopt{leveloffset}) or to have hierarchy ignored
    (\printglossopt{flatten})}
  }
  \gterm{locationlist}{\name{location list}%
    \desc{a list of \idxpl+{entrylocation} (also called a number
    list). May be suppressed for all \idxpl{glossary} with the package option
    \opt{nonumberlist} or for individual \idxpl{glossary} with
    \printglossopt{nonumberlist}. With \app{bib2gls}, the list may
    also be suppressed with \resourceoptval{save-locations}{false}}
  }
  \gterm{locationencap}{\name{location encap (format)}
    \field{text}{location encap}
    \desc{a command used to encapsulate an \idx{entrylocation}.
     The control sequence name (without the leading backslash)
     is identified by the \glsopt{format} key. The default encap is
     \gls{glsnumberformat}}
  }
  \gterm{locationcounter}{\name{location counter}
    \desc{the counter used to obtain the \idx{entrylocation}}
  }
  \gterm{entrylocation}{\common\name{entry location}%
    \desc{the location of the entry in the document (obtained from
    the \idx{locationcounter} or from the \glsopt{thevalue} option). This defaults to the page number 
    on which the entry has been
    referenced with any of the \idx{glslike}, \idx{glstextlike} or \gls{glsadd}
    commands. An entry may have multiple locations that form a list}
  }
  \gidx{numberlist}{\name{number list}\field{alias}{locationlist}}
  \gterm{ignoredlocation}{\name{ignored location (or record)}%
   \field{text}{ignored location}
   \desc{a \location\ that uses \encap{glsignore} as the
    \idxc{locationencap}{encap}. With \app{bib2gls}, this indicates that the entry
    needs to be selected but the \location\ isn't added to the
    \idx{locationlist}. With other methods, this will simply create
    an invisible \location, which can result in unwanted commas if
    the \idx{locationlist} has other items}
  }
  \gidx{locationignored}{\name{location, ignored\slash invisible}%
    \field{see}{ignoredlocation}}
  \gterm{ignoredglossary}{\name{ignored glossary}%
    \field{plural}{ignored glossaries}%
    \desc{a \idx{glossary} that has been defined using a command like
     \gls{newignoredglossary}. These \idxpl{glossary} are omitted by
     iterative commands, such as \gls{printglossaries} and
     \gls{printunsrtglossaries}. An ignored
     \idx{glossary} can only be displayed with \gls{printunsrtglossary}
     or \gls{printunsrtinnerglossary}}
  }
  \gidx{glossaryignored}{\name{glossary, ignored}\field{see}{ignoredglossary}}
  \gterm{firstuseflag}{\name{first use flag}%
    \common
    \desc{a conditional that keeps track of whether or not an entry
     has been referenced by any of the \idx{glslike} commands (which
     can adjust their behaviour according to whether or not this flag is
     true). The conditional is true if the entry hasn't been used by
     one of these commands
     (or if the flag has been reset) and false if it has been used 
     (or if the flag has been unset). Note that multi-entries have
     their own flag that's distinct from the first use flags of the
     individual elements}
  }
  \gterm{firstuse}{\name{first use}%
    \common
    \desc{the first time an entry is used by a command that unsets
     the \idx{firstuseflag} (or the first time since the flag was
     reset). For multi-entry sets, see \idx{mfirstuse}}
  }
  \gterm{firstusetext}{\name{first use text}%
    \common
    \desc{the \idx{linktext} that is displayed on \idx{firstuse} of
    the \idx{glslike} commands}
  }
  \gterm{subsequentuse}{\name{subsequent use}
    \common
    \desc{using an entry that unsets the \idx{firstuseflag} when it
    has already been unset}
  }
  \gterm{mfirstuseflag}{\name{multi-entry first use flag}%
    \desc{a conditional that keeps track of whether or not a
     multi-entry has been used. This is distinct from the
     \idxpl{firstuseflag} of the individual elements}
  }
  \gterm{mfirstuse}{\name{multi-entry first use}%
    \field{text}{first use}
    \desc{the first time a multi-entry is referenced (or the first time since 
    the \idx{mfirstuseflag} was reset). This is not necessary the
     \idx{firstuse} of any of the individual entries that form the set}
  }
  \gterm{msubsequentuse}{\name{multi-entry subsequent use}%
    \field{text}{subsequent use}
    \desc{when a multi-entry that has already been marked as used is referenced. 
     This is not necessary the \idx{subsequentuse} of any of the individual entries 
     that form the set}
  }
  \gterm{glslike}{\common\name{{}\csfmt{gls}-like}
    \desc{commands like \gls{gls} and \gls{glsdisp} that change the 
    \idx{firstuseflag}. These commands index the entry (if indexing
    is enabled), create a hyperlink to the entry's \idx{glossary} listing (if enabled)
    and unset the \idx{firstuseflag}. These commands end with the
    \idx{postlinkhook}}
  }
  \gterm{glstextlike}{\common\name{{}\csfmt{glstext}-like}
    \desc{commands like \gls{glstext} and \gls{glslink} that don't change 
    the \idx{firstuseflag}. These commands index the entry (if indexing
    is enabled) and create a hyperlink to the entry's \idx{glossary} listing (if enabled). These commands end with the \idx{postlinkhook}}
  }
  \gterm{linktext}{\name{link text}%
    \desc{the text produced by \idx{glslike} and \idx{glstextlike}
     commands that have the potential to be a hyperlink}
  }
  \gterm{postlinkhook}{\name{post-link hook}
    \desc{a hook (command) that is used after \idx{linktext} to
    allow code to be automatically added. The base \sty{glossaries}
    package provides a general purpose hook \gls{glspostlinkhook}. The
    \sty{glossaries-extra} package modifies this command to provide 
    additional hooks, including \glspl{catpostlinkhook}}
  }
  \gterm{catpostlinkhook}{\name{category post-link hook}
    \desc{a \idx{postlinkhook} called \gls{glsxtrpostlinkcat} that is
    associated with a particular \idx{category}}
  }
  \gterm{postdeschook}{\name{post-description hook}%
    \desc{a hook (\gls{glspostdescription}) included in some \idxpl{glossarystyle} 
    that is used after the description is displayed. The \sty{glossaries-extra} package modifies 
    this command to provide additional hooks, including \glspl{catpostdeschook}. 
    The \sty{glossaries-extra-stylemods}
    package modifies the predefined styles provided with
    \sty{glossaries} to ensure that they all use
    \gls{glspostdescription} to allow the \glspl{catpostdeschook} to be
    implemented}
  }
  \gterm{catpostdeschook}{\name{category post-description hook}
    \desc{a \gls{postdeschook} called \gls{glsxtrpostdesccategory} that is
    associated with a particular \idx{category}}
  }
  \gterm{postnamehook}{\name{post-name hook}%
    \desc{a hook (command) that is used after the name is
    displayed in \idxpl{glossarystyle}. These hooks are implemented by
    \gls{glossentryname}, which needs to be present in the
    \idx{glossarystyle}. The main hook is \gls{glsxtrpostnamehook},
    which implements auto-indexing (see \sectionref{sec:autoindex}),
    performs a general purpose hook \gls{glsextrapostnamehook}
    and a \idx{category}-specific hook \gls{glsxtrpostnamecategory}}
  }
  \gterm{catpostnamehook}{\name{category post-name hook}
    \desc{a \gls{postnamehook} called \gls{glsxtrpostnamecategory} that is
    associated with a particular \idx{category}}
  }
  \gterm{standaloneentry}%
  {%
    \name{standalone entry}
    \desc{normally the \idx{linktext} target is created in the
    \idx{glossary}, where the entry's name and description (and optionally
    other information, such as the symbol) are shown. It may be that 
    you don't want a list but need to have the name and description
    somewhere in the document text. These are standalone entries.
    Whilst it is possible to simply use \gls{glsentryname} and
    \gls{glsentrydesc}, the \sty{glossaries-extra} package provides
    a way inserting the name that includes the hypertarget for the
    \idx{linktext} and obeys the \idx{postnamehook}}
  }
  \gterm{resourceset}%
  {%
    \name{resource set}
    \desc{all the settings (\idxpl{resourceopt}) and entries associated with a particular
     instance of \gls{GlsXtrLoadResources} (or \gls{glsbibdata})}
  }
  \gterm{resourcefile}%
  {%
    \name{resource file}
    \desc{the \ext+{glstex} file created by \app{bib2gls} and loaded by
     \gls{GlsXtrLoadResources} (or \gls{glsbibdata})}
  }
  \gterm{field}%
  {%
    \name{field}
    \desc{entry data is stored in fields. These may have a
     corresponding key used to set the value, such as \gloskey{name}
     or \gloskey{description}, but field values may also be set
     using commands like \gls{GlsXtrSetField}, in which case there
     doesn't need to be a corresponding key. Some fields are
     considered \idxpl{internalfield}. If you are using
     \app{bib2gls}, it will only recognise fields in the \ext{bib}
     file that have had a key defined in the document or that are
     special to \app{bib2gls}}
  }
  \gterm{internalfield}%
  {%
    \name{internal field}
    \desc{an internal \idx{field} may refer to a key that shouldn't be
    used in the \ext{bib} file (\idx{bib2glsinternalfield}), such as
    the \gloskey{group} field, or it may refer to the 
    \idxc{internalfieldlabel}{label} used to internally represent the 
    \idx{field} (which may or may not match the key used to set the 
    \idx{field} or may not have an associated key), such as \fieldfmt{useri} which
    corresponds to the \gloskey{user1} key, or it may refer to a \idx{field}
    that is only ever used internally that should not be explicitly
    modified, such as the field used to store the entry's
    hierarchical level
}
  }
  \gterm{bib2glsinternalfield}%
  {%
    \name{internal field (\appfmt{bib2gls})}
    \desc{a \idx{field} that is used or assigned by \app{bib2gls}
    that should typically not be used in the \ext+{bib} file}
  }
  \gterm{internalfieldlabel}%
  {%
    \name{internal field label}
    \desc{the field label that forms part of the internal control
    sequence used to store the field value. This may or may not
    match the key used to assign the value when defining the entry.
    See the \ctanmirrornofn{macros/latex/contrib/glossaries/glossaries-user.html\#tab:fieldmap}{\qt{Key to Field Mappings}} table in the \sty{glossaries}
    user manual}
  }
  \gterm{unsrtfam}%
  {%
    \name{print \qt{unsrt} glossary commands (and environment)}
    \field{text}{\qt{unsrt} family of commands}
    \desc{the set of commands used for displaying a \idx{glossary} or
     partial \idx{glossary} that have \qt{unsrt} in the name:
     \gls{printunsrtglossary}, \gls{printunsrtglossaries} (which
     internally uses \gls{printunsrtglossary}), and
     \gls{printunsrtinnerglossary}. These all simply
     iterate over the list of entries associated with the given
     \idx{glossary}, in the order in which they were added to the \idx{glossary}
     (hence \qt{unsrt}, which is short for \qt{unsorted}). The way that \app{bib2gls}
     works is that it sorts the entries according to the
     \idxpl{resourceopt} and adds the entries to the glossary in the
     required order. These commands may be used with or without
     \app{bib2gls}. If you don't use \app{bib2gls}, you will need
     to manually ensure that the entries are added in the desired
     order. The \env{printunsrtglossarywrap} environment may also be
     included in this category, although it only sets up the start
    and end of the \idx{glossary} for use with \gls{printunsrtinnerglossary}}
  }
  \gterm{whatsit}%
  {%
    \desc{a command whose execution is delayed or an OS-specific special command.
    This includes writing to external files (which is what indexing does)}
  }
  \gterm{inlinefullform}%
  {
    \name{inline full form}
    \desc{the full form of an abbreviation obtained with 
     \gls{glsxtrfull} or \gls{glsxtrfullpl} (or case-changing
     variants). This may or may not produce the same result as the
     full form on \idx{firstuse} of the corresponding \idx{glslike}
     command (the \idx{displayfullform}), depending on the abbreviation style}
  }
  \gterm{displayfullform}%
  {
    \name{display full form}
    \desc{the full form of an abbreviation obtained with 
     the \idx{firstuse} of \gls{gls} or \gls{glspl} (or case-changing
     variants). This may or may not produce the same result as the
     \idx{inlinefullform} the corresponding \idx{glsxtrfull} command, 
     depending on the abbreviation style}
  }
  \gterm{innerformatting}
  {
    \name{inner formatting}
    \desc{the formatting applied by the \glsopt{innertextformat}
    option, which redefines \gls{glsxtrgenentrytextfmt}. The inner
    formatting can only be applied if \gls{glsxtrgenentrytextfmt} is
    embedded within the entry's display style}
  }
  % FILE EXTENSIONS
  \gext{log}{}%
  \gext{aux}{\common}%
  \gext{bib}{\common}%
  \gext{tex}{\common}%
  \gext{toc}{}%
  \gext{glstex}{}%
  \gext{glsdefs}{}%
  \gext{glslabels}{}%
  \gext{gls}{}%
  \gext{glo}{}%
  \gext{glg}{}%
  \gext{ist}{}%
  \gext{xdy}{}%
  \gext{acr}{}%
  \gext{gls-abr}{}%
  \gext{glo-abr}{}%
  \gext{glg-abr}{}%
  \gext{ldf}{}%
  % GENERAL INDEX
  \gpunc{unknowntag}{\name{\code{??} (unknown entry marker)}
    \field{text}{\code{??}}}
  \gpunc{sym.fullstop}{\name{\code{.} (full stop or period)}
    \field{see}{idx.fullstop}
  }
  \gpunc{sym.nbsp}{\name{\code{\textasciitilde} (non-breaking space)}
    \field{see}{idx.nbsp}
  }
  \gpunc{sym.hash}{\name{\code{\#}}}
  \gidx{uppercase}{\field{seealso}{idx.titlecase,idx.sentencecase,idx.allcaps}}
  \gidx{lowercase}{}
  \gidx{titlecase}{\name{title case}}
  \gidx{sentencecase}{\common\name{sentence case}}
  \gidx{allcaps}{\common\name{all caps}}
  \gidx{casechange}{\name{case change}
   \field{seealso}{idx.uppercase,idx.lowercase,idx.titlecase,idx.sentencecase,idx.allcaps}}
  \gidx{smallcaps}{\name{small caps}}
  \gidx{period}{\name{period (\code{.})}%
    \field{text}{period}
    \field{alias}{idx.fullstop}
  }
  \gidx{fullstop}{\name{full stop (\code{.})}%
    \field{text}{full stop}
  }
  \gidx{nbsp}{\name{non-breaking space (\code{\textasciitilde})}
    \field{symbol}{\code{\textasciitilde}}
  }
  \gidx{tab}{\name{tabulation (\code{\&})}
    \field{symbol}{\code{\&}}
  }
  \gidx{amp}{\name{\code{\&}}\field{alias}{idx.tab}}
  \gpunc{sym.startrange}{\name{\code{\nlctopenparen} (range start)}
   \field{symbol}{\code{\nlctopenparen}}
  } 
  \gpunc{sym.endrange}{\name{\code{\nlctcloseparen} (range end)}
   \field{symbol}{\code{\nlctcloseparen}}
  } 
}

\title{\styfmt{glossaries-extra.sty} v1.8:
 an extension to the \styfmt{glossaries} package}
\author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\href{https://www.dickimaw-books.com/}{\nolinkurl{dickimaw-books.com}}}

\date{2025-08-13
}
\begin{document}
 \maketitle

\htmlavailable

\begin{abstract}
The \sty{glossaries-extra} package is an extension to the
\sty{glossaries} package, providing additional features.
In particular, it provides a completely different abbreviation
mechanism.
You will need at least \sty{glossaries} version 4.19, but it is best
to update both packages at the same time, if new releases are
available for both of them.
\end{abstract}

\begin{warning}
The \sty{glossaries-extra} package uses a different set
of defaults to the base \sty{glossaries} package. This means that if
you simply replace \sty{glossaries} with \sty{glossaries-extra} in
an existing document, there may be some differences in the PDF, and
you may encounter errors. See \sectionref{sec:defaults} for more details.
\end{warning}

\begin{information}
This document assumes some familiarity with the \sty{glossaries} package.
If you are new to \sty{glossaries}, you may prefer to start with the
following:
\begin{itemize}
\item
\ctanmirrordocnofn{macros/latex/contrib/glossaries/glossariesbegin}{The
\styfmt{glossaries} package: a guide for beginners}
\texdocref{glossariesbegin}

\item
\ctanmirrornofn{support/bib2gls/bib2gls-begin.pdf}{\styfmt{glossaries-extra}
and \appfmt{bib2gls}: an
introductory guide}
\texdocref{bib2gls-begin}
\end{itemize}
\end{information}

\frontmatter
\tableofcontents
\listofexamples

\mainmatter
\part{User Guide}

\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 \sty+{glossaries-extra} package is an attempt to provide
a~compromise for this conflict. Version 4.22 of the \sty{glossaries}
package is the last version to incorporate any major new features.
Future versions of \sty{glossaries} will mostly 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.

\begin{important}
Some of the commands provided by the base \sty+{glossaries} package
are incompatible with \sty+{glossaries-extra}. These are marked with
\glssymbol{sym.banned} in this document.
\end{important}

The \sty{glossaries-extra} package internally loads the
\sty{glossaries} package. As a general rule, it's better to defer
loading the base \sty{glossaries} package to \sty{glossaries-extra}
rather than loading the two packages separately.

\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 \sty{glossaries} as it would break backward
compatibility, but since \sty{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 \optval{toc}{true} (add the glossaries to the table of
contents). Use \optval{toc}{false} to switch this back off.

\item \optval{nopostdot}{true} (suppress the terminating \idx{fullstop}
after the description in the \idx{glossary}). Use
\optval{nopostdot}{false} or just \opt{postdot} to restore the
terminating \idx{fullstop}. Alternatively, if you are interested in
switching to \app{bib2gls}, you can instruct \app{bib2gls} to insert
it with the \resourceopt{post-description-dot} option.

\item \opt{noredefwarn} (suppress the warnings that occur when
the \env{theglossary} environment and \gls{printglossary} are redefined while
\sty{glossaries} is loading). Note that this won't have any effect if
the \sty{glossaries} package has already been loaded before you load
the \sty{glossaries-extra} package.

\item If \sty{babel} has been loaded, the \optval{translate}{babel}
option is switched on. To revert to using the \sty{translator}
interface, use \optval{translate}{true}. There is no change to the
default if \sty{babel} hasn't been loaded.

\item The default style used by \gls{newacronym} is
\abbrstyle{short-nolong}. (That is, the long form is not shown on
\idx{firstuse}.) To revert back to \qt{\meta{long} (\meta{short})} on
\idx{firstuse} do:
\begin{codebox}
\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{long-short}}
\end{codebox}
In the above example, \abbrstyle{long-short} refers to the
 \sty{glossaries-extra} \idx{abbrvstyle} not the \sty{glossaries} acronym style
of the same name. See \sectionref{sec:abbreviations} for further details.

\end{itemize}

\section{Example Differences Between \stytext{glossaries} and
\stytext{glossaries-extra}}
\label{sec:examplediffs}

The examples below illustrate the difference in explicit package
options between \sty{glossaries} and \sty{glossaries-extra}. There
may be other differences resulting from modifications to commands
provided by \sty{glossaries}.

\subsection{Basic defaults}
\label{sec:examplediffsbasic}

\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox}
This is essentially equivalent to:
\begin{codebox*}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[\opt{toc},\opt{nopostdot}]\marg{glossaries}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox*}
The defaults for \sty{glossaries} are \optval{toc}{false} and
\optval{nopostdot}{false} but for \sty{glossaries-extra} the
defaults are \optval{toc}{true} and \optval{nopostdot}{true}.
However, \sty{glossaries-extra} won't change the settings if
\sty{glossaries} has already been loaded. For example:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\marg{glossaries}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox}
This is now like:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[\optval{toc}{false},\optval{nopostdot}{false}]
 \marg{glossaries-extra}
\end{codebox}
In general, it's best to only load \sty{glossaries-extra} and allow
it to implicitly load \sty{glossaries}. This ensures better
integration.

\subsection{Language defaults}
\label{sec:examplediffslang}

\begin{codebox*}
\cmd{documentclass}[british]\marg{article}
\cmd{usepackage}\marg{\sty{babel}}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox*}
This is like:
\begin{codebox*}
\cmd{documentclass}[british]\marg{article}
\cmd{usepackage}\marg{\sty{babel}}
\cmd{usepackage}[\opt{toc},\opt{nopostdot},\optval{translate}{babel}]\marg{glossaries}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox*}
By default, the base \sty{glossaries} package will load \sty{translator} if
\sty{babel} is detected, but the \sty{glossaries-extra} won't.
Remember that if \sty{glossaries} has already been loaded before
\sty{glossaries-extra} then it's too late to specify the
\opt{translate} option with \sty{glossaries-extra} as the
localisation support will have already been established when
\sty{glossaries} was loaded.

\subsection{Combined with \clstext{memoir}}
\label{sec:examplediffsmemoir}

\begin{codebox}
\cmd{documentclass}\marg{\cls{memoir}}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox}
This is like:
\begin{codebox}
\cmd{documentclass}\marg{\cls{memoir}}
\cmd{usepackage}[\opt{toc},\opt{nopostdot},\opt{noredefwarn}]\marg{glossaries}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox}
\emph{However}
\begin{codebox}
\cmd{documentclass}\marg{\cls{memoir}}
\cmd{usepackage}\marg{glossaries}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox}
This is like:
\begin{codebox}
\cmd{documentclass}\marg{\cls{memoir}}
\cmd{usepackage}[\optval{toc}{false},\optval{nopostdot}{false}]\marg{glossaries}
\cmd{usepackage}\marg{glossaries-extra}
\end{codebox}
Since by the time \sty{glossaries-extra} has been loaded,
the base \sty{glossaries} package has already redefined \cls{memoir}['s]
\idx{glossary}-related commands.

\subsection{Abbreviations}
\label{sec:examplediffsabbrv}

Abbreviations are defined with \gls{newabbreviation}:
\begin{codebox}
\cmd{usepackage}\marg{glossaries-extra}
\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine}
\cbeg{document}
First use: \gls{gls}\marg{svm}. Explicit full form: 
\gls{glsxtrfull}\marg{svm}.
\cend{document}
\end{codebox}
This is the closest match to:
\begin{codebox}
\cmd{usepackage}\marg{glossaries}
\gls{newacronym}\marg{svm}\marg{SVM}\marg{support vector machine}
\cbeg{document}
First use: \gls{gls}\marg{svm}. Explicit full form: 
\gls{acrfull}\marg{svm}.
\cend{document}
\end{codebox}
If you want to continue using \gls{newacronym} then you will need to
change the style for the \cat{acronym} \idx{category}:
\begin{codebox}
\cmd{usepackage}\marg{glossaries-extra}
\gls{setabbreviationstyle}\oarg{\strong{\cat{acronym}}}\marg{\abbrstyle{long-short}}
\gls{newacronym}\marg{svm}\marg{SVM}\marg{support vector machine}
\cbeg{document}
First use: \gls{gls}\marg{svm}. Explicit full form: 
\gls{glsxtrfull}\marg{svm}.
\cend{document}
\end{codebox}

\begin{important}
Don't use commands like \gls{glsfirst} or \gls{glstext} with
abbreviations. See \sectionref{sec:abbreviations} for further
details.
\end{important}

\subsection{Glossary Mid-Build Placeholder (\glsfmttext{printglossary})}
\label{sec:examplediffprintgloss}

Another noticeable change with \sty{glossaries-extra} is that by
default \gls{printglossary} will now display information text in the
document if the external \idx{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 \app+{makeindex}\slash\app+{xindy} on just the
non-empty \idx{glossary} (or \idxpl{glossary}) and use the iterative
\gls{printglossaries} command instead of \gls{printglossary}. For
example, consider the following:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[\opt{acronym}]\marg{glossaries}
\gls{makeglossaries}
\gls{newacronym}\marg{laser}\marg{laser}\marg{light amplification by stimulated
emission of radiation}
\cbeg{document}
\gls{gls}\marg{laser}
\gls{printglossaries}
\cend{document}
\end{codebox}
The above document will only display the list of
acronyms at the place where \gls{printglossaries} occurs. However it
will also attempt to input the \ext{gls} file associated with
the \code{main} \idx{glossary}.

If you use \app{makeglossaries}, you'll get the warning message:
\begin{transcript}
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{transcript}
(where the original file is called \filefmt{test.tex})
but if you simply call \app{makeindex} directly to generate the
\ext+{acr} file (without attempting to create the \ext{gls}
file) then the transcript file will always contain the message:
\begin{transcript}
No file test.gls.
\end{transcript}
This doesn't occur with \app{makeglossaries} as it will create
the \ext{gls} file containing the single command \gls{null}.

If you simply change from \sty{glossaries} to
\sty{glossaries-extra} in this document, you'll find a change in the
resulting PDF if you don't use \app{makeglossaries} and you only
generate the \ext{acr} file with \app{makeindex}.

The transcript file will still contain the message
about the missing \ext{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 \opt{nomain} package option:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[\opt{nomain},\opt{acronym},\opt{postdot}]
 \marg{glossaries-extra}
\gls{makeglossaries}
\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{long-short}}
\gls{newacronym}\marg{laser}\marg{laser}\marg{light amplification by stimulated
emission of radiation}
\cbeg{document}
\gls{gls}\marg{laser}
\gls{printglossaries}
\cend{document}
\end{codebox}
\begin{information}
Note the need to set the acronym style using
\gls{setabbreviationstyle} before \gls{newacronym}.
See \sectionref{sec:abbreviations} for further details.
\end{information}

\section{Further Reading}
\label{sec:reading}

The following documents and web pages are also available:
\begin{itemize}
\item
\ctanmirrornofn{macros/latex/contrib/glossaries-extra/glossaries-extra-code.pdf}%
{The \styfmt{glossaries-extra} documented code}
\texdocref{glossaries-extra-code}

\item \gallery{Gallery: \styfmt{glossaries},
\styfmt{glossaries-extra} and \appfmt{bib2gls}}.

\item \dickimawhref{faq.php}{FAQs: \styfmt{glossaries},
\styfmt{glossaries-extra} and \appfmt{bib2gls}}.

\item \dickimawhref{latex/buildglossaries/}{Incorporating
\appfmt{makeglossaries} or \appfmt{makeglossaries-lite} or
\appfmt{bib2gls} into the document build}.

\item \ctanref{pkg/bib2gls}{The \appfmt{bib2gls} application}.

\item \ctanref{pkg/glossaries}{The \styfmt{glossaries} package}.

\end{itemize}

\chapter{Package Options}
\label{sec:pkgopts}

\pkgdef{glossaries-extra}
%
This chapter describes the package options provided by \sty{glossaries-extra} 
that are either not defined by the base \sty{glossaries} package or are modified by
\sty{glossaries-extra}. You can additionally pass the base package
options to \sty{glossaries-extra}. For example, instead of:
\begin{codebox}
\cmd{usepackage}\oarg{\opt{nonumberlist}}\marg{glossaries}
\cmd{usepackage}\oarg{\opt{abbreviations}}\marg{glossaries-extra}
\end{codebox}
you can simply do:
\begin{codebox}
\cmd{usepackage}\oarg{\opt{abbreviations},\opt{nonumberlist}}
 \marg{glossaries-extra}
\end{codebox}

\begin{information}
It's better not to load the \sty{glossaries} package first.
Leave \sty{glossaries-extra} to load it, where possible, to allow for
a smoother integration between the two packages.
\end{information}

After \sty{glossaries-extra} has been loaded, some of the \sty{glossaries-extra}
package options may be changed with:
\cmddef{glossariesextrasetup}
where \meta{options} are the same as the relevant package option.

\begin{important}
Certain options can only be supplied as package options since the
settings need to be known while \sty{glossaries-extra} is loading.
\end{important}

To change the base \sty{glossaries} package's options (that may be
changed after the package has loaded), continue to use:
\cmddef{setupglossaries}
but don't use any of the options listed here in that command.

\section{Glossary Lists}
\label{sec:gloslistopts}

% PACKAGE OPTION: nomissingglstext
\optiondef{nomissingglstext}
If true, this will suppress the warning written to the transcript
and 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.

% PACKAGE OPTION: abbreviations
\optiondef{abbreviations}
This option has no value and can't be cancelled. If used,
it will automatically create a new glossary with the label
\code{abbreviations} and redefines \gls{glsxtrabbrvtype} to this
label. (The file extensions are \ext+{glg-abr},
\ext+{gls-abr} and \ext+{glo-abr}.)
In addition, this option defines a shortcut command:
\cmddef*{printabbreviations}
which is equivalent to:
\begin{codebox}
\gls{printglossary}\oarg{\printglossoptval{type}{\gls{glsxtrabbrvtype}},\meta{options}}
\end{codebox}
If \sty{glossaries-extra-bib2gls} is also loaded then this option
will additionally provide \gls{printunsrtabbreviations}
which uses \gls{printunsrtglossary} instead.

The title of the new glossary is given by
\cmddef*{abbreviationsname}
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 \gls{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{information}
If you don't use the \opt{abbreviations} package option,
the \gls{abbreviationsname} command won't be defined (unless it's
defined by an included language file).
\end{information}

If the \opt{abbreviations} option is used and the
\opt{acronym} option provided by the \sty{glossaries}
package hasn't been used, then \gls{acronymtype}
will be set to \gls{glsxtrabbrvtype} so that acronyms defined with
\gls{newacronym} can be added to the list of abbreviations. If you
want acronyms in the \code{main} glossary and other abbreviations in the
\code{abbreviations} glossary then you will need to redefine
\gls{acronymtype} to \code{main}:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{acronymtype}}\marg{main}
\end{codebox}

Note that there are no analogous options to the \sty{glossaries}
package's \opt{acronymlists} option (or associated commands)
as the abbreviation mechanism is handled differently with
\sty{glossaries-extra}.

% PACKAGE OPTION: symbols
\optiondef{symbols}
This is passed to the base \sty{glossaries} package, but
\sty{glossaries-extra} will additionally define:
\cmddef*{glsxtrnewsymbol}
which is equivalent to:
\begin{codebox}
\gls{newglossaryentry}\margm{entry-label}\marg{\gloskeyval{name}{\meta{symbol}},
 \gloskeyval{sort}{\meta{entry-label}},\gloskeyval{type}{symbols},\gloskeyval{category}{symbol},
\meta{options}}
\end{codebox}
Note that the \gloskey{sort} key is set to the \meta{entry-label}
not the \meta{symbol} as the symbol will likely contain commands.
If this isn't appropriate, you can override it by using the \gloskey{sort} key
in the optional argument.

This option also sets the \catattr{regular} attribute to \code{true}
for the \cat{symbol} category and provides the
\idx{catpostdeschook}:
\cmddef*{glsxtrpostdescsymbol}

If \sty{glossaries-extra-bib2gls} is also loaded then this option
will additionally provide \gls{printunsrtsymbols}
which uses \gls{printunsrtglossary}.

% PACKAGE OPTION: numbers
\optiondef{numbers}
This is passed to the base \sty{glossaries} package but
\sty{glossaries-extra} will additionally define:
\cmddef*{glsxtrnewnumber}
which is equivalent to:
\begin{codebox}
\gls{newglossaryentry}\margm{entry-label}\marg{\gloskeyval{name}{\meta{number}},
 \gloskeyval{sort}{\meta{entry-label}},\gloskeyval{type}{numbers},\gloskeyval{category}{number},
\meta{options}}
\end{codebox}
Note that the \gloskey{sort} key is set to the \meta{entry-label}.
If this isn't appropriate, you can override it by using the \gloskey{sort} key
in the optional argument.

This option also sets the \catattr{regular} attribute to \code{true}
for the \cat{number} category and provides the
\idx{catpostdeschook}:
\cmddef*{glsxtrpostdescnumber}

If \sty{glossaries-extra-bib2gls} is also loaded then this option
will additionally provide \gls{printunsrtnumbers}
which uses \gls{printunsrtglossary}.

% PACKAGE OPTION: acronyms
\optiondef{acronyms}
This is passed to the base \sty{glossaries} package (which defines
\gls{printacronyms} and creates a new glossary with the label \code{acronym}) but
if \sty{glossaries-extra-bib2gls} is loaded then this option will
additionally provide \gls{printunsrtacronyms}
which uses \gls{printunsrtglossary}.

As with the base \sty{glossaries} package, this option redefines
\gls{acronymtype} to \code{acronym}. Note that this option doesn't
change \gls{glsxtrabbrvtype}.

% PACKAGE OPTION: acronym
\optiondef{acronym}
If \optval{acronym}{true}, this behaves like \opt{acronyms}.
Note that \optval{acronym}{false} won't work if the base
\sty{glossaries} package was loaded before \sty{glossaries-extra}.

% PACKAGE OPTION: index
\optiondef{index}
This is passed to the base \sty{glossaries} package but
if \sty{glossaries-extra-bib2gls} is loaded then this option will
additionally provide \gls{printunsrtindex}
which uses \gls{printunsrtglossary}.

The base package \opt{index} option also defines:
\cmddef*{newterm}
This definition is modified by \sty{glossaries-extra} to
additionally set the \gloskey{category} to \cat{index} and sets the
\gloskey{description} to discard the \idx{postdeschook}
(\gls{nopostdesc}) but retain \gls{glsxtrpostdescription} so that
the \idx{catpostdeschook} can still be applied.

This option also sets the \catattr{regular} attribute to \code{true}
for the \cat{index} category and defines an associated
\idx{catpostdeschook}:
\cmddef*{glsxtrpostdescindex}

\section{Glossary Style Options}
\label{sec:glosstyleopts}

% PACKAGE OPTION: nopostdot
\optiondef{nopostdot}
This option is provided by \sty{glossaries} where it simply alters a
corresponding conditional that's used inside
\gls{glspostdescription} to determine whether or not to insert a
\idx{fullstop}. The \opt{nopostdot} option is modified by
\sty{glossaries-extra} to reduce interference from the
\opt{postpunc} option (described below).

\begin{important}
The \opt{nopostdot} option will have no effect if the \idx{glossarystyle} doesn't
include \gls{glspostdescription}. (Use \opt{stylemods} to ensure that all the
predefined styles that show the description have this hook added.)
\end{important}

If you are using \app{bib2gls}, you may prefer to use the
\resourceopt{post-description-dot} resource option. If you do use that option,
make sure that you have \optval{nopostdot}{true} (or \optval{postpunc}{none})
to prevent a double-dot.

\begin{information}
The \resourceopt{post-description-dot} resource option appends a dot to the
end of the \gloskey{description} value (if set). This means that the 
\idx{postdeschook} will be placed after the dot. This is different from using
\optval{nopostdot}{false} (or \opt{postdot} or \opt{postpunc}) which will append the
punctuation mark at the end of the \idx{postdeschook}.
\end{information}

% PACKAGE OPTION: postdot
\optiondef{postdot}
This is a shortcut for \optval{nopostdot}{false}.

% PACKAGE OPTION: postpunc
\optiondef{postpunc}
This option redefines \gls{glspostdescription} to display the
required punctuation. Note that this means the hook will no longer
check for the \opt{nopostdot} conditional.

\begin{important}
This option will have no effect if the \idx{glossarystyle} doesn't
include \gls{glspostdescription}. (Use \opt{stylemods} to ensure that all the
predefined styles that show the description have this hook added.)
\end{important}

The \opt{postpunc} value may either be the required punctuation or
one of the following keywords:

\optionvaldef{postpunc}{dot}
This redefines \gls{glspostdescription} to use a \idx{fullstop} but
also adjusts the space factor. This isn't exactly the same as
\optval{nopostdot}{false} since it removes the conditional from
\gls{glspostdescription}.
If you are using \app{bib2gls}, you may prefer to use the
\resourceopt{post-description-dot} resource option.

\optionvaldef{postpunc}{comma}
This redefines \gls{glspostdescription} to a comma.

\optionvaldef{postpunc}{none}
This redefines \gls{glspostdescription} to do nothing. This isn't
exactly the same as \optval{nopostdot}{true} since it removes the
conditional from \gls{glspostdescription}.

% PACKAGE OPTION: stylemods
\optiondef{stylemods}
Loads the \sty{glossaries-extra-stylemods} package (see
\sectionref{sec:stylemods}), which patches the styles provided with
the base \sty{glossaries} package so that they all use
\gls{glspostdescription}. Extra hooks are also provided to make them
easier to customize.
The value may be one of the following:

\optionvaldef{stylemods}{all}
Loads all styles that are provided by both \sty{glossaries} and
\sty{glossaries-extra}.

\optionvaldef{stylemods}{default}
Patches all the predefined styles that have been loaded, without
loading any extra styles. This will typically be all the styles that
are usually loaded by \sty{glossaries} (for example, \glostyle{list}
and \glostyle{long}). Package options such as \opt{nolist} will
alter which styles are loaded. In the case of \opt{nostyles}, no
styles will be loaded, so none of them will be patched.

\begin{information}
It's pointless using both \opteqvalref{stylemods}{default} and
\opt{nostyles}. Any \idx{glossarystyle} packages that are subsequently loaded
won't be patched.
\end{information}

\optionvaldef{stylemods}{list}
For each element \meta{tag} in \meta{list}, the corresponding package
\styfmt{glossary\dhyphen\meta{tag}} will be loaded. You can use
this in combination with \opt{nostyles} to only load the particular
style package or packages that you require (without loading the full
set of defaults). For example,
\begin{codebox}
\cmd{usepackage}[\opt{nostyles},
 \optval{stylemods}{\marg{bookindex,longextra}},
 \optval{style}{bookindex}]\marg{\sty{glossaries-extra}}
\end{codebox}
This prevents the base \sty{glossaries} package from loading the
default set of styles, but loads \sty{glossaries-extra-stylemods},
\sty{glossary-bookindex} and \sty{glossary-longextra}, 
and then sets the default style to \glostyle{bookindex}.

\section{Loading Other Packages}
\label{sec:otherpkgopts}

Some options listed in other sections, such as the \opt{stylemods}
and \opt{record} options, also load supplementary packages.

% PACKAGE OPTION: prefix
\optiondef{prefix}
Loads the \sty{glossaries-prefix} package (if not already loaded).

% PACKAGE OPTION: accsupp
\optiondef{accsupp}
Loads the \sty{glossaries-accsupp} package (if not already loaded).
This option can only be used as a package option (not in
\gls{glossariesextrasetup}) as \sty{glossaries-extra} needs to know
whether or not to provide accessibility support while it's loading.

\begin{important}
The \sty{glossaries-accsupp} package is still experimental and so
accessibility features are liable to change.
\end{important}

If you want to define styles that can interface with the
accessibility support provided by \sty{glossaries-accsupp} use
the \csfmt{glsaccess\meta{xxx}} type of commands instead of
\csfmt{glsentry\meta{xxx}} (for example, \gls{glsaccesstext} instead of
\gls{glsentrytext}). If \sty{glossaries-accsupp} hasn't been loaded
those commands are equivalent (for example, \gls{glsaccesstext}
just does \gls{glsentrytext}) but if it has been loaded, then the
\csfmt{glsaccess\meta{xxx}} commands will add the accessibility
information. See \sectionref{sec:accsupp} for further details.

\section{Entry Definitions, References and Indexing}
\label{sec:refindexopts}

% PACKAGE OPTION: undefaction
\optiondef{undefaction}
This indicates what to do if an undefined \idx{glossary} entry is referenced.

\begin{important}
Undefined entries can't be picked up by any commands that iterate
over a \idx{glossary} list. This includes \gls{forglsentries} and
\gls{glsaddall}.
\end{important}

\optionvaldef{undefaction}{error}
Produces an error message for undefined \idx{glossary} entries.

\optionvaldef{undefaction}{warn}
Only produces a warning message for undefined \idx{glossary} entries. The
place where the entry has been referenced will be marked with
\idx{unknowntag} (as with undefined labels or citations). The
unknown marker is produced with:
\cmddef{glsxtrundeftag}
This defaults to two question marks.

Note that \gls{ifglsused} will only display \idx{unknowntag} in the document text with
\opteqvalref{undefaction}{warn} if the entry hasn't been defined, as the
underlying boolean variable doesn't exist and so is neither true nor
false. (There will also be a warning in the transcript.) You may
prefer to use \gls{GlsXtrIfUnusedOrUndefined} instead. See
\sectionref{sec:glsunset} for further details.

If you want to write a custom command that needs to generate a
warning or error for an undefined reference, you can use:
\cmddef{glsxtrundefaction}
This will produce the unknown marker if used within the document
environment. Depending on the \opt{undefaction},
\gls{glsxtrundefaction} will either create an error with the given
\meta{message} and \meta{additional help} or will create a warning with the given
\meta{message}.

% PACKAGE OPTION: docdef
\optiondef{docdef}
This setting governs where \gls{newglossaryentry} can be used
(preamble-only or anywhere before the first \idx{glossary} or
anywhere within the document).

Commands like \gls{newabbreviation} and \gls{glsxtrnewsymbol} that internally use
\gls{newglossaryentry} are also governed by this option. Other
commands, such as \gls{longnewglossaryentry} are always preamble-only.

With just the base \sty{glossaries} package, \gls{newglossaryentry} is allowed in
the \env{document} environment as long as you haven't used
\gls{makenoidxglossaries}. There are, however, problems that can
occur when entries are defined within the \env{document} environment
(see the \sty{glossaries} documentation for further details).
To encourage preamble-only use, the \sty{glossaries-extra} package
prohibits the use of \gls{newglossaryentry} within the
\env{document} environment by default, but if you really want this
you can use this package option to allow it.

\begin{information}
Note that in the case of \app{bib2gls}, all entry data is originally
defined in \ext{bib} files. The entry definitions (using commands
like \gls{longnewglossaryentry} and \gls{newabbreviation}) are
written to the \ext{glstex} files that are input in the preamble.
\end{information}

\optionvaldef{docdef}{false}
Prohibits the use of \gls{newglossaryentry} within the
\env{document} environment. All entries must be defined in the
preamble.

\optionvaldef{docdef}{true}
Permits the use of \gls{newglossaryentry} in the \env{document}
environment provided \gls{makenoidxglossaries} hasn't been used (as
per the base \sty{glossaries} package).
This will create a temporary \ext+{glsdefs} file that contains the
entry definitions so that they can be available on the next \LaTeX\
run at the beginning of the document to allow any \idxpl{glossary}
in the front matter to display correctly.

If all your \idxpl{glossary} occur at the end of the document, consider
using \opteqvalref{docdef}{restricted} instead.

\optionvaldef{docdef}{restricted}
Permits the use of \gls{newglossaryentry} in the \env{document}
environment provided the entry definitions all occur before the first
\idx{glossary} is displayed.

This avoids the need for the \ext+{glsdefs} file.  You will still need to take
care about any changes made to the category code of characters that are required
by the \meta{key}\dequals\meta{value} mechanism (that is, the comma and
equal sign) and any \app+{makeindex} or \app+{xindy} special character that
occurs in the \gloskey{sort} key or label. If any of those
characters are made active in the document (for example, through
\sty{babel} shortcuts), then it can cause problems with the entry definition.

This option will allow \gls{newglossaryentry} to be used in the document with
\gls{makenoidxglossaries}, but note that \gls{longnewglossaryentry}
remains a preamble-only command.

With this option, if an entry appears in the glossary before
it has been defined, an error will occur (or a warning if
the \opteqvalref{undefaction}{warn} option is used). If you edit your
document and either remove an entry or change its label, you may
need to delete the document's temporary files (such as the
\ext+{aux} and \ext+{gls} files).

\optionvaldef{docdef}{atom}
This option behaves like \opteqvalref{docdef}{restricted} but creates the
\ext+{glsdefs} file for
\href{https://atom.io/packages/autocomplete-glossaries}{atom's
autocomplete support}. This file isn't input by
\sty{glossaries-extra} and so associated problems with the use of
this file are avoided, but it allows the autocomplete support to
find the labels in the file.

\begin{important}
A \dickimawhrefnofn{bugtracker.php?key=173}{bug fix} in \sty{glossaries} v4.47 has changed the format of the
\ext+{glsdefs} file slightly.
\end{important}

As with \opteqvalref{docdef}{restricted},
entries may be defined in the preamble or anywhere in the document,
but they may only be referenced after they have been defined.
Entries must be defined before the associated glossary is displayed.

If you need a list of all entry labels for the use of an editor or
helper script you may also want to consider the package options
\opt{writeglslabels} and \opt{writeglslabelnames} provided by the
base \sty{glossaries} package. Note that with these options and
with \opteqvalref{docdef}{atom}, only the entry labels that are visible
to \LaTeX\ can be saved. So if you are using \app{bib2gls} you will
only get the labels of the entries that have already been selected by
\app{bib2gls}. The \ext+{bib} files can be found by parsing the
\ext+{aux} file for \gls{glsxtr@resource} (listed in the \resourceopt{src}
option or \gls{jobname}\filefmt{.bib} if \resourceopt{src} is
missing).

% PACKAGE OPTION: shortcuts
\optiondef{shortcuts}
Unlike the base \sty{glossaries} package
option of the same name, this option isn't boolean but has multiple
values.

\begin{information}
Multiple invocations of the \opt{shortcuts} option
\emph{within the same option list} will override each other.
Since these options define commands, the action can't be undone with
a later \gls{glossariesextrasetup}.
\end{information}

\optionvaldef{shortcuts}{ac}
Set the shortcut commands provided by the base \sty{glossaries} package for
acronyms (such as \gls{ac}) but use the \sty{glossaries-extra}
abbreviation commands, such as \gls{glsxtrshort} and
\gls{glsxtrlong}, instead of the analogous base commands, such as
\gls{acrshort} and \gls{acrlong}. See \sectionref{sec:abbrshortcuts}
for further details.

\optionvaldef{shortcuts}{abbreviations}
Sets the abbreviation shortcuts (see \sectionref{sec:abbrshortcuts}).
This setting doesn't switch on the acronym shortcuts provided by the
base \sty{glossaries} package.

\optionvaldef{shortcuts}{abbr}
Synonym for \opteqvalref{shortcuts}{abbreviations}.

\optionvaldef{shortcuts}{other}
Implements the other (non-abbreviation) shortcut commands:
\cmddef*{newentry}
A synonym for \gls{newglossaryentry}.

\cmddef*{newsym}
A synonym for \gls{glsxtrnewsymbol} (provided that the \opt{symbols}
package option is also used).

\cmddef*{newnum}
A synonym for \gls{glsxtrnewnumber} (provided that the \opt{numbers}
package option is also used).

\optionvaldef{shortcuts}{acother}
Implements \opteqvalref{shortcuts}{ac} and \optval{shortcuts}{other}.

\optionvaldef{shortcuts}{abother}
Implements \opteqvalref{shortcuts}{abbreviations} and \optval{shortcuts}{other}.

\optionvaldef{shortcuts}{all}
Implements \opteqvalref{shortcuts}{ac}, \opteqvalref{shortcuts}{abbreviations}
and \optval{shortcuts}{other}.

\optionvaldef{shortcuts}{acronyms}
Sets the shortcuts provided by the base \sty{glossaries} package for
acronyms (such as \gls{ac}). See the \sty{glossaries} package
documentation for further details.

Note that the short and long forms (\gls{acs} and \gls{acl}) don't
use \gls{glsxtrshort} and \gls{glsxtrlong} but use the original
\gls{acrshort} and \gls{acrlong}, which aren't compatible with the
\sty{glossaries-extra} abbreviation mechanism. The better option is
to use \opteqvalref{shortcuts}{ac}.

\begin{information}
Don't use \opteqvalref{shortcuts}{acronyms} unless you have reverted \gls{newacronym} back to the base
\sty{glossaries} package's acronym mechanism. See \sectionref{sec:acrorevert}
for further details.
\end{information}

\optionvaldef{shortcuts}{acro}
Synonym for \opteqvalref{shortcuts}{acronyms}.

\optionvaldef{shortcuts}{true}
This setting is provided by the base \sty{glossaries} package. With
\sty{glossaries-extra} it's equivalent to \opteqvalref{shortcuts}{all}.

\optionvaldef{shortcuts}{false}
This setting is provided by the base \sty{glossaries} package. With
\sty{glossaries-extra} it's equivalent to \opteqvalref{shortcuts}{none}.

% PACKAGE OPTION: indexcrossrefs
\optiondef{indexcrossrefs}
This is a boolean option that governs whether or not to
automatically index any cross-referenced entries that haven't been
marked as used at the end of the document. These are entries that are identified
in one of the cross-referencing fields (\gloskey{see} and \gloskey{seealso}) of
another used entry as opposed to entries that have the cross-referencing fields set.

Since entries with the \gloskey{alias} key are intended as synonyms for another
term, the target is expected to be indexed so entries with the \gloskey{alias}
key set aren't affected by this option.

For example:
\begin{codebox}
\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},
 \gloskeyval{description}{small vegetable marrow}}
\gls{newglossaryentry}\marg{marrow}\marg{\gloskeyval{name}{marrow},
 \gloskeyval{description}{long gourd with green skin},
 \gloskeyval{seealso}{courgette}}
\end{codebox}
Suppose that \qt{marrow} is indexed (so that it appears in the glossary with the
cross-reference to \qt{courgette}) but if courgette isn't indexed anywhere in
the document (using commands like \gls{gls} or \gls{glsadd}) then there will be
a broken cross-reference in the marrow \idx{locationlist} pointing to courgette,
which doesn't appear in the glossary.  With \opteqvalref{indexcrossrefs}{true},
the courgette entry will be indexed at the end of the document using \gls{glsadd} with
\glsoptval{format}{glsxtrunusedformat}, which corresponds to the command
\gls{glsxtrunusedformat}.

Note that this special format \gls{glsxtrunusedformat} simply does \gls{unskip}
and ignores its argument, which creates a blank location.
If any of the cross-referenced entries have been indexed but haven't been marked
as used (for example, with \gls{glsadd}) then this will cause a spurious comma in the
\idx{locationlist}. This is a limitation of the way that \app+{makeindex} and
\app+{xindy} work as they are general purpose indexing applications which require
locations. If you have entries with cross-references, you may want to consider
switching to \app{bib2gls} instead.

\begin{information}
Note that \app{bib2gls} can automatically find dependent
entries when it parses the \ext{bib} source file, so
the \opt{record} option automatically implements
\opteqvalref{indexcrossrefs}{false}.
\end{information}

This function is implemented by code added to the end document hook
that determines whether or not to use the command
\gls{glsxtraddallcrossrefs}. This command iterates over all entries
in all glossaries, which adds to the overall document build time,
especially if you have defined a large number of entries, so this
defaults to \opteqvalref{indexcrossrefs}{false}, but it will be
automatically switched on if you use the \gloskey{see} or
\gloskey{seealso} keys in any entries. See also \sectionref{sec:xr}.

\optionvaldef{indexcrossrefs}{true}
Enables this setting.

\optionvaldef{indexcrossrefs}{false}
Disables this setting even if the \gloskey{see} or \gloskey{seealso}
key is present in any entries.

% PACKAGE OPTION: autoseeindex
\optiondef{autoseeindex}
This is a boolean option that governs whether or not the
\gloskey{see} and \gloskey{seealso} keys should automatically index the
cross-reference when an entry is defined (see \sectionref{sec:xr}).

With the base
\sty{glossaries} package, the \gloskey{see} key was provided as a
shortcut for \gls{glssee}. For example:
\begin{codebox}
\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},
 \gloskeyval{description}{small vegetable marrow}}
\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini},
 \gloskeyval{description}{},
 \gloskeyval{see}{courgette}}
\end{codebox}
is equivalent to:
\begin{codebox}
\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},
 \gloskeyval{description}{small vegetable marrow}}
\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini},
 \gloskeyval{description}{}}
\gls{glssee}\marg{zucchini}\marg{courgette}
\end{codebox}
This was designed for documents where only entries that are actually
used in the document are defined and ensures that the
cross-reference is included in the \idx{glossary}, even though it may not
be referenced anywhere in the document. However, it becomes
problematic if neither entry is required in the document.

The \sty{glossaries-extra} package modifies the action of the
\gloskey{see} key so that it also saves the value and will only
perform the automated \gls{glssee} if
\opteqvalref{autoseeindex}{true}. Similarly for the \gloskey{seealso} key.

\begin{information}
Note that the \opt{record} option automatically implements
\opteqvalref{autoseeindex}{false} as the corresponding action can be
implemented with \app{bib2gls}['s] \resourceopt{selection} option.
\end{information}

\optionvaldef{autoseeindex}{true}
Enables automatic indexing using \gls{glssee} for the \gloskey{see}
key (as per the base \sty{glossaries} package) and \gls{glsxtrindexseealso}
for the \gloskey{seealso} key.

For example, if an entry is defined as
\begin{codebox}
\gls{newglossaryentry}\marg{foo}\marg{\gloskeyval{name}{foo},
 \gloskeyval{description}{},\gloskeyval{see}{bar,baz}}
\end{codebox}
then, with \opteqvalref{autoseeindex}{true} and the default
\opt{indexcrossrefs} setting, this is equivalent to
\begin{codebox}
\gls{newglossaryentry}\marg{foo}\marg{\gloskeyval{name}{foo},\gloskeyval{description}{}}
\gls{glssee}\marg{foo}\marg{bar,baz}
\gls{glossariesextrasetup}\marg{\opteqvalref{indexcrossrefs}{true}}
\gls{GlsXtrSetField}\marg{foo}\marg{see}\marg{bar,baz}
\end{codebox}

\optionvaldef{autoseeindex}{false}
The value of the \gloskey{see} and \gloskey{seealso} keys will 
be stored in their corresponding fields (and can be accessed using
commands like \gls{glsxtrusesee} and \gls{glsxtruseseealso}) but
the cross-reference won't be automatically \indexed.

\begin{information}
Note that \opt{indexcrossrefs} isn't automatically implemented
by the presence of the \gloskey{see} key when \opt{autoseeindex}
is false.
\end{information}

For example, if an entry is defined as
\begin{codebox}
\gls{newglossaryentry}\marg{foo}\marg{\gloskeyval{name}{foo},
 \gloskeyval{description}{},\gloskeyval{see}{bar,baz}}
\end{codebox}
then, with \opteqvalref{autoseeindex}{false} and the default
\opt{indexcrossrefs} setting, this is equivalent to
\begin{codebox}
\gls{newglossaryentry}\marg{foo}\marg{\gloskeyval{name}{foo},
 \gloskeyval{description}{}}
\gls{GlsXtrSetField}\marg{foo}\marg{see}\marg{bar,baz}
\end{codebox}

It's therefore possible with this option to remove the cross-references from the
location lists and set their position within the \idx{glossarystyle}.

Another method of preventing the automatic \idx{indexing} is to
define the entries before the external indexing files have been
opened with \gls{makeglossaries}. Since the appropriate file isn't
open, the information can't be written to it. This will need
the package option \optval{seenoindex}{ignore} to prevent an error occurring.

% PACKAGE OPTION: record
\optiondef{record}
This setting indicates whether or not \app{bib2gls} is required.

\begin{information}
This option can only be set in the preamble and can't be used after
\gls{GlsXtrLoadResources} or \gls{glsbibdata}.
\end{information}

With the \opt{record} setting on (that is, any value other than
\optvalref{record}{off}), then any of the
commands that would typically \idxc{indexing}{index} the entry (such as \gls{gls},
\gls{glstext} or \gls{glsadd}) will add a \record\ to
the \ext{aux} file.  \app{bib2gls} can then read this information to
find out which entries have been used. (Remember that commands like
\gls{glsentryname} don't index, so any use of these commands won't
add a corresponding \record.) See \sectionref{sec:bib2gls} for further details.

The hybrid method additionally performs the standard indexing action
that's required for \app+{makeindex} or \app+{xindy} to work, but this
can't be done until \app{bib2gls} has created the \ext{glstex} files
that provide the entry definitions. In general, it's best to avoid
the hybrid method.

\optionvaldef{record}{off}
Indexing is performed as per the base \sty{glossaries} package using
either \gls{makeglossaries} or \gls{makenoidxglossaries}.
This setting implements \opteqvalref{undefaction}{error}.

\optionvaldef{record}{only}
\Glsname{dual.indexing} is performed by adding \app{bib2gls} \records\
in the \ext{aux} file.  Neither
\gls{makeglossaries} nor \gls{makenoidxglossaries} is permitted.
Use \gls{GlsXtrLoadResources} (or \gls{glsbibdata})
to set up \app{bib2gls} \idxpl{resourceopt}. Glossaries should be
displayed with the \idx{unsrtfam}, such as \gls{printunsrtglossary}.

This setting implements \opteqvalref{undefaction}{warn}, 
\opteqvalref{autoseeindex}{false}, \opteqvalref{indexcrossrefs}{false}
\opteqvalref{sort}{none}, and automatically
loads the supplementary \sty{glossaries-extra-bib2gls} package.
(There should be no need to explicitly load \sty{glossaries-extra-bib2gls}.)

This option also defines the \gloskey{location} and \gloskey{group}
keys that are set by \app{bib2gls} to provide the \idx{locationlist}
and \idx{group} information required by the \idx{unsrtfam}.

The document build process is (assuming the file is called
\filefmt{myDoc.tex}):
\begin{terminal}
pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
\end{terminal}
If you want letter \idxpl{group} you will need the \switch{group}
or \switch{g} switch when invoking \app{bib2gls}:
\begin{terminal}
pdflatex myDoc
bib2gls \switch{g} myDoc
pdflatex myDoc
\end{terminal}

\begin{important}
Note that this setting will prevent the \gloskey{see} key from
automatically implementing \gls{glssee}. (\app{bib2gls} deals with the
\gloskey{see} field.) You may explicitly use \gls{glssee} in the
document, but \app{bib2gls} will ignore the cross-reference if the
\gloskey{see} field was already set for that entry.
\end{important}

\optionvaldef{record}{nameref}
As \opteqvalref{record}{only} but uses nameref \records, which
include the current label information given by \gls{@currentlabel}
and \gls{@currentHref}. This means that the title can be included in
the \idxpl{entrylocation}, if available. This setting also supports
location hypertargets that don't follow a simple
\meta{h-prefix}\meta{\idxc{locationcounter}{the-counter}} format, 
which can't be used with other indexing options.

See \sectionref{sec:recordnameref} for further details of this
option.

\begin{information}
This option requires \sty{hyperref}, otherwise it will fall back on the usual
location \records.
\end{information}

Note that \gls{@currentHref} is always globally updated whenever
\gls{refstepcounter} is used, but \gls{@currentlabel} isn't. This can
cause some undesired side-effects with some settings. Remember also
that the \opt{indexcounter} option increments the associated
counter every time an entry is \indexed, which affects this option.
If the \idx{locationcounter} is the default \ctr{page}, only the
\location\ number is shown.

\optionvaldef{record}{alsoindex}
Deprecated synonym of \opteqvalref{record}{hybrid}.

\optionvaldef{record}{hybrid}
This is a hybrid setting that uses \app{bib2gls} to fetch entry
information from \ext{bib} files, but uses \app+{makeindex} or
\app+{xindy} to create the \idx{glossary} files (which are input with
\gls{printglossary}).  Note that this requires a slower and more
complicated build process (see below).

This hybrid approach is provided for the rare instances
where an existing \app{xindy} rule or module is too complicated to convert to
a \app{bib2gls} rule but the entries need to be fetched from a
\ext{bib} file. There's no benefit in using this option with \app{makeindex}.

This setting does not load \sty{glossaries-extra-bib2gls}, as
\app{bib2gls} is only being used to fetch the entry definitions.

\begin{information}
Since it's redundant to make \app{bib2gls} also sort and collate
locations (in addition to \app{xindy} performing these tasks), use the resource options
\resourceoptval{sort}{none} and
\resourceoptval{save-locations}{false} for a faster build.
Many of the other \idxpl{resourceopt} are likely to be irrelevant.
\end{information}

This setting must be used with \gls{makeglossaries} but not with
its optional argument. 
Each \idx{glossary} should be displayed using \gls{printglossary} (or
\gls{printglossaries} for all of them).

\begin{important}
This setting should not be used with \gls{makenoidxglossaries}. 
\end{important}

You may need to change the transcript file used by \app{bib2gls} to
avoid a clash with \app{xindy}['s] transcript file. This can be done
with \app{bib2gls}['s] \switch{log-file} or \switch{t} option.

The document build process is (assuming the file is called
\filefmt{myDoc.tex}):
\begin{terminal}
pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
\end{terminal}
Note that, in this case, it's redundant to call \app{bib2gls} with the
\switch{group} or \switch{g} switch as \app{xindy}
will insert the group heading information into the corresponding
\idx{glossary} file.

\begin{information}
If you want \app{bib2gls} to form the letter groups
then this hybrid method is inappropriate.
\end{information}

% PACKAGE OPTION: bibglsaux
\optiondef{bibglsaux}

Alternatively, this setting can be implemented with:
\cmddef{glsxtrsetbibglsaux}

This option should only be used once. If used again no new file will
be created. If the \meta{basename} value is empty, \records\ will be
written to the normal \ext{aux} file.

A document containing many \records\ can result in a large
\ext+{aux} file with information that's only relevant to
\app{bib2gls}. This option will create a new file called
\metafilefmt{}{basename}{.aux} that will be used to store the
\records. The file will be skipped by \LaTeX\ but will be picked up
by \app{bib2gls} v3.0+ when it inputs the main \ext{aux} file. Note that
this creates an extra write register.

\begin{important}
You should still supply the main \ext{aux} file when you run
\app{bib2gls} as \metafilefmt{}{basename}{.aux} will only contain
the \records\ and not the other information that \app{bib2gls}
requires (such as the \idxpl{resourceopt}).
\end{important}

% PACKAGE OPTION: equations
\optiondef{equations}
This setting will cause the default \idx{locationcounter} to automatically switch
to \ctr{equation} when inside a numbered equation environment, such
as \env{equation} or \env{align}. The counter can be explicitly
overridden with the \glsopt{counter} \idx{glsopt}.

% PACKAGE OPTION: floats
\optiondef{floats}
This setting will cause the default \idx{locationcounter} to automatically switch
to the corresponding counter when inside a floating environment,
such as \env{figure} or \env{table}. The counter can be explicitly
overridden with the \glsopt{counter} \idx{glsopt}.

Remember that within floats it's the \gls{caption} command that actually uses
\gls{refstepcounter}, so indexing before the caption will result in
the wrong reference. The commands for use in captions and sections,
such as \gls{glsfmttext} and \gls{glsfmtshort}, don't index. (See
\sectionref{sec:headtitle}). You may
want to consider using \gls{glsadd} after the caption (not before). For example:
\begin{codebox}
\cbeg{figure}[htbp]
  \cmd{centering}
  \cmd{includegraphics}\marg{example-image}
  \gls{caption}\marg{Sample \gls{glsfmttext}\marg{foobar} figure}
  \gls{glsadd}\marg{foobar}
\cend{figure}
\end{codebox}

% PACKAGE OPTION: indexcounter
\optiondef{indexcounter}
This option defines the \idx{indexing} counter:
\ctrdef*{wrglossary}
which is incremented every time an entry is \indexed. This option
automatically implements \optval{counter}{wrglossary}. This means
that each \location\ will link to the relevant part of the page 
where the \idx{indexing} occurred (instead of to the top of the page).
See the \app{bib2gls} documentation for the
\resourceopt{save-index-counter} resource option for more details.

\begin{warning}
This option is primarily intended for use with
\app{bib2gls} (v1.4+) and \sty{hyperref}.  It can be used with
\app{makeindex} or \app{xindy}, but it will interfere with the
\idx{locationlist} collation, so you won't have ranges and you'll have
duplicate page numbers present.
\end{warning}

This option works by incrementing \ctr{wrglossary} with
\gls{refstepcounter} and adding \gls{label}. This can cause a problem if the 
\idx{indexing} occurs in an \env{equation} environment as \sty{amsmath}
forbids multiple occurrences of \gls{label} (resulting in the
\qt{Multiple \gls{label}'s} error). It's best to change the counter
to \ctr{page} or \ctr{equation} when in maths mode with this option.
For example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{}
 \cmd{ifmmode} \gls{setupglslink}\marg{\glsoptval{counter}{page}}\cmd{fi}}
\cmd{renewcommand}\marg{\gls{glsaddpresetkeys}}\marg{\comment{}
 \cmd{ifmmode} \gls{setupglsadd}\marg{\glsoptval{counter}{page}}\cmd{fi}}
\end{codebox}

\section{Debugging}
\label{sec:debuggingopts}

% PACKAGE OPTION: debug
\optiondef{debug}
Enables debugging information for draft documents.
This option is defined by the base \sty{glossaries} package, but is
extended by \sty{glossaries-extra} to provide additional settings.
If no value is provided, \optvalref{debug}{true} is assumed.
The following values are available:

\optionvaldef{debug}{false}
This setting is provided by the \sty{glossaries} package and is the
default. This switches off all debugging commands.

\optionvaldef{debug}{true}
This setting is provided by the \sty{glossaries} package and
switches on logging information if an entry is \indexed\ before the
relevant \idx{indexing} files have been opened (only applicable with
\app+{makeindex} and \app+{xindy}). This option is extended by
\sty{glossaries-extra} to also display the label of unknown entries
before the \idx{unknowntag} marker.
\begin{coderesult}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[\opt{debug}]
 \marg{glossaries-extra}
\cbeg{document}
\gls{gls}\marg{example}
\cend{document}
\tcblower
\glsshowtargetfonttext{[example]}\glslink{idx.unknowntag}{??}
\end{coderesult}
This uses \gls{glsshowtargetfonttext} for the annotation, which is
provided by the base \sty{glossaries} package.
 
\optionvaldef{debug}{showaccsupp}
Provided by \sty{glossaries}, this setting shows accessibility
information (\sty{glossaries-accsupp}).

\optionvaldef{debug}{all}
Implements all debugging options.

\optionvaldef{debug}{showwrgloss}
This setting is only available with \sty{glossaries-extra}.
This implements \opteqvalref{debug}{true} and shows 
a marker~(\glsxtrwrglossmark) just before the write operation is
performed by indexing commands. With \opteqvalref{record}{hybrid}
there will be two marks: one for the write operation to the
\ext{aux} file and one for the associated \idx{glossary} file used by
\app{makeindex}\slash\app{xindy}. The marker is produced with the
command:
\cmddef*{glsxtrwrglossmark}

If the \opt{indexcounter} option has been used, this setting will
also mark where the \ctr{wrglossary} counter has been incremented.
The marker is produced with the command:
\cmddef*{glsxtrwrglosscountermark}
This marker is also inserted before the location in the definition
of \gls{glsxtrwrglossarylocfmt}.

\optionvaldef{debug}{showtargets}
This setting is provided by \sty{glossaries} and displays the
hyperlink target names whenever any \idx{glossary}-related commands 
create a hyperlink or hypertarget (for example, \gls{gls}, \gls{glslink},
\gls{glstarget} or \gls{glshypernumber}). The default is to 
use marginal notes in \TeX's \qt{outer} mode and inline annotations
for \qt{inner} or maths modes. This uses \gls{glsshowtargetinner}
for inner and maths annotations and \gls{glsshowtargetouter} for the
outer annotation.

If there are many targets within a single paragraph this can lead to
\qt{too many floats}, so \sty{glossaries-extra} provides a new
package option \opt{showtargets} that can be used to easily switch
to inline annotations for outer mode (rather than having to redefine
\gls{glsshowtargetouter}).

% PACKAGE OPTION: showtargets
\optiondef{showtargets}
Automatically implements \opteqvalref{debug}{showtargets} and
adjusts the annotations according to the \meta{value}. The
\sty{glossaries-extra} package provides supplementary commands to
support this option.

\cmddef*{glsxtrshowtargetouter}
Formats annotations in outer mode. This is initially
\gls{glsshowtargetouter} to match \opteqvalref{debug}{showtargets}.

\cmddef*{glsxtrshowtargetinner}
Formats annotations in inner mode. This is initially
\gls{glsshowtargetinner} to match \opteqvalref{debug}{showtargets}.

\cmddef*{glsshowtargetinnersymleft}
Shows the left annotation and marker. This uses the left
symbol marker:
\cmddef*{glsxtrshowtargetsymbolleft}

\cmddef*{glsshowtargetinnersymright}
Shows the right marker and annotation. This uses the right
symbol marker:
\cmddef*{glsxtrshowtargetsymbolright}

\optionvaldef{showtargets}{left}
A marker is placed to the left of the link/target and a marginal
note is used in outer mode.

\optionvaldef{showtargets}{right}
A marker is placed to the right of the link/target and a marginal
note is used in outer mode.

\optionvaldef{showtargets}{innerleft}
A marker and annotation are placed to the left of the
link/target in all modes.

\optionvaldef{showtargets}{innerright}
A marker and annotation are placed to the right of the
link/target in all modes.

\optionvaldef{showtargets}{annoteleft}
Markers are placed on either side of the 
link/target with the annotation on the left in all modes.

\optionvaldef{showtargets}{annoteright}
Markers are placed on either side of the 
link/target with the annotation on the right in all modes.

\chapter{Defining Entries}
\label{sec:newentry}

The base \sty{glossaries} package provides commands, such as
\gls{newglossaryentry}, to define entries. The
\sty{glossaries-extra} package provides some additional commands,
described in \sectionref{sec:newentrydefs}. For abbreviations, see
\sectionref{sec:abbreviations}. If you use \app{bib2gls}, it will
write command definitions within the \ext{glstex} file. See the
\app{bib2gls} user manual for further information about those
commands.

The \sty{glossaries} user manual warns against using commands such
as \gls{gls} within \idx{field} values. However, if you really need
this, the \sty{glossaries-extra} package provides \gls{glsxtrp} (see
\sectionref{sec:nested}). Alternatively, you may want to consider
multi (compound) entries instead (see \sectionref{sec:multientries}).

\section{Command Definitions}
\label{sec:newentrydefs}

\cmddef{longnewglossaryentry}
This command is provided by the base \sty{glossaries} package to
cater for entries with descriptions that contain paragraph breaks.
(The \meta{key}\dequals\meta{value} interface doesn't support
paragraph breaks in the value.) The base package only provides an
unstarred version of this command, which automatically inserts
\gls{leavevmode}\gls{unskip}\gls{nopostdesc} at the end of the
description. The \sty{glossaries-extra} package replaces this with a
single command:
\cmddef{glsxtrpostlongdescription}
which has the same effect, but can be redefined if required.

The \sty{glossaries-extra} package provides a starred form:
\cmddef{longnewglossaryentry*}
This doesn't insert the hook at the end of the description.

\begin{information}
For a general purpose post-description hook, see \sectionref{sec:postdeschooks}.
\end{information}

Additionally, the \opt{symbols} package option provides
\gls{glsxtrnewsymbol}, and the \opt{numbers} package option provides
\gls{glsxtrnewnumber}. See \sectionref{sec:gloslistopts} for further
details.

\section{Glossary Entry Keys}
\label{sec:newkeys}
In addition to the \idxpl+{gloskey} provided by the base \sty{glossaries}
package (summarised in \sectionref{sec:gloskeys}) the
\sty{glossaries-extra} package provides:

% KEY: category

\optiondef{gloskey.category}
Assigns the \idx{category} label. This should not contain any
special or active characters as it's used to form command names.
See \sectionref{sec:categories} for further details.

% KEY: seealso

\optiondef{gloskey.seealso}
This key is analogous to the \gloskey{see} key but the tag is always
given by \gls{seealsoname}. The value \meta{xr-list} should be a
comma-separated list of entry labels. As with the \gloskey{see} key, this key
automatically indexes the cross-reference by default. The cross-reference will
be displayed in the \idx{locationlist} using
\gls{glsxtruseseealsoformat} (see \sectionref{sec:xr}).
Use \opteqvalref{autoseeindex}{false} to prevent the automatic
\idx{indexing}. (With \app{bib2gls}, adjust the \resourceopt{selection} criteria.)

\begin{important}
With just the base \sty{glossaries} package, the \gloskey{see} key
simply performs this automated indexing. With 
\sty{glossaries-extra} the value is also saved. Similarly with the
\gloskey{seealso} key. The value isn't saved with explicit use of
\gls{glsxtrindexseealso} or \gls{glssee}.
\end{important}

% KEY: alias

\optiondef{gloskey.alias}
This is similar to the \gloskey{see} key but the value can only
be a single entry label. In addition to automatically \idx{indexing} the
cross-reference, this command will cause the entry with this key to
have hyperlinks go to the aliased entry when referenced with
commands like \gls{gls}. Whenever the entry is \indexed\ with
commands like \gls{gls}, the \idx{indexing} will be performed on the
target entry (the \gloskey{alias} value). See \sectionref{sec:xr}
for further details.

\begin{important}
Any entry that has a \gloskey{see}, \gloskey{seealso} or
\gloskey{alias} key set will be added to the glossary by default
when using \app{makeindex} or \app{xindy}. If you don't want this
behaviour, use the \optval{autoseeindex}{false} package option and
implement a \idx{postdeschook} to insert the cross-reference.
Alternatively, consider switching to \app{bib2gls}.
\end{important}

If you use \app{bib2gls} (see \sectionref{sec:bib2gls}) then most of
the \idxpl{gloskey} can be used as analogous fields in the \ext+{bib}
file. For example, instead of writing the following code in your
\ext+{tex} file:
\begin{codebox}
\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},
 \gloskeyval{description}{a waterbird with webbed feet}}
\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine}
\end{codebox}
You would write the following in a \ext+{bib} file:
\begin{codebox}
\atentry{entry}\marg{duck,
 \gloskeyval{name}{duck},
 \gloskeyval{description}{a waterbird with webbed feet}
}
\atentry{abbreviation}\marg{svm,
  \gloskeyval{short}{SVM},
  \gloskeyval{long}{support vector machine},
}
\end{codebox}

There are, however, some keys that are considered 
\idxc{bib2glsinternalfield}{internal fields} by \app{bib2gls}, 
in that they are defined as keys by
\sty{glossaries-extra} and may be assigned in the \ext+{glstex}
file that's input by \gls{GlsXtrLoadResources}, but
they should not be used in the \ext+{bib} files.

For example, the \gloskey{sort} key (which is recommended with
\app{xindy} where the \gloskey{name} contains symbols) should not be
used in the \ext{bib} file. Instead, use the
\resourceopt{sort-field} resource option or the system of sort
fallbacks to choose the most appropriate field to obtain the sort
value (see \gallerypage{bib2gls-sorting}{Gallery: Sorting}). The
\gloskey{group} and \gloskey{location} keys are also considered
\idxc{bib2glsinternalfield}{internal fields} and are only applicable
with the \idx{unsrtfam}.

\begin{information}
The \gloskey{group} and \gloskey{location} keys are defined by the
\opteqvalref{record}{only} and \opteqvalref{record}{nameref} options
and are only applicable with the \idx{unsrtfam}.
\end{information}

% KEY: group

\optiondef{gloskey.group}
This key is used by \app{bib2gls} within the \ext{glstex} file to
set the \idx{group} label. This label is typically a by-product of
the sorting method (see \sectionref{sec:glosgroups}). If it is
explicitly set without reference to the order it can result in
fragmented groups, see \gallerypage{logicaldivisions}{Gallery:
Logical Glossary Divisions (type vs group vs parent)}. The group
title can be set with \gls{glsxtrsetgrouptitle}. You will need to
invoke \app{bib2gls} with the \switch{group} (or \switch{g}) switch
to ensure that this key is set, when required.

\begin{important}
Letter \idxpl{group} are a consequence of sorting, not the other way
around.
\end{important}

% KEY: location

\optiondef{gloskey.location}
Used by \app{bib2gls} to store the formatted \idx{locationlist}.
The unformatted \idxc{internalfield}{internal location list} is stored in the 
\glosfield{loclist} field, as with \gls{printnoidxglossary}.

With the \idx{unsrtfam}, if the \gloskey{location} field isn't set,
then it will try the \glosfield{loclist} field instead, using the same
method as \gls{printnoidxglossary} to display the \locations. If you
don't want locations with \app{bib2gls}, either use
\printglossopt{nonumberlist} or use the
\resourceoptval{save-locations}{false} resource option.

The base \sty{glossaries} package provides \gls{glsaddkey} and
\gls{glsaddstoragekey} to allow custom keys to be defined. The
\sty{glossaries-extra} package additionally provides:

\cmddef{glsxtrprovidestoragekey}
This is like \gls{glsaddstoragekey} but does nothing if the key has
already been defined. As with \gls{glsaddstoragekey}, the starred
version switches on field expansion for the given key (provided
that it hasn't already been defined).

\cmddef{glsxtrifkeydefined}
Tests if the given key has been defined as a \idx{gloskey}.

\section{Plurals}
\label{sec:plurals}

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

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

For languages that don't have this general rule, the \gloskey{plural}
field will always need to be supplied, where needed.

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

If these fields are omitted, the \sty{glossaries} package follows
these rules:
\begin{itemize}
\item If \gloskey{firstplural} is missing, then \gls{glspluralsuffix}
is appended to the \gloskey{first} field, if that field has been
supplied. If the \gloskey{first} field hasn't been supplied but the
\gloskey{plural} field has been supplied, then the \gloskey{firstplural}
field defaults to the \gloskey{plural} field. If the \gloskey{plural}
field hasn't been supplied, then both the \gloskey{plural} and
\gloskey{firstplural} fields default to the \gloskey{text} field (or
\gloskey{name}, if no \gloskey{text} field) with \gls{glspluralsuffix}
appended.

\item If the \gloskey{longplural} field is missing, then
\gls{glspluralsuffix} is appended to the \gloskey{long} field, if the
\gloskey{long} field has been supplied.

\item If the \gloskey{shortplural} field is missing then, \emph{with
the base \sty{glossaries} acronym mechanism}, \gls{acrpluralsuffix}
is appended to the \gloskey{short} field.

\end{itemize}

The \emph{last case is changed} with \sty{glossaries-extra}.
With this extension package, the \gloskey{shortplural} field
defaults to the \gloskey{short} field with \gls{abbrvpluralsuffix}
appended unless overridden by category attributes. This
suffix command is set by the abbreviation styles. This means that
every time an abbreviation style is implemented,
\gls{abbrvpluralsuffix} is redefined, see \sectionref{sec:abbrvfieldslongshortpl}
for further details.

\section{Entry Aliases}
\label{sec:alias}

An entry can be made an alias of another entry using the
\gloskey{alias} key. The value should be the label of the other
term. There's no check for the other's existence when the aliased
entry is defined. This is to allow the possibility of defining the
other entry after the aliased entry. (For example, when used with
\app{bib2gls}.)

\cmddef*{glsxtraliashook}
This hook is implemented when an entry is defined with the
\gloskey{alias} key set. It does nothing by default. The value of
the \gloskey{alias} field can be obtained with 
\code{\gls{glsxtralias}\margm{entry-label}}.

If an entry \meta{entry-1} is made an alias of \meta{entry-2} then:
\begin{itemize}
\item If the \gloskey{see} field wasn't provided when \meta{entry-1}
was defined, the \gloskey{alias} key will automatically trigger
\begin{compactcodebox}
\gls{glssee}\margm{entry-1}\margm{entry-2}
\end{compactcodebox}

\item If the \sty{hyperref} package has been loaded then
\code{\gls{gls}\margm{entry-1}} will link to \meta{entry-2}'s target. (Unless
the \catattr{targeturl} attribute has been set for \meta{entry-1}'s
category.)

\item With \opteqvalref{record}{off} or
\opteqvalref{record}{hybrid}, the \glsopt{noindex} setting will automatically be triggered
when referencing \meta{entry-1} with commands like \gls{gls} or
\gls{glstext}. This prevents \meta{entry-1} from having a
\idx{locationlist} (aside from the cross-reference added with
\gls{glssee}) unless it's been explicitly indexed with \gls{glsadd} or
if the indexing has been explicitly set using
\glsoptval{noindex}{false}.
See \sectionref{sec:glssee} for adjusting the indexing hook.

Note that with \opteqvalref{record}{only}, the \idx{locationlist}
for aliased entries is controlled with \app{bib2gls}['s] settings.
\end{itemize}

The value of the \gloskey{alias} field can be accessed with
\gls{glsxtralias} (see \sectionref{sec:getsee}).

\section{Setting or Updating Fields}
\label{sec:setfields}

See \sectionref{sec:getfields} for accessing field values and
\sectionref{sec:fieldconditionals} for testing field values.

\begin{warning}
Modifications to fields only have an effect from that point onwards
and may be localised to the current scope. If you are using
\opteqvalref{docdef}{true}, any changes to the field values won't be
saved in the \ext+{glsdefs} file.
\end{warning}

Some of these commands are subtly different from each other. For
example, \gls{glsfielddef} (provided by the base \sty{glossaries}
package), \gls{glsxtrdeffield} and \gls{GlsXtrSetField} all assign a
value to a field, but \gls{glsfielddef} requires that both the entry
and the field exists (so it can't be used to set an unknown \idx{internalfield}), 
\gls{GlsXtrSetField} requires that the entry
exists (so it can be used to set an \idx{internalfield} that doesn't have
an associated key provided that the entry has been defined), and
\gls{glsxtrdeffield} doesn't perform any existence checks (which
means that it can be used to assign \idxpl{internalfield} before the entry
is actually defined).

The commands described in this section don't require the \idx{field} to
have an associated \idx{gloskey}, so you need to be
careful not to misspell the field labels.

\begin{information}
Assigning or changing fields using the commands described here won't
alter related fields. For example, if you use the \gloskey{text} key
but not the \gloskey{plural} key when you define an entry with
\gls{newglossaryentry}, the \gloskey{plural} key will automatically
be set as well, but if you change the value of the \gloskey{text}
field after the entry has been defined, the \gloskey{plural} field
won't be changed. Particular care is required if the field
contributes in some way to the \idx{indexing} information, as this
information is typically initialised when the entry is first
defined. This includes the \gloskey{sort} and \gloskey{parent} keys,
which should not be changed after the entry has been defined.
\end{information}

With \app{bib2gls}, entries aren't defined on the first \LaTeX\ run.
This means that commands that test for existence will produce a
warning and (within the \env{document} environment) the \idx{unknowntag} 
unknown marker. For example:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[\opt{record}]\marg{glossaries-extra}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{myentries},\resourceoptval{selection}{all}}
\cbeg{document}
Defining info
\gls{glsxtrdeffield}\marg{sample}\marg{info}\marg{some information}.
Defining note
\gls{GlsXtrSetField}\marg{sample}\marg{note}\marg{some note}.
\codepar
Info: \gls{glsxtrusefield}\marg{sample}\marg{info}.
Note: \gls{glsxtrusefield}\marg{sample}\marg{note}.
\cend{document}
\end{codebox}
On the first \LaTeX\ run, this produces:
\begin{resultbox}
Defining info . Defining note \glslink{idx.unknowntag}{??}.

Info: some information. Note: .
\end{resultbox}
At this point the \code{sample} entry hasn't been defined, so
referencing it in \gls{GlsXtrSetField} results in a warning and the
double question mark \idx{unknowntag} unknown marker in the text.
The field (\code{note}) isn't saved,
so nothing is shown when the field is referenced with
\gls{glsxtrusefield}. Whereas \gls{glsxtrdeffield} does save the
field with the label \code{info} associated with the label
\code{sample}, even though the \code{sample} entry hasn't actually
been defined. The field can then be later obtained with
\gls{glsxtrusefield}. Once \app{bib2gls} has been run, the
\code{sample} entry should now have its definition in the
\ext{glstex} file, which is loaded by \gls{GlsXtrLoadResources} and
the \code{note} field can be set.

\cmddef{glsxtrdeffield}
This uses \sty{etoolbox}'s \gls{csdef} command to locally set the \idx{field}
given by its \idxc{internalfieldlabel}{internal label}
\meta{field-label} to \meta{value} for the entry identified by
\meta{entry-label}. No existence check is performed.

\cmddef{glsxtredeffield}
This is like \gls{glsxtrdeffield} but (protected) fully expands the
value before assigning it to the field.

\cmddef{glsxtrapptocsvfield}
This command is designed for fields that should contain
comma-separated lists. If the field hasn't been defined, this
behaves like \gls{glsxtrdeffield} otherwise it will append a comma
followed by \meta{element} (unexpanded) to the field value. No
existence check is performed. This field can be iterated over using
\gls{glsxtrforcsvfield} or formatted using \gls{glsxtrfieldformatcsvlist}.
See \sectionref{sec:csvfields} for further details.

\cmddef{glsxtrfieldlistadd}
Appends the given value to the given entry's field (identified using
the \idxc{internalfieldlabel}{field's internal label}) using
\sty{etoolbox}['s] \gls{listcsadd}. The field value can later be
iterated over using \gls{glsxtrfielddolistloop} or
\gls{glsxtrfieldforlistloop}.

\cmddef{glsxtrfieldlistgadd}
As above but uses \gls{listcsgadd} to make a global change.

\cmddef{glsxtrfieldlisteadd}
As above but uses \gls{listcseadd} to expand the value.

\cmddef{glsxtrfieldlistxadd}
As above but uses \gls{listcsxadd} to make a global change.

\cmddef{glsxtrsetfieldifexists}
This is used by the commands \gls{GlsXtrSetField}, \gls{gGlsXtrSetField},
\gls{xGlsXtrSetField}, \gls{eGlsXtrSetField},
\gls{GlsXtrLetField}, \gls{csGlsXtrLetField} and
\gls{GlsXtrLetFieldToField} to produce an error (or warning with
\opteqvalref{undefaction}{warn}) if the entry doesn't exist. This
can be redefined to add extra checks (for example, to prohibit
changing certain fields).

\cmddef{GlsXtrSetField}
This uses \sty{etoolbox}'s \gls{csdef} command to locally set the \idx{field}
given by its \idxc{internalfieldlabel}{internal label}
\meta{field-label} to \meta{value} for the entry identified by
\meta{entry-label}.

This command is written to the \ext{glstex} file by \app{bib2gls} to
set fields that don't have a corresponding key.

\cmddef{gGlsXtrSetField}
This is like \gls{GlsXtrSetField} but uses a global assignment.

\cmddef{eGlsXtrSetField}
This is like \gls{GlsXtrSetField} but (protected) fully expands the
value first.

\cmddef{xGlsXtrSetField}
This is like \gls{eGlsXtrSetField} but uses a global assignment.


\cmddef{GlsXtrLetField}
This uses \sty{etoolbox}'s \gls{cslet} command to locally set the \idx{field}
given by its \idxc{internalfieldlabel}{internal label}
\meta{field-label} to \meta{cs} for the entry identified by
\meta{entry-label}.

\cmddef{csGlsXtrLetField}
This uses \sty{etoolbox}'s \gls{csletcs} command to locally set the
\idx{field} given by its \idxc{internalfieldlabel}{internal label}
\meta{field-label} to the control sequence given by \meta{cs-name}
for the entry identified by \meta{entry-label}.

\cmddef{GlsXtrLetFieldToField}
This assigns the field identified by its
\idxc{internalfieldlabel}{internal label} \meta{field1-label} for
the entry identified by \meta{entry1-label} to the value of the
\idx{field} identified by \meta{field2-label} for the entry identified by
\meta{entry2-label}

\chapter{Abbreviations}
\label{sec:abbreviations}

The acronym mechanism implemented by the base \sty+{glossaries}
package is insufficiently flexible for some documents. The
\sty{glossaries-extra} package provides a completely different
mechanism to deal with abbreviations in a more flexible manner. The
two methods are incompatible. However, the \sty{glossaries-extra}
package provides predefined styles that emulate the appearance
of the styles provided by the base package. If you have previously
used just the base \sty+{glossaries} package, consult
\tableref{tab:acrabbrvstyles} for the closest matching abbreviation
style.

\section{Defining Abbreviations}
\label{sec:newabbr}

Abbreviations are defined using:
\cmddef{newabbreviation}
where \meta{entry-label} is the entry's label (used in commands like
\gls{gls}), \meta{short} is the short form (the abbreviation) and
\meta{long} is the long form (what the abbreviation is short for).
The optional argument \meta{options} may be used to set additional
keys (as per the \idxc{gloskey}{options list} in \gls{newglossaryentry}), such as 
\gloskey{type} or \gloskey{category}.

This command internally uses \gls{newglossaryentry} and sets the
\gloskey{type} to \gls{glsxtrabbrvtype} and the
\gloskey{category} to \cat{abbreviation}. The category (see
\sectionref{sec:categories}) determines the abbreviation style.
The style for a particular category is set using
\gls{setabbreviationstyle}. If the optional argument is omitted, the
\cat{abbreviation} category is assumed (see \sectionref{sec:abbrstyle} for
further details).

The following example document sets up three different abbreviation
styles: \abbrstyle{long-short-sc} for the \cat{abbreviation}
category, \abbrstyle{long-only-short-only} for the custom
\code{genus} category, and \abbrstyle{short-nolong} for the custom
\code{common} category. Note that the custom \code{title} category
doesn't have an associated style.
\begin{codebox}
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc}}
\gls{setabbreviationstyle}\oarg{genus}\marg{\abbrstyle{long-only-short-only}}
\gls{setabbreviationstyle}\oarg{common}\marg{\abbrstyle{short-nolong}}
\gls{newabbreviation}\marg{xml}\marg{xml}\marg{extensible markup language}
\gls{newabbreviation}\oarg{\gloskeyval{category}{genus}}\marg{clostridium}\marg{C.}\marg{Clostridium}
\gls{newabbreviation}\oarg{\gloskeyval{category}{genus}}\marg{myristica}\marg{M.}\marg{Myristica}
\gls{newabbreviation}\oarg{\gloskeyval{category}{common}}\marg{html}\marg{HTML}\marg{hypertext markup language}
\gls{newabbreviation}\oarg{\gloskeyval{category}{title}}\marg{dr}\marg{Dr}\marg{Doctor}
\cbeg{document}
First use: \gls{gls}\marg{xml}, \gls{gls}\marg{clostridium}, 
\gls{gls}\marg{myristica}, \gls{gls}\marg{html}, \gls{gls}\marg{dr}.
\codepar
Next use: \gls{gls}\marg{xml}, \gls{gls}\marg{clostridium}, 
\gls{gls}\marg{myristica}, \gls{gls}\marg{html}, \gls{gls}\marg{dr}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Multiple abbreviation styles},
 description={Example document with multiple abbreviation styles},
 label={ex:multiabbrvstyles}
]
{%
\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{setabbreviationstyle}\marg{long-short-sc}^^J%
\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only}^^J%
\gls{setabbreviationstyle}\oarg{common}\marg{short-nolong}^^J%
\gls{newabbreviation}\marg{xml}\marg{xml}\marg{extensible markup
language}^^J%
\gls{newabbreviation}\oarg{\gloskeyval{category}{genus}}\marg{clostridium}\marg{C.}\marg{Clostridium}^^J%
\gls{newabbreviation}\oarg{\gloskeyval{category}{genus}}\marg{myristica}\marg{M.}\marg{Myristica}^^J%
\gls{newabbreviation}\oarg{\gloskeyval{category}{common}}\marg{html}\marg{HTML}\marg{hypertext
markup language}
\gls{newabbreviation}\oarg{\gloskeyval{category}{title}}\marg{dr}\marg{Dr}\marg{Doctor}
}
{%
First use: \gls{gls}\marg{xml}, \gls{gls}\marg{clostridium}, \gls{gls}\marg{myristica},
\gls{gls}\marg{html}, \gls{gls}\marg{dr}.
\codepar
Next use: \gls{gls}\marg{xml}, \gls{gls}\marg{clostridium}, \gls{gls}\marg{myristica},
\gls{gls}\marg{html}, \gls{gls}\marg{dr}.
}
\end{resultbox}

If the category doesn't have an associated style, the style for the
\cat{abbreviation} category will be used, as with the \code{dr} entry
above, which uses the \abbrstyle{long-short-sc} style because no
style has been associated with its custom \code{title} category.

There are two categories that have an abbreviation style set by
default: \cat{abbreviation} and \cat{acronym}. These are initialised
as follows:
\begin{codebox}
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short}}
\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{short}}
\end{codebox}
This means that abbreviations defined with the default
\cat{abbreviation} category will show the long form followed by the
short form in parentheses on \idx{firstuse}, and those defined with the
\gloskey{category} set to \cat{acronym} will only show the short
form (that is, the long form won't be shown on \idx{firstuse}).

To make it easier to migrate a file containing entries defined with
\gls{newacronym}, the \sty{glossaries-extra} package redefines
\gls{newacronym} to do:
\begin{codebox}
\gls{newabbreviation}
 \oarg{\gloskey{type}=\gls{acronymtype},\gloskey{category}=\cat{acronym},\meta{options}}
 \margm{entry-label}\margm{short}\margm{long}
\end{codebox}
Note that this sets the \gloskey{category} to \cat{acronym}, which
means that any abbreviations defined with \gls{newacronym} will use
the \abbrstyle{short} style by default. If you want to use a
different style, you need to set the abbreviation style for the
\cat{acronym} category. For example, to use the
\abbrstyle{long-short} style:
\begin{codebox}
\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{long-short}}
\end{codebox}
This must be placed before the first instance of \gls{newacronym}.

\begin{information}
You can't use \gls{setacronymstyle} with \sty{glossaries-extra}.
\end{information}

If you have defined any acronym styles with
\gls{newacronymstyle}, you will have to migrate them over to
\gls{newabbreviationstyle}. However, most of the predefined
abbreviation styles are flexible enough to adapt to common
abbreviation formats. It is possible to revert \gls{newacronym} back
to using the base \sty{glossaries} package's acronym mechanism
(\sectionref{sec:acrorevert}), but it should generally not be
necessary.

Terms defined with \gls{newabbreviation} (and \gls{newacronym}) can
be referenced in the main document text using commands like \gls{gls}.
(If you want to use shortcut commands like \gls{ac}, use the
\opteqvalref{shortcuts}{ac} package option.)
Remember that you can use the \glsopt{prereset} and
\glsopt{preunset} options to reset or unset the \idx{firstuseflag}
(see \sectionref{sec:glsunset}). Alternatively, you can use the
commands described in \sectionref{sec:abbrvfieldrefs}. For headings
and captions, see \sectionref{sec:headingcommands}.

\begin{important}
Avoid using \gls{glsfirst}, \gls{glsfirstplural}, \gls{glstext} and
\gls{glsplural} with abbreviations. Many of the abbreviation styles
are too complex to work with these commands (particularly the
case-changing variants or with the \meta{insert} final optional
argument or with \glsopt{innertextformat}). Instead, use commands 
like \gls{gls}, \gls{glsxtrshort}, \gls{glsxtrlong} and \gls{glsxtrfull}.
\end{important}

\subsection{Abbreviation Fields: \optfmt{long} and \optfmt{short}}
\label{sec:abbrvfieldslongshort}

The \meta{short} and \meta{long} arguments are internally assigned with the
\gloskey{short} and \gloskey{long} keys (so don't use those keys in
\meta{options}), but the short and long values may first be modified by
category attributes, such as \catattr{markwords} or
\catattr{markshortwords}. As with other entries, avoid nested links
(see \sectionref{sec:nested}).  This means avoid using the
\idx{glslike} and \idx{glstextlike} commands within \meta{short} and
\meta{long}.

\begin{information}
If an abbreviation can be formed by combining other
entries, consider using the multi (compound) entry function
(see \sectionref{sec:multientries}).
\end{information}

\subsection{Abbreviation Fields: \optfmt{longplural} and \optfmt{shortplural}}
\label{sec:abbrvfieldslongshortpl}

The \gloskey{longplural} key defaults to
\meta{long}\gls{glspluralsuffix} and the \gloskey{shortplural} key
defaults to \meta{short}\gls{abbrvpluralsuffix}. The
\catattr{aposplural} attribute will instead set the
\gloskey{shortplural} to \code{\meta{short}'\gls{abbrvpluralsuffix}}
and the \catattr{noshortplural} attribute will set
\gloskey{shortplural} to just \meta{short} (see
\sectionref{sec:categories}). If these values are not appropriate,
you will need to explicitly set the \gloskey{longplural} and
\gloskey{shortplural} keys in \meta{options}.

The short plural suffix \gls{abbrvpluralsuffix} is redefined by the
abbreviation style. Some styles, such as the \abbrstyle{long-short} style, 
simply redefine \gls{abbrvpluralsuffix} to just:
\cmddef{glsxtrabbrvpluralsuffix}
which is defined to \gls{glspluralsuffix}.

Some styles, such as the \abbrstyle{long-short-sc} style, redefine
\gls{abbrvpluralsuffix} to include code to counteract the formatting
of the abbreviation.

\begin{information}
If you want to change the default short plural suffix, you need to
redefine \gls{glsxtrabbrvpluralsuffix} not \gls{abbrvpluralsuffix}.
If you don't want the suffix added, then set the
\catattr{noshortplural} attribute to \code{true}.
\end{information}

\subsection{Abbreviation Fields: \optfmt{name} and \optfmt{description}}
\label{sec:abbrvfieldsnamedesc}

The \gloskey{name} key is set according to the abbreviation style.
There should not be any need to explicitly set it.
Some styles require the \gloskey{description} key to be set in
\meta{options}, but other styles will set the \gloskey{description}
to the long form.

\subsection{Abbreviation Fields: \optfmt{type}}
\label{sec:abbrvfieldstype}

Abbreviations can be assigned to a particular \idx{glossary} using
the \gloskey{type} key in \meta{options}. The default for \gls{newabbreviation} is:
\cmddef{glsxtrabbrvtype}
This is initialised to \gls{glsdefaulttype} (the default glossary),
but the \opt{abbreviations} package option will redefine it to
\code{abbreviations}.

The default \gloskey{type} for \gls{newacronym} is:
\cmddef{acronymtype}
This is initialised to \gls{glsdefaulttype},
but the \opt{acronyms} package option will redefine it to
\code{acronym}.

\subsection{General Hooks}
\label{sec:abbrvgeneralhooks}

The following are general purpose hooks used within
\gls{newabbreviation}. Note that there are additional hooks that are
used by the abbreviation styles (see \sectionref{sec:abbrstyleinit}).

\cmddef{glsxtrnewabbrevpresetkeyhook}
This hook is provided for further customisation, if required. 
It's implemented before the entry is defined (before the
\gloskey{shortplural} and \gloskey{longplural} keys supplied in
\meta{options} are parsed).
Does nothing by default. The arguments are a legacy throwback to old
versions that didn't have \gls{glsxtrorgshort}.

\cmddef{newabbreviationhook}
This hook is performed just before the entry is defined.
Does nothing by default.

\section{Examples: \appfmt{makeindex} vs
\appfmt{bib2gls}}
\label{sec:abbrvmakeindexvsbib2gls}

\mExampleref{ex:newabbVSnewacVSnewentry}
is a simple document that uses \app{makeindex}:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\marg{glossaries-extra}
\gls{makeglossaries}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{an example}}
\gls{newabbreviation}\marg{xml}\marg{XML}\marg{extensible markup language}
\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration}
\cbeg{document}
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.
\gls{printglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
 label={ex:newabbVSnewacVSnewentry},
 title={\cmd{newabbreviation} vs \cmd{newacronym} vs \cmd{newglossaryentry}},
 description={Example document illustrating the difference between
  \cmd{newabbreviation}, \cmd{newacronym} and \cmd{newglossaryentry}}]
{%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{makeglossaries}^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an
example}}^^J%
\gls{newabbreviation}\marg{xml}\marg{XML}\marg{extensible markup
language}^^J%
\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and
Space Administration}%
}
{%
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and
\gls{gls}\marg{nasa}.^^J%
\gls{printglossaries}
}
\end{resultbox}
Note that the long form of NASA isn't displayed on the
\idx{firstuse} of \code{\gls{gls}\marg{nasa}}. This is because the
\cat{acronym} category uses the \abbrstyle{short} style by default.

In the above example, all entries are placed in the main (default)
glossary. The package options \opt{abbreviations} and \opt{acronyms}
can be used to split them off into separate glossaries.

If you use \app{bib2gls}, the analogous \ext!{bib} entry types are
\atentry{abbreviation} and \atentry{acronym}. 
\mExampleref{ex:atabbVSatacVSatentry} modifies the above 
\exampleref{ex:newabbVSnewacVSnewentry} to use \app{bib2gls}:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cbeg{filecontents*}\marg{\gls{jobname}.bib}
\atentry{entry}\marg{sample,
 \gloskeyval{name}{sample},
 \gloskeyval{description}{an example}
}
\atentry{abbreviation}\marg{xml,
 \gloskeyval{short}{XML},
 \gloskeyval{long}{extensible markup language}
}
\atentry{acronym}\marg{nasa,
 \gloskeyval{short}{NASA},
 \gloskeyval{long}{National Aeronautics and
   Space Administration}
}
\cend{filecontents*}
\cmd{usepackage}\oarg{\opt{record}}\marg{glossaries-extra}
\gls{GlsXtrLoadResources}
\cbeg{document}
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,bib2gls,pdflatex,pdfcrop},
 label={ex:atabbVSatacVSatentry},
 title={\code{@abbreviation} vs \code{@acronym} vs \code{@entry}},
 description={Example document illustrating the difference between
  \code{@abbreviation}, \code{@acronym} and \code{@entry}}]
{%
\cbeg{filecontents*}\marg{\gls{jobname}.bib}^^J%
@entry{sample,^^J%
 name={sample},^^J%
 description={an example}^^J%
}^^J%
@abbreviation{xml,^^J%
 short={XML},^^J%
 long={extensible markup language}^^J%
}^^J%
@acronym{nasa,^^J%
 short={NASA},^^J%
 long={National Aeronautics and Space Administration}^^J%
}^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\oarg{record}\marg{glossaries-extra}^^J%
\gls{GlsXtrLoadResources}
}
{%
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.^^J%
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}

\section{Referencing (Using) Abbreviations}
\label{sec:abbrvfieldrefs}

Since \gls{newabbreviation} internally uses \gls{newglossaryentry},
you can reference abbreviations with the \gls{glslike} commands as with other entries.
Remember that you can use the \glsopt{prereset} and
\glsopt{preunset} options to reset or unset the \idx{firstuseflag}
(see \sectionref{sec:glsunset}).

In general it's best not to use \gls{glsfirst},
\gls{glsfirstplural}, \gls{glstext}, \gls{glsplural} or their
case-changing variants as many of the abbreviation styles are too
complicated for those commands. If you specifically want the full
form, use \gls{gls} with \glsopt{prereset} or use \gls{glsxtrfull}.
If you specifically want the short form for a particular instance, use \gls{gls} with
\glsopt{preunset} or use \gls{glsxtrshort}. If you only want the
long form for a particular instance, use \gls{glsxtrlong}.

If you never want the short form with \gls{gls}, use one of the \qt{noshort}
styles, such as \abbrstyle{long-noshort}. If you never want the long
form with \gls{gls}, use one of the \qt{nolong} styles, such as
\abbrstyle{short-nolong}.

\begin{information}
If you need to use abbreviations in headings or captions, use
commands like \gls{glsfmtshort} and \gls{glsfmtlong} (see 
\sectionref{sec:headingcommands}). Commands like \gls{glsentryname}
are likely to contain non-expandable content.
\end{information}

\mExampleref{ex:abbrhyper} defines abbreviations and references them
in a document with hyperlink support:
\begin{codebox}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\gls{makeglossaries}
\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\codepar
\cbeg{document}
\gls{tableofcontents}
\cmd{section}\marg{Introducing the \gls{glsfmtlong}\marg{svm}}
First use: \gls{gls}\marg{svm}.
Next use: \gls{gls}\marg{svm}.
\codepar
\cmd{section}\marg{Introducing \gls{gls}\marg{html} (incorrect)}
First use (not!): \gls{gls}\marg{html}.
Next use: \gls{gls}\marg{html}.
\codepar
\gls{glsreset}\marg{html}
\cmd{section}\marg{Introducing \gls{glsxtrshort}\marg{html} (incorrect)}
First use: \gls{gls}\marg{html}.
Next use: \gls{gls}\marg{html}.
\codepar
\gls{glsreset}\marg{html}
\cmd{section}\marg{Introducing \gls{glsfmtshort}\marg{html}}
First use: \gls{gls}\marg{html}.
Next use: \gls{gls}\marg{html}.
\codepar
\gls{printglossaries}
\cend{document}
\end{codebox}

\begin{resultbox}[float]
\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
 label={ex:abbrhyper},
 title={Referencing an abbreviation (with \styfmt{hyperref})},
 description={Example document illustrating referencing an
  abbreviation (with hyperref)}]
{%
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{makeglossaries}^^J%
\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine}^^J%
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup
language}^^J%
}
{%
\gls{tableofcontents}^^J%
\cmd{section}\marg{Introducing the \gls{glsfmtlong}\marg{svm}}^^J%
First use: \gls{gls}\marg{svm}.^^J%
Next use: \gls{gls}\marg{svm}.
\codepar
\cmd{section}\marg{Introducing \gls{gls}\marg{html} (incorrect)}^^J%
First use (not!): \gls{gls}\marg{html}.^^J%
Next use: \gls{gls}\marg{html}.
\codepar
\gls{glsreset}\marg{html}^^J%
\cmd{section}\marg{Introducing \gls{glsxtrshort}\marg{html} (incorrect)}^^J%
First use: \gls{gls}\marg{html}.^^J%
Next use: \gls{gls}\marg{html}.^^J%
\codepar
\gls{glsreset}\marg{html}^^J%
\cmd{section}\marg{Introducing \gls{glsfmtshort}\marg{html}}^^J%
First use: \gls{gls}\marg{html}.^^J%
Next use: \gls{gls}\marg{html}.^^J%
\gls{printglossaries}
}
\end{resultbox}

In \exampleref{ex:abbrhyper}, compare the first section heading (which
references an abbreviation with \gls{glsfmtlong}) with the second
section heading (which references an abbreviation with \gls{gls}).
Note that the \idx{firstuse} of the \code{html} entry actually
occurs in the table of contents, which results in the full form 
showing in the table of contents, but only the abbreviation is
shown in the actual section~2 heading. The PDF bookmark shows the entry label
(\code{html}) not the abbreviation (HTML).
There is also a nested link for section~2 in the table of contents.
In some PDF viewers (such as Okular), this will lead to section~2
but, in others (such as Evince), it will lead to the HTML entry
target in the glossary. Similarly for section~3.

As with the base \sty{glossaries} package, the unformatted short and long forms
can be obtained with \gls{glsentryshort} and \gls{glsentrylong} or,
for the plural forms, \gls{glsentryshortpl} and
\gls{glsentrylongpl}. These are analogous to commands like
\gls{glsentrytext} and may be used in expandable contexts. The
sentence case versions (\gls{Glsentryshort},
\gls{Glsentrylong}, \gls{Glsentryshort}, and \gls{Glsentrylong}) are all robust
in \sty{glossaries} v4.49 and lower. As from \sty{glossaries} v4.50,
they can expand in PDF bookmarks, but outside of PDF bookmarks they
will expand to a robust internal command.

\begin{important}
Don't use the base \sty{glossaries} package's acronym commands, such
as \gls{acrshort}. These aren't compatible with \gls{newabbreviation}.
\end{important}

Each abbreviation style has a \idx{displayfullform}, which is the
format produced with the \idx{firstuse} of \gls{gls}, and an
\idx{inlinefullform}, which is the format produced by
\gls{glsxtrfull}. For some styles, such as \abbrstyle{long-short},
the \idxc{displayfullform}{display} and \idxc{inlinefullform}{inline} forms are identical. 

\mExampleref{ex:glsVSfullVSfirst} demonstrates the difference between the
\idx{firstuse} of \gls{gls} compared with the \idx{inlinefullform} for
the \abbrstyle{footnote} abbreviation style. The
example also uses \gls{glsfirst} to demonstrate that it produces an
undesirable result with the selected abbreviation style.

\begin{codebox}
\gls{setabbreviationstyle}\marg{footnote}
\gls{newabbreviation}\marg{nasa}\marg{NASA}
\marg{National Aeronautics and Space Administration}
\codepar
\cbeg{document}
\gls{gls}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}
\codepar
\gls{glsxtrfull}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}
\codepar
\gls{glsfirst}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}
\cend{document}
\end{codebox}

\begin{resultbox}[float]
\createexample*[fontsize={20},
  label={ex:glsVSfullVSfirst},
  title={First use of \cmd{gls} vs \cmd{glsxtrfull} vs \cmd{glsfirst}},
  description={Example document illustrating the difference between
  the first use of \cmd{gls} compared with \cmd{glsxtrfull} and
  \cmd{glsfirst}}]
{%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{setabbreviationstyle}\marg{footnote}^^J%
\gls{newabbreviation}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration}^^J%
}
{%
\gls{gls}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}^^J%
\codepar
\gls{glsxtrfull}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}^^J%
\codepar
\gls{glsfirst}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}^^J%
}
\end{resultbox}

In \exampleref{ex:glsVSfullVSfirst}, the \idx{firstuse} of \gls{gls} puts the long form in
the footnote but correctly inserts the final optional argument
before the footnote marker. The \idx{inlinefullform} (obtained with
\gls{glsxtrfull}) doesn't use a footnote, but instead shows the long
form in parentheses after the short form. The insert material is
correctly placed after the short form.
Compare this with the final line, which uses \gls{glsfirst}. This
shows the long form in the footnote, but the inserted material can't
be shifted before the footnote marker, which results in the strange
\qt{NASA\textsuperscript{2}'s}.

The following commands are included in the set of 
\idx{glstextlike} commands. They have the \idxc{glsopt}{same
options} as \gls{glstext} and don't change the \idx{firstuseflag}.
They will index (unless \glsopt{noindex} is used), create a
hyperlink (if enabled), and use the \idx{postlinkhook}.

\cmddef{glsxtrshort}
Displays the short form using the abbreviation style's formatting.

\cmddef{Glsxtrshort}
As above, but \idx{sentencecase} version.

\cmddef{GLSxtrshort}
As above, but \idx{allcaps} version.

\cmddef{glsxtrshortpl}
Displays the short plural form using the abbreviation style's formatting.

\cmddef{Glsxtrshortpl}
As above, but \idx{sentencecase} version.

\cmddef{GLSxtrshortpl}
As above, but \idx{allcaps} version.

\cmddef{glsxtrlong}
Displays the long form using the abbreviation style's formatting.
As from v1.49, this command simulates \idx{firstuse} by defining
\gls{glsxtrifwasfirstuse} to do its first argument. This is done via
the command:
\cmddef{glsxtrsetlongfirstuse}
which is defined as:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glsxtrsetlongfirstuse}}[1]\marg{\comment{}
 \cmd{let}\gls{glsxtrifwasfirstuse}\gls+{@firstoftwo}
}
\end{compactcodebox}
This command takes the entry label as the argument, which is
ignored by default.

To restore the original behaviour, redefine this command as follows:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrsetlongfirstuse}}[1]\marg{\comment{}
 \cmd{letcs}\gls{glsxtrifwasfirstuse}\marg{@secondoftwo}\comment{}
}
\end{codebox}
This command is also used by the case-changing and plural variants
listed below.

\cmddef{Glsxtrlong}
As above, but \idx{sentencecase} version.

\cmddef{GLSxtrlong}
As above, but \idx{allcaps} version.

\cmddef{glsxtrlongpl}
Displays the long plural form using the abbreviation style's formatting.

\cmddef{Glsxtrlongpl}
As above, but \idx{sentencecase} version.

\cmddef{GLSxtrlongpl}
As above, but \idx{allcaps} version.

\cmddef{glsxtrfull}
Displays the \idx{inlinefullform} using the abbreviation style's formatting. 
Depending on the style, this may not be the same as the text
produced with the \idx{firstuse} of \gls{gls}.

\cmddef{Glsxtrfull}
As above, but \idx{sentencecase} version.

\cmddef{GLSxtrfull}
As above, but \idx{allcaps} version.

\cmddef{glsxtrfullpl}
Displays the \idxc{inlinefullform}{inline full plural form} using the abbreviation style's formatting. 
Depending on the style, this may not be the same as the text
produced with the \idx{firstuse} of \gls{glspl}.

\cmddef{Glsxtrfullpl}
As above, but \idx{sentencecase} version.

\cmddef{GLSxtrfullpl}
As above, but \idx{allcaps} version.

\cmddef{glsxtrsetupfulldefs}
This hook is used within \gls{glsxtrfull}, \gls{glsxtrfullpl} and
the case-changing variations to initialise
\gls{glsxtrifwasfirstuse} in case it's required in the
\idx{postlinkhook}. The default definition is to simulate
\idx{firstuse}. Note that changing this can cause unexpected results
with abbreviation styles that set the \idx{postlinkhook}, such as
\abbrstyle{short-postlong-user}.

\cmddef{glsxtrfullsaveinsert}
This hook is used within \gls{glsxtrfull}, \gls{glsxtrfullpl} and
the case-changing variations to initialise the \gls{glsinsert}
placeholder. The default definition is to use
\gls{glsxtrsaveinsert}. If the insert isn't saved, it can't be used
within the \idx{postlinkhook} for the \gls{glsxtrfull} etc.
This affects the behaviour of the \qt{post-hyphen} abbreviation
styles, such as \abbrstyle{long-hyphen-postshort-hyphen}.

\subsection{Prefixes}
\label{sec:abbrprefixes}

If you are using the \sty{glossaries-prefix} package (which can
be loaded via the \opt{prefix} package option), then there are
commands similar to \gls{glsxtrshort} and \gls{glsxtrlong} that
insert the corresponding prefix and separator at the front if the 
short or long form, if the prefix has been set and is non-empty. In all cases, the
separator is \gls{glsprefixsep}, as with \gls{pgls}.

\begin{important}
These commands require \sty{glossaries-prefix}.
\end{important}

\cmddef{pglsxtrshort}
As \gls{glsxtrshort} but inserts the \gloskey{prefix} field
and separator, if the \gloskey{prefix} value is set and non-empty.

\cmddef{Pglsxtrshort}
As \gls{pglsxtrshort} but \idx{sentencecase}. Note the initial
\qt{P} in the command name, which matches \gls{Pgls} (similarly for
the other prefix \idx{sentencecase} commands).

\cmddef{PGLSxtrshort}
As \gls{pglsxtrshort} but \idx{allcaps}.

\cmddef{pglsxtrshortpl}
As \gls{glsxtrshortpl} but inserts the \gloskey{prefixplural} field
and separator, if the \gloskey{prefixplural} value is set and non-empty.

\cmddef{Pglsxtrshortpl}
As \gls{pglsxtrshortpl} but \idx{sentencecase}.

\cmddef{PGLSxtrshortpl}
As \gls{pglsxtrshortpl} but \idx{allcaps}.

\cmddef{pglsxtrlong}
As \gls{glsxtrlong} but inserts the \gloskey{prefixfirst} field
and separator, if the \gloskey{prefixfirst} value is set and non-empty.

\cmddef{Pglsxtrlong}
As \gls{pglsxtrlong} but \idx{sentencecase}.

\cmddef{PGLSxtrlong}
As \gls{pglsxtrlong} but \idx{allcaps}.

\cmddef{pglsxtrlongpl}
As \gls{glsxtrlongpl} but inserts the \gloskey{prefixfirstplural} field
and separator, if the \gloskey{prefixfirstplural} value is set and non-empty.

\cmddef{Pglsxtrlongpl}
As \gls{pglsxtrlongpl} but \idx{sentencecase}.

\cmddef{PGLSxtrlongpl}
As \gls{pglsxtrlongpl} but \idx{allcaps}.

\subsection{Abbreviation Shortcut Commands}
\label{sec:abbrshortcuts}

The abbreviation shortcut commands can be enabled using
the \opteqvalref{shortcuts}{abbreviations} package option (or
\opteqvalref{shortcuts}{abbr} or \opteqvalref{shortcuts}{ac}).
The provided shortcut commands are listed in
\tableref{tab:abbrshortcuts}. Note that
\gls{glsxtrenablerecordcount} will switch the shortcuts that use the
\gls{cgls}-like commands to the corresponding \gls{rgls}-like
command.

\begin{table}[htbp]
\caption{Abbreviation Shortcut Commands}
\label{tab:abbrshortcuts}
\centering
\begin{tabular}{lll}
\bfseries Shortcut &
\bfseries Shortcut &
\bfseries Equivalent Command\\
\bfseries (\opteqvalref{shortcuts}{abbreviations}) &
\bfseries (\opteqvalref{shortcuts}{ac})\\
\inlineglsdef{ab} & \inlineglsdef{ac} & \gls{cgls}\\
\inlineglsdef{abp} & \inlineglsdef{acp} & \gls{cglspl}\\
\inlineglsdef{as} & \inlineglsdef{acs} & \gls{glsxtrshort}\\
\inlineglsdef{asp} & \inlineglsdef{acsp} & \gls{glsxtrshortpl}\\
\inlineglsdef{al} & \inlineglsdef{acl} & \gls{glsxtrlong}\\
\inlineglsdef{alp} & \inlineglsdef{aclp} & \gls{glsxtrlongpl}\\
\inlineglsdef{af} & \inlineglsdef{acf} & \gls{glsxtrfull}\\
\inlineglsdef{afp} & \inlineglsdef{acfp} & \gls{glsxtrfullpl}\\
\inlineglsdef{Ab} & \inlineglsdef{Ac} & \gls{cgls}\\
\inlineglsdef{Abp} & \inlineglsdef{Acp} & \gls{cglspl}\\
\inlineglsdef{As} & \inlineglsdef{Acs} & \gls{Glsxtrshort}\\
\inlineglsdef{Asp} & \inlineglsdef{Acsp} & \gls{Glsxtrshortpl}\\
\inlineglsdef{Al} & \inlineglsdef{Acl} & \gls{Glsxtrlong}\\
\inlineglsdef{Alp} & \inlineglsdef{Aclp} & \gls{Glsxtrlongpl}\\
\inlineglsdef{Af} & \inlineglsdef{Acf} & \gls{Glsxtrfull}\\
\inlineglsdef{Afp} & \inlineglsdef{Acfp} & \gls{Glsxtrfullpl}\\
\inlineglsdef{AB} & \inlineglsdef{AC} & \gls{cGLS}\\
\inlineglsdef{ABP} & \inlineglsdef{ACP} & \gls{cGLSpl}\\
\inlineglsdef{AS} & \inlineglsdef{ACS} & \gls{GLSxtrshort}\\
\inlineglsdef{ASP} & \inlineglsdef{ACSP} & \gls{GLSxtrshortpl}\\
\inlineglsdef{AL} & \inlineglsdef{ACL} & \gls{GLSxtrlong}\\
\inlineglsdef{ALP} & \inlineglsdef{ACLP} & \gls{GLSxtrlongpl}\\
\inlineglsdef{AF} & \inlineglsdef{ACF} & \gls{GLSxtrfull}\\
\inlineglsdef{AFP} & \inlineglsdef{ACFP} & \gls{GLSxtrfullpl}\\
\inlineglsdef{newabbr} & \gls{newabbr} & \gls{newabbreviation}
\end{tabular}
\end{table}

\section{Tagging Initials}
\label{sec:tagging}

Initial tagging allows you to highlight the initials that form the
abbreviation when the long form is shown in the glossary.

\cmddef{GlsXtrEnableInitialTagging}

\begin{information}
\gls{GlsXtrEnableInitialTagging} must be placed before the abbreviations are defined.
\end{information}

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 \meta{cs}
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:
\cmddef{glsxtrtagfont}
This command defaults to \code{\gls{underline}\margm{text}}
but may be redefined as required.

The control sequence \meta{cs} can't already be defined when
used with the unstarred version of
\gls{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.

The first argument of \gls{GlsXtrEnableInitialTagging} is a
comma-separated list of category names. The \catattr{tagging}
attribute will automatically be set to \code{true} 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.

\mExampleref{ex:tagging} uses initial tagging for both the \cat{acronym} and
\cat{abbreviation} categories. The custom command \csfmt{itag} is
defined as the tagging command.
\begin{codebox}
\gls{makeglossaries}
\gls{GlsXtrEnableInitialTagging}
 \marg{\cat{acronym},\cat{abbreviation}}\marg{\cmd{itag}}
\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{short-nolong-desc}}
\gls{newacronym}
 \oarg{description=\marg{a system for detecting the
 location and speed of ships, aircraft, etc, through 
 the use of radio waves}\comment{description of this term}
 }
 \marg{radar}\comment{identifying label}
 \marg{radar}\comment{short form}
 \marg{\cmd{itag}\marg{ra}dio \cmd{itag}\marg{d}etection \cmd{itag}\marg{a}nd
  \cmd{itag}\marg{r}anging}
\codepar
\gls{newabbreviation}\marg{xml}\marg{XML}
 \marg{e\cmd{itag}\marg{x}tensible \cmd{itag}\marg{m}arkup \cmd{itag}\marg{l}anguage}
\codepar
\gls{newabbreviation}\oarg{\gloskeyval{category}{other}}\marg{tne}\marg{TNE}
 \marg{\cmd{itag}\marg{t}agging \cmd{itag}\marg{n}ot \cmd{itag}\marg{e}nabled}
\codepar
\cbeg{document}
First use: \gls{gls}\marg{radar}, \gls{gls}\marg{xml}, \gls{gls}\marg{tne}.
\codepar
Long form only: \gls{glsxtrlong}\marg{radar},
\gls{glsxtrlong}\marg{xml}, \gls{glsxtrlong}\marg{tne}.
\gls{printglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
 label={ex:tagging},
 title={Tagging abbreviation initials},
 description={Example document illustrating the use of
\cmd{GlsXtrEnableInitialTagging} to tag initial letters that form
the abbreviation}]
{%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{makeglossaries}^^J%
\gls{GlsXtrEnableInitialTagging}\marg{acronym,abbreviation}\marg{\cmd{itag}}^^J%
\gls{setabbreviationstyle}\oarg{acronym}\marg{short-nolong-desc}^^J%
\gls{newacronym}^^J%
 \oarg{description=\marg{a system for detecting the location and
 speed of ships, aircraft, etc, through the use of radio
 waves}\comment{description of this term}
 }^^J
 \marg{radar}\comment{identifying label}
 \marg{radar}\comment{short form}
 \marg{\cmd{itag}\marg{ra}dio \cmd{itag}\marg{d}etection
\cmd{itag}\marg{a}nd \cmd{itag}\marg{r}anging}
\codepar
\gls{newabbreviation}\marg{xml}\marg{XML}^^J
 \marg{e\cmd{itag}\marg{x}tensible \cmd{itag}\marg{m}arkup \cmd{itag}\marg{l}anguage}
\codepar
\gls{newabbreviation}\oarg{\gloskeyval{category}{other}}\marg{tne}\marg{TNE}^^J
 \marg{\cmd{itag}\marg{t}agging \cmd{itag}\marg{n}ot \cmd{itag}\marg{e}nabled}
}
{%
First use: \gls{gls}\marg{radar}, \gls{gls}\marg{xml}, \gls{gls}\marg{tne}.
\codepar
Long form only: \gls{glsxtrlong}\marg{radar}, \gls{glsxtrlong}\marg{xml}, \gls{glsxtrlong}\marg{tne}.^^J%
\gls{printglossaries}
}
\end{resultbox}
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}

\begin{important}
The abbreviation style must be set before the abbreviation with the
corresponding category is defined. If you are using \app{bib2gls}, 
the style must be set before \gls{GlsXtrLoadResources}.
\end{important}

The style for a particular category is set using:
\cmddef{setabbreviationstyle}
If the \meta{category} is omitted, \cat{abbreviation} is assumed.
Remember that \gls{newacronym} sets the \gloskey{category} to
\cat{acronym} so with \gls{newacronym} you need to change the style with:
\begin{codebox}
\gls{setabbreviationstyle}\oarg{\cat{acronym}}\margm{style-name}
\end{codebox}

The style associated with the \cat{abbreviation} category will be
used if an abbreviation is defined with a category that doesn't have
an associated style.

Once you have defined an abbreviation with a given category, you
can't subsequently change the style for that category. You can't
have more than one style per category. The default style for the
\cat{abbreviation} category is \abbrstyle{long-short} and the
default style for the \cat{acronym} category is
\abbrstyle{short-nolong}.

\mExampleref{ex:fallbackabbrstyle} has a custom \code{latin} category
which doesn't have an associated abbreviation style, so it uses the style assigned to
the \cat{abbreviation} category, not the \cat{acronym} category.
The only reason that the \qt{radar} abbreviation (defined with
\gls{newacronym}) uses the style associated with the \cat{acronym}
category is because the default definition of \gls{newacronym} sets
\gloskeyval{category}{\cat{acronym}}.
\begin{codebox}
\cmd{usepackage}[T1]\marg{fontenc}
\cmd{usepackage}\marg{glossaries-extra}
\gls{setabbreviationstyle}\marg{long-short-sc}
\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language}
\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{footnote}
\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging}
\gls{newacronym}\oarg{\gloskeyval{category}{latin}}\marg{ibid}\marg{ibid}\marg{ibidem}
\cbeg{document}
\gls{gls}\marg{html}, \gls{gls}\marg{radar} and \gls{gls}\marg{ibid}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}[float]
\createexample*[fontsize=20,
 label={ex:fallbackabbrstyle},
 title={Category without an associated abbreviation style},
 description={Example document that has an abbreviation with a
category that doesn't have an associated abbreviation style}]
{%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{setabbreviationstyle}\marg{long-short-sc}^^J%
\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language}^^J%
\gls{setabbreviationstyle}\oarg{acronym}\marg{footnote}^^J%
\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging}^^J%
\gls{newacronym}\oarg{category=latin}\marg{ibid}\marg{ibid}\marg{ibidem}
}
{%
\gls{gls}\marg{html}, \gls{gls}\marg{radar} and \gls{gls}\marg{ibid}.^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}

\subsection{Predefined Abbreviation Styles}
\label{sec:predefabbrstyles}

There are two types of abbreviation styles: those that treat the
abbreviation as a regular entry (so that \gls{gls} uses
\gls{glsgenentryfmt} and is encapsulated with
\gls{glsxtrregularfont}) and those that don't treat the abbreviation
as a regular entry (so that \gls{gls} uses \gls{glsxtrgenabbrvfmt}
and is encapsulated with \gls{glsxtrabbreviationfont}).  See
\sectionref{sec:entryfmt} for further details of those commands.

\begin{information}
The non-regular abbreviation styles allow for more complex formats
than the regular styles.
\end{information}

The regular entry abbreviation styles set the \catattr{regular}
attribute to \code{true} for the category assigned to each
abbreviation with that style. This means that on \idx{firstuse},
\gls{gls} uses the value of the \gloskey{first} field and on
subsequent use \gls{gls} uses the value of the \gloskey{text} field
(and analogously for the plural and case-changing versions).

The non-regular abbreviation styles don't set the \catattr{regular}
attribute, unless it has already been set, in which case it will be
changed to \code{false}. The \gloskey{first} and \gloskey{text}
fields (and their plural forms) are set, but they aren't used by
commands like \gls{gls}, which instead use formatting commands, such
as \gls{glsxtrfullformat} and \gls{glsxtrsubsequentfmt}, which are
defined by the style.

In both cases, the \idx{firstuse} of \gls{gls} may not match the
text produced by \gls{glsfirst} (and likewise 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 \gls{glsxtrshort} and
\gls{glsxtrlong}. These may appear slightly differently to the way
the short or long form is displayed within \gls{gls}, depending on the
style.

The sample file
\ctanmirrornofn{macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.pdf}{\filefmt{sample-abbr-styles.pdf}}
demonstrates all predefined styles described here.

\begin{important}
For the \qt{sc} styles that use \gls{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. If you're using
\pdfLaTeX, I recommend that you at least use the \sty{fontenc}
package with the \optfmt{T1} option or something similar.
\end{important}

The predefined styles have helper commands to make it easier to modify
the format. These are described in \sectionref{sec:abbrvcmds}.

\Tableref{tab:acrabbrvstyles} lists the nearest equivalent
\sty{glossaries-extra} abbreviation styles for
the predefined acronym styles provided by \sty{glossaries}, but
note that the new styles use different formatting commands.

\begin{table}[htbp]
\caption[Base Acronym Styles Verses New Abbreviation Styles]{Base Acronym Styles
\glsfmttext{setacronymstyle}\margm{base-style-name} Verses New Abbreviation
Styles \glsfmttext{setabbreviationstyle}\oargm{category}\margm{new-style-name}}
\label{tab:acrabbrvstyles}
\centering
\begin{tabular}{lp{0.7\textwidth}}
\bfseries Base Style Name &
\bfseries New Style Name\\
\acrstyle{long-sc-short} & \abbrstyle{long-short-sc}\\
\acrstyle{long-sm-short} & \abbrstyle{long-short-sm}\\
\acrstyle{long-sp-short} & \abbrstyle{long-short} with \newline
\smcode{\cmd{renewcommand}\marg{\gls{glsxtrfullsep}}\marg{\gls{glsabspace}}}\\
\acrstyle{short-long} & \abbrstyle{short-long}\\
\acrstyle{sc-short-long} & \abbrstyle{short-sc-long}\\
\acrstyle{sm-short-long} & \abbrstyle{short-sm-long}\\
\acrstyle{long-short-desc} & \abbrstyle{long-short-desc}\\
\acrstyle{long-sc-short-desc} & \abbrstyle{long-short-sc-desc}\\
\acrstyle{long-sm-short-desc} & \abbrstyle{long-short-sm-desc}\\
\acrstyle{long-sp-short-desc} & \abbrstyle{long-short-desc} with \newline
\smcode{\cmd{renewcommand}\marg{\gls{glsxtrfullsep}}\marg{\gls{glsabspace}}}\\
\acrstyle{short-long-desc} & \abbrstyle{short-long-desc}\\
\acrstyle{sc-short-long-desc} & \abbrstyle{short-sc-long-desc}\\
\acrstyle{sm-short-long-desc} & \abbrstyle{short-sm-long-desc}\\
\acrstyle{dua} & \abbrstyle{long-noshort}\\
\acrstyle{dua-desc} & \abbrstyle{long-noshort-desc}\\
\acrstyle{footnote} & \abbrstyle{short-footnote}\\
\acrstyle{footnote-sc} & \abbrstyle{short-sc-footnote}\\
\acrstyle{footnote-sm} & \abbrstyle{short-sm-footnote}\\
\acrstyle{footnote-desc} & \abbrstyle{short-footnote-desc}\\
\acrstyle{footnote-sc-desc} & \abbrstyle{short-sc-footnote-desc}\\
\acrstyle{footnote-sm-desc} & \abbrstyle{short-sm-footnote-desc}
\end{tabular}
\end{table}

The example documents used to illustrate the predefined styles in
the sub-sections below are all in the form (document class and
options may vary):
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\oarg{T1}\marg{fontenc}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\gls{setabbreviationstyle}\margm{style-name}
\gls{newabbreviation}\oargm{options}\marg{ex}\margm{short}\marg{long form}
\cbeg{document}
First: \gls{gls}\marg{ex}[-insert]. Next: \gls{gls}\marg{ex}[-insert].
Full: \gls{glsxtrfull}\marg{ex}[-insert].
First plural: \gls{glspl}\oarg{prereset}\marg{ex}[-insert].
First no insert: \gls{gls}\oarg{prereset}\marg{ex}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
where \meta{style-name} is the name of the abbreviation style,
\meta{short} is either \qt{SHRT FM} or (for the \idx{smallcaps}
examples) \qt{shrt fm}. The styles that require the
\gloskey{description} or \gloskey{user1} key to be set will include that in
\meta{options} otherwise the optional argument of
\gls{newabbreviation} will be omitted.
The examples with a style that requires
\gls{textsmaller} will load \sty{relsize}.
The \qt{hyphen} styles set the \catattr{markwords} and
\catattr{markshortwords} attributes.
Note that \sty{hyperref} is loaded with the \optfmt{colorlinks}
option, so the hyperlink text will be red.

The naming scheme for abbreviation styles is as follows:
\begin{itemize}
\item
\meta{field1}[\code{-}\meta{modifier1}]\code{-}[post]\meta{field2}[\code{-}\meta{modifier2}][\code{-user}]

This is for the parenthetical styles. The \code{-}\meta{modifier} parts may
be omitted. These styles display \meta{field1} followed by
\meta{field2} in parentheses. If \meta{field1} or \meta{field2} starts
with \qt{no} then that element is omitted from the
\idxc{displayfullform}{display style} (no
parenthetical part) but is included in the \idxc{inlinefullform}{inline style}.

If \code{post} is present then \meta{field2} is
placed after the \gls{linktext} using the \idx{postlinkhook}.
Note that this will use the singular form of \meta{field2} by
default, even if \gls{glspl} is used. The corresponding non-post
style will use the matching form for \meta{field2}.

If the \code{-}\meta{modifier} part is present and is one of
\code{sc}, \code{sm} or \code{em}, then the field has
a font changing command applied to it.

The modifier \code{-only} indicates that field is only present
according to whether or not the entry has been used.

The modifier \code{-hyphen} indicates the style will substitute
inter-word spaces (that have been marked up with the
\catattr{markwords} or \catattr{markshortwords} attributes) will be
changed to spaces if the inserted material starts with a hyphen (but
not for the set of \gls{glsxtrshort} and \gls{glsxtrlong} commands).

If the \code{-user} part is present, then the value of the field
given by \gls{glsxtruserfield} (\gloskey{user1}), if set, is inserted into the
parenthetical material.

Examples:
 \begin{itemize}
  \item\abbrstyle{long-noshort-sc}: \meta{field1} is the long
form, the short form is set in \idx{smallcaps} but omitted in the display
style.
  \item\abbrstyle{long-em-short-em}: both the long form and the
short form are emphasized. The short form is in parentheses.
  \item\abbrstyle{long-short-em}: the
short form is emphasized but not the long form. The short form is in parentheses.
  \item\abbrstyle{long-short-user}: if the \gloskey{user1} key has
been set, this produces the style \meta{long} (\meta{short},
\meta{user1}) otherwise it just produces \meta{long} (\meta{short}).

  \item\abbrstyle{long-hyphen-postshort-hyphen}: the short
form and the inserted material (provided by the final optional
argument of commands like \gls{gls}) is moved to the post-link hook.
The long form is formatted according to \gls{glslonghyphenfont}
(or \gls{glsfirstlonghyphenfont} on first use).
The short form is formatted according to \gls{glsabbrvhyphenfont}
(or \gls{glsfirstabbrvhyphenfont} on first use).
 \end{itemize}

\item \meta{style}\code{-noreg}

Some styles set the \catattr{regular} attribute. In some cases,
there's a version of the style that doesn't set this attribute.
For example, \abbrstyle{long-em-noshort-em} sets the
\catattr{regular} attribute. The
\abbrstyle{long-em-noshort-em-noreg} style is a minor variation
of that style that sets the attribute to \code{false}.

There are a few \qt{noshort} styles, such as
\abbrstyle{long-hyphen-noshort-noreg}, where there isn't a
corresponding regular version. This is because the
style won't work properly with the \catattr{regular} attribute set, but the
naming scheme is maintained for consistency with the other
\qt{noshort} styles.

\item
\meta{field1}[\code{-}\meta{modifier1}]\code{-}[\code{post}]\code{footnote}

The display style uses \meta{field1} followed by a footnote with the
other field in it. If \code{post} is present then the footnote is
placed after the \gls{linktext} using the post-link hook.
The inline style does \meta{field1} followed by the other field in
parentheses.

If \code{-}\meta{modifier1} is present, \meta{field1} has a
font-changing command applied to it.

Examples:
\begin{itemize}
\item \abbrstyle{short-footnote}: short form in the text with the
long form in the footnote.
\item \abbrstyle{short-sc-postfootnote}: short form in smallcaps
with the long form in the footnote outside of the \gls{linktext}.
\end{itemize}

\begin{important}
Take care with the footnote styles. Remember that there are some
situations where \gls{footnote} doesn't work.
\end{important}

\item \meta{style}\code{-desc}

Like \meta{style} but the \gloskey{description} key must be provided
when defining abbreviations with this style.

Examples:
\begin{itemize}

\item \abbrstyle{short-long-desc}: like \abbrstyle{short-long} but
requires a description.
\item \abbrstyle{short-em-footnote-desc}: like
\abbrstyle{short-em-footnote} but requires a description.
\end{itemize}
\end{itemize}

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

\subsubsection{Regular Styles}
\label{sec:predefregabbrvstyles}

The following abbreviation styles set the \catattr{regular}
attribute to \code{true} for all categories that have abbreviations
defined with any of these styles. This means that they are treated
like ordinary entries and are encapsulated with
\gls{glsxtrregularfont} not \gls{glsxtrabbreviationfont}. The
\idx{glslike} commands are formatted according to
\gls{glsgenentryfmt}.

\paragraph{Short Styles}
\label{sec:predefregabbrvstylesshort}These styles only show the
short form on both \idx{firstuse} and \idx{subsequentuse}. 
See \sectionref{sec:abbrvcmdsgeneral} and
\sectionref{sec:abbrvcmdsnolong} for style commands.

\abbrstyledef{short-nolong}
Only the short form is shown on \idx{firstuse} of the \idx{glslike}
commands. The \idx{inlinefullform} uses the same
parenthetical style as \abbrstyle{short-long} (\gls{glsxtrshortlongformat}).
Font variations are available with \abbrstyle{short-sc-nolong},
\abbrstyle{short-sm-nolong} and \abbrstyle{short-em-nolong}.

\abbrvstyleexampleuc{short-nolong}

The long form is formatted with \gls{glslongdefaultfont} for the
\gls{glsxtrlong} set of commands.

The short form is formatted with \gls{glsfirstabbrvdefaultfont}
within the full form and with \gls{glsabbrvdefaultfont} for 
\idx{subsequentuse} and for the \gls{glsxtrshort} set of commands.

The name is set to the short form (\gls{glsxtrshortnolongname}) and
the description is set to the unencapsulated long form.

\abbrstyledef{short}
A synonym for \abbrstyle{short-nolong}.

\abbrstyledef{short-nolong-desc}
As \abbrstyle{short-nolong} but the description must be supplied in
the optional argument of \gls{newabbreviation}.
Font variations are available with \abbrstyle{short-sc-nolong-desc},
\abbrstyle{short-sm-nolong-desc} and \abbrstyle{short-em-nolong-desc}.

\abbrvstyleexampleucdesc{short-nolong-desc}

The name is set to the short form followed by the long form in
parentheses (\gls{glsxtrshortdescname}), and the sort is set to
just the short form.

\abbrstyledef{short-desc}
A synonym for \abbrstyle{short-nolong-desc}.

\abbrstyledef{nolong-short}
The same as \abbrstyle{short-nolong} except for the
\idx{inlinefullform}, which shows the same parenthetical style as
\abbrstyle{long-short} (\gls{glsxtrlongshortformat}).
Font variations are available with \abbrstyle{nolong-short-sc},
\abbrstyle{nolong-short-sm} and \abbrstyle{nolong-short-em}.

\abbrvstyleexampleuc{nolong-short}

\abbrstyledef{short-sc-nolong}
This style is like \abbrstyle{short-nolong} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelc{short-sc-nolong}

\abbrstyledef{short-sc}
A synonym for \abbrstyle{short-sc-nolong}.

\abbrstyledef{short-sc-nolong-desc}
This style is like \abbrstyle{short-nolong-desc} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelcdesc{short-sc-nolong-desc}

\abbrstyledef{short-sc-desc}
A synonym for \abbrstyle{short-sc-nolong-desc}.

\abbrstyledef{nolong-short-sc}
This style is like \abbrstyle{nolong-short} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelc{nolong-short-sc}

\abbrstyledef{short-sm-nolong}
This style is like \abbrstyle{short-nolong} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesm{short-sm-nolong}

\abbrstyledef{short-sm}
A synonym for \abbrstyle{short-sm-nolong}.

\abbrstyledef{short-sm-nolong-desc}
This style is like \abbrstyle{short-nolong-desc} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesmdesc{short-sm-nolong-desc}

\abbrstyledef{short-sm-desc}
A synonym for \abbrstyle{short-sm-nolong-desc}.

\abbrstyledef{nolong-short-sm}
This style is like \abbrstyle{nolong-short} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesm{nolong-short-sm}

\abbrstyledef{short-em-nolong}
This style is like \abbrstyle{short-nolong} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleuc{short-em-nolong}

\abbrstyledef{short-em}
A synonym for \abbrstyle{short-em-nolong}.

\abbrstyledef{short-em-nolong-desc}
This style is like \abbrstyle{short-nolong-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleucdesc{short-em-nolong-desc}

\abbrstyledef{short-em-desc}
A synonym for \abbrstyle{short-em-nolong-desc}.

\abbrstyledef{nolong-short-em}
This style is like \abbrstyle{nolong-short} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleuc{nolong-short-em}

\paragraph{Long Styles}
\label{sec:predefregabbrvstyleslong}These styles only show the long
form on both \idx{firstuse} and \idx{subsequentuse}.  See
\sectionref{sec:abbrvcmdsgeneral} and
\sectionref{sec:abbrvcmdsnoshort} for style commands.

\abbrstyledef{long-noshort-desc}
Only the long form is shown on \idx{firstuse} and
\idx{subsequentuse} of the \idx{glslike} commands
(\gls{glsxtrlongformat}). The \idx{inlinefullform} uses the same
parenthetical style as \abbrstyle{long-short}
(\gls{glsxtrlongshortformat}).
Font variations are available with \abbrstyle{long-noshort-sc-desc},
\abbrstyle{long-noshort-sm-desc} and \abbrstyle{long-noshort-em-desc}.

\abbrvstyleexampleucdesc{long-noshort-desc}

The long form is formatted with \gls{glsfirstlongdefaultfont} on
\idx{firstuse} and \gls{glslongdefaultfont} for \idx{subsequentuse}
and for the \gls{glsxtrlong} set of commands.

The short form is formatted with \gls{glsfirstabbrvdefaultfont}
within the \idx{inlinefullform} and with \gls{glsabbrvdefaultfont}
for the \gls{glsxtrshort} set of commands.

The name is set to the long form (\gls{glsxtrlongnoshortdescname}) and
the description must be supplied.

\abbrstyledef{long-desc}
A synonym for \abbrstyle{long-noshort-desc}.

\abbrstyledef{long-noshort}
This is like \abbrstyle{long-noshort-desc} but the name is set to
the short form (\gls{glsxtrlongnoshortname}) and the description is
set to the unencapsulated long form.

\abbrvstyleexampleuc{long-noshort}

\abbrstyledef{long}
A synonym for \abbrstyle{long-noshort}.

\abbrstyledef{long-noshort-sc}
This style is like \abbrstyle{long-noshort} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelc{long-noshort-sc}

\abbrstyledef{long-noshort-sc-desc}
This style is like \abbrstyle{long-noshort-desc} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelcdesc{long-noshort-sc-desc}

\abbrstyledef{long-noshort-sm}
This style is like \abbrstyle{long-noshort} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesm{long-noshort-sm}

\abbrstyledef{long-noshort-sm-desc}
This style is like \abbrstyle{long-noshort-desc} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesmdesc{long-noshort-sm-desc}

\abbrstyledef{long-noshort-em}
This style is like \abbrstyle{long-noshort} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleuc{long-noshort-em}

\abbrstyledef{long-noshort-em-desc}
This style is like \abbrstyle{long-noshort-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleucdesc{long-noshort-em-desc}

\abbrstyledef{long-em-noshort-em}
This style is like \abbrstyle{long-noshort} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont},
\gls{glsfirstabbrvemfont}, \gls{glslongemfont} and
\gls{glsfirstlongemfont} (see \sectionref{sec:abbrvcmdsfonts}).
This emphasizes both the long and short forms.

\abbrvstyleexampleuc{long-em-noshort-em}

\abbrstyledef{long-em-noshort-em-desc}
This style is like \abbrstyle{long-noshort-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont},
\gls{glsfirstabbrvemfont}, \gls{glslongemfont} and
\gls{glsfirstlongemfont} (see \sectionref{sec:abbrvcmdsfonts}).
This emphasizes both the long and short forms.

\abbrvstyleexampleucdesc{long-em-noshort-em-desc}

\subsubsection{Non-Regular Styles}
\label{sec:predefnonregabbrvstyles}

The following abbreviation styles will set the
\catattr{regular} attribute to \code{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.

The non-regular styles are too complicated to use 
\gls{glsgenentryfmt} as the display style (with the
\idx{glslike} commands). Instead they use \gls{glsxtrgenabbrvfmt}. This
means that these styles won't work if you provide your own custom
display style (using \gls{defglsentryfmt}) that doesn't check for
the \catattr{regular} attribute. 

\begin{important}
Avoid using \gls{glsfirst}, \gls{glsfirstplural},
\gls{glstext} and \gls{glsplural} (or their case-changing variants)
with these styles. There are also some styles that can be
problematic with \gls{GLSname}.
\end{important}

\paragraph{Long (Short) Styles}
\label{sec:predefnonregabbrvstyleslongshort}These styles show the
long form followed by the short form in parentheses on
\idx{firstuse}.  On \idx{subsequentuse} only the short form is shown.
See \sectionref{sec:abbrvcmdsgeneral} and \sectionref{sec:abbrvcmdsparen}
for style commands.

\abbrstyledef{long-short}
The \meta{insert} is placed after the long form on \idx{firstuse}
of the \idx{glslike} commands and after the short form on \idx{subsequentuse}.
The \idx{inlinefullform} is the same as the \idx{displayfullform}
(\gls{glsxtrlongshortformat}).
Font variations are available with \abbrstyle{long-short-sc},
\abbrstyle{long-short-sm}, \abbrstyle{long-short-em} and
\abbrstyle{long-em-short-em}.

\abbrvstyleexampleuc{long-short}

The long form is formatted with \gls{glsfirstlongdefaultfont}
within the full form and with \gls{glslongdefaultfont} for the
\gls{glsxtrlong} set of commands.

The short form is formatted with \gls{glsfirstabbrvdefaultfont}
within the full form and with \gls{glsabbrvdefaultfont} for 
\idx{subsequentuse} and for the \gls{glsxtrshort} set of commands.

The name is set to the short form (\gls{glsxtrlongshortname}) and
the description is set to the unencapsulated long form.

\abbrstyledef{long-short-desc}
As \abbrstyle{long-short} but the description must be supplied in
the optional argument of \gls{newabbreviation}.
Font variations are available with \abbrstyle{long-short-sc-desc},
\abbrstyle{long-short-sm-desc}, \abbrstyle{long-short-em-desc} and
\abbrstyle{long-em-short-em-desc}.

\abbrvstyleexampleucdesc{long-short-desc}

The name and sort are set to the long form followed by the short form in
parentheses (\gls{glsxtrlongshortdescname} and
\gls{glsxtrlongshortdescsort}).

\abbrstyledef{long-short-sc}
This style is like \abbrstyle{long-short} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelc{long-short-sc}

\abbrstyledef{long-short-sc-desc}
This style is like \abbrstyle{long-short-desc} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelcdesc{long-short-sc-desc}

\abbrstyledef{long-short-sm}
This style is like \abbrstyle{long-short} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesm{long-short-sm}

\abbrstyledef{long-short-sm-desc}
This style is like \abbrstyle{long-short-desc} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesmdesc{long-short-sm-desc}

\abbrstyledef{long-short-em}
This style is like \abbrstyle{long-short} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleuc{long-short-em}

\abbrstyledef{long-short-em-desc}
This style is like \abbrstyle{long-short-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleucdesc{long-short-em-desc}

\abbrstyledef{long-em-short-em}
This style is like \abbrstyle{long-short} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont}, \gls{glsfirstlongemfont}
and \gls{glslongemfont} (see \sectionref{sec:abbrvcmdsfonts}).
That is, both the long and short forms are emphasized.

\abbrvstyleexampleuc{long-em-short-em}

\abbrstyledef{long-em-short-em-desc}
This style is like \abbrstyle{long-short-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont}, \gls{glsfirstlongemfont}
and \gls{glslongemfont} (see \sectionref{sec:abbrvcmdsfonts}).
That is, both the long and short forms are emphasized.

\abbrvstyleexampleucdesc{long-em-short-em-desc}

\paragraph{Long (Short, User) Styles}
\label{sec:predefnonregabbrvstyleslongshortuser}These styles are like the
long (short) styles in \sectionref{sec:predefnonregabbrvstyleslongshort}
but additional content can be supplied in the field identified by
\gls{glsxtruserfield}, which will be placed in the parenthetical
content on \idx{firstuse} (if set).
The \idx{inlinefullform} is the same as the \idx{displayfullform}.

These styles use the commands \gls{glsxtrusersuffix},
\gls{glsabbrvuserfont}, \gls{glsfirstabbrvuserfont},
\gls{glslonguserfont} and \gls{glsfirstlonguserfont} (except where
noted).  See \sectionref{sec:abbrvcmdsgeneral} and
\sectionref{sec:abbrvcmdsuser} for style commands.

If you need to change the font, you can redefine the associated
commands (listed above). However, since \idx{smallcaps} are awkward
because the short plural suffix needs to counteract the
\idx{smallcaps}, \idx{smallcaps} versions are provided.

\abbrstyledef{long-short-user}
This style is like \abbrstyle{long-short} but it includes the
additional content in the parentheses on \idx{firstuse} or the
\idx{inlinefullform}. The description is obtained from
\gls{glsuserdescription}, which can be redefined to include the
additional information, if required.

\abbrvstyleexampleucuser{long-short-user}

\abbrstyledef{long-short-user-desc}
This style is like \abbrstyle{long-short-user} but the description
must be supplied. The name is obtained from
\gls{glsxtrlongshortuserdescname}.

\abbrvstyleexampleucuserdesc{long-short-user-desc}

\begin{important}
This style is incompatible with \gls{GLSname}.
\end{important}

If you need to use \gls{GLSname} with this style, you'll have to
redefine \gls{glsxtrlongshortuserdescname} so that the field name
doesn't include the entry label. For example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrlongshortuserdescname}}\marg{\comment{}
 \cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongtok}}\comment{}
 \cmd{space}
 (\cmd{protect}\gls{glsabbrvuserfont}\marg{\cmd{the}\gls{glsshorttok}})\comment{}
}
\end{codebox}

\abbrstyledef{long-postshort-user}
This style is like \abbrstyle{long-short-user} but the parenthetical
material is placed in the \idx{postlinkhook}. Note that, unlike
\abbrstyle{long-short-user}, the plural form isn't used in the
parenthetical material. If you require this, you will need to
redefine \gls{glsxtrpostusershortformat}.

\abbrvstyleexampleucuser{long-postshort-user}

\abbrstyledef{long-postshort-user-desc}
This style is like \abbrstyle{long-postshort-user} but the description
must be supplied. The name is obtained from
\gls{glsxtrlongshortuserdescname}.

\abbrvstyleexampleucuserdesc{long-postshort-user-desc}

\begin{important}
This style is incompatible with \gls{GLSname}.
\end{important}

If you need to use \gls{GLSname} with this style, you'll have to
redefine \gls{glsxtrshortlonguserdescname} so that the field name
doesn't include the entry label, as for
\abbrstyle{long-short-user-desc}.

\abbrstyledef{long-postshort-sc-user}
This style is like \abbrstyle{long-postshort-user} but it uses
\gls{glsxtrscusersuffix}, \gls{glsabbrvscuserfont} and
\gls{glsfirstabbrvscuserfont}.
The name value is obtained from \gls{glsxtrlongshortscusername}.

\abbrvstyleexamplelcuser{long-postshort-sc-user}

\abbrstyledef{long-postshort-sc-user-desc}
This style is like \abbrstyle{long-postshort-sc-user} but the description
must be supplied. The name is obtained from
\gls{glsxtrlongshortuserdescname}.

\abbrvstyleexamplelcuserdesc{long-postshort-sc-user-desc}

\begin{important}
This style is incompatible with \gls{GLSname}.
\end{important}

If you need to use \gls{GLSname} with this style, you'll have to
redefine \gls{glsxtrlongshortscuserdescname} so that the field name
doesn't include the entry label.

\paragraph{Short (Long) Styles}
\label{sec:predefnonregabbrvstylesshortlong}These styles show the
short form followed by the long form in parentheses on
\idx{firstuse}.  On \idx{subsequentuse} only the short form is shown.
See \sectionref{sec:abbrvcmdsgeneral} and \sectionref{sec:abbrvcmdsparen}
for style commands.

\abbrstyledef{short-long}

The \meta{insert} is placed after the short form on \idx{firstuse}
and \idx{subsequentuse} of the \idx{glslike} commands.
The \idx{inlinefullform} is the same as the \idx{displayfullform}
(\gls{glsxtrshortlongformat}).
Font variations are available with \abbrstyle{short-sc-long},
\abbrstyle{short-sm-long}, \abbrstyle{short-em-long} and
\abbrstyle{short-em-long-em}.

\abbrvstyleexampleuc{short-long}

The long form is formatted with \gls{glsfirstlongdefaultfont}
within the full form and with \gls{glslongdefaultfont} for the
\gls{glsxtrlong} set of commands.

The short form is formatted with \gls{glsfirstabbrvdefaultfont}
within the full form and with \gls{glsabbrvdefaultfont} for 
\idx{subsequentuse} and for the \gls{glsxtrshort} set of commands.

The name is set to the short form (\gls{glsxtrlongshortname}) and
the description is set to the unencapsulated long form.

\abbrstyledef{short-long-desc}
As \abbrstyle{short-long} but the description must be supplied in
the optional argument of \gls{newabbreviation}.
Font variations are available with \abbrstyle{short-sc-long-desc},
\abbrstyle{short-sm-long-desc}, \abbrstyle{short-em-long-desc} and
\abbrstyle{short-em-long-em-desc}.

\abbrvstyleexampleucdesc{short-long-desc}

The name is set to the short form followed by the long form in
parentheses (\gls{glsxtrshortlongdescname}), and the sort is set to
just the short form (\gls{glsxtrshortlongdescsort}).

\abbrstyledef{short-sc-long}
This style is like \abbrstyle{short-long} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelc{short-sc-long}

\abbrstyledef{short-sc-long-desc}
This style is like \abbrstyle{short-long-desc} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelcdesc{short-sc-long-desc}

\abbrstyledef{short-sm-long}
This style is like \abbrstyle{short-long} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesm{short-sm-long}

\abbrstyledef{short-sm-long-desc}
This style is like \abbrstyle{short-long-desc} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesmdesc{short-sm-long-desc}

\abbrstyledef{short-em-long}
This style is like \abbrstyle{short-long} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleuc{short-em-long}

\abbrstyledef{short-em-long-desc}
This style is like \abbrstyle{short-long-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleucdesc{short-em-long-desc}

\abbrstyledef{short-em-long-em}
This style is like \abbrstyle{short-long} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont}, \gls{glsfirstlongemfont}
and \gls{glslongemfont} (see \sectionref{sec:abbrvcmdsfonts}).
That is, both the long and short forms are emphasized.

\abbrvstyleexampleuc{short-em-long-em}

\abbrstyledef{short-em-long-em-desc}
This style is like \abbrstyle{short-long-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont}, \gls{glsfirstlongemfont}
and \gls{glslongemfont} (see \sectionref{sec:abbrvcmdsfonts}).
That is, both the long and short forms are emphasized.

\abbrvstyleexampleucdesc{short-em-long-em-desc}

\paragraph{Short (Long, User) Styles}
\label{sec:predefnonregabbrvstylesshortlonguser}These styles are like the
short (long) styles in
\sectionref{sec:predefnonregabbrvstylesshortlong}
but additional content can be supplied in the field identified by
\gls{glsxtruserfield}, which will be placed in the parenthetical
content on \idx{firstuse} (if set).
The \idx{inlinefullform} is the same as the \idx{displayfullform}.

These styles use the commands \gls{glsxtrusersuffix},
\gls{glsabbrvuserfont}, \gls{glsfirstabbrvuserfont},
\gls{glslonguserfont} and \gls{glsfirstlonguserfont} (except where
noted).  See \sectionref{sec:abbrvcmdsgeneral} and
\sectionref{sec:abbrvcmdsuser} for style commands.

\abbrstyledef{short-long-user}
This style is like \abbrstyle{short-long} but it includes the
additional content in the parentheses on \idx{firstuse} or the
\idx{inlinefullform}.

The description is obtained from
\gls{glsuserdescription}, which can be redefined to include the
additional information, if required.

\abbrvstyleexampleucuser{short-long-user}

\abbrstyledef{short-long-user-desc}
This style is like \abbrstyle{short-long-user} but the description
must be provided. The name is obtained from
\gls{glsxtrshortlonguserdescname} and the sort value is obtained
from \gls{glsxtrshortlongdescsort}.

\abbrvstyleexampleucuserdesc{short-long-user-desc}

\begin{important}
This style is incompatible with \gls{GLSname}.
\end{important}

If you need to use \gls{GLSname} with this style, you'll have to
redefine \gls{glsxtrshortlonguserdescname} so that the field name
doesn't include the entry label. For example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrlongshortuserdescname}}\marg{\comment{}
 \cmd{protect}\gls{glsabbrvuserfont}\marg{\cmd{the}\gls{glsshorttok}}\comment{}
 \cmd{space}
 (\cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongtok}})\comment{}
}
\end{codebox}

\abbrstyledef{short-postlong-user}
This style is like \abbrstyle{short-long} but it includes the
additional content in the parentheses on \idx{firstuse} or the
\idx{inlinefullform}. The parenthetical content is placed in the
\idx{postlinkhook} which can avoid overly long hyperlinks.

The description is obtained from
\gls{glsuserdescription}, which can be redefined to include the
additional information, if required.

\abbrvstyleexampleucuser{short-postlong-user}

\abbrstyledef{short-postlong-user-desc}
This style is like \abbrstyle{short-postlong-user} but the description
must be provided. The name is obtained from
\gls{glsxtrshortlonguserdescname}. The sort value is the short form.

\abbrvstyleexampleucuserdesc{short-postlong-user-desc}

\begin{important}
This style is incompatible with \gls{GLSname}.
\end{important}

If you need to use \gls{GLSname} with this style, you'll have to
redefine \gls{glsxtrshortlonguserdescname} so that the field name
doesn't include the entry label, as for \abbrstyle{short-long-user-desc}.

\paragraph{Hyphen Styles}
\label{sec:predefnonregabbrvstyleshyphen}These styles test
if the inserted material start with a hyphen.  See
\sectionref{sec:abbrvcmdsgeneral}, \sectionref{sec:abbrvcmdsparen}
and \sectionref{sec:abbrvcmdshyphen} for style commands.

\begin{information}
These styles are designed to be used with the \catattr{markwords}
attribute and (if the short form has spaces) the
\catattr{markshortwords} attribute. If the inserted material starts
with a hyphen, the spaces will be replaced with hyphens. This
replacement won't take place if the corresponding attribute wasn't
used to mark the inter-word spaces.
\end{information}

Note that \gls{glsxtrshort} and \gls{glsxtrlong} (and their plural
and case-changing variants) don't perform the inter-word space
substitution.  The \idx{inlinefullform} is slightly different from
the \idx{displayfullform} for the \qt{post} styles.

\abbrstyledef{long-hyphen-short-hyphen}
This style is like \abbrstyle{long-short} but checks the inserted
material for a leading hyphen. The description is the long form
encapsulated with \gls{glslonghyphenfont}. The name is obtained from
\gls{glsxtrlongshortname}, and the sort value is obtained from
\gls{glsxtrlonghyphenshortsort}. The
\idx{inlinefullform} is the same as the \idx{displayfullform}.  

\abbrvstyleexampleuchyp{long-hyphen-short-hyphen}

\abbrstyledef{long-hyphen-postshort-hyphen}
This style is like \abbrstyle{long-hyphen-short-hyphen} but places
the insert and parenthetical material in the \idx{postlinkhook} for 
the \idx{displayfullform}.

\abbrvstyleexampleuchyp{long-hyphen-postshort-hyphen}

Note that the \idx{inlinefullform} (\gls{glsxtrfull}) doesn't show
the insert in the \idx{postlinkhook}, but instead places it at the
end of the \idx{linktext}. This is because only the
\idx{glslike} commands (not the \idx{glstextlike} commands) set the
placeholder \gls{glsinsert} to the supplied insert. If you want the
insert to show in the parenthetical part of the \idx{postlinkhook} for the
\idx{inlinefullform} you need to redefine
\gls{glsxtrfullsaveinsert}:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrfullsaveinsert}}[2]\marg{\comment{}
 \cmd{def}\gls{glsinsert}\marg{\#2}}
\end{codebox}

\abbrstyledef{long-hyphen-short-hyphen-desc}
This style is like \abbrstyle{long-hyphen-short-hyphen} but the
description must be supplied. The name is obtained from
\gls{glsxtrlongshortdescname}, and the sort value is 
obtained from \gls{glsxtrlongshortdescsort}.

\abbrvstyleexampleuchypdesc{long-hyphen-short-hyphen-desc}

\abbrstyledef{long-hyphen-postshort-hyphen-desc}
This style is like \abbrstyle{long-hyphen-short-hyphen-desc} but places
the insert and parenthetical material in the \idx{postlinkhook} for
the \idx{displayfullform}.

\abbrvstyleexampleuchypdesc{long-hyphen-postshort-hyphen-desc}

Note that as with the
\abbrstyle{long-hyphen-postshort-hyphen} style, the insert isn't
included in the \idx{postlinkhook} by default for the
\idx{inlinefullform}.  If you want the
insert to show in the \idx{postlinkhook} for the
\idx{inlinefullform} you need to redefine
\gls{glsxtrfullsaveinsert}.

\abbrstyledef{long-hyphen-noshort-desc-noreg}
This style is like \abbrstyle{long-noshort-desc-noreg} but checks
the inserted material for a leading hyphen. The description must be
supplied. The name is obtained from \gls{glsxtrlongnoshortdescname},
and the sort value is obtained from \gls{glsxtrlonghyphennoshortdescsort}.

\abbrvstyleexampleuchypdesc{long-hyphen-noshort-desc-noreg}

\abbrstyledef{long-hyphen-noshort-noreg}
This style is like \abbrstyle{long-noshort-noreg} but checks
the inserted material for a leading hyphen. The description is set
to the unencapsulated long form. The name is obtained from \gls{glsxtrlongnoshortname},
and the sort value is obtained from \gls{glsxtrlonghyphennoshortsort}.

\abbrvstyleexampleuchyp{long-hyphen-noshort-noreg}

\abbrstyledef{short-hyphen-long-hyphen}
This style is like \abbrstyle{short-long} but checks the inserted
material for a leading hyphen. The description is the long form
encapsulated with \gls{glslonghyphenfont}. The name is obtained from
\gls{glsxtrshortlongname} and the sort value is obtained from
\gls{glsxtrshorthyphenlongsort}.

\abbrvstyleexampleuchyp{short-hyphen-long-hyphen}

\abbrstyledef{short-hyphen-postlong-hyphen}
This style is like \abbrstyle{short-hyphen-long-hyphen} but the
insert and parenthetical material are placed in the
\idx{postlinkhook} for the \idx{displayfullform}.

\abbrvstyleexampleuchyp{short-hyphen-postlong-hyphen}

Note that as with the \abbrstyle{long-hyphen-postshort-hyphen} style,
the insert isn't included in the \idx{postlinkhook} by default for
the \idx{inlinefullform}.  If you want the insert to show in the
\idx{postlinkhook} for the \idx{inlinefullform} you need to redefine
\gls{glsxtrfullsaveinsert} (as described above, for the
\abbrstyle{long-hyphen-postshort-hyphen} style).

\abbrstyledef{short-hyphen-long-hyphen-desc}
This style is like \abbrstyle{short-hyphen-long-hyphen} but the
description must be supplied. The name is obtained from
\gls{glsxtrshortlongdescname}, and the sort is obtained from 
\gls{glsxtrshortlongdescsort}.

\abbrvstyleexampleuchypdesc{short-hyphen-long-hyphen-desc}

\abbrstyledef{short-hyphen-postlong-hyphen-desc}
This style is like \abbrstyle{short-hyphen-long-hyphen-desc} but the
insert and parenthetical material are placed in the
\idx{postlinkhook} for the \idx{displayfullform}.

\abbrvstyleexampleuchypdesc{short-hyphen-postlong-hyphen-desc}

Note that as with the \abbrstyle{long-hyphen-postshort-hyphen} style,
the insert isn't included in the \idx{postlinkhook} by default for
the \idx{inlinefullform}.  If you want the insert to show in the
\idx{postlinkhook} for the \idx{inlinefullform} you need to redefine
\gls{glsxtrfullsaveinsert} (as described above, for the
\abbrstyle{long-hyphen-postshort-hyphen} style).

\paragraph{Only Styles}
\label{sec:predefnonregabbrvstylesonly}These styles only show the
long form on \idx{firstuse} and only show the short form on
\idx{subsequentuse}.  The
\idx{inlinefullform} is the same as the \idx{displayfullform}.  See
\sectionref{sec:abbrvcmdsgeneral}, \sectionref{sec:abbrvcmdsparen}
and \sectionref{sec:abbrvcmdsonly} for style commands.

The \idx{inlinefullform} uses a parenthetical style with the long
form followed by the short form in parentheses.

\abbrstyledef{long-only-short-only}
The name is obtained from \gls{glsxtronlyname} and the sort value is
just the short form. The description is the long form encapsulated
with \gls{glslongonlyfont}.

\abbrvstyleexampleuc{long-only-short-only}

\abbrstyledef{long-only-short-only-desc}
This is like \abbrstyle{long-only-short-only} but the description must
be supplied. The name is obtained from \gls{glsxtronlydescname} and
the sort is obtained from \gls{glsxtronlydescsort}.

\abbrvstyleexampleucdesc{long-only-short-only-desc}

\abbrstyledef{long-only-short-sc-only}
This is like \abbrstyle{long-only-short-only} but uses
\idx{smallcaps}. The name is obtained from \gls{glsxtrsconlyname},
and it uses \gls{glsabbrvsconlyfont}, \gls{glsfirstabbrvsconlyfont}
and \gls{glsxtrsconlysuffix} for the abbreviation fonts and plural
suffix.

\abbrvstyleexamplelc{long-only-short-sc-only}

\abbrstyledef{long-only-short-sc-only-desc}
This is like \abbrstyle{long-only-short-only-desc} but uses
\idx{smallcaps}. The name is obtained from \gls{glsxtrsconlydescname},
and the sort is obtained from \gls{glsxtrsconlydescsort}.

\abbrvstyleexamplelcdesc{long-only-short-sc-only-desc}

\paragraph{Footnote Styles}
\label{sec:predefnonregabbrvstylesfootnote}These styles show the
short form (\gls{glsxtrshortformat}) with the long form as a footnote on
\idx{firstuse}.  On \idx{subsequentuse} only the short form is shown.
See \sectionref{sec:abbrvcmdsgeneral} and \sectionref{sec:abbrvcmdsfootnote}
for style commands.

The \idx{inlinefullform} uses the same
parenthetical style as \abbrstyle{short-long} (\gls{glsxtrshortlongformat}).
Font variations are available with \abbrstyle{short-sc-footnote},
\abbrstyle{short-sm-footnote} and \abbrstyle{short-em-footnote}.

\abbrstyledef{short-footnote}
The \meta{insert} is placed after the short form on \idx{firstuse}
and \idx{subsequentuse} of the \idx{glslike} commands.

\abbrvstyleexampleucfn{short-footnote}

The long form is formatted with \gls{glsfirstlongfootnotefont}
within the full form and with \gls{glslongfootnotefont} for the
\gls{glsxtrlong} set of commands.

The short form is formatted with \gls{glsfirstabbrvdefaultfont}
within the full form and with \gls{glsabbrvdefaultfont} for 
\idx{subsequentuse} and for the \gls{glsxtrshort} set of commands.

The name is set to the short form (\gls{glsxtrfootnotename}) and
the description is set to the unencapsulated long form.

This style automatically sets the \catattr{nohyperfirst} attribute
to \code{true} for the entry's category.

\abbrstyledef{footnote}
A synonym for \abbrstyle{short-footnote}.

\abbrstyledef{short-footnote-desc}
As \abbrstyle{short-footnote} but the description must be supplied in
the optional argument of \gls{newabbreviation}.

\abbrvstyleexampleucdescfn{short-footnote-desc}

The name is set to the short form followed by the long form in
parentheses (\gls{glsxtrfootnotedescname}), and the sort is set to
just the short form (\gls{glsxtrfootnotedescsort}).

\abbrstyledef{footnote-desc}
A synonym for \abbrstyle{short-footnote-desc}.

\abbrstyledef{short-postfootnote}
Similar to \abbrstyle{short-footnote} but the footnote command is
placed in the \idx{postlinkhook}. This avoids the problem of nested
hyperlinks caused by the footnote marker hyperlink being inside the
\idx{linktext} (which is why the \abbrstyle{short-footnote} style
switches on the \catattr{nohyperfirst} attribute). Using the
\idx{postlinkhook} makes it possible to check for following
punctuation so that the footnote marker can be shifted after the
punctuation character.

\abbrvstyleexampleucfn{short-postfootnote}

\abbrstyledef{postfootnote}
A synonym for \abbrstyle{short-postfootnote}.

\abbrstyledef{short-postfootnote-desc}
Similar to \abbrstyle{short-footnote-desc} but the footnote command is
placed in the \idx{postlinkhook} as with
\abbrstyle{short-postfootnote}.

\abbrvstyleexampleucdescfn{short-postfootnote-desc}

\abbrstyledef{postfootnote-desc}
A synonym for \abbrstyle{short-postfootnote-desc}.

\abbrstyledef{short-sc-footnote}
This style is like \abbrstyle{short-footnote} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelcfn{short-sc-footnote}

\abbrstyledef{short-sc-footnote-desc}
This style is like \abbrstyle{short-footnote-desc} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelcdescfn{short-sc-footnote-desc}

\abbrstyledef{short-sc-postfootnote}
This style is like \abbrstyle{short-postfootnote} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelcfn{short-sc-postfootnote}

\abbrstyledef{short-sc-postfootnote-desc}
This style is like \abbrstyle{short-postfootnote-desc} but it uses
\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and
\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplelcdescfn{short-sc-postfootnote-desc}

\abbrstyledef{short-sm-footnote}
This style is like \abbrstyle{short-footnote} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesmfn{short-sm-footnote}

\abbrstyledef{short-sm-footnote-desc}
This style is like \abbrstyle{short-footnote-desc} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesmdescfn{short-sm-footnote-desc}

\abbrstyledef{short-sm-postfootnote}
This style is like \abbrstyle{short-postfootnote} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesmfn{short-sm-postfootnote}

\abbrstyledef{short-sm-postfootnote-desc}
This style is like \abbrstyle{short-postfootnote-desc} but it uses
\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and
\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexamplesmdescfn{short-sm-postfootnote-desc}

\abbrstyledef{short-em-footnote}
This style is like \abbrstyle{short-footnote} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleucfn{short-em-footnote}

\abbrstyledef{short-em-footnote-desc}
This style is like \abbrstyle{short-footnote-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleucdescfn{short-em-footnote-desc}

\abbrstyledef{short-em-postfootnote}
This style is like \abbrstyle{short-postfootnote} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleucfn{short-em-postfootnote}

\abbrstyledef{short-em-postfootnote-desc}
This style is like \abbrstyle{short-postfootnote-desc} but it uses
\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and
\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}).

\abbrvstyleexampleucdescfn{short-em-postfootnote-desc}


\paragraph{Short Styles}
\label{sec:predefnonregabbrvstylesshort}These styles only show the
short form on both \idx{firstuse} and \idx{subsequentuse}. 
See \sectionref{sec:abbrvcmdsgeneral} and
\sectionref{sec:abbrvcmdsnolong} for style commands.
They are essentially identical to the corresponding regular style
listed in \sectionref{sec:predefnonregabbrvstylesshort} except that
they change the \catattr{regular} attribute to \code{false}.

\abbrstyledef{short-nolong-noreg}
This style is a non-regular version of the \abbrstyle{short-nolong} style.

\abbrstyledef{short-nolong-desc-noreg}
This style is a non-regular version of the \abbrstyle{short-nolong-desc} style.

\abbrstyledef{nolong-short-noreg}
This style is a non-regular version of the \abbrstyle{nolong-short} style.

\paragraph{Long Styles}
\label{sec:predefnonregabbrvstyleslong}These styles only show the
long form on both \idx{firstuse} and \idx{subsequentuse}. 
See \sectionref{sec:abbrvcmdsgeneral} and
\sectionref{sec:abbrvcmdsnoshort} for style commands.
They are essentially identical to the corresponding regular style
listed in \sectionref{sec:predefnonregabbrvstyleslong} except that
they change the \catattr{regular} attribute to \code{false}.

\abbrstyledef{long-noshort-desc-noreg}
This style is a non-regular version of the \abbrstyle{long-noshort-desc} style.

\abbrstyledef{long-noshort-noreg}
This style is a non-regular version of the \abbrstyle{long-noshort} style.

\abbrstyledef{long-em-noshort-em-noreg}
This style is a non-regular version of the
\abbrstyle{long-em-noshort-em} style.

\abbrstyledef{long-em-noshort-em-desc-noreg}
This style is a non-regular version of the
\abbrstyle{long-em-noshort-em-desc} style.


\subsubsection{Formatting Commands and Hooks}
\label{sec:abbrvcmds}

These commands are used by the predefined abbreviation styles. These
are considered user commands, which you can redefine to customize
the style.

\paragraph{General}
\label{sec:abbrvcmdsgeneral}These commands apply to all styles.

\cmddef{ifglsxtrinsertinside}
This conditional is used to determine whether the \meta{insert} part
should go inside or outside of the style's font formatting commands.
The default setting is false.

\cmddef{glsxtrinsertinsidetrue}
Set the insert inside conditional to true.

\cmddef{glsxtrinsertinsidefalse}
Set the insert inside conditional to false.

\cmddef{glsxtrparen}
Used for parenthetical content in the \idx{inlinefullform} and
also, for some styles, the \idx{displayfullform}. Note that this formats the opening
and closing parentheses according to the \idx{innerformatting}, but not the 
argument, which should already incorporate it. The default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrparen}}[1]\marg{\comment{}
 \gls{glsxtrgenentrytextfmt}\marg{(}\#1\comment{}
 \gls{glsxtrgenentrytextfmt}\marg{)}}
\end{codebox}

\cmddef{glsxtrfullsep}
Separator placed before \gls{glsxtrparen}. This
is a space by default, but it includes the \idx{innerformatting}. 
The argument (the entry label) is ignored by default:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrfullsep}}[1]\marg{\comment{}
 \gls{glsxtrgenentrytextfmt}\marg{ }}
\end{codebox}
You can redefine this to use \gls{glsabspace} if you want to have a
non-breakable space if the short form is less than
\gls{glsacspacemax} in width. (You can use \gls{glsacspace} instead,
but note that \gls{glsacspace} doesn't incorporate the \idx{innerformatting}.)

\cmddef{glsabbrvdefaultfont}
Abbreviation font command used by styles that don't have specific
font markup (for example, \abbrstyle{long-short} but not
\abbrstyle{long-em-short-em}). This just does its argument.

\cmddef{glsfirstabbrvdefaultfont}
\Idx{firstuse} abbreviation font command used by styles that don't have specific
font markup. This is defined to just use \gls{glsabbrvdefaultfont}.

\cmddef{glsxtrdefaultrevert}
This is the default definition of \gls{glsxtrrevert} used by styles
that don't have specific font markup. If you redefine
\gls{glsabbrvdefaultfont}, you will need to redefine
\gls{glsxtrdefaultrevert} as applicable.

\cmddef{glslongdefaultfont}
Long form font command used by styles that don't have specific
font markup. This just does its argument.

\cmddef{glsfirstlongdefaultfont}
\Idx{firstuse} long form font command used by styles that don't have specific
font markup. This is defined to just use
\gls{glslongdefaultfont}.

\paragraph{Parenthetical Styles}
\label{sec:abbrvcmdsparen}These commands apply to the parenthetical
styles, such as \abbrstyle{long-short}.

\cmddef{glsxtrlongshortname}
This command should expand to the value of the \gloskey{name} key
for styles like \abbrstyle{long-short}.
The default definition is:
\begin{codebox}
\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}
\end{codebox}

\cmddef{glsxtrlongshortdescsort}
This command should expand to the sort value used by styles such as
\abbrstyle{long-short-desc}. The default definition is:
\begin{codebox}
\gls+{expandonce}\gls{glsxtrorglong}\cmd{space}
 (\gls{expandonce}\gls{glsxtrorgshort})
\end{codebox}
Note that this uses the original \meta{long} and \meta{short} values
supplied to \gls{newabbreviation}.

\begin{information}
This command is irrelevant with the \idx{unsrtfam}.
\end{information}

\cmddef{glsxtrlongshortdescname}
This command should expand to the name value used by styles such as
\abbrstyle{long-short-desc}. The default definition is:
\begin{codebox}
\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}}\comment{}
\cmd{protect}\gls{glsxtrfullsep}\marg{\cmd{the}\gls{glslabeltok}}\comment{}
\cmd{protect}\gls{glsxtrparen}
 \marg{\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}
   \marg{\gls{glscategorylabel}}}
\end{codebox}
This essentially expands to \meta{long} (\meta{short}) but includes the
style font changing commands, the inner text formatting, and
accessibility support.

\cmddef{glsxtrshortlongname}
This command should expand to the value of the \gloskey{name} key
for styles like \abbrstyle{short-long}.
The default definition is:
\begin{codebox}
\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}
\end{codebox}

\cmddef{glsxtrshortlongdescsort}
This command should expand to the value of the \gloskey{sort} key
for styles like \abbrstyle{short-long-desc}. The default definition
is just \code{\gls+{expandonce}\gls{glsxtrorgshort}}.

\begin{information}
This command is irrelevant with the \idx{unsrtfam}.
\end{information}

\cmddef{glsxtrshortlongdescname}
This command should expand to the value of the \gloskey{name} key
for styles like \abbrstyle{short-long-desc}. The default definition
is:
\begin{codebox}
\gls{glsxpabbrvfont}
 \marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}\comment{}
\cmd{protect}\gls{glsxtrfullsep}\marg{\cmd{the}\gls{glslabeltok}}\comment{}
\cmd{protect}\gls{glsxtrparen}
  \marg{\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}
    \marg{\gls{glscategorylabel}}}
\end{codebox}

\paragraph{User Styles}
\label{sec:abbrvcmdsuser}These commands apply to the \qt{user}
styles, such as \abbrstyle{long-short-user}.

\cmddef{glsxtruserfield}
This command should expand to the \idxc{internalfieldlabel}{internal
label} of the field used to store the additional information that
should be shown in the parenthetical material on \idx{firstuse}. The
default is \code{useri}, which corresponds to the \gloskey{user1}
key.

\cmddef{glsxtruserparensep}
The separator used within the parenthetical content. This defaults
to a comma followed by a space.

\cmddef{glsxtruserfieldfmt}
Used to encapsulate the value of the field given by
\gls{glsxtruserfield} within \gls{glsxtruserparen} and
\gls{GLSxtruserparen}. This simply does its argument by default.

The \idx{innerformatting} with both \gls{glsxtruserparen} and
\gls{GLSxtruserparen}, and the case-change with the latter, will be
included in the argument of \gls{glsxtruserfieldfmt}.

For example, to emphasize the user value and separate it with a
semi-colon instead of a comma:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtruserparensep}}\marg{; }
\cmd{renewcommand}\marg{\gls{glsxtruserfieldfmt}}[1]\marg{\cmd{emph}\marg{\#1}}
\end{codebox}

\cmddef{glsabbrvuserfont}
Formatting for the \qt{user} short form. This defaults to
\gls{glsabbrvdefaultfont}.

\cmddef{glsfirstabbrvuserfont}
Formatting for the \qt{user} short form shown on \idx{firstuse}.
This defaults to \gls{glsabbrvuserfont}.

\cmddef{glsxtrusersuffix}
Short plural suffix used by the \qt{user} styles. This defaults to
\gls{glsxtrabbrvpluralsuffix}.

\cmddef{glslonguserfont}
Formatting for the \qt{user} long form. This defaults to
\gls{glsabbrvdefaultfont}.

\cmddef{glsfirstlonguserfont}
Formatting for the \qt{user} short form shown on \idx{firstuse}.
This defaults to \gls{glslonguserfont}.

\cmddef{glsabbrvscuserfont}
Formatting for the \qt{sc-user} short form. This uses
\gls{glsabbrvscfont}, which in turn uses \gls{textsc} to
apply a \idx{smallcaps} style, so your document font needs to
support it.

\begin{information}
\gls{textsc} uses small capital glyphs for \idx{lowercase}
characters. \Idx{uppercase} characters show as normal capitals.
This means that you need to use \idx{lowercase} characters in the
abbreviation.
\end{information}

\cmddef{glsfirstabbrvscuserfont}
Formatting for the \qt{sc-user} short form shown on \idx{firstuse}.
This defaults to \gls{glsabbrvscuserfont}.

\cmddef{glsxtrscuserrevert}
Counteracts the effect of \gls{glsabbrvscuserfont}. The default is
\gls{glsxtrscrevert}. If you redefine \gls{glsabbrvscuserfont}, you
will need to redefine \gls{glsxtrscuserrevert} as applicable.

\cmddef{glsxtrscusersuffix}
Short plural suffix used by the \qt{sc-user} styles. This defaults to
\gls{glsxtrscsuffix}.

\cmddef{glsuserdescription}
The description field is set to this, where the \meta{text} argument
is the long form, for the \qt{user} styles where the description is
set by default. This is defined to ignore its second argument:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsuserdescription}}[2]\marg{\comment{}
 \gls{glslonguserfont}\marg{\#1}}
\end{codebox}
If you want to include the information contained in the field
identified by \gls{glsxtruserfield}, the second argument provides a
way of accessing that field without relying on the \gls{glscurrententrylabel}
placeholder. For example:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsuserdescription}}[2]\marg{\comment{}
 \gls{glslonguserfont}\marg{\#1}\comment{}
 \gls{ifglshasfield}\marg{\gls{glsxtruserfield}}\marg{\#2}\comment{}
 \marg{, \gls{glscurrentfieldvalue}}\comment{}
 \marg{}\comment{}
}
\end{codebox}

\cmddef{glsxtruserparen}
If the field given by \gls{glsxtruserfield} has been set, this
essentially does:
\begin{compactcodebox}
\gls{glsxtrfullsep}\margm{entry-label}\gls{glsxtrparen}\marg{\meta{text}, \meta{user-value}}
\end{compactcodebox}
otherwise it does:
\begin{compactcodebox}
\gls{glsxtrfullsep}\margm{entry-label}\gls{glsxtrparen}\marg{\meta{text}}
\end{compactcodebox}
It's a little more complicated than this as the definition includes
the \idx{innerformatting} around the comma and the field value
(\meta{user-value}). The comma separator is given by
\gls{glsxtruserparensep}, and the field value is encapsulated with
\gls{glsxtruserfieldfmt} (with the \idx{innerformatting} inside).

If you redefine this command, you will also need to redefine the
following one in a similar manner.

\cmddef{GLSxtruserparen}
As above but the content of the field given by \gls{glsxtruserfield}
is converted to \idx{allcaps}. Note that simply applying an
\idx{uppercase} command to \gls{glsxtruserparen} can fail as
it can cause the label to be converted to \idx{allcaps}, which
is the reason why a separate command to internally perform the
case-change is provided.

\cmddef{glsxtrlongshortuserdescname}
Expands to the value for the \gloskey{name} key for styles like
\abbrstyle{long-short-user-desc}. The default definition is:
\begin{codebox}
\cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongtok}}\comment{}
\cmd{protect}\gls{glsxtruserparen}
\marg{\cmd{protect}\gls{glsabbrvuserfont}\marg{\cmd{the}\gls{glsshorttok}}}\marg{\cmd{the}\gls{glslabeltok}}
\end{codebox}

\cmddef{glsxtrlongshortscusername}
Expands to the value for the \gloskey{name} key for styles like
\abbrstyle{long-postshort-sc-user} styles where the
description is automatically set. The default
definition is:
\begin{codebox}
\cmd{protect}\gls{glsabbrvscuserfont}\marg{\cmd{the}\gls{glsshorttok}}
\end{codebox}

\cmddef{glsxtrlongshortscuserdescname}
Expands to the value for the \gloskey{name} key for styles like
\abbrstyle{long-postshort-sc-user-desc}. The default definition is:
\begin{codebox}
\cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongtok}}\comment{}
\cmd{protect}\gls{glsxtruserparen}
\marg{\cmd{protect}\gls{glsabbrvscuserfont}\marg{\cmd{the}\gls{glsshorttok}}}\marg{\cmd{the}\gls{glslabeltok}}
\end{codebox}

\cmddef{glsxtrshortlonguserdescname}
Expands to the value for the \gloskey{name} key for styles like
\abbrstyle{short-long-user-desc}. The default definition is:
\begin{codebox}
\cmd{protect}\gls{glsabbrvuserfont}\marg{\cmd{the}\gls{glsshorttok}}\comment{}
\cmd{protect}\gls{glsxtruserparen}
  \marg{\cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongpltok}}}\comment{}
  \marg{\cmd{the}\gls{glslabeltok}}
\end{codebox}

\cmddef{glsxtruserlongshortformat}
This command is used on the \idx{firstuse} of \gls{gls}
or with \gls{glsxtrfull} by styles like
\abbrstyle{long-short-user} to format the long form followed by the
short form (with optional user information) in parentheses. The
default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtruserlongshortformat}}[4]\marg{\comment{}
  \gls{glsxtrlongformat}\marg{\#1}\marg{\#2}\marg{\#3}\comment{}
  \gls{glsxtrusershortformat}\marg{\#1}\marg{\#4}\comment{}
}
\end{codebox}

\cmddef{Glsxtruserlongshortformat}
As above but for \idx{sentencecase}.

\cmddef{GLSxtruserlongshortformat}
As above but for \idx{allcaps}.

\cmddef{glsxtruserlongshortplformat}
This command is used on the \idx{firstuse} of \gls{glspl}
or with \gls{glsxtrfullpl} by styles like
\abbrstyle{long-short-user} to format the plural long form followed by the
plural short form (with optional user information) in parentheses. The
default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtruserlongshortplformat}}[4]\marg{\comment{}
  \gls{glsxtrlongplformat}\marg{\#1}\marg{\#2}\marg{\#3}\comment{}
  \gls{glsxtrusershortplformat}\marg{\#1}\marg{\#4}\comment{}
}
\end{codebox}

\cmddef{Glsxtruserlongshortplformat}
As above but for \idx{sentencecase}.

\cmddef{GLSxtruserlongshortplformat}
As above but for \idx{allcaps}.

\cmddef{glsxtrusershortlongformat}
This command is used on the \idx{firstuse} of \gls{gls}
or with \gls{glsxtrfull} by styles like
\abbrstyle{short-long-user} to format the short form followed by the
long form (with optional user information) in parentheses. The
default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrusershortlongformat}}[4]\marg{\comment{}
  \gls{glsxtrshortformat}\marg{\#1}\marg{\#2}\marg{\#3}\comment{}
  \gls{glsxtruserlongformat}\marg{\#1}\marg{\#4}\comment{}
}
\end{codebox}

\cmddef{Glsxtrusershortlongformat}
As above but for \idx{sentencecase}.

\cmddef{GLSxtrusershortlongformat}
As above but for \idx{allcaps}.

\cmddef{glsxtrusershortlongplformat}
This command is used on the \idx{firstuse} of \gls{glspl}
or with \gls{glsxtrfullpl} by styles like
\abbrstyle{short-long-user} to format the plural short form followed by the
plural long form (with optional user information) in parentheses. The
default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrusershortlongplformat}}[4]\marg{\comment{}
  \gls{glsxtrshortplformat}\marg{\#1}\marg{\#2}\marg{\#3}\comment{}
  \gls{glsxtruserlongplformat}\marg{\#1}\marg{\#4}\comment{}
}
\end{codebox}

\cmddef{Glsxtrusershortlongplformat}
As above but for \idx{sentencecase}.

\cmddef{GLSxtrusershortlongplformat}
As above but for \idx{allcaps}.


\cmddef{glsxtrusershortformat}
Used to format the singular short form in parentheses (with
\gls{glsxtruserparen}) on the \idx{firstuse} of \gls{gls} or
\gls{Gls} or with \gls{glsxtrfull} or \gls{Glsxtrfull} for styles like
\abbrstyle{long-short-user}. The default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrusershortformat}}[2]\marg{\comment{}
 \gls{glsxtruserparen}
  \marg{\gls{glsxtrshortformat}\marg{\#1}\marg{}\marg{\#2}}\comment{}
  \marg{\#1}\comment{}
}
\end{codebox}

\cmddef{glsxtrusershortplformat}
As \gls{glsxtrusershortformat} but for the \idx{firstuse} of
\gls{glspl} or with \gls{glsxtrfull} for styles like
\abbrstyle{long-short-user}. This has a similar definition
to the above but with \gls{glsxtrshortplformat}.

\cmddef{GLSxtrusershortformat}
As \gls{glsxtrusershortformat} but is used with the \idx{allcaps}
\gls{GLS} or \gls{GLSxtrfull}. This uses \gls{GLSxtruserparen}
instead of \gls{glsxtruserparen}.

\cmddef{GLSxtrusershortplformat}
As \gls{glsxtrusershortplformat} but is used with the \idx{allcaps}
\gls{GLSpl} or \gls{GLSxtrfullpl}. This uses \gls{GLSxtruserparen}
instead of \gls{glsxtruserparen}.

\cmddef{glsxtrpostusershortformat}
Used in the \idx{postlinkhook} to format the short form in
parentheses for styles like \abbrstyle{long-postshort-user}. The default
definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrpostusershortformat}}[2]\marg{\comment{}
  \gls{glsxtrifallcaps}
  \marg{\gls{GLSxtrusershortformat}\marg{\#1}\marg{\#2}}\comment{}
  \marg{\gls{glsxtrusershortformat}\marg{\#1}\marg{\#2}}\comment{}
}
\end{codebox}
Note that this doesn't check if the plural form was used. If you
require this, you will need to redefined this command to include
\gls{glsifplural}:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrpostusershortformat}}[2]\marg{\comment{}
  \gls{glsifplural}
  \marg{\comment{}
    \gls{glsxtrifallcaps}
    \marg{\gls{GLSxtrusershortplformat}\marg{\#1}\marg{\#2}}\comment{}
    \marg{\gls{glsxtrusershortplformat}\marg{\#1}\marg{\#2}}\comment{}
  }\comment{}
  \marg{\comment{}
    \gls{glsxtrifallcaps}
    \marg{\gls{GLSxtrusershortformat}\marg{\#1}\marg{\#2}}\comment{}
    \marg{\gls{glsxtrusershortformat}\marg{\#1}\marg{\#2}}\comment{}
  }\comment{}
}
\end{codebox}

\cmddef{glsxtruserlongformat}
Used to format the singular long form in parentheses (with
\gls{glsxtruserparen}) on the \idx{firstuse} of \gls{gls} or
\gls{Gls} or with \gls{glsxtrfull} for styles like
\abbrstyle{short-long-user}. The default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtruserlongformat}}[2]\marg{\comment{}
 \gls{glsxtruserparen}\marg{\gls{glsxtrlongformat}\marg{\#1}\marg{}\marg{\#2}}\marg{\#1}\comment{}
}
\end{codebox}

\cmddef{GLSxtruserlongformat}
As \gls{glsxtruserlongformat} but \idx{allcaps}. This uses \gls{GLSxtruserparen}
instead of \gls{glsxtruserparen}.

\cmddef{glsxtruserlongplformat}
As \gls{glsxtruserlongformat} but for the \idx{firstuse} of
\gls{glspl} or with \gls{glsxtrfull} for styles like
\abbrstyle{short-long-user}. This has a similar definition
to \gls{glsxtruserlongformat} but with \gls{glsxtrlongplformat}.

\cmddef{GLSxtruserlongplformat}
As \gls{glsxtruserlongplformat} but \idx{allcaps}. This uses \gls{GLSxtruserparen}
instead of \gls{glsxtruserparen}.

\cmddef{glsxtrpostuserlongformat}
Used in the \idx{postlinkhook} to format the long form in
parentheses for styles like \abbrstyle{short-postlong-user}. The default
definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrpostuserlongformat}}[2]\marg{\comment{}
  \gls{glsxtrifallcaps}
  \marg{\gls{GLSxtruserlongformat}\marg{\#1}\marg{\#2}}\comment{}
  \marg{\gls{glsxtruserlongformat}\marg{\#1}\marg{\#2}}\comment{}
}
\end{codebox}
Note that, as with \gls{glsxtrpostusershortformat}, this doesn't
check if the plural form was used. If you require this, you will
need to redefined this command to include \gls{glsifplural}.

\paragraph{Footnote Styles}
\label{sec:abbrvcmdsfootnote}These commands are only used by the footnote styles.

\cmddef{glsxtrfootnotename}
This command should expand to the value of the \gloskey{name} key.
The default definition is:
\begin{codebox}
\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}
\end{codebox}

\cmddef{glsxtrfootnotedescname}
This command should expand to the value of the \gloskey{name} key
for styles like \abbrstyle{footnote-desc}.
The default definition is:
\begin{codebox}[before upper app=\small]
\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}\comment{}
\cmd{protect}\gls{glsxtrfullsep}\marg{\cmd{the}\gls{glslabeltok}}\comment{}
\cmd{protect}\gls{glsxtrparen}
 \marg{\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}}}\comment{}
\end{codebox}

\cmddef{glsxtrfootnotedescsort}
This command should expand to the value of the \gloskey{sort} key
for styles like \abbrstyle{footnote-desc}.
The default definition is simply \code{\cmd{the}\gls{glsshorttok}}.

\begin{information}
This command is irrelevant with the \idx{unsrtfam}.
\end{information}

\cmddef{glslongfootnotefont}
The formatting command used for the long form in the footnote
styles. The default is to simply use \gls{glslongdefaultfont}.

\cmddef{glsfirstlongfootnotefont}
The formatting command used for the \idx{firstuse} long form in the footnote
styles. The default is to simply use \gls{glslongfootnotefont}.

\cmddef{glsxtrabbrvfootnote}
The command that produces the footnote. The default definition
ignores the first argument:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrabbrvfootnote}}[2]\marg{\gls{footnote}\marg{\#2}}
\end{codebox}


\cmddef{glsxtrfootnotelongformat}
This command is used within the footnote to display the long form
formatted with \meta{fmt-cs} for the footnote styles on
\idx{firstuse} of \gls{gls}, \gls{Gls} and \gls{GLS}. The default definition is simply:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrfootnotelongformat}}[2]\marg{\comment{}
  \gls{glsxtrlongformat}\marg{\#1}\marg{}\marg{\#2}\comment{}
}
\end{codebox}
For example, if the footnote should start with an \idx{uppercase}
letter then simply redefine this to use \gls{Glsxtrlongformat}
instead:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrfootnotelongformat}}[2]\marg{\comment{}
  \gls{Glsxtrlongformat}\marg{\#1}\marg{}\marg{\#2}\comment{}
}
\end{codebox}

\cmddef{glsxtrfootnotelongplformat}
This command is used within the footnote to display the plural long form
formatted with \meta{fmt-cs} for the footnote styles on
\idx{firstuse} of \gls{glspl}, \gls{Glspl} and \gls{GLSpl}.
The default definition is simply:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrfootnotelongplformat}}[2]\marg{\comment{}
  \gls{glsxtrlongplformat}\marg{\#1}\marg{}\marg{\#2}\comment{}
}
\end{codebox}

\cmddef{glsxtrpostfootnotelongformat}
This command is used for the \qt{postfootnote} styles. This is
simply defined to do \gls{glsxtrfootnotelongformat}. Note that
there's no plural equivalent as the \qt{postfootnote} styles don't
check if the plural command (\gls{glspl} etc) was used.

\paragraph{No-Long Styles}
\label{sec:abbrvcmdsnolong}These commands are used by the
\qt{nolong} styles.

\cmddef{glsxtrshortnolongname}
This command should expand to the value of the \gloskey{name} key
for styles like \abbrstyle{short-nolong}.
The default definition is:
\begin{codebox}
\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}
\end{codebox}

\cmddef{glsxtrshortdescname}
This command should expand to the value of the \gloskey{name} key
for styles like \abbrstyle{short-nolong-desc}.
The default definition is:
\begin{codebox}[before upper app=\small]
\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}\comment{}
\cmd{protect}\gls{glsxtrfullsep}\marg{\cmd{the}\gls{glslabeltok}}\comment{}
\cmd{protect}\gls{glsxtrparen}
  \marg{\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}}}\comment{}
\end{codebox}

\paragraph{No-Short Styles}
\label{sec:abbrvcmdsnoshort}These commands are used by the
\qt{noshort} styles.

\cmddef{glsxtrlongnoshortdescname}
This command should expand to the value of the \gloskey{name} key
for styles like \abbrstyle{long-noshort-desc}.
The default definition is:
\begin{codebox}
\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}}
\end{codebox}

\cmddef{glsxtrlongnoshortname}
This command should expand to the value of the \gloskey{name} key
for styles like \abbrstyle{long-noshort}.
The default definition is:
\begin{codebox}
\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}
\end{codebox}

\paragraph{Hyphen Styles}
\label{sec:abbrvcmdshyphen}These are commands used by the \qt{hyphen}
styles. They are designed to work with the \catattr{markwords}
and \catattr{markshortwords} attributes.

\cmddef{glsabbrvhyphenfont}
The formatting command used for the short form in the hyphen
styles. The default is to simply use \gls{glsabbrvdefaultfont}.

\cmddef{glsfirstabbrvhyphenfont}
The formatting command used for the short form in the hyphen
styles on \idx{firstuse}. The default is to simply use
\gls{glsabbrvhyphenfont}.

\cmddef{glslonghyphenfont}
The formatting command used for the long form in the hyphen
styles. The default is to simply use \gls{glslongdefaultfont}.

\cmddef{glsfirstlonghyphenfont}
The formatting command used for the long form in the hyphen
styles on \idx{firstuse}. The default is to simply use
\gls{glslonghyphenfont}.

\cmddef{glsxtrhyphensuffix}
Short plural suffix used by the \qt{hyphen} styles. This defaults to
\gls{glsxtrabbrvpluralsuffix}.

\cmddef{glsxtrlonghyphenshortsort}
Expands to the sort value for the styles like \abbrstyle{long-hyphen-short-hyphen}.
This defaults to the original short value (\gls{glsxtrorgshort}).
This command is irrelevant with the \idx{unsrtfam}.

\cmddef{glsxtrshorthyphenlongsort}
Expands to the sort value for the styles like \abbrstyle{short-hyphen-long-hyphen}.
This defaults to the original short value (\gls{glsxtrorgshort}).
This command is irrelevant with the \idx{unsrtfam}.

\cmddef{glsxtrlonghyphennoshortsort}
Expands to the sort value for the styles like
\abbrstyle{long-hyphen-noshort-noreg}.
This defaults to the original short value (\gls{glsxtrorgshort}).
This command is irrelevant with the \idx{unsrtfam}.

\cmddef{glsxtrlonghyphennoshortdescsort}
Expands to the sort value for the styles like
\abbrstyle{long-hyphen-noshort-desc-noreg}.
This defaults to the original long value (\gls{glsxtrorglong}).
This command is irrelevant with the \idx{unsrtfam}.

\cmddef{glsxtrlonghyphenshort}
Formats the long and short form for the full or \idx{firstuse}
\abbrstyle{long-hyphen-short-hyphen} style. This uses
\gls{glsxtrifhyphenstart} to test if the \meta{insert} starts with a
hyphen. If it does, \gls{glsxtrwordsep} is locally set to
\gls{glsxtrwordsephyphen} to replace the inter-word spaces with
hyphens. The short form is placed in parentheses with
\gls{glsxtrparen}, preceded by the \gls{glsxtrfullsep} separator.
The \meta{insert} is placed after both the long and the short form.

\cmddef{GLSxtrlonghyphenshort}
As above, but the \meta{insert} is converted to \idx{allcaps}. The
\meta{short} and \meta{long} arguments should be supplied as
\idx{allcaps}. Note that it's not possible to simply do
\gls{glsxtrlonghyphenshort} with
\code{\gls{MakeUppercase}\margm{insert}} as the argument as this
will interfere with the check to determine if \meta{insert} starts
with a hyphen.

\cmddef{glsxtrlonghyphennoshort}
Formats the long form for the full or \idx{firstuse}
\abbrstyle{long-hyphen-noshort-desc-noreg} style. This uses
\gls{glsxtrifhyphenstart} to test if the \meta{insert} starts with a
hyphen. If it does, \gls{glsxtrwordsep} is locally set to
\gls{glsxtrwordsephyphen} to replace the inter-word spaces with
hyphens. The \meta{insert} is placed after the long form.

\cmddef{GLSxtrlonghyphennoshort}
As above but converts \meta{insert} to \idx{allcaps}. The
\meta{long} argument should already be in \idx{allcaps}.
 Note that it's not possible to simply do
\gls{glsxtrlonghyphennoshort} with
\code{\gls{MakeUppercase}\margm{insert}} as the argument as this
will interfere with the check to determine if \meta{insert} starts
with a hyphen.

\cmddef{glsxtrlonghyphen}
Formats the long form for the full or \idx{firstuse}
\abbrstyle{long-hyphen-postshort-hyphen} style. This is similar to
the above, but the \meta{insert} argument is only used to check if
it starts with a hyphen. The actual \meta{insert} is placed in the
\idx{postlinkhook}.

\cmddef{xpglsxtrposthyphenshort}
This command is used in the \idx{postlinkhook} for the 
\abbrstyle{long-hyphen-postshort-hyphen} style on \idx{firstuse}.
It expands the placeholder commands (\gls{glslabel} and \gls{glsinsert})
and uses \gls{GLSxtrposthyphenshort} for \idx{allcaps} or
\gls{glsxtrposthyphenshort} otherwise. Note that this doesn't show
the plural by default. If you require the plural form, you need to
redefine this to add a check with \gls{glsifplural}:
\begin{codebox}[before upper app=\small]
\cmd{renewcommand}*\marg{\gls{xpglsxtrposthyphenshort}}\marg{\comment{}
  \gls{glsifplural}
  \marg{\comment{}
    \gls{glsxtrifallcaps}
    \marg{\comment{}
      \gls{expandafter}\gls{GLSxtrposthyphenshortpl}
         \gls{expandafter}\gls{glslabel}
         \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
    \marg{\comment{}
      \gls{expandafter}\gls{glsxtrposthyphenshortpl}
         \gls{expandafter}\gls{glslabel}
         \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
  }\comment{}
  \marg{\comment{}
    \gls{glsxtrifallcaps}
    \marg{\comment{}
      \gls{expandafter}\gls{GLSxtrposthyphenshort}
         \gls{expandafter}\gls{glslabel}
         \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
    \marg{\comment{}
      \gls{expandafter}\gls{glsxtrposthyphenshort}
         \gls{expandafter}\gls{glslabel}
         \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
  }\comment{}
}
\end{codebox}

\cmddef{glsxtrposthyphenshort}
If \meta{insert} starts with a hyphen, \gls{glsxtrwordsep} is locally set to
\gls{glsxtrwordsephyphen} to replace the inter-word spaces with
hyphens. The \meta{insert} encapsulated with
\gls{glsfirstlonghyphenfont} is then done (to complete the long
form, which has already been displayed with \gls{glsxtrlonghyphen}
in the \idx{linktext}). Then the short form followed by the
\meta{insert} is placed in parentheses (with \gls{glsxtrparen}
preceded by \gls{glsxtrfullsep}).

\cmddef{GLSxtrposthyphenshort}
As above but \idx{allcaps}.

\cmddef{glsxtrposthyphenshortpl}
As \gls{glsxtrposthyphenshort} but plural.

\cmddef{GLSxtrposthyphenshortpl}
As above but \idx{allcaps}.

\cmddef{xpglsxtrposthyphensubsequent}
This command is used in the \idx{postlinkhook} for the 
\abbrstyle{long-hyphen-postshort-hyphen} style on \idx{subsequentuse}.
It expands the placeholder commands (\gls{glslabel} and \gls{glsinsert})
and uses \gls{GLSxtrposthyphensubsequent} for \idx{allcaps} or
\gls{glsxtrposthyphensubsequent} otherwise.

\cmddef{glsxtrposthyphensubsequent}
This command is used in the \idx{postlinkhook} for the 
\abbrstyle{long-hyphen-postshort-hyphen} style on \idx{subsequentuse}.
Only the \meta{insert} is done.

\cmddef{GLSxtrposthyphensubsequent}
As above but \idx{allcaps}.

\cmddef{glsxtrshorthyphenlong}
Formats the short and long form for the full or \idx{firstuse}
\abbrstyle{short-hyphen-long-hyphen} style. Similar to
\gls{glsxtrlonghyphenshort} but the short and long forms are
swapped.

\cmddef{GLSxtrshorthyphenlong}
As above, but the \meta{insert} is converted to \idx{allcaps}. The
\meta{short} and \meta{long} arguments should be supplied as
\idx{allcaps}. Note that it's not possible to simply do
\gls{glsxtrshorthyphenlong} with
\code{\gls{MakeUppercase}\margm{insert}} as the argument as this
will interfere with the check to determine if \meta{insert} starts
with a hyphen.

\cmddef{glsxtrshorthyphen}
Formats the short form for the full or \idx{firstuse}
\abbrstyle{short-hyphen-postlong-hyphen} style. The \meta{insert}
argument is only used to check if it starts with a hyphen. The
actual \meta{insert} is placed in the \idx{postlinkhook}.

\cmddef{xpglsxtrposthyphenlong}
This command is used in the \idx{postlinkhook} for the 
\abbrstyle{short-hyphen-postlong-hyphen} style on \idx{firstuse}.
It expands the placeholder commands (\gls{glslabel} and \gls{glsinsert})
and uses \gls{GLSxtrposthyphenlong} for \idx{allcaps} or
\gls{glsxtrposthyphenlong} otherwise. Note that this doesn't show
the plural by default. If you require the plural form, you need to
redefine this to add a check with \gls{glsifplural}:
\begin{codebox}[before upper app=\small]
\cmd{renewcommand}*\marg{\gls{xpglsxtrposthyphenlong}}\marg{\comment{}
  \gls{glsifplural}
  \marg{\comment{}
    \gls{glsxtrifallcaps}
    \marg{\comment{}
      \gls{expandafter}\gls{GLSxtrposthyphenlongpl}
         \gls{expandafter}\gls{glslabel}
         \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
    \marg{\comment{}
      \gls{expandafter}\gls{glsxtrposthyphenlongpl}
         \gls{expandafter}\gls{glslabel}
         \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
  }\comment{}
  \marg{\comment{}
    \gls{glsxtrifallcaps}
    \marg{\comment{}
      \gls{expandafter}\gls{GLSxtrposthyphenlong}
         \gls{expandafter}\gls{glslabel}
         \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
    \marg{\comment{}
      \gls{expandafter}\gls{glsxtrposthyphenlong}
         \gls{expandafter}\gls{glslabel}
         \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
  }\comment{}
}
\end{codebox}

\cmddef{glsxtrposthyphenlong}
This command is used in the \idx{postlinkhook} for the 
\abbrstyle{short-hyphen-postlong-hyphen} style on \idx{firstuse}.
Similar to \gls{glsxtrposthyphenshort} but shows the long form instead of
the short form.

\cmddef{GLSxtrposthyphenlong}
As above but \idx{allcaps}.

\cmddef{glsxtrposthyphenlongpl}
As \gls{glsxtrposthyphenlong} but plural.

\cmddef{GLSxtrposthyphenlongpl}
As above but \idx{allcaps}.

\paragraph{Only Styles}
\label{sec:abbrvcmdsonly}These are commands used by the \qt{only}
styles, such as \abbrstyle{long-only-short-only}.

\cmddef{glsabbrvonlyfont}
The formatting command used for the short form in the only
styles. The default is to simply use \gls{glsabbrvdefaultfont}.

\cmddef{glsfirstabbrvonlyfont}
The formatting command used for the short form in the only
styles on \idx{firstuse}. The default is to simply use
\gls{glsabbrvonlyfont}.

\cmddef{glslongonlyfont}
The formatting command used for the long form in the only
styles. The default is to simply use \gls{glslongdefaultfont}.

\cmddef{glsfirstlongonlyfont}
The formatting command used for the long form in the only
styles on \idx{firstuse}. The default is to simply use
\gls{glslongonlyfont}.

\cmddef{glsxtronlysuffix}
Short plural suffix used by the \qt{only} styles. This defaults to
\gls{glsxtrabbrvpluralsuffix}.

\cmddef{glsabbrvsconlyfont}
The formatting command used for the short form in the \qt{sc-only}
styles. The default is to simply use \gls{glsabbrvscfont}.

\cmddef{glsfirstabbrvsconlyfont}
The formatting command used for the short form in the \qt{sc-only}
styles on \idx{firstuse}. The default is to simply use
\gls{glsabbrvsconlyfont}.

\cmddef{glsxtrsconlyrevert}
Counteracts the effect of \gls{glsabbrvsconlyfont}. The default is
\gls{glsxtrscrevert}. If you redefine \gls{glsabbrvsconlyfont}, you
will need to redefine \gls{glsxtrsconlyrevert} as applicable.

\cmddef{glsxtrsconlysuffix}
Short plural suffix used by the \qt{sc-only} styles. This defaults to
\gls{glsxtrscsuffix}.

\cmddef{glsxtronlyname}
Expands to the value for the \gloskey{name} key for the \qt{only}
styles. The default definition is:
\begin{codebox}
\cmd{protect}\gls{glsabbrvonlyfont}\marg{\cmd{the}\gls{glsshorttok}}
\end{codebox}

\cmddef{glsxtronlydescname}
Expands to the value for the \gloskey{name} key for the \qt{only}
styles where the description should be described, such as
\abbrstyle{long-only-short-only-desc}. The default definition is:
\begin{codebox}
\cmd{protect}\gls{glslongfont}\marg{\cmd{the}\gls{glslongtok}}
\end{codebox}

\cmddef{glsxtronlydescsort}
Expands to the value for the \gloskey{sort} key for the \qt{only}
styles where the description should be described, such as
\abbrstyle{long-only-short-only-desc}. The default definition is
\code{\cmd{the}\gls{glslongtok}}.

\begin{information}
This command is irrelevant with the \idx{unsrtfam}.
\end{information}

\cmddef{glsxtrsconlyname}
Expands to the value for the \gloskey{name} key for the \qt{sc-only}
styles. The default definition is:
\begin{codebox}
\cmd{protect}\gls{glsabbrvsconlyfont}\marg{\cmd{the}\gls{glsshorttok}}
\end{codebox}

\cmddef{glsxtrsconlydescname}
Expands to the value for the \gloskey{name} key for the \qt{sc-only}
styles where the description should be described. The default definition is
to simply use \gls{glsxtronlydescname}.

\cmddef{glsxtrsconlydescsort}
Expands to the value for the \gloskey{sort} key for the \qt{sc-only}
styles where the description should be described, such as
\abbrstyle{long-only-short-only-desc}. The default definition is
to simply use \gls{glsxtronlydescsort}.

\begin{information}
This command is irrelevant with the \idx{unsrtfam}.
\end{information}

\paragraph{Fonts}
\label{sec:abbrvcmdsfonts}These are commands used by styles that
use a particular font shape or size, identified by one of the
following two-letter tags: \qt{sc} (\gls{textsc}), \qt{sm} (\gls{textsmaller})
or \qt{em} (\gls{emph}).

\begin{information}
For the \qt{sc-user} styles, see \sectionref{sec:abbrvcmdsuser}.
For the \qt{sc-only} styles, see \sectionref{sec:abbrvcmdsonly}.
\end{information}

\cmddef{glsabbrvscfont}
Formatting for the \qt{sc} short form. This uses \gls{textsc} to
apply a \idx{smallcaps} style, so your document font needs to
support it.

\begin{information}
\gls{textsc} uses small capital glyphs for \idx{lowercase}
characters. \Idx{uppercase} characters show as normal capitals.
This means that you need to use \idx{lowercase} characters in the
abbreviation.
\end{information}

\cmddef{glsfirstabbrvscfont}
Formatting for the \qt{sc} short form shown on \idx{firstuse}.
This defaults to \gls{glsabbrvscfont}.

\cmddef{glsxtrscrevert}
Counteracts the effect of \gls{glsabbrvscfont}. This defaults to
\gls{glstextup}. If you redefine \gls{glsabbrvscfont}, you
will need to redefine \gls{glsxtrscrevert} as applicable.

\cmddef{glsxtrscsuffix}
Short plural suffix used by the \qt{sc} styles. This needs to
counteract the smallcaps, so it's defined as:
\begin{codebox}
\cmd{protect}\gls{glstextup}{\gls{glsxtrabbrvpluralsuffix}}
\end{codebox}

\cmddef{glsabbrvsmfont}
Formatting for the \qt{sm} short form. This uses \gls{textsmaller},
which is defined by the \sty{relsize} package. You will need to
load that package if you want to use any of the \qt{sm} styles.

\begin{information}
\gls{textsmaller} reduces the font size, so if you want to use it to
simulate \idx{smallcaps}, you need to use \idx{uppercase} characters
in the abbreviation.
\end{information}

\cmddef{glsfirstabbrvsmfont}
Formatting for the \qt{sm} short form shown on \idx{firstuse}.
This defaults to \gls{glsabbrvsmfont}.

\cmddef{glsxtrsmrevert}
Counteracts the effect of \gls{glsabbrvsmfont}. This defaults to
\gls{textlarger}. If you redefine \gls{glsabbrvsmfont}, you
will need to redefine \gls{glsxtrsmrevert} as applicable.

\cmddef{glsxtrsmsuffix}
Short plural suffix used by the \qt{sm} styles. This defaults to
\gls{glsxtrabbrvpluralsuffix}.

\cmddef{glsabbrvemfont}
Formatting for the \qt{em} short form. This uses \gls{emph}.

\cmddef{glsfirstabbrvemfont}
Formatting for the \qt{em} short form shown on \idx{firstuse}.
This defaults to \gls{glsabbrvemfont}.

\cmddef{glsxtremrevert}
Counteracts the effect of \gls{glsabbrvemfont}. This defaults to
\gls{textup}. If you redefine \gls{glsabbrvemfont}, you
will need to redefine \gls{glsxtremrevert} as applicable.

\cmddef{glsxtremsuffix}
Short plural suffix used by the \qt{em} styles. This defaults to
\gls{glsxtrabbrvpluralsuffix}.

\cmddef{glslongemfont}
Formatting for the \qt{em} long form. This uses \gls{emph}.

\cmddef{glsfirstlongemfont}
Formatting for the \qt{em} short form shown on \idx{firstuse}.
This defaults to \gls{glslongemfont}.

\subsection{Advanced Style Commands}
\label{sec:advancedabbrstylecmds}

These commands should typically not be needed in a document, but are
provided for advanced users. See \sectionref{sec:abbrvcmds}
for commands to adjust the predefined abbreviation styles.

\cmddef{glssetabbrvfmt}
Sets the current formatting commands
(\sectionref{sec:abbrstylefmts}) associated with the abbreviation
style associated with the given category. That is, the command
redefinitions provided in the third argument (\meta{display
definitions}) of \gls{newabbreviationstyle} are applied.

If no abbreviation style has been set for the given category, the
style associated with the \cat{abbreviation} category is used.

This command is used:
\begin{itemize}
\item At the start of \gls{glsentryfmt} if the
current entry has the \gloskey{short} field set. This ensures that the
\idx{glslike} commands use the appropriate formatting.

\item At the start of
\gls{glsxtrassignfieldfont} if the current entry has the
\gloskey{short} field set. This ensures that the
\idx{glslike} commands use the appropriate formatting (where
possible).

\item At the start of \gls{glsxtrshort}, \gls{glsxtrlong}, \gls{glsxtrfull}
and their plural and case-changing variants.

\item At the start of \gls{glossentryname},
\gls{glossentrynameother}, \gls{glossentrydesc}, 
\gls{glossentrysymbol}, and their sentence-case variants.
\end{itemize}

\cmddef{glsuseabbrvfont}
A robust command that applies the abbreviation font for the given
category to the supplied text.

\cmddef{glsuselongfont}
A robust command that applies the long font for the given
category to the supplied text.

\cmddef{GlsXtrUseAbbrStyleSetup}
This implements the given abbreviation style's setup code.
Note that this expects the placeholder macros and token registers to
be set. This may be used in the \meta{setup} of
\gls{newabbreviationstyle} to inherit the setup code of a related
style.

\cmddef{GlsXtrUseAbbrStyleFmts}
This implements the given abbreviation style's display
definitions code. This may be used in the \meta{display
definitions} of \gls{newabbreviationstyle} to inherit the formatting
of a related style.

\cmddef{xpglsxtrpostabbrvfootnote}
This is used by styles like \abbrstyle{postfootnote} to ensure that
the label and inner and outer formatting are expanded before being
passed to \gls{glsxtrpostabbrvfootnote}, otherwise they may lose
their definitions before the footnote text is typeset.

\cmddef{glsxtrpostabbrvfootnote}
This is used by the footnote styles that defer the footnote to the
\idx{postlinkhook}. The default definition is:
\begin{codebox}
\cmd{newrobustcmd}*\marg{\gls{glsxtrpostabbrvfootnote}}[2]\marg{\comment{}
 \gls{glsxtrabbrvfootnote}\marg{\#1}\comment{}
 \marg{\#2\gls{glsxtrpostfootnotelongformat}
   \marg{\#1}\marg{\gls{glsfirstlongfootnotefont}}}\comment{}
}
\end{codebox}
The second argument will be the expansion of
\gls{glsxtrassignlinktextfmt}, to allow the \idx{innerformatting} 
to be picked up, if required.

\cmddef{glsxtrifhyphenstart}
This command is used by the hyphen styles to determine if the insert
material starts with a hyphen. Does \meta{true} if \meta{text}
starts with a hyphen otherwise does \meta{false}.

\cmddef{GlsXtrWarnDeprecatedAbbrStyle}
This command is used to generate a warning (with \gls{GlossariesExtraWarning})
if a deprecated abbreviation style is used.

\subsection{Defining New Abbreviation Styles}
\label{sec:newabbrvstyle}

If none of the predefined styles suit your requirements, you can
define your own custom style using:
\cmddef{newabbreviationstyle}
The first argument is the style name. This is used internally to
form control sequences, so the name shouldn't contain any special
characters.

The second argument sets up the information that's required when an
abbreviation is defined (which is why the style must be set before
the abbreviations with that style are defined). The relevant
commands for this argument are listed in
\sectionref{sec:abbrstyleinit}.

The third argument defines the commands that determine how
the display style (\gls{gls}) and the inline style
(\gls{glsxtrfull}) are formatted. The relevant
commands for this argument are listed in
\sectionref{sec:abbrstylefmts}.

\cmddef{renewabbreviationstyle}
Redefines an existing abbreviation style.

\cmddef{letabbreviationstyle}
Defines a synonym of an existing abbreviation style.

\subsubsection{Style Initialisation Hooks}
\label{sec:abbrstyleinit}

The style initialisation hooks should be placed in the second
argument (\meta{setup}) of \gls{newabbreviationstyle}. They ensure
that all the fields are correctly initialised when the entry is
defined with the underlying \gls{newglossaryentry} command. They may
also be used to set category attributes.

The following is prepended to \meta{setup} to initialise the final
hook:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{GlsXtrPostNewAbbreviation}}\marg{}
\end{codebox}

When an entry is defined with \gls{newabbreviation}, the following
steps are performed:
\begin{enumerate}
\item Token registers are initialised to the information provided in the
arguments of \gls{newabbreviation}: \gls{glskeylisttok},
\gls{glslabeltok}, \gls{glsshorttok} and \gls{glslongtok}.

\item The commands \gls{glsxtrorgkeylist}, \gls{glsxtrorgshort} and \gls{glsxtrorglong} are
defined to the options, short and long values supplied to
\gls{newabbreviation}. (The \gls{glskeylisttok} \gls{glsshorttok} and \gls{glslongtok}
token registers may be changed before the entry is actually defined.
These commands may be used to obtain the original values.)

\item \gls{ExtraCustomAbbreviationFields} is initialised to do
nothing.

\item Accessibility settings are initialised, if required.
These redefine \gls{ExtraCustomAbbreviationFields} to set the
accessibility fields.

\item The command \gls{glscategorylabel} is defined to \code{abbreviation}.

\item The options list is parsed for the following keys: \gloskey{category}
and, if accessibility is enabled,
\gloskey{access}, \gloskey{textaccess}, \gloskey{pluralaccess},
\gloskey{firstaccess}, \gloskey{firstpluralaccess},
\gloskey{shortaccess}, \gloskey{shortpluralaccess},
\gloskey{longaccess}, and \gloskey{longpluralaccess}.

\item The abbreviation style is applied for the category given by
\gls{glscategorylabel} (which may have been changed when the options
were parsed in the previous step) or the fallback if no abbreviation
style is associated with that category. This performs both the
\meta{setup} and \meta{display definitions} provided when the style
was defined with \gls{newabbreviationstyle}.

\item The long plural form is initialised to its default value
(\meta{long}\gls{glspluralsuffix}).

\item The \catattr{markwords} attribute, if set, is implemented for the
singular long form. It will also mark
the entry as having a description with formatting (using
\gls{glsexclapplyinnerfmtfield}).

\item The \catattr{markshortwords} attribute is implemented, if
set, otherwise the \catattr{insertdots} attribute is implemented, if
set, for the singular short form.

\item The \catattr{aposplural} attribute is implemented, if
set, otherwise the \catattr{noshortplural} attribute is implemented, if
set. This step will set the default short plural.

\item \gls{glsshorttok} is updated to reflect any changes.

\item The \gls{glsxtrnewabbrevpresetkeyhook} hook is performed.

\item The options list is parsed for the \gloskey{shortplural} and
\gloskey{longplural} keys. The \gls{glskeylisttok} token is updated
to only include the remaining keys that haven't yet been processed.

\item The \catattr{markwords} attribute, if set, is implemented for the
plural long form.

\item The \catattr{markshortwords} attribute, if set, otherwise the
\catattr{insertdots} attribute, if set, is implemented for the
plural short form.

\item The \gls{glsshortpltok} and \gls{glslongpltok} registers are
set.

\item \gls{newabbreviationhook} performed.

\item The entry is defined using \gls{newglossaryentry} with the key value list:
\begin{codebox}
\gloskeyval{type}{\gls{glsxtrabbrvtype}},
\gloskeyval{category}{abbreviation},
\gloskeyval{short}{\cmd{the}\gls{glsshorttok}},
\gloskeyval{shortplural}{\cmd{the}\gls{glsshortpltok}},
\gloskeyval{long}{\cmd{the}\gls{glslongtok}},
\gloskeyval{longplural}{\cmd{the}\gls{glslongpltok}},
\gloskeyval{name}{\cmd{the}\gls{glsshorttok}},
\gls{CustomAbbreviationFields},
\gls{ExtraCustomAbbreviationFields}
\cmd{the}\gls{glskeylisttok}
\end{codebox}

\item Add the \gloskey{name}, \gloskey{first},
\gloskey{firstplural}, \gloskey{text} and \gloskey{plural} keys to
the list of \idx{innerformatting} exclusions, as
they include formatting commands.

\item Final hook \gls{GlsXtrPostNewAbbreviation} performed.
\end{enumerate}

Note that when these hooks (except the last) are used, the entry hasn't yet been
defined. However, some information will have already been picked up
from the arguments of \gls{newabbreviation}. These can be accessed
in the hooks using the following (but make sure they are fully
expanded):
\cmddef{glscategorylabel}
Expands to the entry's category label.

\cmddef{glskeylisttok}
A token register that contains the options that were passed to
\gls{newabbreviation} with pre-processed options removed. 
Use \code{\cmd{the}\gls{glskeylisttok}} to expand it.

The original option list, as supplied to \gls{newabbreviation}, can
be obtained with:
\cmddef{glsxtrorgkeylist}
(Not a token register.)

\cmddef{glslabeltok}
A token register that contains the entry's label. Use
\code{\cmd{the}\gls{glslabeltok}} to expand it.

\cmddef{glsshorttok}
A token register that contains the short form (which may have been
modified after being passed to \gls{newabbreviation}). Use
\code{\cmd{the}\gls{glsshorttok}} to expand it.

The original short form, as supplied to \gls{newabbreviation}, can
be obtained with:
\cmddef{glsxtrorgshort}
(Not a token register.)

\cmddef{glsshortpltok}
A token register that contains the short plural form (which may
have been obtained from the short form or modified after being
passed to \gls{newabbreviation}). Use
\code{\cmd{the}\gls{glsshortpltok}} to expand it.

\cmddef{glslongtok}
A token register that contains the long form (which may have been
modified after being passed to \gls{newabbreviation}). Use
\code{\cmd{the}\gls{glslongtok}} to expand it.

The original long form, as supplied to \gls{newabbreviation}, can
be obtained with:
\cmddef{glsxtrorglong}
(Not a token register.)

\cmddef{glslongpltok}
A token register that contains the long plural form (which may
have been obtained from the long form or modified after being
passed to \gls{newabbreviation}). Use
\code{\cmd{the}\gls{glslongpltok}} to expand it.

\cmddef{ExtraCustomAbbreviationFields}
Expands to additional field definitions for the entry. This is used
to add the accessibility fields (such as \gloskey{shortaccess}), if
enabled.  The abbreviation style may append (\gls{appto}) or prepend
(\gls{preto}) additional information, if required, to this hook.

\begin{important}
If you alter this hook, make sure that you include the trailing
comma after each \code{\meta{key}\dequals\marg{value}}, including the last one.
\end{important}

\cmddef{CustomAbbreviationFields}
Expands to the default field definitions for the entry. Take care to
protect any commands that shouldn't be expanded. The comma may be
omitted from the final \code{\meta{key}\dequals\marg{value}}.

\cmddef{GlsXtrPostNewAbbreviation}
A hook that's used after the entry has been defined (at the end of
\gls{newabbreviation}). This can be used to set category attributes,
define the \idx{postlinkhook}, or mark the entry as having a complex
style (with \gls{glsxtrsetcomplexstyle}).

For example, the \abbrstyle{long-short} abbreviation style includes
the following in \meta{setup}:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{GlsXtrPostNewAbbreviation}}\marg{\comment{}
  \gls{glsxtrsetcomplexstyle}\marg{\cmd{the}\gls{glslabeltok}}\marg{3}\comment{}
  \gls{glshasattribute}\marg{\cmd{the}\gls{glslabeltok}}\marg{regular}\comment{}
  \marg{\comment{}
    \gls{glssetattribute}
      \marg{\cmd{the}\gls{glslabeltok}}\marg{regular}\marg{false}\comment{}
  }\comment{}
  \marg{}\comment{}
}
\end{codebox}
Note that in the above, the commands within the definition of
\gls{GlsXtrPostNewAbbreviation} are all expanded when that hook is
used. However, if this hook defines other commands or hooks that
will be used later, then make sure that the definitions of those
commands use the inner hook's own placeholder commands.

\begin{information}
Remember that the \idx{postlinkhook} uses \gls{glslabel} to
reference the current label. Don't use \gls{glslabeltok} as that
will contain the label of the last abbreviation to be defined.
\end{information}

For example, the \abbrstyle{long-hyphen-postshort-hyphen} style has:
\begin{codebox}[before upper app=\small]
\cmd{renewcommand}*\marg{\gls{GlsXtrPostNewAbbreviation}}\marg{\comment{}
  \gls{glsexclapplyinnerfmtfield}\marg{\cmd{the}\gls{glslabeltok}}\marg{desc}\comment{}
  \gls{csdef}\marg{glsxtrpostlink\gls{glscategorylabel}}\marg{\comment{}
    \gls{glsxtrifwasfirstuse}
    \marg{\comment{}
      \gls{expandafter}\gls{glsxtrposthyphenshort}
       \gls{expandafter}\gls{glslabel}
       \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
    \marg{\comment{}
      \gls{expandafter}\gls{glsxtrposthyphensubsequent}
       \gls{expandafter}\gls{glslabel}
       \gls{expandafter}\marg{\gls{glsinsert}}\comment{}
    }\comment{}
  }\comment{}
  \gls{glshasattribute}\marg{\cmd{the}\gls{glslabeltok}}\marg{regular}\comment{}
  \marg{\comment{}
    \gls{glssetattribute}
      \marg{\cmd{the}\gls{glslabeltok}}\marg{regular}\marg{false}\comment{}
  }\comment{}
  \marg{}\comment{}
}
\end{codebox}
In the above, \gls{glslabeltok} and \gls{glscategorylabel} are used
in the parts that will be expanded at the end of
\gls{newabbreviation}, but \gls{glslabel} and \gls{glsinsert} are
used in the definition of the \idx{postlinkhook}, which won't be
expanded until the entry is referenced in the document with a
command such as \gls{gls}. (The use of \gls{expandafter} is included
to assist \glsopt{innertextformat}.)

\cmddef{glsxtrsetcomplexstyle}
This command should go in the definition of
\gls{GlsXtrPostNewAbbreviation} to indicate that the entry given by
\meta{entry-label} has an abbreviation style that is
complex. The second argument \meta{n} should be numeric and
indicates why it doesn't work with \gls{glsfirst}, \gls{Glsfirst},
\gls{GLSfirst}, \gls{glsfirstplural}, \gls{Glsfirstplural}
or \gls{GLSfirstplural}: 1 (all caps doesn't work), 2 (all caps and
insert doesn't work), 3 (insert doesn't work).

\cmddef{glsfirstinnerfmtabbrvfont}
This is a robust command that applies both \gls{glsfirstabbrvfont} and the inner
formatting command \gls{glsxtrgenentrytextfmt}. This is used by the
following command.

\cmddef{glsfirstxpabbrvfont}
If the \catattr{markshortwords} attribute is true, this does
\code{\cmd{protect}\gls{glsfirstabbrvfont}\margm{text}}
otherwise it does \code{\gls{glsfirstinnerfmtabbrvfont}\margm{text}}.

This command is designed to be used within
\gls{CustomAbbreviationFields} to set the \gloskey{first} and
\gloskey{firstplural} keys, so it needs to partially expand
within \gls{newabbreviation}. For example, the
\abbrstyle{postfootnote} includes the following lines in the
definition of \gls{CustomAbbreviationFields}:
\begin{codebox}
\gloskeyval{first}{\gls{glsfirstxpabbrvfont}
  \marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}},
\gloskeyval{firstplural}{\gls{glsfirstxpabbrvfont}
  \marg{\cmd{the}\gls{glsshortpltok}}\marg{\gls{glscategorylabel}}},
\end{codebox}
This will be expanded before being passed to \gls{newglossaryentry}.
If the \catattr{markshortwords} attribute is true, this will end up
as:
\begin{codebox}
\gloskeyval{first}{\cmd{protect}\gls{glsfirstabbrvfont}\margm{short}},
\gloskeyval{firstplural}{\cmd{protect}\gls{glsfirstabbrvfont}\margm{shortpl}},
\end{codebox}
otherwise it will end up as:
\begin{codebox}
\gloskeyval{first}{\gls{glsfirstinnerfmtabbrvfont}\margm{short}},
\gloskeyval{firstplural}{\gls{glsfirstinnerfmtabbrvfont}\margm{shortpl}},
\end{codebox}
where \meta{short} and \meta{shortpl} are, respectively, the values
in the \gls{glsshorttok} and \gls{glsshortpltok} registers.

\begin{information}
The placeholder registers and macros (such as \gls{glsshorttok} and
\gls{glscategorylabel}) must be expanded before being passed to
\gls{newglossaryentry} as their values are unreliable outside of
\gls{newabbreviation}.
\end{information}

\cmddef{glsinnerfmtabbrvfont}
This is a robust command that applies both \gls{glsabbrvfont} and the inner
formatting command \gls{glsxtrgenentrytextfmt}. This is used by the
following command.

\cmddef{glsxpabbrvfont}
If the \catattr{markshortwords} attribute is true, this does
\code{\cmd{protect}\gls{glsabbrvfont}\margm{text}}
otherwise it does \code{\gls{glsinnerfmtabbrvfont}\margm{text}}.
This command is designed for the \gloskey{name}, \gloskey{text} and \gloskey{plural}
keys within \gls{CustomAbbreviationFields}.

\cmddef{glsfirstinnerfmtlongfont}
This is a robust command that applies both \gls{glsfirstlongfont} and the inner
formatting command \gls{glsxtrgenentrytextfmt}. This is used by the
following command.

\cmddef{glsfirstxplongfont}
If the \catattr{markwords} attribute is true, this does
\code{\cmd{protect}\gls{glsfirstlongfont}\margm{text}}
otherwise it does \code{\gls{glsfirstinnerfmtlongfont}\margm{text}}.
This command is designed for the \gloskey{first} and \gloskey{firstplural}
keys within \gls{CustomAbbreviationFields}.

\cmddef{glsinnerfmtlongfont}
This is a robust command that applies both \gls{glslongfont} and the inner
formatting command \gls{glsxtrgenentrytextfmt}. This is used by the
following command.

\cmddef{glsxplongfont}
If the \catattr{markwords} attribute is true, this does
\code{\cmd{protect}\gls{glslongfont}\margm{text}}
otherwise it does \code{\gls{glsinnerfmtlongfont}\margm{text}}.
This command is designed for the \gloskey{name}, \gloskey{text} and \gloskey{plural}
keys within \gls{CustomAbbreviationFields} (if they should include
the long form in their value, such as the
\abbrstyle{long-noshort-desc} style).

\cmddef{glsxtrAccSuppAbbrSetNoLongAttrs}
If accessibility support has been enabled with \opt{accsupp}, this
command will initialise support for the \gloskey{name},
\gloskey{first}, \gloskey{firstplural},
\gloskey{text} and \gloskey{plural} fields for the given category
(using \gls{glsxtrprovideaccsuppcmd}).
The \catattr{nameshortaccess}, \catattr{firstshortaccess} and \catattr{textshortaccess}
attributes are set to \code{true}. (Does nothing if accessibility
support has not been enabled.)

This command is provided for abbreviation styles
where the \gloskey{name}, \gloskey{first} and \gloskey{text} are
just the formatted abbreviation. The 
\gloskey{first} field may just be the long form or may be a
combination of short and long.

\cmddef{glsxtrAccSuppAbbrSetNameLongAttrs}
If accessibility support has been enabled with \opt{accsupp}, this
command will initialise support for the 
\gloskey{first}, \gloskey{firstplural},
\gloskey{text} and \gloskey{plural} fields for the given category
(using \gls{glsxtrprovideaccsuppcmd}).
The \catattr{firstshortaccess} and \catattr{textshortaccess}
attributes are set to \code{true}. (Does nothing if accessibility
support has not been enabled.)

This command is provided for abbreviation styles
where the \gloskey{first} and \gloskey{text} are
just the formatted abbreviation. The 
\gloskey{name} field may just be the long form or may be a
combination of short and long.

\cmddef{glsxtrAccSuppAbbrSetFirstLongAttrs}
If accessibility support has been enabled with \opt{accsupp}, this
command will initialise support for the \gloskey{name},
\gloskey{text} and \gloskey{plural} fields for the given category
(using \gls{glsxtrprovideaccsuppcmd}).
The \catattr{nameshortaccess} and \catattr{textshortaccess}
attributes are set to \code{true}. (Does nothing if accessibility
support has not been enabled.)

This command is provided for abbreviation styles where the
\gloskey{name} and \gloskey{text} are just the formatted
abbreviation. The \gloskey{first} field may just be the long form or
may be a combination of short and long.

\cmddef{glsxtrAccSuppAbbrSetTextShortAttrs}
If accessibility support has been enabled with \opt{accsupp}, this
command will initialise support for the 
\gloskey{text} and \gloskey{plural} fields for the given category
(using \gls{glsxtrprovideaccsuppcmd}).
The \catattr{textshortaccess}
attribute is set to \code{true}. (Does nothing if accessibility
support has not been enabled.)

This command is provided for abbreviation styles where the
\gloskey{text} is just the formatted abbreviation. The
\gloskey{name} and \gloskey{first} fields may just be the long form
or may be a combination of short and long. The \gloskey{name} may
also be short but followed by the long form in the description.

\cmddef{glsxtrAccSuppAbbrSetNameShortAttrs}
If accessibility support has been enabled with \opt{accsupp}, this
command will initialise support for the 
\gloskey{name} field for the given category
(using \gls{glsxtrprovideaccsuppcmd}).
The \catattr{nameshortaccess}
attribute is set to \code{true}. (Does nothing if accessibility
support has not been enabled.)

This command is provided for abbreviation styles where only the
\gloskey{name} is just the formatted abbreviation. The
\gloskey{first} and \gloskey{text} fields may just be the long form
or may be a combination of short and long.

\subsubsection{Style Formatting Commands}
\label{sec:abbrstylefmts}

The final \meta{display definitions} argument of
\gls{newabbreviationstyle} should contain the redefinitions of the
style commands listed here that are used to format abbreviations.

Whenever an abbreviation style is activated with commands like
\gls{setabbreviationstyle}, \gls{newabbreviation} or
\gls{glssetabbrvfmt}, \meta{display definitions} are implemented.

\begin{important}
If you simply want to adjust the formatting of one of the predefined
styles, you should redefine the associated commands listed in
\sectionref{sec:abbrvcmds}.
\end{important}

The following initialisation is always prepended to
\meta{display definitions} so you can omit them if the default is
appropriate for your style:
\begin{codebox}[before upper app=\small]
\cmd{renewcommand}*\marg{\gls{glsxtrinlinefullformat}}\marg{\comment{}
 \gls{glsxtrfullformat}}\comment{}
\cmd{renewcommand}*\marg{\gls{Glsxtrinlinefullformat}}\marg{\comment{}
 \gls{Glsxtrfullformat}}\comment{}
\cmd{renewcommand}*\marg{\gls{GLSxtrinlinefullformat}}\marg{\comment{}
 \gls{GLSxtrfullformat}}\comment{}
\cmd{renewcommand}*\marg{\gls{glsxtrinlinefullplformat}}\marg{\comment{}
 \gls{glsxtrfullplformat}}\comment{}
\cmd{renewcommand}*\marg{\gls{Glsxtrinlinefullplformat}}\marg{\comment{}
 \gls{Glsxtrfullplformat}}\comment{}
\cmd{renewcommand}*\marg{\gls{GLSxtrinlinefullplformat}}\marg{\comment{}
 \gls{GLSxtrfullplformat}}\comment{}
\cmd{let}\gls{glsxtrsubsequentfmt}\gls{glsxtrdefaultsubsequentfmt}
\cmd{let}\gls{glsxtrsubsequentplfmt}\gls{glsxtrdefaultsubsequentplfmt}
\cmd{let}\gls{Glsxtrsubsequentfmt}\gls{Glsxtrdefaultsubsequentfmt}
\cmd{let}\gls{Glsxtrsubsequentplfmt}\gls{Glsxtrdefaultsubsequentplfmt}
\cmd{let}\gls{GLSxtrsubsequentfmt}\gls{GLSxtrdefaultsubsequentfmt}
\cmd{let}\gls{GLSxtrsubsequentplfmt}\gls{GLSxtrdefaultsubsequentplfmt}
\end{codebox}
In the event that any styles omit defining the newer \gls{GLSxtrfullformat}
or \gls{GLSxtrfullplformat}, these are also initialised to defaults
but ideally they should have their definitions provided.

The minimal set of commands that should have their definitions
provided are the abbreviation plural suffix
(\gls{abbrvpluralsuffix}) the \idxpl{displayfullform}:
\gls{glsxtrfullformat}, \gls{glsxtrfullplformat} and their
case-changing variants.

The \idx{inlinefullform} commands only need to be provided if they
behave differently from the \idx{displayfullform}. The subsequent
use commands only need to be provided if the default (only show the
short form) isn't suitable.

\begin{important}
The content of \meta{display definitions} is placed within the
definition of an internal control sequence, so remember to use
\code{\#\#} instead of \code{\#} to reference command parameters.
\end{important}

\paragraph{Suffix and Fonts}
These are the generic suffix and font commands that vary according
to the abbreviation style. The style should provide the appropriate
definitions. The suffix should always be provided. The font commands
are only required if the style applies any font formatting to either
the long or short form.

\cmddef{abbrvpluralsuffix}
The plural suffix for the short form. For example, the
\abbrstyle{long-short} style defines this to just use
\gls{glsxtrabbrvpluralsuffix}, but the smallcaps styles, such as
\abbrstyle{long-short-sc} define this to \gls{glsxtrscsuffix} in
order to counteract the small caps font.

\cmddef{glsfirstabbrvfont}
The font formatting command for the short form on \idx{firstuse}. For example, the
\abbrstyle{long-short-sc} style has:
\begin{codebox}
\cmd{renewcommand}*\gls{glsfirstabbrvfont}\oarg{1}\marg{\comment{}
 \gls{glsfirstabbrvscfont}\marg{\#\#1}}
\end{codebox}

\cmddef{glsabbrvfont}
The font formatting command for the short form. For example, the
\abbrstyle{long-short-sc} style has:
\begin{codebox}
\cmd{renewcommand}*\gls{glsabbrvfont}\oarg{1}\marg{\gls{glsabbrvscfont}\marg{\#\#1}}
\end{codebox}

\cmddef{glsxtrrevert}
This command is designed to counteract the effect of
\gls{glsabbrvfont} if, for some reason, it shouldn't be applied to
part of the abbreviation. For example, you may prefer not to have
digits reduced with the smaller (\qt{sm}) styles.

\cmddef{glsfirstlongfont}
The font formatting command for the long form on \idx{firstuse}. For example, the
\abbrstyle{long-short-sc} style has:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsfirstlongfont}}[1]\marg{\comment{}
 \gls{glsfirstlongdefaultfont}\marg{\#\#1}}
\end{codebox}

\cmddef{glslongfont}
The font formatting command for the long form. For example, the
\abbrstyle{long-short-sc} style has:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glslongfont}}[1]\marg{\comment{}
 \gls{glslongdefaultfont}\marg{\#\#1}}
\end{codebox}

\paragraph{First Use Display Format}
These commands always need to be provided.

\cmddef{glsxtrfullformat}
The singular \idx{displayfullform} used on the \idx{firstuse} of
\gls{gls}.

\cmddef{glsxtrfullplformat}
The plural \idx{displayfullform} used on the \idx{firstuse} of
\gls{glspl}.

\cmddef{Glsxtrfullformat}
The \idx{sentencecase} singular \idx{displayfullform} used on the \idx{firstuse} of
\gls{Gls}.

\cmddef{Glsxtrfullplformat}
The \idx{sentencecase} plural \idx{displayfullform} used on the \idx{firstuse} of
\gls{Glspl}.

\cmddef{GLSxtrfullformat}
The \idx{allcaps} singular \idx{displayfullform} used on the \idx{firstuse} of
\gls{GLS}.

\cmddef{GLSxtrfullplformat}
The \idx{allcaps} plural \idx{displayfullform} used on the \idx{firstuse} of
\gls{GLSpl}.

\paragraph{Subsequent Use Display Format}
These commands only need to be provided if the \idx{glslike}
commands don't simply show the short form.

\cmddef{glsxtrsubsequentfmt}
The singular form for \idx{subsequentuse} of \gls{gls}.

\cmddef{glsxtrsubsequentplfmt}
The plural form for \idx{subsequentuse} of \gls{glspl}.

\cmddef{Glsxtrsubsequentfmt}
The \idx{sentencecase} singular form for \idx{subsequentuse} of \gls{Gls}.

\cmddef{Glsxtrsubsequentplfmt}
The \idx{sentencecase} plural form for \idx{subsequentuse} of
\gls{Glspl}.

\cmddef{GLSxtrsubsequentfmt}
The \idx{allcaps} singular form for \idx{subsequentuse} of \gls{GLS}.

\cmddef{GLSxtrsubsequentplfmt}
The \idx{allcaps} plural form for \idx{subsequentuse} of \gls{GLSpl}.

The defaults all show the short form and insert encapsulated with
the \idx{innerformatting} \gls{glsxtrgenentrytextfmt} and
\gls{glsabbrvfont}. The purpose of the \idx{innerformatting} is to get it
as close as possible to the actual text so \gls{glsabbrvfont} is
placed outside of \gls{glsxtrgenentrytextfmt}.

The \catattr{markshortwords} attribute complicates matters as it
inserts \gls{glsxtrword} and \gls{glsxtrwordsep} into the actual
field value. In that case, the \idx{innerformatting} is within
\gls{glsxtrword} and \gls{glsxtrwordsep}, so only the insert
material needs to be formatted.

If a custom style doesn't need to support \glsopt{innertextformat}
or \gls{ifglsxtrinsertinside}, it can reduce the complexity by
omitting the \idx{innerformatting} and conditionals, but this lack of
support should be documented if the style is made generally
available.

\cmddef{glsxtrdefaultsubsequentfmt}
The default singular form for \idx{subsequentuse} of \gls{gls}.

\cmddef{glsxtrdefaultsubsequentplfmt}
The default plural form for \idx{subsequentuse} of \gls{glspl}.

\cmddef{Glsxtrdefaultsubsequentfmt}
The default \idx{sentencecase} singular form for \idx{subsequentuse} of \gls{Gls}.

\cmddef{Glsxtrdefaultsubsequentplfmt}
The default \idx{sentencecase} plural form for \idx{subsequentuse}
of \gls{Glspl}.

\cmddef{GLSxtrdefaultsubsequentfmt}
The default \idx{allcaps} singular form for \idx{subsequentuse} of \gls{GLS}.

\cmddef{GLSxtrdefaultsubsequentplfmt}
The default \idx{allcaps} plural form for \idx{subsequentuse} of
\gls{GLSpl}.

\paragraph{Inline Full Format}
These commands only need to be provided if the \idx{inlinefullform}
is different from the \idx{displayfullform}.

\cmddef{glsxtrinlinefullformat}
The singular full form of \gls{glsxtrfull}.

\cmddef{glsxtrinlinefullplformat}
The plural full form of \gls{glsxtrfullpl}.

\cmddef{Glsxtrinlinefullformat}
The \idx{sentencecase} singular full form of \gls{Glsxtrfull}.

\cmddef{Glsxtrinlinefullplformat}
The \idx{sentencecase} plural full form of \gls{Glsxtrfullpl}.

\cmddef{GLSxtrinlinefullformat}
The \idx{allcaps} singular full form of \gls{GLSxtrfull}.

\cmddef{GLSxtrinlinefullplformat}
The \idx{allcaps} plural full form of \gls{GLSxtrfullpl}.

\paragraph{Wrapper Commands}
These are commands that can be used in the definitions of the above
to ensure that the appropriate accessibility fields and inner
formatting is supported.

\cmddef{glsxtrlongformat}
This command is used in the definition of \gls{glsxtrlong} in some
of the predefined abbreviation styles to format the \gloskey{long}
value of the entry identified by \meta{entry-label} with the command
\meta{fmt-cs}, which should take one argument.

Accessibility support is implemented with \gls{glsaccesslong} if the
\catattr{markwords} attribute is true otherwise with
\gls{glsaccessfmtlong} using \gls{glsxtrgenentrytextfmt} for the
\idx{innerformatting}.

This is then encapsulated (including or excluding the \meta{insert},
according to \gls{ifglsxtrinsertinside}) with \meta{fmt-cs}. If the
\meta{insert} content needs to be placed outside of \meta{fmt-cs}, it
will be individually encapsulated with the \idx{innerformatting}.

\cmddef{Glsxtrlongformat}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrlongformat}
As above, but \idx{allcaps}.

\cmddef{glsxtrlongplformat}
As \gls{glsxtrlongformat}, but for the \gloskey{longplural} field.

\cmddef{Glsxtrlongplformat}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrlongplformat}
As above, but \idx{allcaps}.

\cmddef{glsxtrlongformatgrp}
As \gls{glsxtrlongformat}, but adds grouping around \meta{insert}
(with the \idx{innerformatting} inside the group).

\cmddef{Glsxtrlongformatgrp}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrlongformatgrp}
As above, but \idx{allcaps}.

\cmddef{glsxtrlongplformatgrp}
As \gls{glsxtrlongplformat}, but adds grouping around \meta{insert}
(with the \idx{innerformatting} inside the group).

\cmddef{Glsxtrlongplformatgrp}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrlongplformatgrp}
As above, but \idx{allcaps}.

\cmddef{glsxtrshortformat}
This command is used in the definition of \gls{glsxtrshort} and in
some of the predefined abbreviation styles to format the
\gloskey{short} value of the entry identified by \meta{entry-label}
with the command \meta{fmt-cs}, which should take one argument.

Accessibility support is implemented with \gls{glsaccessshort} if the
\catattr{markshortwords} attribute is true otherwise with
\gls{glsaccessfmtshort} using \gls{glsxtrgenentrytextfmt} for the
\idx{innerformatting}.

This is then encapsulated (including or excluding the \meta{insert},
according to \gls{ifglsxtrinsertinside}) with \meta{fmt-cs}. If the
\meta{insert} content needs to be placed outside of \meta{fmt-cs}, it
will be individually encapsulated with the \idx{innerformatting}.

\cmddef{Glsxtrshortformat}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrshortformat}
As above, but \idx{allcaps}.

\cmddef{glsxtrshortplformat}
As \gls{glsxtrshortformat}, but for the \gloskey{shortplural} field.

\cmddef{Glsxtrshortplformat}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrshortplformat}
As above, but \idx{allcaps}.

\cmddef{glsxtrshortformatgrp}
As \gls{glsxtrshortformat}, but adds grouping around \meta{insert}
(with the \idx{innerformatting} inside the group).

\cmddef{Glsxtrshortformatgrp}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrshortformatgrp}
As above, but \idx{allcaps}.

\cmddef{glsxtrshortplformatgrp}
As \gls{glsxtrshortplformat}, but adds grouping around \meta{insert}
(with the \idx{innerformatting} inside the group).

\cmddef{Glsxtrshortplformatgrp}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrshortplformatgrp}
As above, but \idx{allcaps}.

\cmddef{glsxtrlongshortformat}
A shortcut designed for \meta{long} (\meta{short}) styles. This is
defined as:
\begin{codebox}
\gls{glsxtrlongformat}\margm{entry-label}\margm{insert}\margm{long-fmt-cs}\comment{}
\gls{glsxtrfullsep}\margm{entry-label}\comment{}
\gls{glsxtrparen}\marg{\gls{glsxtrshortformat}\margm{entry-label}\marg{}\margm{short-fmt-cs}}%
\end{codebox}
Note that the \meta{insert} is only placed after the long form.

\cmddef{Glsxtrlongshortformat}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrlongshortformat}
As above, but \idx{allcaps}.

\cmddef{glsxtrlongshortplformat}
As \gls{glsxtrlongshortformat} but uses the plural versions \gls{glsxtrlongplformat}
and \gls{glsxtrshortplformat}.

\cmddef{Glsxtrlongshortplformat}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrlongshortplformat}
As above, but \idx{allcaps}.

\cmddef{glsxtrshortlongformat}
A shortcut designed for \meta{short} (\meta{long}) styles. This is
defined as:
\begin{codebox}
\gls{glsxtrshortformat}\margm{entry-label}\margm{insert}\margm{short-fmt-cs}\comment{}
\gls{glsxtrfullsep}\margm{entry-label}\comment{}
\gls{glsxtrparen}\marg{\gls{glsxtrlongformat}\margm{entry-label}\marg{}\margm{long-fmt-cs}}%
\end{codebox}
Note that the \meta{insert} is only placed after the short form.

The syntax is the same as for \gls{glsxtrlongshortformat} even
though \gls{glsxtrlongformat} and \gls{glsxtrshortformat} are
flipped within the definition.

\cmddef{Glsxtrshortlongformat}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrshortlongformat}
As above, but \idx{allcaps}.

\cmddef{glsxtrshortlongplformat}
As \gls{glsxtrshortlongformat} but uses the plural versions
\gls{glsxtrshortplformat} and \gls{glsxtrlongplformat}.

\cmddef{Glsxtrshortlongplformat}
As above, but \idx{sentencecase}.

\cmddef{GLSxtrshortlongplformat}
As above, but \idx{allcaps}.

\section{Restoring Base Acronym Mechanism}
\label{sec:acrorevert}

It's possible to revert \gls{newacronym} back to the definition
provided by the base \sty{glossaries} package. However, if you do
this, you will lose all the abbreviation features provided by
\sty{glossaries-extra}.

\begin{important}
Where possible, avoid this. If you're simply trying to make the long form appear
on \idx{firstuse} with \gls{newacronym}, set the abbreviation style using:
\begin{codebox}
\gls{setabbreviationstyle}\oarg{acronym}\marg{long-short}
\end{codebox}
\end{important}

If you really need to use the original base \sty{glossaries} package's acronym
mechanism, it's better to stick with just \sty{glossaries} and not use
\sty{glossaries-extra}. However, it may be that you need to use a
\sty{glossaries-extra} feature, such as \gls{printunsrtglossary}, but you have a
custom acronym style that you can't implement using the \sty{glossaries-extra}
abbreviation mechanism. This is a rare edge case for unusual formats, as it should be
possible to implement most common abbreviation formats using the
predefined styles.

\begin{warning}
Unpredictable results will occur if \gls{RestoreAcronyms} or
\gls{MakeAcronymsAbbreviations} are used after abbreviations or
acronyms have been defined.
\end{warning}

\cmddef{RestoreAcronyms}
Restores \gls{newacronym} back to the original base \sty{glossaries}
interface. Note that this doesn't affect \gls{newabbreviation}.
It also sets the \catattr{regular} attribute for the \cat{acronym}
category to \code{false} and sets the acronym style to
\code{long-short} (which is the default for the base package).

The display style for each \idx{glossary} identified in the acronym lists
is switched to the default acronym display style.

\cmddef{MakeAcronymsAbbreviations}
Counteracts \gls{RestoreAcronyms}.

\chapter{Referencing (Using) Entries}
\label{sec:glsref}

Entries can be referenced using the \idx{glslike} and \idx{glstextlike}
commands, as described in the base \sty{glossaries} manual. There are some
additional commands provided by \sty{glossaries-extra}:
\begin{itemize}
\item abbreviation commands, such as \gls{glsxtrshort} 
 (see \sectionref{sec:abbreviations});
\item commands for use in captions or section headings, such as
\gls{glsfmttext} (see \sectionref{sec:headingcommands});
\item commands, such as \gls{glsxtrp}, designed for use within 
fields to help mitigate the problems of nesting (see
\sectionref{sec:nested});
\item commands, such as \gls{mgls}, that are designed for
referencing multi (or compound) entries (see
\sectionref{sec:multientries});
\item commands, such as \gls{glsaccessname}, used to incorporate
accessibility support (see \sectionref{sec:glsaccessfield});
\item commands, such as \gls{dgls}, that are designed for
\app{bib2gls}['s] dual entries (see \sectionref{sec:dgls});
\item commands, such as \gls{rgls}, that depend on the number of
entry records (see \sectionref{sec:recordcount}).
\end{itemize}
Additionally, the entry counting commands, such as \gls{cgls},
provided by the base \sty{glossaries} package are modified by
\sty{glossaries-extra} (see \sectionref{sec:entrycount}).

The \idx{glslike} commands are designed to produce text at that
point in the document (the \idx{linktext},
\sectionref{sec:entryfmtmods}), index the entry (to ensure that it
appears in the glossary, \sectionref{sec:wrglossary}) and unset the
\idx{firstuseflag} (which can alter the \idx{linktext},
\sectionref{sec:glsunset}). Additional information can be appended
automatically with the \idx{postlinkhook}
(\sectionref{sec:postlinkhook}). The \idx{linktext} is given by the
entry style (see \sectionref{sec:entryfmt}) or by the final argument
of \gls{glsdisp}.

The \idx{glstextlike} commands are designed to produce text at that
point in the document (the \idx{linktext},
\sectionref{sec:entryfmtmods}) and index the entry (to ensure that
it appears in the glossary, \sectionref{sec:wrglossary}). Additional
information can be appended automatically with the
\idx{postlinkhook} (\sectionref{sec:postlinkhook}). The
\idx{linktext} is determined by the calling command. For example,
the corresponding field value (possibly encapsulated with
\gls{glsxtrregularfont} and the inner formatting) for commands like
\gls{glstext} or the final argument of \gls{glslink}.

The \idx{glslike} and \idx{glstextlike} commands can all be used
with a star (\cmdmod+{star}) or plus (\cmdmod+{plus}) modifier. The star
modifier automatically implements \glsoptval{hyper}{false}
(disables the hyperlink) and the plus modifier automatically
implements \glsoptval{hyper}{true} (forces the hyperlink on, if
supported).

With \sty{glossaries-extra}, it's possible to define an additional
modifier (\cmdmod+{alt-mod}) for your own use with:
\cmddef{GlsXtrSetAltModifier}
The \meta{token} must be a single token, so a multi-byte \idx{utf8}
character will required a native Unicode engine (\XeLaTeX\ or \LuaLaTeX).
For example, the following:
\begin{codebox}
\gls{GlsXtrSetAltModifier}\marg{!}\marg{\glsoptval{format}{\encap{glsignore}}}
\end{codebox}
means that \code{\gls{gls}!\margm{label}} will be equivalent to :
\begin{compactcodebox}
\gls{gls}\oarg{\glsoptval{format}{\encap{glsignore}}}\margm{label}
\end{compactcodebox}

It's also possible to redefine the star and plus modifiers:
\cmddef{GlsXtrSetStarModifier}
This sets the options to use for the star modifier.
\cmddef{GlsXtrSetPlusModifier}
This sets the options to use for the plus modifier.
For example, the following:
\begin{codebox}
\gls{GlsXtrSetPlusModifier}\marg{\glsopt{noindex}}
\end{codebox}
means that the plus modifier will now suppress \idx{indexing}
instead of switching on the hyperlink.

The \idx{glslike} and \idx{glstextlike} commands have a complicated
internal structure, which can be viewed as a series of layers. The
outermost common layer is:
\begin{compactcodebox}
\comment{save settings}
\comment{initialise options, see \sectionref{sec:glsopts}}
\gls{glslinkwrcontent}\margm{index \& fmt content}
\comment{restore settings}
\comment{\idx{postlinkhook}, see \sectionref{sec:postlinkhook}}
\end{compactcodebox}
The \meta{index \& fmt content} consists of the \idx{indexing}
(see \sectionref{sec:wrglossary}) and the (possibly
hyperlinked) formatted text, see \sectionref{sec:entryfmtmods}. The
\meta{index \& fmt content} code is encapsulated with:
\cmddef{glslinkwrcontent}
In v1.48, this was added to scope the \idx{linktext} and
\idx{indexing} code, which helped to prevent unwanted spacing caused
by the \idx{whatsit} and also helped to 
prevent some setting leakage, in the event of nesting (see
\sectionref{sec:nested}), but this caused spacing issues when used in
math mode, so from v1.49 this command now simply does its argument.
The \idx{whatsit} is now scoped with \gls{glsencapwrcontent} instead.

The \gls{glsxtrp} command, designed for nested use, deals
with the problem by suppressing the \idx{postlinkhook} and adding an
outer group. For example,
\code{\gls{glsxtrp}\marg{short}\marg{html}} behaves like:
\begin{compactcodebox}
\marg{\gls{let}\gls{glspostlinkhook}\gls{relax}
 \gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{html}}
\end{compactcodebox}
Note that the code to suppress the \idx{postlinkhook} has been moved
to \gls{glsxtrpInit}, so it is now possible to allow the
\idx{postlinkhook} but it won't be able to lookahead beyond the
added outer group.

Depending on the settings (the \glsopt{wrgloss} option or the
\catattr{wrgloss} attribute), the indexing may come before the text:
\begin{compactcodebox}
\gls{glslinkwrcontent}\marg{\meta{index}\meta{fmt content}}
\end{compactcodebox}
or after the text:
\begin{compactcodebox}
\gls{glslinkwrcontent}\marg{\meta{fmt content}\meta{index}}
\end{compactcodebox}
or may be suppressed with \glsopt{noindex}:
\begin{compactcodebox}
\gls{glslinkwrcontent}\marg{\meta{fmt content}}
\end{compactcodebox}
The \meta{fmt content} part is described in
\sectionref{sec:entryfmtmods}. The \meta{index} part is the actual
\idx{indexing} (see \sectionref{sec:wrglossary}) but also increments
the index count, if applicable. Both the associated \idx{whatsit} and
increment are encapsulated with \gls{glsencapwrcontent}.

\begin{important}
Avoid using \gls{glstext}, \gls{glsplural}, \gls{glsfirst} and
\gls{glsfirstplural} (and their case-changing variants) with
entries that have been defined with \gls{newabbreviation}. Some of the abbreviation
styles are too complicated to work with those commands. Instead, use
commands like \gls{glsxtrshort}, \gls{glsxtrfull} or use \gls{gls}
with the \glsopt{prereset} or \glsopt{preunset} options.
\end{important}

The base \sty{glossaries} package provides a way to adjust the
formatting of the \idx{linktext} for the \idx{glslike} commands
according to the glossary type with \gls{defglsentryfmt}. The
\sty{glossaries-extra} package changes the default entry formatting
(\sectionref{sec:entryfmt}) and provides additional ways of
modifying the displayed content (\sectionref{sec:entryfmtmods}).

The heading commands (described in \sectionref{sec:headtitle}) are
designed to prevent indexing or changes to the \idx{firstuseflag} if
they appear in the table of contents (or list of figures, etc) or if
they appear in the page header.

Although the base \sty{glossaries} package warns against nested
\idx{linktext}, the \sty{glossaries-extra} package provides
\gls{glsxtrp} which can be used instead of \gls{gls} in field values
to overcome some of the associated problems. 
See \sectionref{sec:nested} for further details.

If you need to simply access a \idx{field} value without any formatting,
see \sectionref{sec:getfields}. (See \sectionref{sec:setfields} to
set \idx{field} values.) If you want to encapsulate the value with
the appropriate accessibility tag, see \sectionref{sec:glsaccessfield}.

Commands such as \gls{glsadd} (see \sectionref{sec:wrglossary}) and
\gls{glssee} (see \sectionref{sec:xr}) are designed to only index (to
ensure the entry appears in the glossary) without producing any text or changing
the \idx{firstuseflag}.

The \idx{glslike}, \idx{glstextlike} and \gls{glsadd} commands all have an initial
optional argument that can be used to override the default actions.
Some options are only applicable for particular subsets of
referencing commands. For example, \glsopt{noindex} is pointless for
\gls{glsadd} since the sole purpose of that command is to index.
Whereas \glsopt{types} is only available with \gls{glsaddall}.

\section{Options}
\label{sec:glsopts}

\glsstartrange{idx.glsopt}%
Some options are provided by the base \sty{glossaries} package, but
there are some additional options provided by
\sty{glossaries-extra}, which are listed in \sectionref{sec:xtrglsopts}.
Below, \meta{option-list} indicates the options that are passed in
the optional argument of the calling command (such as \gls{gls}).

The order that the options are applied is:
\begin{enumerate}
\item \glsopt{prereset}, \glsopt{preunset} and \glsopt{postunset} options are
initialised by \gls{glsinitreunsets};
\item \glsopt{hyper} is initialised by \gls{glsxtrchecknohyperfirst}
(\gls{glsfirst}-like only);
\item \glsopt{wrgloss} option is initialised by \gls{glsxtrinitwrgloss}
(not implemented by \gls{glsadd} or \gls{glsxtrfmt});
\item \glsopt{hyperoutside} option is initialised by 
\gls{glsxtrinithyperoutside} (not implemented by \gls{glsadd}
or \gls{glsxtrfmt});
\item initialise \glsoptval{noindex}{false} (not \gls{glsadd});
\item options that have been identified with \gls{GlsXtrSetDefaultGlsOpts},
\gls{GlsXtrAppToDefaultGlsOpts} or \gls{GlsXtrPreToDefaultGlsOpts} (not
implemented by \gls{glsadd});
\item (\gls{glsxtrfmt} only) options provided in
\gls{GlsXtrFmtDefaultOptions};
\item (\idx{glslike} only) the \opt{hyperfirst} package option, 
\catattr{nohyperfirst} attribute and \catattr{nohypernext}
attributes are checked to determine if the \glsopt{hyper} option
should be switched off (tests followed by \gls{glslinkcheckfirsthyperhook});
\item \gls{glslinkpresetkeys} (not implemented by \gls{glsadd}
or \gls{glsxtrfmt});
\item (\gls{glsadd} only) \gls{glsaddpresetkeys};
\item \meta{option-list};
\item \gls{glslinkpostsetkeys} (provided by the base \sty{glossaries}
package, not implemented by \gls{glsadd} or \gls{glsxtrfmt});
\item (\gls{glsadd} only) \gls{glsaddpostsetkeys}.
\end{enumerate}

\subsection{Setting Up Defaults}
\label{sec:defaultglsopts}

You can (locally) set your preferred default options for the \idx{glslike} and
\idx{glstextlike} commands using:
\cmddef{GlsXtrSetDefaultGlsOpts}
The \meta{options} may be any options that you can pass to those commands.
These options also apply to \gls{glsxtrfmt} but not to \gls{glsadd}.

\begin{information}
Note that multiple instances of \gls{GlsXtrSetDefaultGlsOpts} will override each
other.
\end{information}

If you want to add to the existing options, you can use one of the
following commands (both may be scoped).

\cmddef{GlsXtrAppToDefaultGlsOpts}
Appends \meta{options} to the list of default options.

\cmddef{GlsXtrPreToDefaultGlsOpts}
Prepends \meta{options} to the list of default options.

For example, to prevent indexing in the front matter and back matter but
not in the main matter:
\begin{codebox}
\gls+{frontmatter}
\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsopt{noindex}}
\ldots
\gls+{mainmatter}
\gls{GlsXtrSetDefaultGlsOpts}\marg{}
\ldots
\gls+{backmatter}
\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsopt{noindex}}
\end{codebox}
Note that \glsoptval{noindex}{false} is now set before the options
given in \gls{GlsXtrSetDefaultGlsOpts} to ensure that the setting is
correctly initialised, so as from v1.49 you can simply set an empty
options list to reset the default. Prior to v1.49, it was necessary
to ensure that the \glsopt{noindex} key was always present in the
options list to avoid instability. So for pre v1.49, the line after
\gls{mainmatter} in the above would need to be:
\begin{codebox}
\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsoptval{noindex}{false}}
\end{codebox}

The default \idx{locationencap} is \encap{glsnumberformat} but can
be changed (locally) with:
\cmddef{GlsXtrSetDefaultNumberFormat}
This can be overridden by explicitly setting the \glsopt{format}
key.

The default options for \gls{glsxtrfmt} only are given by:
\cmddef{GlsXtrFmtDefaultOptions}
This command should simply expand to the required list of options. These options
are set after any options given in \gls{GlsXtrSetDefaultGlsOpts} and before
\meta{option-list}.

\cmddef{glslinkpresetkeys}
This hook is performed after any settings provided in \gls{GlsXtrSetDefaultGlsOpts}
but before \meta{option-list}.
This hook also applies to \gls{glsxtrfmt} but not to \gls{glsadd}.

Note that \gls{glslinkpostsetkeys}, provided by the
base \sty{glossaries} package, is performed after \meta{option-list} is
processed.
 
\cmddef{glsaddpresetkeys}
This hook, which is only used by \gls{glsadd}, is performed before
\meta{option-list}.

\cmddef{glsaddpostsetkeys}
This hook, which is only used by \gls{glsadd}, is performed after
\meta{option-list}.

\cmddef{glsinitreunsets}
This hook initialises the pre unset/reset options to:
\glsoptval{prereset}{none} and \glsoptval{preunset}{none}. It also
initialises the \glsopt{postunset} setting to perform the post-unset
(where applicable) but it will retain the current local/global setting.

This hook will also implement the local repeat unset feature of
\gls{GlsXtrUnsetBufferEnableRepeatLocal}.

\cmddef{glsxtrchecknohyperfirst}
This hook is only used by \gls{glsfirst}, \gls{glsfirstplural} and
their case-changing variants. The hook will implement
\glsoptval{hyper}{false} if the \catattr{nohyperfirst} attribute is
set to \code{true}.  

\cmddef{glsxtrinitwrgloss}
This hook initialises the default setting of the \glsopt{wrgloss} option. If the
\catattr{wrgloss} attribute is set to \code{after} then this implements
\glsoptval{wrgloss}{after} otherwise it implements \glsoptval{wrgloss}{before}.
This setting can subsequently be overridden by \gls{GlsXtrSetDefaultGlsOpts},
\gls{glslinkpresetkeys}, the \meta{option-list} argument or
\gls{glslinkpostsetkeys}.
This hook also applies to \gls{glsxtrfmt} but not to \gls{glsadd}.

If you prefer to have the default to place the \idx{indexing} after the
\idx{linktext}, you can redefine this hook as follows:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrinitwrgloss}}\marg{\comment{}
 \gls{glsifattribute}\marg{\gls{glslabel}}\marg{\catattr{wrgloss}}\marg{before}\comment{}
 \marg{\comment{}
   \gls+{glsxtrinitwrglossbeforetrue}
 }\comment{}
 \marg{\comment{}
   \gls+{glsxtrinitwrglossbeforefalse}
 }\comment{}
}
\end{codebox}

\cmddef{glsxtrinithyperoutside}
This hook initialises the default setting of the \glsopt{hyperoutside} option.
If the \catattr{hyperoutside} attribute is set to \code{false} then this
implements \glsoptval{hyperoutside}{false} otherwise it implements
\glsoptval{hyperoutside}{true}.
This setting can subsequently be overridden by \gls{GlsXtrSetDefaultGlsOpts},
\gls{glslinkpresetkeys}, the \meta{option-list} argument or
\gls{glslinkpostsetkeys}.
This hook also applies to \gls{glsxtrfmt} but not to \gls{glsadd}.

Within any of the hooks that are used by the \idx{glslike}, 
\idx{glstextlike} or \gls{glsxtrfmt} commands, you can set options 
using:
\cmddef{setupglslink}

Within any of the hooks that are used by \idx{glsadd}, 
you can set options with:
\cmddef{setupglsadd}

\subsection{Additional Options}
\label{sec:xtrglsopts}

Options for the \idx{glslike} and \idx{glstextlike} commands that are
provided by the base \sty{glossaries} package also apply to new commands like
\gls{glsxtrfmt} and \gls{glsfmttext}. In addition, the options below are
provided by \sty{glossaries-extra}. Note that some options, such as
\glsopt{postunset}, only apply to the \idx{glslike} commands.
Options that relate to the hyperlink, formatting, \idx{firstuseflag}
or whether\slash where (\glsopt{noindex}\slash\glsopt{wrgloss}) to
perform \idx{indexing} aren't available for \gls{glsadd}.

\optiondef{glsopt.hyperoutside}
This boolean option determines whether the hyperlink should be inside or outside
of \gls{glstextformat} (see \sectionref{sec:glstextformat}). 
If true, the \idx{linktext} is encapsulated as:
\begin{codebox}
\meta{hyperlink-cs}\margm{target}\marg{\gls{glstextformat}\margm{text}}
\end{codebox}
otherwise it's encapsulated as:
\begin{codebox}
\gls{glstextformat}\marg{\meta{hyperlink-cs}\margm{target}\margm{text}}
\end{codebox}
where \meta{hyperlink-cs} is the command that generates the
hyperlink (if enabled).

\optiondef{glsopt.textformat}
The value of this key should be the name of a control sequence (without the
leading backslash). If this option is set, the given control 
sequence will be used instead of \gls{glstextformat} to encapsulate
the \idx{linktext}. Note that this control sequence should take a single 
argument (the \idx{linktext}). See \sectionref{sec:glstextformat}
for further details.

\begin{information}
This option will override the \catattr{textformat} attribute.
\end{information}

\optiondef{glsopt.innertextformat}
The value of this key should be the name of a control sequence
(without the leading backslash). The command
\gls{glsxtrgenentrytextfmt} (which shouldn't be redefined) is
assigned to this control sequence at the start of the \idx{glslike}
and \idx{glstextlike} commands. This command is used within the
predefined abbreviation styles and within \gls{glsgenentryfmt} to
encapsulate the entry field values.

\begin{information}
Custom styles that don't use \gls{glsxtrgenentrytextfmt} won't
support this key. See \sectionref{sec:innertextformat} for further
details.
\end{information}

Some formatting commands require direct access to the actual text or
else the content has to be placed inside a box (which inhibits
line-breaking). These commands won't work with \glsopt{textformat}
as the text is usually too deeply embedded. This option provides a
way of using those problematic commands, however there's still no
guarantee that they will work (for example, in the case of custom
styles or where the field value itself contains commands).

\optiondef{glsopt.postunset}
This option only applies to the \idx{glslike} commands and indicates
whether or not to unset the \idx{firstuseflag} after the
\idx{linktext}. It may take one of three values: \optfmt{global}
(behaves like \glsoptval{local}{false}), \optfmt{local} (behaves
like \glsoptval{local}{true}) or \optfmt{none} (doesn't unset the
\idx{firstuseflag} after the \idx{firstuse}). See
\sectionref{sec:glsunset}.

\optiondef{glsopt.prereset}
This option may take one of three values: \optfmt{none} (no reset),
\optfmt{local} or \optfmt{global}. This option (if not \optfmt{none})
will reset the \idx{firstuseflag} before the \idx{linktext} and
additionally change \gls{glsxtrifwasfirstuse} so that it indicates
that this was the \idx{firstuse} of the entry. See
\sectionref{sec:glsunset}.

Note that this is different from using \gls{glslocalreset} or
\gls{glsreset} before the \idx{glstextlike} commands. Normally
\gls{glstext} and \gls{glsplural} will define
\gls{glsxtrifwasfirstuse} so that it indicates that this was not the
\idx{firstuse} of the entry (regardless of whether or not the entry
has actually been used).

For example:
\begin{codebox}
\gls{glsdefpostlink}
 \marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
  \gloskeyval{first}{sample first use},\gloskeyval{description}{an example}}
\cbeg{document}
Text field: \gls{glstext}\marg{sample}.
\codepar
First use: \gls{gls}\marg{sample}.  Next use: \gls{gls}\marg{sample}.
\codepar
Force reset: \gls{gls}\oarg{\glsopt{prereset}}\marg{sample}. 
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
\codepar
Force reset: \gls{glstext}\oarg{\glsopt{prereset}}\marg{sample}. 
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Illustrating the \optfmt{prereset} option},
 label={ex:prereset},
 description={Example document illustrating the use of the prereset option}]
{\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J
\gls{newglossaryentry}\marg{sample}\marg{name={sample},^^J
 first=\marg{sample first use},^^J
 description=\marg{an example}}
}{%
Text field: \gls{glstext}\marg{sample}.
\codepar
First use: \gls{gls}\marg{sample}.  Next use: \gls{gls}\marg{sample}.
\codepar
Force reset: \gls{gls}\oarg{prereset}\marg{sample}. 
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
\codepar
Force reset: \gls{glstext}\oarg{prereset}\marg{sample}. 
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
}
\end{resultbox}
Note that \gls{gls} unsets the \idx{firstuseflag} (unless
\glsoptval{postunset}{none}), so the sample entry is marked as used
afterwards, but \gls{glstext} doesn't alter the \idx{firstuseflag},
after the \idx{linktext} so the sample entry is still marked as unused afterwards.

\optiondef{glsopt.preunset}
This option may take one of three values: \optfmt{none} (no unset),
\optfmt{local} or \optfmt{global}. This option (if not \optfmt{none})
will unset the \idx{firstuseflag} before the \idx{linktext} and
additionally change \gls{glsxtrifwasfirstuse} so that it indicates
that this wasn't the \idx{firstuse} of the entry. See
\sectionref{sec:glsunset}.

\begin{information}
The \glsopt{preunset} key is always performed after the
\glsopt{prereset} key.
\end{information}

Note the effect of using a global reset but a local unset in the
example below. Both options are performed, but the unset locally
overrides the global reset.
\begin{codebox}
\gls{glsdefpostlink}
 \marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
  \gloskeyval{first}{sample first use},\gloskeyval{description}{an example}}
\cbeg{document}
\gls{gls}\marg{sample}. Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
\codepar
\marg{\gls{glsfirst}\oarg{\glsoptval{preunset}{local},\glsoptval{prereset}{global}}\marg{sample}.
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
}
\codepar
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
\codepar
\marg{\gls{gls}\oarg{\glsoptval{preunset}{local},\glsoptval{prereset}{global}}\marg{sample}.
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
}
\codepar
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Combining \optfmt{prereset} and \optfmt{preunset}},
 label={ex:preresetpreunset},
 description={Example document illustrating the use of the prereset
 and preunset options}]
{\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J
\gls{newglossaryentry}\marg{sample}\marg{name=\marg{sample},^^J
 first=\marg{sample first use},^^J
 description=\marg{an example}}
}{%
\gls{gls}\marg{sample}.  Used?^^J%
\gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
\codepar
\marg{\gls{glsfirst}\oarg{preunset=local,prereset=global}\marg{sample}.^^J%
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
}
\codepar
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
\codepar
\marg{\gls{gls}\oarg{preunset=local,prereset=global}\marg{sample}.^^J%
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
}
\codepar
Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}.
}
\end{resultbox}
Remember that \gls{gls} globally unsets the \idx{firstuseflag}
(unless changed with \glsopt{postunset}),
which counteracts \glsoptval{prereset}{global}.

\optiondef{glsopt.noindex}
This is a boolean option that determines whether or not to suppress
the normal \idx{indexing}. For example, to prevent
any \locations\ in the front matter or back matter appearing in
the glossary:
\begin{codebox}
\gls{frontmatter}
\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsopt{noindex}}
\ldots
\gls{mainmatter}
\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsoptval{noindex}{false}}
\ldots
\gls{backmatter}
\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsopt{noindex}}
\end{codebox}
Note that if you are using auto-indexing (see
\sectionref{sec:autoindex}), \glsoptval{noindex}{false} will also
suppress the auto-indexing.

If you are using \app{bib2gls}, you may want to consider instead using
\glsoptval{format}{glsignore} to create an ignored \location\
that ensures the entry is selected without adding a \location\
to the \idx{locationlist}. (Don't use this method for the other
\idx{indexing} methods as you'll end up with invisible
\locations\ with spurious commas in your \idxpl{locationlist}.)

\optiondef{glsopt.wrgloss}
This option may take one of two values, \optfmt{before} or \optfmt{after},
which indicate whether the \idx{indexing} should occur before or
after the \idx{linktext}. The \idx{indexing} creates a \idx{whatsit}
that can interfere with spacing or cause other problems. The other thing to
consider is where the \idx{linktext} is long, such as a phrase or
full form of an abbreviation, that may be split by a page break.
You will need to decide if you want the \idx{indexing} before the
\idx{linktext}, so that the \location\ is at the end of the page
where the text starts, or if you want the \idx{indexing} after the
\idx{linktext}, so that the \location\ is at the start of the next
page where the text ends.

This option corresponds to a conditional:
\cmddef*{ifglsxtrinitwrglossbefore}
The hook \gls{glsxtrinitwrgloss} sets this conditional according to
whether or not the \catattr{wrgloss} attribute has been set to
\code{after}:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrinitwrgloss}}\marg{\comment{}
 \gls{glsifattribute}\marg{\gls{glslabel}}\marg{wrgloss}\marg{after}\comment{}
 \marg{\gls{glsxtrinitwrglossbeforefalse}}\comment{}
 \marg{\gls{glsxtrinitwrglossbeforetrue}}\comment{}
}
\end{codebox}

\optiondef{glsopt.thevalue}
Sets the \idx{entrylocation} to the given value instead of obtaining
it from the \idx{locationcounter}. If you are using \sty{hyperref} you may also
need to set the location's hypertarget with \glsopt{theHvalue}.

\begin{information}
This option is primarily intended for use with \app{bib2gls} to supply
\locations\ that don't have an associated counter within the document, such
as an external location. If you want to automatically add locations
from a supplemental document to an entry's \idx{locationlist}, you
can use the \resourceopt{supplemental-locations} resource option. See
the \app{bib2gls} user manual for further details.
\end{information}

For example, to \idxc{indexing}{index} a \location\ in a supplementary document:
\begin{codebox}
\gls{glsadd}\oarg{\glsoptval{thevalue}{\marg{Suppl.\cmd{ }2.45}}}\marg{sample}
\end{codebox}
This will add \qt{Suppl.\ 2.45} to the \idx{locationlist}
for the \qt{sample} entry.

\begin{important}
Note that the value must conform to the \idx{indexingapp}['s] location syntax.
For \app+{makeindex}, this is limited to \code{Roman}, \code{roman},
\code{arabic}, \code{alph} and \code{Alph}. With \app+{xindy}, the location
syntax must be defined in the \app{xindy} module (standard location syntaxes are
supplied by default).  There's no restriction on the location syntax for
\app{bib2gls}, although if it can't deduce a numerical value it won't be able to
form a range.
\end{important}

If you want a hyperlink to an external file, you can use:
\cmddef*{glsxtrsupphypernumber}
as the formatting command for the \idx{locationencap}. For example:
\begin{codebox}
\gls{glsadd}\oarg{\glsoptval{thevalue}{S.2},\glsoptval{format}{glsxtrsupphypernumber}}\marg{sample}
\end{codebox}
The path to the external file needs to be set in the
\catattr{externallocation} category attribute.

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

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

This method can only be used where there is one external source
for the designated category (identified by the
\catattr{externallocation} attribute). For multiple sources, you need to use
\app{bib2gls} v1.7+, which is the better method in general as it can
automatically fetch the relevant locations from the \ext{aux}
files of the designated external documents without the need to
explicitly use \gls{glsadd}.

\optiondef{glsopt.theHvalue}
Sets the hypertarget corresponding to the \location, which will be
used if the \glsopt{format} supports hyperlinks. This is analogous
to \sty{hyperref}['s] \theHcountername\ that provides the
hypertarget for a reference to \thecountername.

\begin{information}
This option is primarily intended for use with the \glsopt{thevalue} option.
\end{information}

Unless you are using \opteqvalref{record}{nameref}, you must ensure
that it's possible to form \meta{the-H-value} from
\meta{h-prefix}\meta{thevalue} for some \meta{h-prefix} (where
\meta{thevalue} is given by \glsopt{thevalue} or the value of the
\location\ counter). This restriction is due to the limitations
imposed by \app+{makeindex} and \app+{xindy}.

\optiondef{glsopt.prefix}
This option locally redefines \gls{glolinkprefix} to \meta{link-prefix}.
If you are using \gls{printunsrtglossary} to redisplay a list (possibly in a
different order) then you will need some way of changing the entry targets to
avoid duplicate hyperlink targets. One way of achieving this is to redefine
\gls{glolinkprefix} for the subsequent lists. You will then need to use the
\glsopt{prefix} option in commands like \gls{gls} to ensure that the hyperlink
for the \idx{linktext} points to the desired list.

\begin{information}
This option is intended for use with the \idx{unsrtfam} and
\gls{glsxtrcopytoglossary} (which is used by \app{bib2gls}).
The other \idx{indexing} methods don't support repeated lists. 
\end{information}
\glsendrange{idx.glsopt}%

\section{Case Changing}
\label{sec:casechange}

Case-changing commands, such as \gls{Gls} and \gls{GLS}, perform the
conversion using commands provided by \sty{mfirstuc}. The underlying
commands provided by \sty{mfirstuc} were redesigned in v2.08 to use
the newer, better case-changing commands available with the \LaTeX3
kernel. The base \sty{glossaries} package v4.50 and \sty{glossaries-extra}
v1.49 were developed concurrently with \sty{mfirstuc} v2.08 to take
advantage of the new features. Version 1.49 of
\sty{glossaries-extra} was also developed concurrently with
\app{bib2gls} v3.0 which, in turn, was developed alongside version
0.9.2.7b of the \TeX\ parser library.

It's not possible to upload all these new versions at the same time,
so it will be necessary to stagger their deployment. The new
case-changing features will work best when all these new versions
are installed. In the interim, a reduced feature set will be used.

\subsection{Sentence Case Commands}
\label{sec:firstuc}

Both the base \sty{glossaries} package and the
\sty{glossaries-extra} package provide \idx{sentencecase} commands,
which convert the first letter to \idx{uppercase}. These are
provided for situations where an entry is referenced at the start of
a sentence. Sentence-casing is also implemented when the attributes
\catattr{glossname} or \catattr{glossdesc} are set to \code{firstuc}.

The case conversion is performed using:
\cmddef{glssentencecase}
The default definition uses \gls{makefirstuc}, which is provided by
the \sty{mfirstuc} package. This was originally part of the base
\sty{glossaries} package, but was split into a separately
distributed package in 2015. Back then, there was no expandable
sentence-case command. There was also a problem with referencing
entries where \idx{linktext} was encapsulated with a text-block
command (which occurs, in particular, with acronym and abbreviation styles). 
The first letter of the text-block command's argument needed to be
obtained, which resulted in some trickery that proved problematic
with \idx{utf8}.

The \LaTeX3 kernel now provides a suitable expandable command that
works with \idx{utf8}, and \sty{mfirstuc} v2.08+ provides
\gls{MFUsentencecase} that directly interfaces with it. If an older
version of \sty{mfirstuc} is installed, \sty{glossaries} v4.50+ and
\sty{glossaries-extra} v1.49+ will provide \gls{MFUsentencecase}. You can use this in
expandable contents. For example:
\begin{codebox}
\cmd{section}\marg{\gls{MFUsentencecase}\marg{\gls{glsentrytext}\marg{label}}}
\end{codebox}
However, in the above example, it's simpler to do:
\begin{codebox}
\cmd{section}\marg{\gls{Glsfmttext}\marg{label}}
\end{codebox}
If \sty{hyperref} has been loaded, \code{\gls{Glsfmttext}\marg{label}} 
will now expand to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentrytext}\marg{label}}
\end{compactcodebox}
in the PDF bookmark.

Internally, \gls{makefirstuc} now uses \gls{MFUsentencecase} to
perform the case conversion, but it still parses its argument to
determine if it starts with \code{\meta{cs}\margm{text}}. This means
that with \sty{mfirstuc} v2.08+, you now don't have to worry about
\idx{utf8} characters occurring at the start of the text.

For example, with \sty{mfirstuc} v2.07 you would need to do
something like:
\begin{codebox}
\gls{newglossaryentry}\marg{elite}\marg{\gloskeyval{name}{\marg{\'e}lite},
 \gloskeyval{description}{...}}
\end{codebox}
in order for \code{\gls{Gls}\marg{elite}} to work. Whereas with 
\sty{mfirstuc} v2.08, you can now simply do:
\begin{codebox}
\gls{newglossaryentry}\marg{elite}\marg{\gloskeyval{name}{\'elite},
 \gloskeyval{description}{...}}
\end{codebox}
(As from \sty{glossaries} v4.47, it should be possible to use
\idx{utf8} characters in the label as well.)

Whilst you can redefine \gls{glssentencecase} to use
\gls{MFUsentencecase} directly (without using \gls{makefirstuc} as
an intermediary), this may result in content being expanded that
wouldn't have been expanded previously. In particularly, if
\meta{cs} isn't robust and expands to content that includes labels
then the case-change can fail. You also won't be able to take
advantage of the blockers and mappings that are only recognised as
such by \gls{makefirstuc}. If you use \gls{MFUsentencecase} instead,
blockers and mappings will be treated as exclusions, which are
likely to result in unwanted side-effects.

Both \gls{makefirstuc} and \gls{MFUsentencecase} recognise
exclusions. These are text-block commands which take a single
mandatory argument that needs to be skipped. For example, in the
following \code{\gls{glsadd}\marg{example}} needs to be skipped:
\begin{codebox}
\gls{MFUsentencecase}\marg{\gls{glsadd}\marg{example}some text}
\end{codebox}
Exclusions are identified with \gls{MFUexcl}. If you have an older
version of \sty{mfirstuc}, this won't be defined, so
\sty{glossaries} v4.50+ and \sty{glossaries-extra} v1.49+ provide:
\cmddef{glsmfuexcl}
This will use \gls{MFUexcl} with \sty{mfirstuc} v2.08+.
With older versions, a definition will be provided that works with
\gls{MFUsentencecase}, but exclusions won't be recognised by
\gls{makefirstuc}.

As from \sty{glossaries} v4.50, \gls{glsadd} will
be identified as an exclusion (via \gls{glsmfuexcl}), but the
optional argument will cause a problem if present. See the
\sty{mfirstuc} v2.08+ manual for a workaround. Note that commands
such as \gls{glsaddall} and \gls{glsaddeach} aren't identified as
exclusions as they aren't expected to occur in text that may require
a case-change.

With glossary entry references, there are commands
that take a label as the argument, which shouldn't have any
case-changed applied, but also shouldn't be skipped. For example:
\begin{codebox}
\gls{makefirstuc}\marg{\gls{GLS}\marg{example} something}
\end{codebox}
In this situation, there shouldn't be any case-change as \gls{GLS}
already implements a case-change. This type of command is referred
to as a blocker in the \sty{mfirstuc} manual, as it indicates a
command that should prevent any case-change if it's encountered at
the start of the text. Blockers are identified with \gls{MFUblocker}. 
If you have an older version of \sty{mfirstuc}, this won't be
defined, so \sty{glossaries} v4.50+ and \sty{glossaries-extra}
v1.49+ provide:
\cmddef{glsmfublocker}
This will use \gls{MFUblocker} with \sty{mfirstuc} v2.08+.
With older versions, it will simply use \gls{glsmfuexcl} which will
instead identify the command as an exclusion and won't be recognised
by \gls{makefirstuc}. See the \sty{mfirstuc} v2.08+ manual for
further information about blockers.

As from \sty{glossaries} v4.50+, commands like \gls{GLS} will be
identified as blockers using \gls{glsmfublocker}, and
\sty{glossaries-extra} now identifies similar commands, such as
\gls{rGLS} as blockers.

Finally, there are mappings. These are commands that should be
substituted with another command, which is expected to perform the
case-change. For example:
\begin{codebox}
\gls{makefirstuc}\marg{\gls{gls}\marg{example} something}
\end{codebox}
This shouldn't skip or block \gls{gls} but instead should convert
the text to:
\begin{codebox}
\gls{Gls}\marg{example} something
\end{codebox}
This is implemented by adding a mapping from \gls{gls} to \gls{Gls}.
Mappings are added using \gls{MFUaddmap}.
If you have an older version of \sty{mfirstuc}, this won't be
defined, so \sty{glossaries} v4.50+ and \sty{glossaries-extra}
v1.49+ provide:
\cmddef{glsmfuaddmap}
This will use \gls{MFUaddmap} with \sty{mfirstuc} v2.08+.
With older versions, it will simply use \gls{glsmfuexcl} which will
instead identify the command as an exclusion and won't be recognised
by \gls{makefirstuc}. See the \sty{mfirstuc} v2.08+ manual for
further information about mappings.

As from \sty{glossaries} v4.50+, commands like \gls{gls} will be
mapped to the appropriate \idx{sentencecase} command using
\gls{glsmfuaddmap}, and \sty{glossaries-extra} now identifies
similar mappings, such as \gls{rgls} mapped to \gls{rGls}.

In order to integrate the full set of features provided by
\sty{mfirstuc} v2.08+, you will need both \sty{glossaries} v4.50+
and \sty{glossaries-extra} v1.49+.

\subsection{Lower Case}
\label{sec:lowercase}

\cmddef{glslowercase}
This is defined by \sty{glossaries} v4.50+ to use the \LaTeX3 command
to convert to \idx+{lowercase}. If an older version of
\sty{glossaries} is present, then this command will be provided by
\sty{glossaries-extra} but it will be defined to use 
\gls{MakeTextLowercase} instead. This command is primarily provided for use
with \idx{smallcaps} styles to convert an abbreviation to
\idx{lowercase}, but isn't actually used anywhere by default.

\subsection{Upper Case}
\label{sec:uppercase}

\cmddef{glsuppercase}
This is defined by \sty{glossaries} v4.50+ to use the \LaTeX3 command
to convert to \idx+{uppercase} (\idx+{allcaps}). If an older version of
\sty{glossaries} is present, then this command will be provided by
\sty{glossaries-extra} but it will be defined to just use 
\gls{mfirstucMakeUppercase}, which is provided by \sty{mfirstuc}.
This command is used by \idx{allcaps} commands such as
\gls{GLSxtrusefield}.

\subsection{Title Case}
\label{sec:titlecase}

\cmddef{glscapitalisewords}
This is defined by \sty{glossaries} v4.48 to use \gls{capitalisewords}
to convert to \idx+{titlecase}. If you experience any errors with
\idx{titlecase} commands, such as \gls{glsentrytitlecase}, or
attributes such as \catattr{glossdesc} then try redefining
this command to use \code{\gls{capitalisefmtwords}*} instead. See the
\sty{mfirstuc} manual for further details.

\cmddef{glspdfsentencecase}
This is provided for use in the PDF part of \gls{texorpdfstring}, and is used
by commands such as \gls{Glsfmtlong}. It ensures that the \meta{text} argument is
expanded (with \csfmt{exp\_args:Ne}) before applying \gls{MFUsentencecase}.

\section{Entries in Sectioning Titles, Headers, Captions and Contents}
\label{sec:headtitle}

The \sty{glossaries} user manual cautions against using commands
like \gls{gls} in chapter or section titles. The principle problems
are:
\begin{itemize}
\item if you have a table of contents, the \idx{firstuseflag}
will be unset in the contents rather than later in the document;

\item if you have the \idxpl{locationlist} displayed in the
\idx{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 \idx{uppercase}, the entry label
(in the argument of \gls{gls} etc) will be converted to \idx{uppercase}
and the entry won't be recognised;

\item if you use \sty{hyperref}, commands like \gls{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}
Similar problems can also occur with captions (except for the page
header and bookmark issues).

The \sty{glossaries-extra} package tries to resolve the header
problem by modifying \gls{markright}, \gls{markboth} and \gls{@starttoc}.
If this causes unwanted side-effects, you can restore their former
definitions using:
\cmddef{glsxtrRevertMarks}
This will revert \gls{markright}, \gls{markboth} and \gls{@starttoc}
back to the definitions in effect when \sty{glossaries-extra} was
loaded. Alternatively, you can use:
\cmddef{glsxtrRevertTocMarks}
This will only revert \gls{@starttoc}.

If you use \gls{glsxtrRevertMarks} or \gls{glsxtrRevertTocMarks},
you will need to employ the simplistic approach, described in
\sectionref{sec:simplisticapproach}, which is the method recommended
by the \sty{glossaries} user manual. Otherwise, you can use the
commands described in \sectionref{sec:headingcommands}, which
provide a better solution.

\subsection{Simplistic Approach}
\label{sec:simplisticapproach}

To get around all these problems, the \sty{glossaries} user manual
recommends using the expandable non-hyperlink commands, such as
\gls{glsentrytext} (for regular entries) or \gls{glsentryshort}
(for abbreviations). This is the simplest solution, but doesn't
allow for special formatting that's applied to the entry through
commands like \gls{glstext} or \gls{glsxtrshort}.

\mExampleref{ex:simpleseccmds} uses this approach:
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\codepar
\gls{glsdefpostlink}
 \marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\codepar
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{an example}}
\gls{newglossaryentry}\marg{alpha}\marg{
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},
 \gloskeyval{description}{alpha}}
\codepar
\cbeg{document}
\gls{tableofcontents}
\cmd{section}\marg{\gls{texorpdfstring}\marg{\gls{Glsentrytext}\marg{sample} 
 and \gls{glsentrytext}\marg{alpha}}\marg{Sample and alpha}}
\codepar
First use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.
\codepar
Next use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.
\codepar
\gls{printunsrtglossary}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,pdflatex,pdfcrop},
  label={ex:simpleseccmds},
  title={References in section headings (simplistic approach)},
  description={Example document that uses a simplistic approach to
    referencing entries in section titles}]
{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
 \cmd{usepackage}\marg{glossaries-extra}^^J%
 \codepar
 \gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J%
 \codepar
 \gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J%
 \gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},\gloskeyval{description}{alpha}}
}
{%
 \gls{tableofcontents}^^J%
 \cmd{section}\marg{\gls{texorpdfstring}\marg{\gls{Glsentrytext}\marg{sample}
and \gls{glsentrytext}\marg{alpha}}\marg{Sample and alpha}}^^J%
 \codepar
 First use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.^^J%
 \codepar
 Next use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.^^J%
 \codepar
 \gls{printunsrtglossary}
}
\end{resultbox}
This solves some problems: it avoids nested links in the table of
contents, the \idx{firstuseflag} isn't prematurely unset and the PDF
bookmarks has a reasonable substitution, but it still isn't a
complete solution as the above document will fail if the page style
is changed to \code{headings} and a page break is inserted before
the section (after \gls{tableofcontents}), which will lead to the error:
\begin{transcript}
Glossary entry `SAMPLE' has not been defined.
\end{transcript}
This is because the case-change applied to the header converts
the label \qt{sample} to \qt{SAMPLE}, which doesn't correspond to a
defined entry. (This can now be avoided with \sty{mfirstuc} v2.08+.)

If the case conversion is applied by, then the case-change can
be prevented by encapsulating the label with \gls{NoCaseChange}, but
this ends up quite complicated. This is actually what the commands
describe in \sectionref{sec:headingcommands} do when they are in a
heading. This allows for older versions of \sty{mfirstuc} that don't
recognise exclusions. See \sectionref{sec:casechange} for further
details.

\begin{information}
The \gls{NoCaseChange} command was originally provided by the
\sty{textcase} package to prevent \gls{MakeTextUppercase} from
applying a case-change. The functionality of the \sty{textcase}
package has now been absorbed into the \LaTeX\ kernel, which means
that as from 2022, \sty{textcase} is deprecated and
\gls{NoCaseChange} is defined by the kernel.
\end{information}

\subsection{New Commands Designed for Chapter/Section Headings or Captions}
\label{sec:headingcommands}

This section is irrelevant if you use \gls{glsxtrRevertMarks} to
restore the definitions of \gls{markright},
\gls{markboth} and \gls{@starttoc}. If you use
\gls{glsxtrRevertTocMarks}, then this section is only applicable to
\gls{markright} and \gls{markboth}.

The commands listed here are provided for use within captions or
section headings. They are designed to overcome some of the problems
illustrated in the previous section. Note that they
only have a single argument, the entry label. There are no optional
arguments. Below, \qt{header} refers to page header text added with
\gls{markright} or \gls{markboth}, and \qt{contents} refers to the
table of contents or any other \qt{list of} that uses
\gls{@starttoc}, such as the list of figures.

Each command \csfmt{glsfmt\meta{field}} (such as \gls{glsfmttext} or
\gls{glsfmtshort}) behaves like an analogous
\csfmt{gls\meta{field}} or \csfmt{glsxtr\meta{field}} command (such
as \gls{glstext} or \gls{glsxtrshort}) but with the options
\glsopt{noindex} and \glsoptval{hyper}{false} and no insert.
When they occur within a header, they are protected from having any
case-change applied (which will interfere with the entry label).
Since this means they won't appear in \idx{allcaps} in the header,
the \catattr{headuc} attribute may be set to use the
\idx{allcaps} \csfmt{GLS\meta{field}} or \csfmt{GLSxtr\meta{field}} instead (such
as \gls{GLStext} or \gls{GLSxtrshort}).

There is currently only support for the \gloskey{name},
\gloskey{text}, \gloskey{plural}, \gloskey{first},
\gloskey{firstplural}, \gloskey{short}, \gloskey{shortplural},
\gloskey{long}, and \gloskey{longplural} fields, and also limited
support for the full form of abbreviations. For other fields, you
will need to follow the recommendation of the \sty{glossaries}
manual (as discussed above in \sectionref{sec:simplisticapproach}).

\mExampleref{ex:glsfmttext} is a modification of the previous
example:
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\codepar
\gls{glsdefpostlink}
 \marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\codepar
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{an example}}
\gls{newglossaryentry}\marg{alpha}\marg{
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},
 \gloskeyval{description}{alpha}}
\codepar
\cbeg{document}
\gls{tableofcontents}
\cmd{section}\marg{\gls{Glsfmttext}\marg{sample} and \gls{glsfmttext}\marg{alpha}}
\codepar
First use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.
\codepar
Next use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.
\codepar
\gls{printunsrtglossary}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,pdflatex,pdfcrop},
  label={ex:glsfmttext},
  title={References in section headings using \cmd{glsfmttext}},
  description={Example document that references entries in section titles}]
{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
 \cmd{usepackage}\marg{glossaries-extra}^^J%
 \codepar
 \gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J%
 \codepar
 \gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J%
 \gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{\cmd{ensuremath}{\cmd{alpha}}},\gloskeyval{description}{alpha}}
}
{%
\gls{tableofcontents}^^J%
\cmd{section}\marg{\gls{Glsfmttext}\marg{sample} and \gls{glsfmttext}\marg{alpha}}
\codepar
First use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.
\codepar
Next use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.
\codepar
\gls{printunsrtglossary}
}
\end{resultbox}
Note that this still results in \qt{Token not allowed in a PDF
string} warnings from \sty{hyperref}. This is due to the maths shift and
\csfmt{alpha}, and is something that would also occur if the section
title explicitly contained \code{\$\cmd{alpha}\$}. If this is likely
to happen, the issue can be solved by placing 
\gls{texorpdfstring} within the field value. For example:
\begin{codebox}
\gls{glsnoexpandfields}
\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{description}{alpha},
 \gloskeyval{name}{\gls{texorpdfstring}\marg{\cmd{ensuremath}\marg{\cmd{alpha}}}\marg{alpha}}}
\end{codebox}
Note the need to prevent field expansion with \gls{glsnoexpandfields}, otherwise
\gls{texorpdfstring} will be prematurely expanded while the entry is being
defined.

The options \glsopt{noindex} and \glsoptval{hyper}{false} are
hard-coded when the commands listed below, such as
\gls{glsfmtshort}, occur in the header or contents, but within the
actual section title or caption in the document text, those options
are obtained from:
\cmddef{glsxtrtitleopts}
This simply expands to the option list. For example, you may
actually want a hyperlink and \idx{indexing} to occur in the 
document body, in which case redefine \gls{glsxtrtitleopts} to do
nothing. \mExampleref{ex:glslinkinsechead} demonstrates this:
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\codepar
\gls+{pagestyle}\marg{headings}
\gls{glssetcategoryattribute}\marg{general}\marg{headuc}\marg{true}
\gls{glsdefpostlink}
 \marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\codepar
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{an example}}
\cmd{renewcommand}\marg{\gls{glsxtrtitleopts}}\marg{}
\codepar
\cbeg{document}
\cmd{section}\marg{\gls{Glsfmttext}\marg{sample}}
First use: \gls{gls}\marg{sample}.
Next use: \gls{gls}\marg{sample}.
\gls{printunsrtglossary}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,pdfcrop},
  label={ex:glslinkinsechead},
  title={Reference with hyperlink in section headings},
  description={Example document that references an entry with a hyperlink in a section title}]
{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
 \cmd{usepackage}\marg{glossaries-extra}^^J%
 \codepar
 \cmd{pagestyle}\marg{headings}^^J%
 \gls{glssetcategoryattribute}\marg{general}\marg{headuc}\marg{true}^^J%
 \gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J%
 \codepar
 \gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J%
 \cmd{renewcommand}\marg{\gls{glsxtrtitleopts}}\marg{}
}
{%
\cmd{section}\marg{\gls{Glsfmttext}\marg{sample}}^^J%
First use: \gls{gls}\marg{sample}.
Next use: \gls{gls}\marg{sample}.
\codepar
\gls{printunsrtglossary}
}
\end{resultbox}


% short

\cmddef{glsfmtshort}
This normally behaves like \gls{glsxtrshort} but expands to just
\gls{glsentryshort} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtshort}
This normally behaves like \gls{Glsxtrshort} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentryshort}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing in the header or contents.

\cmddef{GLSfmtshort}
This normally behaves like \gls{GLSxtrshort} but expands to just
\gls{glsentryshort} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% prefix short

\cmddef{pglsfmtshort}
As \gls{glsfmtshort} but inserts the \gloskey{prefix} field
and separator, if the \gloskey{prefix} value is set and non-empty.
Provided for use with \sty{glossaries-prefix}.

\cmddef{Pglsfmtshort}
As \gls{pglsfmtshort} but \idx{sentencecase}. Note the initial
\qt{P} in the command name, which matches \gls{Pgls} (similarly for
the other prefix \idx{sentencecase} commands).

\cmddef{PGLSfmtshort}
As \gls{pglsfmtshort} but \idx{allcaps}.

% short plural

\cmddef{glsfmtshortpl}
This normally behaves like \gls{glsxtrshortpl} but expands to just
\gls{glsentryshortpl} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtshortpl}
This normally behaves like \gls{Glsxtrshortpl} but expands to: 
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentryshortpl}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing in the header or contents.

\cmddef{GLSfmtshortpl}
This normally behaves like \gls{GLSxtrshortpl} but expands to just
\gls{glsentryshortpl} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% prefix short plural

\cmddef{pglsfmtshortpl}
As \gls{glsfmtshortpl} but inserts the \gloskey{prefixplural} field
and separator, if the \gloskey{prefixplural} value is set and non-empty.
Provided for use with \sty{glossaries-prefix}.

\cmddef{Pglsfmtshortpl}
As \gls{pglsfmtshortpl} but \idx{sentencecase}.

\cmddef{PGLSfmtshortpl}
As \gls{pglsfmtshortpl} but \idx{allcaps}.

% long

\cmddef{glsfmtlong}
This normally behaves like \gls{glsxtrlong} but expands to just
\gls{glsentrylong} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtlong}
This normally behaves like \gls{Glsxtrlong} but expands to: 
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentrylong}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing in the header or contents.

\cmddef{GLSfmtlong}
This normally behaves like \gls{GLSxtrlong} but expands to just
\gls{glsentrylong} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% prefix long

\cmddef{pglsfmtlong}
As \gls{glsfmtlong} but inserts the \gloskey{prefixfirst} field
and separator, if the \gloskey{prefixfirst} value is set and non-empty.
Provided for use with \sty{glossaries-prefix}.

\cmddef{Pglsfmtlong}
As \gls{pglsfmtlong} but \idx{sentencecase}.

\cmddef{PGLSfmtlong}
As \gls{pglsfmtlong} but \idx{allcaps}.

% long plural

\cmddef{glsfmtlongpl}
This normally behaves like \gls{glsxtrlongpl} but expands to just
\gls{glsentrylongpl} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtlongpl}
This normally behaves like \gls{Glsxtrlongpl} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentrylongpl}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing in the header or contents.

\cmddef{GLSfmtlongpl}
This normally behaves like \gls{GLSxtrlongpl} but expands to just
\gls{glsentrylongpl} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% prefix long plural

\cmddef{pglsfmtlongpl}
As \gls{glsfmtlongpl} but inserts the \gloskey{prefixfirstplural} field
and separator, if the \gloskey{prefixfirstplural} value is set and non-empty.
Provided for use with \sty{glossaries-prefix}.

\cmddef{Pglsfmtlongpl}
As \gls{pglsfmtlongpl} but \idx{sentencecase}.

\cmddef{PGLSfmtlongpl}
As \gls{pglsfmtlongpl} but \idx{allcaps}.

% full

The full form is slightly different as it doesn't correspond to an
individual \idx{field} but instead is formed from a combination of the
short and long \idxpl{field} (the order depending on the abbreviation style).
Since it's too complicated to simply expand to the appropriate
style, a simple expandable command is provided for the PDF
bookmarks:
\cmddef{glspdffmtfull}
This just expands to the long form followed by the short form in
parentheses:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glspdffmtfull}}[1]\marg{\gls{glsentrylong}\marg{\#1}
  (\gls{glsentryshort}\marg{\#1})}
\end{compactcodebox}
You will need to redefine this if you require the short form first.
There is an analogous command for the plural:
\cmddef{glspdffmtfullpl}
This has a similar definition to \gls{glspdffmtfull} but uses
\gls{glsentrylongpl} and \gls{glsentryshortpl}.

\cmddef{glsfmtfull}
This normally behaves like \gls{glsxtrfull} but expands to just
\gls{glspdffmtfull} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtfull}
This normally behaves like \gls{Glsxtrfull} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glspdffmtfull}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing in the header or contents.

\cmddef{GLSfmtfull}
This normally behaves like \gls{GLSxtrfull} but expands to just
\gls{glspdffmtfull} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% full plural

\cmddef{glsfmtfullpl}
This normally behaves like \gls{glsxtrfullpl} but expands to just
\gls{glspdffmtfullpl} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtfullpl}
This normally behaves like \gls{Glsxtrfullpl} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glspdffmtfullpl}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing in the header or contents.

\cmddef{GLSfmtfullpl}
This normally behaves like \gls{GLSxtrfull} but expands to just
\gls{glspdffmtfull} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% name

\cmddef{glsfmtname}
This normally behaves like \gls{glsname} but expands to just
\gls{glsentryname} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtname}
This normally behaves like \gls{Glsname} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentryname}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{GLSfmtname}
This normally behaves like \gls{GLSname} but expands to just
\gls{glsentryname} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% text

\cmddef{glsfmttext}
This normally behaves like \gls{glstext} but expands to just
\gls{glsentrytext} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmttext}
This normally behaves like \gls{Glstext} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentrytext}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{GLSfmttext}
This normally behaves like \gls{GLStext} but expands to just
\gls{glsentrytext} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% plural

\cmddef{glsfmtplural}
This normally behaves like \gls{glsplural} but expands to just
\gls{glsentryplural} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtplural}
This normally behaves like \gls{Glsplural} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentryplural}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{GLSfmtplural}
This normally behaves like \gls{GLSplural} but expands to just
\gls{glsentryplural} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% first

\cmddef{glsfmtfirst}
This normally behaves like \gls{glsfirst} but expands to just
\gls{glsentryfirst} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtfirst}
This normally behaves like \gls{Glsfirst} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentryfirst}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing in the header or contents.

\cmddef{GLSfmtfirst}
This normally behaves like \gls{GLSfirst} but expands to just
\gls{glsentryfirst} in PDF bookmarks and is adjusted when appearing
in the header or contents.

% first plural

\cmddef{glsfmtfirstpl}
This normally behaves like \gls{glsfirstplural} but expands to just
\gls{glsentryfirstplural} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\cmddef{Glsfmtfirstpl}
This normally behaves like \gls{Glsfirstplural} but expands to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentryfirstplural}\margm{entry-label}}
\end{compactcodebox}
in PDF bookmarks and is adjusted when appearing in the header or contents.

\cmddef{GLSfmtfirstpl}
This normally behaves like \gls{GLSfirstplural} but expands to just
\gls{glsentryfirstplural} in PDF bookmarks and is adjusted when appearing
in the header or contents.

\subsection{Advanced Commands}
\label{sec:headingsadvanced}

\begin{information}
This section is intended for advanced users and package developers.
\end{information}

The commands described here are irrelevant if you use \gls{glsxtrRevertMarks} to
restore the definitions of \gls{markright},
\gls{markboth} and \gls{@starttoc}. If you use
\gls{glsxtrRevertTocMarks}, then this section is only applicable to
\gls{markright} and \gls{markboth}.

If you need to know whether or not some code is inside a header or
contents list, you can use:
\cmddef{glsxtrifinmark}
This does \meta{true} if the command occurs within \gls{markright},
\gls{markboth} or \gls{@starttoc} otherwise does \meta{false}.

If you need to know whether or not some code is inside a contents
list (but not the header), you can use:
\cmddef{glsxtrifintoc}
This does \meta{true} if the command occurs within \gls{@starttoc}
otherwise it does \meta{false}.
(The modified definition of \gls{@starttoc} sets \gls{glsxtrifintoc}
to \gls{@firstoftwo} at the start and to \gls{@secondoftwo} at
the end.)

If you need to know whether or not some code is in the PDF bookmarks
or heading, you can use:
\cmddef{glsxtrtitleorpdforheading}
This does the applicable argument depending on whether the
command occurs within a title\slash caption or PDF bookmark or
heading.

If this command occurs within the \ext+{toc} file, it will
do its \meta{heading} argument but if \gls{glsxtrtitleorpdforheading}
expands while it's being written to the \ext{toc} file, then it will
expand to \meta{title}.

\mExampleref{ex:titleorpdforheading} illustrates this, but you will
need to view the document in a PDF viewer that shows the bookmarks
to also see the PDF part:
\begin{codebox}
\cmd{documentclass}\marg{report}
\cmd{usepackage}[T1]\marg{fontenc}
\cmd{usepackage}\marg{lipsum}
\cmd{usepackage}\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\cmd{pagestyle}\marg{headings}
\cbeg{document}
\gls+{tableofcontents}
\cmd{chapter}\marg{\gls{glsxtrtitleorpdforheading}\marg{Title1}\marg{PDF1}\marg{Heading1}
\gls{glsxtrifinmark}\marg{in mark}\marg{not in mark}}
\cmd{lipsum}[1-5]
\cmd{chapter}\marg{\cmd{protect}\gls{glsxtrtitleorpdforheading}\marg{Title2}\marg{PDF2}\marg{Heading2}
\cmd{protect}\gls{glsxtrifinmark}\marg{in mark}\marg{not in mark}}
\cmd{lipsum}
\cend{document}
\end{codebox}
In the first case, \gls{glsxtrtitleorpdforheading} expands as it's
being written to the \ext{toc} file, so it expands to \qt{Title}.
In the second case, \gls{glsxtrtitleorpdforheading} is protected so
that command is written to the \ext{toc} file. On the next \LaTeX,
when the table of contents is displayed, this command will expand to
\qt{Heading}, because it's in the \ext{toc} file. Similarly, in the
first case, \gls{glsxtrifinmark} will expand to \qt{not in mark} as
it's written to the \ext{toc} file, but in the second case it's
expansion is prevented, so it will expand to \qt{in mark} in the table of
contents.

\begin{resultbox}[float]
\createexample*
 [pages={1,2,3,4},class=report,arara={pdflatex,pdflatex},
  label={ex:titleorpdforheading},
  title={Chapter Title or PDF Bookmarks or Heading},
  description={An example document that conditionally adds contents
to the TOC or PDF bookmarks or heading}
 ]
{%
\cmd{usepackage}[T1]\marg{fontenc}\nl
\cmd{usepackage}\marg{lipsum}\nl
\cmd{usepackage}\marg{hyperref}\nl
\cmd{usepackage}\marg{glossaries-extra}\nl
\cmd{pagestyle}\marg{headings}
}
{%
\gls{tableofcontents}\nl
\cmd{chapter}\marg{\gls{glsxtrtitleorpdforheading}\marg{Title1}\marg{PDF1}\marg{Heading1}
\gls{glsxtrifinmark}\marg{in mark}\marg{not in mark}}\nl
\cmd{lipsum}[1-5]\nl
\cmd{chapter}\marg{\cmd{protect}\gls{glsxtrtitleorpdforheading}\marg{Title2}\marg{PDF2}\marg{Heading2}\nl
\cmd{protect}\gls{glsxtrifinmark}\marg{in mark}\marg{not in mark}}\nl
\cmd{lipsum}
 }
\end{resultbox}

If \sty{gettitlestring} has been loaded (used by \sty{nameref} to
provide \gls{nameref}) then adjustments for both \gls{glsxtrtitleorpdforheading}
and \gls{glsxtrifinmark} will be added to \gls{GetTitleStringDisableCommands},
but bear in mind that you will need to use the following for it to
have an effect:
\begin{codebox*}
\gls{GetTitleStringSetup}\marg{expand}
\end{codebox*}

The commands described in \sectionref{sec:headingcommands}, such as
\gls{glsfmtshort}, are essentially defined as:
\begin{compactcodebox}
\gls{texorpdfstring}
 \marg{\cmd{glsxtrtitle\meta{field}}\margm{entry-label}}\comment{title}
 \marg{\cmd{glsentry\meta{field}}\margm{entry-label}}\comment{bookmark}
\end{compactcodebox}
If \gls{texorpdfstring} isn't defined, then the definition is:
\begin{compactcodebox}
\cmd{glsxtrtitle\meta{field}}\margm{entry-label}
\end{compactcodebox}
For example, \gls{glsfmtshort} is defined as (with \sty{hyperref}):
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsfmtshort}}[1]\marg{\comment{}
 \gls{texorpdfstring}
  \marg{\gls{glsxtrtitleshort}\marg{\#1}}\comment{TeX}
  \marg{\gls{glsentryshort}\marg{\#1}}\comment{PDF}
}
\end{compactcodebox}
This ensures that \gls{glsfmtshort} expands to just
\gls{glsentryshort} within the PDF bookmarks. Provided the field
value doesn't contain any problematic commands, this allows the
actual value to be added to the bookmarks.

Some of the case-changing commands, such as \gls{makefirstuc}, can't expand
and therefore aren't appropriate for the bookmarks (which need to be
a simple text string without any formatting).
However, with newer versions of the \LaTeX\ kernel, there are now
expandable commands available. Version 2.08 of \sty{mfirstuc} takes
advantage of these changes and now provides the expandable
\gls{MFUsentencecase}.

This means that the \idx{sentencecase} and \idx{allcaps} commands
can now also adjust the field value for the bookmark, whereas
previously they didn't. For example,
\gls{Glsfmtshort} is now defined as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{Glsfmtshort}}[1]\marg{\comment{}
 \gls{texorpdfstring}
   \marg{\gls{Glsxtrtitleshort}\marg{\#1}}\comment{TeX}
   \marg{\gls{MFUsentencecase}\marg{\gls{glsentryshort}\marg{\#1}}}\comment{PDF}
}
\end{compactcodebox}

The \csfmt{glsxtrtitle\meta{field}} set of commands all default to
the corresponding \idx{glstextlike} command with the options given
by \gls{glsxtrtitleopts} and an empty insert final argument. These
title commands are redefined by \gls{glsxtrmarkhook} to the
corresponding \csfmt{glsxtrhead\meta{field}} command. These
\qt{head} commands use \gls{NoCaseChange} to prevent interference
from page headers that convert to \idx{allcaps} (which can
inappropriately convert the entry label to \idx{allcaps}). Instead,
the \catattr{headuc} attribute needs to be set to \code{true} to use
the appropriate \idx{allcaps} command. A shortcut command is
provided to test for this attribute:
\cmddef{glsxtrifheaduc}
This is defined as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrifheaduc}}[3]\marg{\comment{}
 \gls{glsxtrifintoc}
  \marg{\#3}\comment{in TOC}
  \marg{\gls{glsifattribute}\marg{\#1}\marg{\catattr{headuc}}\marg{true}\marg{\#2}\marg{\#3}}\comment{}
}
\end{compactcodebox}
Since the header commands also end up in the contents, where the
\idx{allcaps} conversion should not be applied, the definition
includes \gls{glsxtrifintoc} to skip the check in the contents.

\cmddef{glsxtrtitleshort}
The normal behaviour of \gls{glsfmtshort}.
This is redefined by \gls{glsxtrmarkhook} to \gls{glsxtrheadshort}.
The default is:
\begin{compactcodebox}
\gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\margm{entry-label}\oarg{}
\end{compactcodebox}
(This is performed indirectly via an internal command that ensures
that \gls{glsxtrtitleopts} is expanded before being passed in the optional
argument.)

\cmddef{glsxtrheadshort}
Used to display the short form in the page header. This is defined
as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrheadshort}}[1]\marg{\comment{}
 \cmd{protect}\gls{NoCaseChange}
 \marg{\comment{}
   \gls{glsifattribute}\marg{\#1}\marg{\catattr{headuc}}\marg{true}\comment{}
   \marg{\comment{}
     \gls{GLSxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\comment{}
   }\comment{}
   \marg{\comment{}
     \gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\comment{}
   }\comment{}
 }\comment{}
}
\end{compactcodebox}
The \idx{sentencecase} commands also check the \catattr{headuc}
attribute.

\cmddef{Glsxtrtitleshort}
The normal behaviour of \gls{Glsfmtshort}.
This is redefined by \gls{glsxtrmarkhook} to \gls{Glsxtrheadshort}.
The default is:
\begin{compactcodebox}
\gls{Glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\margm{entry-label}\oarg{}
\end{compactcodebox}
(Again, this is performed indirectly via an internal command that ensures
that \gls{glsxtrtitleopts} is expanded before being passed in the optional
argument.)

\cmddef{Glsxtrheadshort}
Used to display the \idx{sentencecase} short form in the page header. This is defined
as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{Glsxtrheadshort}}[1]\marg{\comment{}
 \cmd{protect}\gls{NoCaseChange}
 \marg{\comment{}
   \gls{glsifattribute}\marg{\#1}\marg{\catattr{headuc}}\marg{true}\comment{}
   \marg{\comment{}
     \gls{GLSxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\comment{}
   }\comment{}
   \marg{\comment{}
     \gls{Glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\comment{}
   }\comment{}
 }\comment{}
}
\end{compactcodebox}

\cmddef{GLSxtrtitleshort}
The normal behaviour of \gls{GLSfmtshort}.
This is redefined by \gls{glsxtrmarkhook} to \gls{GLSxtrheadshort}.
The default uses \gls{GLSxtrshort} in a similar way to
\gls{glsxtrtitleshort} and \gls{Glsxtrtitleshort}.

\cmddef{GLSxtrheadshort}
Used to display the \idx{allcaps} short form in the page header. In
this case, there's no need to check to the \catattr{headuc}
attribute, but the label needs to be protected from any potential
case-change:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{GLSxtrheadshort}}[1]\marg{\comment{}
 \cmd{protect}\gls{NoCaseChange}
 \marg{\comment{}
   \gls{GLSxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\comment{}
 }\comment{}
}
\end{compactcodebox}

All the similar commands listed below are defined in an analogous
way, except for the \sty{glossaries-prefix} commands, where only the
\idx{sentencecase} title version is provided. This is because
commands like \gls{Pglsfmtshort} have to determine whether or not to
use \gls{glsfmtshort} or \gls{Glsfmtshort} depending on whether or
not the prefix has been set. Whereas commands like
\gls{pglsfmtshort} simply need to insert the prefix and separator if
set and then use the corresponding \gls{glsfmtshort}. 

\cmddef{Pglsxtrtitleshort}
The normal behaviour of \gls{Pglsfmtshort}.

\cmddef{Pglsxtrtitleshortpl}
The normal behaviour of \gls{Pglsfmtshortpl}.

\cmddef{Pglsxtrtitlelong}
The normal behaviour of \gls{Pglsfmtlong}.

\cmddef{Pglsxtrtitlelongpl}
The normal behaviour of \gls{Pglsfmtlongpl}.

% short plural 

\cmddef{glsxtrtitleshortpl}
The title plural short form. (Normal behaviour of \gls{glsfmtshortpl}.)

\cmddef{glsxtrheadshortpl}
The header plural short form. (The behaviour of \gls{glsfmtshortpl}
when it occurs in a header.)

\cmddef{Glsxtrtitleshortpl}
The title plural \idx{sentencecase} short form. (Normal behaviour of 
\gls{Glsfmtshortpl}.)

\cmddef{Glsxtrheadshortpl}
The header plural \idx{sentencecase} short form. (The behaviour of \gls{Glsfmtshortpl}
when it occurs in a header.)

\cmddef{GLSxtrtitleshortpl}
The title plural \idx{allcaps} short form. (Normal behaviour of 
\gls{GLSfmtshortpl}.)

\cmddef{GLSxtrheadshortpl}
The header plural \idx{allcaps} short form. (The behaviour of \gls{GLSfmtshortpl}
when it occurs in a header.)

% long 

\cmddef{glsxtrtitlelong}
The title long form. (Normal behaviour of \gls{glsfmtlong}.)

\cmddef{glsxtrheadlong}
The header long form. (The behaviour of \gls{glsfmtlong}
when it occurs in a header.)

\cmddef{Glsxtrtitlelong}
The title \idx{sentencecase} long form. (Normal behaviour of 
\gls{Glsfmtlong}.)

\cmddef{Glsxtrheadlong}
The header \idx{sentencecase} long form. (The behaviour of \gls{Glsfmtlong}
when it occurs in a header.)

\cmddef{GLSxtrtitlelong}
The title \idx{allcaps} long form. (Normal behaviour of 
\gls{GLSfmtlong}.)

\cmddef{GLSxtrheadlong}
The header \idx{allcaps} long form. (The behaviour of \gls{GLSfmtlong}
when it occurs in a header.)

% long plural

\cmddef{glsxtrtitlelongpl}
The title plural long form. (Normal behaviour of \gls{glsfmtlongpl}.)

\cmddef{glsxtrheadlongpl}
The header plural long form. (The behaviour of \gls{glsfmtlongpl}
when it occurs in a header.)

\cmddef{Glsxtrtitlelongpl}
The title plural \idx{sentencecase} long form. (Normal behaviour of 
\gls{Glsfmtlongpl}.)

\cmddef{Glsxtrheadlongpl}
The header plural \idx{sentencecase} long form. (The behaviour of \gls{Glsfmtlongpl}
when it occurs in a header.)

\cmddef{GLSxtrtitlelongpl}
The title plural \idx{allcaps} long form. (Normal behaviour of 
\gls{GLSfmtlongpl}.)

\cmddef{GLSxtrheadlongpl}
The header plural \idx{allcaps} long form. (The behaviour of \gls{GLSfmtlongpl}
when it occurs in a header.)

% full 

\cmddef{glsxtrtitlefull}
The title full form. (Normal behaviour of \gls{glsfmtfull}.)

\cmddef{glsxtrheadfull}
The header full form. (The behaviour of \gls{glsfmtfull}
when it occurs in a header.)

\cmddef{Glsxtrtitlefull}
The title \idx{sentencecase} full form. (Normal behaviour of 
\gls{Glsfmtfull}.)

\cmddef{Glsxtrheadfull}
The header \idx{sentencecase} full form. (The behaviour of \gls{Glsfmtfull}
when it occurs in a header.)

\cmddef{GLSxtrtitlefull}
The title \idx{allcaps} full form. (Normal behaviour of 
\gls{GLSfmtfull}.)

\cmddef{GLSxtrheadfull}
The header \idx{allcaps} full form. (The behaviour of \gls{GLSfmtfull}
when it occurs in a header.)

% full plural

\cmddef{glsxtrtitlefullpl}
The title plural full form. (Normal behaviour of \gls{glsfmtfullpl}.)

\cmddef{glsxtrheadfullpl}
The header plural full form. (The behaviour of \gls{glsfmtfullpl}
when it occurs in a header.)

\cmddef{Glsxtrtitlefullpl}
The title plural \idx{sentencecase} full form. (Normal behaviour of 
\gls{Glsfmtfullpl}.)

\cmddef{Glsxtrheadfullpl}
The header plural \idx{sentencecase} full form. (The behaviour of \gls{Glsfmtfullpl}
when it occurs in a header.)

\cmddef{GLSxtrtitlefullpl}
The title plural \idx{allcaps} full form. (Normal behaviour of 
\gls{GLSfmtfullpl}.)

\cmddef{GLSxtrheadfullpl}
The header plural \idx{allcaps} full form. (The behaviour of \gls{GLSfmtfullpl}
when it occurs in a header.)

% name 

\cmddef{glsxtrtitlename}
The title \gloskey{name} field. (Normal behaviour of \gls{glsfmtname}.)

\cmddef{glsxtrheadname}
The header \gloskey{name} field. (The behaviour of \gls{glsfmtname}
when it occurs in a header.)

\cmddef{Glsxtrtitlename}
The title \idx{sentencecase} \gloskey{name} field. (Normal behaviour of 
\gls{Glsfmtname}.)

\cmddef{Glsxtrheadname}
The header \idx{sentencecase} \gloskey{name} field. (The behaviour of \gls{Glsfmtname}
when it occurs in a header.)

\cmddef{GLSxtrtitlename}
The title \idx{allcaps} \gloskey{name} field. (Normal behaviour of 
\gls{GLSfmtname}.)

\cmddef{GLSxtrheadname}
The header \idx{allcaps} \gloskey{name} field. (The behaviour of \gls{GLSfmtname}
when it occurs in a header.)

% text 

\cmddef{glsxtrtitletext}
The title \gloskey{text} field. (Normal behaviour of \gls{glsfmttext}.)

\cmddef{glsxtrheadtext}
The header \gloskey{text} field. (The behaviour of \gls{glsfmttext}
when it occurs in a header.)

\cmddef{Glsxtrtitletext}
The title \idx{sentencecase} \gloskey{text} field. (Normal behaviour of 
\gls{Glsfmttext}.)

\cmddef{Glsxtrheadtext}
The header \idx{sentencecase} \gloskey{text} field. (The behaviour of \gls{Glsfmttext}
when it occurs in a header.)

\cmddef{GLSxtrtitletext}
The title \idx{allcaps} \gloskey{text} field. (Normal behaviour of 
\gls{GLSfmttext}.)

\cmddef{GLSxtrheadtext}
The header \idx{allcaps} \gloskey{text} field. (The behaviour of \gls{GLSfmttext}
when it occurs in a header.)

% plural 

\cmddef{glsxtrtitleplural}
The title \gloskey{plural} field. (Normal behaviour of \gls{glsfmtplural}.)

\cmddef{glsxtrheadplural}
The header \gloskey{plural} field. (The behaviour of \gls{glsfmtplural}
when it occurs in a header.)

\cmddef{Glsxtrtitleplural}
The title \idx{sentencecase} \gloskey{plural} field. (Normal behaviour of 
\gls{Glsfmtplural}.)

\cmddef{Glsxtrheadplural}
The header \idx{sentencecase} \gloskey{plural} field. (The behaviour of \gls{Glsfmtplural}
when it occurs in a header.)

\cmddef{GLSxtrtitleplural}
The title \idx{allcaps} \gloskey{plural} field. (Normal behaviour of 
\gls{GLSfmtplural}.)

\cmddef{GLSxtrheadplural}
The header \idx{allcaps} \gloskey{plural} field. (The behaviour of \gls{GLSfmtplural}
when it occurs in a header.)

% first 

\cmddef{glsxtrtitlefirst}
The title \gloskey{first} field. (Normal behaviour of \gls{glsfmtfirst}.)

\cmddef{glsxtrheadfirst}
The header \gloskey{first} field. (The behaviour of \gls{glsfmtfirst}
when it occurs in a header.)

\cmddef{Glsxtrtitlefirst}
The title \idx{sentencecase} \gloskey{first} field. (Normal behaviour of 
\gls{Glsfmtfirst}.)

\cmddef{Glsxtrheadfirst}
The header \idx{sentencecase} \gloskey{first} field. (The behaviour of \gls{Glsfmtfirst}
when it occurs in a header.)

\cmddef{GLSxtrtitlefirst}
The title \idx{allcaps} \gloskey{first} field. (Normal behaviour of 
\gls{GLSfmtfirst}.)

\cmddef{GLSxtrheadfirst}
The header \idx{allcaps} \gloskey{first} field. (The behaviour of \gls{GLSfmtfirst}
when it occurs in a header.)

% firstplural 

\cmddef{glsxtrtitlefirstplural}
The title \gloskey{firstplural} field. (Normal behaviour of \gls{glsfmtfirstpl}.)

\cmddef{glsxtrheadfirstplural}
The header \gloskey{firstplural} field. (The behaviour of \gls{glsfmtfirstpl}
when it occurs in a header.)

\cmddef{Glsxtrtitlefirstplural}
The title \idx{sentencecase} \gloskey{firstplural} field. (Normal behaviour of 
\gls{Glsfmtfirstpl}.)

\cmddef{Glsxtrheadfirstplural}
The header \idx{sentencecase} \gloskey{firstplural} field. (The behaviour of \gls{Glsfmtfirstpl}
when it occurs in a header.)

\cmddef{GLSxtrtitlefirstplural}
The title \idx{allcaps} \gloskey{firstplural} field. (Normal behaviour of 
\gls{GLSfmtfirstpl}.)

\cmddef{GLSxtrheadfirstplural}
The header \idx{allcaps} \gloskey{firstplural} field. (The behaviour of \gls{GLSfmtfirstpl}
when it occurs in a header.)


The definitions of \gls{markright}, \gls{markboth} and \gls{@starttoc}
are saved (using \gls{let}) when \sty{glossaries-extra} loads.
\cmddef{@glsxtr@org@markright}
The previous definition of \gls{markright}.

\cmddef{@glsxtr@org@markboth}
The previous definition of \gls{markboth}.

\cmddef{@glsxtr@org@@starttoc}
The previous definition of \gls{@starttoc}.

The \sty{glossaries-extra} definitions of \gls{markright},
\gls{markboth} and \gls{@starttoc} all start and end with hooks that
redefine commands that are sensitive to being in the header or
contents.
\cmddef{glsxtrmarkhook}
This saves the original definitions and redefines the sensitive
commands. This includes \gls{MakeUppercase} which is \gls{let} to
\gls{MakeTextUppercase}.

\cmddef{@glsxtrinmark}
This redefines \gls{glsxtrifinmark} to just do its first argument
(\meta{true}).
\cmddef{@glsxtrnotinmark}
This redefines \gls{glsxtrifinmark} to just do its second argument
(\meta{false}).
\cmddef{glsxtrrestoremarkhook}
This restores the sensitive commands to the saved definitions.
(For use where grouping will cause interference.)
For example, \gls{markboth} is redefined as:
\begin{compactcodebox}
\cmd{renewcommand}*\marg{\gls{markboth}}[2]\marg{\comment{}
 \gls{glsxtrmarkhook}
 \gls{@glsxtr@org@markboth}
   \marg{\gls{@glsxtrinmark}\#1\gls{@glsxtrnotinmark}}\comment{}
   \marg{\gls{@glsxtrinmark}\#2\gls{@glsxtrnotinmark}}\comment{}
 \gls{glsxtrrestoremarkhook}
}
\end{compactcodebox}

\section{Nested Links}
\label{sec:nested}

Complications arise when you use the \idx{glslike} commands 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.

For example, things can go wrong if the following is used with the
\sty{glossaries} package:
\begin{badcodebox}
\gls{newacronym}\marg{ssi}\marg{SSI}\marg{Server Side Includes}
\gls{newacronym}\marg{html}\marg{HTML}\marg{Hypertext Markup Language}
\gls{newacronym}\marg{shtml}\marg{S\gls{gls}\marg{html}}\marg{\gls{gls}\marg{ssi} enabled \gls{gls}\marg{html}}
\end{badcodebox}

The main problems are:
\begin{enumerate}
\item\label{itm:nestedfirstucprob} With older versions of 
\sty{mfirstuc} and \sty{glossaries}, the \idx{sentencecase} commands,
such as \gls{Gls}, won't work for the \code{shtml} entry on \idx{firstuse} if the
long form is displayed before the short form (which is the
default abbreviation style). This will attempt to do
\begin{compactcodebox}
\gls{gls}\marg{\gls+{uppercase} ssi} enabled \gls{gls}\marg{html}
\end{compactcodebox}
which just doesn't work. Grouping the \code{\gls{gls}\marg{ssi}} doesn't
work either as this will effectively try to do:
\begin{compactcodebox}
\gls+{uppercase}\marg{\gls{gls}\marg{ssi}} enabled \gls{gls}\marg{html}
\end{compactcodebox}
This will upper case the label \code{ssi} so the entry won't be
recognised. This problem will also occur if you use the \idx{allcaps}
version, such as \code{\gls{GLS}\marg{shtml}}.

With \sty{mfirstuc} v2.08+ and \sty{glossaries} v1.49+, this issue
should now be resolved for \idx{sentencecase} where
\code{\gls{gls}\marg{ssi}} will be mapped to
\code{\gls{Gls}\marg{ssi}} within \code{\gls{Gls}\marg{shtml}}. The
\idx{allcaps} command \code{\gls{GLS}\marg{shtml}} will treat
\gls{gls} as an exclusion and so won't perform a case-change. See
\sectionref{sec:casechange} for further details.

\item\label{itm:nonexpandprob} The long and abbreviated forms accessed through
\gls{glsentrylong} and \gls{glsentryshort} are no longer expandable
and so can't be used be used in contexts that require this,
such as PDF bookmarks.

\item\label{itm:nestedsortprob} The nested commands may end up in the \gloskey{sort} key,
which will confuse the indexing.

\item\label{itm:inconsistentfirstuseprob} The \code{shtml} entry produces inconsistent results
depending on whether the \code{ssi} or \code{html} entries have
been used. Suppose both \code{ssi} and \code{html} are used
before \code{shtml}. For example:
\begin{coderesult}
This section discusses 
\gls{gls}\marg{ssi}, \gls{gls}\marg{html} and
\gls{gls}\marg{shtml}.
\tcblower
This section discusses server side includes (SSI), hypertext markup
language (HTML) and SSI enabled HTML (SHTML).
\end{coderesult}
In the above, the \idx{firstuse} of the \code{shtml} entry produces
\qt{SSI enabled HTML (SHTML)}.

Now let's suppose the \code{html} entry is used before the
\code{shtml} but the \code{ssi} entry is used after the
\code{shtml} entry, for example:
\begin{coderesult}
The sample files are
either \gls{gls}\marg{html} or 
\gls{gls}\marg{shtml}, but let's
first discuss \gls{gls}\marg{ssi}.
\tcblower
The sample files are either hypertext markup language (HTML) or
server
side includes (SSI) enabled HTML (SHTML), but let's first discuss
SSI.
\end{coderesult}
In this case, the \idx{firstuse} of the \code{shtml} entry now produces
\qt{server side includes (SSI) enabled HTML (SHTML)}, which looks
a bit cumbersome.

Now let's suppose the \code{shtml} entry is used before (or
without) the other two entries:
\begin{coderesult}
This article is an 
introduction 
to \gls{gls}\marg{shtml}.
\tcblower
This article is an introduction to server side includes (SSI)
enabled hypertext markup language (HTML) (SHTML).
\end{coderesult}
Now the \idx{firstuse} of the \code{shtml} entry produces
\qt{server side includes (SSI) enabled hypertext markup language (HTML)
(SHTML)}, which looks strange.

This is all aggravated when using just the base \sty{glossaries}
package when the acronym style is set with
\gls{setacronymstyle}. For example:
\begin{compactcodebox}
\gls{setacronymstyle}\marg{\acrstyle+{long-short}}
\end{compactcodebox}
as this references the label through the use of \gls{glslabel}
when displaying the long and short forms, but this value
changes with each use of \gls{gls}, so instead of displaying
\qt{(SHTML)} at the end of the \gls{firstuse}, it now displays
\qt{(HTML)}, since \gls{glslabel} has been changed to \code{html}
by \code{\gls{gls}\marg{html}}.

\begin{information}
In v1.48, the \sty{glossaries-extra} package added grouping with
\gls{glslinkwrcontent}, which scoped the \idx{linktext}.
Unfortunately this grouping caused problems in math mode and had to
be removed in v1.49. You can redefine \gls{glslinkwrcontent} to put the
grouping back, but it still won't scope the definitions of the
placeholder commands, such as \gls{glslabel}, which need to be
outside of this scope for the benefit of the \idx{postlinkhook}.
\end{information}

Another oddity occurs if you reset the \code{html} entry between
uses of the \code{shtml} entry. For example:
\begin{compactcodebox}
\gls{gls}\marg{shtml} ... \gls{glsreset}\marg{html}\gls{gls}\marg{shtml}
\end{compactcodebox}
The next use of \code{shtml} produces \qt{Shypertext markup
language (HTML)}, which is downright weird. (This is a result of the
short form being set to \code{S\gls{gls}\marg{html}}, but
\code{\gls{gls}\marg{html}} is showing the full form.)

Even without this, the short form has nested formatting commands,
which amount to \code{\gls{acronymfont}\marg{S\gls{acronymfont}\marg{HTML}}}. This
may not be a problem for some styles, but if you use one of the
\qt{sm} styles (that use \gls{textsmaller}), this will produce
an odd result.

\item\label{itm:indexingprob} Each time the \code{shtml} entry is used, the
\code{html} entry will also be indexed and marked as used,
and on \idx{firstuse} this will happen to both the \code{ssi}
and \code{html} entries.  This kind of duplication in the location
list isn't usually particularly helpful to the reader.

\item\label{itm:nestedhyplinkprob} 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 \idx{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, with just the base \sty{glossaries} package, it's
better to use the simple expandable commands like \gls{glsentrytext}
or \gls{glsentryshort} in the definition of other entries.

The \sty{glossaries-extra} package provides two other ways of
dealing with these problems:
\begin{enumerate}
\item If the term can simply be treated as a
series of previously defined entries, then consider using
multi-entries (or compound sets), as described in
\sectionref{sec:multientries}. This deals with all the issues,
including case-changing.

\item Use the partially-expandable \gls{glsxtrp}, described below.
\end{enumerate}

\cmddef{glsxtrp}
where \meta{field} is the \idx{internalfieldlabel}. 

This command partially expands, so it will expand to
just the \idx{field} value if it occurs in the PDF bookmarks.
Otherwise it will behave much like the commands described in
\sectionref{sec:headingcommands}, but with additional outer scoping and the
\idx{postlinkhook} is suppressed.

Rather than testing the existence of the given
field, this tests the existence of \csfmt{gls\meta{field}} or
\csfmt{glsxtr\meta{field}}, which means that it may be confused if
the \meta{field} argument is set to something that isn't a field but
happens to match either of those command names (such as \code{full}).

The \idx{postlinkhook} is suppressed by the initialisation command:
\cmddef{glsxtrpInit}
This is used inside the added outer scoping and is simply defined
as:
\begin{compactcodebox}
\cmd{newcommand}{\gls{glsxtrpInit}}\oarg{2}\marg{\comment{}
 \cmd{let}\gls{glspostlinkhook}\cmd{relax}}
\end{compactcodebox}
It is possible to redefine this command to allow the
\idx{glspostlinkhook} to be used, but any look-ahead (such as
checking for a following punctuation character) won't work because
of the added grouping. The arguments are ignored by default. If you
want to redefine \gls{glsxtrpInit} the first argument is the name of
the control sequence that will be used, without the leading
backslash (for example, \code{glstext} or \code{glsxtrshort}) and
the second argument is the entry's label.

Note that, as with commands like \gls{glsfmtshort}, there's no
optional argument.  The default settings are \glsopt{noindex} and
\glsoptval{hyper}{false}. You can change this with:
\cmddef{glsxtrsetpopts}
The argument should be the new default options.

At the start of each glossary, the default options are locally changed
with:
\cmddef{glossxtrsetpopts}
This is defined as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glossxtrsetpopts}}\marg{\comment{}
  \gls{glsxtrsetpopts}\marg{\glsopt{noindex}}\comment{}
}
\end{compactcodebox}
This allows hyperlinks for any instance of \gls{glsxtrp} that occurs
in the name or description, where it shouldn't be problematic.

There are also \idx{sentencecase} and \idx{allcaps} versions.
\cmddef{Glsxtrp}
This uses the corresponding \idx{sentencecase} command
\csfmt{Gls\meta{field}} or \csfmt{Glsxtr\meta{field}}.

\cmddef{GLSxtrp}
This uses the corresponding \idx{allcaps} command
\csfmt{GLS\meta{field}} or \csfmt{GLSxtr\meta{field}}.

There are some shortcut commands for the most common fields:
\cmddef{glsps}
which is equivalent to
\code{\gls{glsxtrp}\marg{short}\margm{entry-label}}, and
\cmddef{glspt}
which is equivalent to
\code{\gls{glsxtrp}\marg{text}\margm{entry-label}}.
As well as \idx{sentencecase} and \idx{allcaps} versions:
\cmddef{Glsps}
which is equivalent to
\code{\gls{Glsxtrp}\marg{short}\margm{entry-label}}, 
\cmddef{Glspt}
which is equivalent to
\code{\gls{Glsxtrp}\marg{text}\margm{entry-label}},
\cmddef{GLSps}
which is equivalent to
\code{\gls{GLSxtrp}\marg{short}\margm{entry-label}}, and
\cmddef{GLSpt}
which is equivalent to
\code{\gls{GLSxtrp}\marg{text}\margm{entry-label}}.

\mExampleref{ex:nestedlinkglsps} uses \gls{glsps} in the long form:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\gls{setabbreviationstyle}\marg{long-em-short-em}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\gls{newabbreviation}\marg{ssi}\marg{SSI}\marg{server-side includes}
\gls{newabbreviation}\marg{shtml}\marg{SHTML}\marg{\gls{glsps}\marg{html} enabled
\gls{glsps}\marg{ssi}}
\cbeg{document}
\gls{tableofcontents}
\cmd{section}\marg{\gls{Glsfmtlong}\marg{shtml}}
First use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}.
\codepar
Next use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}.
\codepar
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
(For a \app{bib2gls} alternative, see \exampleref{ex:bib2glsabbrvs}.)
Note that the nested HTML and SSI are upright not italic. This is because \gls{emph}
toggles between italic and upright, so the nested \gls{emph} switches back to upright. 
The emphasized style \abbrstyle{long-em-short-em} was used to demonstrate this.

\begin{resultbox}[float]
\createexample*[arara={pdflatex,pdflatex,pdfcrop},
  label={ex:nestedlinkglsps},
  title={Nested link text with \cmd{glspl}},
  description={Example document illustrating an entry that
  references other entries within one of its fields}]
{%
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{setabbreviationstyle}\marg{long-em-short-em}^^J%
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J%
\gls{newabbreviation}\marg{ssi}\marg{SSI}\marg{server-side includes}^^J%
\gls{newabbreviation}\marg{shtml}\marg{SHTML}\marg{\gls{glsps}\marg{html} enabled
\gls{glsps}\marg{ssi}}
}
{%
\gls{tableofcontents}^^J%
\cmd{section}\marg{\gls{Glsfmtlong}\marg{shtml}}^^J%
First use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}.
\codepar
Next use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}

The way that this works is as follows:
\begin{itemize}
\item \code{\gls{glsfmtlong}\marg{shtml}} expands to
\code{\gls{glsentrylong}\marg{shtml}} within the PDF bookmarks,
which expands to the value of the \gloskey{long} field:
\begin{compactcodebox}
\gls{glsps}\marg{html} enabled \gls{glsps}\marg{ssi}
\end{compactcodebox}
This means that \gls{glsps} (within the PDF bookmarks) in turn expands to 
\gls{glsentryshort}. So the bookmark text (which can't contain any
formatting commands) ends up as \qt{HTML enabled SSI}.
The \idx{sentencecase} \code{\gls{Glsfmtlong}\marg{shtml}} expands to
\code{\gls{glspdfsentencecase}\marg{\gls{glsentrylong}\marg{shtml}}} within the PDF bookmarks.
This expands the value of the \gloskey{long} field before applying the
case-change. However, \gls{glsps} only expands as far as \gls{glsxtrp} and no further.
This means that \gls{glspdfsentencecase} has no effect as \gls{glsxtrp} is a case-exclusion command.

\item \code{\gls{glsfmtlong}\marg{shtml}} essentially
behaves like \gls{glsxtrlong}, but with the \idx{indexing} and
hyperlink suppressed. The \idx{linktext} is the value of the
\gloskey{long} field encapsulated with the abbreviation style's
formatting command (\gls{glslongemfont} in this case): 
\begin{compactcodebox}
\gls{glslongemfont}\marg{\gls{glsps}\marg{html} enabled \gls{glsps}\marg{ssi}}
\end{compactcodebox}
This then becomes:
\begin{compactcodebox}
\gls{glslongemfont}\marg{\marg{\gls{let}\gls{glspostlinkhook}\gls{relax}
 \gls{glsxtrshort}\marg{html}} enabled 
\marg{\gls{let}\gls{glspostlinkhook}\gls{relax}
 \gls{glsxtrshort}\marg{ssi}}}
\end{compactcodebox}
Note the grouping and localised suppression of the
\idx{postlinkhook}.
The \idx{sentencecase} \gls{Glsfmtlong} similarly behaves like \gls{Glsxtrlong},
again with the \idx{indexing} and hyperlink suppressed.
In this example, there's no noticeable difference between using \gls{glsfmtlong} and \gls{Glsfmtlong}.
\end{itemize}

Note that in the above example, with older versions of
\sty{mfirstuc} and \sty{glossaries}, it's not possible to use
\code{\gls{Glsxtrlong}\marg{shtml}} or similar. The problem here is
that it will attempt to do:
\begin{compactcodebox}
\gls{makefirstuc}\marg{\gls{glsps}\marg{html} enabled \gls{glsps}\marg{ssi}}
\end{compactcodebox}
This will essentially end up as:
\begin{compactcodebox}
\gls{glsps}\marg{\gls{uppercase} html} enabled \gls{glsps}\marg{ssi}
\end{compactcodebox}
which doesn't work. If you want to protect against automated
case-changes, such as using the \catattr{glossdesc} attribute,
insert an empty brace at the start:
\begin{compactcodebox}
\gls{newabbreviation}\marg{shtml}\marg{SHTML}\marg{\marg{}\gls{glsps}\marg{html} 
enabled \gls{glsps}\marg{ssi}}
\end{compactcodebox}
Alternatively, upgrade to \sty{mfirstuc} v2.08+ and \sty{glossaries}
v4.50+. See \sectionref{sec:casechange}.


\section{Adjusting the Text Style}
\label{sec:entryfmtmods}

The \idx{glslike} and \idx{glstextlike} commands produce text that's
essentially formatted either as (\glsoptval{hyperoutside}{true}):
\begin{compactcodebox}
\meta{hyper-cs}\margm{target}\marg{\meta{textformat-cs}\margm{content}}\meta{post-link hook}
\end{compactcodebox}
or (\glsoptval{hyperoutside}{false}):
\begin{compactcodebox}
\meta{textformat-cs}\marg{\meta{hyper-cs}\margm{target}\margm{content}}\meta{post-link hook}
\end{compactcodebox}
If hyperlinks are enabled then \meta{hyper-cs} creates the hyperlink
based on \meta{target} with the hyperlink text given by the second
argument. If hyperlinks aren't enabled then \meta{hyper-cs} ignores
the \meta{target} argument and simply does the second argument.

The \meta{content} part is the \idx{linktext}, which includes the
final optional \meta{insert} (if supplied). The actual content
depends on the command used (for example, \gls{gls} or
\gls{glstext}). The \idx{glslike} commands all use
the entry display style associated with the entry's \idx{glossary}
type, (see \sectionref{sec:entryfmt}). The \idx{glstextlike} commands set the
\meta{content} to the corresponding field value with the insert
appended, all encapsulated with the inner formatting (see
\sectionref{sec:innertextformat}), with appropriate case-changing,
if required.

The abbreviation commands (\gls{glsxtrshort}, \gls{glsxtrlong},
\gls{glsxtrfull} etc) are considered part of the set of
\idx{glstextlike} commands, but the content is set according to the
abbreviation style (see \sectionref{sec:abbrstyle}).

The commands \gls{glsdisp} and \gls{glslink} both have the content
part explicitly set in their final argument. There's no insert
optional argument as it can simply be included in the content part.
The difference between them is that \gls{glsdisp} is considered a
\idx{glslike} command (it unsets the \idx{firstuseflag},
\sectionref{sec:glsunset}, and uses the entry display style,
\sectionref{sec:entryfmt}), whereas \gls{glslink} is considered a
\idx{glstextlike} command.

The \meta{post-link hook} part is described in
\sectionref{sec:postlinkhook}.

The \meta{textformat-cs} command is the \emph{outer} formatting
command, described in \sectionref{sec:glstextformat}. This doesn't
include the \idx{postlinkhook}. If you want to include the
\idx{postlinkhook} then you need to encapsulate the entire
\idx{glslike} and \idx{glstextlike} command (including the final
optional argument, if present, and following punctuation, if the
\idx{postlinkhook} looks ahead for punctuation).

Some sensitive formatting commands need to have the actual text in
their argument (or else have the argument in an unbreakable box).
The \meta{content} part is usually too complicated for these
commands.  To help support this type of command, there is also an
\idxc{innerformatting}{inner format}, which is described in
\sectionref{sec:innertextformat}. In general, unless you require one
of these sensitive commands, avoid setting the inner text format as
it requires support from the underlying style (either the entry
format style or the abbreviation style), which may not be available.

\mExampleref{ex:linktextstyles} is ugly, but demonstrates the outer
formatting (\texttt{type\-writer} font), middle formatting
(\textbf{bold} for regular entries and \textit{italic} for
abbreviations), inner formatting (highlighted in yellow), hyperlinks
(red), and the \idx{catpostlinkhook} (the description follows in
parentheses for general entries on \idx{firstuse}).
\begin{codebox}
\cmd{usepackage}\marg{courier}
\cmd{usepackage}[T1]\marg{fontenc}
\cmd{usepackage}\marg{xcolor}
\cmd{usepackage}\marg{soul}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}[\opt{nogroupskip}]\marg{glossaries-extra}
\comment{outer formatting:}
\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{texttt}\marg{\#1}}
\comment{middle formatting:}
\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{textbf}\marg{\#1}}
\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textit}\marg{\#1}}
\comment{inner formatting:}
\cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\comment{}
 \cmd{hl}\marg{\#1}}
\comment{post-link hook for 'general' category:}
\gls{glsdefpostlink}\marg{\cat{general}}\marg{\comment{}
 \gls{glsxtrpostlinkAddDescOnFirstUse}}
\comment{define entries:}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration}
\cbeg{document}
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}.
\codepar
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}

\begin{resultbox}
\createexample*[fontsize={14},
  label={ex:linktextstyles},
title={Link text styles: outer, middle, inner, hyperlinks and post-link hook},
 description={An example document that illustrates the outer, middle
and inner formatting, hyperlinks and a category post-link hook}]
{
\cmd{usepackage}\marg{courier}^^J%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\marg{xcolor}^^J%
\cmd{usepackage}\marg{soul}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[nogroupskip]\marg{glossaries-extra}^^J%
\% outer formatting:^^J%
\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{texttt}\marg{\#1}}^^J%
\% middle formatting:^^J%
\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{textbf}\marg{\#1}}^^J%
\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textit}\marg{\#1}}^^J%
\% inner formatting:^^J%
\cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\cmd{hl}\marg{\#1}}^^J%
\% post-link hook for 'general' category:^^J%
\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J%
\% define entries:^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J%
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J%
\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration}
}
{
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}.
\codepar
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}
Note that the hyperlink, outer and middle formatting aren't applied
to the \idx{postlinkhook}. The \cat{acronym} category has the
\abbrstyle{short-nolong} abbreviation style, which sets the
\catattr{regular} attribute to true. This means that the NASA entry
uses the regular middle format (\gls{glsxtrregularfont}) not the
abbreviation middle format (\gls{glsxtrabbreviationfont}).

If you have a formatting command that needs to have its argument
fully-expanded before being applied, you may be able to use:
\cmddef{GlsXtrExpandedFmt}
This fully-expands \meta{content} and does
\code{\meta{cs}\margm{expanded-content}}, where \meta{cs} is a
command that takes a single argument. For example, to use
\sty{soul}['s] underlining command \gls{ul}:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}\oarg{1}\marg{\comment{}
 \gls{GlsXtrExpandedFmt}\marg{\#1}}
\end{codebox}
(See \exampleref{ex:protectinnertextformat}.)
This isn't guaranteed to work as the \idx{linktext} may contain
fragile content.

The inner formatting can be unpredictable. For example,
abbreviation styles are complicated and so the inner formatting
command is included in some of the field values, such as the
\gloskey{name}, which is why the abbreviation name is highlighted in
the \idx{glossary}. In the above example, the inner formatting is
included in the \idx{catpostlinkhook}, but only because
\gls{glsxtrpostlinkAddDescOnFirstUse} is designed to include it. If
the \idx{catpostlinkhook} was simply defined as:
\begin{codebox}
\gls{glsdefpostlink}\marg{general}\marg{\comment{}
 \gls{glsxtrifwasfirstuse}\marg{ (\gls{glsentrydesc}\marg{\gls{glslabel}})}\marg{}}
\end{codebox}
then the inner formatting won't be applied, since it's not included
in the hook. 

\mExampleref{ex:linktextstylescustom}
demonstrates this with a slightly modified version of
the above \exampleref{ex:linktextstyles} document (initial part of preamble that deals with loading packages and
redefining formatting commands as before):
\begin{codebox}[before upper app=\small]
\comment{post-link hook for 'general' category:}
\gls{glsdefpostlink}\marg{general}\marg{\comment{}
 \gls{glsxtrifwasfirstuse}
   \marg{ (\gls{glsentrydesc}\marg{\gls{glslabel}})}\marg{}}
\comment{style sets the post-link hook for 'abbreviation' category:}
\gls{setabbreviationstyle}\marg{\abbrstyle{long-postshort-user}}
\comment{style sets the post-link hook for 'acronym' category:}
\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{short-postfootnote}}
\comment{define entries:}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration}
\cbeg{document}
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}.
\codepar
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}

\begin{resultbox}[float]
\createexample*[graphicsopts={scale=0.5},fontsize={14},
  label={ex:linktextstylescustom},
 title={Link text styles: outer, middle, inner,
hyperlinks and post-link hooks (custom and abbreviation style)},
 description={An example document that illustrates the outer, middle
and inner formatting, and hyperlinks, with a custom category
post-link hook and abbreviation style that sets the category
post-link hook}]
{
\cmd{usepackage}\marg{courier}^^J%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\marg{xcolor}^^J%
\cmd{usepackage}\marg{soul}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[nogroupskip]\marg{glossaries-extra}^^J%
\% outer formatting:^^J%
\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{texttt}\marg{\#1}}^^J%
\% middle formatting:^^J%
\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{textbf}\marg{\#1}}^^J%
\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textit}\marg{\#1}}^^J%
\% inner formatting:^^J%
\cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\cmd{hl}\marg{\#1}}^^J%
\% post-link hook for 'general' category:^^J%
\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrifwasfirstuse}\marg{
(\gls{glsentrydesc}\marg{\gls{glslabel}})}\marg{}}^^J%
\% this style sets the post-link hook for 'abbreviation' category:^^J%
\gls{setabbreviationstyle}\marg{long-postshort-user}^^J%
\% this style sets the post-link hook for 'acronym' category:^^J%
\gls{setabbreviationstyle}\oarg{acronym}\marg{short-postfootnote}^^J%
\% define entries:^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J%
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J%
\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration}
}
{
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}.
\codepar
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}
The \qt{post} abbreviation styles put some content into the
\idx{postlinkhook} and provide support for the inner formatting. 
The above example sets the abbreviation style
to \abbrstyle{long-postshort-user}. This sets up the
\idx{postlinkhook} for the associated category
(\cat{abbreviation}, in this case) to show the parenthetical
material. Be aware that this will override
any previous definition of that hook. This style supports the inner
formatting (so the parenthetical material is highlighted).

Similarly, the \abbrstyle{short-postfootnote} style is applied to
the \cat{acronym} category, and sets the \idx{postlinkhook} for that
category (which looks head for punctuation). The inner formatting is
applied to the footnote text but not the marker.

The \idx{postlinkhook} for the \cat{general} category is now much
simpler and doesn't include support for the inner formatting, so
it's not highlighted.

None of the post-link content is incorporated into the
hyperlink, outer or middle formatting.

In general, it's better to adjust the abbreviation's style commands
(see \sectionref{sec:abbrvcmds}) rather than use the middle
or inner formatting if abbreviations need to be displayed in a particular
font.

\subsection{Outer Formatting}
\label{sec:glstextformat}

By default, the outer formatting is produced with \gls{glstextformat}, which is
defined by the base \sty{glossaries} package. However it can be
replaced by the \catattr{textformat} category attribute or by the
\glsopt{textformat} option. The order of precedence (not cumulative) is:
the option supplied to the \idx{glslike} or \idx{glstextlike}
command, the category attribute, \gls{glstextformat}. 

\mExampleref{ex:textformat} demonstrates this:
\begin{codebox}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\gls{glsdefpostlink}\marg{general}
 \marg{ (\gls{glsentrydesc}\marg{\gls{glslabel}})}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}
\cmd{newcommand}\marg{\cmd{strong}}[1]\marg{\cmd{textbf}\marg{\cmd{color}\marg{green}\#1}}
\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{emph}\marg{\#1}}
\cbeg{document}
\gls{gls}\marg{sample}\oarg{-insert}. 
\cmd{strong}\marg{\gls{gls}\marg{sample}\oarg{-insert}}.
\codepar
\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{textformat}}\marg{strong}
\gls{gls}\marg{sample}\oarg{-insert}.
\gls{gls}\oarg{\glsoptval{hyperoutside}{false}}\marg{sample}\oarg{-insert}.
\codepar
\gls{gls}\oarg{\glsoptval{textformat}{textsf}}\marg{sample}\oarg{-insert}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Changing the outer text format},
  label={ex:textformat},
 description={Example document illustrating the difference between
\cmd{glstextformat}, the \optfmt{textformat} category attribute, and
the \optfmt{textformat} option}]
{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{glsdefpostlink}\marg{general}\marg{ (\gls{glsentrydesc}\marg{\gls{glslabel}})}^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J%
\cmd{newcommand}\marg{\cmd{strong}}[1]\marg{\cmd{textbf}\marg{\cmd{color}\marg{green}\#1}}
\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{emph}\marg{\#1}}
}{%
\gls{gls}\marg{sample}\oarg{-insert}. \cmd{strong}\marg{\gls{gls}\marg{sample}\oarg{-insert}}.
\codepar
\gls{glssetcategoryattribute}\marg{general}\marg{textformat}\marg{strong}
\gls{gls}\marg{sample}\oarg{-insert}.
\gls{gls}\oarg{hyperoutside=false}\marg{sample}\oarg{-insert}.
\codepar
\gls{gls}\oarg{textformat=textsf}\marg{sample}\oarg{-insert}.
}
\end{resultbox}
The red text colour is from the hyperlink (red is the
default with \sty{hyperref}['s] \optfmt{colorlinks} option).
The green from the custom \csfmt{strong} command is cancelled by the
hyperlink colour change when the hyperlink is inside \csfmt{strong}.

After the \catattr{textformat} attribute is set, the
\gls{glstextformat} command isn't used, which is why the remaining
lines don't have any italic. The final line uses the
\glsopt{textformat} option, which overrides the
\catattr{textformat} attribute, so neither \gls{glstextformat} nor the custom
\csfmt{strong} are used.

Note that the only time that the \idx{postlinkhook} is included in
the formatting is when the entire \gls{gls} command has been
encapsulated.

\subsection{Middle Formatting}
\label{sec:middleformat}

The middle formatting comes between the outer formatting
(\sectionref{sec:glstextformat} above) and the \idx{innerformatting}
(\sectionref{sec:innertextformat} below).

The middle formatting is implemented by the entry format style
(\sectionref{sec:entryfmt}) for the \idx{glslike} commands or is
initialised by \gls{glsxtrassignfieldfont} for the \idx{glstextlike}
commands.

If you provide your own custom entry format style you will need to
add support for the middle formatting, if required.

\cmddef{glsxtrregularfont}
The command to use for regular entries. This is initialised to just
do its argument.

\cmddef{glsxtrabbreviationfont}
The command to use for abbreviations that considered non-regular
entries.

\mExampleref{ex:middleformat} has a regular entry (sample), a regular
abbreviation (radar, which uses \abbrstyle{short-nolong} the default
\cat{acronym} style), and a non-regular abbreviation (HTML, which
uses \abbrstyle{long-short} the default \cat{abbreviation} style):
\begin{codebox}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging}
\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{emph}\marg{\#1}}
\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\comment{}
 \cmd{textbf}\marg{\#1}}
\cbeg{document}
\gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{radar}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Middle formatting},
  label={ex:middleformat},
 description={Example document illustrating middle formatting
applied with \cmd{glsxtrregularfont} for regular entries and
\cmd{glsxtrabbreviationfont} for non-regular abbreviations}]
{%
\cmd{usepackage}\marg{glossaries-extra}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging}
\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{emph}\marg{\#1}}
\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textbf}\marg{\#1}}
}
{%
\gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{radar}.
}
\end{resultbox}
Note that even though radar is an abbreviation, it's considered a
regular entry because it uses a regular style.

\cmddef{glsxtrassignfieldfont}
This command is used by all the \idx{glstextlike} commands to
initialise the internal command used to encapsulate the field value.
This will either be set to \gls{glsxtrregularfont} (for regular
entries) or \gls{@firstofone} otherwise.

Note that this doesn't use \gls{glsxtrabbreviationfont}
as non-regular abbreviations are too complicated to work with
\gls{glstext}, \gls{glsfirst}, \gls{glsplural}, \gls{glsfirstplural}
or their case-changing variants. Instead, use the \idx{glslike}
commands or the abbreviation commands, such as \gls{glsxtrshort}.

\subsection{Inner Formatting}
\label{sec:innertextformat}

If you want to format the \idx{linktext}, the best method is to
either use the outer formatting or encapsulate the entire
\idx{glslike} or \idx{glstextlike} command, as described in
\sectionref{sec:glstextformat}.  However, there are some sensitive
commands that don't work if the command argument doesn't simply
contain text.

\begin{information}
Sometimes the issue may occur when the sensitive command that
needs to encapsulate \gls{gls} doesn't like boolean variables being
changed (which occurs when the \idx{firstuseflag} is unset). If this
is the case, you may want to consider buffering as an alternative
(see \sectionref{sec:unsetbuffer}).
\end{information}

For example, if the sample document \exampleref{ex:textformat} from
\sectionref{sec:glstextformat} is adjusted to include the \sty{soul}
package and the following line is added to the document:
\begin{codebox}
\gls{gls}\oarg{\glsoptval{textformat}{hl}}\marg{sample}
\end{codebox}
then the document build will fail with the error:
\begin{quote}
! Package soul Error: Reconstruction failed.
\end{quote}
Once solution is to do the following instead:
\begin{codebox}
\gls+{hl}\marg{\gls+{mbox}\marg{\gls{gls}\marg{sample}}}
\end{codebox}
This will now work, but the box will prevent hyphenation, so it's
only useful if the \idx{linktext} is short, such as a symbol. If the
\idx{linktext} is long (such as a phrase or the \idx{firstuse} of an
abbreviation), this method can produce undesirable results with
overfull or underfull lines.

The \idx{innerformatting} is designed to provide a workaround, but it
must be implemented deep within the entry style formatting. This
means that if you provide your own custom style, you will need to
add the appropriate commands if you want that style to support inner
formatting. You may also need to switch to using
\gls{MFUsentencecase} instead of \gls{makefirstuc} if any of the
\idx{sentencecase} commands are required:
\begin{codebox}[before upper app=\small]
\cmd{renewcommand}\marg{\gls{glssentencecase}}[1]\marg{\gls{MFUsentencecase}\marg{\#1}}
\end{codebox}
Although there's no guarantee that this will work for some
particularly problematic formatting commands.

With the default entry style, the above example can be changed to:
\begin{codebox}
\gls{gls}\oarg{\glsoptval{innertextformat}{hl}}\marg{sample}
\end{codebox}

\begin{warning}
The inner formatting may be split up in order to move them into the
arguments of internal commands, such as those used for
case-changing. This can result in unwanted side-effects.
\end{warning}

\mExampleref{ex:innerformat} uses \gls{fbox} (which draws a frame around its
argument) and \sty{soul}['s] \gls{so} (which spaces out the letters):
\begin{codebox}
\comment{requires glossaries.sty v4.50+ and mfirstuc v2.08+}
\cmd{renewcommand}\marg{\gls{glssentencecase}}[1]\marg{\gls{MFUsentencecase}\marg{\#1}}
\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging}
\cbeg{document}
\gls{Gls}\oarg{\glsoptval{innertextformat}{fbox}}\marg{radar}['s] system\cmd{ldots}
\codepar
\gls{Gls}\oarg{\glsoptval{innertextformat}{so}}\marg{radar}['s] system\cmd{ldots}
\codepar
\gls{fbox}\marg{\gls{Gls}\marg{radar}['s]} system\cmd{ldots}
\codepar
\gls{so}\marg{\gls+{mbox}\marg{\gls{Gls}\marg{radar}['s]}} system\cmd{ldots}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Inner formatting},
  label={ex:innerformat},
 description={Example document illustrating inner formatting}]
{%
\comment{requires glossaries.sty v4.50+ and mfirstuc v2.08+}
\cmd{usepackage}\marg{soul}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\cmd{renewcommand}\marg{\gls{glssentencecase}}[1]\marg{\gls{MFUsentencecase}\marg{\#1}}^^J%
\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging}
}
{%
\gls{Gls}\oarg{innertextformat=fbox}\marg{radar}['s] system\cmd{ldots}
\codepar
\gls{Gls}\oarg{innertextformat=so}\marg{radar}['s] system\cmd{ldots}
\codepar
\gls{fbox}\marg{\gls{Gls}\marg{radar}['s]} system\cmd{ldots}
\codepar
\gls{so}\marg{\gls{mbox}\marg{\gls{Gls}\marg{radar}['s]}} system\cmd{ldots}
}
\end{resultbox}
Note the fragmentation of the inner formatting. The use of
\gls{mbox} in the final line prevents an error but the letters aren't
spaced out. The only way to deal with this case is to use
\gls{glsdisp} or \gls{glslink} with the text explicitly written:
\begin{codebox}
\gls{glslink}\marg{radar}\marg{\gls{so}\marg{Radar's}} system\cmd{ldots}
\end{codebox}

\begin{warning}
The above example requires \sty{mfirstuc} v2.08+.
\end{warning}

Below are the commands used to support inner formatting.

\cmddef{glsxtrgenentrytextfmt}
This is the command that's used to encapsulate any content that
should have the \idx{innerformatting} applied. It should not be redefined
within the document as it's initialised within the
\idx{glslike} and \idx{glstextlike} commands. It's used within
\gls{glsgenentryfmt} and included in the helper commands used by the
predefined abbreviation styles.

Sometimes it may be necessary to include \gls{glsxtrgenentrytextfmt}
within the actual field value to ensure that it's as close as
possible to the text. This is performed automatically when an entry
is defined if the \catattr{encapinnerfmt} or
\catattr{encapnocaseinnerfmt} attributes are set. Note that even in
this case, fragmentation will occur with \idx{sentencecase} commands
like \gls{Gls} or with the insert optional argument, as in the above
example with \gls{fbox} and \gls{so}.

\cmddef{glsxtrdefaultentrytextfmt}
This is the default command that \gls{glsxtrgenentrytextfmt} will be
\gls{let} to within the \idx{glslike} and \idx{glstextlike} commands
before their options are processed. This simply does its argument
but may be redefined. (See \exampleref{ex:protectinnertextformat}.)

\cmddef{glsxtrattrentrytextfmt}
This command applies formatting according to whether or not the
\catattr{innertextformat} attribute is set. It isn't used by default as it
should rarely be needed and increases complexity. However, if you
would like to provide support for the \catattr{innertextformat} attribute,
you can redefine \gls{glsxtrdefaultentrytextfmt} to use
\gls{glsxtrattrentrytextfmt}:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}\marg{\comment{}
 \gls{glsxtrattrentrytextfmt}}
\end{codebox}

\begin{information}
This command expects the entry label to be stored in \gls{glslabel}
(from which it obtains the category label).
\end{information}

The \idx{glslike} commands use \gls{glsxtrgenentrytextfmt} within
\gls{glsgenentryfmt} for regular entries or within the
abbreviation style commands for non-regular abbreviations 
(see \sectionref{sec:entryfmt}).

The \idx{glstextlike} commands all essentially perform the following
steps:
\begin{enumerate}
\item Initialise the middle formatting command \meta{field-font-cs} used for
encapsulating the field with \gls{glsxtrassignfieldfont} (see
\sectionref{sec:middleformat}).

\item If \gls{glsifapplyinnerfmtfield} indicates that the field
value should be encapsulated by \gls{glsxtrgenentrytextfmt}, then
this essentially does (or appropriate case-change equivalent):
\begin{codebox}
\meta{field-font-cs}\marg{\cmd{glsaccessfmt\meta{field}}\margm{insert}\comment{}
 \marg{\gls{glsxtrgenentrytextfmt}}\margm{entry-label}\margm{internal-field}}
\end{codebox}
otherwise it does:
\begin{codebox}
\meta{field-font-cs}\marg{\cmd{glsaccess\meta{field}}\margm{entry-label}\comment{}
 \gls{glsxtrgenentrytextfmt}\margm{insert}}
\end{codebox}
(See \sectionref{sec:accsupp} for the \qt{access} commands.)
\end{enumerate}

For example, the \idx{linktext} for \gls{glstext} is:
\begin{compactcodebox}
\gls{glsifapplyinnerfmtfield}\margm{entry-label}\marg{text}\comment{}
\marg{\comment{}
 \meta{field-font-cs}\marg{\gls{glsaccessfmttext}\margm{insert}\comment{}
   \marg{\gls{glsxtrgenentrytextfmt}}\margm{entry-label}}\comment{}
}\comment{}
\marg{\comment{}
 \meta{field-font-cs}\marg{\gls{glsaccesstext}\margm{entry-label}\comment{}
   \gls{glsxtrgenentrytextfmt}\margm{insert}}\comment{}
}
\end{compactcodebox}
The \csfmt{glsaccessfmt\meta{field}} commands internally use
\gls{glsfmtfield} to apply the \idx{innerformatting}.

\cmddef{glsifapplyinnerfmtfield}
This determines whether or not the field identified by its
\idx{internalfieldlabel} for the given entry should have its value
encapsulated by the \idx{innerformatting} command. False indicates that
the field value already contains the \idx{innerformatting} command.

\cmddef{glsexclapplyinnerfmtfield}
Locally adds the given field identified by its
\idx{internalfieldlabel} to the exclusion list for the given entry.

\cmddef{glsfmtfield}
This command applies the formatting command \meta{cs} (which takes one
argument) to the entry's field value identified by the given
\idx{internalfieldlabel}, including \meta{insert} appended.
This ensures that the internal control sequence used to store the
field's value is expanded before \meta{cs} is applied.

\cmddef{Glsfmtfield}
As above but \idx{sentencecase}.

\cmddef{GLSfmtfield}
As above but \idx{allcaps}.

\subsection{Post Link Hook}
\label{sec:postlinkhook}

The \idx{postlinkhook} is a convenient way of automatically
appending content after each instant of the \idx{glslike} and
\idx{glstextlike} commands. The simplest method of implementing
this is with the \idx{catpostlinkhook}, which is only applied to
entries that have the given category. 

\mExampleref{ex:catpostlink}
places an asterisk (*) after all entries with the default
\cat{general} category:
\begin{codebox}
\gls{glsdefpostlink}\marg{\cat{general}}\marg{*}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{symbol}{X},
 \gloskeyval{description}{an example}}
\cbeg{document}
\gls{Gls}\marg{sample}, \gls{glstext}\marg{sample}, \gls{glsdesc}\marg{sample} 
and \gls{glssymbol}\marg{sample}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Category post-link hook},
  label={ex:catpostlink},
  description={Example document illustrating a simple category
post-link hook}]
{%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{glsdefpostlink}\marg{general}\marg{*}^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{symbol}{X},\gloskeyval{description}{an example}}
}
{%
\gls{Gls}\marg{sample}, \gls{glstext}\marg{sample}, 
\gls{glsdesc}\marg{sample} and \gls{glssymbol}\marg{sample}.
}
\end{resultbox}
Typically, the \idx{catpostlinkhook} is more likely to include some
conditional, such as to only insert text on \idx{firstuse}.
For example, \gls{glsxtrpostlinkAddDescOnFirstUse} can be used to
insert the description in parentheses after the \idx{firstuse}.

\begin{warning}
The \qt{post} abbreviation styles all set the \idx{catpostlinkhook},
which will overwrite any previous definition for the abbreviation's
category.
\end{warning}

Within the \idx{postlinkhook}, you can use the placeholder commands,
such as \gls{glslabel} (see \sectionref{sec:entryfmt}), but note
that you can't use \gls{ifglsused} to determine whether or not the
entry has been used, since the \idx{postlinkhook} comes after the
entry has been unset. Instead, use \gls{glsxtrifwasfirstuse}.
Additional commands provided for use within the
\idxpl{postlinkhook} are described in this section.

The \idx{postlinkhook} is implemented with \gls{glspostlinkhook},
which is defined by the base \sty{glossaries} package. It's used at
the end of the \idx{glslike} and \idx{glstextlike} commands. The
original base definition does nothing, but \sty{glossaries-extra}
redefines this:
\begin{compactcodebox}[before upper app=\small]
\cmd{renewcommand}*\marg{\gls{glspostlinkhook}}\marg{\comment{}
 \gls{ifglsentryexists}\marg{\gls{glslabel}}\marg{\gls{glsxtrpostlinkhook}}\marg{}\comment{}
}
\end{compactcodebox}
This uses:
\cmddef{glsxtrpostlinkhook}
which is the main \sty{glossaries-extra} \idx{postlinkhook}.

\begin{important}
If you are migrating over from only using the base \sty{glossaries} package and
you have redefined \gls{glspostlinkhook}, consider moving your
modifications to the \idx{catpostlinkhook} or prepend to \gls{glsxtrpostlink},
as some attributes and abbreviation styles rely on the features
provided by \gls{glsxtrpostlinkhook}.
\end{important}

The main \idx{postlinkhook} is defined as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrpostlinkhook}}\marg{\comment{}
 \gls{glsxtrdiscardperiod}\marg{\gls{glslabel}}\comment{}
 \marg{\gls{glsxtrpostlinkendsentence}}\comment{}
 \marg{\gls{glsxtrifcustomdiscardperiod}
  \marg{\gls{glsxtrifperiod}
    \marg{\gls{glsxtrpostlinkendsentence}}\comment{}
    \marg{\gls{glsxtrpostlink}}}\comment{}
  \marg{\gls{glsxtrpostlink}}\comment{}
 }\comment{}
}
\end{compactcodebox}
This checks if a following \idx{fullstop} needs to be
discarded and does the inner \idx{postlinkhook} \gls{glsxtrpostlink}.
Note that \gls{glsxtrdiscardperiod} and \gls{glsxtrifperiod} look
ahead for a following token, so if you need to modify this command,
insert your custom code at the start or add it to
the \idx{catpostlinkhook} instead.

\cmddef{glsxtrdiscardperiod}
This discards \meta{token} if it's a \idx{fullstop} and the 
entry's \idxpl{categoryattribute} indicate that a \idx{fullstop}
should be discarded (such as \catattr{discardperiod}). If the
punctuation character is discarded, this will then do
\meta{discarded}, otherwise it will do \meta{no discard} and process \meta{token} as
usual. If the \catattr{retainfirstuseperiod} attribute is set, then
the following command is used to determine whether or not to discard
\meta{token}.

\cmddef{glsxtrdiscardperiodretainfirstuse}
This was introduced in v1.49 and is defined as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrdiscardperiodretainfirstuse}}[3]\marg{\comment{}
 \gls{glsxtrifwassubsequentorshort}
   \marg{\gls{glsxtrifperiod}\marg{\#2}\marg{\#3}}\marg{\#3}\comment{}
}
\end{compactcodebox}
This will only discard the \idx{fullstop} if it follows the
\idx{subsequentuse} of a \idx{glslike} command or if it follows one
of the \gls{glsxtrshort} set of commands.
Note that this has a different effect from pre v1.49 with the
\idx{glstextlike} commands, but it's more appropriate since it's
typically only the short form that requires the period to be
discarded. To restore the original behaviour:
\begin{compactcodebox}
\cmd{renewcommand}*\marg{\gls{glsxtrdiscardperiodretainfirstuse}}[3]\marg{\comment{}
 \gls{glsxtrifwasfirstuse}\marg{\#3}\marg{\gls{glsxtrifperiod}\marg{\#2}\marg{\#3}}\comment{}
}
\end{compactcodebox}

If you want your own custom code to determine whether or not to check
for a period (instead of using known category attributes), you can
redefine:
\cmddef{glsxtrifcustomdiscardperiod}
This should expand to \meta{true} if a check should be performed,
otherwise it should expand to \meta{false}. The default definition
simply does \meta{false}.

\cmddef{glsxtrpostlinkendsentence}
This is done if a \idx{fullstop} is discarded. If there is a
\idx{catpostlinkhook} for the entry's category, that hook is
performed (\gls{glsxtrpostlinkcat} not \gls{glsxtrpostlink}) and the
\idx{fullstop} is put back followed by a space factor adjustment.
Otherwise, just the space factor adjustment is done.

The test to determine whether or not \meta{token} is a
\idx{fullstop} is determined by:
\cmddef{glsxtrifperiod}

It may be useful to test for other punctuation characters. For
example, styles such as \abbrstyle{short-postfootnote} will
move the footnote after certain punctuation characters.
\cmddef{glsxtrifnextpunc}
This does \meta{true} if it's followed by one of the set of
recognised punctuation characters, otherwise it does false. The set
is initialised to \code{.,:;?!} (\idx{fullstop}, comma, colon,
semi-colon, question mark, and exclamation mark).

A convenient way of moving code after the punctuation character is
to use:
\cmddef{glsxtrdopostpunc}
If \meta{token} is a recognised punctuation character,
this will place \meta{code} after the token, otherwise it will be
placed before the token.

\mExampleref{ex:catpostlinkpunc} adapts \exampleref{ex:catpostlink}
to put the asterisk after following punctuation:
\begin{codebox}
\gls{glsdefpostlink}\marg{\cat{general}}\marg{\gls{glsxtrdopostpunc}\marg{*}}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{symbol}{X},
 \gloskeyval{description}{an example}}
\cbeg{document}
\gls{Gls}\marg{sample}, \gls{glstext}\marg{sample}, 
(\gls{glsdesc}\marg{sample}) and \gls{glssymbol}\marg{sample}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Category post-link hook with punctuation
lookahead},
  label={ex:catpostlinkpunc},
  description={Example document illustrating a category
post-link hook that transfers content after a following punctuation
character}]
{%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrdopostpunc}\marg{*}}^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{symbol}{X},\gloskeyval{description}{an example}}
}
{%
\gls{Gls}\marg{sample}, \gls{glstext}\marg{sample}, 
(\gls{glsdesc}\marg{sample}) and \gls{glssymbol}\marg{sample}.
}
\end{resultbox}
Note that the asterisk isn't moved after the closing parenthesis.
This is because that character isn't included in the default list.

You can add additional punctuation marks with:
\cmddef{glsxtraddpunctuationmark}
You may list multiple characters at the same time to add a batch,
but don't add any separators (including spaces).

\begin{important}
Note that each character must be a single token, which means a single-byte
character for \pdfLaTeX.  Multi-byte characters (\idx{utf8}) will
required a native Unicode engine (\XeLaTeX\ or \LuaLaTeX).
\end{important}

For example:
\begin{codebox}
\gls{glsxtraddpunctuationmark}\marg{-'/}
\end{codebox}
This adds three extra punctuation marks (hyphen, apostrophe and
slash). Note that this doesn't allow for closing double-quotes and
will break \code{'{}'} (double apostrophe sequence for a closing
double-quote) if found. The following will only work with
\XeLaTeX\ or \LuaLaTeX:
\begin{unicodebox}
\cmd{usepackage}\marg{fontspec}
\cmd{usepackage}\marg{glossaries-extra}
\gls{glsxtraddpunctuationmark}\marg{\textrm{\textquotedblright}}
\end{unicodebox}


You can set the list with:
\cmddef{glsxtrsetpunctuationmarks}
This will remove the default set as well as any additional
characters. As above, each character must be a single token with no
separators in the list.
For example:
\begin{codebox}
\gls{glsxtrsetpunctuationmarks}\marg{.?!}
\end{codebox}
This sets the list to just three punctuation characters (so comma,
colon, and semi-colon are no longer recognised).

\cmddef{glsxtrpostlink}
This does the \idx{catpostlinkhook} (or nothing if it hasn't been
defined):
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrpostlink}}\marg{\comment{}
 \cmd{csuse}\marg{glsxtrpostlink\gls{glscategory}\marg{\gls{glslabel}}}\comment{}
}
\end{compactcodebox}
Customisation is best performed within the \idx{catpostlinkhook},
which can be defined (or redefined) with:
\cmddef{glsdefpostlink}
The first argument is the category label and the second is the code
to perform. Note that this doesn't check if the hook has already
been defined for the category. The hook is a command in the form
\gls{glsxtrpostlinkcat}. If the category label only consists
of letters, you can also use \gls{newcommand} or \gls{renewcommand}
instead.

\cmddef{glspretopostlink}
Similar to the above but prepends \meta{code} to the associated
hook (or simply defines it, if the hook doesn't already exist).

\cmddef{glsapptopostlink}
Similar to the above but appends \meta{code} to the associated
hook.

\begin{warning}
Take care not to choose category labels that will cause a conflict.
For example, \code{endsentence} and \code{hook} will conflict with
the commands \gls{glsxtrpostlinkendsentence} and \gls{glsxtrpostlinkhook}.
\end{warning}

If you want code in the \idx{postlinkhook} that's not dependent on
the category, consider prepending it to \gls{glsxtrpostlink} or
\gls{glsxtrpostlinkhook}. Don't append it to
\gls{glsxtrpostlinkhook} otherwise it will interfere with the
punctuation lookahead.

For convenience, some commands are provided that may be of use in
the \idx{catpostlinkhook}:

\cmddef{glsxtrpostlinkAddDescOnFirstUse}
This will add the \gloskey{description} in parentheses if the hook follows the 
\idx{firstuse} of the entry. This incorporates the inner formatting
and description accessibility support, if provided.

\cmddef{glsxtrpostlinkAddSymbolOnFirstUse}
This will add the \gloskey{symbol} in parentheses if that field is
set and the hook follows the \idx{firstuse} of the entry. This
incorporates the inner formatting and symbol accessibility support,
if provided.

\cmddef{glsxtrpostlinkAddSymbolDescOnFirstUse}
This will add the \gloskey{symbol}, if that field is set, and the
\gloskey{description} (both within the same set of parentheses), if the hook follows
the \idx{firstuse} of the entry. This incorporates the inner
formatting and accessibility support, if provided.
The separator between the symbol and description is given by:
\cmddef{glsxtrpostlinkSymbolDescSep}
The default is a comma followed by a space.

\mExampleref{ex:catpostlinkfirstuse} defines \idxpl{postlinkhook}
for \cat{general}, \cat{symbol} and \cat{number} categories:
\begin{codebox}
\gls{glsdefpostlink}\marg{\cat{general}}
 \marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\gls{glsdefpostlink}\marg{\cat{symbol}}
 \marg{\gls{glsxtrpostlinkAddSymbolOnFirstUse}}
\gls{glsdefpostlink}\marg{\cat{number}}
 \marg{\gls{glsxtrpostlinkAddSymbolDescOnFirstUse}}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}
\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{alpha},\gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{alpha}}},
 \gloskeyval{description}{a symbol},\gloskeyval{category}{\cat{symbol}}}
\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{name}{pi},\gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{pi}}},
 \gloskeyval{description}{a constant},\gloskeyval{category}{\cat{number}}}
\cbeg{document}
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{alpha}, \gls{gls}\marg{pi}.
\codepar
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{alpha}, \gls{gls}\marg{pi}.
\cend{document}
\end{codebox}

\begin{resultbox}
\createexample*[title={Category post-link hooks},
  label={ex:catpostlinkfirstuse},
 description={Example document that uses category post-link hooks to
append additional information after the link text on first use}]
{%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J%
\gls{glsdefpostlink}\marg{symbol}\marg{\gls{glsxtrpostlinkAddSymbolOnFirstUse}}^^J%
\gls{glsdefpostlink}\marg{number}\marg{\gls{glsxtrpostlinkAddSymbolDescOnFirstUse}}^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J%
\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{alpha},\gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{alpha}}},^^J%
 \gloskeyval{description}{a symbol},\gloskeyval{category}{symbol}}^^J%
\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{name}{pi},\gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{pi}}},^^J%
 \gloskeyval{description}{a constant},\gloskeyval{category}{number}}
}
{%
First use: \gls{gls}\marg{sample}, \gls{gls}\marg{alpha}, \gls{gls}\marg{pi}.
\codepar
Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{alpha}, \gls{gls}\marg{pi}.
}
\end{resultbox}

The following commands are also provided for use in the
\idx{postlinkhook}:

\cmddef{glsxtrcurrentfield}
This expands to empty if the calling command isn't associated with
one specific field (such as \gls{glslink}, the \idx{glslike}
commands, the \idx{inlinefullform} commands) otherwise it will
expand to the name of the key associated with the \emph{singular}
form of the command. For example, this command will expand to
\code{text} for both \gls{glstext} and \gls{glsplural}, to
\code{description} for both \gls{glsdesc} and \gls{glsdescplural}, and
to \code{short} for both \gls{glsxtrshort} and \gls{glsxtrshortpl}.
Whereas it will expand to nothing for both \gls{gls} and
\gls{glsxtrfull}.

\cmddef{glsxtrifwasglslike}
This expands to \meta{true} if the calling command was a \idx{glslike} command
and to \meta{false} otherwise.

\cmddef{glsxtrifwasglslikeandfirstuse}
This expands to \meta{true} if the calling command was a \idx{glslike} command
and was the \idx{firstuse} otherwise it expands to \meta{false}.
This is simply a shortcut command that uses both
\gls{glsxtrifwasglslike} and \gls{glsxtrifwasfirstuse}.

\cmddef{glsxtrifwassubsequentuse}
This expands to \meta{true} if the calling command was a \idx{glslike} command
and was the \idx{subsequentuse} otherwise it expands to \meta{false}.
This is simply a shortcut command that uses both
\gls{glsxtrifwasglslike} and \gls{glsxtrifwasfirstuse}.

\cmddef{glsxtrifwassubsequentorshort}
This expands to \meta{true} if the calling command was a \idx{glslike} command
and was the \idx{subsequentuse} or if the calling command set
\gls{glsxtrcurrentfield} to \code{short}. Otherwise it expands to
\meta{false}.

\cmddef{glsxtrifallcaps}
This simply does:
\begin{compactcodebox}
\gls{glscapscase}\margm{not all caps}\margm{not all caps}\margm{all caps}
\end{compactcodebox}
It's not usually necessary for the \idx{postlinkhook} to
differentiate between no case-change and \idx+{sentencecase}, so this
provides a convenient shortcut if only the \idx+{allcaps} case needs
to be different.

It's possible you may also want to reference the inserted material.
For the \idx{glslike} commands, this can be obtained with the
placeholder \gls{glsinsert}, but it's not normally set by the
\idx{glstextlike} commands, which don't use the entry format style
(\sectionref{sec:entryfmt}) and instead incorporate the inserted
material at the end of the \idx{linktext}. If you want the \idx{postlinkhook} to
be able to access the inserted material for the \idx{glstextlike}
commands, you must first save it, by redefining the following:

\cmddef{glsxtrsaveinsert}
This is used by the \idx{glstextlike} commands to initialise \gls{glsinsert}.
The default is:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrsaveinsert}}[2]\marg{\comment{}
 \cmd{def}\gls{glsinsert}\marg{}}
\end{compactcodebox}
For example, to always save the insert:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrsaveinsert}}[2]\marg{\comment{}
 \cmd{def}\gls{glsinsert}\marg{\#2}}
\end{codebox}
The first argument can be used to conditionally assign the insert.
For example, the following will only save it for entries with the
\cat{general} category:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrsaveinsert}}[2]\marg{\comment{}
 \gls{glsifcategory}\marg{\#1}\marg{\cat{general}}
  \marg{\cmd{def}\gls{glsinsert}\marg{\#2}}\comment{general}
  \marg{\cmd{def}\gls{glsinsert}\marg{}}\comment{not general}
}
\end{codebox}

If you only want to save the insert for the \gls{glsxtrfull} set of
commands, you can redefine \gls{glsxtrfullsaveinsert} instead (see
\sectionref{sec:abbrvfieldrefs}).

\cmddef{glsxtrassignlinktextfmt}
This contains the assignments required to ensure that \gls{glslabel},
\gls{glstextformat} and \gls{glsxtrgenentrytextfmt} have the
definitions they had within the \idx{linktext}. They would
ordinarily still have those definitions within the
\idx{postlinkhook}, but if, for example, the hook contains content
that may be deferred, such as a footnote, then judicious use and
expansion of \gls{glsxtrassignlinktextfmt} can allow the deferred
code to pick up the label, outer and inner formatting.

For example, the \idx{postlinkhook} might contain:
\begin{codebox}
\gls+{expandafter}\gls+{footnote}\gls{expandafter}
 \marg{\gls{glsxtrassignlinktextfmt}\gls{glstextformat}\marg{\comment{}
   \gls{Glsaccessfmtdesc}\marg{}\marg{\gls{glsxtrgenentrytextfmt}}
    \marg{\gls{glslabel}}}.}
\end{codebox}

\subsection{Entry Format Style}
\label{sec:entryfmt}

\begin{information}
This section is for advanced users. Minor modifications can be made
by adjusting the outer formatting (\sectionref{sec:glstextformat}),
the \idx{postlinkhook} (\sectionref{sec:postlinkhook}) or the
abbreviation style commands (\sectionref{sec:abbrvcmds}).
\end{information}

The \idx{glslike} commands have the \idx{linktext} set to the entry
format style corresponding to the entry's glossary \gloskey{type}.
This can be changed with \gls{defglsentryfmt}, but the default style
is given by \gls{glsentryfmt}, which is defined by the base
\sty{glossaries} package. This uses the placeholder commands
to determine the appropriate text. These are described in the
\sty{glossaries} manual, but to recap they are: \gls{glslabel} (the entry's label),
\gls{glscustomtext} (text provided by \gls{glsdisp} or empty
otherwise), \gls{glsinsert} (supplied in the final optional argument
except for \gls{glsdisp}, empty by default), \gls{glsifplural}, and
\gls{glscapscase}.

The \sty{glossaries-extra} package redefines \gls{glsentryfmt} to
test whether or not the entry is an abbreviation and, if so, whether
or not the entry should be treated as a regular entry:
\begin{compactcodebox}
\cmd{renewcommand}*\marg{\gls{glsentryfmt}}\marg{\comment{}
  \gls{ifglshasshort}\marg{\gls{glslabel}}
    \marg{\gls{glssetabbrvfmt}\marg{\gls{glscategory}\marg{\gls{glslabel}}}}\marg{}\comment{}
  \gls{glsifregular}\marg{\gls{glslabel}}\comment{}
  \marg{\gls{glsxtrregularfont}\marg{\gls{glsgenentryfmt}}}\comment{}
  \marg{\comment{}
    \gls{ifglshasshort}\marg{\gls{glslabel}}\comment{}
    \marg{\gls{glsxtrabbreviationfont}\marg{\gls{glsxtrgenabbrvfmt}}}\comment{}
    \marg{\gls{glsxtrregularfont}\marg{\gls{glsgenentryfmt}}}\comment{}
  }\comment{}
}
\end{compactcodebox}
This uses \gls{ifglshasshort} to determine whether or not the entry
is an abbreviation. If it is, then \gls{glssetabbrvfmt} is used to
setup the abbreviation style commands for the entry's category.

Then there's a check (with \gls{glsifregular}) to determine whether
or not the entry should be treated as a regular entry. Note that if
the \catattr{regular} attribute hasn't been set to \code{true}, the
entry will still be treated as a regular entry if it doesn't have
the \gloskey{short} field set.

Regular entries are formatted according to:
\cmddef{glsgenentryfmt}
This is the generic regular entry format. It's encapsulated with
\gls{glsxtrregularfont}, but note that if the entry is an
abbreviation, it will still use the abbreviation style formatting
commands, which are contained within the \gloskey{first},
\gloskey{firstplural}, \gloskey{text} and \gloskey{plural} field
values.

The generic regular entry format \gls{glsgenentryfmt} is provided by
the base \sty{glossaries} package, but is redefined by
\sty{glossaries-extra} to support inner formatting
(\sectionref{sec:innertextformat}) and accessibility
(\sectionref{sec:accsupp}), if required.

Abbreviations that aren't considered regular, are formatted
according to:
\cmddef{glsxtrgenabbrvfmt}
This is the generic non-regular abbreviation format. It's
encapsulated with \gls{glsxtrabbreviationfont}. Unlike \gls{glsgenentryfmt}
this doesn't reference the \gloskey{first}, \gloskey{firstplural},
\gloskey{text} or \gloskey{plural} fields, but instead uses the
abbreviation formatting commands \gls{glsxtrfullformat},
\gls{glsxtrsubsequentfmt} and their plural and case-changing variants.

If you want to define your own custom entry format, you will need to
consider whether or not your format should support regular and
non-regular abbreviation styles. Further detail can be found in the
documented code:
\texdocref{glossaries-extra-code}

\section{Hyperlinks}
\label{sec:hyper}

The \idx{glslike} and \idx{glstextlike} commands will automatically
create a hyperlink by default, if \sty{hyperref} has been loaded
(before \sty{glossaries}\slash \sty{glossaries-extra}). The
hyperlink can be switched off with \glsoptval{hyper}{false} but will
also be switched off if the entry was assigned to an
\idx{ignoredglossary} that was defined with the unstarred
\gls{newignoredglossary}.

\begin{information}
The \idx{linktext} refers to content produced by  
the \idx{glslike} and \idx{glstextlike} commands that has the
\emph{potential} to be a hyperlink. That is, if hyperlinks are
enabled that content will default to being the hyperlink text.
(The post-link text is additional content that may be automatically 
appended after the \idx{linktext}.)
The target is typically the entry's line in the \idx{glossary}
list or to its standalone definition (see \sectionref{sec:glossentry}).
Link counting (described in \sectionref{sec:linkcount}) counts the
number of instances of \idx{linktext} not the number of actual
hyperlinks.
\end{information}

The \optval{hyperfirst}{false} package option and the category attributes
\catattr{nohyper}, \catattr{nohyperfirst} and \catattr{nohypernext}
can also be used to automatically switch off the hyperlink.
See also the \glsopt{hyperoutside} option that determines whether
the hyperlink should be inside or outside of the outer formatting.

The target for an entry with the label \meta{entry-label} is in the
form \meta{prefix}\meta{entry-label}. The \meta{prefix} is normally
\gls{glolinkprefix} but may be changed with the \printglossopt{prefix}
option when displaying the \idx{glossary}.
The target can also be changed to a link to an external file with
the \catattr{targeturl} category attribute.

The hyperlink target is usually created by \gls{glstarget} which is
used by all the predefined \idxpl{glossarystyle} and by the standalone
commands, such as \gls{GlsXtrStandaloneEntryName}. This can result
in duplicate targets if you have multiple \idxpl{glossary} or both
standalone entries and a \idx{glossary}. There are ways of getting
around this, such as changing the target prefix or using 
\printglossoptval{target}{false} when displaying the \idx{glossary}.

Another option is to replace all instances of \gls{glstarget} with:
\cmddef{glsxtrtarget}
This can simply be done by redefining \gls{glstarget} to use
\gls{glsxtrtarget}.
For example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glstarget}}\marg{\gls{glsxtrtarget}}
\end{codebox}
Note that it won't work to have some instances of the original
\gls{glstarget} and then switch to \gls{glsxtrtarget}, as then it
won't have a record of the targets that have already been created.

This new command behaves in a similar manner to \gls{glstarget} but first tests
the field obtained by expanding:
\cmddef{glsxtrtargetfield}
By default, this expands to \fieldfmt{target}. If this field is
undefined (according to \gls{GlsXtrIfFieldUndef}) the target will be
created in the way that \gls{glstarget} would ordinarily create it
(if hyperlinks are enabled). The field will then be set to the
target. If the field has been defined then the target won't be
created, in which case the fallback action is implemented with:
\cmddef{glsxtrtargetdup}
This simply expands to \meta{text} by default. The following will
instead create a link back to the actual target:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrtargetdup}}[2]\marg{\gls{glslink}\marg{\#1}\marg{\#2}}
\end{codebox}

\section{Label Prefixes}
\label{sec:labelprefixes}

It's possible that you may want to prefix labels to ensure
uniqueness. For example, this manual references both the
\gls{makeglossaries} command and the \app{makeglossaries} Perl
script. They are both defined as \idx{glossary} entries, but they
can't both have the label \code{makeglossaries}. This manual uses
\app{bib2gls} and is quite complicated, but a simplified version is
as follows:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{csfmt}}[1]\marg{\cmd{texttt}\marg{\glsbackslash\#1}}
\cmd{newcommand}\marg{\cmd{appfmt}}[1]\marg{\cmd{texttt}\marg{\#1}}
\gls{newglossaryentry}\marg{cs.makeglossaries}\marg{
 \gloskeyval{name}{\cmd{csfmt}\marg{makeglossaries}},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{app.makeglossaries}\marg{
 \gloskeyval{name}{\cmd{appfmt}\marg{makeglossaries}},
 \gloskeyval{description}{}}
\end{codebox}
So the label \code{cs.makeglossaries} refers to \gls{makeglossaries}
(the command sequence)
and the label \code{app.makeglossaries} refers to \app{makeglossaries}
(the application).
If you have a lot of prefixes like this, you may prefer to have a
command that automatically adds the prefix.  For example,
\begin{codebox}
\cmd{newcommand}*\marg{\cmd{cs}}[2][]\marg{\gls{gls}\oarg{\#1}\marg{cs.\#2}}
\end{codebox}
The problem with this is that the custom command \csfmt{cs}
doesn't allow for the \cmdmod+{star}, \cmdmod+{plus} and
\cmdmod+{alt-mod} modifiers (such as \code{\gls{gls}*} or \code{\gls{gls}+}).
Instead you can use:
\cmddef{glsxtrnewgls}
which defines the command
\begin{compactcodebox}
\meta{cs}\meta{modifier}\oargm{options}\margm{entry-label}\oargm{insert}
\end{compactcodebox}
that behaves like
\begin{compactcodebox}
\gls{gls}\meta{modifier}\oarg{\meta{default options},\meta{options}}\marg{\meta{prefix}\meta{entry-label}}\oargm{insert}
\end{compactcodebox}
For example:
\begin{codebox}
\gls{glsxtrnewgls}\marg{cs.}\marg{\cmd{cs}}
\end{codebox}
or (to default to no hyperlinks)
\begin{codebox}
\gls{glsxtrnewgls}\oarg{\glsoptval{hyper}{false}}\marg{sym.}\marg{\cmd{cs}}
\end{codebox}
now you can use \code{\cmd{cs}+\marg{M}} to behave like \code{\gls{gls}+\marg{cs.M}}.

If you also want the plural and \idx{sentencecase}
versions you can use
\cmddef{glsxtrnewglslike}
For example:
\begin{codebox}
\gls{glsxtrnewglslike}\oarg{\glsoptval{hyper}{false}}\marg{idx.}\marg{\cmd{idx}}\marg{\cmd{idxpl}}\marg{\cmd{Idx}}\marg{\cmd{Idxpl}}
\end{codebox}
For the \idx{allcaps} versions:
\cmddef{glsxtrnewGLSlike}
For example:
\begin{codebox}
\gls{glsxtrnewGLSlike}\oarg{\glsoptval{hyper}{false}}\marg{idx.}\marg{\cmd{IDX}}\marg{\cmd{IDXpl}}
\end{codebox}

For commands that require the link text to be specified, you can use:
\cmddef{glsxtrnewglslink}
which defines
\code{\meta{cs}\oargm{options}\margm{label}\margm{text}} to behave
like
\code{\gls{glslink}\oarg{\meta{default-options}\dcomma \meta{options}}\marg{\meta{prefix}\meta{label}}\margm{text}},
or
\cmddef{glsxtrnewglsdisp}
which defines
\code{\meta{cs}\oargm{options}\margm{label}\margm{text}} to behave
like
\code{\gls{glsdisp}\oarg{\meta{default-options}\dcomma \meta{options}}\marg{\meta{prefix}\meta{label}}\margm{text}}.

If you are using \app{bib2gls}, it can pick up the custom commands
that are defined using the above, so it can detect dependencies when
it parses fields such as \gloskey{description}.
If you provide your own custom command with just
\gls{newcommand} that has syntax that starts with
\oargm{options}\margm{entry-label}, then you can notify \app{bib2gls} using:
\cmddef{glsxtridentifyglslike}
where \meta{label-prefix} is the prefix to apply to the label that's
passed to the command \meta{cs}. The information is written to the
\ext{aux} file so that \app{bib2gls} can add the given
command to those it looks for when searching for dependencies.

Another possibility when using \app{bib2gls} is to set up known
label prefixes, see \sectionref{sec:dgls} for further details.

If you use \app{bib2gls} with record counting, there are 
commands to \gls{glsxtrnewgls} for \gls{rgls}:
\cmddef{glsxtrnewrgls}
and for \gls{rgls}, \gls{rglspl}, \gls{rGls} and \gls{rGlspl}:
\cmddef{glsxtrnewrglslike}
and for \idx{allcaps}:
\cmddef{glsxtrnewrGLSlike}

Defining commands in this manner (rather than simply using
\csfmt{newcommand}) also allows the command to be identified as a
\idx{sentencecase} blocker to prevent the label from being converted
or, in the case of \gls{glsxtrnewglslike} and
\gls{glsxtrnewrglslike}, as a mapping. See
\sectionref{sec:casechange} for further details.


\section{Indexing}
\label{sec:wrglossary}

\Idx{indexing} is normally performed implicitly by the \idx{glslike}
and \idx{glstextlike} commands, but this action can be prevented,
such as by using the option \glsoptval{noindex}{true}. These commands also
generate text (the \idx{linktext}, \sectionref{sec:entryfmtmods}).
If you want to simply index an entry (to ensure that an entry is
shown in the \idx{glossary}) without producing any text then you can use 
\gls{glsadd}. \Idx{indexing} is also performed by cross-referencing
commands, such as \gls{glssee}. In the case of \app{makeindex},
\gls{glssee} simply behaves like \gls{glsadd} with a special format
and the \location\ set to Z (which pushes it to the end of the
\idx{locationlist}). Entries in \idxpl{ignoredglossary} can only be
\indexed\ with \app{bib2gls}.

If you want \emph{all} defined entries to appear in the
\idx{glossary}, regardless of whether or not they have been used in
the document, then you can use \gls{glsaddall} or \gls{glsaddallunused}
(both provided by the base \sty{glossaries} package). These both
iterate over all entries (in all non-\idxpl{ignoredglossary}). In
the first case (\gls{glsaddall}), every entry is \indexed\ with the
\gls{glsadd} options provided in the optional argument of
\gls{glsaddall}. In the second case (\gls{glsaddallunused}), only
those entries that haven't been marked as \idxc{firstuseflag}{used}
so far will be indexed using
\code{\gls{glsadd}\oarg{\glsoptval{format}{glsignore}}\margm{label}}.
See the \sty{glossaries} manual for further details of those
commands.

The \sty{glossaries-extra} package provides a similar command:
\cmddef{glsaddallunindexed}
This is like \gls{glsaddallunused} but indexes all entries that
haven't been \indexed\ so far (again using the option \glsoptval{format}{glsignore}).
This is preferable to \gls{glsaddallunused} if you have to reset the
\idx{firstuseflag} for any entries. As with \gls{glsaddallunused},
if this command is required, it should be placed near the end of the
document. Indexing any entries after either of these commands are
used will cause spurious commas in the \idxpl{locationlist}.

\begin{important}
Iterative commands such as \gls{glsaddall}, \gls{glsaddallunused} 
and \gls{glsaddallunindexed}
should not be used with \app{bib2gls}. Use the 
\resourceoptval{selection}{all} option instead.
\end{important}

If you want to index a specific subset of entries, rather than all
entries for a given glossary, you can use:
\cmddef{glsaddeach}
This does \code{\gls{glsadd}\oargm{options}\margm{entry-label}} for
each entry in the comma-separated \meta{entry label list}. This
command may be used with \app{bib2gls}, although it may be simpler
to adjust the selection criteria or use filtering.

Explicit ranges can be formed by including \sym{startrange} and 
\sym{endrange} at the start of the \glsopt{format} value. For
example:
\begin{codebox}
\gls{glsadd}\oarg{\glsoptval{format}{\sym{startrange}}}\marg{example}
\ldots 
\gls{glsadd}\oarg{\glsoptval{format}{\sym{endrange}}}\marg{example}
\end{codebox}
(See the \sty{glossaries} manual for further details.) However, the
isolated open and close parentheses can upset syntax highlighting.
So the \sty{glossaries-extra} package provides the following
commands, which automatically add \sym{startrange} and
\sym{endrange}.

\cmddef{glsstartrange}
This effectively does:
\begin{compactcodebox}
\gls{glsaddeach}\oarg{\meta{options},\glsoptval{format}{\sym{startrange}\meta{encap}}}\margm{entry-label list}
\end{compactcodebox}

\cmddef{glsendrange}
This effectively does:
\begin{compactcodebox}
\gls{glsaddeach}\oarg{\meta{options},\glsoptval{format}{\sym{endrange}\meta{encap}}}\margm{entry-label list}
\end{compactcodebox}
The default value of \meta{encap} will be the same as the default
number format (which can be changed with
\gls{GlsXtrSetDefaultNumberFormat}). If you want a different default
for ranges, use:
\cmddef{GlsXtrSetDefaultRangeFormat}
This sets the default format for \gls{glsstartrange} and
\gls{glsendrange}. Note that this format won't be applied if you
explicitly create a range with \gls{glsadd} or \gls{glsaddeach}.

Alternatively, you can use \glsoptval{format}{\meta{encap}} in
\meta{options}, but remember that this will need to be the same in
both \gls{glsstartrange} and \gls{glsendrange}. For example:
\begin{codebox}
\gls{glsstartrange}\oarg{\glsoptval{format}{\encap{hyperbf}}}\marg{example}
\ldots 
\gls{glsendrange}\oarg{\glsoptval{format}{\encap{hyperbf}}}\marg{example}
\end{codebox}
This is the same as:
\begin{codebox}
\gls{GlsXtrSetDefaultRangeFormat}\marg{\encap{hyperbf}}
\gls{glsstartrange}\marg{example}
\ldots 
\gls{glsendrange}\marg{example}
\end{codebox}
which is the same as:
\begin{codebox}
\gls{glsadd}\oarg{\glsoptval{format}{\sym{startrange}\encap{hyperbf}}}\marg{example}
\ldots 
\gls{glsadd}\oarg{\glsoptval{format}{\sym{endrange}\encap{hyperbf}}}\marg{example}
\end{codebox}

The mandatory argument of \gls{glsstartrange} and \gls{glsendrange}
may be a comma-separated list of entry labels. For example:
\begin{codebox}
\gls{glsstartrange}\marg{duck,goose}
\ldots 
\gls{glsendrange}\marg{duck,goose}
\end{codebox}
This is essentially the same as:
\begin{codebox}
\gls{glsadd}\oarg{\glsoptval{format}{\sym{startrange}}}\marg{duck}\comment{}
\gls{glsadd}\oarg{\glsoptval{format}{\sym{startrange}}}\marg{goose}
\ldots 
\gls{glsadd}\oarg{\glsoptval{format}{\sym{endrange}}}\marg{duck}\comment{}
\gls{glsadd}\oarg{\glsoptval{format}{\sym{endrange}}}\marg{goose}
\end{codebox}

\cmddef{GlsXtrAutoAddOnFormat}
This will make the \idx{glslike} and \idx{glstextlike} commands
automatically use \code{\gls{glsadd}\oargm{gls\-add
options}\margm{entry-label}} whenever a \idx{glslike} or
\idx{glstextlike} command is used when the \glsopt{format} matches
one of the formats in the comma-separated \meta{format list}.

The optional argument \meta{entry-label} defaults to \gls{glslabel} (which
will match the \meta{label} that was used with the triggering 
\code{\gls{gls}\margm{label}} etc) and
indicates the entry label to use in \gls{glsadd} and so needs to be
expandable. The \meta{format list} is a comma-separated list
of format values that will trigger the automated adding. The
\meta{glsadd options} are the options to pass to \gls{glsadd} with
\glsoptval{format}{\meta{format}} prepended to the list.

For example, with:
\begin{codebox}
\gls{GlsXtrAutoAddOnFormat}\marg{hyperbf}\marg{\glsoptval{counter}{chapter}}
\end{codebox}
then \code{\gls{gls}\oarg{\glsoptval{format}{hyperbf}}\marg{sample}}
will be equivalent to:
\begin{compactcodebox}
\gls{glsadd}\oarg{\glsoptval{format}{hyperbf},\glsoptval{counter}{chapter}}\marg{sample}\gls{gls}\oarg{\glsoptval{format}{hyperbf}}\marg{sample}
\end{compactcodebox}
Note that the explicit range markers will prevent a match
unless you include them in \meta{format list} (in which case, be
sure to add both the start and end formats).

Here's another example:
\begin{codebox}
\gls{GlsXtrAutoAddOnFormat}\oarg{dual.\gls{glslabel}}\marg{hyperbf}\marg{}
\end{codebox}
In this case
\code{\gls{gls}\oarg{\glsoptval{format}{hyperbf}}\marg{sample}} will
now be equivalent to:
\begin{codebox}
\gls{glsadd}\oarg{\glsoptval{format}{hyperbf}}\marg{dual.sample}\gls{gls}\oarg{\glsoptval{format}{hyperbf}}\marg{sample}
\end{codebox}

\begin{important}
\gls{GlsXtrAutoAddOnFormat} is not applied to \gls{glsadd}
as it could cause an infinite loop.
\end{important}

The effects of \gls{GlsXtrAutoAddOnFormat} can be cleared with:
\cmddef{GlsXtrClearAutoAddOnFormat}
Both commands perform local redefinitions and so may be scoped.

In the context of \sty{glossaries} and \sty{glossaries-extra}, \idx{indexing} 
refers to the mechanism used to ensure that an entry
is included in its associated glossary. (If you also want to use
\gls{index}, see \sectionref{sec:autoindex}.) This includes any entries
that simply cross-reference another entry. The default is to use
\app{makeindex}, which is a general purpose \idx{indexingapp}. Each
time an entry is \indexed, a line is added to an associated file
that contains the \idx{indexing} information, which includes the
sort value, the \idxc{hierarchicallevel}{hierarchical information}
(if the entry has a parent) and an associated \location\ (the page
number, by default). This information is used to sort the entries
and collate the \locations\ into a compact \idx{locationlist}.  The
\opt{xindy} package option switches to using \app{xindy} syntax, but
the process is much the same.

Since both \app+{makeindex} and \app+{xindy} are general purpose
\idxpl{indexingapp} they require an associated \location\ (or a
cross-reference) since indexes are typically used to lookup the
\locations\ in the document where the term occurs. Although
\idxpl{glossary} are similar to indexes they can simply be used to provide
brief summaries of each term without any \locations. The way that
\app{makeindex} and \app{xindy} work means that valid \locations\
(that is, \locations\ that conform to
\app{makeindex}\slash\app{xindy} syntax) must be supplied even if no
\idx{locationlist} is required. If an invalid \location\ is used, an
error will occur during the \app{makeindex}\slash\app{xindy} step in
the build process, even if the \location\ will eventually be ignored
when typesetting the \idx{glossary}.

All \idxpl{locationlist} can be suppressed with the
\opt{nonumberlist} option (which simply discards the
\idx{locationlist} for each entry), but there are occasions where
only some \locations\ need to be suppressed. The main way of hiding
a \location\ is to encapsulate the \location\ with a command that
does nothing. The \gls{glsignore} command is used for this purpose
(\glsoptval{format}{glsignore}).  However, it's important to
remember that even though the \location\ isn't shown, it's still
present in the \idx{locationlist}. This means that you will end up
with spurious commas if there's more than one item in the
\idx{locationlist}.

The \qt{noidx} method similarly writes indexing information, but in this case
the information is written to the \ext{aux} file. Again, empty locations can
cause spurious commas in the \idxpl{locationlist}.

The only method that recognises \gls{glsignore} as a special
\qt{\idx{ignoredlocation}} is \app{bib2gls}, where this format will trigger the
entry's selection but won't add the \idx{ignoredlocation} to the
\idx{locationlist}. This avoids the problem of spurious commas
caused by invisible locations.

The \location\ corresponds to a counter. The default is the
\ctr{page} counter, but may be changed with the \opt{counter}
package option, the \meta{counter} optional argument of
\gls{newglossary}, the \gloskey{counter} key when defining an entry,
or the \glsopt{counter} option when \idx{indexing} an entry.

Note that \app{bib2gls} v3.0+ converts an empty \location\
(which can occur when the \idx{locationcounter} is 0 and should be
formatted as a Roman numeral) to an \idx{ignoredlocation}.
For example, if you use \optval{counter}{\ctr{part}} but have \gls{gls}
before the first \gls{part}. An empty \location\ will trigger an
error with \app{makeindex} and \app{xindy}.

\begin{warning}
Since no entries are defined on the first \LaTeX\ run with
\app{bib2gls}, there's no way of determining the entry's
\idx{glossary} \gloskey{type} or of finding if the entry's \gloskey{counter}
key has been set. This means that if the counter has been assigned
to either the entry's \idx{glossary} or to the entry itself, the
\idx{locationcounter} can't be implemented until the entry has
been defined. A second build is required to ensure that the
\locations\ use the correct counter.
\end{warning}

The \idx{locationcounter} must expand to syntax that's recognised by the
\idx{indexingapp}. This is very restrictive with \app{makeindex},
which only recognises Western Arabic (\gls{arabic}), 
\idx{lowercase} Roman numerals (\gls{roman}), 
\idx{uppercase} Roman numerals (\gls{Roman}), 
\idx{lowercase} Basic Latin (\gls{alph}) and
\idx{uppercase} Basic Latin (\gls{Alph}), with optionally a
separator (hyphen by default). With \app{xindy}, the syntax must be
defined (see the \sty{glossaries} manual for further details).

There's no restriction on the location syntax with \app{bib2gls}.
The only limitation is that if \app{bib2gls} can't determine an
associated numeric value according to its location parser, it won't form ranges.
This means that with \app{bib2gls}, you can set arbitrary text as
the \location\ (that's not related to a counter) with \glsopt{thevalue}.
You can also use \glsopt{thevalue} with \app{makeindex} and
\app{xindy}, but only if the value matches the required \location\
syntax.

Both \app{makeindex} and \app{xindy} order the \locations\ in the \idxpl{locationlist}.
\mExampleref{ex:mkidxloclistorder} demonstrates this:
\begin{codebox}
\gls{makeglossaries}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{an example}}
\cbeg{document}
\gls{gls}\oarg{\glsoptval{thevalue}{Z}}\marg{sample} (Z),  \gls{gls}\oarg{\glsoptval{thevalue}{4}}\marg{sample} (4),
\gls{gls}\oarg{\glsoptval{thevalue}{xi}}\marg{sample} (xi), \gls{gls}\oarg{\glsoptval{thevalue}{2}}\marg{sample} (2),
\gls{gls}\oarg{\glsoptval{thevalue}{iii}}\marg{sample} (iii), \gls{gls}\oarg{\glsoptval{thevalue}{A}}\marg{sample} (A).
\codepar
\gls{printglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
  label={ex:mkidxloclistorder},
title={Location list ordering (\appfmt{makeindex})},
description={Example document with contrived locations that result
in an ordered location list consisting of iii, xi, 2, 4, A, Z}]
{%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{makeglossaries}^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}
}
{%
\gls{gls}\oarg{thevalue=Z}\marg{sample} (Z),  \gls{gls}\oarg{thevalue=4}\marg{sample} (4),^^J%
\gls{gls}\oarg{thevalue=xi}\marg{sample} (xi), \gls{gls}\oarg{thevalue=2}\marg{sample} (2),^^J%
\gls{gls}\oarg{thevalue=iii}\marg{sample} (iii), \gls{gls}\oarg{thevalue=A}\marg{sample} (A).^^J%
\gls{printglossaries}
}
\end{resultbox}

With \app{makeindex}, the \idx{locationlist} is grouped into the
different number formats (\gls{roman}, \gls{arabic} and \gls{Alph}),
with each group ordered numerically. The same result can be produced
with \app{xindy} by adding the \opt{xindy} package option to the
above example.

With \app{bib2gls}, the \idx{locationlist} is always in order of
\idx{indexing}.
\mExampleref{ex:b2gloclistorder} adapts \exampleref{ex:mkidxloclistorder}
to use \app{bib2gls}:
\begin{codebox}
\cbeg{filecontents*}\marg{\cmd{jobname}.bib}
\atentry{entry}\marg{sample,\gloskeyval{name}{sample},
 \gloskeyval{description}{an example}}
\cend{filecontents*}
\cmd{usepackage}[\opt{record}]\marg{glossaries-extra}
\gls{GlsXtrLoadResources}
\cbeg{document}
\gls{gls}\oarg{\glsoptval{thevalue}{Z}}\marg{sample} (Z),  \gls{gls}\oarg{\glsoptval{thevalue}{4}}\marg{sample} (4),
\gls{gls}\oarg{\glsoptval{thevalue}{xi}}\marg{sample} (xi), \gls{gls}\oarg{\glsoptval{thevalue}{2}}\marg{sample} (2),
\gls{gls}\oarg{\glsoptval{thevalue}{iii}}\marg{sample} (iii), \gls{gls}\oarg{\glsoptval{thevalue}{A}}\marg{sample} (A).
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,bib2gls,pdflatex,pdfcrop},
  label={ex:b2gloclistorder},
title={Location list ordering (\appfmt{bib2gls})},
description={Example document with contrived locations that result
in a location list consisting of Z, 4, xi, 2, ii, A, which
corresponds to the record order}]
{%
\cbeg{filecontents*}\marg{\cmd{jobname}.bib}^^J%
@entry\marg{sample,name=\marg{sample},description=\marg{an example}}^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[record]\marg{glossaries-extra}^^J%
\gls{GlsXtrLoadResources}
}
{%
\gls{gls}\oarg{thevalue=Z}\marg{sample} (Z),  \gls{gls}\oarg{thevalue=4}\marg{sample} (4),^^J%
\gls{gls}\oarg{thevalue=xi}\marg{sample} (xi), \gls{gls}\oarg{thevalue=2}\marg{sample} (2),^^J%
\gls{gls}\oarg{thevalue=iii}\marg{sample} (iii), \gls{gls}\oarg{thevalue=A}\marg{sample} (A).^^J%
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}

These examples are contrived. For most documents, the order of \idx{indexing}
will likely match the desired \idx{locationlist} order.

Another important difference between \app{bib2gls} and the other
indexing methods is the treatment of cross-references identified by
the cross-reference keys \gloskey{see}, \gloskey{seealso} and
\gloskey{alias}. With \app{bib2gls}, the cross-referencing
information is picked up when \app{bib2gls} parses the \ext{bib}
file and is used to establish dependencies, which ensures that when
entries with cross-references are selected, their cross-referenced
entries will also be selected.

With the other methods, cross-references are added to an entry's
\idx{locationlist} by \idx{indexing} the entry with a special
format. The \gloskey{see}, \gloskey{seealso} and \gloskey{alias}
keys automatically trigger this \idx{indexing} unless
\optval{autoseeindex}{false}. See \sectionref{sec:xr} for further
details.

Every time an entry is \indexed, the following hook is also used:
\cmddef{glsxtrdowrglossaryhook}
This does nothing by default. The argument is the entry's label.

The \idx{indexing} code is encapsulated with:
\cmddef{glsencapwrcontent}
This adds grouping, which helps to prevent spacing issues caused by
the \idx{whatsit} that's created by the \idx{indexing}.

The base \sty{glossaries} package always performs the \idx{indexing}
before the \idx{linktext} for the \idx{glslike} and \idx{glstextlike}
commands. This means that if a page break occurs in the middle of
the \idx{linktext}, the \location\ will refer to the page number at
the start of the \idx{linktext} (assuming the default \ctr{page}
\idx{locationcounter}). With \sty{glossaries-extra}, you can use the
option \glsoptval{wrgloss}{after} to have the \idx{indexing} occur after
the \idx{linktext}. The \catattr{wrgloss} attribute can also be
used. The default setting is initialised with \gls{glsxtrinitwrgloss}
(see \sectionref{sec:defaultglsopts}).

Every time an entry is \indexed, an \idx{internalfield} associated with the entry's
label is globally updated to keep a count of the number of times the entry has
been \indexed. The value can be accessed with:
\cmddef{glsentryindexcount}
This command will expand to 0 if the entry hasn't been \indexed\ or hasn't been
defined.  To test if the value is greater than 0 (that is, to test if the entry has been
\indexed\ yet), use:
\cmddef{glsifindexed}
This expands to \meta{true} if the entry is defined and has been \indexed,
otherwise it expands to \meta{false}. No warning or error occurs if
the entry hasn't been defined.

Note that the index count is a running total. This is not the same as the
\record\ count saved by \app{bib2gls}['s] \switch{record-count}
switch, which represents the total number of \records\ for the given
entry from the previous \LaTeX\ run.

The base \sty{glossaries} package defines:
\cmddef{glswriteentry}
This command conditionally writes the indexing code (supplied by the second
argument \meta{code}).
The original definition simply tests whether or not the \opt{indexonlyfirst} setting
is on. The \sty{glossaries-extra} package redefines this command to perform additional
checks to determine whether or not the \idx{indexing} code should be performed.

The modified definition uses:
\cmddef{glsxtrifindexing}
to test the \glsopt{noindex} setting. This does \meta{false} if
\glsoptval{noindex}{true}, otherwise it does \meta{true}.
\cmddef{ifglsindexonlyfirst}
This is a conditional that corresponds to the \opt{indexonlyfirst}
package option.  \Idx{firstuse} is tested using
\gls{GlsXtrIfUnusedOrUndefined} rather than \gls{ifglsused}. The
\catattr{indexonlyfirst} attribute is also tested. If the
\qt{index only first} setting is on and the entry has been
\idxc{firstuseflag}{used}, \meta{code} isn't performed but
auto-indexing via \gls{glsxtrdoautoindexname} is still performed
(see \sectionref{sec:autoindex}).

\begin{warning}
Since no entries are defined on the first \LaTeX\ run with
\app{bib2gls}, there's no way of keeping track of whether or not an
entry has been used or what its \gloskey{category} is, which is required to
query the \catattr{indexonlyfirst} attribute, so for the first
document build all instances will be \indexed. A second build is
required for the \qt{index only first} feature.
\end{warning}

\section{Cross-Referencing}
\label{sec:xr}

The base \sty{glossaries} package only provides the \gloskey{see}
key, which automatically \idxc{indexing}{indexes} the cross-reference using
\gls{glssee}. The value of this key isn't saved and can't be
accessed later. (The key was simply provided as a shortcut.) 
The \idx{indexing} ensures that the cross-reference is
shown in the \idx{locationlist}.

\begin{important}
The auto-indexing feature of the \gloskey{see} key was intended as a
shortcut where only entries required in the document are defined.
If you want to have a large file containing entries that may or may not
be required in the document, then using \gloskey{see},
\gloskey{seealso} or \gloskey{alias} can cause unwanted entries to
appear in the glossary. In this case, see
\sectionref{sec:seenoindex}.
\end{important}

The \sty{glossaries-extra} package saves the value of the
\gloskey{see} key and additionally provides the \gloskey{seealso}
and \gloskey{alias} keys that perform similar functions. The values
of the \gloskey{see}, \gloskey{seealso} and \gloskey{alias} keys can
all be accessed at a later point in the document.

If an entry with a cross-reference has been included in the
glossary, there's no guarantee that the cross-referenced entry will
also be included. It won't be included if it hasn't been indexed
anywhere in the document. You can use the \opt{indexcrossrefs}
package option to search for cross-references that require \idx{indexing}
at the end of the document, but note that this can be time-consuming
if you have a large number of entries. 

\begin{information}
With \app{bib2gls} you can simply change the selection criteria
(\resourceoptvalm{selection}{recorded and deps and see} or
\resourceoptvalm{selection}{recorded and deps and see not
also}) to ensure that all cross-referenced entries are included even
if they haven't been \indexed\ in the document.
\end{information}


Example (\gloskey{see} and \gloskey{seealso} keys):
\begin{codebox}
\gls{newglossaryentry}\marg{pumpkin}\marg{\gloskeyval{name}{pumpkin},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{cucumber}\marg{\gloskeyval{name}{cucumber},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{melon}\marg{\gloskeyval{name}{melon},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},
 \gloskeyval{description}{},
 \gloskeyval{see}{pumpkin,cucumber,melon}}
\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{marrow}\marg{\gloskeyval{name}{marrow},
 \gloskeyval{description}{},
 \gloskeyval{seealso}{courgette}}
\end{codebox}
When the \code{gourd} entry is defined, the cross-reference will
automatically be \indexed\ using \gls{glssee}. This means that the
\code{gourd} entry will appear in the glossary, regardless of
whether or not it is used in the document, with \qt{\emph{see}
pumpkin, cucumber \& melon} in the \idx{locationlist}. If
\code{gourd} is also \indexed\ in the document, then those
\locations\ will also be added to the gourd's \idx{locationlist}.

The cross-referenced entries (pumpkin, cucumber and melon) will only
appear in the glossary if they are also \indexed\ in the document.
This can be implemented automatically with \opt{indexcrossrefs}.

The \gloskey{seealso} key in the \code{marrow} entry functions in
much the same way, but it is \indexed\ with \gls{glsxtrindexseealso}.
This means that the \code{marrow} entry will have \qt{\emph{see
also} courgette} in its \idx{locationlist}.

The \gloskey{see} key may optionally start with \oargm{tag} to
replace the default \gls{seename} tag with \meta{tag}. The
\gloskey{seealso} key doesn't permit this. For example, the
following is permitted:
\begin{codebox}
\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},
 \gloskeyval{description}{},
 \gloskeyval{see}{[related topics]pumpkin,cucumber,melon}}
\end{codebox}
but you can't replace \gloskey{see} with \gloskey{seealso} in the
above as it would assume that the first label in the list is
\code{[related topics]pumpkin} which is incorrect. The tag would
have to be removed:
\begin{codebox}
\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},
 \gloskeyval{description}{},
 \gloskeyval{seealso}{pumpkin,cucumber,melon}}
\end{codebox}
(You could then redefine \gls{seealsoname} to \code{related topics},
if required or redefine \gls{glsxtruseseealsoformat} as applicable.)

Example (\gloskey{alias} key):
\begin{codebox}
\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini},
 \gloskeyval{description}{},
 \gloskeyval{alias}{courgette}}
\end{codebox}
When the \code{zucchini} entry is defined, the \gloskey{alias} key
will automatically \idxc{indexing}{index} zucchini with 
\code{\gls{glssee}\marg{zucchini}\marg{courgette}}. This means that
the \code{zucchini} entry will be present in the glossary with
\qt{\emph{see} courgette} in the \idx{locationlist}. If the
\code{zucchini} entry is referenced in the document using a command 
like \gls{gls}, then the hyperlink (if enabled) will go to the
\code{courgette} entry (not the \code{zucchini} entry) but the
\code{zucchini} entry won't be indexed.

If you want the \code{zucchini} entry \locations\ added to the
\code{courgette} entry, you can redefine
\gls{glsxtrsetaliasnoindex} (see \sectionref{sec:glssee}) or, with
\app{bib2gls}, use the \resourceoptval{alias-loc}{transfer} setting.

\begin{information}
With \app{bib2gls}, cross-references are selected according to the
\resourceopt{selection} criteria. See the \app{bib2gls} manual for
further details.
\end{information}

\subsection{Entries that may not be required}
\label{sec:seenoindex}

If you have a file containing a large number of entry definitions
shared across multiple documents, then the use of the \gloskey{see},
\gloskey{seealso} or \gloskey{alias} key can cause unwanted entries
to appear in the document. 

\mExampleref{ex:autoseeindextrue} demonstrates this. 
Suppose the file \filefmt{myentries.tex} contains:
\begin{codebox}
\gls{newglossaryentry}\marg{pumpkin}\marg{\gloskeyval{name}{pumpkin},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{cucumber}\marg{\gloskeyval{name}{cucumber},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{melon}\marg{\gloskeyval{name}{melon},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},
 \gloskeyval{description}{},
 \gloskeyval{see}{pumpkin,cucumber,melon}}
\gls{newglossaryentry}\marg{cucurbit}\marg{\gloskeyval{name}{cucurbit},
 \gloskeyval{description}{},
 \gloskeyval{see}{gourd}}
\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{marrow}\marg{\gloskeyval{name}{marrow},
 \gloskeyval{description}{},
 \gloskeyval{seealso}{courgette}}
\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini},
 \gloskeyval{description}{},
 \gloskeyval{alias}{courgette}}
\gls{newglossaryentry}\marg{broccoli}\marg{\gloskeyval{name}{broccoli},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{cauliflower}\marg{\gloskeyval{name}{cauliflower},
 \gloskeyval{description}{},
 \gloskeyval{seealso}{broccoli}}
\end{codebox}
Some of these entries have a cross-reference key set, but not all of
these entries are required in the document:
\begin{codebox}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\oarg{\opt{nostyles},\optval{stylemods}{bookindex},
 \optval{style}{bookindex}}
 \marg{glossaries-extra}
\gls{makeglossaries}
\gls{loadglsentries}\marg{myentries}
\cbeg{document}
This document is only discussing \gls{glspl}\marg{courgette} (baby
\gls{glspl}\marg{marrow}, also called a \gls{gls}\marg{zucchini}),
\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.
\gls{printglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
 label={ex:autoseeindextrue},
 title={Cross-references (\optfmt{autoseeindex\dequals true})},
 description={Example document illustrating the cross-referencing
fields with the default auto-indexing of the cross-referenced terms}]
{%
  \usepackage[colorlinks]{hyperref}^^J%
  \usepackage[nostyles,stylemods=bookindex,style=bookindex]^^J%
   {glossaries-extra}^^J%
  \makeglossaries^^J%
  \newglossaryentry{pumpkin}{name={pumpkin},description={}}^^J%
  \newglossaryentry{cucumber}{name={cucumber},description={}}^^J%
  \newglossaryentry{melon}{name={melon},description={}}^^J%
  \newglossaryentry{gourd}{name={gourd},description={},^^J%
  see={pumpkin,cucumber,melon}}^^J%
  \newglossaryentry{cucurbit}{name={cucurbit},description={},^^J%
  see={gourd}}^^J%
  \newglossaryentry{courgette}{name={courgette},description={}}^^J%
  \newglossaryentry{marrow}{name={marrow},description={},^^J%
  seealso={courgette}}^^J%
  \newglossaryentry{zucchini}{name={zucchini},description={},^^J%
  alias={courgette}}^^J%
  \newglossaryentry{broccoli}{name={broccoli},description={}}^^J%
  \newglossaryentry{cauliflower}{name={cauliflower},description={},
    seealso={broccoli}}^^J%
}
{
This document is only discussing 
\glspl{courgette} (baby \glspl{marrow}, 
also called a \gls{zucchini}), 
\glspl{pumpkin} and \glspl{melon}.^^J%
\printglossaries
}
\end{resultbox}
Note that the glossary includes cucurbit and gourd, which aren't
referenced in the document. They could be useful as a redirect for
the reader, but the gourd entry cross-references the
cucumber entry, which isn't included in the glossary, so the
hyperlink target is undefined. The cauliflower entry has also been
included in the glossary, but in this case it's not useful for the
reader as neither cauliflower nor broccoli (which it
cross-references) are mentioned in the document. As with the
cucumber cross-reference, the broccoli cross-reference hyperlink
target is undefined.

There are a number of methods to address some of these problems.
\mExampleref{ex:autoseeindexfalse} uses the first method, which
has the cross-referencing keys in the \ext{tex}
file (as above), but disables the auto-indexing:
\begin{codebox}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\oarg{\optval{autoseeindex}{false},\opt{nostyles},
 \optval{stylemods}{bookindex},
 \optval{style}{bookindex}}\marg{glossaries-extra}
\gls{makeglossaries}
\gls{loadglsentries}\marg{myentries}
\cbeg{document}
This document is only discussing \gls{glspl}\marg{courgette} (baby
\gls{glspl}\marg{marrow}, also called a \gls{gls}\marg{zucchini}),
\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.
\gls{printglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
  label={ex:autoseeindexfalse},
 title={Cross-references (\optfmt{autoseeindex\dequals false})},
 description={Example document illustrating the cross-referencing
fields without the auto-indexing of the cross-referenced terms}]
{%
  \usepackage[colorlinks]{hyperref}^^J%
  \usepackage[autoseeindex=false,nostyles,stylemods=bookindex,style=bookindex]^^J%
   {glossaries-extra}^^J%
  \makeglossaries^^J%
  \newglossaryentry{pumpkin}{name={pumpkin},description={}}^^J%
  \newglossaryentry{cucumber}{name={cucumber},description={}}^^J%
  \newglossaryentry{melon}{name={melon},description={}}^^J%
  \newglossaryentry{gourd}{name={gourd},description={},^^J%
  see={pumpkin,cucumber,melon}}^^J%
  \newglossaryentry{cucurbit}{name={cucurbit},description={},^^J%
  see={gourd}}^^J%
  \newglossaryentry{courgette}{name={courgette},description={}}^^J%
  \newglossaryentry{marrow}{name={marrow},description={},^^J%
  seealso={courgette}}^^J%
  \newglossaryentry{zucchini}{name={zucchini},description={},^^J%
  alias={courgette}}^^J%
  \newglossaryentry{broccoli}{name={broccoli},description={}}^^J%
  \newglossaryentry{cauliflower}{name={cauliflower},description={},
    seealso={broccoli}}^^J%
}
{
This document is only discussing 
\glspl{courgette} (baby \glspl{marrow}, 
also called a \gls{zucchini}), 
\glspl{pumpkin} and \glspl{melon}.^^J%
\printglossaries
}
\end{resultbox}
This doesn't show the zucchini entry or any of
the cross-references in the \idx{glossary} because the information
hasn't been added to the \idx{indexing} files.  

One way around this
is to insert the cross-reference in a \idx{postdeschook}.
\mExampleref{ex:autoseeindexfalsepostname} demonstrates this:
\begin{codebox}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\oarg{\optval{autoseeindex}{false},\opt{nostyles},
  \optval{stylemods}{bookindex},
  \optval{style}{bookindex}}\marg{glossaries-extra}
\gls{makeglossaries}
\gls{loadglsentries}\marg{myentries}
\gls{glsdefpostdesc}\marg{general}\marg{\comment{}
 \gls{glsxtrseelists}\marg{\gls{glscurrententrylabel}}\comment{}
}
\cbeg{document}
This document is only discussing 
\gls{glspl}\marg{courgette} (baby \gls{glspl}\marg{marrow}, 
also called a \gls{gls}\marg{zucchini}), 
\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.
\gls{printglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
  label={ex:autoseeindexfalsepostname},
 title={Cross-references (\optfmt{autoseeindex\dequals false} and post-name hook)},
 description={Example document illustrating the cross-referencing
fields without the auto-indexing of the cross-referenced terms but
using the post-name hook}]
{%
  \usepackage[colorlinks]{hyperref}^^J%
  \usepackage[autoseeindex=false,nostyles,^^J%
    stylemods=bookindex,style=bookindex]{glossaries-extra}^^J%
  \makeglossaries^^J%
  \newglossaryentry{pumpkin}{name={pumpkin},description={}}^^J%
  \newglossaryentry{cucumber}{name={cucumber},description={}}^^J%
  \newglossaryentry{melon}{name={melon},description={}}^^J%
  \newglossaryentry{gourd}{name={gourd},description={},^^J%
  see={pumpkin,cucumber,melon}}^^J%
  \newglossaryentry{cucurbit}{name={cucurbit},description={},^^J%
  see={gourd}}^^J%
  \newglossaryentry{courgette}{name={courgette},description={}}^^J%
  \newglossaryentry{marrow}{name={marrow},description={},^^J%
  seealso={courgette}}^^J%
  \newglossaryentry{zucchini}{name={zucchini},description={},^^J%
  alias={courgette}}^^J%
  \newglossaryentry{broccoli}{name={broccoli},description={}}^^J%
  \newglossaryentry{cauliflower}{name={cauliflower},description={},
    seealso={broccoli}}^^J%
  \glsdefpostname{general}{\glsxtrseelists{\glscurrententrylabel}}^^J%
}
{
This document is only discussing 
\glspl{courgette} (baby \glspl{marrow}, 
also called a \gls{zucchini}), 
\glspl{pumpkin} and \glspl{melon}.^^J%
\printglossaries^^J%
}
\end{resultbox}

However, this still doesn't solve the problem that the zucchini
entry isn't included in the glossary. It needs to be indexed, but
\idx{indexing} has been suppressed. Firstly, because the automatic
\idx{indexing} triggered by the \gloskey{alias} key has been
suppressed with \optval{autoseeindex}{false}, and, secondly, because
the presence of the \gloskey{alias} key automatically suppresses
\idx{indexing} with the \idx{glslike} and \idx{glstextlike}
commands. This doesn't cause a problem for the zucchini hyperlink,
since the target is courgette (obtained from the \gloskey{alias} key).

\mExampleref{ex:noxrfields} demonstrates the second method, which is
to not use those keys in the entry definitions
and instead use \gls{glssee} or \gls{glsxtrindexseealso} within the document.
The file \filefmt{myentries.tex} now contains:
\begin{codebox}
\gls{newglossaryentry}\marg{pumpkin}\marg{\gloskeyval{name}{pumpkin},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{cucumber}\marg{\gloskeyval{name}{cucumber},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{melon}\marg{\gloskeyval{name}{melon},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{cucurbit}\marg{\gloskeyval{name}{cucurbit},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{marrow}\marg{\gloskeyval{name}{marrow},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{broccoli}\marg{\gloskeyval{name}{broccoli},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{cauliflower}\marg{\gloskeyval{name}{cauliflower},
 \gloskeyval{description}{}}
\end{codebox}
The document:
\begin{codebox}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}[\opt{nostyles},\optval{stylemods}{bookindex},
 \optval{style}{bookindex}]
  \marg{glossaries-extra}
\gls{makeglossaries}
\gls{loadglsentries}\marg{myentries}
\gls{glssee}\marg{gourd}\marg{pumpkin,melon,courgette}
\gls{glssee}\marg{zucchini}\marg{courgette}
\gls{GlsXtrSetField}\marg{zucchini}\marg{alias}\marg{courgette}
\cbeg{document}
This document is only discussing \gls{glspl}\marg{courgette} (baby
\gls{glspl}\marg{marrow}, also called a \gls{gls}\marg{zucchini}),
\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.
\gls{printglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
  label={ex:noxrfields},
 title={Cross-references (no \optfmt{see}, \optfmt{seealso} or \optfmt{alias})},
 description={Example document illustrating cross-references without
 using the see, seealso or alias keys}
 ]
{%
  \usepackage[colorlinks]{hyperref}^^J%
  \usepackage[nostyles,stylemods=bookindex,style=bookindex]{glossaries-extra}^^J%
  \makeglossaries^^J%
  \newglossaryentry{pumpkin}{name={pumpkin},description={}}^^J%
  \newglossaryentry{cucumber}{name={cucumber},description={}}^^J%
  \newglossaryentry{melon}{name={melon},description={}}^^J%
  \newglossaryentry{gourd}{name={gourd},description={}}^^J%
  \newglossaryentry{cucurbit}{name={cucurbit},description={}}^^J%
  \newglossaryentry{courgette}{name={courgette},description={}}^^J%
  \newglossaryentry{marrow}{name={marrow},description={}}^^J%
  \newglossaryentry{zucchini}{name={zucchini},description={}}^^J%
  \newglossaryentry{broccoli}{name={broccoli},description={}}^^J%
  \newglossaryentry{cauliflower}{name={cauliflower},description={}}^^J%
  \glssee{gourd}{pumpkin,melon,courgette}^^J%
  \glssee{zucchini}{courgette}^^J%
  \GlsXtrSetField{zucchini}{alias}{courgette}^^J%
}
{
This document is only discussing 
\glspl{courgette} (baby \glspl{marrow}, 
also called a \gls{zucchini}), 
\glspl{pumpkin} and \glspl{melon}.^^J%
\printglossaries
}
\end{resultbox}
Note that aliases require the \gloskey{alias} field to be set. In
this case, I've set it with \gls{GlsXtrSetField}. The gourd and
zucchini entries have been included in the glossary because they
were added with \gls{glssee}. The other entries are in the glossary
because they were indexed when referenced with \gls{gls} or
\gls{glspl}.

Since cucumber isn't required in the document, I haven't included it
in the cross-reference list for gourd. This method is flexible as it
allows the cross-referencing to vary between documents. For example,
another document may instead have:
\begin{codebox}
\gls{glsxtrindexseealso}\marg{pumpkin}\marg{courgette,melon}
\gls{glsxtrindexseealso}\marg{melon}\marg{pumpkin,courgette}
\gls{glsxtrindexseealso}\marg{courgette}\marg{pumpkin,melon}
\end{codebox}

The third method is to switch to \app{bib2gls}. The file
\filefmt{myentries.tex} can be converted to \filefmt{myentries.bib}
using:
\begin{terminal}
\app{convertgls2bib} \switch{index-conversion} myentries.tex myentries.bib
\end{terminal}
I've used the option \switch{index-conversion} (or \switch{i}) which will use
\atentry{index} instead of \atentry{entry} for entries that have an
empty description (which is the case in this example).
This creates the file \filefmt{myentries.bib}, which contains the
following (space compacted):
\begin{codebox}
\comment{Encoding: UTF-8}
@index\marg{pumpkin, \gloskeyval{name}{pumpkin}}
@index\marg{cucumber, \gloskeyval{name}{cucumber}}
@index\marg{melon, \gloskeyval{name}{melon}}
@index\marg{gourd, \gloskeyval{see}{pumpkin,cucumber,melon},
 \gloskeyval{name}{gourd}}
@index\marg{cucurbit, \gloskeyval{see}{gourd}, \gloskeyval{name}{cucurbit}}
@index\marg{courgette, \gloskeyval{name}{courgette}}
@index\marg{marrow, \gloskeyval{name}{marrow}, \gloskeyval{seealso}{courgette}}
@index\marg{zucchini, \gloskeyval{name}{zucchini}, \gloskeyval{alias}{courgette}}
@index\marg{broccoli, \gloskeyval{name}{broccoli}}
@index\marg{cauliflower, \gloskeyval{name}{cauliflower},
 \gloskeyval{seealso}{broccoli}}
\end{codebox}

\mExampleref{ex:recordedanddeps} adapts the 
earlier \exampleref{ex:autoseeindextrue} to use this new
\filefmt{myentries.bib} file with \app{bib2gls}:
\begin{codebox}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\oarg{\opt{record},\opt{nostyles},
 \optval{stylemods}{bookindex},\optval{style}{bookindex}}
 \marg{glossaries-extra}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{myentries}}
\cbeg{document}
This document is only discussing \gls{glspl}\marg{courgette} (baby
\gls{glspl}\marg{marrow}, also called a \gls{gls}\marg{zucchini}),
\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
In order to support letter \idxpl{group}, \app{bib2gls} needs to be
invoked with the \switch{group} switch.
So if the document file is called \filefmt{myDoc.tex} then the build
process is:
\begin{terminal}
pdflatex myDoc
bib2gls \switch{group} myDoc
pdflatex myDoc
\end{terminal}

\begin{resultbox}
\createexample*[arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop},
  label={ex:recordedanddeps},
 title={Cross-references (\appfmt{bib2gls})},
 description={Example document illustrating the cross-referencing
fields with bib2gls and selection=recorded and deps}]
{%
\cbeg{filecontents*}{\cmd{jobname}.bib}^^J%
\% Encoding: UTF-8^^J%
@index{pumpkin, name = {pumpkin}}^^J%
@index{cucumber, name = {cucumber}}^^J%
@index{melon, name = {melon}}^^J%
@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}}^^J%
@index{cucurbit, see = {gourd}, name = {cucurbit}}^^J%
@index{courgette, name = {courgette}}^^J%
@index{marrow, name = {marrow}, seealso = {courgette}}^^J%
@index{zucchini, name = {zucchini}, alias = {courgette}}^^J%
@index{broccoli, name = {broccoli}}^^J%
@index{cauliflower, name = {cauliflower}, seealso = {broccoli}
}^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\oarg{record,nostyles,stylemods=bookindex,style=bookindex}\marg{glossaries-extra}^^J%
\gls{GlsXtrLoadResources}\oarg{src=\cmd{jobname}}
}
{
This document is only discussing 
\gls{glspl}\marg{courgette} (baby \gls{glspl}\marg{marrow}, 
also called a \gls{gls}\marg{zucchini}), 
\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}
This uses the default \resourceoptvalm{selection}{recorded and
deps}, which selects entries that have \records,
and their dependencies. Records correspond to the usual indexing
performed by the \idx{glslike}, \idx{glstextlike} or \idx{glsadd}
commands. With \app{bib2gls}, the cross-referencing fields don't
trigger an index but instead identify dependencies.

Note that the above doesn't include the gourd entry (which
cross-references entries that have been indexed but hasn't itself
been indexed). The selection
criteria can be changed to also include unrecorded entries that cross-reference
selected entries. There are two options to choose from:
\resourceoptvalm{selection}{recorded and deps and see}, which will
apply to all the cross-reference fields (\gloskey{see},
\gloskey{seealso} and \gloskey{alias}), or 
\resourceoptvalm{selection}{recorded and deps and see not also},
which doesn't consider the \gloskey{seealso} field.

\mExampleref{ex:recordedanddepsandsee} adapts the above 
\exampleref{ex:recordedanddeps}
to change the selection criteria:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{myentries},
 \resourceoptvalm{selection}{recorded and deps and see}}
\end{codebox}

\begin{resultbox}
\createexample*[arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop},
  label={ex:recordedanddepsandsee},
 title={Cross-references (\appfmt{bib2gls} and
  \optfmt{selection\dequals recorded and deps and see})},
 description={Example document illustrating the cross-referencing
fields with bib2gls and selection=recorded and deps and see}]
{%
\cbeg{filecontents*}{\cmd{jobname}.bib}^^J%
\% Encoding: UTF-8^^J%
@index{pumpkin, name = {pumpkin}}^^J%
@index{cucumber, name = {cucumber}}^^J%
@index{melon, name = {melon}}^^J%
@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}}^^J%
@index{cucurbit, see = {gourd}, name = {cucurbit}}^^J%
@index{courgette, name = {courgette}}^^J%
@index{marrow, name = {marrow}, seealso = {courgette}}^^J%
@index{zucchini, name = {zucchini}, alias = {courgette}}^^J%
@index{broccoli, name = {broccoli}}^^J%
@index{cauliflower, name = {cauliflower}, seealso = {broccoli}
}^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\oarg{record,nostyles,stylemods=bookindex,style=bookindex}\marg{glossaries-extra}^^J%
\gls{GlsXtrLoadResources}\oarg{src=\cmd{jobname},selection={recorded and deps and see}}
}
{
This document is only discussing 
\gls{glspl}\marg{courgette} (baby \gls{glspl}\marg{marrow}, 
also called a \gls{gls}\marg{zucchini}), 
\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}

This now includes the gourd entry because it cross-references
pumpkin and melon, which have been \recorded\ in the document.
The cucurbit entry is also included because it cross-references the
(now selected) gourd entry. Note that the cucumber entry has been
selected because the gourd entry depends on it. This means there are
no broken links in the glossary, but it looks a bit odd as the
cucumber entry has no \idx{locationlist}. As from \app{bib2gls}
v3.0, this can be removed with one of the cross-reference pruning
options.

\mExampleref{ex:recordedanddepsandseeprune} uses \resourceopt{prune-xr}:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{
 \resourceoptvalm{src}{myentries},
 \resourceoptvalm{selection}{recorded and deps and see},
 \resourceopt{prune-xr}
}
\end{codebox}
This removes the unnecessary cucumber from the gourd's
\gloskey{see} list, and so cucumber doesn't get selected.

\begin{resultbox}
\createexample*[arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop},
  label={ex:recordedanddepsandseeprune},
 title={Cross-references (\appfmt{bib2gls} and
   \optfmt{selection\dequals recorded and deps and see}, \optfmt{prune-xr})},
 description={Example document illustrating the cross-referencing
fields with bib2gls and selection=recorded and deps and see and pruning}]
{%
\cbeg{filecontents*}{\cmd{jobname}.bib}^^J%
\% Encoding: UTF-8^^J%
@index{pumpkin, name = {pumpkin}}^^J%
@index{cucumber, name = {cucumber}}^^J%
@index{melon, name = {melon}}^^J%
@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}}^^J%
@index{cucurbit, see = {gourd}, name = {cucurbit}}^^J%
@index{courgette, name = {courgette}}^^J%
@index{marrow, name = {marrow}, seealso = {courgette}}^^J%
@index{zucchini, name = {zucchini}, alias = {courgette}}^^J%
@index{broccoli, name = {broccoli}}^^J%
@index{cauliflower, name = {cauliflower}, seealso = {broccoli}
}^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\oarg{record,nostyles,stylemods=bookindex,style=bookindex}\marg{glossaries-extra}^^J%
\gls{GlsXtrLoadResources}\oarg{src=\cmd{jobname},selection={recorded and deps and see},prune-xr}
}
{
This document is only discussing 
\gls{glspl}\marg{courgette} (baby \gls{glspl}\marg{marrow}, 
also called a \gls{gls}\marg{zucchini}), 
\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}

\begin{information}
See the \app{bib2gls} user manual for further details on the
cross-reference selection and pruning options.
\end{information}

\subsection{Accessing the Cross-Referencing Fields}
\label{sec:getsee}

If you have switched off the indexing of the cross-reference
fields (with \optval{autoseeindex}{false}) or want to suppress the
\idxpl{locationlist}, then you can adjust the glossary style or
hooks to include the cross-references since they won't be shown
otherwise.

\cmddef{glsxtrseelists}
If the entry given by \meta{entry-label} has the
\gloskey{see}, \gloskey{seealso} or \gloskey{alias} fields set, 
this will display the cross reference
according to \gls{glsxtruseseeformat} (for \gloskey{see} and
\gloskey{alias}) or \gls{glsxtruseseealsoformat} (for
\gloskey{seealso}). If any of these fields are set, the list is
encapsulated with:
\cmddef{glsxtrseelistsencap}
This simply does a space followed by \meta{content}. If more than
one of the fields are set (not recommended), then they will be
displayed in the order: \gloskey{see}, \gloskey{seealso} and
\gloskey{alias}. The entire set will be encapsulated with
\gls{glsxtrseelistsencap} and each sub-list will be separated with:
\cmddef{glsxtrseelistsdelim}
which defaults to a comma followed by a space.

\cmddef{glsxtrusesee}
If the entry given by \meta{entry-label} has the
\gloskey{see} field set, this will display the cross reference
according to \gls{glsxtruseseeformat}, otherwise this does nothing.
An error (or warning with \opteqvalref{undefaction}{warn}) will
occur if the entry hasn't been defined.

\cmddef{glsxtrusealias}
As \gls{glsxtrusesee} but for the \gloskey{alias} field.

\cmddef{glsxtruseseealso}
If the entry given by \meta{entry-label} has the
\gloskey{seealso} field set, this will display the cross reference
according to \gls{glsxtruseseealsoformat}, otherwise this does nothing.
An error (or warning with \opteqvalref{undefaction}{warn}) will
occur if the entry hasn't been defined.

\cmddef{glsxtralias}
This expands to the value of the \gloskey{alias} field (which should
be a single entry label) or empty if the field isn't set. If the
entry isn't defined, this command will expand to \gls{relax}
(without any error or warning). If you want to first test if the
field is set, you can use \gls{glsxtrifhasfield}.

\cmddef{glsxtrseealsolabels}
This expands to the value of the \gloskey{seealso} field (which
should be a comma-separated list of entry labels) or empty if the
field isn't set. If the entry isn't defined, this command will
expand to \gls{relax} (without any error or warning). If you want to
first test if the field is set, you can use \gls{glsxtrifhasfield}.

\cmddef{glsxtruseseealsoformat}
This command is used to format a \qt{see also} cross-reference.
This is simply defined to do:
\begin{codebox*}
\gls{glsseeformat}\oarg{\gls{seealsoname}}\margm{csv-list}\marg{}
\end{codebox*}

\subsection{Cross-Reference Indexing}
\label{sec:glssee}

\begin{information}
If you are using \app{bib2gls}, see the \app{bib2gls} user manual
for information about the \resourceopt{selection},
\resourceopt{see}, \resourceopt{seealso}, \resourceopt{alias},
\resourceopt{alias-loc} options.
\end{information}

The actual \idx{indexing} of the \gloskey{seealso} key is performed with:
\cmddef{glsxtrindexseealso}
which is analogous to \gls{glssee}. As with \gls{glssee}, this can
also be used explicitly.

With \app{makeindex}, \gls{glsxtrindexseealso} simply does:
\begin{codebox*}
\gls{glssee}\oarg{\gls{seealsoname}}\margm{entry-label}\margm{xr-list}
\end{codebox*}
With \app{xindy}, \gls{glsxtrindexseealso} behaves in an analogous
way, using the appropriate cross-referencing markup.

\cmddef{glsxtrsetaliasnoindex}
This hook is used within the \idx{glslike} and \idx{glstextlike}
commands to automatically switch off the \idx{indexing} for aliases.
(The hook is performed after the options set by
\gls{GlsXtrSetDefaultGlsOpts}.)

By default, this hook just sets \glsoptval{noindex}{true}. If you would
like to add \locations\ to the aliased \idx{locationlist} then you
can redefine it to use:
\cmddef{glsxtrindexaliased}
For example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrsetaliasnoindex}}\marg{\comment{}
 \gls{glsxtrindexaliased}}
\end{codebox}
Note that this needs \glsoptval{noindex}{false} to ensure the
\idx{indexing} takes place so don't simply append \gls{glsxtrindexaliased}
to the definition of \gls{glsxtrsetaliasnoindex}.

\begin{information}
Don't use the above hooks with \app{bib2gls} as this function is
disabled with \opteqvalref{record}{only} and
\opteqvalref{record}{nameref}. Use the \resourceopt{alias-loc} resource option instead.
\end{information}

\cmddef{glsxtraddallcrossrefs}
This is used at the end of the document if
\optval{indexcrossrefs}{true} to automatically index any
cross-references (identified in the \gloskey{see}, \gloskey{seealso}
and \gloskey{alias} fields). 
This command iterates over all entries in all glossaries and, if an entry has
been marked as used, does:
\cmddef{glsxtraddunusedxrefs}
which indexes any labels identified in the cross-reference fields of the entry
given by \meta{entry-label} that haven't been marked as used.  

This can be time consuming if there are a large number of
entries defined. If this is the case, you may want to consider
switching to \app{bib2gls} and use either
\resourceoptvalm{selection}{recorded and deps and see} or
\resourceoptvalm{selection}{recorded and deps and see not also}.

There should be no need to use \gls{glsxtraddallcrossrefs} explicitly, but you
may want to redefine it to only iterate over specific glossaries. 
The unused entries are indexed using the \encap{glsxtrunusedformat}
format.

\cmddef{glsxtrunusedformat}
This ignores its argument (the \location) and just does \gls{unskip}.

\section{First Use Flag}
\label{sec:glsunset}

Each entry has an associated \idx{firstuseflag} (a conditional or
boolean variable), which determines whether or not the entry has
been marked as \qt{used}. Unsetting this flag means that the entry
is marked as used. Resetting the flag means that the entry is marked
as unused.

The \idx{glslike} commands (which are the principle method of
referencing an entry) all mark the entry as used after the
\idx{linktext} is displayed but before the \idx{postlinkhook} is
used.

The purpose of this is to allow for additional information that
needs to be shown when a term first appears in a document. For
example, an abbreviation may need to have its full form shown on the
instance. However, there are some cases where that additional
information may need to be shown again or where the literal first
instance of the term may need to be in its terse form. For example,
if the term is used in the front matter.

If any \idx{glslike} commands (which are robust) are used in section
headings or captions, they can end up in the table of contents or
corresponding \qt{list of \ldots} (such as the list of figures).
This can cause the \idx{firstuseflag} to be unset too soon. For
these situations, use the commands described in
\sectionref{sec:headtitle} instead.

The base \sty{glossaries} package provides commands to explicitly
unset or reset the \idx{firstuseflag} either locally (confined to
the current scope) or globally. These commands are:
\gls{glsunset} (global unset), \gls{glslocalunset} (local unset),
\gls{glsreset} (global reset) and \gls{glslocalreset} (local reset).

The \sty{glossaries-extra} package adds hooks to the above commands.
These do nothing by default, but are modified by \gls{glsenableentrycount}
and \gls{glsenableentryunitcount} to perform the count increment or
reset (see \sectionref{sec:entrycount}).

\cmddef{glsxtrpostunset}
This hook is added to \gls{glsunset}.

\cmddef{glsxtrpostlocalunset}
This hook is added to \gls{glslocalunset}.

\cmddef{glsxtrpostreset}
This hook is added to \gls{glsreset}.

\cmddef{glsxtrpostlocalreset}
This hook is added to \gls{glslocalreset}.

The base package also provides commands to unset or reset
all entries or all entries within particular glossaries:
\gls{glsunsetall} and \gls{glsresetall}. For example, if you don't
want the \idx{firstuse} in the front matter, you can unset all
entries at the start of the front matter and reset them at the start
of the main matter.
\begin{codebox}
\cmd{frontmatter}\gls{glsunsetall}
\ldots {}
\cmd{mainmatter}\gls{glsresetall}
\end{codebox}

With \sty{glossaries-extra} you can unset a specific subset of
entries.
\cmddef{glslocalunseteach}
Locally unsets each entry in the given comma-separated list of entry labels.
\cmddef{glslocalreseteach}
Locally resets each entry in the given comma-separated list of entry labels.

You can test if an entry has been marked as used with \gls{ifglsused}
(but take care if you are using \app{bib2gls} or the
\optval{undefaction}{warn} option, see below).
This command allows the entry display style to vary the
\idx{linktext} according to whether or not the entry has been marked
as used. However, it can't be used within the \idx{postlinkhook} as
by that time, the \idx{firstuseflag} will have already been unset.

\begin{information}
See the \sty{glossaries} user manual for further details of the
above commands.
\end{information}

\mExampleref{ex:glsreset} first uses the \qt{html} entry
in the abstract, which shows both the long and the short form,
but it would be helpful for the full form to be reshown in the main
section about web pages. This is achieved by resetting the
\idx{firstuseflag}.
\begin{codebox}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\cbeg{document}
 \cbeg{abstract}
 This abstract mentions \gls{gls}\marg{html}.
 \cend{abstract}
 Some casual reference to \gls{gls}\marg{html}.
\cmd{section}\marg{Web Pages}
\gls{glsreset}\marg{html}This section is all about \gls{gls}\marg{html}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Resetting the first use flag (\cmd{glsreset})},
  label={ex:glsreset},
 description={Example document illustrating the use of \cmd{glsreset}}]
{\cmd{usepackage}\marg{glossaries-extra}^^J%
 \gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
}{%
 \cbeg{abstract}^^J
 This abstract mentions \gls{gls}\marg{html}.^^J
 \cend{abstract}^^J
 Some casual reference to \gls{gls}\marg{html}.^^J
 \cmd{section}\marg{Web Pages}^^J
 \gls{glsreset}\marg{html}%
 This section is all about \gls{gls}\marg{html}.
}
\end{resultbox}
In the above example, an alternative is to use \gls{glsxtrfull}
where you particularly want the full form, but some abbreviation
styles have a different expansion with the
\idxc{inlinefullform}{inline} \gls{glsxtrfull} form compared with
the \idx{firstuse} of \gls{gls}.

The \sty{glossaries-extra} package provides the options
\glsopt{preunset} and \glsopt{prereset}, which can be used to unset
or reset the \idx{firstuseflag} before the \idx{linktext}.
This means that in the above example, the line:
\begin{codebox}
 \gls{glsreset}\marg{html}This section is all about \gls{gls}\marg{html}.
\end{codebox}
can be replaced with:
\begin{codebox}
This section is all about \gls{gls}\oarg{\glsopt{prereset}}\marg{html}.
\end{codebox}

As mentioned above, the \idx{firstuseflag} is unset before the
\idx{postlinkhook}, so \gls{ifglsused} isn't helpful in the
\idx{postlinkhook}. Instead, you can use:
\cmddef{glsxtrifwasfirstuse}
This command is initialised by the \idx{glslike} commands according
to the value of the \idx{firstuseflag} before the \idx{linktext}.
It's also initialised by the \idx{glstextlike} commands: not
according to the value of the \idx{firstuseflag} but according to 
whether or not the \idx{glstextlike} command emulates \idx{firstuse}. 

For example, \gls{gls} will define \gls{glsxtrifwasfirstuse} to do
its first argument if the \idx{firstuseflag} indicates the entry
hasn't yet been used, otherwise it will define
\gls{glsxtrifwasfirstuse} to do its second argument. Whereas
\gls{glsfirst} will always define \gls{glsxtrifwasfirstuse} to do
its first argument (unless used with \glsopt{preunset}) and
\gls{glstext} will always define \gls{glsxtrifwasfirstuse} to do its
second argument (unless used with \glsopt{prereset}), regardless of
the state of the \idx{firstuseflag}.

The \glsopt{preunset} and \glsopt{prereset} options will
additionally redefine \gls{glsxtrifwasfirstuse} to match the option.
See \sectionref{sec:postlinkhook} for further details about the
\idx{postlinkhook}.

If you want to check if the calling command was both the
\idx{firstuse} and it was a \idx{glslike} command, you can use:
\gls{glsxtrifwasglslikeandfirstuse}.

The unset function performed by the \idx{glslike} commands before
the \idx{postlinkhook} uses the global \gls{glsunset} by default.
If you want \gls{glslocalunset} instead, you can use the
\glsopt{local} option (provided by the base \sty{glossaries}
package) or \glsoptval{postunset}{local}. To prevent the
\idx{firstuseflag} from being unset after the \idx{linktext}, use
\glsoptval{postunset}{none}.

\mExampleref{ex:glslocalunset} demonstrates locally unsetting the
\idx{firstuseflag}:
\begin{codebox}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\cbeg{document}
\marg{\comment{local scope}
\gls{gls}\oarg{\glsopt{local}}\marg{html}. Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}.
}\comment{end scope}
\codepar
Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}.
\codepar
\gls{gls}\oarg{\glsoptval{postunset}{none}}\marg{html}. Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Local unset},
  label={ex:glslocalunset},
 description={Example document illustrating locally unsetting the
first use flag}]
{\cmd{usepackage}\marg{glossaries-extra}^^J%
 \gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
}{%
\marg{\% local scope^^J
\gls{gls}\oarg{local}\marg{html}.^^J
Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}.^^J
}\% end scope^^J
\codepar
Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}.
\codepar
\gls{gls}\oarg{postunset=none}\marg{html}.
Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}.
}
\end{resultbox}

If you are using the \optval{undefaction}{warn} option (which is
automatically implemented by the \opt{record} option), the
\idx{firstuseflag} is undefined and so is neither true nor false, in
which case \gls{ifglsused} will trigger an error or warning and do neither.
In this situation, you may need to use the following command
instead.

\cmddef{GlsXtrIfUnusedOrUndefined}
This does \meta{true} if the entry hasn't been defined or hasn't been marked as
\glsdisp{firstuseflag}{used}, otherwise does \meta{true}. Note
that this command will generate an error or warning (according to 
\opt{undefaction}) if the entry hasn't been defined, but will
still do \meta{true}. This is more useful than \gls{ifglsused}
with \app{bib2gls} where the entries are never defined on the
first \LaTeX\ run.

\subsection{Buffering Unsets}
\label{sec:unsetbuffer}

Sometimes commands like \gls{gls} are used in a context where
changing a boolean variable can cause things to go wrong.
The outer, middle and inner formatting (see \sectionref{sec:entryfmtmods})
can be used to change the font for the \idx{linktext}, but it may be
that the \idx{glslike} command occurs within a block of text that
needs to be encapsulated by such a command.

One example of this is using \idx{gls} in one of the commands
provided with the \sty{soul} package. For example:
\begin{codebox}
\gls{ul}\marg{Some text about \gls{gls}\marg{html}.}
\end{codebox}
This causes the confusing error:
\begin{transcript}
Glossary entry `\marg{html}' has not been defined.
\end{transcript}
The simplest workaround is to put \code{\gls{gls}\marg{html}} inside the
argument of \gls{mbox}. For example:
\begin{codebox}
\gls{ul}\marg{Some text about \gls{mbox}\marg{\gls{gls}\marg{html}}.}
\end{codebox}
This can work provided it's not the \idx{firstuse} of this entry.
It if is, then unsetting the \idx{firstuseflag} causes a problem
and results in the error:
\begin{transcript}
! Package soul Error: Reconstruction failed.
\end{transcript}
The \sty{glossaries-extra} package provides a way of temporarily
switching off \gls{glsunset} so that it just makes a note of the
entry's label but doesn't actually perform the change.
\cmddef{GlsXtrStartUnsetBuffering}
This starts the buffering.  The unstarred version doesn't check for
duplicates, so the internal list may end up with multiple
occurrences of the same label. The starred version only adds a label
to the internal list if it's not already in it.
If you are using entry counting (see \sectionref{sec:entrycount})
the unstarred version is preferable to ensure the entry count is
correct.

\begin{important}
Buffering only applies to the global \gls{glsunset} and does not
affect the local \gls{glslocalunset}.
\end{important}

The buffer can be locally cleared with:
\cmddef{GlsXtrClearUnsetBuffer}
This doesn't stop buffering. It will simply discard the labels that
have been buffered so far.

In order to restore the normal behaviour of \gls{glsunset}, the
buffering must be stopped or discarded.
\cmddef{GlsXtrStopUnsetBuffering}
This stops the buffering, restores \gls{glsunset}, and unsets all
the buffered labels.  The starred form uses \gls{glslocalunset} to
unset the buffered labels. 

Before you stop the unset buffering, you can iterate over the
current buffer.
\cmddef{GlsXtrForUnsetBufferedList}
This iterates over the currently buffered list of entry labels and
performs \code{\csfmt{\meta{handler-cs}}\margm{entry-label}} for each label,
where \meta{cs} is a control sequence that takes a single argument.
This is best used with the starred version of
\gls{GlsXtrStartUnsetBuffering}[*] to avoid duplicates.

\cmddef{GlsXtrDiscardUnsetBuffering}
This discards the buffer and restores \gls{glsunset} to its normal
behaviour.

It's possible to locally unset entries before use (analogous to 
\glsoptval{preunset}{local}) if the entry has already been
encountered in the buffer. This will still be problematic for
situations where changing a conditional causes a problem, but may be
useful in some situations. This feature is enabled with:
\cmddef{GlsXtrUnsetBufferEnableRepeatLocal}
This may be placed before or after \gls{GlsXtrStartUnsetBuffering}
but the locally collected list of unused entries will be cleared at
the start of each instance of \gls{GlsXtrStartUnsetBuffering}.
It will also be cleared by \gls{GlsXtrClearUnsetBuffer}.
All entries that have been marked as unused can be reset with:
\cmddef{GlsXtrResetLocalBuffer}
This will perform a local reset on all the entries in the \qt{not
used} list and do \gls{GlsXtrClearUnsetBuffer}.

This feature can be switched off with:
\cmddef{GlsXtrUnsetBufferDisableRepeatLocal}
It's disabled by default.

The way this feature works is as follows (while buffering is active):
\begin{enumerate}
\item Each time an entry is referenced with a \idx{glslike} command,
the \gls{glsinitreunsets} hook checks if the current entry
(identified by \gls{glslabel}) has been added to the buffer.
(Bear in mind that the label is added to the buffer after the
\idx{linktext} when \gls{glsunset} is used.)

  \begin{enumerate}
  \item If it has been added to the buffer, then this is an indication 
  that the entry has already been used within the buffer zone (that is, 
  an attempt has been made to globally unset the \idx{firstuseflag}). 
  A local unset is then performed, which is essentially equivalent to using the
  \glsoptval{preunset}{local} option, so the reference will behave
  like \idx{subsequentuse}.

   \item If it hasn't been added to the buffer, then this is an 
   indication that the entry hasn't already been used within the 
   buffer zone, but it may or may not have been used before the 
   buffering started. If the \idx{firstuseflag} indicates that the 
   entry hasn't been used, the entry's label will be added to the 
   \qt{not used} list. The reference will behave like \idx{firstuse}, 
   but the unset won't be performed afterwards (because buffering is 
   in progress).
  \end{enumerate}

\item The entries that are in the \qt{not used} list can be locally
reset and both the buffer and the \qt{not used} list can be cleared
with \gls{GlsXtrClearUnsetBuffer}.
\end{enumerate}
Note that this approach can't be used for situations where the
change in conditional causes a problem, but it can be used in
situations where the content of an environment or command is
repeatedly processed, which upsets the \idx{firstuseflag}.

For example, consider the following \cls{beamer} document:
\begin{codebox}
\cmd{documentclass}\marg{beamer}
\cmd{usepackage}\marg{glossaries-extra}
\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\cbeg{document}
\cbeg{frame}
  \cmd{frametitle}\marg{Frame 1}
  \cbeg{itemize}
   \cmd{item} \gls{gls}\marg{html} and \gls{gls}\marg{html}
  \cend{itemize}
\cend{frame}
\cbeg{frame}
  \cmd{frametitle}\marg{Frame 2}
  \cbeg{itemize}
   \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{svm}
   \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{html}
  \cend{itemize}
\cend{frame}
\cmd{frame}\marg{\gls{printunsrtglossaries}}
\cend{document}
\end{codebox}
The first page isn't a problem as the frame doesn't have overlays.
The first reference of the \qt{html} entry shows the full form
and the next shows just the short form. The second page
(which is the first of the overlays of the second frame) correctly
shows the full form of the \qt{svm} entry for the first reference and 
the short form for the second reference, but on the third page
(the second of the overlays) now has all instances of \qt{svm} showing as
\idx{subsequentuse} (just the short form).

I could put \gls{glslocalresetall} at the start of the frame, but
that would reset the \qt{html} entry as well. Another workaround is
to locally reset the first \qt{svm} entry with
\glsopt{prereset}{local}, but that defeats the point of the
\idx{firstuseflag}, which is intended to keep track of whether or
not you have used an entry so that you don't have to.

The following modification places the second frame of the above
document inside a buffering zone:
\begin{codebox}
\gls{GlsXtrStartUnsetBuffering}
\cbeg{frame}
  \cmd{frametitle}\marg{Frame 2}
  \cbeg{itemize}
   \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{svm}
   \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{html}
  \cend{itemize}
\cend{frame}
\gls{GlsXtrStopUnsetBuffering}
\end{codebox}
This ensures that the \idx{firstuseflag} isn't reset until after the
frame, but it means that all references to the \qt{svm} entry on
both the second and third page show the full form.

The \qt{repeat local} function can be used so that repeated
references for the same entry can be locally unset before use. 
This can be enabled with \gls{GlsXtrUnsetBufferEnableRepeatLocal}
which fixes the second page, but not the third page, which shows all
references to \qt{svm} as the short form. What's needed is to
locally reset any entries that are in the frame but haven't yet been
used (\qt{svm}, in this case) at the start of the frame with
\gls{GlsXtrResetLocalBuffer}. \mExampleref{ex:unsetbeamer} does this:
\begin{codebox}
\gls{GlsXtrStartUnsetBuffering}
\gls{GlsXtrUnsetBufferEnableRepeatLocal}
\cbeg{frame}
\gls{GlsXtrResetLocalBuffer}
  \cmd{frametitle}\marg{Frame 2}
  \cbeg{itemize}
   \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{svm}
   \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{html}
  \cend{itemize}
\cend{frame}
\gls{GlsXtrStopUnsetBuffering}
\end{codebox}
Note that on the first overlay, the buffer and \qt{not used} list
are both empty. On the second overlay, the buffer contains the
\qt{svm} and \qt{html} labels and the \qt{not used} list just contains
the \qt{svm} label. The reset performed by \gls{GlsXtrResetLocalBuffer}
will reset \qt{svm} and then clear both the buffer and the \qt{not
used} list. This means that the first \qt{svm} reference is once
again considered \idx{firstuse} and it will once again be added to
the \qt{not used} list (so that it would be reset again if there was
a third overlay).
\begin{resultbox}
\createexample*
 [arara={pdflatex,pdflatex},class={beamer},pages={1,2,3,4},
 label={ex:unsetbeamer},
 title={Abbreviations with \clsfmt{beamer} (unset buffering)},
 description={An example document that uses beamer with buffering}
 ]
{\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine}^^J%
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
}%
{%
\cbeg{frame}^^J
  \cmd{frametitle}\marg{Frame 1}^^J
  \cbeg{itemize}^^J
   \cmd{item} \gls{gls}\marg{html} and \gls{gls}\marg{html}^^J
  \cend{itemize}^^J
\cend{frame}^^J%
\gls{GlsXtrStartUnsetBuffering}^^J%
\gls{GlsXtrUnsetBufferEnableRepeatLocal}^^J%
\cbeg{frame}^^J%
\gls{GlsXtrResetLocalBuffer}^^J
  \cmd{frametitle}\marg{Frame 2}^^J
  \cbeg{itemize}^^J
   \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{svm}^^J
   \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{html}^^J
  \cend{itemize}^^J%
\cend{frame}^^J%
\gls{GlsXtrStopUnsetBuffering}^^J%
\cmd{frame}\marg{\gls{printunsrtglossaries}}
}
\end{resultbox}
This is quite cumbersome, but these commands could potentially be added to 
hooks at the start and end of problematic environments (but the
buffering needs to be started and ended outside of the repeated
content).

\mExampleref{ex:bufferingmbox} uses \gls{mbox} to protect \gls{gls} within
the buffer zone:
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[T1]\marg{fontenc}
\cmd{usepackage}\marg{soul}
\cmd{usepackage}\marg{glossaries-extra}
\codepar
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\codepar
\cbeg{document}
\gls{GlsXtrStartUnsetBuffering}
\gls{ul}\marg{Some text about \gls{mbox}\marg{\gls{gls}\marg{html}}.
Next use: \gls{mbox}\marg{\gls{gls}\marg{html}}.}
\gls{GlsXtrStopUnsetBuffering}
\codepar
Next use: \gls{gls}\marg{html}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Buffering first use unsets with \cmd{mbox}},
  label={ex:bufferingmbox},
 description={Example document that uses buffering to defer
unsetting the first use flag unset in problematic contexts. The use
of box creates an overly long line}]
{%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\marg{soul}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\codepar
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
}
{\gls{GlsXtrStartUnsetBuffering}^^J%
\gls{ul}\marg{Some text about \gls{mbox}\marg{\gls{gls}\marg{html}}.^^J%
Next use: \gls{mbox}\marg{\gls{gls}\marg{html}}.}^^J%
\gls{GlsXtrStopUnsetBuffering}^^J%
\codepar
Next use: \gls{gls}\marg{html}.
}
\end{resultbox}
Note that the use of \gls{mbox} prevents line-breaking and the
second instance of \code{\gls{gls}\marg{html}} is treated as
\idx{firstuse}. 

\begin{warning}
Note that since the change in the \idx{firstuseflag} now doesn't
occur until \gls{GlsXtrStopUnsetBuffering}, multiple references
of the same term within the buffering zone will always be
treated as \idx{firstuse} (if the term wasn't used before the
buffering started).
\end{warning}

Other alternatives include using \gls{protect} and inner formatting
(see \sectionref{sec:innertextformat} for limitations) or middle
formatting (see \sectionref{sec:middleformat}) with
\gls{GlsXtrExpandedFmt} (which can't be used with fragile
\idx{linktext}). 

\mExampleref{ex:protectinnertextformat} demonstrates
both approaches:
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[T1]\marg{fontenc}
\cmd{usepackage}\marg{soul}
\cmd{usepackage}\marg{glossaries-extra}
\codepar
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\comment{custom command to expand content before using \gls{ul}:}
\cmd{newrobustcmd}\marg{\cmd{xpul}}[1]\marg{\gls{GlsXtrExpandedFmt}\marg{\gls{ul}}\marg{\#1}}
\codepar
\cbeg{document}
First approach (inner formatting):
\marg{\comment{scope}
 \cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\comment{}
  \gls{ul}\marg{\#1}}\comment{}
 \gls{ul}\marg{Some text about \gls{protect}\gls{gls}\marg{html}.
 Next use: \gls{protect}\gls{gls}\marg{html}}
}
\codepar
Next use: \gls{gls}\marg{html}.
\codepar
Second approach (middle formatting with expanded 
link text):
\gls{glsresetall}
\marg{\comment{scope}
 \cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{xpul}\marg{\#1}}\comment{}
 \cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{xpul}\marg{\#1}}\comment{}
 \gls{ul}\marg{Some text about \gls{protect}\gls{gls}\marg{html}.
 Next use: \gls{gls}\marg{html}.}
}
\codepar
Next use: \gls{gls}\marg{html}.
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[label={ex:protectinnertextformat},
title={Alternatives to buffering},
description={Example document illustrating inner and middle
formatting alternatives to unset
buffering where entries are referenced within sensitive formatting
commands}]
{%
 \cmd{usepackage}[T1]\marg{fontenc}^^J%
 \cmd{usepackage}\marg{soul}^^J%
 \cmd{usepackage}\marg{glossaries-extra}^^J%
 \codepar
 \gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J%
 \% custom command to expand content before using \gls{ul}:^^J
 \cmd{newrobustcmd}\marg{\cmd{xpul}}[1]\marg{\gls{GlsXtrExpandedFmt}\marg{\gls{ul}}\marg{\#1}}
 \codepar
}
{%
First approach (inner formatting):^^J%
\marg{\% scope^^J
 \cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\gls{ul}\marg{\#1}}\%^^J
 \gls{ul}\marg{Some text about \gls{protect}\gls{gls}\marg{html}.^^J
 Next use: \gls{protect}\gls{gls}\marg{html}}^^J%
}^^J%
\codepar
Next use: \gls{gls}\marg{html}.^^J%
\codepar
Second approach (middle formatting with expanded link text):^^J%
\gls{glsresetall}^^J%
\marg{\% scope^^J
 \cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{xpul}\marg{\#1}}\%^^J
 \cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{xpul}\marg{\#1}}\%^^J
 \gls{ul}\marg{Some text about \gls{protect}\gls{gls}\marg{html}.
 Next use: \gls{gls}\marg{html}.}^^J%
}
\codepar
Next use: \gls{gls}\marg{html}.
}
\end{resultbox}

The change in the \idx{firstuseflag} isn't the only content within
the \idx{glslike} commands that can cause a problem. The
\idx{whatsit} caused by \idx{indexing} can also be problematic.
Buffering can also be used to help with that situation. Indexing can
be switched off at the start of the buffering and
\gls{GlsXtrForUnsetBufferedList} can be used to perform the indexing
outside of the problematic content. Note that this can cause a
problem if the \location\ changes (for example, if a page break occurs
within the buffering zone).

Buffering can also be used to simply gather the labels that have
been referenced with a \idx{glslike} command in order to, for
example, display a \idx{mini-glossary} at the end of the block. See for
example, \gallerypage{minigloss}{Gallery: Mini-Glossary}.

\section{Accessing Fields}
\label{sec:getfields}

See \sectionref{sec:setfields} for setting fields after an entry has
been defined, \sectionref{sec:csvfields} for fields that contain
comma-separated lists or whose values may be contained within comma-separated lists,
\sectionref{sec:getsee} for cross-referencing fields (\gloskey{see},
\gloskey{seealso} and \gloskey{alias}),
and \sectionref{sec:fieldconditionals} for testing
field values. See also the base \sty{glossaries} package's commands,
such as \gls{glsentryname} and \gls{glsletentryfield}.

\cmddef{glsxtrusefield}
This expands to the value of the \idx{field}
(identified by its \idxc{internalfieldlabel}{internal label}
\meta{field-label}) for the entry identified by \meta{entry-label}.
Expands to \gls{relax} if the \idx{field} or entry are undefined.

\cmddef{Glsxtrusefield}
This is like \gls{glsxtrusefield} but converts the first character
to \idx{uppercase} using \gls{makefirstuc} (provided by
\sty{mfirstuc}) which is robust. If \sty{hyperref} is loaded,
\code{\gls{Glsxtrusefield}\margm{entry-label}} will use the expandable:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsxtrusefield}\margm{entry-label}}
\end{compactcodebox}
in a PDF bookmark.

\cmddef{GLSxtrusefield}
This is like \gls{glsxtrusefield} but converts the field value to
\idx{uppercase}. See \sectionref{sec:uppercase}.

\cmddef{glsxtrfieldtitlecase}
This is like \gls{glsxtrusefield} but converts the field value to
\idx{titlecase}. This internally uses:
\cmddef{glsxtrfieldtitlecasecs}
This converts \meta{content} to \idx{titlecase} (expanding the first
token once). If \gls{glscapitalisewords} has been defined, that will
be used, otherwise \gls{capitalisewords} will be used.

\cmddef{glsxtrentryparentname}
Expands to the entry's parent \gloskey{name} if defined. Expands to
nothing if the entry doesn't have a parent or if the entry isn't
defined. If you simply require the parent label then use
\gls{glsentryparent} or, to first test if the entry has a parent,
either use \gls{ifglshasparent} or use \gls{glsxtrifhasfield} with
the field label set to \code{parent}.

\cmddef{glsxtrhiername}
Displays the hierarchical name for the given entry. The
cross-reference format \gls{glsseeitemformat} may be redefined to
use this command to show the hierarchy, if required. 

This command has a recursive definition.  If the entry given by
\meta{entry-label} has a parent, then this command will do
\code{\gls{glsxtrhiername}\margm{parent-label}} for the entry's parent and
will then do the separator \gls{glsxtrhiernamesep}.

Then, regardless of whether or not the entry has a parent, it will
do \code{\gls{glsfmttext}\margm{entry-label}}, if the entry is an
abbreviation (see \sectionref{sec:examplediffsabbrv}), or
\code{\gls{glsfmtname}\margm{entry-label}} otherwise. 

\begin{information}
If \sty{hyperref} is loaded, \gls{glsxtrhiername} will
behave as \gls{glsentryname} in a PDF bookmark.
\end{information}

\cmddef{glsxtrhiernamesep}
Separator symbol (\glsxtrhiernamesep) used between each name in
commands like \gls{glsxtrhiername}.

\cmddef{Glsxtrhiername}
As \gls{glsxtrhiername} but the first name in the list has its first character
converted to \idx{uppercase} using \gls{Glsfmttext} or
\gls{Glsfmtname} (\idx{sentencecase}).
If \sty{hyperref} is loaded, \gls{Glsxtrhiername} will expand to:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glsentryname}\margm{entry-label}}
\end{compactcodebox}
in a PDF bookmark. The \gls{makefirstuc} mapping from
\gls{glsxtrhiername} to \gls{Glsxtrhiername} is set with
\gls{glsmfuaddmap}, if supported.

\cmddef{GlsXtrhiername}
As \gls{glsxtrhiername} but each name in the list has its first character
converted to \idx{uppercase} using \gls{Glsfmttext} or \gls{Glsfmtname}.

\cmddef{GLSxtrhiername}
As \gls{glsxtrhiername} but the first name in the list is
converted to \idx{uppercase} using \gls{GLSfmttext} or
\gls{GLSfmtname}.

\cmddef{GLSXTRhiername}
As \gls{glsxtrhiername} but each name in the list is
converted to \idx{uppercase} using \gls{GLSfmttext} or
\gls{GLSfmtname} (\idx{allcaps}).

\section{Encapsulation (Formatting) Based on Field Values}

These commands assume that a given entry has a special purpose field
that's used to store information on how to format text.

\subsection{Foreign Language Field}
\label{sec:foreignfield}

\cmddef{GlsXtrForeignTextField}
This command should expand to the \idx{internalfieldlabel} used to store a
language tag (such as \code{en-GB} or \code{de-CH-1996}). The
default value is \code{userii} (which corresponds to the
\gloskey{user2} key).

\cmddef{GlsXtrForeignText}
If the entry given by \meta{entry-label} has the field identified by
\gls{GlsXtrForeignTextField} set, then this command will encapsulate
\meta{text} according to the language tag stored in that field.

This uses \sty{tracklang}['s] interface to determine the language
label that corresponds to the language tag. If the language label
can be determined, the \meta{text} will be encapsulated with
\gls{foreignlanguage} otherwise just \meta{text} is done.

If \gls{foreignlanguage} isn't defined (that is, there's no language
support for the document), this command simply does \meta{text}. If
an old version of \sty{tracklang} is used, this command issues a
warning and just does \meta{text}.

If \sty{tracklang} can't determine the corresponding language label
to use with \gls{foreignlanguage}, then a warning is issued with:
\cmddef{GlsXtrUnknownDialectWarning}
where \meta{locale} is the language tag supplied in the given field
value and \meta{root language} is the root language that
\sty{tracklang} has inferred from the tag.

\begin{information}
\gls{GlsXtrForeignText} requires \sty{tracklang} v1.3.6+.
\end{information}

\mExampleref{ex:foreignlangfmt} illustrates this. The language tag
is stored in the \gloskey{user2} field and the text in that language
is stored in the \gloskey{user1} field. The hook for the \abbrstyle{long-short-user}
style's parenthetical material is adjusted to include the
non-English text with the applicable hyphenation patterns.
\begin{codebox}
\cmd{usepackage}[main=british,brazilian,ngerman]\marg{babel}
\cmd{usepackage}\marg{glossaries-extra}
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-user}}
\gls{newabbreviation}
  \oarg{\gloskeyval{user1}{Associa\c{c}\~ao Brasileria de Normas T\'ecnicas},
   \gloskeyval{user2}{pt-BR}
 }
 \marg{abnt}\marg{ABNT}\marg{Brazilian National Standards Organization}
\codepar
\gls{newabbreviation}
 \oarg{\gloskeyval{user1}{Deutsches Institut f\"ur Normung e.V.},
  \gloskeyval{user2}{de-DE-1996}}
 \marg{din}\marg{DIN}\marg{German Institute for Standardization}
\codepar
\gls{newabbreviation}\marg{tug}\marg{TUG}\marg{\cmd{TeX}\cmd{ }User Group}
\codepar
\cmd{renewcommand}*\marg{\gls{glsxtruserparen}}[2]\marg{\comment{}
  \gls{glsxtrfullsep}\marg{\#2}\comment{}
  \gls{glsxtrparen}
  \marg{\#1\comment{}
   \gls{ifglshasfield}\marg{\gls{glsxtruserfield}}\marg{\#2}\comment{}
   \marg{, \cmd{emph}\marg{\gls{GlsXtrForeignText}\marg{\#2}\marg{\comment{}
     \gls{glscurrentfieldvalue}}}}\comment{}
   \marg{}\comment{}
  }\comment{}
}
\codepar
\cbeg{document}
\gls{gls}\marg{abnt}, \gls{gls}\marg{din}, \gls{gls}\marg{tug}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}

\begin{resultbox}
\createexample*[title={Foreign language field encapsulation},
  label={ex:foreignlangfmt},
 description={Example document illustrating fields containing
different languages that need encapsulating with the relevant
language command}]
{%
\cmd{usepackage}[main=british,brazilian,ngerman]\marg{babel}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{setabbreviationstyle}\marg{long-short-user}^^J%
\gls{newabbreviation}^^J%
  \oarg{\gloskeyval{user1}{Associa\c{c}\~ao Brasileria de Normas T\'ecnicas},^^J%
   \gloskeyval{user2}{pt-BR}^^J%
 }^^J%
 \marg{abnt}\marg{ABNT}\marg{Brazilian National Standards Organization}^^J%
\codepar
\gls{newabbreviation}^^J%
 \oarg{\gloskeyval{user1}{Deutsches Institut f\"ur Normung e.V.},^^J%
  \gloskeyval{user2}{de-DE-1996}}^^J%
 \marg{din}\marg{DIN}\marg{German Institute for Standardization}^^J%
\codepar
\gls{newabbreviation}\marg{tug}\marg{TUG}\marg{\cmd{TeX}\cmd{ }User Group}^^J%
\codepar
\cmd{renewcommand}*\marg{\gls{glsxtruserparen}}[2]\marg{\%^^J%
  \gls{glsxtrfullsep}\marg{\#2}\%^^J%
  \gls{glsxtrparen}^^J%
  \marg{\#1\%^^J%
   \gls{ifglshasfield}\marg{\gls{glsxtruserfield}}\marg{\#2}\%^^J%
   \marg{, \cmd{emph}\marg{\gls{GlsXtrForeignText}\marg{\#2}\marg{\gls{glscurrentfieldvalue}}}}\%^^J%
   \marg{}\%^^J%
  }\%^^J%
}
}
{
\gls{gls}\marg{abnt}, \gls{gls}\marg{din}, \gls{gls}\marg{tug}.^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}

\subsection{Associated Entry Format}
\label{sec:glsxtrfmt}

An entry may have a particular formatting style associated with it
(rather than a more general category-wide format). This needs to be
provided by a text-block command that takes a single argument. The
name (without the leading backslash) should be stored in the field
identified by:
\cmddef{GlsXtrFmtField}
This command should expand to the \idx{internalfieldlabel} used to
store the formatting command's control sequence name. The default 
value is \code{useri} (which corresponds to the \gloskey{user1} key).

\cmddef{glsxtrfmt}
This command behaves like:
\begin{compactcodebox}
\gls{glslink}\oargm{options}\margm{entry-label}\marg{\meta{fmt-link-text}}
\end{compactcodebox}
where the \idx{linktext} \meta{fmt-link-text} is formatted according to:
\cmddef{glsxtrfmtdisplay}
The default definition simply does \code{\cmd{\meta{csname}}\margm{text}\meta{insert}}
where the control sequence name \meta{csname} is obtained from the
field given by \gls{GlsXtrFmtField}. If the field hasn't been set,
\gls{@firstofone} is used (which simply does its argument).
The unstarred version assumes an empty \meta{insert}.
The default \gls{glslink} options are given by \gls{GlsXtrFmtDefaultOptions}.

\begin{information}
The \idx{postlinkhook} is suppressed with \gls{glsxtrfmt}.
\end{information}

If you don't want the complexity of \gls{glslink}, a partially
expandable command is provided that may be used in section headings:
\cmddef{glsxtrentryfmt}
If \sty{hyperref} has been loaded, this will expand to:
\cmddef{glsxtrpdfentryfmt}
within the PDF bookmarks, which just does \meta{text}. Otherwise
\gls{glsxtrentryfmt} will format \meta{text} according to the
control sequence name identified in the field given by \gls{GlsXtrFmtField} (or
\code{@firstofone}, if not set).

\mExampleref{ex:glsxtrfmt} provides some custom commands with a
single argument whose control sequence name is stored in the 
\gloskey{user1} field of the associated entry:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[T1]\marg{fontenc}
\cmd{usepackage}\marg{amsmath}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}[\opt{postdot},\optval{style}{\glostyle{index}}]\marg{glossaries-extra}
\gls{makeglossaries}
\cmd{newcommand}*\marg{\cmd{mtx}}[1]\marg{\cmd{boldsymbol}\marg{\#1}}
\cmd{newcommand}*\marg{\cmd{mtxinv}}[1]\marg{\cmd{mtx}\marg{\#1}\cmd{sp}\marg{-1}}
\codepar
\gls{newglossaryentry}\marg{matrix}\marg{\comment{}
  \gloskeyval{name}{matrix},
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{M}}},
  \gloskeyval{plural}{matrices},
  \gloskeyval{user1}{mtx},\comment{corresponds to \cmd{mtx}}
  \gloskeyval{description}{rectangular array of values}
}
\codepar
\gls{newglossaryentry}\marg{identitymatrix}\marg{\comment{}
  \gloskeyval{name}{identity matrix},
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{I}}},
  \gloskeyval{plural}{identity matrices},
  \gloskeyval{description}{a diagonal matrix with all diagonal 
  elements equal to 1 and all other elements
  equal to 0}
}
\codepar
\gls{newglossaryentry}\marg{matrixinv}\marg{\comment{}
  \gloskeyval{name}{matrix inverse},
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtxinv}\marg{M}}},
  \gloskeyval{user1}{mtxinv},\comment{corresponds to \cmd{mtxinv}}
  \gloskeyval{description}{a square \gls{gls}\marg{matrix} such that
   \$\cmd{mtx}\marg{M}\cmd{mtxinv}\marg{M}=\gls{glssymbol}\marg{identitymatrix}\$}
}
\cbeg{document}
A \gls{gls}\marg{matrix} is denoted \gls{glssymbol}\marg{matrix}.
The inverse is denoted \gls{glssymbol}\marg{matrixinv}.
\cmd{[}
  \gls{glsxtrfmt}\marg{matrix}\marg{A} \gls{glsxtrfmt}\marg{matrixinv}\marg{A}
  = \gls{glssymbol}\marg{identitymatrix}
\cmd{]}
Compare \$\gls{glsxtrfmt}\marg{matrix}\marg{A}[\_0]\$
with \$\gls{glsxtrfmt*}\marg{matrix}\marg{A}[\_0]\$.
\cmd{printglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Storing a formatting command in a field},
  label={ex:glsxtrfmt},
description={Example document that uses a field to store the
formatting command associated with the glossary entry},
arara={pdflatex,makeglossaries,pdflatex,pdfcrop}]
{%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\marg{amsmath}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[postdot,style=index]\marg{glossaries-extra}^^J%
\codepar
\gls{makeglossaries}^^J%
\codepar
\cmd{newcommand}*\marg{\cmd{mtx}}[1]\marg{\cmd{boldsymbol}\marg{\#1}}^^J%
\cmd{newcommand}*\marg{\cmd{mtxinv}}[1]\marg{\cmd{mtx}\marg{\#1}\cmd{sp}\marg{-1}}^^J%
\codepar
\gls{newglossaryentry}\marg{matrix}\marg{\%^^J%
  \gloskeyval{name}{matrix},^^J%
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{M}}},^^J%
  \gloskeyval{plural}{matrices},^^J%
  \gloskeyval{user1}{mtx},^^J%
  \gloskeyval{description}{rectangular array of values}^^J%
}^^J%
\codepar
\gls{newglossaryentry}\marg{identitymatrix}\marg{\%^^J%
  \gloskeyval{name}{identity matrix},^^J%
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{I}}},^^J%
  \gloskeyval{plural}{identity matrices},^^J%
  \gloskeyval{description}{a diagonal matrix with all diagonal
elements equal to^^J%
  1 and all other elements equal to 0}^^J%
}
\codepar
\gls{newglossaryentry}\marg{matrixinv}\marg{\%^^J%
  \gloskeyval{name}{matrix inverse},^^J%
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtxinv}\marg{M}}},^^J%
  \gloskeyval{user1}{mtxinv},^^J%
  \gloskeyval{description}{a square \gls{gls}\marg{matrix} such
that^^J%
   \string$\cmd{mtx}\marg{M}\cmd{mtxinv}\marg{M}=\gls{glssymbol}\marg{identitymatrix}\string$}^^J%
}^^J%
}
{%
A \gls{gls}\marg{matrix} is denoted \gls{glssymbol}\marg{matrix}.^^J%
The inverse is denoted \gls{glssymbol}\marg{matrixinv}.^^J%
\cmd{[}^^J%
  \gls{glsxtrfmt}\marg{matrix}\marg{A}^^J%
  \gls{glsxtrfmt}\marg{matrixinv}\marg{A}^^J%
  =^^J%
  \gls{glssymbol}\marg{identitymatrix}^^J%
\cmd{]}^^J%
Compare \string$\gls{glsxtrfmt}\marg{matrix}\marg{A}[\string_0]\string$^^J%
with \string$\gls{glsxtrfmt*}\marg{matrix}\marg{A}[\string_0]\string$.
\cmd{printglossaries}
}
\end{resultbox}
Note the difference between using \gls{glsxtrfmt*} (which has a
final optional argument) vs \gls{glsxtrfmt} (which doesn't, so the
following square brackets are considered part of the subsequent text).

There are also \idx{sentencecase} versions of the above commands:
\cmddef{Glsxtrfmt}
This is simply a shortcut for:
\begin{compactcodebox}
\gls{glsxtrfmt}\oargm{options}\margm{entry-label}\marg{\gls{glssentencecase}\margm{text}}
\end{compactcodebox}
Similarly for the starred form:
\cmddef{Glsxtrfmt*}
which is a shortcut for:
\begin{compactcodebox}
\gls{glsxtrfmt*}\oargm{options}\margm{entry-label}\marg{\gls{glssentencecase}\margm{text}}\oargm{insert}
\end{compactcodebox}

\cmddef{Glsxtrentryfmt}
This is a shortcut for
\begin{compactcodebox}
\gls{glsxtrentryfmt}\margm{entry-label}\marg{\gls{glssentencecase}\margm{text}}
\end{compactcodebox}
but uses:
\cmddef{Glsxtrpdfentryfmt}
for the PDF bookmarks. This uses \gls{MFUsentencecase} to perform
the case-change, which is expandable.

If you are writing \gls{glsxtrfmt} or \gls{glsxtrentryfmt}
explicitly in the document text, you can, of course, enter the
appropriate case in \meta{text} directly. The purpose of providing
the \idx{sentencecase} commands is to enable a mapping to be setup
with \gls{MFUaddmap} in the event that \gls{glsxtrfmt} or
\gls{glsxtrentryfmt} occur at the start of content, such as another
entry's description, that will have \idx{sentencecase}
automatically applied. This will require \sty{mfirstuc} v2.08+ to
support the mapping. See the \sty{mfirstuc} manual for further details.


\section{Comma-Separated Lists}
\label{sec:csvfields}

These commands are for field values that are comma-separated
lists (for example, the field has been constructed with
\gls{glsxtrapptocsvfield}) or for testing if field values are
contained within comma-separated lists.

\begin{information}
If you are using \app{bib2gls}, you can sort field values that
contain a comma-separated list of labels (such as the \gloskey{see}
or \gloskey{seealso} field) with the \resourceopt{sort-label-list}
option (provided \app{bib2gls} can access those fields). See the
\app{bib2gls} manual for further details.
\end{information}

\cmddef{glsseelist}
This is provided by the base \sty{glossaries} package to format the
entry labels in \gloskey{see} cross-reference list. (It's used
internally by \gls{glsseeformat}, which adds the \emph{see} prefix.) It may also be
used for any comma-separated list of entry labels. Note that the
argument isn't expanded. If expansion is required, use:
\cmddef{glsxtrseelist}
This fully expands its argument and passes the result to
\gls{glsseelist}.
With just the base \sty{glossaries} package, each item is encapsulated with
\gls{glsseeitem}.
The \sty{glossaries-extra} package redefines \gls{glsseelist} to make it more
flexible and provides additional commands to further customize the
formatting.

\cmddef{glsxtrtaggedlist}
This is a similar command that has an initial tag inserted before
the start of the list. If the list only contains one element, the
\meta{singular tag} is used. If the list contains more than one
element, the \meta{plural tag} is used. The separator between the
tag and the list is given by:
\cmddef{glsxtrtaggedlistsep}
The separators between the elements of the list and the formatting
of each list element is as for \gls{glsseelist} (see below). If the list is
empty, nothing is displayed. The \meta{label prefix} is inserted
before the current item in the list to form the entry label.

\begin{warning}
Spaces in \meta{csv-list} are significant. Avoid unwanted leading or
trailing spaces and empty labels.
\end{warning}

\cmddef{glsseeitemformat}
The base \sty{glossaries} package just uses \gls{glsentryname} or 
\gls{glsentrytext} in this command. The \sty{glossaries-extra} package 
redefines this so that it does:
\begin{codebox}
\gls{ifglshasshort}\margm{entry-label}\marg{\gls{glsfmttext}\margm{entry-label}}
\marg{\gls{glsfmtname}\margm{entry-label}}
\end{codebox}
Note that the use of \gls{glsfmttext} rather than \gls{glsentrytext}
allows the abbreviation style to be used.

With \sty{glossaries-extra}, the first item in \gls{glsseelist} will be encapsulated
with:
\cmddef{glsseefirstitem}
The default definition is simply \code{\gls{glsseeitem}\margm{entry-label}} but
can be redefined, for example to convert the first character to
\idx{uppercase} if \idx{sentencecase} is required.

\begin{information}
If the label corresponds to a multi-entry, \gls{mglsseefirstitem}
will be used instead (see \sectionref{sec:msee}). Similarly,
\gls{mglsseeitem} will be used instead of \gls{glsseeitem} for a
multi-entry label.
\end{information}

\cmddef{glsseesep}
This is used between each entry in the list, except between the
final pair.

\cmddef{glsseelastsep}
This is used between the penultimate and final item in the list.
The default definition is:
\begin{codebox}
\cmd{space}\gls{andname}\cmd{space}
\end{codebox}
(\gls{andname} is provided by \sty{glossaries}, if not already
defined, and simply expands to \gls{amp} but it may be defined to
expand to something else by another package before \sty{glossaries}
is loaded.)

With \sty{glossaries-extra}, if there are at least three elements in
the list, the separator between the final two elements will be given by:
\cmddef{glsseelastoxfordsep}
This just defaults to \gls{glsseelastsep} but may be redefined to 
include a comma, if preferred.


\cmddef{glsxtrforcsvfield}
This iterates over the comma-separated list stored in the given \idx{field} 
(identified by its \idxc{internalfieldlabel}{internal label})
for the entry identified by \meta{entry-label} and performs
\code{\meta{handler cs}\margm{element}} for each element of the
list. This command uses \gls{glsxtrifhasfield} so the complete
list can be obtained with \gls{glscurrentfieldvalue}. Does nothing
if the field hasn't been set or the entry hasn't been defined. The
unstarred version adds implicit grouping. The starred version
doesn't.

It's possible to prematurely break the loop at the end of the
current iteration with:
\cmddef{glsxtrendfor}
If nested within another command that also uses \gls{@for}, use the
unstarred version to localise the break. This command is simply set
to \gls{@endfortrue}, which is provided by the \sty{xfor} package.

\cmddef{glsxtrfieldformatcsvlist}
This formats the comma-separated list stored in the given \idx{field} 
(identified by its \idxc{internalfieldlabel}{internal label})
for the entry identified by \meta{entry-label} using \sty{datatool-base}['s]
\gls{DTLformatlist}. 
This command uses \gls{glsxtrifhasfield} so the complete
list can be obtained with \gls{glscurrentfieldvalue}. 
This adds implicit grouping. There is no starred version.

\mExampleref{ex:fieldformatcsv} demonstrates the difference between \gls{glsseelist}
(which specifically requires a list of labels) and \gls{glsxtrfieldformatcsvlist}
(which formats an arbitrary list):
\begin{codebox}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\oarg{\optval{autoseeindex}{false}}\marg{glossaries-extra}
\gls{newglossaryentry}\marg{example}\marg{\gloskeyval{name}{example},
 \gloskeyval{description}{},
 \gloskeyval{see}{another1,another2}}
\gls{newglossaryentry}\marg{another1}\marg{\gloskeyval{name}{another one},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{another2}\marg{\gloskeyval{name}{another two},
 \gloskeyval{description}{}}
\cbeg{document}
\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{duck}
\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{albatross}
\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{arara}
Animal list: \gls{glsxtrfieldformatcsvlist}\marg{example}\marg{animals}
\codepar
See list: \gls{glsxtrifhasfield}\marg{see}\marg{example}
 \marg{\gls{glsxtrseelist}\marg{\gls{glscurrentfieldvalue}}}\marg{not set}.
\codepar
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
There's no \idx{indexing} in this document so I've used
\optval{autoseeindex}{false} to avoid an error. This means there's no cross-reference
list in the glossary but, as demonstrated, the \qt{see} list can be
reproduced in the document. 
\begin{resultbox}
\createexample*[title={Formatting lists contained in field values},
  label={ex:fieldformatcsv},
description={Example document that uses two different methods of
sorting fields that contain a comma-separated list}]
{%
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\oarg{autoseeindex=false}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{example}\marg{name=example,description={},^^J%
 see={another1,another2}}^^J%
\gls{newglossaryentry}\marg{another1}\marg{name={another one},description={}}^^J%
\gls{newglossaryentry}\marg{another2}\marg{name={another two},description={}}^^J%
}
{%
\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{duck}^^J%
\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{albatross}^^J%
\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{arara}^^J%
Animal list: \gls{glsxtrfieldformatcsvlist}\marg{example}\marg{animals}.^^J%
\codepar
See list: \gls{glsxtrifhasfield}\marg{see}\marg{example}\marg{\gls{glsxtrseelist}\marg{\gls{glscurrentfieldvalue}}}\marg{not set}.^^J%
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}
This first constructs a comma-separated list in a custom \idx{internalfield}
with the label \code{animals}. There's no associated key that can be
used in \gls{newglossaryentry}. In this case, the \idx{field} could simply
be set in one command. For example:
\begin{codebox}
\gls{glsxtrdeffield}\marg{example}\marg{animals}\marg{duck,albatross,arara}
\end{codebox}
The main reason for providing \gls{glsxtrapptocsvfield} is for the
benefit of \app{bib2gls}, as it sometimes has to construct a field
value list while it's writing the \ext{glstex} file, but there may
be other uses in complex documents that construct field values
through some custom function.

\cmddef{GlsXtrIfValueInFieldCsvList}
This does \meta{true} if the comma-separated list stored in the given \idx{field}
(identified by its \idxc{internalfieldlabel}{internal label})
contains the given \meta{value} (using \gls{DTLifinlist}
provided by \sty{datatool-base}) or \meta{false} if the value isn't in the
list or if the field hasn't been set or the entry hasn't been
defined. The unstarred version adds implicit grouping. The starred
version doesn't. 

This command internally uses \gls{glsxtrifhasfield}, so take care if
it's nested. Within \meta{false}, you can test if \gls{glscurrentfieldvalue}
is empty or undefined. If it's defined but not empty, then the field
has been set but doesn't contain \meta{value}.

\cmddef{GlsXtrIfFieldValueInCsvList}
This command is essentially the other way around to the above. 
In this case, the comma-separated list is provided in the argument
\meta{csv-list} and the search value is the field's value.
This does \meta{true} if the value is found in \meta{csv-list} or
\meta{false} if the value isn't in \meta{csv-list} or the field
isn't set or the entry hasn't been defined. The unstarred version
adds implicit grouping. The starred version doesn't. 
Again, this command internally uses \gls{glsxtrifhasfield}, so you
can test \gls{glscurrentfieldvalue} in \meta{false} to determine
whether or not the field has been set.

\cmddef{xGlsXtrIfValueInFieldCsvList}
As \gls{GlsXtrIfValueInFieldCsvList} but fully expands \meta{value}
first.

\section{List Fields}
\label{sec:listfields}

Comma-separated list fields are covered in
\sectionref{sec:csvfields}. The commands in this section are for
fields that store \sty{etoolbox} internal lists. Elements can be
appended to these fields using commands \gls{glsxtrfieldlistadd},
described in \sectionref{sec:setfields}. The commands listed below
provide an easy interface to iterate over the field values. See the
\sty{etoolbox} documentation for further details about internal
lists.

\cmddef{glsxtrfieldformatlist}
Formats the list using the same separators
as used by \sty{datatool}['s] \gls{DTLformatlist}.
This internally uses \sty{etoolbox}['s] \gls{forlistcsloop} with the
same handler macro as used with \gls{DTLformatlist}.

\cmddef{glsxtrfielddolistloop}
This uses \sty{etoolbox}['s] \gls{dolistcsloop}, which uses the
command \csfmt{do} as the handler.

\cmddef{glsxtrfieldforlistloop}
This uses \sty{etoolbox}['s] \gls{forlistcsloop}, which uses the
\meta{handler-cs} as the handler.

\cmddef{glsxtrfieldifinlist}
This uses \sty{etoolbox}['s] \gls{ifinlistcs} to test if \meta{item}
is in the list.

\cmddef{glsxtrfieldxifinlist}
This uses \sty{etoolbox}['s] \gls{xifinlistcs} to test if \meta{item}
is in the list.

\section{Field Conditionals}
\label{sec:fieldconditionals}

\cmddef{GlsXtrIfFieldUndef}
Tests if the given \idx{field} (identified by its
\idxc{internalfieldlabel}{internal label}) is undefined for the
entry given by \meta{entry-label}. Does \meta{true} if the entry
doesn't exists or if entry exists but the field hasn't been set.
Does \meta{false} if the field has been set, even if it has been set
to empty. Unlike \gls{glsxtrifhasfield} there is no grouping or
starred version and no assignment of \gls{glscurrentfieldvalue}. 
This is simply a shortcut that internally uses
\sty{etoolbox}['s] \gls{ifcsundef}. The base \sty{glossaries}
package provides a similar command \gls{ifglsfieldvoid}, which 
uses \sty{etoolbox}['s] \gls{ifcsvoid} instead.

\cmddef{glsxtrifhasfield}
This tests if the entry given by \meta{entry-label} has the 
\idx{field} identified by its \idxc{internalfieldlabel}{internal label}
\meta{field-label} set. This is like \gls{ifglshasfield} but 
doesn't produce a warning if the entry or field doesn't exist. 

This command first assigns \gls{glscurrentfieldvalue} to the field
value. If this is defined and not empty, \meta{true} is done otherwise
\meta{false} is done. You can test \gls{glscurrentfieldvalue} within
\meta{false} to find out whether it's undefined or empty using
\sty{etoolbox}'s commands, such as \gls{ifundef} or
\gls{ifdefempty}.

The unstarred version adds implicit grouping to make nesting easier.
The starred version doesn't (to make assignments easier).

\begin{information}
If you are simply displaying the value of the field (for example, in
the \idx{postdeschook}) then use the unstarred version. If you are
making an assignment based on the value of the field, then use the
starred version.
\end{information}

\cmddef{GlsXtrIfFieldCmpNum}
This command should only be used with fields that contain integer
values. It internally uses \gls{glsxtrifhasfield} (the starred or
unstarred version, to match the starred or unstarred version of
\gls{GlsXtrIfFieldEqStr}) and tests if \gls{glscurrentfieldvalue}
is equal to (\meta{op} is \code{=}), less than (\meta{op} is \code{<})
or greater than (\meta{op} is \code{>}) the given number
\meta{number}. If the field is empty or undefined, \gls{glscurrentfieldvalue}
will be set to \code{0}. Remember that the unstarred version adds
implicit grouping.

\cmddef{GlsXtrIfFieldEqNum}
This is a shortcut that uses \gls{GlsXtrIfFieldCmpNum} with
\meta{op} set to \code{=}. The unstarred version adds implicit
grouping.

\cmddef{GlsXtrIfFieldNonZero}
This is a shortcut that uses \gls{GlsXtrIfFieldCmpNum} with
\meta{op} set to \code{=} and the final two arguments swapped.
(So it's true if the field value is not zero.)
The unstarred version adds implicit grouping.

\cmddef{GlsXtrIfFieldEqStr}
This internally uses \gls{glsxtrifhasfield} (the starred or
unstarred version, to match the starred or unstarred version of
\gls{GlsXtrIfFieldEqStr}) and tests if \gls{glscurrentfieldvalue}
is equal to \meta{value}. Remember that the unstarred version adds
implicit grouping.

\cmddef{GlsXtrIfFieldEqXpStr}
This is like \gls{GlsXtrIfFieldEqStr} but expands the string before
the comparison. This also has an starred version that doesn't add
implicit grouping.

\cmddef{GlsXtrIfXpFieldEqXpStr}
This is like \gls{GlsXtrIfFieldEqStr} but expands both the field
value and the string before the comparison. This also has an starred
version that doesn't add implicit grouping.

There are additional conditionals described in the next section.

\section{\LaTeX3 Commands}
\label{sec:latex3utilities}

These commands all require \LaTeX3 syntax to be on.  Unlike most of the
commands in the previous section, there is no grouping or starred version and
no assignment of \gls{glscurrentfieldvalue}.  In all cases, the \idx{field}
is identified by its \idxc{internalfieldlabel}{internal label}. The test for
existence means testing if the field exists for the given entry. Existence
doesn't automatically mean that there's a corresponding key.

\cmddef{glossariesiffieldexists:nn}
True if the entry identified by \meta{entry-label} exists and has an internal field
identified by \meta{field-label} (which may or may not be empty).

\cmddef{glossariesiffieldset:nn}
True if the entry identified by \meta{entry-label} exists and has an 
internal field identified by \meta{field-label} set to a value 
that is not empty and not \gls{relax}.

\cmddef{glossariesiffieldeq:nnN}
True if the entry identified by \meta{entry-label} exists and has an internal field
identified by \meta{field-label} that has the same value as the given token list
variable.

\cmddef{glossariesiffieldeq:nnn}
True if the entry identified by \meta{entry-label} exists and has an internal field
identified by \meta{field-label} that has the given value.

\cmddef{glossariesiffieldeqfield:nnn}
True if the entry identified by \meta{entry-label} exists and has an internal field
identified by \meta{field-label} that has the same value as the internal field
identified by \meta{field2-label} (for the same entry).

\cmddef{glossariesiffieldeqfield:nnnn}
True if the entry identified by \meta{entry-label} exists and has an internal field
identified by \meta{field-label}
and the entry identified by \meta{entry2-label} exists and has an internal field
identified by \meta{field2-label} and both field values are the same.

\cmddef{glossariesusefield:nn}
Expands to the value of the field identified by its \idx{internalfieldlabel}
\meta{field-label} for the entry identifed by \meta{entry-label}. An error will 
occur if either the field or entry are undefined).

\chapter{Counting References}
\label{sec:countref}

There are three basic ways of counting entry references:
\begin{enumerate}
\item Counting the total number of times \gls{glsunset} is used
(\gls{glsreset} resets the count unless \gls{glsresetcurrcountfalse}
and is best avoided).  This is provided by the base \sty{glossaries}
package and is intended for documents where the term should be
displayed differently if it's only been used a certain number of
times.  The information has to be written to the \ext{aux} file so
that it's available on the next \LaTeX\ run.

This method is extended by \sty{glossaries-extra} and is
described in \sectionref{sec:entrycount}. This method relies on the
document only using the \idx{glslike} commands and is
inappropriate with \app{bib2gls}.

\item Counting the total number of records. This method is
only available with \app{bib2gls} and is intended
for documents where the term should be displayed differently
if it's only been \recorded\ (\indexed) a certain number of times.
This is a more efficient method than entry counting.
See \sectionref{sec:recordcount} for further details.

\item Counting the number of times the \idx{glslike} or
\idx{glstextlike} commands are used. Unlike the other two methods,
this just provides a running total rather than the total from the
previous \LaTeX\ run. This method is intended to make it more
convenient to work with hooks like \gls{glslinkcheckfirsthyperhook},
\gls{glslinkpostsetkeys} or \gls{glslinkpresetkeys}.
See \sectionref{sec:linkcount} for further details.
\end{enumerate}

\section{Entry Counting (First Use Flag)}
\label{sec:entrycount}

\begin{information}
If you are using \app{bib2gls}, you need to use record
counting instead (see \sectionref{sec:recordcount}).
\end{information}

Entry counting is provided by the base \sty{glossaries} package and
is enabled with \gls{glsenableentrycount}.
This keeps a count of the number of times an entry is marked as
used, which is done by hooking into the unset and reset commands
(see \sectionref{sec:glsunset}). The current running total can be
obtained with \gls{glsentrycurrcount}. The total from the end of the
previous \LaTeX\ run can be obtained with \gls{glsentryprevcount}.

Since entry counting relies on the \idx{firstuseflag}, it doesn't
take the \idx{glstextlike} commands into account. 

\begin{warning}
Entry counting is incompatible with \opteqvalref{docdef}{true}.
\end{warning}

The \sty{glossaries-extra} package modifies
\gls{glsenableentrycount} to allow for the \catattr{entrycount}
attribute. This means that you not only need to enable entry
counting with \gls{glsenableentrycount}, but you also need to set
the \catattr{entrycount} attribute (see below).

Prior to v1.49, the associated counter was reset back to 0 when the
\idx{firstuseflag} is reset. This behaviour is now only implemented if the
following conditional is true:
\cmddef{ifglsresetcurrcount}
To (locally) change this conditional to true use:
\cmddef{glsresetcurrcounttrue}
To (locally) change this conditional to false use:
\cmddef{glsresetcurrcountfalse}
As from v1.49, the default is now false. Note that this conditional
is also available with \sty{glossaries} v4.50+.

\begin{important}
Remember that entry counting only counts the number of times an
entry is used by commands that change the \idx{firstuseflag}. (That
is, all those commands that mark the entry as having been used.)
There are many commands that don't modify this flag and they won't
contribute to the entry use count.
\end{important}

With just the base \sty{glossaries} package, the associated entry
counting commands, such as \gls{cgls}, are only available when entry
counting has been activated with \gls{glsenableentrycount}. Whereas
with \sty{glossaries-extra}, those commands are always available but
behave in the same way as the corresponding \idx{glslike} commands
if entry counting hasn't been activated. The commands provided by
the \opt{shortcuts} options, such as \gls{ac} are defined to use
\gls{cgls} instead of \gls{gls} etc so you can use them either with
or without entry counting.

In order to activate entry counting with \sty{glossaries-extra}, you
not only need to use \gls{glsenableentrycount} but also need to
specify the trigger value.

\cmddef{GlsXtrEnableEntryCounting}
This command is provided as a shortcut to activate entry counting
and assign the trigger value. This command performs the following:
\begin{itemize}
\item enables entry counting with \gls{glsenableentrycount};
\item redefines the \idx{glslike} commands to do the equivalent
\gls{cgls} commands (so you don't need to keep track of which
entries have entry counting enabled);
\item sets the \catattr{entrycount} attribute to \meta{trigger-value} 
for all the supplied categories;
\item disables the unit counting command (which is incompatible).
\end{itemize}
If you want to have different trigger values for different
categories, you can set the \catattr{entrycount} attribute
afterwards for the other category. For example:
\begin{codebox}
\gls{GlsXtrEnableEntryCounting}\marg{\cat{abbreviation},\cat{acronym}}\marg{1}
\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{2}
\end{codebox}
If you use \gls{GlsXtrEnableEntryCounting} multiple times, the
repeated instances will simply set the \catattr{entrycount}
attribute for the listed categories. So the above can also be written
as:
\begin{codebox}
\gls{GlsXtrEnableEntryCounting}\marg{\cat{abbreviation},\cat{acronym}}\marg{1}
\gls{GlsXtrEnableEntryCounting}\marg{\cat{general}}\marg{2}
\end{codebox}

The commands like \gls{cgls} behave like the corresponding
\idx{glslike} command if the entry count at the end of the previous
run was more than a trigger value. With just the base
\sty{glossaries} package, this trigger value is 1. With
\sty{glossaries-extra} you can specify a different value.

\begin{important}
The appropriate trigger value must be set for the required category
or categories.
\end{important}

As with the \idx{glslike} commands, the \gls{cgls} set of commands
may also be used with the star (\code{*}) or plus (\code{+}) modifiers or the
modifier given by \gls{GlsXtrSetAltModifier}.

If the entry count at the end of the previous run doesn't exceed
the trigger value, the corresponding formatting command is used
instead. For example, \gls{cgls} will use \gls{cglsformat}. The
complete set of commands are:
\cmddef{cgls}
If the trigger value has been supplied for the entry's category 
and is exceeded, this behaves like \gls{gls} otherwise it uses:
\cmddef{cglsformat}
This is redefined by \sty{glossaries-extra} to test whether or not
the entry has the \catattr{regular} attribute set or is an
abbreviation:
\begin{compactcodebox}
\cmd{renewcommand}*\marg{\gls{cglsformat}}[2]\marg{\comment{}
  \gls{glsifregular}\marg{\#1}\marg{\gls{glsentryfirst}\marg{\#1}}\comment{}
  \marg{\comment{not regular}
    \gls{ifglshaslong}\marg{\#1}
      \marg{\gls{glsentrylong}\marg{\#1}}\comment{has long}
      \marg{\gls{glsentryfirst}\marg{\#1}}\comment{no long value}
  }\#2\comment{}
}
\end{compactcodebox}
This show the first use value if the entry is regular otherwise it
will show the long form. The insert is appended at the end.

\cmddef{cglspl}
If the trigger value has been supplied for the entry's category 
and is exceeded, this behaves like \gls{glspl} otherwise it uses:
\cmddef{cglsplformat}
This is like \gls{cglsformat} but uses the plural commands.

\cmddef{cGls}
If the trigger value has been supplied for the entry's category 
and is exceeded, this behaves like \gls{Gls} otherwise it uses:
\cmddef{cGlsformat}
This is like \gls{cglsformat} but uses the \idx{sentencecase}
commands.

\cmddef{cGlspl}
If the trigger value has been supplied for the entry's category 
and is exceeded, this behaves like \gls{Glspl} otherwise it uses:
\cmddef{cGlsplformat}
This is like \gls{cglsformat} but uses the plural \idx{sentencecase}
commands.

The \sty{glossaries-extra} package provides some additional
commands:

\cmddef{cGLS}
If the trigger value has been supplied for the entry's category 
and is exceeded, this behaves like \gls{GLS} otherwise it uses:
\cmddef{cGLSformat}
This simply uses \gls{cglsformat} converted to \idx{uppercase}.

\cmddef{cGLSpl}
If the trigger value has been supplied for the entry's category 
and is exceeded, this behaves like \gls{GLSpl} otherwise it uses:
\cmddef{cGLSplformat}
This simply uses \gls{cglsplformat} converted to \idx{uppercase}.

The test to determine whether or not an entry trips the trigger
value is performed by:
\cmddef{glsxtrifcounttrigger}
This obtains the trigger value from the entry's \catattr{entrycount}
attribute.

\begin{important}
Since these commands require information from the previous \LaTeX\
run, and extra \LaTeX\ call must be added to the build process
(before the relevant \idx{indexingapp}).
\end{important}

\mExampleref{ex:catentrycount} has the trigger value is set to
1. The CSS entry is only used once (which doesn't exceed the
trigger). The HTML entry is used twice (which does exceed the
trigger). The sample entry is only used once, but entry counting
hasn't been enabled on its category (the default \cat{general}).

\begin{codebox}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\gls{makeglossaries}
\gls{GlsXtrEnableEntryCounting}\marg{\cat{abbreviation}}\marg{1}
\gls{newabbreviation}\marg{css}\marg{CSS}\marg{cascading style sheet}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{an example}}
\cbeg{document}
First use: \gls{gls}\marg{css}, \gls{gls}\marg{html} and \gls{gls}\marg{sample}.
Next use: \gls{gls}\marg{html}.
\gls{printglossaries}
\cend{document}
\end{codebox}
If the document is saved in a file called \filefmt{myDoc.tex} then
the build process is:
\begin{terminal}
pdflatex myDoc
pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
\end{terminal}
Note the second \LaTeX\ call before \app{makeglossaries}.
\begin{resultbox}
\createexample*[arara={pdflatex,pdflatex,makeglossaries,pdflatex,pdfcrop},
  label={ex:catentrycount},
 title={Entry counting according to category},
 description={Example document illustrating entry counting}]
{%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{makeglossaries}^^J%
\gls{GlsXtrEnableEntryCounting}\marg{abbreviation}\marg{1}^^J%
\gls{newabbreviation}\marg{css}\marg{CSS}\marg{cascading style sheet}^^J%
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J%
\gls{newglossaryentry}\marg{sample}\marg{name={sample},description={an example}}^^J%
}
{%
First use: \gls{gls}\marg{css}, \gls{gls}\marg{html} and \gls{gls}\marg{sample}.^^J%
Next use: \gls{gls}\marg{html}.^^J%
\gls{printglossaries}
}
\end{resultbox}
Note that the CSS entry only shows the long form, doesn't appear in
the glossary and doesn't have a hyperlink. This is because the total
count from the previous \LaTeX\ run doesn't exceed the value (1, in
this case) that triggers the normal behaviour of \gls{gls}. The HTML
entry has a total count of 2 from the previous \LaTeX\ run, so it's
displayed as normal with the full form on \idx{firstuse} and has a
hyperlink to its entry in the glossary.

The sample entry is only used once, but it has the default \cat{general}
category, which doesn't have the \catattr{entrycount} attribute set.

Note that if the build process only had one \LaTeX\ call before
running \app{makeglossaries}, the HTML entry would also not appear
in the glossary. This is because on the first \LaTeX\ run, the total
from the previous run is 0 (because there's no information in the
\ext{aux} file).

The \sty{glossaries-extra} package also provides the ability to
count per sectional unit instead:
\cmddef{glsenableentryunitcount}

\begin{important}
It's not possible to enable both document-wide entry counting
(\gls{glsenableentrycount}) and unit entry counting
(\gls{glsenableentryunitcount}).
\end{important}

The unit entry counting provides separate totals for each section unit. As above, this
uses the \catattr{entrycount} attribute to provide the trigger value
but also requires the \catattr{unitcount} attribute, which should be
set to the name of the appropriate counter, such as \ctr{section} or
\ctr{chapter}.

\begin{warning}
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{warning}

As before, there is a command provided to enable the feature and set
the corresponding attributes at the same time:
\cmddef{GlsXtrEnableEntryUnitCounting}
This command performs the following:
\begin{itemize}
\item enables unit entry counting with \gls{glsenableentryunitcount};
\item redefines the \idx{glslike} commands to do the equivalent
\gls{cgls} commands (so you don't need to keep track of which
entries have entry counting enabled);
\item sets the \catattr{entrycount} attribute to the supplied
trigger for all the supplied categories;
\item sets the \catattr{unitcount} attribute to the supplied
counter for all the supplied categories;
\item disables the document-wide counting command (which is incompatible).
\end{itemize}
If you use \gls{GlsXtrEnableEntryUnitCounting} multiple times, the
repeated instances will simply set the \catattr{entrycount}
and \catattr{unitcount} attributes for the listed categories.

The counter value is used as part of a label, which means
that \thecountername\ needs to be expandable.
Since \sty{hyperref} also has a similar requirement and provides
\theHcountername\ as an expandable alternative,
\sty{glossaries-extra} will use \theHcountername\
if it exists otherwise it will use \thecountername.

The commands for accessing the totals, \gls{glsentrycurrcount} and
\gls{glsentryprevcount} have different definitions with unit entry
counting and will expand to the total for the current unit.
The overall totals can be obtained with additional commands:
\cmddef{glsentryprevtotalcount}
This expands to the overall total from the previous \LaTeX\ run.

\cmddef{glsentryprevmaxcount}
This expands to the maximum per-unit total from the previous \LaTeX\ run.

\mExampleref{ex:catunitentrycount} illustrates unit entry counting:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\codepar
\gls{GlsXtrEnableEntryUnitCounting}\marg{\cat{abbreviation}}\marg{2}\marg{section}
\codepar
\gls{makeglossaries}
\codepar
\comment{default \gloskeyval{category}{abbreviation}:}
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}
\gls{newabbreviation}\marg{css}\marg{CSS}\marg{cascading style sheet}
\codepar
\comment{default \gloskeyval{category}{general}:}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{sample}}
\codepar
\cbeg{document}
\cmd{section}\marg{Sample}
\codepar
Used once: \gls{gls}\marg{html}.
\codepar
Used three times: \gls{gls}\marg{css} and \gls{gls}\marg{css} and 
\gls{gls}\marg{css}.
\codepar
Used once: \gls{gls}\marg{sample}.
\codepar
\cmd{section}\marg{Another Sample}
\codepar
Used once: \gls{gls}\marg{css}.
\codepar
Used twice: \gls{gls}\marg{html} and \gls{gls}\marg{html}.
\codepar
\gls{printglossaries}
\cend{document}
\end{codebox}
As before, if the document is in a file called \filefmt{myDoc.tex}
then the build process is:
\begin{terminal}
pdflatex myDoc
pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
\end{terminal}

\begin{resultbox}
\createexample*[arara={pdflatex,pdflatex,makeglossaries,pdflatex,pdfcrop},
  label={ex:catunitentrycount},
 title={Entry unit counting (per section) according to category},
 description={Example document illustrating entry unit counting (per section)}]
{%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{GlsXtrEnableEntryUnitCounting}\marg{abbreviation}\marg{2}\marg{section}^^J%
\gls{makeglossaries}^^J%
\% default category=abbreviation:^^J%
\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J%
\gls{newabbreviation}\marg{css}\marg{CSS}\marg{cascading style sheet}^^J%
\% default category=general:^^J%
\gls{newglossaryentry}\marg{sample}\marg{name={sample},description={an example}}^^J%
}
{%
\cmd{section}\marg{Sample}
\codepar
Used once: \gls{gls}\marg{html}.
\codepar
Used three times: \gls{gls}\marg{css} and \gls{gls}\marg{css} and \gls{gls}\marg{css}.
\codepar
Used once: \gls{gls}\marg{sample}.
\codepar
\cmd{section}\marg{Another Sample}
\codepar
Used once: \gls{gls}\marg{css}.
\codepar
Used twice: \gls{gls}\marg{html} and \gls{gls}\marg{html}.
\codepar
\gls{printglossaries}
}
\end{resultbox}
In this document, the CSS entry is used three times in the
first section. This is more than the trigger value of 2, so
\code{\gls{gls}\marg{css}} is expanded on \idx{firstuse} with the short
form used on subsequent use, and the CSS entries in
that section are added to the glossary. In the second section,
the CSS entry is only used once, which trips the
suppression trigger, so in that section, the long form
is used and \code{\gls{gls}\marg{css}} doesn't get a line added to
the glossary file.

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

The sample entry has only been used once, but it doesn't
trip the indexing suppression because it's in the \cat{general}
category, which hasn't been listed in
\gls{GlsXtrEnableEntryUnitCounting}.

The per-unit entry counting can be used for other purposes.
\mExampleref{ex:unitentrycounthyper} has the trigger value set
to zero, which means the index suppression won't be triggered,
but the unit entry count is used to automatically suppress the
hyperlink for commands like \gls{gls} by modifying the
\gls{glslinkcheckfirsthyperhook}
which is used at the end of the macro the determines whether
or not to suppress the hyperlink.

\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\gls{makeglossaries}
\gls{GlsXtrEnableEntryUnitCounting}\marg{\cat{general}}\marg{0}\marg{page}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{an example}}
\codepar
\cmd{renewcommand}*\marg{\gls{glslinkcheckfirsthyperhook}}\marg{\comment{}
  \cmd{ifnum}\gls{glsentrycurrcount}\marg{\gls{glslabel}}>0
   \gls{setupglslink}\marg{hyper=false}\comment{}
  \cmd{fi}
}
\codepar
\cbeg{document}
\codepar
A \gls{gls}\marg{sample} entry.  Next use: \gls{gls}\marg{sample}.
\codepar
\cmd{newpage}
Next page: \gls{gls}\marg{sample}.  Again: \gls{gls}\marg{sample}.
\codepar
\gls{printglossaries}
\cend{document}
\end{codebox}
This only produces a hyperlink for the first instance of
\code{\gls{gls}\marg{sample}} on each page.

The earlier warning about using the \ctr{page} counter still
applies. If the first instance of \gls{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.

\begin{resultbox}
\createexample*[pages={1,2},
  label={ex:unitentrycounthyper},
  arara={pdflatex,pdflatex,makeglossaries,pdflatex,pdfcrop},
  title={Enabling unit counting to hook into hyperlink setting},
  description={Example document that demonstrates how to
  automatically switch off the hyperlink using unit counting}]
{%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\marg{glossaries-extra}^^J%
\codepar
\gls{makeglossaries}^^J%
\codepar
\gls{GlsXtrEnableEntryUnitCounting}\marg{general}\marg{0}\marg{page}^^J%
\codepar
\gls{newglossaryentry}\marg{sample}\marg{name={sample},description={an example}}^^J%
\codepar
\cmd{renewcommand}*\marg{\gls{glslinkcheckfirsthyperhook}}\marg{\%^^J
  \cmd{ifnum}\gls{glsentrycurrcount}\marg{\gls{glslabel}}>0^^J
   \gls{setupglslink}\marg{hyper=false}\%^^J
  \cmd{fi}^^J%
}
}
{A \gls{gls}\marg{sample} entry.  Next use: \gls{gls}\marg{sample}.
\codepar
\cmd{newpage}^^J%
Next page: \gls{gls}\marg{sample}.  Again: \gls{gls}\marg{sample}.
\codepar
\gls{printglossaries}
}
\end{resultbox}

\section{Link Counting}
\label{sec:linkcount}

As from version 1.26, an alternative method of entry counting
is to count the number of times the \idx{glslike} or
\idx{glstextlike} commands are used. (The \qt{link} in this method's
name refers to the use of the internal command \csfmt{@gls@link}
not to \gls{hyperlink} although \csfmt{@gls@link} may use
\gls{hyperlink} when displaying the \idx{linktext}.)

To enable link counting use the preamble-only command:
\cmddef{GlsXtrEnableLinkCounting}
where \meta{categories} is a list of category labels. The optional
argument \meta{parent counter} may be used to identify a parent
counter (which must already be defined). If present, the associated
link counter will be reset when the parent counter is incremented.
This command automatically sets the \catattr{linkcount} attribute
for the given categories. If the optional argument is
present, it also sets the \catattr{linkcountmaster} attribute.

When enabled, the \idx{glslike} and \idx{glstextlike} commands 
will increment the associated counter using
\cmddef{glsxtrinclinkcounter}
This just does
\code{\gls{stepcounter}\margm{counter}} by default but if you
need \gls{refstepcounter} instead, just redefine this command:
\begin{codebox}
\gls{renewcommand}*\marg{\gls{glsxtrinclinkcounter}}[1]\marg{\comment{}
 \gls{refstepcounter}\marg{\#1}}
\end{codebox}

You can access the internal count register using:
\cmddef{GlsXtrLinkCounterValue}
where \meta{label} is the entry's label. This will expand
to 0 if the register hasn't been defined.

It's also possible to access the display value
(\gls{thecounter}) using
\cmddef{GlsXtrTheLinkCounter}
(This will expand to 0 if the counter hasn't been defined.)

\begin{important}
In order to conserve resources, the counter is only defined
when it first needs to be incremented so terms that have
been defined but haven't been used in the document
won't have the associated count register allocated.
\end{important}

You can test if the counter has been defined using:
\cmddef{GlsXtrIfLinkCounterDef}
This expands to \meta{true} if the link counter associated with the
entry identified by \meta{entry-label} has been defined, otherwise
expands to \meta{false}.

The counter name can be obtained using
\cmddef{GlsXtrLinkCounterName}
This simply expands to the counter name associated with the
entry given by \meta{entry-label} without any check for
existence. For example, to change the display command
(\gls{thecounter}) using \sty{etoolbox}:
\begin{codebox}
\gls{csdef}\marg{the\gls{GlsXtrLinkCounterName}\marg{duck}}\comment{}
 \marg{\gls{Roman}\marg{\gls{GlsXtrLinkCounterName}\marg{duck}}}
\end{codebox}

This is useful if you just want to change the display for
specific entries but isn't convenient if you want to change the
display for all entries. Instead, it's simpler to redefine
\gls{GlsXtrTheLinkCounter}. For example:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{GlsXtrTheLinkCounter}}[1]\marg{\comment{}
 \gls{GlsXtrIfLinkCounterDef}\marg{\#1}\comment{}
 \marg{\gls{Roman}\marg{\gls{GlsXtrLinkCounterName}\marg{\#1}}}\comment{}
 \marg{0}\comment{}
}
\end{codebox}
In both cases, the redefinition should be implemented
after \gls{GlsXtrEnableLinkCounting}.

\mExampleref{ex:linkcount} uses link counting to disable
the hyperlink after the first reference. This redefines
\gls{glslinkpresetkeys} (which is used by both \gls{gls}
and \gls{glstext}) instead of
\gls{glslinkcheckfirsthyperhook} (which is used by \gls{gls}
but not by \gls{glstext}).
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\marg{glossaries-extra}
\codepar
\gls{makeglossaries}
\codepar
\cmd{renewcommand}*\marg{\gls{glslinkpresetkeys}}\marg{\comment{}
 \cmd{ifnum}\gls{GlsXtrLinkCounterValue}\marg{\gls{glslabel}}>1
  \gls{setupglslink}\marg{\glsoptval{hyper}{false}}\comment{}
 \cmd{fi}
}
\codepar
\gls{GlsXtrEnableLinkCounting}\marg{\cat{general}}
\codepar
\gls{newglossaryentry}\marg{sample1}\marg{\gloskeyval{name}{sample1},
 \gloskeyval{description}{an example}}
\gls{newglossaryentry}\marg{sample2}\marg{\gloskeyval{name}{sample2},
 \gloskeyval{description}{another example}}
\codepar
\gls{newabbreviation}\marg{ex}\marg{ex}\marg{example}
\codepar
\cbeg{document}
\cmd{section}\marg{Sample Section}
\codepar
\gls{Gls}\marg{sample1}, \gls{gls}\marg{sample2} and \gls{gls}\marg{ex}.
\gls{Glstext}\marg{sample1} and \gls{gls}\marg{ex} again.
\codepar
\cmd{section}\marg{Another Sample Section}
\codepar
\gls{Gls}\marg{sample1}, \gls{gls}\marg{sample2} and \gls{gls}\marg{ex}.
\codepar
\gls{printglossaries}
\cend{document}
\end{codebox}
The use of \gls{glslinkpresetkeys}
means that the options can override this. For example
\begin{codebox}
\gls{gls}\oarg{\glsoptval{hyper}{true}}\marg{sample1}
\end{codebox}
(or simply \code{\gls{gls}+\marg{sample1}})
will override the \glsoptval{hyper}{false} setting in
\gls{glslinkpresetkeys}. If \gls{glslinkpostsetkeys} is used
instead, the \glsoptval{hyper}{false} setting will override
the setting provided in the optional argument.

\begin{resultbox}
\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop},
 label={ex:linkcount},
 title={Link counting used to selectively suppress hyperlinks},
description={Example document that uses link counting to selectively suppress
hyperlinks}]
{%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\marg{glossaries-extra}
\codepar
\gls{makeglossaries}
\codepar
\cmd{renewcommand}*\marg{\gls{glslinkpresetkeys}}\marg{\%^^J
 \cmd{ifnum}\gls{GlsXtrLinkCounterValue}\marg{\gls{glslabel}}>1^^J
  \gls{setupglslink}\marg{hyper=false}\%^^J%
 \cmd{fi}
}
\codepar
\gls{GlsXtrEnableLinkCounting}\marg{general}
\codepar
\gls{newglossaryentry}\marg{sample1}\marg{\gloskeyval{name}{sample1},\gloskeyval{description}{an
example}}^^J%
\gls{newglossaryentry}\marg{sample2}\marg{\gloskeyval{name}{sample2},\gloskeyval{description}{another example}}
\codepar
\gls{newabbreviation}\marg{ex}\marg{ex}\marg{example}
\codepar
}
{\cmd{section}\marg{Sample Section}^^J%
\codepar
\gls{Gls}\marg{sample1}, \gls{gls}\marg{sample2} and \gls{gls}\marg{ex}.^^J%
\gls{Glstext}\marg{sample1} and \gls{gls}\marg{ex} again.^^J%
\codepar
\cmd{section}\marg{Another Sample Section}^^J%
\codepar
\gls{Gls}\marg{sample1}, \gls{gls}\marg{sample2} and \gls{gls}\marg{ex}.^^J%
\codepar
\gls{printglossaries}
}
\end{resultbox}

The \cat{abbreviation} category doesn't have the
\catattr{linkcount} attribute set (since it's not
listed in the argument of \gls{GlsXtrEnableLinkCounting}). This means that
\gls{GlsXtrLinkCounterValue}
always expands to 0 for the abbreviation (\code{ex}), so the
inequality test:
\begin{codebox}
\cmd{ifnum}\gls{GlsXtrLinkCounterValue}\marg{\gls{glslabel}}>1
\end{codebox}
will always be false. This means that the abbreviation won't
have \glsoptval{hyper}{false} applied. If the test is changed to
\begin{codebox}
\cmd{ifnum}\gls{GlsXtrLinkCounterValue}\marg{\gls{glslabel}}=1
\cmd{else}
 \gls{setupglslink}\marg{\glsoptval{hyper}{false}}\comment{}
\cmd{fi}
\end{codebox}
Then the abbreviation will always have \glsoptval{hyper}{false}
applied.

To reset the counter every section use the optional argument to set
the parent counter:
\begin{codebox}
\gls{GlsXtrEnableLinkCounting}\oarg{section}\marg{\cat{general}}
\end{codebox}


\chapter{Multi (or Compound) Entries}
\label{sec:multientries}

Nested entries (where the entry definition references other entries)
are discussed in \sectionref{sec:nested}. This chapter deals with
occasions where a term or phrase may consist of multiple sub-terms
that are independently defined. (Examples in
\sectionref{sec:exskipfirstsuffix} and
\sectionref{sec:exskippostlink} provide workarounds for nested
entries.)

For example, the names of bacteria, such as \emph{Clostridium
botulinum} and \emph{Clostridium perfringens}, are made up of the
genus (for example, \emph{Clostridium}) and the species
(for example, \emph{botulinum} or \emph{perfringens}). The genus is
often abbreviated after \gls{firstuse}. For example, \emph{C.
botulinum}. However, if the name is defined as a single term
consisting of both the genus and species then it's not possible to
apply the abbreviation when a different species with the same genus
is used.
Consider the following document:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\marg{glossaries-extra}
\gls{setabbreviationstyle}\marg{\abbrstyle{long-only-short-only}}
\gls{newabbreviation}\marg{cbot}\marg{C. botulinum}\marg{Clostridium botulinum}
\gls{newabbreviation}\marg{cperf}\marg{C. perfringens}\marg{Clostridium perfringens}
\cbeg{document}
\gls{gls}\marg{cbot}, \gls{gls}\marg{cbot}, \gls{gls}\marg{cperf}.
\cend{document}
\end{codebox}
The result is:
\begin{resultbox}
Clostridium botulinum, C. botulinum, Clostridium perfringens.
\end{resultbox}
However, it should more typically be:
\begin{quote}
Clostridium botulinum, C. botulinum, C. perfringens.
\end{quote}
In this case, the genus should actually be a separate definition:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\marg{glossaries-extra}
\gls{setabbreviationstyle}\marg{\abbrstyle{long-only-short-only}}
\gls{newabbreviation}\marg{clostridium}\marg{C.}\marg{Clostridium}
\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},
 \gloskeyval{description}{}}
\cbeg{document}
\gls{gls}\marg{clostridium} \gls{gls}\marg{botulinum}, 
\gls{gls}\marg{clostridium} \gls{gls}\marg{botulinum}, 
\gls{gls}\marg{clostridium} \gls{gls}\marg{perfringens}.
\cend{document}
\end{codebox}
However, the above is far more cumbersome than the previous example.

This chapter describes a more compact method for dealing with such a
situation. Each term should be defined as normal (as in the above
example), and a \qt{multi-entry} label is then defined with the list
of labels of the entries that need to be referenced.

\cmddef{multiglossaryentry}
This defines a multi-entry set with the label
\meta{multi-label}, consisting of the entries whose labels are
listed in \meta{entry-label-list}, where the main entry (which must be
present in \meta{entry-label-list}) is identified by \meta{main-label}.
If \meta{main-label} is omitted, it's assumed to be the final label
in \meta{entry-label-list}. The main entry is described in more detail in
\sectionref{sec:mglsmain}.

\begin{important}
The entries in \meta{entry-label-list} must already be defined (using
commands like \gls{newglossaryentry} or \gls{newabbreviation}).
\end{important}

The \meta{options} are a comma-separated list of options to override
the current settings and are described in \sectionref{sec:multiglsoptions}.

The earlier example can now be modified to include the following:
\begin{codebox}
\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum}
\gls{multiglossaryentry}\marg{cperf}\marg{clostridium,perfringens}
\end{codebox}
These commands must come after the \code{clostridium},
\code{botulinum} and \code{perfringens} definitions.

Once defined, a multi-entry set can be referenced in the document using commands like:
\cmddef{mgls}
This command essentially does \code{\gls{gls}\margm{label}} for each item in
the \meta{label list} (with separators, see
\sectionref{sec:mglssep}). If the final optional argument
\meta{insert} is provided, it will be applied to the final
(non-skipped) element in the list.  So the document body in the
above example, can be rewritten as:
\begin{codebox}
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}.
\end{codebox}

There are some variants of \gls{mgls} listed in \sectionref{sec:mglslike}.
The available \meta{options} are listed in \sectionref{sec:mglsopts}. They are
applied after the \gls{multiglossaryentry} options and will override
settings for the individual entries.

\begin{important}
You can't use \meta{multi-label} in commands like \gls{gls}
as this label represents a set of entry labels not a single entry.
\end{important}

The \gls{multiglossaryentry} command will generate an error if the label has already
been defined as a multi-entry.

\cmddef{providemultiglossaryentry}
This does nothing if a multi-entry set with the given label has
already been defined otherwise it will act like
\gls{multiglossaryentry}. Notes and associated commands applying to
\gls{multiglossaryentry} also apply to
\gls{providemultiglossaryentry} unless otherwise stated.

\begin{important}
\gls{multiglossaryentry} may be placed anywhere after the entries
listed in \meta{label list} have been defined.  A multi-entry label can't be
referenced (with commands like \gls{mgls}) before it has been defined.
\end{important}

There is limited support for \optval{docdef}{true}. The multi-entry
definition can be picked up from the \ext{aux} file on the next
run to allow cross-references in any glossaries that occur at the
start of the document. Any changes made with commands like
\gls{mglsSetMain} won't be carried over to the next run.

By default \gls{multiglossaryentry} will be localised to the current scope.
If you want to globally define a multi-entry you need to first
switch on global definitions with:
\cmddef{multiglossaryentryglobaltrue}
To switch back to local definitions use:
\cmddef{multiglossaryentryglobalfalse}
You can test if this setting is on with:
\cmddef{ifmultiglossaryentryglobal}

If you want to change the multi-entry options (locally) you can use:
\cmddef{mglsSetOptions}
This removes the original options and replaces them with
\meta{new-options}. If you want to (locally) append to the
existing options, use:
\cmddef{mglsAddOptions}

Note that \gls{multiglossaryentry} doesn't make any adjustments to
the component entries. You will need to use the \gloskey{parent} key
when you define the entries if you want a hierarchical structure in
your \idx{glossary}. (See the example in \sectionref{sec:mglsexhier}.)

If you don't want the other elements in the glossary, you can
suppress the indexing with \mglsoptval{indexothers}{false}
(\sectionref{sec:multiglsoptionsindexing}) or put them in an ignored
glossary. For example:
\begin{codebox}
\gls{newignoredglossary}\marg{common}
\gls{newabbreviation}\oarg{\gloskeyval{type}{common}}\marg{clostridium}\marg{C.}\marg{Clostridium}
\end{codebox}

The \meta{multi-label} can't be used in commands like \gls{gls} since
the label refers to a set of entry labels not to an individual
entry. Similarly, an individual entry label can't be used in
commands like \gls{mgls}. It is possible (although potentially
confusing) to use the same label for a multi-entry as for an
individual entry (see the example in
\sectionref{sec:exskippostlink}). Context will determine which is
meant, except in the case of the cross-referencing fields
(\gloskey{see}, \gloskey{seealso} and \gloskey{alias}) where the
cross-referenced label will first be tested if it's a known
multi-entry label.

If you don't want to have to keep track of which labels refer to
multi-entries and which refer to individual entries you can use:
\cmddef{GlsXtrMglsOrGls}
where \meta{mgls cs} is the \gls{mgls}-like command to use if
\meta{label} has been defined as a multi-entry and \meta{gls cs} is
the \idx{glslike} or \idx{glstextlike} command to use otherwise.
The \meta{modifier} may be omitted, otherwise it's the modifier
that may be used with \gls{mgls} or \gls{gls} (asterisk \code{*},
plus \code{+} or the token identified with \gls{GlsXtrSetAltModifier}). The
modifier and remaining options are passed to the relevant command
(\meta{mgls cs} or \meta{gls cs}).

You may prefer to define your own shortcut commands for common
combinations. For example, (assuming these commands haven't already
been defined by the \opt{shortcuts} option):
\begin{codebox}
\cmd{newcommand}\marg{\gls{ac}}\marg{\gls{GlsXtrMglsOrGls}\marg{\gls{mgls}}\marg{\gls{gls}}}
\cmd{newcommand}\marg{\gls{acp}}\marg{\gls{GlsXtrMglsOrGls}\marg{\gls{mglsmainpl}}\marg{\gls{glspl}}}
\cmd{newcommand}\marg{\gls{Ac}}\marg{\gls{GlsXtrMglsOrGls}\marg{\gls{Mgls}}\marg{\gls{Gls}}}
\cmd{newcommand}\marg{\gls{Acp}}\marg{\gls{GlsXtrMglsOrGls}\marg{\gls{Mglsmainpl}}\marg{\gls{Glspl}}}
\end{codebox}

\section{Examples}
\label{sec:mglsexamples}

\subsection{Example: Hierarchical}
\label{sec:mglsexhier}

Bacteria names are represented by the genus (for example,
Clostridium) followed by the species (for example, botulinum).
\mExampleref{ex:multientryhier} has the genus as a parent of the species.
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}[\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}]\marg{glossaries-extra}
\codepar
\gls{makeglossaries}
\codepar
\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}
\gls{glssetcategoriesattributes}
 \marg{genus,species}\comment{categories}
 \marg{\catattr{textformat},\catattr{glossnamefont}}\comment{attributes}
 \marg{latinname}
\codepar
\gls{setabbreviationstyle}\oarg{genus}
 \marg{\abbrstyle{long-only-short-only-desc}}
\gls{newabbreviation}
 \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}
 \marg{clostridium}\marg{C.}\marg{Clostridium}
\codepar
\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},
  \gloskeyval{category}{species},
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}
\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},
  \gloskeyval{category}{species},\gloskeyval{description}{},
  \gloskeyval{parent}{clostridium}}
\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},
  \gloskeyval{category}{species},
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}
\codepar
\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum}
\gls{multiglossaryentry}\marg{cperf}\marg{clostridium,perfringens}
\gls{multiglossaryentry}\marg{ctet}\marg{clostridium,tetani}
\codepar
\gls{multiglossaryentrysetup}\marg{\mglsoptval{indexothers}{false},\mglsoptval{hyper}{allmain}}
\codepar
\cbeg{document}
First use: \gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.
\codepar
Next use: \gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.
\gls{printglossaries}
\cend{document}
\end{codebox}
This suppresses the indexing of the non-main elements (in this case,
the genus). However the genus is included in the glossary (without a
\gls{locationlist}) because it's the parent of the species (which are
indexed).
\begin{resultbox}
\createexample*[title={Multi-entries: hierarchical},
 label={ex:multientryhier},
 description={Example document with hierarchical multi-entries},
 arara={pdflatex,makeglossaries,pdflatex,pdfcrop}]
{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[stylemods=bookindex,style=bookindex]\marg{glossaries-extra}^^J%
\codepar
\gls{makeglossaries}^^J%
\codepar
\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}^^J%
\gls{glssetcategoriesattributes}^^J
 \marg{genus,species}\marg{textformat,glossnamefont}\marg{latinname}^^J%
\codepar
\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only-desc}^^J%
\gls{newabbreviation}^^J
 \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}^^J
 \marg{clostridium}\marg{C.}\marg{Clostridium}^^J%
\codepar
\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\codepar
\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum}^^J%
\gls{multiglossaryentry}\marg{cperf}\marg{clostridium,perfringens}^^J%
\gls{multiglossaryentry}\marg{ctet}\marg{clostridium,tetani}^^J%
\codepar
\gls{multiglossaryentrysetup}\marg{indexothers=false,hyper=allmain}
}
{%
First use:
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J%
\codepar
Next use:
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J%
\gls{printglossaries}
}
\end{resultbox}

The \mglsoptval{hyper}{allmain} option makes the entire content of each
\gls{mgls} a hyperlink to the main entry in the glossary.

\subsection{Example: Suffix}
\label{sec:mglsexsuffix}

\mExampleref{ex:multientryhierfirstusesuffix}
is a minor modification of \exampleref{ex:multientryhier}. In this
case the multi-entries are defined with a suffix:
\begin{codebox}
\gls{multiglossaryentry}\oarg{\mglsoptval{firstsuffix}{botulism}}\marg{cbot}\marg{clostridium,botulinum}
\gls{multiglossaryentry}\oarg{\mglsoptval{firstsuffix}{gas gangrene}}\marg{cperf}\marg{clostridium,perfringens}
\gls{multiglossaryentry}\oarg{\mglsoptval{firstsuffix}{tetanus}}\marg{ctet}\marg{clostridium,tetani}
\end{codebox}
The rest of the document is as for \exampleref{ex:multientryhier} in \sectionref{sec:mglsexhier}.
\begin{resultbox}
\createexample*[title={Multi-entries: hierarchical with first-use suffix},
 label={ex:multientryhierfirstusesuffix},
 description={Example document with hierarchical multi-entries that
have a first-use suffix},
 arara={pdflatex,makeglossaries,pdflatex,pdfcrop}]
{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[stylemods=bookindex,style=bookindex]\marg{glossaries-extra}^^J%
\codepar
\gls{makeglossaries}^^J%
\codepar
\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}^^J%
\gls{glssetcategoriesattributes}^^J
 \marg{genus,species}\marg{textformat,glossnamefont}\marg{latinname}^^J%
\codepar
\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only-desc}^^J%
\gls{newabbreviation}^^J
 \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}^^J
 \marg{clostridium}\marg{C.}\marg{Clostridium}^^J%
\codepar
\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\codepar
\gls{multiglossaryentry}\oarg{firstsuffix=botulism}\marg{cbot}\marg{clostridium,botulinum}^^J%
\gls{multiglossaryentry}\oarg{firstsuffix=gas gangrene}\marg{cperf}\marg{clostridium,perfringens}^^J%
\gls{multiglossaryentry}\oarg{firstsuffix=tetanus}\marg{ctet}\marg{clostridium,tetani}^^J%
\codepar
\gls{multiglossaryentrysetup}\marg{indexothers=false,hyper=allmain}
}
{%
First use:
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J%
\codepar
Next use:
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J%
\gls{printglossaries}
}
\end{resultbox}

\subsection{Example: Category Suffix}
\label{sec:mglsexcatsuffix}

\mExampleref{ex:multientryhiercatsuffix}
is an alternative to \exampleref{ex:multientryhierfirstusesuffix}. Instead of storing
the extra information in the \mglsopt{firstsuffix} key, the
information is stored in the \gloskey{user1} key of the last
element (the species). A category suffix is used to look up the
field and append it.
\begin{codebox}
\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},
  \gloskeyval{category}{species},
  \gloskeyval{user1}{botulism},
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}
\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},
  \gloskeyval{category}{species},
  \gloskeyval{user1}{gas gangrene},
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}
\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},
  \gloskeyval{category}{species},
  \gloskeyval{user1}{tetanus},
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}
\codepar
\gls{mglsdefcategorysuffix}\marg{bacteria}\marg{\comment{}
 \gls{mglsisfirstuse}
 \marg{\comment{only on first use:}
  \gls{glsxtrifhasfield}\marg{useri}\marg{\gls{mglslastelementlabel}}\comment{}
   \marg{ (\gls{glscurrentfieldvalue})}
   \marg{}\comment{}
 }\comment{}
 \marg{}\comment{}
}
\codepar
\gls{multiglossaryentry}\oarg{category=bacteria}\marg{cbot}\marg{clostridium,botulinum}
\gls{multiglossaryentry}\oarg{category=bacteria}\marg{cperf}\marg{clostridium,perfringens}
\gls{multiglossaryentry}\oarg{category=bacteria}\marg{ctet}\marg{clostridium,tetani}
\end{codebox}
The result is the same as for \exampleref{ex:multientryhierfirstusesuffix}.
\begin{resultbox}
\createexample*[title={Multi-entries: hierarchical with category suffix},
 label={ex:multientryhiercatsuffix},
 description={Example document with hierarchical multi-entries that
have a category suffix},
 arara={pdflatex,makeglossaries,pdflatex,pdfcrop}]
{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[stylemods=bookindex,style=bookindex]\marg{glossaries-extra}^^J%
\codepar
\gls{makeglossaries}^^J%
\codepar
\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}^^J%
\gls{glssetcategoriesattributes}^^J
 \marg{genus,species}\marg{textformat,glossnamefont}\marg{latinname}^^J%
\codepar
\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only-desc}^^J%
\gls{newabbreviation}^^J
 \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}^^J
 \marg{clostridium}\marg{C.}\marg{Clostridium}^^J%
\codepar
\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{category}{species},^^J
  \gloskeyval{user1}{botulism},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},\gloskeyval{category}{species},^^J
  \gloskeyval{user1}{gas gangrene},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},\gloskeyval{category}{species},^^J
  \gloskeyval{user1}{tetanus},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J%
\codepar
\gls{mglsdefcategorysuffix}\marg{bacteria}\marg{\%^^J%
 \gls{mglsisfirstuse}^^J
 \marg{\gls{glsxtrifhasfield}\marg{useri}\marg{\gls{mglslastelementlabel}}\marg{
(\gls{glscurrentfieldvalue})}\marg{}}\%^^J
 \marg{}\%^^J%
}
\codepar
\gls{multiglossaryentry}\oarg{category=bacteria}\marg{cbot}\marg{clostridium,botulinum}^^J%
\gls{multiglossaryentry}\oarg{category=bacteria}\marg{cperf}\marg{clostridium,perfringens}^^J%
\gls{multiglossaryentry}\oarg{category=bacteria}\marg{ctet}\marg{clostridium,tetani}^^J%
\codepar
\gls{multiglossaryentrysetup}\marg{indexothers=false,hyper=allmain}
}
{%
First use:
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J%
\codepar
Next use:
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J%
\gls{printglossaries}
}
\end{resultbox}

\subsection{Example: Separators}
\label{sec:mglsexsep}

\mExampleref{ex:multientrysep} modifies
\exampleref{ex:multientryhier} (from \sectionref{sec:mglsexhier}) so
that the species are also abbreviations. In this case, the
separators are modified to suppress the space (\gls{relax}) if both the genus and
species are abbreviated, or to use a \idx{nbsp} between
the genus short form (shown on subsequent use) and the species long
form (shown on \idx{firstuse}). If the genus is showing the long form
(\idx{firstuse}) then a normal space is used.

Note that the separator attributes apply to the category of the
element before the separator (not to the multi-entry category).
\begin{codebox}
\gls{glssetcategoryattribute}\marg{genus}
 \marg{\catattr{combinedfirstsepfirst}}\marg{\cmd{space}}
\gls{glssetcategoryattribute}\marg{genus}
 \marg{\catattr{combinedfirstsep}}\marg{\cmd{space}}
\gls{glssetcategoryattribute}\marg{genus}
 \marg{\catattr{combinedsepfirst}}\marg{\glssymbol{idx.nbsp}}
\gls{glssetcategoryattribute}\marg{genus}\marg{\catattr{combinedsep}}\marg{\gls{relax}}
\codepar
\gls{setabbreviationstyle}\oarg{species}
 \marg{\abbrstyle{long-only-short-only-desc}}
\codepar
\gls{newabbreviation}\oarg{\gloskeyval{category}{species},
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{botulinum}\marg{bot.}\marg{botulinum}
\gls{newabbreviation}\oarg{\gloskeyval{category}{species},
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{perfringens}\marg{per.}\marg{perfringens}
\gls{newabbreviation}\oarg{\gloskeyval{category}{species},
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{tetani}\marg{tet.}\marg{tetani}
\end{codebox}
This will cause a double dot at the end of the second sentence,
which can be suppressed using the \catattr{discardperiod} and
\catattr{retainfirstuseperiod} attributes.
\begin{codebox}
\gls{glssetcategoriesattributes}\marg{species}
 \marg{\catattr{discardperiod},\catattr{retainfirstuseperiod}}\marg{true}
\end{codebox}
This works because the final element's \idx{postlinkhook} is transferred
to the multi-entry post-link hook, which can detect the sentence
terminating period. If the post-link hook settings are changed, for example, to
\code{\mglsoptval{postlinks}{all},\mglsoptval{mpostlink}{false}} then the feature
won't work as the final element's \idx{postlinkhook} can't detect the
period (because \gls{gls} is embedded too deeply inside the internal
workings of \gls{mgls}).
\begin{resultbox}
\createexample*[title={Multi-entries: separators},
 label={ex:multientrysep},
 description={Example document demonstrating multi-entry separators},
 arara={pdflatex,makeglossaries,pdflatex,pdfcrop}]
{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[stylemods=bookindex,style=bookindex]\marg{glossaries-extra}
\codepar
\gls{makeglossaries}
\codepar
\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}^^J%
\gls{glssetcategoriesattributes}^^J
 \marg{genus,species}\marg{textformat,glossnamefont}\marg{latinname}^^J%
\gls{glssetcategoriesattributes}\marg{species}\marg{discardperiod,retainfirstuseperiod}\marg{true}^^J%
\codepar
\% multi-entry category attributes:^^J%
\gls{glssetcategoryattribute}\marg{genus}\marg{combinedfirstsepfirst}\marg{\cmd{space}}^^J%
\gls{glssetcategoryattribute}\marg{genus}\marg{combinedfirstsep}\marg{\cmd{space}}^^J%
\gls{glssetcategoryattribute}\marg{genus}\marg{combinedsepfirst}\marg{\string~}^^J%
\gls{glssetcategoryattribute}\marg{genus}\marg{combinedsep}\marg{\gls{relax}}^^J%
\codepar
\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only-desc}^^J%
\gls{newabbreviation}^^J
 \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}^^J
 \marg{clostridium}\marg{C.}\marg{Clostridium}
\codepar
\gls{setabbreviationstyle}\oarg{species}\marg{long-only-short-only-desc}^^J%
\codepar
\gls{newabbreviation}\oarg{\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{botulinum}\marg{bot.}\marg{botulinum}^^J%
\gls{newabbreviation}\oarg{\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{perfringens}\marg{per.}\marg{perfringens}^^J%
\gls{newabbreviation}\oarg{\gloskeyval{category}{species},^^J
  \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{tetani}\marg{tet.}\marg{tetani}^^J%
\codepar
\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum}^^J%
\gls{multiglossaryentry}\marg{cperf}\marg{clostridium,perfringens}^^J%
\gls{multiglossaryentry}\marg{ctet}\marg{clostridium,tetani}^^J%
\codepar
\gls{multiglossaryentrysetup}\marg{indexothers=false,hyper=allmain}
}
{%
First use:
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J%
\codepar
Next use:
\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J%
\gls{printglossaries}
}
\end{resultbox}

\subsection{Example: Skipping Elements (Fragment Element)}
\label{sec:exskipfirstsuffix}

\mExampleref{ex:multientryskip}
is an alternative way of dealing with nested links
(see \sectionref{sec:nested}).
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}[\opt{stylemods},\optval{style}{\glostyle{long}}]\marg{glossaries-extra}
\codepar
\gls{makeglossaries}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc}}
\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side includes}
\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language}
\codepar
\gls{setabbreviationstyle}\oarg{combinedabbrv}
 \marg{\abbrstyle{long-only-short-sc-only}}
\gls{newabbreviation}
 \oarg{\gloskeyval{category}{combinedabbrv},
  \gloskeyval{description}{\gls{glsxtrshort}\marg{ssi} enabled
   \gls{glsxtrshort}\marg{html}}}
 \marg{shtml-frag}\marg{shtml}\marg{enabled}
\codepar
\gls{glssetcategoryattribute}
 \marg{combinedabbrv}\marg{\catattr{multioptions}}
 \marg{\mglsopt{usedskipothers},
  \mglsoptvalm{firstsuffix}{\gls{glsxtrshort}\marg{\gls{mglslastmainlabel}}}
 }
\codepar
\gls{multiglossaryentry}
 \oarg{\mglsoptval{category}{combinedabbrv}}
 \marg{shtml}\oarg{shtml-frag}\marg{ssi,shtml-frag,html}
\codepar
\cbeg{document}
Individual elements first use: \gls{gls}\marg{ssi} and
\gls{gls}\marg{html}.
\codepar
Individual elements next use: \gls{gls}\marg{ssi} and 
\gls{gls}\marg{html}.
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Resetting all\gls{glsresetall}\gls{mglsreset}\marg{shtml}:
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.
\gls{printglossaries}
\cend{document}
\end{codebox}

This uses the \catattr{multioptions} attribute to skip \qt{other}
elements on subsequent use. The problematic abbreviation (SHTML) is
defined as a fragment that simply expands to \qt{enabled} on first
use. Note that the description has to be supplied for the glossary.

\begin{resultbox}
\createexample*[title={Multi-entries: skipping elements},
 label={ex:multientryskip},
 description={Example document demonstrating multi-entry sets with
elements skipped},
 arara={pdflatex,makeglossaries,pdflatex,pdfcrop}]
{%
\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[stylemods,style=long]\marg{glossaries-extra}
\codepar
\gls{makeglossaries}
\codepar
\gls{setabbreviationstyle}\marg{long-short-sc}^^J%
\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side
includes}^^J%
\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language}
\codepar
\gls{setabbreviationstyle}\oarg{combinedabbrv}\marg{long-only-short-sc-only}^^J%
\gls{newabbreviation}^^J
 \oarg{\gloskeyval{category}{combinedabbrv},^^J
  \gloskeyval{description}{\gls{glsxtrshort}\marg{ssi} enabled
\gls{glsxtrshort}\marg{html}}}^^J
 \marg{shtml-frag}\marg{shtml}\marg{enabled}
\codepar
\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{multioptions}^^J
 \marg{usedskipothers,firstsuffix=\marg{\gls{glsxtrshort}\marg{\gls{mglslastmainlabel}}}}
\codepar
\gls{multiglossaryentry}^^J
 \oarg{category=combinedabbrv}^^J
 \marg{shtml}\oarg{shtml-frag}\marg{ssi,shtml-frag,html}
\codepar
}
{Individual elements first use: \gls{gls}\marg{ssi} and
\gls{gls}\marg{html}.
\codepar
Individual elements next use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Resetting all\gls{glsresetall}\gls{mglsreset}\marg{shtml}:
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.
\gls{printglossaries}
}
\end{resultbox}

The key difference here from \exampleref{ex:nestedlinkglsps}, which
uses \gls{glsps}, is that the individual elements hyperlink
to their respective entries in the glossary on first use of \gls{mgls}.

The problem is that with the \optfmt{colorlinks} package option,
it's not obvious where the hyperlinks start and end. The suffix (\textsc{shtml})
for the multi-entry first use
will hyperlink to the \qt{shtml} entry in the glossary, so the
\qt{enabled} hyperlink is redundant. The simplest fix for this is to
add \mglsoptval{hyper}{notmainfirst} to the option list, which will prevent
\qt{enabled} from being a hyperlink.

Another problem occurs where \gls{mgls} is used before the individual elements are
used, which leads to their full expansion with a confusing amount of
parentheses. A simple solution is to use the option
\mglsoptval{mglsopts}{unsetothers}, which will unset the other (not-main)
elements first. This can be localised with \mglsopt{presetlocal} but
\gls{gls} will then unset the \idx{firstuseflag} globally, which
means that the other elements won't show the full form when they are
first used on their own after \gls{mgls}. This can be switched to a
local unset with \mglsoptval{others}{local}.

\mExampleref{ex:multientryskipunsetothers} adapts the previous
example to incorporate these options:
\begin{codebox}
\gls{glssetcategoryattribute}
 \marg{combinedabbrv}\marg{\catattr{multioptions}}
 \marg{\mglsoptval{hyper}{notmainfirst},
  \mglsoptvalm{mglsopts}{\mglsopt{presetlocal},\mglsopt{unsetothers},\mglsoptval{others}{local}},
  \mglsopt{usedskipothers},
  \mglsoptval{firstsuffix}{\gls{glsxtrshort}\marg{\gls{mglslastmainlabel}}}
 }
\end{codebox}
\begin{resultbox}
\createexample*[title={Multi-entries: skipping elements (unsetting
others)},
 label={ex:multientryskipunsetothers},
 description={Example document demonstrating multi-entry sets with
elements skipped and unset},
 arara={pdflatex,makeglossaries,pdflatex,pdfcrop}]
{%
\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[stylemods,style=long]\marg{glossaries-extra}
\codepar
\gls{makeglossaries}^^J%
\codepar
\gls{setabbreviationstyle}\marg{long-short-sc}^^J%
\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side
includes}^^J%
\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language}
\codepar
\gls{setabbreviationstyle}\oarg{combinedabbrv}\marg{long-only-short-sc-only}^^J%
\gls{newabbreviation}^^J
 \oarg{\gloskeyval{category}{combinedabbrv},^^J
  \gloskeyval{description}{\gls{glsxtrshort}\marg{ssi} enabled
\gls{glsxtrshort}\marg{html}}}^^J
 \marg{shtml-frag}\marg{shtml}\marg{enabled}
\codepar
\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{\catattr{multioptions}}^^J
\marg{\%^^J
  \mglsoptval{hyper}{notmainfirst},^^J
  \mglsoptvalm{mglsopts}{\mglsopt{presetlocal},\mglsopt{unsetothers},\mglsoptval{others}{local}},^^J
  \mglsopt{usedskipothers},^^J
  \mglsoptval{firstsuffix}{\gls{glsxtrshort}\marg{\gls{mglslastmainlabel}}}^^J%
}^^J%
\codepar
\gls{multiglossaryentry}^^J
 \oarg{category=combinedabbrv}^^J
 \marg{shtml}\oarg{shtml-frag}\marg{ssi,shtml-frag,html}
}
{Individual elements first use: \gls{gls}\marg{ssi} and \gls{gls}{html}.
\codepar
Individual elements next use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Resetting all\gls{glsresetall}\gls{mglsreset}\marg{shtml}:
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Individual elements: \gls{gls}\marg{ssi} and
\gls{gls}\marg{html}.^^J%
\gls{printglossaries}
}
\end{resultbox}

This method still has two main drawbacks: the description must be
added manually and the long form can't be accessed with
\gls{glsxtrlong}. The next example provides an alternative approach.

\subsection{Example: Skipping Elements (Prefix and Post-Link Hooks)}
\label{sec:exskippostlink}

\mExampleref{ex:multientryskipprefixpostlink}
is a modified version of the previous example. In this case,
the main element isn't a fragment and also happens to have the same
label as the multi-entry set. (\code{\gls{mgls}\marg{shtml}} references the
multi-entry label and \code{\gls{gls}\marg{shtml}} references the individual
entry.)

In this case, the nested parts are marked up with custom commands:
\begin{codebox}
\cmd{newrobustcmd}\marg{\cmd{combinedpre}}[1]\marg{\gls{glsps}\marg{\#1}}
\cmd{newrobustcmd}\marg{\cmd{combinedpost}}[1]\marg{\gls{glsps}\marg{\#1}}
\codepar
\gls{newabbreviation}\marg{shtml}\marg{shtml}
\marg{\marg{}\cmd{combinedpre}\marg{ssi} enabled \cmd{combinedpost}\marg{html}}
\end{codebox}

This means that it's no longer necessary to manually insert the
description and the long form can be accessed as usual with
\code{\gls{glsxtrshort}\marg{shtml}}. Note that it is necessary to define
the custom commands robustly otherwise they will need to be
protected against premature expansion:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{combinedpre}}[1]\marg{\gls{glsps}\marg{\#1}}
\cmd{newcommand}\marg{\cmd{combinedpost}}[1]\marg{\gls{glsps}\marg{\#1}}
\codepar
\gls{newabbreviation}\marg{shtml}\marg{shtml}
\marg{\marg{}\gls{protect}\cmd{combinedpre}\marg{ssi} enabled \gls{protect}\cmd{combinedpost}\marg{html}}
\end{codebox}
In both cases, an initial empty group is added to guard
against any \idx{sentencecase} commands, such as \gls{Glsxtrlong}.

The abbreviations all use the \abbrstyle{long-postshort-sc-user}
style, which places the short form in the post-link hook on
\idx{firstuse}. The \gls{gls} \idx{postlinkhook} for the main element
can be transferred to the \gls{mgls} post-link using:
\begin{codebox}
\mglsoptval{mpostlinkelement}{main}
\end{codebox}
All elements have their individual post-link hooks suppressed by default.
As in the previous example, the other elements can be skipped on
subsequent use:
\begin{codebox}
\mglsopt{usedskipothers}
\end{codebox}

Within \gls{mgls}, the nested content needs to be suppressed, which
can be done by redefining the custom commands. This can be done in
the multi-entry prefix. Since the entire content of \gls{mgls} (except for the
final multi-entry post-link hook) occurs inside a group, this
redefinition will be localised.

The complete document is as follows:
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}[\opt{stylemods},\optval{style}{\glostyle{long}}]\marg{glossaries-extra}
\codepar
\gls{makeglossaries}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-postshort-sc-user}}
\codepar
\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side includes}
\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language}
\codepar
\cmd{newrobustcmd}\marg{\cmd{combinedpre}}[1]\marg{\gls{glsps}\marg{\#1}}
\cmd{newrobustcmd}\marg{\cmd{combinedpost}}[1]\marg{\gls{glsps}\marg{\#1}}
\codepar
\cmd{newabbreviation}\marg{shtml}\marg{shtml}
\marg{\marg{}\cmd{combinedpre}\marg{ssi} enabled \cmd{combinedpost}\marg{html}}
\codepar
\gls{glssetcategoryattribute}
 \marg{combinedabbrv}\marg{\catattr{multioptions}}
 \marg{\mglsoptval{mpostlinkelement}{main},
  \mglsopt{usedskipothers}}
\codepar
\gls{multiglossaryentry}
 \oarg{\mglsoptval{category}{combinedabbrv}}
 \marg{shtml}\oarg{shtml}\marg{ssi,shtml,html}
\codepar
\gls{mglsdefcategoryprefix}\marg{combinedabbrv}\marg{\comment{}
 \cmd{renewcommand}\marg{\cmd{combinedpre}}[1]\marg{\cmd{ignorespaces}}\comment{}
 \cmd{renewcommand}\marg{\cmd{combinedpost}}[1]\marg{\gls{unskip}}\comment{}
}
\codepar
\cbeg{document}
Individual elements first use: \gls{gls}\marg{ssi} and 
\gls{gls}\marg{html}.
\codepar
Individual elements next use: \gls{gls}\marg{ssi} and 
\gls{gls}\marg{html}.
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Individual entry first use: \gls{gls}\marg{shtml}.
\codepar
Resetting all\gls{glsresetall}\gls{mglsresetall}:
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.
\codepar
Resetting all\gls{glsresetall}\gls{mglsresetall}:
\codepar
Individual entry first use: \gls{gls}\marg{shtml}.
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}. (Wrong!)
\codepar
\gls{printglossaries}
\cend{document}
\end{codebox}

\begin{resultbox}
\createexample*[title={Multi-entries: skipping elements (prefix and
post-link hooks)},
 label={ex:multientryskipprefixpostlink},
 description={Example document demonstrating multi-entry sets with
elements skipped and prefix and post-link hooks},
 arara={pdflatex,makeglossaries,pdflatex,pdfcrop}]
{%
\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}[stylemods,style=long]\marg{glossaries-extra}^^J%
\codepar
\gls{makeglossaries}^^J%
\codepar
\gls{setabbreviationstyle}\marg{long-postshort-sc-user}^^J%
\codepar
\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side
includes}^^J%
\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup
language}^^J%
\codepar
\cmd{newrobustcmd}\marg{\cmd{combinedpre}}[1]\marg{\gls{glsps}\marg{\#1}}^^J%
\cmd{newrobustcmd}\marg{\cmd{combinedpost}}[1]\marg{\gls{glsps}\marg{\#1}}^^J%
\codepar
\cmd{newabbreviation}\marg{shtml}\marg{shtml}^^J%
\marg{\marg{}\cmd{combinedpre}\marg{ssi} enabled
\cmd{combinedpost}\marg{html}}^^J%
\codepar
\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{multioptions}^^J
 \marg{\%^^J
  mpostlinkelement=main,^^J
  usedskipothers^^J
 }^^J%
\codepar
\gls{multiglossaryentry}^^J
 \oarg{category=combinedabbrv}^^J
 \marg{shtml}\oarg{shtml}\marg{ssi,shtml,html}^^J%
\codepar
\gls{mglsdefcategoryprefix}\marg{combinedabbrv}\marg{\%^^J
 \cmd{renewcommand}\marg{\cmd{combinedpre}}[1]\marg{\cmd{ignorespaces}}\%^^J
 \cmd{renewcommand}\marg{\cmd{combinedpost}}[1]\marg{\gls{unskip}}\%^^J%
}
}
{%
Individual elements first use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.^^J%
\codepar
Individual elements next use: \gls{gls}\marg{ssi} and
\gls{gls}\marg{html}.^^J%
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.^^J%
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.^^J%
\codepar
Individual entry first use: \gls{gls}\marg{shtml}.^^J%
\codepar
Resetting all\gls{glsresetall}\gls{mglsresetall}:^^J%
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.^^J%
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.^^J%
\codepar
Individual elements: \gls{gls}\marg{ssi} and
\gls{gls}\marg{html}.^^J%
\codepar
Resetting all\gls{glsresetall}\gls{mglsresetall}:^^J%
\codepar
Individual entry first use: \gls{gls}\marg{shtml}.^^J%
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}. (Wrong!)^^J%
\codepar
\gls{printglossaries}
}
\end{resultbox}
Note the last two paragraphs, which highlights what happens if
\code{\gls{gls}\marg{shtml}} is used before \code{\gls{mgls}\marg{shtml}} when neither
of the other elements (\code{ssi} and \code{html}) have been
used. The final instance of \gls{mgls} has produced the wrong result.
This is because it's the first use of the multi-entry \code{shtml} but
not the first use of the individual entry \code{shtml}.

One way around this is to modify the prefix to ensure that the main
element's \idx{firstuseflag} matches the multi-entry's first use
flag:
\begin{codebox}
\gls{mglsdefcategoryprefix}\marg{combinedabbrv}\marg{\comment{}
 \cmd{renewcommand}\marg{\cmd{combinedpre}}[1]\marg{\cmd{ignorespaces}}\comment{}
 \cmd{renewcommand}\marg{\cmd{combinedpost}}[1]\marg{\gls{unskip}}\comment{}
 \gls{mglsisfirstuse}
 \marg{\gls{glslocalreset}\marg{\gls{mglscurrentmainlabel}}}\comment{}
 \marg{\gls{glslocalunset}\marg{\gls{mglscurrentmainlabel}}}\comment{}
}
\end{codebox}

The \opteqvalref{showtargets}{annoteleft} option can be used to mark up
the links with the targets. For example, the first instance of
\code{\gls{mgls}\marg{shtml}} will show as:
\begin{resultbox}
\newcommand{\markup}[2]{%
\glsshowtargetfonttext{[#1]}%
\glsxtrshowtargetsymbolleft#2\glsxtrshowtargetsymbolright}%
Multi-entry first use: \markup{glo:ssi}{\textsc{ssi}}
\markup{glo:shtml}{enabled}
\markup{glo:html}{\textsc{html}} (\textsc{shtml}).
\end{resultbox}
Each entry has an individual hyperlink to its own glossary item,
which may be confusing. This can be made clearer by suppressing the
main element link on first use with:
\begin{codebox}
\mglsoptval{hyper}{notmainfirst}
\end{codebox}
(as in the previous example), and adjusting the abbreviation style
so that the parenthetical content in the post-link hook has a
hyperlink:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtruserparen}}[2]\marg{\comment{}
  \gls{glsxtrfullsep}\marg{\#2}\comment{}
  \gls{glsxtrparen}
   \marg{\gls{glshyperlink}\oarg{\#1}\marg{\#2}\comment{}
    \gls{ifglshasfield}\marg{\gls{glsxtruserfield}}\marg{\#2}\marg{, 
      \gls{glscurrentfieldvalue}}\marg{}\comment{}
   }\comment{}
}
\end{codebox}

The remaining problem is how to deal with the possibility that
\code{\gls{mgls}\marg{shtml}} may come before the \idx{firstuse} of the other
elements. For example:
\begin{codebox}
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.
\end{codebox}
This leads to:
\begin{resultbox}
Multi-entry first use: server-side includes enabled hypertext markup
language (\textsc{shtml}).

Individual elements: \textsc{ssi} and \textsc{html}.
\end{resultbox}

This means that the abbreviations \textsc{ssi} and \textsc{html}
aren't explained in the document text. One way around this is to
only locally unset the other element \idxpl{firstuseflag}:
\begin{codebox}
\gls{glssetcategoryattribute}
 \marg{combinedabbrv}\marg{\catattr{multioptions}}
 \marg{\mglsoptval{hyper}{notmainfirst},
  \mglsoptval{mpostlinkelement}{main},
  \mglsopt{usedskipothers},
  \mglsoptvalm{mglsopts}{\mglsoptval{others}{local}}
 }
\end{codebox}
With the above setting, the following:
\begin{codebox}
\gls{glsresetall}\gls{mglsresetall}
\codepar
Multi-entry first use: \gls{mgls}\marg{shtml}.
\codepar
Multi-entry next use: \gls{mgls}\marg{shtml}.
\codepar
Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.
\end{codebox}
will now produce:
\begin{resultbox}
Multi-entry first use: server-side includes enabled hypertext markup
language (\textsc{shtml}).

Multi-entry next use: \textsc{shtml}.

Individual elements: server-side includes (\textsc{ssi}) and
hypertext markup language (\textsc{html}).
\end{resultbox}

\section{Main and Other Elements}
\label{sec:mglsmain}

The list of labels provided in the final argument of
\gls{multiglossaryentry} consists of a main element and all the other
elements. If the main element isn't identified in the optional
argument, it's assumed to be the final element in the list.

The main element allows you to determine which target to use if you
want the entire content of \gls{mgls} to be a single hyperlink. You
can also use the settings described in \sectionref{sec:multiglsoptions}
to only index the main element.

You can change the main element using:
\gls{mglsSetMain}
The new main label provided in the second argument must be in the
list corresponding to \meta{multi-label}. This change is locally
applied to the current scope. Note that if you are using
\app{bib2gls}, this change in the document can't be detected.

The main element can also be used to identify which element should
be displayed in the plural with \gls{mglsmainpl}. For example:
\begin{codebox}
\gls{newglossaryentry}\marg{great}\marg{\gloskeyval{name}{great},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{little}\marg{\gloskeyval{name}{little},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{grebe}\marg{\gloskeyval{name}{grebe},
 \gloskeyval{description}{}}
\codepar
\gls{multiglossaryentry}\marg{greatgrebe}\marg{great,grebe}
\gls{multiglossaryentry}\marg{littlegrebe}\marg{little,grebe}
\end{codebox}
In the above, two multi-entries are defined: \code{greatgrebe} and
\code{littlegrebe}. In both cases the main element is
\code{grebe} (the last element). Using \gls{mglspl} will show the
plural for all elements, but using \gls{mglsmainpl} will only use the
plural for the main element (grebe). For example:
\begin{codebox}
Plural all: \gls{mglspl}\marg{greatgrebe},
\gls{mglspl}\marg{littlegrebe}.
Plural main: \gls{mglsmainpl}\marg{greatgrebe},
\gls{mglsmainpl}\marg{littlegrebe}.
\end{codebox}
produces:
\begin{resultbox}
Plural all: greats grebes, littles grebes.
Plural main: great grebes, little grebes.
\end{resultbox}

\section{Prefixes and Suffixes}
\label{sec:mglsfixes}

A multi-entry may have associated prefixes and suffixes. These are
scoped and are placed outside of the hyperlinks and encapsulating
commands. They are not affected by case-changing commands, such as \gls{Mgls}.
If you want a prefix to obey case-changing, use the \gls{mpgls}-like
commands instead (\sectionref{sec:mpgls}).

The prefix is inserted with:
\cmddef{mglsprefix}
The default definition is:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{mglsprefix}}\marg{\comment{}
 \gls{ifdefempty}\gls{mglscurrentcategory}
 \marg{\gls{mglscurrentprefix}}\comment{}
 \marg{\comment{}
   \gls{mglshascategoryprefix}\marg{\gls{mglscurrentcategory}}\comment{}
   \marg{\gls{mglsusecategoryprefix}\marg{\gls{mglscurrentcategory}}}\comment{}
   \marg{\gls{mglscurrentprefix}}\comment{}
 }\comment{}
}
\end{compactcodebox}
This will insert the current prefix unless there is prefix command
associated with the current category.

The suffix is inserted with:
\cmddef{mglssuffix}
This command is defined as follows:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{mglssuffix}}\marg{\comment{}
 \gls{ifdefempty}\gls{mglscurrentcategory}
 \marg{\gls{ifdefempty}{\gls{mglscurrentsuffix}}\marg{}\marg{\cmd{space}
   (\gls{mglscurrentsuffix})}}\comment{}
 \marg{\comment{}
   \gls{mglshascategorysuffix}\marg{\gls{mglscurrentcategory}}\comment{}
   \marg{\gls{mglsusecategorysuffix}\marg{\gls{mglscurrentcategory}}}\comment{}
   \marg{\gls{ifdefempty}\marg{\gls{mglscurrentsuffix}}\marg{}\marg{\cmd{space}
     (\gls{mglscurrentsuffix})}}\comment{}
 }\comment{}
}
\end{compactcodebox}
If there is a suffix associated with the current category, that will
be used, otherwise if the current suffix isn't empty this
inserts a space followed by the current suffix in parentheses.
You can access the label of the last (non-skipped) element with
\gls{mglslastelementlabel}.

Note that in both cases the category corresponds to the multi-entry
category (see \sectionref{sec:multiglscategory}).

To define a category-dependent prefix, use:
\cmddef{mglsdefcategoryprefix}
You can reference the current prefix with \gls{mglscurrentprefix}
within \meta{definition}.

To define a category-dependent suffix, use:
\cmddef{mglsdefcategorysuffix}
You can reference the current suffix with \gls{mglscurrentsuffix}
within \meta{definition}.

The default definition of \gls{mglsprefix} tests if there is a
category prefix using:
\cmddef{mglshascategoryprefix}
This does \meta{true} if a prefix has been assigned to the given
category, otherwise it does \meta{false}.

If you need to obtain the prefix for a particular category, you can
use:
\cmddef{mglsusecategoryprefix}
This expands to the prefix, if set, for the given category or to nothing otherwise.

The default definition of \gls{mglssuffix} tests if there is a
category suffix using:
\cmddef{mglshascategorysuffix}
This does \meta{true} if a suffix has been assigned to the given
category, otherwise it does \meta{false}.

If you need to obtain the suffix for a particular category, you can
use:
\cmddef{mglsusecategorysuffix}
This expands to the suffix, if set, for the given category or to nothing otherwise.

The current prefix \gls{mglscurrentprefix} and \gls{mglscurrentsuffix}
are obtained as follows:
\begin{itemize}
\item if this is the first use of the multi-entry
(\sectionref{sec:mglsfirstuse}) then the \meta{prefix} is set to the
value of the \mglsopt{firstprefix} option and the \meta{suffix} is
set to the value of the \mglsopt{firstsuffix} option;
\item otherwise the \meta{prefix} is set to the
value of the \mglsopt{usedprefix} option and the \meta{suffix} is
set to the value of the \mglsopt{usedsuffix} option.
\end{itemize}

\begin{important}
The prefix and suffix (if set) are placed outside of the hyperlink
and text formatting encapsulator. They are not affected by
case-changing commands such as \gls{Mgls} or \gls{MGLS}.
\end{important}

For example:
\begin{codebox}
\gls{setabbreviationstyle}\marg{\abbrstyle{long-only-short-only}}
\gls{newabbreviation}\marg{clostridium}\marg{C.}\marg{Clostridium}
\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},
 \gloskeyval{description}{}}
\codepar
\gls{multiglossaryentry}\oarg{\mglsoptval{firstsuffix}{botulism}}
 \marg{cbot}\marg{clostridium,botulinum}
\end{codebox}
On first use, this produces (assuming the \qt{clostridum} element
hasn't been used previously):
\begin{resultbox}
Clostridium botulinum (botulism).
\end{resultbox}
On subsequent use, this produces:
\begin{resultbox}
C. botulinum.
\end{resultbox}

\section{Separators}
\label{sec:mglssep}

The separators between each instance of \gls{gls} are given by the
following commands, which all take two arguments. The first argument
is the label of the previous element. The second argument is the
label of the following element.
\cmddef{glscombinedsep}
This is inserted between two entries that have both been marked as used.
The default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glscombinedsep}}[2]\marg{\comment{}
  \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsep}}\comment{}
  \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsep}}}\comment{}
  \marg{ }\comment{}
}
\end{codebox}
This will use the \catattr{combinedsep} attribute for the
\meta{prev label}'s category, if set. Otherwise this just does a
space. Note that this ignores the second argument.

\cmddef{glscombinedfirstsep}
This is inserted between two entries where only the next entry has
been marked as used. The default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glscombinedfirstsep}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}}\comment{}
 \marg{\gls{glscombinedsep}\marg{\#1}\marg{\#2}}\comment{}
}
\end{codebox}
This will use the \catattr{combinedfirstsep} attribute for
\meta{prev label}'s category, if set. If that attribute isn't set,
\gls{glscombinedsep} is used.

\cmddef{glscombinedsepfirst}
This is inserted between two entries where only the previous entry has
been marked as used. The default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glscombinedsepfirst}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}}\comment{}
 \marg{\gls{glscombinedsep}\marg{\#1}\marg{\#2}}\comment{}
}
\end{codebox}
This will use the \catattr{combinedsepfirst} attribute for
\meta{prev label}'s category, if set. If that attribute isn't set,
\gls{glscombinedsep} is used.

\cmddef{glscombinedfirstsepfirst}
This is inserted between two entries where both have
been marked as used. The default definition is:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glscombinedfirstsepfirst}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}}\comment{}
 \marg{\gls{glscombinedsep}\marg{\#1}\marg{\#2}}\comment{}
}
\end{codebox}
This will use the \catattr{combinedfirstsepfirst} attribute for
\meta{prev label}'s category, if set. If that attribute isn't set,
\gls{glscombinedsep} is used.

These commands may be redefined as required.
For example, to have no space between two elements that have both
been marked as used and are both abbreviations (disregarding
category attributes):
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glscombinedfirstsepfirst}}[2]\marg{\comment{}
 \gls{ifglshasshort}\marg{\#1}\comment{}
  \marg{\gls{ifglshasshort}\marg{\#2}\marg{}\marg{\cmd{space}}}\comment{}
  \marg{\cmd{space}}\comment{}
}
\end{codebox}

There are some commands for redefining the above separators to
common combinations.

\cmddef{glssetcombinedsepabbrvnbsp}
This does the following:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glscombinedsep}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsep}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsep}}}\comment{}
 \marg{\gls{ifglshasshort}\marg{\#1}\marg{\glssymbol{idx.nbsp}}\marg{ }}\comment{}
}\comment{}
\cmd{renewcommand}*\marg{\gls{glscombinedsepfirst}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}}\comment{}
 \marg{\gls{ifglshasshort}\marg{\#1}\marg{\glssymbol{idx.nbsp}}\marg{ }}\comment{}
}\comment{}
\cmd{renewcommand}*\marg{\gls{glscombinedfirstsep}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}}\comment{}
 \marg{ }\comment{}
}\comment{}
\cmd{renewcommand}*\marg{\gls{glscombinedfirstsepfirst}}[2]\marg{\comment{}
  \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}\comment{}
  \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}}\comment{}
  \marg{ }\comment{}
}
\end{codebox}
This uses a \idx{nbsp} following an abbreviation
(that has already been marked as used). Note that if the associated
attributes are set the commands will behave according to the
attribute.

\cmddef{glssetcombinedsepabbrvnone}
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glscombinedsep}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsep}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsep}}}\comment{}
 \marg{\gls{ifglshasshort}\marg{\#1}\marg{}\marg{\gls{ifglshasshort}\marg{\#2}\marg{}\marg{ }}}\comment{}
}\comment{}
\cmd{renewcommand}*\marg{\gls{glscombinedsepfirst}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}}\comment{}
 \marg{\gls{ifglshasshort}\marg{\#1}\marg{}\marg{ }}\comment{}
}\comment{}
\cmd{renewcommand}*\marg{\gls{glscombinedfirstsep}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}}\comment{}
 \marg{\gls{ifglshasshort}\marg{\#2}\marg{}\marg{ }}\comment{}
}\comment{}
\cmd{renewcommand}*\marg{\gls{glscombinedfirstsepfirst}}[2]\marg{\comment{}
 \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}\comment{}
 \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}}\comment{}
 \marg{ }\comment{}
}
\end{codebox}
This does nothing if either element are abbreviations that have already been
used. Note that if the associated attributes are set the commands
will behave according to the attribute.

\cmddef{glssetcombinedsepnarrow}
This is rather more complicated as it measures a field value and
uses \meta{narrow-sep} if the width is less than \meta{width}.
The field value is determined as follows:
\begin{itemize}
\item on \idx{firstuse} the
\gloskey{long} field is used if it is set otherwise the
\gloskey{first} field is used;

\item otherwise the
\gloskey{short} field is used if it is set otherwise the
\gloskey{text} field is used;
\end{itemize}

Note that this doesn't take into account fonts, hooks, abbreviation
styles or plural forms (e.g.\ \gls{mglspl}) or other field references
(e.g.\ \gls{mglsname}).  If the associated attributes are set the commands
will behave according to the attribute.

\section{\glsfmtname{mgls} Element Hooks}
\label{sec:mglselementhooks}

The \gls{mgls}-like commands use the following hooks:
\cmddef{mglselementprehook}
This is done before each (non-skipped) element. (Default does nothing.)

\cmddef{mglselementposthook}
This is done after each (non-skipped) element. (Default does nothing.)
Note that this is different from the normal entry post-link hook
\gls{glspostlinkhook}. If the individual entry post-link hook is enabled (see the
\mglsopt{postlinks} key in \sectionref{sec:multiglsoptions}), this will go before
\gls{mglselementposthook}.

The definitions of the following commands are scoped within the
\gls{mgls}-like commands so they can't be accessed elsewhere
(including in the post-link hook, see
\sectionref{sec:mglspostlinkhook}). They
may be used in the above hooks or in the separator commands (described in
\sectionref{sec:mglssep}) or in the command used to encapsulate the
entire content. They can also be used in the post-link hook (see
\sectionref{sec:entryfmtmods}) to determine if an entry is being
used within a \gls{mgls}-like command.

\cmddef{mglscurrentmultilabel}
Expands to the multi-entry label.

\cmddef{mglscurrentmainlabel}
Expands to the label of the main element.

\cmddef{mglscurrentlist}
Expands to the complete comma-separated list of elements.

\cmddef{mglscurrentoptions}
Expands to the options used when the multi-entry was defined. This
doesn't include options set with \gls{multiglossaryentrysetup}
or those passed to \gls{mgls} (or whichever variant is being used).

\cmddef{mglscurrentcategory}
Expands to the multi-entry category current in effect.

\cmddef{glsxtrcurrentmglscsname}
Expands to the control sequence name of the calling command (for
example, \code{mgls} or \code{mglspl}).

To test if the current multi-entry is the first use:
\cmddef{mglsisfirstuse}
This does \meta{true} if this is the first use otherwise it does
\meta{false}. Note that this applies to the multi-entry first use
flag not the \idxpl{firstuseflag} of the individual elements.

At each iteration of the loop over the element list, the following
commands are set, which can be accessed in hooks such as
\gls{mglselementprehook} or in hooks used by the underlying \gls{gls}
etc commands. For example, if \gls{mglscurrentlabel} is defined then
\gls{gls} is being used inside \gls{mgls}.

\cmddef{mglscurrentlabel}
Expands to the current element label.

\cmddef{mglselementindex}
This is a count register that is set to the element index.

\cmddef{mglscurrentprefix}
Expands to the current multi-entry prefix.

\cmddef{mglscurrentsuffix}
Expands to the current multi-entry suffix.

\cmddef{mglsiflast}
If this is the last iteration, does \meta{true} otherwise does
\meta{false}. This takes the skip options into account, so the last
iteration may not necessarily be when the element index is equal to
the total number of elements.

\section{Post-Link Hook}
\label{sec:mglspostlinkhook}

There is a hook that occurs at the end the \gls{mgls}-like commands
according to the \mglsopt{mpostlink} setting (see
\sectionref{sec:multiglsoptions}). The hook used depends on the
\mglsopt{mpostlinkelement} option.
These hooks can't access the commands described in \sectionref{sec:mglselementhooks}
as the hook occurs outside of the scope in which they are defined.

The \mglsoptval{mpostlinkelement}{custom} option uses:
\cmddef{mglscustompostlinkhook}
This does nothing by default.

The \mglsoptval{mpostlinkelement}{last} option uses:
\cmddef{mglslastelementpostlinkhook}
which emulates the post-link hook of the last element.

The \mglsoptval{mpostlinkelement}{main} option uses:
\cmddef{mglslastmainpostlinkhook}
which emulates the post-link hook of the main element.

The default settings \code{\mglsoptval{postlinks}{none},
\mglsoptval{mpostlink}{true}, and \mglsoptval{mpostlinkelement}{last}} will
suppress the individual element \idxpl{postlinkhook}
(\gls{glspostlinkhook}) and do the multi-entry post-link hook for
the last element (\gls{mglslastelementpostlinkhook}).

If you have the final element's \idx{postlinkhook} enabled and the
multi-entry post-link hook enabled (for example,
\code{\mglsoptval{postlinks}{all}, \mglsoptval{mpostlink}{true},
\mglsoptval{mpostlinkelement}{last}}), the final element's 
\idx{postlinkhook} will be done twice. Similarly for the main element with
\code{\mglsoptval{postlinks}{all}, \mglsoptval{mpostlink}{true},
\mglsoptval{mpostlinkelement}{main}}.

The following commands are available for use in these hooks and may
also be used in the definition of \gls{mglssuffix}.

\cmddef{mglslastmultilabel}
Expands to the multi-entry label.

\cmddef{mglslastcategory}
Expands to the multi-entry category (see
\sectionref{sec:multiglscategory}). This will be empty if no
category was assigned.

\cmddef{mglswasfirstuse}
If that was the first use of the multi-entry (see \sectionref{sec:mglsfirstuse})
this does \meta{true} otherwise it does \meta{false}.

\subsection{Last Element}
\label{sec:mglspostlinkhooklastelement}
The following commands relate to the last element.

\cmddef{mglslastelementlabel}
Expands to the label of the last non-skipped element. If all
elements were skipped or if the multi-entry wasn't defined, this
will be empty.

Test if the last element was skipped:
\cmddef{mglsiflastelementskipped}
If the last element was skipped this does \meta{true} otherwise it
does \meta{false}.
If all elements were skipped or if the multi-entry wasn't defined,
this will do \meta{true}.

Test if the last element was its first use:
\cmddef{mglsiflastelementwasfirstuse}
If the last non-skipped element was used for the first time this
does \meta{true} otherwise it does \meta{false}. (Corresponds to
\gls{glsxtrifwasfirstuse}.)
If all elements were skipped or if the multi-entry wasn't defined,
this will do \meta{true}.

Test if the last element was plural:
\cmddef{mglsiflastelementwasplural}
If the last non-skipped element had the plural form displayed, this
does \meta{true} otherwise it does \meta{false}. (Corresponds to
\gls{glsifplural}.)
If all elements were skipped or if the multi-entry wasn't defined,
this will do \meta{false}.

Test if the last element was had any case-changing applied:
\cmddef{mglsiflastelementcapscase}
Corresponds to \gls{glscapscase} of the last non-skipped element.
If all elements were skipped or if the multi-entry wasn't defined,
this will do \meta{no-change}.

\subsection{Main Element}
\label{sec:mglspostlinkhookmainelement}
The following commands relate to the main element.

\cmddef{mglslastmainlabel}
Expands to the label of the main element from the multi-entry that
was just referenced. If the main element was skipped or if the multi-entry
wasn't defined, this will be empty. If this is the same as
\gls{mglslastelementlabel} then the main element was the last
element.

Test if the main element was skipped:
\cmddef{mglsiflastmainskipped}
If the main element from the multi-entry that was just referenced
was skipped this does \meta{true} otherwise it does \meta{false}.
If the multi-entry wasn't defined, this will do \meta{true}.

Test if the main element was its first use:
\cmddef{mglsiflastmainwasfirstuse}
If the main element was used for the first time this
does \meta{true} otherwise it does \meta{false}. (Corresponds to
\gls{glsxtrifwasfirstuse}.)
If the main element was skipped or if the multi-entry wasn't defined,
this will do \meta{true}.

Test if the main element was plural:
\cmddef{mglsiflastmainwasplural}
If the main element from the multi-entry that was just referenced
had its plural form displayed this does \meta{true} otherwise it
does \meta{false}. (Corresponds to \gls{glsifplural}.)  If the main
element was skipped or if the multi-entry wasn't defined, this will
do \meta{false}.

Test if the main element was had any case-changing applied:
\cmddef{mglsiflastmaincapscase}
Corresponds to \gls{glscapscase} of the main element from the
multi-entry that was just referenced.  If the main element was
skipped or if the multi-entry wasn't defined, this will do
\meta{no-change}.

\section{Multi-Entry First Use}
\label{sec:mglsfirstuse}

Each multi-entry set has an associated first use flag. This is
independent of the \idx{firstuseflag} associated with the individual
entries that make up the set. As with the \idx{glslike} commands,
\gls{mgls} unsets this flag. Unlike the \idx{glstextlike} commands, all
the commands described in \sectionref{sec:mglslike} (including
commands like \gls{mglsname}) unset this flag, even if the elements
use commands like \gls{glsname} that don't unset the entry's
\idx{firstuseflag}.

You can determine whether or not a multi-entry set has been
marked as used with:
\cmddef{ifmglsused}
This does \meta{true} if the given multi-entry has been marked
as used, otherwise it does \meta{false}.

You can (globally) unset the flag (mark the set as having been referenced)
with:
\cmddef{mglsunset}
or reset it with:
\cmddef{mglsreset}
There are also local versions of these commands:
\cmddef{mglslocalunset}
which locally unsets the flag and
\cmddef{mglslocalreset}
which locally resets the flag.

It's also possible to unset or reset all multi-entries.
\cmddef{mglsunsetall}
Unsets all multi-entries.

\cmddef{mglsresetall}
Resets all multi-entries.

\begin{important}
Note that unsetting or resetting any of the individual element
\idxpl{firstuseflag} doesn't affect the multi-entry flag.
Similarly, unsetting or resetting the multi-entry flag doesn't
affect the \idxpl{firstuseflag} of the individual elements.
\end{important}

\section{Multi-Entry Category}
\label{sec:multiglscategory}

A multi-entry set may have an associated category set using the
\mglsopt{category} key described in \sectionref{sec:multiglsoptions}.
This isn't set by default, but if it is set the category may have
attributes set in the usual way. The multi-entry category is
independent of the individual entry categories. The following
attribute is recognised by commands like \gls{mgls}:

\optiondef{catattr.multioptions}
The value are the default options to apply to any
multi-entry set with the given category. These can be overridden
by the first optional argument of \gls{multiglossaryentry} or by the
\mglsopt{setup} key in the first optional argument of commands like
\gls{mgls}.

\optiondef{catattr.combinedfirstsep}
The separator to use for \gls{glscombinedfirstsep}.

\optiondef{catattr.combinedfirstsepfirst}
The separator to use for \gls{glscombinedfirstsepfirst}.

\optiondef{catattr.combinedsepfirst}
The separator to use for \gls{glscombinedsepfirst}.

\optiondef{catattr.combinedsep}
The separator to use for \gls{glscombinedsep}.


Note that you can't access the category or its attributes via the
multi-entry label (for example, with \gls{glshasattribute}). If you
need to access the current multi-entry's category within any of the
\gls{mgls}-like hooks (\sectionref{sec:mglselementhooks}), you can
obtain the category with \gls{mglscurrentcategory} and use commands
like \gls{glshascategoryattribute}.

\section{Multi-Entry Settings}
\label{sec:multiglsoptions}

The settings that govern all multi-entries can be set using:
\cmddef{multiglossaryentrysetup}
The \meta{options} are the same as for \gls{multiglossaryentry}.

Whenever the \gls{mgls}-like commands are used, options are applied in the
following order:
\begin{enumerate}
\item general options identified by \gls{multiglossaryentrysetup};

\item the category key is assigned if it's in the general options,
\gls{multiglossaryentry} or \mglsopt{setup} key;

\item \catattr{multioptions} category attribute (if set);

\item any options provided in the first optional argument of
\gls{multiglossaryentry};

\item any options provided in the \mglsopt{setup} key in the first
optional argument of the \gls{mgls}-like command.
\end{enumerate}

These options are described below.

\subsection{Indexing}
\label{sec:multiglsoptionsindexing}

\optiondef{mglsopt.indexmain}
This setting may take one of the following values:
\begin{description}
 \item[\optfmt{false}] don't index the main entry;
 \item[\optfmt{true}] index the main entry;
 \item[\optfmt{first}] only index the main entry if it's the
\idx{firstuse} (of the main entry).
\end{description}

\optiondef{mglsopt.indexothers}
This setting may take one of the following values:
\begin{description}
 \item[\optfmt{false}] don't index the other entries;
 \item[\optfmt{true}] index the other entries;
 \item[\optfmt{first}] only index the other entries if
it's the \idx{firstuse} (of the non-main entry).
\end{description}

\subsection{Location Formats (Encaps)}
\label{sec:multiglsoptionsencap}

\optiondef{mglsopt.encapmain}
This setting value should be the value to
pass to \glsopt{format} option (\idx{locationencap}) for the main entry.

\optiondef{mglsopt.encapothers}
This setting value should be the value to pass to \glsopt{format}
option (\idx{locationencap}) for the other (not main) entries. 

\subsection{Post-Link Hooks}
\label{sec:multiglsoptionspostlink}

\optiondef{mglsopt.postlinks}
This setting determines whether or not to enable the individual
element's \idx{postlinkhook}. The value may be one of:
\begin{description}
\item[\optfmt{none}] suppress the \idx{postlinkhook} for all elements;
\item[\optfmt{all}] don't suppress the \idx{postlinkhook} for all elements;
\item[\optfmt{notlast}] only suppress the \idx{postlinkhook} for the
last element;
\item[\optfmt{mainnotlast}] suppress the \idx{postlinkhook} for all
\qt{other} (not main) elements and for the last element (so only the
main element will have its \idx{postlinkhook} as long as it's not the
last element);
\item[\optfmt{mainonly}] suppress the \idx{postlinkhook} for all
\qt{other} (not main) elements;
\item[\optfmt{othernotlast}] suppress the \idx{postlinkhook} for the
main element and for the last element (so only the other elements
will have their \idx{postlinkhook} as long as the element isn't the last
one);
\item[\optfmt{otheronly}] suppress the \idx{postlinkhook} for the main element.
\end{description}

\optiondef{mglsopt.mpostlink}
This setting determines whether or not to enable the multi-entry
post-link hook (see \sectionref{sec:mglspostlinkhook}). The value
may be one of:
\begin{description}
  \item[\optfmt{false}] suppress the multi-entry post-link hook;
  \item[\optfmt{true}] enable the multi-entry post-link hook;
  \item[\optfmt{firstonly}] enable the multi-entry post-link hook
   only for the \idx{mfirstuse} of the multi-entry;
  \item[\optfmt{usedonly}] enable the multi-entry post-link hook
   only for the \idx{msubsequentuse} of the multi-entry.
\end{description}

\optiondef{mglsopt.mpostlinkelement}
This setting indicates which
post-link hook should be used if the multi-entry post-link hook has
been enabled. Allowed values:
\begin{description}
  \item[\optfmt{last}] use \gls{mglslastelementpostlinkhook} (that
is, use the \idx{postlinkhook} for the last element);
  \item[\optfmt{main}] use \gls{mglslastmainpostlinkhook} (that
is, use the \idx{postlinkhook} for the main element);
  \item[\optfmt{custom}] use \gls{mglscustompostlinkhook}.
\end{description}

\begin{warning}
Some combinations may cause a repeated hook.
\end{warning}

\subsection{Prefixes and Suffixes}
\label{sec:multiglsoptionsfixes}

See \sectionref{sec:mglsfixes} for more information on prefixes and
suffixes. Note that the prefixes and suffixes are not affected by
case-changing commands such as \gls{Mgls} or \gls{MGLS}.
If you want a prefix to obey case-changing, use the \gls{mpgls}-like
commands instead (see \sectionref{sec:mpgls}).

\optiondef{mglsopt.firstprefix}
The prefix to use on \idx{mfirstuse} of the multi-entry.

\optiondef{mglsopt.usedprefix}
The prefix to use on \idx{msubsequentuse} of the multi-entry.

\optiondef{mglsopt.firstsuffix}
The suffix to use on \idx{mfirstuse} of the multi-entry.

\optiondef{mglsopt.usedsuffix}
The suffix to use on \idx{msubsequentuse} of the multi-entry.

\subsection{Skipping Elements}
\label{sec:multiglsoptionsskip}

\begin{information}
The skip options apply to the multi-entry first use flag not the
individual element first use. See \sectionref{sec:mglsfirstuse}.
\end{information}

\optiondef{mglsopt.firstskipmain}
If \optfmt{true}, the main element will be omitted on (multi-entry)
\idx{mfirstuse}.

\optiondef{mglsopt.firstskipothers}
If \optfmt{true}, the other (non-main) elements will be omitted on
(multi-entry) \idx{mfirstuse}.

\optiondef{mglsopt.usedskipmain}
If \optfmt{true}, the main element will be omitted on (multi-entry)
\idx{msubsequentuse}.

\optiondef{mglsopt.usedskipothers}
If \optfmt{true}, the other (non-main) elements will be omitted on
(multi-entry) \idx{msubsequentuse}.

Note that it is technically possible to set the skip options so that
both the main and the other elements are skipped. However, by
default, this will generate a warning and only the final optional
argument (the \meta{insert}) will be displayed. There won't be a
loop over all elements so the commands set at each iteration, such
as \gls{mglscurrentlabel}, won't be defined.

The warning and the insertion of the \meta{insert} is done by:
\cmddef{glsxtrmglsWarnAllSkipped}
where \meta{message} is the warning message and \meta{cs} is the
control sequence that encapsulates the entire content (including
hyperlink and the \mglsopt{textformat} setting, if enabled).

If, for some particular reason, you want this scenario, you can
redefine this command to omit the warning.

\subsection{General}
\label{sec:multiglsoptionsgeneral}

\optiondef{mglsopt.multi.hyper}
This setting may take one of the following values:
\begin{description}
 \item[\optfmt{none}] no hyperlinks;
 \item[\optfmt{allmain}] encapsulate the entire content with
  a single hyperlink to the main entry's target;
 \item[\optfmt{mainonly}] only hyperlink the main entry;
 \item[\optfmt{individual}] hyperlink each entry individually;
 \item[\optfmt{otheronly}] only hyperlink the other entries;
 \item[\optfmt{notmainfirst}] don't hyperlink the main entry on
 \idxn{mfirstuse};
 \item[\optfmt{nototherfirst}] don't hyperlink the other entries on
 \idxn{mfirstuse};
 \item[\optfmt{notfirst}] don't hyperlink any entries on
 \idxn{mfirstuse}.
\end{description}

\optiondef{mglsopt.textformat}
This setting value should be the control sequence name (without the
leading backslash) of the command used to encapsulate the entire
content.

\optiondef{mglsopt.category}
The category to apply to the multi-entry. This is independent of the
categories of each of the elements.  The default is no category. See
\sectionref{sec:multiglscategory}.

\optiondef{mglsopt.mglsopts}
Default options to pass to commands like \gls{mgls}.
Note that \mglsopt{setup} can't be used within this value.

\section{\glsfmtname{mgls} Options}
\label{sec:mglsopts}

The \meta{options} for \gls{mgls} (and similar commands) are listed below.
Any additional options provided will be appended to the \mglsopt{all}
value. For example:
\begin{codebox}
\gls{mgls}\oarg{\glsoptval{counter}{chapter}}\marg{cbot}
\end{codebox}
is equivalent to:
\begin{codebox}
\gls{mgls}\oarg{\mglsoptval{all}{\glsoptval{counter}{chapter}}}\marg{cbot}
\end{codebox}
Whereas:
\begin{codebox}
\gls{mgls}\oarg{\glsoptval{counter}{chapter},\mglsoptval{all}{\glsoptval{counter}{section}}}\marg{cbot}
\end{codebox}
is treated as:
\begin{codebox}
\gls{mgls}\oarg{\mglsoptval{all}{\glsoptval{counter}{section},\glsoptval{counter}{chapter}}}\marg{cbot}
\end{codebox}
which has the same effect as:
\begin{codebox}
\gls{mgls}\oarg{\mglsoptval{all}{\glsoptval{counter}{chapter}}}\marg{cbot}
\end{codebox}

\begin{information}
The descriptions below reference \gls{gls} which is used internally
by \gls{mgls}. Replace this with \gls{glspl} etc as applicable for the
variants, such as \gls{mglspl}.
\end{information}

\optiondef{mglsopt.setup}
The value should be a list of any options that can be passed to
\gls{multiglossaryentrysetup}. These options will override any
conflicting options that were supplied to \gls{multiglossaryentry}
or \gls{multiglossaryentrysetup}. Note that \mglsopt{mglsopts} can't be
used within this value.

\optiondef{mglsopt.all}
The value should be a list of any options that can be passed to
\gls{gls}. These options will be passed to each instance of
\gls{gls} and will override any conflicting setting in
\mglsopt{setup}.

\optiondef{mglsopt.main}
The value should be a list of any options that
can be passed to \gls{gls}. These options will be passed to the
instance of \gls{gls} used for the main label and will override any
conflicting setting in \mglsopt{all}.

\optiondef{mglsopt.others}
The value should be a list of any options that
can be passed to \gls{gls}. These options will be passed to each
instance of \gls{gls} used for the other (not main) labels and will
override any conflicting setting in \mglsopt{all}.

\optiondef{mglsopt.hyper}
A boolean option to determine whether or not to use hyperlinks (if
supported). This may cause a conflict with other options, but is
essentially provided to allow the starred version of \gls{mgls} to
switch off all hyperlinks.

\optiondef{mglsopt.multiunset}
This only applies to the \idx{mfirstuseflag}, described in
\sectionref{sec:mglsfirstuse}, not the \idxpl{firstuseflag} of the
elements. The value may be one of:
\begin{description}
\item \optfmt{global} globally unset the flag;
\item \optfmt{local} locally unset the flag;
\item \optfmt{none} don't unset the flag.
\end{description}

\optiondef{mglsopt.presetlocal}
A boolean option that governs whether or not the following options
should have a local or global effect.

\optiondef{mglsopt.resetall}
A boolean option to determine whether or not to reset all elements
\emph{before} using \gls{gls}.  This option refers to the individual
entry's \idx{firstuseflag} not the \idx{mfirstuseflag}.
(This is similar to passing \glsopt{prereset} to each \gls{gls} but
it's also applied to any skipped elements.)

\optiondef{mglsopt.resetmain}
A boolean option to determine whether or not
to reset the main entry's \idx{firstuseflag} \emph{before} using
\gls{gls}.

\optiondef{mglsopt.resetothers}
A boolean option to determine whether or not to reset the
\idx{firstuseflag} of all the other (not main) elements
\emph{before} using \gls{gls}.

\optiondef{mglsopt.unsetall}
A boolean option to determine whether or not to unset all elements
\emph{before} using \gls{gls}.  This option refers to the individual
entry's \idx{firstuseflag} not the \idx{mfirstuseflag}.
(This is similar to passing \glsopt{preunset} to each \gls{gls} but
it's also applied to any skipped elements.)

\optiondef{mglsopt.unsetmain}
A boolean option to determine whether or not
to unset the main entry's \idx{firstuseflag} \emph{before} using
\gls{gls}.

\optiondef{mglsopt.unsetothers}
A boolean option to determine whether or not to unset the
\idx{firstuseflag} of all the other (not main) elements
\emph{before} using \gls{gls}.

The \optfmt{reset\ldots} options all use:
\cmddef{mglselementreset}
The \optfmt{unset\ldots} options all use:
\cmddef{mglselementunset}
These take the \mglsopt{presetlocal} into account.

An alternative way of resetting the other elements is to use:
\cmddef{mglsunsetothers}
or for a local reset:
\cmddef{mglslocalunsetothers}

\section{Variants of \glsfmtname{mgls}}
\label{sec:mglslike}

The commands listed in this section all behave like \gls{mgls}. These
(including \gls{mgls} itself) are collectively referred to as the
\gls{mgls}-like commands. All commands unset the \idx{mfirstuseflag} 
(unless the \mglsoptval{multiunset}{none} option is applied). Only
those commands that use the \idx{glslike} commands (such as \gls{gls}
or \gls{glspl}) will unset the individual entry's \idx{firstuseflag}.

\subsection{\glsfmtname{gls}-like}
\label{sec:mglsbasic}

\cmddef{mglspl}
This uses \gls{glspl} instead of \gls{gls} for each entry.

\cmddef{mglsmainpl}
This uses \gls{glspl} instead of \gls{gls} for the main entry and
\gls{gls} for all the other entries.

\cmddef{Mgls}
This uses \gls{Gls} for the first entry and \gls{gls} for the other
entries.

\cmddef{MGls}
This uses \gls{Gls} for all entries.

\cmddef{Mglspl}
This uses \gls{Glspl} for the first entry and \gls{glspl} for the
remaining entries.

\cmddef{Mglsmainpl}
The first entry uses the appropriate \idx{sentencecase} command. The
plural form is used for the main entry. So, if the first entry is
also the main entry, \gls{Glspl} is used, otherwise \gls{Gls} is
used. For the remaining entries, \gls{glspl} will be used if the
entry is the main one, otherwise \gls{gls} will be used.

\cmddef{MGlspl}
This uses \gls{Glspl} for all entries.

\cmddef{MGlsmainpl}
This uses \gls{Glspl} for the main entry and \gls{Gls} for the other entries.

\cmddef{MGLS}
This uses \gls{GLS} for all entries.

\cmddef{MGLSpl}
This uses \gls{GLSpl} instead of \gls{gls} for each entry.

\cmddef{MGLSmainpl}
This uses \gls{GLSpl} for the main entry and \gls{GLS} for the others.

\subsection{Abbreviations}
\label{sec:mglsabbrv}

\cmddef{mglsshort}
This will use \gls{glsxtrshort} for any entries that have the
\gloskey{short} field set and will use \gls{glstext} otherwise.

\cmddef{mglslong}
This will use \gls{glsxtrlong} for any entries that have the
\gloskey{long} field set and will use \gls{glstext} otherwise.

\cmddef{mglsfull}
This will use \gls{glsxtrfull} for any entries that have the
\gloskey{short} field set and will use \gls{glsfirst} otherwise.

\cmddef{Mglsshort}
As \gls{mglsshort} but \idx{sentencecase} for the first entry.

\cmddef{Mglslong}
As \gls{mglslong} but \idx{sentencecase} for the first entry.

\cmddef{Mglsfull}
As \gls{mglsfull} but \idx{sentencecase} for the first entry.

\subsection{Other Fields}
\label{sec:mglsotherfields}

\cmddef{mglsname}
This uses \gls{glsname} for each entry.

\cmddef{Mglsname}
This uses \gls{Glsname} for the first entry and \gls{glsname} for
the remaining entries.

\cmddef{MGlsname}
This uses \gls{Glsname} for each entry.

\cmddef{mglssymbol}
This uses \gls{glssymbol} for each entry if the \gloskey{symbol}
field has been set, otherwise it uses \gls{gls}.

\cmddef{MGlssymbol}
This uses \gls{glssymbol} if the \gloskey{symbol} field has been set
otherwise it uses \gls{Gls} for each element. (Note that no 
\idx{casechange} is applied to the symbol as this usually isn't appropriate.)

\cmddef{Mglssymbol}
As \gls{MGlssymbol}, but \gls{Gls} is only used for the first element (if it
doesn't have the \gloskey{symbol} field set).

\cmddef{mglsusefield}
If the field given by \gls{mglsfield} exists for an element,
\gls{glsdisp} will be used for that element, with the \idx{linktext}
obtained from the field value (followed by the \meta{insert}),
otherwise \gls{gls} will be used.

\cmddef{mglsfield}
This command expands to the \idx{internalfieldlabel} required by
\gls{mglsusefield}. The default value is \code{useri}, which
corresponds to the \gloskey{user1} key.

\cmddef{Mglsusefield}
As \gls{mglsusefield} but \idx{sentencecase} for the first
element.

\cmddef{MGlsusefield}
As \gls{mglsusefield} but \idx{sentencecase} for each
element.

You can use the pre-element hook \gls{mglselementprehook} to locally
redefine \gls{mglsfield}. Examples:
\begin{enumerate}
\item if the multi-category is \qt{sample} then use the
\gloskey{user2} field otherwise use the \gloskey{user1} field:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{mglselementprehook}}\marg{\comment{}
  \cmd{ifdefstring}\marg{\gls{mglscurrentcategory}}\marg{sample}\comment{}
  \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{userii}}\comment{}
  \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{useri}}\comment{}
}
\end{codebox}

\item if the element's category is \qt{sample} then use the
\gloskey{user2} field otherwise use the \gloskey{user1} field:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{mglselementprehook}}\marg{\comment{}
  \gls{glsifcategory}\marg{\gls{mglscurrentlabel}}\marg{sample}\comment{}
  \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{userii}}\comment{}
  \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{useri}}\comment{}
}
\end{codebox}

\item if either the multi-entry's category or the element's category
has the custom attribute \qt{mglsfield} set then use it otherwise use
the \gloskey{user1} field:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{mglselementprehook}}\marg{\comment{}
 \gls{glshascategoryattribute}
   \marg{\gls{mglscurrentcategory}}\marg{mglsfield}\comment{}
 \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{\comment{}
   \gls{glsgetcategoryattribute}
    \marg{\gls{mglscurrentcategory}}\marg{mglsfield}}\comment{}
 }\comment{}
 \marg{\comment{}
   \gls{glshasattribute}
     \marg{\gls{mglscurrentlabel}}\marg{mglsfield}\comment{}
   \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{\comment{}
     \gls{glsgetattribute}
       \marg{\gls{mglscurrentlabel}}\marg{mglsfield}}\comment{}
   }\comment{}
   \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{useri}}\comment{}
 }\comment{}
}
\end{codebox}
\end{enumerate}

\subsection{Support for \glsfmtname{pkg.glossaries-prefix} (\glsfmtname{pgls})}
\label{sec:mpgls}

If you load the \sty{glossaries-prefix} package (either after
\sty{glossaries-extra}) or with the \opt{prefix} package
option, then the following commands will use one of the
\gls{pgls}-like commands provided by that package. (See the
\sty{glossaries} user manual for further details.)

If the \sty{glossaries-prefix} package hasn't been loaded then
\gls{gls} (or analogous case-changing variant) will be used instead
and a warning is issued with:
\cmddef{mpglsWarning}
This may be redefined to do nothing to remove the warning.

\cmddef{mpgls}
Uses \gls{pgls} for the first element and \gls{gls} for the remaining
elements.

\cmddef{mpglspl}
Uses \gls{pglspl} for the first element and \gls{glspl} for the remaining
elements.

\cmddef{mpglsmainpl}
Only uses the plural form for the main element. The first element
uses the prefixing command (\gls{pgls} or \gls{pglspl}, depending on
whether the first element is the main element).

\cmddef{Mpgls}
Uses \gls{Pgls} for the first element and \gls{gls} for the remaining
elements.

\cmddef{Mpglsmainpl}
Only uses the plural form for the main element. The first element
uses the \idx{sentencecase} prefixing command (\gls{Pgls} or
\gls{Pglspl}, depending on whether the first element is the main
element).

\cmddef{MPGls}
Uses \gls{Pgls} for the first element and \gls{Gls} for the remaining
elements.

\cmddef{MPGlspl}
Uses \gls{Pglspl} for the first element and \gls{Glspl} for the remaining
elements.

\cmddef{MPGlsmainpl}
Only uses the plural form for the main element. The first element
uses the prefixing command (\gls{Pgls} or \gls{Pglspl}, depending on
whether the first element is the main element). All elements are
use \idx{sentencecase}.

\cmddef{MPGLS}
Uses \gls{PGLS} for the first element and \gls{GLS} for the remaining
elements.

\cmddef{MPGLSpl}
Uses \gls{PGLSpl} for the first element and \gls{GLSpl} for the remaining
elements.

\cmddef{MPGLSmainpl}
Only uses the plural form for the main element. All elements are
converted to \idx{allcaps}. The first element uses the prefixing command
(\gls{PGLS} or \gls{PGLSpl}, depending on whether the first element is
the main element).

\section{Cross-References}
\label{sec:msee}

Multi-entry labels may be used in the cross-referencing keys
\gloskey{see} and \gloskey{seealso}. The formatting command will
use:
\cmddef{mglsseefirstitem}
for the first item in the list (if it's a multi-entry) and
\cmddef{mglsseeitem}
for any subsequent items that are multi-entries. The default
definition of \gls{mglsseeitem} is:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{mglsseeitem}}[1]\marg{\comment{}
 \gls{mglsname}\oarg{\mglsoptval{all}{noindex},\mglsoptvalm{setup}{hyper=allmain}}\marg{\#1}\comment{}
} 
\end{compactcodebox}
This switches off indexing, sets the hyperlink to encompass the
entire multi-entry content and uses the \gloskey{name} field.
The default definition of \gls{mglsseefirstitem} is simply
\gls{mglsseeitem}.

For example, to use the \gloskey{short} or \gloskey{text} fields:
\begin{compactcodebox}
\cmd{renewcommand}*\marg{\gls{mglsseeitem}}[1]\marg{\comment{}
 \gls{mglsshort}\oarg{\mglsoptval{all}{noindex},\mglsoptvalm{setup}{hyper=allmain}}\marg{\#1}\comment{}
} 
\end{compactcodebox}

A multi-entry label may also be used in the \gloskey{alias} key. The
hyperlink target will be the target for the main entry. For example:
\begin{codebox}
\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum}
\gls{newglossaryentry}\marg{botox}\marg{\gloskeyval{name}{botox},
 \gloskeyval{description}{},\gloskeyval{alias}{cbot}}
\end{codebox}
In this case \code{\gls{gls}\marg{botox}} will hyperlink to the
\code{botulinum} target.

\begin{important}
Any multi-entries used in the cross-referencing keys must be defined
before the glossary is displayed. There is some support for
\optval{docdef}{true} but not for the other \opt{docdef} settings.
\end{important}

\section{Additional Commands}
\label{sec:multiextras}

You can test if a label represents a multi-entry using:
\cmddef{glsxtrifmulti}
This does \meta{true} if a multi-entry has been defined with
the label \meta{multi-label} otherwise it does \meta{false}.

\cmddef{glsxtrmultimain}
Expands to the main entry label for the multi-entry identified by
\meta{multi-label} or nothing if not defined.

\cmddef{glsxtrmultilist}
Expands to the list of element labels for the multi-entry identified by
\meta{multi-label} or nothing if not defined.

\cmddef{mglsforelements}
Iterates over all the list of element labels for the multi-entry identified by
\meta{multi-label}. This defines \meta{cs} to the current element label on each
iteration of the loop, which can be used to reference the label in
\meta{body}. This internally uses \gls{@for} (patched by the
\sty{xfor} package, which allows the loop to be broken).

\cmddef{mglsforotherelements}
As \gls{mglsforelements} but skips the main entry label.

\cmddef{glsxtrmultitotalelements}
Expands to the total number of elements in the given multi-entry or nothing if
\meta{multi-label} hasn't been defined.

\cmddef{glsxtrmultimainindex}
Expands to the index of the main element in the given multi-entry or nothing if
\meta{multi-label} hasn't been defined. Indexing starts from 1 for the first
element.

\cmddef{glsxtrmultilastotherindex}
Expands to the index of the final non-main element in the given
multi-entry or nothing if \meta{multi-label} hasn't been defined.

The \gls{multiglossaryentry} command will write the label information
to the \ext{aux} file using:
\cmddef{writemultiglossentry}
This is will write the following line to the \ext+{aux} file:
\cmddef{@glsxtr@multientry}
This is provided to support \optval{docdef}{true} and also
for the benefit of any tools that require the
information (such as \app{bib2gls} or autocompletion tools).
If it's not required and causes too much clutter, it can
be disabled by redefining \gls{writemultiglossentry} to do nothing.

\section{\glsfmtname{app.bib2gls}}
\label{sec:mbib2gls}

In the \app{bib2gls} v2.9+ user manual, these multi-entry sets are
referred to as \qt{compound entries} or \qt{compound sets} to
differentiate them from \app{bib2gls}['s] multi-entry types (such as
\atentry{dualentry}).

Each instance of one of the \gls{mgls}-like commands is written to
the \ext{aux} file and so can be picked up by \app{bib2gls}
(at least version 2.9). The \idx{resourceopt} can be used to
determine whether or not to consider the other (non-main) elements
to be dependent on the main element.

With \app{bib2gls}, you can either define compound entries in
the document with \gls{multiglossaryentry} (or
\gls{providemultiglossaryentry}) or you can define compound entries
in the \ext{bib} file with the \atentry{compoundset}
entry type. Whichever method you use,
remember that the entries that form the elements of the set must be
defined first. See the \app{bib2gls} manual (v2.9+) for further details.

You can use the resource option \resourceopt{compound-adjust-name}
to replace the \gloskey{name} field of the main entry to:
\cmddef{glsxtrmultientryadjustedname}
where \meta{multi-label} is the label identifying the compound set,
\meta{name} was the value of the \gloskey{name} before adjustment,
\meta{sublist1} is the sub-list of other element labels
before the main element (empty if the main element is the first
element in the list), and \meta{sublist2} is the sub-list of
other elements after the main element (empty if the main label is
the final element).

This command is defined in \sty{glossaries-extra-bib2gls}, which is
automatically loaded with \opteqvalref{record}{only} and
\opteqvalref{record}{nameref}. Case-changing versions of this command are
also available.

\cmddef{Glsxtrmultientryadjustedname}
This is a \idx{sentencecase} version of
\gls{glsxtrmultientryadjustedname}.

\cmddef{GlsXtrmultientryadjustedname}
This is a \idx{titlecase} version of
\gls{glsxtrmultientryadjustedname}.

\cmddef{GLSxtrmultientryadjustedname}
This is an \idx{allcaps} version of
\gls{glsxtrmultientryadjustedname}.

Note that the above commands don't take the prefix or suffix into
account (see \sectionref{sec:mglsfixes}).

The separator between each element in the sub-lists is produced
with:
\cmddef{glsxtrmultientryadjustednamesep}
The default definition just uses \gls{glscombinedfirstsepfirst}.

The separator between the last element of \meta{sublist1} and the
main element is produced with:
\cmddef{glsxtrmultientryadjustednamepresep}
Similarly for the separator between the main element and the first
element of \meta{sublist2}:
\cmddef{glsxtrmultientryadjustednamepostsep}
These both default to \gls{glsxtrmultientryadjustednamesep}.

The \meta{name} is encapsulated with:
\cmddef{glsxtrmultientryadjustednamefmt}
This just does its argument by default.
If \meta{sublist1} is empty for the \idx{sentencecase}
version, then \meta{name} is encapsulated with:
\cmddef{Glsxtrmultientryadjustednamefmt}
This does \gls{makefirstuc}\marg{text} by default.
For the \idx{titlecase} version, the name is encapsulated with:
\cmddef{GlsXtrmultientryadjustednamefmt}
This uses \gls{glscapitalisewords}, if defined, or \gls{capitalisewords} otherwise.
The \idx{allcaps} version uses:
\cmddef{GLSxtrmultientryadjustednamefmt}
This uses \gls{mfirstucMakeUppercase} by default.

Each element label in the sub-lists is encapsulated with:
\cmddef{glsxtrmultientryadjustednameother}
This does \code{\gls{glsentryname}\margm{label}} by default.
For the \idx{sentencecase} version (where
\meta{sublist1} isn't empty), then the element label is encapsulated
with:
\cmddef{Glsxtrmultientryadjustednameother}
This does \code{\gls{Glsentryname}\margm{label}} by default.
The \idx{titlecase} version uses:
\cmddef{GlsXtrmultientryadjustednameother}
This does \code{\gls{glsentrytitlecase}\margm{label}\marg{name}} by
default. The \idx{allcaps} version uses:
\cmddef{GLSxtrmultientryadjustednameother}
This is defined as:
\begin{compactcodebox}[before upper app=\small]
\cmd{newcommand}*\marg{\gls{GLSxtrmultientryadjustednameother}}[1]\marg{\comment{}
 \gls{mfirstucMakeUppercase}\marg{\gls{glsentryname}\marg{\#1}}}
\end{compactcodebox}

\chapter{Defining and Displaying Glossaries}
\label{sec:glossaries}

As with the base \sty{glossaries} package, you need to establish the
indexing method in the preamble and use the appropriate
\csmetafmt{print}{\ldots}{glossary} command. For example, to use the
\qt{noidx} method you need \gls{makenoidxglossaries} in the preamble
and \gls{printnoidxglossary} in the document. Whereas if you want to
use \app{makeindex} or \app{xindy}, you need \gls{makeglossaries} in
the preamble and \gls{printglossary} in the document. The
\sty{glossaries-extra} package provides a hybrid approach:
\cmddef{makeglossaries}
If the optional argument is present, then \meta{types} should be a
comma-separated list of \idx{glossary} labels that should be
processed by \app{makeindex} or \app{xindy} as per the normal
behaviour of \gls{makeglossaries}. Any non-\idxpl{ignoredglossary}
that are not listed in \meta{types} should be treated as though
\gls{makenoidxglossaries} was used. This means that the
\idxpl{glossary} listed in \meta{types} should be displayed using
\gls{printglossary} and the other (non-\idxpl{ignoredglossary})
should be displayed with \gls{printnoidxglossary}. See
the accompanying file \file{sample-mixedsort.tex} for an example.

\begin{information}
The hybrid \gls{makeglossaries}\oargm{list} doesn't automatically
implement \optval{sanitizesort}{false}, which is the default
with \gls{makenoidxglossaries}. However, since the hybrid option is
typically used to allow sorting by definition or by use this won't
usually make a difference.
\end{information}

If the optional argument is omitted, it will be treated as per the
original \gls{makeglossaries} provided by the base \sty{glossaries}
package.  If the optional argument is present,
\gls{glsindexingsetting} will be set to \code{makeindex-noidx} or
\code{xindy-noidx}, depending on whether \app{makeindex} or
\app{xindy} should be used.

\begin{information}
\Idxpl{glossary} can't be defined after \gls{makeglossaries}. This
ensures that all the required \idx{indexing} files are opened.
If you're not using \gls{makeglossaries}, \idxpl{glossary} need to
be defined before any entries that should belong to them are
defined.
\end{information}

The base \sty{glossaries} package provides \gls{newignoredglossary}
to define an \idx{ignoredglossary} that doesn't have any associated
\idx{indexing} files. This will automatically switch off hyperlinks
for any entries assigned to the \idx{glossary} (since there will be
no target). With \sty{glossaries-extra}, it's possible to have
targets without using the \idx{indexing} methods provided by the
base package. For example, it's possible to have standalone entries
(see \sectionref{sec:glossentry}) or targets can be created with
\gls{printunsrtglossary}, so \sty{glossaries-extra} provides a
starred version.
\cmddef{newignoredglossary*}
This behaves like the unstarred version but doesn't disable
hyperlinks. The \idx{glossary} will still be omitted by iterative
commands, such as \gls{printunsrtglossaries}, and can't be used with
\gls{printglossary} or \gls{printnoidxglossary}. If you use an
\idx{ignoredglossary} with \gls{printunsrtglossary}, you will need
to use the \printglossopt{title} option to override the default
title, if required.

\cmddef{provideignoredglossary}
This is like \gls{newignoredglossary} but does nothing if the
\idx{glossary} has already been defined. The unstarred version
disables hyperlinks.

With the \idx{indexing} options provided by the base
\sty{glossaries} package, if you want a term to appear in more than
one \idx{glossary}, it's necessary to define a duplicate entry with
a different label. With the \idx{unsrtfam}, the same entry can
appear in multiple \idxpl{glossary}. This can be done by simply
copying the entry's label to the required \idx{glossary} using:
\cmddef{glsxtrcopytoglossary}
This just adds the label to the target \idx{glossary}['s] internal
comma-separated list that commands like \gls{printunsrtglossary}
iterate over. The unstarred version locally adds the label. The
starred version performs a global change.

\begin{warning}
\gls{glsxtrcopytoglossary} is not compatible with \opteqvalref{docdef}{true}.
\end{warning}

Note that the \gloskey{type} field will still be set to the original
\idx{glossary}. This is considered the entry's primary glossary.
There's no field that keeps track of the additional \idxpl{glossary}
the entry has been copied to.

If used with \gls{printglossary} or \gls{printnoidxglossary}, the
entry will only be \indexed\ for its primary \idx{glossary}. It
won't show up in the other \idxpl{glossary}, but will be found when
using an iterative command, such as \gls{glsaddall}, over the target
\idx{glossary}.

You can test if an entry has already been added to a \idx{glossary}
with:
\cmddef{GlsXtrIfInGlossary}
This does \meta{true} if the entry given by \meta{entry-label}
is in the internal list of the \idx{glossary} identified by
\meta{glossary-type}, otherwise it does \meta{false}. If the
\idx{glossary} doesn't exist, this does \meta{false} and
will either generate an error (\opteqvalref{undefaction}{error})
or a warning (\opteqvalref{undefaction}{warn}). This command
considers \idxpl{ignoredglossary} as existing.

You can test if a \idx{glossary} is empty with:
\cmddef{glsxtrifemptyglossary}
This does \meta{true} if the glossary identified by
\meta{glossary-type} is empty, otherwise does \meta{false}.
If the \idx{glossary} doesn't exist, this does \meta{true} and
will either generate an error (\opteqvalref{undefaction}{error})
or a warning (\opteqvalref{undefaction}{warn}). This command
considers \idxpl{ignoredglossary} as existing.

To test for the existence of a \idx{glossary}, you can use
\gls{ifglossaryexists} and \gls{doifglossarynoexistsordo}, which are
documented in the \qt{Conditionals} section of the \sty{glossaries}
user manual.

The base \sty{glossaries} package provides \gls{forallglossaries} to
iterate over a list of \idxpl{glossary} labels (all
non-\idxpl{ignoredglossary} by default). This can also be used with
\sty{glossaries-extra} but \gls{forallacronyms} is only for
\idxpl{glossary} that have been declared as lists of acronyms, so
it's inappropriate with the \sty{glossaries-extra} package. Instead,
you can use the analogous command:
\cmddef{forallabbreviationlists}
Each instance of \gls{newabbreviation} will add the abbreviation's
associated \idx{glossary} (identified by the \gloskey{type} key) to
the internal list of labels (if not already added). Note that this
won't take into account any \idxpl{glossary} that had
abbreviations copied or moved to it.

\section{Entry Page Reference}
\label{sec:glspageref}

The base \sty{glossaries} package provides \gls{glsrefentry}, which
uses \gls{ref} to reference the entry's associated counter
(enabled with \opt{entrycounter} or \opt{subentrycounter}, not the
\idx{locationcounter}). The
\sty{glossaries-extra} package additionally provides:
\cmddef{glsxtrpageref}
This works in the same way as \gls{glsrefentry} but uses \gls{pageref} instead of
\gls{ref}. As with \gls{glsrefentry}, if the corresponding counter
has not been enabled, \gls{glsxtrpageref} just does 
\code{\gls{gls}\margm{entry-label}}.

\section{Glossary Preamble}
\label{sec:glospreamble}

The base package provides \gls{glossarypreamble}, which is used at
the start of the \idx{glossary}. By default, this will use the preamble
associated with the current \idx{glossary}. If you redefine
\gls{glossarypreamble}, this will set the preamble for all
glossaries. To set the preamble for a particular glossary, you can
use \gls{setglossarypreamble}. With \sty{glossaries-extra}, you can
additionally append to an existing preamble using:
\cmddef{apptoglossarypreamble}
This (locally) appends \meta{text} to the preamble for the
\idx{glossary} identified by \meta{type}. If \meta{type} is omitted,
\gls{glsdefaulttype} is assumed.

\cmddef{pretoglossarypreamble}
This (locally) prepends \meta{text} to the preamble for the
\idx{glossary} identified by \meta{type}. If \meta{type} is omitted,
\gls{glsdefaulttype} is assumed.

\section{Options}
\label{sec:printglossopts}

The base \sty{glossaries} package provides options that may be used with
\gls{printglossary} and \gls{printnoidxglossary}. The
\sty{glossaries-extra} package provides additional options, some of
which are specific to \gls{printunsrtglossary} and
\env{printunsrtglossarywrap}. These extra options are listed below.
Additionally, options provided by the base package
that aren't available with one or more of the \idx{unsrtfam}, or
that may be replaced by a \idx{resourceopt} with \app{bib2gls}, are
also listed.

\optiondef{printgloss.sort}
The \printglossopt{sort} option is provided by the base
\sty{glossaries} package, but is only available for
\gls{printnoidxglossary}. Available methods are described in the
\sty{glossaries} user manual. The \gls{printunsrtglossary} and
\gls{printunsrtinnerglossary} commands simply iterate over the
\idx{glossary}['s] internal list in the order in which the entries
have been added to that \idx{glossary}, so this option is not
applicable.  If you are using \app{bib2gls}, use the
\resourceopt{sort} \idx{resourceopt} instead.

\optiondef{printgloss.nonumberlist}
The \printglossopt{nonumberlist} option is provided by the base
\sty{glossaries} package. It may be used with \gls{printunsrtglossary} and
\gls{printunsrtinnerglossary} but if you are using \app{bib2gls},
you may prefer to use the \resourceoptval{save-locations}{false}
\idx{resourceopt} instead, if \idxpl{locationlist} are not required. Note that
\printglossoptval{nonumberlist}{false}
will have no effect with the \resourceoptval{save-locations}{false}
\idx{resourceopt} as there won't be any \idxpl{locationlist} to
display.

\optiondef{printgloss.title}
The \printglossopt{title} option is provided by the base \sty{glossaries} package to
override the default title for the \idx{glossary}. This option
is also available for \gls{printunsrtglossary} and
\env{printunsrtglossarywrap} but not for
\gls{printunsrtinnerglossary}.

\optiondef{printgloss.toctitle}
The \printglossopt{toctitle} option is provided by the base
\sty{glossaries} package to override the default table of contents
title for the \idx{glossary}. This option is also available for
\gls{printunsrtglossary} and \env{printunsrtglossarywrap} but not
for \gls{printunsrtinnerglossary}.

\optiondef{printgloss.numberedsection}
The \printglossopt{numberedsection} option is provided by the base
\sty{glossaries} package to indicate whether or not the section
header used at the start of the \idx{glossary} should be numbered
rather than unnumbered (and whether or not to automatically label
the glossary with
\code{\gls+{label}\marg{\gls{glsautoprefix}\meta{glossary-type}}}).
The \opt{numberedsection} package option will change the default
setting to match. This option is not available for
\gls{printunsrtinnerglossary}.

\optiondef{printgloss.style}
The \printglossopt{style} option is provided by the base \sty{glossaries} package to
set the \idx{glossarystyle}. This option is not
available for \gls{printunsrtinnerglossary}.

\optiondef{printgloss.label}
The \printglossopt{label} option is provided by \sty{glossaries-extra} to add
\code{\gls+{label}\margm{label}} after the section header. This is
essentially like \optval{numberedsection}{nameref} but you supply
the label. This option is not available for
\gls{printunsrtinnerglossary}. Alternatively, you can use:
\cmddef*{glsxtrsetglossarylabel}
This will need to be scoped or
changed between \idxpl{glossary} or use a command in \meta{label}
that expands differently for each \idx{glossary} to avoid duplicate
labels.

\begin{information}
If the supplied value is empty, the label is suppressed (without
otherwise altering the \opt{numberedsection} setting).
\end{information}

\optiondef{printgloss.leveloffset}
The \printglossopt{leveloffset} option sets or increments the \idx{hierarchicallevel} offset.  If
\meta{offset} starts with \code{++} then the current offset is
incremented by the given amount otherwise the current offset is
set to \meta{offset}. For example, an entry with a normal 
\gls{hierarchicallevel} of 1 will be treated as though it has
\gls{hierarchicallevel} $1+\meta{offset}$. Note that the
\idx{glossarystyle} may not support the resulting
\idx{hierarchicallevel}. This option is only available for the
\idx{unsrtfam} and the \env{printunsrtglossarywrap}
environment. See \sectionref{sec:printunsrtinner} for an example.

\optiondef{printgloss.flatten}
The \printglossopt{flatten} option treats all entries as though they have the same
\idx{hierarchicallevel} (which will be the value of \printglossopt{leveloffset}). 
This option is only available for the
\idx{unsrtfam} and the \env{printunsrtglossarywrap}
environment. Unlike the \resourceopt{flatten} resource option, this
option doesn't actually remove the \gloskey{parent} field.

\optiondef{printgloss.groups}
The \printglossopt{groups} option is only applicable to the \idx{unsrtfam} and
\env{printunsrtglossarywrap}. If set to false, it will prevent
\idxpl{group} from being formed. If true (the default), \idxpl{group} will only be
formed if they are supported. See \sectionref{sec:printunsrt}
for further details.

\optiondef{printgloss.preamble}
The \printglossopt{preamble} option redefines \gls{glossarypreamble} to \meta{text}.

\optiondef{printgloss.postamble}
This \printglossopt{postamble} option redefines \gls{glossarypostamble} to \meta{text}.

\optiondef{printgloss.prefix}
The \printglossopt{prefix} option is provided by \sty{glossaries-extra} and simply
redefines \gls{glolinkprefix} to expand to \meta{prefix}. If
hyperlinks are supported and the \idx{glossarystyle} uses
\gls{glstarget} to create the entry's hypertarget, the target name
is obtained from \code{\gls{glolinkprefix} \meta{entry-label}}. If
you are displaying multiple \idxpl{glossary} with shared entries (for
example, using the \resourceopt{secondary} resource option with
\app{bib2gls}), then changing the prefix can avoid duplicate targets.
Alternatively, you can redefine \gls{glstarget} to use
\gls{glsxtrtarget}.

Note that this option will also affect the targets used by the
\idx{glslike} and \idx{glstextlike} commands. This means that if you
have, for example, \gls{gls} in the description of an entry, then
its hyperlink will go to that entry's item in the current
\idx{glossary}.  Whereas referencing that entry outside of the
\idx{glossary} will hyperlink to the \idx{glossary} that uses the prefix
matching the setting at that point in the document.

\mExampleref{ex:targetprefixes} has two \idxpl{glossary} with different
target prefixes:
\begin{codebox}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\oarg{\optval{showtargets}{annoteleft},\optval{style}{\glostyle{tree}}}\marg{glossaries-extra}
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},
 \gloskeyval{description}{an example description that references 
  \gls{gls}\marg{another}}}
\gls{newglossaryentry}\marg{another}\marg{\gloskeyval{name}{another},
 \gloskeyval{description}{some other example description
  that references \gls{gls}\marg{sample}}}
\cbeg{document}
Link to glossary 1: \gls{gls}\marg{sample}.
\codepar
Link to glossary 2: \gls{gls}\oarg{\glsoptval{prefix}{other-}}\marg{sample}.
\gls{printunsrtglossary}
\gls{printunsrtglossary}\oarg{\printglossoptval{prefix}{other-}}
\cend{document}
\end{codebox}
This uses the \opt{showtargets} package option to show the target
names to the left of the hyperlink or hypertarget.

\begin{resultbox}[float]
\createexample*[title={Changing the target prefix},
 label={ex:targetprefixes},
description={Example document that illustrates two glossaries with
different target prefixes}]
{\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\oarg{\optval{showtargets}{annoteleft},\optval{style}{\glostyle{tree}}}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},^^J
 \gloskeyval{description}{an example description that references \gls{gls}\marg{another}}}^^J%
\gls{newglossaryentry}\marg{another}\marg{\gloskeyval{name}{another},^^J
 \gloskeyval{description}{some other example description that references \gls{gls}\marg{sample}}}
}{Link to glossary 1: \gls{gls}\marg{sample}. 
\codepar
Link to glossary 2: \gls{gls}\oarg{\glsoptval{prefix}{other-}}\marg{sample}.^^J%
\gls{printunsrtglossary}^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{prefix}{other-}}
}
\end{resultbox}

Within the main part of the document, the first reference to
\qt{sample} has a hyperlink to the first \idx{glossary} (with the target
\code{glo:sample}, which uses the default prefix), and the second
reference has a hyperlink to the second \idx{glossary} (with the
target \code{other-sample}).

Within the \idxpl{glossary}, the \gls{gls} references use the
current \idx{glossary} prefix, so the target is in the same
\idx{glossary}.

\optiondef{printgloss.targetnameprefix}
The \printglossopt{targetnameprefix} option is similar to the
\printglossopt{prefix} option but only affects the prefix
for the entry item's target and doesn't change the prefix for any
references contained within the \idx{glossary}. This \emph{prepends} the
given prefix to the default prefix.

\mExampleref{ex:targetprefixname} modifies the above example:
\begin{codebox}
Link to glossary 1: \gls{gls}\marg{sample}.
\codepar
Link to glossary 2: \gls{gls}\oarg{\glsoptval{prefix}{other-glo:}}\marg{sample}.
\gls{printunsrtglossary}
\gls{printunsrtglossary}\oarg{\printglossoptval{targetnameprefix}{other-}}
\end{codebox}

\begin{resultbox}[float]
\createexample*[title={Prepending to the target prefix for just the entry
item},
 label={ex:targetprefixname},
description={Example document that illustrates two glossaries with
different target prefixes using targetprefixname}]
{\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\oarg{\optval{showtargets}{annoteleft},\optval{style}{\glostyle{tree}}}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},^^J
 \gloskeyval{description}{an example description that references \gls{gls}\marg{another}}}^^J%
\gls{newglossaryentry}\marg{another}\marg{\gloskeyval{name}{another},^^J
 \gloskeyval{description}{some other example description that references \gls{gls}\marg{sample}}}
}{Link to glossary 1: \gls{gls}\marg{sample}. 
\codepar
Link to glossary 2: \gls{gls}\oarg{\glsoptval{prefix}{other-glo:}}\marg{sample}.^^J%
\gls{printunsrtglossary}^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{targetnameprefix}{other-}}
}
\end{resultbox}

Note that this has prepended \code{other-} to the existing
\code{glo:}\ prefix. This is why the \glsopt{prefix} option in
the second \gls{gls} reference had to be changed to match the
appropriate hypertarget name.  The \gls{gls}
references in the second \idx{glossary} now point to the relevant
line in the first \idx{glossary}.

It's possible to combine \printglossopt{targetnameprefix} with
\printglossoptvalm{prefix}{} but that will also affect the \gls{gls}
references within the \idx{glossary}.

\optiondef{printgloss.target}
The \printglossopt{target} option is a boolean option that can be used to switch off the
automatic creation of the entry hypertargets but still allows
hyperlinks within the \idx{glossary}. This can be used to prevent
duplicate destinations for secondary \idxpl{glossary}.

\section{Displaying a Glossary Without Sorting or Indexing}
\label{sec:printunsrt}

The base \sty{glossaries} package provides two ways of displaying a
\idx{glossary}, depending on the \idx{indexing} option:
\gls{printglossary} (which inputs a file created by \app{makeindex}
or \app{xindy} that contains the code to typeset the
\idx{glossary}) or \gls{printnoidxglossary} (which doesn't require an
external \idx{indexingapp} but instead uses \LaTeX\ to sort 
a list of entry labels and then iterates over that list, where the
\idx{locationlist} information is picked up from the \ext{aux} file).

The \sty{glossaries-extra} package provides an alternative that
doesn't require sorting or \idx{indexing}.
\cmddef{printunsrtglossary}
This behaves in a similar way to \gls{printnoidxglossary}, but it
always lists all the defined entries for the given glossary in the
order in which they were added to the glossary. Unlike
\gls{printglossary}, you may use \gls{printunsrtglossary} with an
\idx{ignoredglossary}.

The \qt{unsrt} part of the command name
indicates that the list is always in order of definition (unsorted).
This command may be used with \app{bib2gls} which ensures that the
order of definition matches the desired order as given by the
\resourceopt{sort} resource option (and other applicable options).
However, \gls{printunsrtglossary} may simply be used without \app{bib2gls}, in
which case you need to ensure that you define your glossary entries
in the required order.

\begin{important}
The \idx{unsrtfam} and \env{printunsrtglossarywrap} are not intended
for use with \gls{makeglossaries} and \gls{makenoidxglossaries}.
Mixing these different methods can result in unexpected behaviour.
\end{important}

There is also a starred version which has a mandatory argument:
\cmddef{printunsrtglossary*}
This is equivalent to:
\begin{compactcodebox}
\cmd{begingroup}
  \meta{init-code}\gls{printunsrtglossary}\oargm{options}
\cmd{endgroup}
\end{compactcodebox}
There's no significant difference between doing:
\begin{compactcodebox}
\marg{\meta{init-code}\gls{printunsrtglossary}\oargm{options}}
\end{compactcodebox}
and
\begin{compactcodebox}
\gls{printunsrtglossary*}\oargm{options}\margm{init-code}
\end{compactcodebox}
Note that unlike \gls{glossarypreamble}, the supplied \meta{init-code} is
done before the \idx{glossary} header.

\begin{important}
If you want to use one of the \env{tabular}-like
styles with \gls{printunsrtglossary}, make sure you load
\sty{glossaries-extra-stylemods} which modifies
the definition of \gls{glsgroupskip} to avoid the
\qt{Incomplete \csfmt{iftrue}} error that may otherwise occur.
\end{important}

As with \gls{printglossary} and \gls{printnoidxglossary}, there is
also a command to print all non-\idxpl{ignoredglossary} in the order
in which they were defined:
\cmddef{printunsrtglossaries}

This means you now have the option to simply list all entries on the
first \LaTeX\ run without the need for a post-processor, however
there will be no \idx{locationlist} in this case, as that has to be
set by a post-processor such as \app{bib2gls} (see
\sectionref{sec:bib2gls}).

\begin{warning}
No attempt is made to gather hierarchical elements.
If child entries aren't defined immediately after their parent
entry, they won't be together in the \idx{glossary} when using
\gls{printunsrtglossary}.
\end{warning}

The way that \gls{printunsrtglossary} basically works is to iterate
over every label in the \idx{glossary}['s] internal label list
and format each entry according to the way the \idx{glossarystyle}
would normally format the entry's \idx{hierarchicallevel} (described
in more detail in \sectionref{sec:printunsrtadvanced}).
If a change in letter group is detected, the letter group heading
and group skip will be inserted.

A label is appended to the \idx{glossary}['s] internal label list
whenever an entry is defined. This means that the list will normally
be in order of definition, but it's also possible to copy an entry's
label to another \idx{glossary}['s] internal label list using
\gls{glsxtrcopytoglossary}, which can be used to provide a different
order.

\mExampleref{ex:printunsrt} illustrates this method:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\oarg{\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra}
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},
 \gloskeyval{description}{}}
\cbeg{document}
\gls{printunsrtglossary}
\cend{document}
\end{codebox}
The document build only requires one \LaTeX\ call in this case.
\begin{resultbox}
\createexample*[title={Displaying unsorted glossaries},
 label={ex:printunsrt},
description={Example document that doesn't require any external indexing}]
{\cmd{usepackage}\oarg{\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}}^^J%
}{\gls{printunsrtglossary}}
\end{resultbox}
Be careful if you want letter groups with \gls{printunsrtglossary}.

\mExampleref{ex:printunsrtstylemods}
demonstrates the difference if the \opt{stylemods} option is added:
\begin{codebox}
\cmd{usepackage}\oarg{\opt{stylemods},\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra}
\end{codebox}
\begin{resultbox}
\createexample*[title={Displaying unsorted glossaries with \optfmt{stylemods}},
 label={ex:printunsrtstylemods},
description={Example document that doesn't require any external
indexing using the stylemods option}]
{\cmd{usepackage}\oarg{\opt{stylemods},\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}}^^J%
}{\gls{printunsrtglossary}}
\end{resultbox}
In this case, the \idx{group} headings are now numbers instead of
letters. The styles provided with \sty{glossaries-extra} and those
modified by \sty{glossaries-extra-stylemods} are designed to assist integration
with \app{bib2gls}.  Without these modifications,
\gls{printunsrtglossary} behaves like the less sophisticated
\gls{printnoidxglossary} which checks if the label is an integer
less than 256 and uses \gls{char} to create the title (if no title
has been provided).

If you really want to use \gls{printunsrtglossary} without
\app{bib2gls} and you want letter \idxpl{group} with
\opt{stylemods} without having to define all the titles, you can use:
\cmddef{glsxtrnoidxgroups}
which will switch over to using the group titling method used with
\gls{printnoidxglossary}. This
command is only available with \opteqvalref{record}{off} and can't
be used with \gls{makeglossaries}.

\begin{information}
If you have at least v4.57 of the base \sty{glossaries} package and
at least v3.0 of the \sty{datatool} package, \gls{printnoidxglossary}
now obtains the letter group information from the \sty{datatool}
sorting function and sets it in a special 
\idxc{internalfieldlabel}{internal field}
with the label \glosfield{dtlsortgroup}.
So if you use \gls{glsxtrnoidxgroups}, it will first test if that
field has been set before falling back on its old behaviour.
\end{information}

If, conversely, you don't want any \idxpl{group} formed, regardless
of the \idx{glossarystyle}, you can disable them with
\printglossoptval{groups}{false}.

\mExampleref{ex:printunsrtgroup} modifies
\exampleref{ex:printunsrtstylemods} so that the document contains:
\begin{codebox}
\gls{printunsrtglossary}\oarg{\printglossoptvalm{title}{Glossary 1}}
\gls{glsxtrnoidxgroups}
\gls{printunsrtglossary}\oarg{\printglossoptvalm{title}{Glossary 2}}
\gls{printunsrtglossary}\oarg{\printglossoptval{groups}{false},
 \printglossoptvalm{title}{Glossary 3}}
\gls{printunsrtglossary}\oarg{\printglossoptval{style}{tree},\printglossopt{nogroupskip},
 \printglossoptvalm{title}{Glossary 4}}
\end{codebox}
This repeats the same \idx{glossary}. The first is the same as 
\exampleref{ex:printunsrtstylemods}. The second is the same as 
\exampleref{ex:printunsrt} (which didn't
use \opt{stylemods}). The final two \idxpl{glossary} have the
\idxpl{group} suppressed. Using \printglossoptval{groups}{false}
(Glossary~3) is more efficient than using
\printglossopt{nogroupskip} and switching to a style that doesn't
show the header (Glossary~4).

I've also switched to two column mode to display the result in a
more compact form. The first two glossaries are shown on the left
and the last two are on the right:
\begin{resultbox}
\createexample*[title={Displaying unsorted glossaries with different
group settings},
 label={ex:printunsrtgroup},
description={Example document that doesn't require any external
indexing with different group settings}]
{\cmd{usepackage}\oarg{\opt{stylemods},\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}}^^J%
}{\cmd{twocolumn}\gls{printunsrtglossary}\oarg{title=\marg{Glossary 1}}^^J%
\gls{glsxtrnoidxgroups}^^J%
\gls{printunsrtglossary}\oarg{title=\marg{Glossary 2}}^^J%
\cmd{newpage}
\gls{printunsrtglossary}\oarg{\printglossoptval{groups}{false},title=\marg{Glossary 3}}^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{style}{tree},\printglossopt{nogroupskip},title=\marg{Glossary 4}}
}
\end{resultbox}

The \idx{unsrtfam} were designed for use with \app{bib2gls},
which uses more complex alphanumeric \idx{group} labels to allow for greater
customization and to avoid conflict where there are multiple
\idxpl{glossary} or \idxpl{hierarchicallevel} with potentially the
same letter \idxpl{group}.

The way that \app{bib2gls} works is to select entries from a
\ext{bib} file, according to the document requirements, sort the
entries, and then write the entry definitions
(with commands like \gls{longnewglossaryentry*} or
\gls{newabbreviation}) in the \ext{glstex} in the desired order,
which is then input by \gls{GlsXtrLoadResources}.
This means that \gls{printunsrtglossary} will display the
entries in that order since, from \sty{glossaries-extra}['s] point
of view, that's the order of definition.

While it is possible to use \gls{printunsrtglossary} without
\app{bib2gls}, as in the above example, for long or complex
\idxpl{glossary} it's better to use \app{bib2gls} which can
automatically assign appropriate titles to the \idxpl{group}.

\Idxpl{group} and hierarchy are discussed in more detail in
\sectionref{sec:printunsrtgroups}. See
\sectionref{sec:printunsrtlocations} for \idxpl{locationlist} and
\sectionref{sec:printunsrtinner}. Advanced commands and further
detail about the way \gls{printunsrtglossary} works are covered in
\sectionref{sec:printunsrtadvanced}.

\subsection{Groups and Hierarchy}
\label{sec:printunsrtgroups}

\begin{information}
See \gallerypage{logicaldivisions}{Gallery: Logical Glossary Divisions 
(type vs group vs parent)} for the difference between the
\gloskey{group}, \gloskey{type} and \gloskey{parent} fields.
\end{information}

\mExampleref{ex:unsrtcopygrp} is a longer example that uses \opt{stylemods} to
automatically load \sty{glossary-bookindex}:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\oarg{\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra}
\gls{newglossaryentry}\marg{waterfowl}\marg{\gloskeyval{name}{waterfowl},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}
\gls{newglossaryentry}\marg{adder}\marg{\gloskeyval{name}{adder},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},
 \gloskeyval{parent}{waterfowl},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{zebra}\marg{\gloskeyval{name}{zebra},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},
 \gloskeyval{description}{}}
\gls{newglossaryentry}\marg{mallard}\marg{\gloskeyval{name}{mallard},
 \gloskeyval{parent}{duck},
 \gloskeyval{description}{}}
\codepar
\gls{newglossary*}\marg{another}\marg{Another Glossary}
\gls{glsxtrcopytoglossary}\marg{mallard}\marg{another}
\gls{glsxtrcopytoglossary}\marg{aardvark}\marg{another}
\gls{glsxtrcopytoglossary}\marg{zebra}\marg{another}
\gls{glsxtrcopytoglossary}\marg{ant}\marg{another}
\gls{glsxtrcopytoglossary}\marg{duck}\marg{another}
\cbeg{document}
\gls{printunsrtglossary}
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}}
\cend{document}
\end{codebox}
Unlike the previous examples that defined the entries in
alphabetical order, this example hasn't used any logical order.
Note, in particular, that the child entries \qt{duck} and
\qt{mallard} (which have the \gloskey{parent} key set) have not been
defined immediately after their parent.

The first \gls{printunsrtglossary} has the default
\printglossoptval{type}{main} and lists all entries defined in the 
\code{main} \idx{glossary}, in the order in which they were defined. The
second \gls{printunsrtglossary} lists all entries in the custom
\code{another} \idx{glossary} and is in the order in which the
entries were copied to that \idx{glossary}.

The document build for \exampleref{ex:unsrtcopygrp} again simply
requires one \LaTeX\ call.

\begin{resultbox}[float]
\createexample*[label={ex:unsrtcopygrp},
title={Displaying unsorted glossaries with a copied list},
description={Example document that doesn't require any external
indexing that copies entries to another glossary. Entries are listed
in order of definition with child entries indented, that results in a
confusing list}]
{\cmd{usepackage}\oarg{\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{waterfowl}\marg{\gloskeyval{name}{waterfowl},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{adder}\marg{\gloskeyval{name}{adder},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},\gloskeyval{parent}{waterfowl},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{zebra}\marg{\gloskeyval{name}{zebra},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{mallard}\marg{\gloskeyval{name}{mallard},\gloskeyval{parent}{duck},\gloskeyval{description}{}}^^J%
\codepar
\gls{newglossary*}\marg{another}\marg{Another Glossary}^^J%
\gls{glsxtrcopytoglossary}\marg{mallard}\marg{another}^^J%
\gls{glsxtrcopytoglossary}\marg{aardvark}\marg{another}^^J%
\gls{glsxtrcopytoglossary}\marg{zebra}\marg{another}^^J%
\gls{glsxtrcopytoglossary}\marg{ant}\marg{another}^^J%
\gls{glsxtrcopytoglossary}\marg{duck}\marg{another}
}{\gls{printunsrtglossary}^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}}
}
\end{resultbox}

There are some oddities in both lists. It's the \idx{glossarystyle}
that determines the formatting of the entries according to the
entry's \gls{hierarchicallevel}, but it looks strange for the duck
and mallard entries to be indented when they don't follow after
their parent entry.

As the internal loop within \gls{printunsrtglossary} iterates over
each entry, it tries to determine which \idxc{group}{letter group}
the entry belongs to. If it's different from the \idx{group} for the
previous entry (in the same hierarchical level), a \idx{group} header is
added (which may or may not be displayed, depending on the
\idx{glossarystyle}). This means than an unordered list of entries, such as in the
above example, may contain repeated headers.

The way that the \idx{group} is determined depends on whether or not
the \gloskey{group} key has been defined. If it isn't defined (the
default), then the \idx{group} label is obtained from the
\idx{uppercase} character code of the first token of the
\gloskey{sort} key. If the token doesn't have an \idx{uppercase}
character code (indicating that it's not a letter) or if the sort
value is empty then the label will be set to \code{glssymbols}
(which corresponds to the symbol \idx{group}). This is the same way
that \gls{printnoidxglossary} inserts \idxpl{group}.

Remember that if the \gloskey{sort} key hasn't been set, it will be
assigned automatically to the same value as the \gloskey{name} key
(or with \optval{sort}{use} or \optval{sort}{def} to a numerical
value). The \gloskey{sort} key will be empty if you use
\optval{sort}{clear}. The \optval{sort}{none} setting simply skips
the pre-processing of the \gloskey{sort} key (such as sanitizing).

For example, the ant entry doesn't explicitly use the \gloskey{sort}
key, so the sort value is obtained from the \gloskey{name} key,
which is set to \code{ant}. The first token is \qt{a}, which is a
letter. The \idx{group}['s] label is obtained from the letter's
\idx{uppercase} character decimal code (65).  There's no associated
title (which can be assigned with \gls{glsxtrsetgrouptitle}), so the
title is simply \qt{65} (with \opt{stylemods}, see earlier) or
\qt{A} (without \opt{stylemods} or with \gls{glsxtrnoidxgroups}). 

The ant entry is followed by \qt{adder}. The same process determines
that the \qt{adder} \idx{group} label is also 65. There's no
change in the \idx{group} label from the previous entry (ant) so no
header is inserted.

By default, this \idx{group} check is omitted for child entries, which is
why no group header is inserted before duck or mallard. So the next
entry to be checked for a \idx{group} is the zebra entry, which has
the group label 90 (the decimal code for \qt{Z}). Again there's no
title associated with that label so the title is simply the label.

The zebra entry is followed by aardvark which, following the same
process, has the \idx{group} label 65. This is different from
the previous group label (90) so a group header is inserted.
This is why there are two \qt{90} letter \idxpl{group}.

\begin{important}
The \idx{unsrtfam} don't order the entries.
\end{important}

If the \gloskey{group} key has been defined (which is the case with
\opteqvalref{record}{only} and \opteqvalref{record}{nameref}) then
the \idx{group} \emph{label} is obtained from the \gloskey{group}
field. If the \gloskey{group} field is defined but empty then the
entry will belong to the empty group. The value of the
\gloskey{sort} field is now irrelevant.

So, simply adding the \opt{record} option to the above example document will
cause the group headers to disappear. This is because the
\gloskey{group} key will now be defined but is empty for each entry.
Even with a style like \glostyle{bookindex}, there won't be any
\idx{group} headers.

Provided the \gloskey{group} key has been defined, the field used to
store the \idx{group} label is given by:
\cmddef{glsxtrgroupfield}
This expands to \code{group}, by default. However it's possible to
use a different field in which to store the group label, in which
case \gls{glsxtrgroupfield} will need to be redefined.
For example:
\begin{codebox}
\marg{\gls{renewcommand}\marg{\gls{glsxtrgroupfield}}\marg{othergroup}\comment{}
\gls{printunsrtglossary}}
\end{codebox}
or
\begin{codebox}
\gls{printunsrtglossary*}\marg{\comment{}
 \gls{renewcommand}\marg{\gls{glsxtrgroupfield}}\marg{othergroup}}
\end{codebox}
(but this still requires the \gloskey{group} key to be defined, even
if it's not being used to store the \idx{group} label). With
\app{bib2gls}, the \resourceopt{secondary} resource option (combined with
\switch{group}) will store the \idx{group} label obtained from the
secondary sort in the \glosfield{secondarygroup} field and adds the redefinition of
\gls{glsxtrgroupfield} to the associated \idx{glossary} preamble.
This prevents it from clashing with the \gloskey{group} field in
the event that the secondary sort method has produced a different
set of \idxpl{group} (which is likely).

\mExampleref{ex:unsrtcustomgrp} uses \opt{record} to create the
\gloskey{group} key and assigns \idx{group} labels with associated
titles. Note that the \glosfield{secondarygroup} field doesn't have
an associated key, so it needs to be set with a field assignment
command, such as \gls{GlsXtrSetField}.
\newcommand*{\examplegroupsdefs}{%
\gls{glsxtrsetgrouptitle}\marg{group1label}\marg{Group 1}\newline
\gls{glsxtrsetgrouptitle}\marg{group2label}\marg{Group 2}\newline
\gls{glsxtrsetgrouptitle}\marg{group3label}\marg{Group 3}\newline
\gls{glsxtrsetgrouptitle}\marg{group4label}\marg{Group 4}\newline
\codepar
\gls{newglossaryentry}\marg{waterfowl}\marg{\gloskeyval{name}{waterfowl},\nlsp
 \gloskeyval{description}{},\nlsp
 \gloskeyval{group}{group1label}}\nl
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\nlsp
 \gloskeyval{description}{},\nlsp
 \gloskeyval{group}{group1label}}\nl
\gls{GlsXtrSetField}\marg{ant}\marg{\glosfield{secondarygroup}}\marg{group4label}\newline
\gls{newglossaryentry}\marg{adder}\marg{\gloskeyval{name}{adder},\nlsp
 \gloskeyval{description}{},\nlsp
 \gloskeyval{group}{group2label}}\nl
\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},\nlsp
 \gloskeyval{parent}{waterfowl},\newline\space
 \gloskeyval{description}{},\gloskeyval{group}{group4label}}\nl
\gls{GlsXtrSetField}\marg{duck}\marg{\glosfield{secondarygroup}}\marg{group2label}\newline
\gls{newglossaryentry}\marg{zebra}\marg{\gloskeyval{name}{zebra},\nlsp
 \gloskeyval{description}{},\nlsp
 \gloskeyval{group}{group2label}}\nl
\gls{GlsXtrSetField}\marg{zebra}\marg{\glosfield{secondarygroup}}\marg{group3label}\newline
\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},\nlsp
 \gloskeyval{description}{},\nlsp
 \gloskeyval{group}{group2label}}\nl
\gls{GlsXtrSetField}\marg{aardvark}\marg{\glosfield{secondarygroup}}\marg{group1label}\newline
\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\nlsp
 \gloskeyval{description}{},\nlsp
 \gloskeyval{group}{group1label}}\nl
\gls{newglossaryentry}\marg{mallard}\marg{\gloskeyval{name}{mallard},\nlsp
 \gloskeyval{parent}{duck},\gloskeyval{description}{},\nlsp
 \gloskeyval{group}{group2label}}\nl
\gls{GlsXtrSetField}\marg{mallard}\marg{\glosfield{secondarygroup}}\marg{group3label}\nl
\codepar
\gls{newglossary*}\marg{another}\marg{Another Glossary}\nl
\gls{glsxtrcopytoglossary}\marg{mallard}\marg{another}\nl
\gls{glsxtrcopytoglossary}\marg{aardvark}\marg{another}\nl
\gls{glsxtrcopytoglossary}\marg{zebra}\marg{another}\nl
\gls{glsxtrcopytoglossary}\marg{ant}\marg{another}\nl
\gls{glsxtrcopytoglossary}\marg{duck}\marg{another}\nl
\gls{setglossarypreamble}\oarg{another}\nlsp
 \marg{\cmd{renewcommand}\marg{\gls{glsxtrgroupfield}}\marg{secondarygroup}}
}
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},
 \optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra}
\codepar
\examplegroupsdefs
\cbeg{document}
\gls{printunsrtglossary}
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}}
\cend{document}
\end{codebox}
This is essentially mimicking the way that the
\resourceopt{secondary} resource option sets the
\glosfield{secondarygroup} field and adds the redefinition of
\gls{glsxtrgroupfield} to the secondary \idx{glossary}['s] preamble.
(Although in this case, there's no logical order.)

\begin{resultbox}[float]
\createexample*[label={ex:unsrtcustomgrp},
title={Displaying unsorted glossaries with custom groups},
description={Example document that doesn't require any external
indexing and has the group labels explicitly set}]
{\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra}^^J%
\codepar
\examplegroupsdefs
}{\gls{printunsrtglossary}^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}}
}
\end{resultbox}

Note that even though the duck and mallard entries have the
\gloskey{group} and \glosfield{secondarygroup} fields set, there's
no group title for them in either \idx{glossary} because they are
child entries.

\cmddef{glsxtraddgroup}
This command will perform \meta{code} if the entry identified by
\meta{entry-label} should have \idx{group} support (provided the
\gloskey{group} field has been set). The default
definition is:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\comment{}
  \gls{ifglsxtrprintglossflatten}
    \#2\comment{}
  \cmd{else}
    \gls{ifglshasparent}\marg{\#1}\marg{}\marg{\#2}\comment{}
  \cmd{fi}
}
\end{compactcodebox}
This means that only entries that don't have a parent (with
\printglossoptval{flatten}{false}) or any entry
(with \printglossoptval{flatten}{true}) will have the
\idx{group} check performed. With \app{bib2gls}, the
\resourceopt{group-level} \idx{resourceopt} will redefine \gls{glsxtraddgroup} to
always do \meta{code}, which means that all entries will have the
\idx{group} check performed.

\begin{important}
If no group label has been provided no header will be added.
\end{important}

The following hook is used just before the header information is
appended:
\cmddef{printunsrtglossarygrouphook}
The argument is the internal command used to build the group header
(which will then be appended to main internal command containing the
glossary code). This
hook may be redefined to insert any additional code before the
heading.
Use \code{\gls{preto}\#1\margm{content}} if you want to insert
\meta{content} before the header and \code{\gls{appto}\#1\margm{content}}
if you want to insert \meta{content} after the header.
(You can reference the entry label with \gls{glscurrententrylabel} and the
current \idx{hierarchicallevel} with \gls{glscurrententrylevel} but
make sure they are expanded if they occur in \meta{content}.) For example,
\gls{printunsrttable} redefines this hook to finish off the current
row before the \idx{group} header is added.

\mExampleref{ex:unsrtcustomsubgrp} is a modification of the
above document that shows the sub-\idx{group} headings:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\#2}
\gls{printunsrtglossary}
\cmd{renewcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\comment{}
  \cmd{ifnum}\gls{glscurrententrylevel}<2 \#2\cmd{fi}}
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}}
\end{codebox}

\begin{resultbox}[float]
\createexample*[label={ex:unsrtcustomsubgrp},
title={Displaying unsorted glossaries with custom groups and sub-group headings},
description={Example document that doesn't require any external
indexing and has the group labels explicitly set with sub-group
headings}]
{\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra}^^J%
\codepar
\examplegroupsdefs
}{\cmd{renewcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\#2}^^J%
\gls{printunsrtglossary}^^J%
\cmd{renewcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\%^^J
  \cmd{ifnum}\gls{glscurrententrylevel}<2 \#2\cmd{fi}^^J%
}^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}}
}
\end{resultbox}

Note that the mallard entry (which has \idx{hierarchicallevel}~2) has its
group shown in the first \idx{glossary} (where the group is formed
for all levels) but not in the second \idx{glossary} (where the
redefinition of \gls{glsxtraddgroup} restricts \idx{group} formation to
just level~0 and level~1).

There's a small visual distinction between the \idx{group} titles in
different \idxpl{hierarchicallevel} in the above. The top-level
(level~0) groups have the title centred, whereas the sub-groups have
their titles indented by the same amount as the corresponding
sub-entries. This is due to the \idx{glossarystyle}. Other styles
may use the same formatting for all \idxpl{hierarchicallevel}.

The \idxpl{glossarystyle} provided with \sty{glossaries-extra} and
the base styles patched by \sty{glossaries-extra-stylemods} all
redefine:
\cmddef{glssubgroupheading}
to format the sub-group headings in a manner applicable to the style.
For example, styles that don't show sub-entry names typically
redefine this command to do nothing.

A default definition that simply does
\code{\gls{glsgroupheading}\margm{group-label}} is automatically
initialised by \gls{setglossarystyle} (via
\gls{glsxtrpreglossarystyle}) to allow for styles that don't
redefine this command. The first two arguments refer to the
\idx{hierarchicallevel}, where \meta{previous level} is the level of
the previous \idx{group} and \meta{level} is the level of this new
sub-\idx{group}. The \meta{parent-label} is the label of the current
entry's parent, where the current entry is the first entry of the
sub-\idx{group} that immediately follows the heading.

The \glostyle{bookindex} style defines \gls{glssubgroupheading} to
use the style's associated command
\gls{glsxtrbookindexformatsubheader}. This can be redefined as
required. For example, the following uses the parent entry's
hierarchical information:
\begin{codebox}[before upper app=\small]
\cmd{renewcommand}*\marg{\gls{glsxtrbookindexformatsubheader}}[5]\marg{\comment{}
 \cmd{ifnum}\#2>1\gls{relax}
  \gls{glstreesubsubitem}
   \gls{glstreegroupheaderfmt}\marg{\gls{GlsXtrhiername}\marg{\#3} / \#5}\comment{}
 \cmd{else}
  \gls{glstreesubitem}
   \gls{glstreegroupheaderfmt}\marg{\gls{GlsXtrhiername}\marg{\#3} / \#5}\comment{}
 \cmd{fi}
}
\end{codebox}

The above examples are contrived and demonstrate the need to define
entries in a sensible order to achieve a sensible \idx{glossary}
with \gls{printunsrtglossary}. If you want to use this approach to
display a \idx{glossary}, you would need to make sure that you
take care with the order that you define entries. This can be quite
tedious for a large number of entries.

\mExampleref{ex:bib2glsgrp} instead uses \app{bib2gls}. This means
that the entry data needs to be provided in a
\ext{bib} file. For example, the file \filefmt{animalfamilies.bib} might
contain:
\newcommand*{\examplegroupsbibdefs}{%
\atentry{index}\marg{waterfowl,\gloskeyval{user1}{Anseriformes}}\newline
\atentry{index}\marg{ant,\gloskeyval{user1}{Formicidae}}\newline
\atentry{index}\marg{adder,\gloskeyval{user1}{Vipera berus}}\newline
\atentry{index}\marg{duck,\gloskeyval{parent}{waterfowl},\gloskeyval{user1}{Anatidae}}\newline
\atentry{index}\marg{zebra,\gloskeyval{user1}{Hippotigris}}\newline
\atentry{index}\marg{aardvark,\gloskeyval{user1}{Orycteropus
afer}}\newline
\atentry{index}\marg{gazelle,\gloskeyval{user1}{Gazella}}\newline
\atentry{index}\marg{mallard,\gloskeyval{parent}{duck},\gloskeyval{user1}{Anas platyrhynchos}}
}
\begin{codebox}
\examplegroupsbibdefs
\end{codebox}
I've included some additional information stored in the
\gloskey{user1} field that wasn't in the earlier examples.  The
document needs to use the \opt{record} option and
\gls{GlsXtrLoadResources} in order for it to work properly with
\app{bib2gls}:
\begin{codebox}
\cmd{usepackage}
 \oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{bookindex}}
 \marg{glossaries-extra}
\gls{newglossary*}\marg{another}\marg{Another Glossary}
\gls{GlsXtrLoadResources}\oarg{
 \resourceoptval{selection}{all},\comment{select all entries}
 \resourceoptvalm{src}{animalfamilies},\comment{identify bib file(s)}
 \resourceoptval{sort}{en-GB},\comment{sort method}
 \resourceoptvalm{secondary}{la:user1:another}\comment{sort by \gloskey{user1} (Latin) \& copy to `another'}
}
\gls{glsdefpostname}\marg{\cat{index}}\marg{ 
 (\cmd{emph}\marg{\gls{glsentryuseri}\marg{\gls{glscurrententrylabel}}})}
\cbeg{document}
\gls{printunsrtglossary}
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}}
\cend{document}
\end{codebox}
If this code is saved in the file \filefmt{myDoc.tex} then the build
process is now:
\begin{terminal}
pdflatex myDoc
bib2gls \switch{group} myDoc
pdflatex myDoc
\end{terminal}
The \switch{group} (or \switch{g}) switch is important as it
instructs \app{bib2gls} to set the \gloskey{group} field for the
primary sort and the \glosfield{secondarygroup} for the secondary
sort. The primary sort will sort entries according to \code{en-GB}
(British English). This can simply be set to \code{en} without a
region. The secondary sort will resort the entries, but this time
according to \code{la} (Latin) using the \gloskey{user1} key as the
sort value. The entry labels will then be copied to the custom
\code{another} glossary.

The \ext{glstex} file created by \app{bib2gls} (which will then be
input by \gls{GlsXtrLoadResources} on the subsequent \LaTeX\ run)
essentially contains the following code:
\begin{codebox}
\gls{glsxtrsetgrouptitle}\marg{6881280}\marg{W}
\gls{glsxtrsetgrouptitle}\marg{5832704}\marg{G}
\gls{glsxtrsetgrouptitle}\marg{5373952}\marg{A}
\gls{glsxtrsetgrouptitle}\marg{7077888}\marg{Z}
\gls{glsxtrsetgrouptitle}\marg{another5373952}\marg{A}
\gls{glsxtrsetgrouptitle}\marg{another5767168}\marg{F}
\gls{glsxtrsetgrouptitle}\marg{another6356992}\marg{O}
\gls{glsxtrsetgrouptitle}\marg{another5898240}\marg{H}
\gls{glsxtrsetgrouptitle}\marg{another6815744}\marg{V}
\gls{glsxtrsetgrouptitle}\marg{another5832704}\marg{G}
\codepar
\gls{longnewglossaryentry*}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},
 \gloskeyval{user1}{Orycteropus afer},\gloskeyval{group}{5373952}}\marg{}
\gls{longnewglossaryentry*}\marg{adder}\marg{\gloskeyval{name}{adder},
 \gloskeyval{user1}{Vipera berus},\gloskeyval{group}{5373952}}\marg{}
\gls{longnewglossaryentry*}\marg{ant}\marg{\gloskeyval{name}{ant},
 \gloskeyval{user1}{Formicidae},\gloskeyval{group}{5373952}}\marg{}
\gls{longnewglossaryentry*}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},
 \gloskeyval{user1}{Gazella},\gloskeyval{group}{5832704}}\marg{}
\gls{longnewglossaryentry*}\marg{waterfowl}\marg{\gloskeyval{name}{waterfowl},
 \gloskeyval{user1}{Anseriformes},\gloskeyval{group}{6881280}}\marg{}
\gls{longnewglossaryentry*}\marg{duck}\marg{\gloskeyval{name}{duck},
 \gloskeyval{parent}{waterfowl},\gloskeyval{user1}{Anatidae},\gloskeyval{group}{}}\marg{}
\gls{longnewglossaryentry*}\marg{mallard}\marg{\gloskeyval{name}{mallard},
 \gloskeyval{parent}{duck},\gloskeyval{user1}{Anas platyrhynchos},\gloskeyval{group}{}}\marg{}
\gls{longnewglossaryentry*}\marg{zebra}\marg{\gloskeyval{name}{zebra},
 \gloskeyval{user1}{Hippotigris},\gloskeyval{group}{7077888}}\marg{}
\codepar
\gls{apptoglossarypreamble}\oarg{another}
 \marg{\cmd{renewcommand}\marg{\gls{glsxtrgroupfield}}\marg{\glosfield{secondarygroup}}}
\gls{glsxtrcopytoglossary}\marg{waterfowl}\marg{another}
\gls{GlsXtrSetField}\marg{waterfowl}\marg{\glosfield{secondarygroup}}\marg{another5373952}
\gls{glsxtrcopytoglossary}\marg{duck}\marg{another}
\gls{glsxtrcopytoglossary}\marg{mallard}\marg{another}
\gls{glsxtrcopytoglossary}\marg{ant}\marg{another}
\gls{GlsXtrSetField}\marg{ant}\marg{\glosfield{secondarygroup}}\marg{another5767168}
\gls{glsxtrcopytoglossary}\marg{gazelle}\marg{another}
\gls{GlsXtrSetField}\marg{gazelle}\marg{\glosfield{secondarygroup}}\marg{another5832704}
\gls{glsxtrcopytoglossary}\marg{zebra}\marg{another}
\gls{GlsXtrSetField}\marg{zebra}\marg{\glosfield{secondarygroup}}\marg{another5898240}
\gls{glsxtrcopytoglossary}\marg{aardvark}\marg{another}
\gls{GlsXtrSetField}\marg{aardvark}\marg{\glosfield{secondarygroup}}\marg{another6356992}
\gls{glsxtrcopytoglossary}\marg{adder}\marg{another}
\gls{GlsXtrSetField}\marg{adder}\marg{\glosfield{secondarygroup}}\marg{another6815744}
\end{codebox}

It's more complicated than this as helper commands are provided to
make it easier to customize and the entries will all have
\gloskeyval{category}{index} since they were defined with
\atentry{index}, but this is basically like the preamble in the
earlier examples, except that the ordering and \idxpl{group} are
more logical.

\begin{resultbox}[float]
\createexample*[label={ex:bib2glsgrp},
arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop},
title={Displaying sorted glossaries with groups using \appfmt{bib2gls}},
description={Example document that uses bib2gls to created a two
differently sorted lists with the same entries}]
{\cbeg{filecontents*}{animalfamilies.bib}^^J%
\examplegroupsbibdefs^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{bookindex}}\marg{glossaries-extra}^^J%
\gls{newglossary*}\marg{another}\marg{Another Glossary}^^J%
\gls{GlsXtrLoadResources}\oarg{\resourceoptval{selection}{all},\comment{select all entries}
 \resourceoptvalm{src}{animalfamilies},\comment{identify bib file(s)}
 \resourceoptval{sort}{en-GB},\comment{sort method}
 \resourceoptvalm{secondary}{la:user1:another}\comment{sort again and copy to `another'}
}^^J%
\gls{glsdefpostname}\marg{index}\marg{ ^^J
 (\cmd{emph}\marg{\gls{glsentryuseri}\marg{\gls{glscurrententrylabel}}})}
}{\gls{printunsrtglossary}^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}}
}
\end{resultbox}

Note that in \exampleref{ex:bib2glsgrp} the \gloskey{group} and \glosfield{secondarygroup} fields
haven't been set for the child entries (duck and mallard). This is
the default behaviour and it means that regardless of the definition
you provide for \gls{glsxtraddgroup}, sub-groups won't be displayed.
If you want those fields set for child entries, you need to use the
\resourceopt{group-level} resource option. For example:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{
 \resourceoptval{selection}{all},\comment{select all entries}
 \strong{\resourceoptvalm{group-level}{<=1},\comment{\idxc{hierarchicallevel}{level}~0 and 1}}
 \resourceoptvalm{src}{animalfamilies},\comment{identify bib file(s)}
 \resourceoptval{sort}{en-GB},\comment{sort method}
 \resourceoptvalm{secondary}{la:user1:another}\comment{sort again and copy}
}
\end{codebox}

This will add support for level~0 (no parent) and level~1 (parent
but no grandparent) entries. Deeper levels won't have support. 
The \switch{group} switch is still required.

\subsection{Location Lists}
\label{sec:printunsrtlocations}

The \idx{unsrtfam} check for the existence of the \gloskey{location}
and \glosfield{loclist} keys. These are both defined by the \opt{record}
option. (The \glosfield{loclist} field is also used by
\gls{makenoidxglossaries} but isn't defined as a key.)

The \gloskey{location} field (if set) should contain the formatted
\idx{locationlist}. This is checked first and used if not empty.
Otherwise the \glosfield{loclist} field (if set) is used, but that
will use the same method as \gls{printnoidxglossary} to format,
which doesn't compact consecutive locations.

It's possible to choose a different field for the formatted
\idx{locationlist} by redefining:
\cmddef{GlsXtrLocationField}
This should expand to the \idx{internalfieldlabel}. If the field is
not the default \gloskey{location} then the test for
\glosfield{loclist} is omitted.

Whichever field is used, the formatted \idx{locationlist} is passed
to the appropriate \idx{glossarystyle} command (\gls{glossentry} or
\gls{subglossentry}) encapsulated with \gls{glossaryentrynumbers}.

If there's no location field or if the tested fields are empty, then
an empty argument (with no \gls{glossaryentrynumbers} encapsulator)
is passed to the \idx{glossarystyle} command. In this case, the
\opt{nonumberlist} option is redundant as there's no
\idx{locationlist} to suppress.

\subsection{Advanced Commands}
\label{sec:printunsrtadvanced}

To provide a better understanding of how filtered and inner glossaries work, it’s
useful to understand the difference between \gls{printglossary} (used
with \app{makeindex} and \app{xindy}) and \gls{printunsrtglossary} (used with
\app{bib2gls}).

In the first case, \app{makeindex} or \app{xindy} is used to create a file that
contains content in the form:
\begin{codebox}[before upper app=\small]
\gls{glossarysection}\oarg{\gls{glossarytoctitle}}\marg{\gls{glossarytitle}}\comment{}
\gls{glossarypreamble}
\cbeg{\env{theglossary}}\gls{glossaryheader}
\meta{content}
\cend{\env{theglossary}}\gls{glossarypostamble}
\end{codebox}
where \meta{content} contains lines such as:
\begin{codebox}
\gls{glsgroupheading}\margm{group label}\gls{relax} \gls{glsresetentrylist}
\gls{glossentry}\margm{entry label}\margm{location list}\comment{}
\gls{subglossentry}\margm{level}\margm{entry label}\margm{location list}\comment{}
\end{codebox}

The \idx{group} headings (see \sectionref{sec:printunsrtgroups}) are
typeset using \gls{glsgroupheading}. 
Top-level entries are typeset with \gls{glossentry} and child
entries are typeset with \gls{subglossentry} where \meta{level} indicates the
\idx{hierarchicallevel}. Both \app{makeindex} and \app{xindy} order the items so that
the child entries are placed immediately after the corresponding
parent entry.

The \gls{printglossary} command essentially does:
\begin{codebox}
\meta{Set default title and style.}
\cmd{bgroup}
  \meta{Initial setup.}
  \meta{Input the file created by \app{makeindex} or \app{xindy}.}
\cmd{egroup}
\end{codebox}

The initial setup part sets the \idx{glossarystyle} (which
determines the definitions of \env{theglossary},
\gls{glossaryheader}, \gls{glsgroupheading}, \gls{glossentry} and
\gls{subglossentry}), assigns the title (\gls{glossarytitle} and
\gls{glossarytoctitle}) and defines \gls{currentglossary}. (There is
some other stuff done both before and after the file is input, but
that's not relevant here.)

In the case of \app{bib2gls}, there isn't a glossary file to input.
Instead, \app{bib2gls} is used to create a file that contains the
entry definitions, which is input in the document preamble (via
\gls{GlsXtrLoadResources}). The entries are defined in the required
order and use internal \idxpl{field} to store the indexing
information (such as the \idx{group} label and
\idxpl{locationlist}). Now \gls{printunsrtglossary} is used to
display the glossary, which essentially does:
\begin{codebox}
\meta{Set default title and style.}
\cmd{bgroup}
  \meta{Initial setup.}
  \gls{glossarysection}
   \oarg{\gls{glossarytoctitle}}\marg{\gls{glossarytitle}}\comment{}
  \gls{glossarypreamble}
  \meta{Construct internal control sequence containing glossary content.}
  \meta{Expand internal control sequence.}
  \gls{glossarypostamble}
\cmd{egroup}
\end{codebox}

The \meta{initial setup} is the same as for \gls{printglossary}. The key
difference here is that there's no file containing the typeset
\idx{glossary} that can be simply input. Instead it's necessary to iterate
over the \idx{glossary}['s] internal label list. Some of the
\idxpl{glossarystyle} use a \env{tabular}-like
environment (such as \env{longtable}, which is used by the
\glostyle{long} styles).
It's always problematic having a loop inside a \env{tabular} context so
\gls{printunsrtglossary} by-passes the problem by moving the loop outside
of the \env{theglossary} environment. The command iterates over all
entry labels (in the order in which they were added to the
\idx{glossary}) and constructs an internal control sequence
(\inlineglsdef{@glsxtr@doglossary}), which ends up
containing:
\begin{codebox}
\cbeg{\env{theglossary}}\gls{glossaryheader}
\meta{begin code}
\meta{content}
\meta{end code}
\cend{\env{theglossary}}
\end{codebox}

\begin{warning}
Note that \gls{glsresetentrylist} has been removed in v1.50 since
it's generally unnecessary with \app{bib2gls} and causes
interference with tabular styles.
\end{warning}

The \meta{begin code} can be inserted just after
\code{\cbeg{theglossary}} by the command:
\cmddef{printunsrtglossarypostbegin}
This does nothing by default (so \meta{begin code} will be omitted).
If you still need to have \gls{glsresetentrylist} at the start, you
can redefine this hook as follows:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{printunsrtglossarypostbegin}}[1]\marg{\comment{}
 \gls{appto}\#1\marg{\gls{glsresetentrylist}}\comment{}
}
\end{codebox}

The \meta{end code} can be inserted just before
\code{\cend{theglossary}} by the command:
\cmddef{printunsrtglossarypreend}
This does nothing by default (so \meta{end code} will be omitted).
(These two hooks are only used in \gls{printunsrtglossary} not in
by \gls{printunsrtinnerglossary} or \env{printunsrtglossarywrap}.)
For example,
\gls{printunsrttable} redefines the end hook to finish off the final
row.

In both hooks, the argument will be \gls{@glsxtr@doglossary} and, in
both cases, you need to use \gls{appto} within the definition in order
to insert \meta{begin code} and \meta{end code} in the correct place.
If you use \gls{preto}, the code will end up at the start, before
\code{\cbeg{theglossary}}

The \meta{content} in this case is different as it doesn't
explicitly contain \gls{glossentry} and \gls{subglossentry} but
instead uses an internal handler that just takes the entry label as
the argument. The \code{\gls{glsgroupheading}\margm{group label}}
command is inserted whenever a top-level entry has the group field
set to a label that's different to the previous top-level entry’s
group field (and, if supported, sub-groups are similarly inserted
with \gls{glssubgroupheading}, see
\sectionref{sec:printunsrtgroups}).  So the content is in the form:
\begin{codebox}
\gls{glsgroupheading}\margm{group label}\comment{}
\cmd{\meta{internal cs handler}}\margm{entry label}\comment{}
\cmd{\meta{internal cs handler}}\margm{entry label}\comment{}
\ldots
\gls{glsgroupheading}\margm{group label}\comment{}
\cmd{\meta{internal cs handler}}\margm{entry label}\comment{}
\cmd{\meta{internal cs handler}}\margm{entry label}\comment{}
\ldots
\end{codebox}

There are hooks and commands available for use within those
hooks that may be adjusted to customize the way the \idx{glossary}
is displayed. These are described below.

At each iteration (while the \idx{glossary} content is being 
constructed), the following steps are performed:
\begin{enumerate}
\item Store the current entry label in \gls{glscurrententrylabel}.

\item If \gls{glscurrententrylabel} is empty, skip this iteration.

\item Define placeholder commands:
\cmddef{glscurrententrylevel}
This is set to the current entry's \idx{hierarchicallevel} (taking
\printglossopt{leveloffset} and \printglossopt{flatten} options
into account);
\cmddef{glscurrenttoplevelentry}
This is set to the current entry label if \gls{glscurrententrylevel}
is 0 (that is, it expands to the most recent top-level entry,
allowing for \printglossopt{flatten} and \printglossopt{leveloffset});
\cmddef{glscurrentrootentry}
This is set to the current entry label if
\printglossoptval{flatten}{true} or if the current entry doesn't have
a parent (that is, it expands to the most recent top-level entry,
allowing for \printglossopt{flatten} but not \printglossopt{leveloffset}).

\item Perform the entry process hook:
\cmddef{printunsrtglossaryentryprocesshook}
This does nothing by default. Within the definition of this hook,
you may use:
\cmddef{printunsrtglossaryskipentry}
This will cause the remainder of the current iteration to be
skipped, which will prevent the current entry from being shown in
the \idx{glossary}.

\item If \printglossoptval{groups}{true}, use \gls{glsxtraddgroup}
(see \sectionref{sec:printunsrtgroups}) to append the top-level group heading
(\gls{glsgroupheading}) or the sub-group heading
(\gls{glssubgroupheading}) to \gls{@glsxtr@doglossary}.

\item Perform the pre-entry process hook:
\cmddef{printunsrtglossarypreentryprocesshook}
The argument will be \gls{@glsxtr@doglossary}. This may be used to
insert any additional content before the entry (use
\code{\gls{appto}\#1\margm{content}}). (The
entry label can be referenced with \gls{glscurrententrylabel} but
make sure it's expanded if it occurs in \meta{content}.) For example,
\gls{printunsrttable} redefines this hook to insert \sym{amp} and
\gls{tabularnewline} between blocks.

\item Append
\code{\cmd{\meta{internal cs handler}}\margm{entry label}} to \gls{@glsxtr@doglossary}.

\item Perform the post-entry process hook:
\cmddef{printunsrtglossarypostentryprocesshook}
The argument will be \gls{@glsxtr@doglossary}. This may be used to
append any additional content after the entry (use
\code{\gls{appto}\#1\margm{content}}). (The
entry label can be referenced with \gls{glscurrententrylabel} but
make sure it's expanded if it occurs in \meta{content}.) For example,
\gls{printunsrttable} redefines this hook to reset the block index
if the end of a row has been reached.

\end{enumerate}

\begin{warning}
The placeholders \gls{glscurrenttoplevelentry} and
\gls{glscurrentrootentry} may not be an ancestor of the current
entry. For example, if the \idx{glossary} doesn't have child entries
immediately following their parent entry.
\end{warning}

Once the \idx{glossary} construction (\gls{@glsxtr@doglossary}) has been completed, the
following hook is performed:
\cmddef{printunsrtglossarypredoglossary}
This does nothing by default. You can redefine this to show the
definition of \gls{@glsxtr@doglossary} for debugging purposes:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{printunsrtglossarypredoglossary}}\marg{\comment{}
 \cmd{csshow}\marg{@glsxtr@doglossary}}
\end{codebox}
This will interrupt the \LaTeX\ run and display the definition in the
transcript.

The handler command \code{\cmd{\meta{internal cs handler}}} performs
the following:
\begin{codebox}
\cmd{protected@xdef}\gls{glscurrententrylabel}\margm{entry-label}\comment{}
\gls{printunsrtglossaryhandler}\gls{glscurrententrylabel}
\end{codebox}
This stores the entry's label in \gls{glscurrententrylabel} (which
allows it to be referenced in style hooks, such as the
\idx{postnamehook} or \idx{postdeschook}). Note that it uses a
global definition to avoid scoping issues caused with
\env{tabular}-like styles. The main handling of the
entry is performed by:
\cmddef{printunsrtglossaryhandler}
This is simply defined to use:
\cmddef{glsxtrunsrtdo}
This displays the entry according to the current
\idx{glossarystyle}, taking the \idx{hierarchicallevel} into account
(as given by \gls{glscurrententrylevel}).

The following are additional commands that may be useful in the
above hooks.
\cmddef{glsxtriflabelinlist}
Does \meta{true} if the given label is in the given comma-separated
list of labels, otherwise does \meta{false}. The label and list are fully
expanded.

\cmddef{ifglsxtrprintglossflatten}
This conditional is set by the \printglossopt{flatten} option and
can be used to test if the option has been set.

\mExampleref{ex:filterbycat} skips all entries that have the
\gloskey{category} set to \cat{symbol}:
\begin{codebox}[before upper app=\small]
\cmd{usepackage}\oarg{\optval{style}{index}}\marg{glossaries-extra}
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}
\gls{newglossaryentry}\marg{pi}\marg{
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{pi}}},\gloskeyval{description}{}, 
 \gloskeyval{category}{symbol}}
\gls{newglossaryentry}\marg{aardvark}\marg{
 \gloskeyval{name}{aardvark},\gloskeyval{description}{}}
\gls{newglossaryentry}\marg{alpha}\marg{
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},\gloskeyval{description}{}, 
 \gloskeyval{category}{symbol}}
\cbeg{document}
\cmd{renewcommand}\marg{\gls{printunsrtglossaryentryprocesshook}}\oarg{1}\marg{\comment{}
 \gls{glsifcategory}\marg{\#1}\marg{symbol}\comment{}
 \marg{\gls{printunsrtglossaryskipentry}}\comment{}
 \marg{}\comment{}
}
\gls{printunsrtglossary}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Filtering by category},
 label={ex:filterbycat},
description={Example document that displays a glossary with entries
filtered by category}]
{\cmd{usepackage}\oarg{\optval{style}{index}}\marg{glossaries-extra}^^J
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J
\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{pi}}},\gloskeyval{description}{},^^J
 \gloskeyval{category}{symbol}}^^J%
\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},\gloskeyval{description}{}}
}{\cmd{renewcommand}\marg{\gls{printunsrtglossaryentryprocesshook}}\oarg{1}\marg{\%^^J
 \gls{glsifcategory}\marg{\#1}\marg{symbol}\%^^J
 \marg{\gls{printunsrtglossaryskipentry}}\%^^J
 \marg{}\%^^J
}^^J%
\gls{printunsrtglossary}
}
\end{resultbox}

\subsubsection{Inner Glossaries}
\label{sec:printunsrtinner}

\begin{information}
See also \gallerypage{bib2gls-inner}{Gallery: Inner or Nested Glossaries}.
\end{information}

It's possible you may want to combine multiple \idxpl{glossary}
sequentially, as sub-blocks of a single list. The inner part of
\gls{printunsrtglossary} can be created with:
\cmddef{printunsrtinnerglossary}
This can't be used on its own, as it only forms a fragment. It
doesn't include the section header, style
initialisation, preamble, \env{theglossary} environment, header and
postamble.

As with \gls{printunsrtglossary}, \gls{printunsrtinnerglossary}
constructs an internal control sequence containing the content, but
it adds scoping to localise the effects of any supplied options. So
it essentially does:
\begin{codebox}
\cmd{begingroup}
  \meta{Initial setup (process options).}
  \meta{pre-code}
  \meta{Construct internal control sequence containing glossary content.}
  \meta{Expand internal control sequence.}
  \meta{post-code}
\cmd{endgroup}
\end{codebox}

There are two ways this command may be used.
\envdef{printunsrtglossarywrap}
The \env{printunsrtglossarywrap} environment takes one optional
argument that uses the same keys as \gls{printunsrtglossary} (see
\sectionref{sec:printglossopts}). Note that in this case the
\printglossopt{type} key simply provides a title (if one has been assigned to that
\idx{glossary}). It doesn't indicate the content. There's no point
using both \printglossopt{type} and \printglossopt{title}.

The start of the environment sets up the glossary style and does the header:
\begin{codebox}
\meta{Set default title and style.}
\meta{Initial setup.}
\gls{glossarysection}
 \oarg{\gls{glossarytoctitle}}\marg{\gls{glossarytitle}}\comment{}
\gls{glossarypreamble}
\cbeg{\env{theglossary}}\gls{glossaryheader}\gls{glsresetentrylist}
\end{codebox}
The end of this wrapper environment ends \env{theglossary} and does the postamble:
\begin{codebox}
\cend{\env{theglossary}}\gls{glossarypostamble}
\end{codebox}
Note that the \gls{printunsrtglossarypostbegin}, \gls{printunsrtglossarypreend} and
\gls{printunsrtglossarypredoglossary} hooks aren't used.

\mExampleref{ex:unsrtwrap} has two \idxpl{glossary} but displays
them as inner \idxpl{glossary}:
\begin{codebox}[before upper app=\small]
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}
\gls{newglossaryentry}\marg{bee}\marg{\gloskeyval{name}{bee},\gloskeyval{description}{}}
\gls{newignoredglossary*}\marg{other}
\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},\gloskeyval{description}{}}
\gls{newglossaryentry}\marg{goose}\marg{\gloskeyval{name}{goose},\gloskeyval{description}{}}
\cbeg{document}
\cbeg{\env{printunsrtglossarywrap}}\oarg{\printglossoptval{style}{index}}
\gls{glstreeitem} First Glossary
\gls{printunsrtinnerglossary}\oarg{\printglossoptval{leveloffset}{1}}\marg{}\marg{}
\gls{glstreeitem} Second Glossary
\gls{printunsrtinnerglossary}\oarg{\printglossoptval{type}{other},\printglossoptval{leveloffset}{1}}\marg{}\marg{}
\cend{\env{printunsrtglossarywrap}}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Inner glossaries using \envfmt{printunsrtglossarywrap}},
 label={ex:unsrtwrap},
description={Example document illustrating two inner glossaries offset
by 1 level}]
{\cmd{usepackage}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{bee}\marg{\gloskeyval{name}{bee},\gloskeyval{description}{}}^^J%
\gls{newignoredglossary*}\marg{other}^^J%
\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{type}{other},\gloskeyval{name}{duck},\gloskeyval{description}{}}^^J%
\gls{newglossaryentry}\marg{goose}\marg{\gloskeyval{type}{other},\gloskeyval{name}{goose},\gloskeyval{description}{}}
}{\cbeg{\env{printunsrtglossarywrap}}\oarg{\printglossoptval{style}{index}}^^J%
\gls{glstreeitem} First Glossary^^J%
\gls{printunsrtinnerglossary}\oarg{\printglossoptval{leveloffset}{1}}\marg{}\marg{}^^J%
\gls{glstreeitem} Second Glossary^^J%
\gls{printunsrtinnerglossary}\oarg{\printglossoptval{type}{other},\printglossoptval{leveloffset}{1}}\marg{}\marg{}^^J%
\cend{\env{printunsrtglossarywrap}}
}
\end{resultbox}

The other way that \gls{printunsrtinnerglossary} can be used is
within \gls{printunsrtglossary}.
The handler function described in \sectionref{sec:printunsrtadvanced} that's used to
process each entry to be displayed in the \idx{glossary}, is
defined as:
\begin{codebox}
\cmd{newcommand}\marg{\gls{printunsrtglossaryhandler}}[1]\marg{\comment{}
 \gls{glsxtrunsrtdo}\marg{\#1}}
\end{codebox}
It's possible to redefine this handler command so that it also displays an inner
glossary. 

\mExampleref{ex:nested} has the terms \qt{pictograph} and
\qt{Greek symbol} in the \code{main} glossary. Two
\idxpl{ignoredglossary} are created (which don't require a title)
where the \idx{glossary} label matches an entry label in the
\code{main} \idx{glossary}.
\begin{codebox}[before upper app=\small]
\cmd{usepackage}\marg{fontawesome}
\cmd{usepackage}\oarg{\optval{style}{\glostyle{tree}}}\marg{glossaries-extra}
\gls{newglossaryentry}\marg{pictograph}\marg{\gloskeyval{name}{pictograph},
 \gloskeyval{description}{picture or symbol representing a word
or phrase}}
\gls{newglossaryentry}\marg{mathgreek}\marg{\gloskeyval{name}{Greek symbol},
 \gloskeyval{description}{mathematical constants or functions}}
\gls{newignoredglossary*}\marg{pictograph}
\gls{newignoredglossary*}\marg{mathgreek}
\gls{newglossaryentry}\marg{cut}\marg{\gloskeyval{type}{pictograph},
 \gloskeyval{name}{\cmd{faCut}},
 \gloskeyval{description}{cut}}
\gls{newglossaryentry}{paste}\marg{\gloskeyval{type}{pictograph},
\gloskeyval{name}{\cmd{faPaste}},
 \gloskeyval{description}{paste}}
\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{type}{mathgreek},
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},
 \gloskeyval{description}{alpha}}
\gls{newglossaryentry}\marg{beta}\marg{\gloskeyval{type}{mathgreek},
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{beta}}},
 \gloskeyval{description}{beta}}
\cbeg{document}
\cmd{newcommand}\marg{\cmd{nestedhandler}}[1]\marg{\comment{}
 \gls{glsxtrunsrtdo}\marg{\#1}\comment{}
 \gls{ifglossaryexists}*\marg{\#1}\comment{}
 \marg{\comment{}
   \gls{printunsrtinnerglossary}\oarg{\printglossoptvalm{type}{\#1},
    \printglossoptvalm{leveloffset}{++1},\printglossoptval{groups}{false}}\marg{}\marg{}\comment{}
 }\comment{}
 {}\comment{}
}
\gls{printunsrtglossary*}\marg{\comment{}
 \cmd{let}\gls{printunsrtglossaryhandler}\cmd{nestedhandler}}
\cend{document}
\end{codebox}

This creates a custom command \csfmt{nestedhandler} that can be used as the handler to
create nested \idxpl{glossary}. After each item in the glossary, if
the entry's label matches the label of a defined glossary, that
glossary is displayed with its \idx{hierarchicallevel} incremented
by 1, which creates the illusion of child entries.

\begin{resultbox}
\createexample*[label={ex:nested},
 title={Nested glossaries},
 description={Example document with a glossary that has inner glossaries}]
{%
\cmd{usepackage}\marg{fontawesome}^^J%
\cmd{usepackage}\oarg{\optval{style}{\glostyle{tree}}}\marg{glossaries-extra}^^J%
\gls{newglossaryentry}\marg{pictograph}\marg{\gloskeyval{name}{pictograph},^^J
 \gloskeyval{description}{picture or symbol representing a word or
phrase}}^^J%
\gls{newglossaryentry}\marg{mathgreek}\marg{\gloskeyval{name}{Greek
symbol},^^J
 \gloskeyval{description}{mathematical constants or functions}}^^J%
\gls{newignoredglossary*}\marg{pictograph}^^J%
\gls{newignoredglossary*}\marg{mathgreek}^^J%
\gls{newglossaryentry}\marg{cut}\marg{\gloskeyval{type}{pictograph},^^J
 \gloskeyval{name}{\cmd{faCut}},^^J
 \gloskeyval{description}{cut}}^^J%
\gls{newglossaryentry}{paste}\marg{\gloskeyval{type}{pictograph},^^J
\gloskeyval{name}{\cmd{faPaste}},
 \gloskeyval{description}{paste}}^^J%
\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{type}{mathgreek},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},^^J
 \gloskeyval{description}{alpha}}^^J%
\gls{newglossaryentry}\marg{beta}\marg{\gloskeyval{type}{mathgreek},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{beta}}},^^J
 \gloskeyval{description}{beta}}
}{%
\cmd{newcommand}\marg{\cmd{nestedhandler}}[1]\marg{\%^^J
  \gls{glsxtrunsrtdo}\marg{\#1}\%^^J
  \gls{ifglossaryexists}*\marg{\#1}\%^^J
  \marg{\%^^J
    \gls{printunsrtinnerglossary}\oarg{\printglossoptvalm{type}{\#1},\printglossoptvalm{leveloffset}{++1},\printglossoptval{groups}{false}}\marg{}\marg{}\%^^J
  }\%^^J
  {}\%^^J%
}^^J%
\gls{printunsrtglossary*}\marg{\cmd{let}\gls{printunsrtglossaryhandler}\cmd{nestedhandler}}
}
\end{resultbox}

\subsubsection{Per-Unit Glossaries}
\label{sec:printunsrtunit}

If you are using \app{bib2gls} then it's possible to only list
entries that match a particular counter value. For example, you may
want a \idx{mini-glossary} at the start of a section that only lists the
entries that have been \recorded\ in that section. This can be done
by using the handler to skip entries that don't have a matching
record. It can also be implemented with record counting, as shown in
\exampleref{ex:recordcountminigloss} in \sectionref{sec:recordcount}.

It's also possible to make each \idx{indexing} instance automatically
make a note of a particular counter using:
\cmddef{GlsXtrRecordCounter}
(This doesn't correspond to a \app{bib2gls} \record. That's dealt
with by the indexing that comes first.)

This command may only be used in the preamble (with \opt{record}) and indicates that
whenever an entry is indexed, the following line should be added to
the \ext+{aux} file:
\cmddef{glsxtr@counterrecord}
where \meta{value} is given by \gls{thecounter}.
On the next \LaTeX\ run, this information is picked up from the
\ext{aux} file and the information is added to the
\glosfield{record.counter} field (stored as an \sty{etoolbox}
internal list). This internal command is only used in the \ext{aux}
file and has a user-level hook:
\cmddef{glsxtrAddCounterRecordHook}
This does nothing by default. If you want to redefined this, the
redefinition must be placed in the document preamble before the
\ext{aux} file is input.

There are two ways of skipping an entry. The first is to redefine
\gls{printunsrtglossaryentryprocesshook} to perform the test and use
\gls{printunsrtglossaryskipentry} to skip an unwanted entry (as
illustrated earlier). The second is to perform the test in
\gls{printunsrtglossaryhandler}. The first method is the better
option for large lists that may contain group headers. The example
below uses the second method.

The file \filefmt{myentries.bib} contains the following:
\newcommand{\printunitexamplebib}{%
\atentry{symbol}\marg{pi,\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{pi}}},\newline
 \gloskeyval{description}{ratio of the length of the circumference
    of a circle to its diameter}}\newline
\atentry{symbol}\marg{root2,\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{surd}2}},\newline
 \gloskeyval{description}{Pythagoras' constant}}\newline
\atentry{symbol}\marg{zeta3,\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{zeta}(3)}},\newline
 \gloskeyval{description}{Ap\cmd{'}ery's constant}}\newline
\atentry{symbol}\marg{zero,\gloskeyval{name}{0},\newline
 \gloskeyval{description}{nothing or nil}}\newline
\atentry{symbol}\marg{one,\gloskeyval{name}{1},\newline
 \gloskeyval{description}{single entity, unity}}
}
\begin{codebox}
\printunitexamplebib
\end{codebox}
The document redefines the handler to only show entries in the current section:
\begin{codebox}
\cmd{usepackage}\oarg{\opt{record},\opt{stylemods},\optval{style}{index}}\marg{glossaries-extra}
\gls{GlsXtrRecordCounter}\marg{\ctr{section}}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{myentries}}
\cbeg{document}
\cmd{renewcommand}\marg{\gls{printunsrtglossaryhandler}}[1]\marg{\comment{}
  \gls{glsxtrfieldxifinlist}\marg{\#1}\marg{record.section}
   \marg{\thecounter{section}}
  \marg{\gls{glsxtrunsrtdo}\marg{\#1}}\comment{}
  \marg{}\comment{}
}
\cmd{section}\marg{Sample}
\gls{printunsrtglossary}
This section discusses \gls{gls}\marg{pi}, \gls{gls}\marg{root2} and
\gls{gls}\marg{zeta3}.
\codepar
\cmd{section}\marg{Another Sample}
\gls{printunsrtglossary}
This section discusses \gls{gls}\marg{one}, \gls{gls}\marg{pi} and
\gls{gls}\marg{zero}.
\cend{document}
\end{codebox}
If the document is saved in the file \filefmt{myDoc.tex} then the
build process is:
\begin{terminal}
pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
\end{terminal}
The first \LaTeX\ run adds the \records\ to the \ext{aux} file for
\app{bib2gls} to pick up, but also adds the
\gls{glsxtr@counterrecord} lines (which \app{bib2gls} ignores) that
setup the
\glslink{opt.glosfield.record.counter}{\fieldfmt{record.section}}
list field for the given entry.

This means that \gls{glsxtrfieldxifinlist} can be used to determine
whether or not the current section number (\thecounter{section}) is in
the list. If it is, then the entry is displayed in the current
\idx{glossarystyle} using the default \gls{glsxtrunsrtdo}. Otherwise
nothing is displayed.

The following command is provided that performs something similar:
\cmddef{printunsrtglossaryunit}
This is equivalent to:
\begin{compactcodebox}
\gls{printunsrtglossary*}\oarg{\printglossoptval{type}{\gls{glsdefaulttype}},\#1}\marg{\comment{}
  \gls{printunsrtglossaryunitsetup}\marg{\#2}\comment{}
}%
\end{compactcodebox}
This initialises the hook via:
\cmddef{printunsrtglossaryunitsetup}
This is essentially does:
\begin{compactcodebox}
\comment{redefine handler to only show entries with a match:}
\cmd{renewcommand}\marg{\gls{printunsrtglossaryhandler}}[1]\marg{\comment{}
  \gls{glsxtrfieldxifinlist}\marg{\#1}\marg{record.\meta{counter-name}}
    \marg{\thecountername}
  \marg{\gls{glsxtrunsrtdo}\marg{\#1}}\comment{}
  \marg{}\comment{}
}\comment{}
\meta{assign target name prefixes (see below)}
\comment{suppress section header:}
\cmd{renewcommand}*\marg{\gls{glossarysection}}[2][]\marg{}\comment{}
\comment{append vertical space after the glossary:}
\cmd{appto}\gls{glossarypostamble}\marg{\comment{}
 \gls{printunsrtglossaryunitpostskip}}\comment{}
\end{compactcodebox}
This is more complicated than the original example as it also
suppresses the glossary section header and modifies the target name
prefix. Additionally, the following is appended to the end of the \idx{glossary}:
\cmddef{printunsrtglossaryunitpostskip}
This simply does:
\begin{compactcodebox}
\gls{glspar}\cmd{medskip}\gls{glspar}
\end{compactcodebox}
which creates a small vertical space. The target name prefix
(\printglossopt{targetnameprefix}) is assigned as follows. If 
\theHcountername\ has been defined, the prefix is:
\begin{compactcodebox}
record.\meta{counter-name}.\theHcountername.\gls{@gobble}
\end{compactcodebox}
otherwise the prefix is:
\begin{compactcodebox}
record.\meta{counter-name}.\thecountername.\gls{@gobble}
\end{compactcodebox}
The use of \gls{@gobble} at the end discards \gls{glolinkprefix}.

\mExampleref{ex:minigloss} is a modification of
the above example that uses
\gls{printunsrtglossaryunit}. I've added
\resourceopt{symbol-sort-fallback} to sort by the description and a
full glossary at the end of the document.
\begin{codebox}
\cmd{usepackage}\oarg{\opt{record},\opt{stylemods},\optval{style}{index}}\marg{glossaries-extra}
\gls{GlsXtrRecordCounter}\marg{\ctr{section}}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{myentries},
 \resourceoptval{symbol-sort-fallback}{\gloskey{description}}
}
\cbeg{document}
\cmd{section}\marg{Sample}
\gls{printunsrtglossaryunit}\marg{\ctr{section}}
This section discusses \gls{gls}\marg{pi}, \gls{gls}\marg{root2} and
\gls{gls}\marg{zeta3}.
\codepar
\cmd{section}\marg{Another Sample}
\gls{printunsrtglossaryunit}\marg{\ctr{section}}
This section discusses \gls{gls}\marg{one}, \gls{gls}\marg{pi} and
\gls{gls}\marg{zero}.
\codepar
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
The build process is the same as before:
\begin{terminal}
pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
\end{terminal}
Note that all \idxpl{glossary} show the \idxpl{locationlist}, which all contain
the page number~1, since the example document is only one page long.

\begin{resultbox}[float]
\createexample*[label={ex:minigloss},
 title={Sub-glossary for a given counter value},
  description={Example document demonstrating a mini-glossary that
only shows entries recorded in the current section},
 arara={pdflatex,bib2gls,pdflatex,pdfcrop}
]
{\cbeg{filecontents*}\marg{\cmd{jobname}.bib}^^J%
\printunitexamplebib^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\oarg{\opt{record},\opt{stylemods},\optval{style}{index}}\marg{glossaries-extra}^^J
\gls{GlsXtrRecordCounter}\marg{\ctr{section}}^^J
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\cmd{jobname}},^^J
 \resourceoptval{symbol-sort-fallback}{\gloskey{description}}^^J%
}
}{\cmd{section}\marg{Sample}^^J%
\gls{printunsrtglossaryunit}\marg{section}^^J%
This section discusses \gls{gls}\marg{pi}, \gls{gls}\marg{root2} and
\gls{gls}\marg{zeta3}.
\codepar
\cmd{section}\marg{Another Sample}^^J%
\gls{printunsrtglossaryunit}\marg{section}^^J%
This section discusses \gls{gls}\marg{one}, \gls{gls}\marg{pi} and
\gls{gls}\marg{zero}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}

Other variations include creating a secondary \idx{glossary} that's
ordered differently for the \idxpl{mini-glossary}. For example:
\begin{codebox}
\gls{newignoredglossary*}\marg{glossary2}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\cmd{jobname}},
 \resourceoptval{symbol-sort-fallback}{\gloskey{description}},
 \resourceoptval{secondary}{use:glossary2}
}
\end{codebox}
This orders the secondary glossary according to use (the first
record for the entire document not for the given unit).
The \idxpl{mini-glossary} will then need the \printglossopt{type} option:
\begin{codebox}
\gls{printunsrtglossaryunit}\oarg{\printglossoptval{type}{glossary2}}\marg{\ctr{section}}
\end{codebox}

There is an alternative method that ensures the
\idxpl{mini-glossary} are ordered by use 
within the section. This can be done by redefining
\gls{glsxtrAddCounterRecordHook} to create a \idx{glossary} for each
unit (instead of using a secondary \idx{glossary}):
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrAddCounterRecordHook}}[3]\marg{\comment{}
 \gls{provideignoredglossary}\marg{\#2.\#3}\comment{}
 \gls{glsxtrcopytoglossary}*\marg{\#1}\marg{\#2.\#3}\comment{}
}
\end{codebox}
(Remember this needs to be done in the preamble, before the
\ext{aux} file is input.)

This creates a \idx{glossary} with the label
\code{\meta{counter}.\meta{value}}, if it's not already defined, and
adds the entry's label to it. This means that this \idx{glossary}
will only contain the entries for the matching \meta{counter} and
\meta{value}, and the entry labels are in the order they were added
to the \ext{aux} file.

The \idx{glossary} needs to be set appropriately. For example:
\begin{codebox}
\gls{printunsrtglossaryunit}\oarg{\printglossoptval{type}{section.\thecounter{section}}}\marg{\ctr{section}}
\end{codebox}
There's now no filtering required, but \gls{printunsrtglossaryunit}
is still useful as it automatically suppresses the section header,
alters the hyperlink prefix and adds extra spacing after the
glossary. However, if you prefer, you can simply do something like:
\begin{codebox}
\gls{printunsrtglossary*}\oarg{\printglossoptval{type}{section.\thecounter{section}},
 \printglossoptval{target}{false}}
{\cmd{renewcommand}*\marg{\gls{glossarysection}}[2][]\marg{}}
\gls{printunsrtglossaryunitpostskip}
\end{codebox}
This is done in \mExampleref{ex:minigloss2}.

\begin{resultbox}[float]
\createexample*[label={ex:minigloss2},
 title={Sub-glossary for a given counter value ordered by use in the section},
  description={Example document demonstrating a mini-glossary that
only shows entries recorded in the current section in the order they
were recorded in that section},
 arara={pdflatex,bib2gls,pdflatex,pdfcrop}
]
{\cbeg{filecontents*}\marg{\cmd{jobname}.bib}^^J%
\printunitexamplebib^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\oarg{\opt{record},\opt{stylemods},\optval{style}{index}}\marg{glossaries-extra}^^J
\gls{GlsXtrRecordCounter}\marg{\ctr{section}}^^J
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\cmd{jobname}},^^J
 \resourceoptval{symbol-sort-fallback}{\gloskey{description}}^^J%
}
\codepar
\cmd{renewcommand}\marg{\gls{glsxtrAddCounterRecordHook}}[3]\marg{\%^^J
 \gls{provideignoredglossary}\marg{\#2.\#3}\%^^J
 \gls{glsxtrcopytoglossary}*\marg{\#1}\marg{\#2.\#3}\%^^J%
}
\codepar
\cmd{newcommand}\marg{\cmd{minigloss}}\marg{\%^^J
 \gls{printunsrtglossary*}\oarg{\printglossoptval{type}{section.\cmd{thesection}},^^J
  \printglossoptval{target}{false}}^^J
 {\cmd{renewcommand}*\marg{\gls{glossarysection}}[2][]\marg{}}^^J
 \gls{printunsrtglossaryunitpostskip}^^J%
}
}{\cmd{section}\marg{Sample}^^J%
\cmd{minigloss}^^J%
This section discusses \gls{gls}\marg{pi}, \gls{gls}\marg{root2} and
\gls{gls}\marg{zeta3}.
\codepar
\cmd{section}\marg{Another Sample}^^J%
\cmd{minigloss}^^J%
This section discusses \gls{gls}\marg{one}, \gls{gls}\marg{pi} and
\gls{gls}\marg{zero}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}

\section{Standalone Entry Items}
\label{sec:glossentry}

It may be that you don't want a list but would rather display
entry details throughout the document. You can simply
do \gls{glsentryname} followed by \gls{glsentrydesc}.
(Remember that if you don't want a sorted list, use
\optval{sort}{none} or \optval{sort}{clear} to skip the preprocessing of the
\gloskey{sort} field.)
For example, in the preamble provide a custom command to display the
entry's name and description:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{displayterm}}[1]\marg{\comment{}
 \cmd{par}\cmd{medskip}\cmd{par}\cmd{noindent}
 Definition: \gls{glsentryname}\marg{\#1}.\cmd{par}
 \gls{glsentrydesc}\marg{\#1}
 \cmd{par}\cmd{medskip}
}
\end{codebox}
define your entries, for example:
\begin{codebox}
\gls{newglossaryentry}\marg{function}\marg{\gloskeyval{name}{function},
  \gloskeyval{description}{a relation or expression 
involving variables}
}
\end{codebox}
and then later in the text:
\begin{codebox}
\cmd{displayterm}\marg{function}
\end{codebox}

However, if may be that you want to use \sty{hyperref} and
have commands like \gls{gls} link back to the place where
the term is described. Instead of using \gls{glsentryname}
use:
\cmddef{glsxtrglossentry}
where \meta{entry-label} is the entry's label.
If \idx{sentencecase} is required, use:
\cmddef{Glsxtrglossentry}

\begin{information}
Since \gls{glossentryname} checks the \catattr{glossname}
attribute, it is possible to use \gls{glsxtrglossentry} with the
\catattr{glossname} attribute set to \optfmt{firstuc} to apply
\idx{sentencecase}. However, \gls{Glsxtrglossentry} integrates
better in section headings.
\end{information}


These are designed to behave much like the way the name is displayed
in the glossary. They perform the following:
\begin{itemize}
\item Defines \gls{glscurrententrylabel} to the entry's label.
This is usually done at the start of the glossary style commands
\gls{glossentry} and \gls{subglossentry} and may be used by hooks,
such as the \idx{postnamehook}. Here the definition is localised
so that it's only available for use in \gls{glossentryname}.

\item Defines \gls{currentglossary} to the entry's glossary type.
This is usually done at the start of commands like
\gls{printglossary} and may be used by style hooks.
Here the definition is localised so that it's only available for use
in \gls{glsentryitem} and \gls{glssubentryitem}. The value is obtained
by fully expanding:
\cmddef{GlsXtrStandaloneGlossaryType}
which defaults to the value of the \gloskey{type} field for the
current entry.

\item Increments and display the entry counters
if the \opt{entrycounter} or \opt{subentrycounter}
package options are set.  If the entry doesn't have a parent, then
this does:
\begin{compactcodebox}
\gls{glsentryitem}\margm{entry-label}
\end{compactcodebox}
otherwise it does:
\cmddef{GlsXtrStandaloneSubEntryItem}
which defaults to \code{\gls{glssubentryitem}\margm{entry-label}} if the entry
has a parent but not a grandparent.

This reflects the behaviour of the predefined hierarchical styles.
A bug in pre-version~1.31 used \gls{glsentryitem} for all child levels,
which doesn't match the hierarchical glossary styles. If you want to
restore this behaviour, just do:
\begin{codebox}[before upper app=\small]
\cmd{renewcommand}*\marg{\gls{GlsXtrStandaloneSubEntryItem}}[1]\marg{\comment{}
 \gls{glssubentryitem}\marg{\#1}}
\end{codebox}

\item Sets the hyper-target if supported (using \gls{glstarget})
and displays the entry name using:
\cmddef{GlsXtrStandaloneEntryName}
which uses
\code{\gls{glstarget}\margm{entry-label}\marg{\gls{glossentryname}\margm{entry-label}}}
by default. Or, for the \idx{sentencecase} version:
\cmddef{GlsXtrStandaloneEntryNameFirstUc}
which uses \gls{Glossentryname} instead.

Remember that \gls{glossentryname} uses \gls{glsnamefont} or picks up
the style from category attributes such as
\catattr{glossnamefont}.
This can result in duplicate targets if you use both standalone
commands and display the \idx{glossary}. In which case, 
you can redefine \gls{glstarget} to use \gls{glsxtrtarget}, which
will ensure that the first target will be the one that takes
precedence.
\end{itemize}
If you have used \gls{nopostdesc} or \gls{glsxtrnopostpunc}
in any of your description fields, you can use:
\cmddef{glsxtractivatenopost}
to make these commands behave as they normally do within a glossary.
This needs to be placed before:
\begin{compactcodebox}
\gls{glossentrydesc}\margm{entry-label}\gls{glspostdescription}
\end{compactcodebox}
and scoped.  Note that \gls{glsnonextpages} and \gls{glsnextpages} have no
effect outside of the glossary and are not intended for use in a
standalone context.

It's also possible to select a different field (rather than
using \gloskey{name}):
\cmddef{glsxtrglossentryother}
Again, there is a \idx{sentencecase} variant:
\cmddef{Glsxtrglossentryother}
If the \meta{header} argument is not empty, you will need to ensure
that it has the appropriate casing applied as it won't be changed
automatically.

The \meta{field-label} must be given using its
\idx{internalfieldlabel}.  The \meta{header} argument is the code to
pass to the third argument of \gls{glsxtrtitleorpdforheading}.  It
may be left empty in which case the default is determined as
follows:
\begin{itemize}
\item If the command \csfmt{glsxtrhead\meta{field-label}} is defined
(for example, \gls{glsxtrheadshort} if \meta{field-label} is
\gloskey{short}, see \sectionref{sec:headingsadvanced}), then \meta{header}
is \csfmt{glsxtrhead\meta{field-label}}\margm{entry-label}.

\item Otherwise \meta{header} is simply the field value.
\end{itemize}
The \gls{glsxtrglossentryother} command internally uses
\cmddef{GlsXtrStandaloneEntryOther}
which will use
\code{\gls{glossentrynameother}\margm{entry-label}\margm{field-label}}.
The \idx{sentencecase} variant uses:
\cmddef{GlsXtrStandaloneEntryOtherFirstUc}
which uses \gls{Glossentrynameother} instead.

If you have loaded the \sty{glossaries-accsupp} package (through the \opt{accsupp}
option) then accessibility support will be provided if
there's a corresponding command:
\begin{compactcodebox}
\cmd{gls\meta{field-label}accessdisplay}\margm{text}\margm{entry-label}
\end{compactcodebox}
(for example, \gls{glssymbolaccessdisplay}).

This means that my custom command can be changed to:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{displayterm}}[1]\marg{\comment{}
 \cmd{par}\cmd{medskip}\cmd{par}\cmd{noindent}
 Definition: \gls{glsxtrglossentry}\marg{\#1}.\cmd{par}
 \gls{glsentrydesc}\marg{\#1}
 \cmd{par}\cmd{medskip}
}
\end{codebox}
If I want numbered definitions, then I can use the
package options \opt{entrycounter} or \opt{subentrycounter}
and remove the colon:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{displayterm}}[1]\marg{\comment{}
 \cmd{par}\cmd{medskip}\cmd{par}\cmd{noindent}
 Definition \gls{glsxtrglossentry}\marg{\#1}.\cmd{par}
 \gls{glsentrydesc}\marg{\#1}
 \cmd{par}\cmd{medskip}
}
\end{codebox}
The counter label uses a dot after the number by default
but this can be changed to a colon:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsentrycounterlabel}}\marg{\comment{}
 \gls{theglossaryentry}:\cmd{space}}
\end{codebox}
It's now possible to not only use \gls{gls} to link back to the
definition but also use \gls{glsrefentry} to reference
the counter and \gls{glsxtrpageref} to reference the page number.

If I want the description to behave more like it does
in a glossary in need to make the following modification:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{displayterm}}[1]\marg{\comment{}
 \cmd{par}\cmd{medskip}\cmd{par}\cmd{noindent}
 Definition \gls{glsxtrglossentry}\marg{\#1}.\cmd{par}
 \cmd{begingroup}
  \gls{glsxtractivatenopost}
  \gls{glossentrydesc}\marg{\#1}\gls{glspostdescription}
 \cmd{endgroup}
 \cmd{par}\cmd{medskip}
}
\end{codebox}
(Note the grouping to localise \gls{glsxtractivatenopost}.)

You can also use \gls{glsxtrglossentry} within section headings.
For example:
\begin{codebox}
\cmd{section}\marg{\gls{glsxtrglossentry}\marg{function}}
\end{codebox}

If \gls{glsxtrglossentry} occurs in a section title and
\sty{hyperref} has been loaded, then \gls{glsxtrglossentry}
will expand in the PDF bookmark as:
\cmddef{GlsXtrStandaloneEntryPdfName} 
This defaults to \code{\gls{glsentryname}\margm{entry-label}}
The page headers and table of contents will use 
\cmddef{GlsXtrStandaloneEntryHeadName}
which defaults to \code{\gls{glsxtrheadname}\margm{entry-label}}.
The \idx{sentencecase} \gls{Glsxtrglossentry} has similar commands:
\cmddef{GlsXtrStandaloneEntryPdfNameFirstUc}
for the PDF bookmark and
\cmddef{GlsXtrStandaloneEntryHeadNameFirstUc}

For example, if you want \idx{sentencecase} with
\gls{glsxtrglossentry} instead of using \gls{Glsxtrglossentry},
then to ensure that the name is displayed in
\idx{sentencecase} in the title, PDF bookmarks and heading:
\begin{codebox}
\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{glossname}}\marg{firstuc}
\cmd{renewcommand}\marg{\gls{GlsXtrStandaloneEntryPdfName}}[1]\marg{\gls{Glsentryname}\marg{\#1}}
\cmd{renewcommand}\marg{\gls{GlsXtrStandaloneEntryHeadName}}[1]\marg{\gls{Glsentryname}\marg{\#1}}
\end{codebox}
Note that this requires \sty{glossaries} v4.50+ to ensure that
\gls{Glsentryname} expands. An alternative is to use
\gls{Glsxtrusefield}.

If \gls{glsxtrglossentryother} occurs in a section title and
\sty{hyperref} has been loaded, then \gls{glsxtrglossentryother}
will expand in the PDF bookmark as:
\cmddef{GlsXtrStandaloneEntryPdfOther} 
This defaults to the value of the given field.
The page headers and table of contents will use the \meta{header}
argument, if not empty, otherwise it will use:
\cmddef{GlsXtrStandaloneEntryHeadOther}
This does \csfmt{glsxtrhead\meta{field-label}}, if it exists, or
otherwise it just does the value of the given field (which can be
obtained with \gls{glsxtrusefield}).

The \idx{sentencecase} \gls{Glsxtrglossentryother} has corresponding
commands:
\cmddef{GlsXtrStandaloneEntryPdfOtherFirstUc}
for the PDF bookmark and:
\cmddef{GlsXtrStandaloneEntryHeadOtherFirstUc}
for the page header and table of contents.

If you're using a page style or table of contents that doesn't use
\gls{markright} or \gls{markboth} or \gls{@starttoc} then you need
to insert \gls{glsxtrmarkhook} and \gls{@glsxtrinmark} at the start
of the header or table of contents either scoped or afterwards
cancelled with \gls{@glsxtrnotinmark} and
\gls{glsxtrrestoremarkhook}, see \sectionref{sec:headingsadvanced}.

\section{Glossary Style Modifications}
\label{sec:glosstylemods}

The \sty{glossaries-extra} package redefines \gls{setglossarystyle},
and it now includes a hook that's performed before the style is set:
\cmddef{glsxtrpreglossarystyle}
This allows for new style commands that aren't provided by the base
\sty{glossaries} package to be initialised in the
event that a style that doesn't redefine them is used. The default
definition is:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glsxtrpreglossarystyle}}\marg{\comment{}
  \cmd{renewcommand}*\marg{\gls{glssubgroupheading}}[4]\marg{\comment{}
    \gls{glsgroupheading}\marg{\#\#4}}\comment{}
}
\end{compactcodebox}
If you prefer a different default, you can redefine this command as
appropriate.

The commands \gls{glossentryname} and \gls{glossentrydesc} are
modified to take into account the \catattr{glossname},
\catattr{glossnamefont}, \catattr{glossdesc} and \catattr{glossdescfont}
attributes (see \sectionref{sec:categories}).  This means you can
make simple font or case-changing modifications to the name and description
without defining a new glossary style.

The command \gls{glossentrysymbol} is modified to take into account
the \catattr{glosssymbolfont} attribute. Note that, unlike the above, there's
no corresponding attribute to change the case as it's usually not
appropriate to change the case of a symbol (and for some symbols,
such as pictographs, there's no concept of case). If
\gls{texorpdfstring} has been defined \gls{glossentrysymbol} will
be defined to do:
\begin{codebox}
\gls{texorpdfstring}\margm{\TeX\ code}\margm{PDF}
\end{codebox}
The \meta{\TeX\ code} part is robust and deals with the actual
typesetting of the symbol. The \meta{PDF} part is simply:
\cmddef{glsentrypdfsymbol}
which is defined to just do \code{\gls{glsentrysymbol}\margm{entry-label}}. The
chances are that the code in the \gloskey{symbol} key won't be valid
in the PDF bookmarks, so you can redefine \gls{glsentrypdfsymbol} to
use a more appropriate field. (If you do redefine this command,
remember that it needs to fully expand.)

For example, if you are using \sty{glossaries-accsupp}, you could
use the \gloskey{symbolaccess} field:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsentrypdfsymbol}}[1]\marg{\comment{}
 \gls{glsentrysymbolaccess}\marg{\#1}}
\end{codebox}
Alternatively, if you are using \app{bib2gls} you can use the \TeX\
parser library to interpret a copy of the \gloskey{symbol} field and
use that. For example, with the \idxpl{resourceopt}:
\begin{codebox}
\resourceoptvalm{replicate-fields}{\gloskey{symbol}=\gloskey{user1}},
\resourceoptval{interpret-fields}{\gloskey{user1}}
\end{codebox}
This copies the value of the \gloskey{symbol} field to the
\gloskey{user1} field (\resourceopt{replicate-fields}) and then
replaces the value of the \gloskey{user1} field with its interpreted
value (\resourceopt{interpret-fields}).

This means you can then do:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsentrypdfsymbol}}[1]\marg{\comment{}
 \gls{glsentryuseri}\marg{\#1}}
\end{codebox}
(You may need \XeLaTeX\ or \LuaLaTeX\ with this method.) This allows
\gls{glossentrysymbol} to be used in a section heading with
standalone definitions. See the \app{bib2gls} manual for further
details about the \TeX\ interpreter.

If you want to adapt a style to use another field instead
of \gloskey{name}, you can use:
\cmddef{glossentrynameother}
This behaves just like \gls{glossentryname} (that is, it obeys the
\catattr{glossname} attribute, uses either the
\catattr{glossnamefont} attribute or \gls{glsnamefont} to format the
text, and uses the \idx{postnamehook}) but the text is obtained from
the field given \meta{field-label} instead of \gloskey{name}.  The
\meta{field-label} argument must be the \idx{internalfieldlabel} (for
example \code{desc} rather than \code{description}).

If you prefer to bypass the \catattr{glossname} attribute and always
apply \idx{sentencecase}, then you can instead use:
\cmddef{Glossentrynameother}
This behaves as \gls{glossentrynameother} but omits the
\catattr{glossname} attribute check.

Similarly for all \idx{uppercase}:
\cmddef{GLOSSentrynameother}
(which uses \gls{glsuppercase})
or for \idx{titlecase}:
\cmddef{GlossEntryNameOther}
This internally uses \gls{glsentrytitlecase} to perform the
case-change.

\subsection{Pre- and Post-Name Hooks}
\label{sec:postnamehooks}

The \sty{glossaries-extra} package adds hooks to
\gls{glossentryname} and \gls{Glossentryname} (which is used in \idxpl{glossarystyle}
to display the entry's name).
Similarly for \gls{GLOSSentryname} and \gls{GlossEntryName} (which
are new to \sty{glossaries} v4.59).
\cmddef{glsxtrprenamehook}
The pre-name hook is performed before the entry name is
displayed (but after the abbreviation style is set for the
entry's category, if applicable). Does nothing by default.

Unlike the post-name hook described below, the pre-name hook isn't
included in the font change nor is it influenced by any
case-change. It may be used, for example, to add a marker before the
name. 

\begin{information}
If the pre-name hook includes a declaration, bear in mind that most
styles don't apply a scope to the name and the post-name hook may
need to be adjusted to cancel the effect.
\end{information}

\cmddef{glsxtrpostnamehook}
This is the main \idx{postnamehook}, which implements additional
hooks to allow for customisation. By default, \gls{glsxtrpostnamehook}
checks the \catattr{indexname} attribute.
If the attribute exists for the category to which the entry belongs,
then the name is automatically indexed using:
\begin{compactcodebox}
\gls{glsxtrdoautoindexname}\margm{entry-label}\marg{\catattr{indexname}}
\end{compactcodebox}
See \sectionref{sec:autoindex} for further details.

The post-name hook \gls{glsxtrpostnamehook} will also use:
\cmddef{glsxtrpostnamecategory}
if it exists.
You can use \gls{glscurrententrylabel} to obtain the entry label
with the definition of this command. For example, suppose you are
using a glossary style the doesn't display the symbol, you can
insert the symbol after the name for a particular category, say,
the \qt{symbol} category:
\begin{codebox}
\cmd{newcommand}*\marg{\cmd{glsxtrpostnamesymbol}}\marg{\cmd{space}
 (\gls{glsentrysymbol}\marg{\gls{glscurrententrylabel}})}
\end{codebox}
For convenience, you can use:
\cmddef{glsdefpostname}
This is simply a shortcut for:
\begin{compactcodebox}
\gls{csdef}\marg{\gls{glsxtrpostnamecategory}}\margm{definition}
\end{compactcodebox}
Note that it doesn't check if the command has already been defined.

The \idx{postnamehook} also does:
\cmddef{glsextrapostnamehook}
(before \gls{glsxtrpostnamecategory}) to allow for additional
non-category related code. This does nothing by default.

\subsection{Post-Description Hooks}
\label{sec:postdeschooks}

The \sty{glossaries} package provides the hook
\gls{glspostdescription}, which is placed after the description in
some of the predefined styles. The \sty{glossaries-extra-stylemods}
package modifies the predefined styles to ensure that they all use
this hook. This provides a convenient way to make slight
adjustments, such as appending content after the description,
without having to define a custom glossary style.

The \sty{glossaries-extra} package redefines
\gls{glspostdescription} so that it includes the following hook:

\cmddef{glsxtrpostdescription}
This new hook simply performs the \idx{catpostdeschook}:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrpostdescription}}\marg{\comment{}
  \cmd{csuse}\marg{glsxtrpostdesc\gls{glscategory}
    \marg{\gls{glscurrententrylabel}}}\comment{}
}
\end{codebox} 

\begin{information}
The punctuation that is automatically inserted with \opt{postdot} or
\opt{postpunc} is placed after \gls{glsxtrpostdescription}, not
before.
\end{information}

If you want to modify the hook for all entries (without affecting
the \opt{postpunc} or \opt{postdot} options), then redefine
\gls{glsxtrpostdescription}.
If you want to adjust this hook according to the entry's category,
then you can simply redefine the \idx{catpostdeschook}.
\cmddef{glsxtrpostdesccategory}
Some common \idxpl{catpostdeschook} are provided:
\cmddef*{glsxtrpostdescgeneral}
The \idx{postdeschook} for the \cat{general} category.

\cmddef*{glsxtrpostdescterm}
The \idx{postdeschook} for the \cat{term} category.

\cmddef*{glsxtrpostdescacronym}
The \idx{postdeschook} for the \cat{acronym} category.

\cmddef*{glsxtrpostdescabbreviation}
The \idx{postdeschook} for the \cat{abbreviation} category.

The above all do nothing by default. You can redefine them with
\gls{renewcommand} or use:
\cmddef{glsdefpostdesc}
This will define (or redefine) \gls{glsxtrpostdesccategory}.
The package options \opt{symbols}, \opt{numbers} and \opt{index}
provide corresponding \idxpl{catpostdeschook}.

You can reference the current entry within these hooks using
\gls{glscurrententrylabel}, which is defined within the
\idx{glossary} (any of the \csfmt{print\ldots glossary} commands)
and also within the standalone commands, such as
\gls{glsxtrglossentry}.

\cmddef{glsxtrnopostpunc}
Suppresses the post-description punctuation that is automatically
inserted by package options \opt{postdot} or \opt{postpunc}.

The \sty{glossaries} package provides \gls{nopostdesc}, which may be
used in the \gloskey{description} to suppress the \idx{postdeschook}
for that entry. This suppresses both the post-description
punctuation and the additional \gls{glsxtrpostdescription} hook.
If you only want to suppress to punctuation, then use
\gls{glsxtrnopostpunc} instead.

\begin{information}
The \idxpl{postdeschook} are implemented by \gls{glspostdescription}
within the glossary style. If this command isn't used in the style,
then the additional hooks won't be available.
\end{information}

\cmddef{glsxtrrestorepostpunc}
If this command is placed in the definition of
\gls{glsxtrpostdescription} or added to the \idx{catpostlinkhook},
then it will counter-act any use of \gls{glsxtrnopostpunc} to
restore the post-description punctuation.

These commands have no effect outside of the glossary (except with
standalone entries that use \gls{glsxtractivatenopost} and
\gls{glspostdescription}, see \sectionref{sec:glossentry}).

\subsection{Number (Location) List}
\label{sec:glosstylenumlist}

The \idx{locationlist} is now placed inside the argument of:
\cmddef{GlsXtrFormatLocationList}
This is internally used by \gls{glossaryentrynumbers}. The
\opt{nonumberlist} option redefines \gls{glossaryentrynumbers} so that it
doesn't display the \idx{numberlist}, but it still saves the
\idx{numberlist} in case it's required. The desired font formatting
for the \idx{locationlist} can now more easily be set by redefining
\gls{GlsXtrFormatLocationList}, without interfering with
\gls{glossaryentrynumbers}.

\begin{important}
If you want to suppress the \idx{numberlist} always use the
\opt{nonumberlist} option instead of redefining
\gls{glossaryentrynumbers} to do nothing.
\end{important}

Note that if you are using the \idx{unsrtfam} the \idx{locationlist}
will only be present if the appropriate field has been set (see
\sectionref{sec:printunsrtlocations}). There's no need to save
locations with \app{bib2gls} or with \gls{printnoidxglossary}
because this is performed automatically (unlike \gls{printglossary}
where the trick with \gls{glossaryentrynumbers} is required to
capture the \idx{locationlist}).

Sometimes users like to insert \qt{page} or \qt{pages} in front of
the \idx{locationlist}. This is quite fiddly to do with the base
\sty{glossaries} package, but \sty{glossaries-extra}
provides a way of doing this. First you need to enable this
option and specify the text to display using:
\cmddef{GlsXtrEnablePreLocationTag}
where \meta{page tag} is the text to display if the \idx{locationlist} only
contains a single location and \meta{pages tag} is the text to display
otherwise. For example:
\begin{codebox}
\gls{GlsXtrEnablePreLocationTag}\marg{Page: }\marg{Pages: }
\end{codebox}
An extra run is required when using this command.

\begin{important}
Use \encap{glsignore} not \encap{@gobble} as the format if you
want to suppress the page number (and only index the entry once or
use \app{bib2gls}).
\end{important}

See the accompanying sample file \file{sample-pages.tex} for an
example.

\begin{information}
Note that with \app{bib2gls} the \resourceopt{loc-prefix} resource option
inserts a prefix at the start of non-empty location lists, which
can be used as an alternative to \gls{GlsXtrEnablePreLocationTag}.
There is also a corresponding \resourceopt{loc-suffix} option to
provide a suffix.
\end{information}

\Idxpl{locationlist} displayed with \gls{printnoidxglossary}
internally use \gls{glsnoidxdisplayloc}.
This command is provided by \sty{glossaries}, but is modified by
\sty{glossaries-extra} to check for the start and end range
formation identifiers \verb|(| and \verb|)| which are discarded to
obtain the actual control sequence name that forms the location
formatting command.

If the range identifiers aren't present, this just uses
\cmddef{glsxtrdisplaysingleloc}
otherwise it uses
\cmddef{glsxtrdisplaystartloc}
for the start of a range (where the identifier has been stripped
from \meta{format}) or
\cmddef{glsxtrdisplayendloc}
for the end of a range (where the identifier has been stripped
from \meta{format}).

By default the start range command saves the format in:
\cmddef{glsxtrlocrangefmt}
and does:
\begin{compactcodebox}
\gls{glsxtrdisplaysingleloc}\margm{format}\margm{location}
\end{compactcodebox}
(If the format is empty, it will be replaced with \code{glsnumberformat}.)

The end command checks that the format matches the start of the
range, does:
\cmddef{glsxtrdisplayendlochook}
(which does nothing by default), followed by:
\begin{compactcodebox}
\gls{glsxtrdisplaysingleloc}\margm{format}\margm{location}
\end{compactcodebox}
and then sets \gls{glsxtrlocrangefmt} to empty.


This means that the list
\begin{codebox}
\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{(textbf}\marg{1},
\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{textbf}\marg{1},
\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{)textbf}\marg{1}.
\end{codebox}
doesn't display any differently from
\begin{codebox}
\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{textbf}\marg{1},
\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{textbf}\marg{1},
\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{textbf}\marg{1}.
\end{codebox}
but it does make it easier to define your own custom list handler
that can accommodate the ranges.

\subsection{Indexing Groups}
\label{sec:glosgroups}

The letter or symbol or number \idxpl{group} are a by-product of the
\idx{indexingapp}. These are usually determined during the sorting
according to the first (significant) character of the sort value. If
the first character is an alphabetical character, the group is a
letter group, with the group label the same as the letter. If the
sort value is numeric, the group is a number group, with the label
\code{glsnumbers}, otherwise the group is a symbol group with the label 
\code{glssymbols}.

\begin{information}
For the \idx{unsrtfam}, see \sectionref{sec:printunsrtgroups} for
more details about how \idx{group} headers are inserted into the
\idx{glossary}. Only those commands are able to support
sub-\idxpl{group}.
\end{information}

With \app{xindy}, the number group is automatically provided with
the \optval{xindy}{glsnumbers} package option. It can be suppressed
with \optval{xindy}{\marg{glsnumbers=false}} (see the base
\sty{glossaries} user manual for further details).

With \app{bib2gls}, group formation requires \switch{group} (or
\switch{g}). This setting is off by default to allow for a
faster process where no groups are required.  When this setting is
on, there are additional groups, depending on the sort method. For
example, if you use a date-time sort method, then you will have
date-time groups.

\begin{warning}
Take care not to confusion \idxpl{group} with hierarchy. 
See \gallerypage{logicaldivisions}{Gallery: Logical Glossary Divisions 
(type vs group vs parent)} for the difference between the
\gloskey{group}, \gloskey{type} and \gloskey{parent} fields.
\end{warning}

The base \sty{glossaries} package provides a simplistic way of
assigning a title to a group to allow for the use of language-sensitive
commands \gls{glssymbolsgroupname} and \gls{glsnumbersgroupname},
which correspond to the \code{glssymbols} and \code{glsnumbers}
groups. The more flexible groups that can be created with
\app{bib2gls} require a better approach that is less likely to cause
a conflict.

\cmddef{glsxtrsetgrouptitle}
Globally assigns the given title \meta{group-title} to the group identified
by \meta{group-label}. This command is used implicitly within the
\ext{glstex} file to assign titles to groups obtained by \app{bib2gls}.
Judicious definitions of the helper commands provided by
\app{bib2gls} can provide a more flexible way of assigning groups.

\cmddef{glsxtrlocalsetgrouptitle}
As above but the assignment is local.

\cmddef{glsxtrgetgrouptitle}
Obtains the title corresponding to the group identified by
\meta{group-label} and stores the result in \meta{cs}. This command
first checks if a title has been assigned by
\gls{glsxtrgetgrouptitle} and then, for compatibility with the base
\sty{glossaries} package, it will test for the existence of 
\csfmt{\meta{group-label}groupname} if \meta{group-label} is
\code{glssymbols} or \code{glsnumbers} or a single character.
If no title is obtained from any of these tests, then the title will
be assumed to be the same as the label.

\begin{information}
The \gls{printnoidxglossary} command has a slightly different
method, which uses the character code so it's not suitable with
\idx{utf8}. In general, \gls{printnoidxglossary} is best avoided,
where possible, and is inappropriate for locale-sensitive sorting.
\end{information}

\subsection{\stytext{glossaries-extra-stylemods}}
\label{sec:stylemods}

The \sty{glossaries-extra-stylemods} package (more conveniently
loaded through the \sty{glossaries-extra}
\opt{stylemods} option) modifies some of the predefined
styles that are provided with the \sty{glossaries} package.

\begin{important}
Any styles loaded after \sty{glossaries-extra-stylemods} won't be
patched.
\end{important}

The \opt{stylemods} option may be provided without a value, in which
case all currently defined styles will be patched. Alternatively,
you can supply a comma-separated list as the value, which indicates
that, for each \meta{element} in the list, the package
\styfmt{glossary\dhyphen\meta{element}} should be loaded and, if
it's a package provided with the base \sty{glossaries} package,
patched. For example:
\begin{compactcodebox}
\cmd{usepackage}\marg{glossaries-extra}
\cmd{usepackage}\marg{glossary-longragged}
\cmd{usepackage}\marg{glossary-mcols}
\cmd{usepackage}\marg{glossaries-extra-stylemods}
\gls{setglossarystyle}\marg{\glostyle{mcolindex}}
\end{compactcodebox}
is equivalent to:
\begin{compactcodebox}
\cmd{usepackage}\oarg{\optvalm{stylemods}{longragged,mcols},
 \optval{style}{\glostyle{mcolindex}}}\marg{glossaries-extra}
\end{compactcodebox}
You may prefer to combine \opt{stylemods} with \opt{nostyles} to
reduce the overhead of loading unnecessary packages.

The \sty{glossaries-extra-stylemods} package adjusts the predefined
styles so that they all use \gls{glspostdescription} and replaces
any hard-coded space before the \idx{locationlist} with
\cmddef{glsxtrprelocation}
You can therefore redefine that command in
combination with \opt{postpunc} to alter the separator before the
\idx{locationlist}. For example, to have a comma followed by
\gls{hfil}:
\begin{codebox}
\cmd{usepackage}[\opteqvalref{postpunc}{comma},\opt{stylemods}]\marg{glossaries-extra}
\cmd{renewcommand}\marg{\gls{glsxtrprelocation}}\marg{\gls{hfil}}
\end{codebox}

\begin{warning}
Be careful with doing this as it will look odd if the \gls{locationlist} is
missing.
\end{warning}

With \app{bib2gls} you can instead redefine \gls{glsxtrprelocation}
to do nothing and set the location prefixes with \resourceopt{loc-prefix}
which will only apply if the entry has a \gls{locationlist}.
Alternatively, you could redefine \gls{glsxtrprelocation} to check
if the \gloskey{location} field is set.

\subsubsection{Inline Style}
\label{sec:stylemodsinline}

The patched \glostyle{inline} style is dealt with slightly
differently. The original definition provided by the
\sty{glossary-inline} package uses \gls{glspostdescription} at the
end of the glossary (not after each entry description) within the
definition of \gls{glspostinline}. The style modification changes
this so that \gls{glspostinline} just does a full stop followed by
space factor adjustment, and the description
\gls{glsinlinedescformat} and sub-entry description formats
\gls{glsinlinesubdescformat} are redefined to include
\gls{glsxtrpostdescription} (not \gls{glspostdescription}). This means
that the modified \glostyle{inline} style isn't affected by the
\opt{nopostdot} option, but the \idx{catpostdeschook} 
can still be used.

\subsubsection{Tabular Styles}
\label{sec:stylemodstab}

The \env{tabular}-like styles, such as \glostyle{long} are
adjusted so that the \gls{ifglsnogroupskip} conditional (set with
\opt{nogroupskip}) is moved outside of the definition of
\gls{glsgroupskip} to avoid problems that cause an \qt{Incomplete
\csfmt{iftrue}} error with \gls{printunsrtglossary} and
\gls{printnoidxglossary}.  This means that if you want to change this
conditional using \gls{setupglossaries} or using the
\printglossopt{nogroupskip} option in \gls{printglossary},
\gls{printnoidxglossary} or \gls{printunsrtglossary}, you must also
reset the \idx{glossarystyle}.

\subsubsection{List Styles}
\label{sec:stylemodslist}

The \glostyle{list} styles use:
\cmddef{glslistprelocation}
(which defaults to \gls{glsxtrprelocation}) for top-level items and:
\cmddef{glslistchildprelocation}
(which defaults to \gls{glslistprelocation}) for child items.

The description (including the post-description hook)
is governed by:
\cmddef{glslistdesc}
for the \glostyle{list} and \glostyle{altlist} styles (but not the
\glostyle{listdotted} variations).

The hard-coded \code{\gls{item}\oargm{target and name}} is replaced
with:
\cmddef{glslistitem}
The \glostyle{altlist} styles use:
\cmddef{glsaltlistitem}
which internally uses \gls{glslistitem}.
The header item (for the list styles that should the group title,
such as \glostyle{listgroup}) is governed by:
\cmddef{glslistgroupheaderitem}
This ignores the \meta{group-label} by default and simply places the
second argument in the optional argument of \gls{item}. The
\meta{header code} is the formatted group title, possibly including
a hypertarget. The spacing after the group item is given by:
\cmddef{glslistgroupafterheader}

For just the \glostyle{list} style and its letter group variations
(not the \glostyle{altlist} or \glostyle{listdotted} variations) the
\idx{locationlist} for child entries is followed by:
\cmddef{glslistchildpostlocation}
which defaults to a \idx{fullstop}.

The default value of \gls{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
\gls{hsize} isn't set until the start of the document.

The separator between groups (if not \opt{nogroupskip}) is now
given by:
\cmddef{glslistgroupskip}
This defaults to \gls{indexspace} with penalties to deter page
breaks. This command isn't used if \opt{nogroupskip} is set.

\subsubsection{Tree Styles}
\label{sec:stylemodstree}

The group headings for styles like \glostyle{treegroup} are
formatted with:
\cmddef{glstreegroupheaderfmt}
The navigation elements for styles like \glostyle{treehypergroup} is
formatted with:
\cmddef{glstreenavigationfmt}
The above two commands are defined in terms of \gls{glstreenamefmt}, 
since that was the command originally used
for the group headings and navigation. This now allows these
different elements to be defined independently, but the most common
redefinition is for \gls{glstreenamefmt} to remove the bold in the
name. If the bold is still required for the group heading and navigation
elements, then both other commands also need redefining. To simplify
matters, all three commands have been defined to use:
\cmddef{glstreedefaultnamefmt}
This simply does \code{\gls+{textbf}\margm{text}}.

This means that if you want to change all three to use a particular
style you only need to redefine \gls{glstreedefaultnamefmt}, but if
you only want to redefine \gls{glstreenamefmt} without affecting the
other two commands, then you now can.

The separator between groups without headers is given by:
\cmddef{glstreegroupskip}
This defaults to just \gls{indexspace} without penalties. This
command isn't used if \opt{nogroupskip} is set. (The penalties
introduced in v1.41 were moved to \gls{glstreegroupheaderskip} in
v1.42 as they are inappropriate when there's no header.)

The separator between groups with headers is now given by:
\cmddef{glstreegroupheaderskip}
This defaults to \gls{glstreegroupskip} with penalties to deter page
breaks after the group heading.

The styles that display the \idx{group} titles now use:
\cmddef{glstreePreHeader}
This does nothing by default and is inserted before the group title.
You can redefine it to add the group title to the PDF bookmarks. For
example, if the \idx{glossary} title uses \gls{chapter} then:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glstreePreHeader}}[2]\marg{\comment{}
 \gls{pdfbookmark}\oarg{1}\marg{\#2}\marg{\gls{currentglossary}.\#1}\comment{}
}
\end{codebox}
will insert section-level bookmarks. The use of \gls{currentglossary}
helps to provide unique bookmark labels in the event of multiple
glossaries.

The \sty{glossary-tree} package provides the commands
\cmddef{glstreepredesc}
and
\cmddef{glstreechildpredesc}
(which both default to a space) and uses them in the \glostyle{tree}-like
styles, but not for the \glostyle{alttree} style. The
\sty{glossaries-extra-stylemods} package modifies the
\glostyle{alttree} style so that it has equivalent hooks:
\cmddef{glsalttreepredesc}
and
\cmddef{glsalttreechildpredesc}
These do nothing by default.

The \glostyle{index}-like and \glostyle{tree}-like styles
insert the pre-\idx{locationlist} space with:
\cmddef{glstreeprelocation}
(which defaults to \gls{glsxtrprelocation}) for top-level items and
\cmddef{glstreechildprelocation}
(which defaults to \gls{glstreeprelocation}) for child items.

The styles like \glostyle{treenoname} use:
\cmddef{glstreenonamedesc}
to display the
pre-description separator, the description and the post-description
hook. Similarly for the symbol:
\cmddef{glstreenonamesymbol}
The above are just used for top-level entries. Child entries don't
have the name or symbol displayed for the \glostyle{treenoname}
styles, so there's only a command for the child description:
\cmddef{glstreenonamechilddesc}

For the \glostyle{tree} styles (but not the \glostyle{treenoname} or
\glostyle{alttree} styles), the description is displayed using:
\cmddef{glstreedesc}
and the symbol with:
\cmddef{glstreesymbol}
Again the above two commands are just for top-level entries. The
child entries use:
\cmddef{glstreechilddesc}
for the description and
\cmddef{glstreechildsymbol}
for the symbol.
There are now wrapper commands for
\gls{glstreedesc} and \gls{glstreechilddesc} that check for
the description and symbol to determine what separator to use
before the page list:
\cmddef{glstreeDescLoc}
for top-level entries and
\cmddef{glstreeChildDescLoc}
for sub-entries.

If either the symbol or description is present these will use
\gls{glstreeprelocation} or \gls{glstreechildprelocation},
respectively. Otherwise, both will use:
\cmddef{glstreeNoDescSymbolPreLocation}
The default is a space. This means that you could have, say, a
comma followed by a space for terms that are simply an alias, but
just have a space for terms that have a description that ends with a
full stop (or that just have a symbol without a description) where
the comma would be inappropriate.

\begin{information}
Version 1.42 has corrected an error that was introduced to
v1.41 that caused the name to run into the location list if there
was no symbol and no description.
\end{information}

There are some additional commands  for use with the
\glostyle{alttree} style to make it easier to modify.
These commands are only defined if the
\sty{glossary-tree} package has already been loaded, which is
typically the case unless the \opt{notree} or \opt{nostyles} option has been used
when loading \sty{glossaries}.

\cmddef{gglssetwidest}
This is like \gls{glssetwidest} but performs a global assignment.

\cmddef{eglssetwidest}
This is like \gls{glssetwidest} but expands \meta{name}.

\cmddef{xglssetwidest}
This is like \gls{eglssetwidest} but performs a global assignment.

The following only set the value if \meta{name} is wider than the
current value. Local update:
\cmddef{glsupdatewidest}
Global update:
\cmddef{gglsupdatewidest}
Locale update (expands \meta{name}):
\cmddef{eglsupdatewidest}
Global update (expands \meta{name}):
\cmddef{xglsupdatewidest}

The widest entry value can later be retrieved using: 
\cmddef{glsgetwidestname}
which expands to the widest top-level name and:
\cmddef{glsgetwidestsubname}
expands to either the widest name for the given
\idx{hierarchicallevel} or to the widest top-level name, if no
widest name set for \meta{level}.

Note that if you are using \app{bib2gls}, you can use the
resource option \resourceopt{set-widest} which will try to determine the
widest name of all the selected entries. This isn't guaranteed
to work as it may depend on fonts or commands that \app{bib2gls}
can't replicate, but it should be suitable for names that just
consist of text, and can be more efficient than iterating over all
the defined entries using \TeX.

The command \gls{glsfindwidesttoplevelname} provided by
\sty{glossary-tree} has a CamelCase synonym:
\cmddef{glsFindWidestTopLevelName}
Similar commands are also provided. If the optional \meta{glossary
labels} is omitted, the list of all non-\idxpl{ignoredglossary} is
assumed.
\cmddef{glsFindWidestUsedTopLevelName}
This has an additional check that the entry has been \idxc{firstuseflag}{used}.
Naturally this is only useful if the glossaries that use
the \glostyle{alttree} style occur at the end of the document.
This command should be placed just before the start of the glossary.
(Alternatively, place it at the end of the document and save
the value in the auxiliary file for the next run.)

\cmddef{glsFindWidestUsedAnyName}
This is like the previous command but if doesn't check the
\gloskey{parent} key. This is useful if all
\idxpl{hierarchicallevel} should have the same width for the name.

\cmddef{glsFindWidestAnyName}
This is like the previous command but doesn't check if the entry
has been used.

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

\cmddef{glsFindWidestLevelTwo}
This is like the previous command but doesn't check if the entry has
been used.

\cmddef{glsFindWidestUsedAnyNameSymbol}
This is like \gls{glsFindWidestUsedAnyName} but also measures the
symbol. The length of the widest symbol is stored in
\meta{register}.

\cmddef{glsFindWidestAnyNameSymbol}
This is like the previous command but it doesn't check if the entry
has been used.

\cmddef{glsFindWidestUsedAnyNameSymbolLocation}
This is like \gls{glsFindWidestUsedAnyNameSymbol} but also
measures the \idx{locationlist}. This requires
\gls{glsentrynumberlist}.
The length of the widest symbol is stored in \meta{register1}
and the length of the widest \idx{locationlist} is stored in
\meta{register2}.

\cmddef{glsFindWidestAnyNameSymbolLocation}
This is like the previous command but it doesn't check if the entry
has been used.

\cmddef{glsFindWidestUsedAnyNameLocation}
This is like \gls{glsFindWidestUsedAnyNameSymbolLocation} but doesn't
measure the symbol. The length of the widest \idx{locationlist}
is stored in \meta{register}.

\cmddef{glsFindWidestAnyNameLocation}
This is like the previous command but doesn't check if the entry has
been used.

The layout of the symbol, description and \idx{locationlist}
is governed by:
\cmddef{glsxtralttreeSymbolDescLocation}
for top-level entries and
\cmddef{glsxtralttreeSubSymbolDescLocation}
for sub-entries.

There is now a user level command that performs the initialisation
for the \glostyle{alttree} style:
\cmddef{glsxtralttreeInit}
The paragraph indent for subsequent paragraphs in multi-paragraph
descriptions is provided by the length:
\cmddef{glsxtrAltTreeIndent}

For additional commands that are available with the
\glostyle{alttree} style, see the documented code
(\filefmt{glossaries-extra-code.pdf}). See also
the accompanying sample files \file{sample-alttree.tex},
\file{sample-alttree-sym.tex} and
\file{sample-alttree-marginpar.tex}.

\section{New Glossary Styles}
\label{sec:newglossarystyles}

The \sty{glossaries-extra} package comes with some new styles.
The associated style package needs to be loaded. This can be done
with \csfmt{usepackage} but it's simpler to use the \opt{stylemods}
option. For example:
\begin{codebox}
\cmd{usepackage}\oarg{\optval{stylemods}{bookindex},\optval{style}{bookindex}}\marg{glossaries-extra}
\end{codebox}
If you don't require any of the base styles, use \opt{nostyles} (but
note that some style packages automatically load another style
package if it the style builds on an existing one).

\subsection{\stytext{glossary-bookindex} package}
\label{sec:bookindex}

\glsstartrange{opt.glostyle.bookindex,pkg.glossary-bookindex}%
The \inlineglsdef{pkg.glossary-bookindex} package provides the glossary style
\inlineglsdef{opt.glostyle.bookindex}. This is very similar to the
\glostyle{mcolindexgroup} style but is designed for indexes, so by
default only the name and location list are displayed. This style is
demonstrated in \exampleref{ex:bookindex} (using \app{bib2gls}).
Note that some entries don't have \idxpl{locationlist} because they
weren't \recorded\ in the document, but were included as
dependencies. See \sectionref{sec:seenoindex} for dealing with
cross-references that may not be required.

\begin{resultbox}[float]
\createexample*[label={ex:bookindex},
arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop},
title={The \optfmt{bookindex} style},
 description={Example document demonstrating the bookindex style}]
{\cmd{usepackage}\oarg{record,nostyles,stylemods=bookindex,style=bookindex}\marg{glossaries-extra}^^J%
\gls{GlsXtrLoadResources}\oarg{src=example-glossaries-xr,^^J
 selection=\marg{recorded and deps and see not also}^^J%
}
}
{\gls{glsaddeach}\marg{lorem,amet,adipiscing,placerat,arcu,vulputate}^^J%
\gls{glsaddeach}\oarg{thevalue=2}\marg{arcu,consectetuer,donec,augue}^^J%
\gls{glsaddeach}\oarg{thevalue=3}\marg{arcu,lorem,nulla}^^J%
\gls{printunsrtglossary}
}
\end{resultbox}

The \glostyle{bookindex} style only supports a maximum
\idx{hierarchicallevel} of 2 (top-level, level~1 and level~2). It's
primarily designed for use with \app{bib2gls}. It may be used with
other indexing options, but some features may not be present and
\idx{utf8} characters may cause a problem with non-Unicode engines in
letter group headings or PDF bookmarks. (\app{bib2gls} uses numeric
identifies by default to avoid these problems, see \sectionref{sec:printunsrtgroups}.)

The number of columns is given by:
\cmddef{glsxtrbookindexcols}
which defaults to 2.

This style uses the \env{multicols} environment. If
the command:
\cmddef{glsxtrbookindexcolspread}
isn't empty then it's supplied as the optional argument
following \code{\cbeg{multicols}\margm{n}}. You can switch from
\env{multicols} to \env{multicols*} by redefining:
\cmddef{glsxtrbookindexmulticolsenv}
For example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrbookindexmulticolsenv}}\marg{multicols*}
\end{codebox}

The target for top-level items is created with:
\cmddef{glsxtrbookindextarget}
This simply uses \gls{glstarget} but may be redefined to insert
additional content in front of the target or to suppress the target
according to some condition (such as the entry's category).

\begin{information}
Remember that if you want to use \gls{glsxtrtarget} then \emph{all} 
instances of \gls{glstarget} for the entire document (including any
standalone entries or other glossaries with different styles) need to be 
replaced with that command in order for it to work correctly.
The simplest way to do this is to redefine \gls{glstarget} at the
start.
\end{information}

The target for child items is created with:
\cmddef{glsxtrbookindexsubtarget}
This simply uses \gls{glsxtrbookindextarget}.

Each top-level entry is displayed using:
\cmddef{glsxtrbookindexname}
This just does \code{\gls{glossentryname}\margm{entry-label}} by default.
For example, if you want the symbol to be included:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrbookindexname}}[1]\marg{\comment{}
 \gls{glossentryname}\marg{\#1}\comment{}
 \gls{ifglshassymbol}\marg{\#1}
  \marg{\cmd{space} (\gls{glossentrysymbol}\marg{\#1})}\marg{}\comment{}
}
\end{codebox}
or if you want the description (if set):
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrbookindexname}}[1]\marg{\comment{}
 \gls{glossentryname}\marg{\#1}\comment{}
 \gls{ifglshasdesc}\marg{\#1}
  \marg{\cmd{space} \gls{glossentrydesc}\marg{\#1}\gls{glspostdescription}}{}\comment{}
}
\end{codebox}
(which picks up the \idx{postdeschook}).

Alternatively you can use the \gls{glsxtrpostnamecategory}
hook to append information after the name according to the entry's
category.

Sub-entries are displayed using:
\cmddef{glsxtrbookindexsubname}
which just defaults to \code{\gls{glsxtrbookindexname}\margm{entry-label}}.

The separator used before the \idx{locationlist} for top-level
entries is given by:
\cmddef{glsxtrbookindexprelocation}
where \meta{entry-label} is the entry's label. This checks if
the \gloskey{location} field has been set. If it has, it
does:
\begin{codebox}
,\gls{glsxtrprelocation}
\end{codebox}
otherwise it just does \gls{glsxtrprelocation} (which defaults to
\csfmt{space}) with no comma.  If you're using \app{bib2gls}
with \resourceoptval{save-locations}{false}, the
\gloskey{location} field won't be set.

The separator used before the \idx{locationlist} for sub-entries is given by:
\cmddef{glsxtrbookindexsubprelocation}
which defaults to \code{\gls{glsxtrbookindexprelocation}\marg{entry-label}}.

The actual location list is encapsulated with:
\cmddef{glsxtrbookindexlocation}
for top-level entries and:
\cmddef{glsxtrbookindexsublocation}
for sub-entries. These both just do \meta{location list} by default.

The separator used between a top-level parent and child entry is
given by:
\cmddef{glsxtrbookindexparentchildsep}
This defaults to \csfmt{nopagebreak}.

The separator used between a sub-level parent and child entry is
given by:
\cmddef{glsxtrbookindexparentsubchildsep}
This defaults to \gls{glsxtrbookindexparentchildsep}.

The separator between top-level entries is given by:
\cmddef{glsxtrbookindexbetween}
This comes after the entry given by \meta{entry1-label}, if the entry
has no children, or after the last descendent otherwise,
so it always comes immediately before the entry given
by \meta{entry2-label} unless the entry occurs at the start of
a group. This does nothing by default.

The separator between two level~1 entries is given by:
\cmddef{glsxtrbookindexsubbetween}

The separator between two level~2 entries is given by:
\cmddef{glsxtrbookindexsubsubbetween}

At the end of each letter \idx{group}, the following hooks
are done in order:
\cmddef{glsxtrbookindexsubsubatendgroup}
where \meta{entry-label} is the label of the last level~2 entry
\cmddef{glsxtrbookindexsubatendgroup}
where \meta{entry-label} is the label of the last level~1 entry
\cmddef{glsxtrbookindexatendgroup}
where \meta{entry-label} is the label of the last level~0 entry.

For example, the resource option \resourceoptval{seealso}{omit}
instructs \app{bib2gls} to omit the \gloskey{seealso} cross-reference
from the \idx{locationlist}. (The \gloskey{see} cross-reference
will still be added unless you also have \resourceoptval{see}{omit}.)
The \gloskey{seealso} cross-reference can instead be appended after
the child entries using:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrbookindexatendgroup}}[1]\marg{\comment{}
  \gls{glsxtrifhasfield}\marg{\gloskey{seealso}}\marg{\#1}\comment{}
  \marg{\gls{glstreesubitem}\gls{glsxtruseseealso}\marg{\#1}}\marg{}\comment{}
}
\cmd{renewcommand}\marg{\gls{glsxtrbookindexbetween}}[2]\marg{\comment{}
  \gls{glsxtrbookindexatendgroup}\marg{\#1}\comment{}
}%
\codepar
\cmd{renewcommand}\marg{\gls{glsxtrbookindexsubatendgroup}}[1]\marg{\comment{}
  \gls{glsxtrifhasfield}\marg{\gloskey{seealso}}\marg{\#1}\comment{}
  \marg{\gls{glstreesubsubitem}\gls{glsxtruseseealso}\marg{\#1}}\marg{}\comment{}
}
\codepar
\cmd{renewcommand}\marg{\gls{glsxtrbookindexsubbetween}}[2]\marg{\comment{}
  \gls{glsxtrbookindexsubatendgroup}\marg{\#1}\comment{}
}
\codepar
\cmd{renewcommand}\marg{\gls{glsxtrbookindexsubsubatendgroup}}[1]\marg{\comment{}
  \gls{glsxtrifhasfield}\marg{\gloskey{seealso}}\marg{\#1}\comment{}
  \marg{\gls{glstreeitem}\cmd{hspace}*\marg{40pt}\gls{glsxtruseseealso}\marg{\#1}}\marg{}\comment{}
}
\codepar
\cmd{renewcommand}\marg{\gls{glsxtrbookindexsubsubbetween}}[2]\marg{\comment{}
  \gls{glsxtrbookindexsubsubatendgroup}\marg{\#1}\comment{}
}
\end{codebox}
This uses \gls{glstreesubitem} and \gls{glstreesubsubitem}
to indent the cross-reference according to the next level down,
so the cross-reference for a top-level entry is aligned with
the sub-entries, and a level~1 entry has its cross-reference
aligned with sub-sub-entries. In the event that a level~2
entry has a cross-reference, this is indented a bit further
(but it won't be aligned with any deeper level as the
\glostyle{bookindex} style only supports a maximum of two
sub-levels).

As from version 1.54, the \glostyle{bookindex} style uses
\gls{glstreesubsubitem} indirectly via:
\cmddef{glsxtrbookindexsubsubitem}
The argument \meta{level} will be 2 or more. This simply expands to
\gls{glstreesubsubitem}, ignoring its argument, but may be redefined
if required.

The \glostyle{bookindex} style uses group headings. (If you
use \app{bib2gls} remember to invoke it with the \switch{group}
or \switch{g} switch, see \sectionref{sec:printunsrtgroups}.) The heading will use:
\cmddef{glsxtrbookindexbookmark}
If \gls{pdfbookmark} has been defined, this will
use that command to bookmark the group title. If
\optval{section}{chapter} is set (default if chapters are defined)
then this uses level~1 otherwise it uses level~2. You can
redefine this command if this isn't appropriate.
If \gls{pdfbookmark} hasn't been defined, this command does nothing.

The group heading is formatted according to:
\cmddef{glsxtrbookindexformatheader}
which is defined as:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrbookindexformatheader}}[1]\marg{\comment{}
  \cmd{par}\marg{\cmd{centering}\gls{glstreegroupheaderfmt}\marg{\#1}\cmd{par}}\comment{}
}
\end{codebox}
where \gls{glstreegroupheaderfmt} is provided by the
\sty{glossary-tree} package, which is automatically loaded.
Note that the entry names aren't encapsulated with
\gls{glstreenamefmt}.

The skip after a \idx{group} header is given by:
\cmddef{glsxtrbookindexpregroupskip}
The argument is the skip that would normally be inserted if there
wasn't a group header.

The \sty{glossary-bookindex} package provides some supplementary
commands that aren't used by default, but may be used when
adjusting the style. These commands should only be
used within one of the \csfmt{print\ldots glossary} commands.
(That is, they should only be used in \idxpl{glossarystyle} or in
hooks.)
\cmddef{glsxtrbookindexmarkentry}
This writes information to the \ext{aux} file that
can be read on the next run to obtain the first and last entry on
each page of the glossary.

You can display the first entry associated with the current page using:
\cmddef{glsxtrbookindexfirstmark}
and the last entry associated with the current page using:
\cmddef{glsxtrbookindexlastmark}
These do nothing if there are no entries marked on the current page
(or if the document build isn't up to date).

The entry is formatted using:
\cmddef{glsxtrbookindexfirstmarkfmt}
for the first instance and
\cmddef{glsxtrbookindexlastmarkfmt}
for the last.

These commands are designed for use in page headers or footers
where the page number is stable. For example, \gls{glsxtrbookindexname}
can be redefined to mark the current entry:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrbookindexname}}[1]\marg{\comment{}
  \gls{glsxtrbookindexmarkentry}\marg{\#1}\comment{}
  \gls{glossentryname}\marg{\#1}\comment{}
}
\end{codebox}
If you only want to mark the top-level entries, remember
to redefine \gls{glsxtrbookindexsubname} as it defaults
to \gls{glsxtrbookindexname}:
\begin{codebox}
\gls{renewcommand}\marg{\gls{glsxtrbookindexsubname}}[1]\marg{\comment{}
  \gls{glossentryname}\marg{\#1}\comment{}
}
\end{codebox}

Then if you're using \sty{fancyhdr} you can set the page style
to show the first and last entry for the current page with:
\begin{codebox}
\cmd{pagestyle}\marg{fancy}\comment{}
\cmd{lhead}\marg{\gls{thepage}}\comment{}
\cmd{lfoot}\marg{\gls{glsxtrbookindexfirstmark}}\comment{}
\cmd{cfoot}\marg{}\comment{}
\cmd{rfoot}\marg{\gls{glsxtrbookindexlastmark}}\comment{}
\end{codebox}
\glsendrange{opt.glostyle.bookindex,pkg.glossary-bookindex}%

\subsection{\stytext{glossary-longextra} package}
\label{sec:longextra}

\glsstartrange{pkg.glossary-longextra}%
The \inlineglsdef{pkg.glossary-longextra} package provides additional
\env{tabular}-like styles similar to those provided by
\sty{glossary-longbooktabs} (which is automatically loaded). These don't support
\idxpl{hierarchicallevel} except for homographs (level~1 entries
with the same name as their parent).

By default, these styles use the
\env{longtable} environment, but if you know that your \idx{glossary} won't
span more than a page and you need to use it in a context that's
incompatible with \env{longtable}, you can instead setup these styles
to use \env{tabular} instead. In order to do this you must use:
\cmddef{GlsLongExtraUseTabulartrue}
\emph{before the style is set}. If you later want to switch back to
using \env{longtable} for another \idx{glossary}, use:
\cmddef{GlsLongExtraUseTabularfalse}
(or scope \gls{GlsLongExtraUseTabulartrue}). Again, the style must
be set after this change to the conditional is implemented. You can
test this setting with:
\cmddef{ifGlsLongExtraUseTabular}

For example:
\begin{codebox}
\gls{GlsLongExtraUseTabulartrue}
\gls{setglossarystyle}\marg{\glostyle{long-name-desc}}
\end{codebox}
or
\begin{codebox}
\gls{GlsLongExtraUseTabulartrue}
\gls{printunsrtglossary}\oarg{\printglossoptval{style}{\glostyle{long-name-desc}}}
\end{codebox}
If you switch to \env{tabular}, the default vertical
alignment is obtained from:
\cmddef{glslongextraTabularVAlign}
This should expand to one of: \code{c} (centred), \code{t} (top) or
\code{b} (bottom). The default is \code{c}.

For either \env{tabular} or \env{longtable}, the column titles are
formatted according to:
\cmddef{glslongextraHeaderFmt}
which simply does \code{\cmd{textbf}\margm{text}} by default.
As with the \glostyle{long}-like styles, the header text for the
columns are given by the language-sensitive commands:
\gls{entryname}, \gls{descriptionname}, \gls{symbolname} and
\gls{pagelistname}.

Most styles show the \gloskey{name} which, as with other predefined
styles, also includes the entry item number (if \opt{entrycounter} is
on) and hypertarget anchor. These are all performed for top-level
entries with:
\cmddef{glslongextraNameFmt}
This uses \gls{glossentryname}, so it supports the
\idx{postnamehook} and associated attributes. Child entries are
displayed with:
\cmddef{glslongextraSubNameFmt}
This includes the sub-entry item number (if \opt{subentrycounter} is
on) and the hypertarget anchor. The actual name isn't shown by
default.

The horizontal alignment for the name column is obtained with:
\cmddef{glslongextraNameAlign}
This expands to \code{l} by default.

For styles that show the \gloskey{description}, that's formatted
with:
\cmddef{glslongextraDescFmt}
for top-level entries, which uses \gls{glossentrydesc} and the
\idx{postdeschook}, and
\cmddef{glslongextraSubDescFmt}
for child entries (which just uses \gls{glslongextraDescFmt}).

The horizontal alignment for the description column is obtained with:
\cmddef{glslongextraDescAlign}
This expands to
\code{>\marg{\cmd{raggedright}}p\marg{\gls{glsdescwidth}}} by default.
This means ragged-right paragraph style with width given by
\gls{glsdescwidth}.
(See the documentation for the \sty{array} package for information
about this alignment syntax.) If a widest name has been set,
\gls{glsdescwidth} will be calculated according to the best fit for
the given style.

If you are using \app{bib2gls}, you may be able to use the
\resourceopt{set-widest} option, otherwise to set the widest name, use:
\cmddef{glslongextraSetWidest}
If you have already used \gls{glssetwidest} provided with the \glostyle{alttree}
style, the default widest name will be obtained from that, but note
that only level~0 is supported for the \sty{glossary-longextra}
styles.

You can update the widest name with:
\cmddef{glslongextraUpdateWidest}
This is like \gls{glslongextraSetWidest} but will only set the new
value if it's wider than the current widest name.

Although these styles don't support hierarchy, the following is
provided for child entries:
\cmddef{glslongextraUpdateWidestChild}
This does nothing by default. If \gls{glslongextraSubNameFmt} is
redefined to show the child name, then the above command will need
to be redefined to use \gls{glslongextraUpdateWidest}.

For styles that show the \idx{locationlist}, that's formatted
with:
\cmddef{glslongextraLocationFmt}
for top-level entries. Child \idxpl{locationlist} are formatted
with:
\cmddef{glslongextraSubLocationFmt}
Both of these simply do the \meta{location list} argument.

The horizontal alignment for the \idx{locationlist} column is obtained with:
\cmddef{glslongextraLocationAlign}
This expands to
\code{>\marg{\cmd{raggedright}}p\marg{\gls{glspagelistwidth}}} by default.
This means ragged-right paragraph style with width given by
\gls{glspagelistwidth}.

For styles that show the \gloskey{symbol} (in addition to the
\gloskey{name}), that's formatted with:
\cmddef{glslongextraSymbolFmt}
for top-level entries. This simply uses \gls{glossentrysymbol}.
Child entries use:
\cmddef{glslongextraSubSymbolFmt}
which uses \gls{glslongextraSymbolFmt}.

The horizontal alignment for the symbol column (except for the
\glostyle{long-sym-desc} and \glostyle{long-desc-sym} styles) is obtained with:
\cmddef{glslongextraSymbolAlign}
This expands to \code{c} by default.

Top-level \idx{group} headings are formatted with:
\cmddef{glslongextraGroupHeading}
The first argument is the total number of columns in the table. For
example, 2 for the \glostyle{long-name-desc} style or 3 for the
\glostyle{long-name-sym-desc} style. The second argument is the
\idx{group}['s] label (not the title). This command does nothing by
default. (If you are using \app{bib2gls}, remember that you need to
use the \switch{group} or \switch{g} switch to support
\idxpl{group}.)

Sub-level \idxpl{group} are only supported with the \idx{unsrtfam}
(see \sectionref{sec:printunsrtgroups}). When they are supported,
the heading will be formatted with:
\cmddef{glslongextraSubGroupHeading}

The styles are sub-divided below into the set of elements that are shown in each
column, which may consist of: \gloskey{name}, \gloskey{symbol},
\gloskey{description} or \idx{locationlist}.  There will be
blank cells if any of the corresponding fields have not been set or
if the \idx{locationlist} has been suppressed.

\subsubsection{Name and Description Only}
\label{sec:longextranamedesc}

These styles don't display the symbol or \idx{locationlist},
regardless of whether or not they have been set. In each case, the
style starts with:
\cmddef{glslongextraSetDescWidth}
which updates \gls{glsdescwidth} according to the widest name,
identified with \gls{glslongextraSetWidest}. The column header
text is also taken into account. If a widest name hasn't been set
and the column header is shorter than one or more names, the
description column may be too wide.
The value of \gls{glsdescwidth} is calculated as
$\gls{linewidth}-4\gls{tabcolsep}-W$, where $W$ is the width of
the widest name.

If you want to set \gls{glsdescwidth} to a specific value, then redefine
\gls{glslongextraSetDescWidth} with the desired length assignment.

\optiondef{glostyle.long-name-desc}
This has two columns: the name on the left and the description on
the right.
The table header is given by:
\cmddef{glslongextraNameDescTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraNameDescTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraNameDescHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-desc-name}
This has two columns: the name on the right and the description on
the left.
The table header is given by:
\cmddef{glslongextraDescNameTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraDescNameTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraDescNameHeader}
which uses the above header and footer commands.

\subsubsection{Name, Symbol and Description Only}
\label{sec:longextranamesymdesc}

These styles don't show the \idx{locationlist}. In each case, the
style starts with:
\cmddef{glslongextraSymSetDescWidth}
which updates \gls{glsdescwidth} according to the widest name,
identified with \gls{glslongextraSetWidest}. This starts by
calculating \gls{glsdescwidth} with \gls{glslongextraSetDescWidth}
and then subtracts the width of the symbol column header text (which
is assumed to be the widest text in that column).

If you want to set \gls{glsdescwidth} to a specific value, then redefine
\gls{glslongextraSymSetDescWidth} with the desired length assignment.

\optiondef{glostyle.long-name-desc-sym}
This has three columns: the name on the left, the description in the
middle and the symbol on the right.
The table header is given by:
\cmddef{glslongextraNameDescSymTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraNameDescSymTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraNameDescSymHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-name-sym-desc}
This has three columns: the name on the left, the symbol in the
middle and the description on the right.
The table header is given by:
\cmddef{glslongextraNameSymDescTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraNameSymDescTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraNameSymDescHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-sym-desc-name}
This has three columns: the name on the right, the description in the
middle and the symbol on the left.
The table header is given by:
\cmddef{glslongextraSymDescNameTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraSymDescNameTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraSymDescNameHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-desc-sym-name}
This has three columns: the name on the right, the symbol in the
middle and the description on the left.
The table header is given by:
\cmddef{glslongextraDescSymNameTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraDescSymNameTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraDescSymNameHeader}
which uses the above header and footer commands.

\subsubsection{Name, Description and Location Only}
\label{sec:longextranamedescloc}

These styles don't display the symbol, regardless of whether or not
the \gloskey{symbol} field has been set. In each case, the
style starts with:
\cmddef{glslongextraLocSetDescWidth}
which updates \gls{glsdescwidth} according to the widest name,
identified with \gls{glslongextraSetWidest}. This starts by
calculating \gls{glsdescwidth} with \gls{glslongextraSetDescWidth}
and then subtracts 2\gls{tabcolsep}\textminus\gls{glspagelistwidth}.

If you want to set \gls{glsdescwidth} to a specific value, then redefine
\gls{glslongextraLocSetDescWidth} with the desired length assignment.


\optiondef{glostyle.long-name-desc-loc}
This has three columns: the name on the left, the description in the
middle and the \idx{locationlist} on the right.
The table header is given by:
\cmddef{glslongextraNameDescLocationTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraNameDescLocationTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraNameDescLocationHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-loc-desc-name}
This has three columns: the name on the right, the description in the
middle and the \idx{locationlist} on the left.
The table header is given by:
\cmddef{glslongextraLocationDescNameTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraLocationDescNameTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraLocationDescNameHeader}
which uses the above header and footer commands.

\subsubsection{Name, Description, Symbol and Location}
\label{sec:longextranamedescsymloc}

These styles show the name, description, symbol and
\idx{locationlist}. In each case, the
style starts with:
\cmddef{glslongextraSymLocSetDescWidth}
which updates \gls{glsdescwidth} according to the widest name,
identified with \gls{glslongextraSetWidest}. This starts by
calculating \gls{glsdescwidth} with \gls{glslongextraSymSetDescWidth}
and then subtracts $2\gls{tabcolsep}-\gls{glspagelistwidth}$.

If you want to set \gls{glsdescwidth} to a specific value, then redefine
\gls{glslongextraSymLocSetDescWidth} with the desired length assignment.


\optiondef{glostyle.long-name-desc-sym-loc}
This has four columns, from left to right: the name, description,
symbol and the \idx{locationlist}.
The table header is given by:
\cmddef{glslongextraNameDescSymLocationTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraNameDescSymLocationTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraNameDescSymLocationHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-name-sym-desc-loc}
This has four columns, from left to right: the name,
symbol, description and the \idx{locationlist}.
The table header is given by:
\cmddef{glslongextraNameSymDescLocationTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraNameSymDescLocationTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraNameSymDescLocationHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-loc-sym-desc-name}
This has four columns, from left to right: the \idx{locationlist},
symbol, description and the name.
The table header is given by:
\cmddef{glslongextraLocationSymDescNameTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraLocationSymDescNameTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraLocationSymDescNameHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-loc-desc-sym-name}
This has four columns, from left to right: the \idx{locationlist}, 
description, symbol and the name.
The table header is given by:
\cmddef{glslongextraLocationDescSymNameTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraLocationDescSymNameTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraLocationDescSymNameHeader}
which uses the above header and footer commands.

\subsubsection{Symbol and Description Only}
\label{sec:longextrasymdesc}

These are two-column styles designed to show only the symbol and
description. However, if the \gloskey{symbol} isn't set then the
name will be used instead. If this occurs, you may need to change
the width of the description column.

The horizontal alignment for the symbol column is obtained with:
\cmddef{glslongextraSymbolNameAlign}
which expands to \code{l} by default. Note that this is different
from the alignment used for styles like
\glostyle{long-name-sym-desc}.

These styles have the entry item number (if \opt{entrycounter} is
on) and the hypertarget anchor (if enabled) in the symbol column
since there's no name shown (unless the symbol is missing). 
These are all performed by for
top-level entries by:
\cmddef{glslongextraSymbolTargetFmt}
The symbol is formatted according to \gls{glslongextraSymbolFmt}.
Child entries use:
\cmddef{glslongextraSubSymbolTargetFmt}
Unlike \gls{glslongextraSubNameFmt} this shows the field value
(formatted with \gls{glslongextraSymbolFmt}).

The following commands use the above if the \gloskey{symbol} field
is set, otherwise they show the name.

\cmddef{glslongextraSymbolOrName}
Shows the symbol, if set, or the name otherwise, with the target.
Child entries use:
\cmddef{glslongextraSubSymbolOrName}
Shows the symbol with \gls{glslongextraSubSymbolTargetFmt}, if set,
or the name otherwise, with the target.

In each case, the style starts with:
\cmddef{glslongextraSymNoNameSetDescWidth}
which calculates \gls{glsdescwidth} as
$\gls{linewidth}-4\gls{tabcolsep}-W$, where $W$ is the
width of the symbol column header. Note that this assumes the
content of the symbol column isn't wider than the column header.

If you want to set \gls{glsdescwidth} to a specific value, then redefine
\gls{glslongextraSymNoNameSetDescWidth} with the desired length assignment.
For example, if you have a mixture of entries with symbols and some
without, which means that there will be a name shown that's wider
than the symbol column header, then set the widest name (for
example, with the \resourceopt{set-widest} resource option) and add
the following redefinition:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glslongextraSymNoNameSetDescWidth}}\marg{\comment{}
 \gls{glslongextraSetDescWidth}
}
\end{codebox}
Note that, in this case, if you don't set the widest name then the
description column will end up even wider (and therefore cause the
table to be even wider) if the name header is narrower than the
symbol header.

\optiondef{glostyle.long-sym-desc}
The symbol is in the left column (or the name, if the symbol isn't
set). The description is in the right.
The \idx{locationlist} isn't shown.
The table header is given by:
\cmddef{glslongextraSymDescTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraSymDescTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraSymDescHeader}
which uses the above header and footer commands.

\optiondef{glostyle.long-desc-sym}
The symbol is in the right column (or the name, if the symbol isn't
set). The description is in the left.
The \idx{locationlist} isn't shown.
The table header is given by:
\cmddef{glslongextraDescSymTabularHeader}
which shows the column headers with horizontal rules.
The table footer is given by:
\cmddef{glslongextraDescSymTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraDescSymHeader}
which uses the above header and footer commands.

\subsubsection{Abbreviations Only}
\label{sec:longextraabbr}

These styles are designed for abbreviations. They display the short
and long forms, rather than the name and description, although these
may happen to match. They are primarily intended for
\idxpl{mini-glossary} or similar summary lists.

Although these styles don't show the name or description, they still
use some of the name and description settings provided by
\sty{glossary-longextra}.
The column for the short form uses the same alignment as for the
name columns (\gls{glslongextraNameAlign}). The column for the
long form uses the same alignment as for the description columns
(\gls{glslongextraDescAlign}) and has the width set to \gls{glsdescwidth}.
However, the name and description formatting commands or attributes
(such as \gls{glsnamefont}, \catattr{glossnamefont} or
\catattr{glossname}) aren't used as the formatting is left to the
abbreviation style. 

If the \gloskey{short} field hasn't been set, the short column will
show the name instead, and if the \gloskey{long} field hasn't been
set, the long column will show the description instead (using the
same commands as for styles like \glostyle{long-name-desc}, which do
use the associated formatting commands and attributes).

These styles use the following commands:
\cmddef{glslongextraShortHeader}
The header for the column showing the short form. This is defined as:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glslongextraShortHeader}}\marg{\gls{entryname}}
\end{compactcodebox}

\cmddef{glslongextraLongHeader}
The header for the column showing the long form. This is defined as:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glslongextraLongHeader}}\marg{\comment{}
 \gls{descriptionname}}
\end{compactcodebox}

\cmddef{glslongextraShortTargetFmt}
This governs the way that the short form should be displayed,
including the target. This is defined as:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glslongextraShortTargetFmt}}[1]\marg{\comment{}
 \gls{glsentryitem}\marg{\#1}\comment{}
 \gls{glstarget}\marg{\#1}
  \marg{\marg{\gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}}}\comment{}
 \gls{glsxtrpostnamehook}\marg{\#1}%
}
\end{compactcodebox}
Note that the \idx{postnamehook} is included.

\cmddef{glslongextraLongFmt}
This governs the way that the long form should be displayed. This is defined as:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glslongextraLongFmt}}[1]\marg{\comment{}
 \marg{\gls{glsxtrlong}
  \oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}}\gls{glspostdescription}
}
\end{compactcodebox}
Note that the \idx{postdeschook} is included.

\cmddef{glslongextraSubShortTargetFmt}
This governs the way that the short form for child entries should be
displayed, including the target. This is defined as:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glslongextraSubShortTargetFmt}}[2]\marg{\comment{}
 \gls{glssubentryitem}\marg{\#2}\comment{}
 \gls{glstarget}\marg{\#2}
  \marg{\marg{\gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#2}}}\comment{}
 \gls{glsxtrpostnamehook}\marg{\#2}%
}
\end{compactcodebox}

\cmddef{glslongextraSubLongFmt}
This governs the way that the long form for child entries should be
displayed. This is defined as:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glslongextraSubLongFmt}}[2]\marg{\comment{} 
 \gls{glslongextraLongFmt}\marg{\#2}}
\end{compactcodebox}

\cmddef{glslongextraShortNoNameSetDescWidth}
This is used to compute the value of \gls{glsdescwidth} and assumes
that none of the short forms are wider than 
\gls{glslongextraShortHeader}.

\optiondef{glostyle.abbr-short-long}
A two column style.
The short form is in the left column. The long form is in the right.
The \idx{locationlist} isn't shown.

The table header is given by:
\cmddef{glslongextraShortLongTabularHeader}
which shows the column headers with horizontal rules.

The table footer is given by:
\cmddef{glslongextraShortLongTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraShortLongHeader}
which uses the above header and footer commands.

\optiondef{glostyle.abbr-long-short}
A two column style.
The short form is in the right column. The long form is in the left.
The \idx{locationlist} isn't shown.

The table header is given by:
\cmddef{glslongextraLongShortTabularHeader}
which shows the column headers with horizontal rules.

The table footer is given by:
\cmddef{glslongextraLongShortTabularFooter}
which just does a horizontal rule.
With \env{longtable}, the table header and footer are set with:
\cmddef{glslongextraLongShortHeader}
which uses the above header and footer commands.

\subsubsection{Custom Fields}
\label{sec:longextracustom}

These styles allow one, two or three custom columns in addition to
the name column. The \qt{custom1} styles indicate one custom column,
the \qt{custom2} styles indicate two custom columns, and the
\qt{custom3} styles indicate three custom columns. Some styles also
include the description column. These styles don't display the
location. However, if you are using \app{bib2gls} you can set one of
the custom fields to \gloskey{location}, but if you have long
\idxpl{locationlist} you may need to change the corresponding
alignment command to switch to a paragraph column.

\begin{information}
The \qt{first custom column} means the first of the custom columns,
which may not be the first column in the table. Similarly the
\qt{second custom column} means the second of the custom columns (if
supported by the style), and the \qt{third custom column} means the
third of the custom columns (if supported by the style).
\end{information}

\cmddef{glslongextraCustomIField}
Expands to the \idx{internalfieldlabel} for the first custom column.
This will be used in the \qt{custom1}, \qt{custom2} and \qt{custom3}
styles.

\cmddef{glslongextraCustomIIField}
Expands to the \idx{internalfieldlabel} for the second custom column.
This will be used in the \qt{custom2} and \qt{custom3} styles.

\cmddef{glslongextraCustomIIIField}
Expands to the \idx{internalfieldlabel} for the third custom column.
This will be used in the \qt{custom3} style.

\cmddef{glslongextraCustomIHeader}
Expands to the header text for the first custom column. The default
definition is:
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glslongextraCustomIField}}
\end{compactcodebox}
which means that it will be \qt{Useri} by default, which is unlikely
to be appropriate, but it may be suitable if you change the first
custom field.

\cmddef{glslongextraCustomIIHeader}
Expands to the header text for the second custom column. The default
likewise simply applies \idx{sentencecase} to the
\idx{internalfieldlabel}.

\cmddef{glslongextraCustomIIIHeader}
Expands to the header text for the third custom column. The default
likewise simply applies \idx{sentencecase} to the
\idx{internalfieldlabel}.

\cmddef{glslongextraCustomIFmt}
This is used to format each top-level entry in the first custom column. The
default definition is:
\begin{compactcodebox}
\gls{glsxtrusefield}\margm{entry-label}\marg{\gls{glslongextraCustomIField}}
\end{compactcodebox}

\cmddef{glslongextraSubCustomIFmt}
This is used to format each sub-entry in the first custom column. The
default definition is:
\begin{compactcodebox}
\gls{glslongextraCustomIFmt}\margm{entry-label}
\end{compactcodebox}

\cmddef{glslongextraCustomIIFmt}
This is used to format each top-level entry in the second custom column. The
default definition is:
\begin{compactcodebox}
\gls{glsxtrusefield}\margm{entry-label}\marg{\gls{glslongextraCustomIIField}}
\end{compactcodebox}

\cmddef{glslongextraSubCustomIIFmt}
This is used to format each sub-entry in the second custom column. The
default definition is:
\begin{compactcodebox}
\gls{glslongextraCustomIIFmt}\margm{entry-label}
\end{compactcodebox}

\cmddef{glslongextraCustomIIIFmt}
This is used to format each top-level entry in the third custom column. The
default definition is:
\begin{compactcodebox}
\gls{glsxtrusefield}\margm{entry-label}\marg{\gls{glslongextraCustomIIIField}}
\end{compactcodebox}

\cmddef{glslongextraSubCustomIIIFmt}
This is used to format each sub-entry in the third custom column. The
default definition is:
\begin{compactcodebox}
\gls{glslongextraCustomIIIFmt}\margm{entry-label}
\end{compactcodebox}

\cmddef{glslongextraCustomIAlign}
Expands to the alignment specifier for the first custom column.

\cmddef{glslongextraCustomIIAlign}
Expands to the alignment specifier for the second custom column.

\cmddef{glslongextraCustomIIIAlign}
Expands to the alignment specifier for the third custom column.

\cmddef{glslongextraCustomTabularFooter}
The footer used for all the custom styles. The default definition
simply does \gls{bottomrule}.

\cmddef{glslongextraNameCustomITabularHeader}
The table header for the \glostyle{long-name-custom1} style (which has two columns).
This command and the previous command are used in the following.

\cmddef{glslongextraNameCustomIHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-name-custom1} style.

\cmddef{glslongextraCustomINameTabularHeader}
The table header for the \glostyle{long-custom1-name} style (which has two columns).
Used in the following.

\cmddef{glslongextraCustomINameHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-custom1-name} style.

\cmddef{glslongextraNameCustomIITabularHeader}
The table header for the \glostyle{long-name-custom2} style (which
has three columns). Used in the following.

\cmddef{glslongextraNameCustomIIHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-name-custom2} style.

\cmddef{glslongextraCustomIINameTabularHeader}
The table header for the \glostyle{long-custom2-name} style (which
has three columns). Used in the following.

\cmddef{glslongextraCustomIINameHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-custom2-name} style.

\cmddef{glslongextraNameCustomIIITabularHeader}
The table header for the \glostyle{long-name-custom3} style (which
has four columns). Used in the following.

\cmddef{glslongextraNameCustomIIIHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-name-custom3} style.

\cmddef{glslongextraCustomIIINameTabularHeader}
The table header for the \glostyle{long-custom3-name} style (which
has four columns). Used in the following.

\cmddef{glslongextraCustomIIINameHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-custom3-name} style.

\optiondef{glostyle.long-name-custom1}
A two column style with the name in the first column and the first
custom field in the second. For top-level entries, the name is formatted with
\gls{glslongextraNameFmt} and the custom field is formatted with
\gls{glslongextraCustomIFmt}. Sub-entries use
\gls{glslongextraSubNameFmt} and \gls{glslongextraSubCustomIFmt}.

\optiondef{glostyle.long-custom1-name}
As \glostyle{long-name-custom1} but with the name in the last
column.

\optiondef{glostyle.long-name-custom2}
A three column style with the name in the first column, the first
custom field in the second and the second custom field in the third.
As \glostyle{long-name-custom1}, but additionally the second custom
field is formatted with \gls{glslongextraCustomIIFmt} for top-level
entries and with \gls{glslongextraSubCustomIIFmt} for child-entries.

\optiondef{glostyle.long-custom2-name}
As \glostyle{long-name-custom2} but with the name in the last
column.

\optiondef{glostyle.long-name-custom3}
A four column style with the name in the first column, the first
custom field in the second, the second custom field in the third,
and the third custom field in the fourth.
As \glostyle{long-name-custom2}, but additionally the third custom
field is formatted with \gls{glslongextraCustomIIIFmt} for top-level
entries and with \gls{glslongextraSubCustomIIIFmt} for child-entries.

\optiondef{glostyle.long-custom3-name}
As \glostyle{long-name-custom3} but with the name in the last
column.

The following styles also have a description column, which uses
\gls{glslongextraDescAlign} for the column alignment. These styles
attempt to calculate an appropriate width for \gls{glsdescwidth}.

\cmddef{glslongextraCustomISetDescWidth}
Sets \gls{glsdescwidth} for the \glostyle{long-name-custom1-desc} style.
This first uses \gls{glslongextraSetDescWidth} to calculate the
width $W$ if there were only a name and description column. It then
measures the width of the first custom column header $w$ and sets
\gls{glsdescwidth} to $w - 2\gls{tabcolsep} - w$. This assumes that
the first custom column header is wider than the value of each entry's
first custom field. If this isn't the case, then you will need to
redefined this command as appropriate.

\cmddef{glslongextraCustomIISetDescWidth}
Sets \gls{glsdescwidth} for the \glostyle{long-name-custom2-desc} style.
This first uses \gls{glslongextraCustomISetDescWidth} to calculate
the width $W$ if there were only a name column, first custom column,
and description column. It then measures the width of the second
custom column header $w$ and sets \gls{glsdescwidth} to 
$w - 2\gls{tabcolsep} - w$. This assumes that the second custom column header is
wider than the value of each entry's second custom field. If this
isn't the case, then you will need to redefined this command as
appropriate.

\cmddef{glslongextraCustomIIISetDescWidth}
Sets \gls{glsdescwidth} for the \glostyle{long-name-custom3-desc} style.
This first uses \gls{glslongextraCustomIISetDescWidth} to calculate
the width $W$ if there were only a name column, first custom column,
second custom column, and description column. It then measures the
width of the third custom column header $w$ and sets \gls{glsdescwidth} to 
$w - 2\gls{tabcolsep} - w$. This assumes that the third custom column header is
wider than the value of each entry's third custom field. If this
isn't the case, then you will need to redefined this command as
appropriate.

\cmddef{glslongextraNameCustomIDescTabularHeader}
The table header for the \glostyle{long-name-custom1-desc} style 
(which has three columns). Used in the following.

\cmddef{glslongextraNameCustomIDescHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-name-custom1-desc} style.

\cmddef{glslongextraDescCustomINameTabularHeader}
The table header for the \glostyle{long-desc-custom1-name} style 
(which has three columns). Used in the following.

\cmddef{glslongextraDescCustomINameHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-desc-custom1-name} style.

\cmddef{glslongextraNameCustomIIDescTabularHeader}
The table header for the \glostyle{long-name-custom2-desc} style 
(which has four columns). Used in the following.

\cmddef{glslongextraNameCustomIIDescHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-name-custom2-desc} style.

\cmddef{glslongextraDescCustomIINameTabularHeader}
The table header for the \glostyle{long-desc-custom2-name} style 
(which has four columns). Used in the following.

\cmddef{glslongextraDescCustomIINameHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-desc-custom2-name} style.

\cmddef{glslongextraNameCustomIIIDescTabularHeader}
The table header for the \glostyle{long-name-custom3-desc} style 
(which has five columns). Used in the following.

\cmddef{glslongextraNameCustomIIIDescHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-name-custom3-desc} style.

\cmddef{glslongextraDescCustomIIINameTabularHeader}
The table header for the \glostyle{long-desc-custom3-name} style 
(which has five columns). Used in the following.

\cmddef{glslongextraDescCustomIIINameHeader}
The \env{longtable} header and footer markup for the
\glostyle{long-desc-custom3-name} style.

\optiondef{glostyle.long-name-custom1-desc}
A three column style with the name in the first column, the first
custom field in the second, and the description in the third. This is
like \glostyle{long-name-custom1} but additionally has the
description column formatted as per \glostyle{long-name-desc}.

\optiondef{glostyle.long-desc-custom1-name}
As \glostyle{long-name-custom1-desc} but the name and description
columns are swapped.

\optiondef{glostyle.long-name-custom2-desc}
A four column style with the name in the first column, the first
custom field in the second, the second custom field in the third, 
and the description in the fourth. This is
like \glostyle{long-name-custom2} but additionally has the
description column formatted as per \glostyle{long-name-desc}.

\optiondef{glostyle.long-desc-custom2-name}
As \glostyle{long-name-custom2-desc} but the name and description
columns are swapped.

\optiondef{glostyle.long-name-custom3-desc}
A five column style with the name in the first column, the first
custom field in the second, the second custom field in the third,
the third custom field in the fourth, and the description in the
fifth. This is like \glostyle{long-name-custom3} but additionally
has the description column formatted as per
\glostyle{long-name-desc}.

\optiondef{glostyle.long-desc-custom3-name}
As \glostyle{long-name-custom3-desc} but the name and description
columns are swapped.

\glsendrange{pkg.glossary-longextra}%

\subsection{\stytext{glossary-topic} package}
\label{sec:topic}

\glsstartrange{pkg.glossary-topic}%
The \inlineglsdef{pkg.glossary-topic} package provides glossary
styles designed for hierarchical \idxpl{glossary} where the top-level
entries are topic titles. This package automatically loads the
\sty{multicol} package. If the \sty{glossary-tree} package is also
loaded then commands like \gls{glssetwidest} can be used on these
styles in much the same way as for the \glostyle{alttree} style. If
a widest value isn't set then these styles behave more like the
\glostyle{tree} style.

This package provides styles designed for \idxpl{glossary} that are lists
of topics. That is, the top-level entries are considered topic
titles (which may or may not have an associated symbol or
description) and the sub-entries are items within that topic. By
default the \idx{locationlist} isn't shown for the top-level entries but is
shown after the description for sub-entries (unless suppressed with
\opt{nonumberlist} or \resourceoptval{save-locations}{false}). 

The following styles are provided:
\optiondef*{glostyle.topic}
This style is similar to the \glostyle{tree}
style but the indentation doesn't start until the second
sub-item level. The top-level entries have the name displayed
in a larger font with the description following in a new paragraph
(see \exampleref{ex:topicstyle}).
This style doesn't support the \opt{nogroupskip} setting.

\newcommand{\topicexampledefs}{%
\gls{newglossaryentry}\marg{pictograph}\marg{\gloskeyval{name}{pictograph},^^J
 \gloskeyval{description}{picture or symbol representing a word or
phrase}}^^J%
\gls{newglossaryentry}\marg{copy}\marg{\gloskeyval{parent}{pictograph},^^J
 \gloskeyval{name}{\cmd{faCopy}},^^J
 \gloskeyval{description}{copy}}^^J%
\gls{newglossaryentry}\marg{cut}\marg{\gloskeyval{parent}{pictograph},^^J
 \gloskeyval{name}{\cmd{faCut}},^^J
 \gloskeyval{description}{cut}}^^J%
\gls{newglossaryentry}{edit}\marg{\gloskeyval{parent}{pictograph},^^J
\gloskeyval{name}{\cmd{faEdit}},
 \gloskeyval{description}{edit}}
\gls{newglossaryentry}{paste}\marg{\gloskeyval{parent}{pictograph},^^J
\gloskeyval{name}{\cmd{faPaste}},
 \gloskeyval{description}{paste}}
\codepar
\gls{newglossaryentry}\marg{symbols}\marg{\gloskeyval{name}{Symbols},^^J
 \gloskeyval{description}{mathematical constants or functions}}^^J%
\gls{newglossaryentry}\marg{constant}\marg{\gloskeyval{parent}{symbols},^^J
 \gloskeyval{name}{constant},^^J
 \gloskeyval{description}{a fixed quantity or numerical value}}^^J%
\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{parent}{constant},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{pi}}},^^J
 \gloskeyval{description}{ratio of the length of the circumference
    of a circle to its diameter}}^^J%
\gls{newglossaryentry}\marg{root2}\marg{\gloskeyval{parent}{constant},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{surd}2}},^^J
 \gloskeyval{description}{Pythagoras' constant}}^^J%
\gls{newglossaryentry}\marg{function}\marg{\gloskeyval{parent}{symbols},^^J
 \gloskeyval{name}{function},^^J
 \gloskeyval{description}{a rule that assigns a value to every
element of the domain}}^^J%
\gls{newglossaryentry}\marg{cosx}\marg{\gloskeyval{parent}{function},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{cos}(x)}},^^J
 \gloskeyval{description}{cosine}}^^J%
\gls{newglossaryentry}\marg{lnx}\marg{\gloskeyval{parent}{function},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{ln}(x)}},^^J
 \gloskeyval{description}{natural logarithm}}^^J%
\gls{newglossaryentry}\marg{parameter}\marg{\gloskeyval{parent}{symbols},^^J
 \gloskeyval{name}{parameter},^^J
 \gloskeyval{description}{a constant or variable that distinguishes
a specific form}}^^J%
\gls{newglossaryentry}\marg{x}\marg{\gloskeyval{parent}{parameter},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{x}},^^J
 \gloskeyval{description}{the abscissa value}}^^J%
\gls{newglossaryentry}\marg{y}\marg{\gloskeyval{parent}{parameter},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{y}},^^J
 \gloskeyval{description}{the ordinate value}}
\gls{newglossaryentry}\marg{z}\marg{\gloskeyval{parent}{parameter},^^J
 \gloskeyval{name}{\cmd{ensuremath}\marg{z}},^^J
 \gloskeyval{description}{the applicate value}}
}
\begin{resultbox}[float]
\createexample*[label={ex:topicstyle},
 title={The \optfmt{topic} style},
 description={Example document demonstrating the topic style}]
{%
\cmd{usepackage}\marg{fontawesome}^^J%
\cmd{usepackage}\oarg{\opt{postdot},\optval{stylemods}{topic},\optval{style}{\glostyle{topic}}}\marg{glossaries-extra}^^J%
\topicexampledefs
}
{\gls{printunsrtglossaries}}
\end{resultbox}

\optiondef*{glostyle.topicmcols}
This style is like the \glostyle{topic}
style but the sub-entries are placed inside a \env{multicols}
environment (unlike styles such as \glostyle{mcoltree} where the
entire glossary content is within a single \env{multicols}
environment). The environment name is supplied in the value of
the command:
\cmddef{glstopicColsEnv}
This defaults to \code{multicols}. You can change this to the
starred form. For example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glstopicColsEnv}}\marg{multicols*}
\end{codebox}
The number of columns is given by the command:
\cmddef{glstopicCols}
This expands to 2, by default. This style is demonstrated in
\exampleref*{ex:topicmcolsstyle}.

\begin{resultbox}[float]
\createexample*[label={ex:topicmcolsstyle},
 title={The \optfmt{topicmcols} style},
 description={Example document demonstrating the topicmcols style}]
{%
\cmd{usepackage}\marg{fontawesome}^^J%
\cmd{usepackage}\oarg{\opt{postdot},\optval{stylemods}{topic},\optval{style}{\glostyle{topicmcols}}}\marg{glossaries-extra}^^J%
\topicexampledefs
}
{\gls{printunsrtglossaries}}
\end{resultbox}


Both styles can have a widest name set like the \glostyle{alttree}
style, using the commands provided by \sty{glossary-tree} and
\sty{glossaries-extra-stylemods} or with the
\resourceopt{set-widest} resource option. If a widest name is set,
then the sub-entry names will be placed in a box of the given width
otherwise they won't be placed in a box. In
\exampleref{ex:topicmcolsstylewidest}, the widest names have been
set for level~1 and level~2 using:
\begin{codebox}
\gls{glssetwidest}\oarg{1}\marg{parameter}
\gls{glssetwidest}\oarg{2}\marg{\gls{glsentryname}\marg{cosine}}
\end{codebox}
Note that this doesn't change the indentation at the start of the
level~2 items to match the width of the level~1 widest name.

\begin{resultbox}[float]
\createexample*[label={ex:topicmcolsstylewidest},
 title={The \optfmt{topicmcols} style with the widest name set},
 description={Example document demonstrating the topicmcols style}]
{%
\cmd{usepackage}\marg{fontawesome}^^J%
\cmd{usepackage}\oarg{\opt{postdot},\optval{stylemods}{topic},\optval{style}{\glostyle{topicmcols}}}\marg{glossaries-extra}^^J%
\topicexampledefs^^J%
\gls{glssetwidest}\oarg{1}\marg{parameter}^^J%
\gls{glssetwidest}\oarg{2}\marg{\gls{glsentryname}\marg{cosine}}
}
{\gls{printunsrtglossaries}}
\end{resultbox}


Both of the above styles use the following commands.
\cmddef{glstopicParIndent}
This command is a length that's used for the paragraph indentation
in any multi-paragraph description for top-level entries, but not
for the first paragraph (at the start of the description) which
isn't indented.

\cmddef{glstopicSubIndent}
This command is a length that's used to calculate the hanging
indentation for sub-entries. The level~1 sub-entries don't indent
the name. Level~$n$ sub-entries have the name indented by
$(n-1)\times\gls{glstopicSubIndent}$. The hanging indent depends
on whether or not a widest name has been set for the level.

There is also a length for additional indentation
used in the second paragraph onwards for child entries with
multi-paragraph descriptions:
\cmddef{glstopicSubItemParIndent}
This is initialised to \gls{parindent} when \sty{glossary-topic} is
loaded.

\cmddef{glstopicInit}
This hook is used at the start of the glossary. It does nothing by
default.

Although the styles don't support letter \idxpl{group} by default, if you
have many topics (top-level entries) and you feel that it would help
the reader to divide them up into headed letter groups, you can
redefine:
\cmddef{glstopicGroupHeading}
This does nothing by default. If you want to redefine it, you can
fetch the title corresponding to the group label with
\gls{glsxtrgetgrouptitle}. For example:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glstopicGroupHeading}}[1]\marg{\comment{}
  \gls{glsxtrgetgrouptitle}\marg{\#1}\marg{\cmd{thisgrptitle}}\comment{}
  \cmd{section}*\marg{\cmd{thisgrptitle}}\comment{}
}
\end{codebox}
Remember that if you are using \app{bib2gls}, you will need the
\switch{group} or \switch{g} switch to support \idxpl{group} (see
\sectionref{sec:printunsrtgroups}).

Sub-\idxpl{group} are only
available with \app{bib2gls} and the \resourceopt{group-level}
option. If they are supported, sub-group headings are formatted
according to:
\cmddef{glstopicSubGroupHeading}
This formats the sub-group heading. Note that unlike
\gls{glstopicGroupHeading} this command does actually format the
sub-group heading by default. This means that it you use
\resourceoptval{group-level}{all}, the top-level groups won't be
displayed, but the sub-groups will be.

Top-level entries are formatted according to:
\cmddef{glstopicItem}
This formats the name and (if provided) the symbol. The description
(if set) will follow in a new paragraph. At the start of
\gls{glstopicItem}, a vertical space is added with:
\cmddef{glstopicPreSkip}
which defaults to \csfmt{medskip}. There is then a hook:
\cmddef{glstopicMarker}
which does nothing by default, but may be redefined. For example,
to add a line to the table of contents.
The name and symbol are set in the form of a title using:
\cmddef{glstopicTitle}
This uses \gls{Glossentryname} to apply \idx{sentencecase}. 
(Note, if your descriptions have paragraph breaks make sure that you
have \sty{mfirstuc} v2.09+.)

If there's a symbol, this is added in parentheses.
Both name and symbol (if present) are encapsulated by:
\cmddef{glstopicTitleFont}
This uses a bold, large font by default.

If the entry has the description key set (tested with
\gls{ifglshasdesc}) then a paragraph break is inserted followed by:
\cmddef{glstopicMidSkip}
which defaults to \csfmt{smallskip}. This is followed by the
description which is formatted according to:
\cmddef{glstopicDesc}
This just does \code{\gls{Glossentrydesc}\marg{entry-label}} followed
by the \idx{postdeschook}.
There is then a paragraph break followed by:
\cmddef{glstopicPostSkip}
regardless of whether or not the description was
displayed. This defaults to \csfmt{smallskip}. This is then followed
by:
\cmddef{glstopicLoc}
which may be used to display the \idx{locationlist}, but does nothing by
default.

The sub-entries first set up the paragraph and hanging indentations
using:
\cmddef{glstopicAssignSubIndent}
This uses:
\cmddef{glstopicAssignWidest}
to determine if a widest name has been set for the given level.

The sub-entry has its information displayed using:
\cmddef{glstopicSubItem}
This encapsulates the name with:
\cmddef{glstopicSubNameFont}
By default this just uses \csfmt{textbf}. This is followed by:
\cmddef{glstopicSubItemSep}
which defaults to \csfmt{quad}. The name and separator are
passed in the \meta{text} argument of:
\cmddef{glstopicSubItemBox}
If a widest name was set for the given level, this will
put \meta{text} inside a box of that width otherwise it just does
\meta{text}.

This is followed by the symbol in parentheses if set. Then, if the
description is set, the description and \idx{postdeschook} are
displayed followed by:
\cmddef{glstopicSubPreLocSep}
(This command isn't used if the description isn't set.)

Finally the location list is displayed using:
\cmddef{glstopicSubLoc}
which just does \meta{location} by default.
\glsendrange{pkg.glossary-topic}%

\subsection{\stytext{glossary-table} package}
\label{sec:table}

\glsstartrange{pkg.glossary-table}%
The \inlineglsdef{pkg.glossary-table} package is new to version 1.49.  
It automatically loads the \sty{longtable}, \sty{array} and 
\sty{booktabs} packages. If you want to use
\gls{glspenaltygroupskip} for the group skip, you will need to also
load \sty{glossary-longbooktabs}.

\begin{important}
This package is designed specifically for use with \app{bib2gls}.
It can be used to create a supplemental \idx{glossary} with other
\idx{indexing} options, but the entries will be listed in order of definition
and no child entries will be shown.
\end{important}

The \sty{glossary-table} package doesn't provide any general purpose
styles, but instead provides one highly customized style
(\inlineglsdef{opt.glostyle.table}), which is designed to
work with a supplied command:
\cmddef{printunsrttable}
The \glostyle{table} style should not be set with the \opt{style}
package option, \gls{setglossarystyle} or the \printglossopt{style}
option, as it's only intended for use within \gls{printunsrttable},
which sets up the appropriate hooks to allow the style to work with 
\gls{printunsrtglossary} (which is used implicitly).

Tabular styles such as \gloskey{long} create a \env{longtable} with one entry
per row and no caption. The \glostyle{longheader} style is similar
but adds a header row, and the \glostyle{long-booktabs} style includes
rules above and below the header row and at the end of the table. 
In all these \env{longtable} styles, the glossary title is outside of the style,
and is typically put in a sectioning command. Similarly, the 
glossary preamble \gls{glossarypreamble} and postamble
\gls{glossarypostamble} are outside of \env{longtable}.

The \glostyle{table} style, on the other hand, allows multiple
entries per row. The glossary title (\printglossopt{title}) is the table caption
with what's normally the table of contents title (\printglossopt{toctitle})
as the caption title for the list of tables.
Similarly, the preamble and postamble are included in the table
header and footer, instead of being outside of the table. 

This means that \gls{glossarysection}, \gls{glossarypreamble} and
\gls{glossarypostamble} are redefined by \gls{printunsrttable} to do
nothing so that they aren't shown outside of the \env{longtable} by
\gls{printunsrtglossary}, otherwise there would be a duplication of
the information in the header and footer of the table.
The \gls{printunsrtglossary} hooks are used to insert the
inter-block \idx{tab} character and new row command in the construction performed
outside of \env{longtable}, which would otherwise cause issues
if used directly in the \glostyle{table} style.

The block styles (see \sectionref{sec:blockstyles}) alter the way
the \glostyle{table} style sets up the \env{longtable} environment
and the way that the entries are formatted.  The top level
\idx{glossarystyle} command \gls{glossentry} is defined to do the
block according to the designated block style, which includes the
child entries, if the \glosfield{childcount} field has been set and
is non-zero.

\begin{information}
The \gls{subglossentry} command is redefined to do nothing, but it
won't be used as the child entries are all filtered out.  If you
don't use the \resourceopt{save-child-count} resource option, no
child entries will be shown. There's no recursive descent down the
\idxpl{hierarchicallevel}.
\end{information}

This means that the child entries will be listed in one of the 
columns in the block, according to the style. This can make the column quite wide.
The child names aren't displayed by default but the block styles support the
\opt{subentrycounter} option. The child entries are
listed in a \env{tabular} environment, which means they are
contained in the same row as their parent and can't be broken across
a page.

A \qt{block} indicates a block of columns used to format one entry
(and, optionally, its children).  One row of
the table may contain multiple blocks. For example, a block may consist
of two columns with the name in the first column and the description
in the second, or may consist of three columns with the name in the
first column, the symbol in the second, and the description in the
third. So if a block style has 3 columns, and the desired number
of blocks is set to 2, then the table will have a total of 
$3\times2=6$ columns.

The style supports up to 1 \idx{hierarchicallevel}, but you will need the
\resourceopt{save-child-count} resource option if you want the
level~1 sub-entries to show. Deeper level entries are omitted.
Sub-entries are automatically filtered by a custom hook that 
\gls{printunsrtglossaryentryprocesshook} is assigned to within
\gls{printunsrttable}. This custom hook allows additional filtering
to be employed with the command:
\cmddef{glstableiffilter}
This command should do \meta{true} if the entry identified by
\meta{entry-label} should be skipped, otherwise it should do
\meta{false}. The default definition simply does \meta{false}.

For example, the following will filter entries that
have the category set to \cat{general}:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glstableiffilter}}[1]\marg{\comment{}
 \gls{glsifcategory}\marg{\#1}\marg{general}}
\end{codebox}
Note that if this command is redefined to do neither \meta{true} nor
\meta{false} or does both, it will interfere with the width
calculations if \glstableopt{par} isn't set to the default
\glstableoptval{par}{false}.

You can use the \glstableopt{init} option to locally redefine
commands within \gls{printunsrttable}. For example:
\begin{codebox}
\gls{printunsrttable}\oarg{\glstableoptvalm{init}{\comment{}
 \cmd{renewcommand}\marg{\gls{glstableiffilter}}[1]{\comment{}
  \gls{glsifcategory}\marg{\#\#1}\marg{general}}\comment{}
}}
\end{codebox}

An extra field (the \qt{other} field) may be added with the \glstableopt{other}
key. If this value is empty, then no extra field will be added.
Some block styles, such as \glstableblockstyle{other-name}
and \glstableblockstyle{symbol-other} put
the other field in its own column. If the other field isn't set,
this will lead to an empty column.

If there isn't a designated column for the other field, then
block styles that show the description will put the other field in
before the description, but in the same column as the description.
Otherwise, block styles that don't show the description, will put the other
field after the name, but in the same column as the name.

\mExampleref{ex:table}
uses the \glstableblockstyle{name} block style,
which only has one column per block. The name is followed by the
description in parentheses (if set), which is then followed by the
child list. I redefined \gls{glstableNameFmt} to make the name appear in
bold, to highlight it.
I've used the \glstableoptval{par}{ragged} option,
otherwise the table will be too wide to fit the page.
\begin{codebox}
\cmd{usepackage} 
 [\opt{record},\optval{stylemods}{table},\opt{subentrycounter}]
 \marg{glossaries-extra}
\codepar
\gls{GlsXtrLoadResources}\oarg{
 \comment{entries in \file{example-glossaries-childnoname.bib}:}
 \resourceoptvalm{src}{example-glossaries-childnoname},
 \resourceoptval{selection}{all},
 \resourceopt{save-child-count}}
\cbeg{document}
\gls{printunsrttable}
 \oarg{
  \glstableoptval{block-style}{name},\glstableoptval{par}{ragged},
  \printglossoptvalm{preamble}{Some preamble text},
  \printglossoptvalm{postamble}{Some postamble text},
  \glstableoptvalm{init}{\comment{}
    \cmd{let}\gls{glstableNameFmt}\cmd{textbf}
    \cmd{def}\gls{glstablenameheader}\marg{Summary}\comment{}
  }
 }
\cend{document}
\end{codebox}
This creates a table with two entries per row.
\begin{resultbox}
\createexample*[label={ex:table},
title={Two entries per row with \cmd{printunsrttable}},
description={Example document with a tabular glossary with two
entries per row. The child list is in the same cell as the parent.},
arara={pdflatex,bib2gls,pdflatex,pdfcrop}
]
{%
\cmd{usepackage}[record,stylemods=table,subentrycounter]\marg{glossaries-extra}
\codepar
\gls{GlsXtrLoadResources}\oarg{^^J
 \comment{entries in example-glossaries-childnoname.bib:}
 \resourceoptvalm{src}{example-glossaries-childnoname},^^J
 \resourceoptval{selection}{all},^^J
 \resourceoptval{save-child-count}}^^J%
}
{%
\gls{printunsrttable}^^J%
 \oarg{^^J
  block-style=name,par=ragged,^^J
  preamble=\marg{Some preamble text},^^J
  postamble=\marg{Some postamble text},^^J
  init=\marg{\comment{}
    \cmd{let}\gls{glstableNameFmt}\cmd{textbf}
    \cmd{def}\gls{glstablenameheader}\marg{Summary}\comment{}
  }^^J%
 }
}
\end{resultbox}
Note that each row is as deep as the entry with the most children.
So where a row has one column with two children and another with
seven, the row is deep enough to accommodate the seven child
entries, which leaves a gap below the smaller list of two children.

\subsubsection{Child Entries}
\label{sec:tablechildren}

Entries with a \idx{hierarchicallevel} greater
than 0 are filtered out (see above). This takes the \printglossopt{leveloffset}
option into account. Child entries can be included, but only by
checking if the \glosfield{childcount} field has been set and is non-zero.
This is done by:
\cmddef{glstableChildEntries}
Note that \gls{glstableiffilter} filters top-level entries, and
their child entries will also be filtered. Child
entries for non-filtered top-level entries can be filtered by
redefining:
\cmddef{glstableiffilterchild}
where \meta{entry-label} is the child entry label. This command
should do \meta{true} if the child entry should be filtered and
\meta{false} otherwise.

If the child count is non-zero, taking both \glosfield{childcount}
and child filtering into account, then \gls{glstableChildEntries} 
command will display the non-filtered children in the form:
\begin{compactcodebox}
\gls{glstablePreChildren}
\cbeg{glstablesubentries}
\gls{glstableblocksubentry}\margm{child-1-label}
\gls{glstableblocksubentrysep}
\gls{glstableblocksubentry}\margm{child-2-label}
\ldots
\gls{glstableblocksubentrysep}
\gls{glstableblocksubentry}\margm{child-n-label}
\cend{glstablesubentries}
\end{compactcodebox}
This consists of the following.
\cmddef{glstablePreChildren}
Occurs at the start. If \glstableoptval{par}{justified} or
\glstableoptval{par}{ragged}, this will do \cmd{par} otherwise it
does nothing.

\begin{warning}
In general, it's best not to list children with
\glstableoptval{par}{false}, except with a style like
\glstableblockstyle{name} or \glstableblockstyle{name-desc} with no
description, as the table can end up too wide for the page.
\end{warning}

\envdef{glstablesubentries}
This environment encapsulates the child list. By default, this does:
\begin{compactcodebox}
\cbeg{tabular}[t]\margm{align}
\meta{content}
\cend{tabular}
\end{compactcodebox}
The \meta{align} argument is obtained by expanding:
\cmddef{glstablesubentryalign}
which takes the \glstableopt{par} setting into account.

Each child item is display using \gls{glstableblocksubentry}
which is redefined by the block style.

The separator between each child item is given by:
\cmddef{glstableblocksubentrysep}
This just expands to \gls{glstablenewline}.

\subsubsection{Options}
\label{sec:tableoptions}

The optional argument of \gls{printunsrttable} may have the options
that can typically be passed to \gls{printunsrtglossary}, except
that the \printglossopt{nonumberlist} and \printglossopt{style}
options won't have an effect. If you want the \idx{locationlist}, it
can simply be obtained from the \gloskey{location} field in the
appropriate style hook.

Some default settings are changed:
\printglossoptval{groups}{false} and
\printglossopt{nogroupskip}{true}. If you want letter \idx{group}
headings, you will need to both add \printglossoptval{groups}{true} to
the options list and invoke \app{bib2gls} with the \switch{group}
switch. The group headings will span the entire width of the table.
This may result in empty blocks at the end of the previous row.
If you want a vertical gap before the group heading (but not before the
first group), you will need to add
\printglossopt{nogroupskip}{false}, but you will also need to load
\sty{glossary-longbooktabs}. Note that this option is designed to be
used with group headings and will have no effect with
\printglossoptval{groups}{false}.

Additionally, the following options may also be used.

\optiondef{printunsrttab.blocks}
The value is the number of blocks in the table.
The total number of columns in the table will be this value
multiplied by the number of columns per block, which is determined
by the block style. For example, the \glstableblockstyle{name-desc}
block style has two columns, so if there are three blocks then there will be a
total of six columns.

\optiondef{printunsrttab.caption}
A boolean option that determines whether or not to include a
caption. The caption on the first page of the table is produced
with:
\cmddef*{glstablecaption}
where \meta{label code} is the code to create the label, if one has
been supplied (either by an option such as \optval{numberedsection}{autolabel}
or by the \printglossopt{label} option). The \meta{title} argument
will be \gls{glossarytitle}, which can be changed with the
\printglossopt{title} option. The \meta{lot title} argument is the
title for the list of tables and is actually what would normally be
the title for the table of contents, which
can be set with the \printglossopt{toctitle} option. The default
definition simply does:
\begin{compactcodebox}
\gls{caption}\oargm{lot title}\marg{\meta{label code}\meta{title}}
\end{compactcodebox}
An empty \meta{lot title} (\printglossoptvalm{toctitle}{}) will prevent
the caption from being added to the list of tables.

\begin{important}
The \opt{numberedsection} option will only influence the
label, not the table numbering. If you don't want the table
numbered, redefine \gls{glstablecaption} to use \starredcs{caption}.
\end{important}

If the table spans across multiple pages, the caption for subsequent pages
will be produced with:
\cmddef*{glstablenextcaption}
This ignores the \meta{lot title} argument by default and does:
\begin{compactcodebox}
\gls{caption}\oarg{}\marg{\meta{title}\gls{glstablepostnextcaption}}
\end{compactcodebox}
This has an empty optional argument to prevent the caption from
being repeatedly added to the list of tables. The title is followed
by:
\cmddef*{glstablepostnextcaption}
You can either redefine this command to adjust the content after the
title or redefine \gls{glstablenextcaption}, as appropriate.

\optiondef{printunsrttab.header}
A boolean option to determine whether or not to show the header row.
Note that a header with three column block styles, such as 
\glstableblockstyle{name-symbol-desc}, can result in overfull lines.
You may need to shorten the header text to fit.

The header text is produced with one of the following commands:
\cmddef*{glstablenameheader}
Expands to the header for the name column. Just uses \gls{entryname}
by default.

\cmddef*{glstabledescheader}
Expands to the header for the description column for block styles
like \glstableblockstyle{name-desc} and
\glstableblockstyle{name-symbol-desc}. Just uses
\gls{descriptionname} by default.

\cmddef*{glstablesymbolheader}
Expands to the header for the symbol column for block styles like
\glstableblockstyle{name-symbol} and
\glstableblockstyle{name-symbol-desc}. Just uses \gls{symbolname} by
default.

\cmddef*{glstableotherheader}
Expands to the header for the other column. The default definition
applies \gls{MFUsentencecase} to the other field label.
\begin{compactcodebox}
\gls{MFUsentencecase}\marg{\gls{glstableotherfield}}
\end{compactcodebox}

\optiondef{printunsrttab.rules}
A boolean option to determine whether or not to show the horizontal
rules (provided by \sty{booktabs}). If used with 
\glstableoptval{header}{true}, there will be a rule above and below
the header row. If used with 
\glstableoptval{header}{false}, there will only be one rule at the
top of the table. In both cases, there will be a rule at the bottom
of the table.

\optiondef{printunsrttab.blocksep}
The value is inserted into the alignment specifier list between
blocks. For example, the default value of the pipe character will
insert a vertical line. Set this value to empty to remove it.

\optiondef{printunsrttab.par}
Indicates whether or not the columns should be paragraphs. The value
may be one of: \optfmt{false}, \optfmt{justified} or
\optfmt{ragged}. The default \glstableoptval{par}{false} will just
use one of the column specifiers \code{l}, \code{r} or \code{c}.
The other values will use the \code{p} specifier, in which case 
the column widths will be calculated.

\optiondef{printunsrttab.other}
This should be set to the \idx{internalfieldlabel} of the other
field or to empty if no other field should be included.

\optiondef{printunsrttab.init}
The \meta{code} will be added shortly before
\gls{printunsrtglossary} is called and any local changes will be
scoped.

\optiondef{printunsrttab.block-style}
The block style. Available styles are listed in
\sectionref{sec:blockstyles}.

\subsubsection{Block Styles}
\label{sec:blockstyles}

The block style may be set with the \glstableopt{block-style} option
or with:
\cmddef{glstablesetstyle}

\begin{warning}
The block styles are still under development, so the underlying
commands are not yet documented and liable to change.
\end{warning}

The following block styles are predefined.

\glstableblockstyledef{name}
Blocks have one column with the name, which is followed by the symbol and
the description, if they have been set, in parentheses. The child list
follows at the end of the column (if \glosfield{childcount} is set
and non-zero).

\glstableblockstyledef{name-desc}
This is the default style.
Blocks have two columns with the name in the first column of the
block and the description in the second. If the other field is set,
it will follow the description. The child entries will be at the end
of the second column (if \glosfield{childcount} is set and
non-zero).

\glstableblockstyledef{desc-name}
As \glstableblockstyle{name-desc} but with the columns swapped.
The child entries (if \glosfield{childcount} is set and
non-zero) will be at the end of the first column.

\glstableblockstyledef{name-symbol}
Blocks have two columns with the name in the first column of the
block and the symbol in the second.
If the other field is set, it will be placed after the name in the
first column. The child entries are at the end
of the first column (if \glosfield{childcount} is set and non-zero).

\glstableblockstyledef{symbol-name}
As \glstableblockstyle{name-symbol} but with the columns swapped.
The child entries (if \glosfield{childcount} is set and
non-zero) will be at the end of the second column.

\glstableblockstyledef{name-other}
This is like \glstableblockstyle{name-desc} but puts the other field
in the second column. The description and symbol aren't shown.
The child entries (if \glosfield{childcount} is set and
non-zero) will be at the end of the second column.

\glstableblockstyledef{other-name}
This is like \glstableblockstyle{desc-name} but puts the other field
in the second column. The description and symbol aren't shown.
The child entries (if \glosfield{childcount} is set and
non-zero) will be at the end of the first column.

\glstableblockstyledef{symbol-other}
This is like \glstableblockstyle{name-other} but shows the
symbol instead of the name.
The child entries (if \glosfield{childcount} is set and
non-zero) will be at the end of the second column.

\glstableblockstyledef{other-symbol}
This is like \glstableblockstyle{other-name} but shows the
symbol instead of the name.
The child entries (if \glosfield{childcount} is set and
non-zero) will be at the end of the first column.

\glstableblockstyledef{name-symbol-desc}
Blocks have three columns with the name in the first column of the
block, the symbol in the second, and the description in the third,
preceded by the other field, if set.
The child entries are at the end
of the third column (if \glosfield{childcount} is set and non-zero).

\glstableblockstyledef{name-desc-symbol}
Blocks have three columns with the name in the first column of the
block, the description in the second, preceded by the other field,
if set, and the symbol in the third.
The child entries are at the end
of the second column (if \glosfield{childcount} is set and non-zero).

\glstableblockstyledef{name-other-desc}
Blocks have three columns with the name in the first column of the
block, the other in the second, and the description in the third.
The child entries are at the end
of the third column (if \glosfield{childcount} is set and non-zero).

\glstableblockstyledef{desc-other-name}
Blocks have three columns with the description in the first column of the
block, the other in the second, and the name in the third.
The child entries are at the end
of the first column (if \glosfield{childcount} is set and non-zero).

\glstableblockstyledef{name-symbol-other-desc}
Blocks have four columns with the name in the first column of the
block, the symbol in the second, the other in the third, and the
description in the fourth.
The child entries are at the end
of the fourth column (if \glosfield{childcount} is set and non-zero).

\glstableblockstyledef{name-other-symbol-desc}
Blocks have four columns with the name in the first column of the
block, the other in the second, the symbol in the third, and the
description in the fourth.
The child entries are at the end
of the fourth column (if \glosfield{childcount} is set and non-zero).

\glstableblockstyledef{desc-symbol-other-name}
Blocks have four columns with the description in the first column of the
block, the symbol in the second, the other in the third, and the
name in the fourth.
The child entries are at the end
of the first column (if \glosfield{childcount} is set and non-zero).

\glstableblockstyledef{desc-other-symbol-name}
Blocks have four columns with the description in the first column of the
block, the other in the second, the symbol in the third, and the
name in the fourth.
The child entries are at the end
of the first column (if \glosfield{childcount} is set and non-zero).

\subsubsection{Associated Commands}
\label{sec:tablecommands}

The rows are separated with:
\cmddef{glstablenewline}
This simply does \gls{tabularnewline} (not \gls{bksl} which has a
different action in paragraph columns).

The following commands are used in the column specifier where a
left, right or centred column is required, taking the
\glstableopt{par} option into account. Note that with
\glstableoptval{par}{justified}, the result will always be
\code{p\margm{width}}, whereas with \glstableoptval{par}{ragged}
the paragraph will be ragged right or ragged left or have centring
applied.

\cmddef{glstableleftalign}
Expands to \code{l} or \code{p\margm{width}}
or \code{>{\cmd{protect}\cmd{raggedright}p\margm{width}}}, 
depending on the \glstableopt{par} setting.

This command is used in the column specifier where a left-justified
column is required.

\cmddef{glstablerightalign}
Expands to \code{r} or \code{p\margm{width}}
or \code{>{\cmd{protect}\cmd{raggedleft}p\margm{width}}}, 
depending on the \glstableopt{par} setting.

This command is used in the column specifier where a right-justified
column is required.

\cmddef{glstablecenteralign}
Expands to \code{c} or \code{p\margm{width}}
or \code{>{\cmd{protect}\cmd{centering}p\margm{width}}}, 
depending on the \glstableopt{par} setting.

This command is used in the column specifier where a centred
column is required.

\cmddef{glstablenamecolalign}
Expands to the alignment for the name column. The default definition
uses left alignment:
\begin{compactcodebox}
\gls{glstableleftalign}\marg{\gls{glstablenamewidth}}
\end{compactcodebox}

\cmddef{glstabledesccolalign}
Expands to the alignment for the description column. The default definition
uses left alignment:
\begin{compactcodebox}
\gls{glstableleftalign}\marg{\gls{glstabledescwidth}}
\end{compactcodebox}

\cmddef{glstablesymbolcolalign}
Expands to the alignment for the symbol column, in block styles where
the symbol has its own column. The default definition
uses centred alignment:
\begin{compactcodebox}
\gls{glstablecenteralign}\marg{\gls{glstablesymbolwidth}}
\end{compactcodebox}

\cmddef{glstableothercolalign}
Expands to the alignment for the other column, in block styles where
the other field has its own column. The default definition
uses left alignment:
\begin{compactcodebox}
\gls{glstableleftalign}\marg{\gls{glstableotherwidth}}
\end{compactcodebox}

If \glstableoptval{par}{justified} or \glstableoptval{par}{ragged},
the column widths will be calculated. The following length
registers will be set, where applicable to the block style.

\cmddef{glstablenamewidth}
The width of the name column.

\cmddef{glstabledescwidth}
The width of the description column.

\cmddef{glstablesymbolwidth}
The width of the symbol column.

\cmddef{glstableotherwidth}
The width of the other column.

Unless \glstableoptval{par}{false}, the table will be the width of a
line and each block will have equal width.
\cmddef{glstableblockwidth}

Note that in all the above, the width doesn't include the
inter-column space given by \gls{tabcolsep}.
The length registers below are initialise to 5pt, and can be
redefined as appropriate.

\cmddef{glstablepostpreambleskip}
The vertical skip after the preamble.

\cmddef{glstableprepostambleskip}
The vertical skip before the postamble.

Formatting for the name, symbol, description and other field values 
are applied by the following commands.

\cmddef{glstableNameFmt}
Formatting applied to the name. Simply does \meta{text} by default.
Note that the argument \meta{text}
will \code{\gls{glossentryname}\margm{label}}, so any formatting applied
by that command will also be in effect.

\cmddef{glstableSubNameFmt}
Formatting applied to the child name. Does nothing by default, which
means that the child name won't show.

\cmddef{glstableSymbolFmt}
Formatting applied to the symbol. Simply does \meta{text} by default.
Note that the argument \meta{text}
will \code{\gls{glossentrysymbol}\margm{label}}, so any formatting applied
by that command will also be in effect.

\cmddef{glstableSubSymbolFmt}
Formatting applied to the child symbol. Just does
\gls{glstableSymbolFmt} by default.

\cmddef{glstableDescFmt}
Formatting applied to the description. Simply does \meta{text} by default.
Note that the argument \meta{text}
will be:
\begin{compactcodebox}
\gls{glossentrydesc}\margm{label}\gls{glspostdescription}
\end{compactcodebox}
so any formatting applied by \gls{glossentrydesc} will also be in effect.
Note that the \gls{postdeschook} is included in the formatted.

\cmddef{glstableSubDescFmt}
Formatting applied to the child description. Just does
\gls{glstableDescFmt} by default.

The other field's \idxc{internalfieldlabel}{internal label} is
provided by expanding:
\cmddef{glstableotherfield}
This is redefined by the \glstableopt{other} option, but 
it may be redefined before \gls{printunsrttable} if a default
field is required.

\cmddef{glstableOtherFmt}
The formatting applied to the other field. This just does
\meta{text} by default. The field value itself is displayed with:
\cmddef{glstableOther}
The default definition does:
\begin{compactcodebox}
\gls{glstableOtherFmt}\marg{\comment{}
 \gls{glsxtrusefield}\margm{entry-label}\marg{\gls{glstableotherfield}}}
\end{compactcodebox}

The value for the child entries is displayed with:
\cmddef{glstableSubOther}
The default definition simply does
\gls{glstableOther}\margm{entry-label}

You can test whether or not the other field is set for a given entry
with:
\cmddef{glstableifhasotherfield}
This does \meta{true} of the other field is non-void
(according to \gls{ifglsfieldvoid}) otherwise it does
\meta{false}. This will always do \meta{false} if
\gls{glstableotherfield} is void.

The column headers are supplied, where
applicable, by the commands
\gls{glstablenameheader},
\gls{glstabledescheader},
\gls{glstablesymbolheader}, and
\gls{glstableotherheader}.

The column headers are formatted according to:
\cmddef{glstableHeaderFmt}
The default definition is \code{\gls{textbf}\margm{text}}.

\begin{warning}
The remaining commands are undocumented as they are liable to
change.
\end{warning}

\glsendrange{pkg.glossary-table}%

\chapter{Accessibility Support}
\label{sec:accsupp}

The \sty{glossaries} package comes with a supplementary package
\sty{glossaries-accsupp} that helps provide accessibility support.
The \sty{glossaries-extra} package provides additional support, but
only if the \sty{glossaries-accsupp} package has already been loaded
when the relevant commands are defined. The best and simplest way to do this
is through the \opt{accsupp} package option.

See the \ctanmirrornofn{macros/latex/contrib/glossaries/glossaries-user.html\#sec:accsupp}{\qt{Accessibility
Support}} chapter in the \sty{glossaries} user
guide for further information about \sty{glossaries-accsupp}.

\section{Abbreviations}
\label{sec:accessabbr}

The accessibility fields relating to abbreviations are
\gloskey{shortaccess}, \gloskey{shortpluralaccess},
\gloskey{longaccess} and \gloskey{longpluralaccess}.  These provide
the replacement text for the corresponding \gloskey{short},
\gloskey{shortplural}, \gloskey{long} and \gloskey{longplural}
fields. The \gloskey{access} field provides the replacement text for
the \gloskey{name} field.

Some of these accessibility fields are automatically assigned by
\gls{newabbreviation} if they haven't been set.

\cmddef{glsxtrassignactualsetup}
This command is used to locally redefine common formatting commands
so that they can be stripped to obtain only the text. You can add
additional commands with \gls{appto}. For example, the following
eccentric example has some strange styling in the abbreviation:
\begin{codebox}
\gls{newabbreviation}\marg{foo}
 \marg{f\gls+{textsuperscript}\marg{o}\gls+{textsubscript}\marg{o}}
 \marg{furry old otters}
\end{codebox}
If an accessibility field is being automatically assigned with text
obtained from the short value, then the subscript and superscript
commands will need to be stripped. These need to be locally
redefined to just do their arguments:
\begin{codebox}
\gls{appto}\gls{glsxtrassignactualsetup}\marg{\comment{}
  \gls+{letcs}\marg{\gls{textsuperscript}}\marg{@firstofone}\comment{}
  \gls{letcs}\marg{\gls{textsubscript}}\marg{@firstofone}\comment{}
}
\end{codebox}

The attributes that specifically relate to accessibility in
abbreviations are listed below. The \qt{actual short value} means
the value obtained from the \gloskey{short} value after any markup
commands have have locally redefined using
\gls{glsxtrassignactualsetup}. The actual short value may then be
modified by these attributes. Similarly, for the \qt{actual long value}.

Finally, if \gloskey{shortaccess} hasn't already been set, it will be set to:
\begin{codebox}
\gls{glsdefaultshortaccess}\margm{actual long}\margm{actual short}
\end{codebox}
(with \gls{glsdefaultshortaccess} expanded). This command is
provided by \sty{glossaries-accsupp} and is defined to do just
\margm{actual long}. It was redefined by \sty{glossaries-extra}
v1.42 to do \code{\margm{actual long} (\margm{actual short})}, but
has been reverted back to its original definition in v1.49.

\optiondef{catattr.accessinsertdots}
If the \gloskey{shortaccess} key hasn't been set then this
attribute will be checked. If true, the actual short value
will have dots inserted (as per \catattr{insertdots}). Note that if
this attribute hasn't been set but \catattr{insertdots} is true (and the
\gloskey{shortaccess} key hasn't been set), then the actual short value
will also have dots inserted.

\optiondef{catattr.accessaposplural}
If the \gloskey{shortpluralaccess} key hasn't been set then this
attribute will be checked. If true, the actual short plural value
will have the apostrophe suffix (similar to \catattr{aposplural} but
using \gls{glsxtrabbrvpluralsuffix} instead of
\gls{abbrvpluralsuffix}). Note that if this attribute hasn't been
set but \catattr{aposplural} is true (and the
\gloskey{shortpluralaccess} key hasn't been set), then the actual
short plural value will also have the apostrophe suffix.

\optiondef{catattr.accessnoshortplural}
If the \gloskey{shortpluralaccess} key hasn't been set and the
\catattr{accessaposplural} attribute hasn't been set, then this
attribute will be checked. If true, the actual short plural value
will be the same as the singular (as \catattr{noshortplural}). Note
that if this attribute hasn't been set but \catattr{noshortplural}
is true (and the \gloskey{shortpluralaccess} key hasn't been set), then
the actual short plural value will also be the singular form.

\optiondef{catattr.nameshortaccess}
If the \gloskey{access} key hasn't been set and this attribute is
true, then the \gloskey{access} field will be set to the same as the
\gloskey{shortaccess}.

\optiondef{catattr.textshortaccess}
If the \gloskey{textaccess} key hasn't been set and this attribute is
true, then the \gloskey{textaccess} field will be set to the same as the
\gloskey{shortaccess}. Additionally, if the \gloskey{pluralaccess}
key hasn't been set, then it will be set to the same as the
\gloskey{shortpluralaccess} value.

\optiondef{catattr.firstshortaccess}
If the \gloskey{firstaccess} key hasn't been set and this attribute is
true, then the \gloskey{firstaccess} field will be set to the same as the
\gloskey{shortaccess}. Additionally, if the \gloskey{firstpluralaccess}
key hasn't been set, then it will be set to the same as the
\gloskey{shortpluralaccess} value.

\section{Accessibility Wrappers}
\label{sec:glsaccessfield}

The glossary style commands such as \gls{glossentryname}
incorporate accessibility support by using the
\csfmt{glsaccess\meta{field}} commands instead of the corresponding
\csfmt{glsentry\meta{field}} commands.

If the \sty{glossaries-accsupp} package hasn't been loaded or if the
relevant accessibility field hasn't been set, these commands
simply do the corresponding \csfmt{glsentry\meta{field}} command.

\cmddef{glsaccessname}
This shows the \gloskey{name} field encapsulated with
\gls{glsnameaccessdisplay} or just
\gls{glsentryname}\margm{entry-label}.

\cmddef{Glsaccessname}
As above but \idx{sentencecase}.

\cmddef{GLSaccessname}
As above but \idx{allcaps}.

\cmddef{glsaccesstext}
This shows the \gloskey{text} field encapsulated with
\gls{glstextaccessdisplay} or just
\gls{glsentrytext}\margm{entry-label}.

\cmddef{Glsaccesstext}
As above but \idx{sentencecase}.

\cmddef{GLSaccesstext}
As above but \idx{allcaps}.

\cmddef{glsaccessplural}
This shows the \gloskey{plural} field encapsulated with
\gls{glspluralaccessdisplay} or just
\gls{glsentryplural}\margm{entry-label}.

\cmddef{Glsaccessplural}
As above but \idx{sentencecase}.

\cmddef{GLSaccessplural}
As above but \idx{allcaps}.

\cmddef{glsaccessfirst}
This shows the \gloskey{first} field encapsulated with
\gls{glsfirstaccessdisplay} or just
\gls{glsentryfirst}\margm{entry-label}.

\cmddef{Glsaccessfirst}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfirst}
As above but \idx{allcaps}.

\cmddef{glsaccessfirstplural}
This shows the \gloskey{firstplural} field encapsulated with
\gls{glsfirstpluralaccessdisplay} or just
\gls{glsentryfirstplural}\margm{entry-label}.

\cmddef{Glsaccessfirstplural}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfirstplural}
As above but \idx{allcaps}.

\cmddef{glsaccesssymbol}
This shows the \gloskey{symbol} field encapsulated with
\gls{glssymbolaccessdisplay} or just
\gls{glsentrysymbol}\margm{entry-label}.

\cmddef{Glsaccesssymbol}
As above but \idx{sentencecase}.

\cmddef{GLSaccesssymbol}
As above but \idx{allcaps}.

\cmddef{glsaccesssymbolplural}
This shows the \gloskey{symbolplural} field encapsulated with
\gls{glssymbolpluralaccessdisplay} or just
\gls{glsentrysymbolplural}\margm{entry-label}.

\cmddef{Glsaccesssymbolplural}
As above but \idx{sentencecase}.

\cmddef{GLSaccesssymbolplural}
As above but \idx{allcaps}.

\cmddef{glsaccessdesc}
This shows the \gloskey{description} field encapsulated with
\gls{glsdescriptionaccessdisplay} or just
\gls{glsentrydesc}\margm{entry-label}.

\cmddef{Glsaccessdesc}
As above but \idx{sentencecase}.

\cmddef{GLSaccessdesc}
As above but \idx{allcaps}.

\cmddef{glsaccessdescplural}
This shows the \gloskey{descriptionplural} field encapsulated with
\gls{glsdescriptionpluralaccessdisplay} or just
\gls{glsentrydescplural}\margm{entry-label}.

\cmddef{Glsaccessdescplural}
As above but \idx{sentencecase}.

\cmddef{GLSaccessdescplural}
As above but \idx{allcaps}.

\cmddef{glsaccessshort}
This shows the \gloskey{short} field encapsulated with
\gls{glsshortaccessdisplay} or just
\gls{glsentryshort}\margm{entry-label}.

\cmddef{Glsaccessshort}
As above but \idx{sentencecase}.

\cmddef{GLSaccessshort}
As above but \idx{allcaps}.

\cmddef{glsaccessshortpl}
This shows the \gloskey{shortplural} field encapsulated with
\gls{glsshortpluralaccessdisplay} or just
\gls{glsentryshortpl}\margm{entry-label}.

\cmddef{Glsaccessshortpl}
As above but \idx{sentencecase}.

\cmddef{GLSaccessshortpl}
As above but \idx{allcaps}.

\cmddef{glsaccesslong}
This shows the \gloskey{long} field encapsulated with
\gls{glslongaccessdisplay} or just
\gls{glsentrylong}\margm{entry-label}.

\cmddef{Glsaccesslong}
As above but \idx{sentencecase}.

\cmddef{GLSaccesslong}
As above but \idx{allcaps}.

\cmddef{glsaccesslongpl}
This shows the \gloskey{longplural} field encapsulated with
\gls{glslongpluralaccessdisplay} or just
\gls{glsentrylongpl}\margm{entry-label}.

\cmddef{Glsaccesslongpl}
As above but \idx{sentencecase}.

\cmddef{GLSaccesslongpl}
As above but \idx{allcaps}.

\cmddef{glsaccessuseri}
This shows the \gloskey{user1} field encapsulated with
\gls{glsuseriaccessdisplay} or just
\gls{glsentryuseri}\margm{entry-label}.

\cmddef{Glsaccessuseri}
As above but \idx{sentencecase}.

\cmddef{GLSaccessuseri}
As above but \idx{allcaps}.

\cmddef{glsaccessuserii}
This shows the \gloskey{user2} field encapsulated with
\gls{glsuseriiaccessdisplay} or just
\gls{glsentryuserii}\margm{entry-label}.

\cmddef{Glsaccessuserii}
As above but \idx{sentencecase}.

\cmddef{GLSaccessuserii}
As above but \idx{allcaps}.

\cmddef{glsaccessuseriii}
This shows the \gloskey{user3} field encapsulated with
\gls{glsuseriiiaccessdisplay} or just
\gls{glsentryuseriii}\margm{entry-label}.

\cmddef{Glsaccessuseriii}
As above but \idx{sentencecase}.

\cmddef{GLSaccessuseriii}
As above but \idx{allcaps}.

\cmddef{glsaccessuseriv}
This shows the \gloskey{user4} field encapsulated with
\gls{glsuserivaccessdisplay} or just
\gls{glsentryuseriv}\margm{entry-label}.

\cmddef{Glsaccessuseriv}
As above but \idx{sentencecase}.

\cmddef{GLSaccessuseriv}
As above but \idx{allcaps}.

\cmddef{glsaccessuserv}
This shows the \gloskey{user5} field encapsulated with
\gls{glsuservaccessdisplay} or just
\gls{glsentryuserv}\margm{entry-label}.

\cmddef{Glsaccessuserv}
As above but \idx{sentencecase}.

\cmddef{GLSaccessuserv}
As above but \idx{allcaps}.

\cmddef{glsaccessuservi}
This shows the \gloskey{user6} field encapsulated with
\gls{glsuserviaccessdisplay} or just
\gls{glsentryuservi}\margm{entry-label}.

\cmddef{Glsaccessuservi}
As above but \idx{sentencecase}.

\cmddef{GLSaccessuservi}
As above but \idx{allcaps}.

\section{Inner Formatting Wrappers}
\label{sec:glsaccessfmtfield}

These \csfmt{glsaccessfmt\meta{field}} commands, such as
\gls{glsaccessfmtname}, are similar to the
corresponding \csfmt{glsaccess\meta{field}} commands,
such as \gls{glsaccessname}, described
above, but they format the field value using \gls{glsfmtfield},
\gls{Glsfmtfield} or \gls{GLSfmtfield} with the
supplied \meta{cs} encapsulating command.

The default entry display style \gls{glsgenentryfmt}, and the predefined abbreviation
styles all incorporate accessibility support by using these commands
in order to support the \idx{innerformatting}.

\cmddef{glsaccessfmtname}
This shows the \gloskey{name} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsnameaccessdisplay}.

\cmddef{Glsaccessfmtname}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtname}
As above but \idx{allcaps}.

\cmddef{glsaccessfmttext}
This shows the \gloskey{text} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glstextaccessdisplay}.

\cmddef{Glsaccessfmttext}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmttext}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtplural}
This shows the \gloskey{plural} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glspluralaccessdisplay}.

\cmddef{Glsaccessfmtplural}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtplural}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtfirst}
This shows the \gloskey{first} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsfirstaccessdisplay}.

\cmddef{Glsaccessfmtfirst}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtfirst}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtfirstplural}
This shows the \gloskey{firstplural} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsfirstpluralaccessdisplay}.

\cmddef{Glsaccessfmtfirstplural}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtfirstplural}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtsymbol}
This shows the \gloskey{symbol} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glssymbolaccessdisplay}.

\cmddef{Glsaccessfmtsymbol}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtsymbol}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtsymbolplural}
This shows the \gloskey{symbolplural} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glssymbolpluralaccessdisplay}.

\cmddef{Glsaccessfmtsymbolplural}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtsymbolplural}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtdesc}
This shows the \gloskey{description} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsdescriptionaccessdisplay}.

\cmddef{Glsaccessfmtdesc}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtdesc}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtdescplural}
This shows the \gloskey{descriptionplural} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsdescriptionpluralaccessdisplay}.

\cmddef{Glsaccessfmtdescplural}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtdescplural}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtshort}
This shows the \gloskey{short} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsshortaccessdisplay}.

\cmddef{Glsaccessfmtshort}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtshort}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtshortpl}
This shows the \gloskey{shortplural} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsshortpluralaccessdisplay}.

\cmddef{Glsaccessfmtshortpl}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtshortpl}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtlong}
This shows the \gloskey{long} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glslongaccessdisplay}.

\cmddef{Glsaccessfmtlong}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtlong}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtlongpl}
This shows the \gloskey{longplural} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glslongpluralaccessdisplay}.

\cmddef{Glsaccessfmtlongpl}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtlongpl}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtuseri}
This shows the \gloskey{user1} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsuseriaccessdisplay}.

\cmddef{Glsaccessfmtuseri}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtuseri}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtuserii}
This shows the \gloskey{user2} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsuseriiaccessdisplay}.

\cmddef{Glsaccessfmtuserii}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtuserii}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtuseriii}
This shows the \gloskey{user3} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsuseriiiaccessdisplay}.

\cmddef{Glsaccessfmtuseriii}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtuseriii}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtuseriv}
This shows the \gloskey{user4} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsuserivaccessdisplay}.

\cmddef{Glsaccessfmtuseriv}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtuseriv}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtuserv}
This shows the \gloskey{user5} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsuservaccessdisplay}.

\cmddef{Glsaccessfmtuserv}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtuserv}
As above but \idx{allcaps}.

\cmddef{glsaccessfmtuservi}
This shows the \gloskey{user6} field formatted with \meta{cs} and, if
accessibility support provided, encapsulated with
\gls{glsuserviaccessdisplay}.

\cmddef{Glsaccessfmtuservi}
As above but \idx{sentencecase}.

\cmddef{GLSaccessfmtuservi}
As above but \idx{allcaps}.

\chapter{Categories}
\label{sec:categories}

\begin{information}
For multi-entry categories, see \sectionref{sec:multiglscategory}.
\end{information}

Each entry defined by \gls{newglossaryentry} (or commands that
internally use it such as \gls{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. Note that an entry's category
is independent of the glossary type. Be careful not to confuse
\gloskey{category} with \gloskey{type}.

\cmddef{glscategory}
Expands to the category of the given entry or does nothing if the
entry doesn't exist (analogous to \gls{glsentryname}).

\cmddef{glsifcategory}
Tests if the entry given by \meta{entry-label} has the
\gloskey{category} set to \meta{category}.

An entry may have its \gloskey{category} field changed using
commands such as \gls{GlsXtrSetField} (see
\sectionref{sec:setfields}). In addition, the following commands are
provided to batch set the \gloskey{category} for a collection of
entries.

\cmddef{glsxtrsetcategory}
Globally sets the \gloskey{category} field to the fully expanded \meta{category-label}
for each entry listed in \meta{entry-labels}.

\cmddef{glsxtrsetcategoryforall}
Globally sets the \gloskey{category} field to the fully
expanded \meta{category-label} for each entry belonging to the
\idxpl{glossary} listed in \meta{glossary-labels}.

There are also some iterative commands available:

\cmddef{glsforeachincategory}
This iterates through all entries in the \idxpl{glossary} 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.

\cmddef{glsforeachwithattribute}
This iterates over all entries in the given list of \idxpl{glossary}
that have a category with the given \meta{attribute-label} set to
\meta{attribute-value} and performs \meta{body} at each iteration.
If \meta{glossary-types} is omitted, the list of all non-\idxpl{ignoredglossary}
is assumed. The remaining arguments are as for
\gls{glsforeachincategory}.

\section{Known Categories}
\label{sec:knowncategories}

These are the category labels that are set or referenced by
\sty{glossaries-extra}.

\optiondef{cat.general}
The default category assumed by \gls{newglossaryentry}.

\optiondef{cat.abbreviation}
The default category assumed by \gls{newabbreviation}.

\optiondef{cat.acronym}
The default category assumed by \gls{newacronym}.

\optiondef{cat.index}
The default category assumed by \gls{newterm}.

\optiondef{cat.symbol}
The default category assumed by \gls{glsxtrnewsymbol}.

\optiondef{cat.number}
The default category assumed by \gls{glsxtrnewnumber}.

\section{Attributes}
\label{sec:attributes}

Each category may have a set of attributes, where each attribute has
an associated value for its given category. An entry's attribute set
corresponds to the attributes associated with the entry's category.

As with the category, the attribute name is also a label. You can
provide your own custom attributes, which you can set and access
with the commands described in \sectionref{sec:attributecmds}.

\subsection{Known Attributes}
\label{sec:knownattributes}

This section lists attributes that \sty{glossaries-extra} sets or
accesses.  If an attribute hasn't been set, a default is assumed.
For boolean attributes, the test may simply be to determine if the
attribute has been set to \code{true}, in which case any other value
or a missing value will be interpreted as false. Conversely, the
test may be to determine if the attribute has been set to
\code{false}, in which case any other value or a missing value will
be interpreted as true.

\begin{information}
See \sectionref{sec:multiglscategory} for attributes relating to
multi-entry categories.
\end{information}

\subsubsection{Abbreviation Attributes}
\label{sec:abbrattr}

See \sectionref{sec:accessabbr} for abbreviation accessibility attributes.

\optiondef{catattr.regular}
This attribute indicates whether or not an entry should be
considered a regular entry.  This enables \gls{glsentryfmt} to
determine whether to use \gls{glsgenentryfmt} or
\gls{glsxtrgenabbrvfmt}.

The \cat{general} and \cat{acronym} categories have the
\catattr{regular} attribute automatically set to \code{true}.
Some abbreviation styles change this value.

\optiondef{catattr.discardperiod}
If set to \qt{true}, the \idx{postlinkhook} will discard a
\idx{fullstop} that follows \emph{non-plural} commands like
\gls{gls} or \gls{glstext}(see \sectionref{sec:postlinkhook}).

\begin{information}
This attribute doesn't apply to the accessibility fields.
See \sectionref{sec:accessabbr} for attributes related to
accessibility support for abbreviations.
\end{information}

Note that this can cause a problem if you access a field that
doesn't end with a full stop. For example:
\begin{codebox}
\gls{newabbreviation}
 \oarg{\gloskeyval{user1}{German Speaking \cmd{TeX}\cmd{ }User Group}}
 \marg{dante}\marg{DANTE e.V.}\marg{Deutschsprachige 
  Anwendervereinigung \cmd{TeX}\cmd{ }e.V.}
\end{codebox}
Here the \gloskey{short} and \gloskey{long} fields end with a full stop, but the
\gloskey{user1} field doesn't. The simplest solution in this
situation is to put the sentence terminator in the final optional
argument. For example:
\begin{codebox}
\gls{glsuseri}\marg{dante}\oarg{.}
\end{codebox}
This will bring the punctuation character inside the \idx{linktext}
and it won't be discarded.

\optiondef{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
\gls{glspl} or \gls{glsplural}.

\optiondef{catattr.retainfirstuseperiod}
If this attribute is set to \qt{true} then the discard is determined
by \gls{glsxtrdiscardperiodretainfirstuse}, regardless of the
\catattr{discardperiod} or \catattr{pluraldiscardperiod} attributes.
This is useful for \meta{short} (\meta{long}) abbreviation styles
where only the short form has a trailing \idx{fullstop}.

\begin{information}
This attribute doesn't apply to the accessibility fields.
See \sectionref{sec:accessabbr} for attributes related to
accessibility support for abbreviations.
\end{information}

\optiondef{catattr.markwords}
If this attribute is set to \qt{true}
any entry defined using \gls{newabbreviation} will automatically
have spaces in the long form replaced with:
\cmddef{glsxtrwordsep}
and each word is encapsulated with:
\cmddef{glsxtrword}
For example:
\begin{codebox}
\gls{glssetcategoryattribute}\marg{\cat{abbreviation}}\marg{\catattr{markwords}}\marg{true}
\gls{newabbreviation}\marg{ip}\marg{IP}\marg{Internet Protocol}
\end{codebox}
is essentially the same as
\begin{codebox}
\gls{newabbreviation}\marg{ip}\marg{IP}
\marg{\gls{glsxtrword}\marg{Internet}\gls{glsxtrwordsep}\gls{glsxtrword}\marg{Protocol}}
\end{codebox}
The \qt{hyphen} styles, such as
\abbrstyle{long-hyphen-short-hyphen}, take advantage of this
markup. If the inserted material (provided in the final argument
of \idx{glslike} commands) starts with a hyphen then
\gls{glsxtrwordsep} is locally redefined to a hyphen. (The default
value is a space). Note that this only applies to commands
like \gls{gls} and not like \gls{glsxtrlong}. You can provide your own
localised switch, if required. For example:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{hyplong}}[2][]\marg{\comment{}
 \marg{\cmd{def}\gls{glsxtrwordsep}\marg{-}\gls{glsxtrlong}\oarg{\#1}\marg{\#2}}}
\end{codebox}

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

\begin{important}
This setting may result in the \gls{glsxtrword} and
\gls{glsxtrwordsep} markup ending up in the \gloskey{sort} field,
depending on the style in use.
\end{important}

\optiondef{catattr.markshortwords}
This is similar to
\catattr{markwords} but applies to the short form. (Only useful for
abbreviations that contain spaces.) This attribute is only applicable to entries
defined using \gls{newabbreviation} (or \gls{newacronym} if it's using
\gls{newabbreviation}.)

This setting will only adjust the short plural if the
\gloskey{shortplural} key isn't used. This setting will
take precedence over \catattr{insertdots}.

\begin{important}
This setting may result in the
\gls{glsxtrword} and \gls{glsxtrwordsep} markup ending up in the
\gloskey{sort} field, depending on the style in use.
\end{important}

\optiondef{catattr.insertdots}
If this attribute is set to \qt{true}
any entry defined using \gls{newabbreviation} will automatically
have \idxpl{fullstop} 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 \gls{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. \emph{This setting is incompatible
with \catattr{markshortwords}.} This attribute is only applicable to entries
defined using \gls{newabbreviation} (or \gls{newacronym} if it's using
\gls{newabbreviation}.)

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

\optiondef{catattr.aposplural}
If this attribute is set to \qt{true},
\gls{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. This setting overrides
\catattr{noshortplural}. This attribute is only applicable to entries
defined using \gls{newabbreviation} (or \gls{newacronym} if it's using
\gls{newabbreviation}.) Check with your supervisor, publisher or
editor if you want to use this attribute as this
usage is controversial.

\optiondef{catattr.noshortplural}
If this attribute is set to
\qt{true}, \gls{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{This setting is incompatible with \catattr{aposplural}.} This attribute is only applicable to entries
defined using \gls{newabbreviation} (or \gls{newacronym} if it's using
\gls{newabbreviation}.)

\optiondef{catattr.tagging}
If this attribute is set to \qt{true},
the tagging command defined by \gls{GlsXtrEnableInitialTagging}
will be activated to use \gls{glsxtrtagfont} in the glossary
(see \sectionref{sec:tagging})

\subsubsection{Attributes that Alter \glsfmttext{glslink} Options}
\label{sec:glsoptsattr}

\optiondef{catattr.nohyperfirst}
When used with the \idx{glslike} commands, if this attribute is set
to \code{true}, this will automatically suppress the hyperlink on
\idx{firstuse}.

\begin{information}
This settings can be overridden by explicitly setting
the \glsopt{hyper} key on or off in the optional argument of
the \idx{glslike} command.
\end{information}

As from version 1.07, \gls{glsfirst},
\gls{Glsfirst}, \gls{GLSfirst} and their plural versions (which should ideally
behave in a similar way to the \idx{firstuse} of \gls{gls} or
\gls{glspl}) now honour
this attribute (but not the package-wide \optval{hyperfirst}{false}
option, which matches the behaviour of \sty{glossaries}). If you
want commands like \gls{glsfirst} to ignore the
\catattr{nohyperfirst} attribute then just redefine
\gls{glsxtrchecknohyperfirst} to do nothing.

\optiondef{catattr.nohypernext}
If set to \code{true}, this will automatically set
\glsoptval{hyper}{false} on \idx{subsequentuse} when using the \idx{glslike} commands.

\optiondef{catattr.nohyper}
If set to \code{true}, this will automatically set
\glsoptval{hyper}{false} when using the \idx{glslike} or
\idx{glstextlike} commands.

\optiondef{catattr.indexonlyfirst}
This is similar to the \opt{indexonlyfirst} package option but only
for entries that have a category with this attribute set to
\qt{true}.

\optiondef{catattr.wrgloss}
When using the \idx{glslike} or \idx{glstextlike} commands, this
will automatically set \glsoptval{wrgloss}{after} it this attribute
is set to \qt{after}.

\optiondef{catattr.textformat}
The \idx{glslike} and \idx{glstextlike} commands have the
\idx{linktext} encapsulated in the argument of \gls{glstextformat} by default
(the outer formatting, see \sectionref{sec:glstextformat}). If
the \catattr{textformat} attribute is set, the control sequence given by the attribute
value will be used instead. The attribute value
should be the name (without the leading backslash) of a command that
takes a single argument (the \idx{linktext}). Remember that the
abbreviation styles may apply an additional font change.

\optiondef{catattr.hyperoutside}
This boolean attribute may be \code{false}, \code{true} or unset. If unset,
\code{true} is assumed. This indicates the default setting
of the \glsopt{hyperoutside} option, described in
\sectionref{sec:glsopts}.

\subsubsection{Glossary Attributes}
\label{sec:glossattr}

\optiondef{catattr.glossdesc}
This attribute is checked by the \gls{glossentrydesc} to determine
whether or not to apply any \idx{casechange}. The value may be one
of:
\begin{deflist}
\itemtitle{\optfmt{firstuc}}
\begin{itemdesc}
Applies \idx+{sentencecase}. That is, the first letter of the 
description will be converted to \idx{uppercase} (using \gls{Glsentrydesc}).
\end{itemdesc}

\itemtitle{\optfmt{title}}
\begin{itemdesc}
Applies \idx+{titlecase}.
If you have at least \sty{glossaries} v4.48, the title casing is indirectly performed
by \gls{glscapitalisewords}, which defaults to \gls{capitalisewords}
(provided by \sty{mfirstuc}). You can either redefine
\gls{glscapitalisewords} if you want the change to also affect
\gls{glsentrytitlecase} or if you only want the change to apply to
the attribute case-changing then redefine
\gls{glsxtrfieldtitlecasecs}. For example:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrfieldtitlecasecs}}[1]\marg{\gls{xcapitalisefmtwords}*\marg{\#1}}
\end{codebox}
(Note that the argument to \gls{glsxtrfieldtitlecasecs}
will be a control sequence whose replacement text is the
entry's description, which is why \gls{xcapitalisefmtwords}
is needed instead of \gls{capitalisefmtwords}.)

\begin{warning}
If an error occurs with this setting, try redefining
\gls{glsxtrfieldtitlecasecs} as shown above.
\end{warning}
\end{itemdesc}

\end{deflist}
Any other values of this attribute are ignored. Remember
that there are design limitations for both the \idx{sentencecase} and the 
\idx{titlecase} commands. See the \sty{mfirstuc} user manual for further details.

\begin{information}
If you are using \app{bib2gls}, you can use the
\resourceopt{description-case-change} setting instead.
\end{information}

\optiondef{catattr.glossdescfont}
If set, the value should be the name of a control sequence (without
the leading backslash) that takes one argument. This control
sequence will be applied by \gls{glossentrydesc} to the description text. For example:
\begin{codebox}
\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{glossdescfont}}\marg{emph}
\end{codebox}

\optiondef{catattr.glossname}
As \catattr{glossdesc} but applies to \gls{glossentryname}.
Additionally, if this attribute is set to \qt{uc} the name is
converted to \idx{allcaps}.

\begin{information}
If you are using \app{bib2gls}, you can use the
\resourceopt{name-case-change} setting instead.
\end{information}

\optiondef{catattr.indexname}
If set, the \idx{postnamehook} will index the entry using
\gls{index}. See \sectionref{sec:autoindex} for further details.

\optiondef{catattr.glossnamefont}
As \catattr{glossdescfont} but applies to \gls{glossentryname}.
Note that this overrides \gls{glsnamefont} which will only
be used if this attribute hasn't been set.

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

\optiondef{catattr.glosssymbolfont}
This is similar to \catattr{glossnamefont} and
\catattr{glossdescfont} but is used by \gls{glossentrysymbol}.


\subsubsection{Other Attributes}
\label{sec:otherattr}

\optiondef{catattr.headuc}
If this attribute is set to \qt{true},
commands like \gls{glsfmtshort} will use the upper case version
in the page headers.

\optiondef{catattr.entrycount}
The value of this attribute (if set) must be an integer and is used
in combination with \gls{glsenableentrycount}
(see \sectionref{sec:entrycount}). Leave blank or undefined
for categories that shouldn't have this facility enabled. The
value of this attribute is used by \gls{glsxtrifcounttrigger}
to determine how commands such as \gls{cgls} should behave.

\optiondef{catattr.linkcount}
This attribute is set to
\code{true} by \gls{GlsXtrEnableLinkCounting} (see
\sectionref{sec:linkcount}).

\optiondef{catattr.linkcountmaster}
This attribute is set by \gls{GlsXtrEnableLinkCounting} to
the name of the counter that requires the link counter to be added
to its reset list (see \sectionref{sec:linkcount}).

\optiondef{catattr.dualindex}
If this attribute is set, whenever a glossary entry
has information written to the external glossary file
through commands like \gls{gls} and \gls{glsadd}, a~corresponding
line will be written to the indexing file using \gls{index}.
The value may be \code{true} to simply enable this feature or the
value may be the encap to use with \gls{index}. See
\sectionref{sec:autoindex} for further details.

\optiondef{catattr.targeturl}
If set, the hyperlink generated by commands like \gls{gls} will be
set to the URL provided by this attribute's value. For example:
\begin{codebox}
\gls{glssetcategoryattribute}
 \marg{\cat{general}}\marg{\catattr{targeturl}}\marg{master-doc.pdf}
\end{codebox}
(See also the accompanying sample file
\file{sample-external.tex}.) If the URL contains awkward
characters (such as \verb|%| or \verb|~|) remember that the base
\sty{glossaries} package provides commands like
\gls{glspercentchar} and \gls{glstildechar} that expand to literal
characters.

\optiondef{catattr.targetname}
If you want to a named anchor within the target URL (notionally
adding \code{\#\meta{name}} to the URL), then you also
need to set \catattr{targetname} to the anchor \meta{name}. You may
use \gls{glslabel} within \meta{name} which is set by commands
like \gls{gls} to the entry's label.

All the predefined \idxpl{glossarystyle} start each entry
listing with \gls{glstarget} which sets the anchor to
\code{\gls{glolinkprefix}\gls{glslabel}}, so if you want entries to link
to glossaries in the URL given by \catattr{targeturl}, you
can just do:
\begin{codebox}
\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{targetname}}
 \marg{\gls{glolinkprefix}\gls{glslabel}}
\end{codebox}
(If the target document changed \gls{glolinkprefix} then you will
need to adjust the above as appropriate.)

\optiondef{catattr.targetcategory}
If the anchor is in the form \code{\meta{name1}.\meta{name2}}
then use \catattr{targetname} for the \meta{name2} part and
\catattr{targetcategory} for the \meta{name1} part.

For example:
\begin{codebox}
\gls{glssetcategoryattribute}
 \marg{\cat{general}}\marg{\catattr{targeturl}}\marg{master-doc.pdf}
\gls{glssetcategoryattribute}
 \marg{\cat{general}}\marg{\catattr{targetcategory}}\marg{page}
\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{targetname}}\marg{7}
\end{codebox}
will cause all link text for \cat{general} entries to
link to \filefmt{master-doc.pdf\#page.7} (page 7 of that PDF).

If you want a mixture in your document of entries that link to
an internal glossary and entries that link to an external URL
then you can use \gls{newignoredglossary*}
for the external list. For example:
\begin{codebox}
\gls{newignoredglossary*}\marg{external}
\codepar
\gls{glssetcategoryattribute}\marg{external}\marg{\catattr{targeturl}}\marg{master-doc.pdf}
\gls{glssetcategoryattribute}
 \marg{\cat{general}}\marg{\catattr{targetname}}\marg{\gls{glolinkprefix}\gls{glslabel}}
\codepar
\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{local example}}
\codepar
\gls{newglossaryentry}\marg{sample2}\marg{\gloskeyval{name}{sample2},
  \gloskeyval{type}{external},
  \gloskeyval{category}{external},
  \gloskeyval{description}{external example}}
\end{codebox}

\optiondef{catattr.externallocation}
The value should be the file name of the target document when
manually indexing an external location with \glsopt{thevalue}. In
general, it's better to use \app{bib2gls} v1.7+ which can handle
multiple external sources and doesn't require this attribute.

\subsection{Accessing and Setting Attributes}
\label{sec:attributecmds}

Attributes can be set using the following commands:

\cmddef{glssetcategoryattribute}
Locally sets the given attribute to \meta{value} for the given
category.

\cmddef{glssetcategoriesattribute}
Globally sets the given attribute to \meta{value} for all the
categories in the comma-separated list \meta{category list}.

\cmddef{glssetcategoryattributes}
Globally sets each attribute in the comma separated
\meta{attribute list} to \meta{value} for the given \meta{category}.

\cmddef{glssetcategoriesattributes}
Globally sets each attribute in the comma separated
\meta{attribute list} to \meta{value} for each
category in the comma-separated list \meta{category list}.

\cmddef{glssetattribute}
Locally sets the given attribute to \meta{value} for the
category associated with the entry identified by
\meta{entry-label}. This command can't be used to assign an
attribute for a multi-entry category.

\cmddef{glssetregularcategory}
A shortcut that sets the \catattr{regular} attribute to \code{true}
for the given category using \gls{glssetcategoryattribute}.

An attribute can be locally unset using:
\cmddef{glsunsetcategoryattribute}

Attribute values can be obtained with the following commands:

\cmddef{glsgetcategoryattribute}
Expands to the value of the given attribute for the given
category. Expands to nothing if the attribute hasn't been set.

\cmddef{glsgetattribute}
Expands to the value of the given attribute for the category
associated with the entry identified by \meta{entry-label}.  Expands
to nothing if the attribute hasn't been set. This command can't be
used to assign an attribute for a multi-entry category.

Attributes can be tested with the following commands.

\cmddef{glshascategoryattribute}
This uses \sty{etoolbox}['s] \gls{ifcsvoid} and does \meta{true} if
the attribute has been set and isn't blank and isn't \gls{relax}
otherwise it does \meta{false}. 

\cmddef{glshasattribute}
As \gls{glshascategoryattribute} but the category is obtained from
the given entry. This command can't be used to test an attribute
associated with a multi-entry category.

\cmddef{glsifcategoryattribute}
This tests if the given attribute for the given category is set and
equal to \meta{value}. If true, \meta{true} is done. If the
attribute isn't set or is set but isn't equal to \meta{value},
\meta{false} is done.

For example:
\begin{codebox}
\gls{glsifcategoryattribute}\marg{\cat{general}}\marg{\catattr{nohyper}}\marg{true}\marg{NO HYPER}\marg{HYPER}
\end{codebox}
This does \qt{NO HYPER} if the \cat{general} category has the
\catattr{nohyper} attribute set to \code{true} otherwise if
does \qt{HYPER}.

\cmddef{glsifattribute}
As \gls{glsifcategoryattribute} but the category is obtained from
the given entry. This command can't be used to test an attribute
associated with a multi-entry category.

\cmddef{glsifregularcategory}
A shortcut that tests if the given category has the
\catattr{regular} attribute set to \code{true}.

\cmddef{glsifnotregularcategory}
A shortcut that tests if the given category has the
\catattr{regular} attribute set to \code{false}.

\begin{warning}
If the \catattr{regular} attribute hasn't been set, both
\gls{glsifregularcategory} and \gls{glsifnotregularcategory} will do
\meta{false}. The choice of command needs to be determined by what
outcome should occur if the attribute hasn't been set.
\end{warning}

\cmddef{glsifregular}
As \gls{glsifregularcategory} but the category is obtained from
the given entry. This command can't be used to test an attribute
associated with a multi-entry category.

\cmddef{glsifnotregular}
As \gls{glsifnotregularcategory} but the category is obtained from
the given entry. This command can't be used to test an attribute
associated with a multi-entry category.

\cmddef{glsifcategoryattributetrue}
Expands to \meta{true} if the attribute is \code{true} and
\meta{false} otherwise. Expands to \meta{false} if there's no such
attribute for the given category.

\cmddef{glsifattributetrue}
As \gls{glsifcategoryattributetrue} but the category is obtained from
the given entry. Expands to \meta{false} if the entry isn't defined. 
This command can't be used to test an attribute
associated with a multi-entry category.

\cmddef{glsifcategoryattributehasitem}
Does \meta{true} if the category has the attribute (whose
value is a comma-separated list) contains the given item and \meta{false} 
otherwise. Does \meta{false} if there's 
no such attribute for the given category. The item and list are
expanded and passed to \sty{datatool}['s] \gls{DTLifinlist} to
perform the test.


\chapter{\apptext{bib2gls}: Managing Glossary Entry Databases}
\label{sec:bib2gls}\glsstartrange{app.bib2gls}

The command line application \app{bib2gls} performs two functions in
one:
\begin{itemize}
\item selects entries from one or more \ext+{bib} files according 
to information found in the \ext+{aux} file (similar to \BibTeX);
\item hierarchically sorts entries and collates \idxpl{locationlist} 
(similar to \app{makeindex} or \app{xindy}).  
\end{itemize}
Instead of storing all your entry definitions in a \ext+{tex} file and
loading them using \gls{input} or \gls{loadglsentries}, the entries
can instead be stored in a \ext+{bib} file and \app{bib2gls} can
selectively write the appropriate commands to a \ext+{glstex}
file which is loaded using \gls{GlsXtrLoadResources}.

\begin{information}
Unlike \BibTeX, \app{makeindex} and \app{xindy}, the file created by \app{bib2gls}
does not contain the code to typeset the (\idx{glossary}) list. Instead,
it creates a file containing the code that defines the entries, using commands
like \gls{newglossaryentry} and \gls{newabbreviation}. The \idx{indexing} information
(such as the \idx{locationlist}) is stored in special fields, and the entries
are defined in the appropriate order so the \idx{glossary} can simply be displayed
with \gls{printunsrtglossary} or, if no \idx{glossary} is required, the entries
can simply be referenced in the document or displayed as standalone definitions
(see \sectionref{sec:glossentry}).
\end{information}

This means that you can use a \ext{bib} reference managing system to maintain
the database and it reduces the \TeX\ overhead by only defining the
entries that are actually required in the document. If you currently
have a \ext{tex} file that contains hundreds of definitions, but
you only use a dozen or so in your document, then the build time is
needlessly slowed by the unrequired definitions that occur when the
file is input. (You can convert an existing \ext{tex} file
containing glossary definitions to a \ext{bib} file using
\app{convertgls2bib}, supplied with \app{bib2gls}.)

There are some new commands and options added to
\sty{glossaries-extra} to help assist the integration of
\app{bib2gls} into the document build process.
This chapter describes these commands, but it only
provides a general overview of \app{bib2gls}.
The full details and some sample documents are provided
in the \app{bib2gls}
\ctansupportmirror{bib2gls/bib2gls.pdf}{manual}. You may prefer
to start with the introductory guide:
\texdocref{bib2gls-begin}
There are also some examples in this chapter. See \sectionref{sec:bibfile}
for sample \ext{bib} files.

As with \BibTeX\ and the other \idxpl{indexingapp}, \app{bib2gls} is a command line
application. See \qt{\dickimawhref{latex/buildglossaries}{Incorporating
makeglossaries or makeglossaries-lite or bib2gls into the document
build}} for advice on adding \app{bib2gls} to your document build.
To check that you have \app{bib2gls} installed correctly enter the following
into your command prompt or terminal, which should show the current version:
\begin{terminal}
bib2gls \longargfmt{version}
\end{terminal}
Or for a summary of available switches:
\begin{terminal}
bib2gls \longargfmt{help}
\end{terminal}

Global \app{bib2gls} settings are typically set via the command line
using switches such as \switch{g} or \switch{group}. This is different to
resources options, such as \resourceopt{group}, which are only
applicable to the given resource set. Since it can be tricky to add
command line arguments within some automated build environments,
there is now a preamble-only command that may be used to supply
those options:
\cmddef{BibGlsOptions}
The argument is a \keyval\ list of options corresponding to the applicable long switch 
without the leading \code{\longswitch} (such as \bibglsswitchopt{group} for 
\switch{group} but not the short form \code{g}) where any \longargfmt{\meta{switch}}
that has a corresponding \longargfmt{no-\meta{switch}}
becomes a boolean option.
For example:
\begin{codebox*}
\gls{BibGlsOptions}\marg{\bibglsswitchopt{group},\bibglsswitchoptfalse{collapse-same-location-range}}
\end{codebox*}
is equivalent to:
\begin{terminal}
bib2gls \switch{group} \longargfmt{no-collapse-same-location-range} \meta{filename}
\end{terminal}
This will require at least version 4.0 of \app{bib2gls}.  From the
point of view of \sty{glossaries-extra}, the \gls{BibGlsOptions}
command simply adds the information to the \ext{aux} file, which is
picked up by \app{bib2gls}. Multiple instances are concatenated and apply 
to all resource sets.
See the \app{bib2gls} manual for supported options and further information.

\begin{important}
Any options that are referenced by \app{bib2gls} before the \ext+{log} file or
\ext{aux} file is read must be set via the command line. This
includes localisation support, and the \ext{log} and \ext{aux} file
input encoding and path.
\end{important}

A document may have one or more \emph{resource sets}. Each resource
set corresponds to a \ext{glstex} file that's created by
\app{bib2gls}. This file contains the \LaTeX\ code used to define
the glossary entries. The trick with this method is that
\app{bib2gls} writes the code so that the glossary entry definitions
match the requested order. This means that \gls{printunsrtglossary}
can simply be used to list the entries.

To ensure that \app{bib2gls} can find out which entries have been
used in the document, and their associated \idx{indexing} information, 
you need the \opt{record} package option:
\begin{codebox}
\cmd{usepackage}\oarg{\opt{record}}\marg{glossaries-extra}
\end{codebox}
If you are using \sty{hyperref}, you may prefer to use
\opteqvalref{record}{nameref}.

The \ext{glstex} file created by \app{bib2gls} is loaded using:
\cmddef{GlsXtrLoadResources}
This both sets up the options for the \idx{resourceset} (which \app{bib2gls}
can detect from the \ext{aux} file) and inputs the file
\metafilefmt{}{basename}{.glstex} created by \app{bib2gls} (if it exists),
where the \meta{basename} is \gls{jobname} in the first instance and 
\code{\gls{jobname}-\meta{n}} on subsequent instances (where
\meta{n} is incremented at the end of every \gls{GlsXtrLoadResources}).
If the optional argument is missing, \app{bib2gls} will assume the 
option \resourceoptval{src}{\meta{basename}}. In general, you will need to
supply \resourceopt{src}, particularly if you have multiple \idxpl{resourceset}.

\begin{information}
\gls{GlsXtrLoadResources} will redefine \gls{glsindexingsetting}
to \code{bib2gls} (or \code{bib2gls-xindy} or \code{bib2gls-makeindex} if
\opteqvalref{record}{hybrid}).
\end{information}

There is a shortcut command:
\cmddef{glsbibdata}
This simply does:
\begin{compactcodebox}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\meta{bib-list}},\meta{options}}
\end{compactcodebox}

If required, the value of \meta{n} is stored in the count register:
\cmddef{glsxtrresourcecount}
although there should be little need to use this.

\begin{information}
Note that \gls{glsxtrresourcefile} is now deprecated. Use \gls{glsbibdata}
instead. (Remember that if you want to share a \idx{resourceset}, including 
locations, across multiple documents, you need to use the \resourceopt{master}
resource option.)
\end{information}

The \gls{GlsXtrLoadResources} command writes the following to
the \ext{aux} file:
\cmddef{glsxtr@resource}
This command is searched for by \app{bib2gls}.
If you are using or developing a build system that needs to know
which applications to run as part of the document build, you can
search the \ext{aux} for instances of \gls{glsxtr@resource}. For
example, using \app{arara}:
\begin{codebox}
\% arara: bib2gls if found("aux", "glsxtr@resource")
\end{codebox}
See also \dickimawhref{latex/auxglossaries/}{Decyphering the Aux
File Commands Provided by \styfmt{glossaries.sty} and
\styfmt{glossaries-extra.sty}}.

Since the \ext{glstex} file won't exist on the first \LaTeX\ run, the
\opt{record} package option additionally switches on
\opteqvalref{undefaction}{warn}. Any use of commands like \gls{gls} or
\gls{glstext} will produce \idx{unknowntag} in the document, since the entries
are undefined at this point. Once \app{bib2gls} has created the \ext{glstex}
file the references should be resolved.  This may cause a shift in the
locations if the actual text produced once the entry is defined is
significantly larger than the placeholder \idx{unknowntag} (as this can alter
the page breaking).

Note that as from v1.12, \gls{GlsXtrLoadResources} temporarily
switches the category code of \code{@} to 11 (letter) while it
reads the file to allow for any internal commands. Be aware of this if
you have any entry fields that include the \code{@} character.

\begin{information}
The package options \opteqvalref{record}{only} and
\opteqvalref{record}{nameref} automatically load
\sty{glossaries-extra-bib2gls}, which provides additional commands
that are useful with \app{bib2gls}. Since they cover sorting and
\idxpl{locationlist}, they're not relevant with the
\opteqvalref{record}{hybrid} option.
\end{information}

The information provided in the optional argument of \gls{GlsXtrLoadResources} 
(and therefore also with \gls{glsbibdata})
is written to the \ext{aux} file using:
\begin{compactcodebox}
\cmd{protected@write}\cmd{@auxout}\marg{\gls{glsxtrresourceinit}}\margm{information}
\end{compactcodebox}%
where \meta{information} is the information to pass to
\app{bib2gls} (\gls{glsxtr@resource}). The command in the second argument:
\cmddef{glsxtrresourceinit}
may be used to temporarily redefine commands before the
information is written to the file. This does nothing
by default, but may be redefined to allow the use of
short commands for convenience. For example, with:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrresourceinit}}\marg{\cmd{let}\gls{u}\gls{glshex}}
\end{codebox}
you can just use, for example, \code{\gls{u} E6} instead of
\code{\gls{string}\gls{u}E6} in the custom rule. This redefinition of \gls{u}
is scoped so its original definition is restored after the write operation.

If you have regular expressions or use complex string concatenations
with conditionals, such as with \resourceopt{assign-fields}, then you may find
it more convenient to redefine \gls{glsxtrresourceinit} to use
\gls{GlsXtrResourceInitEscSequences} (see \sectionref{sec:resourcecommands}).

\cmddef{glsxtrMFUsave}
If you have \sty{mfirstuc} v2.08+, \gls{glsxtrMFUsave} will be used on the
first instance of \gls{GlsXtrLoadResources}, and will add
\gls{MFUsave} to the begin document hook and then disable itself.
This is provided to help \app{bib2gls} v3.0+ pick up any of
\sty{mfirstuc}['s] exclusions, blockers and mappings to assist with
its \idx{sentencecase} function. The assumption is that all
exclusions, blockers and mappings will be set up in the preamble. If
there are any within the \env{document} environment that you want
\app{bib2gls} to be aware of, redefine this command to do nothing
before the first instance of \gls{GlsXtrLoadResources} (or
\gls{glsbibdata}) and use \gls{MFUsaveatend} instead.

If the expansion text is non-empty for the command:
\cmddef{GlsXtrDefaultResourceOptions}
then this command will be inserted at the start of the resource
options. This means that if you have multiple resource commands and
you want a default set of options, you can redefine this command or
append to it.
For example:
\begin{codebox}
\cmd{appto}\gls{GlsXtrDefaultResourceOptions}\marg{\comment{}
 \resourceoptval{ignored-type}{ignored},
 \resourceoptval{copy-to-glossary}{"index" \oarg{ type <> "ignored" }}}
\end{codebox}
This should be done before the resource commands to which the
options should apply.

\section{The \exttext{bib} File}
\label{sec:bibfile}

The \ext{bib} file format for \app{bib2gls} follows the same syntax as for
\BibTeX\ but has different entry types. As with \BibTeX, 
the entry type starts with \code{@} and is case-insensitive. The most common
types are: \atentry{entry} (for general entries), \atentry{index} (for index entries, typically
without a description), \atentry{abbreviation} (for abbreviations) and
\atentry{symbol} (for symbols). For the complete list of entry types, see the
\app{bib2gls} user guide.

\hypertarget{examplebib}{}There are a number of examples in this chapter that use the
following sample \ext{bib} files. The first, \filefmt{terms.bib}, 
provides general entries, which are defined with \atentry{entry},
and one index-only (no description) entry, which is defined with \atentry{index}:
\newcommand{\termsbibcontent}{%
\atentry{entry}\marg{bird,\nldbsp
  \gloskeyval{name}{bird},\nldbsp
  \gloskeyval{description}{feathered animal},\nldbsp
  \gloskeyval{seealso}{duck,goose}\nl
}
\codepar
\atentry{entry}\marg{duck,\nldbsp
  \gloskeyval{name}{duck},\nldbsp
  \gloskeyval{description}{a waterbird with short legs}\nl
}
\codepar
\atentry{entry}\marg{goose,\nldbsp
  \gloskey{name} = \glsquote{goose},\nldbsp
  \gloskey{plural} = \glsquote{geese},\nldbsp
  \gloskeyval{description}{a waterbird with a long neck}\nl
}%
\codepar
\atentry{index}\marg{example}%
}%
\begin{codebox}
\termsbibcontent
\end{codebox}%
Entries identified with \atentry{entry} that are selected by
\app{bib2gls} will have their data written to the \ext{glstex} file
in a manner that will define them with \gls{longnewglossaryentry*}.  
Note that this is the starred version which
doesn't trim leading and trailing spaces for the description. This
is because \app{bib2gls} has its own field trimming options.
For example, if the \qt{duck} entry is selected, the definition
written to the \ext{glstex} file will effectively be:
\begin{compactcodebox}
\gls{longnewglossaryentry*}\marg{bird}\comment{label}
 \marg{\gloskeyval{name}{bird},\gloskeyval{seealso}{duck,goose}}\comment{fields}
 \marg{feathered animal}\comment{description}
\end{compactcodebox}
(Although it may additionally have other fields, such as \gloskey{location}
and \gloskey{group}, set.)

The general purpose \atentry{entry} entry type has the same
mandatory fields as \gls{newglossaryentry}. That is, the
\gloskey{description} field and either the \gloskey{name} or
\gloskey{parent} field are required.

Entries identified with \atentry{index} that are selected by
\app{bib2gls} will have their data written to the \ext{glstex} file
in a manner that will define them with \gls{newglossaryentry} since
they are not expected to have a description (although it is permitted, if desired).
There are no required fields. If the \gloskey{name} field is omitted,
the label will be used as the name (unless the \gloskey{parent}
field has been set). If the \gloskey{description} field isn't provided, it
will be set to empty. Additionally, the \gloskey{category} will be set to
\cat{index}, unless otherwise overridden. So if the \qt{example} entry is
selected, the definition written to the \ext{glstex} file will effectively be:
\begin{compactcodebox}
\gls{newglossaryentry}\marg{example}\marg{\gloskeyval{name}{example},
 \gloskeyval{category}{\cat{index}}, \gloskeyval{description}{}}
\end{compactcodebox}
(Again it may additionally have other fields, such as \gloskey{location}
and \gloskey{group}, set.)

The file \filefmt{abbrvs.bib} provides some abbreviations (including
the awkward nested abbreviation \qt{SHTML} from \sectionref{sec:nested})
which are defined with \atentry{abbreviation}:
\newcommand{\abbrvsbibcontent}{%
\atentry{string}\marg{ssi=\marg{server-side includes}}\nl
\atentry{string}\marg{html=\marg{hypertext markup language}}
\codepar
\atentry{abbreviation}\marg{shtml,\nldbsp
  \gloskey{short}=\glsquote{shtml},\nldbsp
  \optfmt{fulllong} = ssi \# \glsquote{ enabled } \# html,\nldbsp
  \optfmt{nestedlong} = \glsquote{\gls{glsps}\marg{ssi} enabled \gls{glsps}\marg{html}},\nldbsp
  \gloskeyval{description}{a combination of \gls{gls}\marg{html} and
\gls{gls}\marg{ssi}}\nl
}
\codepar
\atentry{abbreviation}\marg{html,\nldbsp
  \gloskey{short} =\glsquote{html},\nldbsp
  \gloskey{long}  = html,\nldbsp
  \gloskeyval{description}{a markup language for creating web
pages}\nl
}
\codepar
\atentry{abbreviation}\marg{ssi,\nldbsp
  \gloskey{short}=\glsquote{ssi},\nldbsp
  \gloskey{long} = ssi,\nldbsp
  \gloskeyval{description}{a simple interpreted server-side
scripting language}\nl
}%
\codepar
\atentry{abbreviation}\marg{xml,\nldbsp
  \gloskey{short}=\marg{xml},\nldbsp
  \gloskey{long}=\marg{extensible markup language},\nldbsp
  \gloskey{description}=\marg{a simple text-base format for
   representing structured information}\nl
}%
\codepar
\atentry{abbreviation}\marg{mathml,\nldbsp
  \gloskey{short}=\marg{m\gls{BibGlsNoCaseChange}\marg{ath}ml},\nldbsp
  \gloskey{long}=\marg{mathematical markup language},\nldbsp
  \gloskey{description}=\marg{an \gls{gls}\marg{xml}-based language for 
  describing mathematical notation}\nl
}%
}%
\begin{codebox}
\abbrvsbibcontent
\end{codebox}%
Note that the awkward \code{shtml} entry doesn't actually have the \gloskey{long}
field set. Instead I've provided two alternatives in custom fields, \optfmt{fulllong}
and \optfmt{nestedlong}. In my resource options, I can choose which field
to use by aliasing or assigning the applicable custom field to \gloskey{long}.
If I forget to do this, \app{bib2gls} will warn me that the required \gloskey{long}
field is missing.

The \gloskey{short} field just has \idx{lowercase} abbreviations, which is convenient
if a smallcaps abbreviation style is chosen. The \resourceopt{short-case-change}
resource option can be used to change the case of the \gloskey{short} field if 
\idx{uppercase} is preferred. The MathML abbreviation is awkward as it has a mixed case.
The case change can be prevented with \gls{NoCaseChange} (which \app{bib2gls} recognises),
but this will also prevent any case change with commands like \gls{GLS}.
With \app{bib2gls} v4.1+, an alternative is to use \gls{BibGlsNoCaseChange}
which only prevents case-changing within \app{bib2gls} and not in the \LaTeX\
document.

Entries identified with \atentry{abbreviation} that are selected by
\app{bib2gls} will have their data written to the \ext{glstex} file
in a manner that will define them with \gls{newabbreviation}.
This means the abbreviation style must be set before
\gls{GlsXtrLoadResources}. Since the style isn't known to
\app{bib2gls}, it assumes that, if the \gloskey{sort} field is
missing (which is best), then the \gloskey{short} field value should be
used as the fallback. If you are using a style that starts the name
with the long value, then this fallback will need to be changed
(as in \examplesref{ex:bib2glsmultiresources,ex:bib2gls1set4lists}).

The above \filefmt{abbrvs.bib} file defines \ext{bib} strings (with
\atentry{string}) and uses string concatenation (with \code{\#}), which is a
\BibTeX\ feature. Another supported \ext{bib} feature is \atentry{preamble},
which may be used to provide command definitions.

The \filefmt{abbrvs.bib} file assumes an abbreviation style where the
description must be supplied (such as the \abbrstyle{long-short-sc-desc} style). 
If this isn't appropriate, \app{bib2gls} can be
instructed to ignore the \gloskey{description} field with the
\resourceopt{ignore-fields} resource option.  In this case, the custom
\optfmt{nestedlong} field may be the more suitable of the two custom fields for
the \gloskey{long} value (see \exampleref{ex:bib2glsabbrvs}).

The dependent \code{ssi} and \code{html} entries can be detected by
\app{bib2gls} as it parses the field values so they can automatically be
selected even if they aren't \recorded. Note, however, that ignored fields don't
have their values parsed.

The file \filefmt{symbols.bib} provides some symbols which are defined with
\atentry{symbol}:
\newcommand{\symbolsbibcontent}{%
\atentry{preamble}\marg{\glsquote{\cmd{providecommand}\marg{\cmd{mtx}}[1]\marg{\cmd{boldsymbol}\marg{\#1}}}}
\codepar
\atentry{symbol}\marg{M,\nldbsp
  \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{M}}},\nldbsp
  \gloskeyval{description}{a matrix}\nl
}
\codepar
\atentry{symbol}\marg{v,\nldbsp
  \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{vec}\marg{v}}},\nldbsp
  \gloskeyval{description}{a vector}\nl
}
\codepar
\atentry{symbol}\marg{S,\nldbsp
  \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{mathcal}\marg{S}}},\nldbsp
  \gloskeyval{description}{a set}\nl
}%
}
\begin{codebox}
\symbolsbibcontent
\end{codebox}%
Entries identified with \atentry{symbol} that are selected by
\app{bib2gls} will have their data written to the \ext{glstex} file
in a manner that will define them with \gls{longnewglossaryentry*}
with \gloskeyval{category}{\cat{symbol}}. This means that if you don't
explicitly set the \gloskey{category} (either in the \ext{bib} file
or using applicable resource options), then these entries will have
the \cat{symbol} category. You will need to take this into account
if you want to define or adjust any hooks that depend on the
category.

\mExampleref{ex:bib2glsabbrvs} adapts the
earlier \exampleref{ex:nestedlinkglsps} for use with 
\app{bib2gls} but it also references the additional \code{mathml} entry. 
Remember to use the \opt{record} or
\opteqvalref{record}{nameref} package option.
The latter is better with \sty{hyperref} and is used for this example:
\begin{codebox}
\cmd{usepackage}[T1]\marg{fontenc}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\oarg{\opteqvalref{record}{nameref}}\marg{glossaries-extra}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-em-short-em}}
\codepar
\gls{GlsXtrLoadResources}\oarg{
 \resourceoptvalm{src}{abbrvs},
 \resourceoptvalm{field-aliases}{nestedlong=\gloskey{long}},
 \resourceoptvalm{ignore-fields}{\gloskey{description}},
 \resourceoptval{short-case-change}{uc}
}
\cbeg{document}
\gls{tableofcontents}\nl
\cmd{section}\marg{\gls{Glsfmtlong}\marg{shtml}}
First use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}, 
\gls{gls}\marg{mathml}.
\codepar
Next use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}, 
\gls{gls}\marg{mathml}.
All caps: \gls{GLS}\marg{mathml}.
\codepar
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}

As with \exampleref{ex:nestedlinkglsps}, the nested \gls{emph} from the 
\abbrstyle{long-em-short-em} abbreviation style, causes the nested HTML and SSI to
be typeset in the upright not italic font shape.

\begin{resultbox}
\createexample*[
 label={ex:bib2glsabbrvs},
title={Using \appfmt{bib2gls}: abbreviations},
description={Example document using bib2gls with abbreviations},
arara={pdflatex,bib2gls,pdflatex,pdfcrop}
]
{%
\cbeg{filecontents*}{abbrvs.bib}\nl
\abbrvsbibcontent\nl
\cend{filecontents*}\nl
\cmd{usepackage}[T1]\marg{fontenc}\nl
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}\nl
\cmd{usepackage}\oarg{record=nameref}\marg{glossaries-extra}
\codepar
\gls{setabbreviationstyle}\marg{long-em-short-em}
\codepar
\gls{GlsXtrLoadResources}\oarg{\nlsp
 \resourceoptvalm{src}{abbrvs},\nlsp
 \resourceoptvalm{field-aliases}{nestedlong=\gloskey{long}},\nlsp
 \resourceoptvalm{ignore-fields}{\gloskey{description}},\nlsp
 \resourceoptval{short-case-change}{uc}\nl
}
\codepar
}
{%
\gls{tableofcontents}\nl
\cmd{section}\marg{\gls{Glsfmtlong}\marg{shtml}}\nl
First use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}, \gls{gls}\marg{mathml}.
\codepar
Next use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}, \gls{gls}\marg{mathml}.
All caps: \gls{GLS}\marg{mathml}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}

Note that this uses resource options to change the definitions \emph{without
modifying} the \ext{bib} files. In more detail, these options are:
\begin{compactcodebox}
 \resourceoptvalm{field-aliases}{nestedlong=\gloskey{long}},
\end{compactcodebox}%
Converts the custom \optfmt{nestedlong} field into the \gloskey{long} field.
\begin{compactcodebox}
 \resourceoptvalm{ignore-fields}{\gloskey{description}},
\end{compactcodebox}%
Instructs \app{bib2gls} to ignore the provided \gloskey{description} fields,
since the chosen abbreviation style (\abbrstyle{long-em-short-em}) sets the
description to the long form (and explicitly setting that field would disrupt
the style).
Note that if this \resourceopt{ignore-fields} setting is changed to:
\begin{compactcodebox}
 \resourceoptvalm{omit-fields}{\glsquote{description}},
\end{compactcodebox}%
then the \code{xml} entry will also be selected (and will therefore 
appear in the glossary). This is because the reference to that entry
can be picked up from the \gloskey{description} field with
\resourceopt{omit-fields} but can't with \resourceopt{ignore-fields}
(see \exampleref{ex:bib2glsgatherdeps}).

The value of the \gloskey{short} form is converted to \idx{uppercase} with:
\begin{compactcodebox}
 \resourceoptval{short-case-change}{uc}
\end{compactcodebox}%
Note that you will need \app{bib2gls} v4.1+ to provide support for
\gls{BibGlsNoCaseChange}. For older versions, replace \gls{BibGlsNoCaseChange}
with \gls{NoCaseChange}. (This will alter the behaviour of the \idx{allcaps} \gls{GLS}.)
If you try this example with \app{bib2gls} v4.1+, 
observe the difference between \resourceoptval{short-case-change}{uc}, which uses
\app{bib2gls} to perform the case-change, and \resourceoptval{short-case-change}{uc-cs},
which simply encapsulates the original value with \gls{glsuppercase} (which doesn't
recognise \gls{BibGlsNoCaseChange} as an exclusion).


This means that the definitions that \app{bib2gls} writes to the \ext{glstex}
file will be equivalent to those in the preamble of
\exampleref{ex:nestedlinkglsps} (with the additional \qt{MathML} abbreviation).

\mExampleref{ex:bib2glsscabbrvs} adapts 
\exampleref{ex:bib2glsabbrvs} to use a \idx{smallcaps} abbreviation style.
This means that the \resourceopt{short-case-change} option isn't required.
The mixed case in MathML is dealt with by defining \gls{BibGlsNoCaseChange}
to reduce the font size. An alternative
is to use \gls{glstextup} instead of \gls{textsmaller}, which will match the 
abbreviation plural suffix.
\begin{codebox}
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc}}
\cmd{newcommand}\marg{\gls{BibGlsNoCaseChange}}[1]\marg{\comment{\app{bib2gls} v4.1+}
 \gls{textsmaller}\marg{\#1}}
\codepar
\gls{GlsXtrLoadResources}\oarg{
 \resourceoptvalm{src}{abbrvs},
 \resourceoptvalm{field-aliases}{nestedlong=\gloskey{long}},
 \resourceoptvalm{ignore-fields}{\gloskey{description}}
}
\end{codebox}
This will need the \sty{relsize} package. Otherwise, the rest of the document
is the same as \exampleref{ex:bib2glsabbrvs}.  However, with the same document
build as before, this would lead to the odd-looking capital \qt{S} at the start
of the section header (\textsc{Ssi} enabled \textsc{html}) which is caused 
by \gls{Glsfmtlong} trying to apply sentence-casing to \gls{glsps}:
the \gls{makefirstuc} mapping will replace \gls{glsps}
with \gls{Glsps}.  This wasn't noticeable with the previous example which had
\idx{uppercase} abbreviations.  It is noticeable with \idx{smallcaps}.

The trick to prevent this is to insert an empty
group before the leading \gls{glsps}. Rather than edit the \filefmt{abbrvs.bib} file,
\app{bib2gls} can be instructed to implement this fix by invoking \app{bib2gls} with the 
\switch{mfirstuc-protection} switch followed by the list of fields that need to be adjusted.
In this case, only the \gloskey{long} field needs to be checked:
\begin{terminal}
bib2gls \switch{mfirstuc-protection} \gloskey{long} myDoc
\end{terminal}
Or use \gls{BibGlsOptions}:
\begin{codebox}
\gls{BibGlsOptions}\marg{\bibglsswitchoptvalm{mfirstuc-protection}{\gloskey{long}}}
\end{codebox}
An inspection of the resulting \ext{glstex} file will show that only the \gloskey{long}
field for the \code{shtml} entry has been adjusted, as it's the only one that starts with
a known problematic command.

\begin{resultbox}
\createexample*[
 label={ex:bib2glsscabbrvs},
title={Using \appfmt{bib2gls}: smallcap abbreviations},
description={Example document using bib2gls with smallcap abbreviations},
arara={pdflatex,bib2gls,pdflatex,pdfcrop}
]
{%
\cbeg{filecontents*}{abbrvs.bib}\nl
\abbrvsbibcontent\nl
\cend{filecontents*}\nl
\cmd{usepackage}[T1]\marg{fontenc}\nl
\cmd{usepackage}\marg{relsize}\nl
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}\nl
\cmd{usepackage}\oarg{record=nameref}\marg{glossaries-extra}
\codepar
\gls{BibGlsOptions}\marg{mfirstuc-protection=\marg{long}}\comment{requires bib2gls v4.0+}
\codepar
\gls{setabbreviationstyle}\marg{long-short-sc}
\cmd{newcommand}\marg{\gls{BibGlsNoCaseChange}}[1]\marg{\gls{textsmaller}\marg{\#1}}
\codepar
\gls{GlsXtrLoadResources}\oarg{\nlsp
 \resourceoptvalm{src}{abbrvs},\nlsp
 \resourceoptvalm{field-aliases}{nestedlong=\gloskey{long}},\nlsp
 \resourceoptvalm{ignore-fields}{\gloskey{description}}\nl
}
\codepar
}
{%
\gls{tableofcontents}\nl
\cmd{section}\marg{\gls{Glsfmtlong}\marg{shtml}}\nl
First use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}, \gls{gls}\marg{mathml}.
\codepar
Next use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}, \gls{gls}\marg{mathml}.
All caps: \gls{GLS}\marg{mathml}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}

\mExampleref{ex:bib2glsgatherdeps} adapts 
\exampleref{ex:bib2glsscabbrvs} to use \resourceopt{omit-fields} instead of
\resourceopt{ignore-fields} and uses the custom \optfmt{fulllong} for the
\gloskey{long} value. The 
use of \resourceopt{omit-fields} rather than \resourceopt{ignore-fields} means that
\app{bib2gls} still parses the original \gloskey{description} provided in the
\ext{bib} file, even though that field is omitted from the \ext{glstex} file.
This means that the \code{xml} entry is selected even though it hasn't been 
referenced anywhere in the document,
but I've used \resourceopt{gather-parsed-dependencies} to gather the dependencies
found in the \gloskey{description} field and add them to the \gloskey{seealso} field
so that there is now a cross-reference to them in the \idx{glossary}.
Note that this requires \app{bib2gls} v4.1+.
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{
 \resourceoptvalm{src}{abbrvs},
 \resourceoptvalm{field-aliases}{fulllong=\gloskey{long}},
 \resourceoptvalm{omit-fields}{\glsquote{\gloskey{description}}},
 \resourceopt{gather-parsed-dependencies}
}
\end{codebox}
The \resourceopt{omit-fields} option 
has a complex string concatenation syntax with optional conditionals.
This example doesn't have a conditional part but it's important to 
quote the string part (see the \app{bib2gls} user guide for more details).
The rest of the document is as for \exampleref{ex:bib2glsscabbrvs}, but note that
now the \switch{mfirstuc-protection} option should not be used as the \gloskey{long}
field is no longer problematic.

\begin{resultbox}
\createexample*[
 label={ex:bib2glsgatherdeps},
title={Using \appfmt{bib2gls}: gathering dependencies from field values},
description={Example document using bib2gls with smallcap abbreviations where the seealso 
key is set from information gained by parsing field values},
arara={pdflatex,bib2gls,pdflatex,pdfcrop}
]
{%
\cbeg{filecontents*}{abbrvs.bib}\nl
\abbrvsbibcontent\nl
\cend{filecontents*}\nl
\cmd{usepackage}[T1]\marg{fontenc}\nl
\cmd{usepackage}\marg{relsize}\nl
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}\nl
\cmd{usepackage}\oarg{record=nameref}\marg{glossaries-extra}
\codepar
\gls{BibGlsOptions}\marg{mfirstuc-protection=\marg{long}}
\codepar
\gls{setabbreviationstyle}\marg{long-short-sc}\nl
\cmd{newcommand}\marg{\gls{BibGlsNoCaseChange}}[1]\marg{\gls{textsmaller}\marg{\#1}}
\codepar
\gls{GlsXtrLoadResources}\oarg{\nlsp
 \resourceoptvalm{src}{abbrvs},\nlsp
 \resourceoptvalm{field-aliases}{fulllong=\gloskey{long}},\nlsp
\comment{The following require bib2gls v4.1+}
 \resourceoptvalm{omit-fields}{\glsquote{\gloskey{description}}},\nlsp
 \resourceopt{gather-parsed-dependencies}\nl
}
\codepar
}
{%
\gls{tableofcontents}\nl
\cmd{section}\marg{\gls{Glsfmtlong}\marg{shtml}}\nl
First use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}, \gls{gls}\marg{mathml}.
\codepar
Next use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}, \gls{gls}\marg{mathml}.
All caps: \gls{GLS}\marg{mathml}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}


\section{Indexing (Recording)}
\label{sec:bib2glsindexing}

As with \app{makeindex} and \app{xindy}, the \idx{glslike} and
\idx{glstextlike} commands automatically index, but the underlying
\idx{indexing} mechanism is more like that used with
\gls{makenoidxglossaries}. Each indexing instance creates a \record\
in the \ext+{aux} file, which \app{bib2gls} can then pick up when it
parses the \ext{aux} file. Each record has a \location, an associated format (the
\idx{locationencap}) which can be set with the \glsopt{format} key,
and an associated \idx{locationcounter} (as with the other indexing
methods).

The formatted \idx{locationlist} is stored in the \gloskey{location}
field (unless \resourceoptval{save-locations}{false}). Additionally,
the individual \locations\ are stored in the \glosfield{loclist} field as
an \sty{etoolbox} internal list (as with \gls{makenoidxglossaries}).
This may be used to pick out individual locations to avoid the
complexity of parsing the formatted list.

See the \qt{Location List Options} section of the \app{bib2gls} manual for
information on how to adjust the way the \idx{locationlist} is compacted or how
to separate the \idx{locationlist} into groups associated with different
counters or how to move \locations\ with a particular format into a separate
field.

\section{Selection}
\label{sec:bib2glsselection}

\begin{warning}
Commands like \gls{glsaddall} and \gls{glsaddallunused} don't work
with \app{bib2gls} as these commands have to iterate over each
\idx{glossary}['s] internal lists of defined entry labels, which
will be empty on the first run and on subsequent runs will only
contain those entries that have been selected by \app{bib2gls}.
Use \resourceoptval{selection}{all} to select all entries instead.
\end{warning}

The default behaviour is for \app{bib2gls} to select all entries
that have a \record\ in the \ext{aux} file, and any dependent
entries (including parent and cross-references). This behaviour can
be changed with the \resourceopt{selection} resource option, and
there are other options that can apply a filter to adjust the
selection (see the \app{bib2gls} manual for further details).

The \code{glsignore} format (for example,
\code{\gls{gls}\oarg{\glsoptval{format}{glsignore}}\marg{duck}}) is
recognised by \app{bib2gls} as a special
\idxc{ignoredlocation}{ignored record}. This means that it will
match the \qt{recorded} selection criteria, but the record won't be added to the
location list, so you won't get spurious commas in the
\idx{locationlist} caused by blank locations (as can happen with the other \idx{indexing}
methods).

\begin{information}
If an entry has one or more \idxc{ignoredlocation}{ignored
record}, no other type of record, and no dependencies then it is considered an
\qt{ignored entry}. By default it behaves in the same way as all
other recorded entries, but ignored entries can be tidied away into
an \idx{ignoredglossary} with the \resourceopt{ignored-type} resource
option. This ensures that the entries are defined but they won't
appear in the regular glossaries.
\end{information}

For example, at the start of the front matter, set the default to the
ignored format:
\begin{codebox}
\gls{GlsXtrSetDefaultNumberFormat}\marg{\encap{glsignore}}
\end{codebox}
then at the start of the main matter set the default to the normal
format:
\begin{codebox}
\gls{GlsXtrSetDefaultNumberFormat}\marg{\encap{glsnumberformat}}
\end{codebox}
This will prevent any records in the
front matter from occurring in the \idxpl{locationlist}.
If you have any entries that only occur in the front matter and not
the main matter then they will end up in the glossary with no
\idx{locationlist}. If this is undesirable, move them to an
\idx{ignoredglossary}:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{\resourceoptval{ignored-type}{ignored}}
\end{codebox}
(This option requires \app{bib2gls} v4.0+.) This will automatically define
an \idx{ignoredglossary} labelled \qtt{ignored} with the unstarred 
\gls{provideignoredglossary}.

The \resourceopt{selection} option indicates which entries should be
selected from the \ext{bib} files (listed in \resourceopt{src}).
For example, \resourceoptval{selection}{all} indicates to select all
entries, regardless of whether or not the entries have been
referenced in the document. This may lead to empty
\idxpl{locationlist} for some (or all) entries.
The default setting is \resourceoptval{selection}{recorded and
deps}, which indicates to select all entries that have \records\ and
any dependent entries. See the \app{bib2gls} user manual for more
details of this option.

\section{Sorting and Displaying the Glossary}
\label{sec:bib2glssortprint}

With \app{makeindex} and \app{xindy}, the indexing data (read from the
associated input file created by \gls{makeglossaries}) is sorted and the code
to typeset the \idx{glossary} is written to an output file, which is then input
by \gls{printglossary}. These general purpose \idxpl{indexingapp} only have
access to the indexing data, which consists of the sort value, the \qt{actual
text} (\gls{glossentry}\margm{label} or
\gls{subglossentry}\margm{level}\margm{label}), and the \locations\ or
\gloskey{see}\Slash\gloskey{seealso}\Slash\gloskey{alias} information. This means
that the \idxpl{indexingapp} can't detect any references within fields such as
\gloskey{description}, which means those references won't be available to the
\idxpl{indexingapp} until the applicable field has been typeset in the document
(typically, when the description is typeset in the glossary).

With \app{bib2gls}, the entries supplied in the \ext{bib} files are selected
according to the designated criteria and sorted. Then the entry definition code
(\gls{longnewglossaryentry} or \gls{newabbreviation} or \gls{newglossaryentry})
is written to the \ext{glstex} file in the order obtained by sorting. This
means that the \idx{glossary}['s] internal list only contains the required
entry labels, and those labels are in the required order, so the \idx{glossary}
can be displayed with \gls{printunsrtglossary} (see
\sectionref{sec:printunsrt}). Since \app{bib2gls} has access to all fields,
it's able to detect dependent entries, even if they haven't been \recorded.
This means that those dependent entries can still be selected, but they won't
have any \records\ until they are actually indexed. This means that the entries
will be defined in the \ext{glstex} file but may not have a \idx{locationlist}
until the next \LaTeX+\app{bib2gls}+\LaTeX\ run.

\begin{information}
The source data from \app{bib2gls}['s] point of view is in \ext{bib} files
using the \ext{bib} format described in \app{bib2gls}['s] user guide.
The \LaTeX\ entry definitions (using commands provided by \sty{glossaries}
and \sty{glossaries-extra}) are written to the \ext{glstex} file that's 
automatically input by the corresponding \gls{GlsXtrLoadResources}.
\end{information}

With \app{bib2gls}, the processed information, such as the
\idx{locationlist} or letter group, is stored in fields such as
\gloskey{location} or \gloskey{group} (where applicable), so the information
can be included by \gls{printunsrtglossary}, but it means that the information
is also available for use elsewhere in the document (so the
\opt{savenumberlist} package option provided by \sty{glossaries} is redundant).
This is different from \idxpl{indexingapp} where the processed information is embedded 
in the typesetting code, which makes it hard to extract.

There are many sorting options provided by \app{bib2gls}.  The default is
\resourceoptval{sort}{resource}, which means to sort alphabetically according to the resource
set's locale. This will typically match the document's language setting, if a
single language is set up, or Java's default locale if no language support was
provided.  (The language tag obtained from \sty{tracklang}['s] interface is
written to the \ext{aux} file but, for multiple languages, there's no way for \app{bib2gls}
to automatically detect which language applies to which resource set.)

For a multilingual document you need to explicitly set the locale using a
well-formed language tag. This can be done with the \resourceopt{locale}
option, which not only affects sorting, but also other language-sensitive
features, such as numeric and date/time parsing, or it can be done via the
\resourceopt{sort} option if the locale is only applicable to
language-sensitive sorting. For example:
\begin{codebox}
\gls{newglossary*}\marg{german}\marg{\gls{glossaryname}}
\gls{newglossary*}\marg{english}\marg{\gls{glossaryname}}
\gls{GlsXtrLoadResources}\oarg{
  \resourceoptval{type}{german}, \comment{glossary for these entries}
  \resourceoptvalm{src}{terms-de}, \comment{data in terms-de.bib}
  \resourceoptval{sort}{de-DE-1996} \comment{sort according to this locale}
}
\gls{GlsXtrLoadResources}\oarg{
  \resourceoptval{type}{english}, \comment{glossary for these entries}
  \resourceoptvalm{src}{terms-en}, \comment{data in terms-en.bib}
  \resourceoptval{sort}{en-GB} \comment{sort according to this locale}
}
\end{codebox}
The locale-sensitive sort methods usually ignore most
punctuation, so for lists of symbols you may find it more
appropriate to use one of the letter-base sort methods
that sort according to the Unicode value of each character or you
can sort by a different field, such as the \gloskey{description} or the entry label.
Alternatively you can provide a custom rule.
See the \app{bib2gls} manual for full details of all the available
sort methods.

Suppose the \ext{bib} examples shown \hyperlink{examplebib}{earlier}
have been stored in the files \filefmt{terms.bib} (general entries),
\filefmt{abbrvs.bib} (abbreviations) and \filefmt{symbols.bib}
(symbols) which may either be in
the current directory or on \TeX's path. 
\mExampleref{ex:bib2gls} requires these three files but has a single
resource command. Remember that the abbreviation style must be set before
\gls{GlsXtrLoadResources}. Also, the \filefmt{abbrvs.bib} file contains 
the awkward nested abbreviation that doesn't have the \gloskey{long} field set,
so I need to choose one of my custom fields to use for the long form. In this case,
I've chosen \optfmt{fulllong}.
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}\oarg{record}\marg{glossaries-extra}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}}
\codepar
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{terms,abbrvs,symbols},
 \resourceoptvalm{field-aliases}{fulllong=\gloskey{long}},
 \resourceoptval{description-case-change}{firstuc},
 \resourceoptval{post-description-dot}{all}
}
\codepar
\cbeg{document}
\gls{gls}\marg{bird}
\codepar
\gls{gls}\marg{shtml}
\codepar
\gls{gls}\marg{M}
\codepar
\gls{GlsXtrSetDefaultNumberFormat}\marg{\encap{glsignore}}
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
The document build process (assuming the document is called
\filefmt{mydoc}) is:
\begin{terminal}
pdflatex mydoc
bib2gls mydoc
pdflatex mydoc
\end{terminal}
\begin{resultbox}
\createexample*[
 label={ex:bib2gls},
title={Using \appfmt{bib2gls}: one resource set},
description={Example document using bib2gls with one resource set},
arara={pdflatex,bib2gls,pdflatex,pdfcrop}
]
{\cbeg{filecontents*}{terms.bib}^^J%
\termsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{abbrvs.bib}^^J%
\abbrvsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{symbols.bib}^^J%
\symbolsbibcontent^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\oarg{record}\marg{glossaries-extra}
\codepar
\gls{setabbreviationstyle}\marg{long-short-sc-desc}
\codepar
\gls{GlsXtrLoadResources}\oarg{src=\marg{terms,abbrvs,symbols},\nlsp
 field-aliases=\marg{fulllong=long},\nlsp
 \resourceoptval{description-case-change}{firstuc},\nlsp
 \resourceoptval{post-description-dot}{all}\nl
 }
\codepar
}
{\gls{gls}\marg{bird}
\codepar
\gls{gls}\marg{shtml}
\codepar
\gls{gls}\marg{M}
\codepar
\gls{GlsXtrSetDefaultNumberFormat}\marg{glsignore}\nl
\gls{printunsrtglossaries}
}
\end{resultbox}
This creates a single glossary containing the entries:
\code{bird}, \code{duck}, \code{goose},
\code{html}, \code{M}, \code{shtml} and \code{ssi} (in that
order). The \code{bird}, \code{shtml} and \code{M} entries
were added because \app{bib2gls} detected (from the \ext{aux}
file) that they had been used in the document. (That is, they had
\records.) The other entries
were added because \app{bib2gls} detected (from the \ext{bib}
files) that they are referenced by the \recorded\ entries. In the case of
\code{duck} and \code{goose}, they are in the \gloskey{seealso}
field for \code{bird}. In the case of \code{ssi} and
\code{html}, they are referenced in the \gloskey{description}
field of \code{shtml}. These cross-referenced entries won't have a
\idx{locationlist} when the \idx{glossary} is first displayed, but depending on
how they are referenced, they may pick up a \idx{locationlist} on the
next document build. (This example switches to \glsoptval{format}{\encap{glsignore}}
just before the glossary so it doesn't make a difference.) 
The \code{xml} entry isn't required at all, and
so hasn't been defined (from LaTeX's point of view).

\mExampleref{ex:bib2glsmultiresources} uses the same three \ext{bib}
files but the entries are separated into different glossaries with
different sort methods. However, I would like them all to apply the adjustments
to the \gloskey{description} field, so I've redefined \gls{GlsXtrDefaultResourceOptions}
to expand to my preferred default.
\begin{codebox}
\cmd{usepackage}\oarg{\opt{record},\opt{abbreviations},\opt{symbols}}\marg{glossaries-extra}
\codepar
\cmd{renewcommand}\gls{GlsXtrDefaultResourceOptions}\marg{
 \resourceoptval{description-case-change}{firstuc},
 \resourceoptval{post-description-dot}{all}
}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}}
\codepar
\gls{GlsXtrLoadResources}
 \oarg{\resourceoptvalm{src}{terms},\resourceoptval{sort}{en-GB},\resourceoptval{type}{main}}
\codepar
\gls{GlsXtrLoadResources}
 \oarg{\resourceoptvalm{src}{abbrvs},\resourceoptval{sort}{letter-nocase},
 \resourceoptvalm{abbreviation-sort-fallback}{\gloskey{long}},
 \resourceoptvalm{field-aliases}{fulllong=\gloskey{long}},
 \resourceoptval{type}{abbreviations}}
\codepar
\gls{GlsXtrLoadResources}
 \oarg{\resourceoptvalm{src}{symbols},\resourceoptval{sort}{use},\resourceoptval{type}{symbols}}
\codepar
\cbeg{document}
\gls{gls}\marg{bird}
\codepar
\gls{gls}\marg{shtml}
\codepar
\gls{gls}\marg{M}
\codepar
\gls{GlsXtrSetDefaultNumberFormat}\marg{\encap{glsignore}}
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
This is somewhat contrived as there's little reason to use a non-locale sort method for
word abbreviations, although it doesn't make a difference in this particular example.
However, it may be appropriate for abbreviations that contain punctuation or symbols
that need to be taken into account when sorting.

The default \resourceoptvalm{abbreviation-sort-fallback}{\gloskey{short}} will just use
the \gloskey{short} value as the fallback if the \gloskey{sort} field isn't set.
If the abbreviation style, as in this case, puts the long form in the \gloskey{name} 
field, then this fallback setting may need adjusting.
Remember that by \emph{not} setting the \gloskey{sort} field the fallback mechanism can
be used to make adjustments for individual documents without having to modify the
source \ext{bib} files.

\begin{resultbox}
\createexample*
[title={Using \appfmt{bib2gls}: multiple resource sets},
 label={ex:bib2glsmultiresources},
description={Example document using bib2gls with multiple resource sets},
arara={pdflatex,bib2gls,pdflatex,pdfcrop}
]
{\cbeg{filecontents*}{terms.bib}^^J%
\termsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{abbrvs.bib}^^J%
\abbrvsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{symbols.bib}^^J%
\symbolsbibcontent^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\oarg{record,abbreviations,symbols}\marg{glossaries-extra}
\codepar
\cmd{renewcommand}\gls{GlsXtrDefaultResourceOptions}\marg{\nlsp
 \resourceoptval{description-case-change}{firstuc},\nlsp
 \resourceoptval{post-description-dot}{all}\nl
}
\codepar
\gls{setabbreviationstyle}\marg{long-short-sc-desc}
\codepar
\gls{GlsXtrLoadResources}\oarg{src=terms,sort=en-GB,type=main}
\codepar
\gls{GlsXtrLoadResources}
 \oarg{src=abbrvs,sort=letter-nocase,
 abbreviation-sort-fallback=\marg{long},
 field-aliases=\marg{fulllong=long},
 type=abbreviations}
\codepar
\gls{GlsXtrLoadResources}
 \oarg{src=symbols,sort=use,type=symbols}
}
{\gls{gls}\marg{bird}
\codepar
\gls{gls}\marg{shtml}
\codepar
\gls{gls}\marg{M}
\codepar
\gls{GlsXtrSetDefaultNumberFormat}\marg{glsignore}\nl
\gls{printunsrtglossaries}
}
\end{resultbox}

\mExampleref{ex:bib2glssubblocks}, on the other hand,
has multiple instances of \gls{GlsXtrLoadResources}
with the same \resourceopt{type}, which will produce a
\idx{glossary} with sub-blocks. For example:
\begin{codebox}[before upper app=\small]
\cmd{usepackage}\oarg{\opt{record},\optval{style}{\glostyle{indexgroup}}}
 \marg{glossaries-extra}
\codepar
\cmd{renewcommand}\gls{GlsXtrDefaultResourceOptions}\marg{
 \resourceoptval{description-case-change}{firstuc},
 \resourceoptval{post-description-dot}{all}
}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}}
\codepar
\gls{GlsXtrLoadResources}
 \oarg{\resourceoptvalm{src}{abbrvs},\resourceoptval{sort}{letter-nocase},\resourceoptval{type}{main},
  \resourceoptvalm{field-aliases}{fulllong=\gloskey{long}},
  \resourceoptval{group}{abbreviations}}
\gls{glsxtrsetgrouptitle}\marg{abbreviations}\marg{Abbreviations}
\codepar
\gls{GlsXtrLoadResources}
 \oarg{\resourceoptvalm{src}{symbols},\resourceoptval{sort}{use},\resourceoptval{type}{main},
  \resourceoptval{group}{symbols}}
\gls{glsxtrsetgrouptitle}\marg{symbols}\marg{Symbols}
\codepar
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{terms},\resourceoptval{sort}{en-GB},\resourceoptval{type}{main}}
\codepar
\cbeg{document}
\gls{gls}\marg{bird}
\codepar
\gls{gls}\marg{shtml}
\codepar
\gls{gls}\marg{M}
\codepar
\gls{GlsXtrSetDefaultNumberFormat}\marg{\encap{glsignore}}
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
This sets the \gloskey{group} field for the first two resource sets to the
label given by the \resourceopt{group} resource option. In general, the
\resourceopt{group} resource option should only be used when splitting up a
single glossary into sub-groups in this way. Normally, the group should be
automatically set as a by-product of the sorting process (if enabled).

\begin{information}
If multiple instances of \gls{GlsXtrLoadResources} assign entries to the same
glossary, the glossary will end up with sub-blocks (that may or may not contain
one or more groups), where each sub-block is in the order of the \gls{GlsXtrLoadResources}
commands, but the entries within each sub-block are in the designated sort
order of the corresponding \gls{GlsXtrLoadResources} command.
There won't necessarily be any visual difference between the sub-blocks.
\end{information}

\Exampleref{ex:bib2glssubblocks} therefore results in a single \idx{glossary}
composed of three sub-blocks. The first sub-block has a single group
with the label \code{abbreviations} and title \qt{Abbreviations};
the second sub-block again has a single group, this time with the
label \code{symbols} and title \qt{Symbols};
the third sub-block consists of the usual letter groups.

Note that for this example to work, you must run \app{bib2gls}
with the \switch{group} (or \switch{g}) switch. For example,
if the document is called \filefmt{myDoc.tex}:
\begin{terminal}
pdflatex myDoc
bib2gls \switch{g} myDoc
pdflatex myDoc
\end{terminal}

This example is somewhat contrived as it isn't usual to split up a \idx{glossary}
that only has alphabetic entries in this way. It would more typically be used to separate a
punctuation group (which needs to be ordered by character code) from the normal 
alphabetical groups (as is done for the \nameref{index} of this user manual).

\begin{resultbox}
\createexample*[title={Using \appfmt{bib2gls}: sub-blocks},
 label={ex:bib2glssubblocks},
description={Example document using bib2gls with multiple resource
sets for a single glossary to create a glossary with sub-blocks},
arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop}
]
{\cbeg{filecontents*}{terms.bib}^^J%
\termsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{abbrvs.bib}^^J%
\abbrvsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{symbols.bib}^^J%
\symbolsbibcontent^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\oarg{record,style=indexgroup}\marg{glossaries-extra}
\codepar
\cmd{renewcommand}\gls{GlsXtrDefaultResourceOptions}\marg{\nlsp
 \resourceoptval{description-case-change}{firstuc},\nlsp
 \resourceoptval{post-description-dot}{all}\nl
}
\codepar
\gls{setabbreviationstyle}\marg{long-short-sc-desc}
\codepar
\gls{GlsXtrLoadResources}^^J
 \oarg{src={abbrvs},sort=letter-nocase,type=main,^^J
  field-aliases=\marg{fulllong=long},^^J
  group={abbreviations}}^^J%
\gls{glsxtrsetgrouptitle}\marg{abbreviations}\marg{Abbreviations}
\codepar
\gls{GlsXtrLoadResources}^^J
 \oarg{src={symbols},sort=use,type=main,group=symbols}^^J%
\gls{glsxtrsetgrouptitle}\marg{symbols}\marg{Symbols}
\codepar
\gls{GlsXtrLoadResources}\oarg{src={terms},sort=en-GB,type=main}
}
{\gls{gls}\marg{bird}
\codepar
\gls{gls}\marg{shtml}
\codepar
\gls{gls}\marg{M}
\codepar
\gls{GlsXtrSetDefaultNumberFormat}\marg{glsignore}\nl
\gls{printunsrtglossaries}
}
\end{resultbox}

\begin{important}
The value of the \gloskey{group} field must always be a label (so
avoid special characters). You
can set the corresponding title with \code{glsxtrsetgrouptitle}
(see \sectionref{sec:glosstylemods}). If no title is set then the
label is used as the group title.
The \gloskey{group} field does not influencing sorting (it's usually 
set as a by-product of sorting). 
Setting this field overrides normal behaviour and can cause fragmented groups
(as in \exampleref{ex:unsrtcustomgrp}).
\end{important}

\mExampleref{ex:bib2gls1set4lists} adapts \exampleref{ex:bib2gls}
so that it still has only one resource set but now has four
glossaries: \qt{main} (the default), \qt{abbreviations},
\qt{symbols}, and \qt{index}.

Entries defined with \atentry{abbreviation} in the \ext{bib} file are written
to the \ext{glstex} file in such a way that they will be defined with \gls{newabbreviation}
when the \ext{glstex} file is input by \gls{GlsXtrLoadResources},
which means they will automatically be added to the \qt{abbreviations}
glossary, if the \gloskey{type} field isn't set.

Entries defined with \atentry{symbol} in the \ext{bib} file are written to the
\ext{glstex} file in such a way that they will be defined with
\gls{longnewglossaryentry*} which means they will automatically be added
to the default \qt{main} glossary, if the \gloskey{type} field isn't set.
Similarly for \atentry{index}, which will be defined in the \ext{glstex} file
with \gls{newglossaryentry}.

Rather than edit the \ext{bib} files to set the \gloskey{type} field
explicitly, which would make the \ext{bib} files less adaptable for other
documents, the \resourceopt{assign-fields} option is used to set the
\gloskey{type} field for this particular resource set. In this example,
\gloskey{type} is set to \qt{symbols} for any entries that are defined with
\atentry{symbols} and to \qt{index} for any entries that are defined with
\atentry{index}. The remaining entries will be added to the default main
glossary.

This means that even though only one resource set is used, it's
possible to distribute the entries into different glossaries, but
they will all be sorted together. Since the \gloskey{sort} field
hasn't been set for any of the entries, the appropriate fallback
fields will be used. These are changed for the \atentry{symbol} and
\atentry{abbreviation} entries.

\begin{important}
The sort fallback fields are only used when the \gloskey{sort} field
\emph{isn't} set (\app{bib2gls} \emph{falls back on} the applicable
fallback field to compensate for the missing \gloskey{sort} field). 
If the \gloskey{sort} field is set, then no fallback is required.
This fallback system allows for a more flexible approach to sorting.
\end{important}

The final glossary \qt{index} has
a copy of all selected entries. This is done with the
\resourceopt{copy-to-glossary} resource option. Since all the
entries were sorted together, they will be copied to the \qt{index}
glossary in their sorted order.

This duplication can cause a problem with duplicate hypertargets if
\sty{hyperref} is loaded. This problem is avoided by redefining
\gls{glstarget} to \gls{glsxtrtarget} in the preamble (before any
targets are created).

Unlike the previous examples, this example also uses the \qt{example}
entry, which is defined in the \filefmt{terms.bib} file with
\atentry{index}. This should only go in the index not in the main
glossary (which is achieved with the \resourceopt{assign-fields}
option), but it shouldn't be duplicated by the
\resourceopt{copy-to-glossary} option (which is ensured by the
definition of \gls{bibglscopytoglossary} provided in the
\ext{glstex} file).

\begin{codebox}[before upper app=\small]
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}[T1]\marg{fontenc}
\cmd{usepackage}[colorlinks]\marg{hyperref}
\cmd{usepackage}\oarg{\opt{record},
 \opt{nostyles},\optvalm{stylemods}{topic,tree,bookindex},
 \optval{style}{tree},\opt{abbreviations},\opt{symbols},\opt{index}}
 \marg{glossaries-extra}
\codepar
\cmd{renewcommand}\marg{\gls{glstarget}}\marg{\gls{glsxtrtarget}}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}}
\codepar
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{terms,abbrvs,symbols},
 \resourceoptvalm{assign-fields}{
    \gloskey{type} = "symbols"
       [ entrytype->actual = "symbol" ],
    \gloskey{type} = "index" [ entrytype->actual = "index" ]
  },
 \resourceoptval{sort}{en-GB},
 \resourceoptval{symbol-sort-fallback}{\gloskey{name}},
 \resourceoptval{abbreviation-sort-fallback}{\gloskey{long}},
 \resourceoptvalm{field-aliases}{fulllong=\gloskey{long}},
 \resourceoptvalm{copy-to-glossary}{"index"},
 \resourceoptval{description-case-change}{firstuc},
 \resourceoptval{post-description-dot}{all}
}
\codepar
\cmd{newcommand}\marg{\cmd{primaryfmt}}[1]\marg{\gls{hyperbf}\marg{\#1}}
\codepar
\cbeg{document}
\gls{gls}\marg{bird} \gls{gls}\marg{example}.
\codepar
\gls{gls}\marg{shtml}
\codepar
\gls{gls}\marg{M}
\codepar
\cmd{newpage}
\codepar
\cmd{renewcommand}*\marg{\gls{glsextrapostnamehook}}[1]\marg{\comment{}
 \gls{glsadd}\oarg{\glsoptval{format}{primaryfmt}}\marg{\#1}}\comment{}
\gls{printunsrtglossary*}\oarg{\printglossopt{nonumberlist}}
 \marg{\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{glossname}}\marg{firstuc}}
\gls{printunsrtabbreviations}
 \oarg{\printglossopt{nonumberlist},\printglossoptval{style}{\glostyle{topic}}}
\gls{printunsrtsymbols}\oarg{\printglossopt{nonumberlist}}
\codepar
\cmd{renewcommand}*\marg{\gls{glsextrapostnamehook}}[1]\marg{}\comment{}
\gls{printunsrtindex}\oarg{\printglossoptval{style}{\glostyle{bookindex}}}
\cend{document}
\end{codebox}

This uses several different approaches to changing the case of field values.
The \resourceopt{description-case-change} resource option instructs \app{bib2gls}
to alter the value of the \gloskey{description} field to ensure that it starts
with an \idx{uppercase} letter. However, the \idx{casechange} for the \gloskey{name}
field is performed by the \glostyle{topic} style, for the list of abbreviations,
and by locally setting the \catattr{glossname} attribute for the \cat{general} category
for the main \idx{glossary}. The \idx{casechange} for the \gloskey{name} field
could also be performed by \app{bib2gls}, but that would affect the index as well.

The general purpose post-name hook \gls{glsextrapostnamehook} is
used to automatically index each entry's appearance in their own
list using a custom format. Indexing within the glossary can only
occur once the glossary is typeset, which can't happen until the
entries have been defined. This means that an extra \app{bib2gls}
run is needed.

\begin{terminal}
pdflatex mydoc
bib2gls mydoc
pdflatex mydoc
bib2gls mydoc
pdflatex mydoc
\end{terminal}
The second page for \exampleref{ex:bib2gls1set4lists} is shown
\IfTeXParserLib{below}{on page~\pageref{ex:bib2gls1set4lists}}.

\begin{resultbox}[float=p]
\createexample*[
 label={ex:bib2gls1set4lists},
title={Using \appfmt{bib2gls}: one resource set but four lists},
description={Example document using bib2gls with one resource set
but four glossaries},
arara={pdflatex,bib2gls,pdflatex,bib2gls,pdflatex,pdfcrop},
fontsize=11,
pages=2
]
{\cbeg{filecontents*}{terms.bib}^^J%
\termsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{abbrvs.bib}^^J%
\abbrvsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{symbols.bib}^^J%
\symbolsbibcontent^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}[colorlinks]\marg{hyperref}^^J%
\cmd{usepackage}\oarg{record,nostyles,stylemods=\marg{topic,tree,bookindex},style=tree,\nlsp
 abbreviations,symbols,index}\marg{glossaries-extra}
\codepar
\cmd{renewcommand}\marg{\gls{glstarget}}\marg{\gls{glsxtrtarget}}
\codepar
\gls{setabbreviationstyle}\marg{long-short-sc-desc}
\codepar
\gls{GlsXtrLoadResources}\oarg{src=\marg{terms,abbrvs,symbols},\nlsp
 assign-fields = \marg{\nldbsp
    type = "symbols" [ entrytype->actual = "symbol" ],\nldbsp
    type = "index" [ entrytype->actual = "index" ]\nlsp
  },\nlsp
 sort=\marg{en-GB},\nlsp
 symbol-sort-fallback=name,\nlsp
 abbreviation-sort-fallback=long,\nlsp
 field-aliases=\marg{fulllong=long},\nlsp
 copy-to-glossary=\marg{"index"},\nlsp
 \resourceoptval{description-case-change}{firstuc},\nlsp
 \resourceoptval{post-description-dot}{all}\nl
}
\codepar
\cmd{newcommand}\marg{\cmd{primaryfmt}}[1]\marg{\gls{hyperbf}\marg{\#1}}
}
{\gls{gls}\marg{bird} \gls{gls}\marg{example}.
\codepar
\gls{gls}\marg{shtml}
\codepar
\gls{gls}\marg{M}
\codepar
\cmd{newpage}
\codepar
\cmd{renewcommand}*\marg{\gls{glsextrapostnamehook}}[1]\marg{\gls{glsadd}\oarg{format=primaryfmt}\marg{\#1}}\comment{}%
\gls{printunsrtglossary*}\oarg{\printglossopt{nonumberlist}}\nlsp
 \marg{\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{glossname}}\marg{firstuc}}\nl
\gls{printunsrtabbreviations}\oarg{nonumberlist,style=topic}\nl
\gls{printunsrtsymbols}\oarg{nonumberlist}
\codepar
\cmd{renewcommand}*\marg{\gls{glsextrapostnamehook}}[1]\marg{}\%^^J%
\gls{printunsrtindex}\oarg{style=bookindex}
}
\end{resultbox}

This document again only explicitly references the \qt{bird},
\qt{html} and \qt{M} entry. The other entries that appear in the
final document were selected because they were dependents of the
selected entries. These dependent entries end up being indexed in
the second \LaTeX\ run (following the first \app{bib2gls} run)
because they are now in the glossary and so are automatically
indexed. They are then selected on the next \app{bib2gls} because
they now have \records\ in the \ext{bib} file (in addition to being flagged as dependencies).

\begin{important}
This means that if the \ext{bib} files are later edited to remove
the dependencies, the formerly dependent entries will continue to be
selected (because of the \gls{glsadd} in the \gls{postnamehook}) 
until the associated \ext{glstex} file is deleted.
\end{important}

You can provide your own custom sort rule. For example,
if you are using \XeLaTeX\ or \LuaLaTeX\ or a recent \LaTeX\ kernel:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{
  \resourceoptvalm{src}{terms}, \comment{entries in terms.bib}
  \resourceoptval{sort}{custom}, \comment{custom sort rule}
  \resourceoptvalm{sort-rule}{\comment{required with sort=custom}
  < \ae;\AE\ < a;\'a;\aa;\"a,\"A;\'A;\AA;\"A < b,B
  < c;\'c,C;\'C < d,D < e;\'e,E;\'E < f,F < g,G
  < h,H < i;\'i,I;\'I < j,J < l;\l,L;\L < m,M < n,N
  < o;\"o;\o,O;\"O;\O\ < p,P < q,Q < r,R < s;\'s,S;\'S
  < t,T < u;\'u,U;\'U < v,V < w,W < x,X < y,Y <
  z;\.z,Z;\.Z
  }
}
\end{codebox}

\begin{warning}
With old versions of the \LaTeX\ kernel, \idx{utf8} characters,
such as \'e or \o, will expand when written to the \ext{aux} file.
\end{warning}

Some of the options, including \resourceopt{sort-rule},
allow Unicode characters to be indicated in the format
\gls{u}\meta{hex} (or \gls{u}~\meta{hex}). \app{bib2gls}
will recognise this as the character
given by the hexadecimal value \meta{hex}.

\begin{important}
The \meta{options} provided to \gls{GlsXtrLoadResources} will expand
as they are written to the \ext{aux} file (unless protected).  This
includes \gls{u}, so with a non-Unicode aware engine or where the
document source is required to be \idx{ascii}, the character \ae\
needs to be written as \code{\gls{string}\gls{u} E6} and so on.
Alternatively, use the shortcut \code{\gls{string}\gls{u} E6}.
\end{important}

For example, the above can be rewritten as:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{
  \resourceoptvalm{src}{terms}, \comment{entries in terms.bib}
  \resourceoptval{sort}{custom}, \comment{custom sort rule}
  \resourceoptvalm{sort-rule}{\comment{required with sort=custom}
  < \gls{glshex} E6;\gls{glshex} C6
  < a;\gls{glshex} E1;\gls{glshex} E5,\gls{glshex} E4,A;\gls{glshex} C1;\gls{glshex} C5;\gls{glshex} C4
  < b,B < c;\gls{glshex} 0107,C;\gls{glshex} 0106 < d,D
  < e;\gls{glshex} E9,E;\gls{glshex} C9 < f,F < g,G
  < h,H < i;\gls{glshex} ED,I;\gls{glshex} CD < j,J
  < l;\gls{glshex} 0142,L;\gls{glshex} 0141 < m,M < n,N
  < o;\gls{glshex} F6;\gls{glshex} F8,O;\gls{glshex} D6;\gls{glshex} D8
  < p,P < q,Q < r,R < s;\gls{glshex} 013F,S;\gls{glshex} 015A
  < t,T < u;\gls{glshex} FA,U;\gls{glshex} DA < v,V < w,W < x,X < y,Y
  < z;\gls{glshex} 017C,Z;\gls{glshex} 017B
  }
}
\end{codebox}

Bear in mind that the rule-based comparators  
(that is, the localisation rules and the custom rule)
break up terms according to \resourceopt{break-at}, which allows
punctuation and spaces to be stripped from sort values.
The default is \resourceoptval{break-at}{word}, which
replaces content between word boundaries with a marker (identified
with \resourceopt{break-marker}) to perform word-sorting. 
This means that if you actually want the punctuation retained in the
sort value, you will need to use \resourceoptval{break-at}{none}
instead.

\section{Record Counting}
\label{sec:recordcount}

As from version 1.1 of \app{bib2gls}, you can save the total
record count for each entry by invoking \app{bib2gls}
with the \switch{record-count} or \switch{record-count-unit}
switches. These options will ensure that when each entry
is written to the \ext{glstex} file \app{bib2gls} will
additionally set the following internal fields for that entry:
\begin{itemize}
\item \glosfield{recordcount}: set to the total
number of \records\ found for the entry;
\item \glosfield{recordcount.counter}: set to the total
number of \records\ found for the entry for the given counter.
\end{itemize}
If \switch{record-count-unit} is used then additionally:
\begin{itemize}
\item \glosfield{recordcount.counter.location}: set to the total
number of \records\ found for the entry for the given counter with the
given location.
\end{itemize}
Only use the unit counting option if the locations don't contain any special
characters. With \sty{hyperref} use \theHcountername\ rather than
\thecountername. Otherwise, if you really need unit counting with locations 
that may contain formatting commands, then you can try redefining:
\cmddef{glsxtrdetoklocation}
so that it detokenizes \meta{location} but take care when
using \gls{GlsXtrLocationRecordCount} with commands like
\gls{thepage} as they can end up becoming detokenized too early.

Note that the record count includes \locations\ that \app{bib2gls}
discards, such as \idxc{ignoredlocation}{ignored records}, duplicates and partial
duplicates (unless you filter them out with
\switch{record-count-rule}). It doesn't include cross-reference records.  For
example, suppose a document has an entry with the label \code{bird}
that is \recorded\ (\indexed) as follows:
\begin{description}
\item[Page 1] two (2) instances of \code{\gls{gls}\marg{bird}};
\item[Page 2] one (1) instance of \code{\gls{gls}\marg{bird}};
\item[Page 3] four (4) instances of \code{\gls{gls}\marg{bird}};
\item[Section 3] one (1) instance of
\code{\gls{gls}\oarg{\glsoptval{counter}{section}}\marg{bird}}.
\end{description}

Then the total record count (stored in
the \glosfield{recordcount} field) is $2+1+4+1=8$, the total for the
\ctr{page} counter (stored in the
\glosfielddisp{recordcount.counter}{recordcount.page} field) is
$2+1+4=7$, and the total for the \ctr{section} counter (stored in
the \glosfielddisp{recordcount.counter}{recordcount.section} field)
is~1.

With the unit counting on as well, the following fields are assigned:
\begin{itemize}
\item \glosfielddisp{recordcount.counter.location}{recordcount.page.1} is
set to 2;
\item \glosfielddisp{recordcount.counter.location}{recordcount.page.2} is
set to 1;
\item \glosfielddisp{recordcount.counter.location}{recordcount.page.3} is
set to 4;
\item \glosfielddisp{recordcount.counter.location}{recordcount.section.3}
is set to~1.
\end{itemize}

You can access these fields using the following commands which
will expand to the field value if set or to 0 if unset:
\cmddef{GlsXtrTotalRecordCount}
This expands to the total record count for the entry given by
\meta{label}. For example:
\begin{codebox}
\gls{GlsXtrTotalRecordCount}\marg{bird}
\end{codebox}
expands to 8.

\cmddef{GlsXtrRecordCount}
This expands to the \idxc{locationcounter}{counter} total for the entry given by
\meta{entry-label} where \meta{counter} is the counter name.
For example:
\begin{codebox}
\gls{GlsXtrRecordCount}\marg{bird}\marg{\ctr{page}}
\end{codebox}
expands to 7 and
\begin{codebox}
\gls{GlsXtrRecordCount}\marg{bird}\marg{\ctr{section}}
\end{codebox}
expands to 1.

\cmddef{GlsXtrLocationRecordCount}
This expands to the total for the given \location. For example
\begin{codebox}
\gls{GlsXtrLocationRecordCount}\marg{bird}\marg{\ctr{page}}\marg{3}
\end{codebox}
expands to 4. Be careful about using \gls{thepage} in the
\meta{location} part. Remember that due to \TeX's asynchronous
output routine, \gls{thepage} may not be correct.

There are commands analogous to the entry counting commands like
\gls{cgls} and \gls{cglsformat} that are triggered by the record count.
These are listed below. The test to determine if the entry's record count
exceeds the trigger value (which should be stored in the
\catattr{recordcount} attribute) is obtained with:
\cmddef{glsxtrifrecordtrigger}
If the \catattr{recordcount} attribute is set and \meta{total}
exceeds the value given by the \catattr{recordcount} attribute, then
this does \meta{true} otherwise it does \meta{false}. The
\meta{total} is given by:
\cmddef{glsxtrrecordtriggervalue}
This should expand to the record count value that needs testing. The
default definition is:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrrecordtriggervalue}}[1]\marg{\comment{}
 \gls{GlsXtrTotalRecordCount}\marg{\#1}\comment{}
}
\end{compactcodebox}
This command may be redefined as appropriate. For example, it may be
redefined to use \gls{GlsXtrRecordCount} for a particular
\idx{locationcounter} or to use \gls{GlsXtrLocationRecordCount} for
a particular location.

The \catattr{recordcount} attribute may be set with
\gls{glssetcategoryattribute} or can be set for each listed category
with:
\cmddef{GlsXtrSetRecordCountAttribute}
The value must be an integer.

Commands like \gls{rgls} behave slightly differently to \gls{cgls}.
It's necessary for the command to add a \record\ to the \ext{aux}
file in order for the entry to be selected and for the record count
to be correct on the next \app{bib2gls}+\LaTeX\ run (for the default
\resourceoptvalm{selection}{recorded and deps}). The trigger record
is created with \glsoptval{format}{glstriggerrecordformat},
which \app{bib2gls} v1.1+ recognises as a special type of
\idx{ignoredlocation} format. This corresponds to the command:
\cmddef{glstriggerrecordformat}
As with \gls{glsignore}, this command does nothing and is considered
an ignored record (so it won't appear in the \idx{locationlist}),
but it indicates to \app{bib2gls} that the entry must be selected
and, if the \resourceopt{trigger-type} option has been set, the
entry will be assigned to the \resourceopt{trigger-type} glossary.

For example, to assign the entry to an \idx{ignoredglossary}:
\begin{codebox}
\gls{newignoredglossary}\marg{ignored}
\gls{GlsXtrLoadResources}\oarg{\resourceoptval{trigger-type}{ignored}}
\end{codebox}
This ensures that the entry is defined but it won't show up the
normal glossary.

\begin{information}
The \idx{postlinkhook} won't be implemented if the record trigger is
tripped. (That is, if the \gls{rglsformat}-like command is used instead of 
the \idx{glslike} command.)
\end{information}

\cmddef{rgls}
If the value has been supplied by the \catattr{recordcount}
attribute and is exceeded, this behaves like \gls{gls} otherwise it
creates a trigger record and uses:
\cmddef{rglsformat}
This has the same definition as \gls{cglsformat}.

\cmddef{rglspl}
If the value has been supplied by the \catattr{recordcount}
attribute and is exceeded, this behaves like \gls{glspl} otherwise
it creates a trigger record and uses:
\cmddef{rglsplformat}
which uses the appropriate plural fields.

\cmddef{rGls}
If the value has been supplied by the \catattr{recordcount}
attribute and is exceeded, this behaves like \gls{Gls} otherwise it
creates a trigger record and uses:
\cmddef{rGlsformat}
which performs the appropriate case-change.

\cmddef{rGlspl}
If the value has been supplied by the \catattr{recordcount}
attribute and is exceeded, this behaves like \gls{Glspl} otherwise
it creates a trigger record and uses:
\cmddef{rGlsplformat}
which uses the appropriate plural fields and case-change.

\cmddef{rGLS}
If the value has been supplied by the \catattr{recordcount}
attribute and is exceeded, this behaves like \gls{GLS} otherwise it
creates a trigger record and uses:
\cmddef{rGLSformat}
which performs the appropriate case-change.

\cmddef{rGLSpl}
If the value has been supplied by the \catattr{recordcount}
attribute and is exceeded, this behaves like \gls{GLSpl} otherwise
it creates a trigger record and uses:
\cmddef{rGLSplformat}
which uses the appropriate plural fields and case-change.

To make it easier to switch on record counting for an existing
document, you can use:
\cmddef{glsxtrenablerecordcount}
This redefines \gls{gls}, \gls{glspl}, \gls{Gls}, \gls{Glspl},
\gls{GLS}, \gls{GLSpl} to \gls{rgls}, \gls{rglspl}, \gls{rGls},
\gls{rGlspl}, \gls{rGLS}, \gls{rGLSpl}, respectively, for
convenience. This command will also switch the shortcut commands
such as \gls{ac} or \gls{ab}, if they have been enabled, from using
the \gls{cgls}-like commands to the corresponding \gls{rgls}
command.

For example, using the earlier
\hyperlink{examplebib}{\filefmt{terms.bib}, \filefmt{abbrvs.bib}
and \filefmt{symbols.bib}} example files:
\begin{codebox}
\cmd{documentclass}\marg{article}
\codepar
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\oarg{\opt{record}}\marg{glossaries-extra}
\codepar
\gls{newignoredglossary}\marg{ignored}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}}
\gls{GlsXtrLoadResources}\oarg{
 \resourceoptvalm{src}{terms,abbrvs,symbols},
 \resourceoptvalm{field-aliases}{fulllong=\gloskey{long}},
 \resourceoptval{trigger-type}{ignored},
 \resourceoptvalm{category}{same as entry}
}
\codepar
\gls{glsxtrenablerecordcount}
\gls{GlsXtrSetRecordCountAttribute}\marg{\cat{general},\cat{abbreviation}}\marg{1}
\codepar
\gls{glsdefpostlink}\marg{entry}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\gls{glsdefpostlink}\marg{\cat{symbol}}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\codepar
\cbeg{document}
\gls{gls}\marg{bird}, \gls{gls}\marg{ssi}, \gls{gls}\marg{bird}, \gls{gls}\marg{html},
\gls{gls}\marg{M}, \gls{gls}\marg{html}.
\codepar
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
If the document is called \filefmt{myDoc.tex}, then the build
process is:
\begin{terminal}
pdflatex myDoc
bib2gls \switch{record-count} myDoc
pdflatex myDoc
\end{terminal}
The \resourceoptvalm{category}{same as entry} resource option
assigns the \gloskey{category} field to the \ext{bib} entry type
(without the initial \code{@}). This means that the entries defined
in \filefmt{terms.bib} (with \atentry{entry}) have their
\gloskey{category} set to \code{entry}, the entries defined
in \filefmt{abbrvs.bib} (with \atentry{abbreviation}) have their
\gloskey{category} set to \code{abbreviation}, and the entries defined
in \filefmt{symbols.bib} (with \atentry{symbol}) have their
\gloskey{category} set to \code{symbol}.

I've added \idxpl{postlinkhook} to the \catfmt{entry} and
\catfmt{symbol} categories to show the description on
\idx{firstuse} (but not for the \catfmt{abbreviation} category).
\begin{resultbox}
\createexample*[
 label={ex:bib2glsrecordcounting},
title={Using \appfmt{bib2gls}: record counting},
description={Example document using bib2gls with multiple resource sets},
arara={pdflatex,bib2gls: { recordcount: on },pdflatex,pdfcrop}
]
{\cbeg{filecontents*}{terms.bib}^^J%
\termsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{abbrvs.bib}^^J%
\abbrvsbibcontent^^J%
\cend{filecontents*}^^J%
\cbeg{filecontents*}{symbols.bib}^^J%
\symbolsbibcontent^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}[T1]\marg{fontenc}^^J%
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\oarg{record}\marg{glossaries-extra}
\codepar
\gls{newignoredglossary}\marg{ignored}^^J%
\gls{setabbreviationstyle}\marg{long-short-sc-desc}
\codepar
\gls{GlsXtrLoadResources}\oarg{^^J
 \resourceoptvalm{src}{terms,abbrvs,symbols},^^J
 field-aliases=\marg{fulllong=long},^^J
 \resourceoptval{trigger-type}{ignored},^^J
 \resourceoptvalm{category}{same as entry}^^J%
}
\codepar
\gls{glsxtrenablerecordcount}^^J%
\gls{GlsXtrSetRecordCountAttribute}\marg{symbol,abbreviation}\marg{1}
\codepar
\gls{glsdefpostlink}\marg{entry}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J%
\gls{glsdefpostlink}\marg{symbol}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
}
{\gls{gls}\marg{M}, \gls{gls}\marg{ssi}, \gls{gls}\marg{bird},
\gls{gls}\marg{html},^^J%
\gls{gls}\marg{M}, \gls{gls}\marg{html}.
\codepar
\gls{printunsrtglossaries}
}
\end{resultbox}
In the above, \code{ssi} and \code{bird} only have one record.
However, they have been treated differently. The \code{ssi} entry is
using \gls{rglsformat} whereas the \code{bird} entry is using the
normal \gls{gls} behaviour. This is because the record counting
hasn't been applied to the custom \catfmt{entry} category, whereas
it has been applied to the \catfmt{abbreviation} and
\catfmt{symbol} categories.

\subsection{Unit Record Counting}
\label{sec:unitrecordcount}

If you want unit record counting you need to remember to invoke
\app{bib2gls} with \switch{record-count-unit} and you will also need
to redefine \gls{glsxtrrecordtriggervalue} appropriately. For
example, suppose you want to reset all abbreviations at the start of each
chapter, so that the full form is shown again, but only if the
abbreviation isn't used elsewhere in the chapter.

This would require records with the \glsopt{counter} set to
\ctr{chapter}. This can be done with the \opt{counter} package
option:
\begin{codebox}
\cmd{usepackage}\oarg{\opt{record},\optval{counter}{\ctr{chapter}}}\marg{glossaries-extra}
\end{codebox}
However, this will have chapter numbers instead of page numbers in
the \idxpl{locationlist}.  If you don't want \idxpl{locationlist}
then this isn't a problem.  The list can simply be suppressed with
\opt{nonumberlist}.

If you want page numbers in the \idxpl{locationlist} then you will
need to \record\ each entry with both the \ctr{page} and
\ctr{chapter} counters. This can be done with the hook that occurs
before the \gls{gls} options are set:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{}
 \gls{glsadd}\oarg{\glsoptval{format}{glsignore},\glsoptval{counter}{\ctr{chapter}}}\marg{\gls{glslabel}}}
\end{codebox}
Note that I've used the ignored location format to prevent the
chapter number from being added to the \idx{locationlist}.
An alternative is to use the \resourceoptval{loc-counters}{\ctr{page}} resource
option to only show the locations that use the \ctr{page} counter.

The definition of \gls{glsxtrrecordtriggervalue} needs to be changed
so that it uses the total for the given location. If \sty{hyperref}
is used, you will need \theHcounter{chapter}:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrrecordtriggervalue}}[1]\marg{\comment{}
 \gls{GlsXtrLocationRecordCount}\marg{\#1}\marg{\ctr{chapter}}\marg{\theHcounter{chapter}}\comment{}
}
\end{codebox}
otherwise use \thecounter{chapter}.

Consider the following (using the abbreviations defined in the
earlier \filefmt{abbrvs.bib}):
\begin{codebox}
\cbeg{document}
\cmd{chapter}\marg{First}
\gls{gls}\marg{html}. \gls{gls}\marg{html}.  \gls{gls}\marg{html}. \gls{gls}\marg{ssi}.
\codepar
\cmd{chapter}\marg{Second}
\gls{gls}\marg{html}. \gls{gls}\marg{ssi}.  \gls{gls}\marg{ssi}.
\gls{gls}\marg{xml}.
\codepar
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
Note that the \code{xml} entry is only used once in the entire
document, but it will still be added to the glossary.

The previous example used the \resourceopt{trigger-type} resource
option to move entries with the \encap{glstriggerrecordformat} encap 
(that is, they didn't exceed the trigger value) to another
glossary. Unfortunately, using that option in this case will move
all three abbreviations to the \resourceopt{trigger-type} glossary.
The \code{ssi} entry is only used once in the first chapter (but is
used twice in the second chapter), and the \code{html} is only used
once in the second chapter (but is used three times in the first
chapter). So all three will have \records\ in the \ext{aux} file
with the special \encap{glstriggerrecordformat} format.

A simple solution is to omit any entries that don't have the
\gloskey{location} field set when displaying the glossary:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{printunsrtglossaryentryprocesshook}}[1]\marg{\comment{}
 \gls{glsxtrifhasfield}*\marg{\gloskey{location}}\marg{\#1}
 \marg{}\marg{\gls{printunsrtglossaryskipentry}}\comment{}
}
\gls{printunsrtglossaries}
\end{codebox}
An alternative is to test the total record count, but remember that
each entry is being \recorded\ twice: once with the \ctr{page}
counter and once with the \ctr{chapter} counter, so the total count
for the \code{ssi} entry will be 2 not 1.

\begin{warning}
Take care not to strip entries from a 
\glslink{hierarchicallevel}{hierarchical glossary} as it will
break the hierarchy and will cause formatting problems in the
glossary.
\end{warning}

The complete document is:
\begin{codebox}
\cmd{documentclass}\marg{scrreport}
\cmd{usepackage}\oarg{T1}\marg{fontenc}
\cmd{usepackage}\marg{kpfonts}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\oarg{\opt{record},\opt{postdot}}\marg{glossaries-extra}
\codepar
\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}}
\codepar
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{abbrvs},
 \resourceoptvalm{field-aliases}{fulllong=\gloskey{long}}
}
\codepar
\cmd{preto}\marg{\cmd{chapter}}\marg{\gls{glsresetall}}
\gls{glsxtrenablerecordcount}
\gls{GlsXtrSetRecordCountAttribute}\marg{abbreviation}\marg{1}
\codepar
\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{}
 \gls{glsadd}\oarg{\glsoptval{format}{glsignore},\glsoptval{counter}{\ctr{chapter}}}\marg{\gls{glslabel}}}
\codepar
\cmd{renewcommand}*\marg{\gls{glsxtrrecordtriggervalue}}[1]\marg{\comment{}
 \gls{GlsXtrLocationRecordCount}\marg{\#1}\marg{\ctr{chapter}}\marg{\thecounter{chapter}}\comment{}
}
\cbeg{document}
\cmd{chapter}\marg{First}
\gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{ssi}.
\codepar
\cmd{chapter}\marg{Second}
\gls{gls}\marg{html}. \gls{gls}\marg{ssi}. \gls{gls}\marg{ssi}.  \gls{gls}\marg{xml}.
\codepar
\cmd{renewcommand}*\marg{\gls{printunsrtglossaryentryprocesshook}}[1]\marg{\comment{}
 \gls{glsxtrifhasfield}*\marg{\gloskey{location}}\marg{\#1}
 \marg{}\marg{\gls{printunsrtglossaryskipentry}}\comment{}
}
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
If the document is in a file called \filefmt{myDoc.tex} then the
document build is:
\begin{terminal}
pdflatex myDoc
bib2gls --record-count-unit myDoc
pdflatex myDoc
\end{terminal}
\begin{resultbox}
\createexample*[
 label={ex:bib2glsunitrecordcounting},
title={Using \appfmt{bib2gls}: unit record counting},class=scrreport,pages={1,2,3},
description={Example document using bib2gls with unit records},
arara={pdflatex,bib2gls: { recordcountunit: on },pdflatex,pdfcrop}
]
{\cbeg{filecontents*}{abbrvs.bib}^^J%
\abbrvsbibcontent^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J%
\cmd{usepackage}\marg{kpfonts}^^J%
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\oarg{record,postdot}\marg{glossaries-extra}
\codepar
\cmd{renewcommand}\marg{\cmd{chapterpagestyle}}\marg{empty}\comment{to assist cropping}%
\gls{setabbreviationstyle}\marg{long-short-sc-desc}
\codepar
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{abbrvs},\nlsp
 field-aliases=\marg{fulllong=long}\nl
}
\codepar
\cmd{preto}\marg{\cmd{chapter}}\marg{\gls{glsresetall}}^^J%
\gls{glsxtrenablerecordcount}^^J%
\gls{GlsXtrSetRecordCountAttribute}\marg{abbreviation}\marg{1}
\codepar
\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{}
 \gls{glsadd}\oarg{format=glsignore,counter=chapter}\marg{\gls{glslabel}}}
\codepar
\cmd{renewcommand}*\marg{\gls{glsxtrrecordtriggervalue}}[1]\marg{\comment{}
 \gls{GlsXtrLocationRecordCount}\marg{\#1}\marg{chapter}\marg{\cmd{theHchapter}}\comment{}%
}
}
{\cmd{chapter}\marg{First}
\gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{ssi}.
\codepar
\cmd{chapter}\marg{Second}
\gls{gls}\marg{html}. \gls{gls}\marg{ssi}. \gls{gls}\marg{ssi}.
\gls{gls}\marg{xml}.
\codepar
\cmd{renewcommand}*\marg{\gls{printunsrtglossaryentryprocesshook}}[1]\marg{\comment{}
 \gls{glsxtrifhasfield}*\marg{location}\marg{\#1}\marg{}\marg{\gls{printunsrtglossaryskipentry}}\comment{}%
}^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}

\subsection{Mini-Glossaries}
\label{sec:unitrecordcountminigloss}

Record counting doesn't have to be used with the \gls{rgls} set of
commands. When \app{bib2gls} writes the code to the \ext{glstex}
file to save the record counting information, it does it with helper
commands that it provides in the \ext{glstex} file:
\cmddef{bibglssettotalrecordcount}
This sets the total record count and is defined in the
\ext{glstex} file as:
\begin{compactcodebox}
\cmd{providecommand}*\marg{\gls{bibglssettotalrecordcount}}[2]\marg{\comment{}
 \gls{GlsXtrSetField}\marg{\#1}\marg{\glosfield{recordcount}}\marg{\#2}\comment{}
}
\end{compactcodebox}
\cmddef{bibglssetrecordcount}
This sets the total for the given counter and is defined as:
\begin{compactcodebox}
\cmd{providecommand}*\marg{\gls{bibglssetrecordcount}}[3]\marg{\comment{}
 \gls{GlsXtrSetField}\marg{\#1}\marg{\recordcounterfield{\#2}}\marg{\#3}\comment{}
}
\end{compactcodebox}
The following is only available with \switch{record-count-unit}:
\cmddef{bibglssetlocationrecordcount}
This sets the total for the given location and is defined as:
\begin{compactcodebox}
\cmd{providecommand}*\marg{\gls{bibglssetlocationrecordcount}}[4]\marg{\comment{}
 \gls{GlsXtrSetField}\marg{\#1}\marg{\recordcounterlocationfield{\#2}{\gls{glsxtrdetoklocation}\marg{\#3}}}\marg{\#4}\comment{}
}
\end{compactcodebox}

By defining one of more of these commands before the \ext{glstex}
file is input, it's possible to pick up the information, without the
need to iterate over all entries later. For example, the following
will create a \idx{mini-glossary} for each particular location and
populate it with entries that have a record for that location. 
\begin{codebox}
\cmd{newcommand}*\marg{\gls{bibglssetlocationrecordcount}}[4]\marg{\comment{}
 \gls{GlsXtrSetField}\marg{\#1}\marg{\recordcounterlocationfield{\#2}{\#3}}\marg{\#4}\comment{}
 \gls{provideignoredglossary}\marg{minigloss.\#2.\#3}\comment{}
 \gls{glsxtrcopytoglossary}\marg{\#1}{minigloss.\#2.\#3}\comment{}
}
\end{codebox}
I've omitted \gls{glsxtrdetoklocation} for clarity and because I'm
confident the locations won't be problematic. The
\idx{mini-glossary} can then be displayed at the start of the
chapter with:
\begin{codebox}
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{minigloss.chapter.\theHcounter{chapter}}}
\end{codebox}

The previous example can be altered to strip the \gls{rgls} commands
and instead add a \idx{mini-glossary} at the start of each chapter
(the redefinition of \gls{glslinkpresetkeys} remains to ensure there
are locations with the \ctr{chapter} counter). I've also provided a
command to make it easier to display the \idxpl{mini-glossary}:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{minigloss}}\marg{\comment{} 
 \gls{printunsrtglossary*}\oarg{\printglossoptval{style}{\glostyle{abbr-short-long}},\printglossoptval{type}{minigloss.chapter.\theHcounter{chapter}},\printglossoptval{groups}{false},\printglossoptval{target}{false}}\comment{} 
 \marg{\cmd{renewcommand}\marg{\gls{glossarysection}}[2][]\marg{}\comment{}
  \cmd{renewcommand}\marg{\gls{glslongextraShortLongTabularHeader}}\marg{\cmd{toprule}}\comment{}
 }%
}
\end{codebox}
The document build is the same.

\begin{resultbox}
\createexample*[label=ex:recordcountminigloss,class=scrreport,pages={1,2,3},
title={Using \appfmt{bib2gls}: unit record counting mini-glossary},
description={Example document using bib2gls to create a mini-glossary with unit records},
arara={pdflatex,bib2gls: { recordcountunit: on },pdflatex,pdfcrop}
]
{\cbeg{filecontents*}{abbrvs.bib}^^J%
\abbrvsbibcontent^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J%
\cmd{usepackage}\marg{kpfonts}^^J%
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\oarg{record,postdot,stylemods=longextra}\marg{glossaries-extra}
\codepar
\cmd{renewcommand}\marg{\cmd{chapterpagestyle}}\marg{empty}\comment{to assist cropping}%
\gls{setabbreviationstyle}\marg{long-short-sc-desc}
\codepar
\cmd{newcommand}*\marg{\gls{bibglssetlocationrecordcount}}[4]\marg{\comment{}
 \gls{GlsXtrSetField}\marg{\#1}\marg{recordcount.\#2.\#3}\marg{\#4}\comment{}
 \gls{provideignoredglossary}\marg{minigloss.\#2.\#3}\comment{}
 \gls{glsxtrcopytoglossary}\marg{\#1}{minigloss.\#2.\#3}\comment{}%
}
\codepar
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{abbrvs},\nlsp
 field-aliases=\marg{fulllong=long}\nl
}
\codepar
\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{}
 \gls{glsadd}\oarg{format=glsignore,counter=chapter}\marg{\gls{glslabel}}}^^J%
\cmd{newcommand}\marg{\cmd{minigloss}}\marg{\comment{} 
 \gls{printunsrtglossary*}\oarg{style=abbr-short-long,type=minigloss.chapter.\cmd{theHchapter},groups=false,target=false}\comment{} 
 \marg{\cmd{renewcommand}\marg{\gls{glossarysection}}[2][]\marg{}\comment{}
  \cmd{renewcommand}\marg{\gls{glslongextraShortLongTabularHeader}}\marg{\cmd{toprule}}\comment{}%
}}
}
{\cmd{chapter}\marg{First}
\cmd{minigloss}
\gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{ssi}.
\codepar
\cmd{chapter}\marg{Second}
\cmd{minigloss}
\gls{gls}\marg{html}. \gls{gls}\marg{ssi}. \gls{gls}\marg{ssi}.
\gls{gls}\marg{xml}.
\codepar
\cmd{renewcommand}*\marg{\gls{printunsrtglossaryentryprocesshook}}[1]\marg{\comment{}
 \gls{glsxtrifhasfield}*\marg{location}\marg{\#1}\marg{}\marg{\gls{printunsrtglossaryskipentry}}\comment{}%
}^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}

\section{The \stytext{glossaries-extra-bib2gls} package}
\label{sec:bib2glssty}

\pkgdef{glossaries-extra-bib2gls}
\glsstartrange{pkg.glossaries-extra-bib2gls}%
The package options \opteqvalref{record}{only} (or simply
\opt{record}) and \opteqvalref{record}{nameref} automatically
loads the supplementary package \sty{glossaries-extra-bib2gls},
which provides some commands that are specific to \app{bib2gls}, in
particular to sorting and \idxpl{locationlist} which aren't relevant
with \opteqvalref{record}{hybrid}.

If \sty{glossaries-extra-bib2gls} is loaded via the
\opt{record} package option then the check for associated
language files (see \sectionref{sec:lang}) will also
search for the existence of
\metafilefmt{glossariesxtr-}{script}{.ldf} for each
document dialect (where \meta{script} is the four letter
script identifier, such as \code{Latn}).

\subsection{Displaying Glossaries}
\label{sec:printunsrtshortcuts}

\Idxpl{glossary} are displayed with the \idx{unsrtfam} (see
\sectionref{sec:printunsrt}). Some styles, such as
\glostyle{bookindex}, are customized for use with \app{bib2gls}.


The following commands are shortcuts that use
\gls{printunsrtglossary}. However, they are only defined if a
corresponding package option has been set \emph{before}
\sty{glossaries-extra-bib2gls} is loaded. This means that the
options must be passed as a package option, not using 
\gls{glossariesextrasetup}, if the shortcut commands are required.

\cmddef{printunsrtabbreviations}
This shortcut is provided if the \opt{abbreviations} package
option has been used. This is a shortcut for:
\begin{codebox}
\gls{printunsrtglossary}\oarg{type=abbreviations,\meta{options}}
\end{codebox}

\cmddef{printunsrtacronyms}
This shortcut is provided if the \opt{acronyms} (or
\opt{acronym}) package option has been used. This is a shortcut for:
\begin{codebox}
\gls{printunsrtglossary}\oarg{type=\gls{acronymtype},\meta{options}}
\end{codebox}

\cmddef{printunsrtsymbols}
This shortcut is provided if the \opt{symbols} package
option has been used. This is a shortcut for:
\begin{codebox}
\gls{printunsrtglossary}\oarg{type=symbols,\meta{options}}
\end{codebox}

\cmddef{printunsrtnumbers}
This shortcut is provided if the \opt{numbers} package
option has been used. This is a shortcut for:
\begin{codebox}
\gls{printunsrtglossary}\oarg{type=numbers,\meta{options}}
\end{codebox}

\cmddef{printunsrtindex}
This shortcut is provided if the \opt{index} package
option has been used. This is a shortcut for:
\begin{codebox}
\gls{printunsrtglossary}\oarg{type=index,\meta{options}}
\end{codebox}

\subsection{Helper Commands for Resource Options}
\label{sec:resourcecommands}

\cmddef{glshex}
This simply expands to \code{\gls{string}\gls{u}\meta{hex}}, which
is used to identify the Unicode character \meta{hex} in the value of
some \idxpl{resourceopt}.

\cmddef{glshashchar}
This expands to a literal \idx{sym.hash} character (similar to
\gls{glsbackslash}).

\cmddef{glscapturedgroup}
This simply expands to \code{\gls{string}\gls{dollar}\meta{n}}
which is used to indicate the \meta{n}th captured group in a regular expression
replacement in the value of some \idxpl{resourceopt} (requires
\app{bib2gls} v1.5+), such as \resourceopt{sort-replace}. For example:
\begin{codebox}
\resourceoptvalm{sort-replace}{\marg{([a-zA-Z])\gls{string}\gls{cs.dot}}\marg{\gls{glscapturedgroup}1}}
\end{codebox}
This removes a full stop that follows any of the characters
a,\ldots,z or A,\ldots,Z.

\begin{important}
Note that \gls{glscapturedgroup} isn't the same as the match group
identifier \gls{MGP}.
\end{important}

If you have complex regular expressions or use
\resourceopt{assign-fields}, you may find it more convenient to
redefine \gls{glsxtrresourceinit} to use the following command:
\cmddef{GlsXtrResourceInitEscSequences}

\begin{important}
\gls{GlsXtrResourceInitEscSequences} should not be used outside of
the definition of \gls{glsxtrresourceinit} as the definitions will likely cause
interference and are only intended as resource option instructions 
for \app{bib2gls}.
\end{important}

This command locally redefines escape sequences used in regular
expressions so that they detokenize when they expand. This means
that you won't need to use \gls{string} or \gls{protect} in front of
them. The following commands are defined:

\begin{itemize}
\item \cmddefsyntax{}{u} (Unicode character);
\item General use: \cmddefsyntax{}{cs} (expands to detokenized
\csfmt{csname} when writing to the \ext{aux} file);
\item For literal characters in regular expressions:
\cmddefsyntax{}{cs.dot} 
\cmddefsyntax{}{bksl}
\cmddefsyntax{}{cs.slash}
\cmddefsyntax{}{cs.pipe}
\cmddefsyntax{}{amp}
\cmddefsyntax{}{cs.plus}
\cmddefsyntax{}{cs.lt}
\cmddefsyntax{}{cs.gt}
\cmddefsyntax{}{cs.star}
\cmddefsyntax{}{dollar}
\cmddefsyntax{}{cs.circum}
\cmddefsyntax{}{cs.tilde}
\cmddefsyntax{}{cs.openparen}
\cmddefsyntax{}{cs.closeparen}
\cmddefsyntax{}{cs.opensq}
\cmddefsyntax{}{cs.closesq}
\cmddefsyntax{}{cs.quote}
\cmddefsyntax{}{cs.hyphen}
\cmddefsyntax{}{cs.question}
\cmddefsyntax{}{cs.colon}
\cmddefsyntax{}{cs.hash}

\item Special markup for use as instructions or keywords in
\resourceopt{assign-fields}:
\cmddefsyntax{}{MGP}
\cmddefsyntax{}{LEN}
\cmddefsyntax{}{CAT}
\cmddefsyntax{}{TRIM}
\cmddefsyntax{}{CS}
\cmddefsyntax{}{INTERPRET}
\cmddefsyntax{}{LABELIFY}
\cmddefsyntax{}{LABELIFYLIST}
\cmddefsyntax{}{NULL}
\cmddefsyntax{}{IN}
\cmddefsyntax{}{NIN}
\cmddefsyntax{}{PREFIXOF}
\cmddefsyntax{}{NOTPREFIXOF}
\cmddefsyntax{}{SUFFIXOF}
\cmddefsyntax{}{NOTSUFFIXOF}
\cmddefsyntax{}{LC}
\cmddefsyntax{}{UC}
\cmddefsyntax{}{FIRSTLC}
\cmddefsyntax{}{FIRSTUC}
\cmddefsyntax{}{TITLE}.

\end{itemize}

For example, with
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrresourceinit}}\marg{\comment{}
  \gls{GlsXtrResourceInitEscSequences}
}
\end{codebox}
then the earlier example can be written more compactly as:
\begin{codebox}
\resourceoptvalm{sort-replace}{\marg{([a-zA-Z])\gls{cs.dot}}\marg{\gls{dollar}1}}
\end{codebox}

A convenient shortcut for use in the \resourceopt{entry-type-aliases}
setting:
\cmddef{GlsXtrBibTeXEntryAliases}
This provides aliases for \BibTeX's standard entry types (such as
\atentry{article} and \atentry{book}) to \app{bib2gls}['s]
\atentry{bibtexentry} entry type (requires \app{bib2gls} v1.4+).

You may also want to provide storage keys for \BibTeX's standard
fields rather than having to alias them all. This can be done with:
\cmddef{GlsXtrProvideBibTeXFields}
This defines each \BibTeX\ field, such as \fieldfmt{author}, as a
glossary entry key:
\begin{compactcodebox}
 \gls{glsaddstoragekey}\marg{address}\marg{}\marg{\inlineglsdef{glsxtrbibaddress}}\comment{}
 \gls{glsaddstoragekey}\marg{author}\marg{}\marg{\inlineglsdef{glsxtrbibauthor}}\comment{}
 \gls{glsaddstoragekey}\marg{booktitle}\marg{}\marg{\inlineglsdef{glsxtrbibbooktitle}}\comment{}
 \gls{glsaddstoragekey}\marg{chapter}\marg{}\marg{\inlineglsdef{glsxtrbibchapter}}\comment{}
 \gls{glsaddstoragekey}\marg{edition}\marg{}\marg{\inlineglsdef{glsxtrbibedition}}\comment{}
 \gls{glsaddstoragekey}\marg{howpublished}\marg{}\marg{\inlineglsdef{glsxtrbibhowpublished}}\comment{}
 \gls{glsaddstoragekey}\marg{institution}\marg{}\marg{\inlineglsdef{glsxtrbibinstitution}}\comment{}
 \gls{glsaddstoragekey}\marg{journal}\marg{}\marg{\inlineglsdef{glsxtrbibjournal}}\comment{}
 \gls{glsaddstoragekey}\marg{month}\marg{}\marg{\inlineglsdef{glsxtrbibmonth}}\comment{}
 \gls{glsaddstoragekey}\marg{note}\marg{}\marg{\inlineglsdef{glsxtrbibnote}}\comment{}
 \gls{glsaddstoragekey}\marg{number}\marg{}\marg{\inlineglsdef{glsxtrbibnumber}}\comment{}
 \gls{glsaddstoragekey}\marg{organization}\marg{}\marg{\inlineglsdef{glsxtrbiborganization}}\comment{}
 \gls{glsaddstoragekey}\marg{pages}\marg{}\marg{\inlineglsdef{glsxtrbibpages}}\comment{}
 \gls{glsaddstoragekey}\marg{publisher}\marg{}\marg{\inlineglsdef{glsxtrbibpublisher}}\comment{}
 \gls{glsaddstoragekey}\marg{school}\marg{}\marg{\inlineglsdef{glsxtrbibschool}}\comment{}
 \gls{glsaddstoragekey}\marg{series}\marg{}\marg{\inlineglsdef{glsxtrbibseries}}\comment{}
 \gls{glsaddstoragekey}\marg{title}\marg{}\marg{\inlineglsdef{glsxtrbibtitle}}\comment{}
 \gls{glsaddstoragekey}\marg{bibtextype}\marg{}\marg{\inlineglsdef{glsxtrbibtype}}\comment{}
 \gls{glsaddstoragekey}\marg{volume}\marg{}\marg{\inlineglsdef{glsxtrbibvolume}}\comment{}
\end{compactcodebox}
This command should be placed before the first
\gls{GlsXtrLoadResources}.

\begin{warning}
\BibTeX's \fieldfmt{type} field clashes with the \sty{glossaries}
package's \gloskey{type} key, so this command provides the key
\fieldfmt{bibtextype} instead. You can alias it with
\resourceoptvalm{field-aliases}{\gloskey{type}=\fieldfmt{bibtextype}} 
in the \idxpl{resourceopt}.
\end{warning}

\subsubsection{Custom Sort}
\label{sec:customsort}

There are many locale alphabetical rules provided with
\app{bib2gls}, such as \resourceoptval{sort}{de-1996} for German new
orthography. However, it may be that your particular locale isn't
supported, or you want a rule that covers multiple scripts or
non-alphabetic symbols.

The \resourceoptval{sort}{custom} setting combined with
\resourceopt{sort-rule} provides a way to define your own sort rule.
For example, suppose I have a file called \filefmt{animals.bib} that
contains:
\newcommand{\animalsbib}{%
 \atentry{index}\marg{bee}\newline
 \atentry{index}\marg{lion}\newline
 \atentry{index}\marg{ant}\newline
 \atentry{index}\marg{cow}\newline
 \atentry{index}\marg{goose}\newline
 \atentry{index}\marg{zebu}\newline
 \atentry{index}\marg{egret}\newline
 \atentry{index}\marg{elk}\newline
 \atentry{index}\marg{llama}\newline
 \atentry{index}\marg{lynx}\newline
 \atentry{index}\marg{bat}%
}
\begin{codebox}
\animalsbib
\end{codebox}
Here's a very limited rule that only recognises five letters:
\begin{codebox}
\cmd{usepackage}\oarg{\opt{record},\opt{nostyles},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}
\marg{glossaries-extra}
\codepar
\cmd{newcommand}\marg{\gls{bibglssetlastgrouptitle}}[2]\marg{\comment{}
 \gls{glsxtrsetgrouptitle}\marg{\#1\#2}\marg{Other}\comment{}
}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{animals},\resourceoptval{selection}{all},
 \resourceoptval{sort}{custom},\resourceoptvalm{sort-rule}{ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}}
\codepar
\cbeg{document}
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
Any characters that aren't included in the rule (such as \qt{c} and
\qt{g}) are placed at the end. I've defined \gls{bibglssetlastgrouptitle}
to label that final group of characters \qt{Other}. If the document
is in a file called \filefmt{myDoc.tex}, the build process is:
\begin{terminal}
pdflatex myDoc
bib2gls \switch{g} myDoc
pdflatex myDoc
\end{terminal}
The result is:
\begin{resultbox}
\createexample*[arara={pdflatex,bib2gls: { group : on },pdflatex,pdfcrop},
 label={ex:bib2glscustomsort},
 title={Using \appfmt{bib2gls}: simple custom sort rule},
 description={Example document that provides a simplistic custom
sort rule}
]
{\cbeg{filecontents*}{animals.bib}^^J%
\animalsbib^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\oarg{\opt{record},\opt{nostyles},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}^^J
\marg{glossaries-extra}
\codepar
\cmd{newcommand}\marg{\gls{bibglssetlastgrouptitle}}[2]\marg{\%^^J
 \gls{glsxtrsetgrouptitle}\marg{\#1\#2}\marg{Other}\%^^J%
}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{animals},\resourceoptval{selection}{all},^^J
 \resourceoptval{sort}{custom},\resourceoptvalm{sort-rule}{ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}}
}
{\gls{printunsrtglossaries}}
\end{resultbox}
Note that \qt{egret} has been placed after \qt{elk}. This is because
\qt{l} is included in the rule but \qt{g} isn't. Whereas \qt{lynx}
comes before \qt{llama} because there's a separate \qt{ll} group
after the \qt{l} group.

The commands listed below provide common rule blocks for use in
the \resourceopt{sort-rule} resource option. If you want a rule for
a specific locale, you can provide similar commands in a file called
\metafilefmt{glossariesxtr-}{tag}{.ldf}, where \meta{tag}
identifies the dialect, locale, region or root language. See the
description of \gls{IfTrackedLanguageFileExists} in the
\sty{tracklang} documentation for further details. If this file is
on \TeX's path and the \sty{tracklang} package (automatically loaded
by \sty{glossaries}) detects that the document has requested that
language or locale, then the file will automatically be loaded.
For example, if you want to provide a rule block for Welsh, then
create a file called \filefmt{glossariesxtr-welsh.ldf} that contains:
\begin{codebox}
\gls{ProvidesGlossariesExtraLang}\marg{welsh}[2018/02/23 v1.0]
\codepar
\cmd{@ifpackageloaded}\marg{glossaries-extra-bib2gls}
\marg{
  \cmd{newcommand}\marg{\cmd{glsxtrWelshRules}}\marg{\comment{}
   \gls{glsxtrLatinA}
   \gls{string}<b,B
   \gls{string}<c,C
   \gls{string}<ch,CH
   \gls{string}<d,D
   \gls{string}<dd,DD
   \gls{string}<\gls{glsxtrLatinE}
   \gls{string}<f,F
   \gls{string}<ff,FF
   \gls{string}<g,G
   \gls{string}<ng,NG
   \gls{string}<\gls{glsxtrLatinH}
   \gls{string}<\gls{glsxtrLatinI}
   \gls{string}<j,J
   \gls{string}<\gls{glsxtrLatinL}
   \gls{string}<ll,Ll,LL
   \gls{string}<\gls{glsxtrLatinM}
   \gls{string}<\gls{glsxtrLatinN}
   \gls{string}<\gls{glsxtrLatinO}
   \gls{string}<\gls{glsxtrLatinP}
   \gls{string}<ph,PH
   \gls{string}<r,R
   \gls{string}<rh,RH
   \gls{string}<\gls{glsxtrLatinS} 
   \gls{string}<\gls{glsxtrLatinT}
   \gls{string}<th,TH
   \gls{string}<u,U
   \gls{string}<w,W
   \gls{string}<y,Y
  }
}
\marg{}\comment{glossaries-extra-bib2gls.sty not loaded}
\end{codebox}
(The use of \gls{string} is in case the \code{<} character
has been made active.) You can provide more than one rule-block
per local, to allow for loanwords or foreign words. For example,
you could provide \csfmt{glsxtrWelshIRules}, \csfmt{glsxtrWelshIIRules}
etc.

If the rules are for a particular script (independent of language
or region) then they can be provided in a file given by
\metafilefmt{glossariesxtr-}{script}{.ldf} instead. For
example, the file \filefmt{glossariesxtr-Cyrl.ldf} could contain:
\begin{codebox}
\gls{ProvidesGlossariesExtraLang}\marg{Cyrl}[2018/02/23 v1.0]
\cmd{newcommand}*\marg{\cmd{glsxtrGeneralCyrillicIRules}}\marg{\comment{}
  \comment{Cyrillic rules}
}
\cmd{newcommand}*\marg{\cmd{glsxtrGeneralCyrillicIIRules}}\marg{\comment{}
  \comment{an alternative set of Cyrillic rules}
}
\end{codebox}
Remember that the required document language scripts need to be tracked
through the \sty{tracklang} package, in order for these files to be
automatically loaded. This essentially means ensuring you load the
appropriate language package before \sty{tracklang} is loaded by
the base \sty{glossaries} package or any other package that uses it.
See the \sty{tracklang} documentation for further details.

Alternatively, if the rules are specific to a subject rather than
a region or language, then you can provide a supplementary
package. For example, if you have a package called, say,
\styfmt{mapsymbols} that provides map symbols, then the file
\filefmt{mapsymbols.sty} might contain:
\begin{codebox}
\cmd{ProvidesPackage}\marg{mapsymbols}
\comment{some package or font loading stuff here to provide}
\comment{the appropriate symbols}
\cmd{newcommand}\marg{\cmd{Stadium}}\marg{...}
\cmd{newcommand}\marg{\cmd{Battlefield}}\marg{...}
\cmd{newcommand}\marg{\cmd{Harbour}}\marg{...}
\comment{etc}
\codepar
\comment{Provide a rule block:}
\cmd{newcommand}\marg{\cmd{MapSymbolOrder}}\marg{\comment{}
 \gls{glshex} 2694 \comment{crossed-swords 0x2694}
 \gls{string}< \gls{glshex} 2693 \comment{anchor 0x2693}
 \gls{string}< \gls{glshex} 26BD \comment{football 0x26BD}
}
\end{codebox}
and the supplementary file \filefmt{mapsymbols.bib} can provide
the appropriate definitions for \app{bib2gls}:
\begin{codebox}
\atentry{preamble}\marg{"\gls{glsxtrprovidecommand}\marg{\cmd{Harbour}}\marg{\cmd{char}"2693}
\gls{glsxtrprovidecommand}\marg{\cmd{Battlefield}}\marg{\cmd{char}"2694}
\gls{glsxtrprovidecommand}\marg{\cmd{Stadium}}\marg{\cmd{char}"26BD}"}
\end{codebox}
Now both the preamble and rule block can be used in the resource
set:
\begin{codebox}[before upper app=\small]
\cmd{usepackage}\marg{mapsymbols}\comment{my custom package}
\cmd{usepackage}[\opt{record}]\marg{glossaries-extra}
\codepar
\gls{GlsXtrLoadResources}\oarg{
 \resourceoptvalm{src}{mapsymbols,\comment{<--- \textbf{my custom mapsymbols.bib}}
  entries\comment{data in entries.bib}
 },
 \resourceoptval{sort}{custom},
 \resourceoptvalm{sort-rule}{\gls{glsxtrcontrolrules} \comment{control codes}
 ;\gls{glsxtrspacerules} \comment{space characters}
 ;\gls{glsxtrnonprintablerules} \comment{non-printable characters}
 ;\gls{glsxtrcombiningdiacriticrules} \comment{combining diacritics}
 ,\gls{glsxtrhyphenrules} \comment{hyphens}
 <\gls{glsxtrgeneralpuncrules} \comment{general punctuation}
 <\gls{glsxtrdigitrules} \comment{0, ..., 9}
 <\gls{glsxtrfractionrules} \comment{fraction symbols}
 <\cmd{MapSymbolOrder} \comment{<--- \textbf{custom map symbols}}
 <\gls{glsxtrMathItalicGreekIrules} \comment{math-greek symbols}
 <\gls{glsxtrGeneralLatinIrules} \comment{Latin letters}
 }
}
\end{codebox}
(As before, you may need to use \gls{string} in front of characters
like \code{<} if they have been made active.)

The following commands are provided by
\sty{glossaries-extra-bib2gls}. They should be separated by
the rule separator characters \code{;}~(semi-colon) or \code{,}~(comma)
or \verb|&|~(ampersand) or \code{<}~(less than). See Java's
\href{http://docs.oracle.com/javase/8/docs/api/java/text/RuleBasedCollator.html}{Rule\-Based\-Collator}
documentation for details of the rule syntax.

For example, the following will place the mathematical Greek
symbols (\gls{alpha}, \gls{Alpha}, \gls{beta}, \gls{Beta} etc)
in a block before Latin characters:
\begin{codebox}
\resourceoptvalm{sort-rule}{\gls{glsxtrcontrolrules}
 ;\gls{glsxtrspacerules}
 ;\gls{glsxtrnonprintablerules}
 ;\gls{glsxtrcombiningdiacriticrules}
 ,\gls{glsxtrhyphenrules}
 <\gls{glsxtrgeneralpuncrules}
 <\gls{glsxtrdigitrules}
 <\gls{glsxtrfractionrules}
 <\gls{glsxtrMathItalicGreekIrules}
 <\gls{glsxtrGeneralLatinIVrules}
 <\gls{glsxtrLatinAA}
 <\gls{glsxtrLatinOslash}
}
\end{codebox}

\paragraph{Non-Letters}
\label{sec:bib2glscustomsortnonletters}

Remember that the default break-point setting is
\resourceoptval{break-at}{word}. This means that non-alphabetic
characters will typically be stripped and you could end up with
empty sort values. If you want punctuation
characters sorted you will need to change this setting to 
\resourceoptval{break-at}{none}. If you still want to retain letter
sorting for any words or phrases included in the list you can
use \resourceopt{sort-replace} (see the \app{bib2gls} manual for
further details of these options).

For example:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{
  \resourceoptval{sort}{custom},
  \resourceoptvalm{sort-rule}{
   \gls{glsxtrIgnorableRules}
   ;\gls{glsxtrcombiningdiacriticrules}
   <\gls{glsxtrGeneralPuncRules}
   <\gls{glsxtrGeneralLatinIrules}
  },
 \resourceoptval{break-at}{none},
 \resourceoptvalm{sort-replace}{\marg{,? +}\marg{\gls{glshex}001F}}
}
\end{codebox}

\cmddef{glsxtrcontrolrules}
These are control characters that are usually placed at the start of
a rule in the ignored section. They typically won't occur in
any sort values, but if they do they should normally be ignored.

However, with \app{bib2gls} version 4.0+, the \switch{datatool-sort-markers}
switch may be used to define the \sty{datatool-base} marker commands
according to the way they work within \gls{DTLsortwordlist}. This
means that they can expand to control codes within the interpreter.
Since they are normally ignored by language-sensitive sort rules, a
custom rule will be needed.

\cmddef{glsxtrcontrolIrules}
Expands as per \gls{glsxtrcontrolrules} but omits the control codes
0, 1C, 1D, 1E, 1F and 7F.

\cmddef{glsxtrcontrolIIrules}
Expands to the ordered set of \qt{information separator} control
codes 1C, 1D, 1E, and 1F. Note that if you use \gls{glsxtrcontrolIrules}
and \gls{glsxtrcontrolIIrules} instead of \gls{glsxtrcontrolrules},
you will also need to insert \code{\gls{glshex} 0} and 
\code{\gls{glshex} 7F} in the appropriate place if
they may occur in any of the sort values.


\cmddef{glsxtrspacerules}
These are space characters. They typically come after the control
characters with the two blocks separated by a \code{;}~(semi-colon).

\cmddef{glsxtrnonprintablerules}
These are non-printable characters (BOM, tabs, line feed and
carriage return). They typically come after the spaces separated by
a \code{;}~(semi-colon). These characters aren't checked for by
\app{bib2gls} when it determines whether or not to use the
interpreter, so a~TAB or newline character may end up in the sort
value if it wasn't interpreted.

\cmddef{glsxtrcombiningdiacriticrules}
These are combining diacritic marks which typically follow
the space and non-printable blocks (separated by a semi-colon). This command is
defined in terms of sub-block commands:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrcombiningdiacriticrules}}\marg{\comment{}
 \gls{glsxtrcombiningdiacriticIrules}\gls{string};
 \gls{glsxtrcombiningdiacriticIIrules}\gls{string};
 \gls{glsxtrcombiningdiacriticIIIrules}\gls{string};
 \gls{glsxtrcombiningdiacriticIVrules}
}
\end{compactcodebox}
If you prefer, you can use the sub-blocks directly in your
required ordered.

\cmddef{glsxtrcombiningdiacriticIrules}
This contains the combining diacritics: acute, grave, breve,
circumflex, caron, ring, vertical line above, diaeresis (umlaut),
double acute, tilde, dot above, combining macron.

\cmddef{glsxtrcombiningdiacriticIIrules}
This contains the combining diacritics: short solidus overlay,
cedilla, ogonek, dot below, low line, overline, hook above,
double vertical line above, double grave accent, candrabindu,
inverted breve, turned comma above, comma above, reversed comma
above, comma above right, grave accent below, acute accent below.

\cmddef{glsxtrcombiningdiacriticIIIrules}
This contains the combining diacritics: left tack below, right tack
below, left angle above, horn, left half ring below, up tack below,
down tack below, plus sign below, minus sign below, palatalized hook
below, retroflex hook below, diaresis below, ring below, comma
below, vertical line below, bridge below, inverted double arch
below, caron below, circumflex accent below, breve below, inverted
breve below, tilde below, macron below, double low line, tilde
overlay, short stroke overlay, long stroke overlay, long solidus
overlay, right half ring below, inverted bridge below, square below,
seagull below, x above, vertical tilde, double overline, Greek
perispomeni, Greek dialytika tonos, Greek ypogegrammeni, double
tilde, double inverted breve, Cyrillic titlo, Cyrillic
palatalization, Cyrillic dasia pneumata, Cyrillic psili pneumata.

\cmddef{glsxtrcombiningdiacriticIVrules}
This contains the combining diacritics:
left harpoon above, right harpoon above, long vertical line overlay,
short vertical line overlay, anticlockwise arrow above, clockwise
arrow above, left arrow above, right arrow above, ring overlay,
clockwise ring overlay, anticlockwise ring overlay, three dots
above, four dots above, enclosing circle, enclosing square,
enclosing diamond, enclosing circle backslash, left right arrow
above.

\cmddef{glsxtrhyphenrules}
This contains hyphens (including the minus sign 0x2212). This rule
block typically comes after the diacritic rules separated by a
comma. 
As from version v1.56, the hyphen rules are now divided into two
sub-sets:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrhyphenrules}}\marg{\comment{}
 \gls{glsxtrhyphenIrules};
 \gls{glsxtrminusrules}
}
\end{codebox}

\cmddef{glsxtrhyphenIrules}
This first set consists of: \gls{ascii} hyphen/minus, soft hyphen, non-breaking
hyphen, figure dash, en dash, em dash and horizontal bar, which are
all considered equivalent. The minus sign (0x2212) is not included.

\cmddef{glsxtrhyphenIIrules}
An alternative to the first set of hyphen rules, this set has the
same characters but lists them in ascending order. That is, they are
not considered equivalent.

The minus rules are in the sub-set:
\cmddef{glsxtrminusrules}
This set consists of: minus sign (0x2212), superscript minus and
subscript minus. (Not the \gls{ascii} hyphen/minus.) If you don't
want the minus signs included in the hyphen rules, use
\gls{glsxtrhyphenIrules} (or \gls{glsxtrhyphenIIrules}) instead of
\gls{glsxtrhyphenrules}. If you want the hyphens and minus signs between the
percent and plus sign, use \gls{glsxtrgeneralpuncIIIrules} instead
of \gls{glsxtrgeneralpuncIIrules}.

\cmddef{glsxtrgeneralpuncrules}
This contains punctuation characters. This rule
block typically comes after the hyphen rules separated by a
less than (\code{<}). As with the combining diacritics, this
command is defined in terms of sub-blocks which may be used directly
instead if a different order is required:
\begin{codebox}
\cmd{newcommand}*\marg{\gls{glsxtrgeneralpuncrules}}\marg{\comment{}
  \gls{glsxtrgeneralpuncIrules}
  \gls{string}<\gls{glsxtrcurrencyrules}
  \gls{string}<\gls{glsxtrgeneralpuncIIrules}
}
\end{codebox}

\cmddef{glsxtrgeneralpuncIrules}
This is defined as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrgeneralpuncIrules}}\marg{\comment{}
 \gls{glsxtrgeneralpuncmarksrules}
 \cmd{string}<\gls{glsxtrgeneralpuncaccentsrules}
 \cmd{string}<\gls{glsxtrgeneralpuncquoterules}
 \cmd{string}<\gls{glsxtrgeneralpuncbracketrules}
 \cmd{string}<\gls{glsxtrgeneralpuncsignrules}
}
\end{compactcodebox}

\cmddef{glsxtrgeneralpuncmarksrules}
This contains: underscore, macron, comma, semi-colon, colon, exclamation mark,
inverted exclamation mark, question mark, inverted question mark,
solidus, \idx{fullstop}.

\cmd{glsxtrgeneralpuncdotrules}
This contains dotted punctuation marks in the General Punctuation
block.

\cmddef{glsxtrgeneralpuncaccentsrules}
This contains: acute accent, grave accent, circumflex accent,
diaeresis, tilde, middle dot, cedilla.

\cmddef{glsxtrgeneralpuncquoterules}
This contains: straight apostrophe, straight
double quote, left guillemet, right guillemet.

\cmddef{glsxtrgeneralpuncbracketrules}
By default this just expands to the first subset of bracket rules 
\gls{glsxtrgeneralpuncbracketIrules} but may be redefined to include
extra sets. For example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrgeneralpuncbracketrules}}{\comment{}
 \gls{glsxtrgeneralpuncbracketIrules}
 <\gls{glsxtrgeneralpuncbracketIIrules}
}
\end{codebox}

\cmddef{glsxtrgeneralpuncbracketIrules}
This contains: left parenthesis,
right parenthesis, left square bracket, right square bracket, left
curly bracket, right curly bracket, left angle bracket, right angle
bracket.

\cmddef{glsxtrgeneralpuncbracketIIrules}
Brackets from miscellaneous mathematical symbols~A.

\cmddef{glsxtrgeneralpuncbracketIIIrules}
Brackets from miscellaneous mathematical symbols~B.

\cmddef{glsxtrgeneralpuncbracketIVrules}
Ornamental brackets.

\cmddef{glsxtrgeneralpuncsignrules}
This contains: section sign, pilcrow sign,
copyright sign, registered sign, at sign.

\cmddef{glsxtrcurrencyrules}
This sub-block contains some currency symbols:
currency sign, Thai currency symbol baht, cent sign, colon sign,
cruzeiro sign, dollar sign, dong sign, euro sign, French franc sign,
lira sign, mill sign, naira sign, peseta sign, pound sign, rupee
sign, new sheqel sign, won sign, yen sign.

\cmddef{glsxtrgeneralpuncIIrules}
This sub-block contains some other punctuation symbols:
asterisk, backslash, ampersand, hash sign, percent sign, plus sign,
plus-minus sign, division sign, multiplication sign, less-than sign,
equals sign, greater-than sign, not sign, vertical bar (pipe),
broken bar, degree sign, micron sign.

\cmddef{glsxtrgeneralpuncIIIrules}
An alternative to \gls{glsxtrgeneralpuncIIrules}, this sub-block
includes \gls{glsxtrhyphenIIrules} and \gls{glsxtrminusrules}
between the percent and plus signs. This ensures that the hyphens
and minus signs are distinct.

\cmddef{glsxtrdigitrules}
This rule block contains the Basic Latin digits (0, \ldots, 9)
and the subscript and superscript digits (\textsubscript{0}
\textsuperscript{0} etc) made equivalent to the
corresponding Basic Latin digit. The digit block typically
comes after the punctuation rules separated by a less than
(\code{<}).

\cmddef{glsxtrBasicDigitrules}
This rule block contains just the Basic Latin digits (0, \ldots, 9).

\cmddef{glsxtrSubScriptDigitrules}
This rule block contains just the subscript digits
(\textsubscript{0} \ldots\ \textsubscript{9}).

\cmddef{glsxtrSuperScriptDigitrules}
This rule block contains just the superscript digits
(\textsuperscript{0} \ldots\ \textsuperscript{9}).

\cmddef{glsxtrfractionrules}
This rule block contains vulgar fraction characters from the Unicode
Number Forms block. The digit block typically comes after the digit
rules separated by a less than (\code{<}).

\cmddef{glsxtrIgnorableRules}
A shortcut that expands to the ignorable rules:
\begin{compactcodebox}
 \gls{glsxtrcontrolrules}
 ;\gls{glsxtrspacerules}
 ;\gls{glsxtrnonprintablerules}
\end{compactcodebox}

\cmddef{glsxtrGeneralInitRules}
A shortcut that expands to common initial rules:
\begin{compactcodebox}
 \gls{glsxtrIgnorableRules}
 ;\gls{glsxtrcombiningdiacriticrules}
 ;\gls{glsxtrhyphenrules}
 <\gls{glsxtrgeneralpuncrules}
 <\gls{glsxtrdigitrules}
 <\gls{glsxtrfractionrules}
\end{compactcodebox}
Note that this includes the combining diacritic rules, which won't
be appropriate for languages with accented characters.

\cmddef{glsxtrGeneralPuncRules}
A shortcut that expands to common punctuation rules:
\begin{compactcodebox}
 \gls{glsxtrgeneralpuncmarksrules}
 <\gls{glsxtrgeneralpuncdotrules}
 <\gls{glsxtrgeneralpuncaccentsrules}
 <\gls{glsxtrgeneralpuncquoterules}
 <\gls{glsxtrgeneralpuncbracketrules}
 <\gls{glsxtrgeneralpuncsignrules}
 <\gls{glsxtrcurrencyrules}
 <\gls{glsxtrgeneralpuncIIIrules}
 <\gls{glsxtrdigitrules}
 <\gls{glsxtrfractionrules}
\end{compactcodebox}

There are a number of Latin rule blocks. Some of these included
extended characters or ligatures (such as \ss\ or \oe) but they don't
include accented characters. If you require a Latin rule block
that includes accented characters, digraphs, trigraphs or
other extended characters, then it's best to provide
similar commands in a \metafilefmt{glossariesxtr-}{tag}{.ldf}
file for the particular language or region.

\paragraph{Latin Letters}
\label{sec:bib2glscustomsortlatin}

\cmddef{glsxtrGeneralLatinIrules}
This is just the basic (non-extended) Latin alphabet with the superscript
and subscript Latin letters (\textsuperscript{a} \textsubscript{a}
etc) treated as the equivalent basic Latin letter. (If you don't
want the subscripts and superscripts included you can redefine
\gls{glsxtrLatinA} etc to omit them.)

\cmddef{glsxtrGeneralLatinIIrules}
This is like \gls{glsxtrGeneralLatinIrules} but it includes eth
(\Eth) between \qt{D} and \qt{E} and eszett (\ss) treated as \qt{ss}.

\cmddef{glsxtrGeneralLatinIIIrules}
This is like \gls{glsxtrGeneralLatinIrules} but it includes eth
(\Eth) between \qt{D} and \qt{E} and eszett (\ss) treated as \qt{sz}.

\cmddef{glsxtrGeneralLatinIVrules}
This is like \gls{glsxtrGeneralLatinIrules} but it includes eth
(\Eth) between \qt{D} and \qt{E}, ae-ligature (\ae) is treated
as \qt{ae}, oe-ligature (\oe) is treated as \qt{oe}, eszett (\ss)
treated as \qt{ss} and thorn (\thorn) is treated as \qt{th}.

\cmddef{glsxtrGeneralLatinVrules}
This is like \gls{glsxtrGeneralLatinIrules} but it includes eth
(\Eth) between \qt{D} and \qt{E}, eszett (\ss) treated as \qt{ss}
and thorn (\thorn) treated as \qt{th}.

\cmddef{glsxtrGeneralLatinVIrules}
This is like \gls{glsxtrGeneralLatinIrules} but it includes eth
(\Eth) between \qt{D} and \qt{E}, eszett (\ss) treated as \qt{sz}
and thorn (\thorn) treated as \qt{th}.

\cmddef{glsxtrGeneralLatinVIIrules}
This is like \gls{glsxtrGeneralLatinIrules} but it includes
ae-ligature (\ae) between \qt{A} and \qt{B}, eth (\Eth) between \qt{D} and
\qt{E}, insular G (\insularg) instead of \qt{G}, oe-ligature (\oe)
between \qt{O} and \qt{P}, long~s (\longs) equivalent to \qt{s}, 
thorn (\thorn) between \qt{T} and \qt{U} and wynn (\wynn)
instead of \qt{W}.

\cmddef{glsxtrGeneralLatinVIIIrules}
This is like \gls{glsxtrGeneralLatinIrules} but ae-ligature (\ae) is
treated as \qt{ae}, oe-ligature (\oe) is treated as \qt{oe}, eszett
(\ss) treated as \qt{ss}, thorn (\thorn) is treated as \qt{th}, \O\
is treated as \qt{O} and \qt{\L} is treated as \qt{L}.

\cmddef{glsxtrGeneralLatinAtoMrules}
A mini-rule subset of General Latin~I rules that just covers A--M.

\cmddef{glsxtrGeneralLatinNtoZrules}
A mini-rule subset of General Latin~I rules that just covers N--Z.

\cmddef{glsxtrGeneralLatinAtoGrules}
A mini-rule subset of General Latin~I rules that just covers A--G.

\cmddef{glsxtrGeneralLatinHtoMrules}
A mini-rule subset of General Latin~I rules that just covers H--M.

\cmddef{glsxtrGeneralLatinNtoSrules}
A mini-rule subset of General Latin~I rules that just covers N--S.

\cmddef{glsxtrGeneralLatinTtoZrules}
A mini-rule subset of General Latin~I rules that just covers T--Z.

\cmddef{glsxtrLatinA}
A mini-rule that just covers \qt{A} but includes the sub- and
superscript A.

\cmddef{glsxtrLatinE}
A mini-rule that just covers \qt{E} but includes the subscript E.

\cmddef{glsxtrLatinH}
A mini-rule that just covers \qt{H} but includes the subscript H.

\cmddef{glsxtrLatinK}
A mini-rule that just covers \qt{K} but includes the subscript K.

\cmddef{glsxtrLatinI}
A mini-rule that just covers \qt{I} but includes the subscript I.

\cmddef{glsxtrLatinM}
A mini-rule that just covers \qt{M} but includes the subscript M.

\cmddef{glsxtrLatinN}
A mini-rule that just covers \qt{N} but includes the sub- and
superscript N.

\cmddef{glsxtrLatinO}
A mini-rule that just covers \qt{O} but includes the sub- and
superscript O.

\cmddef{glsxtrLatinP}
A mini-rule that just covers \qt{P} but includes the subscript P.

\cmddef{glsxtrLatinS}
A mini-rule that just covers \qt{S} but includes the subscript S.

\cmddef{glsxtrLatinT}
A mini-rule that just covers \qt{T} but includes the subscript T.

\cmddef{glsxtrLatinX}
A mini-rule that just covers \qt{X} but includes the subscript X.

\cmddef{glsxtrLatinEszettSs}
A mini-rule that just covers eszett (\ss) and makes \qt{\longs s} (long~s followed
by short~s) equivalent to \qt{\ss}. (This is used in the above blocks
that treat \qt{\ss} as \qt{ss}.)

\cmddef{glsxtrLatinEszettSz}
A mini-rule that just covers eszett (\ss) and makes \qt{\longs z} (long~s followed
by z) equivalent to \qt{\ss}. (This is used in the above blocks
that treat \qt{\ss} as \qt{sz}.)

\cmddef{glsxtrLatinEth}
A mini-rule for eth (\Eth, \eth) so you don't need to remember the
Unicode values.

\cmddef{glsxtrLatinThorn}
A mini-rule for thorn (\Thorn, \thorn) so you don't need to remember the
Unicode values.

\cmddef{glsxtrLatinAELigature}
A mini-rule for ae-ligature (\AE, \ae) so you don't need to remember the
Unicode values.

\cmddef{glsxtrLatinOELigature}
A mini-rule for oe-ligature (\OE, \oe) so you don't need to remember the
Unicode values.

\cmddef{glsxtrLatinOslash}
A mini-rule for o-slash (\O, \o) so you don't need to remember the
Unicode values.

\cmddef{glsxtrLatinLslash}
A mini-rule for l-slash (\L, \l) so you don't need to remember the
Unicode values.

\cmddef{glsxtrLatinWynn}
A mini-rule for wynn (\Wynn, \wynn) so you don't need to remember the
Unicode values.

\cmddef{glsxtrLatinInsularG}
A mini-rule for insular-G (\InsularG, \insularg) so you don't need to remember the
Unicode values.

\cmddef{glsxtrLatinSchwa}
A mini-rule for schwa (\Schwa, \schwa, \textsuperscript\schwa) so
you don't need to remember the Unicode values. (Not used in any of
the provided Latin rule blocks described above.)

\cmddef{glsxtrLatinAA}
A mini-rule for \qt{a with ring above} (\AA, \aa) so you don't need to remember the
Unicode values. (Not used in any of the provided Latin rule blocks
described above.)

\paragraph{Math Greek}
\label{sec:bib2glscustomsortmathgreek}

\cmddef{glsxtrMathGreekIrules}
A rule block for mathematical Greek (\gls{alpha}, \gls{beta} etc)
and upright Greek (\gls{upalpha}, etc, from the \sty{upgreek}
package) characters that includes digamma (\gls{digamma} and
\gls{Digamma}) between epsilon and zeta. The upright and italic
versions are gathered together into the same letter group.

\cmddef{glsxtrMathGreekIIrules}
As \gls{glsxtrMathGreekIrules} but doesn't include digamma.

\cmddef{glsxtrMathUpGreekIrules}
A rule block for upright Greek (\gls{upalpha}, etc, from the
\sty{upgreek} package) characters that includes digamma
(\gls{digamma} and \gls{Digamma}) between epsilon and zeta.

\cmddef{glsxtrMathUpGreekIIrules}
A rule block for upright Greek (\gls{upalpha}, etc, from
the \sty{upgreek} package) that doesn't include digamma.

\cmddef{glsxtrMathItalicGreekIrules}
A rule block for mathematical Greek (\gls{alpha}, \gls{Alpha}, etc)
characters that includes digamma (\gls{digamma} and \gls{Digamma})
between epsilon and zeta. Note that even though the \idx{uppercase}
\gls{Delta} etc are actually rendered upright by \LaTeX,
\app{bib2gls}['s] interpreter treats them as italic to help keep
them close to the \idx{lowercase} versions.

\cmddef{glsxtrMathItalicGreekIIrules}
A rule block for mathematical Greek (\gls{alpha}, \gls{Alpha}, etc)
characters that doesn't include digamma.

\cmddef{glsxtrMathItalicUpperGreekIrules}
A rule block for \idx{uppercase} mathematical Greek (\gls{Alpha},
\gls{Beta}, etc) characters that includes digamma (\gls{Digamma})
between epsilon and zeta.

\cmddef{glsxtrMathItalicUpperGreekIIrules}
A rule block for \idx{uppercase} mathematical Greek (\gls{Alpha},
\gls{Beta}, etc) characters that doesn't include digamma.

\cmddef{glsxtrMathItalicLowerGreekIrules}
A rule block for \idx{lowercase} mathematical Greek (\gls{alpha},
\gls{beta}, etc) characters that includes digamma (\gls{digamma})
between epsilon and zeta.

\cmddef{glsxtrMathItalicLowerGreekIIrules}
A rule block for lower case mathematical Greek (\gls{alpha},
\gls{beta}, etc) characters that doesn't include digamma.

Additionally, there are commands that just cover the \idx{uppercase} and 
\idx{lowercase} forms of a special
Greek character (\gls{Upalpha}, \gls{upalpha} etc and \gls{Alpha},
\gls{alpha} etc): 
\inlineglsdef{glsxtrUpAlpha},
\inlineglsdef{glsxtrMathItalicAlpha},
\inlineglsdef{glsxtrUpBeta},
\inlineglsdef{glsxtrMathItalicBeta},
\inlineglsdef{glsxtrUpGamma},
\inlineglsdef{glsxtrMathItalicGamma},
\inlineglsdef{glsxtrUpDelta},
\inlineglsdef{glsxtrMathItalicDelta},
\inlineglsdef{glsxtrUpEpsilon},
\inlineglsdef{glsxtrMathItalicEpsilon},
\inlineglsdef{glsxtrUpDigamma},
\inlineglsdef{glsxtrMathItalicDigamma},
\inlineglsdef{glsxtrUpZeta},
\inlineglsdef{glsxtrMathItalicZeta},
\inlineglsdef{glsxtrUpEta},
\inlineglsdef{glsxtrMathItalicEta},
\inlineglsdef{glsxtrUpTheta},
\inlineglsdef{glsxtrMathItalicTheta},
\inlineglsdef{glsxtrUpIota},
\inlineglsdef{glsxtrMathItalicIota},
\inlineglsdef{glsxtrUpKappa},
\inlineglsdef{glsxtrMathItalicKappa},
\inlineglsdef{glsxtrUpLambda},
\inlineglsdef{glsxtrMathItalicLambda},
\inlineglsdef{glsxtrUpMu},
\inlineglsdef{glsxtrMathItalicMu},
\inlineglsdef{glsxtrUpNu},
\inlineglsdef{glsxtrMathItalicNu},
\inlineglsdef{glsxtrUpXi},
\inlineglsdef{glsxtrMathItalicXi},
\inlineglsdef{glsxtrUpOmicron},
\inlineglsdef{glsxtrMathItalicOmicron},
\inlineglsdef{glsxtrUpPi},
\inlineglsdef{glsxtrMathItalicPi},
\inlineglsdef{glsxtrUpRho},
\inlineglsdef{glsxtrMathItalicRho},
\inlineglsdef{glsxtrUpSigma},
\inlineglsdef{glsxtrMathItalicSigma},
\inlineglsdef{glsxtrUpTau},
\inlineglsdef{glsxtrMathItalicTau},
\inlineglsdef{glsxtrUpUpsilon},
\inlineglsdef{glsxtrMathItalicUpsilon},
\inlineglsdef{glsxtrUpPhi},
\inlineglsdef{glsxtrMathItalicPhi},
\inlineglsdef{glsxtrUpChi},
\inlineglsdef{glsxtrMathItalicChi},
\inlineglsdef{glsxtrUpPsi},
\inlineglsdef{glsxtrMathItalicPsi},
\inlineglsdef{glsxtrUpOmega}, and
\inlineglsdef{glsxtrMathItalicOmega}.

Additionally, there are commands for math italic partial
differential $\partial$ (0x1D715)
\inlineglsdef{glsxtrMathItalicPartial} and nabla $\nabla$ (0x1D6FB)
\inlineglsdef{glsxtrMathItalicNabla}.


\subsection{Commands Used Within Resource Files}
\label{sec:glstexcmds}

A \ext{glstex} file will typically start with \gls{glsnoexpandfields},
since supporting field expansion is only necessary where entry
definitions may be programmatically performed within a loop or
some other command. (This may be suppressed.)

If you use the \resourceopt{set-widest} resource option, \app{bib2gls}
v1.8+ will write the following command in the \ext{glstex} file:
\cmddef{glsxtrSetWidest}
This sets the widest name for the given
\idx{glossary} type and \idx{hierarchicallevel}. This supports both
the \glostyle{alttree} style and the styles provided by
\sty{glossary-longextra}, which need to know the widest name.

If \app{bib2gls} can't determine the widest name (typically because
the \gloskey{name} field consists of commands that aren't recognised by the
interpreter) then \app{bib2gls} v1.8+ will write the following to
the \ext{glstex} file:
\cmddef{glsxtrSetWidestFallback}\marg{max depth}\marg{list}
Currently the maximum hierarchical depth \meta{max
depth} may only be 0 or 2. This command requires commands provided
by the \sty{glossaries-extra-stylemods} package with the
\glostyle{alttree} style enabled.  In this case, it may be simpler
to just use \gls{glssetwidest}.

The \ext{glstex} files may also contain instances of
\gls{glsxtrprovidestoragekey} to provide new \idxpl{gloskey} or
\gls{provideignoredglossary} to provide \idxpl{glossary} to ensure
they are defined.

The \csfmt{bibgls\ldots} commands provided by \app{bib2gls} are
defined in the \ext{glstex} files with \gls{providecommand}. See the
\app{bib2gls} manual for further details of those commands.

\subsection{Hierarchy}
\label{sec:bib2glshier}

The \gloskey{parent} key identifies a parent entry (by its label),
so determining if an entry has a parent can easily be achieved by
testing if the \gloskey{parent} field has been set (using
\gls{ifglshasparent} or a command like \gls{glsxtrifhasfield}).

The other way around, testing if an entry has any children, is much
harder. The base \sty{glossaries} package provides
\gls{ifglshaschildren}, which is very inefficient as it has to
iterate over all entries in the entry's \idx{glossary} to determine
which ones have a matching \gloskey{parent} field.

It's much easier with \app{bib2gls}, as there are
\idxpl{resourceopt} available to save this information. The
\resourceopt{save-child-count} option saves the child count for each
entry in the \glosfield{childcount} internal field. This total only
includes the child entries that have been selected by the
\idx{resourceset}.

\begin{information}
With \sty{glossaries} v4.59+ and \sty{datatool} v3.0+, the pre-sort
function used by \gls{printnoidxglossary} may also locally set
the \glosfield{childcount} field for entries that have listed
children. There is, however, a slight difference as, in this case,
\glosfield{childcount} isn't set for entries that don't have listed
children, and the field is only locally set within the scope of the
glossary.
\end{information}

\cmddef{GlsXtrIfHasNonZeroChildCount}
A shortcut that uses \gls{GlsXtrIfFieldNonZero} to test if the value
supplied in the \glosfield{childcount} field is non-zero. The
starred form uses the starred form of \gls{GlsXtrIfFieldNonZero}.

\subsection{Supplemental Locations}
\label{sec:supplocations}

Locations in external documents can be manually added by explicitly
setting \glsopt{thevalue} when an entry is \indexed. However, this
is a bit inconvenient so \app{bib2gls} provides a way to do this
automatically. Both the main document and the supplemental document
need to use the \opt{record} option, and the entries provided via
\resourceopt{src} in the main document must have the same labels as
those in the supplementary document. The supplemental document is
identified by the \resourceopt{supplemental-locations} resource
option. See the \app{bib2gls} manual for further details.

\cmddef{glsxtrdisplaysupploc}
This is used by \app{bib2gls} version v1.7+ for supplemental
locations, instead of using \gls{glsxtrsupphypernumber} with the
\catattr{externallocation} attribute. This command sets up the
\idx{locationcounter} and prefix (used in the formation of hyperlinks)
and then uses:
\cmddef{glsxtrmultisupplocation}
to format the actual \location\ (with an external hyperlink, if
supported). The \meta{format} (the original \idx{locationencap}) is
ignored by default.

\subsection{Nameref Records}
\label{sec:recordnameref}

Nameref \records\ include the current title and hypertarget. These
\records\ are enabled with \opteqvalref{record}{nameref} and provide a
more reliable way of saving the \location\ hypertarget, which can't be
obtained with \app{makeindex} or \app{xindy}.

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

Normally locations are \recorded\ in the \ext{aux} file
in the form:
\cmddef{glsxtr@record}
This is similar to the command used with \gls{makenoidxglossaries}
and provides the same information about the \location\ and how to
form the hypertarget as is passed to \app{makeindex} and
\app{xindy}. The \opteqvalref{record}{nameref} option, which requires at least
\app{bib2gls} v1.8, instead uses:
\cmddef{glsxtr@record@nameref}
where \meta{title} is obtained from \gls{@currentlabelname}
and \meta{href} is obtained from \gls{@currentHref}. These
commands require \sty{hyperref}. If they are undefined,
\meta{title} and \meta{href} will be left empty and \app{bib2gls}
will treat it as a regular \record.

\begin{important}
Be careful with this option as \meta{href} will globally change on every
instance of \gls{refstepcounter} but \meta{title} won't necessarily
change. It can therefore cause unexpected behaviour.
\end{important}

The final argument \meta{hcounter} is obtained from
\csfmt{theH}\meta{counter} which provides the partial target name associated
with the \idx{locationcounter}. With the original
\app{makeindex}\slash \app{xindy} approach, it's not possible to
include this information in the location, so the base
\sty{glossaries} package attempts to derive a prefix from which the
\meta{hcounter} value can be reconstituted by appending the prefix.
Unfortunately, not all definitions of \csfmt{theH}\meta{counter} are in
the form \meta{prefix}\gls{thecounter} (most notably the
\ctr{equation} counter with chapters) so this can fail.

Since \app{bib2gls} is customized specifically for use with
\sty{glossaries-extra}, it's now possible to save
\meta{hcounter}, so the \opt{record}{nameref} option does this.
By providing both \meta{href} and \meta{hcounter}, you can determine
which target you would rather use. The default is to use
\meta{hcounter}, which will take you to the place where the
corresponding counter was incremented with \gls{refstepcounter}.
However, you may choose to switch to using the \meta{href} target,
which will take you to the nearest target before the indexing took
place.

With \app{bib2gls} v1.8+, normal locations are displayed using:
\cmddef{glsnoidxdisplayloc}
This is provided by the base \sty{glossaries} package and is simply
defined to do:
\begin{compactcodebox}
\gls{setentrycounter}\oargm{prefix}\margm{counter}\cmd{csuse}\margm{format}\margm{location}
\end{compactcodebox}
Earlier versions of \app{bib2gls} only used this in the
\glosfield{loclist} field and explicitly used \gls{setentrycounter} in
the \gloskey{location} field followed by
\csfmt{}\meta{format}\marg{location}, which follows the code that's created
with the default \opt{makeindex} setting.
The \gls{setentrycounter} command sets up the prefix needed for
\gls{glshypernumber} to reform the target name from the given
\location.

The \locations\ identified by \gls{glsxtr@record@nameref} are written
by \app{bib2gls} to the \idx{locationlist} using:
\cmddef{glsxtrdisplaylocnameref}
With normal internal locations, \meta{file} will always be empty.
With supplemental locations, \meta{file} will be the external file
reference. If \sty{hyperref} hasn't been loaded, this command 
behaves like \gls{glsnoidxdisplayloc}, so it will simply encapsulate
the location with the given formatting command.

If \sty{hyperref} has been loaded, then \gls{glsxtrdisplaylocnameref}
will try to work out the appropriate hyperlink anchor and text. The
\meta{prefix} argument is redundant.
It first defines the following commands:
\cmddef{glsxtrrecentanchor}
This expands to the \meta{href} argument, which corresponds to the
\gls{@currentHref} value at the time the location was \recorded.
If this is used as the anchor, the link will go to the most recent anchor
before the record was created. This is more likely to match the
given title, but won't necessarily match the corresponding counter.

For example, if the record was created with
\glsoptval{counter}{\ctr{section}} but occurred in a table caption,
then \gls{glsxtrrecentanchor} and the title will correspond to the
table caption. If you have defined
\glsdisp{glsxtrcounterlocfmt}{\csfmt{glsxtrsectionlocfmt}} to show
the section number (see below), then this may cause some confusion if clicking
on the section number leads to a table caption. However, it will
lead to the closest location to where the record was created, which
may be preferred.

\cmddef{glsxtrlocationanchor}
This expands to the anchor that corresponds to the record's
\idx{locationcounter}, which is constructed from the \meta{counter}
and \meta{hcounter} arguments.

In the above example with the \ctr{section} counter, 
\meta{hcounter} will be the value of \theHcounter{section} when the
record was created, so the constructed anchor will be
\code{section.\meta{hcounter}} which corresponds to the anchor at
the start of the section. However, if you haven't defined 
\glsdisp{glsxtrcounterlocfmt}{\csfmt{glsxtrsectionlocfmt}}, then the
title will correspond to the table caption, which may be a little
confusing.

The actual anchor used is obtained from the expansion of:
\cmddef{glsxtractualanchor}
This is initialised to the value of \gls{glsxtrlocationanchor} but
may be changed by:
\cmddef{glsxtrsetactualanchor}
The argument is the counter name, which may be used to set choose an
alternative anchor depending on the counter. This command does
nothing by default, which means that \gls{glsxtrlocationanchor} 
will be used.

For example, to switch to \gls{glsxtrrecentanchor} if the counter is
\ctrfmt{page}:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{glsxtrsetactualanchor}}[1]\marg{\comment{}
  \cmd{ifstrequal}\marg{\#1}\marg{page}
  {\cmd{let}\gls{glsxtractualanchor}\gls{glsxtrrecentanchor}}%
  {}%
}
\end{codebox}

\begin{information}
If you are using \opt{indexcounter} then the recent
anchor will be the one created by the \ctr{wrglossary} increment
just before the \idx{indexing} occurs. This means that with
\glsoptval{counter}{wrglossary}, the location anchor and recent
anchor will be the same. With other counters, the recent anchor will
be the closest anchor to the place where \idx{indexing} occurred.
\end{information}

To allow for different formatting according to the counter name,
\gls{glsxtrdisplaylocnameref} first checks for the existence of:
\cmddef{glsxtrcounterlocfmt} 
If this command is defined, the location will be displayed using:
\begin{compactcodebox}
\gls{glsxtrnamereflink}\margm{format}{\gls{glsxtrcounterlocfmt}\margm{location}\margm{title}}\margm{href}\margm{file}
\end{compactcodebox}
Note the above warning about the possible mismatch of the title with
the anchor. For example, if the following is defined for the
\ctr{section} counter:
\begin{compactcodebox}
\cmd{newcommand}\marg{\glsdisp{glsxtrcounterlocfmt}{\csfmt{glsxtrsectionlocfmt}}}[2]\marg{\cmd{S}\#1 (\#2)}
\end{compactcodebox}
then this could lead to the section number followed by the table
caption. A more compact form that omits the title is better:
\begin{codebox}
\cmd{newcommand}\marg{\glsdisp{glsxtrcounterlocfmt}{\csfmt{glsxtrsectionlocfmt}}}[2]\marg{\cmd{S}\#1}
\end{codebox}

The following location formats are predefined. 
The \ctr{equation} counter:
\cmddef{glsxtrequationlocfmt}
This simply expands to \code{(\meta{location})} since equations
typically don't have a title, but are usually enclosed in
parentheses.

\cmddef{glsxtrwrglossarylocfmt}
This is used when the \opt{indexcounter} option creates records with the 
\ctr{wrglossary} counter. This ensures that the page name is shown
rather than the value of the \ctr{wrglossary} counter.

If the corresponding \gls{glsxtrcounterlocfmt} hasn't been defined,
\gls{glsxtrdisplaylocnameref} will do one of the following:
\begin{itemize}
\item if \meta{title} is empty or the counter is \ctr{page}, 
\gls{glsxtrnamereflink} with the title set to the location;

\item otherwise it will do:
\cmddef{glsxtrtitlednamereflink}
which uses \gls{glsxtrnamereflink} with the given \meta{title}
and \gls{glsxtrrecentanchor} as the anchor. This has a better chance
of matching the title with the anchor, but it's not guaranteed as
some anchors are created without a title.
This is defined as:
\begin{compactcodebox}
\cmd{newcommand}\marg{\gls{glsxtrtitlednamereflink}}[4]\marg{\comment{}
 \gls{glsxtrnamereflink}\marg{\#1}\marg{\#2}\marg{\gls{glsxtrrecentanchor}}\marg{\#4}\comment{}
}
\end{compactcodebox}
This shows the formatted title with the recent anchor. The location
isn't shown. If you would prefer to just show the location and use
the anchor corresponding to the location counter:
\begin{compactcodebox}
\cmd{renewcommand}\marg{\gls{glsxtrtitlednamereflink}}[4]\marg{\comment{}
 \gls{glsxtrnamereflink}\marg{\#1}\marg{\#2}\marg{\gls{glsxtrlocationanchor}}\marg{\#3}\comment{}
}
\end{compactcodebox}
\end{itemize}

If \meta{file} is empty an internal link is created with:
\cmddef{glsxtrfmtinternalnameref}
otherwise an external link is created with:
\cmddef{glsxtrfmtexternalnameref}
The \meta{file} argument is set by \app{bib2gls} for supplemental
locations (obtained from \resourceopt{supplemental-locations}).

The link is encapsulated with the text-block command
whose name is given by \meta{format}, but \gls{glshypernumber} is
first locally redefined to \gls{@firstofone} to prevent a conflict with the
usual \location\ hyperlink formation. This means that if the
\meta{format} is \gls{hyperbf} then it will simply behave like
\gls{textbf}.

The following command is provided but not used by default:
\cmddef{glsxtrnameloclink}
This creates a hyperlink to the target in the given external file obtained from the
\meta{prefix}, \meta{counter} and \meta{location} but uses
\meta{text} as the hyperlink text. As with regular indexing, this
will fail if the target name can't be formed by prefixing the
location value.

For compactness, \app{bib2gls} merges normal records if the
\meta{prefix}, \meta{counter} and \meta{location} all match. (An
order of precedence can be provided for format conflicts.) With
\optfmt{nameref} records, you can use the \switch{merge-nameref-on} switch
provided by \app{bib2gls} v1.8+ to determine how to merge \optfmt{nameref}
records. This switch must be followed by one of the following
keywords: \code{hcounter} (merge on \meta{hcounter}, default)
\code{href} (merge on \meta{href}), \code{title} (merge
on \meta{title}) and \code{location} (merge on \meta{location}, as
regular records).  In all cases, the \meta{counter} must also match.


\subsection{Dual Entry Commands}
\label{sec:dgls}

Dual entries can be defined with entry types like \atentry{dualentry} or
\atentry{dual\-index\-ab\-bre\-vi\-a\-tion}. A single entry definition within
the \ext{bib} file creates two dependent entries that may be
referenced within the document and assigned to different
\idxpl{glossary}. The default \resourceoptvalm{selection}{recorded
and deps} will ensure that dependent entries are selected, even if
they don't have any \records.
For example, the following \ext{bib} entry:
\begin{codebox}
\atentry{dualindexsymbol}\marg{L,
  \gloskeyval{name}{Lagrangian function},
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{L}},
  \gloskeyval{description}{a function of generalized co-ordinates}
}
\end{codebox}
is essentially like:
\begin{codebox}
\atentry{index}\marg{L,
  \gloskeyval{name}{Lagrangian function},
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{L}},
  \gloskeyval{description}{a function of generalized co-ordinates}
}
\atentry{symbol}\marg{dual.L,
  \gloskeyval{name}{\cmd{ensuremath}\marg{L}},
  \gloskeyval{symbol}{Lagrangian function},
  \gloskeyval{description}{a function of generalized co-ordinates}
}
\end{codebox}
but additionally the two entries (the primary \code{L} and the dual
\code{dual.L}) are dependent. The following document only references
the primary entry, but the dependency ensures that that the dual is
also selected:
\begin{codebox}
\cmd{usepackage}\oarg{\opt{record},\opt{symbols},\opt{nostyles},
 \optvalm{stylemods}{tree,bookindex}}\marg{glossaries-extra}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{entries},\resourceoptval{dual-type}{symbols}}
\gls{glsdefpostlink}\marg{index}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}
\gls{glsdefpostname}\marg{index}\marg{\comment{}
 \gls{ifglshassymbol}\marg{\gls{glscurrententrylabel}}
 \marg{ (\gls{glsentrysymbol}\marg{\gls{glscurrententrylabel}})}\marg{}}
\cbeg{document}
Primary: \gls{gls}\marg{L}.
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{symbols},\printglossoptval{style}{\glostyle{tree}}}
\gls{printunsrtglossary}\oarg{\printglossoptval{title}{Index},\printglossoptval{style}{bookindex}}
\cend{document}
\end{codebox}
The dependency ensures that the dual entry \code{dual.L} is
selected, and the \resourceopt{dual-type} setting adds the dual
entry to the \code{symbols} glossary (which was defined with the
\opt{symbols} package option).

It may be useful to have a hyperlink from the entry in one \idx{glossary}
to its dependent in the other \idx{glossary}. This can be achieved
by instructing \app{bib2gls} to save the label of the entry's
opposite using \resourceopt{dual-field}. The value of this
\idx{resourceopt} indicates the field in which to
save the label. If omitted, \code{dual} is assumed. 

The \idx{glossarystyle} can then be adapted to check if the field
has been set and, if so, to create a hyperlink. The following
command is provided to assist with this:
\cmddef{GlsXtrDualBackLink}
This is defined as:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{GlsXtrDualBackLink}}[2]\marg{\comment{}
  \gls{glsxtrifhasfield}\marg{\gls{GlsXtrDualField}}\marg{\#2}\comment{}
  \marg{\gls{glshyperlink}\oarg{\#1}\marg{\gls{glscurrentfieldvalue}}}\comment{}
  \marg{\#1}\comment{}
}
\end{compactcodebox}
This obtains the field from:
\cmddef{GlsXtrDualField}
This expands to \code{dual}, which is the default for
\resourceopt{dual-field} if no value is supplied.

The above example can be adapted as follows:
\begin{codebox}
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}
\cmd{usepackage}\oarg{\opt{record},\opt{symbols},\opt{nostyles},\optvalm{stylemods}{tree,bookindex}}\marg{glossaries-extra}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{entries},%
 \resourceoptval{dual-type}{symbols},\resourceopt{dual-field}%
}
\gls{glsdefpostlink}\marg{index}\marg{\gls{glsxtrpostlinkAddSymbolOnFirstUse}}
\gls{glsdefpostname}\marg{index}\marg{\comment{}
 \gls{ifglshassymbol}\marg{\gls{glscurrententrylabel}}
 \marg{ (\gls{GlsXtrDualBackLink}\marg{\gls{glsentrysymbol}\marg{\gls{glscurrententrylabel}}}\marg{\gls{glscurrententrylabel}})}\marg{}}
\cbeg{document}
Primary: \gls{gls}\marg{L}.
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{symbols},\printglossoptval{style}{\glostyle{tree}}}
\gls{printunsrtglossary}\oarg{\printglossoptval{title}{Index},\printglossoptval{style}{bookindex}}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[title={Using \appfmt{bib2gls}: dual backlinks},
 label={ex:bib2glsdualbacklinks},
 description={Example document that has backlinks in the glossaries
between the primary and dual entries},
 arara={pdflatex,bib2gls,pdflatex,pdfcrop}]
{\cbeg{filecontents*}\marg{\cmd{jobname}.bib}^^J%
\atentry{dualindexsymbol}\marg{L,^^J
  \gloskeyval{name}{Lagrangian function},^^J
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{L}},^^J
  \gloskeyval{description}{a function of generalized co-ordinates}^^J%
}^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J%
\cmd{usepackage}\oarg{\opt{record},\opt{symbols},\opt{nostyles},\optvalm{stylemods}{tree,bookindex}}\marg{glossaries-extra}^^J%
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\cmd{jobname}},^^J
 \resourceoptval{dual-type}{symbols},\resourceopt{dual-field}^^J%
}^^J%
\gls{glsdefpostlink}\marg{index}\marg{\gls{glsxtrpostlinkAddSymbolOnFirstUse}}^^J%
\gls{glsdefpostname}\marg{index}\marg{\%^^J
 \gls{ifglshassymbol}\marg{\gls{glscurrententrylabel}}^^J
 \marg{ (\gls{GlsXtrDualBackLink}\marg{\gls{glsentrysymbol}\marg{\gls{glscurrententrylabel}}}\marg{\gls{glscurrententrylabel}})}\marg{}}
}{Primary: \gls{gls}\marg{L}.^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{type}{symbols},\printglossoptval{style}{\glostyle{tree}}}^^J%
\gls{printunsrtglossary}\oarg{\printglossoptval{title}{Index},\printglossoptval{style}{bookindex}}
}
\end{resultbox}
This checks if the \gloskey{symbol} key has been set in both the
\idx{catpostlinkhook} and the \idx{catpostnamehook} to append the
symbol in parentheses. In addition, the \idx{catpostnamehook} adds a
link to the corresponding dual entry.

If you prefer instead to have the backlink on the \gloskey{name} in both
\idxpl{glossary}, then this can more easily be achieved with a
\idx{resourceopt} such as \resourceopt{dual-backlink}.

The commands described below were designed for use with \app{bib2gls}['s] dual
entries, but may also be used in other contexts where a label may
potentially have a number of possible prefixes.

It's possible to use commands like \gls{glsxtrnewgls} to create
\idx{glslike} commands that automatically insert a label prefix
(such as \code{dual.}\ for dual entries).
The commands described in this section provide a similar set of
\idx{glslike} commands that iterate over a set of possible prefixes
until a match is found.

Each possible prefix (which may be empty) is identified by:
\cmddef{glsxtraddlabelprefix}\marg{prefix}
These should be listed in order of precedence.

You can prepend a prefix to the list using:
\cmddef{glsxtrprependlabelprefix}
which gives it the highest order of precedence.

The list of known prefixes can be (locally) cleared with:
\cmddef{glsxtrclearlabelprefixes}

You can test if a prefix is already in the list with:
\cmddef{glsxtrifinlabelprefixlist}
This does \meta{true} if the given prefix has been added to the
list. No expansion is performed on \meta{label-prefix}.

In the event that there's no match for any of the prefixes (which
will occur on the first \LaTeX\ run before the \ext{glstex} file has
been created), the fallback is determined by the conditional:
\cmddef{ifGlsXtrPrefixLabelFallbackLast}
If true, this will fallback on the last prefix, otherwise it will
fallback on the first. This conditional can be set to true with:
\cmddef{GlsXtrPrefixLabelFallbackLasttrue}
and to false with:
\cmddef{GlsXtrPrefixLabelFallbackLastfalse}
The default is true.

\begin{information}
As from v1.49, all possible matches will be \recorded\ using a
special syntax if none are found. This ensures there will be at
least one match on the first run. However, note that this requires
\app{bib2gls} v3.0+.
\end{information}

In general it's best to avoid adding multiple instances of the same
prefix, so you can check with this command before adding a prefix to
the list. However, it can be useful to repeat a prefix at
the start or end of the list so that it can be used as a fallback for entries
that haven't yet been defined.

With the list of possible prefixes set up (including an empty
prefix if necessary), you can use:
\cmddef{dgls}
which behaves like
\begin{compactcodebox}
\gls{gls}\oargm{options}\marg{\meta{prefix}\marg{entry-label}}\oargm{insert}
\end{compactcodebox}
where \meta{prefix} is the first prefix in the list such that
\meta{prefix}\meta{label} matches a defined entry. This requires
\app{bib2gls} v3.0+ to work properly on the first \LaTeX\ run (when
no entries are defined).

There are also analogous commands for the plural and case-changing
versions:
\cmddef{dglspl}
(uses \gls{glspl}),
\cmddef{dGls}
(uses \gls{Gls}),
\cmddef{dGlspl}
(uses \gls{Glspl}),
\cmddef{dGLS}
(uses \gls{GLS}),
\cmddef{dGLSpl}
(uses \gls{GLSpl}),
\cmddef{dglslink}
(uses \gls{glslink}), 
\cmddef{dGlslink}
(uses \gls{Glslink}),
\cmddef{dglsdisp}
(uses \gls{glsdisp}) and
\cmddef{dGlsdisp}
(uses \gls{Glsdisp}).

If you want to use a specific field you can instead use:
\cmddef{dglsfield}
This will find the first match that has the given field set (that
is, the field value has been defined and is not empty or \gls{relax}).
The field should be identified by its \idx{internalfieldlabel}.
There are also case-changing versions:
\cmddef{dGlsfield}
which applies a \idx{sentencecase} change and
\cmddef{dGLSfield}
which applies \idx{allcaps}. Note that at least one of the potential
labels must have the given field set in order for the reference to be
correctly resolved. For example:
\begin{codebox}
\gls{dglsfield}\marg{pi}\marg{symbol}
\end{codebox}
If you find this a bit long-winded to type and you want to provide a
shorter command that recognises the modifiers, then you can use:
\cmddef{newdglsfield}
For example:
\begin{codebox}
\gls{newdglsfield}\marg{symbol}\marg{\cmd{sym}}
\cmd{sym}\marg{pi}
\end{codebox}
If you also want \idx{sentencecase} and \idx{allcaps} versions use:
\cmddef{newdglsfieldlike}
where \meta{cs} is the command without a case-change (which will use
\gls{dglsfield}), \meta{Cs} is the \idx{sentencecase} command
(which will use \gls{dGlsfield}) and \meta{CS} is the \idx{allcaps}
command (which will use \gls{dGLSfield}). This will also use
\gls{glsmfuaddmap} and \gls{glsmfublocker} to establish the
\idx{sentencecase} mapping from \meta{cs} to \meta{Cs} and block the
\idx{casechange} for \meta{CS}.

\begin{information}
No expansion is performed on \meta{default-options} or \meta{field}
while the new commands are being defined.
\end{information}

Information is written to the transcript file with \gls{GlossariesExtraInfo}
if a fallback is considered. Note that this shouldn't be considered
a warning as the fallback might be desired, but if the wrong output
is produced this information may explain the selection.

With commands like \gls{gls}, it's easy to create a shortcut command
that can add some content that varies according to the entry. For
example, suppose you want to keep displaying both the entry's symbol
followed by the entry's usual text but you don't want to alter the
\idx{postlinkhook} as you don't always want to do this. You could,
for example define:
\begin{codebox}
\cmd{newcommand}\cmd{symgls}\oarg{1}\marg{\gls{glssymbol}\marg{\#1}\gls{gls}\marg{\#1}}
\end{codebox}

This can be harder to do with commands like \gls{dgls} as you may need to access
the actual label. For example, suppose instead of simply showing a
field (the symbol in the above example), you need to access the
category. A definition like the above \csfmt{symgls} is no
longer simple as the argument passed is no longer the actual label.

To help with this situation, the \gls{dgls}-like commands all use a
hook after the label is found and before the actual 
corresponding \gls{gls}-like action is performed:
\cmddef{predglshook}
The argument is the actual found label. Note that if a label isn't
found (which will occur on the first \LaTeX\ run), this hook won't
be used.

There is a similar hook for \gls{glslink} and \gls{glsdisp}:
\cmddef{predglslinkhook}

And likewise for the \gls{dglsfield} set of commands:
\cmddef{predglsfieldhook}

The family of \gls{dglsfield} commands all define:
\cmddef{dglsfieldcurrentfieldlabel}
This expands to the given field label.

If the requested field isn't set (according to \gls{ifcsvoid}) then
the fallback field will be tried instead.
\cmddef{dglsfieldfallbackfieldlabel}
This expands to the fallback field, which defaults to the
\gloskey{text} field.

If you need to know whether the requested field or the fallback
field was used, the following will be set to the actual field used.
\cmddef{dglsfieldactualfieldlabel}

For example, suppose the file \filefmt{entries.bib} contains:
\begin{codebox}
\atentry{index}\marg{duck}
\atentry{dualindexabbreviation}\marg{svm,
  \gloskeyval{short}{SVM},
  \gloskeyval{long}{support vector machine}
}
\atentry{dualindexsymbol}\marg{pi,
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{pi}}},
  description={ratio of a circle's circumference to its diameter}
}
\end{codebox}
and suppose the document code is:
\begin{codebox}
\cmd{documentclass}\marg{article}
\cmd{usepackage}\marg{hyperref}
\cmd{usepackage}\oarg{\opt{record},\opt{abbreviations},\opt{symbols}}\marg{glossaries-extra}
\codepar
\cmd{newcommand}\marg{\gls{bibglsnewdualindexsymbolsecondary}}[5]\marg{\comment{}
 \gls{longnewglossaryentry*}\marg{\#1}\marg{\gloskeyval{name}{\#3},\gloskeyval{category}{symbol},
   \gloskeyval{type}{symbols},\gloskeyval{symbol}{\#4},\#2}\marg{\#5}\comment{}
}
\codepar
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{entries}}
\codepar
\cbeg{document}
First use: \gls{gls}\marg{duck}, \gls{gls}\marg{svm}, \gls{gls}\marg{pi}.
Next use: \gls{gls}\marg{duck}, \gls{gls}\marg{svm}, \gls{gls}\marg{pi}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
This uses the default empty primary prefix and \code{dual.}\ for
the dual prefix, so \code{\gls{gls}\marg{svm}} is referencing the primary
entry, which is (essentially) an \atentry{index} type not an
abbreviation. It therefore doesn't follow the abbreviation style, and
it also hyperlinks to the index not to the list of abbreviations.
Similarly for \code{\gls{gls}\marg{pi}}, which references the primary
\atentry{index} entry rather than the symbol.

What's really needed is:
\begin{codebox}
\gls{gls}\marg{duck}, \gls{gls}\marg{dual.svm}, \gls{gls}\marg{dual.pi}.
\end{codebox}
or use \resourceopt{label-prefix} and \resourceopt{dual-prefix} to
set the label prefixes:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{entries},
 \resourceoptvalm{label-prefix}{idx.},\resourceoptvalm{dual-prefix}{}
}
\end{codebox}
then only the entries without a dual need a prefix:
\begin{codebox}
\gls{gls}\marg{idx.duck}, \gls{gls}\marg{svm}, \gls{gls}\marg{pi}.
\end{codebox}
Using \gls{glsxtrnewgls} or \gls{glsxtrnewglslike} (see \sectionref{sec:labelprefixes})
to define the custom \csfmt{idx}:
\begin{codebox}
\gls{glsxtrnewgls}\marg{idx.}\marg{\cmd{idx}}
\end{codebox}
the entry references can be simplified to:
\begin{codebox}
\cmd{idx}\marg{duck}, \gls{gls}{svm}, \gls{gls}{pi}.
\end{codebox}
but this requires remembering which terms have duals.

An alternative is to use \gls{dgls} instead:
\begin{codebox}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{entries},
 \resourceoptval{combine-dual-locations}{primary}}
\codepar
\gls{glsxtraddlabelprefix}\marg{dual.}
\gls{glsxtraddlabelprefix}\marg{}
\codepar
\cbeg{document}
First use: \gls{dgls}\marg{duck}, \gls{dgls}\marg{svm}, \gls{dgls}\marg{pi}.
Next use: \gls{dgls}\marg{duck}, \gls{dgls}\marg{svm}, \gls{dgls}\marg{pi}.
\gls{printunsrtglossaries}
\cend{document}
\end{codebox}
\begin{resultbox}
\createexample*[arara={pdflatex,bib2gls,pdflatex,pdfcrop},
 label={ex:bib2glsduallabelprefixes},
 title={Using \appfmt{bib2gls}: dual entry label prefixes},
 description={Example document that uses bib2gls's dual entries with
the primary and dual prefixes identified}
]
{%
\cbeg{filecontents*}\marg{\cmd{jobname}.bib}^^J%
\atentry{index}\marg{duck}^^J%
\atentry{dualindexabbreviation}\marg{svm,^^J
  \gloskeyval{short}{SVM},^^J
  \gloskeyval{long}{support vector machine}^^J%
}^^J
\atentry{dualindexsymbol}\marg{pi,^^J
  \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{pi}}},^^J
  description={ratio of a circle's circumference to its
diameter}^^J%
}^^J%
\cend{filecontents*}^^J%
\cmd{usepackage}\marg{hyperref}^^J%
\cmd{usepackage}\oarg{\opt{record},\opt{abbreviations},\opt{symbols}}\marg{glossaries-extra}
\codepar
\cmd{newcommand}\marg{\gls{bibglsnewdualindexsymbolsecondary}}[5]\marg{\%^^J
 \gls{longnewglossaryentry*}\marg{\#1}\marg{\gloskeyval{name}{\#3},\gloskeyval{category}{symbol},^^J
   \gloskeyval{type}{symbols},\gloskeyval{symbol}{\#4},\#2}\marg{\#5}\%^^J%
}
\codepar
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\cmd{jobname}},^^J
 \resourceoptval{combine-dual-locations}{primary}}^^J%
\gls{glsxtraddlabelprefix}\marg{dual.}^^J%
\gls{glsxtraddlabelprefix}\marg{}
}
{First use: \gls{dgls}\marg{duck}, \gls{dgls}\marg{svm},
\gls{dgls}\marg{pi}.^^J%
Next use: \gls{dgls}\marg{duck}, \gls{dgls}\marg{svm},
\gls{dgls}\marg{pi}.^^J%
\gls{printunsrtglossaries}
}
\end{resultbox}

On the first \LaTeX\ call (when the \ext{glstex} file doesn't exist),
neither \code{dual.svm} nor \code{svm} exists, so \gls{dgls}
uses the last prefix (which is empty in this case). This means
that on the first \LaTeX\ run, \code{\gls{dgls}\marg{svm}} behaves like
\code{\gls{gls}\marg{svm}}, which adds a record for the primary
\code{svm} entry. The default primary-dual dependency means
that this will cause both the primary (\code{svm}) and dual
(\code{dual.svm}) entry to be selected. The \location\ will be
added to the primary entry's \idx{locationlist}, unless overridden
by resource options, such as \resourceopt{combine-dual-locations}.

Once \app{bib2gls} has been run and the \ext{glstex} file
exists, then \code{dual.svm} exists. So \code{\gls{dgls}\marg{svm}} will
again first try \code{dual.svm} (as \code{dual.}\ is the
first in the list of label prefixes). That now exists, so
\code{\gls{dgls}\marg{svm}} now behaves like \code{\gls{gls}\marg{dual.svm}}, which
follows the abbreviation style and hyperlinks to the list
of abbreviations.
Similarly for the index-symbol combination \code{dual.pi} and
\code{pi}.

In the case of \code{\gls{dgls}\marg{duck}}, which doesn't have a
dual, the label \code{dual.duck} never exists, so that's never
selected.  However, when there's no match, such as when the
\ext{glstex} file doesn't exist, the duck entry will be \recorded\
with both the \code{dual.}\ prefix and the empty prefix. This allows
\app{bib2gls} to test which prefix+label combination matches.

\begin{warning}
If you haven't used \resourceopt{combine-dual-locations} an extra
\app{bib2gls}+\LaTeX\ run may be required to correct the location
lists.
\end{warning}

If you change the label prefixes, remember to update the
corresponding \code{\gls{glsxtraddlabelprefix}\margm{label-prefix}}.
If no prefixes have been added to the list (or if the list is
cleared), just an empty prefix is assumed.

Note that \app{bib2gls} v1.8+ provides hooks that identify
the label prefixes in the \ext{glstex} file:
\begin{compactcodebox}
\inlineglsdef{bibglstertiaryprefixlabel}\margm{label-prefix}
\inlineglsdef{bibglsdualprefixlabel}\margm{label-prefix}
\inlineglsdef{bibglsprimaryprefixlabel}\margm{label-prefix}
\end{compactcodebox}
These do nothing by default, but they can be defined before
the resource file is loaded to set up the prefix list. For
example:
\begin{codebox}
\cmd{newcommand}\marg{\gls{bibglsprimaryprefixlabel}}[1]\marg{\comment{}
 \gls{glsxtraddlabelprefix}\marg{\#1}}
\cmd{newcommand}\marg{\gls{bibglsdualprefixlabel}}[1]\marg{\comment{}
 \gls{glsxtrprependlabelprefix}\marg{\#1}}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{entries}}
\end{codebox}
Remember that this will only have an effect once the
\ext{glstex} file has been created. The prefix list will be empty
on the first run (which is treated as a single empty prefix).
If this isn't a suitable fallback, it may be necessary to add one
after all the resource commands:
\begin{codebox}
\cmd{newcommand}\marg{\gls{bibglsprimaryprefixlabel}}[1]\marg{\comment{}
 \gls{glsxtraddlabelprefix}\marg{\#1}}
\cmd{newcommand}\marg{\gls{bibglsdualprefixlabel}}[1]\marg{\comment{}
 \gls{glsxtrprependlabelprefix}\marg{\#1}}
\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{entries},\resourceoptvalm{label-prefix}{idx.}}
\gls{glsxtraddlabelprefix}\marg{idx.}
\end{codebox}
Although this rather defeats the purpose of using the hooks as you
still have to keep track of the fallback prefix.

\subsection{Supplementary Commands}
\label{sec:bib2glssupplementarycommands}

\cmddef{glsdisplaynumberlist}
This command is provided by the base \sty{glossaries} package, but
it requires hooking into the \idx{locationlist} formatting within
the \idx{glossary} to obtain the list. This information is more
easily available with \app{bib2gls}, which stores the formatted
\idx{locationlist} in the \gloskey{location} field, so
\sty{glossaries-extra-bib2gls} redefines this command to use that
field value. Likewise for:
\cmddef{glsentrynumberlist}
which is redefined to simply do:
\begin{compactcodebox}
\gls{glsxtrusefield}\marg{\#1}\marg{\gloskey{location}}
\end{compactcodebox}

\cmddef{IfTeXParserLib}
This command is defined by \sty{glossaries-extra-bib2gls} to expand
to \code{\LaTeX\ code}, but is defined by the \TeX\
parser library used by \app{bib2gls}['s] interpreter to expand to \code{\TeX\
parser lib code}. May be used in the \atentry{preamble} or in field
values to provide \app{bib2gls} with alternative content.

There is a similar command with a reversed order of arguments:
\cmddef{IfNotBibGls}
This command is defined by \sty{glossaries-extra-bib2gls} to expand
to \code{\LaTeX\ code} but is defined specifically by 
\app{bib2gls}['s] interpreter to expand to \meta{bib2gls} code.
If the \TeX\ parser library is used by another application (such as
the conversion tools provided with \app{bib2gls}), the
command will be defined to match \sty{glossaries-extra-bib2gls}.

\cmddef{glsxtrprovidecommand}
This command is intended for use in \atentry{preamble}.
It's simply defined to \gls{providecommand} in
\sty{glossaries-extra-bib2gls} but \app{bib2gls}['s] interpreter
treats it as \gls{renewcommand}. This means that you can
override \app{bib2gls}['s] internal definition of a command
without overriding the command definition in the document
(if it's already defined before the \idx{resourcefile} is input).
For example:
\begin{codebox}
\atentry{preamble}\marg{"\gls{glsxtrprovidecommand}\marg{\cmd{int}}\marg{integral}"}
\end{codebox}
This will force \app{bib2gls} to treat \csfmt{int} as the word
\qt{integral} to assist sorting but if this preamble code is written
to the \ext{glstex} file (as it is by default) then it won't
override the current definition (provided by the kernel or redefined
by a package).

The helper commands in the \idxpl{resourcefile} are defined using
\gls{providecommand}. For many of them, if you want to provide an
alternative definition then you need to define the command before
the \idx{resourcefile} is loaded. There are a few that may be redefined
afterwards but if you use \gls{renewcommand} then you will get an
error on the first \LaTeX\ run when the \ext{glstex} file
doesn't exist. In this case, you may prefer to use:
\cmddef{glsrenewcommand}
This behaves like \gls{renewcommand} but only generates a warning
rather than an error if the command isn't already defined so it
won't interrupt the document build.

\cmddef{GlsXtrIndexCounterLink}
For use with the \opt{indexcounter} package option and the
\resourceopt{save-index-counter} resource option.
This command creates a hyperlink (if supported) to the target obtained from
the \glosfield{indexcounter} field (which will be set in the
\ext{glstex} file, if applicable).

If then \glosfield{indexcounter} field is set for the entry
given by \meta{entry-label}, this command does
\code{\gls{hyperref}\oarg{wrglossary.\meta{value}}\margm{text}}, where
\meta{value} is the value of the \glosfield{indexcounter} field. If the
field isn't set or if \gls{hyperref} hasn't been defined, this just
does \meta{text}. See the \app{bib2gls} manual (v1.4+) for further details. 

The \sty{glossaries-extra-bib2gls} package also provides definitions
of the missing mathematical Greek commands: \inlineglsdef{Alpha},
\inlineglsdef{Beta}, \inlineglsdef{Epsilon}, \inlineglsdef{Zeta},
\inlineglsdef{Eta}, \inlineglsdef{Iota},
\inlineglsdef{Kappa}, \inlineglsdef{Mu}, \inlineglsdef{Nu},
\inlineglsdef{Omicron}, \inlineglsdef{Rho},
\inlineglsdef{Tau}, \inlineglsdef{Chi}, \inlineglsdef{Digamma},
\inlineglsdef{omicron}.
These are all defined with \gls{providecommand}, so they won't override
any definitions provided by any package loaded before
\sty{glossaries-extra}. Since \app{bib2gls}['s] interpreter
recognises these commands, using them instead of explicitly using
the Latin characters with the same shape helps to keep the Greek
symbols together when sorting.
Similarly, if \sty{upgreek} has been loaded, the missing upright
Greek commands are also provided: \inlineglsdef{Upalpha},
\inlineglsdef{Upbeta}, \inlineglsdef{Upepsilon}, \inlineglsdef{Upzeta},
\inlineglsdef{Upeta}, \inlineglsdef{Upiota},
\inlineglsdef{Upkappa}, \inlineglsdef{Upmu}, \inlineglsdef{Upnu},
\inlineglsdef{Upomicron}, \inlineglsdef{Uprho},
\inlineglsdef{Uptau}, \inlineglsdef{Upchi}, \inlineglsdef{upomicron}.

\glsendrange{%
pkg.glossaries-extra-bib2gls,% end of glossaries-extra-bib2gls.sty
app.bib2gls% end of bib2gls chapter
}

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

\begin{important}
The auto-indexing is designed for \app+{makeindex} syntax. If you've
used the \opt{xindy} package option, the automatic escaping of
\app+{xindy} special characters in the \gloskey{sort} field may
result in an incorrect sort value for the \gls{index} command used by
the auto-indexing. Note also that \app{texindy} has a fixed set of
special characters (corresponding to \app{makeindex}['s] defaults)
that can't be customized. You may want to consider using \app{bib2gls} and
its dual entries as an alternative approach.
\end{important}

The \gls{glsxtrpostnamehook} macro, used at the end of
\gls{glossentryname}, \gls{Glossentryname},
\gls{GLOSSentryname} and \gls{GlossEntryName}, checks the
\catattr{indexname} attribute for the category associated with that
entry.  Since \gls{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:
\cmddef{glsxtrdoautoindexname}
This uses the standard \gls{index} command with the sort value
taken from the entry's \gloskey{sort} key and the actual value
set to \code{\gls{glsentryname}\margm{entry-label}}. There are
user-level commands available to change the sort and actual
value used by the automated index.

The actual value is given by:
\cmddef{glsxtrautoindexentry}
where \meta{entry-label} is the entry's label. The default definition
is:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrautoindexentry}}[1]\marg{\gls{string}\gls{glsentryname}\marg{\#1}}
\end{compactcodebox}
Note the use of \gls{string} to prevent \gls{glsentryname} from
being expanded as it's written to the index file.

The sort value is assigned using:
\cmddef{glsxtrautoindexassignsort}
where \meta{entry-label} is the entry label and \meta{cs} is the command
which needs to be set to the sort value. The default definition is:
\begin{compactcodebox}
\cmd{newcommand}*\marg{\gls{glsxtrautoindexassignsort}}[2]\marg{\comment{}
  \gls{glsletentryfield}\marg{\#1}\marg{\#2}\marg{\gloskey{sort}}\comment{}
}
\end{compactcodebox}
After this macro is called, \meta{cs} is then processed to escape
any of \app{makeindex}['s] special characters. Note that this
escaping is only performed on the sort not on the actual value.
The escaping of the sort value is performed by
\cmddef{glsxtrautoindexesc}
You can redefine this to do nothing if you want to omit the
escaping. You may want to consider providing another field to obtain
the appropriate sort value if the one provided in the \gloskey{sort}
field isn't suitable (because it may already have had special
characters escaped or it may be a numeric value in the case of
sort by use or definition).

The command used to perform the actual indexing is:
\cmddef{glsxtrautoindex}
This just does \code{\gls{index}\margm{text}} by default.

\begin{important}
The entry's \gloskey{parent} field isn't referenced in this
automated indexing.
\end{important}

For example, to index the value of the \gloskey{first} key,
instead of the \gloskey{name} key:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrautoindexentry}}[1]\marg{\gls{string}\gls{glsentryfirst}\marg{\#1}}
\end{codebox}
and if the sort value also needs to be set to the \gloskey{long}
field, if present, otherwise the \gloskey{sort} field:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{glsxtrautoindexassignsort}}[2]\marg{\comment{}
  \gls{ifglshaslong}\marg{\#2}\comment{}
  \marg{\gls{glsletentryfield}\marg{\#1}\marg{\#2}\marg{\gloskey{long}}}\comment{}
  \marg{\gls{glsletentryfield}\marg{\#1}\marg{\#2}\marg{\gloskey{sort}}}\comment{}
}
\end{codebox}

If the value of the attribute is \qt{true}, no encap
will be added, otherwise the encap will be the
attribute value. For example:
\begin{codebox}
\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{indexname}}\marg{textbf}
\end{codebox}
will set the encap to \code{textbf} which will display the
relevant page number in bold whereas
\begin{codebox}
\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{dualindex}}\marg{true}
\end{codebox}
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 \gls{index} to use
some thing else.)
\end{important}

By default the \glsopt{format} key won't be used with
the \catattr{dualindex} attribute. You can allow the
\glsopt{format} key to override the attribute value
by using the preamble-only command:
\cmddef{GlsXtrEnableIndexFormatOverride}
If you use this command and \sty{hyperref} has been loaded,
then the \env{theindex} environment will be modified to redefine
\gls{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 \opt{indexonlyfirst} package option) is set. However,
the \catattr{dualindex} attribute will honour the
\glsopt{noindex} key.
\end{important}

The \gls{glsxtrdoautoindexname} command will attempt to escape any of
\app{makeindex}'s special characters, but there may be special cases
where it fails, so take care.  This assumes the default \app{makeindex} actual,
level, quote and encap values (unless any of the commands
\gls{actualchar}, \gls{levelchar}, \gls{quotechar} or
\gls{encapchar} have been defined before \sty{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}

\cmddef{GlsXtrSetActualChar}
Set the actual character to \meta{char}.

\cmddef{GlsXtrSetLevelChar}
Set the level character to \meta{char}.

\cmddef{GlsXtrSetEscChar}
Set the escape (quote) character to \meta{char}.

\cmddef{GlsXtrSetEncapChar}
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
\code{\meta{word}\gls{index}\margm{word}}, but they behave rather
differently. If you want to use \gls{index} then just use
\gls{index}.
\end{important}

The base \sty{glossaries} package advises against defining entries
in the \env{document} environment. As mentioned in
\sectionref{sec:refindexopts}, this ability is disabled by
default with \sty{glossaries-extra} but can be enabled using
the \opt{docdef} package options.

Although this can be problematic, the \sty{glossaries-extra}
package provides a way of defining and using entries within
the \env{document} environment without the tricks used with the
\opt{docdef} 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:
\cmddef{GlsXtrEnableOnTheFly}
When used, this defines the commands described below. The starred
version was provided to help support \idx{utf8} with \sty{inputenc}.
Recent versions of the \LaTeX\ kernel now provide better support.
Both \sty{glossaries} and \sty{glossaries-extra} have been updated
to help integrate the new kernel features, so the unstarred version
may also work with \idx{utf8}.

\begin{warning}
If you use the starred version of \gls{GlsXtrEnableOnTheFly}
don't use any commands in the \meta{label}, even if they expand
to just text.
\end{warning}

\cmddef{glsxtr}
If an entry with the label \meta{entry-label} has already been defined,
this just does \code{\gls{gls}\oargm{gls-options}\margm{entry-label}}. If
\meta{entry-label} hasn't been defined, this will define the entry
using:
\begin{compactcodebox}
\gls{newglossaryentry}\margm{entry-label}\marg{\gloskeyval{name}{entry-label},
 \gloskeyval{category}{\gls{glsxtrcat}},
 \gloskeyval{description}{\gls{nopostdesc}},
 \meta{dfn-options}}
\end{compactcodebox}

\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{entry-label} and placed in the \gloskey{name} key within
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:
\cmddef{GlsXtrWarning}
For example, this warning will be generated on the second instance
of \gls{glsxtr} below:
\begin{codebox}
\gls{glsxtr}\oarg{}\oarg{\gloskey{plural}{geese}}\marg{goose}
\comment{... later}
\gls{glsxtr}\oarg{}\oarg{\gloskey{plural}{geese}}\marg{goose}
\end{codebox}

If you are considering doing something like:
\begin{codebox}
\cmd{newcommand}*\marg{\cmd{goose}}\marg{\gls{glsxtr}\oarg{}\oarg{\gloskeyval{plural}{geese}}\marg{goose}}
\cmd{renewcommand}*\marg{\gls{GlsXtrWarning}}[2]\marg{}
\comment{... later}
\cmd{goose}\cmd{ }some more text here
\end{codebox}
then don't bother. It's simpler and less problematic to just
define the entries in the preamble with \gls{newglossaryentry}
and then use \gls{gls} in the document.

There are also plural and case-changing alternatives to \gls{glsxtr}.
\cmddef{glsxtrpl}
This is like \gls{glsxtr} but uses \gls{glspl} instead of \gls{gls}.
\cmddef{Glsxtr}
This is like \gls{glsxtr} but uses \gls{Gls} instead of \gls{gls}.
\cmddef{Glsxtrpl}
This is like \gls{glsxtr} but uses \gls{Glspl} instead of \gls{gls}.

The category is set to:
\cmddef{glsxtrcat}
This should simply expand to the required category label. 
The default definition is \code{general}.

\begin{important}
The commands \gls{glsxtr}, \gls{glsxtrpl}, \gls{Glsxtr}
and \gls{Glsxtrpl} can't be used after the \idxpl{glossary} have been
displayed (through \gls{printglossary} etc). It's best not to mix
these commands with the standard glossary commands, such
as \gls{gls} or there may be unexpected results.
\end{important}

\chapter{Supplementary Files}
\label{sec:extrafiles}

The \sty{glossaries-extra} package comes with some additional files.
Those listed in \sectionref{sec:exampleglossariesfiles} provide
dummy entries for testing various styles. They should be placed on
\TeX's path.

There are also some sample files listed in \sectionref{sec:samples}.
These should be located in the package documentation directory.

\section{Dummy Files for Testing}
\label{sec:exampleglossariesfiles}

The base \sty{glossaries} package provides files with dummy entries
for testing. The \sty{glossaries-extra} package provides an
additional file with entries.

\filedef{example-glossaries-xr.tex}
This file contains entries that have the \gloskey{see}, \gloskey{seealso} or
\gloskey{alias} keys set.

There are also \ext+{bib} files corresponding to all the available
\ext+{tex} files for use with \app{bib2gls}.

\filedef{example-glossaries-acronym.bib}
Corresponds to \filefmt{example-glossaries-acronym.tex}
\filedef{example-glossaries-acronym-desc.bib}
Corresponds to \filefmt{example-glossaries-acronym-desc.tex}
\filedef{example-glossaries-acronyms-lang.bib}
Corresponds to \filefmt{example-glossaries-acronyms-lang.tex}
\filedef{example-glossaries-brief.bib}
Corresponds to \filefmt{example-glossaries-brief.tex}
\filedef{example-glossaries-childmultipar.bib}
Corresponds to \filefmt{example-glossaries-childmultipar.tex}
\filedef{example-glossaries-childnoname.bib}
Corresponds to \filefmt{example-glossaries-childnoname.tex}
\filedef{example-glossaries-cite.bib}
Corresponds to \filefmt{example-glossaries-cite.tex}
\filedef{example-glossaries-constants.bib}
Corresponds to \filefmt{example-glossaries-constants.tex}
\filedef{example-glossaries-images.bib}
Corresponds to \filefmt{example-glossaries-images.tex}
\filedef{example-glossaries-long.bib}
Corresponds to \filefmt{example-glossaries-long.tex}
\filedef{example-glossaries-longchild.bib}
Corresponds to \filefmt{example-glossaries-longchild.tex}
\filedef{example-glossaries-multipar.bib}
Corresponds to \filefmt{example-glossaries-multipar.tex}
\filedef{example-glossaries-parent.bib}
Corresponds to \filefmt{example-glossaries-parent.tex}
\filedef{example-glossaries-symbolnames.bib}
Corresponds to \filefmt{example-glossaries-symbolnames.tex}
\filedef{example-glossaries-symbols.bib}
Corresponds to \filefmt{example-glossaries-symbols.tex}
\filedef{example-glossaries-url.bib}
Corresponds to \filefmt{example-glossaries-url.tex}
\filedef{example-glossaries-user.bib}
Corresponds to \filefmt{example-glossaries-user.tex}
\filedef{example-glossaries-utf8.bib}
Corresponds to \filefmt{example-glossaries-utf8.tex}
\filedef{example-glossaries-xr.bib}
Corresponds to \filefmt{example-glossaries-xr.tex}

\section{Sample Files}
\label{sec:samples}

The \sty{glossaries-extra} package comes with some sample files 
that are listed below. There are also sample files provided with the
\sty{glossaries} package and with \app{bib2gls}. See also
the \gallery{Dickimaw Books Gallery}.

\filedef{sample.tex}
Simple sample file that uses one of the dummy
files provided by the \sty{glossaries} package for testing.
\begin{terminal}
pdflatex sample
makeglossaries sample
pdflatex sample
pdflatex sample
\end{terminal}

\filedef{sample-abbr-styles.tex}
\begin{terminal}
pdflatex sample-abbr-styles
makeglossaries sample-abbr-styles
pdflatex sample-abbr-styles
pdflatex sample-abbr-styles
\end{terminal}
Demonstrates all predefined abbreviation styles.

\filedef{sample-mixture.tex}
\begin{terminal}
pdflatex sample-mixture
makeglossaries sample-mixture
pdflatex sample-mixture
makeglossaries sample-mixture
pdflatex sample-mixture
\end{terminal}
General entries, acronyms and initialisms all treated differently.

\filedef{sample-name-font.tex}
\begin{terminal}
pdflatex sample-name-font
makeglossaries sample-name-font
pdflatex sample-name-font
pdflatex sample-name-font
\end{terminal}
Categories and attributes are used to
customize the way different entries appear.

\filedef{sample-abbrv.tex}
\begin{terminal}
pdflatex sample-abbrv
makeglossaries sample-abbrv
pdflatex sample-abbrv
pdflatex sample-abbrv
\end{terminal}
General abbreviations.

\filedef{sample-acronym.tex}
\begin{terminal}
pdflatex sample-acronym
makeglossaries sample-acronym
pdflatex sample-acronym
\end{terminal}
Acronyms aren't initialisms and don't expand on \idx{firstuse}.

\filedef{sample-acronym-desc.tex}
\begin{terminal}
pdflatex sample-acronym-desc
makeglossaries sample-acronym-desc
pdflatex sample-acronym-desc
makeglossaries sample-acronym-desc
pdflatex sample-acronym-desc
\end{terminal}
Acronyms that have a separate long form and description.

\filedef{sample-crossref.tex}
\begin{terminal}
pdflatex sample-crossref
makeglossaries sample-crossref
pdflatex sample-crossref
\end{terminal}
Unused entries that have been cross-referenced automatically are
added at the end of the document.

\filedef{sample-indexhook.tex}
\begin{terminal}
pdflatex sample-indexhook
makeglossaries sample-indexhook
pdflatex sample-indexhook
\end{terminal}
Use the index hook to track which entries have been indexed (and
therefore find out which ones haven't been indexed).

\filedef{sample-footnote.tex}
\begin{terminal}
pdflatex sample-footnote
makeglossaries sample-footnote
pdflatex sample-footnote
\end{terminal}
Footnote abbreviation style that moves
the footnote marker outside of the hyperlink generated by \gls{gls}
and moves it after certain punctuation characters for neatness.

\filedef{sample-undef.tex}
\begin{terminal}
pdflatex sample-undef
makeglossaries sample-undef
pdflatex sample-undef
pdflatex sample-undef
\end{terminal}
Warn on undefined entries instead of
generating an error.

\filedef{sample-mixed-abbrv-styles.tex}
\begin{terminal}
pdflatex sample-mixed-abbrv-styles
makeglossaries sample-mixed-abbrv-styles
pdflatex sample-mixed-abbrv-styles
\end{terminal}
Different abbreviation styles for different entries.

\filedef{sample-initialisms.tex}
\begin{terminal}
pdflatex sample-initialisms
makeglossaries sample-initialisms
pdflatex sample-initialisms
\end{terminal}
Automatically insert dots into initialisms.

\filedef{sample-postdot.tex}
\begin{terminal}
pdflatex sample-postdot
makeglossaries sample-postdot
pdflatex sample-postdot
\end{terminal}
Another initialisms example.

\filedef{sample-postlink.tex}
\begin{terminal}
pdflatex sample-postlink
makeglossaries sample-postlink
pdflatex sample-postlink
\end{terminal}
Automatically inserting text after
the \idx{linktext} produced by commands like \gls{gls} (outside
of hyperlink, if present).

\filedef{sample-header.tex}
\begin{terminal}
pdflatex sample-header
makeglossaries sample-header
pdflatex sample-header
pdflatex sample-header
\end{terminal}
Using entries in section\slash chapter headings.

\filedef{sample-autoindex.tex}
\begin{terminal}
pdflatex sample-autoindex
makeglossaries sample-autoindex
pdflatex sample-autoindex
makeindex sample-autoindex
pdflatex sample-autoindex
\end{terminal}
Using the \catattr{dualindex} and \catattr{indexname} attributes to
automatically add glossary entries to the index (in addition to the
glossary \idx{locationlist}).

\filedef{sample-autoindex-hyp.tex}
\begin{terminal}
pdflatex sample-autoindex-hyp
makeglossaries sample-autoindex-hyp
pdflatex sample-autoindex-hyp
makeindex sample-autoindex-hyp
pdflatex sample-autoindex-hyp
\end{terminal}
As previous but uses \sty{hyperref}.

\filedef{sample-nested.tex}
\begin{terminal}
pdflatex sample-nested
makeglossaries sample-nested
pdflatex sample-nested
\end{terminal}
Using \gls{gls} within the value of the \gloskey{name} key.

\filedef{sample-entrycount.tex}
\begin{terminal}
pdflatex sample-entrycount
pdflatex sample-entrycount
makeglossaries sample-entrycount
pdflatex sample-entrycount
\end{terminal}
Enable entry-use counting (only index if used more than $n$ times,
see \sectionref{sec:entrycount}).

\filedef{sample-unitentrycount.tex}
\begin{terminal}
pdflatex sample-unitentrycount
pdflatex sample-unitentrycount
makeglossaries sample-unitentrycount
pdflatex sample-unitentrycount
\end{terminal}
Enable use of per-unit entry-use counting (\sectionref{sec:entrycount}).

\filedef{sample-onelink.tex}
\begin{terminal}
pdflatex sample-onelink
makeglossaries sample-onelink
pdflatex sample-onelink
\end{terminal}
Using the per-unit entry counting (\sectionref{sec:entrycount}) to
only have one hyperlink per entry per page.

\filedef{sample-linkcount.tex}
\begin{terminal}
pdflatex sample-linkcount
makeglossaries sample-linkcount
pdflatex sample-linkcount
\end{terminal}
Using link counting (\sectionref{sec:linkcount})
to only have one hyperlink per entry.

\filedef{sample-pages.tex}
\begin{terminal}
pdflatex sample-pages
makeglossaries sample-pages
pdflatex sample-pages
pdflatex sample-pages
\end{terminal}
Insert \qt{page} or \qt{pages} before the \idx{locationlist}.

\filedef{sample-altmodifier.tex}
\begin{terminal}
pdflatex sample-altmodifier
makeglossaries sample-altmodifier
pdflatex sample-altmodifier
pdflatex sample-altmodifier
\end{terminal}
Set the default options for commands like \gls{gls} and add an
alternative modifier.

\filedef{sample-mixedsort.tex}
\begin{terminal}
pdflatex sample-mixedsort
pdflatex sample-mixedsort
\end{terminal}
Uses the optional argument of \gls{makeglossaries} to allow a
mixture of \gls{printglossary} and \gls{printnoidxglossary}.

\filedef{sample-external.tex}
\begin{terminal}
pdflatex sample-external
makeglossaries sample-external
pdflatex sample-external
\end{terminal}
Uses the \catattr{targeturl} attribute to allow for entries that
should link to an external URL rather than to an internal glossary.

\filedef{sample-fmt.tex}
\begin{terminal}
pdflatex sample-fmt
makeglossaries sample-fmt
pdflatex sample-fmt
\end{terminal}
Provides text-block commands associated
with entries in order to use \gls{glsxtrfmt}.

\filedef{sample-alias.tex}
\begin{terminal}
pdflatex sample-alias
makeglossaries sample-alias
pdflatex sample-alias
\end{terminal}
Uses the \gloskey{alias} key (see \sectionref{sec:alias}).

\filedef{sample-alttree.tex}
\begin{terminal}
pdflatex sample-alttree
makeglossaries sample-alttree
pdflatex sample-alttree
\end{terminal}
Uses the \sty{glossaries-extra-stylemods} package with the
\glostyle{alttree} style (see \sectionref{sec:stylemods}).

\filedef{sample-alttree-sym.tex}
\begin{terminal}
pdflatex sample-alttree-sym
makeglossaries sample-alttree-sym
pdflatex sample-alttree-sym
\end{terminal}
Another \glostyle{alttree} example that measures the symbol widths.

\filedef{sample-alttree-marginpar.tex}
\begin{terminal}
pdflatex sample-alttree-marginpar
makeglossaries sample-alttree-marginpar
pdflatex sample-alttree-marginpar
\end{terminal}
Another \glostyle{alttree} example
that puts the \idx{locationlist} in the margin.

\filedef{sample-onthefly.tex}
\begin{terminal}
pdflatex sample-onthefly
makeglossaries sample-onthefly
pdflatex sample-onthefly
\end{terminal}
Using on-the-fly commands. Terms with accents must have the
\gloskey{name} key explicitly set.

\filedef{sample-onthefly-xetex.tex}
\begin{terminal}
xelatex sample-onthefly-xetex
makeglossaries sample-onthefly-xetex
xelatex sample-onthefly-xetex
\end{terminal}
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.

\filedef{sample-onthefly-utf8.tex}
\begin{terminal}
pdflatex sample-onthefly-utf8
makeglossaries sample-onthefly-utf8
pdflatex sample-onthefly-utf8
\end{terminal}
Tries to emulate the previous
sample file for use with \LaTeX\ through the starred version
of \gls{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.

\filedef{sample-accsupp.tex}
\begin{terminal}
pdflatex sample-accsupp
makeglossaries sample-accsupp
pdflatex sample-accsupp
\end{terminal}
Integrate \sty{glossaries-accsupp}.

\filedef{sample-prefix.tex}
\begin{terminal}
pdflatex sample-prefix
makeglossaries sample-prefix
pdflatex sample-prefix
\end{terminal}
Integrate \sty{glossaries-prefix}.

\filedef{sample-suppl-main.tex}
\begin{terminal}
pdflatex sample-suppl
pdflatex sample-suppl-main
makeglossaries sample-suppl-main
pdflatex sample-suppl-main
\end{terminal}
Uses \glsopt{thevalue} to reference a location in the supplementary
file \inlineglsdef{file.sample-suppl.tex}.

\filedef{sample-suppl-main-hyp.tex}
\begin{terminal}
pdflatex sample-suppl-hyp
makeglossaries sample-suppl-hyp
pdflatex sample-suppl-hyp
pdflatex sample-suppl-main-hyp
makeglossaries sample-suppl-main-hyp
pdflatex sample-suppl-main-hyp
\end{terminal}
A more complicated version to the
above that uses the \sty{hyperref} package to reference a location
in the supplementary file \inlineglsdef{file.sample-suppl-hyp.tex}.


\chapter{Multi-Lingual Support}
\label{sec:lang}

There's only one command provided by \sty{glossaries-extra}
that you're likely to want to change in your document and that's
\gls{abbreviationsname} if you use
the \opt{abbreviations} package option to automatically
create the glossary labelled \code{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 \gls{acronymname} (provided by
\sty{glossaries}), which is language-sensitive.

You can redefine \gls{abbreviationsname} in the usual way. For example:
\begin{codebox}
\cmd{renewcommand}*\marg{\gls{abbreviationsname}}\marg{List of Abbreviations}
\end{codebox}
Or using \sty{babel} or \sty{polyglossia} captions hook:
\begin{codebox}
\cmd{appto}\cmd{captionsenglish}\marg{\comment{}
 \cmd{renewcommand}*\marg{\gls{abbreviationsname}}\marg{List of Abbreviations}\comment{}
}
\end{codebox}

Alternatively you can use the \printglossopt{title}
key when you print the list of abbreviations. For example:
\begin{codebox}
\gls{printabbreviations}\oarg{\printglossoptvalm{title}{List of Abbreviations}}
\end{codebox}
or
\begin{codebox}
\gls{printabbreviations}\oarg{\printglossopt{type}{abbreviations},\printglossoptvalm{title}{List of Abbreviations}}
\end{codebox}

The other fixed text commands are the diagnostic messages, which
shouldn't appear in the final draft of your document.

The \sty{glossaries-extra} package has the facility to load
language modules (whose filename is in the form
\metafilefmt{glossariesxtr\dhyphen}{language}{.\ext+{ldf}}) if they exist,
but won't warn if they don't.  If \sty{glossaries-extra-bib2gls} is
loaded via the \opt{record} package option then the check for
language resource files will additionally search for an associated
language script file given by
\metafilefmt{glossariesxtr-}{script}{.\ext{ldf}} where
\meta{script} is the four letter script identifier, such as
\code{Latn}, associated with the given dialect. There's no warning if the
associated file isn't found. The script file is loaded after the
dialect file.

If you want to write your own language module, you just need to
create a file called
\metafilefmt{glossariesxtr\dhyphen}{lang}{.\ext{ldf}}, where \meta{lang}
identifies the language or dialect (see the \sty{tracklang}
package).  For example, \filefmt{glossariesxtr-french.ldf}.
The file should start with:
\cmddef{ProvidesGlossariesExtraLang}
The simplest code for this file is:
\begin{codebox}
\gls{ProvidesGlossariesExtraLang}\marg{french}\oarg{2015/12/09 v1.0}
\codepar
\cmd{newcommand}*\marg{\cmd{glossariesxtrcaptionsfrench}}\marg{\comment{}
 \cmd{def}\gls{abbreviationsname}\marg{Abr\cmd{'}eviations}\comment{}
}
\cmd{glossariesxtrcaptionsfrench}
\codepar
\cmd{ifcsdef}\marg{captions\gls+{CurrentTrackedDialect}}
\marg{\comment{}
  \cmd{csappto}\marg{captions\gls{CurrentTrackedDialect}}\comment{}
  \marg{\comment{}
    \cmd{glossariesxtrcaptionsfrench}
  }\comment{}
}\comment{}
\marg{\comment{}
  \cmd{ifcsdef}\marg{captions\gls+{CurrentTrackedLanguage}}
  \marg{\comment{}
    \cmd{csappto}\marg{captions\gls{CurrentTrackedLanguage}}\comment{}
    \marg{\comment{}
      \cmd{glossariesxtrcaptionsfrench}
    }\comment{}
  }\comment{}
  \marg{}\comment{}
}
\end{codebox}

You can adapt this for other languages by replacing
all instances of the language identifier \code{french} and
the translated text \code{Abr\cmd{'}eviations} as appropriate.
You can also use the \ext+{ldf} file to provide rule
blocks for a particular language for use with \app{bib2gls}['s] custom
sort rule. See \sectionref{sec:bib2glssty} for further details.

\begin{information}
For further information on \sty{tracklang}, see the \sty{tracklang}
documentation or \dickimawhref{latex/tracklang/}{Localisation with
\filefmt{tracklang.tex}}.
\end{information}

This \ext{ldf} file then needs to be put somewhere on \TeX's
path so that it can be found by \sty{glossaries-extra}.
You might also want to consider uploading it to \ctanref{}{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:
\cmddef{GlsXtrNoGlsWarningHead}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningHead{\meta{glossary-label}}{\meta{file}}
\end{quote}

\cmddef{GlsXtrNoGlsWarningEmptyStart}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningEmptyStart
\end{quote}

\cmddef{GlsXtrNoGlsWarningEmptyMain}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningEmptyMain
\end{quote}

\cmddef{GlsXtrNoGlsWarningEmptyNotMain}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningEmptyNotMain{\meta{glossary-label}}
\end{quote}

\cmddef{GlsXtrNoGlsWarningCheckFile}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningCheckFile{\meta{file}}
\end{quote}

\cmddef{GlsXtrNoGlsWarningMisMatch}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningMisMatch
\end{quote}

\cmddef{GlsXtrNoGlsWarningNoOut}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningNoOut{\meta{file}}
\end{quote}

\cmddef{GlsXtrNoGlsWarningTail}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningTail
\end{quote}

\cmddef{GlsXtrNoGlsWarningBuildInfo}
This is advice on how to generate the glossary files.

\cmddef{GlsXtrNoGlsWarningAutoMake}
This is the message produced when the \opt{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 (\filefmt{glossaries-extra-code.pdf})
for further details.

\part{Summaries and Index}
\backmatter
\printterms[title={Terms}]
\printcommonoptions[label=sec:gloskeys]{idx.gloskey}
\printcommonoptions{idx.glosfield}
\printcommonoptions{idx.glsopt}
\printcommonoptions{idx.mglsopt}
\printcommonoptions{idx.printglossopt}
\printcommonoptions{idx.abbrvstyle}
\printcommonoptions{idx.glossarystyle}
\printsummary

\printuserguideindex
\end{document}
