From 6e362e815ea119b3f6db97b21c10fee3279b5c6b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 15 Feb 2020 03:01:17 +0000 Subject: CTAN sync 202002150301 --- macros/latex/contrib/glossaries/glossaries.dtx | 1551 +++++++++++++++++++++--- 1 file changed, 1350 insertions(+), 201 deletions(-) (limited to 'macros/latex/contrib/glossaries/glossaries.dtx') diff --git a/macros/latex/contrib/glossaries/glossaries.dtx b/macros/latex/contrib/glossaries/glossaries.dtx index 37f589e208..bd6811d320 100644 --- a/macros/latex/contrib/glossaries/glossaries.dtx +++ b/macros/latex/contrib/glossaries/glossaries.dtx @@ -1,11 +1,11 @@ %\iffalse % glossaries.dtx generated using makedtx version 1.2 (c) Nicola Talbot % Command line args: -% -codetitle "Main Package Code" -% -doc "glossaries-manual.tex" % -section "chapter" -% -setambles ".*\.perl=>\nopreamble\nopostamble" -% -setambles ".*\.tex=>\nopreamble\nopostamble" +% -macrocode ".*\.perl" +% -macrocode ".*\.tex" +% -doc "glossaries-manual.tex" +% -codetitle "Main Package Code" % -author "Nicola Talbot" % -src "glossaries\.sty\Z=>glossaries.sty" % -src "glossaries-prefix.sty\Z=>glossaries-prefix.sty" @@ -17,12 +17,12 @@ % -src "(glossaries-polyglossia)\.(sty)\Z=>\1.\2" % -src "(example-glossaries-.*\.tex)\Z=>\1" % -src "(.*\.perl)\Z=>\1" -% -macrocode ".*\.perl" -% -macrocode ".*\.tex" % -comment ".*\.perl" % -comment ".*\.tex" +% -setambles ".*\.perl=>\nopreamble\nopostamble" +% -setambles ".*\.tex=>\nopreamble\nopostamble" % glossaries -% Created on 2019/12/6 14:57 +% Created on 2020/2/14 0:32 %\fi %\iffalse %<*package> @@ -45,7 +45,7 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2019 Nicola Talbot, all rights reserved. +% Copyright (C) 2020 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> @@ -68,7 +68,7 @@ glossaries.dtx pdfauthor={Nicola L.C. Talbot}, pdftitle={glossaries.sty: LaTeX2e Package to Assist Generating Glossaries}, pdfkeywords={LaTeX,package,glossary,acronyms}]{hyperref} -\usepackage[toc]{glossaries} +\usepackage{glossaries-extra} \RecordChanges \setlength\IndexMin{100pt} @@ -136,7 +136,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{19669} +\CheckSum{20333} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -163,12 +163,12 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of %\fi %\MakeShortVerb{"} % -% \title{Documented Code For glossaries v4.44} +% \title{Documented Code For glossaries v4.45} % \author{Nicola L.C. Talbot\\[10pt] %Dickimaw Books\\ %\url{http://www.dickimaw-books.com/}} % -% \date{2019-12-06} +% \date{2020-02-13} % \maketitle % %This is the documented code for the \styfmt{glossaries} package. @@ -184,7 +184,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.44: +%For the main user guide, read \qt{glossaries.sty v4.45: %\LaTeX2e\ Package to Assist Generating Glossaries}. % %\item[\url{mfirstuc-manual.pdf}] @@ -199,7 +199,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of % %\item[CHANGES] Change log. % -%\item[README] Package summary. +%\item[README.md] Package summary. % %\end{description} % @@ -239,7 +239,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossaries}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} %\changes{4.18}{2015-09-09}{split mfirstuc into separate bundle} % Required packages: @@ -339,13 +339,15 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of %\changes{4.24}{2016-05-27}{new} % Switch on debug mode. This will also cancel the \pkgopt{nowarn} % option. This is now a choice key. +%\changes{4.45}{2020-02-13}{added debug=showaccsupp} %\changes{4.41}{2018-07-23}{changed \cs{val} and \cs{nr} to %\cs{gls@debug@val} and \cs{gls@debug@nr}} % \begin{macrocode} \newif\if@gls@debug \define@choicekey{glossaries.sty}{debug}[\gls@debug@val\gls@debug@nr]% - {true,false,showtargets}[true]{% + {true,false,showtargets,showaccsupp}[true]{% \ifcase\gls@debug@nr\relax + % debug=true \@gls@debugtrue \renewcommand*{\GlossariesWarning}[1]{% \PackageWarning{glossaries}{##1}% @@ -356,10 +358,24 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \let\@glsshowtarget\@gobble \PackageInfo{glossaries}{debug mode ON (nowarn option disabled)}% \or + % debug=false \@gls@debugfalse \let\@glsshowtarget\@gobble + \let\@glsshowaccsupp\@gobblethree \PackageInfo{glossaries}{debug mode OFF}% \or + % debug=showtargets + \@gls@debugtrue + \renewcommand*{\GlossariesWarning}[1]{% + \PackageWarning{glossaries}{##1}% + }% + \renewcommand*{\GlossariesWarningNoLine}[1]{% + \PackageWarningNoLine{glossaries}{##1}% + }% + \PackageInfo{glossaries}{debug mode ON (nowarn option disabled)}% + \renewcommand{\@glsshowtarget}{\@@glsshowtarget}% + \or + % debug=showaccsupp \@gls@debugtrue \renewcommand*{\GlossariesWarning}[1]{% \PackageWarning{glossaries}{##1}% @@ -368,7 +384,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \PackageWarningNoLine{glossaries}{##1}% }% \PackageInfo{glossaries}{debug mode ON (nowarn option disabled)}% - \renewcommand{\@glsshowtarget}{\glsshowtarget}% + \renewcommand{\@glsshowaccsupp}{\glsshowaccsupp}% \fi } % \end{macrocode} @@ -381,17 +397,44 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of % \begin{macrocode} \newcommand*{\glsshowtarget}[1]{% \ifmmode - \nfss@text{\ttfamily\small [#1]}% + \nfss@text{\glsshowtargetfont [#1]}% \else \ifinner - \texttt{\small [#1]}% +% \end{macrocode} +% Grouping no longer required as new \cs{@@glsshowtarget} adds +% scoping but retained here in case any existing documents are using +% \cs{glsshowtarget} elsewhere. +% \begin{macrocode} + {\glsshowtargetfont [#1]}% \else - \marginpar{\texttt{\small #1}}% + \glsshowtargetouter{#1}% \fi \fi } % \end{macrocode} %\end{macro} +%\begin{macro}{\glsshowtargetouter} +%\changes{4.45}{2020-02-13}{new} +% \begin{macrocode} +\newcommand*{\glsshowtargetouter}[1]{% + \glsshowtargetsymbol\marginpar{\glsshowtargetsymbol\glsshowtargetfont #1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsshowtargetsymbol} +%\changes{4.45}{2020-02-13}{new} +% \begin{macrocode} +\newcommand*{\glsshowtargetsymbol}{{\tiny$\triangleright$}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsshowtargetfont} +%\changes{4.45}{2020-02-13}{new} +% \begin{macrocode} +\newcommand*{\glsshowtargetfont}{\ttfamily\footnotesize} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsshowtarget} %\changes{4.32}{2017-08-24}{new} %\pkgopt[showtargets]{debug} will redefine this. @@ -400,6 +443,42 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of % \end{macrocode} %\end{macro} % +%\begin{macro}{\@@glsshowtarget} +%\changes{4.45}{2020-02-13}{new} +%Need to detokenize the label in the event that it contains awkward +%characters like underscores. +% \begin{macrocode} +\newrobustcmd*{\@@glsshowtarget}[1]{% + \begingroup + \protected@edef\@gls@tmp{#1}% + \@onelevel@sanitize\@gls@tmp + \expandafter\glsshowtarget\expandafter{\@gls@tmp}% + \endgroup +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsshowaccsupp} +%\changes{4.45}{2020-02-13}{new} +%\pkgopt[showaccsupp]{debug} will redefine this. +% \begin{macrocode} +\newcommand*{\@glsshowaccsupp}[3]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsshowaccsupp} +%\changes{4.45}{2020-02-13}{new} +%Just use \cs{@@glsshowtarget} since it basically needs to do the +%same thing. +% \begin{macrocode} +\newrobustcmd*{\glsshowaccsupp}[3]{% + \ifstrempty{#1}% + {\@@glsshowtarget{/#2 (#3)}}% + {\@@glsshowtarget{/#2 (#3) [#1]}}% +} +% \end{macrocode} +%\end{macro} +% %Determine what to do if the \gloskey{see} key is used before %\cs{makeglossaries}. The default is to produce an error. %\begin{macro}{\@gls@see@noindex} @@ -1289,7 +1368,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \begin{macrocode} \@gls@declareoption{acronyms}{% \glsacronymtrue - \renewcommand{\@gls@do@acronymsdef}{% +% \end{macrocode} +%\changes{4.45}{2020-02-13}{changed \cs{renewcommand} to \cs{def}} +% \begin{macrocode} + \def\@gls@do@acronymsdef{% \DeclareAcronymList{acronym}% \newglossary[alg]{acronym}{acr}{acn}{\acronymname}% \renewcommand*{\acronymtype}{acronym}% @@ -1353,9 +1435,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \begin{macrocode} \newcommand{\@gls@islistofacronyms}[4]{% \def\gls@islistofacronyms##1,#1,##2\end@gls@islistofacronyms{% - \def\@before{##1}\def\@after{##2}}% + \def\@gls@before{##1}\def\@gls@after{##2}}% \gls@islistofacronyms,#2,#1,\@nil\end@gls@islistofacronyms - \ifx\@after\@nnil + \ifx\@gls@after\@nnil % \end{macrocode} % Not found % \begin{macrocode} @@ -2243,6 +2325,100 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{option} % +%\begin{macro}{\@domakeglossaries} +%\changes{4.45}{2020-02-13}{new} +% \begin{macrocode} +\providecommand{\@domakeglossaries}[1]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{option}{disablemakegloss} +%\changes{4.45}{2020-02-13}{new} +%Provide a way of disabling \cs{makeglossaries}. For example, if a +%class or package explicitly uses \cs{makeglossaries}. This is a +%valueless option to allow it to be passed through the document +%class option list. +% \begin{macrocode} +\@gls@declareoption{disablemakegloss}{% + \ifdefequal\makeglossaries\@no@makeglossaries + {% + \GlossariesWarning{Option `disablemakegloss' has no effect + (\string\makenoidxglossaries\space has already been used)}% + }% + {% + \ifdefequal\@makeglossary\@gobble + {% + \GlossariesWarning{Option `disablemakegloss' has no effect + (\string\makeglossaries\space has already been used)}% + }% + {% + \renewcommand{\@domakeglossaries}[1]{% + \PackageInfo{glossaries}{\string\makeglossaries\space and + \string\makenoidxglossaries\space have been disabled}% + }% + }% + }% +} +% \end{macrocode} +%\end{option} +%\begin{option}{restoremakegloss} +%\changes{4.45}{2020-02-13}{new} +%Cancel the effect of \pkgopt{disablemakegloss}. +% \begin{macrocode} +\@gls@declareoption{restoremakegloss}{% + \ifdefequal\makeglossaries\@no@makeglossaries + {% + \GlossariesWarning{Option `restoremakegloss' has no effect + (\string\makenoidxglossaries\space has already been used)}% + }% + {% + \ifdefequal\@makeglossary\@gobble + {% + \GlossariesWarning{Option `restoremakegloss' has no effect + (\string\makeglossaries\space has already been used)}% + }% + {% + \PackageInfo{glossaries}{\string\makeglossaries\space and + \string\makenoidxglossaries\space have been restored}% + \let\@domakeglossaries\@firstofone + }% + }% +} +% \end{macrocode} +%\end{option} +% +%\begin{macro}{\@do@write@glslabels} +%\changes{4.45}{2020-02-13}{new} +% \begin{macrocode} +\newcommand*{\@do@write@glslabels}{% + \AtEndDocument{\@@do@write@glslabels}% + \let\@do@write@glslabels\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@do@write@glslabels} +%\changes{4.45}{2020-02-13}{new} +% \begin{macrocode} +\newcommand*{\@@do@write@glslabels}{% + \newwrite\@gls@labelsfile + \immediate\openout\@gls@labelsfile=\jobname.glslabels + \forallglsentries[\@glo@types,\@ignored@glossaries]{\@glsentry}% + {\ifdefempty{\@glsentry}{}{\immediate\write\@gls@labelsfile{\@glsentry}}}% + \immediate\closeout\@gls@labelsfile +} +% \end{macrocode} +%\end{macro} +% +%\begin{option}{writeglslabels} +%\changes{4.45}{2020-02-13}{new} +%This option will write all entry labels (including those in ignored +%glossaries) to the file \cs{jobname}\texttt{.glslabels}. This file +%may be used by text editors for label auto-completion. +% \begin{macrocode} +\@gls@declareoption{writeglslabels}{\@do@write@glslabels} +% \end{macrocode} +%\end{option} %\begin{macro}{\ifglsautomake} %\changes{4.42}{2019-01-06}{now defined explicitly instead of through %boolean key} @@ -4292,11 +4468,18 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\end{macro} % %\begin{macro}{\ifglshaschildren} -% \cs{ifglshaschildren}\marg{label}\marg{true part}\marg{false part} +%\begin{definition} +%\cs{ifglshaschildren}\marg{label}\marg{true part}\marg{false part} +%\end{definition} +%This is inefficient as it has to search through all entries to find +%out which ones have the given entry as its parent. It's much easier +%to use \app{bib2gls} and get it to store the list of children that +%have been indexed (which is likely to be more useful). %\changes{3.02}{2012-05-21}{new} %\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} +%\changes{4.45}{2020-02-13}{made robust} % \begin{macrocode} -\newcommand{\ifglshaschildren}[3]{% +\newrobustcmd{\ifglshaschildren}[3]{% \glsdoifexists{#1}% {% \def\do@glshaschildren{#3}% @@ -4376,8 +4559,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\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}} +%\changes{4.45}{2020-02-13}{made robust} % \begin{macrocode} -\newcommand*{\ifglshassymbol}[3]{% +\newrobustcmd*{\ifglshassymbol}[3]{% \letcs{\@glo@symbol}{glo@\glsdetoklabel{#1}@symbol}% \ifdefempty\@glo@symbol {#3}% @@ -4394,8 +4578,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\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}} +%\changes{4.45}{2020-02-13}{made robust} % \begin{macrocode} -\newcommand*{\ifglshaslong}[3]{% +\newrobustcmd*{\ifglshaslong}[3]{% \letcs{\@glo@long}{glo@\glsdetoklabel{#1}@long}% \ifdefempty\@glo@long {#3}% @@ -4412,8 +4597,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\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}} +%\changes{4.45}{2020-02-13}{made robust} % \begin{macrocode} -\newcommand*{\ifglshasshort}[3]{% +\newrobustcmd*{\ifglshasshort}[3]{% \letcs{\@glo@short}{glo@\glsdetoklabel{#1}@short}% \ifdefempty\@glo@short {#3}% @@ -4432,8 +4618,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\cs{ifglshasfield}\marg{field}\marg{label}\marg{true part}\marg{false %part} %\end{definition} +%\changes{4.45}{2020-02-13}{made robust} % \begin{macrocode} -\newcommand*{\ifglshasfield}[4]{% +\newrobustcmd*{\ifglshasfield}[4]{% \glsdoifexists{#2}% {% \letcs{\@glo@thisvalue}{glo@\glsdetoklabel{#2}@#1}% @@ -11467,6 +11654,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% \ifglshaslong{#1}% {% \letcs\@glo@text{glo@\glsdetoklabel{#1}@name}% +% \end{macrocode} +%\cs{@gls@getbody} is defined by \sty{mfirstuc} (which used to be +%part of \styfmt{glossaries}). +% \begin{macrocode} \expandafter\@gls@getbody\@glo@text{}\@nil \expandafter\ifx\@gls@body\glsentrylong\relax \expandafter\Glsentrylong\@gls@rest @@ -11487,7 +11678,17 @@ false,nolabel,autolabel,nameref}[nolabel]{% \@glo@text }% \else - \xmakefirstuc{\@glo@text}% +% \end{macrocode} +%\changes{4.45}{2020-02-13}{added check for \cs{glsshortaccessdisplay}} +% \begin{macrocode} + \expandafter\ifx\@gls@body\glsshortaccessdisplay\relax + {% + \let\glsentryshort\Glsentryshort + \@glo@text + }% + \else + \xmakefirstuc{\@glo@text}% + \fi \fi \fi \fi @@ -11650,10 +11851,14 @@ false,nolabel,autolabel,nameref}[nolabel]{% % %\begin{macro}{\glsentrytitlecase} %\changes{4.22}{2016-04-19}{new} +%\changes{4.45}{2020-02-13}{added existence check} % \begin{macrocode} \newrobustcmd*{\@glsentrytitlecase}[2]{% - \glsfieldfetch{#1}{#2}{\@gls@value}% - \xcapitalisewords{\@gls@value}% + \glsdoifexists{#1}% + {% + \glsfieldfetch{#1}{#2}{\@gls@value}% + \xcapitalisewords{\@gls@value}% + }% } \ifdef\texorpdfstring { @@ -11689,6 +11894,16 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsentryparent} +%Expands to the label of the entry's parent. +%\changes{4.45}{2020-02-13}{new} +% \begin{macrocode} +\newcommand*{\glsentryparent}[1]{% + \@gls@entry@field{#1}{parent}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsentryuseri} % Get the first user key (as specified by the % \gloskey{user1} when the entry was defined). The argument @@ -12879,11 +13094,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% % style file). % % Note that you can't use \cs{@makeglossary} for only some of the -% defined glossaries. You either need to have a \cs{makeglossary} -% for all glossaries or none (otherwise you will end up with a -% situation where \TeX\ is trying to write to a non-existant -% file). The relevant glossary must be -% defined prior to using \cs{@makeglossary}. +% defined glossaries (with just the base \styfmt{glossaries} package). You either need +% to have a \cs{makeglossaries} for all glossaries or none (otherwise +% you will end up with a situation where \TeX\ is trying to write to a non-existant +% file). The relevant glossary must be defined prior to using \cs{@makeglossary}. +% \sty{glossaries-extra} allows for a hybrid approach. %\begin{macro}{\@makeglossary} % \begin{macrocode} \newcommand*{\@makeglossary}[1]{% @@ -13084,6 +13299,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{macro}{\makeglossaries} % \begin{macrocode} \newcommand*{\makeglossaries}{% + \@domakeglossaries + {% % \end{macrocode} %If automake=immediate setting is on, use the shell escape now. % \begin{macrocode} @@ -13142,8 +13359,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% % implements \cs{makeglossaries} or has been restored to its original % definition (in which case it shouldn't be changed). %\changes{4.41}{2018-07-23}{removed redefinition of \cs{makeglossary}} +%\changes{4.45}{2020-02-13}{let \cs{@makeglossary} to \cs{@gobble} +%instead of \cs{relax}} % \begin{macrocode} - \let\@makeglossary\relax + \let\@makeglossary\@gobble \let\makeglossaries\relax % \end{macrocode} % Disable all commands that have no effect after \cs{makeglossaries} @@ -13207,6 +13426,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % Check the sort setting: % \begin{macrocode} \@glo@check@sortallowed\makeglossaries + }% } % \end{macrocode} %\changes{4.02}{2013-13-05}{made preamble only} @@ -13236,6 +13456,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% % needed for \cs{printnoidxglossary} % \begin{macrocode} \newcommand*{\makenoidxglossaries}{% + \@domakeglossaries + {% % \end{macrocode} % Redefine empty glossary warning: % \begin{macrocode} @@ -13405,6 +13627,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % Check sort option allowed. % \begin{macrocode} \@glo@check@sortallowed\makenoidxglossaries + }% } % \end{macrocode} % Preamble-only command: @@ -14176,8 +14399,9 @@ you %\cs{glssee}\marg{label}\marg{cross-ref list} %\changes{1.17}{2008-12-26}{new} %\changes{3.08a}{2013-09-28}{made robust} +%\changes{4.45}{2020-02-13}{switched to \cs{newrobustcmd}} % \begin{macrocode} -\DeclareRobustCommand*{\glssee}[3][\seename]{% +\newrobustcmd*{\glssee}[3][\seename]{% \@do@seeglossary{#2}{[#1]{#3}}} \newcommand*{\@glssee}[3][\seename]{% \glssee[#1]{#3}{#2}} @@ -14190,16 +14414,18 @@ you % The first argument specifies what tag to use (e.g.\ ``see''), % the second argument is a comma-separated list of labels. % The final argument (the location) is ignored. +%\changes{4.45}{2020-02-13}{switched to \cs{newrobustcmd}} % \begin{macrocode} -\DeclareRobustCommand*{\glsseeformat}[3][\seename]{% +\newrobustcmd*{\glsseeformat}[3][\seename]{% \emph{#1} \glsseelist{#2}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsseelist} %\cs{glsseelist}\marg{list} formats list of entry labels. %\changes{3.08a}{2013-09-28}{made robust} +%\changes{4.45}{2020-02-13}{switched to \cs{newrobustcmd}} % \begin{macrocode} -\DeclareRobustCommand*{\glsseelist}[1]{% +\newrobustcmd*{\glsseelist}[1]{% % \end{macrocode} % If there is only one item in the list, set the last separator % to do nothing. @@ -14257,8 +14483,9 @@ you %\changes{3.0}{2011-04-02}{hyperlink uses \cs{glsseeitemformat} instead %of \cs{glsentryname}} %\changes{3.08a}{2013-09-28}{made robust} +%\changes{4.45}{2020-02-13}{switched to \cs{newrobustcmd}} % \begin{macrocode} -\DeclareRobustCommand*{\glsseeitem}[1]{\glshyperlink[\glsseeitemformat{#1}]{#1}} +\newrobustcmd*{\glsseeitem}[1]{\glshyperlink[\glsseeitemformat{#1}]{#1}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsseeitemformat} @@ -19187,7 +19414,7 @@ you % \cs{gls}\marg{label}} on subsequent use. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-prefix}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossaries-prefix}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Pass all options to \sty{glossaries}: % \begin{macrocode} @@ -19250,55 +19477,64 @@ you % % Define commands to access these fields: %\begin{macro}{\glsentryprefixfirst} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} -\newcommand*{\glsentryprefixfirst}[1]{\csuse{glo@#1@prefixfirst}} +\newcommand*{\glsentryprefixfirst}[1]{\csuse{glo@\glsdetoklabel{#1}@prefixfirst}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryprefixfirstplural} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} -\newcommand*{\glsentryprefixfirstplural}[1]{\csuse{glo@#1@prefixfirstplural}} +\newcommand*{\glsentryprefixfirstplural}[1]{% + \csuse{glo@\glsdetoklabel{#1}@prefixfirstplural}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryprefix} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} -\newcommand*{\glsentryprefix}[1]{\csuse{glo@#1@prefix}} +\newcommand*{\glsentryprefix}[1]{\csuse{glo@\glsdetoklabel{#1}@prefix}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryprefixplural} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} -\newcommand*{\glsentryprefixplural}[1]{\csuse{glo@#1@prefixplural}} +\newcommand*{\glsentryprefixplural}[1]{\csuse{glo@\glsdetoklabel{#1}@prefixplural}} % \end{macrocode} %\end{macro} % % Now for the initial upper case variants: %\begin{macro}{\Glsentryprefixfirst} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} \newrobustcmd*{\Glsentryprefixfirst}[1]{% - \protected@edef\@glo@text{\csname glo@#1@prefixfirst\endcsname}% + \protected@edef\@glo@text{\csname glo@\glsdetoklabel{#1}@prefixfirst\endcsname}% \xmakefirstuc\@glo@text } % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryprefixfirstplural} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} \newrobustcmd*{\Glsentryprefixfirstplural}[1]{% - \protected@edef\@glo@text{\csname glo@#1@prefixfirstplural\endcsname}% + \protected@edef\@glo@text{\csname glo@\glsdetoklabel{#1}@prefixfirstplural\endcsname}% \xmakefirstuc\@glo@text } % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryprefix} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} \newrobustcmd*{\Glsentryprefix}[1]{% - \protected@edef\@glo@text{\csname glo@#1@prefix\endcsname}% + \protected@edef\@glo@text{\csname glo@\glsdetoklabel{#1}@prefix\endcsname}% \xmakefirstuc\@glo@text } % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryprefixplural} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} \newrobustcmd*{\Glsentryprefixplural}[1]{% - \protected@edef\@glo@text{\csname glo@#1@prefixplural\endcsname}% + \protected@edef\@glo@text{\csname glo@\glsdetoklabel{#1}@prefixplural\endcsname}% \xmakefirstuc\@glo@text } % \end{macrocode} @@ -19306,36 +19542,40 @@ you % % Define commands to determine if the prefix keys have been set: %\begin{macro}{\ifglshasprefix} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\ifglshasprefix}[3]{% - \ifcsempty{glo@#1@prefix}% + \ifcsempty{glo@\glsdetoklabel{#1}@prefix}% {#3}% {#2}% } % \end{macrocode} %\end{macro} %\begin{macro}{\ifglshasprefixplural} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\ifglshasprefixplural}[3]{% - \ifcsempty{glo@#1@prefixplural}% + \ifcsempty{glo@\glsdetoklabel{#1}@prefixplural}% {#3}% {#2}% } % \end{macrocode} %\end{macro} %\begin{macro}{\ifglshasprefixfirst} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\ifglshasprefixfirst}[3]{% - \ifcsempty{glo@#1@prefixfirst}% + \ifcsempty{glo@\glsdetoklabel{#1}@prefixfirst}% {#3}% {#2}% } % \end{macrocode} %\end{macro} %\begin{macro}{\ifglshasprefixfirstplural} +%\changes{4.45}{2020-02-13}{added \cs{glsdetoklabel}} % \begin{macrocode} \newcommand*{\ifglshasprefixfirstplural}[3]{% - \ifcsempty{glo@#1@prefixfirstplural}% + \ifcsempty{glo@\glsdetoklabel{#1}@prefixfirstplural}% {#3}% {#2}% } @@ -19356,6 +19596,14 @@ you % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsprefixsep} +%\changes{4.45}{2020-02-13}{new} +%Separator between prefix and term. Does nothing by default. +% \begin{macrocode} +\newcommand{\glsprefixsep}{} +% \end{macrocode} +%\end{macro} +% % Define commands that insert the prefix before commands like \ics{gls}: %\begin{macro}{\pgls} %\changes{4.08}{2014-07-30}{changed to use \cs{@gls@hyp@opt}} @@ -19384,10 +19632,10 @@ you {% \ifglsused{#2}% {% - \glsentryprefix{#2}% + \ifglshasprefix{#2}{\glsentryprefix{#2}\glsprefixsep}{}% }% {% - \glsentryprefixfirst{#2}% + \ifglshasprefixfirst{#2}{\glsentryprefixfirst{#2}\glsprefixsep}{}% }% \@gls@{#1}{#2}[#3]% }% @@ -19423,10 +19671,11 @@ you {% \ifglsused{#2}% {% - \glsentryprefixplural{#2}% + \ifglshasprefixplural{#2}{\glsentryprefixplural{#2}\glsprefixsep}{}% }% {% - \glsentryprefixfirstplural{#2}% + \ifglshasprefixfirstplural{#2}% + {\glsentryprefixfirstplural{#2}\glsprefixsep}{}% }% \@glspl@{#1}{#2}[#3]% }% @@ -19465,6 +19714,7 @@ you \ifglshasprefix{#2}% {% \Glsentryprefix{#2}% + \glsprefixsep \@gls@{#1}{#2}[#3]% }% {\@Gls@{#1}{#2}[#3]}% @@ -19473,6 +19723,7 @@ you \ifglshasprefixfirst{#2}% {% \Glsentryprefixfirst{#2}% + \glsprefixsep \@gls@{#1}{#2}[#3]% }% {\@Gls@{#1}{#2}[#3]}% @@ -19513,6 +19764,7 @@ you \ifglshasprefixplural{#2}% {% \Glsentryprefixplural{#2}% + \glsprefixsep \@glspl@{#1}{#2}[#3]% }% {\@Glspl@{#1}{#2}[#3]}% @@ -19521,6 +19773,7 @@ you \ifglshasprefixfirstplural{#2}% {% \Glsentryprefixfirstplural{#2}% + \glsprefixsep \@glspl@{#1}{#2}[#3]% }% {\@Glspl@{#1}{#2}[#3]}% @@ -19558,10 +19811,12 @@ you {% \ifglsused{#2}% {% - \mfirstucMakeUppercase{\glsentryprefix{#2}}% + \ifglshasprefix{#2}% + {\mfirstucMakeUppercase{\glsentryprefix{#2}\glsprefixsep}}{}% }% {% - \mfirstucMakeUppercase{\glsentryprefixfirst{#2}}% + \ifglshasprefixfirst{#2}% + {\mfirstucMakeUppercase{\glsentryprefixfirst{#2}\glsprefixsep}}{}% }% \@GLS@{#1}{#2}[#3]% }% @@ -19597,10 +19852,12 @@ you {% \ifglsused{#2}% {% - \mfirstucMakeUppercase{\glsentryprefixplural{#2}}% + \ifglshasprefixplural{#2}% + {\mfirstucMakeUppercase{\glsentryprefixplural{#2}\glsprefixsep}}{}% }% {% - \mfirstucMakeUppercase{\glsentryprefixfirstplural{#2}}% + \ifglshasprefixfirstplural{#2}% + {\mfirstucMakeUppercase{\glsentryprefixfirstplural{#2}\glsprefixsep}}{}% }% \@GLSpl@{#1}{#2}[#3]% }% @@ -19622,7 +19879,7 @@ you %\label{sec:code:hypernav} % Package Definition: % \begin{macrocode} -\ProvidesPackage{glossary-hypernav}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-hypernav}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % % The commands defined in this package are provided to @@ -19632,8 +19889,9 @@ you % set \cs{@glo@type} to the label of the current % glossary. This is used to create a unique hypertarget in % the event of multiple glossaries. -%\\[10pt] -% \cs{glsnavhyperlink}\oarg{type}\marg{label}\marg{text}\\[10pt] +%\begin{definition} +% \cs{glsnavhyperlink}\oarg{type}\marg{label}\marg{text} +%\end{definition} % This command makes \meta{text} a hyperlink to the glossary group % whose label is given by \meta{label} for the glossary given % by \meta{type}. @@ -19655,14 +19913,16 @@ you \newcommand*{\glsnavhyperlinkname}[2]{glsn:#1@#2} % \end{macrocode} %\end{macro} -%\vskip5pt -% \cs{glsnavhypertarget}\oarg{type}\marg{label}\marg{text}\\[10pt] +% +%\begin{macro}{\glsnavhypertarget} +%\begin{definition} +% \cs{glsnavhypertarget}\oarg{type}\marg{label}\marg{text} +%\end{definition} % This command makes \meta{text} a hypertarget for the glossary group % whose label is given by \meta{label} in the glossary given % by \meta{type}. If \meta{type} is omitted, \cs{@glo@type} is % used which is set by \ics{printglossary} to the current % glossary label. -%\begin{macro}{\glsnavhypertarget} %\changes{1.14}{2008-06-17}{added write to aux file} %\changes{1.15}{2008-08-15}{added check if rerun required} %\changes{1.17}{2008-12-26}{replaced \cs{hypertarget} to @@ -19815,7 +20075,7 @@ you % This defines an in-line style where the entries are % comma-separated with just the name and description displayed. % \begin{macrocode} -\ProvidesPackage{glossary-inline}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-inline}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % %\begin{style}{inline} @@ -20006,7 +20266,7 @@ you % \ics{item} command, it will appear in a bold font by % default. % \begin{macrocode} -\ProvidesPackage{glossary-list}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-list}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} %\begin{macro}{\indexspace} %\changes{4.13}{2015-02-03}{new} @@ -20288,7 +20548,7 @@ you % The glossary styles defined in the \isty{glossary-long} package % used the \env{longtable} environment in the glossary. % \begin{macrocode} -\ProvidesPackage{glossary-long}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-long}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Requires the \isty{longtable} package: % \begin{macrocode} @@ -20785,7 +21045,7 @@ you % \url{http://tex.stackexchange.com/a/56890} % % \begin{macrocode} -\ProvidesPackage{glossary-longbooktabs}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-longbooktabs}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Requires \sty{booktabs} package: % \begin{macrocode} @@ -21126,7 +21386,7 @@ you % used the \env{longtable} environment in the glossary and use % ragged right formatting for the multiline columns. % \begin{macrocode} -\ProvidesPackage{glossary-longragged}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-longragged}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -21559,7 +21819,7 @@ you %use the \sty{multicol} package. These use the tree-like glossary %styles in a multicol environment. % \begin{macrocode} -\ProvidesPackage{glossary-mcols}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-mcols}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -21996,7 +22256,7 @@ you % The glossary styles defined in the \isty{glossary-super} package % use the \env{supertabular} environment. % \begin{macrocode} -\ProvidesPackage{glossary-super}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-super}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Requires the \isty{supertabular} package: % \begin{macrocode} @@ -22528,7 +22788,7 @@ you % are like those provided by the \isty{glossary-super} package, % except that the multiline columns have ragged right justification. % \begin{macrocode} -\ProvidesPackage{glossary-superragged}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-superragged}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -22968,7 +23228,7 @@ you % that have a tree-like structure. These are designed for % hierarchical glossaries. % \begin{macrocode} -\ProvidesPackage{glossary-tree}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossary-tree}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % %\begin{macro}{\indexspace} @@ -23689,7 +23949,7 @@ you % hyperlinks may not work properly. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-207}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossaries-compatible-207}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} %\begin{macro}{\GlsAddXdyAttribute} % Adds an attribute in old format. @@ -24050,7 +24310,7 @@ you %\section{glossaries-compatible-307} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-307}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossaries-compatible-307}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % % Compatibility macros for predefined glossary styles: @@ -24858,7 +25118,7 @@ you % \end{macrocode} % Package version number now in line with main glossaries package number. % \begin{macrocode} -\ProvidesPackage{glossaries-accsupp}[2019/12/06 v4.44 (NLCT) +\ProvidesPackage{glossaries-accsupp}[2020/02/13 v4.45 (NLCT) Experimental glossaries accessibility] % \end{macrocode} % Pass all options to \sty{glossaries}: @@ -24936,8 +25196,54 @@ you % Required packages: % \begin{macrocode} \RequirePackage{glossaries} -\RequirePackage{accsupp} % \end{macrocode} +% +%\begin{macro}{\gls@accsupp@engine} +%\changes{4.45}{2020-02-13}{new} +%There's currently only support for \sty{accsupp}, but if you +%define \cs{gls@accsupp@engine} before loading +%\sty{glossaries-accsupp}, you can prevent \sty{accsupp} from being +%loaded. Redefining this command after \sty{glossaries-accsupp} has loaded +%obviously won't do anything (and so is an internal command to +%deter casual use). If it is defined to something other than +%"accsupp" then \cs{gls@accessibility} will need to be defined to +%something appropriate. +% \begin{macrocode} +\providecommand{\gls@accsupp@engine}{accsupp} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\gls@accessibility} +%\changes{4.45}{2020-02-13}{new} +%\begin{definition} +%\cs{gls@accessibility}\marg{options}\marg{PDF element}\marg{value}\marg{content} +%\end{definition} +% \begin{macrocode} +\providecommand{\gls@accessibility}[4]{#4} +\ifdefstring\gls@accsupp@engine{accsupp} +{ + \RequirePackage{accsupp} + \renewcommand{\gls@accessibility}[4]{% + \BeginAccSupp{#1,#2={#3}}#4\EndAccSupp{}% + } +} +{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessibility} +%\changes{4.45}{2020-02-13}{new} +%\begin{definition} +%\cs{glsaccessibility}\oarg{options}\marg{PDF element}\marg{value}\marg{content} +%\end{definition} +%User-level command that includes debug info if required. +% \begin{macrocode} +\newcommand{\glsaccessibility}[4][]{% + \@glsshowaccsupp{#1}{#2}{#3}% + \gls@accessibility{#1}{#2}{#3}{#4}% +} +% \end{macrocode} +%\end{macro} % %\section{Defining Replacement Text} % The version 0.1 stored the replacement text in the @@ -25050,10 +25356,69 @@ you } % \end{macrocode} %\end{key} -% There are no equivalent keys for the \gloskey{user1}\ldots -%\gloskey{user6} keys. The replacement text would have to be +%There are now also keys that correspond to the user keys: +%\begin{key}{user1access} +%\changes{4.45}{2020-02-13}{new} +% The replacement text corresponding to the \gloskey{user1} key: +% \begin{macrocode} +\define@key{glossentry}{user1access}{% + \def\@glo@useriaccess{#1}% +} +% \end{macrocode} +%\end{key} +%\begin{key}{user2access} +%\changes{4.45}{2020-02-13}{new} +% The replacement text corresponding to the \gloskey{user2} key: +% \begin{macrocode} +\define@key{glossentry}{user2access}{% + \def\@glo@useriiaccess{#1}% +} +% \end{macrocode} +%\end{key} +% +%\begin{key}{user3access} +%\changes{4.45}{2020-02-13}{new} +% The replacement text corresponding to the \gloskey{user3} key: +% \begin{macrocode} +\define@key{glossentry}{user3access}{% + \def\@glo@useriiiaccess{#1}% +} +% \end{macrocode} +%\end{key} +% +%\begin{key}{user4access} +%\changes{4.45}{2020-02-13}{new} +% The replacement text corresponding to the \gloskey{user4} key: +% \begin{macrocode} +\define@key{glossentry}{user4access}{% + \def\@glo@userivaccess{#1}% +} +% \end{macrocode} +%\end{key} +% +%\begin{key}{user5access} +%\changes{4.45}{2020-02-13}{new} +% The replacement text corresponding to the \gloskey{user5} key: +% \begin{macrocode} +\define@key{glossentry}{user5access}{% + \def\@glo@uservaccess{#1}% +} +% \end{macrocode} +%\end{key} +% +%\begin{key}{user6access} +%\changes{4.45}{2020-02-13}{new} +% The replacement text corresponding to the \gloskey{user6} key: +% \begin{macrocode} +\define@key{glossentry}{user6access}{% + \def\@glo@userviaccess{#1}% +} +% \end{macrocode} +%\end{key} +% +% For any custom keys, the replacement text would have to be % explicitly put in the value, e.g., -% "user1={\glsaccsupp{inches}{in}}". +% "user1={\glsshortaccsupp{inches}{in}}". % % Append these new keys to \cs{@gls@keymap}: % \begin{macrocode} @@ -25070,7 +25435,13 @@ you {shortaccess}{shortaccess},% {shortpluralaccess}{shortpluralaccess},% {longaccess}{longaccess},% - {longpluralaccess}{longpluralaccess}% + {longpluralaccess}{longpluralaccess},% + {user1access}{useriaccess},% + {user2access}{useriiaccess},% + {user3access}{useriiiaccess},% + {user4access}{userivaccess},% + {user5access}{uservaccess},% + {user6access}{userviaccess}% } % \end{macrocode} % @@ -25081,14 +25452,18 @@ you % \end{macrocode} %\end{macro} % -% Add to the start hook (the \gloskey{access} key is initialised to +% Previously, the \gloskey{access} key was initialised to % the value of the \gloskey{symbol} key at the start for backwards -% compatibility): +% compatibility. This causes a problem for situations where the +% replacement text is provided for \gloskey{symbol} but not for +% \gloskey{name} so this behaviour has been removed. +%\changes{4.45}{2020-02-13}{removed backward compatibility use of +%symbol key} % \begin{macrocode} \let\@gls@oldnewglossaryentryprehook\@newglossaryentryprehook \renewcommand*{\@newglossaryentryprehook}{% \@gls@oldnewglossaryentryprehook - \def\@glo@access{\@glo@symbol}% + \def\@glo@access{\relax}% % \end{macrocode} % Initialise the other keys: % \begin{macrocode} @@ -25104,6 +25479,12 @@ you \def\@glo@shortpluralaccess{\@glo@shortaccess}% \def\@glo@longaccess{\relax}% \def\@glo@longpluralaccess{\@glo@longaccess}% + \def\@glo@useriaccess{\relax}% + \def\@glo@useriiaccess{\relax}% + \def\@glo@useriiiaccess{\relax}% + \def\@glo@userivaccess{\relax}% + \def\@glo@uservaccess{\relax}% + \def\@glo@userviaccess{\relax}% } % \end{macrocode} % Add to the end hook: @@ -25153,6 +25534,24 @@ you \expandafter \protected@xdef\csname glo@\@glo@label @longpluralaccess\endcsname{% \@glo@longpluralaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @useriaccess\endcsname{% + \@glo@useriaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @useriiaccess\endcsname{% + \@glo@useriiaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @useriiiaccess\endcsname{% + \@glo@useriiiaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @userivaccess\endcsname{% + \@glo@userivaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @uservaccess\endcsname{% + \@glo@uservaccess}% + \expandafter + \protected@xdef\csname glo@\@glo@label @userviaccess\endcsname{% + \@glo@userviaccess}% } % \end{macrocode} % @@ -25198,11 +25597,12 @@ you % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryfirstpluralaccess} +%\changes{4.45}{2020-02-13}{switched to using \cs{@gls@entry@field}} % Get the value of the \gloskey{firstpluralaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentryfirstpluralaccess}[1]{% - \csname glo@#1@firstpluralaccess\endcsname + \@gls@entry@field{#1}{firstpluralaccess}% } % \end{macrocode} %\end{macro} @@ -25240,9 +25640,10 @@ you % 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}} +%\changes{4.45}{2020-02-13}{corrected field reference} % \begin{macrocode} \newcommand*{\glsentrydescpluralaccess}[1]{% - \@gls@entry@field{#1}{descaccess}% + \@gls@entry@field{#1}{descpluralaccess}% } % \end{macrocode} %\end{macro} @@ -25288,159 +25689,433 @@ you % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsaccsupp} -%\changes{4.38}{2018-05-10}{added braces around actual text argument} -%\begin{definition} -%\cs{glsaccsupp}\marg{replacement text}\marg{text} -%\end{definition} -% This can be redefined to use "E" or "Alt" instead of -% "ActualText". (I don't have the software to test the "E" or -% "Alt" options.) +%\begin{macro}{\glsentryuseriaccess} +% Get the value of the \gloskey{user1access} key for the entry with +% the given label: +%\changes{4.45}{2020-02-13}{new} % \begin{macrocode} -\newcommand*{\glsaccsupp}[2]{% - \BeginAccSupp{ActualText={#1}}#2\EndAccSupp{}% +\newcommand*{\glsentryuseriaccess}[1]{% + \@gls@entry@field{#1}{useriaccess}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\xglsaccsupp} -% Fully expands replacement text before calling \cs{glsaccsupp} +% +%\begin{macro}{\glsentryuseriiaccess} +% Get the value of the \gloskey{user2access} key for the entry with +% the given label: +%\changes{4.45}{2020-02-13}{new} % \begin{macrocode} -\newcommand*{\xglsaccsupp}[2]{% - \protected@edef\@gls@replacementtext{#1}% - \expandafter\glsaccsupp\expandafter{\@gls@replacementtext}{#2}% +\newcommand*{\glsentryuseriiaccess}[1]{% + \@gls@entry@field{#1}{useriiaccess}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\@gls@access@display} -%\changes{4.03}{2014-01-20}{new} +%\begin{macro}{\glsentryuseriiiaccess} +% Get the value of the \gloskey{user3access} key for the entry with +% the given label: +%\changes{4.45}{2020-02-13}{new} % \begin{macrocode} -\newcommand*{\@gls@access@display}[2]{% - \protected@edef\@glo@access{#2}% - \ifx\@glo@access\@gls@noaccess - #1% - \else - \xglsaccsupp{\@glo@access}{#1}% - \fi +\newcommand*{\glsentryuseriiiaccess}[1]{% + \@gls@entry@field{#1}{useriiiaccess}% } % \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}{\glsentryuserivaccess} +% Get the value of the \gloskey{user4access} key for the entry with +% the given label: +%\changes{4.45}{2020-02-13}{new} % \begin{macrocode} -\DeclareRobustCommand*{\glsnameaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryaccess{#2}}% +\newcommand*{\glsentryuserivaccess}[1]{% + \@gls@entry@field{#1}{userivaccess}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstextaccessdisplay} -% As above but for the \gloskey{textaccess} replacement text. +% +%\begin{macro}{\glsentryuservaccess} +% Get the value of the \gloskey{user5access} key for the entry with +% the given label: +%\changes{4.45}{2020-02-13}{new} % \begin{macrocode} -\DeclareRobustCommand*{\glstextaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrytextaccess{#2}}% +\newcommand*{\glsentryuservaccess}[1]{% + \@gls@entry@field{#1}{uservaccess}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\glspluralaccessdisplay} -% As above but for the \gloskey{pluralaccess} replacement text. +% +%\begin{macro}{\glsentryuserviaccess} +% Get the value of the \gloskey{user6access} key for the entry with +% the given label: +%\changes{4.45}{2020-02-13}{new} % \begin{macrocode} -\DeclareRobustCommand*{\glspluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrypluralaccess{#2}}% +\newcommand*{\glsentryuserviaccess}[1]{% + \@gls@entry@field{#1}{userviaccess}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstaccessdisplay} -% As above but for the \gloskey{firstaccess} replacement text. -% \begin{macrocode} -\DeclareRobustCommand*{\glsfirstaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryfirstaccess{#2}}% +% +%There are three types of replacement text: +%\begin{description} +%\item[Alt] Description of some content that's non-textual (for +%example, an image). A word break is assumed after the content. +%\item[ActualText] A character or sequence of characters that +%replaces textual content (for example, a dropped capital, a +%ligature or a symbol). No word break is assumed after the content. +%\item[E] Expansion of an abbreviation to avoid ambiguity (for +%example, ``St'' could be short for ``saint'' or ``street''). +%\end{description} +%Therefore, rather than having one command for all fields, it's +%better to have a command dependent on the field type. For example, +%the \gloskey{short} and \gloskey{shortpl} keys would require "E", +%the \gloskey{symbol} key would require "ActualText", and a field +%that contains an image would require "Alt". +% +%\begin{macro}{\glsfieldaccsupp} +%\begin{definition} +%\cs{glsfieldaccsupp}\marg{replacement}\marg{content}\marg{field}\marg{label} +%\end{definition} +%\changes{4.45}{2020-02-13}{new} +%Test if there's a command called \cs{gls\meta{field}accsupp}. If +%there is then use that otherwise use \cs{glsaccsupp}. The first +%argument should be the internal field label (not the key). The +%final argument is the entry label. If \sty{glossaries-extra} has +%been loaded, this first checks for +%\cs{glsxtr\meta{category}\meta{field}accsupp} and \cs{glsxtr\meta{category}accsupp}. +% \begin{macrocode} +\newcommand{\glsfieldaccsupp}[4]{% + \ifdef\glscategory + {% + \ifcsdef{glsxtr\glscategory{#4}#3accsupp}% + {\csname glsxtr\glscategory{#4}#3accsupp\endcsname{#1}{#2}}% + {% + \ifcsdef{glsxtr\glscategory{#4}accsupp}% + {\csname glsxtr\glscategory{#4}accsupp\endcsname{#1}{#2}}% + {% + \ifcsdef{gls#3accsupp}% + {\csname gls#3accsupp\endcsname{#1}{#2}}% + {\glsaccsupp{#1}{#2}}% + }% + }% + }% + {% + \ifcsdef{gls#3accsupp}% + {\csname gls#3accsupp\endcsname{#1}{#2}}% + {\glsaccsupp{#1}{#2}}% + }% } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstpluralaccessdisplay} -% As above but for the \gloskey{firstpluralaccess} replacement text. +% +%\begin{macro}{\xglsfieldaccsupp} +%\begin{definition} +%\cs{xglsfieldaccsupp}\marg{replacement}\marg{content}\marg{field}\marg{label} +%\end{definition} +%\changes{4.45}{2020-02-13}{new} +%As \cs{glsfieldaccsupp} but fully expand replacement text. % \begin{macrocode} -\DeclareRobustCommand*{\glsfirstpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryfirstpluralaccess{#2}}% +\newcommand{\xglsfieldaccsupp}[1]{% + \protected@edef\@gls@replacementtext{#1}% + \expandafter\glsfieldaccsupp\expandafter{\@gls@replacementtext}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\glssymbolaccessdisplay} -% As above but for the \gloskey{symbolaccess} replacement text. +% +%\begin{macro}{\glsshortaccsupp} +%\changes{4.45}{2020-02-13}{new} +%\begin{definition} +%\cs{glsshortaccsupp}\marg{replacement text}\marg{text} +%\end{definition} % \begin{macrocode} -\DeclareRobustCommand*{\glssymbolaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrysymbolaccess{#2}}% -} +\newcommand*{\glsshortaccsupp}[2]{\glsaccessibility{E}{#1}{#2}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glssymbolpluralaccessdisplay} -% As above but for the \gloskey{symbolpluralaccess} replacement text. -% \begin{macrocode} -\DeclareRobustCommand*{\glssymbolpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrysymbolpluralaccess{#2}}% +%\begin{macro}{\glsshortplaccsupp} +%\changes{4.45}{2020-02-13}{new} +%\begin{definition} +%\cs{glsshortplaccsupp}\marg{replacement text}\marg{text} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glsshortplaccsupp}{\glsshortaccsupp} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsaccsupp} +%\changes{4.38}{2018-05-10}{added braces around actual text argument} +%\begin{definition} +%\cs{glsaccsupp}\marg{replacement text}\marg{text} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glsaccsupp}[2]{\glsaccessibility{ActualText}{#1}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\xglsaccsupp} +% Fully expands replacement text before calling \cs{glsaccsupp} +% \begin{macrocode} +\newcommand*{\xglsaccsupp}[2]{% + \protected@edef\@gls@replacementtext{#1}% + \expandafter\glsaccsupp\expandafter{\@gls@replacementtext}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@access@display} +%\changes{4.03}{2014-01-20}{new} +%Deprecated. Use \cs{@gls@fieldaccess@display} instead. +% \begin{macrocode} +\newcommand*{\@gls@access@display}[2]{% + \protected@edef\@glo@access{#2}% + \ifx\@glo@access\@gls@noaccess + #1% + \else + \xglsaccsupp{\@glo@access}{#1}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@fieldaccess@display} +%\begin{definition} +%\cs{@gls@fieldaccess@display}\marg{label}\marg{field}\marg{content}\marg{replacement} +%\end{definition} +%\changes{4.45}{2020-02-13}{new} +% \begin{macrocode} +\newcommand*{\@gls@fieldaccess@display}[4]{% + \protected@edef\@glo@access{#4}% + \ifdefequal\@glo@access\@gls@noaccess + {#3}% + {\expandafter\glsfieldaccsupp\expandafter{\@glo@access}{#3}{#2}{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsnameaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} +% Displays the first argument with the accessibility text for +% the entry with the label given by the second argument (if set). +% \begin{macrocode} +\newrobustcmd*{\glsnameaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@access}% + {#1}% + {\@gls@fieldaccess@display{#2}{name}{#1}{\glsentryaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstextaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} +% As above but for the \gloskey{textaccess} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glstextaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@textaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{text}{#1}{\glsentrytextaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glspluralaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} +% As above but for the \gloskey{pluralaccess} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glspluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@pluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{plural}{#1}{\glsentrypluralaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} +% As above but for the \gloskey{firstaccess} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glsfirstaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@firstaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{first}{#1}{\glsentryfirstaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstpluralaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} +% As above but for the \gloskey{firstpluralaccess} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glsfirstpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@firstpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{firstpl}{#1}{\glsentryfirstpluralaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glssymbolaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} +% As above but for the \gloskey{symbolaccess} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glssymbolaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@symbolaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{symbol}{#1}{\glsentrysymbolaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glssymbolpluralaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} +% As above but for the \gloskey{symbolpluralaccess} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glssymbolpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@symbolpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{symbolplural}{#1}{\glsentrysymbolpluralaccess{#2}}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsdescriptionaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} % As above but for the \gloskey{descriptionaccess} replacement text. % \begin{macrocode} -\DeclareRobustCommand*{\glsdescriptionaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrydescaccess{#2}}% +\newrobustcmd*{\glsdescriptionaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@descaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{desc}{#1}{\glsentrydescaccess{#2}}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsdescriptionpluralaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} % As above but for the \gloskey{descriptionpluralaccess} replacement text. % \begin{macrocode} -\DeclareRobustCommand*{\glsdescriptionpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrydescpluralaccess{#2}}% +\newrobustcmd*{\glsdescriptionpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@descpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{descplural}{#1}{\glsentrydescpluralaccess{#2}}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsshortaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} % As above but for the \gloskey{shortaccess} replacement text. % \begin{macrocode} -\DeclareRobustCommand*{\glsshortaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryshortaccess{#2}}% +\newrobustcmd*{\glsshortaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@shortaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{short}{#1}{\glsentryshortaccess{#2}}}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsshortpluralaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} % As above but for the \gloskey{shortpluralaccess} replacement text. % \begin{macrocode} -\DeclareRobustCommand*{\glsshortpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryshortpluralaccess{#2}}% +\newrobustcmd*{\glsshortpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@shortpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{shortpl}{#1}{\glsentryshortpluralaccess{#2}}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glslongaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} % As above but for the \gloskey{longaccess} replacement text. % \begin{macrocode} -\DeclareRobustCommand*{\glslongaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrylongaccess{#2}}% +\newrobustcmd*{\glslongaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@longaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{long}{#1}{\glsentrylongaccess{#2}}}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glslongpluralaccessdisplay} +%\changes{4.45}{2020-02-13}{added check for existence} % As above but for the \gloskey{longpluralaccess} replacement text. % \begin{macrocode} -\DeclareRobustCommand*{\glslongpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrylongpluralaccess{#2}}% +\newrobustcmd*{\glslongpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@longpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{longpl}{#1}{\glsentrylongpluralaccess{#2}}}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsuseriaccessdisplay} +%\changes{4.45}{2020-02-13}{new} +% As above but for the \gloskey{user1access} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glsuseriaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@useriaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{useri}{#1}{\glsentryuseriaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsuseriiaccessdisplay} +%\changes{4.45}{2020-02-13}{new} +% As above but for the \gloskey{user2access} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glsuseriiaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@useriiaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{userii}{#1}{\glsentryuseriiaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsuseriiiaccessdisplay} +%\changes{4.45}{2020-02-13}{new} +% As above but for the \gloskey{user3access} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glsuseriiiaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@useriiiaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{useriii}{#1}{\glsentryuseriiiaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsuserivaccessdisplay} +%\changes{4.45}{2020-02-13}{new} +% As above but for the \gloskey{user4access} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glsuserivaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@userivaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{useriv}{#1}{\glsentryuserivaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsuservaccessdisplay} +%\changes{4.45}{2020-02-13}{new} +% As above but for the \gloskey{user5access} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glsuservaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@uservaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{userv}{#1}{\glsentryuservaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsuserviaccessdisplay} +%\changes{4.45}{2020-02-13}{new} +% As above but for the \gloskey{user6access} replacement text. +% \begin{macrocode} +\newrobustcmd*{\glsuserviaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@userviaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{uservi}{#1}{\glsentryuserviaccess{#2}}}% +} +% \end{macrocode} +%\end{macro} +% +%\changes{4.25}{??}{changed \cs{DeclareRobustCommand} to +%\cs{newrobustcmd} and changed \cs{@ifundefined} to \cs{ifcsundef}} %\begin{macro}{\glsaccessdisplay} % Gets the replacement text corresponding to the named key given % by the first argument and calls the appropriate command % defined above. % \begin{macrocode} -\DeclareRobustCommand*{\glsaccessdisplay}[3]{% - \@ifundefined{gls#1accessdisplay}% +\newrobustcmd*{\glsaccessdisplay}[3]{% + \ifcsundef{gls#1accessdisplay}% {% \PackageError{glossaries-accsupp}{No accessibility support for key `#1'}{}% @@ -26244,6 +26919,441 @@ you % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glstext@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glstextaccessdisplay{\glsentrytext{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glstext@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glstextaccessdisplay{\Glsentrytext{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLStext@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLStext@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glstextaccessdisplay{\mfirstucMakeUppercase{\glsentrytext{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsfirst@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsfirstaccessdisplay{\glsentryfirst{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsfirst@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsfirstaccessdisplay{\Glsentryfirst{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSfirst@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsfirstaccessdisplay{\mfirstucMakeUppercase{\glsentryfirst{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glspluralaccessdisplay{\glsentryplural{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glspluralaccessdisplay{\Glsentryplural{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glspluralaccessdisplay{\mfirstucMakeUppercase{\glsentryplural{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsfirstplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsfirstpluralaccessdisplay{\glsentryfirstplural{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsfirstplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsfirstpluralaccessdisplay{\Glsentryfirstplural{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSfirstplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsfirstpluralaccessdisplay{\mfirstucMakeUppercase{\glsentryfirstplural{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsname@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsnameaccessdisplay{\glsentryname{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsname@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsnameaccessdisplay{\Glsentryname{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSname@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSname@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsnameaccessdisplay{\mfirstucMakeUppercase{\glsentryname{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsdesc@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsdesc@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsdescriptionaccessdisplay{\Glsentrydesc{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSdesc@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsdescriptionaccessdisplay{\mfirstucMakeUppercase{\glsentrydesc{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsdescplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsdescplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsdescriptionpluralaccessdisplay{\Glsentrydescplural{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSdescplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsdescriptionpluralaccessdisplay{\mfirstucMakeUppercase{\glsentrydescplural{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glssymbol@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glssymbol@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glssymbolaccessdisplay{\Glsentrysymbol{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSsymbol@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glssymbolaccessdisplay{\mfirstucMakeUppercase{\glsentrysymbol{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glssymbolplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glssymbolplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glssymbolpluralaccessdisplay{\Glsentrysymbolplural{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSsymbolplural@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSsymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glssymbolpluralaccessdisplay{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuseri@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsuseri@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriaccessdisplay{\glsentryuseri{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuseri@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriaccessdisplay{\Glsentryuseri{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuseri@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSuseri@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuseriaccessdisplay{\mfirstucMakeUppercase{\glsentryuseri{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuserii@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsuserii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriiaccessdisplay{\glsentryuserii{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuserii@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriiaccessdisplay{\Glsentryuserii{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuserii@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSuserii@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuseriiaccessdisplay{\mfirstucMakeUppercase{\glsentryuserii{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuseriii@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsuseriii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriiiaccessdisplay{\glsentryuseriii{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuseriii@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriiiaccessdisplay{\Glsentryuseriii{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuseriii@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSuseriii@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuseriiiaccessdisplay{\mfirstucMakeUppercase{\glsentryuseriii{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuseriv@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsuseriv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuserivaccessdisplay{\glsentryuseriv{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuseriv@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuserivaccessdisplay{\Glsentryuseriv{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuseriv@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSuseriv@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuserivaccessdisplay{\mfirstucMakeUppercase{\glsentryuseriv{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuserv@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsuserv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuservaccessdisplay{\glsentryuserv{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuserv@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuservaccessdisplay{\Glsentryuserv{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuserv@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSuserv@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuservaccessdisplay{\mfirstucMakeUppercase{\glsentryuserv{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuservi@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@glsuservi@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuserviaccessdisplay{\glsentryuservi{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@Glsuservi@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuserviaccessdisplay{\Glsentryuservi{#2}}{#2}#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@GLSuservi@} +%\changes{4.45}{2020-02-13}{added accessibility support} +% \begin{macrocode} +\def\@GLSuservi@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuserviaccessdisplay{\mfirstucMakeUppercase{\glsentryuservi{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +% \end{macrocode} +%\end{macro} +% %\section{Displaying the Glossary} %\changes{3.08a}{2013-09-28}{removed definition of \cs{@glossaryentryfield}} %\changes{3.08a}{2013-09-28}{removed definition of \cs{@glossarysubentryfield}} @@ -26906,11 +28016,24 @@ you % \end{macrocode} %\end{acrstyle} % +%\begin{macro}{\glsdefaultshortaccess} +%\changes{4.45}{2020-02-13}{new} +%\begin{definition} +%\cs{glsdefaultshortaccess}\marg{long}\marg{short} +%\end{definition} +%Default \gloskey{shortaccess} value. +% \begin{macrocode} +\newcommand*{\glsdefaultshortaccess}[2]{#1} +% \end{macrocode} +%\end{macro} +% % Use \cs{newacronymhook} to modify the key list to set % the access text to the long version by default. % \begin{macrocode} \renewcommand*{\newacronymhook}{% - \edef\@gls@keylist{shortaccess=\the\glslongtok,% + \edef\@gls@keylist{% + shortaccess={\glsdefaultshortaccess{\the\glslongtok}{\the\glsshorttok}},% + shortpluralaccess={\glsdefaultshortaccess{\the\glslongtok}{\the\glsshorttok}},% \the\glskeylisttok}% \expandafter\glskeylisttok\expandafter{\@gls@keylist}% } @@ -26931,7 +28054,7 @@ you sort={\the\glsshorttok},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% - shortaccess={\the\glslongtok},% + shortaccess={\glsdefaultshortaccess{\the\glslongtok}{\the\glsshorttok}},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% @@ -26981,7 +28104,7 @@ you text={\the\glsshorttok},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% - shortaccess={\the\glslongtok},% + shortaccess={\glsdefaultshortaccess{\the\glslongtok}{\the\glsshorttok}},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% access={\noexpand\@glo@textaccess},% @@ -27025,7 +28148,7 @@ you sort={\the\glsshorttok},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% - shortaccess={\the\glslongtok},% + shortaccess={\glsdefaultshortaccess{\the\glslongtok}{\the\glsshorttok}},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% first={\the\glslongtok},% @@ -27113,7 +28236,7 @@ you sort={\the\glsshorttok},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% - shortaccess={\the\glslongtok},% + shortaccess={\glsdefaultshortaccess{\the\glslongtok}{\the\glsshorttok}},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% text={\noexpand\@glo@short},% @@ -27301,7 +28424,7 @@ you % modules. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-babel}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossaries-babel}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Load \sty{tracklang} to obtain language settings. % \begin{macrocode} @@ -27345,7 +28468,7 @@ you % modules. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-polyglossia}[2019/12/06 v4.44 (NLCT)] +\ProvidesPackage{glossaries-polyglossia}[2020/02/13 v4.45 (NLCT)] % \end{macrocode} % Load \sty{tracklang} to obtain language settings. % \begin{macrocode} @@ -27386,8 +28509,10 @@ you %\fi %\iffalse % \begin{macrocode} - % This file is part of the glossaries bundle - % These are test acronym entries with descriptions. +%<