summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/glossaries
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/source/latex/glossaries
parent17bd9acb30a81f09b5415632b50457f38dd08f36 (diff)
glossaries (17nov13)
git-svn-id: svn://tug.org/texlive/trunk@32171 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/glossaries')
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.dtx91
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.ins2
2 files changed, 68 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
index c5b4d894614..b2d038a67ae 100644
--- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
+++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
@@ -28,7 +28,7 @@
% -author "Nicola Talbot"
% -codetitle "Main Package Code"
% glossaries
-% Created on 2013/11/14 14:05
+% Created on 2013/11/16 19:05
%\fi
%\iffalse
%<*package>
@@ -137,7 +137,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{16315}
+\CheckSum{16348}
\newcommand*{\ifirstuse}{\iterm{first use}}
\newcommand*{\firstuse}{\gls{firstuse}}
@@ -165,12 +165,12 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
%\MakeShortVerb{"}
%\DeleteShortVerb{\|}
%
-% \title{Documented Code For glossaries v4.0}
+% \title{Documented Code For glossaries v4.01}
% \author{Nicola L.C. Talbot\\[10pt]
%Dickimaw Books\\
%\url{http://www.dickimaw-books.com/}}
%
-% \date{2013-11-14}
+% \date{2013-11-16}
% \maketitle
%
%This is the documented code for the \styfmt{glossaries} package.
@@ -186,7 +186,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
%glossaries package}.
%
%\item[\url{glossaries-user.pdf}]
-%For the main user guide, read \qt{glossaries.sty v4.0:
+%For the main user guide, read \qt{glossaries.sty v4.01:
%\LaTeX2e\ Package to Assist Generating Glossaries}.
%
%\item[\url{mfirstuc-manual.pdf}]
@@ -230,7 +230,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
% This package requires \LaTeXe.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries}[2013/11/14 v4.0 (NLCT)]
+\ProvidesPackage{glossaries}[2013/11/16 v4.01 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -473,6 +473,20 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
%\end{option}
%
+% Each \cs{DeclareOptionX} needs a corresponding \cs{DeclareOption}
+% so that it can be passed as a document class option, so define a
+% command that will implement both.
+%\changes{4.01}{2013-11-16}{fixed non-value options so that they can be passed to
+%document class}
+%\begin{macro}{\@gls@declareoption}
+% \begin{macrocode}
+\newcommand*{\@gls@declareoption}[2]{%
+ \DeclareOptionX{#1}{#2}%
+ \DeclareOption{#1}{#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%
% Each entry within a given glossary will have an associated
% number list. By default, this refers to the page numbers on
% which that entry has been used, but it can also refer to any counter
@@ -491,7 +505,7 @@ false,nolabel,autolabel}[nolabel]{%
% number lists (this simply redefines
% \cs{glossaryentrynumbers} to ignores its argument).
% \begin{macrocode}
-\DeclareOptionX{nonumberlist}{%
+\@gls@declareoption{nonumberlist}{%
\renewcommand*{\glossaryentrynumbers}[1]{\gls@save@numberlist{#1}}%
}
% \end{macrocode}
@@ -517,7 +531,7 @@ false,nolabel,autolabel}[nolabel]{%
% \gloskey{see} key.
%\changes{3.0}{2011/04/02}{new}
% \begin{macrocode}
-\DeclareOptionX{seeautonumberlist}{%
+\@gls@declareoption{seeautonumberlist}{%
\renewcommand*{\@glo@seeautonumberlist}{%
\def\@glo@prefix{\glsnextpages}%
}%
@@ -538,7 +552,7 @@ false,nolabel,autolabel}[nolabel]{%
% is provided to reduce overhead caused by loading unrequired
% packages.
% \begin{macrocode}
-\DeclareOptionX{nolong}{\renewcommand*{\@gls@loadlong}{}}
+\@gls@declareoption{nolong}{\renewcommand*{\@gls@loadlong}{}}
% \end{macrocode}
%\end{option}
%
@@ -560,7 +574,7 @@ false,nolabel,autolabel}[nolabel]{%
% is provided to reduce overhead caused by loading unrequired
% packages.
% \begin{macrocode}
-\DeclareOptionX{nosuper}{\renewcommand*{\@gls@loadsuper}{}}
+\@gls@declareoption{nosuper}{\renewcommand*{\@gls@loadsuper}{}}
% \end{macrocode}
%\end{option}
%
@@ -577,7 +591,7 @@ false,nolabel,autolabel}[nolabel]{%
% in \isty{glossary-list} will not be available if this option
% is used.
% \begin{macrocode}
-\DeclareOptionX{nolist}{\renewcommand*{\@gls@loadlist}{}}
+\@gls@declareoption{nolist}{\renewcommand*{\@gls@loadlist}{}}
% \end{macrocode}
%\end{option}
%
@@ -594,7 +608,7 @@ false,nolabel,autolabel}[nolabel]{%
% in \isty{glossary-tree} will not be available if this option
% is used.
% \begin{macrocode}
-\DeclareOptionX{notree}{\renewcommand*{\@gls@loadtree}{}}
+\@gls@declareoption{notree}{\renewcommand*{\@gls@loadtree}{}}
% \end{macrocode}
%\end{option}
%
@@ -604,7 +618,7 @@ false,nolabel,autolabel}[nolabel]{%
% event that the user has custom styles that are not dependent
% on the predefined styles).
% \begin{macrocode}
-\DeclareOptionX{nostyles}{%
+\@gls@declareoption{nostyles}{%
\renewcommand*{\@gls@loadlong}{}%
\renewcommand*{\@gls@loadsuper}{}%
\renewcommand*{\@gls@loadlist}{}%
@@ -927,15 +941,17 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
%\end{macro}
%
+%\begin{option}{nomain}
%\changes{2.01}{2009 May 30}{added nomain package option}
% The \pkgopt{nomain} option suppress the creation of the main
% glossary.
% \begin{macrocode}
-\DeclareOptionX{nomain}{%
+\@gls@declareoption{nomain}{%
\let\glsdefaulttype\relax
\renewcommand*{\glsdefmain}{}%
}
% \end{macrocode}
+%\end{option}
%
%\begin{option}{acronym}
% The \pkgopt{acronym} option sets an associated conditional
@@ -985,9 +1001,13 @@ false,nolabel,autolabel}[nolabel]{%
% Provide a synonym for \pkgopt[true]{acronym} that can be passed
% via the document class options.
% \begin{macrocode}
-\DeclareOptionX{acronyms}{%
+\@gls@declareoption{acronyms}{%
\glsacronymtrue
- \DeclareAcronymList{acronym}%
+ \renewcommand{\@gls@do@acronymsdef}{%
+ \DeclareAcronymList{acronym}%
+ \newglossary[alg]{acronym}{acr}{acn}{\acronymname}%
+ \renewcommand*{\acronymtype}{acronym}%
+ }%
}
% \end{macrocode}
%\end{option}
@@ -1162,13 +1182,16 @@ false,nolabel,autolabel}[nolabel]{%
}
% \end{macrocode}
%\end{macro}
+%
+%\begin{option}{nowarn}
% Define package option to suppress warnings
% \begin{macrocode}
-\DeclareOptionX{nowarn}{%
+\@gls@declareoption{nowarn}{%
\renewcommand*{\GlossariesWarning}[1]{}%
\renewcommand*{\GlossariesWarningNoLine}[1]{}%
}
% \end{macrocode}
+%\end{option}
% As from version 3.08a, the only information written to the external
% glossary files are the label and sort values. Therefore, now, the
% only sanitize option that makes sense is the one for the sort key.
@@ -1387,7 +1410,7 @@ name=true]{%
% Provide a synonym for \pkgopt[false]{translate} that can be passed
% via the document class.
% \begin{macrocode}
-\DeclareOptionX{notranslate}{%
+\@gls@declareoption{notranslate}{%
\glstranslatefalse
\let\@gls@notranslatorhook\relax
}
@@ -1553,11 +1576,13 @@ name=true]{%
\glsxindyfalse
% \end{macrocode}
%
+%\begin{option}{makeindex}
% Define package option to specify that \app{makeindex} will
% be used to sort the glossaries:
% \begin{macrocode}
-\DeclareOptionX{makeindex}{\glsxindyfalse}
+\@gls@declareoption{makeindex}{\glsxindyfalse}
% \end{macrocode}
+%\end{option}
%
% The \pkgopt{xindy} package option may have a value which in
% turn can be a key=value list. First define the keys for this
@@ -1615,7 +1640,7 @@ name=true]{%
% Provide a synonym for \pkgopt[]{xindy} that can be passed via the
% document class options.
% \begin{macrocode}
-\DeclareOptionX{xindygloss}{%
+\@gls@declareoption{xindygloss}{%
\glsxindytrue
}
% \end{macrocode}
@@ -1673,7 +1698,7 @@ name=true]{%
%\changes{3.11a}{2013-10-15}{new}
% \begin{macrocode}
\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]}%
@@ -1686,7 +1711,7 @@ name=true]{%
%\changes{3.11a}{2013-10-15}{new}
% \begin{macrocode}
\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]}%
@@ -1696,7 +1721,22 @@ name=true]{%
%\end{option}
%
%
-% Process package options:
+% Process package options. First process any options that have been
+% passed via the document class.
+% \begin{macrocode}
+\@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
+}
+% \end{macrocode}
+% Now process options passed to the package:
% \begin{macrocode}
\ProcessOptionsX
% \end{macrocode}
@@ -13212,7 +13252,10 @@ 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}}},%
+% \end{macrocode}
+% \changes{4.01}{2013-11-16}{inserted missing comma}
+% \begin{macrocode}
text={\the\glsshorttok},%
plural={\the\glsshorttok\noexpand\acrpluralsuffix}%
}
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins
index c337a6f6a95..9737748ccbf 100644
--- a/Master/texmf-dist/source/latex/glossaries/glossaries.ins
+++ b/Master/texmf-dist/source/latex/glossaries/glossaries.ins
@@ -1,4 +1,4 @@
-% glossaries.ins generated using makedtx version 1.1 2013/11/14 14:05
+% glossaries.ins generated using makedtx version 1.1 2013/11/16 19:05
\input docstrip
\preamble