diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx | 4142 |
1 files changed, 3717 insertions, 425 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 ecfd2657d1b..4690b5e1791 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx @@ -1,17 +1,17 @@ %\iffalse -% glossaries-extra.dtx generated using makedtx version 1.1 (c) Nicola Talbot +% glossaries-extra.dtx generated using makedtx version 1.2 (c) Nicola Talbot % Command line args: +% -comment ".*\.tex" % -src "glossaries-extra.sty\Z=>glossaries-extra.sty" % -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty" % -src "(example-glossaries-.+\.tex)\Z=>\1" +% -section "chapter" % -author "Nicola Talbot" % -macrocode ".*\.tex" -% -comment ".*\.tex" -% -section "chapter" % -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" % -doc "glossaries-extra-codedoc.tex" % glossaries-extra -% Created on 2017/6/15 12:28 +% Created on 2017/8/9 16:08 %\fi %\iffalse %<*package> @@ -121,7 +121,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{11999} +\CheckSum{17436} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -138,12 +138,16 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \newcommand*{\igloskey}[2][newglossaryentry]{\icsopt{#1}{#2}} \newcommand*{\gloskey}[2][newglossaryentry]{\csopt{#1}{#2}} -\newcommand*{\glostyle}[1]{\textsf{#1}\index{glossary styles:>#1={\protect\sffamily#1}|main}} +\newcommand*{\stylefmt}[1]{\textsf{#1}} + +\newcommand*{\glostyle}[1]{\stylefmt{#1}% + \index{glossary styles:>#1=\protect\stylefmt{#1}|main}} -\newcommand*{\acrstyle}[1]{\textsf{#1}\index{acronym -styles (glossaries):>#1={\protect\ttfamily#1}|main}} +\newcommand*{\acrstyle}[1]{\stylefmt{#1}% + \index{acronym styles (glossaries):>#1=\protect\stylefmt{#1}|main}} -\newcommand*{\abbrstyle}[1]{\textsf{#1}\index{abbreviation styles:>#1={\protect\sffamily#1}|main}} +\newcommand*{\abbrstyle}[1]{\stylefmt{#1}% + \index{abbreviation styles:>#1=\protect\stylefmt{#1}|main}} \newcommand*{\category}[1]{\textsf{#1}\index{entry categories:>#1={\protect\sffamily#1}|main}} @@ -157,13 +161,13 @@ styles (glossaries):>#1={\protect\ttfamily#1}|main}} \raggedright } -\title{glossaries-extra.sty v1.16: +\title{glossaries-extra.sty v1.17: documented code} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} -\date{2017-06-15} +\date{2017-08-09} \begin{document} \DocInput{glossaries-extra.dtx} @@ -208,7 +212,7 @@ Dickimaw Books\\ %\section{Package Initialisation and Options} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2017/06/15 v1.16 (NLCT)] +\ProvidesPackage{glossaries-extra}[2017/08/09 v1.17 (NLCT)] % \end{macrocode} % Requires \sty{xkeyval} to define package options. % \begin{macrocode} @@ -887,6 +891,45 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\GlsXtrDefineAcShortcuts} +% Enable shortcut commands for the abbreviations, but uses the +% analogous commands provided by \styfmt{glossaries}. +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrDefineAcShortcuts}{% + \newcommand*{\ac}{\cgls}% + \newcommand*{\acp}{\cglspl}% + \newcommand*{\acs}{\glsxtrshort}% + \newcommand*{\acsp}{\glsxtrshortpl}% + \newcommand*{\acl}{\glsxtrlong}% + \newcommand*{\aclp}{\glsxtrlongpl}% + \newcommand*{\acf}{\glsxtrfull}% + \newcommand*{\acfp}{\glsxtrfullpl}% + \newcommand*{\Ac}{\cGls}% + \newcommand*{\Acp}{\cGlspl}% + \newcommand*{\Acs}{\Glsxtrshort}% + \newcommand*{\Acsp}{\Glsxtrshortpl}% + \newcommand*{\Acl}{\Glsxtrlong}% + \newcommand*{\Aclp}{\Glsxtrlongpl}% + \newcommand*{\Acf}{\Glsxtrfull}% + \newcommand*{\Acfp}{\Glsxtrfullpl}% + \newcommand*{\AC}{\cGLS}% + \newcommand*{\ACP}{\cGLSpl}% + \newcommand*{\ACS}{\GLSxtrshort}% + \newcommand*{\ACSP}{\GLSxtrshortpl}% + \newcommand*{\ACL}{\GLSxtrlong}% + \newcommand*{\ACLP}{\GLSxtrlongpl}% + \newcommand*{\ACF}{\GLSxtrfull}% + \newcommand*{\ACFP}{\GLSxtrfullpl}% + \newcommand*{\newabbr}{\newabbreviation}% +% \end{macrocode} +% Disable this command after it's been used. +% \begin{macrocode} + \let\GlsXtrDefineAcShortcuts\relax +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsXtrDefineOtherShortcuts} % Similarly provide shortcut versions for the commands provided by % the \pkgopt{symbols} and \pkgopt{numbers} options. @@ -931,9 +974,12 @@ Dickimaw Books\\ %equivalent to \pkgopt[all]{shortcuts} and %\pkgopt[none]{shortcuts}. Multiple use of this option in the %\emph{same} option list will override each other. +%New to v1.17: \pkgopt[ac]{shortcuts} which implements +%\cs{GlsXtrDefineAcShortcuts} (not included in +%\pkgopt[all]{shortcuts} as it conflicts with other shortcuts). % \begin{macrocode} \define@choicekey{glossaries-extra.sty}{shortcuts}[\val\nr]% - {acronyms,acro,abbreviations,abbr,other,all,true,none,false}[true]{% + {acronyms,acro,abbreviations,abbr,other,all,true,none,false,ac}[true]{% \let\@glsxtr@shortcutsval\val \ifcase\nr\relax % acronyms \renewcommand*{\@glsxtr@setupshortcuts}{% @@ -971,8 +1017,13 @@ Dickimaw Books\\ \GlsXtrDefineAbbreviationShortcuts \GlsXtrDefineOtherShortcuts }% - \else % none, false + \or % none, false \renewcommand*{\@glsxtr@setupshortcuts}{}% + \or % ac + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \GlsXtrDefineAcShortcuts + }% \fi } % \end{macrocode} @@ -6831,7 +6882,12 @@ Dickimaw Books\\ \@gls@noidxloclist@prev }% {% - ??\glsdoifexists{#1}% +% \end{macrocode} +%\changes{1.17}{2017-08-09}{replace hard-coded ?? with +%\cs{glsxtrundeftag}} +% \begin{macrocode} + \glsxtrundeftag + \glsdoifexists{#1}% {% \GlossariesWarning{Missing location list for `#1'. Either a rerun is required or you haven't referenced the entry.}% @@ -6856,7 +6912,12 @@ Dickimaw Books\\ \forlistloop{\glsnoidxnumberlistloophandler}{\@gls@loclist}% }% {% - ??\glsdoifexists{#1}% +% \end{macrocode} +%\changes{1.17}{2017-08-09}{replace hard-coded ?? with +%\cs{glsxtrundeftag}} +% \begin{macrocode} + \glsxtrundeftag + \glsdoifexists{#1}% {% \GlossariesWarning{Missing location list for `##1'. Either a rerun is required or you haven't referenced the entry.}% @@ -6879,7 +6940,12 @@ Dickimaw Books\\ \glsnoidxloclist{\@gls@loclist}% }% {% - ??\glsdoifexists{#1}% +% \end{macrocode} +%\changes{1.17}{2017-08-09}{replace hard-coded ?? with +%\cs{glsxtrundeftag}} +% \begin{macrocode} + \glsxtrundeftag + \glsdoifexists{#1}% {% \GlossariesWarning{Missing location list for `#1'. Either a rerun is required or you haven't referenced the entry.}% @@ -10510,6 +10576,48 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%Similarly provide a way of replacing spaces with +%\cs{glsxtrwordsep}, which first needs to be defined: +%\begin{macro}{\glsxtrwordsep} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrwordsep}{\space} +% \end{macrocode} +%\end{macro} +%Each word is marked with +%\begin{macro}{\glsxtrword} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrword}[1]{#1} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@markwordseps} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@markwordseps}[2]{% + \def#1{}% + \@glsxtr@mark@wordseps#1#2 \@nnil +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@mark@wordseps} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\def\@glsxtr@mark@wordseps#1#2 #3{% + \ifdefempty{#1}% + {\def#1{\protect\glsxtrword{#2}}}% + {\appto#1{\protect\glsxtrwordsep\protect\glsxtrword{#2}}}% + \ifx\@nnil#3\relax + \let\@glsxtr@mark@wordseps@next\relax + \else + \def\@glsxtr@mark@wordseps@next{% + \@glsxtr@mark@wordseps#1#3}% + \fi + \@glsxtr@mark@wordseps@next +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\newabbreviation} % Define a new generic abbreviation. % \begin{macrocode} @@ -10531,67 +10639,113 @@ Dickimaw Books\\ \glsshorttok{#3}% \glslongtok{#4}% % \end{macrocode} +%Save the original short and long values (before attribute settings +%modify them). +%\changes{1.17}{2017-08-09}{added \cs{glsxtrorgshort} and \cs{glsxtrorglong}} +% \begin{macrocode} + \def\glsxtrorgshort{#3}% + \def\glsxtrorglong{#4}% +% \end{macrocode} % Get the category. %\changes{0.3}{2015-12-02}{fixed family name in \cs{setkeys}} % \begin{macrocode} \def\glscategorylabel{abbreviation}% \glsxtr@applyabbrvstyle{\@glsabbrv@current@abbreviation}% +% \end{macrocode} +% Ignore the shortplural and longplural keys. +% \begin{macrocode} \setkeys*{glsxtrabbrv}[shortplural,longplural]{#1}% % \end{macrocode} % Set the default long plural % \begin{macrocode} \def\@gls@longpl{#4\glspluralsuffix}% + \let\@gls@default@longpl\@gls@longpl % \end{macrocode} -% Has the \catattr{insertdots} attribute been set? +% Has the \catattr{markwords} attribute been set? % \begin{macrocode} - \glsifcategoryattribute{\glscategorylabel}{insertdots}{true}% + \glsifcategoryattribute{\glscategorylabel}{markwords}{true}% {% - \@glsxtr@insertdots\@gls@short{#3}% - \expandafter\glsshorttok\expandafter{\@gls@short\spacefactor1000 \relax}% - \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}% - {% - \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short - '\abbrvpluralsuffix}% - }% + \@glsxtr@markwordseps\@gls@long{#4}% + \expandafter\def\expandafter\@gls@longpl\expandafter + {\@gls@long\glspluralsuffix}% + \let\@gls@default@longpl\@gls@longpl +% \end{macrocode} +% Update \cs{glslongtok}. +% \begin{macrocode} + \expandafter\glslongtok\expandafter{\@gls@long}% + }% + {}% +% \end{macrocode} +% Has the \catattr{markshortwords} attribute been set? (Not +% compatible with \catattr{insertdots}.) +% \begin{macrocode} + \glsifcategoryattribute{\glscategorylabel}{markshortwords}{true}% + {% + \@glsxtr@markwordseps\@gls@short{#3}% + }% + {% +% \end{macrocode} +% Has the \catattr{insertdots} attribute been set? +% \begin{macrocode} + \glsifcategoryattribute{\glscategorylabel}{insertdots}{true}% {% - \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}% - {% - \let\@gls@shortpl\@gls@short - }% - {% - \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short - \abbrvpluralsuffix}% - }% + \@glsxtr@insertdots\@gls@short{#3}% + \expandafter\glsshorttok\expandafter{\@gls@short\spacefactor1000 \relax}% }% + {\def\@gls@short{#3}}% + }% +% \end{macrocode} +% Has the \catattr{aposplural} attribute been set? (Not compatible +% with \catattr{noshortplural}.) +% \begin{macrocode} + \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}% + {% + \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short + '\abbrvpluralsuffix}% }% {% % \end{macrocode} -% \catattr{insertdots} not true. +% Has the \catattr{noshortplural} attribute been set? % \begin{macrocode} - \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}% + \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}% {% - \def\@gls@shortpl{#3'\abbrvpluralsuffix}% - }% - {% - \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}% - {% - \def\@gls@shortpl{#3}% - }% + \let\@gls@shortpl\@gls@short + }% {% - \def\@gls@shortpl{#3\abbrvpluralsuffix}% - }% + \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short + \abbrvpluralsuffix}% }% }% % \end{macrocode} +% Update \cs{glsshorttok}: +% \begin{macrocode} + \expandafter\glsshorttok\expandafter{\@gls@short}% +% \end{macrocode} % Hook for further customisation if required: % \begin{macrocode} \glsxtrnewabbrevpresetkeyhook{#1}{#2}{#3}% % \end{macrocode} % Get the short and long plurals provided by user in optional % argument to override defaults, if necessary. +% Ignore the category key (already obtained). % \begin{macrocode} \setkeys*{glsxtrabbrv}[category]{#1}% % \end{macrocode} +% Has the plural been explicitly set? +% \begin{macrocode} + \ifx\@gls@default@longpl\@gls@longpl + \else +% \end{macrocode} +% Has the \catattr{markwords} attribute been set? +% \begin{macrocode} + \glsifcategoryattribute{\glscategorylabel}{markwords}{true}% + {% + \expandafter\@glsxtr@markwordseps\expandafter\@gls@longpl\expandafter + {\@gls@longpl}% + }% + {}% + \fi +% \end{macrocode} % Set the plural token registers so the values can be accessed by % the abbreviation styles. % \begin{macrocode} @@ -10652,12 +10806,20 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrparen} +%\changes{1.17}{2017-08-09}{new} +%For the parenthetical styles. +% \begin{macrocode} +\newcommand*{\glsxtrparen}[1]{(#1)} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrfullformat} % Full format without case change. % \begin{macrocode} \newcommand*{\glsxtrfullformat}[2]{% \glsfirstlongfont{\glsaccesslong{#1}}#2\glsxtrfullsep{#1}% - (\protect\glsfirstabbrvfont{\glsaccessshort{#1}})% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{#1}}}% } % \end{macrocode} %\end{macro} @@ -10667,7 +10829,7 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\Glsxtrfullformat}[2]{% \glsfirstlongfont{\Glsaccesslong{#1}}#2\glsxtrfullsep{#1}% - (\protect\glsfirstabbrvfont{\glsaccessshort{#1}})% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{#1}}}% } % \end{macrocode} %\end{macro} @@ -10677,7 +10839,7 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\glsxtrfullplformat}[2]{% \glsfirstlongfont{\glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% - (\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}})% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}}}% } % \end{macrocode} %\end{macro} @@ -10687,7 +10849,7 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\Glsxtrfullplformat}[2]{% \glsfirstlongfont{\Glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% - (\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}})% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}}}% } % \end{macrocode} %\end{macro} @@ -11460,6 +11622,7 @@ Dickimaw Books\\ %\changes{0.5.2}{2015-12-08}{removed \cs{glsxtrabbrvfmt}} %\begin{macro}{\glsxtrgenabbrvfmt} % Similar to \cs{glsgenacfmt}, but for abbreviations. +%\changes{1.17}{2017-08-09}{added check for \cs{ifglsxtrinsertinside}} % \begin{macrocode} \newcommand*{\glsxtrgenabbrvfmt}{% \ifdefempty\glscustomtext @@ -11479,20 +11642,20 @@ Dickimaw Books\\ % \end{macrocode} % Subsequent plural form, don't adjust case: % \begin{macrocode} - \glsabbrvfont{\glsaccessshortpl{\glslabel}}\glsinsert + \glsxtrsubsequentplfmt{\glslabel}{\glsinsert}% }% {% % \end{macrocode} % Subsequent plural form, make first letter upper case: % \begin{macrocode} - \glsabbrvfont{\Glsaccessshortpl{\glslabel}}\glsinsert + \Glsxtrsubsequentplfmt{\glslabel}{\glsinsert}% }% {% % \end{macrocode} % Subsequent plural form, all caps: % \begin{macrocode} \mfirstucMakeUppercase - {\glsabbrvfont{\glsaccessshortpl{\glslabel}}\glsinsert}% + {\glsxtrsubsequentplfmt{\glslabel}{\glsinsert}}% }% }% {% @@ -11504,20 +11667,20 @@ Dickimaw Books\\ % \end{macrocode} % Subsequent singular form, don't adjust case: % \begin{macrocode} - \glsabbrvfont{\glsaccessshort{\glslabel}}\glsinsert + \glsxtrsubsequentfmt{\glslabel}{\glsinsert}% }% {% % \end{macrocode} % Subsequent singular form, make first letter upper case: % \begin{macrocode} - \glsabbrvfont{\Glsaccessshort{\glslabel}}\glsinsert + \Glsxtrsubsequentfmt{\glslabel}{\glsinsert}% }% {% % \end{macrocode} % Subsequent singular form, all caps: % \begin{macrocode} \mfirstucMakeUppercase - {\glsabbrvfont{\glsaccessshort{\glslabel}}\glsinsert}% + {\glsxtrsubsequentfmt{\glslabel}{\glsinsert}}% }% }% }% @@ -11588,6 +11751,54 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrsubsequentfmt} +% Subsequent use format (singular no case change). +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\glsaccessshort{#1}\ifglsxtrinsertinside #2\fi}% + \ifglsxtrinsertinside \else#2\fi +} +\let\glsxtrdefaultsubsequentfmt\glsxtrsubsequentfmt +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrsubsequentplfmt} +% Subsequent use format (plural no case change). +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\glsaccessshortpl{#1}\ifglsxtrinsertinside #2\fi}% + \ifglsxtrinsertinside \else#2\fi +} +\let\glsxtrdefaultsubsequentplfmt\glsxtrsubsequentplfmt +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrsubsequentfmt} +% Subsequent use format (singular, first letter uppercase). +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\Glsaccessshort{#1}\ifglsxtrinsertinside #2\fi}% + \ifglsxtrinsertinside \else#2\fi +} +\let\Glsxtrdefaultsubsequentfmt\Glsxtrsubsequentfmt +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrsubsequentplfmt} +% Subsequent use format (plural, first letter uppercase). +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\Glsaccessshortpl{#1}\ifglsxtrinsertinside #2\fi}% + \ifglsxtrinsertinside \else#2\fi +} +\let\Glsxtrdefaultsubsequentplfmt\Glsxtrsubsequentplfmt +% \end{macrocode} +%\end{macro} +% %\subsection{Abbreviation Styles Setup} % %\begin{macro}{\setabbreviationstyle} @@ -11680,6 +11891,13 @@ Dickimaw Books\\ \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}% \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}% \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}% +% \end{macrocode} +% Reset \cs{glsxtrsubsequentfmt} etc in case a style changes this. +% \begin{macrocode} + \let\glsxtrsubsequentfmt\glsxtrdefaultsubsequentfmt + \let\glsxtrsubsequentplfmt\glsxtrdefaultsubsequentplfmt + \let\Glsxtrsubsequentfmt\Glsxtrdefaultsubsequentfmt + \let\Glsxtrsubsequentplfmt\Glsxtrdefaultsubsequentplfmt #3}% }% } @@ -11808,6 +12026,8 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\changes{1.17}{2017-08-09}{removed some inconsistencies in the abbreviation +%styles} %\begin{abbrvstyle}{long-short} % \begin{macrocode} \newabbreviationstyle{long-short}% @@ -11817,10 +12037,10 @@ Dickimaw Books\\ sort={\the\glsshorttok}, first={\protect\glsfirstlongfont{\the\glslongtok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}},% firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} @@ -11856,22 +12076,22 @@ Dickimaw Books\\ \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi \glsxtrfullsep{##1}% - (\glsfirstabbrvfont{\glsaccessshort{##1}})% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}% }% \renewcommand*{\glsxtrfullplformat}[2]{% \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% }% \renewcommand*{\Glsxtrfullformat}[2]{% \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstabbrvfont{\glsaccessshort{##1}})% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}% }% \renewcommand*{\Glsxtrfullplformat}[2]{% \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% }% } % \end{macrocode} @@ -11885,7 +12105,19 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrlongshortdescsort} %\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\newcommand*{\glsxtrlongshortdescsort}{\the\glslongtok\space(\the\glsshorttok)} +\newcommand*{\glsxtrlongshortdescsort}{% + \expandonce\glsxtrorglong\space (\expandonce\glsxtrorgshort)% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrlongshortdescname} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrlongshortdescname}{% + \protect\glslongfont{\the\glslongtok} + \glsxtrparen{\protect\glsabbrvfont{\the\glsshorttok}}% +} % \end{macrocode} %\end{macro} % @@ -11896,14 +12128,14 @@ Dickimaw Books\\ \newabbreviationstyle{long-short-desc}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsxtrfullformat{\the\glslabeltok}{}}, + name={\glsxtrlongshortdescname}, sort={\glsxtrlongshortdescsort},% first={\protect\glsfirstlongfont{\the\glslongtok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstabbrvfont{\the\glsshorttok})},% + \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}},% firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}},% % \end{macrocode} %The \gloskey{text} key should only have the short form. %\changes{1.07}{2016-08-15}{added missing text key} @@ -11943,10 +12175,10 @@ Dickimaw Books\\ description={\the\glslongtok},% first={\protect\glsfirstabbrvfont{\the\glsshorttok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstlongfont{\the\glslongtok})},% + \glsxtrparen{\protect\glsfirstlongfont{\the\glslongtok}}},% firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstlongfont{\the\glslongpltok})},% + \glsxtrparen{\protect\glsfirstlongfont{\the\glslongpltok}}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} @@ -11981,28 +12213,45 @@ Dickimaw Books\\ \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi \glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% }% \renewcommand*{\glsxtrfullplformat}[2]{% \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi \glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% }% \renewcommand*{\Glsxtrfullformat}[2]{% \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% }% \renewcommand*{\Glsxtrfullplformat}[2]{% \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% }% } % \end{macrocode} %\end{abbrvstyle} % +%\begin{macro}{\glsxtrshortlongdescsort} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrshortlongdescsort}{\the\glsshorttok} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrshortlongdescname} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrshortlongdescname}{% + \protect\glsabbrvfont{\the\glsshorttok} + \glsxtrparen{\protect\glslongfont{\the\glslongtok}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{abbrvstyle}{short-long-desc} % User supplies description. The long form is included in the name. %\changes{0.3}{2015-12-02}{fixed name to use \cs{glslabeltok}} @@ -12010,14 +12259,14 @@ Dickimaw Books\\ \newabbreviationstyle{short-long-desc}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsxtrfullformat{\the\glslabeltok}{}}, - sort={\the\glsshorttok},% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, first={\protect\glsfirstabbrvfont{\the\glsshorttok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstlongfont{\the\glslongtok})},% + \glsxtrparen{\protect\glsfirstlongfont{\the\glslongtok}}},% firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstlongfont{\the\glslongpltok})},% + \glsxtrparen{\protect\glsfirstlongfont{\the\glslongpltok}}},% % \end{macrocode} %\changes{1.07}{2016-08-15}{added text key} % \begin{macrocode} @@ -12159,22 +12408,22 @@ Dickimaw Books\\ \renewcommand*{\glsxtrinlinefullformat}[2]{% \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfootnotefont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfootnotefont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfootnotefont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfootnotefont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% }% } % \end{macrocode} @@ -12279,22 +12528,22 @@ Dickimaw Books\\ \renewcommand*{\glsxtrinlinefullformat}[2]{% \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfootnotefont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfootnotefont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfootnotefont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfootnotefont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% }% } % \end{macrocode} @@ -12347,25 +12596,25 @@ Dickimaw Books\\ \protect\glsfirstabbrvfont{\glsaccessshort{##1}% \ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}% \ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% \protect\glsfirstabbrvfont{\glsaccessshort{##1}% \ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\Glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfont{\Glsaccesslong{##1}}}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}% \ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\Glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfont{\Glsaccesslongpl{##1}}}% }% % \end{macrocode} % The first use full form only displays the short form, but it @@ -12394,6 +12643,7 @@ Dickimaw Books\\ % \begin{macrocode} \setabbreviationstyle[acronym]{short} % \end{macrocode} +% %\begin{abbrvstyle}{short-nolong} %\changes{1.04}{2016-05-02}{new} % \begin{macrocode} @@ -12401,6 +12651,40 @@ Dickimaw Books\\ % \end{macrocode} %\end{abbrvstyle} % +%\begin{abbrvstyle}{short-nolong-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like \abbrstyle{short-nolong} but doesn't set the \catattr{regular} attribute. +% \begin{macrocode} +\newabbreviationstyle{short-nolong-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{short-nolong}% +% \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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-nolong}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +% +%\begin{macro}{\glsxtrshortdescname} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrshortdescname}{% + \protect\glsabbrvfont{\the\glsshorttok}% +} +% \end{macrocode} +%\end{macro} +% %\begin{abbrvstyle}{short-desc} % The user must supply the description in this style. The long form % is added to the name. The \abbrstyle{short} style (possibly with the @@ -12411,7 +12695,7 @@ Dickimaw Books\\ \newabbreviationstyle{short-desc}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsxtrinlinefullformat{\the\glslabeltok}{}}, + name={\glsxtrshortdescname}, sort={\the\glsshorttok}, first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, @@ -12438,22 +12722,22 @@ Dickimaw Books\\ \renewcommand*{\glsxtrinlinefullformat}[2]{% \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslong{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\glsfirstlongfont{\glsaccesslongpl{##1}})% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% }% % \end{macrocode} % The first use full form only displays the short form, but it @@ -12485,6 +12769,30 @@ Dickimaw Books\\ % \end{macrocode} %\end{abbrvstyle} % +%\begin{abbrvstyle}{short-nolong-desc-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like \abbrstyle{short-nolong-desc} but doesn't set the \catattr{regular} attribute. +% \begin{macrocode} +\newabbreviationstyle{short-nolong-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{short-nolong-desc}% +% \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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-nolong-desc}% +} +% \end{macrocode} +%\end{abbrvstyle} +% %\begin{abbrvstyle}{long-desc} % Provide a style that only displays the long form, % but the long and short form can be displayed with the \qt{full} @@ -12495,12 +12803,12 @@ Dickimaw Books\\ \newabbreviationstyle{long-desc}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\protect\glsfirstlongfont{\the\glslongtok}}, + name={\protect\protect\glslongfont{\the\glslongtok}}, sort={\the\glslongtok}, first={\protect\glsfirstlongfont{\the\glslongtok}}, firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, - text={\the\glslongtok}, - plural={\the\glslongpltok}% + text={\glslongfont{\the\glslongtok}}, + plural={\glslongfont{\the\glslongpltok}}% }% \renewcommand*{\GlsXtrPostNewAbbreviation}{% \glssetattribute{\the\glslabeltok}{regular}{true}}% @@ -12516,28 +12824,48 @@ Dickimaw Books\\ \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} +% The format for subsequent use (not used when the regular attribute +% is set). +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} % The inline full form displays the long format followed by the % short form in parentheses. % \begin{macrocode} \renewcommand*{\glsxtrinlinefullformat}[2]{% \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\protect\glsfirstabbrvfont{\glsaccessshort{##1}})% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\protect\glsfirstabbrvfont{\glsaccessshort{##1}})% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - (\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}})% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% }% % \end{macrocode} % The first use full form only displays the long form, but it @@ -12570,9 +12898,34 @@ Dickimaw Books\\ % \end{macrocode} %\end{abbrvstyle} % +%\begin{abbrvstyle}{long-noshort-desc-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like long-noshort-desc but doesn't set the \catattr{regular} attribute. +% \begin{macrocode} +\newabbreviationstyle{long-noshort-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +% \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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% +} +% \end{macrocode} +%\end{abbrvstyle} +% %\begin{abbrvstyle}{long} % It doesn't really make a great deal of sense to have a long-only -% style that doesn't have a description, but the best course of +% style that doesn't have a description (unless no glossary is +% required), but the best course of % action here is to use the short form as the name and the long % form as the description. % \begin{macrocode} @@ -12583,8 +12936,8 @@ Dickimaw Books\\ sort={\the\glsshorttok}, first={\protect\glsfirstlongfont{\the\glslongtok}}, firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, - text={\the\glslongtok}, - plural={\the\glslongpltok},% + text={\glslongfont{\the\glslongtok}}, + plural={\glslongfont{\the\glslongpltok}},% description={\the\glslongtok}% }% \renewcommand*{\GlsXtrPostNewAbbreviation}{% @@ -12595,6 +12948,7 @@ Dickimaw Books\\ } % \end{macrocode} %\end{abbrvstyle} +% %\begin{abbrvstyle}{long-noshort} %\changes{1.04}{2016-05-02}{new} %Provide a synonym that matches similar styles. @@ -12603,18 +12957,58 @@ Dickimaw Books\\ % \end{macrocode} %\end{abbrvstyle} % +%\begin{abbrvstyle}{long-noshort-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like long-noshort but doesn't set the \catattr{regular} attribute. +% \begin{macrocode} +\newabbreviationstyle{long-noshort-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort}% +% \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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-noshort}% +} +% \end{macrocode} +%\end{abbrvstyle} +% %\subsection{Predefined Styles (Small Capitals)} -%These styles use: +%These styles use \cs{textsc} for the short form. %\begin{macro}{\glsxtrscfont} %\changes{0.5}{2015-12-07}{new} +%Maintained for backward-compatibility. % \begin{macrocode} \newcommand*{\glsxtrscfont}[1]{\textsc{#1}} % \end{macrocode} %\end{macro} +%\begin{macro}{\glsabbrvscfont} +%\changes{1.17}{2017-08-09}{new} +%Added for consistent naming. +% \begin{macrocode} +\newcommand*{\glsabbrvscfont}{\glsxtrscfont} +% \end{macrocode} +%\end{macro} %\begin{macro}{\glsxtrfirstscfont} %\changes{1.04}{2016-05-02}{new} +%Maintained for backward-compatibility. % \begin{macrocode} -\newcommand*{\glsxtrfirstscfont}[1]{\glsxtrscfont{#1}} +\newcommand*{\glsxtrfirstscfont}[1]{\glsabbrvscfont{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstabbrvscfont} +%\changes{1.17}{2017-08-09}{new} +%Added for consistent naming. +% \begin{macrocode} +\newcommand*{\glsfirstabbrvscfont}{\glsxtrfirstscfont} % \end{macrocode} %\end{macro} % and for the default short form suffix: @@ -12629,19 +13023,62 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-short-sc}% {% - \GlsXtrUseAbbrStyleSetup{long-short}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvscfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshortpltok}}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% }% {% % \end{macrocode} -% Mostly as long-short style: -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short}% -% \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}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% +% \end{macrocode} +% Use the default long fonts. +% \begin{macrocode} + \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. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% } % \end{macrocode} % @@ -12649,19 +13086,35 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-short-sc-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-short-desc}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}% + }% % \end{macrocode} -% Mostly as long-short-desc style: +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short-desc}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. +% As long-short-sc style: % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% + \GlsXtrUseAbbrStyleFmts{long-short-sc}% } % \end{macrocode} % @@ -12669,19 +13122,63 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sc-long}% {% - \GlsXtrUseAbbrStyleSetup{short-long}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvscfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% % \end{macrocode} -% Mostly as short-long style: +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \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}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##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. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12690,19 +13187,34 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sc-long-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-long-desc}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}% + }% % \end{macrocode} -% Mostly as short-long-desc style: +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-long-desc}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. +% As short-sc-long style: % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsxtrscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstscfont{##1}}% + \GlsXtrUseAbbrStyleFmts{short-sc-long}% } % \end{macrocode} %\end{abbrvstyle} @@ -12711,19 +13223,74 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sc}% {% - \GlsXtrUseAbbrStyleSetup{short-nolong}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvscfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}}, + text={\protect\glsabbrvscfont{\the\glsshorttok}}, + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% % \end{macrocode} -% Mostly as short style: -% \begin{macrocode} - \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}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##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. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvscfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvscfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12739,19 +13306,70 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sc-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}}, + text={\protect\glsabbrvscfont{\the\glsshorttok}}, + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% % \end{macrocode} -% Mostly as short style: -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-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}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##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. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12766,23 +13384,95 @@ Dickimaw Books\\ %\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}. +% \cs{glsxtrshort}. % \begin{macrocode} \newabbreviationstyle{long-noshort-sc}% {% - \GlsXtrUseAbbrStyleSetup{long-noshort}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvscfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, + text={\protect\glslongdefaultfont{\the\glslongtok}}, + plural={\protect\glslongdefaultfont{\the\glslongpltok}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% % \end{macrocode} -% Mostly as long style: -% \begin{macrocode} - \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}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +% \end{macrocode} +% The format for subsequent use (not used when the regular attribute +% is set). +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12805,15 +13495,77 @@ Dickimaw Books\\ }% {% % \end{macrocode} -% Mostly as long style: -% \begin{macrocode} - \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}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +% \end{macrocode} +% The format for subsequent use (not used when the regular attribute +% is set). +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12830,19 +13582,92 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sc-footnote}% {% - \GlsXtrUseAbbrStyleSetup{short-footnote}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvscfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% % \end{macrocode} -% Mostly as long style: +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-footnote}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \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}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +% \end{macrocode} +% The full format displays the short form followed by the long form +% as a footnote. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12859,19 +13684,98 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sc-postfootnote}% {% - \GlsXtrUseAbbrStyleSetup{short-postfootnote}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvscfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% % \end{macrocode} -% Mostly as long style: +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-postfootnote}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% +% \end{macrocode} +% Needs the specific font command here as the style may have been +% lost by the time the footnote occurs. +% \begin{macrocode} + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +% \end{macrocode} +% The footnote needs to be suppressed in the inline form, so +% \cs{glsxtrfull} must set the first use switch off. +% \begin{macrocode} + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% % \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}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +% \end{macrocode} +% The full format displays the short form. The long form is +% deferred. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12887,14 +13791,30 @@ Dickimaw Books\\ % loaded by the user. These styles all use: %\begin{macro}{\glsxtrsmfont} %\changes{0.5}{2015-12-07}{new} +%Maintained for backward compatibility. % \begin{macrocode} \newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} % \end{macrocode} %\end{macro} +%\begin{macro}{\glsabbrvsmfont} +%\changes{1.17}{2017-08-09}{new} +%Added for consistent naming. +% \begin{macrocode} +\newcommand*{\glsabbrvsmfont}{\glsxtrsmfont} +% \end{macrocode} +%\end{macro} %\begin{macro}{\glsxtrfirstsmfont} %\changes{1.04}{2016-05-02}{new} +%Maintained for backward compatibility. +% \begin{macrocode} +\newcommand*{\glsxtrfirstsmfont}[1]{\glsabbrvsmfont{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstabbrvsmfont} +%\changes{1.17}{2017-08-09}{new} +%Added for consistent naming. % \begin{macrocode} -\newcommand*{\glsxtrfirstsmfont}[1]{\glsxtrsmfont{#1}} +\newcommand*{\glsfirstabbrvsmfont}{\glsxtrfirstsmfont} % \end{macrocode} %\end{macro} % and for the default short form suffix: @@ -12910,16 +13830,59 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-short-sm}% {% - \GlsXtrUseAbbrStyleSetup{long-short}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvsmfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% % \end{macrocode} -% Mostly as long-short style: +% Use the default long fonts. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \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. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12929,16 +13892,34 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-short-sm-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-short-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\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} -% Mostly as long-short-desc style: +% As long-short-sm style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short-desc}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \GlsXtrUseAbbrStyleFmts{long-short-sm}% } % \end{macrocode} %\end{abbrvstyle} @@ -12949,16 +13930,60 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sm-long}% {% - \GlsXtrUseAbbrStyleSetup{short-long}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvsmfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + plural={\protect\glsabbrvsmfont{\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}% + }% + {}% + }% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Mostly as short-long style: +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-long}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -12969,16 +13994,34 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sm-long-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-long-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\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} -% Mostly as short-long-desc style: +% As short-sm-long style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-long-desc}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \GlsXtrUseAbbrStyleFmts{short-sm-long}% } % \end{macrocode} %\end{abbrvstyle} @@ -12988,16 +14031,71 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sm}% {% - \GlsXtrUseAbbrStyleSetup{short-nolong}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvsmfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}, + text={\protect\glsabbrvsmfont{\the\glsshorttok}}, + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Mostly as short style: +% The inline full form displays the short form followed by the +% long form in parentheses. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-nolong}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvsmfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvsmfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13013,16 +14111,67 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sm-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-nolong-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}, + text={\protect\glsabbrvsmfont{\the\glsshorttok}}, + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Mostly as short style: +% The inline full form displays the short format followed by the +% long form in parentheses. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-nolong-desc}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13042,16 +14191,88 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-noshort-sm}% {% - \GlsXtrUseAbbrStyleSetup{long-noshort}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvsmfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, + text={\protect\glslongdefaultfont{\the\glslongtok}}, + plural={\protect\glslongdefaultfont{\the\glslongpltok}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Mostly as long style: +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-noshort}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13074,13 +14295,75 @@ Dickimaw Books\\ \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Mostly as long style: +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13097,16 +14380,89 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sm-footnote}% {% - \GlsXtrUseAbbrStyleSetup{short-footnote}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvsmfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% +% \end{macrocode} +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% % \end{macrocode} -% Mostly as long style: +% The full format displays the short form followed by the long form +% as a footnote. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-footnote}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13123,16 +14479,95 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-sm-postfootnote}% {% - \GlsXtrUseAbbrStyleSetup{short-postfootnote}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvsmfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% +% \end{macrocode} +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% +% \end{macrocode} +% Needs the specific font command here as the style may have been +% lost by the time the footnote occurs. +% \begin{macrocode} + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +% \end{macrocode} +% The footnote needs to be suppressed in the inline form, so +% \cs{glsxtrfull} must set the first use switch off. +% \begin{macrocode} + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% % \end{macrocode} -% Mostly as long style: +% The full format displays the short form. The long form is +% deferred. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-postfootnote}% - \renewcommand*\glsabbrvfont[1]{\glsxtrsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsxtrfirstsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13157,6 +14592,13 @@ Dickimaw Books\\ \newcommand*{\glsfirstabbrvemfont}[1]{\glsabbrvemfont{#1}}% % \end{macrocode} %\end{macro} +% The default short form suffix: +%\begin{macro}{\glsxtremsuffix} +%\changes{0.5}{2015-12-07}{new} +% \begin{macrocode} +\newcommand*{\glsxtremsuffix}{\glsxtrabbrvpluralsuffix} +% \end{macrocode} +%\end{macro} %\begin{macro}{\glsfirstlongemfont} %\changes{1.04}{2016-05-02}{new} %Only used by the \qt{long-em} styles. @@ -13175,17 +14617,63 @@ Dickimaw Books\\ % %\begin{abbrvstyle}{long-short-em} %\changes{0.5}{2015-12-07}{new} +% The long form is just set in the default long font. % \begin{macrocode} \newabbreviationstyle{long-short-em}% {% - \GlsXtrUseAbbrStyleSetup{long-short}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvemfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% }% {% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% % \end{macrocode} -% Mostly as long-short style: +% Use the default long fonts. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##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. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13195,14 +14683,34 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-short-em-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-short-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\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} -% Mostly as long-short-desc style: +% As long-short-em style: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short-desc}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \GlsXtrUseAbbrStyleFmts{long-short-em}% } % \end{macrocode} %\end{abbrvstyle} @@ -13217,18 +14725,18 @@ Dickimaw Books\\ %doesn't set the style. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsabbrvfont{\the\glsshorttok}}, + name={\protect\glsabbrvemfont{\the\glsshorttok}}, sort={\the\glsshorttok}, - first={\protect\glsfirstlongfont{\the\glslongtok}% + first={\protect\glsfirstlongemfont{\the\glslongtok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstabbrvfont{\the\glsshorttok})},% - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstabbrvfont{\the\glsshortpltok})},% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}},% description={\protect\glslongemfont{\the\glslongtok}}}% % \end{macrocode} % Unset the \catattr{regular} attribute if it has been set. @@ -13242,15 +14750,36 @@ Dickimaw Books\\ }% }% {% -% \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +% \end{macrocode} +% The first use full form and the inline full form are the same for +% this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13260,18 +14789,31 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-em-short-em-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-short-desc}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongemfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% + }% % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +% Unset the \catattr{regular} attribute if it has been set. % \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}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-short-em}% } % \end{macrocode} %\end{abbrvstyle} @@ -13282,16 +14824,64 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-em-long}% {% - \GlsXtrUseAbbrStyleSetup{short-long}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvemfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + plural={\protect\glsabbrvemfont{\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} % Mostly as short-long style: %\changes{1.05}{2016-06-10}{fixed incorrect font used by long form} % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##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. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13302,17 +14892,31 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-em-long-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-long-desc}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% + }% % \end{macrocode} -% Mostly as short-long-desc style: +% Unset the \catattr{regular} attribute if it has been set. % \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}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-long}% } % \end{macrocode} %\end{abbrvstyle} @@ -13327,19 +14931,19 @@ Dickimaw Books\\ %doesn't set the style. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsabbrvfont{\the\glsshorttok}}, + name={\protect\glsabbrvemfont{\the\glsshorttok}}, sort={\the\glsshorttok}, description={\protect\glslongemfont{\the\glslongtok}},% - first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstlongfont{\the\glslongtok})},% - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% \protect\glsxtrfullsep{\the\glslabeltok}% - (\protect\glsfirstlongfont{\the\glslongpltok})},% + \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongpltok}}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% % \end{macrocode} % Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} @@ -13352,15 +14956,37 @@ Dickimaw Books\\ }% }% {% -% \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-long}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +% \end{macrocode} +% The first use full form and the inline full form are the same for +% this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongemfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongemfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongemfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongemfont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13370,18 +14996,31 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-em-long-em-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-long-desc}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname},% + sort={\glsxtrshortlongdescsort},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% + }% % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +% Unset the \catattr{regular} attribute if it has been set. % \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}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-long-em}% } % \end{macrocode} %\end{abbrvstyle} @@ -13391,15 +15030,71 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-em}% {% - \GlsXtrUseAbbrStyleSetup{short-nolong}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvemfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}}, + text={\protect\glsabbrvemfont{\the\glsshorttok}}, + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% -% \end{macrocode} -% Mostly as short style: -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-nolong}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##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. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvemfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvemfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13415,15 +15110,67 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-em-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-nolong-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}}, + text={\protect\glsabbrvemfont{\the\glsshorttok}}, + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% -% \end{macrocode} -% Mostly as short style: -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-nolong-desc}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##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. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13442,15 +15189,88 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-noshort-em}% {% - \GlsXtrUseAbbrStyleSetup{long-noshort}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvemfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, + text={\protect\glslongdefaultfont{\the\glslongtok}}, + plural={\protect\glslongdefaultfont{\the\glslongpltok}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% -% \end{macrocode} -% Mostly as \abbrstyle{long-noshort} style: -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-noshort}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +% \end{macrocode} +% The format for subsequent use (not used when the regular attribute +% is set). +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13469,26 +15289,111 @@ Dickimaw Books\\ \newabbreviationstyle{long-em-noshort-em}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsabbrvfont{\the\glsshorttok}}, + name={\protect\glsabbrvemfont{\the\glsshorttok}}, sort={\the\glsshorttok}, - first={\protect\glsfirstlongfont{\the\glslongtok}}, - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, - text={\the\glslongtok}, - plural={\the\glslongpltok},% + first={\protect\glsfirstlongemfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}}, + text={\protect\glslongemfont{\the\glslongtok}}, + plural={\protect\glslongemfont{\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*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +% \end{macrocode} +% The format for subsequent use (not used when the regular attribute +% is set). +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-em-noshort-em-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like long-em-noshort-em but doesn't set the \catattr{regular} attribute. +% \begin{macrocode} +\newabbreviationstyle{long-em-noshort-em-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-em-noshort-em}% +% \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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-noshort-em}% } % \end{macrocode} %\end{abbrvstyle} @@ -13505,12 +15410,75 @@ Dickimaw Books\\ \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% }% {% -% \end{macrocode} -% Mostly as long style: -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +% \end{macrocode} +% The format for subsequent use (not used when the regular attribute +% is set). +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13528,17 +15496,111 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-em-noshort-em-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\protect\glslongemfont{\the\glslongtok}}, + sort={\the\glslongtok}, + first={\protect\glsfirstlongemfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}}, + text={\glslongemfont{\the\glslongtok}}, + plural={\glslongemfont{\the\glslongpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% }% {% -% \end{macrocode} -% Mostly as long style: -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +% \end{macrocode} +% The format for subsequent use (not used when the regular attribute +% is set). +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-em-noshort-em-desc-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like long-em-noshort-em-desc but doesn't set the \catattr{regular} attribute. +% \begin{macrocode} +\newabbreviationstyle{long-em-noshort-em-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-em-noshort-em-desc}% +% \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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-noshort-em-desc}% } % \end{macrocode} %\end{abbrvstyle} @@ -13549,15 +15611,89 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-em-footnote}% {% - \GlsXtrUseAbbrStyleSetup{short-footnote}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvemfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% % \end{macrocode} -% Mostly as long style: +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-footnote}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +% \end{macrocode} +% The full format displays the short form followed by the long form +% as a footnote. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13574,15 +15710,95 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-em-postfootnote}% {% - \GlsXtrUseAbbrStyleSetup{short-postfootnote}% -}% -{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvemfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% +% \end{macrocode} +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% +% \end{macrocode} +% Needs the specific font command here as the style may have been +% lost by the time the footnote occurs. +% \begin{macrocode} + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% % \end{macrocode} -% Mostly as long style: +% The footnote needs to be suppressed in the inline form, so +% \cs{glsxtrfull} must set the first use switch off. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-postfootnote}% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtremsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +% \end{macrocode} +% The full format displays the short form. The long form is +% deferred. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% } % \end{macrocode} %\end{abbrvstyle} @@ -13617,13 +15833,15 @@ Dickimaw Books\\ { \newcommand*{\glsxtruserparen}[2]{% \glsxtrfullsep{#2}% - (#1\ifglshasfield{\glsxtruserfield}{#2}{, \glscurrentfieldvalue}{})% + \glsxtrparen + {#1\ifglshasfield{\glsxtruserfield}{#2}{, \glscurrentfieldvalue}{}}% } } { \newcommand*{\glsxtruserparen}[2]{% \glsxtrfullsep{#2}% - (#1\ifglshasfield{\glsxtruserfield}{#2}{, \@glo@thisvalue}{})% + \glsxtrparen + {#1\ifglshasfield{\glsxtruserfield}{#2}{, \@glo@thisvalue}{}}% } } % \end{macrocode} @@ -13631,8 +15849,9 @@ Dickimaw Books\\ % Font used for short form: %\begin{macro}{\glsabbrvuserfont} %\changes{1.04}{2016-05-02}{new} +%\changes{1.17}{2017-08-09}{initialised to default font} % \begin{macrocode} -\newcommand*{\glsabbrvuserfont}[1]{#1} +\newcommand*{\glsabbrvuserfont}[1]{\glsabbrvdefaultfont{#1}} % \end{macrocode} %\end{macro} % Font used for short form on first use: @@ -13645,8 +15864,9 @@ Dickimaw Books\\ % Font used for long form: %\begin{macro}{\glslonguserfont} %\changes{1.04}{2016-05-02}{new} +%\changes{1.17}{2017-08-09}{initialised to default font} % \begin{macrocode} -\newcommand*{\glslonguserfont}[1]{#1} +\newcommand*{\glslonguserfont}[1]{\glslongdefaultfont{#1}} % \end{macrocode} %\end{macro} % Font used for long form on first use: @@ -13669,21 +15889,19 @@ Dickimaw Books\\ % \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}}, + name={\protect\glsabbrvuserfont{\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}},% + first={\protect\glsfirstlonguserfont{\the\glslongtok}% + \protect\glsxtruserparen{\protect\glsfirstabbrvuserfont{\the\glsshorttok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}% + \protect\glsxtruserparen + {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% description={\protect\glslonguserfont{\the\glslongtok}}}% % \end{macrocode} % Unset the \catattr{regular} attribute if it has been set. @@ -13711,24 +15929,24 @@ Dickimaw Books\\ % this style. % \begin{macrocode} \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% }% \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% }% \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% }% \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% }% } % \end{macrocode} @@ -13742,14 +15960,14 @@ Dickimaw Books\\ \newabbreviationstyle{long-postshort-user}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsabbrvfont{\the\glsshorttok}}, + name={\protect\glsabbrvuserfont{\the\glsshorttok}}, sort={\the\glsshorttok}, - first={\protect\glsfirstlongfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% description={\protect\glslonguserfont{\the\glslongtok}}}% \renewcommand*{\GlsXtrPostNewAbbreviation}{% \csdef{glsxtrpostlink\glscategorylabel}{% @@ -13782,43 +16000,43 @@ Dickimaw Books\\ %First use full form: % \begin{macrocode} \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi }% \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi }% \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi }% \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi }% % \end{macrocode} % In-line format: % \begin{macrocode} \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% }% } % \end{macrocode} @@ -13832,16 +16050,18 @@ Dickimaw Books\\ \newabbreviationstyle{long-postshort-user-desc}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsfirstlongfont{\the\glslongtok}% + name={\protect\glslonguserfont{\the\glslongtok}% \protect\glsxtruserparen - {\protect\glsabbrvfont{\the\glsshorttok}}{\the\glslabeltok}}, + {\protect\glsabbrvuserfont{\the\glsshorttok}}{\the\glslabeltok}}, sort={\the\glslongtok}, - first={\protect\glsfirstlongfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}% + }% \renewcommand*{\GlsXtrPostNewAbbreviation}{% \csdef{glsxtrpostlink\glscategorylabel}{% \glsxtrifwasfirstuse @@ -13873,21 +16093,21 @@ Dickimaw Books\\ \newabbreviationstyle{short-postlong-user}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsabbrvfont{\the\glsshorttok}}, + name={\protect\glsabbrvuserfont{\the\glsshorttok}}, sort={\the\glsshorttok}, - first={\protect\glsfirstlongfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% description={\protect\glslonguserfont{\the\glslongtok}}}% \renewcommand*{\GlsXtrPostNewAbbreviation}{% \csdef{glsxtrpostlink\glscategorylabel}{% \glsxtrifwasfirstuse {% \glsxtruserparen - {\glsfirstabbrvuserfont{\glsentrylong{\glslabel}}}% + {\glsfirstlonguserfont{\glsentrylong{\glslabel}}}% {\glslabel}% }% {}% @@ -13913,43 +16133,43 @@ Dickimaw Books\\ %First use full form: % \begin{macrocode} \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi }% \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi }% \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi }% \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi }% % \end{macrocode} % In-line format: % \begin{macrocode} \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% }% } % \end{macrocode} @@ -13963,23 +16183,25 @@ Dickimaw Books\\ \newabbreviationstyle{short-postlong-user-desc}% {% \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsabbrvfont{\the\glsshorttok}% + name={\protect\glsabbrvuserfont{\the\glsshorttok}% \protect\glsxtruserparen - {\protect\glsfirstlongfont{\the\glslongpltok}}% + {\protect\glslonguserfont{\the\glslongpltok}}% {\the\glslabeltok}}, sort={\the\glsshorttok}, - first={\protect\glsfirstlongfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}% + }% \renewcommand*{\GlsXtrPostNewAbbreviation}{% \csdef{glsxtrpostlink\glscategorylabel}{% \glsxtrifwasfirstuse {% \glsxtruserparen - {\glsfirstabbrvuserfont{\glsentrylong{\glslabel}}}% + {\glsfirstlonguserfont{\glsentrylong{\glslabel}}}% {\glslabel}% }% {}% @@ -14002,7 +16224,31 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{long-short-user-desc}% {% - \GlsXtrUseAbbrStyleSetup{long-short-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% +% \end{macrocode} +%\changes{1.17}{2017-08-09}{corrected first forms} +% \begin{macrocode} + first={\protect\glsfirstlonguserfont{\the\glslongtok}% + \protect\glsxtruserparen{\protect\glsfirstabbrvuserfont{\the\glsshorttok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}% + \protect\glsxtruserparen + {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\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}% + }% + {}% + }% }% {% \GlsXtrUseAbbrStyleFmts{long-short-user}% @@ -14020,17 +16266,19 @@ Dickimaw Books\\ %doesn't set the style. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\protect\glsabbrvfont{\the\glsshorttok}}, + name={\protect\glsabbrvuserfont{\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}},% + first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstabbrvuserfont{\the\glsshortpltok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongpltok}}% + {\the\glslabeltok}},% % \end{macrocode} %\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}}% % \end{macrocode} % Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} @@ -14057,24 +16305,24 @@ Dickimaw Books\\ % this style. % \begin{macrocode} \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% }% \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% }% \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% }% \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% }% } % \end{macrocode} @@ -14085,7 +16333,31 @@ Dickimaw Books\\ % \begin{macrocode} \newabbreviationstyle{short-long-user-desc}% {% - \GlsXtrUseAbbrStyleSetup{short-long-desc}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort},% +% \end{macrocode} +%\changes{1.17}{2017-08-09}{corrected first forms} +% \begin{macrocode} + first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstabbrvuserfont{\the\glsshortpltok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongpltok}}% + {\the\glslabeltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\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}% + }% + {}% + }% }% {% \GlsXtrUseAbbrStyleFmts{short-long-user}% @@ -14093,6 +16365,1026 @@ Dickimaw Books\\ % \end{macrocode} %\end{abbrvstyle} % +%\subsection{Predefined Styles (Hyphen)} +%These styles are designed to work with the \catattr{markwords} +%attribute. They check if the inserted material (provided by the final +%optional argument of commands like \cs{gls}) starts with a hyphen. +%If it does, the insert is added to the parenthetical material. +%Note that commands like \cs{glsxtrlong} set \cs{glsinsert} to empty +%with the entire link-text stored in \cs{glscustomtext}. +% +%\begin{macro}{\glsxtrifhyphenstart} +%Checks if the argument starts with a hyphen. The argument may be +%\cs{glsinsert} so check for that and expand. +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newrobustcmd*{\glsxtrifhyphenstart}[3]{% + \ifx\glsinsert#1\relax + \expandafter\@glsxtrifhyphenstart#1\relax\relax + \@end@glsxtrifhyphenstart{#2}{#3}% + \else + \@glsxtrifhyphenstart#1\relax\relax\@end@glsxtrifhyphenstart{#2}{#3}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrifhyphenstart} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\def\@glsxtrifhyphenstart#1#2\@end@glsxtrifhyphenstart#3#4{% + \ifx-#1\relax#3\else #4\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrlonghyphenshort} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrlonghyphenshort}\marg{label}\marg{long}\marg{short}\marg{insert} +%\end{definition} +%The \meta{long} and \meta{short} arguments may be the plural form. +%The \meta{long} argument may also be the first letter uppercase form. +% \begin{macrocode} +\newcommand*{\glsxtrlonghyphenshort}[4]{% +% \end{macrocode} +% Grouping is needed to localise the redefinitions. +% \begin{macrocode} + {% +% \end{macrocode} +% If \meta{insert} starts with a hyphen, redefine \ics{glsxtrwordsep} +% to a hyphen. The inserted material is also inserted into the +% parenthetical part. (The inserted material is grouped as a +% precautionary measure.) No change is made to \cs{glsxtrwordsep} if +% \meta{insert} doesn't start with a hyphen. +% \begin{macrocode} + \glsxtrifhyphenstart{#4}{\def\glsxtrwordsep{-}}{}% + \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside{#4}\fi}% + \ifglsxtrinsertinside\else{#4}\fi + \glsxtrfullsep{#1}% + \glsxtrparen{\glsfirstabbrvhyphenfont{#3\ifglsxtrinsertinside{#4}\fi}% + \ifglsxtrinsertinside\else{#4}\fi}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsabbrvhyphenfont} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsabbrvhyphenfont}{\glsabbrvdefaultfont}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstabbrvhyphenfont} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsfirstabbrvhyphenfont}{\glsabbrvhyphenfont}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glslonghyphenfont} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glslonghyphenfont}{\glslongdefaultfont}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstlonghyphenfont} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsfirstlonghyphenfont}{\glslonghyphenfont}% +% \end{macrocode} +%\end{macro} +% The default short form suffix: +%\begin{macro}{\glsxtrhyphensuffix} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrhyphensuffix}{\glsxtrabbrvpluralsuffix} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-hyphen-short-hyphen} +%\changes{1.17}{2017-08-09}{new} +%Designed for use with the \catattr{markwords} attribute. +% \begin{macrocode} +\newabbreviationstyle{long-hyphen-short-hyphen}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvhyphenfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\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}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrhyphensuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +% \end{macrocode} +% The first use full form and the inline full form are the same for +% this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphenshort{##1}{\glsaccesslong{##1}}{\glsaccessshort{##1}}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphenshort{##1}{\glsaccesslongpl{##1}}% + {\glsaccessshortpl{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphenshort{##1}{\Glsaccesslong{##1}}{\glsaccessshort{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphenshort{##1}{\Glsaccesslongpl{##1}}% + {\glsaccessshortpl{##1}}{##2}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-hyphen-short-hyphen-desc} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{long-hyphen-short-hyphen} but the description +%must be supplied by the user. +% \begin{macrocode} +\newabbreviationstyle{long-hyphen-short-hyphen-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-short-hyphen}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{macro}{\glsxtrlonghyphennoshort} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrlonghyphennoshort}\marg{label}\marg{long}\marg{insert} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glsxtrlonghyphennoshort}[3]{% +% \end{macrocode} +% Grouping is needed to localise the redefinitions. +% \begin{macrocode} + {% +% \end{macrocode} +% If \meta{insert} starts with a hyphen, redefine \ics{glsxtrwordsep} +% to a hyphen. The inserted material is also inserted into the +% parenthetical part. (The inserted material is grouped as a +% precautionary measure.) No change is made to \cs{glsxtrwordsep} if +% \meta{insert} doesn't start with a hyphen. +% \begin{macrocode} + \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% + \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside{#3}\fi}% + \ifglsxtrinsertinside\else{#3}\fi + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-hyphen-noshort-desc-noreg} +%\changes{1.17}{2017-08-09}{new} +%This version doesn't show the short form (except +%explicitly with \cs{glsxtrshort}). Since \cs{glsxtrshort} doesn't +%support the hyphen switch, the short form just uses the default +%short-form font command. This style won't work with the +%\catattr{regular} as the regular form isn't flexible enough. +% \begin{macrocode} +\newabbreviationstyle{long-hyphen-noshort-desc-noreg}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\protect\glslonghyphenfont{\the\glslongtok}}, + sort={\expandonce\glsxtrorglong}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + plural={\protect\glslonghyphenfont{\the\glslongpltok}}% + }% +% \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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-short-hyphen}% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +% \end{macrocode} +% The format for subsequent use (not used when the regular attribute +% is set). +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% + }% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% +% \end{macrocode} +% The first use full form only displays the long form. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-hyphen-noshort-noreg} +% It doesn't really make a great deal of sense to have a long-only +% style that doesn't have a descriptionnless no glossary is +% required), but the best course of +% action here is to use the short form as the name and the long +% form as the description. +% \begin{macrocode} +\newabbreviationstyle{long-hyphen-noshort-noreg}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glslonghyphenfont{\the\glslongtok}},% + plural={\protect\glslonghyphenfont{\the\glslongpltok}},% + description={\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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-desc}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{macro}{\glsxtrlonghyphen} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrlonghyphen}\marg{long}\marg{label}\marg{insert} +%\end{definition} +%Used by \abbrstyle{long-hyphen-postshort-hyphen}. The \meta{insert} +%is check to determine if it starts with a hyphen but isn't used +%here as it's moved to the post-link hook. +% \begin{macrocode} +\newcommand*{\glsxtrlonghyphen}[3]{% +% \end{macrocode} +% Grouping is needed to localise the redefinitions. +% \begin{macrocode} + {% + \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% + \glsfirstlonghyphenfont{#1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrposthyphenshort} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrposthyphenshort}\marg{label}\marg{insert} +%\end{definition} +%Used in the post-link hook for the +%\abbrstyle{long-hyphen-postshort-hyphen} style. Much like +%\cs{glsxtrlonghyphenshort} but omits the \meta{long} part. This +%always uses the singular short form. +% \begin{macrocode} +\newcommand*{\glsxtrposthyphenshort}[2]{% + {% + \glsxtrifhyphenstart{#2}{\def\glsxtrwordsep{-}}{}% + \ifglsxtrinsertinside{\glsfirstlonghyphenfont{#2}}\else{#2}\fi + \glsxtrfullsep{#1}% + \glsxtrparen + {\glsfirstabbrvhyphenfont{\glsentryshort{#1}\ifglsxtrinsertinside{#2}\fi}% + \ifglsxtrinsertinside\else{#2}\fi + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrposthyphensubsequent} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrposthyphensubsequent}\marg{label}\marg{insert} +%\end{definition} +%Format in the post-link hook for subsequent use. The label is +%ignored by default. +% \begin{macrocode} +\newcommand*{\glsxtrposthyphensubsequent}[2]{% + \glsabbrvfont{\ifglsxtrinsertinside {#2}\fi}% + \ifglsxtrinsertinside \else{#2}\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-hyphen-postshort-hyphen} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{long-hyphen-short-hyphen} but shifts the insert +%and parenthetical material to the post-link hook. +% \begin{macrocode} +\newabbreviationstyle{long-hyphen-postshort-hyphen}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvhyphenfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrposthyphenshort{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% Put the insertion into the post-link: +% \begin{macrocode} + \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% + }% + }% + \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}{\glsxtrabbrvpluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +% \end{macrocode} +% Subsequent use needs to omit the insertion: +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\glsaccessshort{##1}}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\glsaccessshortpl{##1}}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\Glsaccessshort{##1}}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\Glsaccessshortpl{##1}}% + }% +% \end{macrocode} +% First use full form: +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphen{\glsaccesslong{##1}}{##1}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphen{\glsaccesslongpl{##1}}{##1}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphen{\Glsaccesslong{##1}}{##1}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphen{\Glsaccesslongpl{##1}}{##1}{##2}% + }% +% \end{macrocode} +% In-line format. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlonghyphenfont{\glsaccesslong{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlonghyphenfont{\glsaccesslongpl{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlonghyphenfont{\Glsaccesslong{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlonghyphenfont{\Glsaccesslongpl{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-hyphen-postshort-hyphen-desc} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{long-hyphen-postshort-hyphen} but the description +%must be supplied by the user. +% \begin{macrocode} +\newabbreviationstyle{long-hyphen-postshort-hyphen-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrposthyphenshort{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% Put the insertion into the post-link: +% \begin{macrocode} + \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-postshort-hyphen}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{macro}{\glsxtrshorthyphenlong} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrshorthyphenlong}\marg{label}\marg{short}\marg{long}\marg{insert} +%\end{definition} +%The \meta{long} and \meta{short} arguments may be the plural form. +%The \meta{long} argument may also be the first letter uppercase form. +% \begin{macrocode} +\newcommand*{\glsxtrshorthyphenlong}[4]{% +% \end{macrocode} +% Grouping is needed to localise the redefinitions. +% \begin{macrocode} + {% +% \end{macrocode} +% If \meta{insert} starts with a hyphen, redefine \cs{glsxtrwordsep} +% to a hyphen. The inserted material is also inserted into the +% parenthetical part. (The inserted material is grouped as a +% precautionary measure.) +% \begin{macrocode} + \glsxtrifhyphenstart{#4}{\def\glsxtrwordsep{-}}{}% + \glsfirstabbrvhyphenfont{#2\ifglsxtrinsertinside{#4}\fi}% + \ifglsxtrinsertinside\else{#4}\fi + \glsxtrfullsep{#1}% + \glsxtrparen{\glsfirstlonghyphenfont{#3\ifglsxtrinsertinside{#4}\fi}% + \ifglsxtrinsertinside\else{#4}\fi}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{short-hyphen-long-hyphen} +%\changes{1.17}{2017-08-09}{new} +%Designed for use with the \catattr{markwords} attribute. +% \begin{macrocode} +\newabbreviationstyle{short-hyphen-long-hyphen}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvhyphenfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongpltok}}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\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}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrhyphensuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +% \end{macrocode} +% The first use full form and the inline full form are the same for +% this style. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshorthyphenlong{##1}{\glsaccessshort{##1}}{\glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshorthyphenlong{##1}% + {\glsaccessshortpl{##1}}{\glsaccesslongpl{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrshorthyphenlong{##1}{\glsaccessshort{##1}}{\Glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrshorthyphenlong{##1}% + {\glsaccessshortpl{##1}}{\Glsaccesslongpl{##1}}{##2}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-hyphen-long-hyphen-desc} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{short-hyphen-long-hyphen} but the description +%must be supplied by the user. +% \begin{macrocode} +\newabbreviationstyle{short-hyphen-long-hyphen-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-hyphen-long-hyphen}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{macro}{\glsxtrshorthyphen} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrshorthyphen}\marg{short}\marg{label}\marg{insert} +%\end{definition} +%Used by \abbrstyle{short-hyphen-postlong-hyphen}. The \meta{insert} +%is check to determine if it starts with a hyphen but isn't used +%here as it's moved to the post-link hook. +% \begin{macrocode} +\newcommand*{\glsxtrshorthyphen}[3]{% +% \end{macrocode} +% Grouping is needed to localise the redefinitions. +% \begin{macrocode} + {% + \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% + \glsfirstabbrvhyphenfont{#1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrposthyphenlong} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrposthyphenlong}\marg{label}\marg{insert} +%\end{definition} +%Used in the post-link hook for the +%\abbrstyle{short-hyphen-postlong-hyphen} style. Much like +%\cs{glsxtrshorthyphenlong} but omits the \meta{short} part. This +%always uses the singular long form. +% \begin{macrocode} +\newcommand*{\glsxtrposthyphenlong}[2]{% + {% + \glsxtrifhyphenstart{#2}{\def\glsxtrwordsep{-}}{}% + \ifglsxtrinsertinside{\glsfirstabbrvhyphenfont{#2}}\else{#2}\fi + \glsxtrfullsep{#1}% + \glsxtrparen + {\glsfirstlonghyphenfont{\glsentrylong{#1}\ifglsxtrinsertinside{#2}\fi}% + \ifglsxtrinsertinside\else{#2}\fi + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{short-hyphen-postlong-hyphen} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{short-hyphen-long-hyphen} but shifts the insert +%and parenthetical material to the post-link hook. +% \begin{macrocode} +\newabbreviationstyle{short-hyphen-postlong-hyphen}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvhyphenfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrposthyphenlong{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% Put the insertion into the post-link: +% \begin{macrocode} + \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% + }% + }% + \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}{\glsxtrabbrvpluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +% \end{macrocode} +% Subsequent use needs to omit the insertion: +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\glsaccessshort{##1}}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\glsaccessshortpl{##1}}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\Glsaccessshort{##1}}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\Glsaccessshortpl{##1}}% + }% +% \end{macrocode} +% First use full form: +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshorthyphen{\glsaccessshort{##1}}{##1}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshorthyphen{\glsaccessshortpl{##1}}{##1}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrshorthyphen{\Glsaccessshort{##1}}{##1}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrshorthyphen{\Glsaccessshortpl{##1}}{##1}{##2}% + }% +% \end{macrocode} +% In-line format. Commands like \cs{glsxtrfull} set \cs{glsinsert} +% to empty. The entire link-text (provided by the following +% commands) is stored in \cs{glscustomtext}. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvhyphenfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvhyphenfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvhyphenfont{\Glsaccessshort{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvhyphenfont{\Glsaccessshortpl{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-hyphen-postlong-hyphen-desc} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{short-hyphen-postlong-hyphen} but the description +%must be supplied by the user. +% \begin{macrocode} +\newabbreviationstyle{short-hyphen-postlong-hyphen-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort},% + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrposthyphenlong{\glslabel}{\glsinsert}% + }% + {% +% \end{macrocode} +% Put the insertion into the post-link: +% \begin{macrocode} + \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-hyphen-postlong-hyphen}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\subsection{Predefined Styles (No Short on First Use)} +%These styles show only the long form on first use and only the +%short form on subsequent use. +%\begin{macro}{\glsabbrvonlyfont} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsabbrvonlyfont}{\glsabbrvdefaultfont}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstabbrvonlyfont} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsfirstabbrvonlyfont}{\glsabbrvonlyfont}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glslongonlyfont} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glslongonlyfont}{\glslongdefaultfont}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstlongonlyfont} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsfirstlongonlyfont}{\glslongonlyfont}% +% \end{macrocode} +%\end{macro} +% The default short form suffix: +%\begin{macro}{\glsxtronlysuffix} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtronlysuffix}{\glsxtrabbrvpluralsuffix} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-only-short-only} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newabbreviationstyle{long-only-short-only}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvonlyfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% + plural={\protect\glsabbrvonlyfont{\the\glsshortpltok}},% + description={\protect\glslongonlyfont{\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}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtronlysuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvonlyfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvonlyfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongonlyfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongonlyfont{##1}}% +% \end{macrocode} +% The first use full form doesn't show the short form. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +% \end{macrocode} +% The inline full form does show the short form. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvonlyfont{\Glsaccessshortpl{##1}}}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{macro}{\glsxtronlydescsort} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtronlydescsort}{\the\glslongtok} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtronlydescname} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtronlydescname}{% + \protect\glslongfont{\the\glslongtok}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-only-short-only-desc} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newabbreviationstyle{long-only-short-only-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtronlydescname}, + sort={\glsxtronlydescsort},% + first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% + text={\protect\glsabbrvonlyfont{\the\glsshorttok}},% + plural={\protect\glsabbrvonlyfont{\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}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-only-short-only}% +} +% \end{macrocode} +%\end{abbrvstyle} +% %\section{Using Entries in Headings} % % There are four main problems with using entries in sectioning @@ -15372,7 +18664,7 @@ Dickimaw Books\\ % First identify package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2017/06/15 v1.16 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2017/08/09 v1.17 (NLCT)] % \end{macrocode} % Provide package options to automatically load required predefined % styles. The simplest method is to just test for the existence of |