diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-20 23:17:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-20 23:17:11 +0000 |
commit | b172732c296db880f27bfba6ea750c2f4bffb860 (patch) | |
tree | 84ee0192c4316225790fd459f4b42a7a732b0cc1 /Master/texmf-dist/source | |
parent | b6299c522a7525e9707f6567ebd46e32f6cd47ca (diff) |
glossaries (20jan14)
git-svn-id: svn://tug.org/texlive/trunk@32735 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.dtx | 2695 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.ins | 4 |
2 files changed, 1839 insertions, 860 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index 7ced9a3d178..ea52d610f09 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -28,7 +28,7 @@ % -author "Nicola Talbot" % -codetitle "Main Package Code" % glossaries -% Created on 2013/12/5 15:12 +% Created on 2014/1/20 17:22 %\fi %\iffalse %<*package> @@ -51,7 +51,7 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2013 Nicola Talbot, all rights reserved. +% Copyright (C) 2014 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> @@ -138,7 +138,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{17171} +\CheckSum{17824} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -166,12 +166,12 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{Documented Code For glossaries v4.02} +% \title{Documented Code For glossaries v4.03} % \author{Nicola L.C. Talbot\\[10pt] %Dickimaw Books\\ %\url{http://www.dickimaw-books.com/}} % -% \date{2013-12-05} +% \date{2014-01-20} % \maketitle % %This is the documented code for the \styfmt{glossaries} package. @@ -187,7 +187,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of %glossaries package}. % %\item[\url{glossaries-user.pdf}] -%For the main user guide, read \qt{glossaries.sty v4.02: +%For the main user guide, read \qt{glossaries.sty v4.03: %\LaTeX2e\ Package to Assist Generating Glossaries}. % %\item[\url{mfirstuc-manual.pdf}] @@ -231,7 +231,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2013/12/05 v4.02 (NLCT)] +\ProvidesPackage{glossaries}[2014/01/20 v4.03 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -1329,8 +1329,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} % \begin{macrocode} \define@boolkey[gls]{sanitize}{name}[true]{% - \GlossariesWarning{sanitize={name} package option -deprecated}% + \GlossariesWarning{sanitize={name} package option deprecated}% \ifgls@sanitize@name \glssetnoexpandfield{name}% \else @@ -1340,8 +1339,7 @@ deprecated}% % \end{macrocode} % \begin{macrocode} \define@boolkey[gls]{sanitize}{symbol}[true]{% - \GlossariesWarning{sanitize={symbol} package option -deprecated}% + \GlossariesWarning{sanitize={symbol} package option deprecated}% \ifgls@sanitize@symbol \glssetnoexpandfield{symbol}% \glssetnoexpandfield{symbolplural}% @@ -1675,15 +1673,17 @@ name=true]{% \ifglssavewrites \renewcommand*{\glswritefiles}{\@glswritefiles}% \else - \let\glswritefiles\relax + \let\glswritefiles\@empty \fi } % \end{macrocode} %\end{option} % Set default: +%\changes{4.03}{2014-01-17}{changed default to \cs{@empty} instead +%of \cs{relax}} % \begin{macrocode} \glssavewritesfalse -\let\glswritefiles\relax +\let\glswritefiles\@empty % \end{macrocode} % %\begin{option}{compatible-3.07} @@ -1974,7 +1974,7 @@ name=true]{% %\changes{1.15}{2008 August 15}{new} % \begin{macrocode} \newcommand*{\glssettoctitle}[1]{% -\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}} + \def\glossarytoctitle{\csname @glotype@#1@title\endcsname}} % \end{macrocode} %\end{macro} % @@ -2165,7 +2165,7 @@ name=true]{% %\end{macro} % %\begin{macro}{\setStyleFile} -% Sets the style file. The relevent extension is appended. +% Sets the style file. The relevant extension is appended. % \begin{macrocode} \ifglsxindy \newcommand{\setStyleFile}[1]{% @@ -3115,8 +3115,9 @@ name=true]{% % This used to determine the root language, using a~bit of trickery % since \sty{babel} doesn't supply the information, but now that % \sty{babel} is once again actively maintained, we can't do this -% any more, so \cs{findrootlanguage} no longer available. Now -% provide a command that does nothing (in case it's been patched). +% any more, so \cs{findrootlanguage} is no longer available. Now +% provide a command that does nothing (in case it's been patched), +% but this may be removed completely in the future. % \begin{macrocode} \newcommand*{\findrootlanguage}{} % \end{macrocode} @@ -3283,6 +3284,30 @@ name=true]{% % \end{macrocode} %\end{macro} % +% Since the label is used to form the name of control sequences, by +% default UTF8 etc characters can't be used in the label. A possible +% workaround is to use \ics{scantokens}, but commands such as +% \ics{glsentrytext} will no longer be usable in sectioning, caption +% etc commands. If the user really wants to be able to construct a +% label with UTF8 characters, allow them the means to do so (but on +% their own head be it, if they then use entries in \ics{section} +% etc). This can be done via: +%\begin{verbatim} +%\renewcommand*{\glsdetoklabel}[1]{\scantokens{#1\noexpand}} +%\end{verbatim} +% (Note, don't use \ics{detokenize} or it will cause commands like +% \ics{glsaddall} to fail.) +% Since redefining \cs{glsdetoklabel} can cause things to go +% badly wrong, I'm not going to mention it in the main user guide. +% Only advanced users who know what they're doing ought to attempt +% it. +%\begin{macro}{\glsdetoklabel} +%\changes{4.03}{2014-01-20}{new} +% \begin{macrocode} +\newcommand*{\glsdetoklabel}[1]{#1} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\ifglsentryexists} % To check to see if a glossary entry has been defined use: %\begin{definition} @@ -3291,9 +3316,10 @@ name=true]{% %where \meta{label} is the entry's label. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand{\ifglsentryexists}[3]{% - \ifcsundef{glo@#1@name}{#3}{#2}% + \ifcsundef{glo@\glsdetoklabel{#1}@name}{#3}{#2}% } % \end{macrocode} %\end{macro} @@ -3309,22 +3335,27 @@ name=true]{% % otherwise it will do \meta{false text}. %\changes{3.11a}{2013-10-15}{replaced \cs{ifthenelse} with %\cs{ifbool}} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} -\newcommand*{\ifglsused}[3]{\ifbool{glo@#1@flag}{#2}{#3}} +\newcommand*{\ifglsused}[3]{% + \ifbool{glo@\glsdetoklabel{#1}@flag}{#2}{#3}% +} % \end{macrocode} %\end{macro} %The following two commands will cause an error if the given % condition fails: % %\begin{macro}{\glsdoifexists} -%\cs{glsdoifexists}\marg{label}\marg{code}\par +%\begin{definition} +%\cs{glsdoifexists}\marg{label}\marg{code} +%\end{definition} % Generate an error if entry specified by \meta{label} doesn't % exists, otherwise do \meta{code}. % \begin{macrocode} \newcommand{\glsdoifexists}[2]{% \ifglsentryexists{#1}{#2}{% - \PackageError{glossaries}{Glossary entry `#1' has not been - defined}{You need to define a glossary entry before you + \PackageError{glossaries}{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry before you can use it.}}% } % \end{macrocode} @@ -3337,25 +3368,45 @@ name=true]{% % \begin{macrocode} \newcommand{\glsdoifnoexists}[2]{% \ifglsentryexists{#1}{% - \PackageError{glossaries}{Glossary entry `#1' has already + \PackageError{glossaries}{Glossary entry `\glsdetoklabel{#1}' has already been defined}{}}{#2}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsdoifexistsorwarn} +%\begin{definition} +%\cs{glsdoifexistsorwarn}\marg{label}\marg{code} +%\end{definition} +% Generate a warning if entry specified by \meta{label} doesn't +% exists, otherwise do \meta{code}. +%\changes{4.03}{2014-01-20}{new} +% \begin{macrocode} +\newcommand{\glsdoifexistsorwarn}[2]{% + \ifglsentryexists{#1}{#2}{% + \GlossariesWarning{Glossary entry `\glsdetoklabel{#1}' + has not been defined}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\ifglshaschildren} % \cs{ifglshaschildren}\marg{label}\marg{true part}\marg{false part} %\changes{3.02}{2012/05/21}{new} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand{\ifglshaschildren}[3]{% \glsdoifexists{#1}% {% \def\do@glshaschildren{#3}% - \expandafter\forglsentries\expandafter[\csname glo@#1@type\endcsname] + \edef\@gls@thislabel{\glsdetoklabel{#1}}% + \expandafter\forglsentries\expandafter + [\csname glo@\@gls@thislabel @type\endcsname] {\glo@label}% {% \letcs\glo@parent{glo@\glo@label @parent}% - \ifthenelse{\equal{#1}{\glo@parent}}% + \ifdefequal\@gls@thislabel\glo@parent {% \def\do@glshaschildren{#2}% \@endfortrue @@ -3371,11 +3422,12 @@ name=true]{% %\begin{macro}{\ifglshasparent} % \cs{ifglshaschildren}\marg{label}\marg{true part}\marg{false part} %\changes{3.02}{2012/05/21}{new} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand{\ifglshasparent}[3]{% \glsdoifexists{#1}% {% - \ifcsempty{glo@#1@parent}{#3}{#2}% + \ifcsempty{glo@\glsdetoklabel{#1}@parent}{#3}{#2}% }% } % \end{macrocode} @@ -3386,9 +3438,10 @@ name=true]{% %\changes{3.08a}{2013-09-28}{new} %\changes{3.11a}{2013-10-15}{replaced \cs{ifdefempty} with %\cs{ifcsempty}} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\ifglshasdesc}[3]{% - \ifcsempty{glo@#1@desc}% + \ifcsempty{glo@\glsdetoklabel{#1}@desc}% {#3}% {#2}% } @@ -3400,9 +3453,11 @@ name=true]{% %\changes{3.08a}{2013-09-28}{new} % Does \meta{true part} if the description is just \cs{nopostdesc} % otherwise does \meta{false part}. +%\changes{4.03}{2014-01-20}{fixed typo} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\ifglsdescsuppressed}[3]{% - \ifcsequal{glos@#1@desc}{@no@post@desc}% + \ifcsequal{glo@\glsdetoklabel{#1}@desc}{@no@post@desc}% {#2}% {#3}% } @@ -3416,16 +3471,18 @@ name=true]{% %\cs{@gls@default@symbol}} %\changes{3.11a}{2013-10-15}{replaced \cs{ifdefempty} with %\cs{ifcsempty}} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} +%\changes{4.03}{2014-01-20}{replaced \cs{ifcsempty} with +%\cs{ifdefempty} and replaced \cs{ifx} with \cs{ifdefequal}} % \begin{macrocode} \newcommand*{\ifglshassymbol}[3]{% - \ifcsempty{glo@#1@symbol}% + \letcs{\@glo@symbol}{glo@\glsdetoklabel{#1}@symbol}% + \ifdefempty\@glo@symbol {#3}% {% - \expandafter\ifx\csname glo@#1@symbol\endcsname\@gls@default@value - #3% - \else - #2% - \fi + \ifdefequal\@glo@symbol\@gls@default@value + {#3}% + {#2}% }% } % \end{macrocode} @@ -3434,16 +3491,16 @@ name=true]{% %\begin{macro}{\ifglshaslong} %\cs{ifglshaslong}\marg{label}\marg{true part}\marg{false part} %\changes{3.11a}{2013-10-15}{new} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\ifglshaslong}[3]{% - \ifcsempty{glo@#1@long}% + \letcs{\@glo@long}{glo@\glsdetoklabel{#1}@long}% + \ifdefempty\@glo@long {#3}% {% - \expandafter\ifx\csname glo@#1@long\endcsname\@gls@default@value - #3% - \else - #2% - \fi + \ifdefequal\@glo@long\@gls@default@value + {#3}% + {#2}% }% } % \end{macrocode} @@ -3452,16 +3509,91 @@ name=true]{% %\begin{macro}{\ifglshasshort} %\cs{ifglshasshort}\marg{label}\marg{true part}\marg{false part} %\changes{3.11a}{2013-10-15}{new} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\ifglshasshort}[3]{% - \ifcsempty{glo@#1@short}% + \letcs{\@glo@short}{glo@\glsdetoklabel{#1}@short}% + \ifdefempty\@glo@short {#3}% {% - \expandafter\ifx\csname glo@#1@short\endcsname\@gls@default@value - #3% - \else - #2% - \fi + \ifdefequal\@glo@short\@gls@default@value + {#3}% + {#2}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\ifglshasfield} +%\changes{4.03}{2014-01-20}{new} +%\begin{definition} +%\cs{ifglshasfield}\marg{field}\marg{label}\marg{true part}\marg{false +%part} +%\end{definition} +% \begin{macrocode} +\newcommand*{\ifglshasfield}[4]{% + \glsdoifexists{#2}% + {% + \letcs{\@glo@thisvalue}{glo@\glsdetoklabel{#2}@#1}% +% \end{macrocode} +% First check supplied field label is defined. +% \begin{macrocode} + \ifdef\@glo@thisvalue + {% +% \end{macrocode} +% Is defined, so now check if empty. +% \begin{macrocode} + \ifdefempty\@glo@thisvalue + {% +% \end{macrocode} +% Is empty, so doesn't have field set. +% \begin{macrocode} + #4% + }% + {% +% \end{macrocode} +% Not empty, so check if set to \cs{@gls@default@value} +% \begin{macrocode} + \ifdefequal\@glo@thisvalue\@gls@default@value{#4}{#3}% + }% + }% + {% +% \end{macrocode} +% Field given isn't defined, so check if mapping exists. +% \begin{macrocode} + \@gls@fetchfield{\@gls@thisfield}{#1}% +% \end{macrocode} +% If \cs{@gls@thisfield} is defined, we've found a map. If not, the +% field supplied doesn't exist. +% \begin{macrocode} + \ifdef\@gls@thisfield + {% +% \end{macrocode} +% Is defined, so now check if empty. +% \begin{macrocode} + \letcs{\@glo@thisvalue}{glo@\glsdetoklabel{#2}@\@gls@thisfield}% + \ifdefempty\@glo@thisvalue + {% +% \end{macrocode} +% Is empty so field hasn't been set. +% \begin{macrocode} + #4% + }% + {% +% \end{macrocode} +% Isn't empty so check if it's been set to \cs{@gls@default@value}. +% \begin{macrocode} + \ifdefequal\@glo@thisvalue\@gls@default@value{#4}{#3}% + }% + }% + {% +% \end{macrocode} +% Not defined. +% \begin{macrocode} + \GlossariesWarning{Unknown entry field `#1'}% + #4% + }% + }% }% } % \end{macrocode} @@ -4251,13 +4383,15 @@ name=true]{% %\begin{macro}{\@gls@writedef} %\changes{3.10a}{2013-10-13}{new} % Writes glossary entry definition to \cs{@gls@deffile}. +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\@gls@writedef}[1]{% \immediate\write\@gls@deffile {% \string\ifglsentryexists{#1}{}\expandafter\@gobble\string\%^^J% \expandafter\@gobble\string\{\expandafter\@gobble\string\%^^J% - \string\gls@defglossaryentry{#1}\expandafter\@gobble\string\%^^J% + \string\gls@defglossaryentry{\glsdetoklabel{#1}}\expandafter + \@gobble\string\%^^J% \expandafter\@gobble\string\{\expandafter\@gobble\string\%% }% % \end{macrocode} @@ -4266,7 +4400,8 @@ name=true]{% \@for\@gls@map:=\@gls@keymap\do {% \edef\glo@value{\expandafter\expandonce - \csname glo@#1@\expandafter\@secondoftwo\@gls@map\endcsname}% + \csname glo@\glsdetoklabel{#1}@\expandafter + \@secondoftwo\@gls@map\endcsname}% \@onelevel@sanitize\glo@value \immediate\write\@gls@deffile {% @@ -4322,6 +4457,42 @@ name=true]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@fetchfield} +%\changes{4.03}{2014-01-20}{new} +%\begin{definition} +%\cs{@gls@fetchfield}\marg{cs}\marg{field} +%\end{definition} +% Fetches the internal field label from the given user \meta{field} and +% stores in \meta{cs}. +% \begin{macrocode} +\newcommand*{\@gls@fetchfield}[2]{% +% \end{macrocode} +% Ensure user field name is fully expanded +% \begin{macrocode} + \edef\@gls@thisval{#2}% +% \end{macrocode} +% Iterate through known mappings until we find the one for this +% field. +% \begin{macrocode} + \@for\@gls@map:=\@gls@keymap\do{% + \edef\@this@key{\expandafter\@firstoftwo\@gls@map}% + \ifdefequal{\@this@key}{\@gls@thisval}% + {% +% \end{macrocode} +% Found it. +% \begin{macrocode} + \edef#1{\expandafter\@secondoftwo\@gls@map}% +% \end{macrocode} +% Break out of loop. +% \begin{macrocode} + \@endfortrue + }% + {}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaddkey} %\begin{definition} %\cs{glsaddkey}\marg{key}\marg{default value}\marg{no link cs}\marg{no link ucfirst @@ -4373,14 +4544,12 @@ name=true]{% % \end{macrocode} % Define the no-link commands. % \begin{macrocode} - \newcommand*{#3}[1]{\csuse{glo@##1@#1}}% - \newcommand*{#4}[1]{% - \letcs{\@glo@text}{glo@##1@#1}% - \xmakefirstuc\@glo@text - }% + \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + \newcommand*{#4}[1]{\@Gls@entry@field{##1}{#1}}% % \end{macrocode} % Now for the commands with links. First the version with no case % change: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@field@link}} % \begin{macrocode} \ifcsdef{@gls@user@#1@}% {% @@ -4401,11 +4570,7 @@ name=true]{% {\csuse{@gls@user@#1@}{##1}{##2}}% {\csuse{@gls@user@#1@}{##1}{##2}[]}}% \csdef{@gls@user@#1@}##1##2[##3]{% - \glsdoifexists{##2}% - {% - \edef\@glo@type{\glsentrytype{##2}}% - \@gls@link[##1]{##2}{#3{##2}##3}% - }% + \@gls@field@link{##1}{##2}{#3{##2}##3}% }% }% % \end{macrocode} @@ -4430,11 +4595,7 @@ name=true]{% {\csuse{@Gls@user@#1@}{##1}{##2}}% {\csuse{@Gls@user@#1@}{##1}{##2}[]}}% \csdef{@Gls@user@#1@}##1##2[##3]{% - \glsdoifexists{##2}% - {% - \edef\@glo@type{\glsentrytype{##2}}% - \@gls@link[##1]{##2}{#4{##2}##3}% - }% + \@gls@field@link{##1}{##2}{#4{##2}##3}% }% }% % \end{macrocode} @@ -4459,11 +4620,7 @@ name=true]{% {\csuse{@GLS@user@#1@}{##1}{##2}}% {\csuse{@GLS@user@#1@}{##1}{##2}[]}}% \csdef{@GLS@user@#1@}##1##2[##3]{% - \glsdoifexists{##2}% - {% - \edef\@glo@type{\glsentrytype{##2}}% - \@gls@link[##1]{##2}{\mfirstucMakeUppercase{#3{##2}##3}}% - }% + \@gls@field@link{##1}{##2}{\mfirstucMakeUppercase{#3{##2}##3}}% }% }% }% @@ -4502,8 +4659,8 @@ name=true]{% \@org@newglossaryentryprehook }% \renewcommand*{\gls@assign@desc}[1]{% - \global\cslet{glo@#1@desc}{\@glo@desc}% - \global\cslet{glo@#1@descplural}{\@glo@desc}% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@desc}% } \gls@defglossaryentry{#1}{#2}% \egroup @@ -4537,15 +4694,16 @@ name=true]{% %\end{definition} % Defines a new entry without checking if it already exists. %\changes{3.10a}{2013-10-13}{new} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand{\gls@defglossaryentry}[2]{% % \end{macrocode} % Store label % \begin{macrocode} - \def\@glo@label{#1}% + \edef\@glo@label{\glsdetoklabel{#1}}% % \end{macrocode} % \changes{3.12a}{2013-10-16}{added \cs{glslabel}} -% Provide a means for user define keys to reference the label: +% Provide a means for user defined keys to reference the label: % \begin{macrocode} \let\glslabel\@glo@label % \end{macrocode} @@ -4650,9 +4808,10 @@ name=true]{% {}% % \end{macrocode} % Assign type. This must be fully expandable +%\changes{4.03}{2014-01-20}{replaced \#1 with \cs{@glo@label}} % \begin{macrocode} - \gls@assign@field{\glsdefaulttype}{#1}{type}{\@glo@type}% - \edef\@glo@type{\glsentrytype{#1}}% + \gls@assign@field{\glsdefaulttype}{\@glo@label}{type}{\@glo@type}% + \edef\@glo@type{\glsentrytype{\@glo@label}}% % \end{macrocode} % Check to see if this glossary type has been defined, if it has, % add this label to the relevant list, otherwise generate an error. @@ -4668,7 +4827,8 @@ name=true]{% }% {% \protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% - \expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% + \expandafter\xdef\csname glolist@\@glo@type\endcsname{% + \@glolist@{\@glo@label},}% }% % \end{macrocode} % Initialise level to 0. @@ -4682,16 +4842,18 @@ name=true]{% % Doesn't have a parent. Set \cs{glo@}\meta{label}"@parent" to % empty. % \begin{macrocode} - \expandafter\gdef\csname glo@#1@parent\endcsname{}% + \expandafter\gdef\csname glo@\@glo@label @parent\endcsname{}% \else % \end{macrocode} % Has a parent. Check to ensure this entry isn't its own parent. +%\changes{4.03}{2014-01-20}{replaced \cs{ifthenelse} with +%\cs{ifdefequal}} % \begin{macrocode} - \ifthenelse{\equal{#1}{\@glo@parent}}% + \ifdefequal\@glo@label\@glo@parent% {% - \PackageError{glossaries}{Entry `#1' can't be its own parent}{}% + \PackageError{glossaries}{Entry `\@glo@label' can't be its own parent}{}% \def\@glo@parent{}% - \expandafter\gdef\csname glo@#1@parent\endcsname{}% + \expandafter\gdef\csname glo@\@glo@label @parent\endcsname{}% }% {% % \end{macrocode} @@ -4702,7 +4864,8 @@ name=true]{% % \end{macrocode} % Parent exists. Set \cs{glo@}\meta{label}"@parent". % \begin{macrocode} - \expandafter\xdef\csname glo@#1@parent\endcsname{\@glo@parent}% + \expandafter\xdef\csname glo@\@glo@label @parent\endcsname{% + \@glo@parent}% % \end{macrocode} % Determine level. % \begin{macrocode} @@ -4731,32 +4894,32 @@ name=true]{% \PackageError{glossaries}% {% Invalid parent `\@glo@parent' - for entry `#1' - parent doesn't exist% + for entry `\@glo@label' - parent doesn't exist% }% {% Parent entries must be defined before their children% }% \def\@glo@parent{}% - \expandafter\gdef\csname glo@#1@parent\endcsname{}% + \expandafter\gdef\csname glo@\@glo@label @parent\endcsname{}% }% }% \fi % \end{macrocode} % Set the level for this entry % \begin{macrocode} - \expandafter\xdef\csname glo@#1@level\endcsname{\number\gls@level}% + \expandafter\xdef\csname glo@\@glo@label @level\endcsname{\number\gls@level}% % \end{macrocode} % Define commands associated with this entry: % \begin{macrocode} - \gls@assign@field{\@glo@name}{#1}{sortvalue}{\@glo@sort}% - \letcs\@glo@sort{glo@#1@sortvalue}% - \gls@assign@field{\@glo@name}{#1}{text}{\@glo@text}% + \gls@assign@field{\@glo@name}{\@glo@label}{sortvalue}{\@glo@sort}% + \letcs\@glo@sort{glo@\@glo@label @sortvalue}% + \gls@assign@field{\@glo@name}{\@glo@label}{text}{\@glo@text}% \expandafter\gls@assign@field\expandafter - {\csname glo@#1@text\endcsname\glspluralsuffix}% - {#1}{plural}{\@glo@plural}% + {\csname glo@\@glo@label @text\endcsname\glspluralsuffix}% + {\@glo@label}{plural}{\@glo@plural}% \expandafter\gls@assign@field\expandafter - {\csname glo@#1@text\endcsname}% - {#1}{first}{\@glo@first}% + {\csname glo@\@glo@label @text\endcsname}% + {\@glo@label}{first}{\@glo@first}% % \end{macrocode} %\changes{3.14a}{2013-11-12}{set the default for firstplural to be the value %of plural} @@ -4767,12 +4930,12 @@ name=true]{% % \begin{macrocode} \ifx\@glo@first\@gls@default@value \expandafter\gls@assign@field\expandafter - {\csname glo@#1@plural\endcsname}% - {#1}{firstpl}{\@glo@firstplural}% + {\csname glo@\@glo@label @plural\endcsname}% + {\@glo@label}{firstpl}{\@glo@firstplural}% \else \expandafter\gls@assign@field\expandafter - {\csname glo@#1@first\endcsname\glspluralsuffix}% - {#1}{firstpl}{\@glo@firstplural}% + {\csname glo@\@glo@label @first\endcsname\glspluralsuffix}% + {\@glo@label}{firstpl}{\@glo@firstplural}% \fi % \end{macrocode} %\changes{3.11a}{2013-10-15}{Fixed default counter if none supplied} @@ -4784,29 +4947,30 @@ name=true]{% {% \letcs\@glo@defaultcounter{@glotype@\@glo@type @counter}% }% - \gls@assign@field{\@glo@defaultcounter}{#1}{counter}{\@glo@counter}% - \gls@assign@field{}{#1}{useri}{\@glo@useri}% - \gls@assign@field{}{#1}{userii}{\@glo@userii}% - \gls@assign@field{}{#1}{useriii}{\@glo@useriii}% - \gls@assign@field{}{#1}{useriv}{\@glo@useriv}% - \gls@assign@field{}{#1}{userv}{\@glo@userv}% - \gls@assign@field{}{#1}{uservi}{\@glo@uservi}% - \gls@assign@field{}{#1}{short}{\@glo@short}% - \gls@assign@field{}{#1}{shortpl}{\@glo@shortpl}% - \gls@assign@field{}{#1}{long}{\@glo@long}% - \gls@assign@field{}{#1}{longpl}{\@glo@longpl}% + \gls@assign@field{\@glo@defaultcounter}{\@glo@label}{counter}{\@glo@counter}% + \gls@assign@field{}{\@glo@label}{useri}{\@glo@useri}% + \gls@assign@field{}{\@glo@label}{userii}{\@glo@userii}% + \gls@assign@field{}{\@glo@label}{useriii}{\@glo@useriii}% + \gls@assign@field{}{\@glo@label}{useriv}{\@glo@useriv}% + \gls@assign@field{}{\@glo@label}{userv}{\@glo@userv}% + \gls@assign@field{}{\@glo@label}{uservi}{\@glo@uservi}% + \gls@assign@field{}{\@glo@label}{short}{\@glo@short}% + \gls@assign@field{}{\@glo@label}{shortpl}{\@glo@shortpl}% + \gls@assign@field{}{\@glo@label}{long}{\@glo@long}% + \gls@assign@field{}{\@glo@label}{longpl}{\@glo@longpl}% \ifx\@glo@name\@glsnoname \@glsnoname \let\@gloname\@gls@default@value \fi - \gls@assign@field{}{#1}{name}{\@glo@name}% + \gls@assign@field{}{\@glo@label}{name}{\@glo@name}% % \end{macrocode} %\changes{3.02}{2012/05/21}{added numberlist element} % Set default numberlist if not defined: % \begin{macrocode} - \ifcsundef{glo@#1@numberlist}% + \ifcsundef{glo@\@glo@label @numberlist}% {% - \csxdef{glo@#1@numberlist}{\noexpand\@gls@missingnumberlist{\@glo@label}}% + \csxdef{glo@\@glo@label @numberlist}{% + \noexpand\@gls@missingnumberlist{\@glo@label}}% }% {}% % \end{macrocode} @@ -4823,14 +4987,14 @@ name=true]{% \@glsnodesc \let\@glodesc\@gls@default@value \fi - \gls@assign@desc{#1}% + \gls@assign@desc{\@glo@label}% % \end{macrocode} %\changes{1.18}{2009 January 14}{moved sort sanitization to % \cs{newglossaryentry}} %\changes{3.0}{2011/04/02}{added \cs{@gls@defsort}} % Set the sort key for this entry: % \begin{macrocode} - \@gls@defsort{\@glo@type}{#1}% + \@gls@defsort{\@glo@type}{\@glo@label}% % \end{macrocode} %\changes{1.15}{2008 August 15}{check for \cs{@glo@text} in symbol}% % \begin{macrocode} @@ -4838,24 +5002,26 @@ name=true]{% \ifx\@glo@symbol\@glo@@symbol \let\@glo@symbol\@glo@text \fi - \gls@assign@field{\relax}{#1}{symbol}{\@glo@symbol}% + \gls@assign@field{\relax}{\@glo@label}{symbol}{\@glo@symbol}% \expandafter \gls@assign@field\expandafter - {\csname glo@#1@symbol\endcsname} - {#1}{symbolplural}{\@glo@symbolplural}% + {\csname glo@\@glo@label @symbol\endcsname} + {\@glo@label}{symbolplural}{\@glo@symbolplural}% % \end{macrocode} % Define an associated boolean variable to determine whether this % entry has been used yet (needs to be defined globally): % \begin{macrocode} - \expandafter\gdef\csname glo@#1@flagfalse\endcsname{% - \expandafter\global\expandafter - \let\csname ifglo@#1@flag\endcsname\iffalse + \expandafter\xdef\csname glo@\@glo@label @flagfalse\endcsname{% + \noexpand\global + \noexpand\let\expandafter\noexpand + \csname ifglo@\@glo@label @flag\endcsname\noexpand\iffalse }% - \expandafter\gdef\csname glo@#1@flagtrue\endcsname{% - \expandafter\global\expandafter - \let\csname ifglo@#1@flag\endcsname\iftrue + \expandafter\xdef\csname glo@\@glo@label @flagtrue\endcsname{% + \noexpand\global + \noexpand\let\expandafter\noexpand + \csname ifglo@\@glo@label @flag\endcsname\noexpand\iftrue }% - \csname glo@#1@flagfalse\endcsname + \csname glo@\@glo@label @flagfalse\endcsname % \end{macrocode} % Sort out any cross-referencing if required. % \begin{macrocode} @@ -4864,7 +5030,7 @@ name=true]{% \protected@edef\@do@glssee{% \noexpand\@gls@fixbraces\noexpand\@glo@list\@glo@see \noexpand\@nil - \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{#1}}% + \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{\@glo@label}}% \@do@glssee \fi % \end{macrocode} @@ -4873,7 +5039,7 @@ name=true]{% % format when entry % is defined}% % \begin{macrocode} - \do@glo@storeentry{#1}% + \do@glo@storeentry{\@glo@label}% % \end{macrocode} % Add end hook in case another package wants to add extra keys. % \begin{macrocode} @@ -4902,16 +5068,23 @@ name=true]{% %\changes{3.02}{2012/05/21}{new} % Moves entry whose label is given by first argument to the glossary % named in the second argument. +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\glsmoveentry}[2]{% - \edef\glo@type{\csname glo@#1@type\endcsname}% + \edef\@glo@thislabel{\glsdetoklabel{#1}}% + \edef\glo@type{\csname glo@\@glo@thislabel @type\endcsname}% \def\glo@list{,}% \forglsentries[\glo@type]{\glo@label}% {% - \ifthenelse{\equal{\glo@label}{#1}}{}{\eappto\glo@list{\glo@label,}}% +% \end{macrocode} +%\changes{4.03}{2014-01-20}{replaced \cs{ifthenelse} with +%\cs{ifdefequal}} +% \begin{macrocode} + \ifdefequal\@glo@thislabel\glo@label + {}{\eappto\glo@list{\glo@label,}}% }% \cslet{glolist@\glo@type}{\glo@list}% - \csdef{glo@#1@type}{#2}% + \csdef{glo@\@glo@thislabel @type}{#2}% } % \end{macrocode} %\end{macro} @@ -4955,17 +5128,18 @@ name=true]{% %\changes{1.17}{2008 December 26}{new} % Determine the format to write the entry in the glossary % output (\filetype{.glo}) file. -% The argument is the entry's label. +% The argument is the entry's label (should already have been +% de-tok'ed if required). % The result is stored in \cs{glo@}\meta{label}"@entry", where % \meta{label} is the entry's label. (This doesn't include % any formatting or location information.) % \begin{macrocode} \newcommand{\@glo@storeentry}[1]{% % \end{macrocode} -% Escape special characters in the label: +% Escape makeindex/xindy special characters in the label: % \begin{macrocode} - \def\@glo@label{#1}% - \@gls@checkmkidxchars\@glo@label + \edef\@glo@esclabel{#1}% + \@gls@checkmkidxchars\@glo@esclabel % \end{macrocode} % Get the sort string and escape any special characters % \begin{macrocode} @@ -4996,7 +5170,7 @@ name=true]{% % \begin{macrocode} \expandafter\protected@xdef\csname glo@#1@index\endcsname{% (\string"\@glo@sort\string" % - \string"\@glo@prefix\@glossaryentryfield{\@glo@label}\string") % + \string"\@glo@prefix\@glossaryentryfield{\@glo@esclabel}\string") % }% \else % \end{macrocode} @@ -5006,7 +5180,7 @@ name=true]{% \csname glo@\@glo@parent @index\endcsname (\string"\@glo@sort\string" % \string"\@glo@prefix\@glossarysubentryfield - {\csname glo@#1@level\endcsname}{\@glo@label}\string") % + {\csname glo@#1@level\endcsname}{\@glo@esclabel}\string") % }% \fi \else @@ -5023,7 +5197,7 @@ name=true]{% % \begin{macrocode} \expandafter\protected@xdef\csname glo@#1@index\endcsname{% \@glo@sort\@gls@actualchar\@glo@prefix - \@glossaryentryfield{\@glo@label}% + \@glossaryentryfield{\@glo@esclabel}% }% \else % \end{macrocode} @@ -5033,7 +5207,7 @@ name=true]{% \csname glo@\@glo@parent @index\endcsname\@gls@levelchar \@glo@sort\@gls@actualchar\@glo@prefix \@glossarysubentryfield - {\csname glo@#1@level\endcsname}{\@glo@label}% + {\csname glo@#1@level\endcsname}{\@glo@esclabel}% }% \fi \fi @@ -5072,13 +5246,14 @@ name=true]{% % The command \cs{glsreset}\marg{label} can be used % to set the entry flag to indicate that it hasn't been used yet. The % required argument is the entry label. +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\glsreset}[1]{% \gls@ifnotmeasuring {% \glsdoifexists{#1}% {% - \expandafter\global\csname glo@#1@flagfalse\endcsname + \expandafter\global\csname glo@\glsdetoklabel{#1}@flagfalse\endcsname }% }% } @@ -5087,13 +5262,14 @@ name=true]{% % %\begin{macro}{\glslocalreset} % As above, but with only a local effect: +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\glslocalreset}[1]{% \gls@ifnotmeasuring {% \glsdoifexists{#1}% {% - \expandafter\let\csname ifglo@#1@flag\endcsname\iffalse + \expandafter\let\csname ifglo@\glsdetoklabel{#1}@flag\endcsname\iffalse }% }% } @@ -5103,13 +5279,14 @@ name=true]{% % The command \cs{glsunset}\marg{label} can be used to % set the entry flag to indicate that it has been used. The required % argument is the entry label. +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\glsunset}[1]{% \gls@ifnotmeasuring {% \glsdoifexists{#1}% {% - \expandafter\global\csname glo@#1@flagtrue\endcsname + \expandafter\global\csname glo@\glsdetoklabel{#1}@flagtrue\endcsname }% }% } @@ -5118,13 +5295,14 @@ name=true]{% % %\begin{macro}{\glslocalunset} % As above, but with only a local effect: +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\glslocalunset}[1]{% \gls@ifnotmeasuring {% \glsdoifexists{#1}% {% - \expandafter\let\csname ifglo@#1@flag\endcsname\iftrue + \expandafter\let\csname ifglo@\glsdetoklabel{#1}@flag\endcsname\iftrue }% }% } @@ -5906,7 +6084,7 @@ name=true]{% % number. % \begin{macrocode} \define@key{glslink}{format}{% -\def\@glsnumberformat{#1}} + \def\@glsnumberformat{#1}} % \end{macrocode} % The \gloskey[glslink]{hyper} key is a boolean key, it can either have the % value true or false, and indicates whether or not to make a @@ -5988,18 +6166,28 @@ name=true]{% % Inserting \cs{leavevmode} suggested by Donald~Arseneau (avoids % problem with tabularx). %\changes{2.03}{2009 Sep 23}{added \cs{leavevmode}} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \leavevmode - \def\glslabel{#2}% + \edef\glslabel{\glsdetoklabel{#2}}% +% \end{macrocode} +% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} +%\changes{4.03}{2014-01-20}{moved \cs{@gls@link@opts} and +%\cs{@gls@link@label} to \cs{@gls@link}} +% \begin{macrocode} + \def\@gls@link@opts{#1}% + \let\@gls@link@label\glslabel +% \end{macrocode} +% \begin{macrocode} \def\@glsnumberformat{glsnumberformat}% - \edef\@gls@counter{\csname glo@#2@counter\endcsname}% + \edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}% % \end{macrocode} %\changes{3.05}{2013-04-21}{added check for ``nohypertypes''}% %\changes{3.07}{2013-07-05}{fixed bug that failed to find entry in list}% % If this is in one of the ``nohypertypes'' glossaries, suppress the % hyperlink by default % \begin{macrocode} - \edef\gls@type{\csname glo@#2@type\endcsname}% + \edef\gls@type{\csname glo@\glslabel @type\endcsname}% \expandafter\DTLifinlist\expandafter {\gls@type}{\@gls@nohyperlist}% {% @@ -6018,14 +6206,15 @@ name=true]{% %\changes{3.0}{2011/04/02}{added \cs{@gls@setsort}} % Define sort key if necessary: % \begin{macrocode} - \@gls@setsort{#2}% + \@gls@setsort{\glslabel}% % \end{macrocode} %\changes{2.01}{2009 May 30}{moved \cs{@do@wrglossary} before term is displayed % to prevent unwanted whatsit} +% (De-tok'ing done by \cs{@@do@wrglossary}) % \begin{macrocode} \@do@wrglossary{#2}% \ifKV@glslink@hyper - \@glslink{\glolinkprefix#2}{\glstextformat{#3}}% + \@glslink{\glolinkprefix\glslabel}{\glstextformat{#3}}% \else % \end{macrocode} %\changes{3.13a}{2013-11-05}{removed \cs{relax}} @@ -6208,7 +6397,7 @@ name=true]{% } % \end{macrocode} %\end{macro} -% Catch special characters\mkidxspch (argument must be a +% Catch special characters\mkidxspch\ (argument must be a % control sequence): %\begin{macro}{\@gls@checkmkidxchars} % \begin{macrocode} @@ -6677,15 +6866,11 @@ name=true]{% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} - \def\@gls@link@opts{#1}% - \def\@gls@link@label{#2}% -% \end{macrocode} %\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glscustomtext\@empty @@ -6770,12 +6955,8 @@ name=true]{% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} - \def\@gls@link@opts{#1}% - \def\@gls@link@label{#2}% - \def\glslabel{#2}% -% \end{macrocode} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} %\changes{3.11a}{2013-10-15}{add \cs{glsifplural}, % \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}} % \begin{macrocode} @@ -6863,15 +7044,11 @@ name=true]{% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} - \def\@gls@link@opts{#1}% - \def\@gls@link@label{#2}% -% \end{macrocode} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} %\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree \let\glscustomtext\@empty @@ -6954,15 +7131,11 @@ name=true]{% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} - \def\@gls@link@opts{#1}% - \def\@gls@link@label{#2}% -% \end{macrocode} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} %\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree \let\glscustomtext\@empty @@ -7049,12 +7222,8 @@ name=true]{% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} - \def\@gls@link@opts{#1}% - \def\@gls@link@label{#2}% - \def\glslabel{#2}% -% \end{macrocode} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} %\changes{3.11a}{2013-10-15}{add \cs{glsifplural}, % \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}} % \begin{macrocode} @@ -7146,15 +7315,11 @@ name=true]{% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} - \def\@gls@link@opts{#1}% - \def\@gls@link@label{#2}% -% \end{macrocode} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} %\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree \let\glscustomtext\@empty @@ -7244,15 +7409,11 @@ name=true]{% % \begin{macrocode} \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} -% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} -% \begin{macrocode} - \def\@gls@link@opts{#1}% - \def\@gls@link@label{#2}% -% \end{macrocode} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} %\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \def\glscustomtext{#3}% @@ -7306,6 +7467,19 @@ name=true]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@field@link} +%\changes{4.03}{2014-01-20}{new} +% \begin{macrocode} +\newcommand{\@gls@field@link}[3]{% + \glsdoifexists{#2}% + {% + \edef\@glo@type{\glsentrytype{#2}}% + \@gls@link[#1]{#2}{#3}% + }% +} +% \end{macrocode} +%\end{macro} +% % \cs{glstext} behaves like \ics{gls} except it always uses the value % given by the \gloskey{text} key and it doesn't mark the entry as % used. @@ -7326,18 +7500,11 @@ name=true]{% \new@ifnextchar[{\@glstext@{#1}{#2}}{\@glstext@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glstext@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrytext}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentrytext{#2}#3}% - }% +\def\@glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentrytext{#2}#3}% } % \end{macrocode} % @@ -7359,17 +7526,10 @@ name=true]{% \new@ifnextchar[{\@GLStext@{#1}{#2}}{\@GLStext@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLStext@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrytext{#2}#3}}% - }% +\def\@GLStext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrytext{#2}#3}}% } % \end{macrocode} % @@ -7392,18 +7552,11 @@ name=true]{% \new@ifnextchar[{\@Glstext@{#1}{#2}}{\@Glstext@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glstext@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{Changed to just use \cs{Glsentrytext}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentrytext{#2}#3}% - }% +\def\@Glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentrytext{#2}#3}% } % \end{macrocode} % @@ -7427,18 +7580,11 @@ name=true]{% \new@ifnextchar[{\@glsfirst@{#1}{#2}}{\@glsfirst@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsfirst@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryfirst}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryfirst{#2}#3}% - }% +\def\@glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryfirst{#2}#3}% } % \end{macrocode} % @@ -7460,17 +7606,11 @@ name=true]{% \new@ifnextchar[{\@Glsfirst@{#1}{#2}}{\@Glsfirst@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsfirst@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryfirst}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryfirst{#2}#3}}% +\def\@Glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryfirst{#2}#3}% } % \end{macrocode} % @@ -7492,19 +7632,11 @@ name=true]{% \new@ifnextchar[{\@GLSfirst@{#1}{#2}}{\@GLSfirst@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSfirst@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Determine what the link text should be (this is stored in -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryfirst}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryfirst{#2}#3}}% - }% +\def\@GLSfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryfirst{#2}#3}}% } % \end{macrocode} % @@ -7527,18 +7659,11 @@ name=true]{% \new@ifnextchar[{\@glsplural@{#1}{#2}}{\@glsplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryplural{#2}#3}% - }% +\def\@glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryplural{#2}#3}% } % \end{macrocode} % @@ -7560,18 +7685,11 @@ name=true]{% \new@ifnextchar[{\@Glsplural@{#1}{#2}}{\@Glsplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryplural{#2}#3}% - }% +\def\@Glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryplural{#2}#3}% } % \end{macrocode} % @@ -7594,18 +7712,11 @@ name=true]{% \new@ifnextchar[{\@GLSplural@{#1}{#2}}{\@GLSplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryplural{#2}#3}}% - }% +\def\@GLSplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryplural{#2}#3}}% } % \end{macrocode} % @@ -7629,19 +7740,12 @@ name=true]{% \new@ifnextchar[{\@glsfirstplural@{#1}{#2}}{\@glsfirstplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsfirstplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{glsentryfirstplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryfirstplural{#2}#3}% - }% +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryfirstplural{#2}#3}% } % \end{macrocode} % @@ -7664,19 +7768,12 @@ name=true]{% \new@ifnextchar[{\@Glsfirstplural@{#1}{#2}}{\@Glsfirstplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsfirstplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{Glsentryfirstplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryfirstplural{#2}#3}% - }% +\def\@Glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryfirstplural{#2}#3}% } % \end{macrocode} % @@ -7699,19 +7796,12 @@ name=true]{% \new@ifnextchar[{\@GLSfirstplural@{#1}{#2}}{\@GLSfirstplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSfirstplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{glsentryfirstplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryfirstplural{#2}#3}}% - }% +\def\@GLSfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryfirstplural{#2}#3}}% } % \end{macrocode} % @@ -7735,18 +7825,11 @@ name=true]{% \new@ifnextchar[{\@glsname@{#1}{#2}}{\@glsname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsname@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryname}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryname{#2}#3}% - }% +\def\@glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryname{#2}#3}% } % \end{macrocode} % @@ -7769,18 +7852,11 @@ name=true]{% \new@ifnextchar[{\@Glsname@{#1}{#2}}{\@Glsname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsname@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryname}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryname{#2}#3}% - }% +\def\@Glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryname{#2}#3}% } % \end{macrocode} % @@ -7803,18 +7879,11 @@ name=true]{% \new@ifnextchar[{\@GLSname@{#1}{#2}}{\@GLSname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSname@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryname}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryname{#2}#3}}% - }% +\def\@GLSname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryname{#2}#3}}% } % \end{macrocode} % @@ -7838,18 +7907,11 @@ name=true]{% \new@ifnextchar[{\@glsdesc@{#1}{#2}}{\@glsdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsdesc@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrydesc}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentrydesc{#2}#3}% - }% +\def\@glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentrydesc{#2}#3}% } % \end{macrocode} % @@ -7872,18 +7934,11 @@ name=true]{% \new@ifnextchar[{\@Glsdesc@{#1}{#2}}{\@Glsdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsdesc@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentrydesc}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentrydesc{#2}#3}% - }% +\def\@Glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentrydesc{#2}#3}% } % \end{macrocode} % @@ -7906,18 +7961,11 @@ name=true]{% \new@ifnextchar[{\@GLSdesc@{#1}{#2}}{\@GLSdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSdesc@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrydesc}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrydesc{#2}#3}}% - }% +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrydesc{#2}#3}}% } % \end{macrocode} % @@ -7941,19 +7989,12 @@ name=true]{% \new@ifnextchar[{\@glsdescplural@{#1}{#2}}{\@glsdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsdescplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{glsentrydescplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentrydescplural{#2}#3}% - }% +\def\@glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentrydescplural{#2}#3}% } % \end{macrocode} % @@ -7976,19 +8017,12 @@ name=true]{% \new@ifnextchar[{\@Glsdescplural@{#1}{#2}}{\@Glsdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsdescplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{Glsentrydescplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentrydescplural{#2}#3}% - }% +\def\@Glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentrydescplural{#2}#3}% } % \end{macrocode} % @@ -8011,19 +8045,12 @@ name=true]{% \new@ifnextchar[{\@GLSdescplural@{#1}{#2}}{\@GLSdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSdescplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{glsentrydescplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrydescplural{#2}#3}}% - }% +\def\@GLSdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrydescplural{#2}#3}}% } % \end{macrocode} % @@ -8047,18 +8074,11 @@ name=true]{% \new@ifnextchar[{\@glssymbol@{#1}{#2}}{\@glssymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glssymbol@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrysymbol}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentrysymbol{#2}#3}% - }% +\def\@glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentrysymbol{#2}#3}% } % \end{macrocode} % @@ -8081,18 +8101,11 @@ name=true]{% \new@ifnextchar[{\@Glssymbol@{#1}{#2}}{\@Glssymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glssymbol@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentrysymbol}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentrysymbol{#2}#3}% - }% +\def\@Glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentrysymbol{#2}#3}% } % \end{macrocode} % @@ -8115,18 +8128,11 @@ name=true]{% \new@ifnextchar[{\@GLSsymbol@{#1}{#2}}{\@GLSsymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSsymbol@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrysymbol}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrysymbol{#2}#3}}% - }% +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbol{#2}#3}}% } % \end{macrocode} % @@ -8150,19 +8156,12 @@ name=true]{% \new@ifnextchar[{\@glssymbolplural@{#1}{#2}}{\@glssymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glssymbolplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{glsentrysymbolplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentrysymbolplural{#2}#3}% - }% +\def\@glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentrysymbolplural{#2}#3}% } % \end{macrocode} % @@ -8185,19 +8184,12 @@ name=true]{% \new@ifnextchar[{\@Glssymbolplural@{#1}{#2}}{\@Glssymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glssymbolplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{Glsentrysymbolplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentrysymbolplural{#2}#3}% - }% +\def\@Glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentrysymbolplural{#2}#3}% } % \end{macrocode} % @@ -8220,18 +8212,12 @@ name=true]{% \new@ifnextchar[{\@GLSsymbolplural@{#1}{#2}}{\@GLSsymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSsymbolplural@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} +%\changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter} %\changes{3.11a}{2013-10-15}{changed to just use %\cs{glsentrysymbolplural}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}#3}}% - }% +\def\@GLSsymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}#3}}% } % \end{macrocode} % @@ -8255,17 +8241,10 @@ name=true]{% \new@ifnextchar[{\@glsuseri@{#1}{#2}}{\@glsuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsuseri@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseri}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryuseri{#2}#3}% - }% +\def\@glsuseri@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryuseri{#2}#3}% } % \end{macrocode} % @@ -8288,17 +8267,10 @@ name=true]{% \new@ifnextchar[{\@Glsuseri@{#1}{#2}}{\@Glsuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsuseri@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuseri}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryuseri{#2}#3}% - }% +\def\@Glsuseri@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryuseri{#2}#3}% } % \end{macrocode} % @@ -8321,17 +8293,10 @@ name=true]{% \new@ifnextchar[{\@GLSuseri@{#1}{#2}}{\@GLSuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSuseri@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseri}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}% - }% +\def\@GLSuseri@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}% } % \end{macrocode} % @@ -8355,17 +8320,10 @@ name=true]{% \new@ifnextchar[{\@glsuserii@{#1}{#2}}{\@glsuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsuserii@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuserii}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryuserii{#2}#3}% - }% +\def\@glsuserii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryuserii{#2}#3}% } % \end{macrocode} % @@ -8388,17 +8346,10 @@ name=true]{% \new@ifnextchar[{\@Glsuserii@{#1}{#2}}{\@Glsuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsuserii@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuserii}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryuserii{#2}#3}% - }% +\def\@Glsuserii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryuserii{#2}#3}% } % \end{macrocode} % @@ -8421,17 +8372,10 @@ name=true]{% \new@ifnextchar[{\@GLSuserii@{#1}{#2}}{\@GLSuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSuserii@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuserii}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}% - }% +\def\@GLSuserii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}% } % \end{macrocode} % @@ -8455,17 +8399,10 @@ name=true]{% \new@ifnextchar[{\@glsuseriii@{#1}{#2}}{\@glsuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsuseriii@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseriii}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryuseriii{#2}#3}% - }% +\def\@glsuseriii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryuseriii{#2}#3}% } % \end{macrocode} % @@ -8488,17 +8425,10 @@ name=true]{% \new@ifnextchar[{\@Glsuseriii@{#1}{#2}}{\@Glsuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsuseriii@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuseriii}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryuseriii{#2}#3}% - }% +\def\@Glsuseriii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryuseriii{#2}#3}% } % \end{macrocode} % @@ -8521,17 +8451,10 @@ name=true]{% \new@ifnextchar[{\@GLSuseriii@{#1}{#2}}{\@GLSuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSuseriii@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseriii}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}% - }% +\def\@GLSuseriii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}% } % \end{macrocode} % @@ -8555,16 +8478,10 @@ name=true]{% \new@ifnextchar[{\@glsuseriv@{#1}{#2}}{\@glsuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsuseriv@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseriv}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryuseriv{#2}#3}% - }% +\def\@glsuseriv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryuseriv{#2}#3}% } % \end{macrocode} % @@ -8587,17 +8504,10 @@ name=true]{% \new@ifnextchar[{\@Glsuseriv@{#1}{#2}}{\@Glsuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsuseriv@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuseriv}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryuseriv{#2}#3}% - }% +\def\@Glsuseriv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryuseriv{#2}#3}% } % \end{macrocode} % @@ -8620,17 +8530,10 @@ name=true]{% \new@ifnextchar[{\@GLSuseriv@{#1}{#2}}{\@GLSuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSuseriv@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseriv}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}% - }% +\def\@GLSuseriv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}% } % \end{macrocode} % @@ -8654,17 +8557,10 @@ name=true]{% \new@ifnextchar[{\@glsuserv@{#1}{#2}}{\@glsuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsuserv@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuserv}} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryuserv{#2}#3}% - }% +\def\@glsuserv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryuserv{#2}#3}% } % \end{macrocode} % @@ -8687,17 +8583,10 @@ name=true]{% \new@ifnextchar[{\@Glsuserv@{#1}{#2}}{\@Glsuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsuserv@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuserv}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryuserv{#2}#3}% - }% +\def\@Glsuserv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryuserv{#2}#3}% } % \end{macrocode} % @@ -8720,17 +8609,10 @@ name=true]{% \new@ifnextchar[{\@GLSuserv@{#1}{#2}}{\@GLSuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSuserv@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuserv}} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}% - }% +\def\@GLSuserv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}% } % \end{macrocode} % @@ -8754,17 +8636,10 @@ name=true]{% \new@ifnextchar[{\@glsuservi@{#1}{#2}}{\@glsuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@glsuservi@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuservi}} -% Call \cs{@gls@link} % \begin{macrocode} - \@gls@link[#1]{#2}{\glsentryuservi{#2}#3}% - }% +\def\@glsuservi@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsentryuservi{#2}#3}% } % \end{macrocode} % @@ -8787,17 +8662,10 @@ name=true]{% \new@ifnextchar[{\@Glsuservi@{#1}{#2}}{\@Glsuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@Glsuservi@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} -% Call \cs{@gls@link} %\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuservi}} % \begin{macrocode} - \@gls@link[#1]{#2}{\Glsentryuservi{#2}#3}% - }% +\def\@Glsuservi@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsentryuservi{#2}#3}% } % \end{macrocode} % @@ -8820,17 +8688,10 @@ name=true]{% \new@ifnextchar[{\@GLSuservi@{#1}{#2}}{\@GLSuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: -% \begin{macrocode} -\def\@GLSuservi@#1#2[#3]{% - \glsdoifexists{#2}% - {% - \edef\@glo@type{\glsentrytype{#2}}% -% \end{macrocode} %\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuservi}} -% Call \cs{@gls@link} % \begin{macrocode} - \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}% - }% +\def\@GLSuservi@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}% } % \end{macrocode} % @@ -8864,8 +8725,9 @@ name=true]{% % \end{macrocode} %\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty @@ -9414,6 +9276,33 @@ name=true]{% % These commands merely display entry information without adding % entries in the associated file or having hyperlinks. % +%\begin{macro}{\@gls@entry@field} +% Generic version. +%\changes{4.03}{2014-01-20}{new} +%\begin{definition} +%\cs{@gls@entry@field}\marg{label}\marg{field} +%\end{definition} +% \begin{macrocode} +\newcommand*{\@gls@entry@field}[2]{% + \csname glo@\glsdetoklabel{#1}@#2\endcsname +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Gls@entry@field} +% Generic first letter uppercase version. +%\changes{4.03}{2014-01-20}{new} +%\begin{definition} +%\cs{@Gls@entry@field}\marg{label}\marg{field} +%\end{definition} +% \begin{macrocode} +\newcommand*{\@Gls@entry@field}[2]{% + \letcs\@glo@text{glo@\glsdetoklabel{#1}@#2}% + \xmakefirstuc{\@glo@text}% +} +% \end{macrocode} +%\end{macro} +% % Get the entry name (as specified by the \gloskey{name} key % when the entry was defined). The argument % is the label associated with the entry. Note that unless you @@ -9422,15 +9311,14 @@ name=true]{% % any commands. %\begin{macro}{\glsentryname} % \begin{macrocode} -\newcommand*{\glsentryname}[1]{\csname glo@#1@name\endcsname} +\newcommand*{\glsentryname}[1]{\@gls@entry@field{#1}{name}} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryname} %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryname}[1]{% - \protected@edef\@glo@text{\csname glo@#1@name\endcsname}% - \expandafter\makefirstuc\expandafter{\@glo@text}% + \@Gls@entry@field{#1}{name}% } % \end{macrocode} %\end{macro} @@ -9443,15 +9331,14 @@ name=true]{% % key contained any commands. %\begin{macro}{\glsentrydesc} % \begin{macrocode} -\newcommand*{\glsentrydesc}[1]{\csname glo@#1@desc\endcsname} +\newcommand*{\glsentrydesc}[1]{\@gls@entry@field{#1}{desc}} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrydesc} %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentrydesc}[1]{% - \protected@edef\@glo@text{\csname glo@#1@desc\endcsname}% - \expandafter\makefirstuc\expandafter{\@glo@text}% + \@Gls@entry@field{#1}{desc}% } % \end{macrocode} %\end{macro} @@ -9460,7 +9347,8 @@ name=true]{% %\changes{1.12}{2008 Mar 8}{New} % \begin{macrocode} \newcommand*{\glsentrydescplural}[1]{% - \csname glo@#1@descplural\endcsname} + \@gls@entry@field{#1}{descplural}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrydescplural} @@ -9468,8 +9356,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentrydescplural}[1]{% -\protected@edef\@glo@text{\csname glo@#1@descplural\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{descplural}% +} % \end{macrocode} %\end{macro} % @@ -9478,49 +9366,50 @@ name=true]{% % is the label associated with the entry: %\begin{macro}{\glsentrytext} % \begin{macrocode} -\newcommand*{\glsentrytext}[1]{\csname glo@#1@text\endcsname} +\newcommand*{\glsentrytext}[1]{\@gls@entry@field{#1}{text}} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrytext} %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentrytext}[1]{% - \protected@edef\@glo@text{\csname glo@#1@text\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{text}% +} % \end{macrocode} %\end{macro} % % Get the plural form: %\begin{macro}{\glsentryplural} % \begin{macrocode} -\newcommand*{\glsentryplural}[1]{\csname glo@#1@plural\endcsname} +\newcommand*{\glsentryplural}[1]{% + \@gls@entry@field{#1}{plural}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryplural} %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryplural}[1]{% -\protected@edef\@glo@text{\csname glo@#1@plural\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{plural}% +} % \end{macrocode} %\end{macro} % % Get the symbol associated with this entry. The argument -% is the label associated with the entry. Note that unless you -% used \texttt{symbol=false} in the \pkgopt{sanitize} package -% option you may get unexpected results if the \gloskey{symbol} -% key contained any commands. +% is the label associated with the entry. %\begin{macro}{\glsentrysymbol} % \begin{macrocode} -\newcommand*{\glsentrysymbol}[1]{\csname glo@#1@symbol\endcsname} +\newcommand*{\glsentrysymbol}[1]{% + \@gls@entry@field{#1}{symbol}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrysymbol} %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentrysymbol}[1]{% -\protected@edef\@glo@text{\csname glo@#1@symbol\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{symbol}% +} % \end{macrocode} %\end{macro} % Plural form: @@ -9528,7 +9417,8 @@ name=true]{% %\changes{1.12}{2008 Mar 8}{New} % \begin{macrocode} \newcommand*{\glsentrysymbolplural}[1]{% - \csname glo@#1@symbolplural\endcsname} + \@gls@entry@field{#1}{symbolplural}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrysymbolplural} @@ -9536,8 +9426,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentrysymbolplural}[1]{% -\protected@edef\@glo@text{\csname glo@#1@symbolplural\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{symbolplural}% +} % \end{macrocode} %\end{macro} % @@ -9546,32 +9436,36 @@ name=true]{% % the entry was defined). %\begin{macro}{\glsentryfirst} % \begin{macrocode} -\newcommand*{\glsentryfirst}[1]{\csname glo@#1@first\endcsname} +\newcommand*{\glsentryfirst}[1]{% + \@gls@entry@field{#1}{first}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryfirst} %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryfirst}[1]{% -\protected@edef\@glo@text{\csname glo@#1@first\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{first}% +} % \end{macrocode} %\end{macro} % % Get the plural form (as specified by the \gloskey{firstplural} % key when the entry was defined). %\begin{macro}{\glsentryfirstplural} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\glsentryfirstplural}[1]{% - \csname glo@#1@firstpl\endcsname} + \@gls@entry@field{#1}{firstpl}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryfirstplural} %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryfirstplural}[1]{% -\protected@edef\@glo@text{\csname glo@#1@firstpl\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{firstpl}% +} % \end{macrocode} %\end{macro} % @@ -9580,7 +9474,7 @@ name=true]{% % defined) %\begin{macro}{\glsentrytype} % \begin{macrocode} -\newcommand*{\glsentrytype}[1]{\csname glo@#1@type\endcsname} +\newcommand*{\glsentrytype}[1]{\@gls@entry@field{#1}{type}} % \end{macrocode} %\end{macro} % @@ -9589,7 +9483,9 @@ name=true]{% % occur if the \gloskey{sort} key contained commands. %\begin{macro}{\glsentrysort} % \begin{macrocode} -\newcommand*{\glsentrysort}[1]{\csname glo@#1@sort\endcsname} +\newcommand*{\glsentrysort}[1]{% + \@gls@entry@field{#1}{sort}% +} % \end{macrocode} %\end{macro} % @@ -9599,7 +9495,9 @@ name=true]{% % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\newcommand*{\glsentryuseri}[1]{\csname glo@#1@useri\endcsname} +\newcommand*{\glsentryuseri}[1]{% + \@gls@entry@field{#1}{useri}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuseri} @@ -9607,8 +9505,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryuseri}[1]{% -\protected@edef\@glo@text{\csname glo@#1@useri\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{useri}% +} % \end{macrocode} %\end{macro} % @@ -9618,7 +9516,9 @@ name=true]{% % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\newcommand*{\glsentryuserii}[1]{\csname glo@#1@userii\endcsname} +\newcommand*{\glsentryuserii}[1]{% + \@gls@entry@field{#1}{userii}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuserii} @@ -9626,8 +9526,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryuserii}[1]{% -\protected@edef\@glo@text{\csname glo@#1@userii\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{userii}% +} % \end{macrocode} %\end{macro} % @@ -9637,7 +9537,9 @@ name=true]{% % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\newcommand*{\glsentryuseriii}[1]{\csname glo@#1@useriii\endcsname} +\newcommand*{\glsentryuseriii}[1]{% + \@gls@entry@field{#1}{useriii}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuseriii} @@ -9645,8 +9547,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryuseriii}[1]{% -\protected@edef\@glo@text{\csname glo@#1@useriii\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{useriii}% +} % \end{macrocode} %\end{macro} % @@ -9656,7 +9558,9 @@ name=true]{% % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\newcommand*{\glsentryuseriv}[1]{\csname glo@#1@useriv\endcsname} +\newcommand*{\glsentryuseriv}[1]{% + \@gls@entry@field{#1}{useriv}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuseriv} @@ -9664,8 +9568,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryuseriv}[1]{% -\protected@edef\@glo@text{\csname glo@#1@useriv\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{useriv}% +} % \end{macrocode} %\end{macro} % @@ -9675,7 +9579,9 @@ name=true]{% % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\newcommand*{\glsentryuserv}[1]{\csname glo@#1@userv\endcsname} +\newcommand*{\glsentryuserv}[1]{% + \@gls@entry@field{#1}{userv}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuserv} @@ -9683,8 +9589,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryuserv}[1]{% -\protected@edef\@glo@text{\csname glo@#1@userv\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{userv}% +} % \end{macrocode} %\end{macro} % @@ -9694,7 +9600,9 @@ name=true]{% % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} -\newcommand*{\glsentryuservi}[1]{\csname glo@#1@uservi\endcsname} +\newcommand*{\glsentryuservi}[1]{% + \@gls@entry@field{#1}{uservi}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuservi} @@ -9702,8 +9610,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryuservi}[1]{% -\protected@edef\@glo@text{\csname glo@#1@uservi\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{uservi}% +} % \end{macrocode} %\end{macro} % @@ -9713,7 +9621,7 @@ name=true]{% % is the label associated with the entry. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} -\newcommand*{\glsentryshort}[1]{\csname glo@#1@short\endcsname} +\newcommand*{\glsentryshort}[1]{\@gls@entry@field{#1}{short}} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryshort} @@ -9721,8 +9629,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryshort}[1]{% -\protected@edef\@glo@text{\csname glo@#1@short\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{short}% +} % \end{macrocode} %\end{macro} % @@ -9732,7 +9640,7 @@ name=true]{% % is the label associated with the entry. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} -\newcommand*{\glsentryshortpl}[1]{\csname glo@#1@shortpl\endcsname} +\newcommand*{\glsentryshortpl}[1]{\@gls@entry@field{#1}{shortpl}} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryshortpl} @@ -9740,8 +9648,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentryshortpl}[1]{% -\protected@edef\@glo@text{\csname glo@#1@shortpl\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{shortpl}% +} % \end{macrocode} %\end{macro} % @@ -9751,7 +9659,7 @@ name=true]{% % is the label associated with the entry. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} -\newcommand*{\glsentrylong}[1]{\csname glo@#1@long\endcsname} +\newcommand*{\glsentrylong}[1]{\@gls@entry@field{#1}{long}} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrylong} @@ -9759,8 +9667,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentrylong}[1]{% - \protected@edef\@glo@text{\csname glo@#1@long\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{long}% +} % \end{macrocode} %\end{macro} % @@ -9770,7 +9678,7 @@ name=true]{% % is the label associated with the entry. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} -\newcommand*{\glsentrylongpl}[1]{\csname glo@#1@longpl\endcsname} +\newcommand*{\glsentrylongpl}[1]{\@gls@entry@field{#1}{longpl}} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrylongpl} @@ -9778,8 +9686,8 @@ name=true]{% %\changes{3.09a}{2013-10-09}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsentrylongpl}[1]{% -\protected@edef\@glo@text{\csname glo@#1@longpl\endcsname}% -\expandafter\makefirstuc\expandafter{\@glo@text}} + \@Gls@entry@field{#1}{longpl}% +} % \end{macrocode} %\end{macro} % @@ -9834,7 +9742,7 @@ name=true]{% \newcommand*{\glsentrynumberlist}[1]{% \glsdoifexists{#1}% {% - \csname glo@#1@numberlist\endcsname + \@gls@entry@field{#1}{numberlist}% }% } % \end{macrocode} @@ -9861,10 +9769,14 @@ name=true]{% \glsdoifexists{#1}% {% \bgroup - \def\@glo@label{#1}% +% \end{macrocode} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} +% \begin{macrocode} + \edef\@glo@label{\glsdetoklabel{#1}}% \let\@org@glsnumberformat\glsnumberformat \def\glsnumberformat##1{##1}% - \protected@edef\the@numberlist{\csname glo@\@glo@label @numberlist\endcsname}% + \protected@edef\the@numberlist{% + \csname glo@\@glo@label @numberlist\endcsname}% \def\@gls@numlist@sep{}% \def\@gls@numlist@nextsep{}% \def\@gls@numlist@lastsep{}% @@ -9916,10 +9828,11 @@ name=true]{% %\changes{1.17}{2008 December 26}{new} %\changes{3.0}{2011/04/02}{changed default from \cs{glsentryname} %to \cs{glsentrytext}} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{% -\def\@glo@label{#2}% -\@glslink{\glolinkprefix#2}{#1}} + \def\@glo@label{#2}% + \@glslink{\glolinkprefix\glsdetoklabel{#2}}{#1}} % \end{macrocode} %\end{macro} % @@ -9952,12 +9865,13 @@ name=true]{% %\changes{1.07}{2007 Sep 13}{fixed bug caused by \cs{theglsentrycounter} setting the page number too soon} %\changes{2.04}{2009 November 10}{fixed bug that ignored counter} %\changes{3.01}{2011/04/12}{made robust} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newrobustcmd*{\glsadd}[2][]{% \glsdoifexists{#2}% {% \def\@glsnumberformat{glsnumberformat}% - \edef\@gls@counter{\csname glo@#2@counter\endcsname}% + \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}% \setkeys{glossadd}{#1}% % \end{macrocode} % Store the entry's counter in \cs{theglsentrycounter} @@ -10884,6 +10798,11 @@ you \@do@gls@getcounterprefix \fi % \end{macrocode} +% De-tok label if required +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} +% \begin{macrocode} + \edef\@gls@label{\glsdetoklabel{#1}}% +% \end{macrocode} % Determine whether to use \app{xindy} or \app{makeindex} % syntax % \begin{macrocode} @@ -10904,8 +10823,8 @@ you % \end{macrocode} % Write to the glossary file using \app{xindy} syntax. % \begin{macrocode} - \glossary[\csname glo@#1@type\endcsname]{% - (indexentry :tkey (\csname glo@#1@index\endcsname) + \glossary[\csname glo@\@gls@label @type\endcsname]{% + (indexentry :tkey (\csname glo@\@gls@label @index\endcsname) % \end{macrocode} %\changes{3.02}{2012/05/21}{changed \cs{@glslocref} to \cs{theglsentrycounter}} %\changes{3.04}{2012-11-18}{changed \cs{theglsentrycounter} back to \cs{@glslocref}} @@ -10925,8 +10844,8 @@ you % \end{macrocode} % Write to the glossary file using \app{makeindex} syntax. % \begin{macrocode} - \glossary[\csname glo@#1@type\endcsname]{% - \string\glossaryentry{\csname glo@#1@index\endcsname + \glossary[\csname glo@\@gls@label @type\endcsname]{% + \string\glossaryentry{\csname glo@\@gls@label @index\endcsname \@gls@encapchar\@glo@numfmt}{\@glslocref}}% \fi } @@ -11055,9 +10974,12 @@ you \@gls@donext \fi % \end{macrocode} -% display the entry for this label +% Display the entry for this label. +% (Expanding label as it's a temporary control sequence that's used +% elsewhere.) +%\changes{4.03}{2014-01-20}{added \cs{expandafter} commands} % \begin{macrocode} - \glsseeitem{\@gls@thislabel}% + \expandafter\glsseeitem\expandafter{\@gls@thislabel}% % \end{macrocode} % Update separators % \begin{macrocode} @@ -11232,22 +11154,25 @@ you \@glossarystyle % \end{macrocode} %\changes{3.02}{2012/05/21}{add a way to fetch current entry label} -% added a way to fetch the current entry label (v3.08 updated for -% new \cs{glossentry} and \cs{subglossentry}): +% Added a way to fetch the current entry label (v3.08 updated for +% new \cs{glossentry} and \cs{subglossentry}, but this is now only +% needed for backward compatibility): +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \let\gls@org@glossaryentryfield\glossentry \let\gls@org@glossarysubentryfield\subglossentry \renewcommand{\glossentry}[1]{% - \gdef\glscurrententrylabel{##1}% + \xdef\glscurrententrylabel{\glsdetoklabel{##1}}% \gls@org@glossaryentryfield{##1}% }% \renewcommand{\subglossentry}[2]{% - \gdef\glscurrententrylabel{##2}% + \xdef\glscurrententrylabel{\glsdetoklabel{##2}}% \gls@org@glossarysubentryfield{##1}{##2}% }% % \end{macrocode} % Some macros may end up being expanded into internals in the -% glossary, so need to make @ a letter. +% glossary, so need to make @ a letter. (Unlikely to be a problem +% since v3.08a but kept for backward compatibility.) % \begin{macrocode} \makeatletter % \end{macrocode} @@ -11555,11 +11480,12 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\changes{3.0}{2011/04/02}{new} % Advance the \ctr{glossaryentry} counter if in use. The argument is % the label associated with the entry. +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \ifglsentrycounter \newcommand*{\glsstepentry}[1]{% \refstepcounter{glossaryentry}% - \label{glsentry-#1}% + \label{glsentry-\glsdetoklabel{#1}}% } \else \newcommand*{\glsstepentry}[1]{} @@ -11571,12 +11497,13 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\changes{3.0}{2011/04/02}{new} % Advance the \ctr{glossarysubentry} counter if in use. The argument is % the label associated with the subentry. +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \ifglssubentrycounter \newcommand*{\glsstepsubentry}[1]{% - \def\currentglssubentry{#1}% + \edef\currentglssubentry{\glsdetoklabel{#1}}% \refstepcounter{glossarysubentry}% - \label{glsentry-#1}% + \label{glsentry-\currentglssubentry}% } \else \newcommand*{\glsstepsubentry}[1]{} @@ -11588,12 +11515,13 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\changes{3.0}{2011/04/02}{new} % Reference the entry or sub-entry counter if in use, otherwise just do % \ics{gls}. +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \ifglsentrycounter - \newcommand*{\glsrefentry}[1]{\ref{glsentry-#1}} + \newcommand*{\glsrefentry}[1]{\ref{glsentry-\glsdetoklabel{#1}}} \else \ifglssubentrycounter - \newcommand*{\glsrefentry}[1]{\ref{glsentry-#1}} + \newcommand*{\glsrefentry}[1]{\ref{glsentry-\glsdetoklabel{#1}}} \else \newcommand*{\glsrefentry}[1]{\gls{#1}} \fi @@ -11721,11 +11649,12 @@ false,nolabel,autolabel,nameref}[nolabel]{% % %\begin{macro}{\glossentryname} %\changes{3.08a}{2013-09-28}{new} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\glossentryname}[1]{% - \glsdoifexists{#1}% + \glsdoifexistsorwarn{#1}% {% - \letcs{\glo@name}{glo@#1@name}% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% \expandafter\glsnamefont\expandafter{\glo@name}% }% } @@ -11736,7 +11665,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\changes{3.08a}{2013-09-28}{new} % \begin{macrocode} \newcommand*{\Glossentryname}[1]{% - \glsdoifexists{#1}% + \glsdoifexistsorwarn{#1}% {% \glsnamefont{\Glsentryname{#1}}% }% @@ -11748,7 +11677,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\changes{3.08a}{2013-09-28}{new} % \begin{macrocode} \newcommand*{\glossentrydesc}[1]{% - \glsdoifexists{#1}% + \glsdoifexistsorwarn{#1}% {% \glsentrydesc{#1}% }% @@ -11760,7 +11689,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\changes{3.08a}{2013-09-28}{new} % \begin{macrocode} \newcommand*{\Glossentrydesc}[1]{% - \glsdoifexists{#1}% + \glsdoifexistsorwarn{#1}% {% \Glsentrydesc{#1}% }% @@ -11772,7 +11701,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\changes{3.08a}{2013-09-28}{new} % \begin{macrocode} \newcommand*{\glossentrysymbol}[1]{% - \glsdoifexists{#1}% + \glsdoifexistsorwarn{#1}% {% \glsentrysymbol{#1}% }% @@ -11784,7 +11713,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\changes{3.08a}{2013-09-28}{new} % \begin{macrocode} \newcommand*{\Glossentrysymbol}[1]{% - \glsdoifexists{#1}% + \glsdoifexistsorwarn{#1}% {% \Glsentrysymbol{#1}% }% @@ -11827,7 +11756,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % % %\begin{macro}{\glossaryentryfield} -% \cs{glossaryentryfield}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list}\\[10pt] +%\begin{definition} +% \cs{glossaryentryfield}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list} +%\end{definition} % This command formerly governed how each entry row should be formatted % in the glossary. Now deprecated. %\changes{3.08a}{2013-09-28}{deprecated} @@ -11842,7 +11773,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{macro} %\begin{macro}{\glossarysubentryfield} -% \cs{glossarysubentryfield}\marg{level}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list}\\[10pt] +%\begin{definition} +% \cs{glossarysubentryfield}\marg{level}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list} +%\end{definition} % This command governs how each subentry should be formatted % in the glossary. Glossary styles need to redefine this command. % Most of the predefined styles ignore \meta{symbol}. The first @@ -12271,7 +12204,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % %\subsection{Acronyms}\label{sec:acronym} %\begin{macro}{\oldacronym} -%\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list}\\[10pt] +%\begin{definition} +%\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list} +%\end{definition} % This emulates the way the old \isty{glossary} package defined % acronyms. It is equivalent to \ics{newacronym}\oarg{key-val % list}\marg{label}\marg{abbrv}\marg{long} and it additionally @@ -12316,10 +12251,12 @@ false,nolabel,autolabel,nameref}[nolabel]{% } % \end{macrocode} %\end{macro} -%\vskip5pt +% +%\begin{definition} % \cs{newacronym}\oarg{key-val list}\marg{label}\marg{abbrev}\marg{long}\\[10pt] -% This is a quick way of defining acronyms, all it does -% is call \ics{newglossaryentry} with the appropriate +%\end{definition} +% This is a quick way of defining acronyms, +% using \ics{newglossaryentry} with the appropriate % values. It sets the % glossary type to \ics{acronymtype} which will be % "acronym" if the package option \pkgopt{acronym} has @@ -12849,6 +12786,24 @@ false,nolabel,autolabel,nameref}[nolabel]{% } % \end{macrocode} %\end{macro} +% +%\begin{macro}{\renewacronymstyle} +% Redefines the given acronym style. +%\changes{4.03}{2014-01-20}{new} +% \begin{macrocode} +\newcommand*{\renewacronymstyle}[3]{% + \ifcsdef{@glsacr@dispstyle@#1}% + {% + \csdef{@glsacr@dispstyle@#1}{#2}% + \csdef{@glsacr@styledefs@#1}{#3}% + }% + {% + \PackageError{glossaries}{Acronym style `#1' doesn't exist}{}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsUseAcrEntryDispStyle} %\changes{4.02}{2013-12-05}{new} % \begin{macrocode} @@ -12930,7 +12885,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% \protect\firstacronymfont{\Glsentryshortpl{##1}}##2\space (\glsentrylongpl{##1})% }% - \renewcommand*{\acronymentry}[1]{\acronymfont{\glsentryshort{##1}}} +% \end{macrocode} +%\changes{4.03}{2014-01-20}{commented spurious EOL} +% \begin{macrocode} + \renewcommand*{\acronymentry}[1]{\acronymfont{\glsentryshort{##1}}}% \renewcommand*{\acronymsort}[2]{##1}% \renewcommand*{\acronymfont}[1]{##1}% \renewcommand*{\firstacronymfont}[1]{\acronymfont{##1}}% @@ -13193,8 +13151,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% }% {% \renewcommand*{\GenericAcronymFields}{description={\the\glslongtok}}% +% \end{macrocode} +%\changes{4.03}{2014-01-20}{fixed bug in \cs{acrfullfmt}} +% \begin{macrocode} \renewcommand*{\acrfullfmt}[3]{% - \glslink[##1]{##2}{\glsentryshort{##2}##3\space + \glslink[##1]{##2}{\glsentrylong{##2}##3\space (\acronymfont{\glsentryshort{##2}})}}% \renewcommand*{\Acrfullfmt}[3]{% \glslink[##1]{##2}{\Glsentrylong{##2}##3\space @@ -13203,11 +13164,17 @@ false,nolabel,autolabel,nameref}[nolabel]{% \glslink[##1]{##2}{% \mfirstucMakeUppercase{\glsentrylong{##2}##3\space (\acronymfont{\glsentryshort{##2}})}}}% +% \end{macrocode} +%\changes{4.03}{2014-01-20}{fixed bug in \cs{acrfullplfmt}} +% \begin{macrocode} \renewcommand*{\acrfullplfmt}[3]{% - \glslink[##1]{##2}{\glsentryshortpl{##2}##3\space + \glslink[##1]{##2}{\glsentrylongpl{##2}##3\space (\acronymfont{\glsentryshortpl{##2}})}}% +% \end{macrocode} +%\changes{4.03}{2014-01-20}{fixed bug in \cs{Acrfullplfmt}} +% \begin{macrocode} \renewcommand*{\Acrfullplfmt}[3]{% - \glslink[##1]{##2}{\Glsentryshortpl{##2}##3\space + \glslink[##1]{##2}{\Glsentrylongpl{##2}##3\space (\acronymfont{\glsentryshortpl{##2}})}}% \renewcommand*{\ACRfullplfmt}[3]{% \glslink[##1]{##2}{% @@ -13244,7 +13211,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% {% \GlsUseAcrStyleDefs{dua}% \renewcommand*{\GenericAcronymFields}{}% - \renewcommand*{\acronymentry}[1]{\acronymfont{\glsentrylong{##1}}} +% \end{macrocode} +%\changes{4.03}{2014-01-20}{commented spurious EOL} +% \begin{macrocode} + \renewcommand*{\acronymentry}[1]{\acronymfont{\glsentrylong{##1}}}% \renewcommand*{\acronymsort}[2]{##2}% }% % \end{macrocode} @@ -14614,9 +14584,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showgloparent}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showgloparent}[1]{% - \expandafter\show\csname glo@#1@parent\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@parent\endcsname } % \end{macrocode} %\end{macro} @@ -14626,9 +14597,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglolevel}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglolevel}[1]{% - \expandafter\show\csname glo@#1@level\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@level\endcsname } % \end{macrocode} %\end{macro} @@ -14638,9 +14610,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglotext}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglotext}[1]{% - \expandafter\show\csname glo@#1@text\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@text\endcsname } % \end{macrocode} %\end{macro} @@ -14650,9 +14623,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showgloplural}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showgloplural}[1]{% - \expandafter\show\csname glo@#1@plural\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@plural\endcsname } % \end{macrocode} %\end{macro} @@ -14662,9 +14636,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglofirst}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglofirst}[1]{% - \expandafter\show\csname glo@#1@first\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@first\endcsname } % \end{macrocode} %\end{macro} @@ -14674,9 +14649,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglofirstpl}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglofirstpl}[1]{% - \expandafter\show\csname glo@#1@firstpl\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@firstpl\endcsname } % \end{macrocode} %\end{macro} @@ -14686,9 +14662,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglotype}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglotype}[1]{% - \expandafter\show\csname glo@#1@type\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@type\endcsname } % \end{macrocode} %\end{macro} @@ -14698,9 +14675,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglocounter}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglocounter}[1]{% - \expandafter\show\csname glo@#1@counter\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@counter\endcsname } % \end{macrocode} %\end{macro} @@ -14710,9 +14688,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglouseri}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglouseri}[1]{% - \expandafter\show\csname glo@#1@useri\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@useri\endcsname } % \end{macrocode} %\end{macro} @@ -14722,9 +14701,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglouserii}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglouserii}[1]{% - \expandafter\show\csname glo@#1@userii\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@userii\endcsname } % \end{macrocode} %\end{macro} @@ -14734,9 +14714,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglouseriii}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglouseriii}[1]{% - \expandafter\show\csname glo@#1@useriii\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@useriii\endcsname } % \end{macrocode} %\end{macro} @@ -14746,9 +14727,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglouseriv}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglouseriv}[1]{% - \expandafter\show\csname glo@#1@useriv\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@useriv\endcsname } % \end{macrocode} %\end{macro} @@ -14758,9 +14740,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglouserv}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglouserv}[1]{% - \expandafter\show\csname glo@#1@userv\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@userv\endcsname } % \end{macrocode} %\end{macro} @@ -14770,9 +14753,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglouservi}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglouservi}[1]{% - \expandafter\show\csname glo@#1@uservi\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@uservi\endcsname } % \end{macrocode} %\end{macro} @@ -14782,9 +14766,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showgloname}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showgloname}[1]{% - \expandafter\show\csname glo@#1@name\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@name\endcsname } % \end{macrocode} %\end{macro} @@ -14794,9 +14779,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglodesc}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglodesc}[1]{% - \expandafter\show\csname glo@#1@desc\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@desc\endcsname } % \end{macrocode} %\end{macro} @@ -14806,9 +14792,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglodescplural}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglodescplural}[1]{% - \expandafter\show\csname glo@#1@descplural\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@descplural\endcsname } % \end{macrocode} %\end{macro} @@ -14818,9 +14805,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglosort}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglosort}[1]{% - \expandafter\show\csname glo@#1@sort\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@sort\endcsname } % \end{macrocode} %\end{macro} @@ -14830,9 +14818,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglosymbol}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglosymbol}[1]{% - \expandafter\show\csname glo@#1@symbol\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@symbol\endcsname } % \end{macrocode} %\end{macro} @@ -14842,9 +14831,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglosymbolplural}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglosymbolplural}[1]{% - \expandafter\show\csname glo@#1@symbolplural\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@symbolplural\endcsname } % \end{macrocode} %\end{macro} @@ -14854,9 +14844,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showgloshort}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showgloshort}[1]{% - \expandafter\show\csname glo@#1@short\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@short\endcsname } % \end{macrocode} %\end{macro} @@ -14866,9 +14857,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showglolong}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglolong}[1]{% - \expandafter\show\csname glo@#1@long\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@long\endcsname } % \end{macrocode} %\end{macro} @@ -14878,9 +14870,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showgloindex}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showgloindex}[1]{% - \expandafter\show\csname glo@#1@index\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@index\endcsname } % \end{macrocode} %\end{macro} @@ -14890,9 +14883,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{definition} %\cs{showgloflag}\marg{label} %\end{definition} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showgloflag}[1]{% - \expandafter\show\csname ifglo@#1@flag\endcsname + \expandafter\show\csname ifglo@\glsdetoklabel{#1}@flag\endcsname } % \end{macrocode} %\end{macro} @@ -20101,7 +20095,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % but will only be updated when \texttt{glossaries-accsupp.sty} is % modified. % \begin{macrocode} -\ProvidesPackage{glossaries-accsupp}[2013/11/14 v4.0 (NLCT) +\ProvidesPackage{glossaries-accsupp}[2014/01/20 v4.03 (NLCT) Experimental glossaries accessibility] % \end{macrocode} % Pass all options to \sty{glossaries}: @@ -20112,22 +20106,27 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \begin{macrocode} \ProcessOptions % \end{macrocode} +%\begin{macro}{\compatibleglossentry} % Override style compatibility macros: +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\compatibleglossentry}[2]{% \toks@{#2}% \protected@edef\@do@glossentry{% \noexpand\accsuppglossaryentryfield{#1}% {\noexpand\glsnamefont - {\expandafter\expandonce\csname glo@#1@name\endcsname}}% - {\expandafter\expandonce\csname glo@#1@desc\endcsname}% - {\expandafter\expandonce\csname glo@#1@symbol\endcsname}% + {\expandafter\expandonce\csname glo@\glsdetoklabel{#1}@name\endcsname}}% + {\expandafter\expandonce\csname glo@\glsdetoklabel{#1}@desc\endcsname}% + {\expandafter\expandonce\csname glo@\glsdetoklabel{#1}@symbol\endcsname}% {\the\toks@}% }% \@do@glossentry } % \end{macrocode} +%\end{macro} % +%\begin{macro}{\compatiblesubglossentry} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\compatiblesubglossentry}[3]{% \toks@{#3}% @@ -20135,14 +20134,15 @@ false,nolabel,autolabel,nameref}[nolabel]{% \noexpand\accsuppglossarysubentryfield{\number#1}% {#2}% {\noexpand\glsnamefont - {\expandafter\expandonce\csname glo@#2@name\endcsname}}% - {\expandafter\expandonce\csname glo@#2@desc\endcsname}% - {\expandafter\expandonce\csname glo@#2@symbol\endcsname}% + {\expandafter\expandonce\csname glo@\glsdetoklabel{#2}@name\endcsname}}% + {\expandafter\expandonce\csname glo@\glsdetoklabel{#2}@desc\endcsname}% + {\expandafter\expandonce\csname glo@\glsdetoklabel{#2}@symbol\endcsname}% {\the\toks@}% }% \@do@subglossentry } % \end{macrocode} +%\end{macro} % Required packages: % \begin{macrocode} \RequirePackage{glossaries} @@ -20370,36 +20370,40 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{macro}{\glsentryaccess} % Get the value of the \gloskey{access} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentryaccess}[1]{% - \csname glo@#1@access\endcsname + \@gls@entry@field{#1}{access}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrytextaccess} % Get the value of the \gloskey{textaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentrytextaccess}[1]{% - \csname glo@#1@textaccess\endcsname + \@gls@entry@field{#1}{textaccess}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryfirstaccess} % Get the value of the \gloskey{firstaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentryfirstaccess}[1]{% - \csname glo@#1@firstaccess\endcsname + \@gls@entry@field{#1}{firstaccess}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrypluralaccess} % Get the value of the \gloskey{pluralaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentrypluralaccess}[1]{% - \csname glo@#1@pluralaccess\endcsname + \@gls@entry@field{#1}{pluralaccess}% } % \end{macrocode} %\end{macro} @@ -20415,36 +20419,40 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{macro}{\glsentrysymbolaccess} % Get the value of the \gloskey{symbolaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentrysymbolaccess}[1]{% - \csname glo@#1@symbolaccess\endcsname + \@gls@entry@field{#1}{symbolaccess}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrysymbolpluralaccess} % Get the value of the \gloskey{symbolpluralaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentrysymbolpluralaccess}[1]{% - \csname glo@#1@symbolpluralaccess\endcsname + \@gls@entry@field{#1}{symbolpluralaccess}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrydescaccess} % Get the value of the \gloskey{descriptionaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentrydescaccess}[1]{% - \csname glo@#1@descaccess\endcsname + \@gls@entry@field{#1}{descaccess}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrydescpluralaccess} % Get the value of the \gloskey{descriptionpluralaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentrydescpluralaccess}[1]{% - \csname glo@#1@descaccess\endcsname + \@gls@entry@field{#1}{descaccess}% } % \end{macrocode} %\end{macro} @@ -20452,36 +20460,40 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{macro}{\glsentryshortaccess} % Get the value of the \gloskey{shortaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentryshortaccess}[1]{% - \csname glo@#1@shortaccess\endcsname + \@gls@entry@field{#1}{shortaccess}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryshortpluralaccess} % Get the value of the \gloskey{shortpluralaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentryshortpluralaccess}[1]{% - \csname glo@#1@shortpluralaccess\endcsname + \@gls@entry@field{#1}{shortpluralaccess}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrylongaccess} % Get the value of the \gloskey{longaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentrylongaccess}[1]{% - \csname glo@#1@longaccess\endcsname + \@gls@entry@field{#1}{longaccess}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrylongpluralaccess} % Get the value of the \gloskey{longpluralaccess} key for the entry with % the given label: +%\changes{4.03}{2014-01-20}{switched to using \cs{@gls@entry@field}} % \begin{macrocode} \newcommand*{\glsentrylongpluralaccess}[1]{% - \csname glo@#1@longpluralaccess\endcsname + \@gls@entry@field{#1}{longpluralaccess}% } % \end{macrocode} %\end{macro} @@ -20507,12 +20519,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsnameaccessdisplay} -% Displays the first argument with the accessibility text for -% the entry with the label given by the second argument (if set). +%\begin{macro}{\@gls@access@display} +%\changes{4.03}{2014-01-20}{new} % \begin{macrocode} -\DeclareRobustCommand*{\glsnameaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentryaccess{#2}}% +\newcommand*{\@gls@access@display}[2]{% + \protected@edef\@glo@access{#2}% \ifx\@glo@access\@gls@noaccess #1% \else @@ -20521,16 +20532,21 @@ false,nolabel,autolabel,nameref}[nolabel]{% } % \end{macrocode} %\end{macro} +% +%\begin{macro}{\glsnameaccessdisplay} +% Displays the first argument with the accessibility text for +% the entry with the label given by the second argument (if set). +% \begin{macrocode} +\DeclareRobustCommand*{\glsnameaccessdisplay}[2]{% + \@gls@access@display{#1}{\glsentryaccess{#2}}% +} +% \end{macrocode} +%\end{macro} %\begin{macro}{\glstextaccessdisplay} % As above but for the \gloskey{textaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glstextaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentrytextaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentrytextaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20538,12 +20554,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{pluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glspluralaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentrypluralaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentrypluralaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20551,12 +20562,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{firstaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsfirstaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentryfirstaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentryfirstaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20564,12 +20570,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{firstpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsfirstpluralaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentryfirstpluralaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentryfirstpluralaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20577,12 +20578,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{symbolaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glssymbolaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentrysymbolaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentrysymbolaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20590,12 +20586,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{symbolpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glssymbolpluralaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentrysymbolpluralaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentrysymbolpluralaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20603,12 +20594,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{descriptionaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsdescriptionaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentrydescaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentrydescaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20616,12 +20602,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{descriptionpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsdescriptionpluralaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentrydescpluralaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentrydescpluralaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20629,12 +20610,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{shortaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsshortaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentryshortaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentryshortaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20643,12 +20619,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{shortpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsshortpluralaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentryshortpluralaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentryshortpluralaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20656,12 +20627,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{longaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glslongaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentrylongaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentrylongaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20670,12 +20636,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % As above but for the \gloskey{longpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glslongpluralaccessdisplay}[2]{% - \protected@edef\@glo@access{\glsentrylongpluralaccess{#2}}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi + \@gls@access@display{#1}{\glsentrylongpluralaccess{#2}}% } % \end{macrocode} %\end{macro} @@ -20934,6 +20895,368 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsgenentryfmt} +% Redefine to use accessibility information. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewcommand*{\glsgenentryfmt}{% + \ifdefempty\glscustomtext + {% + \glsifplural + {% +% \end{macrocode} +% Plural form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Don't adjust case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glspluralaccessdisplay + {\glsentryplural{\glslabel}}{\glslabel}% + \glsinsert + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsfirstpluralaccessdisplay + {\glsentryfirstplural{\glslabel}}{\glslabel}% + \glsinsert + }% + }% + {% +% \end{macrocode} +% Make first letter upper case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use. +% \begin{macrocode} + \glspluralaccessdisplay + {\Glsentryplural{\glslabel}}{\glslabel}% + \glsinsert + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsfirstpluralaccessdisplay + {\Glsentryfirstplural{\glslabel}}{\glslabel}% + \glsinsert + }% + }% + {% +% \end{macrocode} +% Make all upper case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glspluralaccessdisplay + {\mfirstucMakeUppercase{\glsentryplural{\glslabel}}}% + {\glslabel}% + \mfirstucMakeUppercase{\glsinsert}% + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsfirstpluralacessdisplay + {\mfirstucMakeUppercase{\glsentryfirstplural{\glslabel}}}% + {\glslabel}% + \mfirstucMakeUppercase{\glsinsert}% + }% + }% + }% + {% +% \end{macrocode} +% Singular form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Don't adjust case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glstextaccessdisplay{\glsentrytext{\glslabel}}{\glslabel}% + \glsinsert + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsfirstaccessdisplay{\glsentryfirst{\glslabel}}{\glslabel}% + \glsinsert + }% + }% + {% +% \end{macrocode} +% Make first letter upper case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glstextaccessdisplay{\Glsentrytext{\glslabel}}{\glslabel}% + \glsinsert + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsfirstaccessdisplay{\Glsentryfirst{\glslabel}}{\glslabel}% + \glsinsert + }% + }% + {% +% \end{macrocode} +% Make all upper case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glstextaccessdisplay + {\mfirstucMakeUppercase{\glsentrytext{\glslabel}}}{\glslabel}% + \mfirstucMakeUppercase{\glsinsert}% + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsfirstaccessdisplay + {\mfirstucMakeUppercase{\glsentryfirst{\glslabel}}}{\glslabel}% + \mfirstucMakeUppercase{\glsinsert}% + }% + }% + }% + }% + {% +% \end{macrocode} +% Custom text provided in \cs{glsdisp}. (The insert should +% be empty at this point.) The accessibility information, if +% required, will have to be explicitly included in the custom text. +% \begin{macrocode} + \glscustomtext\glsinsert + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsgenacfmt} +% Redefine to include accessibility information. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewcommand*{\glsgenacfmt}{% + \ifdefempty\glscustomtext + {% + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use: +% \begin{macrocode} + \glsifplural + {% +% \end{macrocode} +% Subsequent plural form: +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Subsequent plural form, don't adjust case: +% \begin{macrocode} + \acronymfont + {\glsshortpluralaccessdisplay + {\glsentryshortpl{\glslabel}}{\glslabel}}% + \glsinsert + }% + {% +% \end{macrocode} +% Subsequent plural form, make first letter upper case: +% \begin{macrocode} + \acronymfont + {\glsshortpluralaccessdisplay + {\Glsentryshortpl{\glslabel}}{\glslabel}}% + \glsinsert + }% + {% +% \end{macrocode} +% Subsequent plural form, all caps: +% \begin{macrocode} + \mfirstucMakeUppercase + {\acronymfont + {\glsshortpluralaccessdisplay + {\glsentryshortpl{\glslabel}}{\glslabel}}% + \glsinsert}% + }% + }% + {% +% \end{macrocode} +% Subsequent singular form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Subsequent singular form, don't adjust case: +% \begin{macrocode} + \acronymfont + {\glsshortaccessdisplay{\glsentryshort{\glslabel}}{\glslabel}}% + \glsinsert + }% + {% +% \end{macrocode} +% Subsequent singular form, make first letter upper case: +% \begin{macrocode} + \acronymfont + {\glsshortaccessdisplay{\Glsentryshort{\glslabel}}{\glslabel}}% + \glsinsert + }% + {% +% \end{macrocode} +% Subsequent singular form, all caps: +% \begin{macrocode} + \mfirstucMakeUppercase + {\acronymfont{% + \glsshortaccessdisplay{\glsentryshort{\glslabel}}{\glslabel}}% + \glsinsert}% + }% + }% + }% + {% +% \end{macrocode} +% First use: +% \begin{macrocode} + \glsifplural + {% +% \end{macrocode} +% First use plural form: +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% First use plural form, don't adjust case: +% \begin{macrocode} + \genplacrfullformat{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% First use plural form, make first letter upper case: +% \begin{macrocode} + \Genplacrfullformat{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% First use plural form, all caps: +% \begin{macrocode} + \mfirstucMakeUppercase + {\genplacrfullformat{\glslabel}{\glsinsert}}% + }% + }% + {% +% \end{macrocode} +% First use singular form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% First use singular form, don't adjust case: +% \begin{macrocode} + \genacrfullformat{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% First use singular form, make first letter upper case: +% \begin{macrocode} + \Genacrfullformat{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% First use singular form, all caps: +% \begin{macrocode} + \mfirstucMakeUppercase + {\genacrfullformat{\glslabel}{\glsinsert}}% + }% + }% + }% + }% + {% +% \end{macrocode} +% User supplied text. (The insert should be empty at this point.) +% The accessibility information, if +% required, will have to be explicitly included in the custom text. +% \begin{macrocode} + \glscustomtext + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\genacrfullformat} +% Redefine to include accessibility information. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewcommand*{\genacrfullformat}[2]{% + \glslongaccessdisplay{\glsentrylong{#1}}{#1}#2\space + (\glsshortaccessdisplay{\protect\firstacronymfont{\glsentryshort{#1}}}{#1})% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Genacrfullformat} +% Redefine to include accessibility information. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewcommand*{\Genacrfullformat}[2]{% + \glslongaccessdisplay{\Glsentrylong{#1}}{#1}#2\space + (\glsshortaccessdisplay{\protect\firstacronymfont{\Glsentryshort{#1}}}{#1})% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\genplacrfullformat} +% Redefine to include accessibility information. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewcommand*{\genplacrfullformat}[2]{% + \glslongpluralaccessdisplay{\glsentrylongpl{#1}}{#1}#2\space + (\glsshortpluralaccessdisplay + {\protect\firstacronymfont{\glsentryshortpl{#1}}}{#1})% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Genplacrfullformat} +% Redefine to include accessibility information. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewcommand*{\Genplacrfullformat}[2]{% + \glslongpluralaccessdisplay{\Glsentrylongpl{#1}}{#1}#2\space + (\glsshortpluralaccessdisplay + {\protect\firstacronymfont{\glsentryshortpl{#1}}}{#1})% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@acrshort} % \begin{macrocode} \def\@acrshort#1#2[#3]{% @@ -20943,8 +21266,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty @@ -20969,8 +21293,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree \let\glsinsert\@empty @@ -20995,8 +21320,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty @@ -21022,8 +21348,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty @@ -21048,8 +21375,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty @@ -21074,8 +21402,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural}, % \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}} +%\changes{4.03}{2014-01-20}{removed \cs{glslabel} (defined in +%\cs{@gls@link})} % \begin{macrocode} - \def\glslabel{#2}% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty @@ -21182,6 +21511,578 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\end{macro} % %\subsection{Acronyms} +% Redefine acronym styles provided by \styfmt{glossaries}: +% +%\begin{acrstyle}{long-short} +% \meta{long} (\meta{short}) acronym style. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{long-short}% +{% +% \end{macrocode} +% Check for long form in case this is a mixed glossary. +% \begin{macrocode} + \ifglshaslong{\glslabel}{\glsgenacfmt}{\glsgenentryfmt}% +}% +{% + \renewcommand*{\GenericAcronymFields}{description={\the\glslongtok}}% + \renewcommand*{\genacrfullformat}[2]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}##2\space + (\glsshortaccessdisplay + {\protect\firstacronymfont{\glsentryshort{##1}}}{##1})% + }% + \renewcommand*{\Genacrfullformat}[2]{% + \glslongaccessdisplay{\Glsentrylong{##1}}{##1}##2\space + (\glsshortaccessdisplay + {\protect\firstacronymfont{\glsentryshort{##1}}}{##1})% + }% + \renewcommand*{\genplacrfullformat}[2]{% + \glslongpluralaccessdisplay{\glsentrylongpl{##1}}{##1}##2\space + (\glsshortpluralaccessdisplay + {\protect\firstacronymfont{\glsentryshortpl{##1}}}{##1})% + }% + \renewcommand*{\Genplacrfullformat}[2]{% + \glslongpluralaccessdisplay{\Glsentrylongpl{##1}}{##1}##2\space + (\glsshortpluralaccessdisplay + {\protect\firstacronymfont{\glsentryshortpl{##1}}}{##1})% + }% + \renewcommand*{\acronymentry}[1]{% + \glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1}} + \renewcommand*{\acronymsort}[2]{##1}% + \renewcommand*{\acronymfont}[1]{##1}% + \renewcommand*{\firstacronymfont}[1]{\acronymfont{##1}}% + \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{short-long} +% \meta{short} (\meta{long}) acronym style. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{short-long}% +{% +% \end{macrocode} +% Check for long form in case this is a mixed glossary. +% \begin{macrocode} + \ifglshaslong{\glslabel}{\glsgenacfmt}{\glsgenentryfmt}% +}% +{% + \renewcommand*{\GenericAcronymFields}{description={\the\glslongtok}}% + \renewcommand*{\genacrfullformat}[2]{% + \glsshortaccessdisplay + {\protect\firstacronymfont{\glsentryshort{##1}}}{##1}##2\space + (\glslongaccessdisplay{\glsentrylong{##1}}{##1})% + }% + \renewcommand*{\Genacrfullformat}[2]{% + \glsshortaccessdisplay + {\protect\firstacronymfont{\Glsentryshort{##1}}}{##1}##2\space + (\glslongaccessdisplay{\glsentrylong{##1}}{##1})% + }% + \renewcommand*{\genplacrfullformat}[2]{% + \glsshortpluralaccessdisplay + {\protect\firstacronymfont{\glsentryshortpl{##1}}}{##1}##2\space + (\glslongpluralaccessdisplay + {\glsentrylongpl{##1}}{##1})% + }% + \renewcommand*{\Genplacrfullformat}[2]{% + \glsshortpluralaccessdisplay + {\protect\firstacronymfont{\Glsentryshortpl{##1}}}{##1}##2\space + (\glslongpluralaccessdisplay{\glsentrylongpl{##1}}{##1})% + }% + \renewcommand*{\acronymentry}[1]{% + \glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1}}% + \renewcommand*{\acronymsort}[2]{##1}% + \renewcommand*{\acronymfont}[1]{##1}% + \renewcommand*{\firstacronymfont}[1]{\acronymfont{##1}}% + \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{long-short-desc} +% \meta{long} (\marg{short}) acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{long-short-desc}% +{% + \GlsUseAcrEntryDispStyle{long-short}% +}% +{% + \GlsUseAcrStyleDefs{long-short}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{long-sc-short-desc} +% \meta{long} (\cs{textsc}\marg{short}) acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{long-sc-short-desc}% +{% + \GlsUseAcrEntryDispStyle{long-sc-short}% +}% +{% + \GlsUseAcrStyleDefs{long-sc-short}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{long-sm-short-desc} +% \meta{long} (\cs{textsmaller}\marg{short}) acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{long-sm-short-desc}% +{% + \GlsUseAcrEntryDispStyle{long-sm-short}% +}% +{% + \GlsUseAcrStyleDefs{long-sm-short}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{short-long-desc} +% \meta{short} (\marg{long}) acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{short-long-desc}% +{% + \GlsUseAcrEntryDispStyle{short-long}% +}% +{% + \GlsUseAcrStyleDefs{short-long}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{sc-short-long-desc} +% \meta{long} (\cs{textsc}\marg{short}) acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{sc-short-long-desc}% +{% + \GlsUseAcrEntryDispStyle{sc-short-long}% +}% +{% + \GlsUseAcrStyleDefs{sc-short-long}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{sm-short-long-desc} +% \meta{long} (\cs{textsmaller}\marg{short}) acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{sm-short-long-desc}% +{% + \GlsUseAcrEntryDispStyle{sm-short-long}% +}% +{% + \GlsUseAcrStyleDefs{sm-short-long}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{dua} +% \meta{long} only acronym style. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{dua}% +{% +% \end{macrocode} +% Check for long form in case this is a mixed glossary. +% \begin{macrocode} + \ifdefempty\glscustomtext + {% + \ifglshaslong{\glslabel}% + {% + \glsifplural + {% +% \end{macrocode} +% Plural form: +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Plural form, don't adjust case: +% \begin{macrocode} + \glslongpluralaccessdisplay{\glsentrylongpl{\glslabel}}{\glslabel}% + \glsinsert + }% + {% +% \end{macrocode} +% Plural form, make first letter upper case: +% \begin{macrocode} + \glslongpluralaccessdisplay{\Glsentrylongpl{\glslabel}}{\glslabel}% + \glsinsert + }% + {% +% \end{macrocode} +% Plural form, all caps: +% \begin{macrocode} + \glslongpluralaccessdisplay + {\mfirstucMakeUppercase{\glsentrylongpl{\glslabel}}}{\glslabel}% + \mfirstucMakeUppercase{\glsinsert}% + }% + }% + {% +% \end{macrocode} +% Singular form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Singular form, don't adjust case: +% \begin{macrocode} + \glslongaccessdisplay{\glsentrylong{\glslabel}}{\glslabel}\glsinsert + }% + {% +% \end{macrocode} +% Subsequent singular form, make first letter upper case: +% \begin{macrocode} + \glslongaccessdisplay{\Glsentrylong{\glslabel}}{\glslabel}\glsinsert + }% + {% +% \end{macrocode} +% Subsequent singular form, all caps: +% \begin{macrocode} + \glslongaccessdisplay + {\mfirstucMakeUppercase + {\glsentrylong{\glslabel}\glsinsert}}{\glslabel}% + \mfirstucMakeUppercase{\glsinsert}% + }% + }% + }% + {% +% \end{macrocode} +% Not an acronym: +% \begin{macrocode} + \glsgenentryfmt + }% + }% + {\glscustomtext\glsinsert}% +}% +{% + \renewcommand*{\GenericAcronymFields}{description={\the\glslongtok}}% + \renewcommand*{\acrfullfmt}[3]{% + \glslink[##1]{##2}{% + \glslongaccessdisplay{\glsentrylong{##2}}{##2}##3\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##2}}}{##2})}}% + \renewcommand*{\Acrfullfmt}[3]{% + \glslink[##1]{##2}{% + \glslongaccessdisplay{\Glsentrylong{##2}}{##2}##3\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##2}}}{##2})}}% + \renewcommand*{\ACRfullfmt}[3]{% + \glslink[##1]{##2}{% + \glslongaccessdisplay + {\mfirstucMakeUppercase{\glsentrylong{##2}}{##2}##3\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##2}}}{##2})}}}% + \renewcommand*{\acrfullplfmt}[3]{% + \glslink[##1]{##2}{% + \glslongpluralaccessdisplay + {\glsentrylongpl{##2}}{##2}##3\space + (\glsshortpluralaccessdisplay + {\acronymfont{\glsentryshortpl{##2}}}{##2})}}% + \renewcommand*{\Acrfullplfmt}[3]{% + \glslink[##1]{##2}{% + \glslongpluralaccessdisplay + {\Glsentrylongpl{##2}}{##2}##3\space + (\glsshortpluralaccessdisplay + {\acronymfont{\glsentryshortpl{##2}}}{##2})}}% + \renewcommand*{\ACRfullplfmt}[3]{% + \glslink[##1]{##2}{% + \glslongpluralaccessdisplay + {\mfirstucMakeUppercase{\glsentrylongpl{##2}}{##2}##3\space + (\glsshortpluralaccessdisplay + {\acronymfont{\glsentryshortpl{##2}}}{##2})}}}% + \renewcommand*{\glsentryfull}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})% + }% + \renewcommand*{\Glsentryfull}[1]{% + \glslongaccessdisplay{\Glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})% + }% + \renewcommand*{\glsentryfullpl}[1]{% + \glslongpluralaccessdisplay{\glsentrylongpl{##1}}{##1}\space + (\glsshortpluralaccessdisplay{\acronymfont{\glsentryshortpl{##1}}}{##1})% + }% + \renewcommand*{\Glsentryfullpl}[1]{% + \glslongpluralaccessdisplay{\Glsentrylongpl{##1}}{##1}\space + (\glsshortpluralaccessdisplay{\acronymfont{\glsentryshortpl{##1}}}{##1})% + }% + \renewcommand*{\acronymentry}[1]{% + \glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1}}% + \renewcommand*{\acronymsort}[2]{##1}% + \renewcommand*{\acronymfont}[1]{##1}% + \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{dua-desc} +% \meta{long} only acronym style with user-supplied description. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{dua-desc}% +{% + \GlsUseAcrEntryDispStyle{dua}% +}% +{% + \GlsUseAcrStyleDefs{dua}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\acronymfont{\glsentrylong{##1}}}{##1}}% + \renewcommand*{\acronymsort}[2]{##2}% +}% +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{footnote} +% \meta{short}\cs{footnote}\marg{long} acronym style. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{footnote}% +{% +% \end{macrocode} +% Check for long form in case this is a mixed glossary. +% \begin{macrocode} + \ifglshaslong{\glslabel}{\glsgenacfmt}{\glsgenentryfmt}% +}% +{% + \renewcommand*{\GenericAcronymFields}{description={\the\glslongtok}}% +% \end{macrocode} +% Need to ensure hyperlinks are switched off on first use: +% \begin{macrocode} + \glshyperfirstfalse + \renewcommand*{\genacrfullformat}[2]{% + \glsshortaccessdisplay + {\protect\firstacronymfont{\glsentryshort{##1}}}{##1}##2% + \protect\footnote{\glslongaccessdisplay{\glsentrylong{##1}}{##1}}% + }% + \renewcommand*{\Genacrfullformat}[2]{% + \glsshortaccessdisplay + {\firstacronymfont{\Glsentryshort{##1}}}{##1}##2% + \protect\footnote{\glslongaccessdisplay{\glsentrylong{##1}}{##1}}% + }% + \renewcommand*{\genplacrfullformat}[2]{% + \glsshortpluralaccessdisplay + {\protect\firstacronymfont{\glsentryshortpl{##1}}}{##1}##2% + \protect\footnote{\glslongpluralaccessdisplay{\glsentrylongpl{##1}}{##1}}% + }% + \renewcommand*{\Genplacrfullformat}[2]{% + \glsshortpluralaccessdisplay + {\protect\firstacronymfont{\Glsentryshortpl{##1}}}{##1}##2% + \protect\footnote{\glslongpluralaccessdisplay{\glsentrylongpl{##1}}{##1}}% + }% + \renewcommand*{\acronymentry}[1]{% + \glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1}}% + \renewcommand*{\acronymsort}[2]{##1}% + \renewcommand*{\acronymfont}[1]{##1}% + \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% +% \end{macrocode} +% Don't use footnotes for \ics{acrfull}: +% \begin{macrocode} + \renewcommand*{\acrfullfmt}[3]{% + \glslink[##1]{##2}{% + \glsshortaccessdisplay{\acronymfont{\glsentryshort{##2}}}{##2}##3\space + (\glslongaccessdisplay{\glsentrylong{##2}}{##2})}}% + \renewcommand*{\Acrfullfmt}[3]{% + \glslink[##1]{##2}{% + \glsshortaccessdisplay{\acronymfont{\Glsentryshort{##2}}}{##2}##3\space + (\glslongaccessdisplay{\glsentrylong{##2}}{##2})}}% + \renewcommand*{\ACRfullfmt}[3]{% + \glslink[##1]{##2}{% + \glsshortaccessdisplay + {\mfirstucMakeUppercase + {\acronymfont{\glsentryshort{##2}}}{##2}##3\space + (\glslongaccessdisplay{\glsentrylong{##2}}{##2})}}}% + \renewcommand*{\acrfullplfmt}[3]{% + \glslink[##1]{##2}{% + \glsshortpluralaccessdisplay + {\acronymfont{\glsentryshortpl{##2}}}{##2}##3\space + (\glslongpluralaccessdisplay{\glsentrylongpl{##2}}{##2})}}% + \renewcommand*{\Acrfullplfmt}[3]{% + \glslink[##1]{##2}{% + \glsshortpluralaccessdisplay + {\acronymfont{\Glsentryshortpl{##2}}}{##2}##3\space + (\glslongpluralaccessdisplay{\glsentrylongpl{##2}})}}% + \renewcommand*{\ACRfullplfmt}[3]{% + \glslink[##1]{##2}{% + \glsshortpluralaccessdisplay + {\mfirstucMakeUppercase + {\acronymfont{\glsentryshortpl{##2}}}{##2}##3\space + (\glslongpluralaccessdisplay{\glsentrylongpl{##2}}{##2})}}}% +% \end{macrocode} +% Similarly for \ics{glsentryfull} etc: +% \begin{macrocode} + \renewcommand*{\glsentryfull}[1]{% + \glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1}\space + (\glslongaccessdisplay{\glsentrylong{##1}}{##1})}% + \renewcommand*{\Glsentryfull}[1]{% + \glsshortaccessdisplay{\acronymfont{\Glsentryshort{##1}}}{##1}\space + (\glslongaccessdisplay{\glsentrylong{##1}}{##1})}% + \renewcommand*{\glsentryfullpl}[1]{% + \glsshortpluralaccessdisplay + {\acronymfont{\glsentryshortpl{##1}}}{##1}\space + (\glslongpluralaccessdisplay{\glsentrylongpl{##1}}{##1})}% + \renewcommand*{\Glsentryfullpl}[1]{% + \glsshortpluralaccessdisplay + {\acronymfont{\Glsentryshortpl{##1}}}{##1}\space + (\glslongpluralaccessdisplay{\glsentrylongpl{##1}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{footnote-sc} +% \cs{textsc}\marg{short}\cs{footnote}\marg{long} acronym style. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{footnote-sc}% +{% + \GlsUseAcrEntryDispStyle{footnote}% +}% +{% + \GlsUseAcrStyleDefs{footnote}% + \renewcommand{\acronymentry}[1]{% + \glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1}} + \renewcommand{\acronymfont}[1]{\textsc{##1}}% + \renewcommand*{\acrpluralsuffix}{\glstextup{\glspluralsuffix}}% +}% +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{footnote-sm} +% \cs{textsmaller}\marg{short}\cs{footnote}\marg{long} acronym style. +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{footnote-sm}% +{% + \GlsUseAcrEntryDispStyle{footnote}% +}% +{% + \GlsUseAcrStyleDefs{footnote}% + \renewcommand{\acronymentry}[1]{% + \glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1}} + \renewcommand{\acronymfont}[1]{\textsmaller{##1}}% + \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% +}% +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{footnote-desc} +% \meta{short}\cs{footnote}\marg{long} acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{footnote-desc}% +{% + \GlsUseAcrEntryDispStyle{footnote}% +}% +{% + \GlsUseAcrStyleDefs{footnote}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{footnote-sc-desc} +% \cs{textsc}\marg{short}\cs{footnote}\marg{long} acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{footnote-sc-desc}% +{% + \GlsUseAcrEntryDispStyle{footnote-sc}% +}% +{% + \GlsUseAcrStyleDefs{footnote-sc}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% +%\begin{acrstyle}{footnote-sm-desc} +% \cs{textsmaller}\marg{short}\cs{footnote}\marg{long} acronym style that has an +% accompanying description (which the user needs to supply). +%\changes{4.03}{2014-01-20}{redefined to use accessibility +%information} +% \begin{macrocode} +\renewacronymstyle{footnote-sm-desc}% +{% + \GlsUseAcrEntryDispStyle{footnote-sm}% +}% +{% + \GlsUseAcrStyleDefs{footnote-sm}% + \renewcommand*{\GenericAcronymFields}{}% + \renewcommand*{\acronymsort}[2]{##2}% + \renewcommand*{\acronymentry}[1]{% + \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space + (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% +} +% \end{macrocode} +%\end{acrstyle} +% % Use \cs{newacronymhook} to modify the key list to set % the access text to the long version by default. % \begin{macrocode} @@ -21226,7 +22127,22 @@ false,nolabel,autolabel,nameref}[nolabel]{% \the\glskeylisttok }% }% + \let\@org@gls@assign@firstpl\gls@assign@firstpl + \let\@org@gls@assign@plural\gls@assign@plural + \let\@org@gls@assign@descplural\gls@assign@descplural + \def\gls@assign@firstpl##1##2{% + \@@gls@expand@field{##1}{firstpl}{##2}% + }% + \def\gls@assign@plural##1##2{% + \@@gls@expand@field{##1}{plural}{##2}% + }% + \def\gls@assign@descplural##1##2{% + \@@gls@expand@field{##1}{descplural}{##2}% + }% \@do@newglossaryentry + \let\gls@assign@firstpl\@org@gls@assign@firstpl + \let\gls@assign@plural\@org@gls@assign@plural + \let\gls@assign@symbolplural\@org@gls@assign@symbolplural } % \end{macrocode} %\end{macro} @@ -21254,7 +22170,22 @@ false,nolabel,autolabel,nameref}[nolabel]{% \the\glskeylisttok }% }% + \let\@org@gls@assign@firstpl\gls@assign@firstpl + \let\@org@gls@assign@plural\gls@assign@plural + \let\@org@gls@assign@symbolplural\gls@assign@symbolplural + \def\gls@assign@firstpl##1##2{% + \@@gls@expand@field{##1}{firstpl}{##2}% + }% + \def\gls@assign@plural##1##2{% + \@@gls@expand@field{##1}{plural}{##2}% + }% + \def\gls@assign@symbolplural##1##2{% + \@@gls@expand@field{##1}{symbolplural}{##2}% + }% \@do@newglossaryentry + \let\gls@assign@plural\@org@gls@assign@plural + \let\gls@assign@firstpl\@org@gls@assign@firstpl + \let\gls@assign@symbolplural\@org@gls@assign@symbolplural } % \end{macrocode} %\end{macro} @@ -21287,7 +22218,22 @@ false,nolabel,autolabel,nameref}[nolabel]{% textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok}% }% + \let\@org@gls@assign@firstpl\gls@assign@firstpl + \let\@org@gls@assign@plural\gls@assign@plural + \let\@org@gls@assign@symbolplural\gls@assign@symbolplural + \def\gls@assign@firstpl##1##2{% + \@@gls@expand@field{##1}{firstpl}{##2}% + }% + \def\gls@assign@plural##1##2{% + \@@gls@expand@field{##1}{plural}{##2}% + }% + \def\gls@assign@symbolplural##1##2{% + \@@gls@expand@field{##1}{symbolplural}{##2}% + }% \@do@newglossaryentry + \let\gls@assign@firstpl\@org@gls@assign@firstpl + \let\gls@assign@plural\@org@gls@assign@plural + \let\gls@assign@symbolplural\@org@gls@assign@symbolplural } % \end{macrocode} %\end{macro} @@ -21313,7 +22259,22 @@ false,nolabel,autolabel,nameref}[nolabel]{% \the\glskeylisttok }% }% + \let\@org@gls@assign@plural\gls@assign@plural + \let\@org@gls@assign@firstpl\gls@assign@firstpl + \let\@org@gls@assign@descplural\gls@assign@descplural + \def\gls@assign@firstpl##1##2{% + \@@gls@expand@field{##1}{firstpl}{##2}% + }% + \def\gls@assign@plural##1##2{% + \@@gls@expand@field{##1}{plural}{##2}% + }% + \def\gls@assign@descplural##1##2{% + \@@gls@expand@field{##1}{descplural}{##2}% + }% \@do@newglossaryentry + \let\gls@assign@plural\@org@gls@assign@plural + \let\gls@assign@firstpl\@org@gls@assign@firstpl + \let\gls@assign@descplural\@org@gls@assign@descplural } % \end{macrocode} %\end{macro} @@ -21346,7 +22307,27 @@ false,nolabel,autolabel,nameref}[nolabel]{% \the\glskeylisttok }% }% + \let\@org@gls@assign@firstpl\gls@assign@firstpl + \let\@org@gls@assign@plural\gls@assign@plural + \let\@org@gls@assign@descplural\gls@assign@descplural + \let\@org@gls@assign@symbolplural\gls@assign@symbolplural + \def\gls@assign@firstpl##1##2{% + \@@gls@expand@field{##1}{firstpl}{##2}% + }% + \def\gls@assign@plural##1##2{% + \@@gls@expand@field{##1}{plural}{##2}% + }% + \def\gls@assign@descplural##1##2{% + \@@gls@expand@field{##1}{descplural}{##2}% + }% + \def\gls@assign@symbolplural##1##2{% + \@@gls@expand@field{##1}{symbolplural}{##2}% + }% \@do@newglossaryentry + \let\gls@assign@firstpl\@org@gls@assign@firstpl + \let\gls@assign@plural\@org@gls@assign@plural + \let\gls@assign@descplural\@org@gls@assign@descplural + \let\gls@assign@symbolplural\@org@gls@assign@symbolplural } % \end{macrocode} %\end{macro} @@ -21376,93 +22357,106 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\subsection{Debugging Commands} % %\begin{macro}{\showglonameaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglonameaccess}[1]{% - \expandafter\show\csname glo@#1@textaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@textaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglotextaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglotextaccess}[1]{% - \expandafter\show\csname glo@#1@textaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@textaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglopluralaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglopluralaccess}[1]{% - \expandafter\show\csname glo@#1@pluralaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@pluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglofirstaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglofirstaccess}[1]{% - \expandafter\show\csname glo@#1@firstaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@firstaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglofirstpluralaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglofirstpluralaccess}[1]{% - \expandafter\show\csname glo@#1@firstpluralaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@firstpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglosymbolaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglosymbolaccess}[1]{% - \expandafter\show\csname glo@#1@symbolaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@symbolaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglosymbolpluralaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglosymbolpluralaccess}[1]{% - \expandafter\show\csname glo@#1@symbolpluralaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@symbolpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglodescaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglodescaccess}[1]{% - \expandafter\show\csname glo@#1@descaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@descaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglodescpluralaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglodescpluralaccess}[1]{% - \expandafter\show\csname glo@#1@descpluralaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@descpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showgloshortaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showgloshortaccess}[1]{% - \expandafter\show\csname glo@#1@shortaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@shortaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showgloshortpluralaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showgloshortpluralaccess}[1]{% - \expandafter\show\csname glo@#1@shortpluralaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@shortpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglolongaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglolongaccess}[1]{% - \expandafter\show\csname glo@#1@longaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@longaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglolongpluralaccess} +%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\showglolongpluralaccess}[1]{% - \expandafter\show\csname glo@#1@longpluralaccess\endcsname + \expandafter\show\csname glo@\glsdetoklabel{#1}@longpluralaccess\endcsname } % \end{macrocode} %\end{macro} @@ -22353,22 +23347,6 @@ false,nolabel,autolabel,nameref}[nolabel]{% \makeglossaries - % Setup acronym fonts (e.g. \emph for short form on first use and - % \textbf for short form on subsequent use): -\renewcommand{\firstacronymfont}[1]{\emph{#1}} -\renewcommand{\acronymfont}[1]{\textbf{#1}} - % Apply the generic acronym style to just the "acronym" glossary: -\defglsentryfmt[acronym]{\glsgenacfmt} - - % Change acronym first use so that its displayed as - % short (long) -\renewcommand{\genacrfullformat}[2]{% - \glsentryshort{#1}#2 (\glsentrylong{#1})% -} -\renewcommand{\genplacrfullformat}[2]{% - \glsentryshortpl{#1}#2 (\glsentrylongpl{#1})% -} - \longnewglossaryentry{par}{name={par}}% {% A long description with a paragraph break. @@ -22385,6 +23363,7 @@ description={a sample entry}} acronyms]{aca}{aca}{a contrived acronym} \begin{document} + A \gls{sample} entry and \gls{aca}. Second use: \gls{aca}. Plurals: \glspl{sample}. Reset acronym\glsreset{aca}. diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index b18e0255c08..778b4622d47 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.ins +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.ins @@ -1,10 +1,10 @@ -% glossaries.ins generated using makedtx version 1.1 2013/12/5 15:12 +% glossaries.ins generated using makedtx version 1.1 2014/1/20 17:22 \input docstrip \preamble glossaries.dtx - Copyright 2013 Nicola Talbot + Copyright 2014 Nicola Talbot This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 |