summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-11-14 22:52:09 +0000
committerKarl Berry <karl@freefriends.org>2013-11-14 22:52:09 +0000
commit033271bfdf58e2563bd3fbdbeb0f1facfb0c02e5 (patch)
tree1ca0cddf673e09a878c83db761e4dc52c65ba48b /Master/texmf-dist/source
parente537bba01fd3f3a532b7fc1f6186c24065208638 (diff)
glossaries (14nov13)
git-svn-id: svn://tug.org/texlive/trunk@32147 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.dtx8443
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.ins17
2 files changed, 6248 insertions, 2212 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
index c3d0d7ef498..c5b4d894614 100644
--- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
+++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
@@ -1,5 +1,5 @@
%\iffalse
-% glossaries.dtx generated using makedtx version 0.94b (c) Nicola Talbot
+% glossaries.dtx generated using makedtx version 1.1 (c) Nicola Talbot
% Command line args:
% -macrocode ".*\.perl"
% -macrocode ".*\.tex"
@@ -11,9 +11,10 @@
% -comment ".*\.tex"
% -comment ".*\.xdy"
% -src "glossaries.sty\Z=>glossaries.sty"
+% -src "glossaries-prefix.sty\Z=>glossaries-prefix.sty"
% -src "mfirstuc.sty\Z=>mfirstuc.sty"
% -src "(glossary-.+)\.(sty)\Z=>\1.\2"
-% -src "(glossaries-compatible-207)\.(sty)\Z=>\1.\2"
+% -src "(glossaries-compatible-.+)\.(sty)\Z=>\1.\2"
% -src "(glossaries-accsupp)\.(sty)\Z=>\1.\2"
% -src "(glossaries-babel)\.(sty)\Z=>\1.\2"
% -src "(glossaries-polyglossia)\.(sty)\Z=>\1.\2"
@@ -27,7 +28,7 @@
% -author "Nicola Talbot"
% -codetitle "Main Package Code"
% glossaries
-% Created on 2013/7/5 21:47
+% Created on 2013/11/14 14:05
%\fi
%\iffalse
%<*package>
@@ -61,8 +62,6 @@ glossaries-manual.tex is a stub file used by makedtx to create
glossaries.dtx
\fi
-\RecordChanges
-
\usepackage{alltt}
\usepackage{pifont}
\usepackage[utf8]{inputenc}
@@ -75,6 +74,8 @@ glossaries.dtx
pdfkeywords={LaTeX,package,glossary,acronyms}]{hyperref}
\usepackage[toc]{glossaries}
+\RecordChanges
+
\makeglossaries
\renewcommand*{\main}[1]{\hyperpage{#1}}
@@ -136,7 +137,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{14003}
+\CheckSum{16315}
\newcommand*{\ifirstuse}{\iterm{first use}}
\newcommand*{\firstuse}{\gls{firstuse}}
@@ -164,12 +165,12 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
%\MakeShortVerb{"}
%\DeleteShortVerb{\|}
%
-% \title{Documented Code For glossaries v3.07}
+% \title{Documented Code For glossaries v4.0}
% \author{Nicola L.C. Talbot\\[10pt]
%Dickimaw Books\\
%\url{http://www.dickimaw-books.com/}}
%
-% \date{2013-07-05}
+% \date{2013-11-14}
% \maketitle
%
%This is the documented code for the \styfmt{glossaries} package.
@@ -185,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 v3.07:
+%For the main user guide, read \qt{glossaries.sty v4.0:
%\LaTeX2e\ Package to Assist Generating Glossaries}.
%
%\item[\url{mfirstuc-manual.pdf}]
@@ -211,9 +212,9 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
% \printglossaries
% \phantomsection
% \addcontentsline{toc}{section}{Change History}%
+% \raggedright
% \PrintChanges
-% \clearpage\phantomsection
-% \addcontentsline{toc}{section}{Index}\PrintIndex
+% \PrintIndex
%}
%
%
@@ -229,13 +230,22 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
% This package requires \LaTeXe.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries}[2013/07/05 v3.07 (NLCT)]
+\ProvidesPackage{glossaries}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
\RequirePackage{ifthen}
\RequirePackage{xkeyval}[2006/11/18]
\RequirePackage{mfirstuc}
+% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{Now requires textcase}
+% The \sty{textcase} package has much better case changing handling,
+% so use \cs{MakeTextUppercase} instead of \cs{MakeUppercase}
+% \begin{macrocode}
+\RequirePackage{textcase}
+\renewcommand*{\mfirstucMakeUppercase}{\MakeTextUppercase}%
+% \end{macrocode}
+% \begin{macrocode}
\RequirePackage{xfor}
% \end{macrocode}
%\changes{3.04}{2012-11-18}{added datatool-base as a required
@@ -269,12 +279,9 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
{%
\@ifclassloaded{nlctdoc}{\@gls@docloadedtrue}{\@gls@docloadedfalse}%
}
-% \end{macrocode}
-%\end{macro}
-% \begin{macrocode}
\if@gls@docloaded
% \end{macrocode}
-% It has been loaded, so some modifications need to be made to
+% \cs{doc} has been loaded, so some modifications need to be made to
% ensure both packages can work together.
%\begin{macro}{\glsorg@glossary}
%\changes{3.04}{2012-11-18}{new}
@@ -283,7 +290,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\newcommand{\glsorg@glossary}{%
\@bsphack
\begingroup
- \@sanitize \glsorg@wrglossary
+ \@sanitize \endgroup\@esphack
}
% \end{macrocode}
%\end{macro}
@@ -298,8 +305,17 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
}
% \end{macrocode}
%\end{macro}
+%\changes{3.09a}{2013-10-09}{Add a fix for \cs{RecordChanges}}
+% \begin{macrocode}
+ \renewcommand*{\RecordChanges}{%
+ \newwrite\@glossaryfile
+ \immediate\openout\@glossaryfile=\jobname.glo
+ \def\glsorg@glossary{\@bsphack\begingroup\@sanitize\glsorg@wrglossary}%
+ \typeout{Writing glossary file \jobname .glo}%
+ }
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\changes}
-%\changes{3.04}{2012-11-18}{new}
% Now we need to redefine \cs{changes} so that it uses the original
% definition of \cs{glossary}.
% \begin{macrocode}
@@ -452,7 +468,8 @@ false,nolabel,autolabel}[nolabel]{%
% \autoref{sec:code:styles}.
% \begin{macrocode}
\define@key{glossaries.sty}{style}{%
-\renewcommand*{\@glossary@default@style}{#1}}
+ \renewcommand*{\@glossary@default@style}{#1}%
+}
% \end{macrocode}
%\end{option}
%
@@ -630,11 +647,20 @@ false,nolabel,autolabel}[nolabel]{%
%
%\begin{option}{ucmark}
% Boolean option to determine whether or not to use
-% \ics{MakeUppercase} in definition of \ics{glossarymark}
+% use upper case in definition of \ics{glsglossarymark}
%\changes{3.02}{2012/05/21}{new}
% \begin{macrocode}
\define@boolkey{glossaries.sty}[gls]{ucmark}[true]{}
-\glsucmarkfalse
+% \end{macrocode}
+%\changes{3.13a}{2013-11-05}{added check for memoir}
+% \begin{macrocode}
+\@ifclassloaded{memoir}
+{%
+ \glsucmarktrue
+}%
+{%
+ \glsucmarkfalse
+}
% \end{macrocode}
%\end{option}
%
@@ -691,6 +717,22 @@ false,nolabel,autolabel}[nolabel]{%
}
% \end{macrocode}
%\end{option}
+%
+%\begin{macro}{\glsprestandardsort}
+%\changes{3.13a}{2013-11-05}{new}
+%\begin{definition}
+%\cs{glsprestandardsort}\marg{sort cs}\marg{type}\marg{label}
+%\end{definition}
+% Allow user to hook into sort mechanism. The first argument
+% \meta{sort cs} is the temporary control sequence containing the
+% sort value before it has been sanitized and had
+% \gls{makeindex}\slash\gls{xindy} special characters escaped.
+% \begin{macrocode}
+\newcommand*{\glsprestandardsort}[3]{%
+ \glsdosanitizesort
+}
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\@gls@setupsort@standard}
%\changes{3.0}{2011/04/02}{new}
% Set up the macros for default sorting.
@@ -707,6 +749,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Sort according to sort key (\cs{@glo@sort}) if provided otherwise
% sort according to the entry's name (\cs{@glo@name}).
+% (First argument glossary type, second argument entry label.)
% \begin{macrocode}
\def\@gls@defsort##1##2{%
\ifx\@glo@sort\@glsdefaultsort
@@ -714,8 +757,11 @@ false,nolabel,autolabel}[nolabel]{%
\fi
% \end{macrocode}
%\changes{3.03}{2012/09/21}{used \cs{@gls@sanitizesort}}
+%\changes{3.13a}{2013-11-05}{moved \cs{@gls@santizesort} to
+%\cs{glsprestandardsort}}
% \begin{macrocode}
- \@gls@sanitizesort
+ \let\glsdosanitizesort\@gls@sanitizesort
+ \glsprestandardsort{\@glo@sort}{##1}{##2}%
\expandafter\protected@xdef\csname glo@##2@sort\endcsname{\@glo@sort}%
}%
% \end{macrocode}
@@ -897,6 +943,50 @@ false,nolabel,autolabel}[nolabel]{%
% or not to define a separate glossary for acronyms.
% \begin{macrocode}
\define@boolkey{glossaries.sty}[gls]{acronym}[true]{%
+ \ifglsacronym
+ \renewcommand{\@gls@do@acronymsdef}{%
+ \DeclareAcronymList{acronym}%
+ \newglossary[alg]{acronym}{acr}{acn}{\acronymname}%
+ \renewcommand*{\acronymtype}{acronym}%
+ }%
+ \else
+ \let\@gls@do@acronymsdef\relax
+ \fi
+}
+% \end{macrocode}
+%\end{option}
+%\begin{macro}{\printacronyms}
+% Define \cs{printacronyms} at the start of the document if
+% \pkgopt{acronym} is set and compatibility mode isn't on and
+% \cs{printacronyms} hasn't already been defined.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifglsacronym
+ \ifbool{glscompatible-3.07}%
+ {}%
+ {%
+ \providecommand*{\printacronyms}[1][]{%
+ \printglossary[type=\acronymtype,#1]}%
+ }%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@gls@do@acronymsdef}
+% Set default value
+% \begin{macrocode}
+\newcommand*{\@gls@do@acronymsdef}{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{option}{acronyms}
+%\changes{3.14a}{2013-11-12}{new}
+% Provide a synonym for \pkgopt[true]{acronym} that can be passed
+% via the document class options.
+% \begin{macrocode}
+\DeclareOptionX{acronyms}{%
+ \glsacronymtrue
\DeclareAcronymList{acronym}%
}
% \end{macrocode}
@@ -934,7 +1024,9 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\glsIfListOfAcronyms}
-%\cs{glsIfListOfAcronyms}\marg{label}\marg{true part}\marg{false part}\\[10pt]
+%\begin{definition}
+%\cs{glsIfListOfAcronyms}\marg{label}\marg{true part}\marg{false part}
+%\end{definition}
% Determines if the glossary with the given label has been identified
% as being a list of acronyms.
% \begin{macrocode}
@@ -994,9 +1086,11 @@ false,nolabel,autolabel}[nolabel]{%
%\end{macro}
%\begin{option}{acronymlists}
%\changes{2.04}{2009 November 10}{new}%
+%\changes{3.11a}{2013-10-15}{replaced \cs{@addtoacronymlists} with
+%\cs{DeclareAcronymList}}
% \begin{macrocode}
\define@key{glossaries.sty}{acronymlists}{%
- \@addtoacronymlists{#1}%
+ \DeclareAcronymList{#1}%
}
% \end{macrocode}
%\end{option}
@@ -1052,52 +1146,137 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
%\end{option}
%
-% The glossary keys whose values are written to another file (i.e.\
-% \gloskey{sort}, \gloskey{name}, \gloskey{description} and
-% \gloskey{symbol}) need to be sanitized, otherwise fragile
-% commands would not be able to be used in
-% \ics{newglossaryentry}. However, strange results will occur
-% if you then use those fields in the document. As these fields
-% are not normally used in the document, but are by default only
-% used in the glossary, the default is to sanitize them. If however
-% you want to use these values in the document (either by redefining
-% commands like \ics{glsdisplay} or by using commands like
-% \ics{glsentrydesc}) you will have to switch off the
-% sanitization using the \pkgopt{sanitize} package option, but
-% you will then have to use \ics{protect} to protect fragile
-% commands when defining new glossary entries.
-% The \pkgopt{sanitize} option
-% takes a key-value list as its value, which can be used to
-% switch individual values on and off. For example:
-%\begin{verbatim}
-%\usepackage[sanitize={description,name,symbol=false}]{glossaries}
-%\end{verbatim}
-%will switch off the sanitization for the \gloskey{symbol} key, but
-% switch it on for the \gloskey{description} and \gloskey{name} keys.
-% This would mean that you can use fragile commands in the
-%description and name when defining a new glossary entry, but not
-% for the symbol.
+%\begin{macro}{\GlossariesWarning}
+% Prints a warning message.
+% \begin{macrocode}
+\newcommand*{\GlossariesWarning}[1]{%
+ \PackageWarning{glossaries}{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\GlossariesWarningNoLine}
+% Prints a warning message without the line number.
+% \begin{macrocode}
+\newcommand*{\GlossariesWarningNoLine}[1]{%
+ \PackageWarningNoLine{glossaries}{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+% Define package option to suppress warnings
+% \begin{macrocode}
+\DeclareOptionX{nowarn}{%
+ \renewcommand*{\GlossariesWarning}[1]{}%
+ \renewcommand*{\GlossariesWarningNoLine}[1]{}%
+}
+% \end{macrocode}
+% 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.
+% so the sanitize option is now deprecated and there is only a
+% sanitizesort option.
%
-% The default values are defined as:
%\begin{macro}{\@gls@sanitizedesc}
% \begin{macrocode}
-\newcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc}
+\newcommand*{\@gls@sanitizedesc}{%
+}
+%\end{macro}
+%
+%\begin{macro}{\glssetexpandfield}
+%\changes{3.13a}{2013-11-05}{new}
+%\begin{definition}
+%\cs{glssetexpandfield}\marg{field}
+%\end{definition}
+% Sets field to always expand.
+% \begin{macrocode}
+\newcommand*{\glssetexpandfield}[1]{%
+ \csdef{gls@assign@#1@field}##1##2{%
+ \@@gls@expand@field{##1}{#1}{##2}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glssetnoexpandfield}
+%\changes{3.13a}{2013-11-05}{new}
+%\begin{definition}
+%\cs{glssetnoexpandfield}\marg{field}
+%\end{definition}
+% Sets field to never expand.
+% \begin{macrocode}
+\newcommand*{\glssetnoexpandfield}[1]{%
+ \csdef{gls@assign@#1@field}##1##2{%
+ \@@gls@noexpand@field{##1}{#1}{##2}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\gls@assign@type@field}
+%\changes{3.10a}{2013-09-28}{new}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{glssetexpandfield}}
+% The type must always be expandable.
+% \begin{macrocode}
+\glssetexpandfield{type}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\gls@assign@desc@field}
+%\changes{3.08a}{2013-09-28}{new}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{glssetnoexpandfield}}
+% The description is not expanded by default:
+% \begin{macrocode}
+\glssetnoexpandfield{desc}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\gls@assign@descplural@field}
+%\changes{3.08a}{2013-09-28}{new}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{glssetnoexpandfield}}
+% \begin{macrocode}
+\glssetnoexpandfield{descplural}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@sanitizename}
% \begin{macrocode}
-\newcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name}
+\newcommand*{\@gls@sanitizename}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\gls@assign@name@field}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{glssetnoexpandfield}}
+% Don't expand name by default.
+% \begin{macrocode}
+\glssetnoexpandfield{name}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@sanitizesymbol}
% \begin{macrocode}
-\newcommand*{\@gls@sanitizesymbol}{\@onelevel@sanitize\@glo@symbol}
+\newcommand*{\@gls@sanitizesymbol}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@gls@assign@symbol@field}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{glssetnoexpandfield}}
+% Don't expand symbol by default.
+% \begin{macrocode}
+\glssetnoexpandfield{symbol}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@gls@assign@symbolplural@field}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{glssetnoexpandfield}}
+%\changes{3.09a}{2013-10-09}{new}
+% \begin{macrocode}
+\glssetnoexpandfield{symbolplural}
% \end{macrocode}
%\end{macro}
+%
+% Sanitizing stuff:
%\begin{macro}{\@gls@sanitizesort}
%\changes{3.03}{2012/09/21}{new}
% \begin{macrocode}
-\newcommand*{\@gls@sanitizesort}{\@onelevel@sanitize\@glo@sort}
+\newcommand*{\@gls@sanitizesort}{%
+ \ifglssanitizesort
+ \@onelevel@sanitize\@glo@sort
+ \else
+ \fi
+}
% \end{macrocode}
%\end{macro}
%
@@ -1106,74 +1285,133 @@ false,nolabel,autolabel}[nolabel]{%
% These are all boolean keys. If they are not given a value, assume
% \texttt{true}.
%
-% Firstly the \gloskey{description}. If set, it will redefine
-% \cs{@gls@sanitizedesc} to use \cs{@onelevel@sanitize},
-% otherwise \cs{@gls@sanitizedesc} will do nothing.
% \begin{macrocode}
\define@boolkey[gls]{sanitize}{description}[true]{%
-\ifgls@sanitize@description
- \renewcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc}%
-\else
- \renewcommand*{\@gls@sanitizedesc}{}%
-\fi
+ \GlossariesWarning{sanitize={description} package option deprecated}%
+ \ifgls@sanitize@description
+ \glssetnoexpandfield{desc}%
+ \glssetnoexpandfield{descplural}%
+ \else
+ \glssetexpandfield{desc}%
+ \glssetexpandfield{descplural}%
+ \fi
}
% \end{macrocode}
-% Similarly for the \gloskey{name} key:
% \begin{macrocode}
\define@boolkey[gls]{sanitize}{name}[true]{%
-\ifgls@sanitize@name
- \renewcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name}%
-\else
- \renewcommand*{\@gls@sanitizename}{}%
-\fi}
+ \GlossariesWarning{sanitize={name} package option
+deprecated}%
+ \ifgls@sanitize@name
+ \glssetnoexpandfield{name}%
+ \else
+ \glssetexpandfield{name}%
+ \fi
+}
% \end{macrocode}
-% and for the \gloskey{symbol} key:
% \begin{macrocode}
\define@boolkey[gls]{sanitize}{symbol}[true]{%
-\ifgls@sanitize@symbol
- \renewcommand*{\@gls@sanitizesymbol}{%
-\@onelevel@sanitize\@glo@symbol}%
-\else
- \renewcommand*{\@gls@sanitizesymbol}{}%
-\fi}
+ \GlossariesWarning{sanitize={symbol} package option
+deprecated}%
+ \ifgls@sanitize@symbol
+ \glssetnoexpandfield{symbol}%
+ \glssetnoexpandfield{symbolplural}%
+ \else
+ \glssetexpandfield{symbol}%
+ \glssetexpandfield{symbolplural}%
+ \fi
+}
% \end{macrocode}
-% and for the \gloskey{sort} key:
+%
+%\begin{option}{sanitizesort}
% \begin{macrocode}
-\define@boolkey[gls]{sanitize}{sort}[true]{%
-\ifgls@sanitize@sort
- \renewcommand*{\@gls@sanitizesort}{%
-\@onelevel@sanitize\@glo@sort}%
-\else
- \renewcommand*{\@gls@sanitizesort}{}%
-\fi}
+\define@boolkey{glossaries.sty}[gls]{sanitizesort}[true]{%
+ \ifglssanitizesort
+ \glssetnoexpandfield{sortvalue}%
+ \else
+ \glssetexpandfield{sortvalue}%
+ \fi
+}
% \end{macrocode}
+% Default setting:
+% \begin{macrocode}
+\glssanitizesorttrue
+\glssetnoexpandfield{sortvalue}%
+% \end{macrocode}
+%\end{option}
%
+% \begin{macrocode}
+\define@choicekey{sanitize}{sort}{true,false}[true]{%
+ \setbool{glssanitizesort}{#1}%
+ \ifglssanitizesort
+ \glssetnoexpandfield{sortvalue}%
+ \else
+ \glssetexpandfield{sortvalue}%
+ \fi
+ \GlossariesWarning{sanitize={sort} package option
+ deprecated. Use sanitizesort instead}%
+}
+% \end{macrocode}
%
%\begin{option}{sanitize}
-% Now define the \pkgopt{sanitize} option. It can either take
-% a key-val list as its value, or it can take the keyword
-% \texttt{none}, which is equivalent to \texttt{description=false,
-% symbol=false, name=false}:
% \begin{macrocode}
\define@key{glossaries.sty}{sanitize}[description=true,symbol=true,
name=true]{%
-\ifthenelse{\equal{#1}{none}}%
-{%
- \renewcommand*{\@gls@sanitizedesc}{}%
- \renewcommand*{\@gls@sanitizename}{}%
- \renewcommand*{\@gls@sanitizesymbol}{}%
-}%
-{%
- \setkeys[gls]{sanitize}{#1}}%
+ \ifthenelse{\equal{#1}{none}}%
+ {%
+ \GlossariesWarning{sanitize package option deprecated}%
+ }%
+ {%
+ \setkeys[gls]{sanitize}{#1}%
+ }%
+}
+% \end{macrocode}
+%\end{option}
+%
+%\begin{macro}{\ifglstranslate}
+% As from version 3.13a, the \pkgopt{translator} package option is a
+% choice rather than boolean option so now need to define
+% conditional:
+% \begin{macrocode}
+\newif\ifglstranslate
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@gls@notranslatorhook}
+%\changes{3.13a}{2013-11-05}{new}
+% \begin{macrocode}
+\newcommand*\@gls@notranslatorhook{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{option}{notranslate}
+%\changes{3.14a}{2013-11-12}{new}
+% Provide a synonym for \pkgopt[false]{translate} that can be passed
+% via the document class.
+% \begin{macrocode}
+\DeclareOptionX{notranslate}{%
+ \glstranslatefalse
+ \let\@gls@notranslatorhook\relax
}
% \end{macrocode}
%\end{option}
+%
%\begin{option}{translate}
%\changes{1.1}{2008 Feb 22}{translate option added}
% Define \pkgopt{translate} option. If false don't set up
% multi-lingual support.
% \begin{macrocode}
-\define@boolkey{glossaries.sty}[gls]{translate}[true]{}
+\define@choicekey{glossaries.sty}{translate}[\val\nr]%
+ {true,false,babel}[true]%
+ {%
+ \ifcase\nr\relax
+ \glstranslatetrue
+ \or
+ \glstranslatefalse
+ \let\@gls@notranslatorhook\relax
+ \or
+ \glstranslatefalse
+ \def\@gls@notranslatorhook{\RequirePackage{glossaries-babel}}%
+ \fi
+ }
% \end{macrocode}
%\end{option}
% Set the default value:
@@ -1208,12 +1446,23 @@ name=true]{%
% \end{macrocode}
%\end{option}
%
+%\begin{macro}{\@gls@setacrstyle}
+% Keep track of whether an acronym style has been set (for the
+% benefit of \cs{setupglossaries}):
+% \begin{macrocode}
+\newcommand*{\@gls@setacrstyle}{}
+% \end{macrocode}
+%\end{macro}
%\begin{option}{footnote}
% Set the long form of the acronym in footnote on first use.
% \begin{macrocode}
\define@boolkey{glossaries.sty}[glsacr]{footnote}[true]{%
-\ifthenelse{\boolean{glsacrdescription}}{}%
-{\renewcommand*{\@gls@sanitizedesc}{}}%
+ \ifbool{glsacrdescription}%
+ {}%
+ {%
+ \renewcommand*{\@gls@sanitizedesc}{}%
+ }%
+ \renewcommand*{\@gls@setacrstyle}{\SetAcronymStyle}%
}
% \end{macrocode}
%\end{option}
@@ -1224,6 +1473,7 @@ name=true]{%
% \begin{macrocode}
\define@boolkey{glossaries.sty}[glsacr]{description}[true]{%
\renewcommand*{\@gls@sanitizesymbol}{}%
+ \renewcommand*{\@gls@setacrstyle}{\SetAcronymStyle}%
}
% \end{macrocode}
%\end{option}
@@ -1232,6 +1482,7 @@ name=true]{%
% \begin{macrocode}
\define@boolkey{glossaries.sty}[glsacr]{smallcaps}[true]{%
\renewcommand*{\@gls@sanitizesymbol}{}%
+ \renewcommand*{\@gls@setacrstyle}{\SetAcronymStyle}%
}
% \end{macrocode}
%\end{option}
@@ -1242,6 +1493,7 @@ name=true]{%
% \begin{macrocode}
\define@boolkey{glossaries.sty}[glsacr]{smaller}[true]{%
\renewcommand*{\@gls@sanitizesymbol}{}%
+ \renewcommand*{\@gls@setacrstyle}{\SetAcronymStyle}%
}
% \end{macrocode}
%\end{option}
@@ -1251,6 +1503,7 @@ name=true]{%
% \begin{macrocode}
\define@boolkey{glossaries.sty}[glsacr]{dua}[true]{%
\renewcommand*{\@gls@sanitizesymbol}{}%
+ \renewcommand*{\@gls@setacrstyle}{\SetAcronymStyle}%
}
% \end{macrocode}
%\end{option}
@@ -1346,6 +1599,7 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%
+%\begin{option}{xindy}
% Define package option to specify that \app{xindy} will be
% used to sort the glossaries:
% \begin{macrocode}
@@ -1354,48 +1608,90 @@ name=true]{%
\setkeys[gls]{xindy}{#1}%
}
% \end{macrocode}
+%\end{option}
+%
+%\begin{option}{xindygloss}
+%\changes{3.14a}{2013-11-12}{new}
+% Provide a synonym for \pkgopt[]{xindy} that can be passed via the
+% document class options.
+% \begin{macrocode}
+\DeclareOptionX{xindygloss}{%
+ \glsxindytrue
+}
+% \end{macrocode}
+%\end{option}
%
%\begin{option}{savewrites}
%\changes{3.0}{2011/04/02}{new}
% The \pkgopt{savewrites} package option is provided to save on
% the number of write registers.
% \begin{macrocode}
-\define@boolkey{glossaries.sty}[gls]{savewrites}[true]{}
+\define@boolkey{glossaries.sty}[gls]{savewrites}[true]{%
+ \ifglssavewrites
+ \renewcommand*{\glswritefiles}{\@glswritefiles}%
+ \else
+ \let\glswritefiles\relax
+ \fi
+}
% \end{macrocode}
%\end{option}
% Set default:
% \begin{macrocode}
\glssavewritesfalse
+\let\glswritefiles\relax
% \end{macrocode}
%
-%\begin{macro}{\GlossariesWarning}
-% Prints a warning message.
+%\begin{option}{compatible-3.07}
+%\changes{3.11a}{2013-10-15}{cnew}
% \begin{macrocode}
-\newcommand*{\GlossariesWarning}[1]{%
- \PackageWarning{glossaries}{#1}%
-}
+\define@boolkey{glossaries.sty}[gls]{compatible-3.07}[true]{}
+\boolfalse{glscompatible-3.07}
% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\GlossariesWarningNoLine}
-% Prints a warning message without the line number.
+%\end{option}
+%
+%\begin{option}{compatible-2.07}
+%\changes{3.0}{2011/04/02}{compatible-2.07 option added}
% \begin{macrocode}
-\newcommand*{\GlossariesWarningNoLine}[1]{%
- \PackageWarningNoLine{glossaries}{#1}%
-}
+\define@boolkey{glossaries.sty}[gls]{compatible-2.07}[true]{%
% \end{macrocode}
-%\end{macro}
-% Define package option to suppress warnings
+% Also set 3.07 compatibility if this option is set.
+%\changes{3.14a}{2013-11-12}{added check for 2.07 before setting 3.07
+%compatibility}
% \begin{macrocode}
-\DeclareOptionX{nowarn}{%
- \renewcommand*{\GlossariesWarning}[1]{}%
- \renewcommand*{\GlossariesWarningNoLine}[1]{}%
+ \ifbool{glscompatible-2.07}%
+ {%
+ \booltrue{glscompatible-3.07}%
+ }%
+ {}%
}
+\boolfalse{glscompatible-2.07}
% \end{macrocode}
-%\begin{option}{compatible-2.07}
-%\changes{3.0}{2011/04/02}{compatible-2.07 option added}
+%\end{option}
+%
+%\begin{option}{symbols}
+% Create a \qt{symbols} glossary type
+%\changes{3.11a}{2013-10-15}{new}
% \begin{macrocode}
-\define@boolkey{glossaries.sty}[gls]{compatible-2.07}[true]{}
-\csname glscompatible-2.07false\endcsname
+\newcommand{\@gls@do@symbolsdef}{}
+\DeclareOptionX{symbols}{%
+ \renewcommand{\@gls@do@symbolsdef}{%
+ \newglossary[slg]{symbols}{sls}{slo}{\glssymbolsgroupname}%
+ \newcommand*{\printsymbols}[1][]{\printglossary[type=symbols,#1]}%
+ }%
+}
+% \end{macrocode}
+%\end{option}
+%\begin{option}{numbers}
+% Create a \qt{symbols} glossary type
+%\changes{3.11a}{2013-10-15}{new}
+% \begin{macrocode}
+\newcommand{\@gls@do@numbersdef}{}
+\DeclareOptionX{numbers}{%
+ \renewcommand{\@gls@do@numbersdef}{%
+ \newglossary[nlg]{numbers}{nls}{nlo}{\glsnumbersgroupname}%
+ \newcommand*{\printnumbers}[1][]{\printglossary[type=numbers,#1]}%
+ }%
+}
% \end{macrocode}
%\end{option}
%
@@ -1404,6 +1700,48 @@ name=true]{%
% \begin{macrocode}
\ProcessOptionsX
% \end{macrocode}
+% Load backward compatibility stuff:
+% \begin{macrocode}
+\RequirePackage{glossaries-compatible-307}
+% \end{macrocode}
+%
+%\begin{macro}{\setupglossaries}
+%\changes{3.11a}{2013-10-15}{new}
+% Provide way to set options after package has been loaded. However,
+% some options must be set before \cs{ProcessOptionsX}, so they have
+% to be disabled:
+% \begin{macrocode}
+\disable@keys{glossaries.sty}{compatible-2.07,%
+ xindy,xindygloss,makeindex,%
+ acronym,translate,notranslate,nolong,nosuper,notree,nostyles,nomain}
+% \end{macrocode}
+%Now define \cs{setupglossaries}:
+% \begin{macrocode}
+\newcommand*{\setupglossaries}[1]{%
+ \renewcommand*{\@gls@setacrstyle}{}%
+ \ifglsacrshortcuts
+ \def\@gls@setupshortcuts{\glsacrshortcutstrue}%
+ \else
+ \def\@gls@setupshortcuts{%
+ \ifglsacrshortcuts
+ \DefineAcronymSynonyms
+ \fi
+ }%
+ \fi
+ \glsacrshortcutsfalse
+ \let\@gls@do@numbersdef\relax
+ \let\@gls@do@symbolssdef\relax
+ \let\@gls@do@acronymsdef\relax
+ \setkeys{glossaries.sty}{#1}%
+ \@gls@setacrstyle
+ \@gls@setupshortcuts
+ \@gls@do@acronymsdef
+ \@gls@do@numbersdef
+ \@gls@do@symbolssdef
+}
+% \end{macrocode}
+%\end{macro}
+%
% If \isty{babel} package is loaded, check to see if
% \isty{translator} is installed, but only if translation is
% required.
@@ -1432,7 +1770,6 @@ name=true]{%
}
\fi
% \end{macrocode}
-%
% If chapters are defined and the user has requested the
% section counter as a package option, \cs{@chapter} will
% be modified so
@@ -1474,12 +1811,13 @@ name=true]{%
% must be disabled after \ics{makeglossaries}.
% \begin{macrocode}
\newcommand*{\@onlypremakeg}[1]{%
-\ifx\@gls@onlypremakeg\@empty
- \def\@gls@onlypremakeg{#1}%
-\else
- \expandafter\toks@\expandafter{\@gls@onlypremakeg}%
- \edef\@gls@onlypremakeg{\the\toks@,\noexpand#1}%
-\fi}
+ \ifx\@gls@onlypremakeg\@empty
+ \def\@gls@onlypremakeg{#1}%
+ \else
+ \expandafter\toks@\expandafter{\@gls@onlypremakeg}%
+ \edef\@gls@onlypremakeg{\the\toks@,\noexpand#1}%
+ \fi
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@disable@onlypremakeg}
@@ -1614,7 +1952,7 @@ name=true]{%
% \isty{babel} captions, otherwise load \isty{translator}
% dictionary.
%\changes{1.1}{2008 Feb 22}{Added support for translator package}
-%\changes{1.15}{2008 August 15}{Added 'glssettoctitle}
+%\changes{1.15}{2008 August 15}{Added \cs{glssettoctitle}}
% \begin{macrocode}
\@ifpackageloaded{translator}{%
\usedictionary{glossaries-dictionary}%
@@ -1677,6 +2015,11 @@ name=true]{%
\@ifpackageloaded{babel}{%
\RequirePackage{glossaries-babel}}{}%
}}
+\else
+% \end{macrocode}
+%\changes{3.13a}{2013-11-05}{added cs{@gls@nottranslatorhook} to else clause}
+% \begin{macrocode}
+ \@gls@notranslatorhook
\fi
% \end{macrocode}
%\begin{macro}{\nopostdesc}
@@ -1699,6 +2042,12 @@ name=true]{%
}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\@no@post@desc}
+% Used for comparison purposes.
+% \begin{macrocode}
+\newcommand*{\@no@post@desc}{\nopostdesc}
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\glspar}
% Provide means of having a paragraph break in glossary entries
% \begin{macrocode}
@@ -1923,7 +2272,7 @@ name=true]{%
\ifglossaryexists{#1}{%
\csgdef{@glossarypreamble@#1}{#2}%
}{%
- \PackageWarning{glossaries}{%
+ \GlossariesWarning{%
Glossary `#1' is not defined%
}%
}%
@@ -1957,8 +2306,10 @@ name=true]{%
% style.) If \ics{phantomsection}
% is defined, it uses \cs{\@p@glossarysection}, otherwise it
% uses \cs{@glossarysection}.
-%\changes{1.05}{2007 Aug 10}{added '@mkboth to 'glossarysection}
-%\changes{2.02}{2009 July 13}{changed '@mkboth to 'glossarymark}
+%\changes{1.05}{2007 Aug 10}{added \cs{@mkboth} to
+%\cs{glossarysection}}
+%\changes{2.02}{2009 July 13}{changed \cs{@mkboth} to
+%\cs{glossarymark}}
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
%\cs{ifcsundef}}
% \begin{macrocode}
@@ -1971,55 +2322,65 @@ name=true]{%
{%
\@p@glossarysection{#1}{#2}%
}%
- \glossarymark{\glossarytoctitle}%
+% \end{macrocode}
+%\changes{3.13a}{2013-11-05}{changed \cs{glossarymark} to \cs{glsglossarymark}}
+% \begin{macrocode}
+ \glsglossarymark{\glossarytoctitle}%
}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\glossarymark}
+%\begin{macro}{\glsglossarymark}
%\changes{2.02}{2009 July 13}{New}
%\changes{2.03}{2009 Sep 23}{Added check to see if it's already
%defined}
-% Sets the header mark for the glossary. Takes the glossary short
-% (TOC) title as the argument.
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
%\cs{ifcsundef}}
+%\changes{3.11a}{2013-10-15}{replaced \cs{MakeUppercase} with
+%\cs{mfirstucMakeUppercase}}
+%\changes{3.13a}{2013-11-05}{renamed \cs{glossarymark} to
+%\cs{glsglossarymark} to avoid conflict with memoir}
+% Sets the header mark for the glossary. Takes the glossary short
+% (TOC) title as the argument.
% \begin{macrocode}
\ifcsundef{glossarymark}%
{%
- \ifglsucmark
- \newcommand{\glossarymark}[1]{%
- \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
- }
- \else
- \newcommand{\glossarymark}[1]{\@mkboth{#1}{#1}}
- \fi
+ \newcommand{\glsglossarymark}[1]{\glossarymark{#1}}
}%
{%
- \GlossariesWarning{overriding \string\glossarymark}%
- \@ifclassloaded{memoir}%
- {
- \ifglsucmark
- \renewcommand{\glossarymark}[1]{%
- \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
- }
- \else
- \renewcommand{\glossarymark}[1]{%
+ \@ifclassloaded{memoir}
+ {%
+ \newcommand{\glsglossarymark}[1]{%
+ \ifglsucmark
\markboth{\memUChead{#1}}{\memUChead{#1}}%
- }
- \fi
- }
- {
- \ifglsucmark
- \renewcommand{\glossarymark}[1]{%
- \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
- }
- \else
- \renewcommand{\glossarymark}[1]{\@mkboth{#1}{#1}}
- \fi
+ \else
+ \markboth{#1}{#1}%
+ \fi
+ }
+ }%
+ {%
+ \newcommand{\glsglossarymark}[1]{%
+ \ifglsucmark
+ \@mkboth{\mfirstucMakeUppercase{#1}}{\mfirstucMakeUppercase{#1}}%
+ \else
+ \@mkboth{#1}{#1}%
+ \fi
+ }
}
}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\glossarymark}
+% Provided for backward compatibility:
+% \begin{macrocode}
+\providecommand{\glossarymark}[1]{%
+ \ifglsucmark
+ \@mkboth{\mfirstucMakeUppercase{#1}}{\mfirstucMakeUppercase{#1}}%
+ \else
+ \@mkboth{#1}{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
%
% The required sectional unit is given by \cs{@@glossarysec}
% which was defined by the \pkgopt{section} package option. The
@@ -2041,13 +2402,14 @@ name=true]{%
%\changes{1.1}{2008 Feb 22}{numbered sections and auto label added}
% \begin{macrocode}
\newcommand*{\@glossarysection}[2]{%
-\ifx\@@glossarysecstar\@empty
- \csname\@@glossarysec\endcsname{#2}%
-\else
- \csname\@@glossarysec\endcsname*{#2}%
- \@gls@toc{#1}{\@@glossarysec}%
-\fi
-\@@glossaryseclabel}
+ \ifx\@@glossarysecstar\@empty
+ \csname\@@glossarysec\endcsname{#2}%
+ \else
+ \csname\@@glossarysec\endcsname*{#2}%
+ \@gls@toc{#1}{\@@glossarysec}%
+ \fi
+ \@@glossaryseclabel
+}
% \end{macrocode}
%\end{macro}
%
@@ -2060,15 +2422,16 @@ name=true]{%
%\changes{1.1}{2008 Feb 22}{numbered sections and auto label added}
% \begin{macrocode}
\newcommand*{\@p@glossarysection}[2]{%
-\glsclearpage
-\phantomsection
-\ifx\@@glossarysecstar\@empty
- \csname\@@glossarysec\endcsname{#2}%
-\else
- \@gls@toc{#1}{\@@glossarysec}%
- \csname\@@glossarysec\endcsname*{#2}%
-\fi
-\@@glossaryseclabel}
+ \glsclearpage
+ \phantomsection
+ \ifx\@@glossarysecstar\@empty
+ \csname\@@glossarysec\endcsname{#2}%
+ \else
+ \@gls@toc{#1}{\@@glossarysec}%
+ \csname\@@glossarysec\endcsname*{#2}%
+ \fi
+ \@@glossaryseclabel
+}
% \end{macrocode}
%\end{macro}
%
@@ -2124,13 +2487,14 @@ name=true]{%
%\changes{1.1}{2008 Feb 22}{numberline added}
% \begin{macrocode}
\newcommand*{\@gls@toc}[2]{%
-\ifglstoc
- \ifglsnumberline
- \addcontentsline{toc}{#2}{\numberline{}#1}%
- \else
- \addcontentsline{toc}{#2}{#1}%
+ \ifglstoc
+ \ifglsnumberline
+ \addcontentsline{toc}{#2}{\numberline{}#1}%
+ \else
+ \addcontentsline{toc}{#2}{#1}%
+ \fi
\fi
-\fi}
+}
% \end{macrocode}
%\end{macro}
%
@@ -2689,13 +3053,14 @@ name=true]{%
\renewcommand*{\gls@codepage}{#1}%
}
% \end{macrocode}
-%\changes{}{}{}
+%\changes{3.07}{2013-07-05}{Added check for fontspec}
% Suggested by egreg:
% \begin{macrocode}
-\AtBeginDocument{
- \ifx\gls@codepage\@empty
- \@ifpackageloaded{fontspec}{\def\gls@codepage{utf8}}{}
-\fi}
+ \AtBeginDocument{%
+ \ifx\gls@codepage\@empty
+ \@ifpackageloaded{fontspec}{\def\gls@codepage{utf8}}{}%
+ \fi
+ }
\else
\newcommand*{\GlsSetXdyCodePage}[1]{%
\glsnoxindywarning\GlsSetXdyCodePage}
@@ -2758,10 +3123,14 @@ name=true]{%
% control sequence which will be set to the entry label in the
% current iteration.
%\changes{2.01}{2009 May 30}{replaced \cs{ifthenelse} with \cs{ifx}}
+%\changes{3.11a}{2013-10-15}{replaced \cs{ifx} with \cs{ifdefempty}}
% \begin{macrocode}
\newcommand*{\forglsentries}[3][\glsdefaulttype]{%
\edef\@@glo@list{\csname glolist@#1\endcsname}%
- \@for#2:=\@@glo@list\do{\ifx#2\@empty\else#3\fi}%
+ \@for#2:=\@@glo@list\do
+ {%
+ \ifdefempty{#2}{}{#3}%
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -2774,8 +3143,11 @@ name=true]{%
% is given by \cs{@@this@glo@}.
% \begin{macrocode}
\newcommand*{\forallglsentries}[3][\@glo@types]{%
-\expandafter\forallglossaries\expandafter[#1]{\@@this@glo@}{%
-\forglsentries[\@@this@glo@]{#2}{#3}}}
+ \expandafter\forallglossaries\expandafter[#1]{\@@this@glo@}%
+ {%
+ \forglsentries[\@@this@glo@]{#2}{#3}%
+ }%
+}
% \end{macrocode}
%\end{macro}
%
@@ -2793,8 +3165,10 @@ name=true]{%
%\end{macro}
%
%\begin{macro}{\ifglsentryexists}
-% To check to see if a glossary entry has been defined use:\\[10pt]
-% \cs{ifglsentryexists}\marg{label}\marg{true text}\marg{false text}\\[10pt]
+% To check to see if a glossary entry has been defined use:
+%\begin{definition}
+% \cs{ifglsentryexists}\marg{label}\marg{true text}\marg{false text}
+%\end{definition}
%where \meta{label} is the entry's label.
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
%\cs{ifcsundef}}
@@ -2807,13 +3181,17 @@ name=true]{%
%
%\begin{macro}{\ifglsused}
% To determine if given glossary entry has been
-% used in the document text yet use:\\[10pt]
-% \cs{ifglsused}\marg{label}\marg{true text}\marg{false text}\\[10pt]
+% used in the document text yet use:
+%\begin{definition}
+% \cs{ifglsused}\marg{label}\marg{true text}\marg{false text}
+%\end{definition}
% where \meta{label} is the entry's label.
% If true it will do \meta{true text}
% otherwise it will do \meta{false text}.
+%\changes{3.11a}{2013-10-15}{replaced \cs{ifthenelse} with
+%\cs{ifbool}}
% \begin{macrocode}
-\newcommand*{\ifglsused}[3]{\ifthenelse{\boolean{glo@#1@flag}}{#2}{#3}}
+\newcommand*{\ifglsused}[3]{\ifbool{glo@#1@flag}{#2}{#3}}
% \end{macrocode}
%\end{macro}
%The following two commands will cause an error if the given
@@ -2884,6 +3262,92 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\ifglshasdesc}
+%\cs{ifglshasdesc}\marg{label}\marg{true part}\marg{false part}
+%\changes{3.08a}{2013-09-28}{new}
+%\changes{3.11a}{2013-10-15}{replaced \cs{ifdefempty} with
+%\cs{ifcsempty}}
+% \begin{macrocode}
+\newcommand*{\ifglshasdesc}[3]{%
+ \ifcsempty{glo@#1@desc}%
+ {#3}%
+ {#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ifglsdescsuppressed}
+%\cs{ifglsdescsuppressed}\marg{label}\marg{true part}\marg{false part}
+%\changes{3.08a}{2013-09-28}{new}
+% Does \meta{true part} if the description is just \cs{nopostdesc}
+% otherwise does \meta{false part}.
+% \begin{macrocode}
+\newcommand*{\ifglsdescsuppressed}[3]{%
+ \ifcsequal{glos@#1@desc}{@no@post@desc}%
+ {#2}%
+ {#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ifglshassymbol}
+%\cs{ifglshassymbol}\marg{label}\marg{true part}\marg{false part}
+%\changes{3.08a}{2013-09-28}{new}
+%\changes{3.09a}{2013-10-09}{changed test to check for
+%\cs{@gls@default@symbol}}
+%\changes{3.11a}{2013-10-15}{replaced \cs{ifdefempty} with
+%\cs{ifcsempty}}
+% \begin{macrocode}
+\newcommand*{\ifglshassymbol}[3]{%
+ \ifcsempty{glo@#1@symbol}%
+ {#3}%
+ {%
+ \expandafter\ifx\csname glo@#1@symbol\endcsname\@gls@default@value
+ #3%
+ \else
+ #2%
+ \fi
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ifglshaslong}
+%\cs{ifglshaslong}\marg{label}\marg{true part}\marg{false part}
+%\changes{3.11a}{2013-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\ifglshaslong}[3]{%
+ \ifcsempty{glo@#1@long}%
+ {#3}%
+ {%
+ \expandafter\ifx\csname glo@#1@long\endcsname\@gls@default@value
+ #3%
+ \else
+ #2%
+ \fi
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ifglshasshort}
+%\cs{ifglshasshort}\marg{label}\marg{true part}\marg{false part}
+%\changes{3.11a}{2013-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\ifglshasshort}[3]{%
+ \ifcsempty{glo@#1@short}%
+ {#3}%
+ {%
+ \expandafter\ifx\csname glo@#1@short\endcsname\@gls@default@value
+ #3%
+ \else
+ #2%
+ \fi
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\subsection{Defining new glossaries}\label{sec:newglos}
% A comma-separated list of glossary names is stored
% in \cs{@glo@types}. When a new glossary type
@@ -2896,9 +3360,45 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@gls@provide@newglossary}
+%\changes{3.10a}{2013-10-13}{new}
+% If the user removes the glossary package from their document,
+% ensure the next run doesn't throw a load of undefined control
+% sequence errors when the aux file is parsed.
+% \begin{macrocode}
+\newcommand*\@gls@provide@newglossary{%
+ \protected@write\@auxout{}{\string\providecommand\string\@newglossary[4]{}}%
+% \end{macrocode}
+% Only need to do this once.
+% \begin{macrocode}
+ \let\@gls@provide@newglossary\relax
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\defglsentryfmt}
+%\changes{3.11a}{2013-10-15}{new}
+% Allow different glossaries to have different display styles.
+% \begin{macrocode}
+\newcommand*{\defglsentryfmt}[2][\glsdefaulttype]{%
+ \csgdef{gls@#1@entryfmt}{#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\gls@doentryfmt}
+%\changes{3.11a}{2013-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\gls@doentryfmt}[1]{\csuse{gls@#1@entryfmt}}
+% \end{macrocode}
+%\end{macro}
+%
% A new glossary type is defined using \cs{newglossary}.
-% Syntax:\\[10pt]\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}%
-%\marg{title}\oarg{counter}\\[10pt]%
+% Syntax:
+%\begin{definition}
+%\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}%
+%\marg{title}\oarg{counter}
+%\end{definition}
% where \meta{log-ext} is the extension of the \app{makeindex}
% transcript file, \meta{in-ext} is the extension of the glossary
% input file (read in by \ics{printglossary} and created by
@@ -2915,17 +3415,20 @@ name=true]{%
%\begin{macro}{\newglossary}
% \begin{macrocode}
\newcommand*{\newglossary}[5][glg]{%
-\ifglossaryexists{#2}{%
- \PackageError{glossaries}{Glossary type `#2' already exists}{%
- You can't define a new glossary called `#2' because it already
- exists}%
-}{%
+ \ifglossaryexists{#2}%
+ {%
+ \PackageError{glossaries}{Glossary type `#2' already exists}{%
+ You can't define a new glossary called `#2' because it already
+ exists}%
+ }%
+ {%
% \end{macrocode}
% Check if default has been set
% \begin{macrocode}
- \ifx\glsdefaulttype\relax
+ \ifundef\glsdefaulttype
+ {%
\gdef\glsdefaulttype{#2}%
- \fi
+ }{}%
% \end{macrocode}
% Add this to the list of glossary types:
% \begin{macrocode}
@@ -2943,12 +3446,16 @@ name=true]{%
\expandafter\def\csname @glotype@#2@in\endcsname{#3}%
\expandafter\def\csname @glotype@#2@out\endcsname{#4}%
\expandafter\def\csname @glotype@#2@title\endcsname{#5}%
+% \end{macrocode}
+%\changes{3.10a}{2013-10-13}{added \cs{@gls@provide@newglossary}}
+% \begin{macrocode}
+ \@gls@provide@newglossary
\protected@write\@auxout{}{\string\@newglossary{#2}{#1}{#3}{#4}}%
% \end{macrocode}
% How to display this entry in the document text (uses
-% \cs{glsdisplay} and \cs{glsdisplayfirst} by
-% default). These can be redefined by the user later if required
-% (see \ics{defglsdisplay} and \ics{defglsdisplayfirst}). These
+% \cs{glsentry} by
+% default). This can be redefined by the user later if required
+% (see \ics{defglsentry}). This
% may already have been defined if this has been specified as
% a list of acronyms.
%\changes{2.04}{2009 November 10}{added check to determine if
@@ -2956,17 +3463,12 @@ name=true]{%
% have been defined.}
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
%\cs{ifcsundef}}
+%\changes{3.11a}{2013-10-15}{replaced \cs{glsdisplay} and
+%\cs{glsdisplayfirst} with \cs{glsentryfmt}}
% \begin{macrocode}
- \ifcsundef{gls@#2@display}%
+ \ifcsundef{gls@#2@entryfmt}%
{%
- \expandafter\gdef\csname gls@#2@display\endcsname{\glsdisplay}%
- }%
- {}%
- \ifcsundef{gls@#2@displayfirst}%
- {%
- \expandafter\gdef\csname gls@#2@displayfirst\endcsname{%
- \glsdisplayfirst
- }%
+ \defglsentryfmt[#2]{\glsentryfmt}%
}%
{}%
% \end{macrocode}
@@ -3031,7 +3533,8 @@ name=true]{%
%\begin{macro}{\@gls@getcounter}
% \begin{macrocode}
\newcommand*{\@gls@getcounter}[1]{%
-\csname @glotype@#1@counter\endcsname}
+ \csname @glotype@#1@counter\endcsname
+}
% \end{macrocode}
%\end{macro}
%
@@ -3040,6 +3543,16 @@ name=true]{%
% \begin{macrocode}
\glsdefmain
% \end{macrocode}
+% Define the \qt{acronym} glossaries if required.
+% \begin{macrocode}
+\@gls@do@acronymsdef
+% \end{macrocode}
+% Define the \qt{symbols} and \qt{numbers} glossaries if required.
+% \begin{macrocode}
+\@gls@do@symbolsdef
+\@gls@do@numbersdef
+% \end{macrocode}
+%
%
%\subsection{Defining new entries}\label{sec:newentry}
% New glossary entries are defined using \cs{newglossaryentry}.
@@ -3068,20 +3581,10 @@ name=true]{%
%\begin{key}{description}
% The \gloskey{description} key is usually only used in
% the glossary, but can be made to appear in the text by redefining
-% \ics{glsdisplay} and \ics{glsdisplayfirst} (or
-% using \ics{defglsdisplay} and \ics{defglsdisplayfirst}), however,
-% you will have to disable the sanitize option (using the
-% \pkgopt{sanitize} package option,
-% "sanitize={description=false}", and protect fragile
-% commands). The \gloskey{description} key is required when
-% defining a new glossary entry. (Be careful not to make the
-% description too long, because \app{makeindex} has a limited
-% buffer. \cs{@glo@desc} is defined to be a short command
-% to discourage lengthy descriptions
-% for this reason. If you do have a very long description, or if
-% you require paragraph breaks, define a separate command that
-% contains the description, and use it as the value to the
-% \gloskey{description} key.)
+% \ics{glsentryfmt} or using \ics{defglsentryfmt}. The
+% \gloskey{description} key is required when
+% defining a new glossary entry. If a long description is required,
+% use \ics{longnewglossaryentry} instead of \ics{newglossaryentry}.
% \begin{macrocode}
\define@key{glossentry}{description}{%
\def\@glo@desc{#1}%
@@ -3103,7 +3606,8 @@ name=true]{%
% not for use in the document). The \gloskey{sort} key is optional
% when defining a new glossary entry. If omitted, the value
% is given by \meta{name} \meta{description}.
-%\changes{1.18}{2009 January 14}{moved sanitization to 'newglossaryentry}
+%\changes{1.18}{2009 January 14}{moved sanitization to
+%\cs{newglossaryentry}}
% \begin{macrocode}
\define@key{glossentry}{sort}{%
\def\@glo@sort{#1}}
@@ -3155,6 +3659,12 @@ name=true]{%
}
% \end{macrocode}
%\end{key}
+%\begin{macro}{\@gls@default@value}
+%\changes{3.09a}{2013-10-09}{new}
+% \begin{macrocode}
+\newcommand*{\@gls@default@value}{\relax}
+% \end{macrocode}
+%\end{macro}
%
%\begin{key}{symbol}
% The \gloskey{symbol} key is ignored by most of the predefined
@@ -3162,12 +3672,10 @@ name=true]{%
% It is provided for glossary styles that require an associated
% symbol, as well as a name and description. To make this value
% appear in the glossary, you need to redefine
-% \ics{glossaryentryfield} so that it uses its fourth parameter.
+% \ics{glossentry}.
% If you want this value to appear in the text when the term is used
% by commands like \ics{gls}, you will need to change
-% \ics{glsdisplay} and \ics{glsdisplayfirst} (either
-% explicitly for all glossaries or via \ics{defglsdisplay}
-% and \ics{defglsdisplayfirst} for individual glossaries).
+% \ics{glsentryfmt} (or use for \ics{defglsentryfmt} individual glossaries).
% \begin{macrocode}
\define@key{glossentry}{symbol}{%
\def\@glo@symbol{#1}%
@@ -3219,14 +3727,28 @@ name=true]{%
% The \gloskey{see} key specifies a list of cross-references
% \changes{1.17}{2008 December 26}{new}
% \changes{3.0}{2011/04/02}{added \cs{@glo@seeautonumberlist}}
+%\changes{3.13a}{2013-11-05}{added \cs{gls@checkseeallowed}}
% \begin{macrocode}
\define@key{glossentry}{see}{%
+ \gls@checkseeallowed
\def\@glo@see{#1}%
\@glo@seeautonumberlist
}
% \end{macrocode}
%\end{key}
%
+%\begin{macro}{\gls@checkseeallowed}
+%\changes{3.13a}{2013-11-05}{new}
+% \begin{macrocode}
+\newcommand*{\gls@checkseeallowed}{%
+ \PackageError{glossaries}%
+ {`see' key may only be used after \string\makeglossaries}%
+ {You must use \string\makeglossaries\space before defining
+ any entries that have a `see' key}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{key}{parent}
% The \gloskey{parent} key specifies the parent entry, if
% required.
@@ -3354,11 +3876,29 @@ name=true]{%
haven't specified the entry name}}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\@glsnodesc}
+% \changes{3.10a}{2013-10-13}{new}
+% Define command to generate error if \gloskey{description} key is missing.
+% \begin{macrocode}
+\newcommand*\@glsnodesc{%
+ \PackageError{glossaries}
+ {%
+ description key required in \string\newglossaryentry\space
+ for entry `\@glo@label'%
+ }%
+ {%
+ You haven't specified the entry description%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@glsdefaultplural}
-% Define command to set default plural.
% \changes{1.17}{2008 December 26}{new}
+%\changes{3.10a}{2013-10-13}{Obsolete}
+% Now obsolete. Don't use.
% \begin{macrocode}
-\newcommand*{\@glsdefaultplural}{\@glo@text\glspluralsuffix}
+\newcommand*{\@glsdefaultplural}{}
% \end{macrocode}
%\end{macro}
%
@@ -3398,6 +3938,131 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@gls@noexpand@field}
+% \begin{macrocode}
+\newcommand{\@@gls@noexpand@field}[3]{%
+ \expandafter\global\expandafter
+ \let\csname glo@#1@#2\endcsname#3%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@gls@noexpand@fields}
+% \begin{macrocode}
+\newcommand{\@gls@noexpand@fields}[4]{%
+ \ifcsdef{gls@assign@#3@field}
+ {%
+ \ifdefequal{#4}{\@gls@default@value}%
+ {%
+ \edef\@gls@value{\expandonce{#1}}%
+ \csuse{gls@assign@#3@field}{#2}{\@gls@value}%
+ }%
+ {%
+ \csuse{gls@assign@#3@field}{#2}{#4}%
+ }%
+ }%
+ {%
+ \ifdefequal{#4}{\@gls@default@value}%
+ {%
+ \edef\@gls@value{\expandonce{#1}}%
+% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{Fixed bug \texttt{expand} replaced with
+%\texttt{noexpand}}
+% \begin{macrocode}
+ \@@gls@noexpand@field{#2}{#3}{\@gls@value}%
+ }%
+ {%
+ \@@gls@noexpand@field{#2}{#3}{#4}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@@gls@expand@field}
+% \begin{macrocode}
+\newcommand{\@@gls@expand@field}[3]{%
+ \expandafter
+ \protected@xdef\csname glo@#1@#2\endcsname{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{@gls@expand@fields}
+% \begin{macrocode}
+\newcommand{\@gls@expand@fields}[4]{%
+ \ifcsdef{gls@assign@#3@field}
+ {%
+ \ifdefequal{#4}{\@gls@default@value}%
+ {%
+ \edef\@gls@value{\expandonce{#1}}%
+ \csuse{gls@assign@#3@field}{#2}{\@gls@value}%
+ }%
+ {%
+ \expandafter\@gls@startswithexpandonce#4\relax\relax\gls@endcheck
+ {%
+ \@@gls@expand@field{#2}{#3}{#4}%
+ }%
+ {%
+ \csuse{gls@assign@#3@field}{#2}{#4}%
+ }%
+ }%
+ }%
+ {%
+ \ifdefequal{#4}{\@gls@default@value}%
+ {%
+ \@@gls@expand@field{#2}{#3}{#1}%
+ }%
+ {%
+ \@@gls@expand@field{#2}{#3}{#4}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@gls@startswithexpandonce}
+% \begin{macrocode}
+\def\@gls@expandonce{\expandonce}
+\def\@gls@startswithexpandonce#1#2\gls@endcheck#3#4{%
+ \def\@gls@tmp{#1}%
+ \ifdefequal{\@gls@expandonce}{\@gls@tmp}{#3}{#4}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\gls@assign@field}
+%\begin{definition}
+%\cs{gls@assign@field}\marg{def value}\marg{glossary type}\marg{field}\marg{tmp
+%cs}
+%\end{definition}
+% Assigns an entry field. Expansion performed by default (except for
+% name, symbol and description where backward compatibility required).
+% If \meta{tmp cs} is \meta{@gls@default@value}, \meta{def value} is
+% used instead.
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\let\gls@assign@field\@gls@expand@fields
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsexpandfields}
+%\changes{3.08a}{2013-09-28}{new}
+% Fully expand values when assigning fields (except for specific
+% fields that are overridden by \cs{glssetnoexpandfield}).
+% \begin{macrocode}
+\newcommand*{\glsexpandfields}{%
+ \let\gls@assign@field\@gls@expand@fields
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsnoexpandfields}
+%\changes{3.08a}{2013-09-28}{new}
+% Don't expand values when assigning fields (except for specific
+% fields that are overridden by \cs{glssetexpandfield}).
+% \begin{macrocode}
+\newcommand*{\glsnoexpandfields}{%
+ \let\gls@assign@field\@gls@noexpand@fields
+}
+% \end{macrocode}
+%\end{macro}
+%
+%
%\begin{macro}{\newglossaryentry}
% Define \cs{newglossaryentry}%
% \marg{label} \marg{key-val list}.
@@ -3413,73 +4078,408 @@ name=true]{%
% \begin{macrocode}
\glsdoifnoexists{#1}%
{%
+ \gls@defglossaryentry{#1}{#2}%
+ }%
+}
% \end{macrocode}
-% Store label
+%\end{macro}
+%
+%\begin{macro}{\provideglossaryentry}
+% Like \cs{newglossaryentry} but does nothing if the entry has
+% already been defined.
+%\changes{3.14a}{2013-11-12}{new}
% \begin{macrocode}
- \def\@glo@label{#1}%
+\newrobustcmd{\provideglossaryentry}[2]{%
+ \ifglsentryexists{#1}%
+ {}%
+ {%
+ \gls@defglossaryentry{#1}{#2}%
+ }%
+}
+\@onlypreamble{\provideglossaryentry}
% \end{macrocode}
-% Set up defaults. If the \gloskey{name} or \gloskey{description}
-% keys are omitted, an error will be generated.
+%\end{macro}
+%
+%\begin{macro}{\new@glossaryentry}
+%\changes{3.10a}{2013-10-13}{new}
+% For use in document environment.
% \begin{macrocode}
- \let\@glo@name\@glsnoname
+\newrobustcmd{\new@glossaryentry}[2]{%
+ \ifundef\@gls@deffile
+ {%
+ \global\newwrite\@gls@deffile
+ \immediate\openout\@gls@deffile=\jobname.glsdefs
+ }%
+ {}%
+ \ifglsentryexists{#1}{}%
+ {%
+ \gls@defglossaryentry{#1}{#2}%
+ }%
+ \@gls@writedef{#1}%
+}
+\AtBeginDocument
+{
+ \makeatletter
+ \InputIfFileExists{\jobname.glsdefs}{}{}%
+ \makeatother
+ \let\newglossaryentry\new@glossaryentry
+}
+\AtEndDocument{\ifdef\@gls@deffile{\closeout\@gls@deffile}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@gls@writedef}
+%\changes{3.10a}{2013-10-13}{new}
+% Writes glossary entry definition to \cs{@gls@deffile}.
+% \begin{macrocode}
+\newcommand*{\@gls@writedef}[1]{%
+ \immediate\write\@gls@deffile
+ {%
+ \string\ifglsentryexists{#1}{}\expandafter\@gobble\string\%^^J%
+ \expandafter\@gobble\string\{\expandafter\@gobble\string\%^^J%
+ \string\gls@defglossaryentry{#1}\expandafter\@gobble\string\%^^J%
+ \expandafter\@gobble\string\{\expandafter\@gobble\string\%%
+ }%
% \end{macrocode}
-%\changes{1.08}{2007 Oct 13}{Fixed error message to say ``description
-%key'' rather than ``desc key''}
+% Write key value information:
% \begin{macrocode}
- \def\@glo@desc{%
- \PackageError{glossaries}
- {%
- description key required in \string\newglossaryentry\space
- for entry `\@glo@label'%
+ \@for\@gls@map:=\@gls@keymap\do
+ {%
+ \edef\glo@value{\expandafter\expandonce
+ \csname glo@#1@\expandafter\@secondoftwo\@gls@map\endcsname}%
+ \@onelevel@sanitize\glo@value
+ \immediate\write\@gls@deffile
+ {%
+ \expandafter\@firstoftwo\@gls@map
+ =\expandafter\@gobble\string\{\glo@value\expandafter\@gobble\string\},%
+ \expandafter\@gobble\string\%%
+ }%
+ }%
+% \end{macrocode}
+% Provide hook:
+% \begin{macrocode}
+ \glswritedefhook
+ \immediate\write\@gls@deffile
+ {%
+ \expandafter\@gobble\string\%^^J%
+ \expandafter\@gobble\string\}\expandafter\@gobble\string\%^^J%
+ \expandafter\@gobble\string\}\expandafter\@gobble\string\%%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@gls@keymap}
+%\changes{3.10a}{2013-10-13}{new}
+% List of entry definition key names and corresponding tag in
+% control sequence used to store the value.
+% \begin{macrocode}
+\newcommand*{\@gls@keymap}{%
+ {name}{name},%
+ {sort}{sortvalue},% unescaped sort value
+ {type}{type},%
+ {first}{first},%
+ {firstplural}{firstpl},%
+ {text}{text},%
+ {plural}{plural},%
+ {description}{desc},%
+ {descriptionplural}{descplural},%
+ {symbol}{symbol},%
+ {symbolplural}{symbolplural},%
+ {user1}{useri},%
+ {user2}{userii},%
+ {user3}{useriii},%
+ {user4}{useriv},%
+ {user5}{userv},%
+ {user6}{uservi},%
+ {long}{long},%
+ {longplural}{longpl},%
+ {short}{short},%
+ {shortplural}{shortpl},%
+ {counter}{counter},%
+ {parent}{parent}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsaddkey}
+%\begin{definition}
+%\cs{glsaddkey}\marg{key}\marg{default value}\marg{no link cs}\marg{no link ucfirst
+%cs}\marg{link cs}\marg{link ucfirst cs}\marg{link allcaps cs}
+%\end{definition}
+%\changes{3.12a}{2013-10-16}{new}
+% Allow user to add their own custom keys.
+% \begin{macrocode}
+\newcommand*{\glsaddkey}{\@ifstar\@sglsaddkey\@glsaddkey}
+% \end{macrocode}
+% Starred version switches on expansion for this key.
+% \begin{macrocode}
+\newcommand*{\@sglsaddkey}[1]{%
+ \key@ifundefined{glossentry}{#1}%
+ {%
+ \expandafter\newcommand\expandafter*\expandafter
+ {\csname gls@assign@#1@field\endcsname}[2]{%
+ \@@gls@expand@field{##1}{#1}{##2}%
+ }%
+ }%
+ {}%
+ \@glsaddkey{#1}%
+}
+% \end{macrocode}
+% Unstarred version doesn't override default expansion.
+% \begin{macrocode}
+\newcommand*{\@glsaddkey}[7]{%
+% \end{macrocode}
+% Check the specified key doesn't already exist.
+% \begin{macrocode}
+ \key@ifundefined{glossentry}{#1}%
+ {%
+% \end{macrocode}
+% Set up the key.
+% \begin{macrocode}
+ \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}%
+ \appto\@gls@keymap{,{#1}{#1}}%
+% \end{macrocode}
+% Set the default value.
+% \begin{macrocode}
+ \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}%
+% \end{macrocode}
+% Assignment code.
+% \begin{macrocode}
+ \appto\@newglossaryentryposthook{%
+ \letcs{\@glo@tmp}{@glo@#1}%
+ \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}%
+ }%
+% \end{macrocode}
+% Define the no-link commands.
+% \begin{macrocode}
+ \newcommand*{#3}[1]{\csuse{glo@##1@#1}}%
+ \newcommand*{#4}[1]{%
+ \letcs{\@glo@text}{glo@##1@#1}%
+ \xmakefirstuc\@glo@text
+ }%
+% \end{macrocode}
+% Now for the commands with links. First the version with no case
+% change:
+% \begin{macrocode}
+ \ifcsdef{@gls@user@#1@}%
+ {%
+ \PackageError{glossaries}%
+ {Can't define `\string#5' as helper command
+ `\expandafter\string\csname @gls@user@#1@\endcsname' already exists}%
+ {}%
+ }%
+ {%
+ \newrobustcmd*{#5}{\@ifstar{\csuse{@sgls@user@#1}}{\csuse{@gls@user@#1}}}%
+ \expandafter\newcommand\expandafter*\expandafter
+ {\csname @sgls@user@#1\endcsname}[1][]{%
+ \csuse{@gls@user@#1}[hyper=false,##1]%
+ }%
+ \expandafter\newcommand\expandafter*\expandafter
+ {\csname @gls@user@#1\endcsname}[2][]{%
+ \new@ifnextchar[%
+ {\csuse{@gls@user@#1@}{##1}{##2}}%
+ {\csuse{@gls@user@#1@}{##1}{##2}[]}}%
+ \csdef{@gls@user@#1@}##1##2[##3]{%
+ \glsdoifexists{##2}%
+ {%
+ \edef\@glo@type{\glsentrytype{##2}}%
+ \@gls@link[##1]{##2}{#3{##2}##3}%
+ }%
}%
- {%
- You haven't specified the entry description%
+ }%
+% \end{macrocode}
+% Next the version with the first letter converted to upper case:
+% \begin{macrocode}
+ \ifcsdef{@Gls@user@#1@}%
+ {%
+ \PackageError{glossaries}%
+ {Can't define `\string#6' as helper command
+ `\expandafter\string\csname @Gls@user@#1@\endcsname' already exists}%
+ {}%
+ }%
+ {%
+ \newrobustcmd*{#6}{\@ifstar{\csuse{@sGls@user@#1}}{\csuse{@Gls@user@#1}}}%
+ \expandafter\newcommand\expandafter*\expandafter
+ {\csname @sGls@user@#1\endcsname}[1][]{%
+ \csuse{@Gls@user@#1}[hyper=false,##1]%
+ }%
+ \expandafter\newcommand\expandafter*\expandafter
+ {\csname @Gls@user@#1\endcsname}[2][]{%
+ \new@ifnextchar[%
+ {\csuse{@Gls@user@#1@}{##1}{##2}}%
+ {\csuse{@Gls@user@#1@}{##1}{##2}[]}}%
+ \csdef{@Gls@user@#1@}##1##2[##3]{%
+ \glsdoifexists{##2}%
+ {%
+ \edef\@glo@type{\glsentrytype{##2}}%
+ \@gls@link[##1]{##2}{#4{##2}##3}%
+ }%
+ }%
+ }%
+% \end{macrocode}
+% Finally the all caps version:
+% \begin{macrocode}
+ \ifcsdef{@GLS@user@#1@}%
+ {%
+ \PackageError{glossaries}%
+ {Can't define `\string#7' as helper command
+ `\expandafter\string\csname @GLS@user@#1@\endcsname' already exists}%
+ {}%
+ }%
+ {%
+ \newrobustcmd*{#7}{\@ifstar{\csuse{@sGLS@user@#1}}{\csuse{@GLS@user@#1}}}%
+ \expandafter\newcommand\expandafter*\expandafter
+ {\csname @sGLS@user@#1\endcsname}[1][]{%
+ \csuse{@GLS@user@#1}[hyper=false,##1]%
+ }%
+ \expandafter\newcommand\expandafter*\expandafter
+ {\csname @GLS@user@#1\endcsname}[2][]{%
+ \new@ifnextchar[%
+ {\csuse{@GLS@user@#1@}{##1}{##2}}%
+ {\csuse{@GLS@user@#1@}{##1}{##2}[]}}%
+ \csdef{@GLS@user@#1@}##1##2[##3]{%
+ \glsdoifexists{##2}%
+ {%
+ \edef\@glo@type{\glsentrytype{##2}}%
+ \@gls@link[##1]{##2}{\mfirstucMakeUppercase{#3{##2}##3}}%
+ }%
}%
}%
+ }%
+ {%
+ \PackageError{glossaries}{Key `#1' already exists}{}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glswritedefhook}
+%\changes{3.10a}{2013-10-13}{new}
+% \begin{macrocode}
+\newcommand*{\glswritedefhook}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\gls@assign@desc}
+%\changes{3.11a}{2013-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\gls@assign@desc}[1]{%
+ \gls@assign@field{}{#1}{desc}{\@glo@desc}%
+ \gls@assign@field{\@glo@desc}{#1}{descplural}{\@glo@descplural}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\longnewglossaryentry}
+%\changes{3.11a}{2013-10-15}{new}
+% \begin{macrocode}
+\newcommand{\longnewglossaryentry}[3]{%
+ \glsdoifnoexists{#1}%
+ {%
+ \bgroup
+ \let\@org@newglossaryentryprehook\@newglossaryentryprehook
+ \long\def\@newglossaryentryprehook{%
+ \long\def\@glo@desc{#3\leavevmode\unskip\nopostdesc}%
+ \@org@newglossaryentryprehook
+ }%
+ \renewcommand*{\gls@assign@desc}[1]{%
+ \global\cslet{glo@#1@desc}{\@glo@desc}%
+ \global\cslet{glo@#1@descplural}{\@glo@desc}%
+ }
+ \gls@defglossaryentry{#1}{#2}%
+ \egroup
+ }
+}
+% \end{macrocode}
+% Only allowed in the preamble. (Otherwise a long description could
+% cause problems when writing the entry definition to the temporary
+% file.)
+% \begin{macrocode}
+\@onlypreamble{\longnewglossaryentry}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\longprovideglossaryentry}
+%\changes{3.14a}{2013-11-12}{new}
+% As the above but only defines the entry if it doesn't already
+% exist.
+% \begin{macrocode}
+\newcommand{\longprovideglossaryentry}[3]{%
+ \ifglsentryexists{#1}{}%
+ {\longnewglossaryentry{#1}{#2}{#3}}%
+}
+\@onlypreamble{\longprovideglossaryentry}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\gls@defglossaryentry}
+%\begin{definition}
+%\cs{gls@defglossaryentry}\marg{label}\marg{key-val list}
+%\end{definition}
+% Defines a new entry without checking if it already exists.
+%\changes{3.10a}{2013-10-13}{new}
+% \begin{macrocode}
+\newcommand{\gls@defglossaryentry}[2]{%
+% \end{macrocode}
+% Store label
+% \begin{macrocode}
+ \def\@glo@label{#1}%
+% \end{macrocode}
+% \changes{3.12a}{2013-10-16}{added \cs{glslabel}}
+% Provide a means for user define keys to reference the label:
+% \begin{macrocode}
+ \let\glslabel\@glo@label
+% \end{macrocode}
+% Set up defaults. If the \gloskey{name} or \gloskey{description}
+% keys are omitted, an error will be generated.
+% \begin{macrocode}
+ \let\@glo@name\@glsnoname
+ \let\@glo@desc\@glsnodesc
% \end{macrocode}
% \changes{1.12}{2008 Mar 8}{descriptionplural support added}
% \begin{macrocode}
- \def\@glo@descplural{\@glo@desc}%
+ \let\@glo@descplural\@gls@default@value
% \end{macrocode}
% \begin{macrocode}
- \def\@glo@type{\glsdefaulttype}%
- \def\@glo@symbol{\relax}%
+ \let\@glo@type\@gls@default@value
+ \let\@glo@symbol\@gls@default@value
% \end{macrocode}
% \changes{1.12}{2008 Mar 8}{symbolplural support added}
% \begin{macrocode}
- \def\@glo@symbolplural{\@glo@symbol}%
+ \let\@glo@symbolplural\@gls@default@value
% \end{macrocode}
% \begin{macrocode}
- \def\@glo@text{\@glo@name}%
+ \let\@glo@text\@gls@default@value
% \end{macrocode}
% \begin{macrocode}
- \let\@glo@plural\@glsdefaultplural
+ \let\@glo@plural\@gls@default@value
% \end{macrocode}
% \changes{1.13}{2008 May 10}{Changed default first value}
% Using \cs{let} instead of \cs{def} to make later comparison
% avoid expansion issues. (Thanks to Ulrich~Diez for suggesting
% this.)
% \changes{1.16}{2008 August 27}{Changed def to let}
+%\changes{3.10a}{2013-10-13}{Changed to using \cs{@gls@default@value}}
% \begin{macrocode}
- \let\@glo@first\relax
+ \let\@glo@first\@gls@default@value
% \end{macrocode}
% \changes{1.12}{2008 Mar 8}{Changed default first plural to be first
% key with s appended (was text key with s appended)}
% \changes{1.13}{2008 May 10}{Changed default firstplural value}
% \begin{macrocode}
- \let\@glo@firstplural\relax
+ \let\@glo@firstplural\@gls@default@value
% \end{macrocode}
% Set the default sort:
+%\changes{3.10a}{2013-10-13}{Changed to using \cs{@gls@default@value}}
%\changes{1.05}{2007 Aug 10}{Changed the default value of the sort
% key to just the value of the name key}%
%\changes{1.18}{2009 January 14}{Changed default value of sort
-% to '@glsdefaultsort}
+% to \cs{@glsdefaultsort}}
% \begin{macrocode}
- \let\@glo@sort\@glsdefaultsort
+ \let\@glo@sort\@gls@default@value
% \end{macrocode}
% Set the default counter:
% \begin{macrocode}
- \def\@glo@counter{\@gls@getcounter{\@glo@type}}%
+ \let\@glo@counter\@gls@default@value
% \end{macrocode}
%\changes{1.17}{2008 December 26}{added see key}
% \begin{macrocode}
@@ -3517,6 +4517,23 @@ name=true]{%
% \begin{macrocode}
\setkeys{glossentry}{#2}%
% \end{macrocode}
+%\changes{3.14a}{2013-11-12}{added check for existence of default glossary}
+% Check there is a default glossary.
+% \begin{macrocode}
+ \ifundef\glsdefaulttype
+ {%
+ \PackageError{glossaries}%
+ {No default glossary type (have you used `nomain'?)}%
+ {If you use package option `nomain' you must define
+ a new glossary before you can define entries}%
+ }%
+ {}%
+% \end{macrocode}
+% Assign type. This must be fully expandable
+% \begin{macrocode}
+ \gls@assign@field{\glsdefaulttype}{#1}{type}{\@glo@type}%
+ \edef\@glo@type{\glsentrytype{#1}}%
+% \end{macrocode}
% Check to see if this glossary type has been defined, if it has,
% add this label to the relevant list, otherwise generate an error.
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
@@ -3525,7 +4542,7 @@ name=true]{%
\ifcsundef{glolist@\@glo@type}%
{%
\PackageError{glossaries}%
- {Glossary type '\@glo@type' has not been defined}%
+ {Glossary type `\@glo@type' has not been defined}%
{You need to define a new glossary type, before making entries
in it}%
}%
@@ -3580,7 +4597,7 @@ name=true]{%
% \end{macrocode}
% If name and plural haven't been specified, use same as the parent
% \begin{macrocode}
- \ifx\@glo@plural\@glsdefaultplural
+ \ifx\@glo@plural\@gls@default@value
\expandafter\let\expandafter\@glo@plural
\csname glo@\@glo@parent @plural\endcsname
\fi
@@ -3609,64 +4626,60 @@ name=true]{%
% \begin{macrocode}
\expandafter\xdef\csname glo@#1@level\endcsname{\number\gls@level}%
% \end{macrocode}
-% Check if \gloskey{first} and \gloskey{firstplural} have been use.
-% If \gloskey{firstplural} hasn't been specified, but \gloskey{first}
-% has been specified, then form \gloskey{firstplural} by appending
-% \cs{glspluralsuffix} to value of \gloskey{first} key, otherwise
-% obtain the value from the \gloskey{plural} key.
-% \changes{1.16}{2008 August 27}{Changed if to ifx}
-% This now uses \cs{ifx} instead of \cs{if} to avoid expansion
-% issues. (Thanks to Ulrich~Diez for suggesting this.)
-% \begin{macrocode}
- \ifx\relax\@glo@firstplural
- \ifx\relax\@glo@first
- \def\@glo@firstplural{\@glo@plural}%
- \def\@glo@first{\@glo@text}%
- \else
- \def\@glo@firstplural{\@glo@first\glspluralsuffix}%
- \fi
+% Define commands associated with this entry:
+% \begin{macrocode}
+ \gls@assign@field{\@glo@name}{#1}{sortvalue}{\@glo@sort}%
+ \letcs\@glo@sort{glo@#1@sortvalue}%
+ \gls@assign@field{\@glo@name}{#1}{text}{\@glo@text}%
+ \expandafter\gls@assign@field\expandafter
+ {\csname glo@#1@text\endcsname\glspluralsuffix}%
+ {#1}{plural}{\@glo@plural}%
+ \expandafter\gls@assign@field\expandafter
+ {\csname glo@#1@text\endcsname}%
+ {#1}{first}{\@glo@first}%
+% \end{macrocode}
+%\changes{3.14a}{2013-11-12}{set the default for firstplural to be the value
+%of plural}
+%\changes{4.0}{2013-11-14}{added check for first key}
+% If \gloskey{first} has been specified, make the default by appending
+% \cs{glspluralsuffix}, otherwise make the default the value of the
+% \gloskey{plural} key.
+% \begin{macrocode}
+ \ifx\@glo@first\@gls@default@value
+ \expandafter\gls@assign@field\expandafter
+ {\csname glo@#1@plural\endcsname}%
+ {#1}{firstpl}{\@glo@firstplural}%
\else
- \ifx\relax\@glo@first
- \def\@glo@first{\@glo@text}%
- \fi
+ \expandafter\gls@assign@field\expandafter
+ {\csname glo@#1@first\endcsname\glspluralsuffix}%
+ {#1}{firstpl}{\@glo@firstplural}%
\fi
% \end{macrocode}
-% Define commands associated with this entry:
+%\changes{3.11a}{2013-10-15}{Fixed default counter if none supplied}
% \begin{macrocode}
- \expandafter
- \protected@xdef\csname glo@#1@text\endcsname{\@glo@text}%
- \expandafter
- \protected@xdef\csname glo@#1@plural\endcsname{\@glo@plural}%
- \expandafter
- \protected@xdef\csname glo@#1@first\endcsname{\@glo@first}%
- \expandafter
- \protected@xdef\csname glo@#1@firstpl\endcsname{\@glo@firstplural}%
- \expandafter
- \protected@xdef\csname glo@#1@type\endcsname{\@glo@type}%
- \expandafter
- \protected@xdef\csname glo@#1@counter\endcsname{\@glo@counter}%
- \expandafter
- \protected@xdef\csname glo@#1@useri\endcsname{\@glo@useri}%
- \expandafter
- \protected@xdef\csname glo@#1@userii\endcsname{\@glo@userii}%
- \expandafter
- \protected@xdef\csname glo@#1@useriii\endcsname{\@glo@useriii}%
- \expandafter
- \protected@xdef\csname glo@#1@useriv\endcsname{\@glo@useriv}%
- \expandafter
- \protected@xdef\csname glo@#1@userv\endcsname{\@glo@userv}%
- \expandafter
- \protected@xdef\csname glo@#1@uservi\endcsname{\@glo@uservi}%
- \expandafter
- \protected@xdef\csname glo@#1@short\endcsname{\@glo@short}%
- \expandafter
- \protected@xdef\csname glo@#1@shortpl\endcsname{\@glo@shortpl}%
- \expandafter
- \protected@xdef\csname glo@#1@long\endcsname{\@glo@long}%
- \expandafter
- \protected@xdef\csname glo@#1@longpl\endcsname{\@glo@longpl}%
- \@gls@sanitizename
- \expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}%
+ \ifcsundef{@glotype@\@glo@type @counter}%
+ {%
+ \def\@glo@defaultcounter{\glscounter}%
+ }%
+ {%
+ \letcs\@glo@defaultcounter{@glotype@\@glo@type @counter}%
+ }%
+ \gls@assign@field{\@glo@defaultcounter}{#1}{counter}{\@glo@counter}%
+ \gls@assign@field{}{#1}{useri}{\@glo@useri}%
+ \gls@assign@field{}{#1}{userii}{\@glo@userii}%
+ \gls@assign@field{}{#1}{useriii}{\@glo@useriii}%
+ \gls@assign@field{}{#1}{useriv}{\@glo@useriv}%
+ \gls@assign@field{}{#1}{userv}{\@glo@userv}%
+ \gls@assign@field{}{#1}{uservi}{\@glo@uservi}%
+ \gls@assign@field{}{#1}{short}{\@glo@short}%
+ \gls@assign@field{}{#1}{shortpl}{\@glo@shortpl}%
+ \gls@assign@field{}{#1}{long}{\@glo@long}%
+ \gls@assign@field{}{#1}{longpl}{\@glo@longpl}%
+ \ifx\@glo@name\@glsnoname
+ \@glsnoname
+ \let\@gloname\@gls@default@value
+ \fi
+ \gls@assign@field{}{#1}{name}{\@glo@name}%
% \end{macrocode}
%\changes{3.02}{2012/05/21}{added numberlist element}
% Set default numberlist if not defined:
@@ -3680,32 +4693,36 @@ name=true]{%
% The smaller and smallcaps options set the description to
% \cs{@glo@first}. Need to check for this, otherwise it won't get
% expanded if the description gets sanitized.
-%\changes{1.15}{2008 August 15}{check for '@glo@first in description}%
+%\changes{1.15}{2008 August 15}{check for \cs{@glo@first} in description}%
% \begin{macrocode}
\def\@glo@@desc{\@glo@first}%
\ifx\@glo@desc\@glo@@desc
\let\@glo@desc\@glo@first
\fi
- \@gls@sanitizedesc
- \expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}%
- \expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}%
+ \ifx\@glo@desc\@glsnodesc
+ \@glsnodesc
+ \let\@glodesc\@gls@default@value
+ \fi
+ \gls@assign@desc{#1}%
% \end{macrocode}
%\changes{1.18}{2009 January 14}{moved sort sanitization to
-% 'newglossaryentry}
+% \cs{newglossaryentry}}
%\changes{3.0}{2011/04/02}{added \cs{@gls@defsort}}
% Set the sort key for this entry:
% \begin{macrocode}
\@gls@defsort{\@glo@type}{#1}%
% \end{macrocode}
-%\changes{1.15}{2008 August 15}{check for '@glo@text in symbol}%
+%\changes{1.15}{2008 August 15}{check for \cs{@glo@text} in symbol}%
% \begin{macrocode}
\def\@glo@@symbol{\@glo@text}%
\ifx\@glo@symbol\@glo@@symbol
\let\@glo@symbol\@glo@text
\fi
- \@gls@sanitizesymbol
- \expandafter\protected@xdef\csname glo@#1@symbol\endcsname{\@glo@symbol}%
- \expandafter\protected@xdef\csname glo@#1@symbolplural\endcsname{\@glo@symbolplural}%
+ \gls@assign@field{\relax}{#1}{symbol}{\@glo@symbol}%
+ \expandafter
+ \gls@assign@field\expandafter
+ {\csname glo@#1@symbol\endcsname}
+ {#1}{symbolplural}{\@glo@symbolplural}%
% \end{macrocode}
% Define an associated boolean variable to determine whether this
% entry has been used yet (needs to be defined globally):
@@ -3730,7 +4747,6 @@ name=true]{%
\noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{#1}}%
\@do@glssee
\fi
- }%
% \end{macrocode}
% Determine and store main part of the entry's index format.
%\changes{1.17}{2008 December 26}{Stored main part of entry
@@ -3745,7 +4761,7 @@ name=true]{%
}
% \end{macrocode}
%\changes{1.13}{2008 May 10}{Removed restriction on only using
-% 'newglossaryentry in the preamble}
+% \cs{newglossaryentry} in the preamble}
%\end{macro}
%\begin{macro}{\@newglossaryentryprehook}
% Allow extra information to be added to glossary entries:
@@ -3785,11 +4801,12 @@ name=true]{%
% the glossary. (This enables the \sty{glossaries-accsupp} package
% to use \cs{accsuppglossaryentryfield} instead.)
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.08a}{2013-09-28}{switched to \cs{glossentry}}
% \begin{macrocode}
\ifglsxindy
- \newcommand*{\@glossaryentryfield}{\string\\glossaryentryfield}
+ \newcommand*{\@glossaryentryfield}{\string\\glossentry}
\else
- \newcommand*{\@glossaryentryfield}{\string\glossaryentryfield}
+ \newcommand*{\@glossaryentryfield}{\string\glossentry}
\fi
% \end{macrocode}
%\end{macro}
@@ -3799,18 +4816,22 @@ name=true]{%
% the glossary. (This enables the \sty{glossaries-accsupp} package
% to use \cs{accsuppglossarysubentryfield} instead.)
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.08a}{2013-09-28}{switched to \cs{subglossentry}}
% \begin{macrocode}
\ifglsxindy
\newcommand*{\@glossarysubentryfield}{%
- \string\\glossarysubentryfield}
+ \string\\subglossentry}
\else
\newcommand*{\@glossarysubentryfield}{%
- \string\glossarysubentryfield}
+ \string\subglossentry}
\fi
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\@glo@storeentry}
+%\begin{definition}
+%\cs{@glo@storeentry}\marg{label}
+%\end{definition}
%\changes{1.17}{2008 December 26}{new}
% Determine the format to write the entry in the glossary
% output (\filetype{.glo}) file.
@@ -3821,100 +4842,81 @@ name=true]{%
% \begin{macrocode}
\newcommand{\@glo@storeentry}[1]{%
% \end{macrocode}
-% Get the sort string and escape any special characters
-% \begin{macrocode}
-\protected@edef\@glo@sort{\csname glo@#1@sort\endcsname}%
-\@gls@checkmkidxchars\@glo@sort
-% \end{macrocode}
-% Same again for the name string.
-% \begin{macrocode}
-\protected@edef\@@glo@name{\csname glo@#1@name\endcsname}%
-\@gls@checkmkidxchars\@@glo@name
-% \end{macrocode}
-% Add the font command. (The backslash needs to be escaped for
-% \app{xindy}.)
+% Escape special characters in the label:
% \begin{macrocode}
-\ifglsxindy
- \protected@edef\@glo@name{\string\\glsnamefont{\@@glo@name}}%
-\else
- \protected@edef\@glo@name{\string\glsnamefont{\@@glo@name}}%
-\fi
+ \def\@glo@label{#1}%
+ \@gls@checkmkidxchars\@glo@label
% \end{macrocode}
-% Get the description string and escape any special characters
-% \begin{macrocode}
-\protected@edef\@glo@desc{\csname glo@#1@desc\endcsname}%
-\@gls@checkmkidxchars\@glo@desc
-% \end{macrocode}
-% Same again for the symbol
+% Get the sort string and escape any special characters
% \begin{macrocode}
-\protected@edef\@glo@symbol{\csname glo@#1@symbol\endcsname}%
-\@gls@checkmkidxchars\@glo@symbol
+ \protected@edef\@glo@sort{\csname glo@#1@sort\endcsname}%
+ \@gls@checkmkidxchars\@glo@sort
% \end{macrocode}
+% Same again for the name string.
+%\changes{3.08a}{2013-09-28}{no longer need to check for special characters
+%in any of the fields other than sort}
% Escape any special characters in the prefix
% \begin{macrocode}
-\@gls@checkmkidxchars\@glo@prefix
+ \@gls@checkmkidxchars\@glo@prefix
% \end{macrocode}
% Get the parent, if one exists
% \begin{macrocode}
-\edef\@glo@parent{\csname glo@#1@parent\endcsname}%
+ \edef\@glo@parent{\csname glo@#1@parent\endcsname}%
% \end{macrocode}
% Write the information to the glossary file.
% \begin{macrocode}
-\ifglsxindy
+ \ifglsxindy
% \end{macrocode}
% Store using \app{xindy} syntax.
% \begin{macrocode}
- \ifx\@glo@parent\@empty
+ \ifx\@glo@parent\@empty
% \end{macrocode}
% Entry doesn't have a parent
+%\changes{3.08a}{2013-09-28}{updated for \cs{glossentry}}
% \begin{macrocode}
- \expandafter\protected@xdef\csname glo@#1@index\endcsname{%
- (\string"\@glo@sort\string" %
- \string"\@glo@prefix\@glossaryentryfield{#1}{\@glo@name
- }{\@glo@desc}{\@glo@symbol}\string") %
- }%
- \else
+ \expandafter\protected@xdef\csname glo@#1@index\endcsname{%
+ (\string"\@glo@sort\string" %
+ \string"\@glo@prefix\@glossaryentryfield{\@glo@label}\string") %
+ }%
+ \else
% \end{macrocode}
% Entry has a parent
% \begin{macrocode}
- \expandafter\protected@xdef\csname glo@#1@index\endcsname{%
- \csname glo@\@glo@parent @index\endcsname
- (\string"\@glo@sort\string" %
- \string"\@glo@prefix\@glossarysubentryfield%
- {\csname glo@#1@level\endcsname}{#1}{\@glo@name
- }{\@glo@desc}{\@glo@symbol}\string") %
- }%
- \fi
-\else
+ \expandafter\protected@xdef\csname glo@#1@index\endcsname{%
+ \csname glo@\@glo@parent @index\endcsname
+ (\string"\@glo@sort\string" %
+ \string"\@glo@prefix\@glossarysubentryfield
+ {\csname glo@#1@level\endcsname}{\@glo@label}\string") %
+ }%
+ \fi
+ \else
% \end{macrocode}
% Store using \app{makeindex} syntax.
% \begin{macrocode}
- \ifx\@glo@parent\@empty
+ \ifx\@glo@parent\@empty
% \end{macrocode}
% Sanitize \cs{@glo@prefix}
% \begin{macrocode}
- \@onelevel@sanitize\@glo@prefix
+ \@onelevel@sanitize\@glo@prefix
% \end{macrocode}
% Entry doesn't have a parent
% \begin{macrocode}
- \expandafter\protected@xdef\csname glo@#1@index\endcsname{%
- \@glo@sort\@gls@actualchar\@glo@prefix
- \@glossaryentryfield{#1}{\@glo@name}{\@glo@desc
- }{\@glo@symbol}%
- }%
- \else
+ \expandafter\protected@xdef\csname glo@#1@index\endcsname{%
+ \@glo@sort\@gls@actualchar\@glo@prefix
+ \@glossaryentryfield{\@glo@label}%
+ }%
+ \else
% \end{macrocode}
% Entry has a parent
% \begin{macrocode}
- \expandafter\protected@xdef\csname glo@#1@index\endcsname{%
- \csname glo@\@glo@parent @index\endcsname\@gls@levelchar
- \@glo@sort\@gls@actualchar\@glo@prefix
- \@glossarysubentryfield
- {\csname glo@#1@level\endcsname}{#1}{\@glo@name}{\@glo@desc
- }{\@glo@symbol}%
- }%
+ \expandafter\protected@xdef\csname glo@#1@index\endcsname{%
+ \csname glo@\@glo@parent @index\endcsname\@gls@levelchar
+ \@glo@sort\@gls@actualchar\@glo@prefix
+ \@glossarysubentryfield
+ {\csname glo@#1@level\endcsname}{\@glo@label}%
+ }%
+ \fi
\fi
-\fi
}
% \end{macrocode}
%\end{macro}
@@ -3924,42 +4926,88 @@ name=true]{%
%\cs{ifglo@}\meta{label}\texttt{@flag} which determines
% whether or not the entry has been used (see also
% \ics{ifglsused} defined below). These flags can
-% be set and unset using the following macros:
+% be set and unset using the following macros, but first we need to
+% know if we're in \sty{amsmath}'s \env{align} environment's
+% measuring pass.
+%
+%\begin{macro}{\gls@ifnotmeasuring}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{amsmath}%
+ {\let\gls@ifnotmeasuring\@gls@ifnotmeasuring}%
+ {}%
+}
+\newcommand*{\@gls@ifnotmeasuring}[1]{%
+ \ifmeasuring@
+ \else
+ #1%
+ \fi
+}
+\newcommand*\gls@ifnotmeasuring[1]{#1}
+% \end{macrocode}
+%\end{macro}
%
+%\begin{macro}{\glsreset}
% The command \cs{glsreset}\marg{label} can be used
% to set the entry flag to indicate that it hasn't been used yet. The
% required argument is the entry label.
-%\begin{macro}{\glsreset}
% \begin{macrocode}
\newcommand*{\glsreset}[1]{%
-\glsdoifexists{#1}{%
-\expandafter\global\csname glo@#1@flagfalse\endcsname}}
+ \gls@ifnotmeasuring
+ {%
+ \glsdoifexists{#1}%
+ {%
+ \expandafter\global\csname glo@#1@flagfalse\endcsname
+ }%
+ }%
+}
% \end{macrocode}
%\end{macro}
-% As above, but with only a local effect:
+%
%\begin{macro}{\glslocalreset}
+% As above, but with only a local effect:
% \begin{macrocode}
\newcommand*{\glslocalreset}[1]{%
-\glsdoifexists{#1}{%
-\expandafter\let\csname ifglo@#1@flag\endcsname\iffalse}}
+ \gls@ifnotmeasuring
+ {%
+ \glsdoifexists{#1}%
+ {%
+ \expandafter\let\csname ifglo@#1@flag\endcsname\iffalse
+ }%
+ }%
+}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\glsunset}
% The command \cs{glsunset}\marg{label} can be used to
% set the entry flag to indicate that it has been used. The required
% argument is the entry label.
-%\begin{macro}{\glsunset}
% \begin{macrocode}
\newcommand*{\glsunset}[1]{%
-\glsdoifexists{#1}{%
-\expandafter\global\csname glo@#1@flagtrue\endcsname}}
+ \gls@ifnotmeasuring
+ {%
+ \glsdoifexists{#1}%
+ {%
+ \expandafter\global\csname glo@#1@flagtrue\endcsname
+ }%
+ }%
+}
% \end{macrocode}
%\end{macro}
-% As above, but with only a local effect:
+%
%\begin{macro}{\glslocalunset}
+% As above, but with only a local effect:
% \begin{macrocode}
\newcommand*{\glslocalunset}[1]{%
-\glsdoifexists{#1}{%
-\expandafter\let\csname ifglo@#1@flag\endcsname\iftrue}}
+ \gls@ifnotmeasuring
+ {%
+ \glsdoifexists{#1}%
+ {%
+ \expandafter\let\csname ifglo@#1@flag\endcsname\iftrue
+ }%
+ }%
+}
% \end{macrocode}
%\end{macro}
% Reset all entries for the named glossaries (supplied in a
@@ -3968,16 +5016,22 @@ name=true]{%
%\begin{macro}{\glsresetall}
% \begin{macrocode}
\newcommand*{\glsresetall}[1][\@glo@types]{%
-\forallglsentries[#1]{\@glsentry}{%
-\glsreset{\@glsentry}}}
+ \forallglsentries[#1]{\@glsentry}%
+ {%
+ \glsreset{\@glsentry}%
+ }%
+}
% \end{macrocode}
%\end{macro}
% As above, but with only a local effect:
%\begin{macro}{\glslocalresetall}
% \begin{macrocode}
\newcommand*{\glslocalresetall}[1][\@glo@types]{%
-\forallglsentries[#1]{\@glsentry}{%
-\glslocalreset{\@glsentry}}}
+ \forallglsentries[#1]{\@glsentry}%
+ {%
+ \glslocalreset{\@glsentry}%
+ }%
+}
% \end{macrocode}
%\end{macro}
% Unset all entries for the named glossaries (supplied in a
@@ -3986,16 +5040,22 @@ name=true]{%
%\begin{macro}{\glsunsetall}
% \begin{macrocode}
\newcommand*{\glsunsetall}[1][\@glo@types]{%
-\forallglsentries[#1]{\@glsentry}{%
-\glsunset{\@glsentry}}}
+ \forallglsentries[#1]{\@glsentry}%
+ {%
+ \glsunset{\@glsentry}%
+ }%
+}
% \end{macrocode}
%\end{macro}
% As above, but with only a local effect:
%\begin{macro}{\glslocalunsetall}
% \begin{macrocode}
\newcommand*{\glslocalunsetall}[1][\@glo@types]{%
-\forallglsentries[#1]{\@glsentry}{%
-\glslocalunset{\@glsentry}}}
+ \forallglsentries[#1]{\@glsentry}%
+ {%
+ \glslocalunset{\@glsentry}%
+ }%
+}
% \end{macrocode}
%\end{macro}
%
@@ -4018,9 +5078,10 @@ name=true]{%
%\begin{macro}{\loadglsentries}
% \begin{macrocode}
\newcommand*{\loadglsentries}[2][\@gls@default]{%
-\let\@gls@default\glsdefaulttype
-\def\glsdefaulttype{#1}\input{#2}%
-\let\glsdefaulttype\@gls@default}
+ \let\@gls@default\glsdefaulttype
+ \def\glsdefaulttype{#1}\input{#2}%
+ \let\glsdefaulttype\@gls@default
+}
% \end{macrocode}
%\end{macro}
% \cs{loadglsentries} can only be used in the preamble:
@@ -4041,83 +5102,468 @@ name=true]{%
% subsequent use). Any formatting commands (such as \cs{textbf}
% is governed by \ics{glstextformat}. By default this just
% displays the \term{link text} ``as is''.
-%\changes{1.04}{2007 Aug 3}{Added 'glstextformat}%
+%\changes{1.04}{2007 Aug 3}{Added \cs{glstextformat}}%
%\begin{macro}{\glstextformat}
% \begin{macrocode}
\newcommand*{\glstextformat}[1]{#1}
% \end{macrocode}
%\end{macro}
%
-% The first time an entry is used, the way in which it is
-% displayed is governed by \cs{glsdisplayfirst}. This
-% takes four parameters: \verb|#1| will be the value
-% of the entry's \gloskey{first} or \gloskey{firstplural} key,
-% \verb|#2| will be the value of the entry's \gloskey{description}
-% key, \verb|#3| will be the value of the entry's \gloskey{symbol}
-% key and \verb|#4| is additional text supplied by the final optional
-% argument to commands like \ics{gls} and \ics{glspl}.
-% The default is to display the first parameter followed by the
-% additional text.
+%\begin{macro}{\glsentryfmt}
+% As from version 3.11a, the way in which an entry is displayed is now
+% governed by \cs{glsentryfmt}. This doesn't take any arguments. The
+% required information is set by commands like \cs{gls}.
+% To ensure backward compatibility, the default use the old
+% \cs{glsdisplay} and \cs{glsdisplayfirst} style of commands
+% \begin{macrocode}
+\newcommand*{\glsentryfmt}{%
+ \@@gls@default@entryfmt\glsdisplayfirst\glsdisplay
+}
+% \end{macrocode}
+% Format that provides backwards compatibility:
+% \begin{macrocode}
+\newcommand*{\@@gls@default@entryfmt}[2]{%
+ \ifdefempty\glscustomtext
+ {%
+ \glsifplural
+ {%
+% \end{macrocode}
+% Plural form
+% \begin{macrocode}
+ \glscapscase
+ {%
+% \end{macrocode}
+% Don't adjust case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ #2{\glsentryplural{\glslabel}}%
+ {\glsentrydescplural{\glslabel}}%
+ {\glsentrysymbolplural{\glslabel}}{\glsinsert}%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ #1{\glsentryfirstplural{\glslabel}}%
+ {\glsentrydescplural{\glslabel}}%
+ {\glsentrysymbolplural{\glslabel}}{\glsinsert}%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Make first letter upper case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use. (Expansion was used in version 3.07 and below
+% in case the name wasn't the first thing to be displayed, but now
+% the user can sort out the upper casing in \ics{defglsentryfmt},
+% which avoids the issues caused by fragile commands.)
+% \begin{macrocode}
+ \ifbool{glscompatible-3.07}%
+ {%
+ \protected@edef\@glo@etext{%
+ #2{\glsentryplural{\glslabel}}%
+ {\glsentrydescplural{\glslabel}}%
+ {\glsentrysymbolplural{\glslabel}}{\glsinsert}}%
+ \xmakefirstuc\@glo@etext
+ }%
+ {%
+ #2{\Glsentryplural{\glslabel}}%
+ {\glsentrydescplural{\glslabel}}%
+ {\glsentrysymbolplural{\glslabel}}{\glsinsert}%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \ifbool{glscompatible-3.07}%
+ {%
+ \protected@edef\@glo@etext{%
+ #1{\glsentryfirstplural{\glslabel}}%
+ {\glsentrydescplural{\glslabel}}%
+ {\glsentrysymbolplural{\glslabel}}{\glsinsert}}%
+ \xmakefirstuc\@glo@etext
+ }%
+ {%
+ #1{\Glsentryfirstplural{\glslabel}}%
+ {\glsentrydescplural{\glslabel}}%
+ {\glsentrysymbolplural{\glslabel}}{\glsinsert}%
+ }%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Make all upper case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ \mfirstucMakeUppercase{#2{\glsentryplural{\glslabel}}%
+ {\glsentrydescplural{\glslabel}}%
+ {\glsentrysymbolplural{\glslabel}}{\glsinsert}}%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \mfirstucMakeUppercase{#1{\glsentryfirstplural{\glslabel}}%
+ {\glsentrydescplural{\glslabel}}%
+ {\glsentrysymbolplural{\glslabel}}{\glsinsert}}%
+ }%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Singular form
+% \begin{macrocode}
+ \glscapscase
+ {%
+% \end{macrocode}
+% Don't adjust case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ #2{\glsentrytext{\glslabel}}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{\glsinsert}%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ #1{\glsentryfirst{\glslabel}}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{\glsinsert}%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Make first letter upper case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ \ifbool{glscompatible-3.07}%
+ {%
+ \protected@edef\@glo@etext{%
+ #2{\glsentrytext{\glslabel}}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{\glsinsert}}%
+ \xmakefirstuc\@glo@etext
+ }%
+ {%
+ #2{\Glsentrytext{\glslabel}}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{\glsinsert}%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \ifbool{glscompatible-3.07}%
+ {%
+ \protected@edef\@glo@etext{%
+ #1{\glsentryfirst{\glslabel}}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{\glsinsert}}%
+ \xmakefirstuc\@glo@etext
+ }%
+ {%
+ #1{\Glsentryfirst{\glslabel}}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{\glsinsert}%
+ }%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Make all upper case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ \mfirstucMakeUppercase{#2{\glsentrytext{\glslabel}}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{\glsinsert}}%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \mfirstucMakeUppercase{#1{\glsentryfirst{\glslabel}}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{\glsinsert}}%
+ }%
+ }%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Custom text provided in \cs{glsdisp}
+% \begin{macrocode}
+ \ifglsused{\glslabel}%
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ #2{\glscustomtext}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{}%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ #1{\glscustomtext}%
+ {\glsentrydesc{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}{}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsgenentryfmt}
+% Define a generic format that just uses the first, text, plural or
+% first plural keys (or the custom text) with the insert text appended.
+%\changes{3.11a}{2013-10-15}{new}
+% \begin{macrocode}
+\newcommand*{\glsgenentryfmt}{%
+ \ifdefempty\glscustomtext
+ {%
+ \glsifplural
+ {%
+% \end{macrocode}
+% Plural form
+% \begin{macrocode}
+ \glscapscase
+ {%
+% \end{macrocode}
+% Don't adjust case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ \glsentryplural{\glslabel}\glsinsert
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \glsentryfirstplural{\glslabel}\glsinsert
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Make first letter upper case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use.
+% \begin{macrocode}
+ \Glsentryplural{\glslabel}\glsinsert
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \Glsentryfirstplural{\glslabel}\glsinsert
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Make all upper case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ \mfirstucMakeUppercase
+ {\glsentryplural{\glslabel}\glsinsert}%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \mfirstucMakeUppercase
+ {\glsentryfirstplural{\glslabel}\glsinsert}%
+ }%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Singular form
+% \begin{macrocode}
+ \glscapscase
+ {%
+% \end{macrocode}
+% Don't adjust case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ \glsentrytext{\glslabel}\glsinsert
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \glsentryfirst{\glslabel}\glsinsert
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Make first letter upper case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ \Glsentrytext{\glslabel}\glsinsert
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \Glsentryfirst{\glslabel}\glsinsert
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Make all upper case
+% \begin{macrocode}
+ \ifglsused\glslabel
+ {%
+% \end{macrocode}
+% Subsequent use
+% \begin{macrocode}
+ \mfirstucMakeUppercase{\glsentrytext{\glslabel}\glsinsert}%
+ }%
+ {%
+% \end{macrocode}
+% First use
+% \begin{macrocode}
+ \mfirstucMakeUppercase{\glsentryfirst{\glslabel}\glsinsert}%
+ }%
+ }%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Custom text provided in \cs{glsdisp}. (The insert is most likely
+% to be empty at this point.)
+% \begin{macrocode}
+ \glscustomtext\glsinsert
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\glsdisplayfirst}
+% Deprecated. Kept for backward compatibility.
+%\changes{3.11a}{2013-10-15}{obsoleted}
% \begin{macrocode}
\newcommand*{\glsdisplayfirst}[4]{#1#4}
% \end{macrocode}
%\end{macro}
%
-% After the first use, the entry is displayed according to
-% the format of \cs{glsdisplay}. Again, it takes four
-% parameters: \verb|#1| will be the value of the
-% entry's \gloskey{text} or \gloskey{plural} key,
-% \verb|#2| will be the value of the entry's \gloskey{description}
-% key, \verb|#3| will be the value of the entry's \gloskey{symbol}
-% key and \verb|#4| is additional text supplied by the final optional
-% argument to commands like \ics{gls} and \ics{glspl}.
%\begin{macro}{\glsdisplay}
+% Deprecated. Kept for backward compatibility.
+%\changes{3.11a}{2013-10-15}{obsoleted}
% \begin{macrocode}
\newcommand*{\glsdisplay}[4]{#1#4}
% \end{macrocode}
%\end{macro}
%
-% When a new glossary is created it uses \cs{glsdisplayfirst}
-% and \cs{glsdisplay} as the default way of displaying its
-% entry in the text. This can be changed for the entries belonging
-% to an individual glossary using
-% \ics{defglsdisplay} and \ics{defglsdisplayfirst}.
-%\\[10pt]
-% \cs{defglsdisplay}\oarg{type}\marg{definition}\\[10pt]%
-% The glossary type is given by \meta{type} (the default glossary
-% if omitted) and
-% \meta{definition} should have at most \verb|#1|, \verb|#2|,
-% \verb|#3| and \verb|#4|. These represent the same arguments
-% as those described for \ics{glsdisplay}.
%\begin{macro}{\defglsdisplay}
+%\changes{3.11a}{2013-10-15}{obsoleted}
+% Deprecated. Kept for backward compatibility.
% \begin{macrocode}
\newcommand*{\defglsdisplay}[2][\glsdefaulttype]{%
-\expandafter\def\csname gls@#1@display\endcsname##1##2##3##4{#2}}
+ \GlossariesWarning{\string\defglsdisplay\space is now obsolete.^^J
+ Use \string\defglsentryfmt\space instead}%
+ \expandafter\def\csname gls@#1@display\endcsname##1##2##3##4{#2}%
+ \edef\@gls@doentrydef{%
+ \noexpand\defglsentryfmt[#1]{%
+ \noexpand\ifcsdef{gls@#1@displayfirst}%
+ {%
+ \noexpand\@@gls@default@entryfmt
+ {\noexpand\csuse{gls@#1@displayfirst}}
+ {\noexpand\csuse{gls@#1@display}}%
+ }%
+ {%
+ \noexpand\@@gls@default@entryfmt
+ {\noexpand\glsdisplayfirst}
+ {\noexpand\csuse{gls@#1@display}}%
+ }%
+ }%
+ }%
+ \@gls@doentrydef
+}
% \end{macrocode}
%\end{macro}
-%\vskip5pt
-% \cs{defglsdisplayfirst}\oarg{type}\marg{definition}\\[10pt]%
-% The glossary type is given by \meta{type} (the default glossary
-% if omitted) and
-% \meta{definition} should have at most \verb|#1|, \verb|#2|,
-% \verb|#3| and \verb|#4|. These represent the same arguments
-% as those described for \ics{glsdisplayfirst}.
+%
%\begin{macro}{\defglsdisplayfirst}
+% Deprecated. Kept for backward compatibility.
+%\changes{3.11a}{2013-10-15}{obsoleted}
% \begin{macrocode}
\newcommand*{\defglsdisplayfirst}[2][\glsdefaulttype]{%
-\expandafter\def\csname gls@#1@displayfirst\endcsname##1##2##3##4{#2}}
+ \GlossariesWarning{\string\defglsdisplayfirst\space is now obsolete.^^J
+ Use \string\defglsentryfmt\space instead}%
+ \expandafter\def\csname gls@#1@displayfirst\endcsname##1##2##3##4{#2}%
+ \edef\@gls@doentrydef{%
+ \noexpand\defglsentryfmt[#1]{%
+ \noexpand\ifcsdef{gls@#1@display}%
+ {%
+ \noexpand\@@gls@default@entryfmt
+ {\noexpand\csuse{gls@#1@displayfirst}}
+ {\noexpand\csuse{gls@#1@display}}%
+ }%
+ {%
+ \noexpand\@@gls@default@entryfmt
+ {\noexpand\csuse{gls@#1@displayfirst}}%
+ {\noexpand\glsdisplay}
+ }%
+ }%
+ }%
+ \@gls@doentrydef
+}
% \end{macrocode}
%\end{macro}
%
%\subsubsection{Links to glossary entries}
% The links to glossary entries all have a first optional
% argument that can be used to change the format and counter
-% of the associated entry number. Except for \cs{glslink},
+% of the associated entry number. Except for \cs{glslink}
+% and \cs{glsdisp},
% the commands like \cs{gls} have a final optional
% argument that can be used to insert additional text in the
% link (this will usually be appended, but can be redefined using
-% \ics{defglsdisplay} and \ics{defglsdisplayfirst}).
+% \ics{defentryfmt}).
% It goes against the \LaTeX\ norm to have an optional
% argument after the mandatory arguments, but it makes more
% sense to write, say, \verb|\gls{label}['s]| rather than, say,
@@ -4191,7 +5637,8 @@ name=true]{%
%\changes{3.01}{2011/04/12}{made robust}
% \begin{macrocode}
\newrobustcmd*{\glslink}{%
-\@ifstar\@sgls@link\@gls@@link}
+ \@ifstar\@sgls@link\@gls@@link
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@sgls@link}
@@ -4227,7 +5674,7 @@ name=true]{%
%\end{macro}
%\begin{macro}{\@gls@link}
%\changes{1.07}{2007 Sep 13}{fixed bug caused by \cs{theglsentrycounter} setting the page number too soon}
-%\changes{1.15}{2008 August 15}{added 'glslabel}
+%\changes{1.15}{2008 August 15}{added \cs{glslabel}}
% \begin{macrocode}
\def\@gls@link[#1]#2#3{%
% \end{macrocode}
@@ -4275,7 +5722,10 @@ name=true]{%
\ifKV@glslink@hyper
\@glslink{\glolinkprefix#2}{\glstextformat{#3}}%
\else
- \glstextformat{#3}\relax
+% \end{macrocode}
+%\changes{3.13a}{2013-11-05}{removed \cs{relax}}
+% \begin{macrocode}
+ \glstextformat{#3}%
\fi
}
% \end{macrocode}
@@ -4458,31 +5908,31 @@ name=true]{%
%\begin{macro}{\@gls@checkmkidxchars}
% \begin{macrocode}
\newcommand{\@gls@checkmkidxchars}[1]{%
-\ifglsxindy
- \@gls@escbsdq{#1}%
-\else
- \def\@gls@checkedmkidx{}%
- \expandafter\@gls@checkquote#1\@nil""\null
- \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
- \def\@gls@checkedmkidx{}%
- \expandafter\@gls@checkescquote#1\@nil\"\"\null
- \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
- \def\@gls@checkedmkidx{}%
- \expandafter\@gls@checkescactual#1\@nil\?\?\null
- \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
- \def\@gls@checkedmkidx{}%
- \expandafter\@gls@checkactual#1\@nil??\null
- \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
- \def\@gls@checkedmkidx{}%
- \expandafter\@gls@checkbar#1\@nil||\null
- \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
- \def\@gls@checkedmkidx{}%
- \expandafter\@gls@checkescbar#1\@nil\|\|\null
- \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
- \def\@gls@checkedmkidx{}%
- \expandafter\@gls@checklevel#1\@nil!!\null
- \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
-\fi
+ \ifglsxindy
+ \@gls@escbsdq{#1}%
+ \else
+ \def\@gls@checkedmkidx{}%
+ \expandafter\@gls@checkquote#1\@nil""\null
+ \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
+ \def\@gls@checkedmkidx{}%
+ \expandafter\@gls@checkescquote#1\@nil\"\"\null
+ \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
+ \def\@gls@checkedmkidx{}%
+ \expandafter\@gls@checkescactual#1\@nil\?\?\null
+ \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
+ \def\@gls@checkedmkidx{}%
+ \expandafter\@gls@checkactual#1\@nil??\null
+ \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
+ \def\@gls@checkedmkidx{}%
+ \expandafter\@gls@checkbar#1\@nil||\null
+ \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
+ \def\@gls@checkedmkidx{}%
+ \expandafter\@gls@checkescbar#1\@nil\|\|\null
+ \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
+ \def\@gls@checkedmkidx{}%
+ \expandafter\@gls@checklevel#1\@nil!!\null
+ \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}%
+ \fi
}
% \end{macrocode}
%\end{macro}
@@ -4504,55 +5954,57 @@ name=true]{%
% special character\mkidxspch.
% \begin{macrocode}
\def\@gls@checkquote#1"#2"#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@checkquote{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\@gls@quotechar\@gls@quotechar\@gls@quotechar}%
- \def\@@gls@checkquote{\@gls@checkquote#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\@gls@quotechar}%
- \ifx\null#3\null
- \def\@@gls@checkquote{\@gls@checkquote#2""\null}%
- \else
- \def\@@gls@checkquote{\@gls@checkquote#2"#3\null}%
- \fi
-\fi
-\@@gls@checkquote}
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@checkquote{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\@gls@quotechar\@gls@quotechar\@gls@quotechar}%
+ \def\@@gls@checkquote{\@gls@checkquote#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\@gls@quotechar}%
+ \ifx\null#3\null
+ \def\@@gls@checkquote{\@gls@checkquote#2""\null}%
+ \else
+ \def\@@gls@checkquote{\@gls@checkquote#2"#3\null}%
+ \fi
+ \fi
+ \@@gls@checkquote
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@checkescquote}
% Do the same for \verb|\"|:
% \begin{macrocode}
\def\@gls@checkescquote#1\"#2\"#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@checkescquote{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\string\"\@gls@quotechar
- \@gls@quotechar\string\"\@gls@quotechar}%
- \def\@@gls@checkescquote{\@gls@checkescquote#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\string\"\@gls@quotechar}%
- \ifx\null#3\null
- \def\@@gls@checkescquote{\@gls@checkescquote#2\"\"\null}%
- \else
- \def\@@gls@checkescquote{\@gls@checkescquote#2\"#3\null}%
- \fi
-\fi
-\@@gls@checkescquote}
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@checkescquote{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\string\"\@gls@quotechar
+ \@gls@quotechar\string\"\@gls@quotechar}%
+ \def\@@gls@checkescquote{\@gls@checkescquote#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\string\"\@gls@quotechar}%
+ \ifx\null#3\null
+ \def\@@gls@checkescquote{\@gls@checkescquote#2\"\"\null}%
+ \else
+ \def\@@gls@checkescquote{\@gls@checkescquote#2\"#3\null}%
+ \fi
+ \fi
+\@@gls@checkescquote
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@checkescactual}
@@ -4560,165 +6012,171 @@ name=true]{%
% \app{makeindex}'s special character):
% \begin{macrocode}
\def\@gls@checkescactual#1\?#2\?#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@checkescactual{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\string\"\@gls@actualchar
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@checkescactual{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\string\"\@gls@actualchar
+ \@gls@quotechar\string\"\@gls@actualchar}%
+ \def\@@gls@checkescactual{\@gls@checkescactual#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
\@gls@quotechar\string\"\@gls@actualchar}%
- \def\@@gls@checkescactual{\@gls@checkescactual#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\string\"\@gls@actualchar}%
- \ifx\null#3\null
- \def\@@gls@checkescactual{\@gls@checkescactual#2\?\?\null}%
- \else
- \def\@@gls@checkescactual{\@gls@checkescactual#2\?#3\null}%
- \fi
-\fi
-\@@gls@checkescactual}
+ \ifx\null#3\null
+ \def\@@gls@checkescactual{\@gls@checkescactual#2\?\?\null}%
+ \else
+ \def\@@gls@checkescactual{\@gls@checkescactual#2\?#3\null}%
+ \fi
+ \fi
+\@@gls@checkescactual
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@checkescbar}
% Similarly for \verb"\|":
% \begin{macrocode}
\def\@gls@checkescbar#1\|#2\|#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@checkescbar{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\string\"\@gls@encapchar
- \@gls@quotechar\string\"\@gls@encapchar}%
- \def\@@gls@checkescbar{\@gls@checkescbar#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\string\"\@gls@encapchar}%
- \ifx\null#3\null
- \def\@@gls@checkescbar{\@gls@checkescbar#2\|\|\null}%
- \else
- \def\@@gls@checkescbar{\@gls@checkescbar#2\|#3\null}%
- \fi
-\fi
-\@@gls@checkescbar}
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@checkescbar{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\string\"\@gls@encapchar
+ \@gls@quotechar\string\"\@gls@encapchar}%
+ \def\@@gls@checkescbar{\@gls@checkescbar#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\string\"\@gls@encapchar}%
+ \ifx\null#3\null
+ \def\@@gls@checkescbar{\@gls@checkescbar#2\|\|\null}%
+ \else
+ \def\@@gls@checkescbar{\@gls@checkescbar#2\|#3\null}%
+ \fi
+ \fi
+\@@gls@checkescbar
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@checkesclevel}
% Similarly for \verb"\!":
% \begin{macrocode}
\def\@gls@checkesclevel#1\!#2\!#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@checkesclevel{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\string\"\@gls@levelchar
- \@gls@quotechar\string\"\@gls@levelchar}%
- \def\@@gls@checkesclevel{\@gls@checkesclevel#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\string\"\@gls@levelchar}%
- \ifx\null#3\null
- \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!\!\null}%
- \else
- \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!#3\null}%
- \fi
-\fi
-\@@gls@checkesclevel}
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@checkesclevel{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\string\"\@gls@levelchar
+ \@gls@quotechar\string\"\@gls@levelchar}%
+ \def\@@gls@checkesclevel{\@gls@checkesclevel#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\string\"\@gls@levelchar}%
+ \ifx\null#3\null
+ \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!\!\null}%
+ \else
+ \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!#3\null}%
+ \fi
+ \fi
+\@@gls@checkesclevel
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@checkbar}
% and for \verb"|":
% \begin{macrocode}
\def\@gls@checkbar#1|#2|#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@checkbar{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\@gls@encapchar\@gls@quotechar\@gls@encapchar}%
- \def\@@gls@checkbar{\@gls@checkbar#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\@gls@encapchar}%
- \ifx\null#3\null
- \def\@@gls@checkbar{\@gls@checkbar#2||\null}%
- \else
- \def\@@gls@checkbar{\@gls@checkbar#2|#3\null}%
- \fi
-\fi
-\@@gls@checkbar}
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@checkbar{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\@gls@encapchar\@gls@quotechar\@gls@encapchar}%
+ \def\@@gls@checkbar{\@gls@checkbar#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\@gls@encapchar}%
+ \ifx\null#3\null
+ \def\@@gls@checkbar{\@gls@checkbar#2||\null}%
+ \else
+ \def\@@gls@checkbar{\@gls@checkbar#2|#3\null}%
+ \fi
+ \fi
+ \@@gls@checkbar
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@checklevel}
% and for \verb"!":
% \begin{macrocode}
\def\@gls@checklevel#1!#2!#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@checklevel{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\@gls@levelchar\@gls@quotechar\@gls@levelchar}%
- \def\@@gls@checklevel{\@gls@checklevel#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\@gls@levelchar}%
- \ifx\null#3\null
- \def\@@gls@checklevel{\@gls@checklevel#2!!\null}%
- \else
- \def\@@gls@checklevel{\@gls@checklevel#2!#3\null}%
- \fi
-\fi
-\@@gls@checklevel}
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@checklevel{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\@gls@levelchar\@gls@quotechar\@gls@levelchar}%
+ \def\@@gls@checklevel{\@gls@checklevel#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\@gls@levelchar}%
+ \ifx\null#3\null
+ \def\@@gls@checklevel{\@gls@checklevel#2!!\null}%
+ \else
+ \def\@@gls@checklevel{\@gls@checklevel#2!#3\null}%
+ \fi
+ \fi
+ \@@gls@checklevel
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@gls@checkactual}
% and for \verb"?":
% \begin{macrocode}
\def\@gls@checkactual#1?#2?#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@checkactual{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\@gls@actualchar\@gls@quotechar\@gls@actualchar}%
- \def\@@gls@checkactual{\@gls@checkactual#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \@gls@quotechar\@gls@actualchar}%
- \ifx\null#3\null
- \def\@@gls@checkactual{\@gls@checkactual#2??\null}%
- \else
- \def\@@gls@checkactual{\@gls@checkactual#2?#3\null}%
- \fi
-\fi
-\@@gls@checkactual}
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@checkactual{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\@gls@actualchar\@gls@quotechar\@gls@actualchar}%
+ \def\@@gls@checkactual{\@gls@checkactual#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \@gls@quotechar\@gls@actualchar}%
+ \ifx\null#3\null
+ \def\@@gls@checkactual{\@gls@checkactual#2??\null}%
+ \else
+ \def\@@gls@checkactual{\@gls@checkactual#2?#3\null}%
+ \fi
+ \fi
+ \@@gls@checkactual
+}
% \end{macrocode}
%\end{macro}
%
@@ -4726,27 +6184,27 @@ name=true]{%
% As before but for use with \app{xindy}
% \begin{macrocode}
\def\@gls@xdycheckquote#1"#2"#3\null{%
-\@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
-\toks@={#1}%
-\ifx\null#2\null
- \ifx\null#3\null
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
- \def\@@gls@xdycheckquote{\relax}%
- \else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \string\"\string\"}%
- \def\@@gls@xdycheckquote{\@gls@xdycheckquote#3\null}%
- \fi
-\else
- \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
- \string\"}%
- \ifx\null#3\null
- \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2""\null}%
- \else
- \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2"#3\null}%
- \fi
-\fi
-\@@gls@xdycheckquote
+ \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
+ \toks@={#1}%
+ \ifx\null#2\null
+ \ifx\null#3\null
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
+ \def\@@gls@xdycheckquote{\relax}%
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \string\"\string\"}%
+ \def\@@gls@xdycheckquote{\@gls@xdycheckquote#3\null}%
+ \fi
+ \else
+ \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
+ \string\"}%
+ \ifx\null#3\null
+ \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2""\null}%
+ \else
+ \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2"#3\null}%
+ \fi
+ \fi
+ \@@gls@xdycheckquote
}
% \end{macrocode}
%\end{macro}
@@ -4813,8 +6271,9 @@ name=true]{%
}
% \end{macrocode}
%\end{macro}
-%\changes{1.12}{2008 Mar 8}{added check for 'hypertarget separate
-% to 'hyperlink (memoir defines 'hyperlink but not 'hypertarget)}
+%\changes{1.12}{2008 Mar 8}{added check for \cs{hypertarget} separate
+% to \cs{hyperlink} (memoir defines \cs{hyperlink} but not
+% \cs{hypertarget})}
%\begin{macro}{\@glstarget}
% If \ics{hypertarget} is not defined, \cs{@glstarget}
% ignores its first argument and just does the second argument,
@@ -4822,8 +6281,7 @@ name=true]{%
%\changes{1.16}{2008 August 27}{raised the hypertarget so the target text doesn't
% scroll off the top of the page}
% \begin{macrocode}
-\newlength\gls@tmplen
-\ifcsundef{hypertarget}%
+\newlength\gls@tmplen \ifcsundef{hypertarget}%
{%
\gdef\@glstarget#1#2{#2}%
}%
@@ -4841,8 +6299,9 @@ name=true]{%
%\begin{macro}{\glsdisablehyper}
% \begin{macrocode}
\newcommand{\glsdisablehyper}{%
-\renewcommand*\@glslink[2]{##2}%
-\renewcommand*\@glstarget[2]{##2}}
+ \renewcommand*\@glslink[2]{##2}%
+ \renewcommand*\@glstarget[2]{##2}%
+}
% \end{macrocode}
%\end{macro}
% Glossary hyperlinks can be enabled using \cs{glsenablehyper}
@@ -4857,8 +6316,17 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%
-%Syntax:\\[10pt]
-% \cs{gls}\oarg{options}\marg{label}\oarg{insert text}\\[10pt]
+% Provide some convenience commands if not already defined:
+% \begin{macrocode}
+\providecommand{\@firstofthree}[3]{#1}
+\providecommand{\@secondofthree}[3]{#2}
+\providecommand{\@thirdofthree}[3]{#3}
+% \end{macrocode}
+%
+%Syntax:
+%\begin{definition}
+% \cs{gls}\oarg{options}\marg{label}\oarg{insert text}
+%\end{definition}
% Link to glossary entry using singular form. The link text
% is taken from the value of the \gloskey{text} or \gloskey{first}
% keys used when the entry was defined.
@@ -4909,27 +6377,29 @@ name=true]{%
\def\@gls@link@opts{#1}%
\def\@gls@link@label{#2}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}}
+% \begin{macrocode}
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@firstofthree
+ \let\glscustomtext\@empty
+ \def\glsinsert{#3}%
+% \end{macrocode}
% Determine what the link text should be (this is stored in
% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{change to using \cs{glsentryfmt} style
+%commands}
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @display\endcsname
- {\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}%
- }%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}%
- }%
+ \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}%
% \end{macrocode}
% Call \cs{@gls@link}.
% If \pkgopt{footnote} package option has been used and the glossary
% type is \cs{acronymtype}, suppress
% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst}
% package option is used.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
+%\changes{1.16}{2008 August 27}{Test glossary type is
+%\cs{acronymtype} in addition to
%checking if footnote option has been used}
%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst}
%\changes{2.04}{2009 November 10}{Changed test to check if glossary type
@@ -5001,38 +6471,38 @@ name=true]{%
\def\@gls@link@label{#2}%
\def\glslabel{#2}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{add \cs{glsifplural},
+% \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}}
+% \begin{macrocode}
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@secondofthree
+ \let\glscustomtext\@empty
+ \def\glsinsert{#3}%
+% \end{macrocode}
% Determine what the link text should be (this is stored in
% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{change to using \cs{glsentryfmt} style
+%commands}
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \protected@edef\@glo@text{%
- \csname gls@\@glo@type @display\endcsname
- {\glsentrytext{#2}}{\glsentrydesc{#2}}%
- {\glsentrysymbol{#2}}{#3}}%
- }%
- {%
- \protected@edef\@glo@text{%
- \csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirst{#2}}{\glsentrydesc{#2}}%
- {\glsentrysymbol{#2}}{#3}}%
- }%
+ \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}%
% \end{macrocode}
% Call \cs{@gls@link}
% If \pkgopt{footnote} package option has been used and the glossary
% type is \cs{acronymtype}, suppress
% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst}
% package option is used.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
+%\changes{1.16}{2008 August 27}{Test glossary type is
+%\cs{acronymtype} in addition to
%checking if footnote option has been used}
%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst}
%\changes{2.04}{2009 November 10}{Changed test to check if glossary type
%has been identified as a list of acronyms}
+%\changes{3.11a}{2013-10-15}{removed \cs{makefirstuc} (now dealt
+%with in \cs{glsentryfmt})}
% \begin{macrocode}
\ifglsused{#2}%
{%
- \@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}}%
+ \@gls@link[#1]{#2}{\@glo@text}%
}%
{%
\gls@checkisacronymlist\@glo@type
@@ -5042,12 +6512,10 @@ name=true]{%
\OR \NOT\boolean{glshyperfirst}%
}%
{%
- \@gls@link[#1,hyper=false]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}}%
+ \@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}%
{%
- \@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}}%
+ \@gls@link[#1]{#2}{\@glo@text}%
}%
}%
% \end{macrocode}
@@ -5095,37 +6563,39 @@ name=true]{%
\def\@gls@link@opts{#1}%
\def\@gls@link@label{#2}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}}
+% \begin{macrocode}
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@thirdofthree
+ \let\glscustomtext\@empty
+ \def\glsinsert{#3}%
+% \end{macrocode}
% Determine what the link text should be (this is stored in
% \cs{@glo@text}).
+%\changes{3.11a}{2013-10-15}{change to using \cs{glsentryfmt} style
+%commands}
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @display\endcsname
- {\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}%
- }%
- }%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}%
- }%
- }%
+ \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}%
% \end{macrocode}
% Call \cs{@gls@link}
% If \pkgopt{footnote} package option has been used and the glossary
% type is \cs{acronymtype}, suppress
% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst}
% package option is used.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
+%\changes{1.16}{2008 August 27}{Test glossary type is
+%\cs{acronymtype} in addition to
%checking if footnote option has been used}
%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst}
%\changes{2.04}{2009 November 10}{Changed test to check if glossary type
%has been identified as a list of acronyms}
+%\changes{3.11a}{2013-10-15}{removed \cs{MakeUppercase} (now moved
+%to \cs{glsentryfmt})}
% \begin{macrocode}
\ifglsused{#2}%
{%
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
+ \@gls@link[#1]{#2}{\@glo@text}%
}%
{%
\gls@checkisacronymlist\@glo@type
@@ -5133,10 +6603,10 @@ name=true]{%
{%
\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\)
\OR \NOT\boolean{glshyperfirst}}{%
- \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}%
+ \@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}%
{%
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
+ \@gls@link[#1]{#2}{\@glo@text}%
}%
}%
% \end{macrocode}
@@ -5184,31 +6654,31 @@ name=true]{%
\def\@gls@link@opts{#1}%
\def\@gls@link@label{#2}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}}
+% \begin{macrocode}
+ \def\glslabel{#2}%
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@firstofthree
+ \let\glscustomtext\@empty
+ \def\glsinsert{#3}%
% Determine what the link text should be (this is stored in
% \cs{@glo@text})
-%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and
-% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol}
+%\changes{1.12}{2008 Mar 8}{now uses \cs{glsentrydescplural} and
+% \cs{glsentrysymbolplural} instead of \cs{glsentrydesc} and
+% \cs{glsentrysymbol}}
+%\changes{3.11a}{2013-10-15}{change to using \cs{glsentryfmt} style
+%commands}
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @display\endcsname
- {\glsentryplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
- }%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
- }%
+ \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}%
% \end{macrocode}
% Call \cs{@gls@link}.
% If \pkgopt{footnote} package option has been used and the glossary
% type is \cs{acronymtype}, suppress
% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst}
% package option is used.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
+%\changes{1.16}{2008 August 27}{Test glossary type is
+%\cs{acronymtype} in addition to
%checking if footnote option has been used}
%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst}
%\changes{2.04}{2009 November 10}{Changed test to check if glossary type
@@ -5280,41 +6750,42 @@ name=true]{%
\def\@gls@link@label{#2}%
\def\glslabel{#2}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{add \cs{glsifplural},
+% \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}}
+% \begin{macrocode}
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@secondofthree
+ \let\glscustomtext\@empty
+ \def\glsinsert{#3}%
+% \end{macrocode}
% Determine what the link text should be (this is stored in
% \cs{@glo@text}). This needs to be expanded so that the
% \cs{@glo@text} can be passed to \cs{xmakefirstuc}.
-%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and
-% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol}
+%\changes{1.12}{2008 Mar 8}{now uses \cs{glsentrydescplural} and
+% \cs{glsentrysymbolplural} instead of \cs{glsentrydesc} and
+% \cs{glsentrysymbol}}
+%\changes{3.11a}{2013-10-15}{change to using \cs{glsentryfmt} style
+%commands}
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \protected@edef\@glo@text{%
- \csname gls@\@glo@type @display\endcsname
- {\glsentryplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
- }%
- {%
- \protected@edef\@glo@text{%
- \csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
- }%
+ \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}%
% \end{macrocode}
% Call \cs{@gls@link}.
% If \pkgopt{footnote} package option has been used and the glossary
% type is \cs{acronymtype}, suppress
% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst}
% package option is used.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
+%\changes{1.16}{2008 August 27}{Test glossary type is
+%\cs{acronymtype} in addition to
%checking if footnote option has been used}
%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst}
%\changes{2.04}{2009 November 10}{Changed test to check if glossary type
%has been identified as a list of acronyms}
+%\changes{3.11a}{2013-10-15}{removed \cs{makefirstuc} (now dealt
+%with in \cs{glsentryfmt})}
% \begin{macrocode}
\ifglsused{#2}%
{%
- \@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}}%
+ \@gls@link[#1]{#2}{\@glo@text}%
}%
{%
\gls@checkisacronymlist\@glo@type
@@ -5324,12 +6795,10 @@ name=true]{%
\OR \NOT\boolean{glshyperfirst}%
}%
{%
- \@gls@link[#1,hyper=false]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}}%
+ \@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}%
{%
- \@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}}%
+ \@gls@link[#1]{#2}{\@glo@text}%
}%
}%
% \end{macrocode}
@@ -5377,41 +6846,42 @@ name=true]{%
\def\@gls@link@opts{#1}%
\def\@gls@link@label{#2}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}}
+% \begin{macrocode}
+ \def\glslabel{#2}%
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@thirdofthree
+ \let\glscustomtext\@empty
+ \def\glsinsert{#3}%
+% \end{macrocode}
% Determine what the link text should be (this is stored in
% \cs{@glo@text})
-%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and
-% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol}
+%\changes{1.12}{2008 Mar 8}{now uses \cs{glsentrydescplural} and
+% \cs{glsentrysymbolplural} instead of \cs{glsentrydesc} and
+% \cs{glsentrysymbol}}
+%\changes{3.11a}{2013-10-15}{change to using \cs{glsentryfmt} style
+%commands}
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @display\endcsname
- {\glsentryplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}%
- }%
- }%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}%
- }%
- }%
+ \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}%
% \end{macrocode}
% Call \cs{@gls@link}.
% If \pkgopt{footnote} package option has been used and the glossary
% type is \cs{acronymtype}, suppress
% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst}
% package option is used.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
+%\changes{1.16}{2008 August 27}{Test glossary type is
+%\cs{acronymtype} in addition to
%checking if footnote option has been used}
%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst}
%\changes{2.04}{2009 November 10}{Changed test to check if glossary type
%has been identified as a list of acronyms}
+%\changes{3.11a}{2013-10-15}{removed \cs{MakeUppercase} as now dealt
+%with in \cs{glsentryfmt}}
% \begin{macrocode}
\ifglsused{#2}%
{%
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
+ \@gls@link[#1]{#2}{\@glo@text}%
}%
{%
\gls@checkisacronymlist\@glo@type
@@ -5421,10 +6891,10 @@ name=true]{%
\OR \NOT\boolean{glshyperfirst}%
}%
{%
- \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}%
+ \@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}%
{%
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
+ \@gls@link[#1]{#2}{\@glo@text}%
}%
}%
% \end{macrocode}
@@ -5474,27 +6944,29 @@ name=true]{%
\def\@gls@link@opts{#1}%
\def\@gls@link@label{#2}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{add \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glscustomtext} and \cs{glsinsert}}
+% \begin{macrocode}
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@firstofthree
+ \def\glscustomtext{#3}%
+ \def\glsinsert{}%
+% \end{macrocode}
% Determine what the link text should be (this is stored in
% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{change to using \cs{glsentryfmt} style
+%commands}
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @display\endcsname
- {#3}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{}}%
- }%
- {%
- \def\@glo@text{%
- \csname gls@\@glo@type @displayfirst\endcsname
- {#3}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{}}%
- }%
+ \def\@glo@text{\csname gls@\@glo@type @entryfmt\endcsname}%
% \end{macrocode}
% Call \cs{@gls@link}.
% If \pkgopt{footnote} package option has been used and the glossary
% type is \cs{acronymtype}, suppress
% hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst}
% package option is used.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
+%\changes{1.16}{2008 August 27}{Test glossary type is
+%\cs{acronymtype} in addition to
%checking if footnote option has been used}
%\changes{2.03}{2009 Sep 23}{Added check for hyperfirst}
%\changes{2.04}{2009 November 10}{Changed test to check if glossary type
@@ -5546,25 +7018,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glstext}[2][]{%
-\new@ifnextchar[{\@glstext@{#1}{#2}}{\@glstext@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glstext@{#1}{#2}}{\@glstext@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glstext@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glstext shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrytext{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrytext}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentrytext{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -5583,25 +7051,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLStext}[2][]{%
-\new@ifnextchar[{\@GLStext@{#1}{#2}}{\@GLStext@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLStext@{#1}{#2}}{\@GLStext@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLStext@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('GLStext shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrytext{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrytext{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -5621,26 +7084,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glstext}[2][]{%
-\new@ifnextchar[{\@Glstext@{#1}{#2}}{\@Glstext@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glstext@{#1}{#2}}{\@Glstext@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glstext@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('Glstext shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrytext{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{Changed to just use \cs{Glsentrytext}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentrytext{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -5661,25 +7119,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsfirst}[2][]{%
-\new@ifnextchar[{\@glsfirst@{#1}{#2}}{\@glsfirst@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsfirst@{#1}{#2}}{\@glsfirst@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsfirst@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glsfirst shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryfirst{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryfirst}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryfirst{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -5698,26 +7152,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsfirst}[2][]{%
-\new@ifnextchar[{\@Glsfirst@{#1}{#2}}{\@Glsfirst@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsfirst@{#1}{#2}}{\@Glsfirst@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsfirst@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsfirst shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryfirst{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryfirst}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryfirst{#2}#3}}%
}
% \end{macrocode}
%
@@ -5736,25 +7184,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSfirst}[2][]{%
-\new@ifnextchar[{\@GLSfirst@{#1}{#2}}{\@GLSfirst@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSfirst@{#1}{#2}}{\@GLSfirst@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSfirst@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSfirst shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryfirst{#2}}%
-% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryfirst}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryfirst{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -5774,25 +7219,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsplural}[2][]{%
-\new@ifnextchar[{\@glsplural@{#1}{#2}}{\@glsplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsplural@{#1}{#2}}{\@glsplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glsplural shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryplural{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -5811,26 +7252,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsplural}[2][]{%
-\new@ifnextchar[{\@Glsplural@{#1}{#2}}{\@Glsplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsplural@{#1}{#2}}{\@Glsplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsplural shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryplural{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -5850,25 +7286,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSplural}[2][]{%
-\new@ifnextchar[{\@GLSplural@{#1}{#2}}{\@GLSplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSplural@{#1}{#2}}{\@GLSplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSplural shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryplural{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -5889,25 +7321,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsfirstplural}[2][]{%
-\new@ifnextchar[{\@glsfirstplural@{#1}{#2}}{\@glsfirstplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsfirstplural@{#1}{#2}}{\@glsfirstplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsfirstplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glsfirstplural shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryfirstplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{glsentryfirstplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryfirstplural{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -5927,26 +7356,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsfirstplural}[2][]{%
-\new@ifnextchar[{\@Glsfirstplural@{#1}{#2}}{\@Glsfirstplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsfirstplural@{#1}{#2}}{\@Glsfirstplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsfirstplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsfirstplural shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryfirstplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{Glsentryfirstplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryfirstplural{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -5966,25 +7391,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSfirstplural}[2][]{%
-\new@ifnextchar[{\@GLSfirstplural@{#1}{#2}}{\@GLSfirstplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSfirstplural@{#1}{#2}}{\@GLSfirstplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSfirstplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSfirstplural shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryfirstplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{glsentryfirstplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryfirstplural{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6005,25 +7427,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsname}[2][]{%
-\new@ifnextchar[{\@glsname@{#1}{#2}}{\@glsname@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsname@{#1}{#2}}{\@glsname@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsname@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glsname shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryname{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryname}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryname{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6043,26 +7461,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsname}[2][]{%
-\new@ifnextchar[{\@Glsname@{#1}{#2}}{\@Glsname@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsname@{#1}{#2}}{\@Glsname@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsname@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glsname shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryname{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryname}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryname{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6082,25 +7495,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSname}[2][]{%
-\new@ifnextchar[{\@GLSname@{#1}{#2}}{\@GLSname@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSname@{#1}{#2}}{\@GLSname@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSname@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSname shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryname{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryname}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryname{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6121,25 +7530,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsdesc}[2][]{%
-\new@ifnextchar[{\@glsdesc@{#1}{#2}}{\@glsdesc@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsdesc@{#1}{#2}}{\@glsdesc@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsdesc@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glsdesc shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrydesc{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrydesc}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentrydesc{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6159,26 +7564,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsdesc}[2][]{%
-\new@ifnextchar[{\@Glsdesc@{#1}{#2}}{\@Glsdesc@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsdesc@{#1}{#2}}{\@Glsdesc@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsdesc@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('Glsdesc shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrydesc{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentrydesc}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentrydesc{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6198,25 +7598,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSdesc}[2][]{%
-\new@ifnextchar[{\@GLSdesc@{#1}{#2}}{\@GLSdesc@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSdesc@{#1}{#2}}{\@GLSdesc@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSdesc@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSdesc shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrydesc{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrydesc}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrydesc{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6237,23 +7633,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsdescplural}[2][]{%
-\new@ifnextchar[{\@glsdescplural@{#1}{#2}}{\@glsdescplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsdescplural@{#1}{#2}}{\@glsdescplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsdescplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrydescplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{glsentrydescplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentrydescplural{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6273,24 +7668,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsdescplural}[2][]{%
-\new@ifnextchar[{\@Glsdescplural@{#1}{#2}}{\@Glsdescplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsdescplural@{#1}{#2}}{\@Glsdescplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsdescplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrydescplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{Glsentrydescplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentrydescplural{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6310,23 +7703,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSdescplural}[2][]{%
-\new@ifnextchar[{\@GLSdescplural@{#1}{#2}}{\@GLSdescplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSdescplural@{#1}{#2}}{\@GLSdescplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSdescplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrydescplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{glsentrydescplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrydescplural{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6347,25 +7739,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glssymbol}[2][]{%
-\new@ifnextchar[{\@glssymbol@{#1}{#2}}{\@glssymbol@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glssymbol@{#1}{#2}}{\@glssymbol@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glssymbol@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glssymbol shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrysymbol{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrysymbol}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentrysymbol{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6385,26 +7773,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glssymbol}[2][]{%
-\new@ifnextchar[{\@Glssymbol@{#1}{#2}}{\@Glssymbol@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glssymbol@{#1}{#2}}{\@Glssymbol@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glssymbol@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('Glssymbol shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrysymbol{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentrysymbol}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentrysymbol{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6424,25 +7807,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSsymbol}[2][]{%
-\new@ifnextchar[{\@GLSsymbol@{#1}{#2}}{\@GLSsymbol@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSsymbol@{#1}{#2}}{\@GLSsymbol@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSsymbol@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('GLSsymbol shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrysymbol{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentrysymbol}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrysymbol{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6463,25 +7842,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glssymbolplural}[2][]{%
-\new@ifnextchar[{\@glssymbolplural@{#1}{#2}}{\@glssymbolplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glssymbolplural@{#1}{#2}}{\@glssymbolplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glssymbolplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \changes{1.12}{2008 Mar 8}{fixed bug ('glssymbolplural shouldn't use
-% 'gls@\meta{type}@display)}
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrysymbolplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{glsentrysymbolplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentrysymbolplural{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6501,24 +7877,22 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glssymbolplural}[2][]{%
-\new@ifnextchar[{\@Glssymbolplural@{#1}{#2}}{\@Glssymbolplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glssymbolplural@{#1}{#2}}{\@Glssymbolplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glssymbolplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrysymbolplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{Glsentrysymbolplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentrysymbolplural{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6538,23 +7912,21 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSsymbolplural}[2][]{%
-\new@ifnextchar[{\@GLSsymbolplural@{#1}{#2}}{\@GLSsymbolplural@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSsymbolplural@{#1}{#2}}{\@GLSsymbolplural@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSsymbolplural@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentrysymbolplural{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Call \cs{@gls@link}
-% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter}
+% \changes{1.13}{2008 May 10}{fixed bug that ignored 3rd parameter}
+%\changes{3.11a}{2013-10-15}{changed to just use
+%\cs{glsentrysymbolplural}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentrysymbolplural{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6575,22 +7947,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsuseri}[2][]{%
-\new@ifnextchar[{\@glsuseri@{#1}{#2}}{\@glsuseri@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsuseri@{#1}{#2}}{\@glsuseri@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsuseri@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseri{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseri}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryuseri{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6610,23 +7980,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsuseri}[2][]{%
-\new@ifnextchar[{\@Glsuseri@{#1}{#2}}{\@Glsuseri@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsuseri@{#1}{#2}}{\@Glsuseri@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsuseri@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseri{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuseri}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryuseri{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6646,22 +8013,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSuseri}[2][]{%
-\new@ifnextchar[{\@GLSuseri@{#1}{#2}}{\@GLSuseri@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSuseri@{#1}{#2}}{\@GLSuseri@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSuseri@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseri{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseri}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6682,22 +8047,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsuserii}[2][]{%
-\new@ifnextchar[{\@glsuserii@{#1}{#2}}{\@glsuserii@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsuserii@{#1}{#2}}{\@glsuserii@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsuserii@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuserii{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuserii}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryuserii{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6717,23 +8080,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsuserii}[2][]{%
-\new@ifnextchar[{\@Glsuserii@{#1}{#2}}{\@Glsuserii@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsuserii@{#1}{#2}}{\@Glsuserii@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsuserii@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuserii{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuserii}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryuserii{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6753,22 +8113,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSuserii}[2][]{%
-\new@ifnextchar[{\@GLSuserii@{#1}{#2}}{\@GLSuserii@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSuserii@{#1}{#2}}{\@GLSuserii@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSuserii@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuserii{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuserii}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6789,22 +8147,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsuseriii}[2][]{%
-\new@ifnextchar[{\@glsuseriii@{#1}{#2}}{\@glsuseriii@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsuseriii@{#1}{#2}}{\@glsuseriii@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsuseriii@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseriii{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseriii}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryuseriii{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6824,23 +8180,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsuseriii}[2][]{%
-\new@ifnextchar[{\@Glsuseriii@{#1}{#2}}{\@Glsuseriii@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsuseriii@{#1}{#2}}{\@Glsuseriii@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsuseriii@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseriii{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuseriii}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryuseriii{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6860,22 +8213,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSuseriii}[2][]{%
-\new@ifnextchar[{\@GLSuseriii@{#1}{#2}}{\@GLSuseriii@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSuseriii@{#1}{#2}}{\@GLSuseriii@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSuseriii@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseriii{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseriii}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -6896,22 +8247,19 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsuseriv}[2][]{%
-\new@ifnextchar[{\@glsuseriv@{#1}{#2}}{\@glsuseriv@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsuseriv@{#1}{#2}}{\@glsuseriv@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsuseriv@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseriv{#2}}%
-% \end{macrocode}
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseriv}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryuseriv{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6931,23 +8279,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsuseriv}[2][]{%
-\new@ifnextchar[{\@Glsuseriv@{#1}{#2}}{\@Glsuseriv@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsuseriv@{#1}{#2}}{\@Glsuseriv@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsuseriv@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseriv{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuseriv}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryuseriv{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -6967,22 +8312,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSuseriv}[2][]{%
-\new@ifnextchar[{\@GLSuseriv@{#1}{#2}}{\@GLSuseriv@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSuseriv@{#1}{#2}}{\@GLSuseriv@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSuseriv@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuseriv{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuseriv}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -7003,22 +8346,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsuserv}[2][]{%
-\new@ifnextchar[{\@glsuserv@{#1}{#2}}{\@glsuserv@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsuserv@{#1}{#2}}{\@glsuserv@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsuserv@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuserv{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuserv}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryuserv{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -7043,18 +8384,15 @@ name=true]{%
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsuserv@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuserv{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuserv}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryuserv{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -7079,17 +8417,15 @@ name=true]{%
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSuserv@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuserv{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuserv}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -7110,22 +8446,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@glsuservi}[2][]{%
-\new@ifnextchar[{\@glsuservi@{#1}{#2}}{\@glsuservi@{#1}{#2}[]}}
+ \new@ifnextchar[{\@glsuservi@{#1}{#2}}{\@glsuservi@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@glsuservi@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuservi{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuservi}}
% Call \cs{@gls@link}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\@glo@text#3}%
-}%
+ \@gls@link[#1]{#2}{\glsentryuservi{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -7145,23 +8479,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@Glsuservi}[2][]{%
-\new@ifnextchar[{\@Glsuservi@{#1}{#2}}{\@Glsuservi@{#1}{#2}[]}}
+ \new@ifnextchar[{\@Glsuservi@{#1}{#2}}{\@Glsuservi@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@Glsuservi@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuservi{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
% Call \cs{@gls@link}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{Glsentryuservi}}
% \begin{macrocode}
-\@gls@link[#1]{#2}{%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
-}%
+ \@gls@link[#1]{#2}{\Glsentryuservi{#2}#3}%
+ }%
}
% \end{macrocode}
%
@@ -7181,22 +8512,20 @@ name=true]{%
% a final optional argument
% \begin{macrocode}
\newcommand*{\@GLSuservi}[2][]{%
-\new@ifnextchar[{\@GLSuservi@{#1}{#2}}{\@GLSuservi@{#1}{#2}[]}}
+ \new@ifnextchar[{\@GLSuservi@{#1}{#2}}{\@GLSuservi@{#1}{#2}[]}}
% \end{macrocode}
% Read in the final optional argument:
% \begin{macrocode}
\def\@GLSuservi@#1#2[#3]{%
-\glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
-% \begin{macrocode}
-\protected@edef\@glo@text{\glsentryuservi{#2}}%
+ \glsdoifexists{#2}%
+ {%
+ \edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{changed to just use \cs{glsentryuservi}}
% Call \cs{@gls@link}
% \begin{macrocode}
-\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
-}%
+ \@gls@link[#1]{#2}{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}%
+ }%
}
% \end{macrocode}
%
@@ -7228,14 +8557,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentryshort{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@firstofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glsentryshort{#2}}#3%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7267,17 +8602,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentryshort{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@secondofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\Glsentryshort{#2}}#3%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}%
- {%
- \acronymfont{\expandafter\makefirstuc\expandafter{\@glo@text}}#3%
- }%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7309,14 +8647,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentryshort{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@thirdofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \mfirstucMakeUppercase{\acronymfont{\glsentryshort{#2}}#3}%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\acronymfont{\MakeUppercase{\@glo@text#3}}}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7349,14 +8693,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentryshortpl{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@firstofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glsentryshortpl{#2}}#3%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7388,17 +8738,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentryshortpl{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@secondofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\Glsentryshortpl{#2}}#3%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}%
- {%
- \acronymfont{\expandafter\makefirstuc\expandafter{\@glo@text}}#3%
- }%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7430,14 +8783,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentryshortpl{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@thirdofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \mfirstucMakeUppercase{\acronymfont{\glsentryshortpl{#2}}#3}%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\acronymfont{\MakeUppercase{\@glo@text#3}}}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7469,14 +8828,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentrylong{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@firstofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glsentrylong{#2}}#3%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\@glo@text#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7508,17 +8873,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentrylong{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@secondofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\Glsentrylong{#2}}#3%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}%
- {%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3%
- }%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7550,14 +8918,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentrylong{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@thirdofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \mfirstucMakeUppercase{\acronymfont{\glsentrylong{#2}}#3}%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7590,14 +8964,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentrylongpl{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@firstofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glsentrylongpl{#2}}#3%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\@glo@text#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7629,17 +9009,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentrylongpl{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@secondofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\Glsentrylongpl{#2}}#3%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}%
- {%
- \expandafter\makefirstuc\expandafter{\@glo@text}#3%
- }%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7671,14 +9054,20 @@ name=true]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \protected@edef\@glo@text{\glsentrylongpl{#2}}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@firstoftwo
+ \let\glscapscase\@thirdofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \mfirstucMakeUppercase{\acronymfont{\glsentrylongpl{#2}}#3}%
+ }%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -7702,10 +9091,12 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentryname}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryname}[1]{%
-\protected@edef\@glo@text{\csname glo@#1@name\endcsname}%
-\expandafter\makefirstuc\expandafter{\@glo@text}}
+\newrobustcmd*{\Glsentryname}[1]{%
+ \protected@edef\@glo@text{\csname glo@#1@name\endcsname}%
+ \expandafter\makefirstuc\expandafter{\@glo@text}%
+}
% \end{macrocode}
%\end{macro}
%
@@ -7721,10 +9112,12 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentrydesc}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentrydesc}[1]{%
-\protected@edef\@glo@text{\csname glo@#1@desc\endcsname}%
-\expandafter\makefirstuc\expandafter{\@glo@text}}
+\newrobustcmd*{\Glsentrydesc}[1]{%
+ \protected@edef\@glo@text{\csname glo@#1@desc\endcsname}%
+ \expandafter\makefirstuc\expandafter{\@glo@text}%
+}
% \end{macrocode}
%\end{macro}
% Plural form:
@@ -7732,13 +9125,14 @@ name=true]{%
%\changes{1.12}{2008 Mar 8}{New}
% \begin{macrocode}
\newcommand*{\glsentrydescplural}[1]{%
-\csname glo@#1@descplural\endcsname}
+ \csname glo@#1@descplural\endcsname}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentrydescplural}
%\changes{1.12}{2008 Mar 8}{New}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentrydescplural}[1]{%
+\newrobustcmd*{\Glsentrydescplural}[1]{%
\protected@edef\@glo@text{\csname glo@#1@descplural\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7753,9 +9147,10 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentrytext}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentrytext}[1]{%
-\protected@edef\@glo@text{\csname glo@#1@text\endcsname}%
+\newrobustcmd*{\Glsentrytext}[1]{%
+ \protected@edef\@glo@text{\csname glo@#1@text\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
%\end{macro}
@@ -7767,8 +9162,9 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentryplural}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryplural}[1]{%
+\newrobustcmd*{\Glsentryplural}[1]{%
\protected@edef\@glo@text{\csname glo@#1@plural\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7785,8 +9181,9 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentrysymbol}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentrysymbol}[1]{%
+\newrobustcmd*{\Glsentrysymbol}[1]{%
\protected@edef\@glo@text{\csname glo@#1@symbol\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7796,13 +9193,14 @@ name=true]{%
%\changes{1.12}{2008 Mar 8}{New}
% \begin{macrocode}
\newcommand*{\glsentrysymbolplural}[1]{%
-\csname glo@#1@symbolplural\endcsname}
+ \csname glo@#1@symbolplural\endcsname}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentrysymbolplural}
%\changes{1.12}{2008 Mar 8}{New}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentrysymbolplural}[1]{%
+\newrobustcmd*{\Glsentrysymbolplural}[1]{%
\protected@edef\@glo@text{\csname glo@#1@symbolplural\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7817,8 +9215,9 @@ name=true]{%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentryfirst}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryfirst}[1]{%
+\newrobustcmd*{\Glsentryfirst}[1]{%
\protected@edef\@glo@text{\csname glo@#1@first\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7829,12 +9228,13 @@ name=true]{%
%\begin{macro}{\glsentryfirstplural}
% \begin{macrocode}
\newcommand*{\glsentryfirstplural}[1]{%
-\csname glo@#1@firstpl\endcsname}
+ \csname glo@#1@firstpl\endcsname}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentryfirstplural}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryfirstplural}[1]{%
+\newrobustcmd*{\Glsentryfirstplural}[1]{%
\protected@edef\@glo@text{\csname glo@#1@firstpl\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7869,8 +9269,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentryuseri}
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryuseri}[1]{%
+\newrobustcmd*{\Glsentryuseri}[1]{%
\protected@edef\@glo@text{\csname glo@#1@useri\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7887,8 +9288,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentryuserii}
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryuserii}[1]{%
+\newrobustcmd*{\Glsentryuserii}[1]{%
\protected@edef\@glo@text{\csname glo@#1@userii\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7905,8 +9307,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentryuseriii}
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryuseriii}[1]{%
+\newrobustcmd*{\Glsentryuseriii}[1]{%
\protected@edef\@glo@text{\csname glo@#1@useriii\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7923,8 +9326,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentryuseriv}
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryuseriv}[1]{%
+\newrobustcmd*{\Glsentryuseriv}[1]{%
\protected@edef\@glo@text{\csname glo@#1@useriv\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7941,8 +9345,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentryuserv}
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryuserv}[1]{%
+\newrobustcmd*{\Glsentryuserv}[1]{%
\protected@edef\@glo@text{\csname glo@#1@userv\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7959,8 +9364,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentryuservi}
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryuservi}[1]{%
+\newrobustcmd*{\Glsentryuservi}[1]{%
\protected@edef\@glo@text{\csname glo@#1@uservi\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7977,8 +9383,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentryshort}
%\changes{3.0}{2011/04/02}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryshort}[1]{%
+\newrobustcmd*{\Glsentryshort}[1]{%
\protected@edef\@glo@text{\csname glo@#1@short\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -7995,8 +9402,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentryshortpl}
%\changes{3.0}{2011/04/02}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentryshortpl}[1]{%
+\newrobustcmd*{\Glsentryshortpl}[1]{%
\protected@edef\@glo@text{\csname glo@#1@shortpl\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -8013,9 +9421,10 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentrylong}
%\changes{3.0}{2011/04/02}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentrylong}[1]{%
-\protected@edef\@glo@text{\csname glo@#1@long\endcsname}%
+\newrobustcmd*{\Glsentrylong}[1]{%
+ \protected@edef\@glo@text{\csname glo@#1@long\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
%\end{macro}
@@ -8031,8 +9440,9 @@ name=true]{%
%\end{macro}
%\begin{macro}{\Glsentrylongpl}
%\changes{3.0}{2011/04/02}{new}
+%\changes{3.09a}{2013-10-09}{made robust}
% \begin{macrocode}
-\newcommand*{\Glsentrylongpl}[1]{%
+\newrobustcmd*{\Glsentrylongpl}[1]{%
\protected@edef\@glo@text{\csname glo@#1@longpl\endcsname}%
\expandafter\makefirstuc\expandafter{\@glo@text}}
% \end{macrocode}
@@ -8040,34 +9450,40 @@ name=true]{%
%
% Short cut macros to access full form:
%\begin{macro}{\glsentryfull}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{acrfullformat}}
% \begin{macrocode}
\newcommand*{\glsentryfull}[1]{%
- \glsentrylong{#1}\space(\glsentryshort{#1})%
+ \acrfullformat{\glsentrylong{#1}}{\glsentryshort{#1}}%
}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentryfull}
+%\changes{3.09a}{2013-10-09}{made robust}
%\changes{3.02}{2012/05/21}{fixed bug (replaced \cs{glsentryshortpl}
%with \cs{glsentryshort})}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{acrfullformat}}
% \begin{macrocode}
-\newcommand*{\Glsentryfull}[1]{%
- \Glsentrylong{#1}\space(\glsentryshort{#1})%
+\newrobustcmd*{\Glsentryfull}[1]{%
+ \acrfullformat{\Glsentrylong{#1}}{\glsentryshort{#1}}%
}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\glsentryfullpl}
%\changes{3.02}{2012/05/21}{fixed bug (replaced \cs{glsentryshort}
%with \cs{glsentryshortpl})}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{acrfullformat}}
% \begin{macrocode}
\newcommand*{\glsentryfullpl}[1]{%
- \glsentrylongpl{#1}\space(\glsentryshortpl{#1})%
+ \acrfullformat{\glsentrylongpl{#1}}{\glsentryshortpl{#1}}%
}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Glsentryfullpl}
+%\changes{3.09a}{2013-10-09}{made robust}
+%\changes{3.13a}{2013-11-05}{changed to use \cs{acrfullformat}}
% \begin{macrocode}
-\newcommand*{\Glsentryfullpl}[1]{%
- \Glsentrylongpl{#1}\space(\glsentryshortpl{#1})%
+\newrobustcmd*{\Glsentryfullpl}[1]{%
+ \acrfullformat{\Glsentrylongpl{#1}}{\glsentryshortpl{#1}}%
}
% \end{macrocode}
%\end{macro}
@@ -8090,8 +9506,7 @@ name=true]{%
% Formats the number list for the given entry label.
% Doesn't work with hyperref.
% \begin{macrocode}
-\@ifpackageloaded{hyperref}
-{%
+\@ifpackageloaded{hyperref} {%
\newcommand*{\glsdisplaynumberlist}[1]{%
\GlossariesWarning
{%
@@ -8185,8 +9600,10 @@ name=true]{%
% \begin{macrocode}
\define@key{glossadd}{types}{\def\@glo@type{#1}}
% \end{macrocode}
-%\vskip5pt
-%\cs{glsadd}\oarg{options}\marg{label}\\[10pt]
+%
+%\begin{definition}
+%\cs{glsadd}\oarg{options}\marg{label}
+%\end{definition}
% Add a term to the glossary without generating any link text.
% The optional argument indicates which counter to use,
% and how to format it (using a key-value list)
@@ -8213,8 +9630,10 @@ name=true]{%
}
% \end{macrocode}
%\end{macro}
-%\vskip5pt
-%\cs{glsaddall}\oarg{option list}\\[10pt]
+%
+%\begin{definition}
+%\cs{glsaddall}\oarg{option list}
+%\end{definition}
% Add all terms defined for the listed glossaries (without displaying
% any text). If \gloskey[glsaddall]{types} key is omitted, apply to all
% glossary types.
@@ -8222,10 +9641,30 @@ name=true]{%
%\changes{3.01}{2011/04/12}{made robust}
% \begin{macrocode}
\newrobustcmd*{\glsaddall}[1][]{%
-\edef\@glo@type{\@glo@types}%
-\setkeys{glossadd}{#1}%
-\forallglsentries[\@glo@type]{\@glo@entry}{%
-\glsadd[#1]{\@glo@entry}}%
+ \edef\@glo@type{\@glo@types}%
+ \setkeys{glossadd}{#1}%
+ \forallglsentries[\@glo@type]{\@glo@entry}{%
+ \glsadd[#1]{\@glo@entry}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsaddallunused}
+%\begin{definition}
+%\cs{glsaddallunused}\oarg{glossary type}
+%\end{definition}
+% Add all used terms defined for the listed glossaries (without displaying
+% any text). If optional argument is omitted, apply to all
+% glossary types. This should typically go at the end of the
+% document.
+%\changes{3.08a}{2013-09-28}{new}
+%\changes{3.13a}{2013-11-05}{set default to \cs{@glo@types}}
+% \begin{macrocode}
+\newrobustcmd*{\glsaddallunused}[1][\@glo@types]{%
+ \forallglsentries[#1]{\@glo@entry}%
+ {%
+ \ifglsused{\@glo@entry}{}{\glsadd[format=@gobble]{\@glo@entry}}%
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -8326,7 +9765,8 @@ name=true]{%
%\begin{macro}{\writeist}
%\changes{1.17}{2008 December 26}{added xindy support}
-%\changes{1.01}{2007 May 17}{Added spaces after 'delimN and 'delimR in ist file}%
+%\changes{1.01}{2007 May 17}{Added spaces after \cs{delimN} and
+%\cs{delimR} in ist file}%
%\changes{3.0}{2011/04/02}{modified to support new format}
% \begin{macrocode}
\ifglsxindy
@@ -8747,6 +10187,13 @@ name=true]{%
% \begin{macrocode}
\newcommand*{\makeglossaries}{%
% \end{macrocode}
+%\changes{3.10a}{2013-10-13}{Added providecommand code to aux file}
+% If the user removes the glossary package from their document,
+% ensure the next run doesn't throw a load of undefined control
+% sequence errors when the aux file is parsed.
+% \begin{macrocode}
+ \protected@write\@auxout{}{\string\providecommand\string\@glsorder[1]{}}
+ \protected@write\@auxout{}{\string\providecommand\string\@istfilename[1]{}}
% Write the name of the style file to the aux file
% (needed by \app{makeglossaries})
% \begin{macrocode}
@@ -8779,6 +10226,10 @@ name=true]{%
% \begin{macrocode}
\@disable@onlypremakeg
% \end{macrocode}
+% Allow \gloskey{see} key:
+% \begin{macrocode}
+ \let\gls@checkseeallowed\relax
+% \end{macrocode}
% Suppress warning about no \cs{makeglossaries}
% \begin{macrocode}
\let\warn@nomakeglossaries\relax
@@ -8841,51 +10292,50 @@ name=true]{%
\glswritefiles
}
% \end{macrocode}
-%\begin{macro}{\glswritefiles}
+%\begin{macro}{\@glswritefiles}
% Only write the files if \pkgopt[true]{savewrites}
+%\changes{3.14a}{2013-11-12}{renamed \cs{glswritefiles} to
+%\cs{@glswritefiles} and used ``savewrites'' option to set
+%\cs{glswritefiles}}
% \begin{macrocode}
-\ifglssavewrites
- \newcommand*{\glswritefiles}{%
+\newcommand*{\@glswritefiles}{%
% \end{macrocode}
% Iterate through all the glossaries
%\changes{3.01}{2011/04/12}{added check for empty glossaries}
%\changes{3.02}{2012/05/21}{added check for existence of token
% in case \cs{makeglossaries has been omitted}}
% \begin{macrocode}
- \forallglossaries{\@glo@type}{%
+ \forallglossaries{\@glo@type}{%
% \end{macrocode}
% Check for empty glossaries (patch provided by Patrick H\"acker)
% \begin{macrocode}
- \ifcsundef{glo@\@glo@type @filetok}%
- {%
- \def\gls@tmp{}%
- }%
- {%
- \edef\gls@tmp{\expandafter\the
- \csname glo@\@glo@type @filetok\endcsname}%
- }%
- \ifx\gls@tmp\@empty
- \ifx\@glo@type\glsdefaulttype
- \GlossariesWarningNoLine{Glossary `\@glo@type' has no
- entries.^^JRemember to use package option `nomain' if
+ \ifcsundef{glo@\@glo@type @filetok}%
+ {%
+ \def\gls@tmp{}%
+ }%
+ {%
+ \edef\gls@tmp{\expandafter\the
+ \csname glo@\@glo@type @filetok\endcsname}%
+ }%
+ \ifx\gls@tmp\@empty
+ \ifx\@glo@type\glsdefaulttype
+ \GlossariesWarningNoLine{Glossary `\@glo@type' has no
+ entries.^^JRemember to use package option `nomain' if
you
- don't want to^^Juse the main glossary}%
- \else
- \GlossariesWarningNoLine{Glossary `\@glo@type' has no
- entries}%
- \fi
- \else
- \@glsopenfile{\glswrite}{\@glo@type}%
- \immediate\write\glswrite{%
- \expandafter\the
- \csname glo@\@glo@type @filetok\endcsname}%
- \immediate\closeout\glswrite
- \fi
- }%
- }
-\else
- \let\glswritefiles\relax
-\fi
+ don't want to^^Juse the main glossary}%
+ \else
+ \GlossariesWarningNoLine{Glossary `\@glo@type' has no
+ entries}%
+ \fi
+ \else
+ \@glsopenfile{\glswrite}{\@glo@type}%
+ \immediate\write\glswrite{%
+ \expandafter\the
+ \csname glo@\@glo@type @filetok\endcsname}%
+ \immediate\closeout\glswrite
+ \fi
+ }%
+}
% \end{macrocode}
%\end{macro}
%
@@ -9214,8 +10664,9 @@ you
%\begin{macro}{\glssee}
%\cs{glssee}\marg{label}\marg{cross-ref list}
%\changes{1.17}{2008 December 26}{new}
+%\changes{3.08a}{2013-09-28}{made robust}
% \begin{macrocode}
-\newcommand*{\glssee}[3][\seename]{%
+\DeclareRobustCommand*{\glssee}[3][\seename]{%
\@do@seeglossary{#2}{[#1]{#3}}}
\newcommand*{\@glssee}[3][\seename]{%
\glssee[#1]{#3}{#2}}
@@ -9224,17 +10675,20 @@ you
%
%\begin{macro}{\glsseeformat}
%\changes{1.17}{2008 December 26}{new}
+%\changes{3.08a}{2013-09-28}{made robust}
% The first argument specifies what tag to use (e.g.\ ``see''),
% the second argument is a comma-separated list of labels.
% The final argument (the location) is ignored.
% \begin{macrocode}
-\newcommand*{\glsseeformat}[3][\seename]{\emph{#1} \glsseelist{#2}}
+\DeclareRobustCommand*{\glsseeformat}[3][\seename]{%
+ \emph{#1} \glsseelist{#2}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\glsseelist}
%\cs{glsseelist}\marg{list} formats list of entry labels.
+%\changes{3.08a}{2013-09-28}{made robust}
% \begin{macrocode}
-\newcommand*{\glsseelist}[1]{%
+\DeclareRobustCommand*{\glsseelist}[1]{%
% \end{macrocode}
% If there is only one item in the list, set the last separator
% to do nothing.
@@ -9288,8 +10742,9 @@ you
% cross-referencing list.
%\changes{3.0}{2011/04/02}{hyperlink uses \cs{glsseeitemformat} instead
%of \cs{glsentryname}}
+%\changes{3.08a}{2013-09-28}{made robust}
% \begin{macrocode}
-\newcommand*{\glsseeitem}[1]{\glshyperlink[\glsseeitemformat{#1}]{#1}}
+\DeclareRobustCommand*{\glsseeitem}[1]{\glshyperlink[\glsseeitemformat{#1}]{#1}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\glsseeitemformat}
@@ -9345,7 +10800,8 @@ you
%\begin{macro}{\printglossary}
%\changes{1.17}{2008 December 26}{added print language to aux file}
%\changes{1.15}{2008 August 15}{changed the way the TOC title is set}
-%\changes{1.17}{2008 December 26}{added check to determine if 'printglossary is already
+%\changes{1.17}{2008 December 26}{added check to determine if
+%\cs{printglossary} is already
% defined}
% The TOC title needs to be processed in a different manner
% to the main title in case the \sty{translator} and \sty{hyperref} packages
@@ -9432,15 +10888,16 @@ you
\@glossarystyle
% \end{macrocode}
%\changes{3.02}{2012/05/21}{add a way to fetch current entry label}
-% added a way to fetch the current entry label:
+% added a way to fetch the current entry label (v3.08 updated for
+% new \cs{glossentry} and \cs{subglossentry}):
% \begin{macrocode}
- \let\gls@org@glossaryentryfield\glossaryentryfield
- \let\gls@org@glossarysubentryfield\glossarysubentryfield
- \renewcommand{\glossaryentryfield}[1]{%
+ \let\gls@org@glossaryentryfield\glossentry
+ \let\gls@org@glossarysubentryfield\subglossentry
+ \renewcommand{\glossentry}[1]{%
\gdef\glscurrententrylabel{##1}%
\gls@org@glossaryentryfield{##1}%
}%
- \renewcommand{\glossarysubentryfield}[2]{%
+ \renewcommand{\subglossentry}[2]{%
\gdef\glscurrententrylabel{##2}%
\gls@org@glossarysubentryfield{##1}{##2}%
}%
@@ -9476,6 +10933,14 @@ you
{%
\edef\@do@auxoutstuff{%
\noexpand\AtEndDocument{%
+% \end{macrocode}
+%\changes{3.10a}{2013-10-13}{Added providecommand code to aux file}
+% If the user removes the glossary package from their document,
+% ensure the next run doesn't throw a load of undefined control
+% sequence errors when the aux file is parsed.
+% \begin{macrocode}
+ \noexpand\immediate\noexpand\write\@auxout{%
+ \string\providecommand\string\@xdylanguage[2]{}}%
\noexpand\immediate\noexpand\write\@auxout{%
\string\@xdylanguage{\@glo@type}{\@xdy@main@language}}%
}%
@@ -9485,6 +10950,8 @@ you
\edef\@do@auxoutstuff{%
\noexpand\AtEndDocument{%
\noexpand\immediate\noexpand\write\@auxout{%
+ \string\providecommand\string\@xdylanguage[2]{}}%
+ \noexpand\immediate\noexpand\write\@auxout{%
\string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type
@language\endcsname}}%
}%
@@ -9493,6 +10960,14 @@ you
\@do@auxoutstuff
\edef\@do@auxoutstuff{%
\noexpand\AtEndDocument{%
+% \end{macrocode}
+%\changes{3.10a}{2013-10-13}{Added providecommand code to aux file}
+% If the user removes the glossary package from their document,
+% ensure the next run doesn't throw a load of undefined control
+% sequence errors when the aux file is parsed.
+% \begin{macrocode}
+ \noexpand\immediate\noexpand\write\@auxout{%
+ \string\providecommand\string\@gls@codepage[2]{}}%
\noexpand\immediate\noexpand\write\@auxout{%
\string\@gls@codepage{\@glo@type}{\gls@codepage}}%
}%
@@ -9566,11 +11041,13 @@ you
{Glossary style `#1' undefined}{}%
}%
{%
- \def\@glossarystyle{\csname @glsstyle@#1\endcsname}%
+ \def\@glossarystyle{\setglossentrycompatibility
+ \csname @glsstyle@#1\endcsname}%
}%
}
% \end{macrocode}
-% \changes{1.14}{2008 June 17}{added numberedsection key to 'printglossary}
+% \changes{1.14}{2008 June 17}{added numberedsection key to
+% \cs{printglossary}}
% The \gloskey[printglossary]{numberedsection} key determines if this
% glossary should be in a numbered section.
% \begin{macrocode}
@@ -9587,7 +11064,17 @@ false,nolabel,autolabel}[nolabel]{%
\renewcommand*{\@@glossaryseclabel}{\label{\glsautoprefix\@glo@type}}%
\fi}
% \end{macrocode}
-% \changes{1.14}{2008 June 17}{added nonumberlist key to 'printglossary}
+%
+%\changes{3.08a}{2013-09-28}{added nogroupskip key to \cs{printglossary}}
+% The \gloskey[printglossary]{nogroupskip} key determines whether or
+% not there should be a vertical gap between glossary groups.
+% \begin{macrocode}
+\define@choicekey{printgloss}{nogroupskip}{true,false}[true]{%
+ \csuse{glsnogroupskip#1}%
+}
+% \end{macrocode}
+% \changes{1.14}{2008 June 17}{added nonumberlist key to
+% \cs{printglossary}}
% The \gloskey[printglossary]{nonumberlist} key determines if this
% glossary should have a number list.
% \begin{macrocode}
@@ -9857,17 +11344,154 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
%\end{macro}
%
+% As from version 3.08, glossary information is now written to the
+% external files using \ics{glossentry} and \ics{subglossentry}
+% instead of \cs{glossaryentryfield} and \cs{glossarysubentryfield}.
+% The default definition provides backward compatibility for
+% glossary styles that use the old forms.
+%\begin{macro}{\compatibleglossentry}
+%\changes{3.08a}{2013-09-28}{new}
+%\begin{definition}
+% \cs{glossentry}\marg{label}\marg{page-list}
+%\end{definition}
+% \begin{macrocode}
+\providecommand*{\compatibleglossentry}[2]{%
+ \toks@{#2}%
+ \protected@edef\@do@glossentry{\noexpand\glossaryentryfield{#1}%
+ {\noexpand\glsnamefont
+ {\expandafter\expandonce\csname glo@#1@name\endcsname}}%
+ {\expandafter\expandonce\csname glo@#1@desc\endcsname}%
+ {\expandafter\expandonce\csname glo@#1@symbol\endcsname}%
+ {\the\toks@}%
+ }%
+ \@do@glossentry
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glossentryname}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\newcommand*{\glossentryname}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \letcs{\glo@name}{glo@#1@name}%
+ \expandafter\glsnamefont\expandafter{\glo@name}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Glossentryname}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\newcommand*{\Glossentryname}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glsnamefont{\Glsentryname{#1}}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glossentrydesc}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\newcommand*{\glossentrydesc}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glsentrydesc{#1}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Glossentrydesc}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\newcommand*{\Glossentrydesc}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \Glsentrydesc{#1}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glossentrysymbol}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\newcommand*{\glossentrysymbol}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glsentrysymbol{#1}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Glossentrysymbol}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\newcommand*{\Glossentrysymbol}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \Glsentrysymbol{#1}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\begin{macro}{\compatiblesubglossentry}
+%\changes{3.08a}{2013-09-28}{new}
+%\begin{definition}
+% \cs{subglossentry}\marg{level}\marg{label}\marg{page-list}
+%\end{definition}
+% \begin{macrocode}
+\providecommand*{\compatiblesubglossentry}[3]{%
+ \toks@{#3}%
+ \protected@edef\@do@subglossentry{\noexpand\glossarysubentryfield{\number#1}%
+ {#2}%
+ {\noexpand\glsnamefont
+ {\expandafter\expandonce\csname glo@#2@name\endcsname}}%
+ {\expandafter\expandonce\csname glo@#2@desc\endcsname}%
+ {\expandafter\expandonce\csname glo@#2@symbol\endcsname}%
+ {\the\toks@}%
+ }%
+ \@do@subglossentry
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\setglossentrycompatibility}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\newcommand*{\setglossentrycompatibility}{%
+ \let\glossentry\compatibleglossentry
+ \let\subglossentry\compatiblesubglossentry
+}
+\setglossentrycompatibility
+% \end{macrocode}
+%\end{macro}
+%
+%
%\begin{macro}{\glossaryentryfield}
% \cs{glossaryentryfield}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list}\\[10pt]
-% This command governs how each entry row should be formatted
-% in the glossary. Glossary styles need to redefine this command.
-% Most of the predefined styles ignore \meta{symbol}.
+% This command formerly governed how each entry row should be formatted
+% in the glossary. Now deprecated.
+%\changes{3.08a}{2013-09-28}{deprecated}
% \begin{macrocode}
-\newcommand*{\glossaryentryfield}[5]{%
-\noindent\textbf{\glstarget{#1}{#2}} #4 #3. #5\par}
+\newcommand{\glossaryentryfield}[5]{%
+ \GlossariesWarning
+ {Deprecated use of \string\glossaryentryfield.^^J
+ I recommend you change to \string\glossentry.^^J
+ If you've just upgraded, try removing your gls auxiliary
+ files^^J and recompile}%
+ \noindent\textbf{\glstarget{#1}{#2}} #4 #3. #5\par}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\glossaryentryfield}
+%\begin{macro}{\glossarysubentryfield}
% \cs{glossarysubentryfield}\marg{level}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list}\\[10pt]
% This command governs how each subentry should be formatted
% in the glossary. Glossary styles need to redefine this command.
@@ -9876,7 +11500,12 @@ false,nolabel,autolabel}[nolabel]{%
% be greater than or equal to 1.)
% \begin{macrocode}
\newcommand*{\glossarysubentryfield}[6]{%
-\glstarget{#2}{\strut}#4. #6\par}
+ \GlossariesWarning
+ {Deprecated use of \string\glossarysubentryfield.^^J
+ I recommend you change to \string\subglossentry.^^J
+ If you've just upgraded, try removing your gls auxiliary
+ files^^J and recompile}%
+ \glstarget{#2}{\strut}#4. #6\par}
% \end{macrocode}
%\end{macro}
%
@@ -9923,8 +11552,10 @@ false,nolabel,autolabel}[nolabel]{%
% modify the translation control sequences \cs{glsgetgrouptitle}
% and \cs{glsgetgrouplabel} so that the label is translated
% into the required title (and vice-versa).
-%\\[10pt]
-%\cs{glsgetgrouptitle}\marg{label}\\[10pt]
+%
+%\begin{definition}
+%\cs{glsgetgrouptitle}\marg{label}
+%\end{definition}
% This command produces the title for the glossary group
% whose label is given by \meta{label}. By default, the group
% labelled \texttt{glssymbols} produces
@@ -9934,17 +11565,52 @@ false,nolabel,autolabel}[nolabel]{%
% As mentioned above, the group labels are: \texttt{glssymbols}, \texttt{glsnumbers},
% \texttt{A}, \ldots, \texttt{Z}\@. If you want to redefine
% the group titles, you will need to redefine this command.
+% Languages other than English may produce labels that are
+% non-expandable, so we need to check for that otherwise it will
+% create a \qt{missing \cs{endcsname} inserted} error.
%\begin{macro}{\glsgetgrouptitle}
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
%\cs{ifcsundef}}
+%\changes{3.11a}{2013-10-15}{Added check in case non-Latin alphabet
+%in use}
% \begin{macrocode}
\newcommand*{\glsgetgrouptitle}[1]{%
- \ifcsundef{#1groupname}{#1}{\csname #1groupname\endcsname}%
+ \@gls@getgrouptitle{#1}{\@gls@grptitle}%
+ \@gls@grptitle
}
% \end{macrocode}
%\end{macro}
-%\vskip5pt
-%\cs{glsgetgrouplabel}\marg{title}\\[10pt]
+%\begin{macro}{\@gls@getgrouptitle}
+% Gets the group title specified by the label (first argument) and
+% stores in the second argument, which must be a control sequence.
+% \begin{macrocode}
+\newcommand*{\@gls@getgrouptitle}[2]{%
+% \end{macrocode}
+% Even if the argument appears to be a single letter, it won't be
+% considered a single letter by \cs{dtl@ifsingle} if it's an active
+% character.
+% \begin{macrocode}
+ \dtl@ifsingle{#1}%
+ {%
+ \ifcsundef{#1groupname}{\def#2{#1}}{\letcs#2{#1groupname}}%
+ }%
+ {%
+ \ifboolexpr{test{\ifstrequal{#1}{glssymbols}}
+ or test{\ifstrequal{#1}{glsnumbers}}}%
+ {%
+ \ifcsundef{#1groupname}{\def#2{#1}}{\letcs#2{#1groupname}}%
+ }%
+ {%
+ \def#2{#1}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{definition}
+%\cs{glsgetgrouplabel}\marg{title}
+%\end{definition}
%This command does the reverse to the previous command. The
% argument is the group title, and it produces the group label.
% Note that if you redefine \cs{glsgetgrouptitle}, you
@@ -9980,7 +11646,21 @@ false,nolabel,autolabel}[nolabel]{%
%\end{macro}
%
% The current glossary style can be set using
-% \cs{glossarystyle}\marg{style}.
+% \cs{setglossarystyle}\marg{style}.
+%\begin{macro}{\setglossarystyle}
+%\changes{3.08a}{2013-09-28}{new}
+% \begin{macrocode}
+\newcommand*{\setglossarystyle}[1]{%
+ \ifcsundef{@glsstyle@#1}%
+ {%
+ \PackageError{glossaries}{Glossary style `#1' undefined}{}%
+ }%
+ {%
+ \csname @glsstyle@#1\endcsname
+ }%
+}
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\glossarystyle}
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
%\cs{ifcsundef}}
@@ -9991,7 +11671,19 @@ false,nolabel,autolabel}[nolabel]{%
\PackageError{glossaries}{Glossary style `#1' undefined}{}%
}%
{%
+ \GlossariesWarning
+ {Deprecated command \string\glossarystyle.^^J
+ I recommend you switch to \string\setglossarystyle\space unless
+ you want to maintain backward compatibility}%
+ \setglossentrycompatibility
\csname @glsstyle@#1\endcsname
+% \end{macrocode}
+%\changes{3.13a}{2013-11-05}{fixed bug caused by using \cs{ifdef} instead of
+%\cs{ifcsdef}}
+% \begin{macrocode}
+ \ifcsdef{@glscompstyle@#1}%
+ {\setglossentrycompatibility\csuse{@glscompstyle@#1}}%
+ {}%
}%
}
% \end{macrocode}
@@ -10009,7 +11701,7 @@ false,nolabel,autolabel}[nolabel]{%
% \ics{glossarypostamble}, as
% the user should be able to switch between styles without affecting
% the pre- and postambles.
-%\changes{1.17}{2008 December 26}{made 'newglossarystyle long}
+%\changes{1.17}{2008 December 26}{made \cs{newglossarystyle} long}
%\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with
%\cs{ifcsundef}}
% \begin{macrocode}
@@ -10228,17 +11920,6 @@ false,nolabel,autolabel}[nolabel]{%
%\end{macro}
%
%\subsection{Acronyms}\label{sec:acronym}
-%If the \pkgopt{acronym} package option is used, a
-% new glossary called "acronym" is created
-% \begin{macrocode}
-\ifglsacronym
- \newglossary[alg]{acronym}{acr}{acn}{\acronymname}
-% \end{macrocode}
-%and \ics{acronymtype} is set to the name of this new glossary.
-% \begin{macrocode}
- \renewcommand*{\acronymtype}{acronym}
-\fi
-% \end{macrocode}
%\begin{macro}{\oldacronym}
%\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list}\\[10pt]
% This emulates the way the old \isty{glossary} package defined
@@ -10307,7 +11988,7 @@ false,nolabel,autolabel}[nolabel]{%
\newcommand{\newacronym}[4][]{}
% \end{macrocode}
%\changes{1.13}{2008 May 10}{Removed restriction on only using
-% 'newacronym in the preamble}
+% \cs{newacronym} in the preamble}
%\end{macro}
% Set up some convenient short cuts. These need to be changed if
% \cs{newacronym} is changed (or if the \gloskey{description} key
@@ -10327,6 +12008,14 @@ false,nolabel,autolabel}[nolabel]{%
\newcommand*{\acrpluralsuffix}{\glspluralsuffix}
% \end{macrocode}
%\end{macro}
+% If \sty{garamondx} has been loaded, need to use \cs{textulc}
+% instead of \cs{textup}.
+%\begin{macro}{\glstextup}
+%\changes{3.09a}{2013-10-09}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glstextup}[1]{\ifdef\textulc{\textulc{#1}}{\textup{#1}}}
+% \end{macrocode}
+%\end{macro}
%
% The following are defined for compatibility with version 2.07 and
% earlier.
@@ -10586,10 +12275,10 @@ false,nolabel,autolabel}[nolabel]{%
%\begin{macro}{\SetDefaultAcronymDisplayStyle}
% Sets the default acronym display style for given glossary.
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.11a}{2013-10-15}{changed to use \cs{defglsentryfmt}}
% \begin{macrocode}
\newcommand*{\SetDefaultAcronymDisplayStyle}[1]{%
- \defglsdisplay[#1]{##1##4}%
- \defglsdisplayfirst[#1]{##1##4}%
+ \defglsentryfmt[#1]{\glsgenentryfmt}%
}
% \end{macrocode}
%\end{macro}
@@ -10607,22 +12296,37 @@ false,nolabel,autolabel}[nolabel]{%
sort={\the\glsshorttok},%
text={\the\glsshorttok},%
first={\acrfullformat{\the\glslongtok}{\the\glsshorttok}},%
- plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
- firstplural={\acrfullformat{\noexpand\@glo@longpl}%
- {\noexpand\@glo@shortpl}},%
+ plural={\noexpand\expandonce\noexpand\@glo@shortpl},%
+ firstplural={\acrfullformat{\noexpand\expandonce\noexpand\@glo@longpl}%
+ {\noexpand\expandonce\noexpand\@glo@shortpl}},%
short={\the\glsshorttok},%
shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
long={\the\glslongtok},%
longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
description={\the\glslongtok},%
- descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ descriptionplural={\noexpand\expandonce\noexpand\@glo@longpl},%
% \end{macrocode}
% Remaining options specified by the user:
% \begin{macrocode}
\the\glskeylisttok
}%
}%
+ \let\@org@gls@assign@firstpl\gls@assign@firstpl
+ \let\@org@gls@assign@plural\gls@assign@plural
+ \let\@org@gls@assign@descplural\gls@assign@descplural
+ \def\gls@assign@firstpl##1##2{%
+ \@@gls@expand@field{##1}{firstpl}{##2}%
+ }%
+ \def\gls@assign@plural##1##2{%
+ \@@gls@expand@field{##1}{plural}{##2}%
+ }%
+ \def\gls@assign@descplural##1##2{%
+ \@@gls@expand@field{##1}{descplural}{##2}%
+ }%
\@do@newglossaryentry
+ \let\gls@assign@firstpl\@org@gls@assign@firstpl
+ \let\gls@assign@plural\@org@gls@assign@plural
+ \let\gls@assign@symbolplural\@org@gls@assign@symbolplural
}
% \end{macrocode}
%\end{macro}
@@ -10693,38 +12397,69 @@ false,nolabel,autolabel}[nolabel]{%
% description and footnote combination.
%\changes{2.04}{2009 November 10}{new}
%\changes{3.0}{2011/04/02}{expanded options link options}
+%\changes{3.11a}{2013-10-15}{updated to use \cs{defglsentryfmt}}
% \begin{macrocode}
\newcommand*{\SetDescriptionFootnoteAcronymDisplayStyle}[1]{%
- \defglsdisplayfirst[#1]{%
- \firstacronymfont{##1}##4%
- \expandafter\protect\expandafter\acrfootnote\expandafter
- {\@gls@link@opts}{\@gls@link@label}{##3}%
+ \defglsentryfmt[#1]{%
+ \ifglsused{\glslabel}%
+ {%
+ \acronymfont{\glsgenentryfmt}%
+ }%
+ {%
+ \firstacronymfont{\glsgenentryfmt}%
+ \ifglshassymbol{\glslabel}%
+ {%
+ \expandafter\protect\expandafter\acrfootnote\expandafter
+ {\@gls@link@opts}{\@gls@link@label}%
+ {%
+ \glsifplural
+ {\glsentrysymbolplural{\glslabel}}%
+ {\glsentrysymbol{\glslabel}}%
+ }%
+ }%
+ }%
}%
- \defglsdisplay[#1]{\acronymfont{##1}##4}%
}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\DescriptionFootnoteNewAcronymDef}
% \begin{macrocode}
\newcommand*{\DescriptionFootnoteNewAcronymDef}{%
- \edef\@do@newglossaryentry{%
- \noexpand\newglossaryentry{\the\glslabeltok}%
- {%
- type=\acronymtype,%
- name={\noexpand\acronymfont{\the\glsshorttok}},%
- sort={\the\glsshorttok},%
- text={\the\glsshorttok},%
- plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
- short={\the\glsshorttok},%
- shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
- long={\the\glslongtok},%
- longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
- symbol={\the\glslongtok},%
- symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},%
- \the\glskeylisttok
- }%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\noexpand\acronymfont{\the\glsshorttok}},%
+ sort={\the\glsshorttok},%
+ first={\the\glsshorttok},%
+ firstplural={\noexpand\expandonce\noexpand\@glo@shortpl},%
+ text={\the\glsshorttok},%
+ plural={\noexpand\expandonce\noexpand\@glo@shortpl},%
+ short={\the\glsshorttok},%
+ shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ long={\the\glslongtok},%
+ longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ symbol={\the\glslongtok},%
+ symbolplural={\noexpand\expandonce\noexpand\@glo@longpl},%
+ \the\glskeylisttok
}%
- \@do@newglossaryentry
+ }%
+ \let\@org@gls@assign@firstpl\gls@assign@firstpl
+ \let\@org@gls@assign@plural\gls@assign@plural
+ \let\@org@gls@assign@symbolplural\gls@assign@symbolplural
+ \def\gls@assign@firstpl##1##2{%
+ \@@gls@expand@field{##1}{firstpl}{##2}%
+ }%
+ \def\gls@assign@plural##1##2{%
+ \@@gls@expand@field{##1}{plural}{##2}%
+ }%
+ \def\gls@assign@symbolplural##1##2{%
+ \@@gls@expand@field{##1}{symbolplural}{##2}%
+ }%
+ \@do@newglossaryentry
+ \let\gls@assign@plural\@org@gls@assign@plural
+ \let\gls@assign@firstpl\@org@gls@assign@firstpl
+ \let\gls@assign@symbolplural\@org@gls@assign@symbolplural
}
% \end{macrocode}
%\end{macro}
@@ -10755,8 +12490,8 @@ false,nolabel,autolabel}[nolabel]{%
% If \pkgopt{footnote} package option is specified, set the first
% use to append the long form (stored in \gloskey{symbol}) as a
% footnote.
-%\changes{1.12}{2008 Mar 8}{Added 'protect before 'footnote
-% and 'glslink}
+%\changes{1.12}{2008 Mar 8}{Added \cs{protect} before \cs{footnote}
+% and \cs{glslink}}
% \begin{macrocode}
\@for\@gls@type:=\@glsacronymlists\do{%
\SetDescriptionFootnoteAcronymDisplayStyle{\@gls@type}%
@@ -10765,13 +12500,16 @@ false,nolabel,autolabel}[nolabel]{%
% Redefine \ics{acronymfont} if small caps required. The plural suffix
% is set in an upright font so that it remains in normal lower case,
% otherwise it looks as though it's part of the acronym.
-%\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead
-%of 'smaller}
+%\changes{1.19}{2009 Mar 2}{changed \cs{acronymfont} to use
+%\cs{textsmaller} instead
+%of \cs{smaller}}
% \begin{macrocode}
\ifglsacrsmallcaps
\renewcommand*{\acronymfont}[1]{\textsc{##1}}%
+% \end{macrocode}
+% \begin{macrocode}
\renewcommand*{\acrpluralsuffix}{%
- \textup{\glspluralsuffix}}%
+ \glstextup{\glspluralsuffix}}%
\else
\ifglsacrsmaller
\renewcommand*{\acronymfont}[1]{\textsmaller{##1}}%
@@ -10792,10 +12530,10 @@ false,nolabel,autolabel}[nolabel]{%
% Sets the acronym display style for given glossary with
% description and dua combination.
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.11a}{2013-10-15}{updated to use \cs{defglsentryfmt}}
% \begin{macrocode}
\newcommand*{\SetDescriptionDUAAcronymDisplayStyle}[1]{%
- \defglsdisplay[#1]{##1##4}%
- \defglsdisplayfirst[#1]{##1##4}%
+ \defglsentryfmt[#1]{\glsgenentryfmt}%
}
% \end{macrocode}
%\end{macro}
@@ -10809,17 +12547,34 @@ false,nolabel,autolabel}[nolabel]{%
name={\the\glslongtok},%
sort={\the\glslongtok},
text={\the\glslongtok},%
- plural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ first={\the\glslongtok},%
+ plural={\noexpand\expandonce\noexpand\@glo@longpl},%
+ firstplural={\noexpand\expandonce\noexpand\@glo@longpl},%
short={\the\glsshorttok},%
shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
long={\the\glslongtok},%
longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
symbol={\the\glsshorttok},%
- symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ symbolplural={\noexpand\expandonce\noexpand\@glo@shortpl},%
\the\glskeylisttok
}%
}%
+ \let\@org@gls@assign@firstpl\gls@assign@firstpl
+ \let\@org@gls@assign@plural\gls@assign@plural
+ \let\@org@gls@assign@symbolplural\gls@assign@symbolplural
+ \def\gls@assign@firstpl##1##2{%
+ \@@gls@expand@field{##1}{firstpl}{##2}%
+ }%
+ \def\gls@assign@plural##1##2{%
+ \@@gls@expand@field{##1}{plural}{##2}%
+ }%
+ \def\gls@assign@symbolplural##1##2{%
+ \@@gls@expand@field{##1}{symbolplural}{##2}%
+ }%
\@do@newglossaryentry
+ \let\gls@assign@firstpl\@org@gls@assign@firstpl
+ \let\gls@assign@plural\@org@gls@assign@plural
+ \let\gls@assign@symbolplural\@org@gls@assign@symbolplural
}
% \end{macrocode}
%\end{macro}
@@ -10868,11 +12623,39 @@ false,nolabel,autolabel}[nolabel]{%
% 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}}
+%\changes{3.11a}{2013-10-15}{updated to use \cs{defglsentryfmt}}
% \begin{macrocode}
\newcommand*{\SetDescriptionAcronymDisplayStyle}[1]{%
- \defglsdisplayfirst[#1]{%
- ##1##4\glsdoparenifnotempty{##3}{\protect\firstacronymfont}}%
- \defglsdisplay[#1]{\acronymfont{##1}##4}%
+ \defglsentryfmt[#1]{%
+ \ifglsused{\glslabel}%
+ {%
+% \end{macrocode}
+% Move the inserted text outside of \cs{acronymfont}
+% \begin{macrocode}
+ \let\gls@org@insert\glsinsert
+ \let\glsinsert\@empty
+ \acronymfont{\glsgenentryfmt}\gls@org@insert
+ }%
+ {%
+ \glsgenentryfmt
+ \ifglshassymbol{\glslabel}%
+ {%
+ \glsifplural
+ {%
+ \def\@glo@symbol{\glsentrysymbolplural{\glslabel}}%
+ }%
+ {%
+ \def\@glo@symbol{\glsentrysymbol{\glslabel}}%
+ }%
+ \space(\protect\firstacronymfont
+ {\glscapscase
+ {\@glo@symbol}
+ {\@glo@symbol}
+ {\mfirstucMakeUppercase{\@glo@symbol}}})%
+ }%
+ {}%
+ }%
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -10887,18 +12670,33 @@ false,nolabel,autolabel}[nolabel]{%
\acrnameformat{\the\glsshorttok}{\the\glslongtok}},%
sort={\the\glsshorttok},%
first={\the\glslongtok},%
- firstplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ firstplural={\noexpand\expandonce\noexpand\@glo@longpl},%
text={\the\glsshorttok},%
- plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ plural={\noexpand\expandonce\noexpand\@glo@shortpl},%
short={\the\glsshorttok},%
shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
long={\the\glslongtok},%
longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
symbol={\noexpand\@glo@text},%
- symbolplural={\noexpand\@glo@plural},%
+ symbolplural={\noexpand\expandonce\noexpand\@glo@shortpl},%
\the\glskeylisttok}%
}%
+ \let\@org@gls@assign@firstpl\gls@assign@firstpl
+ \let\@org@gls@assign@plural\gls@assign@plural
+ \let\@org@gls@assign@symbolplural\gls@assign@symbolplural
+ \def\gls@assign@firstpl##1##2{%
+ \@@gls@expand@field{##1}{firstpl}{##2}%
+ }%
+ \def\gls@assign@plural##1##2{%
+ \@@gls@expand@field{##1}{plural}{##2}%
+ }%
+ \def\gls@assign@symbolplural##1##2{%
+ \@@gls@expand@field{##1}{symbolplural}{##2}%
+ }%
\@do@newglossaryentry
+ \let\gls@assign@firstpl\@org@gls@assign@firstpl
+ \let\gls@assign@plural\@org@gls@assign@plural
+ \let\gls@assign@symbolplural\@org@gls@assign@symbolplural
}
% \end{macrocode}
%\end{macro}
@@ -10936,13 +12734,14 @@ false,nolabel,autolabel}[nolabel]{%
% Redefine \ics{acronymfont} if small caps required. The plural suffix
% is set in an upright font so that it remains in normal lower case,
% otherwise it looks as though it's part of the acronym.
-%\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead
-%of 'smaller}
+%\changes{1.19}{2009 Mar 2}{changed \cs{acronymfont} to use
+%\cs{textsmaller} instead
+%of \cs{smaller}}
% \begin{macrocode}
\ifglsacrsmallcaps
\renewcommand{\acronymfont}[1]{\textsc{##1}}
\renewcommand*{\acrpluralsuffix}{%
- \textup{\glspluralsuffix}}%
+ \glstextup{\glspluralsuffix}}%
\else
\ifglsacrsmaller
\renewcommand*{\acronymfont}[1]{\textsmaller{##1}}%
@@ -10956,14 +12755,37 @@ false,nolabel,autolabel}[nolabel]{%
% Sets the acronym display style for given glossary with
% footnote setting (but not \pkgopt{description} or \pkgopt{dua}).
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.11a}{2013-10-15}{updated to use \cs{defglsentryfmt}}
% \begin{macrocode}
\newcommand*{\SetFootnoteAcronymDisplayStyle}[1]{%
- \defglsdisplayfirst[#1]{%
- \firstacronymfont{##1}##4%
- \expandafter\protect\expandafter\acrfootnote\expandafter
- {\@gls@link@opts}{\@gls@link@label}{##2}%
+ \defglsentryfmt[#1]{%
+% \end{macrocode}
+% Move the inserted text outside of \cs{acronymfont}
+% \begin{macrocode}
+ \let\gls@org@insert\glsinsert
+ \let\glsinsert\@empty
+ \ifglsused{\glslabel}%
+ {%
+ \acronymfont{\glsgenentryfmt}\gls@org@insert
+ }%
+ {%
+ \firstacronymfont{\glsgenentryfmt}\gls@org@insert
+ \ifglshaslong{\glslabel}%
+ {%
+ \expandafter\protect\expandafter\acrfootnote\expandafter
+ {\@gls@link@opts}{\@gls@link@label}%
+ {%
+ \glsifplural
+ {\glsentrylongpl{\glslabel}}%
+ {\glsentrylong{\glslabel}}%
+ }%
+ }%
+% \end{macrocode}
+%\changes{3.13a}{2013-11-05}{fixed missing argument bug}
+% \begin{macrocode}
+ {}%
+ }%
}%
- \defglsdisplay[#1]{\acronymfont{##1}##4}%
}
% \end{macrocode}
%\end{macro}
@@ -10977,17 +12799,34 @@ false,nolabel,autolabel}[nolabel]{%
name={\noexpand\acronymfont{\the\glsshorttok}},%
sort={\the\glsshorttok},%
text={\the\glsshorttok},%
- plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ plural={\noexpand\expandonce\noexpand\@glo@shortpl},%
+ first={\the\glsshorttok},%
+ firstplural={\noexpand\expandonce\noexpand\@glo@shortpl},%
short={\the\glsshorttok},%
shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
long={\the\glslongtok},%
longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
description={\the\glslongtok},%
- descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ descriptionplural={\noexpand\expandonce\noexpand\@glo@longpl},%
\the\glskeylisttok
}%
}%
+ \let\@org@gls@assign@plural\gls@assign@plural
+ \let\@org@gls@assign@firstpl\gls@assign@firstpl
+ \let\@org@gls@assign@descplural\gls@assign@descplural
+ \def\gls@assign@firstpl##1##2{%
+ \@@gls@expand@field{##1}{firstpl}{##2}%
+ }%
+ \def\gls@assign@plural##1##2{%
+ \@@gls@expand@field{##1}{plural}{##2}%
+ }%
+ \def\gls@assign@descplural##1##2{%
+ \@@gls@expand@field{##1}{descplural}{##2}%
+ }%
\@do@newglossaryentry
+ \let\gls@assign@plural\@org@gls@assign@plural
+ \let\gls@assign@firstpl\@org@gls@assign@firstpl
+ \let\gls@assign@descplural\@org@gls@assign@descplural
}
% \end{macrocode}
%\end{macro}
@@ -11014,8 +12853,8 @@ false,nolabel,autolabel}[nolabel]{%
}%
% \end{macrocode}
% Set display
-%\changes{1.12}{2008 Mar 8}{Added 'protect before 'footnote and
-% 'glslink}
+%\changes{1.12}{2008 Mar 8}{Added \cs{protect} before \cs{footnote} and
+% \cs{glslink}}
% \begin{macrocode}
\@for\@gls@type:=\@glsacronymlists\do{%
\SetFootnoteAcronymDisplayStyle{\@gls@type}%
@@ -11024,13 +12863,14 @@ false,nolabel,autolabel}[nolabel]{%
% Redefine \ics{acronymfont} if small caps required. The plural suffix
% is set in an upright font so that it remains in normal lower case,
% otherwise it looks as though it's part of the acronym.
-%\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead
-%of 'smaller}
+%\changes{1.19}{2009 Mar 2}{changed \cs{acronymfont} to use
+%\cs{textsmaller} instead
+%of \cs{smaller}}
% \begin{macrocode}
\ifglsacrsmallcaps
\renewcommand*{\acronymfont}[1]{\textsc{##1}}%
\renewcommand*{\acrpluralsuffix}{%
- \textup{\glspluralsuffix}}%
+ \glstextup{\glspluralsuffix}}%
\else
\ifglsacrsmaller
\renewcommand*{\acronymfont}[1]{\textsmaller{##1}}%
@@ -11057,7 +12897,7 @@ false,nolabel,autolabel}[nolabel]{%
\ifdefempty\gls@tmp
{}%
{%
- \if\gls@tmp\relax
+ \ifx\gls@tmp\@gls@default@value
\else
\space (#2{#1})%
\fi
@@ -11071,10 +12911,39 @@ false,nolabel,autolabel}[nolabel]{%
% footnote nor description is required, but smallcaps or smaller
% specified.
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.11a}{2013-10-15}{updated to use \cs{defglsentryfmt}}
% \begin{macrocode}
\newcommand*{\SetSmallAcronymDisplayStyle}[1]{%
- \defglsdisplayfirst[#1]{##1##4\glsdoparenifnotempty{##3}{\protect\firstacronymfont}}
- \defglsdisplay[#1]{\acronymfont{##1}##4}%
+ \defglsentryfmt[#1]{%
+% \end{macrocode}
+% Move the inserted text outside of \cs{acronymfont}
+% \begin{macrocode}
+ \let\gls@org@insert\glsinsert
+ \let\glsinsert\@empty
+ \ifglsused{\glslabel}%
+ {%
+ \acronymfont{\glsgenentryfmt}\gls@org@insert
+ }%
+ {%
+ \glsgenentryfmt
+ \ifglshassymbol{\glslabel}%
+ {%
+ \glsifplural
+ {%
+ \def\@glo@symbol{\glsentrysymbolplural{\glslabel}}%
+ }%
+ {%
+ \def\@glo@symbol{\glsentrysymbol{\glslabel}}%
+ }%
+ \space
+ (\glscapscase
+ {\firstacronymfont{\@glo@symbol}}%
+ {\firstacronymfont{\@glo@symbol}}%
+ {\firstacronymfont{\mfirstucMakeUppercase{\@glo@symbol}}})%
+ }%
+ {}%
+ }%
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -11088,31 +12957,51 @@ false,nolabel,autolabel}[nolabel]{%
type=\acronymtype,%
name={\noexpand\acronymfont{\the\glsshorttok}},%
sort={\the\glsshorttok},%
- text={\noexpand\@glo@symbol},%
+ text={\the\glsshorttok},%
% \end{macrocode}
% Default to the short plural.
% \begin{macrocode}
- plural={\noexpand\@glo@shortpl},%
+ plural={\noexpand\expandonce\noexpand\@glo@shortpl},%
first={\the\glslongtok},%
% \end{macrocode}
% Default to the long plural.
% \begin{macrocode}
- firstplural={\noexpand\@glo@longpl},%
+ firstplural={\noexpand\expandonce\noexpand\@glo@longpl},%
short={\the\glsshorttok},%
shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
long={\the\glslongtok},%
longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
description={\noexpand\@glo@first},%
- descriptionplural={\noexpand\@glo@firstplural},%
+ descriptionplural={\noexpand\expandonce\noexpand\@glo@longpl},%
symbol={\the\glsshorttok},%
% \end{macrocode}
% Default to the short plural.
% \begin{macrocode}
- symbolplural={\noexpand\@glo@shortpl},%
+ symbolplural={\noexpand\expandonce\noexpand\@glo@shortpl},%
\the\glskeylisttok
}%
}%
+ \let\@org@gls@assign@firstpl\gls@assign@firstpl
+ \let\@org@gls@assign@plural\gls@assign@plural
+ \let\@org@gls@assign@descplural\gls@assign@descplural
+ \let\@org@gls@assign@symbolplural\gls@assign@symbolplural
+ \def\gls@assign@firstpl##1##2{%
+ \@@gls@expand@field{##1}{firstpl}{##2}%
+ }%
+ \def\gls@assign@plural##1##2{%
+ \@@gls@expand@field{##1}{plural}{##2}%
+ }%
+ \def\gls@assign@descplural##1##2{%
+ \@@gls@expand@field{##1}{descplural}{##2}%
+ }%
+ \def\gls@assign@symbolplural##1##2{%
+ \@@gls@expand@field{##1}{symbolplural}{##2}%
+ }%
\@do@newglossaryentry
+ \let\gls@assign@firstpl\@org@gls@assign@firstpl
+ \let\gls@assign@plural\@org@gls@assign@plural
+ \let\gls@assign@descplural\@org@gls@assign@descplural
+ \let\gls@assign@symbolplural\@org@gls@assign@symbolplural
}
% \end{macrocode}
%\end{macro}
@@ -11147,13 +13036,14 @@ false,nolabel,autolabel}[nolabel]{%
% Redefine \ics{acronymfont} if small caps required. The plural suffix
% is set in an upright font so that it remains in normal lower case,
% otherwise it looks as though it's part of the acronym.
-%\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead
-%of 'smaller}
+%\changes{1.19}{2009 Mar 2}{changed \cs{acronymfont} to use
+%\cs{textsmaller} instead
+%of \cs{smaller}}
% \begin{macrocode}
\ifglsacrsmallcaps
\renewcommand*{\acronymfont}[1]{\textsc{##1}}
\renewcommand*{\acrpluralsuffix}{%
- \textup{\glspluralsuffix}}%
+ \glstextup{\glspluralsuffix}}%
\else
\renewcommand*{\acronymfont}[1]{\textsmaller{##1}}
\fi
@@ -11177,10 +13067,10 @@ false,nolabel,autolabel}[nolabel]{%
% Sets the acronym display style for given glossary with dua
% setting.
%\changes{2.04}{2009 November 10}{new}
+%\changes{3.11a}{2013-10-15}{updated to use \cs{defglsentryfmt}}
% \begin{macrocode}
\newcommand*{\SetDUADisplayStyle}[1]{%
- \defglsdisplay[#1]{##1##4}%
- \defglsdisplayfirst[#1]{##1##4}%
+ \defglsentryfmt[#1]{\glsgenentryfmt}%
}
% \end{macrocode}
%\end{macro}
@@ -11193,18 +13083,41 @@ false,nolabel,autolabel}[nolabel]{%
type=\acronymtype,%
name={\the\glsshorttok},%
text={\the\glslongtok},%
- plural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ first={\the\glslongtok},%
+ plural={\noexpand\expandonce\noexpand\@glo@longpl},%
+ firstplural={\noexpand\expandonce\noexpand\@glo@longpl},%
short={\the\glsshorttok},%
shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
long={\the\glslongtok},%
longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
description={\the\glslongtok},%
+ descriptionplural={\noexpand\expandonce\noexpand\@glo@longpl},%
symbol={\the\glsshorttok},%
- symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ symbolplural={\noexpand\expandonce\noexpand\@glo@shortpl},%
\the\glskeylisttok
}%
}%
+ \let\@org@gls@assign@firstpl\gls@assign@firstpl
+ \let\@org@gls@assign@plural\gls@assign@plural
+ \let\@org@gls@assign@symbolplural\gls@assign@symbolplural
+ \let\@org@gls@assign@descplural\gls@assign@descplural
+ \def\gls@assign@firstpl##1##2{%
+ \@@gls@expand@field{##1}{firstpl}{##2}%
+ }%
+ \def\gls@assign@plural##1##2{%
+ \@@gls@expand@field{##1}{plural}{##2}%
+ }%
+ \def\gls@assign@symbolplural##1##2{%
+ \@@gls@expand@field{##1}{symbolplural}{##2}%
+ }%
+ \def\gls@assign@descplural##1##2{%
+ \@@gls@expand@field{##1}{descplural}{##2}%
+ }%
\@do@newglossaryentry
+ \let\gls@assign@firstpl\@org@gls@assign@firstpl
+ \let\gls@assign@plural\@org@gls@assign@plural
+ \let\gls@assign@symbolplural\@org@gls@assign@symbolplural
+ \let\gls@assign@descplural\@org@gls@assign@descplural
}
% \end{macrocode}
%\end{macro}
@@ -11283,10 +13196,10 @@ false,nolabel,autolabel}[nolabel]{%
%\begin{macro}{\SetCustomDisplayStyle}
% Sets the acronym display style.
%\changes{2.06}{2010 June 14}{new}
+%\changes{3.11a}{2013-10-15}{updated to use \cs{defglsentryfmt}}
% \begin{macrocode}
\newcommand*{\SetCustomDisplayStyle}[1]{%
- \defglsdisplay[#1]{##1##4}%
- \defglsdisplayfirst[#1]{##1##4}%
+ \defglsentryfmt[#1]{\glsgenentryfmt}%
}
% \end{macrocode}
%\end{macro}
@@ -11298,7 +13211,8 @@ false,nolabel,autolabel}[nolabel]{%
description={\the\glslongtok},%
first={\noexpand\acrfullformat{\the\glslongtok}{\the\glsshorttok}},%
firstplural={\noexpand\acrfullformat
- {\the\glslongtok\noexpand\acrpluralsuffix}{\the\glsshorttok}}%
+ {\noexpand\glsentrylongpl{\the\glslabeltok}}%
+ {\noexpand\glsentryshortpl{\the\glslabeltok}}}%
text={\the\glsshorttok},%
plural={\the\glsshorttok\noexpand\acrpluralsuffix}%
}
@@ -11505,7 +13419,7 @@ false,nolabel,autolabel}[nolabel]{%
% \begin{macrocode}
\ifx\@glossary@default@style\relax
\else
- \glossarystyle{\@glossary@default@style}
+ \setglossarystyle{\@glossary@default@style}
\fi
% \end{macrocode}
%
@@ -11751,6 +13665,30 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\showgloshort}
+%\changes{3.11a}{2013-10-15}{new}
+%\begin{definition}
+%\cs{showgloshort}\marg{label}
+%\end{definition}
+% \begin{macrocode}
+\newcommand*{\showgloshort}[1]{%
+ \expandafter\show\csname glo@#1@short\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\showglolong}
+%\changes{3.11a}{2013-10-15}{new}
+%\begin{definition}
+%\cs{showglolong}\marg{label}
+%\end{definition}
+% \begin{macrocode}
+\newcommand*{\showglolong}[1]{%
+ \expandafter\show\csname glo@#1@long\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\showgloindex}
%\changes{3.0}{2011/04/02}{new}
%\begin{definition}
@@ -11897,6 +13835,449 @@ false,nolabel,autolabel}[nolabel]{%
%\fi
%\iffalse
% \begin{macrocode}
+%<*glossaries-prefix.sty>
+% \end{macrocode}
+%\fi
+%\section{Prefix Support (glossaries-prefix Code)}
+%\label{sec:code:accsupp}
+%\changes{3.14a}{2013-11-12}{new}
+% This package provides a means of adding prefixes to your glossary
+% entries. For example, you may want to use ``a
+% \cs{gls}\marg{label}'' on first use but use ``an
+% \cs{gls}\marg{label}'' on subsequent use.
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{glossaries-prefix}[2013/11/14 v4.0 (NLCT)]
+% \end{macrocode}
+% Pass all options to \sty{glossaries}:
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}}
+% \end{macrocode}
+% Process options:
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+% Load \sty{glossaries}:
+% \begin{macrocode}
+\RequirePackage{glossaries}
+% \end{macrocode}
+% Add the new keys:
+% \begin{macrocode}
+\define@key{glossentry}{prefixfirst}{\def\@glo@entryprefixfirst{#1}}%
+\define@key{glossentry}{prefixfirstplural}{\def\@glo@entryprefixfirstplural{#1}}%
+\define@key{glossentry}{prefix}{\def\@glo@entryprefix{#1}}%
+\define@key{glossentry}{prefixplural}{\def\@glo@entryprefixplural{#1}}%
+% \end{macrocode}
+% Add them to \ics{@gls@keymap}:
+% \begin{macrocode}
+\appto\@gls@keymap{,%
+ {prefixfirst}{prefixfirst},%
+ {prefixfirstplural}{prefixfirstplural},%
+ {prefix}{prefix},%
+ {prefixplural}{prefixplural}%
+ }
+% \end{macrocode}
+% Set the default values:
+% \begin{macrocode}
+\appto\@newglossaryentryprehook{%
+ \def\@glo@entryprefix{}%
+ \def\@glo@entryprefixplural{}%
+ \let\@glo@entryprefixfirst\@gls@default@value
+ \let\@glo@entryprefixfirstplural\@gls@default@value
+}
+% \end{macrocode}
+% Set the assignment code:
+% \begin{macrocode}
+\appto\@newglossaryentryposthook{%
+ \gls@assign@field{}{\@glo@label}{prefix}{\@glo@entryprefix}%
+ \gls@assign@field{}{\@glo@label}{prefixplural}{\@glo@entryprefixplural}%
+% \end{macrocode}
+% If \gloskey{prefixfirst} has not been supplied, make it the same
+% as \gloskey{prefix}.
+% \begin{macrocode}
+ \expandafter\gls@assign@field\expandafter
+ {\csname glo@\@glo@label @prefix\endcsname}{\@glo@label}{prefixfirst}%
+ {\@glo@entryprefixfirst}%
+% \end{macrocode}
+% If \gloskey{prefixfirstplural} has not been supplied, make it the same
+% as \gloskey{prefixplural}.
+% \begin{macrocode}
+ \expandafter\gls@assign@field\expandafter
+ {\csname glo@\@glo@label @prefixplural\endcsname}{\@glo@label}%
+ {prefixfirstplural}{\@glo@entryprefixfirstplural}%
+}
+% \end{macrocode}
+%
+% Define commands to access these fields:
+%\begin{macro}{\glsentryprefixfirst}
+% \begin{macrocode}
+\newcommand*{\glsentryprefixfirst}[1]{\csuse{glo@#1@prefixfirst}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentryprefixfirstplural}
+% \begin{macrocode}
+\newcommand*{\glsentryprefixfirstplural}[1]{\csuse{glo@#1@prefixfirstplural}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentryprefix}
+% \begin{macrocode}
+\newcommand*{\glsentryprefix}[1]{\csuse{glo@#1@prefix}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentryprefixplural}
+% \begin{macrocode}
+\newcommand*{\glsentryprefixplural}[1]{\csuse{glo@#1@prefixplural}}
+% \end{macrocode}
+%\end{macro}
+%
+% Now for the initial upper case variants:
+%\begin{macro}{\Glsentryprefixfirst}
+% \begin{macrocode}
+\newrobustcmd*{\Glsentryprefixfirst}[1]{%
+ \protected@edef\@glo@text{\csname glo@#1@prefixfirst\endcsname}%
+ \xmakefirstuc\@glo@text
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryprefixfirstplural}
+% \begin{macrocode}
+\newrobustcmd*{\Glsentryprefixfirstplural}[1]{%
+ \protected@edef\@glo@text{\csname glo@#1@prefixfirstplural\endcsname}%
+ \xmakefirstuc\@glo@text
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryprefix}
+% \begin{macrocode}
+\newrobustcmd*{\Glsentryprefix}[1]{%
+ \protected@edef\@glo@text{\csname glo@#1@prefix\endcsname}%
+ \xmakefirstuc\@glo@text
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryprefixplural}
+% \begin{macrocode}
+\newrobustcmd*{\Glsentryprefixplural}[1]{%
+ \protected@edef\@glo@text{\csname glo@#1@prefixplural\endcsname}%
+ \xmakefirstuc\@glo@text
+}
+% \end{macrocode}
+%\end{macro}
+%
+% Define commands to determine if the prefix keys have been set:
+%\begin{macro}{\ifglshasprefix}
+% \begin{macrocode}
+\newcommand*{\ifglshasprefix}[3]{%
+ \ifcsempty{glo@#1@prefix}%
+ {#3}%
+ {#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\ifglshasprefixplural}
+% \begin{macrocode}
+\newcommand*{\ifglshasprefixplural}[3]{%
+ \ifcsempty{glo@#1@prefixplural}%
+ {#3}%
+ {#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\ifglshasprefixfirst}
+% \begin{macrocode}
+\newcommand*{\ifglshasprefixfirst}[3]{%
+ \ifcsempty{glo@#1@prefixfirst}%
+ {#3}%
+ {#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\ifglshasprefixfirstplural}
+% \begin{macrocode}
+\newcommand*{\ifglshasprefixfirstplural}[3]{%
+ \ifcsempty{glo@#1@prefixfirstplural}%
+ {#3}%
+ {#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+% Define commands that insert the prefix before commands like \ics{gls}:
+%\begin{macro}{\pgls}
+% \begin{macrocode}
+\newrobustcmd{\pgls}{\@ifstar\@spgls\@pgls}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@spgls}
+% Starred version.
+% \begin{macrocode}
+\newcommand*{\@spgls}[2][]{\@pgls@{hyper=false,#1}{#2}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@pgls}
+% Unstarred version.
+% \begin{macrocode}
+\newcommand*{\@pgls}[2][]{%
+ \new@ifnextchar[%
+ {\@pgls@{#1}{#2}}%
+ {\@pgls@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@pgls@}
+% Read in the final optional argument:
+% \begin{macrocode}
+\def\@pgls@#1#2[#3]{%
+ \glsdoifexists{#2}%
+ {%
+ \ifglsused{#2}%
+ {%
+ \glsentryprefix{#2}%
+ }%
+ {%
+ \glsentryprefixfirst{#2}%
+ }%
+ \@gls@{#1}{#2}[#3]%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+% Similarly for the plural version:
+%\begin{macro}{\pglspl}
+% \begin{macrocode}
+\newrobustcmd{\pglspl}{\@ifstar\@spglspl\@pglspl}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@spglspl}
+% Starred version.
+% \begin{macrocode}
+\newcommand*{\@spglspl}[2][]{\@pglspl@{hyper=false,#1}{#2}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@pglspl}
+% Unstarred version.
+% \begin{macrocode}
+\newcommand*{\@pglspl}[2][]{%
+ \new@ifnextchar[%
+ {\@pglspl@{#1}{#2}}%
+ {\@pglspl@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@pglspl@}
+% Read in the final optional argument:
+% \begin{macrocode}
+\def\@pglspl@#1#2[#3]{%
+ \glsdoifexists{#2}%
+ {%
+ \ifglsused{#2}%
+ {%
+ \glsentryprefixplural{#2}%
+ }%
+ {%
+ \glsentryprefixfirstplural{#2}%
+ }%
+ \@glspl@{#1}{#2}[#3]%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+% Now for the first letter upper case versions:
+%\begin{macro}{\Pgls}
+% \begin{macrocode}
+\newrobustcmd{\Pgls}{\@ifstar\@sPgls\@Pgls}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@sPgls}
+% Starred version.
+% \begin{macrocode}
+\newcommand*{\@sPgls}[2][]{\@Pgls@{hyper=false,#1}{#2}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@Pgls}
+% Unstarred version.
+% \begin{macrocode}
+\newcommand*{\@Pgls}[2][]{%
+ \new@ifnextchar[%
+ {\@Pgls@{#1}{#2}}%
+ {\@Pgls@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@Pgls@}
+% Read in the final optional argument:
+% \begin{macrocode}
+\def\@Pgls@#1#2[#3]{%
+ \glsdoifexists{#2}%
+ {%
+ \ifglsused{#2}%
+ {%
+ \ifglshasprefix{#2}%
+ {%
+ \Glsentryprefix{#2}%
+ \@gls@{#1}{#2}[#3]%
+ }%
+ {\@Gls@{#1}{#2}[#3]}%
+ }%
+ {%
+ \ifglshasprefixfirst{#2}%
+ {%
+ \Glsentryprefixfirst{#2}%
+ \@gls@{#1}{#2}[#3]%
+ }%
+ {\@Gls@{#1}{#2}[#3]}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+% Similarly for the plural version:
+%\begin{macro}{\Pglspl}
+% \begin{macrocode}
+\newrobustcmd{\Pglspl}{\@ifstar\@sPglspl\@Pglspl}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@sPglspl}
+% Starred version.
+% \begin{macrocode}
+\newcommand*{\@sPglspl}[2][]{\@Pglspl@{hyper=false,#1}{#2}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@Pglspl}
+% Unstarred version.
+% \begin{macrocode}
+\newcommand*{\@Pglspl}[2][]{%
+ \new@ifnextchar[%
+ {\@Pglspl@{#1}{#2}}%
+ {\@Pglspl@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@Pglspl@}
+% Read in the final optional argument:
+% \begin{macrocode}
+\def\@Pglspl@#1#2[#3]{%
+ \glsdoifexists{#2}%
+ {%
+ \ifglsused{#2}%
+ {%
+ \ifglshasprefixplural{#2}%
+ {%
+ \Glsentryprefixplural{#2}%
+ \@glspl@{#1}{#2}[#3]%
+ }%
+ {\@Glspl@{#1}{#2}[#3]}%
+ }%
+ {%
+ \ifglshasprefixfirstplural{#2}%
+ {%
+ \Glsentryprefixfirstplural{#2}%
+ \@glspl@{#1}{#2}[#3]%
+ }%
+ {\@Glspl@{#1}{#2}[#3]}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+% Finally the all upper case versions:
+%\begin{macro}{\PGLS}
+% \begin{macrocode}
+\newrobustcmd{\PGLS}{\@ifstar\@sPGLS\@PGLS}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@sPGLS}
+% Starred version.
+% \begin{macrocode}
+\newcommand*{\@sPGLS}[2][]{\@PGLS@{hyper=false,#1}{#2}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@PGLS}
+% Unstarred version.
+% \begin{macrocode}
+\newcommand*{\@PGLS}[2][]{%
+ \new@ifnextchar[%
+ {\@PGLS@{#1}{#2}}%
+ {\@PGLS@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@PGLS@}
+% Read in the final optional argument:
+% \begin{macrocode}
+\def\@PGLS@#1#2[#3]{%
+ \glsdoifexists{#2}%
+ {%
+ \ifglsused{#2}%
+ {%
+ \mfirstucMakeUppercase{\glsentryprefix{#2}}%
+ }%
+ {%
+ \mfirstucMakeUppercase{\glsentryprefixfirst{#2}}%
+ }%
+ \@GLS@{#1}{#2}[#3]%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+% Plural version:
+%\begin{macro}{\PGLSpl}
+% \begin{macrocode}
+\newrobustcmd{\PGLSpl}{\@ifstar\@sPGLSpl\@PGLSpl}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@sPGLSpl}
+% Starred version.
+% \begin{macrocode}
+\newcommand*{\@sPGLSpl}[2][]{\@PGLSpl@{hyper=false,#1}{#2}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@PGLSpl}
+% Unstarred version.
+% \begin{macrocode}
+\newcommand*{\@PGLSpl}[2][]{%
+ \new@ifnextchar[%
+ {\@PGLSpl@{#1}{#2}}%
+ {\@PGLSpl@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@PGLSpl@}
+% Read in the final optional argument:
+% \begin{macrocode}
+\def\@PGLSpl@#1#2[#3]{%
+ \glsdoifexists{#2}%
+ {%
+ \ifglsused{#2}%
+ {%
+ \mfirstucMakeUppercase{\glsentryprefixplural{#2}}%
+ }%
+ {%
+ \mfirstucMakeUppercase{\glsentryprefixfirstplural{#2}}%
+ }%
+ \@GLSpl@{#1}{#2}[#3]%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%\iffalse
+% \begin{macrocode}
+%</glossaries-prefix.sty>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*mfirstuc.sty>
% \end{macrocode}
%\fi
@@ -11904,7 +14285,7 @@ false,nolabel,autolabel}[nolabel]{%
%\label{sec:code:mfirstuc}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mfirstuc}[2012/05/21 v1.06 (NLCT)]
+\ProvidesPackage{mfirstuc}[2013/11/04 v1.08 (NLCT)]
% \end{macrocode}
% Requires \sty{etoolbox}:\changes{1.06}{2012/05/21}{now requires
% etoolbox}
@@ -11912,8 +14293,10 @@ false,nolabel,autolabel}[nolabel]{%
\RequirePackage{etoolbox}
% \end{macrocode}
%\begin{macro}{\makefirstuc}
-% Syntax:\\
-% \cs{makefirstuc}\marg{text}\\
+% Syntax:
+%\begin{definition}
+% \cs{makefirstuc}\marg{text}
+%\end{definition}
% Makes the first letter uppercase, but will
% skip initial control sequences if they are followed by a group
% and make the first thing in the group uppercase, unless the group
@@ -11922,11 +14305,12 @@ false,nolabel,autolabel}[nolabel]{%
% \verb|\makefirstuc{\ae bc}| will produce: \AE bc, but
% \verb|\makefirstuc{\emph{abc}}| will produce \emph{Abc}.
% This is required by \ics{Gls} and \ics{Glspl}.
+%\changes{1.08}{2013-11-04}{made robust}
% \begin{macrocode}
\newif\if@glscs
\newtoks\@glsmfirst
\newtoks\@glsmrest
-\def\makefirstuc#1{%
+\newrobustcmd*{\makefirstuc}[1]{%
\def\gls@argi{#1}%
\ifx\gls@argi\@empty
% \end{macrocode}
@@ -11980,10 +14364,20 @@ false,nolabel,autolabel}[nolabel]{%
\fi
}
% \end{macrocode}
+%\begin{macro}{\@gls@makefirstuc}
% Make first thing upper case:
% \begin{macrocode}
-\def\@gls@makefirstuc#1{\MakeUppercase #1}
+\def\@gls@makefirstuc#1{\mfirstucMakeUppercase #1}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\mfirstucMakeUppercase}
+% Allow user to replace \cs{MakeUppercase} with another case
+% changing command.
+% \begin{macrocode}
+\newcommand*{\mfirstucMakeUppercase}{\MakeUppercase}
% \end{macrocode}
+%\end{macro}
%\begin{macro}{\glsmakefirstuc}
%\changes{1.05}{2011/04/02}{new}
% Provide a user command to make it easier to customise.
@@ -12015,11 +14409,11 @@ false,nolabel,autolabel}[nolabel]{%
% Capitalise each word in the argument. Words are considered to be
% separated by plain spaces (i.e.\ non-breakable spaces won't be
% considered a word break).
+%\changes{1.08}{2013-11-04}{made robust}
% \begin{macrocode}
-\newcommand*{\capitalisewords}[1]{%
+\newrobustcmd*{\capitalisewords}[1]{%
\def\gls@add@space{}%
\mfu@capitalisewords#1 \@nil\mfu@endcap
- %\gls@add@space\makefirstuc{##1}\def\gls@add@space{ }%
}
% \end{macrocode}
%\end{macro}
@@ -12065,7 +14459,7 @@ false,nolabel,autolabel}[nolabel]{%
%\label{sec:code:hypernav}
% Package Definition:
% \begin{macrocode}
-\ProvidesPackage{glossary-hypernav}[2007/07/04 v1.01 (NLCT)]
+\ProvidesPackage{glossary-hypernav}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
%
% The commands defined in this package are provided to
@@ -12189,7 +14583,12 @@ false,nolabel,autolabel}[nolabel]{%
}%
\@for\@gls@tmp:=\@gls@list\do{%
\@gls@between
- \glsnavhyperlink{\@gls@tmp}{\glsgetgrouptitle{\@gls@tmp}}%
+% \end{macrocode}
+%\changes{3.11a}{2013-10-15}{switched to using
+%\cs{@gls@getgrouptitle}}
+% \begin{macrocode}
+ \@gls@getgrouptitle{\@gls@tmp}{\@gls@grptitle}%
+ \glsnavhyperlink{\@gls@tmp}{\@gls@grptitle}%
\let\@gls@between\glshypernavsep%
}%
}
@@ -12228,7 +14627,7 @@ false,nolabel,autolabel}[nolabel]{%
% This defines an in-line style where the entries are
% comma-separated with just the name and description displayed.
% \begin{macrocode}
-\ProvidesPackage{glossary-inline}[2012/09/21 v3.03 (NLCT)]
+\ProvidesPackage{glossary-inline}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
%
%\begin{style}{inline}
@@ -12237,7 +14636,7 @@ false,nolabel,autolabel}[nolabel]{%
\newglossarystyle{inline}{%
% \end{macrocode}
% Start of glossary sets up first empty separator between entries.
-% (This is then changed by \cs{glossaryentryfield})
+% (This is then changed by \cs{glossentry})
% \begin{macrocode}
\renewenvironment{theglossary}%
{%
@@ -12258,20 +14657,31 @@ false,nolabel,autolabel}[nolabel]{%
\renewcommand*{\glsgroupheading}[1]{}%
% \end{macrocode}
% Just display separator followed by name and description:
+%\changes{3.08a}{2013-08-30}{updated inline style to use
+%\cs{glossentry} and \cs{subglossentry}}
% \begin{macrocode}
- \renewcommand{\glossaryentryfield}[5]{%
+ \renewcommand{\glossentry}[2]{%
\glsinlinedopostchild
\gls@inlinesep
- \def\glo@desc{##3}%
- \def\@no@post@desc{\nopostdesc}%
- \glsentryitem{##1}\glsinlinenameformat{##1}{##2}%
- \ifx\glo@desc\@no@post@desc
- \glsinlineemptydescformat{##4}{##5}%
- \else
- \ifstrempty{##3}%
- {\glsinlineemptydescformat{##4}{##5}}%
- {\glsinlinedescformat{##3}{##4}{##5}}%
- \fi
+ \glsentryitem{##1}%
+ \glsinlinenameformat{##1}{%
+ \glossentryname{##1}%
+ }%
+ \ifglsdescsuppressed{##1}%
+ {%
+ \glsinlineemptydescformat
+ {%
+ \glossentrysymbol{##1}%
+ }%
+ {%
+ ##2%
+ }%
+ }%
+ {%
+ \ifglshasdesc{##1}%
+ {\glsinlinedescformat{\glossentrydesc{##1}}{\glossentrysymbol{##1}}{##2}}%
+ {\glsinlineemptydescformat{\glossentrysymbol{##1}}{##2}}%
+ }%
\ifglshaschildren{##1}%
{%
\glsresetsubentrycounter
@@ -12285,10 +14695,12 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Sub-entries display description:
% \begin{macrocode}
- \renewcommand{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
\gls@inlinesubsep%
- \glsinlinesubnameformat{##2}{##3}%
- \glssubentryitem{##2}\glsinlinesubdescformat{##4}{##5}{##6}%
+ \glsinlinesubnameformat{##2}{%
+ \glossentryname{##2}}%
+ \glssubentryitem{##2}%
+ \glsinlinesubdescformat{\glossentrydesc{##2}}{\glossentrysymbol{##2}}{##3}%
\def\gls@inlinesubsep{\glsinlinesubseparator}%
}%
% \end{macrocode}
@@ -12330,7 +14742,7 @@ false,nolabel,autolabel}[nolabel]{%
%\end{macro}
%
%\begin{macro}{\glsinlinepostchild}
-%\changes{}{}{new}
+%\changes{3.03}{2012/09/21}{new}
% Hook to use between child and next entry
% \begin{macrocode}
\newcommand*{\glsinlinepostchild}{}
@@ -12339,14 +14751,14 @@ false,nolabel,autolabel}[nolabel]{%
%
%\begin{macro}{\glspostinline}
% Terminator for inline glossary.
-%\changes{}{}{replaced ``.'' with \cs{glspostdescription}}
+%\changes{3.03}{2012/09/21}{replaced ``.'' with \cs{glspostdescription}}
% \begin{macrocode}
\newcommand*{\glspostinline}{\glspostdescription\space}
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\glsinlinenameformat}
-%\changes{}{}{new}
+%\changes{3.03}{2012/09/21}{new}
% Formats the name of the entry (first argument label, second
% argument name):
% \begin{macrocode}
@@ -12355,7 +14767,7 @@ false,nolabel,autolabel}[nolabel]{%
%\end{macro}
%
%\begin{macro}{\glsinlinedescformat}
-%\changes{}{}{new}
+%\changes{3.03}{2012/09/21}{new}
% Formats the entry's description, symbol and location list:
% \begin{macrocode}
\newcommand*{\glsinlinedescformat}[3]{\space#1}
@@ -12363,7 +14775,7 @@ false,nolabel,autolabel}[nolabel]{%
%\end{macro}
%
%\begin{macro}{\glsinlineemptydescformat}
-%\changes{}{}{new}
+%\changes{3.03}{2012/09/21}{new}
% Formats the entry's symbol and location list when the description
% is empty:
% \begin{macrocode}
@@ -12372,7 +14784,7 @@ false,nolabel,autolabel}[nolabel]{%
%\end{macro}
%
%\begin{macro}{\glsinlinesubnameformat}
-%\changes{}{}{new}
+%\changes{3.03}{2012/09/21}{new}
% Formats the name of the subentry (first argument label, second
% argument name):
% \begin{macrocode}
@@ -12381,7 +14793,7 @@ false,nolabel,autolabel}[nolabel]{%
%\end{macro}
%
%\begin{macro}{\glsinlinesubdescformat}
-%\changes{}{}{new}
+%\changes{3.03}{2012/09/21}{new}
% Formats the subentry's description, symbol and location list:
% \begin{macrocode}
\newcommand*{\glsinlinesubdescformat}[3]{#1}
@@ -12406,7 +14818,7 @@ false,nolabel,autolabel}[nolabel]{%
% \ics{item} command, it will appear in a bold font by
% default.
% \begin{macrocode}
-\ProvidesPackage{glossary-list}[2012/11/11 v3.04 (NLCT)]
+\ProvidesPackage{glossary-list}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
%\begin{style}{list}
% The \glostyle{list} glossary style
@@ -12434,16 +14846,20 @@ false,nolabel,autolabel}[nolabel]{%
\renewcommand*{\glsgroupheading}[1]{}%
% \end{macrocode}
% Main (level 0) entries start a new item in the list:
+%\changes{3.08a}{2013-08-30}{updated list style to use
+%\cs{glossentry} and \cs{subglossentry}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \item[\glsentryitem{##1}\glstarget{##1}{##2}]
- ##3\glspostdescription\space ##5}%
+ \renewcommand*{\glossentry}[2]{%
+ \item[\glsentryitem{##1}%
+ \glstarget{##1}{\glossentryname{##1}}]
+ \glossentrydesc{##1}\glspostdescription\space ##2}%
% \end{macrocode}
% Sub-entries continue on the same line:
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand*{\subglossentry}[3]{%
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4\glspostdescription\space ##6.}%
+ \glstarget{##2}{\strut}%
+ \glossentrydesc{##2}\glspostdescription\space ##3.}%
% \end{macrocode}
% Add vertical space between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
@@ -12462,7 +14878,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the \glostyle{list} style:
% \begin{macrocode}
- \glossarystyle{list}%
+ \setglossarystyle{list}%
% \end{macrocode}
% Each group has a heading:
% \begin{macrocode}
@@ -12479,7 +14895,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the \glostyle{list} style:
% \begin{macrocode}
- \glossarystyle{list}%
+ \setglossarystyle{list}%
% \end{macrocode}
% Add navigation links at the start of the environment:
% \begin{macrocode}
@@ -12503,13 +14919,16 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the \glostyle{list} style:
% \begin{macrocode}
- \glossarystyle{list}%
+ \setglossarystyle{list}%
% \end{macrocode}
% Main (level 0) entries start a new item in the list with a
% line break after the entry name:
+%\changes{3.08a}{2013-08-30}{updated altlist style to use
+%\cs{glossentry} and \cs{subglossentry}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \item[\glsentryitem{##1}\glstarget{##1}{##2}]%
+ \renewcommand*{\glossentry}[2]{%
+ \item[\glsentryitem{##1}%
+ \glstarget{##1}{\glossentryname{##1}}]%
% \end{macrocode}
%\changes{3.04}{2012-11-11}{replaced \cs{newline} with paragraph break}
% Version 3.04 changed \cs{newline} to the following paragraph break
@@ -12517,14 +14936,14 @@ false,nolabel,autolabel}[nolabel]{%
% a page break occurring at this point.
% \begin{macrocode}
\mbox{}\par\nobreak\@afterheading
- ##3\glspostdescription\space ##5}%
+ \glossentrydesc{##1}\glspostdescription\space ##2}%
% \end{macrocode}
% Sub-entries start a new paragraph:
% \begin{macrocode}
- \renewcommand{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
\par
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4\glspostdescription\space ##6}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription\space ##3}%
}
% \end{macrocode}
%\end{style}
@@ -12537,7 +14956,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the \glostyle{altlist} style:
% \begin{macrocode}
- \glossarystyle{altlist}%
+ \setglossarystyle{altlist}%
% \end{macrocode}
% Each group has a heading:
% \begin{macrocode}
@@ -12554,7 +14973,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the \glostyle{altlist} style:
% \begin{macrocode}
- \glossarystyle{altlist}%
+ \setglossarystyle{altlist}%
% \end{macrocode}
% Add navigation links at the start of the environment:
% \begin{macrocode}
@@ -12581,22 +15000,25 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the \glostyle{list} style:
% \begin{macrocode}
- \glossarystyle{list}%
+ \setglossarystyle{list}%
% \end{macrocode}
% Each main (level 0) entry starts a new item:
+%\changes{3.08a}{2013-08-30}{updated listdotted style to use
+%\cs{glossentry} and \cs{subglossentry}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
+ \renewcommand*{\glossentry}[2]{%
\item[]\makebox[\glslistdottedwidth][l]{%
- \glsentryitem{##1}\glstarget{##1}{##2}%
- \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}%
+ \glsentryitem{##1}%
+ \glstarget{##1}{\glossentryname{##1}}%
+ \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}\glossentrydesc{##1}}%
% \end{macrocode}
% Sub entries have the same format as main entries:
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand*{\subglossentry}[3]{%
\item[]\makebox[\glslistdottedwidth][l]{%
\glssubentryitem{##2}%
- \glstarget{##2}{##3}%
- \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##4}%
+ \glstarget{##2}{\glossentryname{##2}}%
+ \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}\glossentrydesc{##2}}%
}
% \end{macrocode}
%\end{style}
@@ -12616,12 +15038,12 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the \glostyle{listdotted} style:
% \begin{macrocode}
- \glossarystyle{listdotted}%
+ \setglossarystyle{listdotted}%
% \end{macrocode}
% Main (level 0) entries just display the name:
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \item[\glsentryitem{##1}\glstarget{##1}{##2}]}%
+ \renewcommand*{\glossentry}[2]{%
+ \item[\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}}]}%
}
% \end{macrocode}
%\end{style}
@@ -12640,7 +15062,7 @@ false,nolabel,autolabel}[nolabel]{%
% The glossary styles defined in the \isty{glossary-long} package
% used the \env{longtable} environment in the glossary.
% \begin{macrocode}
-\ProvidesPackage{glossary-long}[2012/09/21 v3.03 (NLCT)]
+\ProvidesPackage{glossary-long}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
% Requires the \isty{longtable} package:
% \begin{macrocode}
@@ -12693,21 +15115,30 @@ false,nolabel,autolabel}[nolabel]{%
\renewcommand*{\glsgroupheading}[1]{}%
% \end{macrocode}
% Main (level 0) entries displayed in a row:
+%\changes{3.08a}{2013-09-28}{updated to use \cs{glossentry} and
+%\cs{subglossentry}}
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
+ }%
% \end{macrocode}
% Sub entries displayed on the following row without the name:
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
- &
+ \renewcommand{\subglossentry}[3]{%
+ &
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}%
+ \glstarget{##2}{\strut}\glosentrydesc{##2}\glspostdescription\space
+ ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & \\\fi}%
+ \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else &
+\tabularnewline\fi}%
}
% \end{macrocode}
%\end{style}
@@ -12720,7 +15151,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long} style:
% \begin{macrocode}
- \glossarystyle{long}%
+ \setglossarystyle{long}%
% \end{macrocode}
% Use \env{longtable} with two columns with vertical lines
% between each column:
@@ -12743,12 +15174,13 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long} style:
% \begin{macrocode}
- \glossarystyle{long}%
+ \setglossarystyle{long}%
% \end{macrocode}
% Set the table's header:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewcommand*{\glossaryheader}{%
- \bfseries \entryname & \bfseries \descriptionname\\\endhead}%
+ \bfseries \entryname & \bfseries \descriptionname\tabularnewline\endhead}%
}
% \end{macrocode}
%\end{style}
@@ -12761,12 +15193,14 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{longborder} style:
% \begin{macrocode}
- \glossarystyle{longborder}%
+ \setglossarystyle{longborder}%
% \end{macrocode}
% Set the table's header and add horizontal line to table's foot:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewcommand*{\glossaryheader}{%
- \hline\bfseries \entryname & \bfseries \descriptionname\\\hline
+ \hline\bfseries \entryname & \bfseries
+ \descriptionname\tabularnewline\hline
\endhead
\hline\endfoot}%
}
@@ -12794,22 +15228,28 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Main (level 0) entries on a row (name in first column,
% description in second column, page list in last column):
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1} & ##2\tabularnewline
+ }%
% \end{macrocode}
% Sub-entries on a separate row (no name, description in
% second column, page list in third column):
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4 & ##6\\}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2} &
+ ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
% \begin{macrocode}
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & &\\\fi}%
+ \renewcommand*{\glsgroupskip}{%
+ \ifglsnogroupskip\else & &\tabularnewline\fi}%
}
% \end{macrocode}
%\end{style}
@@ -12822,7 +15262,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long3col} style:
% \begin{macrocode}
- \glossarystyle{long3col}%
+ \setglossarystyle{long3col}%
% \end{macrocode}
% Use a \env{longtable} with 3 columns with vertical lines
% around them:
@@ -12845,13 +15285,14 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long3col} style:
% \begin{macrocode}
- \glossarystyle{long3col}%
+ \setglossarystyle{long3col}%
% \end{macrocode}
% Set the table's header:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewcommand*{\glossaryheader}{%
\bfseries\entryname&\bfseries\descriptionname&
- \bfseries\pagelistname\\\endhead}%
+ \bfseries\pagelistname\tabularnewline\endhead}%
}
% \end{macrocode}
%\end{style}
@@ -12863,14 +15304,15 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long3colborder} style:
% \begin{macrocode}
- \glossarystyle{long3colborder}%
+ \setglossarystyle{long3colborder}%
% \end{macrocode}
% Set the table's header and add horizontal line at table's foot:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewcommand*{\glossaryheader}{%
\hline
\bfseries\entryname&\bfseries\descriptionname&
- \bfseries\pagelistname\\\hline\endhead
+ \bfseries\pagelistname\tabularnewline\hline\endhead
\hline\endfoot}%
}
% \end{macrocode}
@@ -12899,22 +15341,30 @@ false,nolabel,autolabel}[nolabel]{%
% Main (level 0) entries on a single row (name in first column,
% description in second column, symbol in third column, page list
% in last column):
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1} &
+ \glossentrysymbol{##1} &
+ ##2\tabularnewline
+ }%
% \end{macrocode}
% Sub entries on a single row with no name (description in second
% column, symbol in third column, page list in last column):
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4 & ##5 & ##6\\}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2} &
+ \glossentrysymbol{##2} & ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
% \begin{macrocode}
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & & &\\\fi}%
+ \renewcommand*{\glsgroupskip}{%
+ \ifglsnogroupskip\else & & &\tabularnewline\fi}%
}
% \end{macrocode}
%\end{style}
@@ -12927,14 +15377,15 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long4col} style:
% \begin{macrocode}
- \glossarystyle{long4col}%
+ \setglossarystyle{long4col}%
% \end{macrocode}
% Table has a header:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewcommand*{\glossaryheader}{%
\bfseries\entryname&\bfseries\descriptionname&
\bfseries \symbolname&
- \bfseries\pagelistname\\\endhead}%
+ \bfseries\pagelistname\tabularnewline\endhead}%
}
% \end{macrocode}
%\end{style}
@@ -12947,7 +15398,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long4col} style:
% \begin{macrocode}
- \glossarystyle{long4col}%
+ \setglossarystyle{long4col}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns surrounded by vertical
% lines:
@@ -12971,7 +15422,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long4col} style:
% \begin{macrocode}
- \glossarystyle{long4col}%
+ \setglossarystyle{long4col}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns surrounded by vertical
% lines:
@@ -12985,7 +15436,8 @@ false,nolabel,autolabel}[nolabel]{%
\renewcommand*{\glossaryheader}{%
\hline\bfseries\entryname&\bfseries\descriptionname&
\bfseries \symbolname&
- \bfseries\pagelistname\\\hline\endhead\hline\endfoot}%
+ \bfseries\pagelistname\tabularnewline\hline\endhead
+ \hline\endfoot}%
}
% \end{macrocode}
%\end{style}
@@ -12998,7 +15450,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long4col} style:
% \begin{macrocode}
- \glossarystyle{long4col}%
+ \setglossarystyle{long4col}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns where the second and
% last columns may have multiple lines in each row:
@@ -13018,7 +15470,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long4colheader} style:
% \begin{macrocode}
- \glossarystyle{long4colheader}%
+ \setglossarystyle{long4colheader}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns where the second and
% last columns may have multiple lines in each row:
@@ -13038,7 +15490,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long4colborder} style:
% \begin{macrocode}
- \glossarystyle{long4colborder}%
+ \setglossarystyle{long4colborder}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns where the second and
% last columns may have multiple lines in each row:
@@ -13058,7 +15510,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{long4colheaderborder} style:
% \begin{macrocode}
- \glossarystyle{long4colheaderborder}%
+ \setglossarystyle{long4colheaderborder}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns where the second and
% last columns may have multiple lines in each row:
@@ -13085,7 +15537,7 @@ false,nolabel,autolabel}[nolabel]{%
% used the \env{longtable} environment in the glossary and use
% ragged right formatting for the multiline columns.
% \begin{macrocode}
-\ProvidesPackage{glossary-longragged}[2012/09/21 v3.03 (NLCT)]
+\ProvidesPackage{glossary-longragged}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
% Requires the \isty{array} package:
% \begin{macrocode}
@@ -13139,18 +15591,24 @@ false,nolabel,autolabel}[nolabel]{%
\renewcommand*{\glsgroupheading}[1]{}%
% \end{macrocode}
% Main (level 0) entries displayed in a row:
+%\changes{3.08a}{2013-09-28}{updated to use \cs{glossentry} and
+%\cs{subglossentry}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5%
- \tabularnewline}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription\space ##2%
+ \tabularnewline
+ }%
% \end{macrocode}
% Sub entries displayed on the following row without the name:
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
- &
+ \renewcommand{\subglossentry}[3]{%
+ &
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4\glspostdescription\space ##6%
- \tabularnewline}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2}%
+ \glspostdescription\space ##3%
+ \tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
@@ -13168,7 +15626,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{longragged} style:
% \begin{macrocode}
- \glossarystyle{longragged}%
+ \setglossarystyle{longragged}%
% \end{macrocode}
% Use \env{longtable} with two columns with vertical lines
% between each column:
@@ -13192,7 +15650,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{longragged} style:
% \begin{macrocode}
- \glossarystyle{longragged}%
+ \setglossarystyle{longragged}%
% \end{macrocode}
% Set the table's header:
% \begin{macrocode}
@@ -13211,7 +15669,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{longraggedborder} style:
% \begin{macrocode}
- \glossarystyle{longraggedborder}%
+ \setglossarystyle{longraggedborder}%
% \end{macrocode}
% Set the table's header and add horizontal line to table's foot:
% \begin{macrocode}
@@ -13246,22 +15704,29 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Main (level 0) entries on a row (name in first column,
% description in second column, page list in last column):
+%\changes{3.08a}{2013-09-28}{updated to use \cs{glossentry} and
+%\cs{subglossentry}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1} & ##2\tabularnewline
+ }%
% \end{macrocode}
% Sub-entries on a separate row (no name, description in
% second column, page list in third column):
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4 & ##6\tabularnewline}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2} &
+ ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
% \begin{macrocode}
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & &\tabularnewline\fi}%
+ \renewcommand*{\glsgroupskip}{%
+ \ifglsnogroupskip\else & &\tabularnewline\fi}%
}
% \end{macrocode}
%\end{style}
@@ -13274,7 +15739,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{longragged3col} style:
% \begin{macrocode}
- \glossarystyle{longragged3col}%
+ \setglossarystyle{longragged3col}%
% \end{macrocode}
% Use a \env{longtable} with 3 columns with vertical lines
% around them:
@@ -13298,7 +15763,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{longragged3col} style:
% \begin{macrocode}
- \glossarystyle{longragged3col}%
+ \setglossarystyle{longragged3col}%
% \end{macrocode}
% Set the table's header:
% \begin{macrocode}
@@ -13316,7 +15781,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{longragged3colborder} style:
% \begin{macrocode}
- \glossarystyle{longragged3colborder}%
+ \setglossarystyle{longragged3colborder}%
% \end{macrocode}
% Set the table's header and add horizontal line at table's foot:
% \begin{macrocode}
@@ -13356,22 +15821,30 @@ false,nolabel,autolabel}[nolabel]{%
% Main (level 0) entries on a single row (name in first column,
% description in second column, symbol in third column, page list
% in last column):
+%\changes{3.08a}{2013-09-28}{updated to use \cs{glossentry} and
+%\cs{subglossentry}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1} & \glossentrydesc{##1} &
+ ##2\tabularnewline
+ }%
% \end{macrocode}
% Sub entries on a single row with no name (description in second
% column, symbol in third column, page list in last column):
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2} &
+ \glossentrysymbol{##2} & ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
% \begin{macrocode}
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & & &\tabularnewline\fi}%
+ \renewcommand*{\glsgroupskip}{%
+ \ifglsnogroupskip\else & & &\tabularnewline\fi}%
}
% \end{macrocode}
%\end{style}
@@ -13384,7 +15857,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{altlongragged4col} style:
% \begin{macrocode}
- \glossarystyle{altlongragged4col}%
+ \setglossarystyle{altlongragged4col}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns where the second and
% last columns may have multiple lines in each row:
@@ -13412,7 +15885,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{altlongragged4col} style:
% \begin{macrocode}
- \glossarystyle{altlongragged4col}%
+ \setglossarystyle{altlongragged4col}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns where the second and
% last columns may have multiple lines in each row:
@@ -13437,7 +15910,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{altlongragged4col} style:
% \begin{macrocode}
- \glossarystyle{altlongragged4col}%
+ \setglossarystyle{altlongragged4col}%
% \end{macrocode}
% Use a \env{longtable} with 4 columns where the second and
% last columns may have multiple lines in each row:
@@ -13473,7 +15946,7 @@ false,nolabel,autolabel}[nolabel]{%
%use the \sty{multicol} package. These use the tree-like glossary
%styles in a multicol environment.
% \begin{macrocode}
-\ProvidesPackage{glossary-mcols}[2013/04/21 v3.05 (NLCT)]
+\ProvidesPackage{glossary-mcols}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -13496,7 +15969,7 @@ false,nolabel,autolabel}[nolabel]{%
% the glossary style.)
% \begin{macrocode}
\newglossarystyle{mcolindex}{%
- \glossarystyle{index}%
+ \setglossarystyle{index}%
\renewenvironment{theglossary}%
{%
% \end{macrocode}
@@ -13515,7 +15988,7 @@ false,nolabel,autolabel}[nolabel]{%
% As \glostyle{mcolindex} but has headings:
% \begin{macrocode}
\newglossarystyle{mcolindexgroup}{%
- \glossarystyle{mcolindex}%
+ \setglossarystyle{mcolindex}%
\renewcommand*{\glsgroupheading}[1]{%
\item\textbf{\glsgetgrouptitle{##1}}\indexspace}%
}
@@ -13530,7 +16003,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{mcolindex} style:
% \begin{macrocode}
- \glossarystyle{mcolindex}%
+ \setglossarystyle{mcolindex}%
% \end{macrocode}
% Put navigation links to the groups at the start of the glossary:
% \begin{macrocode}
@@ -13552,7 +16025,7 @@ false,nolabel,autolabel}[nolabel]{%
% glossary in multiple columns.
% \begin{macrocode}
\newglossarystyle{mcoltree}{%
- \glossarystyle{tree}%
+ \setglossarystyle{tree}%
\renewenvironment{theglossary}%
{%
% \end{macrocode}
@@ -13575,7 +16048,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{mcoltree} style:
% \begin{macrocode}
- \glossarystyle{mcoltree}%
+ \setglossarystyle{mcoltree}%
% \end{macrocode}
% Each group has a heading (in bold) followed by a vertical gap):
% \begin{macrocode}
@@ -13595,7 +16068,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{mcoltree} style:
% \begin{macrocode}
- \glossarystyle{mcoltree}%
+ \setglossarystyle{mcoltree}%
% \end{macrocode}
% Put navigation links to the groups at the start of the
% \env{theglossary} environment:
@@ -13619,7 +16092,7 @@ false,nolabel,autolabel}[nolabel]{%
% glossary in multiple columns.
% \begin{macrocode}
\newglossarystyle{mcoltreenoname}{%
- \glossarystyle{treenoname}%
+ \setglossarystyle{treenoname}%
\renewenvironment{theglossary}%
{%
% \end{macrocode}
@@ -13642,7 +16115,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{mcoltreenoname} style:
% \begin{macrocode}
- \glossarystyle{mcoltreenoname}%
+ \setglossarystyle{mcoltreenoname}%
% \end{macrocode}
% Give each group a heading:
% \begin{macrocode}
@@ -13662,7 +16135,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{mcoltreenoname} style:
% \begin{macrocode}
- \glossarystyle{mcoltreenoname}%
+ \setglossarystyle{mcoltreenoname}%
% \end{macrocode}
% Put navigation links to the groups at the start of the
% \env{theglossary} environment:
@@ -13686,7 +16159,7 @@ false,nolabel,autolabel}[nolabel]{%
% glossary in multiple columns.
% \begin{macrocode}
\newglossarystyle{mcolalttree}{%
- \glossarystyle{alttree}%
+ \setglossarystyle{alttree}%
\renewenvironment{theglossary}%
{%
% \end{macrocode}
@@ -13709,7 +16182,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{mcolalttree} style:
% \begin{macrocode}
- \glossarystyle{mcolalttree}%
+ \setglossarystyle{mcolalttree}%
% \end{macrocode}
% Give each group a heading.
% \begin{macrocode}
@@ -13731,7 +16204,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{mcolalttree} style:
% \begin{macrocode}
- \glossarystyle{mcolalttree}%
+ \setglossarystyle{mcolalttree}%
% \end{macrocode}
% Put the navigation links in the header
% \begin{macrocode}
@@ -13769,7 +16242,7 @@ false,nolabel,autolabel}[nolabel]{%
% The glossary styles defined in the \isty{glossary-super} package
% use the \env{supertabular} environment.
% \begin{macrocode}
-\ProvidesPackage{glossary-super}[2012/09/21 v3.03 (NLCT)]
+\ProvidesPackage{glossary-super}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
% Requires the \isty{supertabular} package:
% \begin{macrocode}
@@ -13826,22 +16299,28 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Main (level 0) entries put in a row (name in first column,
% description and page list in second column):
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
+ }%
% \end{macrocode}
% Sub entries put in a row (no name, description and page list
% in second column):
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}%
+ \glstarget{##2}{\strut}\glosentrydesc{##2}\glspostdescription\space
+ ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
% \begin{macrocode}
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & \\\fi}%
+ \renewcommand*{\glsgroupskip}{%
+ \ifglsnogroupskip\else & \tabularnewline\fi}%
}
% \end{macrocode}
%\end{style}
@@ -13854,7 +16333,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super} style:
% \begin{macrocode}
- \glossarystyle{super}%
+ \setglossarystyle{super}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% two columns and a horizontal line in the head and tail:
@@ -13875,13 +16354,15 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super} style:
% \begin{macrocode}
- \glossarystyle{super}%
+ \setglossarystyle{super}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% two columns, a header and no tail:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewenvironment{theglossary}%
- {\tablehead{\bfseries \entryname & \bfseries \descriptionname\\}%
+ {\tablehead{\bfseries \entryname &
+ \bfseries\descriptionname\tabularnewline}%
\tabletail{}%
\begin{supertabular}{lp{\glsdescwidth}}}%
{\end{supertabular}}%
@@ -13897,15 +16378,16 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super} style:
% \begin{macrocode}
- \glossarystyle{super}%
+ \setglossarystyle{super}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% two columns, a header and horizontal lines above and below the
% table:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewenvironment{theglossary}%
{\tablehead{\hline\bfseries \entryname &
- \bfseries \descriptionname\\\hline}%
+ \bfseries \descriptionname\tabularnewline\hline}%
\tabletail{\hline}
\begin{supertabular}{|l|p{\glsdescwidth}|}}%
{\end{supertabular}}%
@@ -13937,22 +16419,28 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Main (level 0) entries on a row (name in first column,
% description in second column, page list in last column):
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1} & ##2\tabularnewline
+ }%
% \end{macrocode}
% Sub entries on a row (no name, description in second column,
% page list in last column):
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4 & ##6\\}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2} &
+ ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
% \begin{macrocode}
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & &\\\fi}%
+ \renewcommand*{\glsgroupskip}{%
+ \ifglsnogroupskip\else & &\tabularnewline\fi}%
}
% \end{macrocode}
%\end{style}
@@ -13965,7 +16453,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super3col} style:
% \begin{macrocode}
- \glossarystyle{super3col}%
+ \setglossarystyle{super3col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% three columns and a horizontal line in the head and tail:
@@ -13986,14 +16474,15 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super3col} style:
% \begin{macrocode}
- \glossarystyle{super3col}%
+ \setglossarystyle{super3col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% three columns, a header and no tail:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewenvironment{theglossary}%
{\tablehead{\bfseries\entryname&\bfseries\descriptionname&
- \bfseries\pagelistname\\}\tabletail{}%
+ \bfseries\pagelistname\tabularnewline}\tabletail{}%
\begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}%
{\end{supertabular}}%
}
@@ -14008,7 +16497,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super3colborder} style:
% \begin{macrocode}
- \glossarystyle{super3colborder}%
+ \setglossarystyle{super3colborder}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% three columns, a header with horizontal lines and a horizontal
@@ -14017,7 +16506,7 @@ false,nolabel,autolabel}[nolabel]{%
\renewenvironment{theglossary}%
{\tablehead{\hline
\bfseries\entryname&\bfseries\descriptionname&
- \bfseries\pagelistname\\\hline}%
+ \bfseries\pagelistname\tabularnewline\hline}%
\tabletail{\hline}%
\begin{supertabular}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}%
{\end{supertabular}}%
@@ -14052,22 +16541,29 @@ false,nolabel,autolabel}[nolabel]{%
% Main (level 0) entries on a row with the name in the first
% column, description in second column, symbol in third column
% and page list in last column:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1} &
+ \glossentrysymbol{##1} & ##3\tabularnewline
+ }%
% \end{macrocode}
% Sub entries on a row with no name, the description in the second
% column, symbol in third column and page list in last column:
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4 & ##5 & ##6\\}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2} &
+ \glossentrysymbol{##2} & ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
% \begin{macrocode}
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & & &\\\fi}%
+ \renewcommand*{\glsgroupskip}{%
+ \ifglsnogroupskip\else & & &\tabularnewline\fi}%
}
% \end{macrocode}
%\end{style}
@@ -14080,15 +16576,16 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super4col} style:
% \begin{macrocode}
- \glossarystyle{super4col}%
+ \setglossarystyle{super4col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns, a header and no tail:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewenvironment{theglossary}%
{\tablehead{\bfseries\entryname&\bfseries\descriptionname&
\bfseries\symbolname &
- \bfseries\pagelistname\\}%
+ \bfseries\pagelistname\tabularnewline}%
\tabletail{}%
\begin{supertabular}{llll}}%
{\end{supertabular}}%
@@ -14104,7 +16601,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super4col} style:
% \begin{macrocode}
- \glossarystyle{super4col}%
+ \setglossarystyle{super4col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns and a horizontal line in the head and tail:
@@ -14125,16 +16622,18 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super4col} style:
% \begin{macrocode}
- \glossarystyle{super4col}%
+ \setglossarystyle{super4col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns and a header bordered by horizontal lines and
% a horizontal line in the tail:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewenvironment{theglossary}%
{\tablehead{\hline\bfseries\entryname&\bfseries\descriptionname&
\bfseries\symbolname &
- \bfseries\pagelistname\\\hline}\tabletail{\hline}%
+ \bfseries\pagelistname\tabularnewline\hline}%
+ \tabletail{\hline}%
\begin{supertabular}{|l|l|l|l|}}%
{\end{supertabular}}%
}
@@ -14149,7 +16648,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super4col} style:
% \begin{macrocode}
- \glossarystyle{super4col}%
+ \setglossarystyle{super4col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns and no head or tail:
@@ -14170,15 +16669,16 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super4colheader} style:
% \begin{macrocode}
- \glossarystyle{super4colheader}%
+ \setglossarystyle{super4colheader}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns, a header and no tail:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewenvironment{theglossary}%
{\tablehead{\bfseries\entryname&\bfseries\descriptionname&
\bfseries\symbolname &
- \bfseries\pagelistname\\}\tabletail{}%
+ \bfseries\pagelistname\tabularnewline}\tabletail{}%
\begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}%
{\end{supertabular}}%
}
@@ -14193,7 +16693,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super4colborder} style:
% \begin{macrocode}
- \glossarystyle{super4colborder}%
+ \setglossarystyle{super4colborder}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns and a horizontal line in the head and tail:
@@ -14215,18 +16715,19 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super4colheaderborder} style:
% \begin{macrocode}
- \glossarystyle{super4colheaderborder}%
+ \setglossarystyle{super4colheaderborder}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns and a header bordered by horizontal lines and
% a horizontal line in the tail:
+%\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}}
% \begin{macrocode}
\renewenvironment{theglossary}%
{\tablehead{\hline
\bfseries\entryname &
\bfseries\descriptionname &
\bfseries\symbolname &
- \bfseries\pagelistname\\\hline}%
+ \bfseries\pagelistname\tabularnewline\hline}%
\tabletail{\hline}%
\begin{supertabular}%
{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}%
@@ -14250,7 +16751,7 @@ false,nolabel,autolabel}[nolabel]{%
% are like those provided by the \isty{glossary-super} package,
% except that the multiline columns have ragged right justification.
% \begin{macrocode}
-\ProvidesPackage{glossary-superragged}[2012/09/21 v3.03 (NLCT)]
+\ProvidesPackage{glossary-superragged}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
% Requires the \isty{array} package:
% \begin{macrocode}
@@ -14306,19 +16807,25 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Main (level 0) entries put in a row (name in first column,
% description and page list in second column):
+%\changes{3.08a}{2013-09-28}{updated to use \cs{glossentry} and
+%\cs{subglossentry}}
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5%
- \tabularnewline}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription\space ##2%
+ \tabularnewline
+ }%
% \end{macrocode}
% Sub entries put in a row (no name, description and page list
% in second column):
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4\glspostdescription\space ##6%
- \tabularnewline}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription\space
+ ##3%
+ \tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
@@ -14336,7 +16843,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{superragged} style:
% \begin{macrocode}
- \glossarystyle{superragged}%
+ \setglossarystyle{superragged}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% two columns and a horizontal line in the head and tail:
@@ -14357,7 +16864,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{superragged} style:
% \begin{macrocode}
- \glossarystyle{superragged}%
+ \setglossarystyle{superragged}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% two columns, a header and no tail:
@@ -14380,7 +16887,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{super} style:
% \begin{macrocode}
- \glossarystyle{superragged}%
+ \setglossarystyle{superragged}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% two columns, a header and horizontal lines above and below the
@@ -14422,16 +16929,21 @@ false,nolabel,autolabel}[nolabel]{%
% Main (level 0) entries on a row (name in first column,
% description in second column, page list in last column):
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1} &
+ ##2\tabularnewline
+ }%
% \end{macrocode}
% Sub entries on a row (no name, description in second column,
% page list in last column):
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4 & ##6\tabularnewline}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2} &
+ ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
@@ -14449,7 +16961,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{superragged3col} style:
% \begin{macrocode}
- \glossarystyle{superragged3col}%
+ \setglossarystyle{superragged3col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% three columns and a horizontal line in the head and tail:
@@ -14471,7 +16983,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{superragged3col} style:
% \begin{macrocode}
- \glossarystyle{superragged3col}%
+ \setglossarystyle{superragged3col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% three columns, a header and no tail:
@@ -14494,7 +17006,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{superragged3colborder} style:
% \begin{macrocode}
- \glossarystyle{superragged3colborder}%
+ \setglossarystyle{superragged3colborder}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% three columns, a header with horizontal lines and a horizontal
@@ -14541,15 +17053,21 @@ false,nolabel,autolabel}[nolabel]{%
% column, description in second column, symbol in third column
% and page list in last column:
% \begin{macrocode}
- \renewcommand*{\glossaryentryfield}[5]{%
- \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1} &
+ \glossentrysymbol{##1} & ##2\tabularnewline
+ }%
% \end{macrocode}
-% Sub entries on a row with no name, the description in the second% column, symbol in third column and page list in last column:
+% Sub entries on a row with no name, the description in the second
+% column, symbol in third column and page list in last column:
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2} &
+ \glossentrysymbol{##2} & ##3\tabularnewline
+ }%
% \end{macrocode}
% Blank row between groups:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
@@ -14567,7 +17085,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{altsuperragged4col} style:
% \begin{macrocode}
- \glossarystyle{altsuperragged4col}%
+ \setglossarystyle{altsuperragged4col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns, a header and no tail:
@@ -14591,7 +17109,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{altsuperragged4col} style:
% \begin{macrocode}
- \glossarystyle{altsuper4col}%
+ \setglossarystyle{altsuper4col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns and a horizontal line in the head and tail:
@@ -14614,7 +17132,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{altsuperragged4col} style:
% \begin{macrocode}
- \glossarystyle{altsuperragged4col}%
+ \setglossarystyle{altsuperragged4col}%
% \end{macrocode}
% Put the glossary in a \env{supertabular} environment with
% four columns and a header bordered by horizontal lines and
@@ -14649,7 +17167,7 @@ false,nolabel,autolabel}[nolabel]{%
% that have a tree-like structure. These are designed for
% hierarchical glossaries.
% \begin{macrocode}
-\ProvidesPackage{glossary-tree}[2012/09/21 v3.03 (NLCT)]
+\ProvidesPackage{glossary-tree}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
%
%\begin{style}{index}
@@ -14671,7 +17189,10 @@ false,nolabel,autolabel}[nolabel]{%
{\setlength{\parindent}{0pt}%
\setlength{\parskip}{0pt plus 0.3pt}%
\let\item\@idxitem}%
- {}%
+% \end{macrocode}
+%\changes{3.08a}{2013-09-28}{added paragraph break at end of environment}
+% \begin{macrocode}
+ {\par}%
% \end{macrocode}
% Do nothing at the start of the environment:
% \begin{macrocode}
@@ -14684,23 +17205,23 @@ false,nolabel,autolabel}[nolabel]{%
% Main (level 0) entry starts a new item with the name in bold
% followed by the symbol in brackets (if it exists), the description
% and the page list.
+%\changes{3.08a}{2013-09-28}{updated to use \cs{glossentry} and
+%\cs{subglossentry}}
% \begin{macrocode}
-\renewcommand*{\glossaryentryfield}[5]{%
-\item\glsentryitem{##1}\textbf{\glstarget{##1}{##2}}%
- \ifx\relax##4\relax
- \else
- \space(##4)%
- \fi
- \space ##3\glspostdescription \space ##5}%
+ \renewcommand*{\glossentry}[2]{%
+ \item\glsentryitem{##1}\textbf{\glstarget{##1}{\glossentryname{##1}}}%
+ \ifglshassymbol{##1}{\space(\glossentrysymbol{##1})}{}%
+ \space \glossentrydesc{##1}\glspostdescription\space ##2%
+ }%
% \end{macrocode}
% Sub entries: level 1 entries use \ics{subitem}, levels greater
% than~1 use \ics{subsubitem}. The level ("##1") shouldn't be 0,
-% as that's catered by \cs{glossaryentryfield}, but for completeness,
+% as that's catered by \cs{glossentry}, but for completeness,
% if the level is 0, \ics{item} is used. The name is put in bold,
% followed by the symbol in brackets (if it exists), the description
% and the page list.
% \begin{macrocode}
- \renewcommand*{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
\ifcase##1\relax
% level 0
\item
@@ -14712,12 +17233,10 @@ false,nolabel,autolabel}[nolabel]{%
% all other levels
\subsubitem
\fi
- \textbf{\glstarget{##2}{##3}}%
- \ifx\relax##5\relax
- \else
- \space(##5)%
- \fi
- \space##4\glspostdescription\space ##6}%
+ \textbf{\glstarget{##2}{\glossentryname{##2}}}%
+ \ifglshassymbol{##2}{\space(\glossentrysymbol{##2})}{}%
+ \space\glossentrydesc{##2}\glspostdescription\space ##3%
+ }%
% \end{macrocode}
% Vertical gap between groups is the same as that used by indices:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
@@ -14734,7 +17253,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{index} style:
% \begin{macrocode}
- \glossarystyle{index}%
+ \setglossarystyle{index}%
% \end{macrocode}
% Add a heading for each group. This puts the group's title in
% bold followed by a vertical gap.
@@ -14753,7 +17272,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{index} style:
% \begin{macrocode}
- \glossarystyle{index}%
+ \setglossarystyle{index}%
% \end{macrocode}
% Put navigation links to the groups at the start of the glossary:
% \begin{macrocode}
@@ -14794,34 +17313,32 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Main (level 0) entries: name in bold, followed by symbol in
% brackets (if it exists), the description and the page list:
+%\changes{3.08a}{2013-09-28}{updated to use \cs{glossentry} and
+%\cs{subglossentry}}
% \begin{macrocode}
- \renewcommand{\glossaryentryfield}[5]{%
+ \renewcommand{\glossentry}[2]{%
\hangindent0pt\relax
\parindent0pt\relax
- \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}%
- \ifx\relax##4\relax
- \else
- \space(##4)%
- \fi
- \space ##3\glspostdescription \space ##5\par}%
+ \glsentryitem{##1}\textbf{\glstarget{##1}{\glossentryname{##1}}}%
+ \ifglshassymbol{##1}{\space(\glossentrysymbol{##1})}{}%
+ \space\glossentrydesc{##1}\glspostdescription\space##2\par
+ }%
% \end{macrocode}
% Sub entries: level \meta{n} is indented by \meta{n} times
% \ics{glstreeindent}. The name is in bold, followed by the
% symbol in brackets (if it exists), the description and the
% page list.
% \begin{macrocode}
- \renewcommand{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
\hangindent##1\glstreeindent\relax
\parindent##1\glstreeindent\relax
\ifnum##1=1\relax
\glssubentryitem{##2}%
\fi
- \textbf{\glstarget{##2}{##3}}%
- \ifx\relax##5\relax
- \else
- \space(##5)%
- \fi
- \space##4\glspostdescription\space ##6\par}%
+ \textbf{\glstarget{##2}{\glossentryname{##2}}}%
+ \ifglshassymbol{##2}{\space(\glossentrysymbol{##2})}{}%
+ \space\glossentrydesc{##2}\glspostdescription\space ##3\par
+ }%
% \end{macrocode}
% Vertical gap between groups is the same as that used by
% indices:
@@ -14839,7 +17356,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{tree} style:
% \begin{macrocode}
- \glossarystyle{tree}%
+ \setglossarystyle{tree}%
% \end{macrocode}
% Each group has a heading (in bold) followed by a vertical gap):
% \begin{macrocode}
@@ -14858,7 +17375,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{tree} style:
% \begin{macrocode}
- \glossarystyle{tree}%
+ \setglossarystyle{tree}%
% \end{macrocode}
% Put navigation links to the groups at the start of the
% \env{theglossary} environment:
@@ -14906,34 +17423,33 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% No group headings:
% \begin{macrocode}
-\renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
% \end{macrocode}
% Main (level 0) entries: the name is in bold, followed by the
% symbol in brackets (if it exists), the description and the
% page list.
% \begin{macrocode}
- \renewcommand{\glossaryentryfield}[5]{%
+ \renewcommand{\glossentry}[2]{%
\hangindent0pt\relax
\parindent0pt\relax
- \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}%
- \ifx\relax##4\relax
- \else
- \space(##4)%
- \fi
- \space ##3\glspostdescription \space ##5\par}%
+ \glsentryitem{##1}\textbf{\glstarget{##1}{\glossentryname{##1}}}%
+ \ifglshassymbol{##1}{\space(\glossentrysymbol{##1})}{}%
+ \space\glossentrydesc{##1}\glspostdescription\space##2\par
+ }%
% \end{macrocode}
% Sub entries: level \meta{n} is indented by \meta{n} times
% \ics{glstreeindent}. The name and symbol are omitted. The
% description followed by the page list are displayed.
% \begin{macrocode}
- \renewcommand{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
\hangindent##1\glstreeindent\relax
\parindent##1\glstreeindent\relax
\ifnum##1=1\relax
\glssubentryitem{##2}%
\fi
\glstarget{##2}{\strut}%
- ##4\glspostdescription\space ##6\par}%
+ \glossentrydesc{##2}\glspostdescription\space##3\par
+ }%
% \end{macrocode}
% Vertical gap between groups is the same as that used by indices:
%\changes{3.03}{2012/09/21}{added check for glsnogroupskip}
@@ -14951,7 +17467,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{treenoname} style:
% \begin{macrocode}
- \glossarystyle{treenoname}%
+ \setglossarystyle{treenoname}%
% \end{macrocode}
% Give each group a heading:
% \begin{macrocode}
@@ -14970,7 +17486,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{treenoname} style:
% \begin{macrocode}
- \glossarystyle{treenoname}%
+ \setglossarystyle{treenoname}%
% \end{macrocode}
% Put navigation links to the groups at the start of the
% \env{theglossary} environment:
@@ -15029,8 +17545,10 @@ false,nolabel,autolabel}[nolabel]{%
\renewcommand*{\glsgroupheading}[1]{}%
% \end{macrocode}
% Redefine the way that the level~0 entries are displayed.
+%\changes{3.08a}{2013-09-28}{updated to use \cs{glossentry} and
+%\cs{subglossentry}}
% \begin{macrocode}
- \renewcommand{\glossaryentryfield}[5]{%
+ \renewcommand{\glossentry}[2]{%
% \end{macrocode}
% If the level hasn't changed, keep the same settings, otherwise
% change \cs{glstreeindent} accordingly.
@@ -15052,20 +17570,17 @@ false,nolabel,autolabel}[nolabel]{%
% Put the name to the left of the paragraph block.
% \begin{macrocode}
\makebox[0pt][r]{\makebox[\glstreeindent][l]{%
- \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}}}%
+ \glsentryitem{##1}\textbf{\glstarget{##1}{\glossentryname{##1}}}}}%
% \end{macrocode}
% If the symbol is missing, ignore it, otherwise put it in
% brackets.
% \begin{macrocode}
- \ifx\relax##4\relax
- \else
- (##4)\space
- \fi
+ \ifglshassymbol{##1}{\space(\glossentrysymbol{##1})}{}%
% \end{macrocode}
% Do the description followed by the description terminator and
% location list.
% \begin{macrocode}
- ##3\glspostdescription \space ##5\par
+ \glossentrydesc{##1}\glspostdescription \space ##2\par
% \end{macrocode}
% Set the previous level to 0.
% \begin{macrocode}
@@ -15074,7 +17589,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Redefine the way sub-entries are displayed.
% \begin{macrocode}
- \renewcommand{\glossarysubentryfield}[6]{%
+ \renewcommand{\subglossentry}[3]{%
% \end{macrocode}
% Increment and display the sub-entry counter if this is a level~1
% entry and the sub-entry counter is in use.
@@ -15136,20 +17651,17 @@ false,nolabel,autolabel}[nolabel]{%
% Put the name to the left of the paragraph block
% \begin{macrocode}
\makebox[0pt][r]{\makebox[\gls@tmplen][l]{%
- \textbf{\glstarget{##2}{##3}}}}%
+ \textbf{\glstarget{##2}{\glossentryname{##2}}}}}%
% \end{macrocode}
% If the symbol is missing, ignore it, otherwise put it in
% brackets.
% \begin{macrocode}
- \ifx##5\relax\relax
- \else
- (##5)\space
- \fi
+ \ifglshassymbol{##2}{\space(\glossentrysymbol{##2})}{}%
% \end{macrocode}
% Do the description followed by the description terminator and
% location list.
% \begin{macrocode}
- ##4\glspostdescription\space ##6\par
+ \glossentrydesc{##2}\glspostdescription\space ##3\par
% \end{macrocode}
% Set the previous level macro to the current level.
% \begin{macrocode}
@@ -15172,7 +17684,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{alttree} style:
% \begin{macrocode}
- \glossarystyle{alttree}%
+ \setglossarystyle{alttree}%
% \end{macrocode}
% Give each group a heading.
% \begin{macrocode}
@@ -15194,7 +17706,7 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
% Base it on the glostyle{alttree} style:
% \begin{macrocode}
- \glossarystyle{alttree}%
+ \setglossarystyle{alttree}%
% \end{macrocode}
% Put the navigation links in the header
% \begin{macrocode}
@@ -15589,6 +18101,806 @@ false,nolabel,autolabel}[nolabel]{%
%\fi
%\iffalse
% \begin{macrocode}
+%<*glossaries-compatible-307.sty>
+% \end{macrocode}
+%\fi
+% Compatibility macros.
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{glossaries-compatible-307}[2013/11/14 v4.0 (NLCT)]
+% \end{macrocode}
+%
+% Compatibility macros for predefined glossary styles:
+%\begin{macro}{\compatglossarystyle}
+% Defines a compatibility glossary style.
+% \begin{macrocode}
+\newcommand{\compatglossarystyle}[2]{%
+ \ifcsundef{@glscompstyle@#1}%
+ {%
+ \csdef{@glscompstyle@#1}{#2}%
+ }%
+ {%
+ \PackageError{glossaries}{Glossary compatibility style `#1' is already defined}{}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+% Backward compatible \glostyle{inline} style.
+% \begin{macrocode}
+\compatglossarystyle{inline}{%
+ \renewcommand{\glossaryentryfield}[5]{%
+ \glsinlinedopostchild
+ \gls@inlinesep
+ \def\glo@desc{##3}%
+ \def\@no@post@desc{\nopostdesc}%
+ \glsentryitem{##1}\glsinlinenameformat{##1}{##2}%
+ \ifx\glo@desc\@no@post@desc
+ \glsinlineemptydescformat{##4}{##5}%
+ \else
+ \ifstrempty{##3}%
+ {\glsinlineemptydescformat{##4}{##5}}%
+ {\glsinlinedescformat{##3}{##4}{##5}}%
+ \fi
+ \ifglshaschildren{##1}%
+ {%
+ \glsresetsubentrycounter
+ \glsinlineparentchildseparator
+ \def\gls@inlinesubsep{}%
+ \def\gls@inlinepostchild{\glsinlinepostchild}%
+ }%
+ {}%
+ \def\gls@inlinesep{\glsinlineseparator}%
+ }%
+% \end{macrocode}
+% Sub-entries display description:
+% \begin{macrocode}
+ \renewcommand{\glossarysubentryfield}[6]{%
+ \gls@inlinesubsep%
+ \glsinlinesubnameformat{##2}{##3}%
+ \glssubentryitem{##2}\glsinlinesubdescformat{##4}{##5}{##6}%
+ \def\gls@inlinesubsep{\glsinlinesubseparator}%
+ }%
+}
+% \end{macrocode}
+% Backward compatible \glostyle{list} style.
+% \begin{macrocode}
+\compatglossarystyle{list}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \item[\glsentryitem{##1}\glstarget{##1}{##2}]
+ ##3\glspostdescription\space ##5}%
+% \end{macrocode}
+% Sub-entries continue on the same line:
+% \begin{macrocode}
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4\glspostdescription\space ##6.}%
+}
+% \end{macrocode}
+% Backward compatible \glostyle{listgroup} style.
+% \begin{macrocode}
+\compatglossarystyle{listgroup}{%
+ \csuse{@glscompstyle@list}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{listhypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{listhypergroup}{%
+ \csuse{@glscompstyle@list}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlist} style.
+% \begin{macrocode}
+\compatglossarystyle{altlist}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \item[\glsentryitem{##1}\glstarget{##1}{##2}]%
+ \mbox{}\par\nobreak\@afterheading
+ ##3\glspostdescription\space ##5}%
+ \renewcommand{\glossarysubentryfield}[6]{%
+ \par
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4\glspostdescription\space ##6}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlistgroup} style.
+% \begin{macrocode}
+\compatglossarystyle{altlistgroup}{%
+ \csuse{@glscompstyle@altlist}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlisthypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{altlisthypergroup}{%
+ \csuse{@glscompstyle@altlist}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{listdotted} style.
+% \begin{macrocode}
+\compatglossarystyle{listdotted}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \item[]\makebox[\glslistdottedwidth][l]{%
+ \glsentryitem{##1}\glstarget{##1}{##2}%
+ \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ \item[]\makebox[\glslistdottedwidth][l]{%
+ \glssubentryitem{##2}%
+ \glstarget{##2}{##3}%
+ \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##4}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{sublistdotted} style.
+% \begin{macrocode}
+\compatglossarystyle{sublistdotted}{%
+ \csuse{@glscompstyle@listdotted}%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \item[\glsentryitem{##1}\glstarget{##1}{##2}]}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long} style.
+% \begin{macrocode}
+\compatglossarystyle{long}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longborder} style.
+% \begin{macrocode}
+\compatglossarystyle{longborder}{%
+ \csuse{@glscompstyle@long}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longheader} style.
+% \begin{macrocode}
+\compatglossarystyle{longheader}{%
+ \csuse{@glscompstyle@long}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{longheaderborder}{%
+ \csuse{@glscompstyle@long}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long3col} style.
+% \begin{macrocode}
+\compatglossarystyle{long3col}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4 & ##6\\}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long3colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{long3colborder}{%
+ \csuse{@glscompstyle@long3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long3colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{long3colheader}{%
+ \csuse{@glscompstyle@long3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long3colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{long3colheaderborder}{%
+ \csuse{@glscompstyle@long3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long4col} style.
+% \begin{macrocode}
+\compatglossarystyle{long4col}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4 & ##5 & ##6\\}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long4colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{long4colheader}{%
+ \csuse{@glscompstyle@long4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long4colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{long4colborder}{%
+ \csuse{@glscompstyle@long4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{long4colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{long4colheaderborder}{%
+ \csuse{@glscompstyle@long4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlong4col} style.
+% \begin{macrocode}
+\compatglossarystyle{altlong4col}{%
+ \csuse{@glscompstyle@long4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlong4colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{altlong4colheader}{%
+ \csuse{@glscompstyle@long4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlong4colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{altlong4colborder}{%
+ \csuse{@glscompstyle@long4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlong4colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{altlong4colheaderborder}{%
+ \csuse{@glscompstyle@long4col}%
+}%
+% \end{macrocode}
+%
+% Backward compatible \glostyle{long} style.
+% \begin{macrocode}
+\compatglossarystyle{longragged}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5%
+ \tabularnewline}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4\glspostdescription\space ##6%
+ \tabularnewline}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longraggedborder} style.
+% \begin{macrocode}
+\compatglossarystyle{longraggedborder}{%
+ \csuse{@glscompstyle@longragged}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longraggedheader} style.
+% \begin{macrocode}
+\compatglossarystyle{longraggedheader}{%
+ \csuse{@glscompstyle@longragged}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longraggedheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{longraggedheaderborder}{%
+ \csuse{@glscompstyle@longragged}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longragged3col} style.
+% \begin{macrocode}
+\compatglossarystyle{longragged3col}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4 & ##6\tabularnewline}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longragged3colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{longragged3colborder}{%
+ \csuse{@glscompstyle@longragged3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longragged3colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{longragged3colheader}{%
+ \csuse{@glscompstyle@longragged3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{longragged3colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{longragged3colheaderborder}{%
+ \csuse{@glscompstyle@longragged3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlongragged4col} style.
+% \begin{macrocode}
+\compatglossarystyle{altlongragged4col}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlongragged4colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{altlongragged4colheader}{%
+ \csuse{@glscompstyle@altlong4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlongragged4colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{altlongragged4colborder}{%
+ \csuse{@glscompstyle@altlong4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altlongragged4colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{altlongragged4colheaderborder}{%
+ \csuse{@glscompstyle@altlong4col}%
+}%
+% \end{macrocode}
+%
+% Backward compatible \glostyle{index} style.
+% \begin{macrocode}
+\compatglossarystyle{index}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \item\glsentryitem{##1}\textbf{\glstarget{##1}{##2}}%
+ \ifx\relax##4\relax
+ \else
+ \space(##4)%
+ \fi
+ \space ##3\glspostdescription \space ##5}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ \ifcase##1\relax
+ % level 0
+ \item
+ \or
+ % level 1
+ \subitem
+ \glssubentryitem{##2}%
+ \else
+ % all other levels
+ \subsubitem
+ \fi
+ \textbf{\glstarget{##2}{##3}}%
+ \ifx\relax##5\relax
+ \else
+ \space(##5)%
+ \fi
+ \space##4\glspostdescription\space ##6}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{indexgroup} style.
+% \begin{macrocode}
+\compatglossarystyle{indexgroup}{%
+ \csuse{@glscompstyle@index}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{indexhypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{indexhypergroup}{%
+ \csuse{@glscompstyle@index}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{tree} style.
+% \begin{macrocode}
+\compatglossarystyle{tree}{%
+ \renewcommand{\glossaryentryfield}[5]{%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}%
+ \ifx\relax##4\relax
+ \else
+ \space(##4)%
+ \fi
+ \space ##3\glspostdescription \space ##5\par}%
+ \renewcommand{\glossarysubentryfield}[6]{%
+ \hangindent##1\glstreeindent\relax
+ \parindent##1\glstreeindent\relax
+ \ifnum##1=1\relax
+ \glssubentryitem{##2}%
+ \fi
+ \textbf{\glstarget{##2}{##3}}%
+ \ifx\relax##5\relax
+ \else
+ \space(##5)%
+ \fi
+ \space##4\glspostdescription\space ##6\par}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{treegroup} style.
+% \begin{macrocode}
+\compatglossarystyle{treegroup}{%
+ \csuse{@glscompstyle@tree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{treehypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{treehypergroup}{%
+ \csuse{@glscompstyle@tree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{treenoname} style.
+% \begin{macrocode}
+\compatglossarystyle{treenoname}{%
+ \renewcommand{\glossaryentryfield}[5]{%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}%
+ \ifx\relax##4\relax
+ \else
+ \space(##4)%
+ \fi
+ \space ##3\glspostdescription \space ##5\par}%
+ \renewcommand{\glossarysubentryfield}[6]{%
+ \hangindent##1\glstreeindent\relax
+ \parindent##1\glstreeindent\relax
+ \ifnum##1=1\relax
+ \glssubentryitem{##2}%
+ \fi
+ \glstarget{##2}{\strut}%
+ ##4\glspostdescription\space ##6\par}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{treenonamegroup} style.
+% \begin{macrocode}
+\compatglossarystyle{treenonamegroup}{%
+ \csuse{@glscompstyle@treenoname}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{treenonamehypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{treenonamehypergroup}{%
+ \csuse{@glscompstyle@treenoname}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{alttree} style.
+% \begin{macrocode}
+\compatglossarystyle{alttree}{%
+ \renewcommand{\glossaryentryfield}[5]{%
+ \ifnum\@gls@prevlevel=0\relax
+ \else
+ \settowidth{\glstreeindent}{\textbf{\@glswidestname\space}}%
+ \hangindent\glstreeindent
+ \parindent\glstreeindent
+ \fi
+ \makebox[0pt][r]{\makebox[\glstreeindent][l]{%
+ \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}}}%
+ \ifx\relax##4\relax
+ \else
+ (##4)\space
+ \fi
+ ##3\glspostdescription \space ##5\par
+ \def\@gls@prevlevel{0}%
+ }%
+ \renewcommand{\glossarysubentryfield}[6]{%
+ \ifnum##1=1\relax
+ \glssubentryitem{##2}%
+ \fi
+ \ifnum\@gls@prevlevel=##1\relax
+ \else
+ \@ifundefined{@glswidestname\romannumeral##1}{%
+ \settowidth{\gls@tmplen}{\textbf{\@glswidestname\space}}}{%
+ \settowidth{\gls@tmplen}{\textbf{%
+ \csname @glswidestname\romannumeral##1\endcsname\space}}}%
+ \ifnum\@gls@prevlevel<##1\relax
+ \setlength\glstreeindent\gls@tmplen
+ \addtolength\glstreeindent\parindent
+ \parindent\glstreeindent
+ \else
+ \@ifundefined{@glswidestname\romannumeral\@gls@prevlevel}{%
+ \settowidth{\glstreeindent}{\textbf{%
+ \@glswidestname\space}}}{%
+ \settowidth{\glstreeindent}{\textbf{%
+ \csname @glswidestname\romannumeral\@gls@prevlevel
+ \endcsname\space}}}%
+ \addtolength\parindent{-\glstreeindent}%
+ \setlength\glstreeindent\parindent
+ \fi
+ \fi
+ \hangindent\glstreeindent
+ \makebox[0pt][r]{\makebox[\gls@tmplen][l]{%
+ \textbf{\glstarget{##2}{##3}}}}%
+ \ifx##5\relax\relax
+ \else
+ (##5)\space
+ \fi
+ ##4\glspostdescription\space ##6\par
+ \def\@gls@prevlevel{##1}%
+ }%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{alttreegroup} style.
+% \begin{macrocode}
+\compatglossarystyle{alttreegroup}{%
+ \csuse{@glscompstyle@alttree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{alttreehypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{alttreehypergroup}{%
+ \csuse{@glscompstyle@alttree}%
+}%
+% \end{macrocode}
+%
+% Backward compatible \glostyle{mcolindex} style.
+% \begin{macrocode}
+\compatglossarystyle{mcolindex}{%
+ \csuse{@glscompstyle@index}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcolindexgroup} style.
+% \begin{macrocode}
+\compatglossarystyle{mcolindexgroup}{%
+ \csuse{@glscompstyle@index}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcolindexhypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{mcolindexhypergroup}{%
+ \csuse{@glscompstyle@index}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcoltree} style.
+% \begin{macrocode}
+\compatglossarystyle{mcoltree}{%
+ \csuse{@glscompstyle@tree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcoltreegroup} style.
+% \begin{macrocode}
+\compatglossarystyle{mcolindextreegroup}{%
+ \csuse{@glscompstyle@tree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcoltreehypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{mcolindextreehypergroup}{%
+ \csuse{@glscompstyle@tree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcoltreenoname} style.
+% \begin{macrocode}
+\compatglossarystyle{mcoltreenoname}{%
+ \csuse{@glscompstyle@tree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcoltreenonamegroup} style.
+% \begin{macrocode}
+\compatglossarystyle{mcoltreenonamegroup}{%
+ \csuse{@glscompstyle@tree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcoltreenonamehypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{mcoltreenonamehypergroup}{%
+ \csuse{@glscompstyle@tree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcolalttree} style.
+% \begin{macrocode}
+\compatglossarystyle{mcolalttree}{%
+ \csuse{@glscompstyle@alttree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcolalttreegroup} style.
+% \begin{macrocode}
+\compatglossarystyle{mcolalttreegroup}{%
+ \csuse{@glscompstyle@alttree}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{mcolalttreehypergroup} style.
+% \begin{macrocode}
+\compatglossarystyle{mcolalttreehypergroup}{%
+ \csuse{@glscompstyle@alttree}%
+}%
+% \end{macrocode}
+
+% Backward compatible \glostyle{superragged} style.
+% \begin{macrocode}
+\compatglossarystyle{superragged}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5%
+ \tabularnewline}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4\glspostdescription\space ##6%
+ \tabularnewline}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superraggedborder} style.
+% \begin{macrocode}
+\compatglossarystyle{superraggedborder}{%
+ \csuse{@glscompstyle@superragged}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superraggedheader} style.
+% \begin{macrocode}
+\compatglossarystyle{superraggedheader}{%
+ \csuse{@glscompstyle@superragged}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superraggedheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{superraggedheaderborder}{%
+ \csuse{@glscompstyle@superragged}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superragged3col} style.
+% \begin{macrocode}
+\compatglossarystyle{superragged3col}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4 & ##6\tabularnewline}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superragged3colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{superragged3colborder}{%
+ \csuse{@glscompstyle@superragged3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superragged3colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{superragged3colheader}{%
+ \csuse{@glscompstyle@superragged3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superragged3colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{superragged3colheaderborder}{%
+ \csuse{@glscompstyle@superragged3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altsuperragged4col} style.
+% \begin{macrocode}
+\compatglossarystyle{altsuperragged4col}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altsuperragged4colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{altsuperragged4colheader}{%
+ \csuse{@glscompstyle@altsuperragged4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altsuperragged4colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{altsuperragged4colborder}{%
+ \csuse{@glscompstyle@altsuperragged4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altsuperragged4colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{altsuperragged4colheaderborder}{%
+ \csuse{@glscompstyle@altsuperragged4col}%
+}%
+% \end{macrocode}
+%
+% Backward compatible \glostyle{super} style.
+% \begin{macrocode}
+\compatglossarystyle{super}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superborder} style.
+% \begin{macrocode}
+\compatglossarystyle{superborder}{%
+ \csuse{@glscompstyle@super}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superheader} style.
+% \begin{macrocode}
+\compatglossarystyle{superheader}{%
+ \csuse{@glscompstyle@super}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{superheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{superheaderborder}{%
+ \csuse{@glscompstyle@super}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{super3col} style.
+% \begin{macrocode}
+\compatglossarystyle{super3col}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4 & ##6\\}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{super3colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{super3colborder}{%
+ \csuse{@glscompstyle@super3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{super3colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{super3colheader}{%
+ \csuse{@glscompstyle@super3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{super3colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{super3colheaderborder}{%
+ \csuse{@glscompstyle@super3col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{super4col} style.
+% \begin{macrocode}
+\compatglossarystyle{super4col}{%
+ \renewcommand*{\glossaryentryfield}[5]{%
+ \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}%
+ \renewcommand*{\glossarysubentryfield}[6]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}##4 & ##5 & ##6\\}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{super4colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{super4colheader}{%
+ \csuse{@glscompstyle@super4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{super4colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{super4colborder}{%
+ \csuse{@glscompstyle@super4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{super4colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{super4colheaderborder}{%
+ \csuse{@glscompstyle@super4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altsuper4col} style.
+% \begin{macrocode}
+\compatglossarystyle{altsuper4col}{%
+ \csuse{@glscompstyle@super4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altsuper4colheader} style.
+% \begin{macrocode}
+\compatglossarystyle{altsuper4colheader}{%
+ \csuse{@glscompstyle@super4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altsuper4colborder} style.
+% \begin{macrocode}
+\compatglossarystyle{altsuper4colborder}{%
+ \csuse{@glscompstyle@super4col}%
+}%
+% \end{macrocode}
+% Backward compatible \glostyle{altsuper4colheaderborder} style.
+% \begin{macrocode}
+\compatglossarystyle{altsuper4colheaderborder}{%
+ \csuse{@glscompstyle@super4col}%
+}%
+% \end{macrocode}
+%\iffalse
+% \begin{macrocode}
+%</glossaries-compatible-307.sty>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*glossaries-accsupp.sty>
% \end{macrocode}
%\fi
@@ -15605,7 +18917,7 @@ false,nolabel,autolabel}[nolabel]{%
% but will only be updated when \texttt{glossaries-accsupp.sty} is
% modified.
% \begin{macrocode}
-\ProvidesPackage{glossaries-accsupp}[2011/04/02 v3.0 (NLCT)
+\ProvidesPackage{glossaries-accsupp}[2013/11/14 v4.0 (NLCT)
Experimental glossaries accessibility]
% \end{macrocode}
% Pass all options to \sty{glossaries}:
@@ -15616,6 +18928,37 @@ false,nolabel,autolabel}[nolabel]{%
% \begin{macrocode}
\ProcessOptions
% \end{macrocode}
+% Override style compatibility macros:
+% \begin{macrocode}
+\newcommand*{\compatibleglossentry}[2]{%
+ \toks@{#2}%
+ \protected@edef\@do@glossentry{%
+ \noexpand\accsuppglossaryentryfield{#1}%
+ {\noexpand\glsnamefont
+ {\expandafter\expandonce\csname glo@#1@name\endcsname}}%
+ {\expandafter\expandonce\csname glo@#1@desc\endcsname}%
+ {\expandafter\expandonce\csname glo@#1@symbol\endcsname}%
+ {\the\toks@}%
+ }%
+ \@do@glossentry
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\compatiblesubglossentry}[3]{%
+ \toks@{#3}%
+ \protected@edef\@do@subglossentry{%
+ \noexpand\accsuppglossarysubentryfield{\number#1}%
+ {#2}%
+ {\noexpand\glsnamefont
+ {\expandafter\expandonce\csname glo@#2@name\endcsname}}%
+ {\expandafter\expandonce\csname glo@#2@desc\endcsname}%
+ {\expandafter\expandonce\csname glo@#2@symbol\endcsname}%
+ {\the\toks@}%
+ }%
+ \@do@subglossentry
+}
+% \end{macrocode}
% Required packages:
% \begin{macrocode}
\RequirePackage{glossaries}
@@ -15738,6 +19081,25 @@ false,nolabel,autolabel}[nolabel]{%
% explicitly put in the value, e.g.,
% "user1={\glsaccsupp{inches}{in}}".
%
+% Append these new keys to \cs{@gls@keymap}:
+% \begin{macrocode}
+\appto\@gls@keymap{,%
+ {access}{access},%
+ {textaccess}{textaccess},%
+ {firstaccess}{firstaccess},%
+ {pluralaccess}{pluralaccess},%
+ {firstpluralaccess}{firstpluralaccess},%
+ {symbolaccess}{symbolaccess},%
+ {symbolpluralaccess}{symbolpluralaccess},%
+ {descaccess}{descaccess},%
+ {descpluralaccess}{descpluralaccess},%
+ {shortaccess}{shortaccess},%
+ {shortpluralaccess}{shortpluralaccess},%
+ {longaccess}{longaccess},%
+ {longpluralaccess}{longpluralaccess}%
+}
+% \end{macrocode}
+%
%\begin{macro}{\@gls@noaccess}
% Indicates that no replacement text has been provided.
% \begin{macrocode}
@@ -16152,360 +19514,237 @@ false,nolabel,autolabel}[nolabel]{%
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\@gls@}
-% Redefine \cs{@gls@} to change the way the link text is defined
+%\begin{macro}{\@@gls@default@entryfmt}
+% Redefine the default entry format to use accessibility information
% \begin{macrocode}
-\def\@gls@#1#2[#3]{%
- \glsdoifexists{#2}%
+\renewcommand*{\@@gls@default@entryfmt}[2]{%
+ \ifdefempty\glscustomtext
{%
- \edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label}
-% \begin{macrocode}
- \def\@gls@link@opts{#1}%
- \def\@gls@link@label{#2}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text}). This is no longer expanded.
-% \begin{macrocode}
- \ifglsused{#2}%
+ \glsifplural
{%
- \def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glstextaccessdisplay{\glsentrytext{#2}}{#2}}%
- {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
- {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
- {#3}}%
- }%
- {%
- \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsfirstaccessdisplay{\glsentryfirst{#2}}{#2}}%
- {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
- {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
- {#3}}%
- }%
% \end{macrocode}
-% Call \cs{@gls@link}.
-% If \pkgopt{footnote} package option has been used, suppress
-% hyperlink for first use.
+% Plural form
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \@gls@link[#1]{#2}{\@glo@text}%
- }%
- {%
- \gls@checkisacronymlist\@glo@type
- \ifthenelse{\(\boolean{@glsisacronymlist}\AND
- \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}%
- {%
- \@gls@link[#1,hyper=false]{#2}{\@glo@text}%
- }%
+ \glscapscase
{%
- \@gls@link[#1]{#2}{\@glo@text}%
- }%
- }%
% \end{macrocode}
-% Indicate that this entry has now been used
+% Don't adjust case
% \begin{macrocode}
- \glsunset{#2}%
- }%
-}
+ \ifglsused\glslabel
+ {%
% \end{macrocode}
-%\end{macro}
-%
-%\begin{macro}{\@Gls@}
+% Subsequent use
% \begin{macrocode}
-\def\@Gls@#1#2[#3]{%
- \glsdoifexists{#2}%
- {%
- \edef\@glo@type{\glsentrytype{#2}}%
+ #2{\glspluralaccessdisplay
+ {\glsentryplural{\glslabel}}{\glslabel}}%
+ {\glsdescriptionpluralaccessdisplay
+ {\glsentrydescplural{\glslabel}}{\glslabel}}%
+ {\glssymbolpluralaccessdisplay
+ {\glsentrysymbolplural{\glslabel}}{\glslabel}}
+ {\glsinsert}%
+ }%
+ {%
% \end{macrocode}
-% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label}
+% First use
% \begin{macrocode}
- \def\@gls@link@opts{#1}%
- \def\@gls@link@label{#2}%
+ #1{\glsfirstpluralaccessdisplay
+ {\glsentryfirstplural{\glslabel}}{\glslabel}}%
+ {\glsdescriptionpluralaccessdisplay
+ {\glsentrydescplural{\glslabel}}{\glslabel}}%
+ {\glssymbolpluralaccessdisplay
+ {\glsentrysymbolplural{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
+ }%
+ }%
+ {%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text}). The first character of the entry text is
-% converted to uppercase before passing to
-% \cs{gls@}\meta{type}"@display" or
-% \cs{gls@}\meta{type}"@displayfirst"
+% Make first letter upper case
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glstextaccessdisplay{\Glsentrytext{#2}}{#2}}%
- {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
- {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
- {#3}}%
- }%
- {%
- \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsfirstaccessdisplay{\Glsentryfirst{#2}}{#2}}%
- {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
- {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
- {#3}}%
- }%
+ \ifglsused\glslabel
+ {%
% \end{macrocode}
-% Call \cs{@gls@link}.
-% If \pkgopt{footnote} package option has been used, suppress
-% hyperlink for first use.
+% Subsequent use.
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \@gls@link[#1]{#2}{\@glo@text}%
- }%
- {%
- \gls@checkisacronymlist\@glo@type
- \ifthenelse{\(\boolean{@glsisacronymlist}\AND
- \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}%
- {%
- \@gls@link[#1,hyper=false]{#2}{\@glo@text}%
- }%
- {%
- \@gls@link[#1]{#2}{\@glo@text}%
- }%
- }%
+ #2{\glspluralaccessdisplay
+ {\Glsentryplural{\glslabel}}{\glslabel}}%
+ {\glsdescriptionpluralaccessdisplay
+ {\glsentrydescplural{\glslabel}}{\glslabel}}%
+ {\glssymbolpluralaccessdisplay
+ {\glsentrysymbolplural{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
+ }%
+ {%
% \end{macrocode}
-% Indicate that this entry has now been used
+% First use
% \begin{macrocode}
- \glsunset{#2}%
- }%
-}
+ #1{\glsfirstpluralaccessdisplay
+ {\Glsentryfirstplural{\glslabel}}{\glslabel}}%
+ {\glsdescriptionpluralaccessdisplay
+ {\glsentrydescplural{\glslabel}}{\glslabel}}%
+ {\glssymbolpluralaccessdisplay
+ {\glsentrysymbolplural{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
+ }%
+ }%
+ {%
% \end{macrocode}
-%\end{macro}
-%
-%\begin{macro}{\@GLS@}
+% Make all upper case
% \begin{macrocode}
-\def\@GLS@#1#2[#3]{%
- \glsdoifexists{#2}{%
- \edef\@glo@type{\glsentrytype{#2}}%
+ \ifglsused\glslabel
+ {%
% \end{macrocode}
-% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label}
+% Subsequent use
% \begin{macrocode}
- \def\@gls@link@opts{#1}%
- \def\@gls@link@label{#2}%
+ \MakeUppercase{%
+ #2{\glspluralaccessdisplay
+ {\glsentryplural{\glslabel}}{\glslabel}}%
+ {\glsdescriptionpluralaccessdisplay
+ {\glsentrydescplural{\glslabel}}{\glslabel}}%
+ {\glssymbolpluralaccessdisplay
+ {\glsentrysymbolplural{\glslabel}}{\glslabel}}%
+ {\glsinsert}}%
+ }%
+ {%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text}).
+% First use
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glstextaccessdisplay{\glsentrytext{#2}}{#2}}%
- {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
- {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
- {#3}}%
+ \MakeUppercase{%
+ #1{\glsfirstpluralaccessdisplay
+ {\glsentryfirstplural{\glslabel}}{\glslabel}}%
+ {\glsdescriptionpluralaccessdisplay
+ {\glsentrydescplural{\glslabel}}{\glslabel}}%
+ {\glssymbolpluralaccessdisplay
+ {\glsentrysymbolplural{\glslabel}}{\glslabel}}%
+ {\glsinsert}}%
+ }%
+ }%
}%
{%
- \edef\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsfirstaccessdisplay{\glsentryfirst{#2}}{#2}}%
- {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
- {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
- {#3}}%
- }%
% \end{macrocode}
-% Call \cs{@gls@link}
-% If \pkgopt{footnote} package option has been used, suppress
-% hyperlink for first use.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
-%checking if footnote option has been used}
+% Singular form
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
- }%
- {%
- \gls@checkisacronymlist\@glo@type
- \ifthenelse{\(\boolean{@glsisacronymlist}\AND
- \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}{%
- \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}%
- }%
+ \glscapscase
{%
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
- }%
- }%
% \end{macrocode}
-% Indicate that this entry has now been used
+% Don't adjust case
% \begin{macrocode}
- \glsunset{#2}%
- }%
-}
-% \end{macrocode}
-%\end{macro}
-%
-%\begin{macro}{\@gls@pl@}
-% \begin{macrocode}
-\def\@glspl@#1#2[#3]{%
- \glsdoifexists{#2}%
- {%
- \edef\@glo@type{\glsentrytype{#2}}%
-% \end{macrocode}
-% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label}
-% \begin{macrocode}
- \def\@gls@link@opts{#1}%
- \def\@gls@link@label{#2}%
+ \ifglsused\glslabel
+ {%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+% Subsequent use
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glspluralaccessdisplay{\glsentryplural{#2}}{#2}}%
- {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
- {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
- {#3}}%
- }%
- {%
- \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsfirstpluralaccessdisplay{\glsentryfirstplural{#2}}{#2}}%
- {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
- {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
- {#3}}%
- }%
+ #2{\glstextaccessdisplay
+ {\glsentrytext{\glslabel}}{\glslabel}}%
+ {\glsdescriptionaccessdisplay
+ {\glsentrydesc{\glslabel}}{\glslabel}}%
+ {\glssymbolaccessdisplay
+ {\glsentrysymbol{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
+ }%
+ {%
% \end{macrocode}
-% Call \cs{@gls@link}
-% If \pkgopt{footnote} package option has been used, suppress
-% hyperlink for first use.
-%\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to
-%checking if footnote option has been used}
+% First use
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \@gls@link[#1]{#2}{\@glo@text}%
- }%
- {%
- \gls@checkisacronymlist\@glo@type
- \ifthenelse{\(\boolean{@glsisacronymlist}\AND
- \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}%
- {%
- \@gls@link[#1,hyper=false]{#2}{\@glo@text}%
+ #1{\glsfirstaccessdisplay
+ {\glsentryfirst{\glslabel}}{\glslabel}}%
+ {\glsdescriptionaccessdisplay
+ {\glsentrydesc{\glslabel}}{\glslabel}}%
+ {\glssymbolaccessdisplay
+ {\glsentrysymbol{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
+ }%
}%
{%
- \@gls@link[#1]{#2}{\@glo@text}%
- }%
- }%
-% \end{macrocode}
-% Indicate that this entry has now been used
-% \begin{macrocode}
- \glsunset{#2}%
- }%
-}
% \end{macrocode}
-%\end{macro}
-%
-%\begin{macro}{\@Glspl@}
+% Make first letter upper case
% \begin{macrocode}
-\def\@Glspl@#1#2[#3]{%
- \glsdoifexists{#2}%
- {%
- \edef\@glo@type{\glsentrytype{#2}}%
+ \ifglsused\glslabel
+ {%
% \end{macrocode}
-% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label}
+% Subsequent use
% \begin{macrocode}
- \def\@gls@link@opts{#1}%
- \def\@gls@link@label{#2}%
-% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text}).
-% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glspluralaccessdisplay{\Glsentryplural{#2}}{#2}}%
- {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
- {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
- {#3}}%
- }%
- {%
- \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsfirstpluralaccessdisplay{\Glsentryfirstplural{#2}}{#2}}%
- {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
- {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
- {#3}}%
- }%
+ #2{\glstextaccessdisplay
+ {\Glsentrytext{\glslabel}}{\glslabel}}%
+ {\glsdescriptionaccessdisplay
+ {\glsentrydesc{\glslabel}}{\glslabel}}%
+ {\glssymbolaccessdisplay
+ {\glsentrysymbol{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
+ }%
+ {%
% \end{macrocode}
-% Call \cs{@gls@link}
-% If \pkgopt{footnote} package option has been used, suppress
-% hyperlink for first use.
+% First use
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \@gls@link[#1]{#2}{\@glo@text}%
- }%
- {%
- \ifthenelse{\equal{\@glo@type}{\acronymtype}\and
- \boolean{glsacrfootnote}}%
- {%
- \@gls@link[#1,hyper=false]{#2}{\@glo@text}%
+ #1{\glsfirstaccessdisplay
+ {\Glsentryfirst{\glslabel}}{\glslabel}}%
+ {\glsdescriptionaccessdisplay
+ {\glsentrydesc{\glslabel}}{\glslabel}}%
+ {\glssymbolaccessdisplay
+ {\glsentrysymbol{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
+ }%
}%
{%
- \@gls@link[#1]{#2}{\@glo@text}%
- }%
- }%
% \end{macrocode}
-% Indicate that this entry has now been used
+% Make all upper case
% \begin{macrocode}
- \glsunset{#2}%
- }%
-}
+ \ifglsused\glslabel
+ {%
% \end{macrocode}
-%\end{macro}
-%
-%\begin{macro}{\@GLSpl@}
+% Subsequent use
% \begin{macrocode}
-\def\@GLSpl@#1#2[#3]{%
- \glsdoifexists{#2}%
- {%
- \edef\@glo@type{\glsentrytype{#2}}%
+ \MakeUppercase{%
+ #2{\glstextaccessdisplay
+ {\glsentrytext{\glslabel}}{\glslabel}}%
+ {\glsdescriptionaccessdisplay
+ {\glsentrydesc{\glslabel}}{\glslabel}}%
+ {\glssymbolaccessdisplay
+ {\glsentrysymbol{\glslabel}}{\glslabel}}%
+ {\glsinsert}}%
+ }%
+ {%
% \end{macrocode}
-% Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label}
+% First use
% \begin{macrocode}
- \def\@gls@link@opts{#1}%
- \def\@gls@link@label{#2}%
+ \MakeUppercase{%
+ #1{\glsfirstaccessdisplay
+ {\glsentryfirst{\glslabel}}{\glslabel}}%
+ {\glsdescriptionaccessdisplay
+ {\glsentrydesc{\glslabel}}{\glslabel}}%
+ {\glssymbolaccessdisplay
+ {\glsentrysymbol{\glslabel}}{\glslabel}}%
+ {\glsinsert}}%
+ }%
+ }%
+ }%
+ }%
+ {%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+% Custom text provided in \cs{glsdisp}
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glspluralaccessdisplay{\glsentryplural{#2}}{#2}}%
- {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
- {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
- {#3}}%
- }%
+ \ifglsused{\glslabel}%
{%
- \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsfirstpluralaccessdisplay{\glsentryfirstplural{#2}}{#2}}%
- {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
- {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
- {#3}}%
- }%
% \end{macrocode}
-% Call \cs{@gls@link}
-% If \pkgopt{footnote} package option has been used, suppress
-% hyperlink for first use.
+% Subsequent use
% \begin{macrocode}
- \ifglsused{#2}%
- {%
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
+ #2{\glscustomtext}%
+ {\glsdescriptionaccessdisplay
+ {\glsentrydesc{\glslabel}}{\glslabel}}%
+ {\glssymbolaccessdisplay
+ {\glsentrysymbol{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
}%
{%
- \gls@checkisacronymlist\@glo@type
- \ifthenelse{\(\boolean{@glsisacronymlist}\AND
- \boolean{glsacrfootnote}\)\OR\NOT\boolean{glshyperfirst}}%
- {%
- \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}%
- }%
- {%
- \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
- }%
- }%
% \end{macrocode}
-% Indicate that this entry has now been used
+% First use
% \begin{macrocode}
- \glsunset{#2}%
+ #1{\glscustomtext}%
+ {\glsdescriptionaccessdisplay
+ {\glsentrydesc{\glslabel}}{\glslabel}}%
+ {\glssymbolaccessdisplay
+ {\glsentrysymbol{\glslabel}}{\glslabel}}%
+ {\glsinsert}%
+ }%
}%
}
% \end{macrocode}
@@ -16518,16 +19757,20 @@ false,nolabel,autolabel}[nolabel]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \def\@glo@text{%
- \glsshortaccessdisplay{\glsentryshort{#2}}{#2}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@firstofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glsshortaccessdisplay{\glsentryshort{#2}}{#2}}#3%
}%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -16540,16 +19783,20 @@ false,nolabel,autolabel}[nolabel]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \def\@glo@text{%
- \glsshortaccessdisplay{\Glsentryshort{#2}}{#2}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@secondofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glsshortaccessdisplay{\Glsentryshort{#2}}{#2}}#3%
}%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -16562,16 +19809,21 @@ false,nolabel,autolabel}[nolabel]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \def\@glo@text{%
- \glsshortaccessdisplay{\MakeUppercase{\glsentryshort{#2}}}{#2}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@thirdofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glsshortaccessdisplay
+ {\MakeUppercase{\glsentryshort{#2}}}{#2}}#3%
}%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\acronymfont{\@glo@text#3}}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -16584,16 +19836,20 @@ false,nolabel,autolabel}[nolabel]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \def\@glo@text{%
- \glslongaccessdisplay{\glsentrylong{#2}}{#2}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@firstofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glslongaccessdisplay{\glsentrylong{#2}}{#2}}#3%
}%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\@glo@text#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -16606,16 +19862,20 @@ false,nolabel,autolabel}[nolabel]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \def\@glo@text{%
- \glslongaccessdisplay{\Glsentrylong{#2}}{#2}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@firstofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glslongaccessdisplay{\Glsentrylong{#2}}{#2}}#3%
}%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\@glo@text#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
@@ -16628,47 +19888,94 @@ false,nolabel,autolabel}[nolabel]{%
{%
\edef\@glo@type{\glsentrytype{#2}}%
% \end{macrocode}
-% Determine what the link text should be (this is stored in
-% \cs{@glo@text})
+%\changes{3.11a}{2013-10-15}{added \cs{glslabel}, \cs{glsifplural},
+% \cs{glscapscase}, \cs{glsinsert} and \cs{glscustomtext}}
% \begin{macrocode}
- \def\@glo@text{%
- \glslongaccessdisplay{\MakeUppercase{\glsentrylong{#2}}}{#2}%
+ \def\glslabel{#2}%
+ \let\glsifplural\@secondoftwo
+ \let\glscapscase\@firstofthree
+ \let\glsinsert\@empty
+ \def\glscustomtext{%
+ \acronymfont{\glslongaccessdisplay{%
+ \MakeUppercase{\glsentrylong{#2}}}{#2}#3}%
}%
% \end{macrocode}
% Call \cs{@gls@link}
% \begin{macrocode}
- \@gls@link[#1]{#2}{\@glo@text#3}%
+ \@gls@link[#1]{#2}{\csname gls@\@glo@type @entryfmt\endcsname}%
}%
}
% \end{macrocode}
%\end{macro}
%
%\subsection{Displaying the Glossary}
-% Entries within the glossary or list of acronyms are now formatted
-% via \cs{accsuppglossaryentryfield} and
+%\changes{3.08a}{2013-09-28}{removed definition of \cs{@glossaryentryfield}}
+%\changes{3.08a}{2013-09-28}{removed definition of \cs{@glossarysubentryfield}}
+%
+% We need to redefine the way the glossary entries are formatted to
+% include the accessibility support. The predefined glossary styles
+% use \ics{glossentryname}, \ics{glossentrydesc} and
+% \ics{glossentrysymbol}, but we need to provide compatibility with
+% earlier versions in case users have defined their own styles using
+% \cs{accsuppglossaryentryfield} and
% \cs{accsuppglossarysubentryfield}.
-%\begin{macro}{\@glossaryentryfield}
+%
+% Now redefine \cs{glossentryname}, \cs{glossentrydesc} and
+% \cs{glossentrysymbol} etc so they use the accessibility stuff.
% \begin{macrocode}
-\ifglsxindy
- \renewcommand*{\@glossaryentryfield}{%
- \string\\accsuppglossaryentryfield}
-\else
- \renewcommand*{\@glossaryentryfield}{%
- \string\accsuppglossaryentryfield}
-\fi
+\renewcommand*{\glossentryname}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glsnamefont{\glsnameaccessdisplay{\glsentryname{#1}}{#1}}%
+ }%
+}
% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\@glossarysubentryfield}
+%
% \begin{macrocode}
-\ifglsxindy
- \renewcommand*{\@glossarysubentryfield}{%
- \string\\accsuppglossarysubentryfield}
-\else
- \renewcommand*{\@glossarysubentryfield}{%
- \string\accsuppglossarysubentryfield}
-\fi
+\renewcommand*{\glossentryname}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glsnamefont{\glsnameaccessdisplay{\Glsentryname{#1}}{#1}}%
+ }%
+}
% \end{macrocode}
-%\end{macro}
+%
+% \begin{macrocode}
+\renewcommand*{\glossentrydesc}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glsdescriptionaccessdisplay{\glsentrydesc{#1}}{#1}%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand*{\Glossentrydesc}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glsdescriptionaccessdisplay{\Glsentrydesc{#1}}{#1}%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand*{\glossentrysymbol}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glssymbolaccessdisplay{\glsentrysymbol{#1}}{#1}%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand*{\Glossentrysymbol}[1]{%
+ \glsdoifexists{#1}%
+ {%
+ \glssymbolaccessdisplay{\Glsentrysymbol{#1}}{#1}%
+ }%
+}
+% \end{macrocode}
+%
%\begin{macro}{\accsuppglossaryentryfield}
% \begin{macrocode}
\newcommand*{\accsuppglossaryentryfield}[5]{%
@@ -16682,7 +19989,7 @@ false,nolabel,autolabel}[nolabel]{%
%\begin{macro}{\accsuppglossarysubentryfield}
% \begin{macrocode}
\newcommand*{\accsuppglossarysubentryfield}[6]{%
- \glossaryentryfield{#1}{#2}%
+ \glossarysubentryfield{#1}{#2}%
{\glsnameaccessdisplay{#3}{#2}}%
{\glsdescriptionaccessdisplay{#4}{#2}}%
{\glssymbolaccessdisplay{#5}{#2}}{#6}%
@@ -16993,7 +20300,7 @@ false,nolabel,autolabel}[nolabel]{%
% support is required, but the \isty{translator} package is not loaded.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-babel}[2009/04/16 v1.2 (NLCT)]
+\ProvidesPackage{glossaries-babel}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
% English:
% \begin{macrocode}
@@ -17308,7 +20615,7 @@ false,nolabel,autolabel}[nolabel]{%
%\subsection{Polyglossia Captions}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-polyglossia}[2009/11/09 v1.0 (NLCT)]
+\ProvidesPackage{glossaries-polyglossia}[2013/11/14 v4.0 (NLCT)]
% \end{macrocode}
% English:
% \begin{macrocode}
@@ -17846,15 +21153,29 @@ false,nolabel,autolabel}[nolabel]{%
% A further run through LaTeX will be required to ensure that
% the table of contents is up to date if the toc option
% is used.
+ % Alternatively, if you use arara, you can add the following
+ % directives in your document:
+ %
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+
\documentclass{article}
\listfiles
\usepackage[colorlinks]{hyperref}
- \usepackage{glossaries} % acronym will go in main glossary
- %\usepackage[acronym]{glossaries} % make a separate list of acronyms
+ %\usepackage{glossaries} % acronym will go in main glossary
+ \usepackage[acronym]{glossaries} % make a separate list of acronyms
\makeglossaries
+\longnewglossaryentry{par}{name={par}}%
+{%
+ A long description with a paragraph break.
+
+ This is the next paragraph.
+}
+
\newglossaryentry{sample}{name={sample},
description={a sample entry}}
@@ -17869,6 +21190,9 @@ A \gls{sample} entry and \gls{aca}. Second use: \gls{aca}.
Plurals: \glspl{sample}. Reset acronym\glsreset{aca}.
First use: \glspl{aca}. Second use: \glspl{aca}.
+If you want paragraph breaks in the description use
+\verb|\longnewglossaryentry|, as with entry \gls{par}.
+
\printglossaries
\end{document}
% \end{macrocode}
@@ -17885,6 +21209,11 @@ First use: \glspl{aca}. Second use: \glspl{aca}.
%\fi
%\iffalse
% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{article}
\usepackage[colorlinks]{hyperref}
@@ -17908,10 +21237,10 @@ a \gls{pear}}}
\newglossaryentry{fruit}{name=fruit,
description={sweet, fleshy product of plant containing seed}}
-% \glssee{fruit}{pear,apple,banana}
+\glssee{fruit}{pear,apple,banana}
\begin{document}
-%\gls{pear}, \gls{apple} and \gls{banana}.
+\gls{pear}, \gls{apple} and \gls{banana}.
\printglossaries
@@ -17931,15 +21260,17 @@ description={sweet, fleshy product of plant containing seed}}
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{report}
\usepackage[colorlinks]{hyperref}
\usepackage[acronym, % create list of acronyms
nomain, % don't need main glossary for this example
style=tree, % need a style that displays the symbol
- hyperfirst=false,% don't hyperlink first use
- sanitize=none % switch off sanitization as description
- % will be used in the main text
+ hyperfirst=false% don't hyperlink first use
]{glossaries}
\makeglossaries
@@ -17951,7 +21282,7 @@ description={sweet, fleshy product of plant containing seed}}
% document the short form will be displayed in small caps, but in
% the list of acronyms the short form is displayed in normal
% capitals. To ensure this, the short form should be written in
- % lower case when the acronym is defined, and \MakeUppercase is
+ % lower case when the acronym is defined, and \MakeTextUppercase is
% used when it's displayed in the list of acronyms.
% In the list of acronyms, the long form is used as the name, the
@@ -17960,28 +21291,14 @@ description={sweet, fleshy product of plant containing seed}}
\renewcommand*{\CustomAcronymFields}{%
name={\the\glslongtok},%
- symbol={\MakeUppercase{\the\glsshorttok}},%
+ symbol={\MakeTextUppercase{\the\glsshorttok}},%
text={\textsc{\the\glsshorttok}},%
plural={\textsc{\the\glsshorttok}\noexpand\acrpluralsuffix}%
}
\renewcommand*{\SetCustomDisplayStyle}[1]{%
- % ##1 corresponds to the 'first' key
- % ##2 corresponds to the 'description' key
- % ##3 corresponds to the 'symbol' key
- % ##4 is the inserted text given by the final optional argument to
- % commands like \gls
- % The short form can be obtained via \glsentryshort{\glslabel}
- % The plural short form can be obtained via
- % \glsentryshortplural{\glslabel}
- % The long form can be obtained via \glsentrylong{\glslabel}
- % The plural long form can be obtained via
- % \glsentrylongplural{\glslabel}
- \defglsdisplayfirst[#1]{##1##4\protect\footnote{%
- \glsentrylong{\glslabel}: ##2}}%
- % ##1 corresponds to the 'text' key
- % the rest as above
- \defglsdisplay[#1]{##1##4}%
+ \defglsentryfmt[#1]{\glsgenentryfmt
+ \ifglsused{\glslabel}{}{\footnote{\glsentrylong{\glslabel}}}}%
}
% Now set the custom acronym style (to override the default style)
@@ -18020,6 +21337,10 @@ Sheet}
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{article}
\usepackage[acronym]{glossaries}
@@ -18028,11 +21349,11 @@ Sheet}
\newcommand*{\newdualentry}[5][]{%
\newglossaryentry{main-#2}{name={#4},%
- text={#3\protect\glsadd{#2}},%
+ text={#3\glsadd{#2}},%
description={#5},%
#1
}%
- \newacronym{#2}{#3\protect\glsadd{main-#2}}{#4}
+ \newacronym{#2}{#3\glsadd{main-#2}}{#4}
}
\newdualentry{svm}% label
@@ -18057,12 +21378,178 @@ Sheet}
%\fi
%\iffalse
% \begin{macrocode}
+%<*sample-entryfmt.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[style=tree]{glossaries}
+
+\makeglossaries
+
+\renewcommand*{\glsentryfmt}{%
+ \glsgenentryfmt
+ \ifglsused{\glslabel}{}{\space (\glsentrysymbol{\glslabel})}%
+}
+
+\newglossaryentry{distance}{name=distance,
+description={The length between two points},
+symbol={km}}
+
+\begin{document}
+
+First use: \gls{distance}. Next use: \gls{distance}.
+
+\printglossaries
+
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sample-entryfmt.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*sample-FnDesc.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain
+ % If you are using arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+\documentclass{report}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[hyperfirst=false]{glossaries}
+
+\makeglossaries
+
+\renewcommand*{\glsentryfmt}{%
+ \glsgenentryfmt
+ \ifglsused{\glslabel}{}{\footnote{\glsentrydesc{\glslabel}}}%
+}
+
+\newglossaryentry{sample}{name={sample},description={an example
+description}}
+
+\begin{document}
+\chapter{Sample Chapter}
+
+First use: \gls{sample}.
+
+Next use: \gls{sample}.
+
+\printglossaries
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sample-FnDesc.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*sample-index.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+\documentclass{report}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[toc]{glossaries}
+\usepackage{glossary-mcols}
+
+\newglossary[ilg]{index}{ind}{idx}{\indexname}
+
+\makeglossaries
+
+\newcommand*{\newterm}[2][]{%
+ \newglossaryentry{#2}{type={index},name={#2},description={\nopostdesc},#1}%
+}
+
+% define terms for the index
+
+\newterm[plural={stegosauruses}]{stegosaurus}
+\newterm[plural={triceratopses}]{triceratops}
+\newterm[plural={apatosauruses}]{apatosaurus}
+
+\newterm[name={dinosaur}]{ind-dinosaur}
+\newterm[name={Triassic}]{ind-triassic}
+
+% define terms for the main glossary
+
+\newglossaryentry{dinosaur}%
+{%
+ name={dinosaur\glsadd{ind-dinosaur}},%
+ description={One of a group of dinosauria}%
+}
+
+\newglossaryentry{Triassic}%
+{%
+ name={Triassic\glsadd{ind-triassic}},%
+ description={The first period of the Mesozoic Era}
+}
+
+\begin{document}
+\tableofcontents
+
+\chapter{Dinosaurs}
+
+\Glspl{dinosaur} are now extinct. They first appeared during the
+\gls{Triassic} period. Examples of \glspl{dinosaur} include the
+\gls{triceratops}, the \gls{apatosaurus} and the \gls{stegosaurus}.
+
+\renewcommand*{\glsnamefont}[1]{\textbf{\makefirstuc{#1}}}
+
+\printglossary[style=long,nogroupskip]
+
+\renewcommand*{\glsnamefont}[1]{\textmd{#1}}
+
+\printglossary[type=index,style=mcolindexgroup]
+
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sample-index.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*sample-inline.tex>
% \end{macrocode}
%\fi
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
\documentclass[a4paper]{report}
\usepackage[plainpages=false,colorlinks]{hyperref}
@@ -18072,7 +21559,7 @@ Sheet}
\renewcommand*{\glossarysection}[2][]{\textbf{#1}: }
\renewcommand{\glsnamefont}[1]{\textsc{#1}}
-\glossarystyle{inline}
+\setglossarystyle{inline}
\makeglossaries
@@ -18219,6 +21706,11 @@ There are two types of ordering: word ordering (which places
%\fi
%\iffalse
% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass[english,french]{article}
\usepackage[utf8]{inputenc}
@@ -18267,6 +21759,9 @@ Le \gls{fr-cat} s'est repos\'e sur la \gls{fr-mat}.
%\fi
%\iffalse
% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directive:
+ % arara: pdflatex: { synctex: on }
\documentclass{article}
\usepackage{mfirstuc}
@@ -18306,11 +21801,149 @@ Le \gls{fr-cat} s'est repos\'e sur la \gls{fr-mat}.
%\fi
%\iffalse
% \begin{macrocode}
+%<*sample-newkeys.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain
+ % If you are using arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[nopostdot,nogroupskip]{glossaries}
+
+\glsaddkey*% star version needed as default value needs expanding
+ {ed}% key
+ {\glsentrytext{\glslabel}ed}% default value
+ {\glsentryed}% command analogous to \glsentrytext
+ {\Glsentryed}% command analogous to \Glsentrytext
+ {\glsed}% command analogous to \glstext
+ {\Glsed}% command analogous to \Glstext
+ {\GLSed}% command analogous to \GLStext
+
+\glsaddkey*
+ {ing}% key
+ {\glsentrytext{\glslabel}ing}% default value
+ {\glsentrying}% command analogous to \glsentrytext
+ {\Glsentrying}% command analogous to \Glsentrytext
+ {\glsing}% command analogous to \glstext
+ {\Glsing}% command analogous to \Glstext
+ {\GLSing}% command analogous to \GLStext
+
+
+\makeglossaries
+
+\newglossaryentry{jump}{name={jump},description={}}
+
+\newglossaryentry{run}{name={run},%
+ ed={ran},%
+ ing={running},
+ description={}}
+
+\newglossaryentry{waddle}{name={waddle},%
+ ed={waddled},%
+ ing={waddling},%
+ description={}}
+
+\begin{document}
+
+This is a sample document illustrating how to add new glossary entry
+keys.
+
+The dog \glsed{jump} over the duck.
+
+The duck was \glsing{waddle} round the dog.
+
+The dog \glsed{run} away from the duck.
+
+\printglossaries
+
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sample-newkeys.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*sample-nomathhyper.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+\documentclass{report}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries}
+
+\makeglossaries
+
+ % switch off hyperlinks:
+\glsdisablehyper
+
+ % redefine \glsentryfmt so that it adds a hyperlink
+ % if not in math mode
+\renewcommand*{\glsentryfmt}{%
+ \ifmmode
+ \glsgenentryfmt
+ \else
+ % Temporarily enable hyperlinks:
+ \glsenablehyper
+ \glshyperlink[\glsgenentryfmt]{\glslabel}%
+ % Disable hyperlinks again
+ \glsdisablehyper
+ \fi
+}
+
+\renewcommand{\glossarypreamble}{\glsenablehyper}
+\renewcommand{\glossarypostamble}{\glsdisablehyper}
+
+ % define a sample entry:
+\newglossaryentry{x}{name={x},description={sample entry}}
+
+\begin{document}
+\chapter{Sample}
+In text mode: \gls{x}. Inline maths: $\gls{x}$. Displayed
+maths:
+\[
+ \gls{x}
+\]
+
+Back to text mode again: \gls{x}.
+
+\printglossaries
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sample-nomathhyper.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*sample-numberlist.tex>
% \end{macrocode}
%\fi
%\iffalse
% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
\documentclass{report}
\usepackage[colorlinks]{hyperref}
@@ -18354,12 +21987,139 @@ Here's some more information about \glspl{sample}.
%\fi
%\iffalse
% \begin{macrocode}
+%<*sample-prefix.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
+
+\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[toc,acronym]{glossaries-prefix}
+
+\makeglossaries
+
+\newglossaryentry{sample}{name={sample},
+ description={an example},
+ prefix={a~},
+ prefixplural={the\space}%
+}
+
+\newglossaryentry{oeil}{name={oeil},
+ plural={yeux},
+ description={eye},
+ prefix={l'},
+ prefixplural={les\space}}
+
+\newacronym
+ [%
+ prefix={an\space},prefixfirst={a~}%
+ ]{svm}{SVM}{support vector machine}
+
+\newglossarystyle{plist}{%
+ \setglossarystyle{list}%
+ \renewcommand*{\glossentry}[2]{%
+ \item[\glsentryitem{##1}%
+ \Glsentryprefix{##1}%
+ \glstarget{##1}{\glossentryname{##1}}]
+ \glossentrydesc{##1}\glspostdescription\space ##2}%
+}
+
+\begin{document}
+
+\tableofcontents
+
+\section{Sample}
+
+First use: \pgls{sample}, \pgls{svm}, \pgls{oeil}. Next use: \pgls{sample}, \pgls{svm}, \pgls{oeil}.
+
+Reset. \glsresetall
+
+First use: \pglspl{sample}, \pglspl{svm}, \pglspl{oeil}. Next use:
+\pglspl{sample}, \pglspl{svm}, \pglspl{oeil}.
+
+Reset. \glsresetall
+
+First use: \Pgls{sample}, \Pgls{svm}. Next use: \Pgls{sample}, \Pgls{svm}.
+
+Reset. \glsresetall
+
+First use: \Pglspl{sample}, \Pglspl{svm}. Next use: \Pglspl{sample}, \Pglspl{svm}.
+
+Reset. \glsresetall
+
+First use: \PGLS{sample}, \PGLS{svm}. Next use: \PGLS{sample}, \PGLS{svm}.
+
+Reset. \glsresetall
+
+First use: \PGLSpl{sample}, \PGLSpl{svm}. Next use: \PGLSpl{sample}, \PGLSpl{svm}.
+
+\printglossary[style=plist]
+
+\printacronyms
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sample-prefix.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*sample-si.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+\documentclass{article}
+\usepackage{siunitx}
+\usepackage[style=long4col]{glossaries}
+%
+\makeglossaries
+%
+\newglossaryentry{ohm}{%
+ name=ohm,
+ symbol={\si{\ohm}},
+ description=unit of electrical resistance%
+}
+%
+\begin{document}
+\glsaddallunused
+%
+\printglossaries
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sample-si.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*sample.tex>
% \end{macrocode}
%\fi
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
\documentclass[a4paper]{report}
\usepackage[plainpages=false,colorlinks]{hyperref}
@@ -18509,6 +22269,10 @@ There are two types of ordering: word ordering (which places
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass[a4paper]{article}
\usepackage[style=long4colheaderborder]{glossaries}
@@ -18548,9 +22312,15 @@ measured in kilograms.
%\iffalse
% \begin{macrocode}
% This file is public domain
-\documentclass{article}
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+\documentclass[a4paper]{article}
-\usepackage[acronym,smallcaps]{glossaries-accsupp}
+\usepackage[margin=0.5in]{geometry}
+\usepackage{booktabs}
+\usepackage[acronym]{glossaries-accsupp}
\makeglossaries
@@ -18560,16 +22330,28 @@ measured in kilograms.
\newacronym{eg}{e.g.}{for example}
-\begin{document}
-\gls{dr}~Jones.
-\gls{dr}~Jones.
+\newcommand*{\samplerow}[1]{%
+ \gls{#1} & \gls{#1} & \acrshort{#1} & \acrlong{#1}\\
+ \glsreset{#1}\Gls{#1} & \Gls{#1} & \Acrshort{#1} & \Acrlong{#1}\\
+ \glsreset{#1}\GLS{#1} & \GLS{#1} & \ACRshort{#1} & \ACRlong{#1}\\
+}
-\Gls{eg}, \gls{eg}, \acrshort{eg}, \acrlong{eg}, \acrfull{eg}.
+\begin{document}
-\Acrshort{eg}, \ACRshort{eg}. \Acrlong{eg}, \ACRlong{eg}.
-\Acrfull{eg}, \ACRfull{eg}.
+\begin{center}
+\begin{tabular}{lllll}
+\toprule
+\bfseries First & \bfseries Next & \bfseries Short & \bfseries Long
+\\\midrule
+\samplerow{dr}
+\midrule
+\samplerow{eg}
+\midrule
+\samplerow{svm}
+\bottomrule
+\end{tabular}
+\end{center}
-\gls{svm}. \gls{svm}, \acrshort{svm}, \acrlong{svm}, \acrfull{svm}.
\printglossaries
\end{document}
@@ -18588,6 +22370,11 @@ measured in kilograms.
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
\documentclass[a4paper]{report}
\usepackage[colorlinks,plainpages=false]{hyperref}
@@ -18683,6 +22470,11 @@ You don't need to worry about makeindex's special characters:
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
\documentclass[a4paper]{report}
\usepackage[colorlinks,plainpages=false]{hyperref}
@@ -18766,6 +22558,10 @@ one \gls[format=hyperbf]{svm}.
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{article}
\usepackage[acronym,footnote,acronymlists={main,acronym2}]{glossaries}
@@ -18815,6 +22611,10 @@ one \gls[format=hyperbf]{svm}.
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{article}
\usepackage[colorlinks,plainpages=false]{hyperref}
@@ -18851,13 +22651,18 @@ one \gls[format=hyperbf]{svm}.
% This file is public domain
%
% See also sampleAcrDesc.tex
+ %
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
\documentclass[a4paper]{report}
\usepackage[colorlinks,plainpages=false]{hyperref}
\usepackage[style=altlist, % use altlist style
- toc, % add the glossary to the table of contents
- sanitize={description=false}% don't sanitize description
+ toc % add the glossary to the table of contents
]{glossaries}
\makeglossaries
@@ -18866,10 +22671,8 @@ one \gls[format=hyperbf]{svm}.
% how the entry name should appear in the glossary
name={Support vector machine (SVM)},
% how the description should appear in the glossary
- % since I have used sanitize={description=false}
- % I have to protect fragile commands
description={Statistical pattern recognition
-technique~\protect\cite{svm}},
+technique~\cite{svm}},
% how the entry should appear in the document text
text={svm},
% how the entry should appear the first time it is
@@ -18935,7 +22738,7 @@ one \gls[format=hyperbf]{svm}.
\usepackage{amsmath}
\usepackage[colorlinks]{hyperref}
-\usepackage[toc,ucmark,style=long3colheader,counter=equation]{glossaries}
+\usepackage[xindy,toc,ucmark,style=long3colheader,counter=equation]{glossaries}
\makeglossaries
@@ -19199,6 +23002,13 @@ Bessel functions $Z_\nu$ are solutions of
% (Note that this problem is avoided if the page numbering is
% reset after the glossary. For example, if the glossary has
% roman numbering and the subsequent pages have arabic numbering)
+ %
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass[a4paper,12pt]{report}
\usepackage{amsmath}
@@ -19486,11 +23296,16 @@ Bessel functions $Z_\nu(z)$ are solutions of
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
\documentclass{report}
\usepackage[plainpages=false,colorlinks]{hyperref}
\usepackage{html}
-\usepackage[toc,savewrites,xindy]{glossaries}
+\usepackage[toc,xindy]{glossaries}
% Define a new glossary type called notation
\newglossary[nlg]{notation}{not}{ntn}{Notation}
@@ -19577,12 +23392,88 @@ The factorial symbol: \gls{not:fact}.
%\fi
%\iffalse
% \begin{macrocode}
+%<*samplePeople.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain
+ % If you are using arara, you need the following directives:
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
+\documentclass{report}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[toc]{glossaries}
+
+\makeglossaries
+
+\newcommand{\sortname}[2]{#2, #1}
+\newcommand{\textname}[2]{#1 #2}
+
+ % Syntax: \name{first name}{surname}
+ \let\name\textname
+
+\renewcommand{\glsprestandardsort}[3]{%
+ \let\name\sortname
+ \edef#1{\expandafter\expandonce\expandafter{#1}}%
+ \let\name\textname
+ \glsdosanitizesort
+}
+
+\newglossaryentry{joebloggs}{name={\name{Joe}{Bloggs}},description={\nopostdesc}}
+
+\newglossaryentry{johnsmith}{name={\name{John}{Smith}},description={\nopostdesc}}
+
+\newglossaryentry{zoeadams}{name={\name{Zo\'e}{Adams}},description={\nopostdesc}}
+
+\newglossaryentry{maryadams}{name={\name{Mary}{Adams}},description={\nopostdesc}}
+
+\begin{document}
+\tableofcontents
+
+\chapter{\glsentrytext{joebloggs}}
+
+\gls{joebloggs} was a fairly ordinary person.
+
+\chapter{\glsentrytext{johnsmith}}
+
+\gls{johnsmith} was great friends with \gls{joebloggs}.
+
+\chapter{\glsentrytext{maryadams}}
+
+\gls{maryadams} worked with \gls{johnsmith} but never met
+\gls{joebloggs}.
+
+\chapter{\glsentrytext{zoeadams}}
+
+\gls{zoeadams} was \gls{maryadams}['s] sister.
+\printglossaries
+
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</samplePeople.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*sampleSec.tex>
% \end{macrocode}
%\fi
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
\documentclass{report}
\usepackage[plainpages=false,colorlinks]{hyperref}
@@ -19650,12 +23541,132 @@ Another \gls{ident} entry.
%\fi
%\iffalse
% \begin{macrocode}
+%<*sampleSort.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ % arara: pdflatex: { synctex: on }
+\documentclass{report}
+
+\usepackage[plainpages=false,colorlinks]{hyperref}
+\usepackage[toc,acronym]{glossaries}
+
+ % Define a new glossary type called notation
+\newglossary[nlg]{notation}{not}{ntn}{Notation}
+
+\makeglossaries
+
+\newcounter{sortcount}
+
+\renewcommand{\glsprestandardsort}[3]{%
+ \ifdefstring{#2}{notation}%
+ {%
+ \stepcounter{sortcount}%
+ \edef#1{\glssortnumberfmt{\arabic{sortcount}}}%
+ }%
+ {%
+ \glsdosanitizesort
+ }%
+}
+
+ % Notation definitions
+
+\newglossaryentry{not:set}{type=notation, % glossary type
+name={$\mathcal{S}$},
+text={\mathcal{S}},
+description={A set}}
+
+\newglossaryentry{not:emptyset}{type=notation,
+name={$\emptyset$},
+text={\emptyset},
+description={The empty set}}
+
+\newglossaryentry{not:card}{type=notation,
+name={$|\mathcal{S}|$},
+text={|\mathcal{S}|},
+description={cardinality of $\mathcal{S}$}}
+
+ % Main glossary definitions
+
+\newglossaryentry{gls:set}{name=set,
+description={A collection of distinct objects}}
+
+\newglossaryentry{gls:card}{name=cardinality,
+description={The number of elements in the specified set}}
+
+ % Acronym definitions
+
+\newacronym{zfc}{ZFC}{Zermelo-Fraenkel set theory}
+
+\newacronym{ad}{AD}{axiom of determinacy}
+
+\newacronym{nf}{NF}{new foundations}
+
+\begin{document}
+\title{Sample Document using the glossaries Package}
+\author{Nicola Talbot}
+\pagenumbering{alph}
+\maketitle
+
+\begin{abstract}
+ %stop hyperref complaining about duplicate page identifiers:
+\pagenumbering{Alph}
+This is a sample document illustrating the use of the
+\textsf{glossaries} package. In this example, a new glossary type
+called \texttt{notation} is defined, so that the document can have a
+separate glossary of terms, list of acronyms and index of notation.
+\end{abstract}
+
+
+\pagenumbering{roman}
+\tableofcontents
+
+\printglossaries
+
+\chapter{Introduction}
+\pagenumbering{arabic}
+
+\Glspl{gls:set} are denoted by a calligraphic font
+e.g.\ $\gls{not:set}$.
+
+The \gls{gls:card} of a set $\mathcal{S}$ is denoted
+$\gls{not:card}$. The empty set is denoted
+$\gls{not:emptyset}$.
+
+Here are some acronyms: \gls{nf}, \gls{zfc} and \gls{ad}.
+
+\chapter{Another Chapter}
+
+Another mention of the empty set $\gls{not:emptyset}$.
+
+Here are the acronyms again: \gls{nf}, \gls{zfc} and \gls{ad}.
+
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sampleSort.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*sampletree.tex>
% \end{macrocode}
%\fi
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{report}
\usepackage[colorlinks]{hyperref}
@@ -19735,6 +23746,10 @@ The letter \gls{C} represents Euler's constant.
%\iffalse
% \begin{macrocode}
% This file is public domain
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{article}
\usepackage[utf8]{inputenc}
@@ -19743,9 +23758,9 @@ The letter \gls{C} represents Euler's constant.
\makeglossaries
-% Note that because the é is the first letter of the
-% name, it needs to be grouped or it will cause a
-% problem for \makefirstuc due to expansion issues.
+ % Note that because the é is the first letter of the
+ % name, it needs to be grouped or it will cause a
+ % problem for \makefirstuc due to expansion issues.
\newglossaryentry{elite}{name={{é}lite},
description={select group or class}}
@@ -19758,8 +23773,8 @@ description=large deer}
\newglossaryentry{mannerly}{name=mannerly,
description=polite}
-% The œ is not the first letter, so it doesn't need to
-% be grouped.
+ % The œ is not the first letter, so it doesn't need to
+ % be grouped.
\newglossaryentry{manoeuvre}{name={manœuvre},
description=planned and controlled movement}
@@ -19777,7 +23792,6 @@ description={canal from mouth to stomach}}
description=man-eating giant}
\begin{document}
-\null % ensure that the first run produces some output
\glsaddall
\printglossaries
@@ -20070,6 +24084,10 @@ This page discusses \gls{mcnemar} who introduced
%
% xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo
%
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{article}
\usepackage[utf8]{inputenc}
@@ -20332,6 +24350,10 @@ This page discusses \gls{mcnemar} who introduced
%
% This sample file won't work with makeindex
%
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
\documentclass{report}
\usepackage[utf8]{inputenc}
@@ -20372,6 +24394,7 @@ the glossaries package.
\part{First Part}
\chapter{Sample Chapter}
+This example document has an eccentric section numbering system.
\section{First Section}
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins
index d374e0f50cd..c337a6f6a95 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/7/5 21:47
+% glossaries.ins generated using makedtx version 1.1 2013/11/14 14:05
\input docstrip
\preamble
@@ -18,7 +18,7 @@
The Current Maintainer of this work is Nicola Talbot.
- This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-inline.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-mcols.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample-inline.tex, sample-langdict.tex, sample-mfirstuc.tex, sample-numberlist.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl, mfirstuc.perl.
+ This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, glossaries-prefix.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-inline.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-mcols.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-compatible-307.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample-entryfmt.tex, sample-FnDesc.tex, sample-index.tex, sample-inline.tex, sample-langdict.tex, sample-mfirstuc.tex, sample-newkeys.tex, sample-nomathhyper.tex, sample-numberlist.tex, sample-prefix.tex, sample-si.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, samplePeople.tex, sampleSec.tex, sampleSort.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl, mfirstuc.perl.
\endpreamble
@@ -26,6 +26,8 @@
\generate{\file{glossaries.sty}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries.sty,package}}
+\file{glossaries-prefix.sty}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-prefix.sty,package}}
\file{mfirstuc.sty}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{glossaries.dtx}{mfirstuc.sty,package}}
\file{glossary-hypernav.sty}{\usepreamble\defaultpreamble
@@ -48,6 +50,8 @@
\usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-tree.sty,package}}
\file{glossaries-compatible-207.sty}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-compatible-207.sty,package}}
+\file{glossaries-compatible-307.sty}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-compatible-307.sty,package}}
\file{glossaries-accsupp.sty}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-accsupp.sty,package}}
\file{glossaries-babel.sty}{\usepreamble\defaultpreamble
@@ -82,10 +86,17 @@
\file{sample-crossref.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-crossref.tex}}
\file{sample-custom-acronym.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-custom-acronym.tex}}
\file{sample-dual.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-dual.tex}}
+\file{sample-entryfmt.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-entryfmt.tex}}
+\file{sample-FnDesc.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-FnDesc.tex}}
+\file{sample-index.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-index.tex}}
\file{sample-inline.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-inline.tex}}
\file{sample-langdict.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-langdict.tex}}
\file{sample-mfirstuc.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-mfirstuc.tex}}
+\file{sample-newkeys.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-newkeys.tex}}
+\file{sample-nomathhyper.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-nomathhyper.tex}}
\file{sample-numberlist.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-numberlist.tex}}
+\file{sample-prefix.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-prefix.tex}}
+\file{sample-si.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-si.tex}}
\file{sample.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample.tex}}
\file{sample4col.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample4col.tex}}
\file{sampleaccsupp.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleaccsupp.tex}}
@@ -97,7 +108,9 @@
\file{sampleEq.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleEq.tex}}
\file{sampleEqPg.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleEqPg.tex}}
\file{sampleNtn.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleNtn.tex}}
+\file{samplePeople.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{samplePeople.tex}}
\file{sampleSec.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleSec.tex}}
+\file{sampleSort.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleSort.tex}}
\file{sampletree.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampletree.tex}}
\file{sampleutf8.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleutf8.tex}}
\file{samplexdy-compatible207.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy-compatible207.tex}}