diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-15 21:47:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-15 21:47:33 +0000 |
commit | 9e987d284eb0915a995e129c61df7c94146b5007 (patch) | |
tree | 5f10da256063d1d0d96d5124264cd7c38d4a5c79 /Master/texmf-dist/tex/latex/glossaries-extra | |
parent | 0f37ab813b7b69885fa8c19dde8c51fdb629eff5 (diff) |
glossaries-extra (15jun17)
git-svn-id: svn://tug.org/texlive/trunk@44608 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries-extra')
3 files changed, 396 insertions, 49 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/example-glossaries-xr.tex b/Master/texmf-dist/tex/latex/glossaries-extra/example-glossaries-xr.tex new file mode 100644 index 00000000000..a2f10a7f858 --- /dev/null +++ b/Master/texmf-dist/tex/latex/glossaries-extra/example-glossaries-xr.tex @@ -0,0 +1,178 @@ +%% +%% This is file `example-glossaries-xr.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% glossaries-extra.dtx (with options: `example-glossaries-xr.tex,package') +%% +%% glossaries-extra.dtx +%% Copyright 2017 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-stylemods.sty, example-glossaries-xr.tex. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% This file is part of the glossaries-extra bundle +% These are dummy glossary entries with cross-references for use in +% test documents. +\newglossaryentry{lorem}{name={lorem},description={ipsum}} + +\newglossaryentry{alias-lorem}{name={alias-lorem},description={ipsum}, + alias={lorem}} + +\newglossaryentry{dolor}{name={dolor},description={sit}} + +\newglossaryentry{amet}{name={amet},description={consectetuer}, + see={dolor}} + +\newglossaryentry{adipiscing}{name={adipiscing},description={elit}} + +\newglossaryentry{ut}{name={ut},description={purus}} + +\newglossaryentry{elit}{name={elit},description={vestibulum}, + seealso={adipiscing,ut}} + +\newglossaryentry{placerat}{name={placerat},description={ac}} + +\newglossaryentry{vitae}{name={vitae},description={felis}} + +\newglossaryentry{curabitur}{name={curabitur},description={gravida}} + +\newglossaryentry{mauris}{name={mauris},description={nam}} + +\newglossaryentry{arcu}{name={arcu},description={libero}, + seealso={placerat,vitae,curabitur}} + +\newglossaryentry{nonummy}{name={nonummy},description={eget}, + seealso={mauris}} + +\newglossaryentry{consectetuer}{name={consectetuer},description={id}, + parent={nonummy}} + +\newglossaryentry{vulputate}{name={vulputate},description={a magna}, + parent={nonummy}} + +\newglossaryentry{donec}{name={donec},description={vehicula}} + +\newglossaryentry{augue}{name={augue},description={eu neque}} + +\newglossaryentry{pellentesque}{name={pellentesque},description={habitant}, + see={augue}} + +\newglossaryentry{morbi}{name={morbi},description={tristique}} + +\newglossaryentry{senectus}{name={senectus},description={et netus}} + +\newglossaryentry{et}{name={et},description={malesuada}, + see={vulputate}} + +\newglossaryentry{fames}{name={fames},description={ac}} + +\newglossaryentry{turpis}{name={turpis},description={egestas}, + seealso={consectetuer}} + +\newglossaryentry{leo}{name={leo},description={cras}} + +\newglossaryentry{viverra}{name={viverra},description={metus}} + +\newglossaryentry{rhoncus}{name={rhoncus},description={sem}} + +\newglossaryentry{nulla}{name={nulla},description={et}} + +\newglossaryentry{lectus}{name={lectus},description={vestibulum}} + +\newglossaryentry{urna}{name={urna},description={fringilla}, + parent={lectus},see={nulla}} + +\newglossaryentry{ultrices}{name={ultrices},description={phasellus}, + parent={lectus}} + +\newglossaryentry{eu}{name={eu},description={tellus}, + parent={lectus}} + +\newglossaryentry{alias-eu}{name={alias-eu},description={tellus}, + alias={eu}} + +\newglossaryentry{sit}{name={sit},description={amet}} + +\newglossaryentry{tortor}{name={tortor},description={gravida}} + +\newglossaryentry{integer}{name={integer},description={sapien}} + +\newglossaryentry{est}{name={est},description={iaculis}} + +\newglossaryentry{in}{name={in},description={pretium}, + seealso={sit,tortor,est}} + +\newglossaryentry{quis}{name={quis},description={viverra}} + +\newglossaryentry{ac}{name={ac},description={nunc}} + +\newglossaryentry{praesent}{name={praesent},description={eget \gls{ac}}} + +\newglossaryentry{sem}{name={sem},description={vel leo +\glshyperlink{quis}}} + +\newglossaryentry{bibendum}{name={bibendum},description={ultrices}} + +\newglossaryentry{aenean}{name={aenean},description={faucibus}} + +\newglossaryentry{malesuada}{name={malesuada},description={eu}, + parent={aenean}} + +\newglossaryentry{pulvinar}{name={pulvinar},description={at}, + parent={aenean}} + +\newglossaryentry{mollis}{name={mollis},description={ac nulla}, + parent={aenean}} + +\newglossaryentry{auctor}{name={auctor},description={semper}, + parent={aenean}} + +\newglossaryentry{varius}{name={varius},description={orci}, + parent={aenean}} + +\newglossaryentry{eget}{name={eget},description={risus}} + +\newglossaryentry{duis}{name={duis},description={nibh}} + +\newglossaryentry{mi}{name={mi},description={congue}} + +\newglossaryentry{accumsan}{name={accumsan},description={eleifend}} + +\newglossaryentry{sagittis}{name={sagittis},description={quis}, + see={eget}} + +\newglossaryentry{diam}{name={diam},description={duis}} + +\newglossaryentry{orci}{name={orci},description={dignissim}, + seealso={diam}} +\endinput +%% +%% End of file `example-glossaries-xr.tex'. diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty index 3496cf21c37..a9863bf49a8 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-stylemods.sty. +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-stylemods.sty, example-glossaries-xr.tex. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2017/05/10 v1.15 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2017/06/15 v1.16 (NLCT)] \newcommand*{\@glsxtr@loadstyles}{} \DeclareOption*{% \IfFileExists{glossary-\CurrentOption.sty} diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty index 55a3a3b5af5..d6911ce06cc 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-stylemods.sty. +%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-stylemods.sty, example-glossaries-xr.tex. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2017/05/10 v1.15 (NLCT)] +\ProvidesPackage{glossaries-extra}[2017/06/15 v1.16 (NLCT)] \RequirePackage{xkeyval} \RequirePackage{etoolbox} \@ifpackageloaded{glossaries} @@ -136,12 +136,13 @@ \ifdefempty{\@glsxtr@thevalue}% {% \glsxtr@saveentrycounter + \let\@@do@@wrglossary\@glsxtr@dorecord }% {% \let\theglsentrycounter\@glsxtr@thevalue \def\theHglsentrycounter{\@glsxtr@theHvalue}% + \let\@@do@@wrglossary\@glsxtr@dorecordnodefer }% - \let\@@do@@wrglossary\@glsxtr@dorecord \glsxtr@@do@wrglossary{#2}% }% \fi @@ -153,6 +154,12 @@ {\@glslocref}}% \@glsxtr@counterrecordhook } +\newcommand*\@glsxtr@dorecordnodefer{% + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\@glslocref}}% + \@glsxtr@counterrecordhook +} \newcommand*{\@@glsxtr@recordcounter}{% \@glsxtr@noop@recordcounter } @@ -219,7 +226,6 @@ {% \ifcase\nr\relax \def\glsxtr@setup@record{% - \let\@glo@autosee\@glsxtr@org@gloautosee \renewcommand*{\@do@seeglossary}{\@glsxtr@org@doseeglossary}% \renewcommand*{\@glsxtr@record}[3]{}% \let\@@do@wrglossary\glsxtr@@do@wrglossary @@ -232,7 +238,7 @@ }% \or \def\glsxtr@setup@record{% - \ifdef\@glo@autosee{\let\@glo@autosee\relax}{}% + \@glsxtr@autoseeindexfalse \let\@do@seeglossary\@glsxtr@recordsee \let\@glsxtr@record\@@glsxtr@record \let\@@do@wrglossary\@gobble @@ -244,10 +250,10 @@ \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% \def\glsxtrsetaliasnoindex{}% + \ifdef\@gls@setupsort@none{\@gls@setupsort@none}{}% }% \or \def\glsxtr@setup@record{% - \let\@glo@autosee\@glsxtr@org@gloautosee \renewcommand*{\@do@seeglossary}{\@glsxtr@org@doseeglossary}% \let\@glsxtr@record\@@glsxtr@record \let\@@do@wrglossary\glsxtr@@do@wrglossary @@ -283,6 +289,9 @@ } \@glsxtrindexcrossrefsfalse \newcommand*{\@glsxtr@autoindexcrossrefs}{\@glsxtrindexcrossrefstrue} +\define@boolkey{glossaries-extra.sty}[@glsxtr@]{autoseeindex}[true]{% +} +\@glsxtr@autoseeindextrue \newcommand*{\GlossariesExtraWarning}[1]{\PackageWarning{glossaries-extra}{#1}} \newcommand*{\GlossariesExtraWarningNoLine}[1]{% \PackageWarningNoLine{glossaries-extra}{#1}} @@ -459,6 +468,24 @@ \@glsxtr@doaccsupp \let\@glsxtr@org@doseeglossary\@do@seeglossary \let\@glsxtr@org@gloautosee\@glo@autosee +\if@glsxtr@autoseeindex +\else + \ifdef\@glsxtr@org@gloautosee + {}% + {\PackageError{glossaries-extra}{`autoseeindex=false' package + option requires at least v4.30 of glossaries.sty}% + {You need to update the glossaries.sty package}% + } +\fi +\ifdef\@glo@autosee +{% + \renewcommand*{\@glo@autosee}{% + \if@glsxtr@autoseeindex\@glsxtr@org@gloautosee\fi}% +}% +{} +\renewcommand*{\gls@checkseeallowed}{% + \if@glsxtr@autoseeindex\@gls@see@noindex\fi +} \@glsxtr@abbreviationsdef \let\@glsxtr@abbreviationsdef\relax \@glsxtr@setupshortcuts @@ -663,19 +690,6 @@ \GlossariesExtraWarning{Glossary `#1' is not defined}% }% } -\glsaddstoragekey*{alias}{}{\glsxtralias} -\appto\@newglossaryentryposthook{% - \ifcsvoid{glo@\@glo@label @alias}{}% - {% - \ifdefvoid\@glo@see - {% - \edef\@do@glssee{\noexpand\glssee - {\@glo@label}{\csuse{glo@\@glo@label @alias}}}% - \@do@glssee - }% - {}% - }% -} \renewcommand*{\longnewglossaryentry}{% \@ifstar\@glsxtr@s@longnewglossaryentry\@glsxtr@longnewglossaryentry } @@ -913,7 +927,9 @@ {\csxdef{glo@\@glo@label @see}{}}% {% \csxdef{glo@\@glo@label @see}{\@glo@see}% - \@glsxtr@autoindexcrossrefs + \if@glsxtr@autoseeindex + \@glsxtr@autoindexcrossrefs + \fi }% } \appto\@gls@keymap{,{see}{see}} @@ -937,13 +953,132 @@ \newcommand*{\glsxtruseseeformat}[2]{% \glsseeformat[#1]{#2}{}% } +\newcommand*{\glsxtruseseealso}[1]{% + \glsdoifexists{#1}% + {% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@seealso}% + \ifdefempty\@glo@see + {}% + {% + \expandafter\glsxtruseseealsoformat\expandafter{\@glo@see}% + }% + }% +} +\newcommand*{\glsxtruseseealsoformat}[1]{% + \glsseeformat[\seealsoname]{#1}{}% +} +\newrobustcmd{\glsxtrseelist}[1]{% + \edef\@glo@tmp{\noexpand\glsseelist{#1}}\@glo@tmp +} +\providecommand{\seealsoname}{see also} +\ifdef\@xdycrossrefhook +{ + \appto\@xdycrossrefhook{% + \write\glswrite{(define-crossref-class \string"seealso\string" + :unverified )}% + \write\glswrite{(markup-crossref-list + :class \string"seealso\string"^^J\space\space\space + :open \string"\string\glsxtruseseealsoformat\glsopenbrace\string" + :close \string"\glsclosebrace\string")}% + } + \appto\@xdylocationclassorder{\space\string"seealso\string"} + \newrobustcmd*{\glsxtrindexseealso}[2]{% + \def\@gls@xref{#2}% + \@onelevel@sanitize\@gls@xref + \@gls@checkmkidxchars\@gls@xref + \gls@glossary{\csname glo@#1@type\endcsname}{% + (indexentry + :tkey (\csname glo@#1@index\endcsname) + :xref (\string"\@gls@xref\string") + :attr \string"seealso\string" + ) + }% + } +} +{ + \newrobustcmd*{\glsxtrindexseealso}{\glssee[\seealsoname]} +} +\ifdef\gls@set@xr@key +{ + \define@key{glossentry}{alias}{% + \gls@set@xr@key{alias}{\@glo@alias}{#1}% + } + \define@key{glossentry}{seealso}{% + \gls@set@xr@key{seealso}{\@glo@seealso}{#1}% + } + \appto\@gls@keymap{,{alias}{alias},{seealso}{seealso}} + \appto\@newglossaryentryprehook{\def\@glo@alias{}\def\@glo@seealso{}}% + \appto\@newglossaryentryposthook{% + \ifdefvoid\@glo@seealso + {\csxdef{glo@\@glo@label @seealso}{}}% + {% + \csxdef{glo@\@glo@label @seealso}{\@glo@seealso}% + \if@glsxtr@autoseeindex + \@glsxtr@autoindexcrossrefs + \fi + }% + \ifdefvoid\@glo@alias + {\csxdef{glo@\@glo@label @alias}{}}% + {% + \csxdef{glo@\@glo@label @alias}{\@glo@alias}% + }% + } + \newcommand*{\glsxtralias}[1]{\@gls@entry@field{#1}{alias}} + \newcommand*{\glsxtrseealsolabels}[1]{\@gls@entry@field{#1}{seealso}} + \appto\@glo@autoseehook{% + \ifdefvoid\@glo@alias + {% + \ifdefvoid\@glo@seealso + {}% + {% + \edef\@do@glssee{\noexpand\glsxtrindexseealso + {\@glo@label}{\@glo@seealso}}% + \@do@glssee + }% + }% + {% + \ifdefvoid\@glo@see + {% + \edef\@do@glssee{\noexpand\glssee{\@glo@label}{\@glo@alias}}% + \@do@glssee + }% + {}% + }% + }% +} +{ + \glsaddstoragekey*{alias}{}{\glsxtralias} + \glsaddstoragekey*{seealso}{}{\glsxtrseealsolabels} + \appto\@newglossaryentryposthook{% + \ifcsvoid{glo@\@glo@label @alias}% + {% + \ifcsvoid{glo@\@glo@label @seealso}% + {}% + {% + \edef\@do@glssee{\noexpand\glsxtrindexseealso + {\@glo@label}{\csuse{glo@\@glo@label @seealso}}}% + \@do@glssee + }% + }% + {% + \ifdefvoid\@glo@see + {% + \edef\@do@glssee{\noexpand\glssee + {\@glo@label}{\csuse{glo@\@glo@label @alias}}}% + \@do@glssee + }% + {}% + }% + } +} \AtEndDocument{\if@glsxtrindexcrossrefs\glsxtraddallcrossrefs\fi} \newcommand*{\glsxtraddallcrossrefs}{% \forallglossaries{\@glo@type}% {% \forglsentries[\@glo@type]{\@glo@label}% {% - \ifglsused{\@glo@label}{\@glsxtr@addunusedxrefs{\@glo@label}}{}% + \ifglsused{\@glo@label}% + {\expandafter\@glsxtr@addunusedxrefs\expandafter{\@glo@label}}{}% }% }% } @@ -954,6 +1089,12 @@ {% \expandafter\glsxtr@addunused\@glo@see\@end@glsxtr@addunused }% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@seealso}% + \ifdefvoid\@glo@see + {}% + {% + \expandafter\glsxtr@addunused\@glo@see\@end@glsxtr@addunused + }% } \newcommand*{\glsxtr@addunused}[1][]{% \@glsxtr@addunused @@ -965,7 +1106,7 @@ {% \glsadd[format=glsxtrunusedformat]{\@glsxtr@label}% \glsunset{\@glsxtr@label}% - \@glsxtr@addunusedxrefs{\@glsxtr@label}% + \expandafter\@glsxtr@addunusedxrefs\expandafter{\@glsxtr@label}% }% }% } @@ -3160,13 +3301,14 @@ type=\glsdefaulttype,\@end@glsxtr@gettype \def\@glo@sorttype{\@glo@default@sorttype}% }% - \ifglsautomake - \renewcommand*{\@gls@doautomake}{% - \@for\@gls@type:=\@glsxtr@reg@glosslist\do{% - \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}% - }% + \ifglsautomake + \renewcommand*{\@gls@doautomake}{% + \@for\@gls@type:=\@glsxtr@reg@glosslist\do{% + \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}% }% - \fi + }% + \fi + \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}% }% } \newcommand{\@glsxtr@orgprintglossary}[2]{% @@ -3308,9 +3450,13 @@ }% \newcommand*{\@glsxtr@idx@entrynumberlist}[1]{\glsentrynumberlist{#1}} \renewcommand*{\@gls@noidx@getgrouptitle}[2]{% - \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}% - \@onelevel@sanitize\@glsxtr@titlelabel - \ifcsundef{\@glsxtr@titlelabel}% + \protected@edef\@glsxtr@titlelabel{#1}% + \ifdefvoid\@glsxtr@titlelabel + {}% + {% + \protected@edef\@glsxtr@titlelabel{\csuse{glsxtr@grouptitle@#1}}% + }% + \ifdefvoid{\@glsxtr@titlelabel}% {% \DTLifint{#1}% {% @@ -3327,7 +3473,7 @@ }% }% {% - \letcs#2{\@glsxtr@titlelabel}% + \let#2\@glsxtr@titlelabel }% } \let\glsxtr@org@getgrouptitle\@gls@getgrouptitle @@ -3655,8 +3801,8 @@ \GlsXtrNoGlsWarningTail } \newcommand*{\glsxtrresourcefile}[2][]{% - \protected@write\@auxout{}{\string\glsxtr@resource{#1}{#2}}% \glsxtr@writefields + \protected@write\@auxout{}{\string\glsxtr@resource{#1}{#2}}% \let\@glsxtr@org@see@noindex\@gls@see@noindex \let\@gls@see@noindex\relax \IfFileExists{#2.glstex}% @@ -3689,6 +3835,16 @@ \newcommand*{\glsxtr@shortcutsval}[1]{} \newcommand*{\glsxtr@linkprefix}[1]{} \newcommand*{\glsxtr@writefields}{% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@fields}[1]{}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@resource}[2]{}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@pluralsuffixes}[4]{}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@shortcutsval}[1]{}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@linkprefix}[1]{}}% \protected@write\@auxout{}{\string\glsxtr@fields{\@gls@keymap}}% \ifdef\CurrentTrackedLanguageTag {% @@ -3766,22 +3922,30 @@ }% {% \key@ifundefined{glossentry}{group}% - {\let\@gls@getgrouptitle\@glsxtr@noidx@getgrouptitle}% + {\let\@gls@getgrouptitle\@gls@noidx@getgrouptitle}% {\let\@gls@getgrouptitle\@glsxtr@unsrt@getgrouptitle}% - \begin{theglossary}% - \glossaryheader - \glsresetentrylist \def\@gls@currentlettergroup{}% + \def\@glsxtr@doglossary{% + \begin{theglossary}% + \glossaryheader + \glsresetentrylist + }% \expandafter\@for\expandafter\glscurrententrylabel\expandafter :\expandafter=\csname glolist@\@glo@type\endcsname\do{% \ifdefempty{\glscurrententrylabel} {}% - {\printunsrtglossaryhandler\glscurrententrylabel}% + {\eappto\@glsxtr@doglossary{% + \noexpand\@printunsrt@glossary@handler{\glscurrententrylabel}}}% }% - \end{theglossary}% + \appto\@glsxtr@doglossary{\end{theglossary}}% + \@glsxtr@doglossary }% \glossarypostamble } +\newcommand{\@printunsrt@glossary@handler}[1]{% + \xdef\glscurrententrylabel{#1}% + \printunsrtglossaryhandler\glscurrententrylabel +} \newcommand{\printunsrtglossaryhandler}[1]{% \glsxtrunsrtdo{#1}% } @@ -3842,23 +4006,23 @@ }% }% {% - \letcs{\@gls@sort}{glo@\glsdetoklabel{#1}@sort}% \key@ifundefined{glossentry}{group}% {% + \letcs{\@gls@sort}{glo@\glsdetoklabel{#1}@sort}% \expandafter\glo@grabfirst\@gls@sort{}{}\@nil }% {% \protected@xdef\@glo@thislettergrp{% - \csname glo@\glsdetoklabel{#1}@group\endcsname}% + \csuse{glo@\glsdetoklabel{#1}@group}}% }% \ifdefequal{\@glo@thislettergrp}{\@gls@currentlettergroup}% {}% {% \ifdefempty{\@gls@currentlettergroup}{}{\glsgroupskip}% \expandafter\glsgroupheading\expandafter - {\csname glo@\glsdetoklabel{#1}@group\endcsname}% + {\@glo@thislettergrp}% }% - \let\@gls@currentlettergroup\@glo@thislettergrp + \global\let\@gls@currentlettergroup\@glo@thislettergrp \ifdefvoid{\@gls@location}% {% \ifdefvoid{\@gls@loclist} @@ -4560,7 +4724,7 @@ \newcommand*{\glsxtrpostnamehook}[1]{% \def\@glsnumberformat{glsnumberformat}% \glsxtrdoautoindexname{#1}{indexname}% - \csuse{glsxtrpostname\glscategory{\glscurrententrylabel}}% + \csuse{glsxtrpostname\glscategory{#1}}% } \newif\if@glsxtr@format@override \@glsxtr@format@overridefalse @@ -4596,17 +4760,22 @@ \ifdefstring{\@glsxtr@attrval}{true}% {}% {\eappto\@glo@name{\@glsxtr@autoindex@encap\@glsxtr@attrval}}% - \expandafter\index\expandafter{\@glo@name}% + \expandafter\glsxtrautoindex\expandafter{\@glo@name}% }% {}% } +\newcommand*{\glsxtrautoindex}{\index} \newcommand*{\@glsxtr@autoindex@setname}[1]{% - \def\@glo@name{\string\glsentryname{#1}}% - \glsletentryfield{\@glo@sort}{#1}{sort}% + \protected@edef\@glo@name{\glsxtrautoindexentry{#1}}% + \glsxtrautoindexassignsort{\@glo@sort}{#1}% \@gls@checkmkidxchars\@glo@sort \@glsxtr@autoindex@doextra@esc\@glo@sort \epreto\@glo@name{\@glo@sort\@glsxtr@autoindex@at}% } +\newcommand*{\glsxtrautoindexentry}[1]{\string\glsentryname{#1}} +\newcommand*{\glsxtrautoindexassignsort}[2]{% + \glsletentryfield{#1}{#2}{sort}% +} \newcommand*{\@glsxtr@autoindex@doextra@esc}[1]{% \ifx\@glsxtr@autoindex@esc\@gls@quotechar \else |