From 5009aa815341193d64d6945ed8f09ad39c875135 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 17 Nov 2013 22:18:16 +0000 Subject: glossaries (17nov13) git-svn-id: svn://tug.org/texlive/trunk@32171 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/glossaries/base/glossaries.sty | 55 +++++++++++++++------- 1 file changed, 37 insertions(+), 18 deletions(-) (limited to 'Master/texmf-dist/tex/latex/glossaries') diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty index 2df06584c5d..39da8e08913 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}[2013/11/14 v4.0 (NLCT)] +\ProvidesPackage{glossaries}[2013/11/16 v4.01 (NLCT)] \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} @@ -122,29 +122,33 @@ false,nolabel,autolabel}[nolabel]{% \define@key{glossaries.sty}{style}{% \renewcommand*{\@glossary@default@style}{#1}% } +\newcommand*{\@gls@declareoption}[2]{% + \DeclareOptionX{#1}{#2}% + \DeclareOption{#1}{#2}% +} \newcommand*{\glossaryentrynumbers}[1]{#1\gls@save@numberlist{#1}} -\DeclareOptionX{nonumberlist}{% +\@gls@declareoption{nonumberlist}{% \renewcommand*{\glossaryentrynumbers}[1]{\gls@save@numberlist{#1}}% } \define@boolkey{glossaries.sty}[gls]{savenumberlist}[true]{} \glssavenumberlistfalse \newcommand*\@glo@seeautonumberlist{} -\DeclareOptionX{seeautonumberlist}{% +\@gls@declareoption{seeautonumberlist}{% \renewcommand*{\@glo@seeautonumberlist}{% \def\@glo@prefix{\glsnextpages}% }% } \newcommand*{\@gls@loadlong}{\RequirePackage{glossary-long}} -\DeclareOptionX{nolong}{\renewcommand*{\@gls@loadlong}{}} +\@gls@declareoption{nolong}{\renewcommand*{\@gls@loadlong}{}} \IfFileExists{supertabular.sty}{% \newcommand*{\@gls@loadsuper}{\RequirePackage{glossary-super}}}{% \newcommand*{\@gls@loadsuper}{}} -\DeclareOptionX{nosuper}{\renewcommand*{\@gls@loadsuper}{}} +\@gls@declareoption{nosuper}{\renewcommand*{\@gls@loadsuper}{}} \newcommand*{\@gls@loadlist}{\RequirePackage{glossary-list}} -\DeclareOptionX{nolist}{\renewcommand*{\@gls@loadlist}{}} +\@gls@declareoption{nolist}{\renewcommand*{\@gls@loadlist}{}} \newcommand*{\@gls@loadtree}{\RequirePackage{glossary-tree}} -\DeclareOptionX{notree}{\renewcommand*{\@gls@loadtree}{}} -\DeclareOptionX{nostyles}{% +\@gls@declareoption{notree}{\renewcommand*{\@gls@loadtree}{}} +\@gls@declareoption{nostyles}{% \renewcommand*{\@gls@loadlong}{}% \renewcommand*{\@gls@loadsuper}{}% \renewcommand*{\@gls@loadlist}{}% @@ -254,7 +258,7 @@ false,nolabel,autolabel}[nolabel]{% } \newcommand*{\glsdefaulttype}{main} \newcommand*{\acronymtype}{\glsdefaulttype} -\DeclareOptionX{nomain}{% +\@gls@declareoption{nomain}{% \let\glsdefaulttype\relax \renewcommand*{\glsdefmain}{}% } @@ -280,9 +284,13 @@ false,nolabel,autolabel}[nolabel]{% \fi } \newcommand*{\@gls@do@acronymsdef}{} -\DeclareOptionX{acronyms}{% +\@gls@declareoption{acronyms}{% \glsacronymtrue - \DeclareAcronymList{acronym}% + \renewcommand{\@gls@do@acronymsdef}{% + \DeclareAcronymList{acronym}% + \newglossary[alg]{acronym}{acr}{acn}{\acronymname}% + \renewcommand*{\acronymtype}{acronym}% + }% } \newcommand*{\@glsacronymlists}{} \newcommand*{\@addtoacronymlists}[1]{% @@ -344,7 +352,7 @@ false,nolabel,autolabel}[nolabel]{% \newcommand*{\GlossariesWarningNoLine}[1]{% \PackageWarningNoLine{glossaries}{#1}% } -\DeclareOptionX{nowarn}{% +\@gls@declareoption{nowarn}{% \renewcommand*{\GlossariesWarning}[1]{}% \renewcommand*{\GlossariesWarningNoLine}[1]{}% } @@ -435,7 +443,7 @@ name=true]{% } \newif\ifglstranslate \newcommand*\@gls@notranslatorhook{} -\DeclareOptionX{notranslate}{% +\@gls@declareoption{notranslate}{% \glstranslatefalse \let\@gls@notranslatorhook\relax } @@ -498,7 +506,7 @@ name=true]{% \def\glsorder{#1}} \newif\ifglsxindy \glsxindyfalse -\DeclareOptionX{makeindex}{\glsxindyfalse} +\@gls@declareoption{makeindex}{\glsxindyfalse} \define@boolkey[gls]{xindy}{glsnumbers}[true]{} \gls@xindy@glsnumberstrue \def\@xdy@main@language{\languagename}% @@ -512,7 +520,7 @@ name=true]{% \glsxindytrue \setkeys[gls]{xindy}{#1}% } -\DeclareOptionX{xindygloss}{% +\@gls@declareoption{xindygloss}{% \glsxindytrue } \define@boolkey{glossaries.sty}[gls]{savewrites}[true]{% @@ -535,19 +543,30 @@ name=true]{% } \boolfalse{glscompatible-2.07} \newcommand{\@gls@do@symbolsdef}{} -\DeclareOptionX{symbols}{% +\@gls@declareoption{symbols}{% \renewcommand{\@gls@do@symbolsdef}{% \newglossary[slg]{symbols}{sls}{slo}{\glssymbolsgroupname}% \newcommand*{\printsymbols}[1][]{\printglossary[type=symbols,#1]}% }% } \newcommand{\@gls@do@numbersdef}{} -\DeclareOptionX{numbers}{% +\@gls@declareoption{numbers}{% \renewcommand{\@gls@do@numbersdef}{% \newglossary[nlg]{numbers}{nls}{nlo}{\glsnumbersgroupname}% \newcommand*{\printnumbers}[1][]{\printglossary[type=numbers,#1]}% }% } +\@for\CurrentOption :=\@declaredoptions\do{% + \ifx\CurrentOption\@empty + \else + \@expandtwoargs + \in@ {,\CurrentOption ,}{,\@classoptionslist,\@curroptions,}% + \ifin@ + \@use@ption + \expandafter \let\csname ds@\CurrentOption\endcsname\@empty + \fi + \fi +} \ProcessOptionsX \RequirePackage{glossaries-compatible-307} \disable@keys{glossaries.sty}{compatible-2.07,% @@ -5718,7 +5737,7 @@ false,nolabel,autolabel}[nolabel]{% first={\noexpand\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% firstplural={\noexpand\acrfullformat {\noexpand\glsentrylongpl{\the\glslabeltok}}% - {\noexpand\glsentryshortpl{\the\glslabeltok}}}% + {\noexpand\glsentryshortpl{\the\glslabeltok}}},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix}% } -- cgit v1.2.3