diff options
author | Karl Berry <karl@freefriends.org> | 2014-08-03 16:53:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-08-03 16:53:12 +0000 |
commit | 685b5dc94ea5ebab0435f4f24c7a77183aac27b5 (patch) | |
tree | 199770cb370c166121fec455f7b043fcec885678 /Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty | |
parent | 2daa6a84a95d9070b144a984ef1ff44d66a29367 (diff) |
glossaries
git-svn-id: svn://tug.org/texlive/trunk@34809 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty | 993 |
1 files changed, 419 insertions, 574 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty index 4f1d36e2e91..b4f509a75f0 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, glossaries-prefix.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-inline.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-mcols.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-compatible-307.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample-entryfmt.tex, sample-FnDesc.tex, sample-index.tex, sample-inline.tex, sample-langdict.tex, sample-mfirstuc.tex, sample-newkeys.tex, sample-noidxapp-utf8.tex, sample-noidxapp.tex, sample-nomathhyper.tex, sample-numberlist.tex, sample-prefix.tex, sample-si.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleCustomAcr.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleFnAcrDesc.tex, sampleNtn.tex, samplePeople.tex, sampleSec.tex, sampleSort.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl, mfirstuc.perl. +%% This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, glossaries-prefix.sty, mfirstuc.sty, mfirstuc-english.sty, glossary-hypernav.sty, glossary-inline.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-mcols.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-compatible-307.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, glossary-lipsum-examples.tex, example-glossaries-acronym-desc.tex, example-glossaries-acronym.tex, example-glossaries-acronyms-lang.tex, example-glossaries-brief.tex, example-glossaries-childnoname.tex, example-glossaries-cite.tex, example-glossaries-images.tex, example-glossaries-long.tex, example-glossaries-multipar.tex, example-glossaries-parent.tex, example-glossaries-symbols.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample-entryfmt.tex, sample-FnDesc.tex, sample-ignored.tex, sample-index.tex, sample-inline.tex, sample-langdict.tex, sample-mfirstuc.tex, sample-newkeys.tex, sample-noidxapp-utf8.tex, sample-noidxapp.tex, sample-nomathhyper.tex, sample-numberlist.tex, sample-prefix.tex, sample-si.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleCustomAcr.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleFnAcrDesc.tex, sampleNtn.tex, samplePeople.tex, sampleSec.tex, sampleSort.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl, mfirstuc.perl. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2014/04/04 v4.07 (NLCT)] +\ProvidesPackage{glossaries}[2014/07/30 v4.08 (NLCT)] \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} @@ -624,6 +624,23 @@ name=true]{% \glsxindytrue \gls@xindy@glsnumbersfalse } +\define@boolkey{glossaries.sty}[gls]{automake}[true]{% + \ifglsautomake + \renewcommand*{\@gls@doautomake}{% + \PackageError{glossaries}{You must use + \string\makeglossaries\space with automake=true} + {% + Either remove the automake=true setting or + add \string\makeglossaries\space to your document preamble.% + }% + }% + \else + \renewcommand*{\@gls@doautomake}{}% + \fi +} +\glsautomakefalse +\newcommand*{\@gls@doautomake}{} +\AtEndDocument{\@gls@doautomake} \define@boolkey{glossaries.sty}[gls]{savewrites}[true]{% \ifglssavewrites \renewcommand*{\glswritefiles}{\@glswritefiles}% @@ -856,19 +873,21 @@ name=true]{% } \newcommand*{\@no@post@desc}{\nopostdesc} \newcommand{\glspar}{\par} -\ifglsxindy - \newcommand{\setStyleFile}[1]{% - \renewcommand{\istfilename}{#1.xdy}} -\else - \newcommand{\setStyleFile}[1]{% - \renewcommand{\istfilename}{#1.ist}} -\fi +\newcommand{\setStyleFile}[1]{% + \renewcommand*{\gls@istfilebase}{#1}% + \ifglsxindy + \def\istfilename{\gls@istfilebase.xdy} + \else + \def\istfilename{\gls@istfilebase.ist} + \fi +} \@onlypremakeg\setStyleFile \ifglsxindy - \def\istfilename{\jobname.xdy} + \def\istfilename{\gls@istfilebase.xdy} \else - \def\istfilename{\jobname.ist} + \def\istfilename{\gls@istfilebase.ist} \fi +\newcommand*{\gls@istfilebase}{\jobname} \newcommand*{\@istfilename}[1]{} \newcommand*{\glscompositor}{.} \newcommand*{\glsSetCompositor}[1]{% @@ -1317,6 +1336,10 @@ name=true]{% \newcommand*{\forallglossaries}[3][\@glo@types]{% \@for#2:=#1\do{\ifx#2\@empty\else#3\fi}% } + +\newcommand*{\forallacronyms}[2]{% + \@for#1:=\@glsacronymlists\do{\ifx#1\@empty\else#2\fi}% +} \newcommand*{\forglsentries}[3][\glsdefaulttype]{% \edef\@@glo@list{\csname glolist@#1\endcsname}% \@for#2:=\@@glo@list\do @@ -1466,7 +1489,24 @@ name=true]{% \csgdef{gls@#1@entryfmt}{#2}% } \newcommand*{\gls@doentryfmt}[1]{\csuse{gls@#1@entryfmt}} -\newcommand*{\newglossary}[5][glg]{% +\newcommand*{\@gls@forbidtexext}[1]{% + \ifboolexpr{test {\ifdefstring{#1}{tex}} + or test {\ifdefstring{#1}{TEX}}} + {% + \def#1{nottex}% + \PackageError{glossaries}% + {Forbidden `.tex' extension replaced with `.nottex'}% + {I'm sorry, I can't allow you to do something so reckless.\MessageBreak + Don't use `.tex' as an extension for a temporary file.}% + }% + {% + }% +} +\newcommand*{\newglossary}{\@ifstar\s@newglossary\ns@newglossary} +\newcommand*{\s@newglossary}[2]{% + \ns@newglossary[#1-glg]{#1}{#1-gls}{#1-glo}{#2}% +} +\newcommand*{\ns@newglossary}[5][glg]{% \ifglossaryexists{#2}% {% \PackageError{glossaries}{Glossary type `#2' already exists}{% @@ -1480,8 +1520,12 @@ name=true]{% }{}% \toks@{#2}\edef\@glo@types{\@glo@types\the\toks@,}% \expandafter\gdef\csname glolist@#2\endcsname{,}% - \expandafter\def\csname @glotype@#2@in\endcsname{#3}% - \expandafter\def\csname @glotype@#2@out\endcsname{#4}% + \expandafter\edef\csname @glotype@#2@log\endcsname{#1}% + \expandafter\edef\csname @glotype@#2@in\endcsname{#3}% + \expandafter\edef\csname @glotype@#2@out\endcsname{#4}% + \expandafter\@gls@forbidtexext\csname @glotype@#2@log\endcsname + \expandafter\@gls@forbidtexext\csname @glotype@#2@in\endcsname + \expandafter\@gls@forbidtexext\csname @glotype@#2@out\endcsname \expandafter\def\csname @glotype@#2@title\endcsname{#5}% \@gls@provide@newglossary \protected@write\@auxout{}{\string\@newglossary{#2}{#1}{#3}{#4}}% @@ -1514,6 +1558,34 @@ name=true]{% \@gls@do@symbolsdef \@gls@do@numbersdef \@gls@do@indexdef +\newcommand*{\newignoredglossary}[1]{% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \eappto\@gls@nohyperlist{,#1}% + }% +} +\newcommand*{\@ignored@glossaries}{} +\newcommand*{\ifignoredglossary}[3]{% + \edef\@gls@igtype{#1}% + \expandafter\DTLifinlist\expandafter + {\@gls@igtype}{\@ignored@glossaries}{#2}{#3}% +} \define@key{glossentry}{name}{% \def\@glo@name{#1}% } @@ -1848,11 +1920,7 @@ name=true]{% {}% }% {% - \newrobustcmd*{#5}{\@ifstar{\csuse{@sgls@user@#1}}{\csuse{@gls@user@#1}}}% - \expandafter\newcommand\expandafter*\expandafter - {\csname @sgls@user@#1\endcsname}[1][]{% - \csuse{@gls@user@#1}[hyper=false,##1]% - }% + \newrobustcmd*{#5}{\@gls@hyp@opt{\csuse{@gls@user@#1}}}% \expandafter\newcommand\expandafter*\expandafter {\csname @gls@user@#1\endcsname}[2][]{% \new@ifnextchar[% @@ -1870,11 +1938,7 @@ name=true]{% {}% }% {% - \newrobustcmd*{#6}{\@ifstar{\csuse{@sGls@user@#1}}{\csuse{@Gls@user@#1}}}% - \expandafter\newcommand\expandafter*\expandafter - {\csname @sGls@user@#1\endcsname}[1][]{% - \csuse{@Gls@user@#1}[hyper=false,##1]% - }% + \newrobustcmd*{#6}{\@gls@hyp@opt{\csuse{@Gls@user@#1}}}% \expandafter\newcommand\expandafter*\expandafter {\csname @Gls@user@#1\endcsname}[2][]{% \new@ifnextchar[% @@ -1892,11 +1956,7 @@ name=true]{% {}% }% {% - \newrobustcmd*{#7}{\@ifstar{\csuse{@sGLS@user@#1}}{\csuse{@GLS@user@#1}}}% - \expandafter\newcommand\expandafter*\expandafter - {\csname @sGLS@user@#1\endcsname}[1][]{% - \csuse{@GLS@user@#1}[hyper=false,##1]% - }% + \newrobustcmd*{#7}{\@gls@hyp@opt{\csuse{@GLS@user@#1}}}% \expandafter\newcommand\expandafter*\expandafter {\csname @GLS@user@#1\endcsname}[2][]{% \new@ifnextchar[% @@ -1981,12 +2041,20 @@ name=true]{% \edef\@glo@type{\glsentrytype{\@glo@label}}% \ifcsundef{glolist@\@glo@type}% {% - \PackageError{glossaries}% - {Glossary type `\@glo@type' has not been defined}% - {You need to define a new glossary type, before making entries - in it}% + \PackageError{glossaries}% + {Glossary type `\@glo@type' has not been defined}% + {You need to define a new glossary type, before making entries + in it}% }% {% + \ifignoredglossary\@glo@type + {% + \ifx\@glo@desc\@glsnodesc + \let\@glo@desc\@empty + \fi + }% + {% + }% \protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% \expandafter\xdef\csname glolist@\@glo@type\endcsname{% \@glolist@{\@glo@label},}% @@ -2118,7 +2186,13 @@ name=true]{% \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{\@glo@label}}% \@do@glssee }% - \do@glo@storeentry{\@glo@label}% + \ifignoredglossary\@glo@type + {% + \csdef{glo@\@glo@label @index}{}% + } + {% + \do@glo@storeentry{\@glo@label}% + }% \@newglossaryentryposthook } \newcommand*{\@newglossaryentryprehook}{} @@ -2625,14 +2699,33 @@ name=true]{% \define@key{glslink}{format}{% \def\@glsnumberformat{#1}} \define@boolkey{glslink}{hyper}[true]{} +\ifdef{\hyperlink}{\KV@glslink@hypertrue}{\KV@glslink@hyperfalse} \define@boolkey{glslink}{local}[true]{} +\newcommand*{\glslinkvar}[3]{#1} +\newcommand*{\glsifhyper}[2]{% + \glslinkvar{#1}{#2}{#1}% + \GlossariesWarning{\string\glsifhyper\space is deprecated. Did + you mean \string\glsifhyperon\space or \string\glslinkvar?}% +} +\newcommand*{\@gls@hyp@opt}[1]{% + \let\glslinkvar\@firstofthree + \let\@gls@hyp@opt@cs#1\relax + \@ifstar{\s@gls@hyp@opt}% + {\@ifnextchar+{\@firstoftwo{\p@gls@hyp@opt}}{#1}}% +} +\newcommand*{\s@gls@hyp@opt}[1][]{% + \let\glslinkvar\@secondofthree + \@gls@hyp@opt@cs[hyper=false,#1]} +\newcommand*{\p@gls@hyp@opt}[1][]{% + \let\glslinkvar\@thirdofthree + \@gls@hyp@opt@cs[hyper=true,#1]} \newrobustcmd*{\glslink}{% - \@ifstar\@sgls@link\@gls@@link + \@gls@hyp@opt\@gls@@link } -\newcommand*{\@sgls@link}[1][]{\@gls@@link[hyper=false,#1]} \newcommand*{\@gls@@link}[3][]{% \ifglsentryexists{#2}% {% + \let\do@gls@link@checkfirsthyper\relax \@gls@link[#1]{#2}{#3}% }{% \PackageError{glossaries}{Glossary entry `#2' has not been @@ -2641,6 +2734,25 @@ name=true]{% \glstextformat{#3}% }% } +\newcommand*{\@gls@link@checkfirsthyper}{% + \ifglsused{\glslabel}% + {% + }% + {% + \gls@checkisacronymlist\glstype + \ifglshyperfirst + \if@glsisacronymlist + \ifglsacrfootnote + \KV@glslink@hyperfalse + \fi + \fi + \else + \KV@glslink@hyperfalse + \fi + }% + \glslinkcheckfirsthyperhook +} +\newcommand*{\glslinkcheckfirsthyperhook}{} \def\@gls@link[#1]#2#3{% \leavevmode \edef\glslabel{\glsdetoklabel{#2}}% @@ -2648,16 +2760,22 @@ name=true]{% \let\@gls@link@label\glslabel \def\@glsnumberformat{glsnumberformat}% \edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}% - \edef\gls@type{\csname glo@\glslabel @type\endcsname}% + \edef\glstype{\csname glo@\glslabel @type\endcsname}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper \expandafter\DTLifinlist\expandafter - {\gls@type}{\@gls@nohyperlist}% + {\glstype}{\@gls@nohyperlist}% {% \KV@glslink@hyperfalse }% {% - \KV@glslink@hypertrue }% + \do@gls@link@checkfirsthyper \setkeys{glslink}{#1}% + \ifKV@glslink@hyper + \let\glsifhyperon\@firstoftwo + \else + \let\glsifhyperon\@secondoftwo + \fi \@gls@saveentrycounter \@gls@setsort{\glslabel}% \@do@wrglossary{#2}% @@ -2666,6 +2784,7 @@ name=true]{% \else \glstextformat{#3}% \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper } \newcommand*{\glolinkprefix}{glo:} \def\glsentrycounter{\glscounter}% @@ -3041,74 +3160,52 @@ name=true]{% }% } \def@gls@xdycheckbackslash +\newlength\gls@tmplen +\newcommand*{\glsdohypertarget}[2]{% + \settoheight{\gls@tmplen}{#2}% + \raisebox{\gls@tmplen}{\hypertarget{#1}{}}#2% +} +\newcommand*{\glsdohyperlink}[2]{\hyperlink{#1}{#2}} \ifcsundef{hyperlink}% {% - \gdef\@glslink#1#2{#2}% + \let\@glslink\@secondoftwo }% {% - \gdef\@glslink#1#2{\hyperlink{#1}{#2}}% + \let\@glslink\glsdohyperlink } -\newlength\gls@tmplen \ifcsundef{hypertarget}% +\ifcsundef{hypertarget}% {% - \gdef\@glstarget#1#2{#2}% + \let\@glstarget\@secondoftwo }% {% - \gdef\@glstarget#1#2{% - \settoheight{\gls@tmplen}{#2}% - \raisebox{\gls@tmplen}{\hypertarget{#1}{}}#2% - }% + \let\@glstarget\glsdohypertarget } \newcommand{\glsdisablehyper}{% - \renewcommand*\@glslink[2]{##2}% - \renewcommand*\@glstarget[2]{##2}% + \KV@glslink@hyperfalse + \let\@glslink\@secondoftwo + \let\@glstarget\@secondoftwo } \newcommand{\glsenablehyper}{% -\renewcommand*\@glslink[2]{\hyperlink{##1}{##2}}% -\renewcommand*\@glstarget[2]{% - \settoheight{\gls@tmplen}{##2}% - \raisebox{\gls@tmplen}{\hypertarget{##1}{}}##2}} + \KV@glslink@hypertrue + \let\@glslink\glsdohyperlink + \let\@glstarget\glsdohypertarget +} \providecommand{\@firstofthree}[3]{#1} \providecommand{\@secondofthree}[3]{#2} -\providecommand{\@thirdofthree}[3]{#3} -\newrobustcmd*{\gls}{\@ifstar\@sgls\@gls} -\newcommand*{\@sgls}[1][]{\@gls[hyper=false,#1]} +\newrobustcmd*{\gls}{\@gls@hyp@opt\@gls} \newcommand*{\@gls}[2][]{% \new@ifnextchar[{\@gls@{#1}{#2}}{\@gls@{#1}{#2}[]}% } \def\@gls@#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glscustomtext\@empty \def\glsinsert{#3}% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% - \ifglsused{#2}% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - {% - \gls@checkisacronymlist\@glo@type - \ifthenelse - {\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) - \OR \NOT\boolean{glshyperfirst} - }% - {% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - }% + \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\@glo@text}% \ifKV@glslink@local \glslocalunset{#2}% \else @@ -3116,46 +3213,20 @@ name=true]{% \fi }% } -\newrobustcmd*{\Gls}{\@ifstar\@sGls\@Gls} -\newcommand*{\@sGls}[1][]{\@Gls[hyper=false,#1]} +\newrobustcmd*{\Gls}{\@gls@hyp@opt\@Gls} \newcommand*{\@Gls}[2][]{% \new@ifnextchar[{\@Gls@{#1}{#2}}{\@Gls@{#1}{#2}[]}% } \def\@Gls@#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree \let\glscustomtext\@empty \def\glsinsert{#3}% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% - \ifglsused{#2}% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - {% - \gls@checkisacronymlist\@glo@type - \ifthenelse - {% - \(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) - \OR \NOT\boolean{glshyperfirst}% - }% - {% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - }% + \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\@glo@text}% \ifKV@glslink@local \glslocalunset{#2}% \else @@ -3163,44 +3234,20 @@ name=true]{% \fi }% } -\newrobustcmd*{\GLS}{\@ifstar\@sGLS\@GLS} -\newcommand*{\@sGLS}[1][]{\@GLS[hyper=false,#1]} +\newrobustcmd*{\GLS}{\@gls@hyp@opt\@GLS} \newcommand*{\@GLS}[2][]{% \new@ifnextchar[{\@GLS@{#1}{#2}}{\@GLS@{#1}{#2}[]}% } \def\@GLS@#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree \let\glscustomtext\@empty \def\glsinsert{#3}% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% - \ifglsused{#2}% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - {% - \gls@checkisacronymlist\@glo@type - \ifthenelse - {% - \(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) - \OR \NOT\boolean{glshyperfirst}}{% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - }% + \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\@glo@text}% \ifKV@glslink@local \glslocalunset{#2}% \else @@ -3208,46 +3255,20 @@ name=true]{% \fi }% } -\newrobustcmd*{\glspl}{\@ifstar\@sglspl\@glspl} -\newcommand*{\@sglspl}[1][]{\@glspl[hyper=false,#1]} +\newrobustcmd*{\glspl}{\@gls@hyp@opt\@glspl} \newcommand*{\@glspl}[2][]{% \new@ifnextchar[{\@glspl@{#1}{#2}}{\@glspl@{#1}{#2}[]}% } \def\@glspl@#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree \let\glscustomtext\@empty \def\glsinsert{#3}% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% - \ifglsused{#2}% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - {% - \gls@checkisacronymlist\@glo@type - \ifthenelse - {% - \(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) - \OR \NOT\boolean{glshyperfirst}% - }% - {% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - }% + \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\@glo@text}% \ifKV@glslink@local \glslocalunset{#2}% \else @@ -3255,46 +3276,20 @@ name=true]{% \fi }% } -\newrobustcmd*{\Glspl}{\@ifstar\@sGlspl\@Glspl} -\newcommand*{\@sGlspl}[1][]{\@Glspl[hyper=false,#1]} +\newrobustcmd*{\Glspl}{\@gls@hyp@opt\@Glspl} \newcommand*{\@Glspl}[2][]{% \new@ifnextchar[{\@Glspl@{#1}{#2}}{\@Glspl@{#1}{#2}[]}% } \def\@Glspl@#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree \let\glscustomtext\@empty \def\glsinsert{#3}% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% - \ifglsused{#2}% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - {% - \gls@checkisacronymlist\@glo@type - \ifthenelse - {% - \(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) - \OR \NOT\boolean{glshyperfirst}% - }% - {% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - }% + \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\@glo@text}% \ifKV@glslink@local \glslocalunset{#2}% \else @@ -3302,46 +3297,20 @@ name=true]{% \fi }% } -\newrobustcmd*{\GLSpl}{\@ifstar\@sGLSpl\@GLSpl} -\newcommand*{\@sGLSpl}[1][]{\@GLSpl[hyper=false,#1]} +\newrobustcmd*{\GLSpl}{\@gls@hyp@opt\@GLSpl} \newcommand*{\@GLSpl}[2][]{% \new@ifnextchar[{\@GLSpl@{#1}{#2}}{\@GLSpl@{#1}{#2}[]}% } \def\@GLSpl@#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree \let\glscustomtext\@empty \def\glsinsert{#3}% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% - \ifglsused{#2}% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - {% - \gls@checkisacronymlist\@glo@type - \ifthenelse - {% - \(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) - \OR \NOT\boolean{glshyperfirst}% - }% - {% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - }% + \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\@glo@text}% \ifKV@glslink@local \glslocalunset{#2}% \else @@ -3349,39 +3318,16 @@ name=true]{% \fi }% } -\newrobustcmd*{\glsdisp}{\@ifstar\@sglsdisp\@glsdisp} -\newcommand*{\@sglsdisp}[1][]{\@glsdisp[hyper=false,#1]} +\newrobustcmd*{\glsdisp}{\@gls@hyp@opt\@glsdisp} \newcommand*{\@glsdisp}[3][]{% \glsdoifexists{#2}{% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \def\glscustomtext{#3}% \def\glsinsert{}% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% - \ifglsused{#2}% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - {% - \gls@checkisacronymlist\@glo@type - \ifthenelse{\(\boolean{@glsisacronymlist}\AND - \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}% - {% - \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - }% - {% - \@gls@link[#1]{#2}{\@glo@text}% - }% - }% + \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\@glo@text}% \ifKV@glslink@local \glslocalunset{#2}% \else @@ -3392,366 +3338,305 @@ name=true]{% \newcommand{\@gls@field@link}[3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \@gls@link[#1]{#2}{#3}% }% } -\newrobustcmd*{\glstext}{\@ifstar\@sglstext\@glstext} -\newcommand*{\@sglstext}[1][]{\@glstext[hyper=false,#1]} +\newrobustcmd*{\glstext}{\@gls@hyp@opt\@glstext} \newcommand*{\@glstext}[2][]{% \new@ifnextchar[{\@glstext@{#1}{#2}}{\@glstext@{#1}{#2}[]}} \def\@glstext@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentrytext{#2}#3}% } -\newrobustcmd*{\GLStext}{\@ifstar\@sGLStext\@GLStext} -\newcommand*{\@sGLStext}[1][]{\@GLStext[hyper=false,#1]} +\newrobustcmd*{\GLStext}{\@gls@hyp@opt\@GLStext} \newcommand*{\@GLStext}[2][]{% \new@ifnextchar[{\@GLStext@{#1}{#2}}{\@GLStext@{#1}{#2}[]}} \def\@GLStext@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrytext{#2}#3}}% } -\newrobustcmd*{\Glstext}{\@ifstar\@sGlstext\@Glstext} -\newcommand*{\@sGlstext}[1][]{\@Glstext[hyper=false,#1]} +\newrobustcmd*{\Glstext}{\@gls@hyp@opt\@Glstext} \newcommand*{\@Glstext}[2][]{% \new@ifnextchar[{\@Glstext@{#1}{#2}}{\@Glstext@{#1}{#2}[]}} \def\@Glstext@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentrytext{#2}#3}% } -\newrobustcmd*{\glsfirst}{\@ifstar\@sglsfirst\@glsfirst} -\newcommand*{\@sglsfirst}[1][]{\@glsfirst[hyper=false,#1]} +\newrobustcmd*{\glsfirst}{\@gls@hyp@opt\@glsfirst} \newcommand*{\@glsfirst}[2][]{% \new@ifnextchar[{\@glsfirst@{#1}{#2}}{\@glsfirst@{#1}{#2}[]}} \def\@glsfirst@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryfirst{#2}#3}% } -\newrobustcmd*{\Glsfirst}{\@ifstar\@sGlsfirst\@Glsfirst} -\newcommand*{\@sGlsfirst}[1][]{\@Glsfirst[hyper=false,#1]} +\newrobustcmd*{\Glsfirst}{\@gls@hyp@opt\@Glsfirst} \newcommand*{\@Glsfirst}[2][]{% \new@ifnextchar[{\@Glsfirst@{#1}{#2}}{\@Glsfirst@{#1}{#2}[]}} \def\@Glsfirst@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryfirst{#2}#3}% } -\newrobustcmd*{\GLSfirst}{\@ifstar\@sGLSfirst\@GLSfirst} -\newcommand*{\@sGLSfirst}[1][]{\@GLSfirst[hyper=false,#1]} +\newrobustcmd*{\GLSfirst}{\@gls@hyp@opt\@GLSfirst} \newcommand*{\@GLSfirst}[2][]{% \new@ifnextchar[{\@GLSfirst@{#1}{#2}}{\@GLSfirst@{#1}{#2}[]}} \def\@GLSfirst@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryfirst{#2}#3}}% } -\newrobustcmd*{\glsplural}{\@ifstar\@sglsplural\@glsplural} -\newcommand*{\@sglsplural}[1][]{\@glsplural[hyper=false,#1]} +\newrobustcmd*{\glsplural}{\@gls@hyp@opt\@glsplural} \newcommand*{\@glsplural}[2][]{% \new@ifnextchar[{\@glsplural@{#1}{#2}}{\@glsplural@{#1}{#2}[]}} \def\@glsplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryplural{#2}#3}% } -\newrobustcmd*{\Glsplural}{\@ifstar\@sGlsplural\@Glsplural} -\newcommand*{\@sGlsplural}[1][]{\@Glsplural[hyper=false,#1]} +\newrobustcmd*{\Glsplural}{\@gls@hyp@opt\@Glsplural} \newcommand*{\@Glsplural}[2][]{% \new@ifnextchar[{\@Glsplural@{#1}{#2}}{\@Glsplural@{#1}{#2}[]}} \def\@Glsplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryplural{#2}#3}% } -\newrobustcmd*{\GLSplural}{\@ifstar\@sGLSplural\@GLSplural} -\newcommand*{\@sGLSplural}[1][]{\@GLSplural[hyper=false,#1]} +\newrobustcmd*{\GLSplural}{\@gls@hyp@opt\@GLSplural} \newcommand*{\@GLSplural}[2][]{% \new@ifnextchar[{\@GLSplural@{#1}{#2}}{\@GLSplural@{#1}{#2}[]}} \def\@GLSplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryplural{#2}#3}}% } -\newrobustcmd*{\glsfirstplural}{\@ifstar\@sglsfirstplural\@glsfirstplural} -\newcommand*{\@sglsfirstplural}[1][]{\@glsfirstplural[hyper=false,#1]} +\newrobustcmd*{\glsfirstplural}{\@gls@hyp@opt\@glsfirstplural} \newcommand*{\@glsfirstplural}[2][]{% \new@ifnextchar[{\@glsfirstplural@{#1}{#2}}{\@glsfirstplural@{#1}{#2}[]}} \def\@glsfirstplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryfirstplural{#2}#3}% } -\newrobustcmd*{\Glsfirstplural}{\@ifstar\@sGlsfirstplural\@Glsfirstplural} -\newcommand*{\@sGlsfirstplural}[1][]{\@Glsfirstplural[hyper=false,#1]} +\newrobustcmd*{\Glsfirstplural}{\@gls@hyp@opt\@Glsfirstplural} \newcommand*{\@Glsfirstplural}[2][]{% \new@ifnextchar[{\@Glsfirstplural@{#1}{#2}}{\@Glsfirstplural@{#1}{#2}[]}} \def\@Glsfirstplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryfirstplural{#2}#3}% } -\newrobustcmd*{\GLSfirstplural}{\@ifstar\@sGLSfirstplural\@GLSfirstplural} -\newcommand*{\@sGLSfirstplural}[1][]{\@GLSfirstplural[hyper=false,#1]} +\newrobustcmd*{\GLSfirstplural}{\@gls@hyp@opt\@GLSfirstplural} \newcommand*{\@GLSfirstplural}[2][]{% \new@ifnextchar[{\@GLSfirstplural@{#1}{#2}}{\@GLSfirstplural@{#1}{#2}[]}} \def\@GLSfirstplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryfirstplural{#2}#3}}% } -\newrobustcmd*{\glsname}{\@ifstar\@sglsname\@glsname} -\newcommand*{\@sglsname}[1][]{\@glsname[hyper=false,#1]} +\newrobustcmd*{\glsname}{\@gls@hyp@opt\@glsname} \newcommand*{\@glsname}[2][]{% \new@ifnextchar[{\@glsname@{#1}{#2}}{\@glsname@{#1}{#2}[]}} \def\@glsname@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryname{#2}#3}% } -\newrobustcmd*{\Glsname}{\@ifstar\@sGlsname\@Glsname} -\newcommand*{\@sGlsname}[1][]{\@Glsname[hyper=false,#1]} +\newrobustcmd*{\Glsname}{\@gls@hyp@opt\@Glsname} \newcommand*{\@Glsname}[2][]{% \new@ifnextchar[{\@Glsname@{#1}{#2}}{\@Glsname@{#1}{#2}[]}} \def\@Glsname@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryname{#2}#3}% } -\newrobustcmd*{\GLSname}{\@ifstar\@sGLSname\@GLSname} -\newcommand*{\@sGLSname}[1][]{\@GLSname[hyper=false,#1]} +\newrobustcmd*{\GLSname}{\@gls@hyp@opt\@GLSname} \newcommand*{\@GLSname}[2][]{% \new@ifnextchar[{\@GLSname@{#1}{#2}}{\@GLSname@{#1}{#2}[]}} \def\@GLSname@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryname{#2}#3}}% } -\newrobustcmd*{\glsdesc}{\@ifstar\@sglsdesc\@glsdesc} -\newcommand*{\@sglsdesc}[1][]{\@glsdesc[hyper=false,#1]} +\newrobustcmd*{\glsdesc}{\@gls@hyp@opt\@glsdesc} \newcommand*{\@glsdesc}[2][]{% \new@ifnextchar[{\@glsdesc@{#1}{#2}}{\@glsdesc@{#1}{#2}[]}} \def\@glsdesc@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentrydesc{#2}#3}% } -\newrobustcmd*{\Glsdesc}{\@ifstar\@sGlsdesc\@Glsdesc} -\newcommand*{\@sGlsdesc}[1][]{\@Glsdesc[hyper=false,#1]} +\newrobustcmd*{\Glsdesc}{\@gls@hyp@opt\@Glsdesc} \newcommand*{\@Glsdesc}[2][]{% \new@ifnextchar[{\@Glsdesc@{#1}{#2}}{\@Glsdesc@{#1}{#2}[]}} \def\@Glsdesc@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentrydesc{#2}#3}% } -\newrobustcmd*{\GLSdesc}{\@ifstar\@sGLSdesc\@GLSdesc} -\newcommand*{\@sGLSdesc}[1][]{\@GLSdesc[hyper=false,#1]} +\newrobustcmd*{\GLSdesc}{\@gls@hyp@opt\@GLSdesc} \newcommand*{\@GLSdesc}[2][]{% \new@ifnextchar[{\@GLSdesc@{#1}{#2}}{\@GLSdesc@{#1}{#2}[]}} \def\@GLSdesc@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrydesc{#2}#3}}% } -\newrobustcmd*{\glsdescplural}{\@ifstar\@sglsdescplural\@glsdescplural} -\newcommand*{\@sglsdescplural}[1][]{\@glsdescplural[hyper=false,#1]} +\newrobustcmd*{\glsdescplural}{\@gls@hyp@opt\@glsdescplural} \newcommand*{\@glsdescplural}[2][]{% \new@ifnextchar[{\@glsdescplural@{#1}{#2}}{\@glsdescplural@{#1}{#2}[]}} \def\@glsdescplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentrydescplural{#2}#3}% } -\newrobustcmd*{\Glsdescplural}{\@ifstar\@sGlsdescplural\@Glsdescplural} -\newcommand*{\@sGlsdescplural}[1][]{\@Glsdescplural[hyper=false,#1]} +\newrobustcmd*{\Glsdescplural}{\@gls@hyp@opt\@Glsdescplural} \newcommand*{\@Glsdescplural}[2][]{% \new@ifnextchar[{\@Glsdescplural@{#1}{#2}}{\@Glsdescplural@{#1}{#2}[]}} \def\@Glsdescplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentrydescplural{#2}#3}% } -\newrobustcmd*{\GLSdescplural}{\@ifstar\@sGLSdescplural\@GLSdescplural} -\newcommand*{\@sGLSdescplural}[1][]{\@GLSdescplural[hyper=false,#1]} +\newrobustcmd*{\GLSdescplural}{\@gls@hyp@opt\@GLSdescplural} \newcommand*{\@GLSdescplural}[2][]{% \new@ifnextchar[{\@GLSdescplural@{#1}{#2}}{\@GLSdescplural@{#1}{#2}[]}} \def\@GLSdescplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrydescplural{#2}#3}}% } -\newrobustcmd*{\glssymbol}{\@ifstar\@sglssymbol\@glssymbol} -\newcommand*{\@sglssymbol}[1][]{\@glssymbol[hyper=false,#1]} +\newrobustcmd*{\glssymbol}{\@gls@hyp@opt\@glssymbol} \newcommand*{\@glssymbol}[2][]{% \new@ifnextchar[{\@glssymbol@{#1}{#2}}{\@glssymbol@{#1}{#2}[]}} \def\@glssymbol@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentrysymbol{#2}#3}% } -\newrobustcmd*{\Glssymbol}{\@ifstar\@sGlssymbol\@Glssymbol} -\newcommand*{\@sGlssymbol}[1][]{\@Glssymbol[hyper=false,#1]} +\newrobustcmd*{\Glssymbol}{\@gls@hyp@opt\@Glssymbol} \newcommand*{\@Glssymbol}[2][]{% \new@ifnextchar[{\@Glssymbol@{#1}{#2}}{\@Glssymbol@{#1}{#2}[]}} \def\@Glssymbol@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentrysymbol{#2}#3}% } -\newrobustcmd*{\GLSsymbol}{\@ifstar\@sGLSsymbol\@GLSsymbol} -\newcommand*{\@sGLSsymbol}[1][]{\@GLSsymbol[hyper=false,#1]} +\newrobustcmd*{\GLSsymbol}{\@gls@hyp@opt\@GLSsymbol} \newcommand*{\@GLSsymbol}[2][]{% \new@ifnextchar[{\@GLSsymbol@{#1}{#2}}{\@GLSsymbol@{#1}{#2}[]}} \def\@GLSsymbol@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbol{#2}#3}}% } -\newrobustcmd*{\glssymbolplural}{\@ifstar\@sglssymbolplural\@glssymbolplural} -\newcommand*{\@sglssymbolplural}[1][]{\@glssymbolplural[hyper=false,#1]} +\newrobustcmd*{\glssymbolplural}{\@gls@hyp@opt\@glssymbolplural} \newcommand*{\@glssymbolplural}[2][]{% \new@ifnextchar[{\@glssymbolplural@{#1}{#2}}{\@glssymbolplural@{#1}{#2}[]}} \def\@glssymbolplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentrysymbolplural{#2}#3}% } -\newrobustcmd*{\Glssymbolplural}{\@ifstar\@sGlssymbolplural\@Glssymbolplural} -\newcommand*{\@sGlssymbolplural}[1][]{\@Glssymbolplural[hyper=false,#1]} +\newrobustcmd*{\Glssymbolplural}{\@gls@hyp@opt\@Glssymbolplural} \newcommand*{\@Glssymbolplural}[2][]{% \new@ifnextchar[{\@Glssymbolplural@{#1}{#2}}{\@Glssymbolplural@{#1}{#2}[]}} \def\@Glssymbolplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentrysymbolplural{#2}#3}% } -\newrobustcmd*{\GLSsymbolplural}{\@ifstar\@sGLSsymbolplural\@GLSsymbolplural} -\newcommand*{\@sGLSsymbolplural}[1][]{\@GLSsymbolplural[hyper=false,#1]} +\newrobustcmd*{\GLSsymbolplural}{\@gls@hyp@opt\@GLSsymbolplural} \newcommand*{\@GLSsymbolplural}[2][]{% \new@ifnextchar[{\@GLSsymbolplural@{#1}{#2}}{\@GLSsymbolplural@{#1}{#2}[]}} \def\@GLSsymbolplural@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}#3}}% } -\newrobustcmd*{\glsuseri}{\@ifstar\@sglsuseri\@glsuseri} -\newcommand*{\@sglsuseri}[1][]{\@glsuseri[hyper=false,#1]} +\newrobustcmd*{\glsuseri}{\@gls@hyp@opt\@glsuseri} \newcommand*{\@glsuseri}[2][]{% \new@ifnextchar[{\@glsuseri@{#1}{#2}}{\@glsuseri@{#1}{#2}[]}} \def\@glsuseri@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryuseri{#2}#3}% } -\newrobustcmd*{\Glsuseri}{\@ifstar\@sGlsuseri\@Glsuseri} -\newcommand*{\@sGlsuseri}[1][]{\@Glsuseri[hyper=false,#1]} +\newrobustcmd*{\Glsuseri}{\@gls@hyp@opt\@Glsuseri} \newcommand*{\@Glsuseri}[2][]{% \new@ifnextchar[{\@Glsuseri@{#1}{#2}}{\@Glsuseri@{#1}{#2}[]}} \def\@Glsuseri@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryuseri{#2}#3}% } -\newrobustcmd*{\GLSuseri}{\@ifstar\@sGLSuseri\@GLSuseri} -\newcommand*{\@sGLSuseri}[1][]{\@GLSuseri[hyper=false,#1]} +\newrobustcmd*{\GLSuseri}{\@gls@hyp@opt\@GLSuseri} \newcommand*{\@GLSuseri}[2][]{% \new@ifnextchar[{\@GLSuseri@{#1}{#2}}{\@GLSuseri@{#1}{#2}[]}} \def\@GLSuseri@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}% } -\newrobustcmd*{\glsuserii}{\@ifstar\@sglsuserii\@glsuserii} -\newcommand*{\@sglsuserii}[1][]{\@glsuserii[hyper=false,#1]} +\newrobustcmd*{\glsuserii}{\@gls@hyp@opt\@glsuserii} \newcommand*{\@glsuserii}[2][]{% \new@ifnextchar[{\@glsuserii@{#1}{#2}}{\@glsuserii@{#1}{#2}[]}} \def\@glsuserii@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryuserii{#2}#3}% } -\newrobustcmd*{\Glsuserii}{\@ifstar\@sGlsuserii\@Glsuserii} -\newcommand*{\@sGlsuserii}[1][]{\@Glsuserii[hyper=false,#1]} +\newrobustcmd*{\Glsuserii}{\@gls@hyp@opt\@Glsuserii} \newcommand*{\@Glsuserii}[2][]{% \new@ifnextchar[{\@Glsuserii@{#1}{#2}}{\@Glsuserii@{#1}{#2}[]}} \def\@Glsuserii@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryuserii{#2}#3}% } -\newrobustcmd*{\GLSuserii}{\@ifstar\@sGLSuserii\@GLSuserii} -\newcommand*{\@sGLSuserii}[1][]{\@GLSuserii[hyper=false,#1]} +\newrobustcmd*{\GLSuserii}{\@gls@hyp@opt\@GLSuserii} \newcommand*{\@GLSuserii}[2][]{% \new@ifnextchar[{\@GLSuserii@{#1}{#2}}{\@GLSuserii@{#1}{#2}[]}} \def\@GLSuserii@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}% } -\newrobustcmd*{\glsuseriii}{\@ifstar\@sglsuseriii\@glsuseriii} -\newcommand*{\@sglsuseriii}[1][]{\@glsuseriii[hyper=false,#1]} +\newrobustcmd*{\glsuseriii}{\@gls@hyp@opt\@glsuseriii} \newcommand*{\@glsuseriii}[2][]{% \new@ifnextchar[{\@glsuseriii@{#1}{#2}}{\@glsuseriii@{#1}{#2}[]}} \def\@glsuseriii@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryuseriii{#2}#3}% } -\newrobustcmd*{\Glsuseriii}{\@ifstar\@sGlsuseriii\@Glsuseriii} -\newcommand*{\@sGlsuseriii}[1][]{\@Glsuseriii[hyper=false,#1]} +\newrobustcmd*{\Glsuseriii}{\@gls@hyp@opt\@Glsuseriii} \newcommand*{\@Glsuseriii}[2][]{% \new@ifnextchar[{\@Glsuseriii@{#1}{#2}}{\@Glsuseriii@{#1}{#2}[]}} \def\@Glsuseriii@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryuseriii{#2}#3}% } -\newrobustcmd*{\GLSuseriii}{\@ifstar\@sGLSuseriii\@GLSuseriii} -\newcommand*{\@sGLSuseriii}[1][]{\@GLSuseriii[hyper=false,#1]} +\newrobustcmd*{\GLSuseriii}{\@gls@hyp@opt\@GLSuseriii} \newcommand*{\@GLSuseriii}[2][]{% \new@ifnextchar[{\@GLSuseriii@{#1}{#2}}{\@GLSuseriii@{#1}{#2}[]}} \def\@GLSuseriii@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}% } -\newrobustcmd*{\glsuseriv}{\@ifstar\@sglsuseriv\@glsuseriv} -\newcommand*{\@sglsuseriv}[1][]{\@glsuseriv[hyper=false,#1]} +\newrobustcmd*{\glsuseriv}{\@gls@hyp@opt\@glsuseriv} \newcommand*{\@glsuseriv}[2][]{% \new@ifnextchar[{\@glsuseriv@{#1}{#2}}{\@glsuseriv@{#1}{#2}[]}} \def\@glsuseriv@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryuseriv{#2}#3}% } -\newrobustcmd*{\Glsuseriv}{\@ifstar\@sGlsuseriv\@Glsuseriv} -\newcommand*{\@sGlsuseriv}[1][]{\@Glsuseriv[hyper=false,#1]} +\newrobustcmd*{\Glsuseriv}{\@gls@hyp@opt\@Glsuseriv} \newcommand*{\@Glsuseriv}[2][]{% \new@ifnextchar[{\@Glsuseriv@{#1}{#2}}{\@Glsuseriv@{#1}{#2}[]}} \def\@Glsuseriv@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryuseriv{#2}#3}% } -\newrobustcmd*{\GLSuseriv}{\@ifstar\@sGLSuseriv\@GLSuseriv} -\newcommand*{\@sGLSuseriv}[1][]{\@GLSuseriv[hyper=false,#1]} +\newrobustcmd*{\GLSuseriv}{\@gls@hyp@opt\@GLSuseriv} \newcommand*{\@GLSuseriv}[2][]{% \new@ifnextchar[{\@GLSuseriv@{#1}{#2}}{\@GLSuseriv@{#1}{#2}[]}} \def\@GLSuseriv@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}% } -\newrobustcmd*{\glsuserv}{\@ifstar\@sglsuserv\@glsuserv} -\newcommand*{\@sglsuserv}[1][]{\@glsuserv[hyper=false,#1]} +\newrobustcmd*{\glsuserv}{\@gls@hyp@opt\@glsuserv} \newcommand*{\@glsuserv}[2][]{% \new@ifnextchar[{\@glsuserv@{#1}{#2}}{\@glsuserv@{#1}{#2}[]}} \def\@glsuserv@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryuserv{#2}#3}% } -\newrobustcmd*{\Glsuserv}{\@ifstar\@sGlsuserv\@Glsuserv} -\newcommand*{\@sGlsuserv}[1][]{\@Glsuserv[hyper=false,#1]} +\newrobustcmd*{\Glsuserv}{\@gls@hyp@opt\@Glsuserv} \newcommand*{\@Glsuserv}[2][]{% \new@ifnextchar[{\@Glsuserv@{#1}{#2}}{\@Glsuserv@{#1}{#2}[]}} \def\@Glsuserv@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryuserv{#2}#3}% } -\newrobustcmd*{\GLSuserv}{\@ifstar\@sGLSuserv\@GLSuserv} -\newcommand*{\@sGLSuserv}[1][]{\@GLSuserv[hyper=false,#1]} +\newrobustcmd*{\GLSuserv}{\@gls@hyp@opt\@GLSuserv} \newcommand*{\@GLSuserv}[2][]{% \new@ifnextchar[{\@GLSuserv@{#1}{#2}}{\@GLSuserv@{#1}{#2}[]}} \def\@GLSuserv@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}% } -\newrobustcmd*{\glsuservi}{\@ifstar\@sglsuservi\@glsuservi} -\newcommand*{\@sglsuservi}[1][]{\@glsuservi[hyper=false,#1]} +\newrobustcmd*{\glsuservi}{\@gls@hyp@opt\@glsuservi} \newcommand*{\@glsuservi}[2][]{% \new@ifnextchar[{\@glsuservi@{#1}{#2}}{\@glsuservi@{#1}{#2}[]}} \def\@glsuservi@#1#2[#3]{% \@gls@field@link{#1}{#2}{\glsentryuservi{#2}#3}% } -\newrobustcmd*{\Glsuservi}{\@ifstar\@sGlsuservi\@Glsuservi} -\newcommand*{\@sGlsuservi}[1][]{\@Glsuservi[hyper=false,#1]} +\newrobustcmd*{\Glsuservi}{\@gls@hyp@opt\@Glsuservi} \newcommand*{\@Glsuservi}[2][]{% \new@ifnextchar[{\@Glsuservi@{#1}{#2}}{\@Glsuservi@{#1}{#2}[]}} \def\@Glsuservi@#1#2[#3]{% \@gls@field@link{#1}{#2}{\Glsentryuservi{#2}#3}% } -\newrobustcmd*{\GLSuservi}{\@ifstar\@sGLSuservi\@GLSuservi} -\newcommand*{\@sGLSuservi}[1][]{\@GLSuservi[hyper=false,#1]} +\newrobustcmd*{\GLSuservi}{\@gls@hyp@opt\@GLSuservi} \newcommand*{\@GLSuservi}[2][]{% \new@ifnextchar[{\@GLSuservi@{#1}{#2}}{\@GLSuservi@{#1}{#2}[]}} \def\@GLSuservi@#1#2[#3]{% \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}% } -\newrobustcmd*{\acrshort}{\@ifstar\s@acrshort\ns@acrshort} -\newcommand*{\s@acrshort}[2][]{% - \new@ifnextchar[{\@acrshort{hyper=false,#1}{#2}}% - {\@acrshort{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\acrshort}{\@gls@hyp@opt\ns@acrshort} \newcommand*{\ns@acrshort}[2][]{% \new@ifnextchar[{\@acrshort{#1}{#2}}{\@acrshort{#1}{#2}[]}% } \def\@acrshort#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty \def\glscustomtext{% \acronymfont{\glsentryshort{#2}}#3% }% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\Acrshort}{\@ifstar\s@Acrshort\ns@Acrshort} -\newcommand*{\s@Acrshort}[2][]{% - \new@ifnextchar[{\@Acrshort{hyper=false,#1}{#2}}% - {\@Acrshort{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\Acrshort}{\@gls@hyp@opt\ns@Acrshort} \newcommand*{\ns@Acrshort}[2][]{% \new@ifnextchar[{\@Acrshort{#1}{#2}}{\@Acrshort{#1}{#2}[]}% } \def\@Acrshort#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree @@ -3759,29 +3644,17 @@ name=true]{% \def\glscustomtext{% \acronymfont{\Glsentryshort{#2}}#3% }% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\ACRshort}{\@ifstar\s@ACRshort\ns@ACRshort} -\newcommand*{\s@ACRshort}[2][]{% - \new@ifnextchar[{\@ACRshort{hyper=false,#1}{#2}}% - {\@ACRshort{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\ACRshort}{\@gls@hyp@opt\ns@ACRshort} \newcommand*{\ns@ACRshort}[2][]{% \new@ifnextchar[{\@ACRshort{#1}{#2}}{\@ACRshort{#1}{#2}[]}% } \def\@ACRshort#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree @@ -3789,29 +3662,17 @@ name=true]{% \def\glscustomtext{% \mfirstucMakeUppercase{\acronymfont{\glsentryshort{#2}}#3}% }% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\acrshortpl}{\@ifstar\s@acrshortpl\ns@acrshortpl} -\newcommand*{\s@acrshortpl}[2][]{% - \new@ifnextchar[{\@acrshortpl{hyper=false,#1}{#2}}% - {\@acrshortpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\acrshortpl}{\@gls@hyp@opt\ns@acrshortpl} \newcommand*{\ns@acrshortpl}[2][]{% \new@ifnextchar[{\@acrshortpl{#1}{#2}}{\@acrshortpl{#1}{#2}[]}% } \def\@acrshortpl#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree @@ -3819,29 +3680,17 @@ name=true]{% \def\glscustomtext{% \acronymfont{\glsentryshortpl{#2}}#3% }% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\Acrshortpl}{\@ifstar\s@Acrshortpl\ns@Acrshortpl} -\newcommand*{\s@Acrshortpl}[2][]{% - \new@ifnextchar[{\@Acrshortpl{hyper=false,#1}{#2}}% - {\@Acrshortpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\Acrshortpl}{\@gls@hyp@opt\ns@Acrshortpl} \newcommand*{\ns@Acrshortpl}[2][]{% \new@ifnextchar[{\@Acrshortpl{#1}{#2}}{\@Acrshortpl{#1}{#2}[]}% } \def\@Acrshortpl#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree @@ -3849,29 +3698,17 @@ name=true]{% \def\glscustomtext{% \acronymfont{\Glsentryshortpl{#2}}#3% }% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\ACRshortpl}{\@ifstar\s@ACRshortpl\ns@ACRshortpl} -\newcommand*{\s@ACRshortpl}[2][]{% - \new@ifnextchar[{\@ACRshortpl{hyper=false,#1}{#2}}% - {\@ACRshortpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\ACRshortpl}{\@gls@hyp@opt\ns@ACRshortpl} \newcommand*{\ns@ACRshortpl}[2][]{% \new@ifnextchar[{\@ACRshortpl{#1}{#2}}{\@ACRshortpl{#1}{#2}[]}% } \def\@ACRshortpl#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree @@ -3879,195 +3716,115 @@ name=true]{% \def\glscustomtext{% \mfirstucMakeUppercase{\acronymfont{\glsentryshortpl{#2}}#3}% }% - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\acrlong}{\@ifstar\s@acrlong\ns@acrlong} -\newcommand*{\s@acrlong}[2][]{% - \new@ifnextchar[{\@acrlong{hyper=false,#1}{#2}}% - {\@acrlong{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\acrlong}{\@gls@hyp@opt\ns@acrlong} \newcommand*{\ns@acrlong}[2][]{% \new@ifnextchar[{\@acrlong{#1}{#2}}{\@acrlong{#1}{#2}[]}% } \def\@acrlong#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \glsentrylong{#2}#3% }% - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\Acrlong}{\@ifstar\s@Acrlong\ns@Acrlong} -\newcommand*{\s@Acrlong}[2][]{% - \new@ifnextchar[{\@Acrlong{hyper=false,#1}{#2}}% - {\@Acrlong{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\Acrlong}{\@gls@hyp@opt\ns@Acrlong} \newcommand*{\ns@Acrlong}[2][]{% \new@ifnextchar[{\@Acrlong{#1}{#2}}{\@Acrlong{#1}{#2}[]}% } \def\@Acrlong#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree \let\glsinsert\@empty - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \Glsentrylong{#2}#3% }% - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\ACRlong}{\@ifstar\s@ACRlong\ns@ACRlong} -\newcommand*{\s@ACRlong}[2][]{% - \new@ifnextchar[{\@ACRlong{hyper=false,#1}{#2}}% - {\@ACRlong{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\ACRlong}{\@gls@hyp@opt\ns@ACRlong} \newcommand*{\ns@ACRlong}[2][]{% \new@ifnextchar[{\@ACRlong{#1}{#2}}{\@ACRlong{#1}{#2}[]}% } \def\@ACRlong#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \mfirstucMakeUppercase{\glsentrylong{#2}#3}% }% - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\acrlongpl}{\@ifstar\s@acrlongpl\ns@acrlongpl} -\newcommand*{\s@acrlongpl}[2][]{% - \new@ifnextchar[{\@acrlongpl{hyper=false,#1}{#2}}% - {\@acrlongpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\acrlongpl}{\@gls@hyp@opt\ns@acrlongpl} \newcommand*{\ns@acrlongpl}[2][]{% \new@ifnextchar[{\@acrlongpl{#1}{#2}}{\@acrlongpl{#1}{#2}[]}% } \def\@acrlongpl#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \glsentrylongpl{#2}#3% }% - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } -\newrobustcmd*{\Acrlongpl}{\@ifstar\s@Acrlongpl\ns@Acrlongpl} -\newcommand*{\s@Acrlongpl}[2][]{% - \new@ifnextchar[{\@Acrlongpl{hyper=false#1}{#2}}% - {\@Acrlongpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\Acrlongpl}{\@gls@hyp@opt\ns@Acrlongpl} \newcommand*{\ns@Acrlongpl}[2][]{% \new@ifnextchar[{\@Acrlongpl{#1}{#2}}{\@Acrlongpl{#1}{#2}[]}% } \def\@Acrlongpl#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree \let\glsinsert\@empty - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \Glsentrylongpl{#2}#3% }% \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% }% } -\newrobustcmd*{\ACRlongpl}{\@ifstar\s@ACRlongpl\ns@ACRlongpl} -\newcommand*{\s@ACRlongpl}[2][]{% - \new@ifnextchar[{\@ACRlongpl{hyper=false,#1}{#2}}% - {\@ACRlongpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\ACRlongpl}{\@gls@hyp@opt\ns@ACRlongpl} \newcommand*{\ns@ACRlongpl}[2][]{% \new@ifnextchar[{\@ACRlongpl{#1}{#2}}{\@ACRlongpl{#1}{#2}[]}% } \def\@ACRlongpl#1#2[#3]{% \glsdoifexists{#2}% {% - \edef\@glo@type{\glsentrytype{#2}}% + \let\do@gls@link@checkfirsthyper\relax \def\glslabel{#2}% \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty - \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \setkeys{glslink}{hyper=true,#1}% - \ifKV@glslink@hyper - \let\glsifhyper\@firstoftwo - \else - \let\glsifhyper\@secondoftwo - \fi - \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \mfirstucMakeUppercase{\glsentrylongpl{#2}#3}% }% - \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% } \newcommand*{\@gls@entry@field}[2]{% @@ -4536,6 +4293,57 @@ name=true]{% \PackageInfo{glossaries}{Writing glossary file \jobname.\csname @glotype@#2@out\endcsname}% } +\newcommand*{\@closegls}[1]{% + \closeout\csname glo@#1@file\endcsname +} +\ifglsxindy + \newcommand*{\@gls@automake}[1]{% + \ifglossaryexists{#1} + {% + \@closegls{#1}% + \ifdefstring{\glsorder}{letter}% + {\def\@gls@order{-M ord/letorder }}% + {\let\@gls@order\@empty}% + \ifcsundef{@xdy@#1@language}% + {\let\@gls@langmod\@xdy@main@language}% + {\letcs\@gls@langmod{@xdy@#1@language}}% + \edef\@gls@dothiswrite{\noexpand\write18{xindy + -I xindy + \@gls@order + -L \@gls@langmod\space + -M \gls@istfilebase\space + -C \gls@codepage\space + -t \jobname.\csuse{@glotype@#1@log} + -o \jobname.\csuse{@glotype@#1@in} + \jobname.\csuse{@glotype@#1@out}}% + }% + \@gls@dothiswrite + }% + {% + \GlossariesWarning{Can't make glossary `#1', it doesn't exist}% + }% + } +\else + \newcommand*{\@gls@automake}[1]{% + \ifglossaryexists{#1} + {% + \@closegls{#1}% + \ifdefstring{\glsorder}{letter}% + {\def\@gls@order{-l }}% + {\let\@gls@order\@empty}% + \edef\@gls@dothiswrite{\noexpand\write18{makeindex \@gls@order + -s \istfilename\space + -t \jobname.\csuse{@glotype@#1@log} + -o \jobname.\csuse{@glotype@#1@in} + \jobname.\csuse{@glotype@#1@out}}% + }% + \@gls@dothiswrite + }% + {% + \GlossariesWarning{Can't make glossary `#1', it doesn't exist}% + }% + } +\fi \newcommand*{\@warn@nomakeglossaries}{} \newcommand*{\warn@nomakeglossaries}{\@warn@nomakeglossaries} \newcommand*{\makeglossaries}{% @@ -4574,6 +4382,14 @@ name=true]{% \renewcommand*{\@printgloss@setsort}{% \let\@glo@assign@sortkey\@glo@no@assign@sortkey }% + \ifglsautomake + \renewcommand*{\@gls@doautomake}{% + \@for\@gls@type:=\@glo@types\do{% + \ifdefempty{\@gls@type}{}% + {\@gls@automake{\@gls@type}}% + }% + }% + \fi } \@onlypreamble{\makeglossaries} \let\makeglossary\makeglossaries @@ -4786,7 +4602,10 @@ you \gls@disablepagerefexpansion}{#2}% }% {% - \GlossariesWarning{No file defined for glossary `#1'}% + \ifignoredglossary{#1}{}% + {% + \GlossariesWarning{No file defined for glossary `#1'}% + }% }% \fi \endgroup\@esphack @@ -5429,6 +5248,67 @@ false,nolabel,autolabel,nameref}[nolabel]{% \define@choicekey{printgloss}{nogroupskip}{true,false}[true]{% \csuse{glsnogroupskip#1}% } +\define@choicekey{printgloss}{nopostdot}{true,false}[true]{% + \csuse{glsnopostdot#1}% +} +\define@choicekey{printgloss}{entrycounter}{true,false}[true]{% + \csuse{glsentrycounter#1}% + \ifglsentrycounter + \ifx\@gls@counterwithin\@empty + \newcounter{glossaryentry}% + \else + \newcounter{glossaryentry}[\@gls@counterwithin]% + \fi + \def\theHglossaryentry{\currentglossary.\theglossaryentry}% + \renewcommand*{\glsresetentrycounter}{% + \setcounter{glossaryentry}{0}% + }% + \renewcommand*{\glsstepentry}[1]{% + \refstepcounter{glossaryentry}% + \label{glsentry-\glsdetoklabel{##1}}% + }% + \renewcommand*{\glsentrycounterlabel}{\theglossaryentry.\space}% + \renewcommand*{\glsentryitem}[1]{% + \glsstepentry{##1}\glsentrycounterlabel + }% + \else + \renewcommand*{\glsresetentrycounter}{}% + \renewcommand*{\glsstepentry}[1]{}% + \renewcommand*{\glsentrycounterlabel}{}% + \renewcommand*{\glsentryitem}[1]{\glsresetsubentrycounter} + \fi +} +\define@choicekey{printgloss}{subentrycounter}{true,false}[true]{% + \csuse{glssubentrycounter#1}% + \ifglssubentrycounter + \ifundef\c@glossarysubentry + {% + \ifglsentrycounter + \newcounter{glossarysubentry}[glossaryentry]% + \else + \newcounter{glossarysubentry} + \fi + }{}% + \renewcommand*{\glsstepsubentry}[1]{% + \edef\currentglssubentry{\glsdetoklabel{##1}}% + \refstepcounter{glossarysubentry}% + \label{glsentry-\currentglssubentry}% + }% + \renewcommand*{\glsresetsubentrycounter}{% + \setcounter{glossarysubentry}{0}% + }% + \renewcommand*{\glssubentryitem}[1]{% + \glsstepsubentry{##1}\glssubentrycounterlabel + }% + \renewcommand*{\glssubentrycounterlabel}{\theglossarysubentry)\space}% + \def\theHglossarysubentry{\currentglssubentry.\theglossarysubentry} + \else + \renewcommand*{\glssubentryitem}[1]{}% + \renewcommand*{\glsstepsubentry}[1]{}% + \renewcommand*{\glsresetsubentrycounter}{}% + \renewcommand*{\glssubentrycounterlabel}{}% + \fi +} \define@boolkey{printgloss}[gls]{nonumberlist}[true]{% \ifglsnonumberlist \def\glossaryentrynumbers##1{}% @@ -5800,13 +5680,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newcommand*{\glsshortpluralkey}{shortplural} \newcommand*{\glslongkey}{long} \newcommand*{\glslongpluralkey}{longplural} -\newrobustcmd*{\acrfull}{% - \@ifstar\s@acrfull\ns@acrfull -} -\newcommand*\s@acrfull[2][]{% - \new@ifnextchar[{\@acrfull{hyper=false,#1}{#2}}% - {\@acrfull{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\acrfull}{\@gls@hyp@opt\ns@acrfull} \newcommand*\ns@acrfull[2][]{% \new@ifnextchar[{\@acrfull{#1}{#2}}% {\@acrfull{#1}{#2}[]}% @@ -5820,14 +5694,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newcommand{\acrlinkfullformat}[5]{% \acrfullformat{#1{#3}{#4}[#5]}{#2{#3}{#4}[]}% } -\newcommand{\acrfullformat}[2]{#1\space(#2)} -\newrobustcmd*{\Acrfull}{% - \@ifstar\s@Acrfull\ns@Acrfull -} -\newcommand*\s@Acrfull[2][]{% - \new@ifnextchar[{\@Acrfull{hyper=false,#1}{#2}}% - {\@Acrfull{hyper=false,#1}{#2}[]}% -} +\newcommand{\acrfullformat}[2]{#1\glsspace(#2)} +\newrobustcmd{\glsspace}{\space} +\newrobustcmd*{\Acrfull}{\@gls@hyp@opt\ns@Acrfull} \newcommand*\ns@Acrfull[2][]{% \new@ifnextchar[{\@Acrfull{#1}{#2}}% {\@Acrfull{#1}{#2}[]}% @@ -5838,13 +5707,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newcommand*{\Acrfullfmt}[3]{% \acrlinkfullformat{\@Acrlong}{\@acrshort}{#1}{#2}{#3}% } -\newrobustcmd*{\ACRfull}{% - \@ifstar\s@ACRfull\ns@ACRfull -} -\newcommand*\s@ACRfull[2][]{% - \new@ifnextchar[{\@ACRfull{hyper=false,#1}{#2}}% - {\@ACRfull{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\ACRfull}{\@gls@hyp@opt\ns@ACRfull} \newcommand*\ns@ACRfull[2][]{% \new@ifnextchar[{\@ACRfull{#1}{#2}}% {\@ACRfull{#1}{#2}[]}% @@ -5855,13 +5718,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newcommand*{\ACRfullfmt}[3]{% \acrlinkfullformat{\@ACRlong}{\@ACRshort}{#1}{#2}{#3}% } -\newrobustcmd*{\acrfullpl}{% - \@ifstar\s@acrfullpl\ns@acrfullpl -} -\newcommand*\s@acrfullpl[2][]{% - \new@ifnextchar[{\@acrfullpl{hyper=false,#1}{#2}}% - {\@acrfullpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\acrfullpl}{\@gls@hyp@opt\ns@acrfullpl} \newcommand*\ns@acrfullpl[2][]{% \new@ifnextchar[{\@acrfullpl{#1}{#2}}% {\@acrfullpl{#1}{#2}[]}% @@ -5872,13 +5729,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newcommand*{\acrfullplfmt}[3]{% \acrlinkfullformat{\@acrlongpl}{\@acrshortpl}{#1}{#2}{#3}% } -\newrobustcmd*{\Acrfullpl}{% - \@ifstar\s@Acrfullpl\ns@Acrfullpl -} -\newcommand*\s@Acrfullpl[2][]{% - \new@ifnextchar[{\@Acrfullpl{hyper=false,#1}{#2}}% - {\@Acrfullpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\Acrfullpl}{\@gls@hyp@opt\ns@Acrfullpl} \newcommand*\ns@Acrfullpl[2][]{% \new@ifnextchar[{\@Acrfullpl{#1}{#2}}% {\@Acrfullpl{#1}{#2}[]}% @@ -5889,13 +5740,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newcommand*{\Acrfullplfmt}[3]{% \acrlinkfullformat{\@Acrlongpl}{\@acrshortpl}{#1}{#2}{#3}% } -\newrobustcmd*{\ACRfullpl}{% - \@ifstar\s@ACRfullpl\ns@ACRfullpl -} -\newcommand*\s@ACRfullpl[2][]{% - \new@ifnextchar[{\@ACRfullpl{hyper=false,#1}{#2}}% - {\@ACRfullpl{hyper=false,#1}{#2}[]}% -} +\newrobustcmd*{\ACRfullpl}{\@gls@hyp@opt\ns@ACRfullpl} \newcommand*\ns@ACRfullpl[2][]{% \new@ifnextchar[{\@ACRfullpl{#1}{#2}}% {\@ACRfullpl{#1}{#2}[]}% @@ -7033,8 +6878,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newcommand*{\CustomAcronymFields}{% name={\the\glsshorttok},% description={\the\glslongtok},% - first={\noexpand\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% - firstplural={\noexpand\acrfullformat + first={\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% + firstplural={\acrfullformat {\noexpand\glsentrylongpl{\the\glslabeltok}}% {\noexpand\glsentryshortpl{\the\glslabeltok}}},% text={\the\glsshorttok},% |