summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-11 23:28:20 +0000
committerKarl Berry <karl@freefriends.org>2013-07-11 23:28:20 +0000
commitb625e30b874afe21d62a6a3704e04923abfc6f17 (patch)
tree9fc22581657b7960110ec5a7988f2fcb2cf26d73 /Master/texmf-dist/source
parentb0c1f2170d2a8b9c940d94e002098245a566b6b0 (diff)
glossaries
git-svn-id: svn://tug.org/texlive/trunk@31171 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.dtx95
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.ins2
2 files changed, 82 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
index 9959f8a4172..c3d0d7ef498 100644
--- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
+++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
@@ -27,7 +27,7 @@
% -author "Nicola Talbot"
% -codetitle "Main Package Code"
% glossaries
-% Created on 2013/6/17 17:30
+% Created on 2013/7/5 21:47
%\fi
%\iffalse
%<*package>
@@ -136,7 +136,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{13967}
+\CheckSum{14003}
\newcommand*{\ifirstuse}{\iterm{first use}}
\newcommand*{\firstuse}{\gls{firstuse}}
@@ -164,12 +164,12 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
%\MakeShortVerb{"}
%\DeleteShortVerb{\|}
%
-% \title{Documented Code For glossaries v3.06}
+% \title{Documented Code For glossaries v3.07}
% \author{Nicola L.C. Talbot\\[10pt]
%Dickimaw Books\\
%\url{http://www.dickimaw-books.com/}}
%
-% \date{2013-06-17}
+% \date{2013-07-05}
% \maketitle
%
%This is the documented code for the \styfmt{glossaries} package.
@@ -185,7 +185,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 v3.06:
+%For the main user guide, read \qt{glossaries.sty v3.07:
%\LaTeX2e\ Package to Assist Generating Glossaries}.
%
%\item[\url{mfirstuc-manual.pdf}]
@@ -229,7 +229,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
% This package requires \LaTeXe.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries}[2013/06/17 v3.06 (NLCT)]
+\ProvidesPackage{glossaries}[2013/07/05 v3.07 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -600,9 +600,14 @@ false,nolabel,autolabel}[nolabel]{%
%\begin{macro}{\glspostdescription}
% The description terminator is given by \cs{glspostdescription}
% (except for the 3 and 4 column styles). This is a full stop
-% by default:
+% by default.
+%\changes{3.07}{2013-07-05}{Added spacefactor code}
+% The spacefactor is adjusted in case the description ends with an
+% upper case letter. (Patch provided by Michael Pock.)
% \begin{macrocode}
-\newcommand*{\glspostdescription}{\ifglsnopostdot\else.\fi}
+\newcommand*{\glspostdescription}{%
+ \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi
+}
% \end{macrocode}
%\end{macro}
%\begin{option}{nopostdot}
@@ -1899,10 +1904,33 @@ name=true]{%
% \ics{printglossaries}, and redefine \cs{glossarypreamble}
% before each \ics{printglossary}.
%\begin{macro}{\glossarypreamble}
+%\changes{3.07}{2013-07-05}{modified to work with
+%\cs{setglossarypreamble}}
% \begin{macrocode}
-\newcommand*{\glossarypreamble}{}
+\newcommand*{\glossarypreamble}{%
+ \csuse{@glossarypreamble@\currentglossary}%
+}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\setglossarypreamble}
+%\begin{definition}
+%\cs{setglossarypreamble}\oarg{type}\marg{text}
+%\end{definition}
+% Code provided by Michael Pock.
+%\changes{3.07}{2013-07-05}{new}
+% \begin{macrocode}
+\newcommand{\setglossarypreamble}[2][\glsdefaulttype]{%
+ \ifglossaryexists{#1}{%
+ \csgdef{@glossarypreamble@#1}{#2}%
+ }{%
+ \PackageWarning{glossaries}{%
+ Glossary `#1' is not defined%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%
% The glossary postamble is given by \cs{glossarypostamble}.
% This is provided to allow the user to
@@ -2051,11 +2079,28 @@ name=true]{%
% sectional unit is something else, do nothing.
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
%\cs{ifcsundef}}
+%\changes{3.07}{2013-07-05}{added check for openright}
% \begin{macrocode}
\newcommand*{\gls@doclearpage}{%
\ifthenelse{\equal{\@@glossarysec}{chapter}}%
{%
- \ifcsundef{cleardoublepage}{\clearpage}{\cleardoublepage}%
+ \ifcsundef{cleardoublepage}%
+ {%
+ \clearpage
+ }%
+ {%
+ \ifcsdef{if@openright}%
+ {%
+ \if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ }%
+ {%
+ \cleardoublepage
+ }%
+ }%
}%
{}%
}
@@ -4198,11 +4243,13 @@ name=true]{%
\edef\@gls@counter{\csname glo@#2@counter\endcsname}%
% \end{macrocode}
%\changes{3.05}{2013-04-21}{added check for ``nohypertypes''}%
+%\changes{3.07}{2013-07-05}{fixed bug that failed to find entry in list}%
% If this is in one of the ``nohypertypes'' glossaries, suppress the
% hyperlink by default
% \begin{macrocode}
- \expandafter\xifinlist\expandafter
- {\csname glo@#2@type\endcsname}{\@gls@nohyperlist}%
+ \edef\gls@type{\csname glo@#2@type\endcsname}%
+ \expandafter\DTLifinlist\expandafter
+ {\gls@type}{\@gls@nohyperlist}%
{%
\KV@glslink@hyperfalse
}%
@@ -10820,10 +10867,11 @@ false,nolabel,autolabel}[nolabel]{%
% Sets the acronym display style for given glossary using
% the description setting (but not \pkgopt{footnote} or \pkgopt{dua}).
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.07}{2013-07-05}{now using \cs{glsdoparenifnotempty}}
% \begin{macrocode}
\newcommand*{\SetDescriptionAcronymDisplayStyle}[1]{%
\defglsdisplayfirst[#1]{%
- ##1##4 (\firstacronymfont{##3})}%
+ ##1##4\glsdoparenifnotempty{##3}{\protect\firstacronymfont}}%
\defglsdisplay[#1]{\acronymfont{##1}##4}%
}
% \end{macrocode}
@@ -10999,6 +11047,25 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsdoparenifnotempty}
+% Do a space followed by the argument if the argument doesn't expand
+% to empty or \cs{relax}. If argument isn't empty (or \cs{relax}), apply
+% the macro to it given in the second argument.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glsdoparenifnotempty}[2]{%
+ \protected@edef\gls@tmp{#1}%
+ \ifdefempty\gls@tmp
+ {}%
+ {%
+ \if\gls@tmp\relax
+ \else
+ \space (#2{#1})%
+ \fi
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\SetSmallAcronymDisplayStyle}
% Sets the acronym display style for given glossary where neither
% footnote nor description is required, but smallcaps or smaller
@@ -11006,7 +11073,7 @@ false,nolabel,autolabel}[nolabel]{%
%\changes{2.04}{2009 November 10}{new}
% \begin{macrocode}
\newcommand*{\SetSmallAcronymDisplayStyle}[1]{%
- \defglsdisplayfirst[#1]{##1##4 (\firstacronymfont{##3})}
+ \defglsdisplayfirst[#1]{##1##4\glsdoparenifnotempty{##3}{\protect\firstacronymfont}}
\defglsdisplay[#1]{\acronymfont{##1}##4}%
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins
index bda1dba15f7..d374e0f50cd 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 0.94b 2013/6/17 17:30
+% glossaries.ins generated using makedtx version 0.94b 2013/7/5 21:47
\input docstrip
\preamble