From f8834f35084ceda8688cd138ef75fc19828c23f8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 29 Apr 2018 23:02:25 +0000 Subject: glossaries-extra (25apr18) git-svn-id: svn://tug.org/texlive/trunk@47494 c570f23f-e606-0410-a88d-b1316a301751 --- .../glossaries-extra/glossaries-extra-bib2gls.sty | 8 +- .../glossaries-extra-stylemods.sty | 2 +- .../latex/glossaries-extra/glossaries-extra.sty | 143 +++++++++++++++------ .../latex/glossaries-extra/glossary-bookindex.sty | 2 +- 4 files changed, 114 insertions(+), 41 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-bib2gls.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-bib2gls.sty index c6cb5b8ab6c..4264622979c 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-bib2gls.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-bib2gls.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-bib2gls}[2018/04/09 v1.29 (NLCT)] +\ProvidesPackage{glossaries-extra-bib2gls}[2018/04/25 v1.30 (NLCT)] \newcommand*{\glshex}{\string\u} \newcommand*{\glsxtrprovidecommand}{\providecommand} \newcommand*{\glsxtr@wrglossarylocation}[2]{#1} @@ -54,6 +54,12 @@ { \newcommand*{\GlsXtrIndexCounterLink}[2]{#1} } +\newcommand*{\GlsXtrDualField}{dual} +\newcommand*{\GlsXtrDualBackLink}[2]{% + \glsxtrifhasfield{\GlsXtrDualField}{#2}% + {\glshyperlink[#1]{\glscurrentfieldvalue}}% + {#2}% +} \newcommand*{\GlsXtrBibTeXEntryAliases}{% article=bibtexentry, book=bibtexentry, 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 c1d97383d9c..b2833673969 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 @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2018/04/09 v1.29 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2018/04/25 v1.30 (NLCT)] \newcommand*{\@glsxtr@loadstyles}{} \DeclareOption{all}{% \appto\@glsxtr@loadstyles{% 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 fcbd5394ca4..bedfc942b13 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2018/04/09 v1.29 (NLCT)] +\ProvidesPackage{glossaries-extra}[2018/04/25 v1.30 (NLCT)] \RequirePackage{xkeyval} \RequirePackage{etoolbox} \@ifpackageloaded{glossaries} @@ -162,7 +162,6 @@ \ifglsentryexists{#2}{}% {% \@@glsxtrwrglossmark - \glsxtr@inc@wrglossaryctr{#2}% \begingroup \edef\@gls@label{\glsdetoklabel{#2}}% \let\glslabel\@gls@label @@ -172,7 +171,10 @@ \let\@glsxtr@org@theHvalue\@glsxtr@theHvalue \let\@gls@counter\glscounter \@gls@setdefault@glslink@opts + \csuse{@glsxtr@#3@prekeys}% \setkeys{#3}{#1}% + \csuse{@glsxtr@#3@postkeys}% + \glsxtr@inc@wrglossaryctr{#2}% \ifKV@glslink@noindex \else \glswriteentry{#2}% @@ -201,6 +203,10 @@ \endgroup }% } +\newcommand{\@glsxtr@glslink@prekeys}{\glslinkpresetkeys} +\newcommand{\@glsxtr@glslink@postkeys}{\glslinkpostsetkeys} +\newcommand{\@glsxtr@glossadd@prekeys}{\glsaddpresetkeys} +\newcommand{\@glsxtr@glossadd@postkeys}{\glsaddpostsetkeys} \newcommand*\@glsxtr@dorecord{% \global\let\@glsrecordlocref\theglsentrycounter \let\@glsxtr@orgprefix\@glo@counterprefix @@ -212,17 +218,9 @@ }% \@do@gls@getcounterprefix \fi - \ifdefstring\@gls@counter{page}% - {% - \protected@write\@auxout{\let\@glsrecordlocref\relax}{\string\glsxtr@record - {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% - {\@glsrecordlocref}}% - }% - {% - \protected@write\@auxout{}{\string\glsxtr@record - {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% - {\@glsrecordlocref}}% - }% + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\@glsrecordlocref}}% \@glsxtr@counterrecordhook \let\@glo@counterprefix\@glsxtr@orgprefix } @@ -651,8 +649,12 @@ }% {}% \renewcommand*{\glsxtr@inc@wrglossaryctr}[1]{% - \refstepcounter{wrglossary}% - \label{wrglossary.\thewrglossary}% + \ifdefstring\@gls@counter{wrglossary}% + {% + \refstepcounter{wrglossary}% + \label{wrglossary.\thewrglossary}% + }% + {}% }% \renewcommand*{\GlsXtrInternalLocationHyperlink}[3]{% \ifdefstring\glsentrycounter{wrglossary}% @@ -662,7 +664,6 @@ {\glsxtrhyperlink{##1##2##3}{##3}}% }% } - \newcommand*{\@glsxtrwrglossmark}{} \newcommand*{\@@glsxtrwrglossmark}{} \AtBeginDocument{\renewcommand*{\@@glsxtrwrglossmark}{\@glsxtrwrglossmark}} @@ -1772,11 +1773,12 @@ {\glsxtrregularfont{\glsgenentryfmt}}% {% \ifglshasshort{\glslabel}% - {\glsxtrgenabbrvfmt}% + {\glsxtrabbreviationfont{\glsxtrgenabbrvfmt}}% {\glsxtrregularfont{\glsgenentryfmt}}% }% } \newcommand*{\glsxtrregularfont}[1]{#1} +\newcommand*{\glsxtrabbreviationfont}[1]{#1} \renewcommand{\@gls@field@link}[4][]{% \@glsxtr@record{#2}{#3}{glslink}% \glsdoifexists{#3}% @@ -1876,6 +1878,15 @@ \define@key{glslink}{theHvalue}{\def\@glsxtr@theHvalue{#1}} \define@boolkey{glslink}[glsxtr@]{hyperoutside}[true]{} \glsxtr@hyperoutsidetrue +\define@key{glslink}{textformat}{% + \ifcsdef{#1} + {% + \letcs{\@glsxtr@local@textformat}{#1}% + }% + {% + \PackageError{glossaries-extra}{Unknown control sequence name `#1'}{}% + }% +} \newcommand*{\glsxtrinithyperoutside}{% \glsifattribute{\glslabel}{hyperoutside}{false}% {% @@ -1887,6 +1898,10 @@ } \newcommand*{\glsxtr@inc@linkcount}{} \newcommand*{\glslinkpresetkeys}{} +\newrobustcmd*{\GlsXtrExpandedFmt}[2]{% + \protected@edef\@glsxtr@tmp{#2}% + \expandafter#1\expandafter{\@glsxtr@tmp}% +} \def\@gls@link[#1]#2#3{% \leavevmode \edef\glslabel{\glsdetoklabel{#2}}% @@ -1896,6 +1911,7 @@ \edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}% \edef\glstype{\csname glo@\glslabel @type\endcsname}% \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \let\@glsxtr@local@textformat\relax \def\@glsxtr@thevalue{}% \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% \glsxtrinitwrgloss @@ -1916,23 +1932,27 @@ \def\theHglsentrycounter{\@glsxtr@theHvalue}% }% \@gls@setsort{\glslabel}% - \glshasattribute{\glslabel}{textformat}% - {% - \edef\@glsxtr@attrval{\glsgetattribute{\glslabel}{textformat}}% - \ifcsdef{\@glsxtr@attrval}% + \ifx\@glsxtr@local@textformat\relax + \glshasattribute{\glslabel}{textformat}% {% - \letcs{\@glsxtr@textformat}{\@glsxtr@attrval}% + \edef\@glsxtr@attrval{\glsgetattribute{\glslabel}{textformat}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@textformat}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in textformat attribute + for entry `\glslabel'. Reverting to default \string\glstextformat}% + \let\@glsxtr@textformat\glstextformat + }% }% {% - \GlossariesExtraWarning{Unknown control sequence name - `\@glsxtr@attrval' supplied in textformat attribute - for entry `\glslabel'. Reverting to default \string\glstextformat}% \let\@glsxtr@textformat\glstextformat }% - }% - {% - \let\@glsxtr@textformat\glstextformat - }% + \else + \let\@glsxtr@textformat\@glsxtr@local@textformat + \fi \ifglsxtrinitwrglossbefore \@do@wrglossary{#2}% \fi @@ -1957,6 +1977,9 @@ } \define@key{glossadd}{thevalue}{\def\@glsxtr@thevalue{#1}} \define@key{glossadd}{theHvalue}{\def\@glsxtr@theHvalue{#1}} +\newcommand*{\glsaddpresetkeys}{} + +\newcommand*{\glsaddpostsetkeys}{} \renewrobustcmd*{\glsadd}[2][]{% \glsxtrifinmark {}% @@ -1969,7 +1992,9 @@ \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}% \def\@glsxtr@thevalue{}% \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% + \glsaddpresetkeys \setkeys{glossadd}{#1}% + \glsaddpostsetkeys \ifdefempty{\@glsxtr@thevalue}% {% \@gls@saveentrycounter @@ -3057,15 +3082,36 @@ }% } } -\renewcommand*{\@glsunset}[1]{% +\newcommand*{\@glsxtr@unset}[1]{% \@@glsunset{#1}% \glsxtrpostunset{#1}% }% +\let\@glsunset\@glsxtr@unset \newcommand*{\glsxtrpostunset}[1]{} - \renewcommand*{\@glslocalunset}[1]{% - \@@glslocalunset{#1}% - \glsxtrpostlocalunset{#1}% - }% +\newcommand*{\GlsXtrStartUnsetBuffering}{% + \let\@glsxtr@org@unset@buffer\@glsxtr@unset@buffer + \def\@glsxtr@unset@buffer{}% + \let\@glsunset\@glsxtrbuffer@unset +} +\newcommand*{\@glsxtrbuffer@unset}[1]{% + \listxadd\@glsxtr@unset@buffer{#1}% +} +\newcommand*{\GlsXtrStopUnsetBuffering}{% + \@ifstar\s@GlsXtrStopUnsetBuffering\@GlsXtrStopUnsetBuffering +} +\newcommand*{\@GlsXtrStopUnsetBuffering}{% + \let\@glsunset\@glsxtr@unset + \forlistloop\@glsunset\@glsxtr@unset@buffer + \let\@glsxtr@unset@buffer\@glsxtr@org@unset@buffer +} +\newcommand*{\s@GlsXtrStopUnsetBuffering}{% + \forlistloop\@glslocalunset\@glsxtr@unset@buffer + \let\@glsunset\@glsxtr@unset +} +\renewcommand*{\@glslocalunset}[1]{% + \@@glslocalunset{#1}% + \glsxtrpostlocalunset{#1}% +}% \newcommand*{\glsxtrpostlocalunset}[1]{} \renewcommand*{\@glsreset}[1]{% \@@glsreset{#1}% @@ -6292,6 +6338,7 @@ defined}{}% {\@glsxtr@full{#1}{#2}[]}% } \def\@glsxtr@full#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6352,6 +6399,7 @@ defined}{}% {\@glsxtr@fullpl{#1}{#2}[]}% } \def\@glsxtr@fullpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6371,6 +6419,7 @@ defined}{}% {\@Glsxtr@fullpl{#1}{#2}[]}% } \def\@Glsxtr@fullpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6390,6 +6439,7 @@ defined}{}% {\@GLSxtr@fullpl{#1}{#2}[]}% } \def\@GLSxtr@fullpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper @@ -6408,6 +6458,7 @@ defined}{}% \new@ifnextchar[{\@glsxtrshort{#1}{#2}}{\@glsxtrshort{#1}{#2}[]}% } \def\@glsxtrshort#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6429,6 +6480,7 @@ defined}{}% \new@ifnextchar[{\@Glsxtrshort{#1}{#2}}{\@Glsxtrshort{#1}{#2}[]}% } \def\@Glsxtrshort#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6450,6 +6502,7 @@ defined}{}% \new@ifnextchar[{\@GLSxtrshort{#1}{#2}}{\@GLSxtrshort{#1}{#2}[]}% } \def\@GLSxtrshort#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6473,6 +6526,7 @@ defined}{}% \new@ifnextchar[{\@glsxtrlong{#1}{#2}}{\@glsxtrlong{#1}{#2}[]}% } \def\@glsxtrlong#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper @@ -6493,6 +6547,7 @@ defined}{}% \new@ifnextchar[{\@Glsxtrlong{#1}{#2}}{\@Glsxtrlong{#1}{#2}[]}% } \def\@Glsxtrlong#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper @@ -6513,6 +6568,7 @@ defined}{}% \new@ifnextchar[{\@GLSxtrlong{#1}{#2}}{\@GLSxtrlong{#1}{#2}[]}% } \def\@GLSxtrlong#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper @@ -6535,6 +6591,7 @@ defined}{}% \new@ifnextchar[{\@glsxtrshortpl{#1}{#2}}{\@glsxtrshortpl{#1}{#2}[]}% } \def\@glsxtrshortpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6556,6 +6613,7 @@ defined}{}% \new@ifnextchar[{\@Glsxtrshortpl{#1}{#2}}{\@Glsxtrshortpl{#1}{#2}[]}% } \def\@Glsxtrshortpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6577,6 +6635,7 @@ defined}{}% \new@ifnextchar[{\@GLSxtrshortpl{#1}{#2}}{\@GLSxtrshortpl{#1}{#2}[]}% } \def\@GLSxtrshortpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% @@ -6600,6 +6659,7 @@ defined}{}% \new@ifnextchar[{\@glsxtrlongpl{#1}{#2}}{\@glsxtrlongpl{#1}{#2}[]}% } \def\@glsxtrlongpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper @@ -6620,6 +6680,7 @@ defined}{}% \new@ifnextchar[{\@Glsxtrlongpl{#1}{#2}}{\@Glsxtrlongpl{#1}{#2}[]}% } \def\@Glsxtrlongpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper @@ -6640,6 +6701,7 @@ defined}{}% \new@ifnextchar[{\@GLSxtrlongpl{#1}{#2}}{\@GLSxtrlongpl{#1}{#2}[]}% } \def\@GLSxtrlongpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper @@ -9608,6 +9670,7 @@ defined}{}% \newcommand*{\glslonguserfont}[1]{\glslongdefaultfont{#1}} \newcommand*{\glsfirstlonguserfont}[1]{\glslonguserfont{#1}} \newcommand*{\glsxtrusersuffix}{\glsxtrabbrvpluralsuffix} +\newcommand*{\glsuserdescription}[2]{\glslonguserfont{#1}} \newabbreviationstyle{long-short-user}% {% \renewcommand*{\CustomAbbreviationFields}{% @@ -9620,7 +9683,8 @@ defined}{}% \protect\glsxtruserparen {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% - description={\protect\glslonguserfont{\the\glslongtok}}}% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% \renewcommand*{\GlsXtrPostNewAbbreviation}{% \glshasattribute{\the\glslabeltok}{regular}% {% @@ -9664,7 +9728,8 @@ defined}{}% first={\protect\glsfirstlonguserfont{\the\glslongtok}},% firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% - description={\protect\glslonguserfont{\the\glslongtok}}}% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% \renewcommand*{\GlsXtrPostNewAbbreviation}{% \csdef{glsxtrpostlink\glscategorylabel}{% \glsxtrifwasfirstuse @@ -9768,7 +9833,8 @@ defined}{}% first={\protect\glsfirstlonguserfont{\the\glslongtok}},% firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% - description={\protect\glslonguserfont{\the\glslongtok}}}% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% \renewcommand*{\GlsXtrPostNewAbbreviation}{% \csdef{glsxtrpostlink\glscategorylabel}{% \glsxtrifwasfirstuse @@ -9895,7 +9961,8 @@ defined}{}% \renewcommand*{\CustomAbbreviationFields}{% name={\glsxtrshortlongname}, sort={\the\glsshorttok}, - description={\protect\glslonguserfont{\the\glslongtok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}},% first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% {\the\glslabeltok}},% diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty index 8a5ff567535..da839628da6 100644 --- a/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty +++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary-bookindex}[2018/04/09 v1.29 (NLCT)] +\ProvidesPackage{glossary-bookindex}[2018/04/25 v1.30 (NLCT)] \RequirePackage{multicol} \RequirePackage{glossary-tree} \newcommand{\glsxtrbookindexcols}{2} -- cgit v1.2.3