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 | 1542 |
1 files changed, 1479 insertions, 63 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 4356869f109..890b246d395 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx @@ -4,11 +4,11 @@ % -section "chapter" % -src "glossaries-extra.sty\Z=>glossaries-extra.sty" % -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty" -% -doc "glossaries-extra-codedoc.tex" % -author "Nicola Talbot" % -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" +% -doc "glossaries-extra-codedoc.tex" % glossaries-extra -% Created on 2017/1/19 14:10 +% Created on 2017/2/3 20:32 %\fi %\iffalse %<*package> @@ -118,7 +118,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{10304} +\CheckSum{11390} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -154,13 +154,13 @@ styles (glossaries):>#1={\protect\ttfamily#1}|main}} \raggedright } -\title{glossaries-extra.sty v1.11: +\title{glossaries-extra.sty v1.12: documented code} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} -\date{2017-01-19} +\date{2017-02-03} \begin{document} \DocInput{glossaries-extra.dtx} @@ -205,7 +205,7 @@ Dickimaw Books\\ %\section{Package Initialisation and Options} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2017/01/19 v1.11 (NLCT)] +\ProvidesPackage{glossaries-extra}[2017/02/03 v1.12 (NLCT)] % \end{macrocode} % Requires \sty{xkeyval} to define package options. % \begin{macrocode} @@ -425,14 +425,45 @@ Dickimaw Books\\ \protected@write\@auxout{}{\string\glsxtr@record {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% {\@glslocref}}% + \@glsxtr@counterrecordhook } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtr@record} -%\changes{1.08}{2016-12-13}{new} +%\begin{macro}{\@@glsxtr@recordcounter} +%\changes{1.12}{2017-02-03}{new} % \begin{macrocode} -\newcommand*{\glsxtr@record}[5]{} +\newcommand*{\@@glsxtr@recordcounter}{% + \@glsxtr@noop@recordcounter +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@noop@recordcounter} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@noop@recordcounter}[1]{% + \PackageError{glossaries-extra}{\string\GlsXtrRecordCounter\space + requires record=only or record=alsoindex package option}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@op@recordcounter} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@op@recordcounter}[1]{% + \eappto\@glsxtr@counterrecordhook{\noexpand\@glsxtr@docounterrecord{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\printunsrtglossaryunit} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\printunsrtglossaryunit}{% + \print@noop@unsrtglossaryunit +} % \end{macrocode} %\end{macro} % @@ -525,6 +556,8 @@ Dickimaw Books\\ \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter \let\glsxtrundefaction\@glsxtr@err@undefaction \let\glsxtr@warnonexistsordo\@gobble + \let\@@glsxtr@recordcounter\@glsxtr@noop@recordcounter + \def\printunsrtglossaryunit{\print@noop@unsrtglossaryunit}% }% \or % \end{macrocode} @@ -537,6 +570,9 @@ Dickimaw Books\\ \let\glsxtrundefaction\@glsxtr@warn@undefaction \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo \glsxtr@addloclistfield + \renewcommand*{\@glsxtr@autoindexcrossrefs}{}% + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% }% \or % \end{macrocode} @@ -549,6 +585,8 @@ Dickimaw Books\\ \let\glsxtrundefaction\@glsxtr@warn@undefaction \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo \glsxtr@addloclistfield + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% }% \fi } @@ -666,6 +704,16 @@ Dickimaw Books\\ } % \end{macrocode} % +%\begin{option}{postdot} +%Shortcut for \pkgopt[false]{nopostdot} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\@glsxtr@declareoption{postdot}{% + \glsxtr@dooption{nopostdot=false}% +} +% \end{macrocode} +%\end{option} +% %\begin{macro}{\glsxtrabbrvtype} % Glossary type for abbreviations. % \begin{macrocode} @@ -1067,7 +1115,7 @@ Dickimaw Books\\ %\changes{0.4}{2015-12-03}{new} % \begin{macrocode} \newcommand{\glsxtrifemptyglossary}[3]{% - \ifglossaryexists{#1}% + \ifcsdef{glolist@#1}% {% \ifcsstring{glolist@#1}{,}{#2}{#3}% }% @@ -1079,6 +1127,368 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrifkeydefined} +%\changes{1.12}{2017-02-03}{new} +%Tests if the key given in the first argument has been defined. +% \begin{macrocode} +\newcommand*{\glsxtrifkeydefined}[3]{% + \key@ifundefined{glossentry}{#1}{#3}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrprovidestoragekey} +%\changes{1.12}{2017-02-03}{new} +%Like \cs{glsaddstoragekey} but does nothing if the key has already +%been defined. +% \begin{macrocode} +\newcommand*{\glsxtrprovidestoragekey}{% + \@ifstar\@sglsxtr@provide@storagekey\@glsxtr@provide@storagekey +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@provide@storagekey} +%\changes{1.12}{2017-02-03}{new} +%Unstarred version. +% \begin{macrocode} +\newcommand*{\@glsxtr@provide@storagekey}[3]{% + \key@ifundefined{glossentry}{#1}% + {% + \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}% + \appto\@gls@keymap{,{#1}{#1}}% + \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}% + \appto\@newglossaryentryposthook{% + \letcs{\@glo@tmp}{@glo@#1}% + \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}% + }% +% \end{macrocode} +%Allow the user to omit the user level command if they only +%intended fetching the value with \cs{glsxtrusefield} +% \begin{macrocode} + \ifblank{#3} + {}% + {% + \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + }% + }% + {% +% \end{macrocode} +%Provide the no-link command if not already defined. +% \begin{macrocode} + \ifblank{#3} + {}% + {% + \providecommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\s@glsxtr@provide@storagekey} +%\changes{1.12}{2017-02-03}{new} +%Starred version. +% \begin{macrocode} +\newcommand*{\s@glsxtr@provide@storagekey}[1]{% + \key@ifundefined{glossentry}{#1}% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname gls@assign@#1@field\endcsname}[2]{% + \@@gls@expand@field{##1}{#1}{##2}% + }% + }% + {}% + \@glsxtr@provide@addstoragekey{#1}% +} +% \end{macrocode} +%\end{macro} +% +%The name of a text-block control sequence can be stored in a +%field (given by \cs{GlsXtrFmtField}). This command can then be used +%with \cs{glsxtrfmt}\oarg{options}\marg{label}\marg{text} which +%effectively does +%\cs{glslink}\oarg{options}\marg{label}\{\meta{cs}\marg{text}\} +%If the field hasn't been set for that entry just \meta{text} is +%done. +% +%\begin{macro}{\GlsXtrFmtField} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\GlsXtrFmtField}{useri} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrFmtDefaultOptions} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\GlsXtrFmtDefaultOptions}{noindex} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfmt} +%\changes{1.12}{2017-02-03}{new} +%The post-link hook isn't done. +% \begin{macrocode} +\newrobustcmd*{\glsxtrfmt}[3][]{% + \glsdoifexistsordo{#2}% + {% + \ifglshasfield{\GlsXtrFmtField}{#2}% + {% + \let\do@gls@link@checkfirsthyper\relax + \expandafter\@gls@link\expandafter[\GlsXtrFmtDefaultOptions,#1]{#2}% + {\csuse{\glscurrentfieldvalue}{#3}}% + }% + {#3}% + }% + {#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrentryfmt} +%\changes{1.12}{2017-02-03}{new} +%No link or indexing. +% \begin{macrocode} +\ifdef\texorpdfstring +{ + \newcommand*{\glsxtrentryfmt}[2]{% + \texorpdfstring{\@glsxtrentryfmt{#1}{#2}}{#2}% + } +} +{ + \newcommand*{\glsxtrentryfmt}{\@glsxtrentryfmt} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrentryfmt} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newrobustcmd*{\@glsxtrentryfmt}[2]{% + \glsdoifexistsordo + {% + \ifglshasfield{\GlsXtrFmtField}{#1}% + {% + \csuse{\glscurrentfieldvalue}{#2}% + }% + {#2}% + }% + {#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldlistadd} +%\changes{1.12}{2017-02-03}{new} +%If a field stores an etoolbox internal list (e.g. +%\gloskey{loclist}) then this macro provides a convenient +%way of adding to the list via etoolbox's \cs{listcsadd}. +%The first argument is the entry's label, the second is the field +%label and the third is the element to add to the list. +% \begin{macrocode} +\newcommand*{\glsxtrfieldlistadd}[3]{% + \listcsadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldlistgadd} +%\changes{1.12}{2017-02-03}{new} +%Similarly but uses \cs{listcsgadd}. +% \begin{macrocode} +\newcommand*{\glsxtrfieldlistgadd}[3]{% + \listcsgadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldlisteadd} +%\changes{1.12}{2017-02-03}{new} +%Similarly but uses \cs{listcseadd}. +% \begin{macrocode} +\newcommand*{\glsxtrfieldlisteadd}[3]{% + \listcseadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldlistxadd} +%Similarly but uses \cs{listcsxadd}. +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfieldlistxadd}[3]{% + \listcsxadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%Now provide commands to iterate over these lists. +%\begin{macro}{\glsxtrfielddolistloop} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfielddolistloop}[2]{% + \dolistcsloop{glo@\glsdetoklabel{#1}@#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldforlistloop} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrfieldforlistloop}[3]{% + \forlistcsloop{glo@\glsdetoklabel{#1}@#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%List element tests: +%\begin{macro}{\glsxtrfieldifinlist} +%\changes{1.12}{2017-02-03}{new} +%First argument label, second argument field, third argument item, +%fourth true part and fifth false part. +% \begin{macrocode} +\newcommand*{\glsxtrfieldifinlist}[5]{% + \ifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfieldxifinlist} +%\changes{1.12}{2017-02-03}{new} +%Expands item. +% \begin{macrocode} +\newcommand*{\glsxtrfieldxifinlist}[5]{% + \xifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrusefield} +%\changes{1.12}{2017-02-03}{new} +%Provide a user-level alternative to \cs{@gls@entry@field}. +%The first argument is the entry label. The second argument is the +%field label. +% \begin{macrocode} +\newcommand*{\glsxtrusefield}[2]{% + \@gls@entry@field{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrusefield} +%\changes{1.12}{2017-02-03}{new} +%Provide a user-level alternative to \cs{@Gls@entry@field}. +% \begin{macrocode} +\newcommand*{\Glsxtrusefield}[2]{% + \@gls@entry@field{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdeffield} +%\changes{1.12}{2017-02-03}{new} +%Just use \cs{csdef} to provide a field value for the given entry. +% \begin{macrocode} +\newcommand*{\glsxtrdeffield}[2]{\csdef{glo@\glsdetoklabel{#1}@#2}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtredeffield} +%\changes{1.12}{2017-02-03}{new} +%Just use \cs{csedef} to provide a field value for the given entry. +% \begin{macrocode} +\newcommand*{\glsxtredeffield}[2]{\csedef{glo@\glsdetoklabel{#1}@#2}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrsetfieldifexists} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrsetfieldifexists}[3]{\glsdoifexists{#1}{#3}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetField} +%\changes{1.12}{2017-02-03}{new} +%Allow the user to set a field. First argument entry label, second +%argument field label, third argument value. +% \begin{macrocode} +\newrobustcmd*{\GlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrLetField} +%\changes{1.12}{2017-02-03}{new} +%Uses \cs{cslet} instead. Third argument should be a macro. +% \begin{macrocode} +\newrobustcmd*{\GlstrLetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\cslet{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\csGlsXtrLetField} +%\changes{1.12}{2017-02-03}{new} +%Uses \cs{csletcs} instead. Third argument should be a control +%sequence name. +% \begin{macrocode} +\newrobustcmd*{\csGlsXtrLetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csletcs{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrLetFieldToField} +%\changes{1.12}{2017-02-03}{new} +%Sets the field for one entry to the field for another entry. +%Third argument should be the other entry +%and the fourth argument that other field label. +% \begin{macrocode} +\newrobustcmd*{\GlsXtrLetFieldToField}[4]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csletcs{glo@\glsdetoklabel{#1}@#2}{glo@\glsdetoklabel{#3}@#4}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\gGlsXtrSetField} +%\changes{1.12}{2017-02-03}{new} +%Allow the user to set a field. First argument entry label, second +%argument field label, third argument value. +% \begin{macrocode} +\newrobustcmd*{\gGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csgdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\xGlsXtrSetField} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newrobustcmd*{\xGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\protected@csxdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\eGlsXtrSetField} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newrobustcmd*{\eGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\protected@csedef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrpageref} % Like \cs{glsrefentry} but references the page number instead (if % entry counting is on). @@ -1095,49 +1505,343 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\apptoglossarypreamble} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\apptoglossarypreamble}[2][\glsdefaulttype]{% + \ifcsdef{glolist@#1}% + {% + \ifcsundef{@glossarypreamble@#1}% + {\csdef{@glossarypreamble@#1}{}}% + {}% + \csappto{@glossarypreamble@#1}{#2}% + }% + {% + \GlossariesExtraWarning{Glossary `#1' is not defined}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\pretoglossarypreamble} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\preglossarypreamble}[2][\glsdefaulttype]{% + \ifcsdef{glolist@#1}% + {% + \ifcsundef{@glossarypreamble@#1}% + {\csdef{@glossarypreamble@#1}{}}% + {}% + \cspreto{@glossarypreamble@#1}{#2}% + }% + {% + \GlossariesExtraWarning{Glossary `#1' is not defined}% + }% +} +% \end{macrocode} +%\end{macro} +% %\section{Modifications to Commands Provided by \styfmt{glossaries}} % Some of the commands provided by \styfmt{glossaries} are modified % to take into account new options or to change default behaviour. +%\begin{macro}{\glsxtralias} +%\changes{1.12}{2017-02-03}{new} +%Provide a key to allow aliases to be defined. The key should +%be set to the label of the synonymous entry. +% \begin{macrocode} +\glsaddstoragekey*{alias}{}{\glsxtralias} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@newglossaryentryposthook} +%\changes{1.12}{2017-02-03}{added check for alias key} +%Append to the hook to check for the \gloskey{alias} key. +% \begin{macrocode} +\appto\@newglossaryentryposthook{% + \ifcsvoid{glo@\@glo@label @alias}{}% + {% +% \end{macrocode} +%Add cross-reference if see key hasn't been used. +% \begin{macrocode} + \ifdefvoid\@glo@see + {% + \edef\@do@glssee{\noexpand\glssee + {\@glo@label}{\csuse{glo@\@glo@label @alias}}}% + \@do@glssee + }% + {}% + }% +} +% \end{macrocode} +%\end{macro} +% +%Provide a starred version of \cs{longnewglossaryentry} that doesn't +%automatically insert \verb|\leavevmode\unskip\nopostdesc| at the +%end of the description. The unstarred version is modified to use +%\cs{glsxtrpostlongdescription} instead. +% +%\begin{macro}{\longnewglossaryentry} +%\changes{1.12}{2017-02-03}{added starred version} +% \begin{macrocode} +\renewcommand*{\longnewglossaryentry}{% + \@ifstar\@glsxtr@s@longnewglossaryentry\@glsxtr@longnewglossaryentry +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@s@longnewglossaryentry} +%\changes{1.12}{2017-02-03}{new} +%Starred version. +% \begin{macrocode} +\newcommand{\@glsxtr@s@longnewglossaryentry}[3]{% + \glsdoifnoexists{#1}% + {% + \bgroup + \let\@org@newglossaryentryprehook\@newglossaryentryprehook + \long\def\@newglossaryentryprehook{% + \long\def\@glo@desc{#3}% + \@org@newglossaryentryprehook + }% + \renewcommand*{\gls@assign@desc}[1]{% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}% + } + \gls@defglossaryentry{#1}{#2}% + \egroup + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@longnewglossaryentry} +%\changes{1.12}{2017-02-03}{new} +%Unstarred version. +% \begin{macrocode} +\newcommand{\@glsxtr@longnewglossaryentry}[3]{% + \glsdoifnoexists{#1}% + {% + \bgroup + \let\@org@newglossaryentryprehook\@newglossaryentryprehook + \long\def\@newglossaryentryprehook{% + \long\def\@glo@desc{#3\glsxtrpostlongdescription}% + \@org@newglossaryentryprehook + }% + \renewcommand*{\gls@assign@desc}[1]{% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% +% \end{macrocode} +%The following is different from the base \sty{glossaries.sty}: +% \begin{macrocode} + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}% + } + \gls@defglossaryentry{#1}{#2}% + \egroup + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrpostlongdescription} +%\changes{1.12}{2017-02-03}{new} +%Hook at the end of the description when using the unstarred +%\cs{longnewglossaryentry}. +% \begin{macrocode} +\newcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip\nopostdesc} +% \end{macrocode} +%\end{macro} % %Provide a starred version of \cs{newignoredglossary} that doesn't %add the glossary to the nohyperlist list. % +%\begin{macro}{\newignoredglossary} +%\changes{1.11}{2017-01-19}{added starred version} +%Redefine to check for star. +% \begin{macrocode} +\renewcommand{\newignoredglossary}{% + \@ifstar\glsxtr@s@newignoredglossary\glsxtr@org@newignoredglossary +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtr@org@newignoredglossary} -%Save the original definition. +%The original definition is patched to check for existence. %\changes{1.11}{2017-01-19}{new} +%\changes{1.12}{2017-02-03}{Added check for existence} % \begin{macrocode} -\let\glsxtr@org@newignoredglossary\newignoredglossary +\newcommand*{\glsxtr@org@newignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + }% + {% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \eappto\@gls@nohyperlist{,#1}% + }% + }% +} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsxtr@s@newignoredglossary} %Starred form. %\changes{1.11}{2017-01-19}{new} +%\changes{1.12}{2017-02-03}{Added check for existence} % \begin{macrocode} \newcommand*{\glsxtr@s@newignoredglossary}[1]{% - \ifdefempty\@ignored@glossaries + \ifcsdef{glolist@#1} {% - \edef\@ignored@glossaries{#1}% + \glsxtrundefaction{Glossary type `#1' already exists}{}% }% {% - \eappto\@ignored@glossaries{,#1}% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% }% - \csgdef{glolist@#1}{,}% - \ifcsundef{gls@#1@entryfmt}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glssettoctitle} +%\changes{1.12}{2017-02-03}{added patch} +%Ignored glossaries don't have an associated title, so modify +%\cs{glssettoctitle} to check for it to prevent an undefined +%command written to the toc file. +% \begin{macrocode} +\glsifusetranslator +{% + \renewcommand*{\glssettoctitle}[1]{% + \ifcsdef{gls@tr@set@#1@toctitle}% + {% + \csuse{gls@tr@set@#1@toctitle}% + }% + {% + \ifcsdef{@glotype@#1@title}% + {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}% + {\def\glossarytoctitle{\glossarytitle}}% + }% + }% +} +{ + \renewcommand*{\glssettoctitle}[1]{% + \ifcsdef{@glotype@#1@title}% + {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}% + {\def\glossarytoctitle{\glossarytitle}}% + } +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\provideignoredglossary} +%\changes{1.12}{2017-02-03}{new} +%As above but won't do anything if the glossary already exists. +% \begin{macrocode} +\newcommand{\provideignoredglossary}{% + \@ifstar\glsxtr@s@provideignoredglossary\glsxtr@provideignoredglossary +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@provideignoredglossary} +%\changes{1.12}{2017-02-03}{new} +%Unstarred version. +% \begin{macrocode} +\newcommand*{\glsxtr@provideignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {}% {% - \defglsentryfmt[#1]{\glsentryfmt}% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \eappto\@gls@nohyperlist{,#1}% + }% }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@s@provideignoredglossary} +%Starred form. +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@s@provideignoredglossary}[1]{% + \ifcsdef{glolist@#1} {}% + {% + \ifdefempty\@ignored@glossaries + {% + \edef\@ignored@glossaries{#1}% + }% + {% + \eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\newignoredglossary} -%\changes{1.11}{2017-01-19}{added starred version} -%Redefine to check for star. +%\begin{macro}{\glsxtrcopytoglossary} +%Adds an entry label to another glossary list. First argument is +%entry label. Second argument is glossary label. +%\changes{1.12}{2017-02-03}{new} % \begin{macrocode} -\renewcommand{\newignoredglossary}{% - \@ifstar\glsxtr@s@newignoredglossary\glsxtr@org@newignoredglossary +\newcommand*{\glsxtrcopytoglossary}[2]{% + \glsdoifexists{#1}% + {% + \ifcsdef{glolist@#2} + {% + \cseappto{glolist@#2}{#1,}% + }% + {% + \glsxtrundefaction{Glossary type `#2' doesn't exist}{}% + }% + }% } % \end{macrocode} %\end{macro} @@ -3272,6 +3976,7 @@ Dickimaw Books\\ { \renewcommand*{\@gls@setdefault@glslink@opts}{% \KV@glslink@noindexfalse + \@glsxtrsetaliasnoindex } } { @@ -3281,18 +3986,85 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\@gls@setdefault@glslink@opts}{% \KV@glslink@noindexfalse + \@glsxtrsetaliasnoindex } \preto\do@glsdisablehyperinlist{\@gls@setdefault@glslink@opts} } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrsetaliasnoindex} +%\changes{1.12}{2017-02-03}{new} +%Allow user to hook into the alias noindex setting. +%Default behaviour switches off indexing for aliases. +% \begin{macrocode} +\newcommand*{\glsxtrsetaliasnoindex}{% + \KV@glslink@noindextrue +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrsetaliasnoindex} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\@glsxtrsetaliasnoindex}{% + \ifglshasfield{alias}{\glslabel}% + {% + \let\glsxtrindexaliased\@glsxtrindexaliased + \glsxtrsetaliasnoindex + \let\glsxtrindexaliased\@no@glsxtrindexaliased + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrindexaliased} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\@glsxtrindexaliased}{% + \ifKV@glslink@noindex + \else + \begingroup + \def\@glsnumberformat{glsnumberformat}% + \edef\@gls@counter{\csname glo@\glsdetoklabel{\glslabel}@counter\endcsname}% + \glsxtr@saveentrycounter + \@@do@wrglossary{\glsxtralias{\glslabel}}% + \endgroup + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@no@glsxtrindexaliased} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\@no@glsxtrindexaliased}{% + \PackageError{glossaries-extra}{\string\glsxtrindexaliased\space + not permitted outside definition of \string\glsxtrsetaliasnoindex}% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrindexaliased} +%\changes{1.12}{2017-02-03}{new} +%Provide a command to redirect alias indexing, but only allow it to +%be used within \cs{glsxtrsetaliasnoindex}. +% \begin{macrocode} +\let\glsxtrindexaliased\@no@glsxtrindexaliased +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsXtrSetDefaultGlsOpts} %\changes{0.5.4}{2015-12-15}{new} % Set the default options for \cs{glslink} etc. % \begin{macrocode} \newcommand*{\GlsXtrSetDefaultGlsOpts}[1]{% - \renewcommand*{\@gls@setdefault@glslink@opts}{\setkeys{glslink}{#1}}% + \renewcommand*{\@gls@setdefault@glslink@opts}{% + \setkeys{glslink}{#1}% + \@glsxtrsetaliasnoindex + }% } % \end{macrocode} %\end{macro} @@ -3463,14 +4235,28 @@ Dickimaw Books\\ }% }% {% - \hyperlink{#1}{{\glsxtrprotectlinks#2}}% +% \end{macrocode} +%Check for alias. +%\changes{1.12}{2017-02-03}{added check for alias field} +% \begin{macrocode} + \glsfieldfetch{\glslabel}{alias}{\gloaliaslabel}% + \ifdefvoid\gloaliaslabel + {% + \hyperlink{#1}{{\glsxtrprotectlinks#2}}% + }% + {% +% \end{macrocode} +%Redirect link to the alias target. +% \begin{macrocode} + \hyperlink + {\glolinkprefix\glsdetoklabel{\gloaliaslabel}}% + {{\glsxtrprotectlinks#2}}% + }% }% } % \end{macrocode} %\end{macro} % -% -% %\begin{macro}{\glsdisablehyper} %\changes{0.5.4}{2015-12-15}{added} % Redefine in case we have an old version of \styfmt{glossaries}. @@ -5070,7 +5856,7 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\MakeAcronymsAbbreviations}{% \renewcommand*{\newacronym}[4][]{% - \newabbreviation[type=\acronymtype,category=acronym,##1]{##2}{##3}{##4}% + \glsxtr@newabbreviation{type=\acronymtype,category=acronym,##1}{##2}{##3}{##4}% }% \renewcommand*{\firstacronymfont}[1]{\glsfirstabbrvfont{##1}}% \renewcommand*{\acronymfont}[1]{\glsabbrvfont{##1}}% @@ -5354,9 +6140,66 @@ Dickimaw Books\\ %to pick up the glossary type. % %\begin{macro}{\@glsxtr@orgprintglossary} -%Save original definition (also needed for the on-the-fly macro). -% \begin{macrocode} -\let\@glsxtr@orgprintglossary\@printglossary +%This no longer simply saves \cs{@printglossary} with \cs{let} is actually defined +%to check for the existence of the title, since ignored +%glossaries don't have a title assigned. (bib2gls writes +%\cs{provideignoredglossary} to the glstex file for some settings, +%so the glossary might not have been defined.) +%(This command is also used for on-the-fly setting.) +% \begin{macrocode} +\newcommand{\@glsxtr@orgprintglossary}[2]{% + \def\@glo@type{\glsdefaulttype}% +% \end{macrocode} +%Add check here. +% \begin{macrocode} + \def\glossarytitle{% + \ifcsdef{@glotype@\@glo@type @title}% + {\csuse{@glotype@\@glo@type @title}}% + {\glossaryname}}% + \def\glossarytoctitle{\glossarytitle}% + \let\org@glossarytitle\glossarytitle + \def\@glossarystyle{% + \ifx\@glossary@default@style\relax + \GlossariesWarning{No default glossary style provided \MessageBreak + for the glossary `\@glo@type'. \MessageBreak + Using deprecated fallback. \MessageBreak + To fix this set the style with \MessageBreak + \string\setglossarystyle\space or use the \MessageBreak + style key=value option}% + \fi + }% + \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% + \let\@org@glossaryentrynumbers\glossaryentrynumbers + \bgroup + \@printgloss@setsort + \setkeys{printgloss}{#1}% + \ifx\glossarytitle\org@glossarytitle + \else + \cslet{@glotype@\@glo@type @title}{\glossarytitle}% + \fi + \let\currentglossary\@glo@type + \let\org@glossaryentrynumbers\glossaryentrynumbers + \let\glsnonextpages\@glsnonextpages + \let\glsnextpages\@glsnextpages + \let\nopostdesc\@nopostdesc + \gls@dotoctitle + \@glossarystyle + \let\gls@org@glossaryentryfield\glossentry + \let\gls@org@glossarysubentryfield\subglossentry + \renewcommand{\glossentry}[1]{% + \xdef\glscurrententrylabel{\glsdetoklabel{##1}}% + \gls@org@glossaryentryfield{##1}% + }% + \renewcommand{\subglossentry}[2]{% + \xdef\glscurrententrylabel{\glsdetoklabel{##2}}% + \gls@org@glossarysubentryfield{##1}{##2}% + }% + \@gls@preglossaryhook + #2% + \egroup + \global\let\glossaryentrynumbers\@org@glossaryentrynumbers + \global\let\warn@noprintglossary\relax +} % \end{macrocode} %\end{macro} % @@ -5371,6 +6214,18 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%Add a key that switches off the entry targets: +%\changes{1.12}{2017-02-03}{added target key to printgloss family} +% \begin{macrocode} +\define@choicekey{printgloss}{target}[\val\nr]{true,false}[true]{% + \ifcase\nr + \let\@glstarget\glsdohypertarget + \else + \let\@glstarget\@secondoftwo + \fi +} +% \end{macrocode} +% %\begin{macro}{\glsxtr@makeglossaries} %For the benefit of \app{makeglossaries} %\changes{1.09}{2016-12-16}{new} @@ -5543,6 +6398,97 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsnoidxdisplayloc} +%\changes{1.12}{2017-02-03}{added redefinition} +%Patch to check for range formations. +% \begin{macrocode} +\renewcommand*{\glsnoidxdisplayloc}[4]{% + \setentrycounter[#1]{#2}% + \@glsxtr@display@loc#3\empty\end@glsxtr@display@loc{#4}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@display@loc} +%\changes{1.12}{2017-02-03}{new} +%Patch to check for range formations. +% \begin{macrocode} +\def\@glsxtr@display@loc#1#2\end@glsxtr@display@loc#3{% + \ifx#1(\relax + \glsxtrdisplaystartloc{#2}{#3}% + \else + \ifx#1)\relax + \glsxtrdisplayendloc{#2}{#3}% + \else + \glsxtrdisplaysingleloc{#1#2}{#3}% + \fi + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdisplaysingleloc} +%\changes{1.12}{2017-02-03}{new} +%Single location. +% \begin{macrocode} +\newcommand*{\glsxtrdisplaysingleloc}[2]{% + \csuse{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%By default the range identifiers are simply ignored. +%A custom list loop handler can be defined by the user +%to test for ranges by checking the definition of +%\cs{glsxtrlocrangefmt}. +% +%\begin{macro}{\glsxtrdisplaystartloc} +%\changes{1.12}{2017-02-03}{new} +%Start of a location range. +% \begin{macrocode} +\newcommand*{\glsxtrdisplaystartloc}[2]{% + \edef\glsxtrlocrangefmt{#1}% + \ifx\glsxtrlocrangefmt\empty + \def\glsxtrlocrangefmt{glsnumberformat}% + \fi + \expandafter\glsxtrdisplaysingleloc + \expandafter{\glsxtrlocrangefmt}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdisplayendloc} +%\changes{1.12}{2017-02-03}{new} +%End of a location range. +% \begin{macrocode} +\newcommand*{\glsxtrdisplayendloc}[2]{% + \ifdefstring{\glsxtrlocrangefmt}{#1}{}% + {\GlossariesExtraWarning{Mismatched end location range + (start=\glsxtrlocrangefmt, end=#1)}% + }% + \glsxtrdisplayendlochook{#1}{#2}% + \expandafter\glsxtrdisplaysingleloc + \expandafter{\glsxtrlocrangefmt}{#2}% + \def\glsxtrlocrangefmt{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdisplayendlochook} +%\changes{1.12}{2017-02-03}{new} +%Allow the user to hook into the end of range command. +% \begin{macrocode} +\newcommand*{\glsxtrdisplayendlochook}[2]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrlocrangefmt} +%\changes{1.12}{2017-02-03}{new} +%Current range format. Empty if not in a range. +% \begin{macrocode} +\newcommand*{\glsxtrlocrangefmt}{} +% \end{macrocode} +%\end{macro} +% % Give a bit of assistance to new users who are confused and don't % know how to read transcript messages. %\begin{macro}{\@print@glossary} @@ -5826,7 +6772,18 @@ Dickimaw Books\\ \glsxtr@writefields \let\@glsxtr@org@see@noindex\@gls@see@noindex \let\@gls@see@noindex\relax - \InputIfFileExists{#2.glstex}{}% + \IfFileExists{#2.glstex}% + {% +% \end{macrocode} +%Can't scope \cs{@input} so save and restore the category code of +%\texttt{@} to allow for internal commands in the location list. +%\changes{1.12}{2017-02-03}{added catcode change for @} +% \begin{macrocode} + \edef\@bibgls@restoreat{\noexpand\catcode\noexpand`\noexpand\@=\number\catcode`\@}% + \makeatletter + \@input{#2.glstex}% + \@bibgls@restoreat + }% {% \GlossariesExtraWarning{No file `#2.glstex'}% }% @@ -5836,20 +6793,25 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrresourcecount} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcount\glsxtrresourcecount +% \end{macrocode} +%\end{macro} %\begin{macro}{\GlsXtrLoadResources} %\changes{1.11}{2017-01-19}{new} +%\changes{1.12}{2017-02-03}{removed restriction on only one per document} %Short cut that uses \cs{glsxtrresourcefile} with \cs{jobname} as %the mandatory argument. % \begin{macrocode} \newcommand*{\GlsXtrLoadResources}[1][]{% - \glsxtrresourcefile[#1]{\jobname}% - \renewcommand*{\GlsXtrLoadResources}[1][]{% - \PackageError{glossaries-extra}% - {Only 1 \string\GlsXtrLoadResources\space permitted per - document. Use \string\glsxtrresourcefile\space for additional - resources}% - {}% - }% + \ifnum\glsxtrresourcecount=0\relax + \glsxtrresourcefile[#1]{\jobname}% + \else + \glsxtrresourcefile[#1]{\jobname-\the\glsxtrresourcecount}% + \fi + \advance\glsxtrresourcecount by 1\relax } % \end{macrocode} %\end{macro} @@ -5875,6 +6837,20 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtr@langtag} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@langtag}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@pluralsuffixes} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@pluralsuffixes}[4]{} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtr@shortcutsval} %\changes{1.11}{2017-01-19}{new} % \begin{macrocode} @@ -5896,6 +6872,22 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\glsxtr@writefields}{% \protected@write\@auxout{}{\string\glsxtr@fields{\@gls@keymap}}% +% \end{macrocode} +%If any languages have been loaded, the language tag will be +%available in \cs{CurrentTrackedLanguageTag} (provided by +%\sty{tracklang}). For multilingual +%documents, the required locale will have to be indicated in the +%"sort" key when using \cs{glsxtrresourcefile}. +% \begin{macrocode} + \ifdef\CurrentTrackedLanguageTag + {% + \protected@write\@auxout{}{% + \string\glsxtr@langtag{\CurrentTrackedLanguageTag}}% + }% + {}% + \protected@write\@auxout{}{\string\glsxtr@pluralsuffixes + {\glspluralsuffix}{\abbrvpluralsuffix}{\acrpluralsuffix}% + {\glsxtrabbrvpluralsuffix}}% \ifdef\inputencodingname {% \protected@write\@auxout{}{\string\glsxtr@texencoding{\inputencodingname}}% @@ -5911,18 +6903,98 @@ Dickimaw Books\\ {}% }% \protected@write\@auxout{}{\string\glsxtr@shortcutsval{\@glsxtr@shortcutsval}}% - \protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}% +% \end{macrocode} +%Prefix deferred until the beginning of the document in case it's +%redefined later in the preamble. This is picked up by bib2gls when +%the external option is used. +% \begin{macrocode} + \AtBeginDocument + {\protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}}% \let\glsxtr@writefields\relax } % \end{macrocode} %\end{macro} +% +%Allow locations specific to a particular counter to be recorded. +%\begin{macro}{\glsxtr@record} +%\changes{1.08}{2016-12-13}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@record}[5]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@counterrecord} +%\changes{1.12}{2017-02-03}{new} +%Aux file command. +% \begin{macrocode} +\newcommand*{\glsxtr@counterrecord}[3]{% + \glsxtrfieldlistgadd{#1}{record.#2}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@counterrecordhook} +%\changes{1.12}{2017-02-03}{new} +%Hook used by \cs{@glsxtr@dorecord}. +% \begin{macrocode} +\newcommand*{\@glsxtr@counterrecordhook}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrRecordCounter} +%\changes{1.12}{2017-02-03}{new} +%Activate recording for a particular counter (identified in the +%argument). +% \begin{macrocode} +\newcommand*{\GlsXtrRecordCounter}[1]{% + \@@glsxtr@recordcounter{#1}% +} +\@onlypreamble\GlsXtrRecordCounter +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@docounterrecord} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@docounterrecord}[1]{% + \protected@write\@auxout{}{\string\glsxtr@counterrecord + {\@gls@label}{#1}{\csuse{the#1}}}% +} +% \end{macrocode} +%\end{macro} +% +% %\begin{macro}{\printunsrtglossary} %\changes{1.08}{2016-12-13}{new} +%\changes{1.12}{2017-02-03}{added starred form} %Similar to \cs{printnoidxglossary} but it displays all entries %defined for the given glossary without sorting. % \begin{macrocode} -\newcommand*{\printunsrtglossary}[1][type=\glsdefaulttype]{% - \@printglossary{#1}{\@print@unsrt@glossary}% +\newcommand*{\printunsrtglossary}{% + \@ifstar\s@printunsrtglossary\@printunsrtglossary +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@printunsrtglossary} +%\changes{1.12}{2017-02-03}{new} +%Unstarred version. +% \begin{macrocode} +\newcommand*{\@printunsrtglossary}[1][]{% + \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\s@printunsrtglossary} +%\changes{1.12}{2017-02-03}{new} +%Starred version. +% \begin{macrocode} +\newcommand*{\s@printunsrtglossary}[2][]{% + \begingroup + #2% + \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}% + \endgroup } % \end{macrocode} %\end{macro} @@ -5963,7 +7035,7 @@ Dickimaw Books\\ :\expandafter=\csname glolist@\@glo@type\endcsname\do{% \ifdefempty{\glscurrententrylabel} {}% - {\@glsxtr@noidx@do\glscurrententrylabel}% + {\printunsrtglossaryhandler\glscurrententrylabel}% }% \end{theglossary}% }% @@ -5972,6 +7044,58 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\printunsrtglossaryhandler} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrunsrtdo{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\print@op@unsrtglossaryunit} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\print@op@unsrtglossaryunit}[2][]{% + \s@printunsrtglossary[type=\glsdefaulttype,#1]{% + \printunsrtglossaryunitsetup{#2}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\printunsrtglossaryunitsetup} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\printunsrtglossaryunitsetup}[1]{% + \renewcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrfieldxifinlist{##1}{record.#1}{\csuse{the#1}} + {\glsxtrunsrtdo{##1}}% + {}% + }% + \ifcsundef{theH#1}% + {% + \renewcommand*{\glolinkprefix}{record.#1.\csuse{the#1}.}% + }% + {% + \renewcommand*{\glolinkprefix}{record.#1.\csuse{theH#1}.}% + }% + \renewcommand*{\glossarysection}[2][]{}% + \appto\glossarypostamble{\glspar\medskip\glspar}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\print@noop@unsrtglossaryunit} +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand{\print@noop@unsrtglossaryunit}[2][]{% + \PackageError{glossaries-extra}{\string\printunsrtglossaryunit\space + requires the record=only or record=alsoindex package option}{}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@unsrt@getgrouptitle} %\changes{1.11}{2017-01-19}{new} % \begin{macrocode} @@ -5981,6 +7105,15 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrunsrtdo} +%\changes{1.12}{2017-02-03}{new} +%Provide a user-level call to \cs{@glsxtr@noidx@do} to make it +%easier to define a new handler. +% \begin{macrocode} +\newcommand{\glsxtrunsrtdo}{\@glsxtr@noidx@do} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@noidx@do} %\changes{1.11}{2017-01-19}{new} %Minor modification of \cs{@gls@noidx@do} to check for location @@ -8172,14 +9305,25 @@ Dickimaw Books\\ { \renewcommand*{\@gls@preglossaryhook}{% \@glsxtr@activate@initialtagging - \let\@glsxtr@org@postdescription\glspostdescription - \renewcommand*{\glspostdescription}{% - \ifglsentryexists{\glscurrententrylabel}% - {% - \glsxtrpostdescription - \@glsxtr@org@postdescription - }{}% +% \end{macrocode} +%\changes{1.12}{2017-02-03}{check for definition} +%Since the glossaries are automatically scoped, +%\cs{@glsxtr@org@postdescription} shouldn't already be defined, but +%check anyway just as a precautionary measure. +% \begin{macrocode} + \ifundef\@glsxtr@org@postdescription + {% + \let\@glsxtr@org@postdescription\glspostdescription + \renewcommand*{\glspostdescription}{% + \ifglsentryexists{\glscurrententrylabel}% + {% + \glsxtrpostdescription + \@glsxtr@org@postdescription + }% + {}% + }% }% + {}% % \end{macrocode} %\changes{1.07}{2016-08-15}{added \cs{glossxtrsetpopts}} %Enable the options used by \cs{@@glsxtrp}: @@ -8577,6 +9721,18 @@ Dickimaw Books\\ % Define a new generic abbreviation. % \begin{macrocode} \newcommand*{\newabbreviation}[4][]{% + \glsxtr@newabbreviation{#1}{#2}{#3}{#4}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@newabbreviation} +% Internal macro. (bib2gls has an option that needs to +% temporarily redefine \cs{newabbreviation}. This is just makes +% it easier to save and restore the original definition.) +%\changes{1.12}{2017-02-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@newabbreviation}[4]{% \glskeylisttok{#1}% \glslabeltok{#2}% \glsshorttok{#3}% @@ -8874,10 +10030,19 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrabbrvpluralsuffix} +% Default plural suffix. +%\changes{1.12}{2017-02-03}{new} +%Allow an alternative default suffix for abbreviations. +% \begin{macrocode} +\newcommand*{\glsxtrabbrvpluralsuffix}{\glspluralsuffix} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\abbrvpluralsuffix} % Default plural suffix. % \begin{macrocode} -\newcommand*{\abbrvpluralsuffix}{\glspluralsuffix} +\newcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} % @@ -9882,7 +11047,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10004,7 +11169,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10152,7 +11317,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% @@ -10275,7 +11440,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% @@ -10363,7 +11528,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10456,7 +11621,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10540,7 +11705,7 @@ Dickimaw Books\\ % In case the user wants to mix and match font styles, these are % redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% @@ -10651,7 +11816,7 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrscsuffix} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}} +\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}} % \end{macrocode} %\end{macro} % @@ -10931,7 +12096,7 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrsmsuffix} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newcommand*{\glsxtrsmsuffix}{\glspluralsuffix} +\newcommand*{\glsxtrsmsuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} % @@ -11684,7 +12849,7 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrusersuffix} %\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\newcommand*{\glsxtrusersuffix}{\glspluralsuffix} +\newcommand*{\glsxtrusersuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} % @@ -11755,6 +12920,257 @@ Dickimaw Books\\ % \end{macrocode} %\end{abbrvstyle} % +%\begin{abbrvstyle}{long-postshort-user} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{long-short-user} but defers the parenthetical +%matter to after the link. +% \begin{macrocode} +\newabbreviationstyle{long-postshort-user}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\protect\glslonguserfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +% \end{macrocode} +%First use full form: +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\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}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}{##1}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-postshort-user-desc} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{long-postshort-user} but the user supplies the +%description. +% \begin{macrocode} +\newabbreviationstyle{long-postshort-user-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtruserparen + {\protect\glsabbrvfont{\the\glsshorttok}}{\the\glslabeltok}}, + sort={\the\glslongtok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-postshort-user}% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-postlong-user} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{short-long-user} but defers the parenthetical +%matter to after the link. +% \begin{macrocode} +\newabbreviationstyle{short-postlong-user}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}},% + description={\protect\glslonguserfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentrylong{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +% \end{macrocode} +%First use full form: +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\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}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}{##1}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-postlong-user-desc} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{short-postlong-user} but leaves the user to specify +%the description. +% \begin{macrocode} +\newabbreviationstyle{short-postlong-user-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\protect\glsabbrvfont{\the\glsshorttok}% + \protect\glsxtruserparen + {\protect\glsfirstlongfont{\the\glslongpltok}}% + {\the\glslabeltok}}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}},% + plural={\protect\glsabbvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentrylong{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-postlong-user}% +} +% \end{macrocode} +%\end{abbrvstyle} +% %\begin{abbrvstyle}{long-short-user-desc} %\changes{1.04}{2016-05-02}{new} % \begin{macrocode} @@ -13127,7 +14543,7 @@ Dickimaw Books\\ % First identify package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2017/01/19 v1.11 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2017/02/03 v1.12 (NLCT)] % \end{macrocode} % Provide package options to automatically load required predefined % styles. The simplest method is to just test for the existence of |