diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-02 22:49:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-02 22:49:50 +0000 |
commit | c970e86904ff1076f46506d6df9fa4a06a30ceab (patch) | |
tree | defbd547d713da8ed65c879b7f4cdaa18b71df1e /Master/texmf-dist/source | |
parent | 9d63d20b395741946482b9029e072ae7ebff21f0 (diff) |
glossaries-extra (2may16)
git-svn-id: svn://tug.org/texlive/trunk@40839 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx | 1916 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins | 2 |
2 files changed, 1469 insertions, 449 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx index 8935783ee9b..78529390d7a 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx @@ -1,14 +1,14 @@ %\iffalse % glossaries-extra.dtx generated using makedtx version 1.1 (c) Nicola Talbot % Command line args: -% -author "Nicola Talbot" % -src "glossaries-extra.sty\Z=>glossaries-extra.sty" % -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty" +% -author "Nicola Talbot" % -section "chapter" % -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" % -doc "glossaries-extra-codedoc.tex" % glossaries-extra -% Created on 2016/4/27 10:59 +% Created on 2016/5/2 18:05 %\fi %\iffalse %<*package> @@ -117,7 +117,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{7699} +\CheckSum{8698} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -153,13 +153,13 @@ styles (glossaries):>#1={\protect\ttfamily#1}|main}} \raggedright } -\title{glossaries-extra.sty v1.03: +\title{glossaries-extra.sty v1.04: documented code} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} -\date{2016-04-27} +\date{2016-05-02} \begin{document} \DocInput{glossaries-extra.dtx} @@ -204,7 +204,7 @@ Dickimaw Books\\ %\section{Package Initialisation and Options} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2016/04/27 v1.03 (NLCT)] +\ProvidesPackage{glossaries-extra}[2016/05/02 v1.04 (NLCT)] % \end{macrocode} % Requires \sty{xkeyval} to define package options. % \begin{macrocode} @@ -602,7 +602,7 @@ Dickimaw Books\\ \PackageError{glossaries-extra}% {Glossaries style package `glossary-\@glsxtr@tmp.sty' doesn't exist (did you mean to use the `style' key?)}% - {The list of values (#1) in the `styles' key should + {The list of values (#1) in the `stylemods' key should match the glossary-xxx.sty files provided with glossaries.sty}% }% @@ -613,6 +613,34 @@ Dickimaw Books\\ % \end{macrocode} %\end{option} % +%\begin{macro}{\@glsxtr@do@style} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@do@style}{} +% \end{macrocode} +%\end{macro} +% +%\begin{option}{style} +%\changes{1.04}{2016-05-02}{new} +% Since the \pkgopt{stylemods} option can automatically load extra +% style packages, deal with the \pkgopt{style} option after those +% packages have been loaded. +% \begin{macrocode} +\define@key{glossaries-extra.sty}{style}{% + \renewcommand*{\@glsxtr@do@style}{% +% \end{macrocode} +% Set this as the default style: +% \begin{macrocode} + \setkeys{glossaries.sty}{style={#1}}% +% \end{macrocode} +% Set this style: +% \begin{macrocode} + \setglossarystyle{#1}% + }% +} +% \end{macrocode} +%\end{option} +% % Pass all other options to \sty{glossaries}. % \begin{macrocode} \DeclareOptionX*{% @@ -1248,15 +1276,27 @@ Dickimaw Books\\ % Has the \pkgopt{nonumberlist} option been used? %\changes{0.5.2}{2015-12-08}{added} % \begin{macrocode} - \def\org@glossaryentrynumbers#1{#1\gls@save@numberlist{#1}}% - \ifx\org@glossaryentrynumbers\glossaryentrynumbers - \glsnonumberlistfalse - \renewcommand*{\glossaryentrynumbers}[1]{% - \GlsXtrFormatLocationList{#1}\gls@save@numberlist{#1}}% - \else - \glsnonumberlisttrue - \renewcommand*{\glossaryentrynumbers}[1]{\gls@save@numberlist{#1}}% - \fi +\def\org@glossaryentrynumbers#1{#1\gls@save@numberlist{#1}}% +\ifx\org@glossaryentrynumbers\glossaryentrynumbers + \glsnonumberlistfalse + \renewcommand*{\glossaryentrynumbers}[1]{% + \ifglsentryexists{\glscurrententrylabel}% + {% + \@glsxtrpreloctag + \GlsXtrFormatLocationList{#1}% + \@glsxtrpostloctag + \gls@save@numberlist{#1}% + }{}% + }% +\else + \glsnonumberlisttrue + \renewcommand*{\glossaryentrynumbers}[1]{% + \ifglsentryexists{\glscurrententrylabel}% + {% + \gls@save@numberlist{#1}% + }{}% + }% +\fi % \end{macrocode} %\end{macro} % @@ -1269,6 +1309,116 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +% Sometimes users want to prefix the location list with +% \qt{page}\slash\qt{pages}. The simplest way to determine if the +% location list consists of a single location is to check for +% instances of \cs{delimN} or \cs{delimR}, but this isn't so easy to +% do as they might be embedded inside the argument of formatting +% commands. With a bit of trickery we can find out by adjusting +% \cs{delimN} and \cs{delimR} to set a flag and then save +% information to the auxiliary file for the next run. +%\begin{macro}{\GlsXtrEnablePreLocationTag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrEnablePreLocationTag}[2]{% + \let\@glsxtrpreloctag\@@glsxtrpreloctag + \let\@glsxtrpostloctag\@@glsxtrpostloctag + \renewcommand*{\@glsxtr@pagetag}{#1}% + \renewcommand*{\@glsxtr@pagestag}{#2}% + \renewcommand*{\@glsxtr@savepreloctag}[2]{% + \csgdef{@glsxtr@preloctag@##1}{##2}% + }% + \renewcommand*{\@glsxtr@doloctag}{% + \ifcsundef{@glsxtr@preloctag@\glscurrententrylabel}% + {% + \GlossariesWarning{Missing pre-location tag for `\glscurrententrylabel'. + Rerun required}% + }% + {% + \csuse{@glsxtr@preloctag@\glscurrententrylabel}% + }% + }% +} +\@onlypreamble\GlsXtrEnablePreLocationTag +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtrpreloctag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@@glsxtrpreloctag}{% + \let\@glsxtr@org@delimN\delimN + \let\@glsxtr@org@delimR\delimR + \let\@glsxtr@org@glsignore\glsignore +% \end{macrocode} +% \cs{gdef} is required as the delimiters may occur inside a scope. +% \begin{macrocode} + \gdef\@glsxtr@thisloctag{\@glsxtr@pagetag}% + \renewcommand*{\delimN}{% + \gdef\@glsxtr@thisloctag{\@glsxtr@pagestag}% + \@glsxtr@org@delimN}% + \renewcommand*{\delimR}{% + \gdef\@glsxtr@thisloctag{\@glsxtr@pagestag}% + \@glsxtr@org@delimR}% + \renewcommand*{\glsignore}[1]{% + \gdef\@glsxtr@thisloctag{\relax}% + \@glsxtr@org@glsignore{##1}}% + \@glsxtr@doloctag +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtrpreloctag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtrpreloctag}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@pagetag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@pagetag}{}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@pagestag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@pagestag}{}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@glsxtrpostloctag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@@glsxtrpostloctag}{% + \let\delimN\@glsxtr@org@delimN + \let\delimR\@glsxtr@org@delimR + \let\glsignore\@glsxtr@org@glsignore + \protected@write\@auxout{}% + {\string\@glsxtr@savepreloctag{\glscurrententrylabel}{\@glsxtr@thisloctag}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtrpostloctag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtrpostloctag}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@preloctag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@savepreloctag}[2]{} +\protected@write\@auxout{}{% + \string\providecommand\string\@glsxtr@savepreloctag[2]{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@doloctag} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@doloctag}{} +% \end{macrocode} +%\end{macro} %\begin{macro}{\KV@printgloss@nonumberlist} % Modify the \gloskey[printglossary]{nonumberlist} key to % use \cs{GlsXtrFormatLocationList} (and also save the number list): @@ -1284,7 +1434,9 @@ Dickimaw Books\\ \def\glossaryentrynumbers##1{\gls@save@numberlist{##1}}% \else \def\glossaryentrynumbers##1{% + \@glsxtrpreloctag \GlsXtrFormatLocationList{##1}% + \@glsxtrpostloctag \gls@save@numberlist{##1}}% \fi }% @@ -1311,12 +1463,24 @@ Dickimaw Books\\ \renewcommand*{\glsentryfmt}{% \ifglshasshort{\glslabel}{\glssetabbrvfmt{\glscategory{\glslabel}}}{}% \glsifregular{\glslabel}% - {\glsgenentryfmt}% - {\ifglshasshort{\glslabel}{\glsxtrgenabbrvfmt}{\glsgenentryfmt}}% + {\glsxtrregularfont{\glsgenentryfmt}}% + {% + \ifglshasshort{\glslabel}% + {\glsxtrgenabbrvfmt}% + {\glsxtrregularfont{\glsgenentryfmt}}% + }% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrregularfont} +%\changes{1.04}{2016-05-02}{new} +% Font used for regular entries. +% \begin{macrocode} +\newcommand*{\glsxtrregularfont}[1]{#1} +% \end{macrocode} +%\end{macro} +% % Commands like \cs{glsifplural} are only used by the \cs{gls}-like % commands in the \sty{glossaries} package, but it might be useful % for the postlink hook to know if the user has used, say, @@ -1359,13 +1523,51 @@ Dickimaw Books\\ %\end{macro} % %Redefine the field link commands that need to modify the above. +%Also add accessibility support and set the abbreviation styles if +%required. +%\begin{macro}{\glsxtrassignfieldfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsxtrassignfieldfont}[1]{% + \ifglshasshort{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifregular{#1}% + {\let\@gls@field@font\glsxtrregularfont}% + {\let\@gls@field@font\@firstofone}% + }% + {% + \glsifnotregular{#1}% + {\let\@gls@field@font\@firstofone}% + {\let\@gls@field@font\glsxtrregularfont}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glstext@} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +% The abbreviation format may also need setting. +% \begin{macrocode} +\def\@glstext@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccesstext{#2}#3}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@GLStext@} % All uppercase version of \cs{glstext}. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@GLStext@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdofthree]{#1}{#2}% - {\mfirstucMakeUppercase{\glsentrytext{#2}#3}}% + {\@gls@field@font{\GLSaccesstext{#2}\mfirstucMakeUppercase{#3}}}% } % \end{macrocode} %\end{macro} @@ -1373,10 +1575,14 @@ Dickimaw Books\\ %\begin{macro}{\@Glstext@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@Glstext@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@secondofthree]{#1}{#2}% - {\Glsentrytext{#2}#3}% + {\@gls@field@font{\Glsaccesstext{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1384,10 +1590,14 @@ Dickimaw Books\\ %\begin{macro}{\@glsfirst@} % No case changing version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@glsfirst@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glsxtrifwasfirstuse\@firstoftwo]{#1}{#2}% - {\glsentryfirst{#2}#3}% + {\@gls@field@font{\glsaccessfirst{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1395,13 +1605,17 @@ Dickimaw Books\\ %\begin{macro}{\@Glsfirst@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@Glsfirst@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glscapscase\@secondofthree ]% - {#1}{#2}{\Glsentryfirst{#2}#3}% + {#1}{#2}{\@gls@field@font{\Glsaccessfirst{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1409,13 +1623,17 @@ Dickimaw Books\\ %\begin{macro}{\@GLSfirst@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set abbreviation format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@GLSfirst@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glscapscase\@thirdofthree ]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryfirst{#2}#3}}% + {#1}{#2}{\@gls@field@font{\GLSaccessfirst{#2}\mfirstucMakeUppercase{#3}}}% } % \end{macrocode} %\end{macro} @@ -1425,10 +1643,14 @@ Dickimaw Books\\ %\changes{0.3}{2015-12-02}{added redefinition} %\changes{1.03}{2016-04-27}{fixed bug \cs{@glsplural@} should be redefined %not \cs{@glsplural}} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@glsplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glsifplural\@firstoftwo]{#1}{#2}% - {\glsentryplural{#2}#3}% + {\@gls@field@font{\glsaccessplural{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1438,13 +1660,17 @@ Dickimaw Books\\ %\changes{0.3}{2015-12-02}{added redefinition} %\changes{1.03}{2016-04-27}{fixed bug \cs{@Glsplural@} should be redefined %not \cs{@Glsplural}} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@Glsplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree ]% - {#1}{#2}{\Glsentryplural{#2}#3}% + {#1}{#2}{\@gls@field@font{\Glsaccessplural{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1454,13 +1680,17 @@ Dickimaw Books\\ %\changes{0.3}{2015-12-02}{added redefinition} %\changes{1.03}{2016-04-27}{fixed bug \cs{@GLSplural@} should be redefined %not \cs{@GLSplural}} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@GLSplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree ]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryplural{#2}#3}}% + {#1}{#2}{\@gls@field@font{\GLSaccessplural{#2}\mfirstucMakeUppercase{#3}}}% } % \end{macrocode} %\end{macro} @@ -1468,13 +1698,17 @@ Dickimaw Books\\ %\begin{macro}{\@glsfirstplural@} % No case changing version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@glsfirstplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glsifplural\@firstoftwo ]% - {#1}{#2}{\glsentryfirstplural{#2}#3}% + {#1}{#2}{\@gls@field@font{\glsaccessfirstplural{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1483,14 +1717,18 @@ Dickimaw Books\\ % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} %\changes{1.03}{2016-04-27}{bug fix: misspelt cs name} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@Glsfirstplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree ]% - {#1}{#2}{\Glsentryfirstplural{#2}#3}% + {#1}{#2}{\@gls@field@font{\Glsaccessfirstplural{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1499,14 +1737,32 @@ Dickimaw Books\\ % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} %\changes{1.03}{2016-04-27}{bug fix: misspelt cs name} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@GLSfirstplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree ]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryfirstplural{#2}#3}}% + {#1}{#2}% + {\@gls@field@font{\GLSaccessfirstplural{#2}\mfirstucMakeUppercase{#3}}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsname@} +% Redefine to use accessibility support. +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +% The abbreviation format may also need setting. +% \begin{macrocode} +\def\@glsname@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccessname{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1514,10 +1770,15 @@ Dickimaw Books\\ %\begin{macro}{\@Glsname@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{add accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@Glsname@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryname{#2}#3}% + [\let\glscapscase\@secondoftwo]{#1}{#2}% + {\@gls@field@font{\Glsaccessname{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1525,10 +1786,26 @@ Dickimaw Books\\ %\begin{macro}{\@GLSname@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +% The abbreviation format may also need setting. % \begin{macrocode} \def\@GLSname@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryname{#2}#3}}% + {#1}{#2}% + {\@gls@field@font{\GLSaccessname{#2}\mfirstucMakeUppercase{#3}}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsdesc@} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} +% \begin{macrocode} +\def\@glsdesc@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccessdesc{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1536,10 +1813,14 @@ Dickimaw Books\\ %\begin{macro}{\@Glsdesc@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@Glsdesc@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentrydesc{#2}#3}% + [\let\glscapscase\@secondoftwo]{#1}{#2}% + {\@gls@field@font{\Glsaccessdesc{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1547,10 +1828,13 @@ Dickimaw Books\\ %\begin{macro}{\@GLSdesc@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@GLSdesc@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentrydesc{#2}#3}}% + {#1}{#2}{\@gls@field@font{\GLSaccessdesc{#2}\mfirstucMakeUppercase{#3}}}% } % \end{macrocode} %\end{macro} @@ -1558,12 +1842,15 @@ Dickimaw Books\\ %\begin{macro}{\@glsdescplural@} % No case-changing version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@glsdescplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glscapscase\@secondoftwo \let\glsifplural\@firstoftwo - ]{#1}{#2}{\glsentrydescplural{#2}#3}% + ]{#1}{#2}{\@gls@field@font{\glsaccessdescplural{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1571,12 +1858,15 @@ Dickimaw Books\\ %\begin{macro}{\@Glsdescplural@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@Glsdescplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glscapscase\@secondoftwo \let\glsifplural\@firstoftwo - ]{#1}{#2}{\Glsentrydescplural{#2}#3}% + ]{#1}{#2}{\@gls@field@font{\Glsaccessdescplural{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1584,13 +1874,28 @@ Dickimaw Books\\ %\begin{macro}{\@GLSdescplural@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@GLSdesc@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glscapscase\@thirdoftwo \let\glsifplural\@firstoftwo ]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentrydescplural{#2}#3}}% + {#1}{#2}% + {\@gls@field@font{\GLSaccessdescplural{#2}\mfirstucMakeUppercase{#3}}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glssymbol@} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set regular format} +% \begin{macrocode} +\def\@glssymbol@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccesssymbol{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1598,10 +1903,14 @@ Dickimaw Books\\ %\begin{macro}{\@Glssymbol@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glssymbol@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentrysymbol{#2}#3}% + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsaccesssymbol{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1609,10 +1918,13 @@ Dickimaw Books\\ %\begin{macro}{\@GLSsymbol@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSsymbol@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbol{#2}#3}}% + {#1}{#2}{\@gls@field@font{\GLSaccesssymbol{#2}\mfirstucMakeUppercase{#3}}}% } % \end{macrocode} %\end{macro} @@ -1620,12 +1932,15 @@ Dickimaw Books\\ %\begin{macro}{\@glssymbolplural@} % No case-changing version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@glssymbolplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glscapscase\@secondoftwo \let\glsifplural\@firstoftwo - ]{#1}{#2}{\glsentrysymbolplural{#2}#3}% + ]{#1}{#2}{\@gls@field@font{\glsaccesssymbolplural{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1633,12 +1948,15 @@ Dickimaw Books\\ %\begin{macro}{\@Glssymbolplural@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glssymbolplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glscapscase\@secondoftwo \let\glsifplural\@firstoftwo - ]{#1}{#2}{\Glsentrysymbolplural{#2}#3}% + ]{#1}{#2}{\@gls@field@font{\Glsaccesssymbolplural{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1646,13 +1964,17 @@ Dickimaw Books\\ %\begin{macro}{\@GLSsymbolplural@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{0.5.2}{2015-12-08}{added accessibility support} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSsymbol@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link [\let\glscapscase\@thirdoftwo \let\glsifplural\@firstoftwo ]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}#3}}% + {#1}{#2}% + {\@gls@field@font{\GLSaccesssymbolplural{#2}\mfirstucMakeUppercase{#3}}}% } % \end{macrocode} %\end{macro} @@ -1660,10 +1982,13 @@ Dickimaw Books\\ %\begin{macro}{\@Glsuseri@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuseri@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseri{#2}#3}% + [\let\glscapscase\@secondoftwo]{#1}{#2}% + {\@gls@field@font{\Glsentryuseri{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1671,10 +1996,12 @@ Dickimaw Books\\ %\begin{macro}{\@GLSuseri@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuseri@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}}% } % \end{macrocode} %\end{macro} @@ -1682,10 +2009,13 @@ Dickimaw Books\\ %\begin{macro}{\@Glsuserii@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuserii@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuserii{#2}#3}% + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuserii{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1693,10 +2023,12 @@ Dickimaw Books\\ %\begin{macro}{\@GLSuserii@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuserii@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}}% } % \end{macrocode} %\end{macro} @@ -1704,10 +2036,13 @@ Dickimaw Books\\ %\begin{macro}{\@Glsuseriii@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuseriii@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseriii{#2}#3}% + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuseriii{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1715,10 +2050,12 @@ Dickimaw Books\\ %\begin{macro}{\@GLSuseriii@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuseriii@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}}% } % \end{macrocode} %\end{macro} @@ -1726,10 +2063,13 @@ Dickimaw Books\\ %\begin{macro}{\@Glsuseriv@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuseriv@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuseriv{#2}#3}% + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuseriv{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1737,10 +2077,13 @@ Dickimaw Books\\ %\begin{macro}{\@GLSuseriv@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuseriv@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}% + {#1}{#2}% + {\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}}% } % \end{macrocode} %\end{macro} @@ -1748,10 +2091,13 @@ Dickimaw Books\\ %\begin{macro}{\@Glsuserv@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuserv@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuserv{#2}#3}% + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuserv{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1759,10 +2105,12 @@ Dickimaw Books\\ %\begin{macro}{\@GLSuserv@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuserv@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}}% } % \end{macrocode} %\end{macro} @@ -1770,10 +2118,13 @@ Dickimaw Books\\ %\begin{macro}{\@Glsuservi@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuservi@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}{\Glsentryuservi{#2}#3}% + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuservi{#2}#3}}% } % \end{macrocode} %\end{macro} @@ -1781,10 +2132,12 @@ Dickimaw Books\\ %\begin{macro}{\@GLSuservi@} % All uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} +%\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuservi@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}}% } % \end{macrocode} %\end{macro} @@ -2614,7 +2967,7 @@ Dickimaw Books\\ %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} \def\@GLSxtr@p@long@#1#2[#3]{% - {\mfirstucMakeUppercase{\glsentrylong{#2}#3}}} + {\mfirstucMakeUppercase{\glslongfont{\glsentrylong{#2}}#3}}} % \end{macrocode} %\end{macro} % @@ -2628,7 +2981,7 @@ Dickimaw Books\\ %\begin{macro}{\@Glsxtr@p@longpl@} %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} -\def\@Glsxtr@p@longpl@#1#2[#3]{{\Glsentrylongpl{#2}#3}} +\def\@Glsxtr@p@longpl@#1#2[#3]{{\glslongfont{\Glsentrylongpl{#2}}#3}} % \end{macrocode} %\end{macro} % @@ -2636,7 +2989,7 @@ Dickimaw Books\\ %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} \def\@GLSxtr@p@longpl@#1#2[#3]{% - {\mfirstucMakeUppercase{\glsentrylongpl{#2}#3}}} + {\mfirstucMakeUppercase{\glslongfont{\glsentrylongpl{#2}}#3}}} % \end{macrocode} %\end{macro} % @@ -3755,7 +4108,7 @@ Dickimaw Books\\ %First we need a list of the glossaries that require %\gls{makeindex}\slash\gls{xindy}. %\begin{macro}{\@glsxtr@reg@glosslist} -%\changes{0.5.5}{??}{new} +%\changes{1.0}{2016-01-24}{new} % \begin{macrocode} \newcommand*{\@glsxtr@reg@glosslist}{} % \end{macrocode} @@ -3771,7 +4124,7 @@ Dickimaw Books\\ % list of glossary labels indicating those glossaries that should be % processed with an indexing application. %\begin{macro}{\makeglossaries} -%\changes{0.5.5}{??}{new} +%\changes{1.0}{2016-01-24}{new} % \begin{macrocode} \renewcommand*{\makeglossaries}[1][]{% \ifblank{#1}% @@ -3914,7 +4267,7 @@ want % % Display number list for the regular version: %\begin{macro}{\@glsxtr@idx@displaynumberlist} -%\changes{0.5.5}{??}{new} +%\changes{1.0}{2016-01-24}{new} % \begin{macrocode} \let\@glsxtr@idx@displaynumberlist\glsdisplaynumberlist % \end{macrocode} @@ -3922,7 +4275,7 @@ want % % Display number list for the \qt{noidx} version: %\begin{macro}{\@glsxtr@noidx@displaynumberlist} -%\changes{0.5.5}{??}{new} +%\changes{1.0}{2016-01-24}{new} % \begin{macrocode} \newcommand*{\@glsxtr@noidx@displaynumberlist}[1]{% \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% @@ -3955,7 +4308,7 @@ want %\end{macro} %And for the number list loop: %\begin{macro}{\@glsxtr@noidx@numberlistloop} -%\changes{0.5.5}{??}{new} +%\changes{1.0}{2016-01-24}{new} % \begin{macrocode} \newcommand*{\@glsxtr@noidx@numberlistloop}[3]{% \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% @@ -3982,7 +4335,7 @@ want % %Same for entry number list. %\begin{macro}{\@glsxtr@noidx@entrynumberlist} -%\changes{0.5.5}{??}{new} +%\changes{1.0}{2016-01-24}{new} % \begin{macrocode} \newcommand*{\@glsxtr@noidx@entrynumberlist}[1]{% \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% @@ -4002,9 +4355,10 @@ want %\end{macro} % %\begin{macro}{\@glsxtr@idx@entrynumberlist} -%\changes{0.5.5}{??}{new} +%\changes{1.0}{2016-01-24}{new} +%\changes{1.04}{2016-05-02}{switched from \cs{let} to \cs{newcommand}} % \begin{macrocode} -\let\@glsxtr@idx@entrynumberlist\glsentrynumberlist +\newcommand*{\@glsxtr@idx@entrynumberlist}[1]{\glsentrynumberlist{#1}} % \end{macrocode} %\end{macro} % @@ -4137,7 +4491,7 @@ want \begin{itemize} \item Run the external (Lua) application: - \texttt{makeglossaries-lite \string"\jobname\string"} + \texttt{makeglossaries-lite.lua \string"\jobname\string"} \item Run the external (Perl) application: @@ -4182,7 +4536,7 @@ want \item Run the external (Lua) application: - \texttt{makeglossaries-lite \string"\jobname\string"} + \texttt{makeglossaries-lite.lua \string"\jobname\string"} \item Run the external (Perl) application: @@ -4307,16 +4661,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsname@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glsname@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccessname{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccessname} % Display the \gloskey{name} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4332,16 +4676,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glsname@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@Glsname@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccessname{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccessname} % Display the \gloskey{name} value (no link and no check for existence) % converted to upper case. @@ -4357,16 +4691,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLSname@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLSname@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccessname{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccesstext} % Display the \gloskey{text} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -4381,16 +4705,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glstext@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glstext@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccesstext{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccesstext} % Display the \gloskey{text} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4406,16 +4720,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glstext@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@Glstext@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccesstext{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccesstext} % Display the \gloskey{text} value (no link and no check for existence) % converted to upper case. @@ -4431,16 +4735,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLStext@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLStext@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccesstext{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccessplural} % Display the \gloskey{plural} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -4455,16 +4749,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glsplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccessplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccessplural} % Display the \gloskey{plural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4480,16 +4764,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glsplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glsplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccessplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccessplural} % Display the \gloskey{plural} value (no link and no check for existence) % converted to upper case. @@ -4505,16 +4779,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLSplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLSplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccessplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccessfirst} % Display the \gloskey{first} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -4529,16 +4793,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsfirst@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glsfirst@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccessfirst{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccessfirst} % Display the \gloskey{first} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4554,16 +4808,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glsfirst@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@Glsfirst@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccessfirst{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccessfirst} % Display the \gloskey{first} value (no link and no check for existence) % converted to upper case. @@ -4579,16 +4823,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLSfirst@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLSfirst@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccessfirst{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccessfirstplural} % Display the \gloskey{firstplural} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -4603,16 +4837,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsfirstplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glsfirstplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccessfirstplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccessfirstplural} % Display the \gloskey{firstplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4628,16 +4852,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glsfirstplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@Glsfirstplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccessfirstplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccessfirstplural} % Display the \gloskey{firstplural} value (no link and no check for existence) % converted to upper case. @@ -4653,16 +4867,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLSfirstplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLSfirstplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccessfirstplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccesssymbol} % Display the \gloskey{symbol} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -4677,16 +4881,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glssymbol@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glssymbol@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccesssymbol{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccesssymbol} % Display the \gloskey{symbol} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4702,16 +4896,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glssymbol@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@Glssymbol@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccesssymbol{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccesssymbol} % Display the \gloskey{symbol} value (no link and no check for existence) % converted to upper case. @@ -4727,16 +4911,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLSsymbol@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLSsymbol@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccesssymbol{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccesssymbolplural} % Display the \gloskey{symbolplural} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -4751,16 +4925,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glssymbolplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glssymbolplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccesssymbolplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccesssymbolplural} % Display the \gloskey{symbolplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4776,16 +4940,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glssymbolplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@Glssymbolplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccesssymbolplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccesssymbolplural} % Display the \gloskey{symbolplural} value (no link and no check for existence) % converted to upper case. @@ -4801,16 +4955,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLSsymbolplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLSsymbolplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccesssymbolplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccessdesc} % Display the \gloskey{desc} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -4825,16 +4969,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsdesc@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glsdesc@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccessdesc{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccessdesc} % Display the \gloskey{desc} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4850,16 +4984,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glsdesc@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@Glsdesc@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccessdesc{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccessdesc} % Display the \gloskey{desc} value (no link and no check for existence) % converted to upper case. @@ -4875,16 +4999,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLSdesc@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLSdesc@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccessdesc{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccessdescplural} % Display the \gloskey{descplural} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -4899,16 +5013,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsdescplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@glsdescplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\glsaccessdescplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\Glsaccessdescplural} % Display the \gloskey{descplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -4924,16 +5028,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@Glsdescplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@Glsdescplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\Glsaccessdescplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\GLSaccessdescplural} % Display the \gloskey{descplural} value (no link and no check for existence) % converted to upper case. @@ -4949,16 +5043,6 @@ want % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GLSdescplural@} -% Redefine to use accessibility support. -%\changes{0.5.2}{2015-12-08}{added} -% \begin{macrocode} -\def\@GLSdescplural@#1#2[#3]{% - \@gls@field@link{#1}{#2}{\GLSaccessdescplural{#2}#3}% -} -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\glsaccessshort} % Display the short form (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -5612,7 +5696,8 @@ want %\begin{definition} %\cs{glsifregularcategory}\marg{category}\marg{true part}\marg{false part} %\end{definition} -% Short cut to determine if a category has the regular attribute. +% Short cut to determine if a category has the regular attribute +% explicitly set to true. % \begin{macrocode} \newcommand{\glsifregularcategory}[3]{% \glsifcategoryattribute{#1}{regular}{true}{#2}{#3}% @@ -5620,11 +5705,26 @@ want % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsifnotregularcategory} +%\begin{definition} +%\cs{glsifnotregularcategory}\marg{category}\marg{true part}\marg{false part} +%\end{definition} +% Short cut to determine if a category has the regular attribute +% explicitly set to false. +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand{\glsifnotregularcategory}[3]{% + \glsifcategoryattribute{#1}{regular}{false}{#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsifregular} %\begin{definition} %\cs{glsifregular}\marg{entry label}\marg{true part}\marg{false part} %\end{definition} -% Short cut to determine if an entry has a regular category. +% Short cut to determine if an entry has a regular attribute set to +% true. % \begin{macrocode} \newcommand{\glsifregular}[3]{% \glsifregularcategory{\glscategory{#1}}{#2}{#3}% @@ -5632,6 +5732,19 @@ want % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsifnotregular} +%\begin{definition} +%\cs{glsifnotregular}\marg{entry label}\marg{true part}\marg{false part} +%\end{definition} +% Short cut to determine if an entry has a regular attribute set to +% false. +% \begin{macrocode} +\newcommand{\glsifnotregular}[3]{% + \glsifnotregularcategory{\glscategory{#1}}{#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsforeachincategory} %\begin{definition} %\cs{glsforeachincategory}\oarg{glossary @@ -5828,9 +5941,29 @@ want \glsdoifexistsorwarn{#1}% {% \glssetabbrvfmt{\glscategory{#1}}% +% \end{macrocode} +% As from version 1.04, allow the \catattr{glossdescfont} attribute +% to determine the font applied. +%\changes{1.04}{2016-05-02}{added glossdescfont attribute check} +% \begin{macrocode} + \glshasattribute{#1}{glossdescfont}% + {% + \edef\@glsxtr@attrval{\glsgetattribute{#1}{glossdescfont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossdescfont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossdescfont attribute + for entry `#1'. Ignoring}% + \let\@glsxtr@glossdescfont\@firstofone + }% + }% + {\let\@glsxtr@glossdescfont\@firstofone}% \glsifattribute{#1}{glossdesc}{firstuc}% {% - \Glsaccessdesc{#1}% + \@glsxtr@glossdescfont{\Glsaccessdesc{#1}}% }% {% \glsifattribute{#1}{glossdesc}{title}% @@ -5838,12 +5971,12 @@ want \@glsxtr@do@titlecaps@warn \glsdescriptionaccessdisplay {% - \glsxtrfieldtitlecase{#1}{desc}% + \@glsxtr@glossdescfont{\glsxtrfieldtitlecase{#1}{desc}}% }% {#1}% }% {% - \glsaccessdesc{#1}% + \@glsxtr@glossdescfont{\glsaccessdesc{#1}}% }% }% }% @@ -5854,18 +5987,33 @@ want \glsdoifexistsorwarn{#1}% {% \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossdescfont}% + {% + \edef\@glsxtr@attrval{\glsgetattribute{#1}{glossdescfont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossdescfont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossdescfont attribute + for entry `#1'. Ignoring}% + \let\@glsxtr@glossdescfont\@firstofone + }% + }% + {\let\@glsxtr@glossdescfont\@firstofone}% \glsifattribute{#1}{glossdesc}{firstuc}% {% - \Glsentrydesc{#1}% + \@glsxtr@glossdescfont{\Glsentrydesc{#1}}% }% {% \glsifattribute{#1}{glossdesc}{title}% {% \@glsxtr@do@titlecaps@warn - \glsxtrfieldtitlecase{#1}{desc}% + \@glsxtr@glossdescfont{\glsxtrfieldtitlecase{#1}{desc}}% }% {% - \glsentrydesc{#1}% + \@glsxtr@glossdescfont{\glsentrydesc{#1}}% }% }% }% @@ -5885,11 +6033,31 @@ want \glsdoifexistsorwarn{#1}% {% \glssetabbrvfmt{\glscategory{#1}}% +% \end{macrocode} +% As from version 1.04, allow the \catattr{glossnamefont} attribute +% to determine the font applied. +%\changes{1.04}{2016-05-02}{added glossnamefont attribute check} +% \begin{macrocode} + \glshasattribute{#1}{glossnamefont}% + {% + \edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% \glsifattribute{#1}{glossname}{firstuc}% {% \glsnameaccessdisplay {% - \glsnamefont{\Glsentryname{#1}}% + \@glsxtr@glossnamefont{\Glsentryname{#1}}% }% {#1}% }% @@ -5899,7 +6067,7 @@ want \@glsxtr@do@titlecaps@warn \glsnameaccessdisplay {% - \glsnamefont{\glsxtrfieldtitlecase{#1}{name}}% + \@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{name}}% }% {#1}% }% @@ -5912,7 +6080,7 @@ want % Hide the label from the upper-casing command. % \begin{macrocode} \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% - \glsnamefont{\mfirstucMakeUppercase{\glo@name}}% + \@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}% }% {#1}% }% @@ -5920,7 +6088,7 @@ want \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% \glsnameaccessdisplay {% - \expandafter\glsnamefont\expandafter{\glo@name}% + \expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}% }% {#1}% }% @@ -5938,15 +6106,30 @@ want \glsdoifexistsorwarn{#1}% {% \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossnamefont}% + {% + \edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% \glsifattribute{#1}{glossname}{firstuc}% {% - \glsnamefont{\Glsentryname{#1}}% + \@glsxtr@glossnamefont{\Glsentryname{#1}}% }% {% \glsifattribute{#1}{glossname}{title}% {% \@glsxtr@do@titlecaps@warn - \glsnamefont{\glsxtrfieldtitlecase{#1}{name}}% + \@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{name}}% }% {% \glsifattribute{#1}{glossname}{uc}% @@ -5955,7 +6138,7 @@ want % Hide the label from the upper-casing command. % \begin{macrocode} \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% - \glsnamefont{\mfirstucMakeUppercase{\glo@name}}% + \@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}% }% {% % \end{macrocode} @@ -5964,15 +6147,16 @@ want % even though they can now use the \catattr{firstuc} attribute. % \begin{macrocode} \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% - \expandafter\glsnamefont\expandafter{\glo@name}% + \expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}% }% }% }% - }% % \end{macrocode} -% Do post-name hook: +% Do post-name hook. +%\changes{1.04}{2016-05-02}{moved post name hook inside condition} % \begin{macrocode} - \glsxtrpostnamehook{#1}% + \glsxtrpostnamehook{#1}% + }% } } % \end{macrocode} @@ -5988,9 +6172,29 @@ want \glsdoifexistsorwarn{#1}% {% \glssetabbrvfmt{\glscategory{#1}}% +% \end{macrocode} +% As from version 1.04, allow the \catattr{glossnamefont} attribute +% to determine the font applied. +%\changes{1.04}{2016-05-02}{added glossnamefont attribute check} +% \begin{macrocode} + \glshasattribute{#1}{glossnamefont}% + {% + \edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% \glsnameaccessdisplay {% - \glsnamefont{\Glsentryname{#1}}% + \@glsxtr@glossnamefont{\Glsentryname{#1}}% }% {#1}% % \end{macrocode} @@ -6005,7 +6209,22 @@ want \glsdoifexistsorwarn{#1}% {% \glssetabbrvfmt{\glscategory{#1}}% - \glsnamefont{\Glsentryname{#1}}% + \glshasattribute{#1}{glossnamefont}% + {% + \edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% + \@glsxtr@glossnamefont{\Glsentryname{#1}}% % \end{macrocode} % Do post-name hook: % \begin{macrocode} @@ -6028,6 +6247,11 @@ want \newcommand*{\glsxtrpostnamehook}[1]{% \def\@glsnumberformat{glsnumberformat}% \glsxtrdoautoindexname{#1}{indexname}% +% \end{macrocode} +% Allow categories to hook in here. +%\changes{1.04}{2016-05-02}{added category check} +% \begin{macrocode} + \csuse{glsxtrpostname\glscategory{\glscurrententrylabel}}% } % \end{macrocode} %\end{macro} @@ -6510,7 +6734,10 @@ want %\begin{macro}{\@gls@preglossaryhook} % This macro was introduced in \sty{glossaries} version 4.19, so it % may not be defined. If it hasn't been defined this feature is -% unavailable. +% unavailable. A check is added for the entry's existence to prevent +% errors from occurring if the user removes an entry or changes the +% label, which can interrupt the build process. +%\changes{1.04}{2016-05-02}{added check for entry's existence} % \begin{macrocode} \ifdef\@gls@preglossaryhook { @@ -6518,8 +6745,11 @@ want \@glsxtr@activate@initialtagging \let\@glsxtr@org@postdescription\glspostdescription \renewcommand*{\glspostdescription}{% - \glsxtrpostdescription - \@glsxtr@org@postdescription + \ifglsentryexists{\glscurrententrylabel}% + {% + \glsxtrpostdescription + \@glsxtr@org@postdescription + }{}% }% }% } @@ -6834,7 +7064,13 @@ want \edef\glscategorylabel{#1}% \ifcsdef{@glsabbrv@current@#1}% {% +% \end{macrocode} +% Warning should already have been issued. +% \begin{macrocode} + \let\@glsxtr@orgwarndep\GlsXtrWarnDeprecatedAbbrStyle + \let\GlsXtrWarnDeprecatedAbbrStyle\@gobbletwo \glsxtr@applyabbrvstyle{\csname @glsabbrv@current@#1\endcsname}% + \let\GlsXtrWarnDeprecatedAbbrStyle\@glsxtr@orgwarndep }% {}% } @@ -7171,18 +7407,36 @@ want % \end{macrocode} %\end{macro} % +%\begin{macro}{\glslongfont} +%\changes{1.04}{2016-05-02}{new} +% Font changing command used for the long form in commands like +% \cs{glsxtrlong}. +% \begin{macrocode} +\newcommand*{\glslongfont}[1]{\glslongdefaultfont{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongdefaultfont} +% Default font changing command used for the long form in commands like +%\changes{1.04}{2016-05-02}{new} +% \cs{glsxtrlong}. +% \begin{macrocode} +\newcommand*{\glslongdefaultfont}[1]{#1} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsfirstlongfont} % Font changing command used for the long form on first use or in % the full format. % \begin{macrocode} -\newcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{#1}} +\newcommand*{\glsfirstlongfont}[1]{\glslongfont{#1}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsfirstlongdefaultfont} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newcommand*{\glsfirstlongdefaultfont}[1]{#1} +\newcommand*{\glsfirstlongdefaultfont}[1]{\glslongdefaultfont{#1}} % \end{macrocode} %\end{macro} % @@ -7416,7 +7670,8 @@ want \let\glscapscase\@firstofthree \let\glsinsert\@empty \def\glscustomtext{% - \glsabbrvfont{\glsaccessshort{#2}}#3% + \glsabbrvfont{\glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -7448,7 +7703,8 @@ want \let\glscapscase\@secondofthree \let\glsinsert\@empty \def\glscustomtext{% - \glsabbrvfont{\Glsaccessshort{#2}}#3% + \glsabbrvfont{\Glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -7480,7 +7736,10 @@ want \let\glscapscase\@thirdofthree \let\glsinsert\@empty \def\glscustomtext{% - \mfirstucMakeUppercase{\glsabbrvfont{\glsaccessshort{#2}}#3}% + \mfirstucMakeUppercase + {\glsabbrvfont{\glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -7510,7 +7769,10 @@ want \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty - \def\glscustomtext{\glsaccesslong{#2}#3}% + \def\glscustomtext{% + \glslongfont{\glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% \glspostlinkhook @@ -7539,7 +7801,10 @@ want \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree \let\glsinsert\@empty - \def\glscustomtext{\Glsaccesslong{#2}#3}% + \def\glscustomtext{% + \glslongfont{\Glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% \glspostlinkhook @@ -7568,7 +7833,12 @@ want \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty - \def\glscustomtext{\mfirstucMakeUppercase{\glsaccesslong{#2}#3}}% + \def\glscustomtext{% + \mfirstucMakeUppercase + {\glslongfont{\glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% \glspostlinkhook @@ -7601,7 +7871,8 @@ want \let\glscapscase\@firstofthree \let\glsinsert\@empty \def\glscustomtext{% - \glsabbrvfont{\glsaccessshortpl{#2}}#3% + \glsabbrvfont{\glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -7634,7 +7905,8 @@ want \let\glscapscase\@secondofthree \let\glsinsert\@empty \def\glscustomtext{% - \glsabbrvfont{\Glsaccessshortpl{#2}}#3% + \glsabbrvfont{\Glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -7667,7 +7939,10 @@ want \let\glscapscase\@thirdofthree \let\glsinsert\@empty \def\glscustomtext{% - \mfirstucMakeUppercase{\glsabbrvfont{\glsaccessshortpl{#2}}#3}% + \mfirstucMakeUppercase + {\glsabbrvfont{\glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -7699,7 +7974,10 @@ want \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty - \def\glscustomtext{\glsaccesslongpl{#2}#3}% + \def\glscustomtext{% + \glslongfont{\glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% \glspostlinkhook @@ -7729,7 +8007,10 @@ want \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree \let\glsinsert\@empty - \def\glscustomtext{\Glsaccesslongpl{#2}#3}% + \def\glscustomtext{% + \glslongfont{\Glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% \glspostlinkhook @@ -7759,7 +8040,12 @@ want \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty - \def\glscustomtext{\mfirstucMakeUppercase{\glsaccesslongpl{#2}#3}}% + \def\glscustomtext{% + \mfirstucMakeUppercase + {\glslongfont{\glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% \glspostlinkhook @@ -7978,9 +8264,10 @@ want % the label, the second argument sets the information required when % defining the new abbreviation and the third argument sets the % commands used to display the full format. +%\changes{1.04}{2016-05-02}{bug fix: corrected test for existence} % \begin{macrocode} \newcommand*{\newabbreviationstyle}[3]{% - \ifcsdef{@glsabbrv@dispstyle@#1} + \ifcsdef{@glsabbrv@dispstyle@setup@#1} {% \PackageError{glossaries-extra}{Abbreviation style `#1' already defined}{}% @@ -8007,6 +8294,75 @@ want % \end{macrocode} %\end{macro} % +%\begin{macro}{\renewabbreviationstyle} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\renewabbreviationstyle}[3]{% + \ifcsundef{@glsabbrv@dispstyle@setup@#1} + {% + \PackageError{glossaries-extra}{Abbreviation style `#1' not defined}{}% + }% + {% + \csdef{@glsabbrv@dispstyle@setup@#1}{% +% \end{macrocode} +% Initialise hook to do nothing. The style may change this. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{}% + #2}% + \csdef{@glsabbrv@dispstyle@fmts@#1}{% +% \end{macrocode} +% Assume in-line form is the same as first use. The style may change +% this. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}% + \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}% + \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}% + \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}% + #3}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\letabbreviationstyle} +%\changes{1.04}{2016-05-02}{new} +% Define a synonym for an abbreviation style. The first argument is +% the new name. The second argument is the original style's name. +% \begin{macrocode} +\newcommand*{\letabbreviationstyle}[2]{% + \csletcs{@glsabbrv@dispstyle@setup@#1}{@glsabbrv@dispstyle@setup@#2}% + \csletcs{@glsabbrv@dispstyle@fmts@#1}{@glsabbrv@dispstyle@fmts@#2}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@deprecated@abbrstyle} +%\changes{1.04}{2016-05-02}{new} +%\begin{definition} +%\cs{@glsxtr@deprecated@abbrstyle}\marg{old-name}\marg{new-name} +%\end{definition} +% Define a synonym for a deprecated abbreviation style. +% \begin{macrocode} +\newcommand*{\@glsxtr@deprecated@abbrstyle}[2]{% + \csdef{@glsabbrv@dispstyle@setup@#1}{% + \GlsXtrWarnDeprecatedAbbrStyle{#1}{#2}% + \csuse{@glsabbrv@dispstyle@setup@#2}% + }% + \csletcs{@glsabbrv@dispstyle@fmts@#1}{@glsabbrv@dispstyle@fmts@#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrWarnDeprecatedAbbrStyle} +%Generate warning for deprecated style use. +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrWarnDeprecatedAbbrStyle}[2]{% + \GlossariesExtraWarning{Deprecated abbreviation style name `#1', + use `#2' instead}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsXtrUseAbbrStyleSetup} % \begin{macrocode} \newcommand*{\GlsXtrUseAbbrStyleSetup}[1]{% @@ -8096,6 +8452,7 @@ want \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} % The first use full form and the inline full form are the same for % this style. @@ -8130,6 +8487,13 @@ want \setabbreviationstyle{long-short} % \end{macrocode} % +%\begin{macro}{\glsxtrlongshortdescsort} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsxtrlongshortdescsort}{\the\glslongtok\space(\the\glsshorttok)} +% \end{macrocode} +%\end{macro} +% %\begin{abbrvstyle}{long-short-desc} % User supplies description. The long form is included in the name. %\changes{0.3}{2015-12-02}{fixed name to use \cs{glslabeltok}} @@ -8138,7 +8502,7 @@ want {% \renewcommand*{\CustomAbbreviationFields}{% name={\protect\glsxtrfullformat{\the\glslabeltok}{}}, - sort={\the\glsshorttok},% + sort={\glsxtrlongshortdescsort},% first={\protect\glsfirstlongfont{\the\glslongtok}% \protect\glsxtrfullsep{\the\glslabeltok}% (\protect\glsfirstabbrvfont{\the\glsshorttok})},% @@ -8201,6 +8565,7 @@ want \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} % The first use full form and the inline full form are the same for % this style. @@ -8305,6 +8670,7 @@ want \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} % The full format displays the short form followed by the long form % as a footnote. @@ -8356,6 +8722,12 @@ want } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{short-footnote} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-footnote}{footnote} +% \end{macrocode} +%\end{abbrvstyle} % %\begin{abbrvstyle}{postfootnote} % Similar to the above but the footnote is placed afterwards, @@ -8413,6 +8785,7 @@ want \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} % The full format displays the short form. The long form is % deferred. @@ -8461,6 +8834,12 @@ want % \end{macrocode} %\end{abbrvstyle} % +%\begin{abbrvstyle}{short-postfootnote} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-postfootnote}{postfootnote} +% \end{macrocode} +%\end{abbrvstyle} % %\begin{abbrvstyle}{short} % Provide a style that only displays the short form on first use, @@ -8492,6 +8871,7 @@ want \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} % The inline full form displays the short form followed by the % long form in parentheses. @@ -8548,6 +8928,12 @@ want % \begin{macrocode} \setabbreviationstyle[acronym]{short} % \end{macrocode} +%\begin{abbrvstyle}{short-nolong} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-nolong}{short} +% \end{macrocode} +%\end{abbrvstyle} % %\begin{abbrvstyle}{short-desc} % The user must supply the description in this style. The long form @@ -8578,6 +8964,7 @@ want \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} % The inline full form displays the short format followed by the % long form in parentheses. @@ -8625,6 +9012,12 @@ want } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{short-nolong-desc} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-nolong-desc}{short-desc} +% \end{macrocode} +%\end{abbrvstyle} % %\begin{abbrvstyle}{long-desc} % Provide a style that only displays the long form, @@ -8655,6 +9048,7 @@ want \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} % The inline full form displays the long format followed by the % short form in parentheses. @@ -8702,6 +9096,13 @@ want } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{long-noshort-desc} +%\changes{1.04}{2016-05-02}{new} +%Provide a synonym that matches similar styles. +% \begin{macrocode} +\letabbreviationstyle{long-noshort-desc}{long-desc} +% \end{macrocode} +%\end{abbrvstyle} % %\begin{abbrvstyle}{long} % It doesn't really make a great deal of sense to have a long-only @@ -8728,6 +9129,13 @@ want } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{long-noshort} +%\changes{1.04}{2016-05-02}{new} +%Provide a synonym that matches similar styles. +% \begin{macrocode} +\letabbreviationstyle{long-noshort}{long} +% \end{macrocode} +%\end{abbrvstyle} % %\subsection{Predefined Styles (Small Capitals)} %These styles use: @@ -8737,6 +9145,12 @@ want \newcommand*{\glsxtrscfont}[1]{\textsc{#1}} % \end{macrocode} %\end{macro} +%\begin{macro}{\glsxtrfirstscfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfirstscfont}[1]{\glsxtrscfont{#1}} +% \end{macrocode} +%\end{macro} % and for the default short form suffix: %\begin{macro}{\glsxtrscsuffix} %\changes{0.5}{2015-12-07}{new} @@ -8761,6 +9175,7 @@ want % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} % @@ -8780,6 +9195,7 @@ want % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} % @@ -8799,6 +9215,7 @@ want % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} @@ -8819,6 +9236,7 @@ want % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} @@ -8827,22 +9245,30 @@ want % \begin{macrocode} \newabbreviationstyle{short-sc}% {% - \GlsXtrUseAbbrStyleSetup{short}% + \GlsXtrUseAbbrStyleSetup{short-nolong}% }% {% % \end{macrocode} % Mostly as short style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short}% + \GlsXtrUseAbbrStyleFmts{short-nolong}% % \end{macrocode} % Use smallcaps and adjust the plural suffix to revert to upright. % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} % +%\begin{abbrvstyle}{short-sc-nolong} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-sc-nolong}{short-sc} +% \end{macrocode} +%\end{abbrvstyle} +% %\begin{abbrvstyle}{short-sc-desc} % \begin{macrocode} \newabbreviationstyle{short-sc-desc}% @@ -8859,97 +9285,136 @@ want % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{short-sc-nolong-desc} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-sc-nolong-desc}{short-sc-desc} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{long-sc} +%\begin{abbrvstyle}{long-noshort-sc} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-sc}} % The smallcaps font will only be used if % the short form is explicitly invoked through commands like % \cs{glsshort}. % \begin{macrocode} -\newabbreviationstyle{long-sc}% +\newabbreviationstyle{long-noshort-sc}% {% - \GlsXtrUseAbbrStyleSetup{long}% + \GlsXtrUseAbbrStyleSetup{long-noshort}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long}% + \GlsXtrUseAbbrStyleFmts{long-noshort}% % \end{macrocode} % Use smallcaps and adjust the plural suffix to revert to upright. % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{long-sc} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{long-sc}{long-noshort-sc} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{long-desc-sc} +%\begin{abbrvstyle}{long-noshort-sc-desc} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-desc-sc}} % The smallcaps font will only be used if % the short form is explicitly invoked through commands like % \cs{glsshort}. % \begin{macrocode} -\newabbreviationstyle{long-desc-sc}% +\newabbreviationstyle{long-noshort-sc-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-desc}% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-desc}% + \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% % \end{macrocode} % Use smallcaps and adjust the plural suffix to revert to upright. % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{long-desc-sc} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{long-desc-sc}{long-noshort-sc-desc} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{footnote-sc} +%\begin{abbrvstyle}{short-sc-footnote} %\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{footnote-sc}} % \begin{macrocode} -\newabbreviationstyle{footnote-sc}% +\newabbreviationstyle{short-sc-footnote}% {% - \GlsXtrUseAbbrStyleSetup{footnote}% + \GlsXtrUseAbbrStyleSetup{short-footnote}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{footnote}% + \GlsXtrUseAbbrStyleFmts{short-footnote}% % \end{macrocode} % Use smallcaps and adjust the plural suffix to revert to upright. % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{footnote-sc} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{footnote-sc}{short-sc-footnote} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{postfootnote-sc} +%\begin{abbrvstyle}{short-sc-postfootnote} %\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-sc}} % \begin{macrocode} -\newabbreviationstyle{postfootnote-sc}% +\newabbreviationstyle{short-sc-postfootnote}% {% - \GlsXtrUseAbbrStyleSetup{postfootnote}% + \GlsXtrUseAbbrStyleSetup{short-postfootnote}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{postfootnote}% + \GlsXtrUseAbbrStyleFmts{short-postfootnote}% % \end{macrocode} % Use smallcaps and adjust the plural suffix to revert to upright. % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{postfootnote-sc} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{postfootnote-sc}{short-sc-postfootnote} +% \end{macrocode} +%\end{abbrvstyle} % %\subsection{Predefined Styles (Fake Small Capitals)} % These styles require the \sty{relsize} package, which must be @@ -8960,6 +9425,12 @@ want \newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} % \end{macrocode} %\end{macro} +%\begin{macro}{\glsxtrfirstsmfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfirstsmfont}[1]{\glsxtrsmfont{#1}} +% \end{macrocode} +%\end{macro} % and for the default short form suffix: %\begin{macro}{\glsxtrsmsuffix} %\changes{0.5}{2015-12-07}{new} @@ -8981,6 +9452,7 @@ want % \begin{macrocode} \GlsXtrUseAbbrStyleFmts{long-short}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} @@ -8999,6 +9471,7 @@ want % \begin{macrocode} \GlsXtrUseAbbrStyleFmts{long-short-desc}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} @@ -9018,6 +9491,7 @@ want % \begin{macrocode} \GlsXtrUseAbbrStyleFmts{short-long}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} @@ -9037,6 +9511,7 @@ want % \begin{macrocode} \GlsXtrUseAbbrStyleFmts{short-long-desc}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} @@ -9047,117 +9522,190 @@ want % \begin{macrocode} \newabbreviationstyle{short-sm}% {% - \GlsXtrUseAbbrStyleSetup{short}% + \GlsXtrUseAbbrStyleSetup{short-nolong}% }% {% % \end{macrocode} % Mostly as short style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short}% + \GlsXtrUseAbbrStyleFmts{short-nolong}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{short-sm-nolong} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-sm-nolong}{short-sm} +% \end{macrocode} +%\end{abbrvstyle} % %\begin{abbrvstyle}{short-sm-desc} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} \newabbreviationstyle{short-sm-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-desc}% + \GlsXtrUseAbbrStyleSetup{short-nolong-desc}% }% {% % \end{macrocode} % Mostly as short style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-desc}% + \GlsXtrUseAbbrStyleFmts{short-nolong-desc}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{short-sm-nolong-desc} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-sm-nolong-desc}{short-sm-desc} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{long-sm} +%\begin{abbrvstyle}{long-noshort-sm} %\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-sm}} % The smallcaps font will only be used if % the short form is explicitly invoked through commands like % \cs{glsshort}. % \begin{macrocode} -\newabbreviationstyle{long-sm}% +\newabbreviationstyle{long-noshort-sm}% {% - \GlsXtrUseAbbrStyleSetup{long}% + \GlsXtrUseAbbrStyleSetup{long-noshort}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long}% + \GlsXtrUseAbbrStyleFmts{long-noshort}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{long-sm} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{long-sm}{long-noshort-sm} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{long-desc-sm} +%\begin{abbrvstyle}{long-noshort-sm-desc} %\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \cs{long-desc-sm}} % The smaller font will only be used if % the short form is explicitly invoked through commands like % \cs{glsshort}. % \begin{macrocode} -\newabbreviationstyle{long-desc-sm}% +\newabbreviationstyle{long-noshort-sm-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-desc}% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-desc}% + \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{long-desc-sm} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{long-desc-sm}{long-noshort-sm-desc} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{footnote-sm} +%\begin{abbrvstyle}{short-sm-footnote} %\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{footnote-sm}} % \begin{macrocode} -\newabbreviationstyle{footnote-sm}% +\newabbreviationstyle{short-sm-footnote}% {% - \GlsXtrUseAbbrStyleSetup{footnote}% + \GlsXtrUseAbbrStyleSetup{short-footnote}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{footnote}% + \GlsXtrUseAbbrStyleFmts{short-footnote}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{footnote-sm} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{footnote-sm}{short-sm-footnote} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{postfootnote-sm} +%\begin{abbrvstyle}{short-sm-postfootnote} %\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-sm}} % \begin{macrocode} -\newabbreviationstyle{postfootnote-sm}% +\newabbreviationstyle{short-sm-postfootnote}% {% - \GlsXtrUseAbbrStyleSetup{postfootnote}% + \GlsXtrUseAbbrStyleSetup{short-postfootnote}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{postfootnote}% + \GlsXtrUseAbbrStyleFmts{short-postfootnote}% \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{postfootnote-sm} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{postfootnote-sm}{short-sm-postfootnote} +% \end{macrocode} +%\end{abbrvstyle} % %\subsection{Predefined Styles (Emphasized)} % These styles use \ics{emph} for the short form. +%\begin{macro}{\glsabbrvemfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsabbrvemfont}[1]{\emph{#1}}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstabbrvemfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsfirstabbrvemfont}[1]{\glsabbrvemfont{#1}}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstlongemfont} +%\changes{1.04}{2016-05-02}{new} +%Only used by the \qt{long-em} styles. +% \begin{macrocode} +\newcommand*{\glsfirstlongemfont}[1]{\glslongemfont{#1}}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongemfont} +%\changes{1.04}{2016-05-02}{new} +%Only used by the \qt{long-em} styles. +% \begin{macrocode} +\newcommand*{\glslongemfont}[1]{\emph{#1}}% +% \end{macrocode} +%\end{macro} % %\begin{abbrvstyle}{long-short-em} %\changes{0.5}{2015-12-07}{new} @@ -9171,7 +9719,7 @@ want % Mostly as long-short style: % \begin{macrocode} \GlsXtrUseAbbrStyleFmts{long-short}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} @@ -9188,7 +9736,73 @@ want % Mostly as long-short-desc style: % \begin{macrocode} \GlsXtrUseAbbrStyleFmts{long-short-desc}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-em-short-em} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newabbreviationstyle{long-em-short-em}% +{% +% \end{macrocode} +%\cs{glslongemfont} is used in the description since \cs{glsdesc} +%doesn't set the style. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\protect\glslongemfont{\the\glslongtok}}}% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-short}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-em-short-em-desc} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newabbreviationstyle{long-em-short-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short-desc}% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-short-desc}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} @@ -9206,7 +9820,10 @@ want % Mostly as short-long style: % \begin{macrocode} \GlsXtrUseAbbrStyleFmts{short-long}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} @@ -9224,7 +9841,76 @@ want % Mostly as short-long-desc style: % \begin{macrocode} \GlsXtrUseAbbrStyleFmts{short-long-desc}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-long-em} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newabbreviationstyle{short-em-long-em}% +{% +% \end{macrocode} +%\cs{glslongemfont} is used in the description since \cs{glsdesc} +%doesn't set the style. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\protect\glslongemfont{\the\glslongtok}},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongtok})},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + (\protect\glsfirstlongfont{\the\glslongpltok})},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-long-em-desc} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newabbreviationstyle{short-em-long-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-long-desc}% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{short-long-desc}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} @@ -9234,105 +9920,435 @@ want % \begin{macrocode} \newabbreviationstyle{short-em}% {% - \GlsXtrUseAbbrStyleSetup{short}% + \GlsXtrUseAbbrStyleSetup{short-nolong}% }% {% % \end{macrocode} % Mostly as short style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \GlsXtrUseAbbrStyleFmts{short-nolong}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{short-em-nolong} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-em-nolong}{short-em} +% \end{macrocode} +%\end{abbrvstyle} % %\begin{abbrvstyle}{short-em-desc} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} \newabbreviationstyle{short-em-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-desc}% + \GlsXtrUseAbbrStyleSetup{short-nolong-desc}% }% {% % \end{macrocode} % Mostly as short style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-desc}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \GlsXtrUseAbbrStyleFmts{short-nolong-desc}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{short-em-nolong-desc} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-em-nolong-desc}{short-em-desc} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{long-em} +%\begin{abbrvstyle}{long-noshort-em} %\changes{0.5}{2015-12-07}{new} -% The emphasized font will only be used if -% the short form is explicitly invoked through commands like +%\changes{1.04}{2016-05-02}{renamed from \qt{long-em}} +% The short form is explicitly invoked through commands like % \cs{glsshort}. % \begin{macrocode} -\newabbreviationstyle{long-em}% +\newabbreviationstyle{long-noshort-em}% {% - \GlsXtrUseAbbrStyleSetup{long}% + \GlsXtrUseAbbrStyleSetup{long-noshort}% }% {% % \end{macrocode} -% Mostly as long style: +% Mostly as \abbrstyle{long-noshort} style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \GlsXtrUseAbbrStyleFmts{long-noshort}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{long-em} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{long-em}{long-noshort-em} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{long-desc-em} +%\begin{abbrvstyle}{long-em-noshort-em} +%\changes{1.04}{2016-05-02}{new} +% The short form is explicitly invoked through commands like +% \cs{glsshort}. +% \begin{macrocode} +\newabbreviationstyle{long-em-noshort-em}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, + text={\the\glslongtok}, + plural={\the\glslongpltok},% + description={\protect\glslongemfont{\the\glslongtok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% +% \end{macrocode} +% Mostly as \abbrstyle{long-noshort} style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-noshort}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-noshort-em-desc} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-desc-em}} %\changes{0.5}{2015-12-07}{new} % The emphasized font will only be used if % the short form is explicitly invoked through commands like % \cs{glsshort}. % \begin{macrocode} -\newabbreviationstyle{long-desc-em}% +\newabbreviationstyle{long-noshort-em-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-desc}% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-desc}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{long-desc-em} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{long-desc-em}{long-noshort-em-desc} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{footnote-em} +%\begin{abbrvstyle}{long-em-noshort-em-desc} +%\changes{1.04}{2016-05-02}{new} +% The short form is explicitly invoked through commands like +% \cs{glsshort}. The long form is emphasized. +% \begin{macrocode} +\newabbreviationstyle{long-em-noshort-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +}% +{% +% \end{macrocode} +% Mostly as long style: +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-footnote} %\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2015-04-30}{renamed from \qt{footnote-em}} % \begin{macrocode} -\newabbreviationstyle{footnote-em}% +\newabbreviationstyle{short-em-footnote}% {% - \GlsXtrUseAbbrStyleSetup{footnote}% + \GlsXtrUseAbbrStyleSetup{short-footnote}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{footnote}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \GlsXtrUseAbbrStyleFmts{short-footnote}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{footnote-em} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{footnote-em}{short-em-footnote} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{postfootnote-em} +%\begin{abbrvstyle}{short-em-postfootnote} %\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-em}} % \begin{macrocode} -\newabbreviationstyle{postfootnote-em}% +\newabbreviationstyle{short-em-postfootnote}% {% - \GlsXtrUseAbbrStyleSetup{postfootnote}% + \GlsXtrUseAbbrStyleSetup{short-postfootnote}% }% {% % \end{macrocode} % Mostly as long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{postfootnote}% - \renewcommand*\glsabbrvfont[1]{\emph{##1}}% + \GlsXtrUseAbbrStyleFmts{short-postfootnote}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% +} +% \end{macrocode} +%\end{abbrvstyle} +%\begin{abbrvstyle}{postfootnote-em} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{postfootnote-em}{short-em-postfootnote} +% \end{macrocode} +%\end{abbrvstyle} +% +%\subsection{Predefined Styles (User Parentheses Hook)} +% These styles allow the user to adjust the parenthetical forms. +% These styles all test for the existence of the +% field given by: +%\begin{macro}{\glsxtruserfield} +%\changes{1.04}{2016-05-02}{new} +% Default is the useri field. +% \begin{macrocode} +\newcommand*{\glsxtruserfield}{useri} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtruserparen} +%\changes{1.04}{2016-05-02}{new} +% The format of the parenthetical information. +% The first argument is the long/short form. The second argument +% is the entry's label. If \cs{glscurrentfieldvalue} has been +% defined, then we have at least \sty{glossaries} v4.23, which makes +% it easier for the user to adjust this. +% \begin{macrocode} +\ifdef\glscurrentfieldvalue +{ + \newcommand*{\glsxtruserparen}[2]{% + \glsxtrfullsep{#2}% + (#1\ifglshasfield{\glsxtruserfield}{#2}{, \glscurrentfieldvalue}{})% + } +} +{ + \newcommand*{\glsxtruserparen}[2]{% + \glsxtrfullsep{#2}% + (#1\ifglshasfield{\glsxtruserfield}{#2}{, \@glo@thisvalue}{})% + } +} +% \end{macrocode} +%\end{macro} +% Font used for short form: +%\begin{macro}{\glsabbrvuserfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsabbrvuserfont}[1]{#1} +% \end{macrocode} +%\end{macro} +% Font used for short form on first use: +%\begin{macro}{\glsfirstabbrvuserfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsfirstabbrvuserfont}[1]{\glsabbrvuserfont{#1}} +% \end{macrocode} +%\end{macro} +% Font used for long form: +%\begin{macro}{\glslonguserfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glslonguserfont}[1]{#1} +% \end{macrocode} +%\end{macro} +% Font used for long form on first use: +%\begin{macro}{\glsfirstlonguserfont} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsfirstlonguserfont}[1]{\glslonguserfont{#1}} +% \end{macrocode} +%\end{macro} +% The default short form suffix: +%\begin{macro}{\glsxtrusersuffix} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsxtrusersuffix}{\glspluralsuffix} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-short-user} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newabbreviationstyle{long-short-user}% +{% +% \end{macrocode} +%\cs{glslonguserfont} is used in the description since \cs{glsdesc} +%doesn't set the style. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtruserparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}{\the\glslabeltok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtruserparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}{\the\glslabeltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\protect\glslonguserfont{\the\glslongtok}}}% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +% \end{macrocode} +% The first use full form and the inline full form are the same for +% this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-short-user-desc} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newabbreviationstyle{long-short-user-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-short-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-user}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-long-user} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newabbreviationstyle{short-long-user}% +{% +% \end{macrocode} +%\cs{glslonguserfont} is used in the description since \cs{glsdesc} +%doesn't set the style. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\protect\glslonguserfont{\the\glslongtok}},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtruserparen{\protect\glslonguserfont{\the\glslongtok}}{\the\glslabeltok}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtruserparen{\protect\glslonguserfont{\the\glslongpltok}}{\the\glslabeltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +% \end{macrocode} +% The first use full form and the inline full form are the same for +% this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-long-user-desc} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newabbreviationstyle{short-long-user-desc}% +{% + \GlsXtrUseAbbrStyleSetup{short-long-desc}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long-user}% } % \end{macrocode} %\end{abbrvstyle} @@ -10563,6 +11579,10 @@ want % \begin{macrocode} \@glsxtr@redefstyles % \end{macrocode} +% and set the style: +% \begin{macrocode} +\@glsxtr@do@style +% \end{macrocode} %\iffalse % \begin{macrocode} %</glossaries-extra.sty> @@ -10581,7 +11601,7 @@ want % First identify package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2016/04/27 v1.03 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2016/05/02 v1.04 (NLCT)] % \end{macrocode} % Provide package options to automatically load required predefined % styles. The simplest method is to just test for the existence of diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins index 3f693042de9..c1a3bd89823 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins @@ -1,4 +1,4 @@ -% glossaries-extra.ins generated using makedtx version 1.1 2016/4/27 10:59 +% glossaries-extra.ins generated using makedtx version 1.1 2016/5/2 18:05 \input docstrip \preamble |