diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-12 22:33:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-12 22:33:49 +0000 |
commit | b9a0b51745d2d9fc0c087e0d32d4234cdd6a46de (patch) | |
tree | d224ba184d4541611eeda9ed57ce1bd00edafa2a /Master/texmf-dist/tex/latex/glossaries | |
parent | 4c7bf2d42fecbd952b9d701396503f6374d14835 (diff) |
glossaries (12mar14)
git-svn-id: svn://tug.org/texlive/trunk@33162 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries')
-rw-r--r-- | Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty | 186 |
1 files changed, 178 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty index 9ed3b7a9acc..34fb4577784 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2014/03/11 v4.05 (NLCT)] +\ProvidesPackage{glossaries}[2014/03/12 v4.06 (NLCT)] \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} @@ -262,6 +262,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% \else \newglossary{main}{gls}{glo}{\glossaryname}% \fi + \newcommand*{\gls@tr@set@main@toctitle}{% + \translatelet{\glossarytoctitle}{Glossary}% + }% } \newcommand*{\glsdefaulttype}{main} \newcommand*{\acronymtype}{\glsdefaulttype} @@ -275,6 +278,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% \DeclareAcronymList{acronym}% \newglossary[alg]{acronym}{acr}{acn}{\acronymname}% \renewcommand*{\acronymtype}{acronym}% + \newcommand*{\gls@tr@set@acronym@toctitle}{% + \translatelet{\glossarytoctitle}{Acronyms}% + }% }% \else \let\@gls@do@acronymsdef\relax @@ -297,6 +303,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% \DeclareAcronymList{acronym}% \newglossary[alg]{acronym}{acr}{acn}{\acronymname}% \renewcommand*{\acronymtype}{acronym}% + \newcommand*{\gls@tr@set@acronym@toctitle}{% + \translatelet{\glossarytoctitle}{Acronyms}% + }% }% } \newcommand*{\@glsacronymlists}{} @@ -641,6 +650,9 @@ name=true]{% \newcommand*{\@gls@symbolsdef}{% \newglossary[slg]{symbols}{sls}{slo}{\glssymbolsgroupname}% \newcommand*{\printsymbols}[1][]{\printglossary[type=symbols,##1]}% + \newcommand*{\gls@tr@set@symbols@toctitle}{% + \translatelet{\glossarytoctitle}{Symbols (glossaries)}% + }% }% \@gls@declareoption{numbers}{% \let\@gls@do@numbersdef\@gls@numbersdef @@ -649,6 +661,9 @@ name=true]{% \newcommand*{\@gls@numbersdef}{% \newglossary[nlg]{numbers}{nls}{nlo}{\glsnumbersgroupname}% \newcommand*{\printnumbers}[1][]{\printglossary[type=numbers,##1]}% + \newcommand*{\gls@tr@set@numbers@toctitle}{% + \translatelet{\glossarytoctitle}{Numbers (glossaries)}% + }% }% \@gls@declareoption{index}{% \let\@gls@do@indexdef\@gls@indexdef @@ -803,11 +818,14 @@ name=true]{% \addglossarytocaptions{polish}% \addglossarytocaptions{spanish}% \renewcommand*{\glssettoctitle}[1]{% - \ifthenelse{\equal{#1}{main}}{% - \translatelet{\glossarytoctitle}{Glossary}}{% - \ifthenelse{\equal{#1}{acronym}}{% - \translatelet{\glossarytoctitle}{Acronyms}}{% - \def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}}}% + \ifcsdef{gls@tr@set@#1@toctitle}% + {% + \csuse{gls@tr@set@#1@toctitle}% + }% + {% + \def\glossarytoctitle{\csname @glotype@#1@title\endcsname}% + }% + }% \renewcommand*{\glossaryname}{\translate{Glossary}}% \renewcommand*{\acronymname}{\translate{Acronyms}}% \renewcommand*{\entryname}{\translate{Notation (glossaries)}}% @@ -3065,7 +3083,15 @@ name=true]{% \let\glscapscase\@firstofthree \let\glscustomtext\@empty \def\glsinsert{#3}% - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper + \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% \ifglsused{#2}% {% \@gls@link[#1]{#2}{\@glo@text}% @@ -3103,7 +3129,15 @@ name=true]{% \let\glscapscase\@secondofthree \let\glscustomtext\@empty \def\glsinsert{#3}% - \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper + \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% \ifglsused{#2}% {% \@gls@link[#1]{#2}{\@glo@text}% @@ -3142,6 +3176,14 @@ name=true]{% \let\glscapscase\@thirdofthree \let\glscustomtext\@empty \def\glsinsert{#3}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% \ifglsused{#2}% {% @@ -3179,6 +3221,14 @@ name=true]{% \let\glscapscase\@firstofthree \let\glscustomtext\@empty \def\glsinsert{#3}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% \ifglsused{#2}% {% @@ -3218,6 +3268,14 @@ name=true]{% \let\glscapscase\@secondofthree \let\glscustomtext\@empty \def\glsinsert{#3}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% \ifglsused{#2}% {% @@ -3257,6 +3315,14 @@ name=true]{% \let\glscapscase\@thirdofthree \let\glscustomtext\@empty \def\glsinsert{#3}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% \ifglsused{#2}% {% @@ -3292,6 +3358,14 @@ name=true]{% \let\glscapscase\@firstofthree \def\glscustomtext{#3}% \def\glsinsert{}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}% \ifglsused{#2}% {% @@ -3655,6 +3729,14 @@ name=true]{% \def\glscustomtext{% \acronymfont{\glsentryshort{#2}}#3% }% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% }% } @@ -3677,6 +3759,14 @@ name=true]{% \def\glscustomtext{% \acronymfont{\Glsentryshort{#2}}#3% }% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% }% } @@ -3699,6 +3789,14 @@ name=true]{% \def\glscustomtext{% \mfirstucMakeUppercase{\acronymfont{\glsentryshort{#2}}#3}% }% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% }% } @@ -3721,6 +3819,14 @@ name=true]{% \def\glscustomtext{% \acronymfont{\glsentryshortpl{#2}}#3% }% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% }% } @@ -3743,6 +3849,14 @@ name=true]{% \def\glscustomtext{% \acronymfont{\Glsentryshortpl{#2}}#3% }% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% }% } @@ -3765,6 +3879,14 @@ name=true]{% \def\glscustomtext{% \mfirstucMakeUppercase{\acronymfont{\glsentryshortpl{#2}}#3}% }% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}% }% } @@ -3784,6 +3906,14 @@ name=true]{% \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \glsentrylong{#2}#3% }% @@ -3806,6 +3936,14 @@ name=true]{% \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree \let\glsinsert\@empty + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \Glsentrylong{#2}#3% }% @@ -3828,6 +3966,14 @@ name=true]{% \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \mfirstucMakeUppercase{\glsentrylong{#2}#3}% }% @@ -3850,6 +3996,14 @@ name=true]{% \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree \let\glsinsert\@empty + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \glsentrylongpl{#2}#3% }% @@ -3872,6 +4026,14 @@ name=true]{% \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree \let\glsinsert\@empty + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \Glsentrylongpl{#2}#3% }% @@ -3894,6 +4056,14 @@ name=true]{% \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \setkeys{glslink}{hyper=true,#1}% + \ifKV@glslink@hyper + \let\glsifhyper\@firstoftwo + \else + \let\glsifhyper\@secondoftwo + \fi + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper \def\glscustomtext{% \mfirstucMakeUppercase{\glsentrylongpl{#2}#3}% }% |