summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-11-17 22:18:16 +0000
committerKarl Berry <karl@freefriends.org>2013-11-17 22:18:16 +0000
commit5009aa815341193d64d6945ed8f09ad39c875135 (patch)
tree1dc35b356dbac9e62771b0c4f056447814296a95 /Master/texmf-dist/tex/latex
parent17bd9acb30a81f09b5415632b50457f38dd08f36 (diff)
glossaries (17nov13)
git-svn-id: svn://tug.org/texlive/trunk@32171 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty55
1 files changed, 37 insertions, 18 deletions
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}%
}