diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-14 22:27:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-14 22:27:37 +0000 |
commit | 607682851f2a709e970de0672a2ea1e180352523 (patch) | |
tree | 56019dc6fd2e884a84a8554d9cbae26a78f1649e /Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty | |
parent | 49f9aa88e37f97ad037d7a09c20526c9afb854fc (diff) |
glossaries (14feb20)
git-svn-id: svn://tug.org/texlive/trunk@53777 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty | 444 |
1 files changed, 389 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty b/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty index 4765f418963..5ccf51872c1 100644 --- a/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty +++ b/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty @@ -7,7 +7,7 @@ %% glossaries.dtx (with options: `glossaries-accsupp.sty,package') %% %% glossaries.dtx -%% Copyright 2019 Nicola Talbot +%% Copyright 2020 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-accsupp}[2019/12/06 v4.44 (NLCT) +\ProvidesPackage{glossaries-accsupp}[2020/02/13 v4.45 (NLCT) Experimental glossaries accessibility] \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}} \ProcessOptions @@ -82,7 +82,20 @@ \@do@subglossentry } \RequirePackage{glossaries} -\RequirePackage{accsupp} +\providecommand{\gls@accsupp@engine}{accsupp} +\providecommand{\gls@accessibility}[4]{#4} +\ifdefstring\gls@accsupp@engine{accsupp} +{ + \RequirePackage{accsupp} + \renewcommand{\gls@accessibility}[4]{% + \BeginAccSupp{#1,#2={#3}}#4\EndAccSupp{}% + } +} +{} +\newcommand{\glsaccessibility}[4][]{% + \@glsshowaccsupp{#1}{#2}{#3}% + \gls@accessibility{#1}{#2}{#3}{#4}% +} \define@key{glossentry}{access}{% \def\@glo@access{#1}% } @@ -122,6 +135,24 @@ \define@key{glossentry}{longpluralaccess}{% \def\@glo@longpluralaccess{#1}% } +\define@key{glossentry}{user1access}{% + \def\@glo@useriaccess{#1}% +} +\define@key{glossentry}{user2access}{% + \def\@glo@useriiaccess{#1}% +} +\define@key{glossentry}{user3access}{% + \def\@glo@useriiiaccess{#1}% +} +\define@key{glossentry}{user4access}{% + \def\@glo@userivaccess{#1}% +} +\define@key{glossentry}{user5access}{% + \def\@glo@uservaccess{#1}% +} +\define@key{glossentry}{user6access}{% + \def\@glo@userviaccess{#1}% +} \appto\@gls@keymap{,% {access}{access},% {textaccess}{textaccess},% @@ -135,13 +166,19 @@ {shortaccess}{shortaccess},% {shortpluralaccess}{shortpluralaccess},% {longaccess}{longaccess},% - {longpluralaccess}{longpluralaccess}% + {longpluralaccess}{longpluralaccess},% + {user1access}{useriaccess},% + {user2access}{useriiaccess},% + {user3access}{useriiiaccess},% + {user4access}{userivaccess},% + {user5access}{uservaccess},% + {user6access}{userviaccess}% } \def\@gls@noaccess{\relax} \let\@gls@oldnewglossaryentryprehook\@newglossaryentryprehook \renewcommand*{\@newglossaryentryprehook}{% \@gls@oldnewglossaryentryprehook - \def\@glo@access{\@glo@symbol}% + \def\@glo@access{\relax}% \def\@glo@textaccess{\@glo@access}% \def\@glo@firstaccess{\@glo@access}% \def\@glo@pluralaccess{\@glo@textaccess}% @@ -154,6 +191,12 @@ \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}% } \let\@gls@oldnewglossaryentryposthook\@newglossaryentryposthook \renewcommand*{\@newglossaryentryposthook}{% @@ -197,6 +240,24 @@ \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}% } \newcommand*{\glsentryaccess}[1]{% \@gls@entry@field{#1}{access}% @@ -211,7 +272,7 @@ \@gls@entry@field{#1}{pluralaccess}% } \newcommand*{\glsentryfirstpluralaccess}[1]{% - \csname glo@#1@firstpluralaccess\endcsname + \@gls@entry@field{#1}{firstpluralaccess}% } \newcommand*{\glsentrysymbolaccess}[1]{% \@gls@entry@field{#1}{symbolaccess}% @@ -223,7 +284,7 @@ \@gls@entry@field{#1}{descaccess}% } \newcommand*{\glsentrydescpluralaccess}[1]{% - \@gls@entry@field{#1}{descaccess}% + \@gls@entry@field{#1}{descpluralaccess}% } \newcommand*{\glsentryshortaccess}[1]{% \@gls@entry@field{#1}{shortaccess}% @@ -237,9 +298,52 @@ \newcommand*{\glsentrylongpluralaccess}[1]{% \@gls@entry@field{#1}{longpluralaccess}% } -\newcommand*{\glsaccsupp}[2]{% - \BeginAccSupp{ActualText={#1}}#2\EndAccSupp{}% +\newcommand*{\glsentryuseriaccess}[1]{% + \@gls@entry@field{#1}{useriaccess}% +} +\newcommand*{\glsentryuseriiaccess}[1]{% + \@gls@entry@field{#1}{useriiaccess}% +} +\newcommand*{\glsentryuseriiiaccess}[1]{% + \@gls@entry@field{#1}{useriiiaccess}% } +\newcommand*{\glsentryuserivaccess}[1]{% + \@gls@entry@field{#1}{userivaccess}% +} +\newcommand*{\glsentryuservaccess}[1]{% + \@gls@entry@field{#1}{uservaccess}% +} +\newcommand*{\glsentryuserviaccess}[1]{% + \@gls@entry@field{#1}{userviaccess}% +} +\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}}% + }% +} +\newcommand{\xglsfieldaccsupp}[1]{% + \protected@edef\@gls@replacementtext{#1}% + \expandafter\glsfieldaccsupp\expandafter{\@gls@replacementtext}% +} +\newcommand*{\glsshortaccsupp}[2]{\glsaccessibility{E}{#1}{#2}} +\newcommand*{\glsshortplaccsupp}{\glsshortaccsupp} +\newcommand*{\glsaccsupp}[2]{\glsaccessibility{ActualText}{#1}{#2}} \newcommand*{\xglsaccsupp}[2]{% \protected@edef\@gls@replacementtext{#1}% \expandafter\glsaccsupp\expandafter{\@gls@replacementtext}{#2}% @@ -252,47 +356,109 @@ \xglsaccsupp{\@glo@access}{#1}% \fi } -\DeclareRobustCommand*{\glsnameaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryaccess{#2}}% -} -\DeclareRobustCommand*{\glstextaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrytextaccess{#2}}% -} -\DeclareRobustCommand*{\glspluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrypluralaccess{#2}}% -} -\DeclareRobustCommand*{\glsfirstaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryfirstaccess{#2}}% -} -\DeclareRobustCommand*{\glsfirstpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryfirstpluralaccess{#2}}% -} -\DeclareRobustCommand*{\glssymbolaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrysymbolaccess{#2}}% -} -\DeclareRobustCommand*{\glssymbolpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrysymbolpluralaccess{#2}}% -} -\DeclareRobustCommand*{\glsdescriptionaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrydescaccess{#2}}% -} -\DeclareRobustCommand*{\glsdescriptionpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrydescpluralaccess{#2}}% -} -\DeclareRobustCommand*{\glsshortaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryshortaccess{#2}}% -} -\DeclareRobustCommand*{\glsshortpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentryshortpluralaccess{#2}}% -} -\DeclareRobustCommand*{\glslongaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrylongaccess{#2}}% -} -\DeclareRobustCommand*{\glslongpluralaccessdisplay}[2]{% - \@gls@access@display{#1}{\glsentrylongpluralaccess{#2}}% -} -\DeclareRobustCommand*{\glsaccessdisplay}[3]{% - \@ifundefined{gls#1accessdisplay}% +\newcommand*{\@gls@fieldaccess@display}[4]{% + \protected@edef\@glo@access{#4}% + \ifdefequal\@glo@access\@gls@noaccess + {#3}% + {\expandafter\glsfieldaccsupp\expandafter{\@glo@access}{#3}{#2}{#1}}% +} +\newrobustcmd*{\glsnameaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@access}% + {#1}% + {\@gls@fieldaccess@display{#2}{name}{#1}{\glsentryaccess{#2}}}% +} +\newrobustcmd*{\glstextaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@textaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{text}{#1}{\glsentrytextaccess{#2}}}% +} +\newrobustcmd*{\glspluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@pluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{plural}{#1}{\glsentrypluralaccess{#2}}}% +} +\newrobustcmd*{\glsfirstaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@firstaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{first}{#1}{\glsentryfirstaccess{#2}}}% +} +\newrobustcmd*{\glsfirstpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@firstpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{firstpl}{#1}{\glsentryfirstpluralaccess{#2}}}% +} +\newrobustcmd*{\glssymbolaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@symbolaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{symbol}{#1}{\glsentrysymbolaccess{#2}}}% +} +\newrobustcmd*{\glssymbolpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@symbolpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{symbolplural}{#1}{\glsentrysymbolpluralaccess{#2}}}% +} +\newrobustcmd*{\glsdescriptionaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@descaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{desc}{#1}{\glsentrydescaccess{#2}}}% +} +\newrobustcmd*{\glsdescriptionpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@descpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{descplural}{#1}{\glsentrydescpluralaccess{#2}}}% +} +\newrobustcmd*{\glsshortaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@shortaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{short}{#1}{\glsentryshortaccess{#2}}}% +} +\newrobustcmd*{\glsshortpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@shortpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{shortpl}{#1}{\glsentryshortpluralaccess{#2}}}% +} +\newrobustcmd*{\glslongaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@longaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{long}{#1}{\glsentrylongaccess{#2}}}% +} +\newrobustcmd*{\glslongpluralaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@longpluralaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{longpl}{#1}{\glsentrylongpluralaccess{#2}}}% +} +\newrobustcmd*{\glsuseriaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@useriaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{useri}{#1}{\glsentryuseriaccess{#2}}}% +} +\newrobustcmd*{\glsuseriiaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@useriiaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{userii}{#1}{\glsentryuseriiaccess{#2}}}% +} +\newrobustcmd*{\glsuseriiiaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@useriiiaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{useriii}{#1}{\glsentryuseriiiaccess{#2}}}% +} +\newrobustcmd*{\glsuserivaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@userivaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{useriv}{#1}{\glsentryuserivaccess{#2}}}% +} +\newrobustcmd*{\glsuservaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@uservaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{userv}{#1}{\glsentryuservaccess{#2}}}% +} +\newrobustcmd*{\glsuserviaccessdisplay}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@userviaccess}% + {#1}% + {\@gls@fieldaccess@display{#2}{uservi}{#1}{\glsentryuserviaccess{#2}}}% +} +\newrobustcmd*{\glsaccessdisplay}[3]{% + \ifcsundef{gls#1accessdisplay}% {% \PackageError{glossaries-accsupp}{No accessibility support for key `#1'}{}% @@ -739,6 +905,171 @@ }% \glspostlinkhook } +\def\@glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glstextaccessdisplay{\glsentrytext{#2}}{#2}#3}% +} +\def\@Glstext@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glstextaccessdisplay{\Glsentrytext{#2}}{#2}#3}% +} +\def\@GLStext@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glstextaccessdisplay{\mfirstucMakeUppercase{\glsentrytext{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsfirstaccessdisplay{\glsentryfirst{#2}}{#2}#3}% +} +\def\@Glsfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsfirstaccessdisplay{\Glsentryfirst{#2}}{#2}#3}% +} +\def\@GLSfirst@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsfirstaccessdisplay{\mfirstucMakeUppercase{\glsentryfirst{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glspluralaccessdisplay{\glsentryplural{#2}}{#2}#3}% +} +\def\@Glsplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glspluralaccessdisplay{\Glsentryplural{#2}}{#2}#3}% +} +\def\@GLSplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glspluralaccessdisplay{\mfirstucMakeUppercase{\glsentryplural{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsfirstpluralaccessdisplay{\glsentryfirstplural{#2}}{#2}#3}% +} +\def\@glsfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsfirstpluralaccessdisplay{\Glsentryfirstplural{#2}}{#2}#3}% +} +\def\@GLSfirstplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsfirstpluralaccessdisplay{\mfirstucMakeUppercase{\glsentryfirstplural{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsnameaccessdisplay{\glsentryname{#2}}{#2}#3}% +} +\def\@Glsname@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsnameaccessdisplay{\Glsentryname{#2}}{#2}#3}% +} +\def\@GLSname@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsnameaccessdisplay{\mfirstucMakeUppercase{\glsentryname{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}#3}% +} +\def\@Glsdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsdescriptionaccessdisplay{\Glsentrydesc{#2}}{#2}#3}% +} +\def\@GLSdesc@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsdescriptionaccessdisplay{\mfirstucMakeUppercase{\glsentrydesc{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}#3}% +} +\def\@Glsdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsdescriptionpluralaccessdisplay{\Glsentrydescplural{#2}}{#2}#3}% +} +\def\@GLSdescplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsdescriptionpluralaccessdisplay{\mfirstucMakeUppercase{\glsentrydescplural{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}#3}% +} +\def\@Glssymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glssymbolaccessdisplay{\Glsentrysymbol{#2}}{#2}#3}% +} +\def\@GLSsymbol@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glssymbolaccessdisplay{\mfirstucMakeUppercase{\glsentrysymbol{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}#3}% +} +\def\@Glssymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glssymbolpluralaccessdisplay{\Glsentrysymbolplural{#2}}{#2}#3}% +} +\def\@GLSsymbolplural@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glssymbolpluralaccessdisplay{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsuseri@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriaccessdisplay{\glsentryuseri{#2}}{#2}#3}% +} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriaccessdisplay{\Glsentryuseri{#2}}{#2}#3}% +} +\def\@GLSuseri@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuseriaccessdisplay{\mfirstucMakeUppercase{\glsentryuseri{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsuserii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriiaccessdisplay{\glsentryuserii{#2}}{#2}#3}% +} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriiaccessdisplay{\Glsentryuserii{#2}}{#2}#3}% +} +\def\@GLSuserii@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuseriiaccessdisplay{\mfirstucMakeUppercase{\glsentryuserii{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsuseriii@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriiiaccessdisplay{\glsentryuseriii{#2}}{#2}#3}% +} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuseriiiaccessdisplay{\Glsentryuseriii{#2}}{#2}#3}% +} +\def\@GLSuseriii@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuseriiiaccessdisplay{\mfirstucMakeUppercase{\glsentryuseriii{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsuseriv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuserivaccessdisplay{\glsentryuseriv{#2}}{#2}#3}% +} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuserivaccessdisplay{\Glsentryuseriv{#2}}{#2}#3}% +} +\def\@GLSuseriv@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuserivaccessdisplay{\mfirstucMakeUppercase{\glsentryuseriv{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsuserv@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuservaccessdisplay{\glsentryuserv{#2}}{#2}#3}% +} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuservaccessdisplay{\Glsentryuserv{#2}}{#2}#3}% +} +\def\@GLSuserv@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuservaccessdisplay{\mfirstucMakeUppercase{\glsentryuserv{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} +\def\@glsuservi@#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuserviaccessdisplay{\glsentryuservi{#2}}{#2}#3}% +} +\def\@Glsuser@i#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsuserviaccessdisplay{\Glsentryuservi{#2}}{#2}#3}% +} +\def\@GLSuservi@#1#2[#3]{% + \@gls@field@link{#1}{#2}% + {\glsuserviaccessdisplay{\mfirstucMakeUppercase{\glsentryuservi{#2}}}{#2}% + \mfirstucMakeUppercase{#3}}% +} \renewcommand*{\glossentryname}[1]{% \glsdoifexists{#1}% {% @@ -1172,8 +1503,11 @@ \glslongaccessdisplay{\glsentrylong{##1}}{##1}\space (\glsshortaccessdisplay{\acronymfont{\glsentryshort{##1}}}{##1})}% } +\newcommand*{\glsdefaultshortaccess}[2]{#1} \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}% } @@ -1190,7 +1524,7 @@ 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},% @@ -1236,7 +1570,7 @@ 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},% @@ -1276,7 +1610,7 @@ 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},% @@ -1356,7 +1690,7 @@ 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},% |