summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/glossaries
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-11-13 16:23:27 +0000
committerKarl Berry <karl@freefriends.org>2009-11-13 16:23:27 +0000
commit6cc2c89243924fb671f0ad637ed718b99933fbde (patch)
tree6a827d14bb8c3089e7525b43a81c2510167848fb /Master/texmf-dist/source/latex/glossaries
parent9f6934cabc90af62c40c7ed913cf91f6a9c6f61a (diff)
glossaries 2.4 (10nov09)
git-svn-id: svn://tug.org/texlive/trunk@16008 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/glossaries')
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.dtx4452
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.ins7
2 files changed, 3589 insertions, 870 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
index 3eb92b44564..748fe82c28c 100644
--- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
+++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
@@ -9,6 +9,7 @@
% -src "(glossary-.+)\.(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"
% -src "(glossaries-dictionary-.+)\.(dict)\Z=>\1.\2"
% -src "(minimalgls\.tex)\Z=>\1"
% -src "(sample.*\.tex)\Z=>\1"
@@ -26,7 +27,7 @@
% -doc "glossaries-manual.tex"
% -codetitle "Glossaries Documented Code"
% glossaries
-% Created on 2009/9/24 16:55
+% Created on 2009/11/10 12:57
%\fi
%\iffalse
%<*package>
@@ -73,6 +74,7 @@
%have active links, but at least it will keep makeindex happy.
+\usepackage{xcolor}
\usepackage{dox}
\doxitem{Option}{option}{package options}
\doxitem{GlsKey}{key}{glossary keys}
@@ -86,7 +88,7 @@
\makeatother
\RecordChanges
\PageIndex
-\CheckSum{8767}
+\CheckSum{10923}
\CodelineNumbered
\newcommand*{\termdef}[1]{\emph{#1}\iterm{#1}}
\newcommand*{\term}[1]{#1\iterm{#1}}
@@ -108,6 +110,29 @@
\fcolorbox{red}{white}{\usebox{\importantbox}}\par\vskip10pt}
\newcommand*{\tick}{\ding{51}}
+\definecolor{defbackground}{rgb}{0.8,1,1}
+
+\newsavebox\defsbox
+\newlength\defwidth
+\newenvironment{definition}[1][]{%
+\def\defarg{#1}%
+\setlength{\fboxsep}{4pt}\setlength{\fboxrule}{1.25pt}%
+\begin{lrbox}{\defsbox}%
+\setlength\defwidth\linewidth
+\addtolength\defwidth{-2\fboxrule}%
+\addtolength\defwidth{-2\fboxsep}%
+\begin{minipage}{\defwidth}\flushleft
+}{%
+\end{minipage}
+\end{lrbox}%
+\vskip10pt
+\noindent
+\defarg\fcolorbox{black}{defbackground}{\usebox\defsbox}%
+\vskip10pt
+\noindent
+\ignorespacesafterend
+}
+
\makeatletter
\renewenvironment{theindex}{\twocolumn[\index@prologue]
@@ -155,7 +180,7 @@
%\MakeShortVerb{"}
%\DeleteShortVerb{\|}
%
-% \title{glossaries.sty v 2.03: \LaTeXe\ Package to Assist Generating Glossaries}
+% \title{glossaries.sty v 2.04: \LaTeXe\ Package to Assist Generating Glossaries}
% \author{Nicola L.C. Talbot\\[10pt]
%School of Computing Sciences\\
%University of East Anglia\\
@@ -163,7 +188,7 @@
%NR4 7TJ. United Kingdom.\\
%\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
%
-% \date{23rd September 2009}
+% \date{10 November 2009}
% \maketitle
%\tableofcontents
%
@@ -604,10 +629,10 @@
%limited multi-lingual support, thanks to all the people who have sent
%me the relevant translations either via email or via
%\texttt{comp.text.tex}.
-%However you must load \isty{babel} \emph{before}
+%However you must load \isty{babel} or \isty{polyglossia} \emph{before}
%\sty{glossaries} to enable this. Note that if \isty{babel} is loaded
%and the \isty{translator} package is detected on \TeX's path, then the
-%\isty{translator} package will be loaded automatically. However,
+%\isty{translator} package will be loaded automatically. However,
%it may not pick up on the required languages so, if the predefined
%text is not translated, you may need to explicitly load the
%\isty{translator} package with the required languages. For example:
@@ -692,14 +717,20 @@
%the \isty{babel} package and do not have the \isty{translator} package
%installed, you need to be familiar with the
% advice given in \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords}.
-%If you have the \isty{translator} package installed, then you
-%can change the translations using \cs{deftranslation}. See the
-%\isty{translator} documentation for further details.
-%
-%If you don't want to use the \isty{translator} interface, you
-%can suppress it using the package option \pkgopt[false]{translate},
-%and either load \isty{glossaries-babel} after \sty{glossaries}
-%or specify you're own translations. For example:
+%If you have the \isty{translator} package installed, then you can
+%provide your own dictionary with the necessary modifications
+%(using \cs{deftranslation}) and load it using
+%\cs{usedictionary}. Note that the dictionaries are loaded at the
+%beginning of the document, so it won't have any effect if you
+%put \cs{deftranslation} in the preamble. It should be put in your
+%personal dictionary instead. See the \isty{translator}
+%documentation for further details.
+%
+%If you are using \isty{babel} and don't want to use the
+%\isty{translator} interface, you can suppress it using the package
+%option \pkgopt[false]{translate}, and either load
+%\isty{glossaries-babel} after \sty{glossaries} or specify you're own
+%translations. For example:
%\begin{verbatim}
%\documentclass[british]{article}
%
@@ -726,6 +757,10 @@
%}
%\end{verbatim}
%
+%If you are using \isty{polyglossia} instead of \isty{babel},
+%\isty{glossaries-polyglossia} will automatically be loaded unless
+%you specify the package option \pkgopt[false]{translate}.
+%
%Note that \appname{xindy} provides much better multi-lingual
%support than \appname{makeindex}, so it's recommended that you
%use \appname{xindy} if you have glossary entries that contain
@@ -1231,6 +1266,22 @@
%the glossary whose label is given by \ics{acronymtype}, unless
%another glossary is explicitly specified.
%
+%\item[\pkgopt{acronymlists}] By default, only the \texttt{acronym}
+%glossary is considered to be a list of acronyms. If you have other
+%lists of acronyms, you can specify them as a comma-separated list
+%in the value of \pkgopt{acronymlists}. For example, if you want
+%the \texttt{main} glossary to also contain a list of acronyms, you
+%can do:
+%\begin{verbatim}
+%\usepackage[acronym,acronymlists={main}]{glossaries}
+%\end{verbatim}
+%No check is performed to determine if the listed glossaries exist,
+%so you can add glossaries you haven't defined yet. For example:
+%\begin{verbatim}
+%\usepackage[acronym,acronymlists={main,acronym2}]{glossaries}
+%\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms}
+%\end{verbatim}
+%
%\item[\pkgopt{section}] This is a \meta{key}=\meta{value} option. Its
%value should be the name of a sectional unit (e.g.\ chapter).
%This will make the glossaries appear in the named sectional unit,
@@ -1248,12 +1299,16 @@
%\begin{verbatim}
%\usepackage[section=section]{glossaries}
%\end{verbatim}
-%You can change this value later in the document using\\[10pt]
-%\DescribeMacro{\setglossarysection}\cs{setglossarysection}\marg{name}\\[10pt]
+%You can change this value later in the document using
+%\begin{definition}[\DescribeMacro{\setglossarysection}]
+%\cs{setglossarysection}\marg{name}
+%\end{definition}
%where \meta{name} is the sectional unit.
%
%The start of each glossary adds information to the page header via
-%\DescribeMacro{\glossarymark}\cs{glossarymark}\marg{glossary title}.
+%\begin{definition}[\DescribeMacro{\glossarymark}]
+%\cs{glossarymark}\marg{glossary title}
+%\end{definition}
%This defaults to \cs{@mkboth}, but you may need to redefine it.
%For example, to only change the right header:
%\begin{verbatim}
@@ -1264,11 +1319,10 @@
%\renewcommand{\glossarymark}[1]{}
%\end{verbatim}
%
-%Note that if you are using the \isty{hyperref} package and the
-%glossaries are put in chapters, you may need to redefine
-%\ics{glsclearpage} to do \ics{clearpage} instead of
-%\cs{cleardoublepage} to prevent an unwanted blank page appearing
-%before the glossary:
+%Occasionally you may find that another package defines
+%\cs{cleardoublepage} when it is not required. This may cause an
+%unwanted blank page to appear before each glossary. This can
+%be fixed by redefining \ics{glsclearpage}:
%\begin{verbatim}
%\renewcommand*{\glsclearpage}{\clearpage}
%\end{verbatim}
@@ -1308,7 +1362,10 @@
%\end{verbatim}
%
%As from version 1.14, you can add a prefix to the label by
-%redefining \DescribeMacro{\glsautoprefix}\cs{glsautoprefix}.
+%redefining
+%\begin{definition}[\DescribeMacro{\glsautoprefix}]
+%\cs{glsautoprefix}
+%\end{definition}
%For example:
%\begin{verbatim}
%\renewcommand*{\glsautoprefix}{glo:}
@@ -1461,22 +1518,27 @@
%don't use \appname{makeglossaries}.
%
%\item[\pkgopt{translate}] This is a boolean option. The default is
-%\pkgoptval{true}{translate} if \isty{babel} or \isty{translator}
-%have been loaded, otherwise the default value is
+%\pkgoptval{true}{translate} if \isty{babel}, \isty{polyglossia} or
+%\isty{translator} have been loaded, otherwise the default value is
%\pkgoptval{false}{translate}.
%
% \begin{description}
-% \item[{\pkgopt[true]{translate}}] If the \isty{translator} package
-% is installed, it will be loaded and the translations will be
-% provided by the \isty{translator} package interface. If the
-% \isty{translator} package isn't installed, the
-% \isty{glossaries-babel} package will be loaded and the translations
-% will be provided using \sty{babel}'s
-% \cs{addto}\cs{caption}\meta{language} mechanism.
+% \item[{\pkgopt[true]{translate}}] If \isty{babel} has been loaded
+% and the \isty{translator} package is installed, \isty{translator}
+% will be loaded and the translations will be provided by the
+% \isty{translator} package interface. You can modify the
+% translations by providing your own dictionary. If the
+% \isty{translator} package isn't installed and \isty{babel} is
+% loaded, the \isty{glossaries-babel} package will
+% be loaded and the translations will be provided using \sty{babel}'s
+% \cs{addto}\cs{caption}\meta{language} mechanism. If
+% \isty{polyglossia} has been loaded, \isty{glossaries-polyglossia}
+% will be loaded.
%
% \item[{\pkgopt[false]{translate}}] Don't provide translations, even
-% if \isty{babel} has been loaded. You can then provide you're
-% own translations or explicitly load \isty{glossaries-babel}.
+% if \isty{babel} or \isty{polyglossia} has been loaded. You can
+% then provide you're own translations or explicitly load
+% \isty{glossaries-babel} or \isty{glossaries-polyglossia}.
% \end{description}
%
%\item[\pkgopt{hyperfirst}] This is a boolean option that specifies
@@ -1532,9 +1594,10 @@
%The default name for the customised style file is given by
%\ics{jobname}\filetype{.ist} (for \appname{makeindex}) or
%\ics{jobname}\filetype{.xdy} (for \appname{xindy}). This name may be
-%changed using:\\[10pt]
-%\DescribeMacro{\setStyleFile}
-%\cs{setStyleFile}\marg{name}\\[10pt]
+%changed using:
+%\begin{definition}[\DescribeMacro{\setStyleFile}]
+%\cs{setStyleFile}\marg{name}
+%\end{definition}
%where \meta{name} is the name of the style file without the
%extension. Note that this command must be used before
%\cs{makeglossaries}.
@@ -1545,8 +1608,10 @@
%using the \pkgopt{counter} package option. The default form of
%the location number assumes a full stop compositor (e.g.\ 1.2),
%but if your location numbers use a different compositor (e.g. 1-2)
-%you need to set this using\\[10pt]
-%\DescribeMacro{\glsSetCompositor}\cs{glsSetCompositor}\marg{symbol}\\[10pt]
+%you need to set this using
+%\begin{definition}[\DescribeMacro{\glsSetCompositor}]
+%\cs{glsSetCompositor}\marg{symbol}
+%\end{definition}
%For example:
%\begin{verbatim}
%\glsSetCompositor{-}
@@ -1555,8 +1620,10 @@
%
%If you use \appname{xindy}, you can have a different compositor
%for page numbers starting with an uppercase alphabetical
-%character using:\\[10pt]
-%\DescribeMacro{\glsSetAlphaCompositor}\cs{glsSetAlphaCompositor}\marg{symbol}\\[10pt]
+%character using:
+%\begin{definition}[\DescribeMacro{\glsSetAlphaCompositor}]
+%\cs{glsSetAlphaCompositor}\marg{symbol}
+%\end{definition}
%Note that this command has no effect if you haven't used the
%\pkgopt{xindy} package option. For example, if you want
%number lists\iterm{number list} containing a mixture of A-1 and 2.3
@@ -1568,9 +1635,11 @@
%See \autoref{sec:numberlists} for
%further information about number lists\iterm{number list}.
%
-%\DescribeMacro{\newglossaryentry}
-%New glossary entries are defined using the command:\\[10pt]
-%\cs{newglossaryentry}\marg{label}\marg{key-val list}\\[10pt] The first
+%New glossary entries are defined using the command:
+%\begin{definition}[\DescribeMacro{\newglossaryentry}]
+%\cs{newglossaryentry}\marg{label}\marg{key-val list}
+%\end{definition}
+%The first
%argument, \meta{label}, must be a unique label with which to identify
%this entry. The second argument, \meta{key-val list}, is a
%\meta{key}=\meta{value} list that supplies the relevant information
@@ -1655,6 +1724,11 @@
%\texttt{acronym}, depending on whether the \pkgopt{acronym} package
%option was used.
%
+%\item[{\gloskey{user1}, \ldots, \gloskey{user6}}] Six additional
+%keys provided for any additional information the user may want
+%to specify. (For example, an associated dimension or an alternative
+%plural.)
+%
%\item[{\gloskey{nonumberlist}}] Suppress the \term{number list} for
%this entry.
%
@@ -1710,18 +1784,21 @@
%
%If you are writing in a language that supports
%multiple plurals (for a given term) then use the \gloskey{plural} key
-%for one of them (typically the one you are most likely to use) and
-%for the others you will need to explicitly write the plural form using
-%\ics{glslink} or \ics{glsdisp} rather than using \cs{glspl}. Returning to the cow
-%example above, suppose you will mostly be using \dq{cows} as the
-%plural, but occasionally you want to use \dq{kine} as the plural,
-%then define the term as
+%for one of them and one of the user keys to specify the
+%other plural form. For example:
%\begin{verbatim}
%\newglossaryentry{cow}{name=cow,description={a fully grown
-%female of any bovine animal (plural cows, archaic plural kine)}}
+%female of any bovine animal (plural cows, archaic plural kine)},
+%user1={kine}}
+%\end{verbatim}
+%You can then use \verb|\glspl{cow}| to produce \dq{cows} and
+%\verb|\glsuseri{cow}| to produce \dq{kine}. You can, of course,
+%define an easy to remember synonym. For example:
+%\begin{verbatim}
+%\let\glsaltpl\glsuseri
%\end{verbatim}
-%and use \verb|\glspl{cow}| to produce \dq{cows} and use
-%\verb|\glslink{cow}{kine}| to produce \dq{kine}.
+%Then you don't have to remember which key you used to store the
+%alternative plural.
%
%If you are using a language that usually forms plurals
%by appending a different letter, or sequence of letters, you can
@@ -1837,10 +1914,11 @@
%\subsubsection{Loading Entries From a File}
%\label{sec:loadglsentries}
%
-%\DescribeMacro{\loadglsentries}
%You can store all your glossary entry definitions in another
-%file and use:\\[10pt]
-%\cs{loadglsentries}\oarg{type}\marg{filename}\\[10pt]
+%file and use:
+%\begin{definition}[\DescribeMacro{\loadglsentries}]
+%\cs{loadglsentries}\oarg{type}\marg{filename}
+%\end{definition}
%where \meta{filename} is the name of the file containing all the
%\cs{newglossaryentry} commands. The optional argument
%\meta{type} is the name of the glossary to which those entries
@@ -1928,9 +2006,13 @@
%\end{important}
%
%With both \appname{makeindex} and \appname{xindy}, you can replace
-%the separator and the closing number in the range using:\\[10pt]
-%\DescribeMacro{\glsSetSuffixF}\cs{glsSetSuffixF}\marg{suffix}\\
-%\DescribeMacro{\glsSetSuffixFF}\cs{glsSetSuffixFF}\marg{suffix}\\[10pt]
+%the separator and the closing number in the range using:
+%\begin{definition}[\DescribeMacro{\glsSetSuffixF}]
+%\cs{glsSetSuffixF}\marg{suffix}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsSetSuffixFF}]
+%\cs{glsSetSuffixFF}\marg{suffix}
+%\end{definition}
%where the former command specifies the suffix to use for a 2 page
%list and the latter specifies the suffix to use for longer lists.
%For example:
@@ -1993,7 +2075,10 @@
%\end{verbatim}
%
%The way the \term{link text} is displayed
-%depends on \DescribeMacro{\glstextformat}\cs{glstextformat}\marg{text}.
+%depends on
+%\begin{definition}[\DescribeMacro{\glstextformat}]
+%\cs{glstextformat}\marg{text}
+%\end{definition}
%For example, to make all \term{link text} appear in a sans-serif
%font, do:
%\begin{verbatim}
@@ -2007,9 +2092,10 @@
%entry can be used without affecting the \firstuseflag\ (for example,
%when used with \cs{glslink}). See \autoref{sec:glsunset} for commands that unset or reset this conditional.
%
-%\DescribeMacro{\glslink}
-%The command:\\[10pt]
-%\cs{glslink}\oarg{options}\marg{label}\marg{text}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\glslink}]
+%\cs{glslink}\oarg{options}\marg{label}\marg{text}
+%\end{definition}
%will place \cs{glstextformat}\marg{text} in the document at that
%point and add a line into the associated glossary file for the
%glossary entry given by \meta{label}. If hyperlinks are supported,
@@ -2115,17 +2201,19 @@
%value is \texttt{hyper=true}.
%
%\end{description}
-%\DescribeMacro{\glslink*}
-%There is also a starred version:\\[10pt]
-%\cs{glslink*}\oarg{options}\marg{label}\marg{text}\\[10pt]
+%There is also a starred version:
+%\begin{definition}[\DescribeMacro{\glslink*}]
+%\cs{glslink*}\oarg{options}\marg{label}\marg{text}
+%\end{definition}
%which is equivalent to \cs{glslink}, except it sets
%\texttt{hyper=false}. Similarly, all the following commands
%described in this section also have a starred version that disables
%the hyperlink.
%
-%\DescribeMacro{\gls}
-%The command:\\[10pt]
-%\cs{gls}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\gls}]
+%\cs{gls}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%is the same as \cs{glslink}, except that the \term{link text}
%is determined from the values of the \gloskey{text} and
%\gloskey{first} keys supplied when the entry was defined using
@@ -2135,12 +2223,14 @@
%On completion, \cs{gls} will mark the entry's first use flag\ifirstuseflag\ as
%used.
%
-%There are two uppercase variants:\\[10pt]
-%\DescribeMacro{\Gls}
-%\cs{Gls}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
-%and\\[10pt]
-%\DescribeMacro{\GLS}
-%\cs{GLS}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%There are two uppercase variants:
+%\begin{definition}[\DescribeMacro{\Gls}]
+%\cs{Gls}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%and
+%\begin{definition}[\DescribeMacro{\GLS}]
+%\cs{GLS}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%which make the first letter of the link text or all the link text
%uppercase, respectively.
%
@@ -2154,13 +2244,16 @@
%argument to \ics{glslink}. As with \cs{glslink}, these commands also
%have a starred version that disable the hyperlink.
%
-%There are also analogous plural forms:\\[10pt]
-%\DescribeMacro{\glspl}
-%\cs{glspl}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
-%\DescribeMacro{\Glspl}
-%\cs{Glspl}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
-%\DescribeMacro{\GLSpl}
-%\cs{GLSpl}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%There are also analogous plural forms:
+%\begin{definition}[\DescribeMacro{\glspl}]
+%\cs{glspl}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glspl}]
+%\cs{Glspl}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSpl}]
+%\cs{GLSpl}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%These determine the link text from the \gloskey{plural} and
%\gloskey{firstplural} keys supplied when the entry was first
%defined. As before, these commands also have
@@ -2168,17 +2261,20 @@
%
%Note that \cs{glslink} doesn't use or affect the \firstuseflag,
%nor does it use \ics{glsdisplay} or \ics{glsdisplayfirst} (see
-%\autoref{sec:glsdisplay}). Instead, you can use:\\[10pt]
-%\DescribeMacro{\glsdisp}
-%\cs{glsdisp}\oarg{options}\marg{label}\marg{link text}\\[10pt]
+%\autoref{sec:glsdisplay}). Instead, you can use:
+%\begin{definition}[\DescribeMacro{\glsdisp}]
+%\cs{glsdisp}\oarg{options}\marg{label}\marg{link text}
+%\end{definition}
%This behaves in the same way as \cs{gls}, except that it uses
%\meta{link text} instead of the value of the \gloskey{first}
%or \gloskey{text} key. (Note that this command always sets
%\meta{insert} to nothing.) This command affects the \firstuseflag,
%and uses \ics{glsdisplay} or \ics{glsdisplayfirst}.
%
-%\DescribeMacro{\glstext}The command:\\[10pt]
-%\cs{glstext}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\glstext}]
+%\cs{glstext}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%is similar to \ics{gls} except that it always uses the value
%of the \gloskey{text} key and does not affect the
%\firstuseflag.
@@ -2187,61 +2283,77 @@
%use \ics{glsdisplay} or \ics{glsdisplayfirst}. (The same is
%true for all the following commands described in this section.)
%
-%There are also analogous commands:\\[10pt]
-%\DescribeMacro{\Glstext}
-%\cs{Glstext}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
-%\DescribeMacro{\GLStext}
-%\cs{GLStext}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
+%There are also analogous commands:
+%\begin{definition}[\DescribeMacro{\Glstext}]
+%\cs{Glstext}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLStext}]
+%\cs{GLStext}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
%As before, these commands also have a starred version that disable
%the hyperlink.
%
-%\DescribeMacro{\glsfirst}The command:\\[10pt]
-%\cs{glsfirst}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\glsfirst}]
+%\cs{glsfirst}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%is similar to \ics{glstext} except that it always uses the value
%of the \gloskey{first} key. Again, \meta{insert} is always appended
%to the end of the link text and does not affect the
%\firstuseflag.
%
-%There are also analogous commands:\\[10pt]
-%\DescribeMacro{\Glsfirst}
-%\cs{Glsfirst}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
-%\DescribeMacro{\GLSfirst}
-%\cs{GLSfirst}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
+%There are also analogous commands:
+%\begin{definition}[\DescribeMacro{\Glsfirst}]
+%\cs{Glsfirst}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSfirst}]
+%\cs{GLSfirst}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
%As before, these commands also have a starred version that disable
%the hyperlink.
%
-%\DescribeMacro{\glsplural}The command:\\[10pt]
-%\cs{glsplural}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\glsplural}]
+%\cs{glsplural}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%is similar to \ics{glstext} except that it always uses the value
%of the \gloskey{plural} key. Again, \meta{insert} is always appended
%to the end of the link text and does not mark the entry as having
%been used.
%
-%There are also analogous commands:\\[10pt]
-%\DescribeMacro{\Glsplural}
-%\cs{Glsplural}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
-%\DescribeMacro{\GLSplural}
-%\cs{GLSplural}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
+%There are also analogous commands:
+%\begin{definition}[\DescribeMacro{\Glsplural}]
+%\cs{Glsplural}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSplural}]
+%\cs{GLSplural}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
%As before, these commands also have a starred version that disable
%the hyperlink.
%
-%\DescribeMacro{\glsfirstplural}The command:\\[10pt]
-%\cs{glsfirstplural}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\glsfirstplural}]
+%\cs{glsfirstplural}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%is similar to \ics{glstext} except that it always uses the value
%of the \gloskey{firstplural} key. Again, \meta{insert} is always
%appended to the end of the link text and does not mark the entry as
%having been used.
%
-%There are also analogous commands:\\[10pt]
-%\DescribeMacro{\Glsfirstplural}
-%\cs{Glsfirstplural}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
-%\DescribeMacro{\GLSfirstplural}
-%\cs{GLSfirstplural}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
+%There are also analogous commands:
+%\begin{definition}[\DescribeMacro{\Glsfirstplural}]
+%\cs{Glsfirstplural}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSfirstplural}]
+%\cs{GLSfirstplural}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
%As before, these commands also have a starred version that disable
%the hyperlink.
%
-%\DescribeMacro{\glsname}The command:\\[10pt]
-%\cs{glsname}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\glsname}]
+%\cs{glsname}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%is similar to \ics{glstext} except that it always uses the value of the
%\gloskey{name} key. Again, \meta{insert} is always appended to the end
%of the link text and does not mark the entry as having
@@ -2249,16 +2361,20 @@
%\gloskey{name} key contains commands, you will have to disable the
%\hyperlink{sanitize}{sanitization} of the \gloskey{name} key and protect fragile commands.
%
-%There are also analogous commands:\\[10pt]
-%\DescribeMacro{\Glsname}
-%\cs{Glsname}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
-%\DescribeMacro{\GLSname}
-%\cs{GLSname}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
+%There are also analogous commands:
+%\begin{definition}[\DescribeMacro{\Glsname}]
+%\cs{Glsname}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSname}]
+%\cs{GLSname}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
%As before, these commands also have a starred version that disable
%the hyperlink.
%
-%\DescribeMacro{\glssymbol}The command:\\[10pt]
-%\cs{glssymbol}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\glssymbol}]
+%\cs{glssymbol}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%is similar to \ics{glstext} except that it always uses the value of the
%\gloskey{symbol} key. Again, \meta{insert} is always appended to the
%end of the link text and does not mark the entry as having
@@ -2266,16 +2382,20 @@
%\gloskey{symbol} key contains commands, you will have to disable the
%\hyperlink{sanitize}{sanitization} of the \gloskey{symbol} key and protect fragile commands.
%
-%There are also analogous commands:\\[10pt]
-%\DescribeMacro{\Glssymbol}
-%\cs{Glssymbol}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
-%\DescribeMacro{\GLSsymbol}
-%\cs{GLSsymbol}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
+%There are also analogous commands:
+%\begin{definition}[\DescribeMacro{\Glssymbol}]
+%\cs{Glssymbol}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSsymbol}]
+%\cs{GLSsymbol}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
%As before, these commands also have a starred version that disable
%the hyperlink.
%
-%\DescribeMacro{\glsdesc}The command:\\[10pt]
-%\cs{glsdesc}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%The command:
+%\begin{definition}[\DescribeMacro{\glsdesc}]
+%\cs{glsdesc}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%is similar to \ics{glstext} except that it always uses the value
%of the \gloskey{description} key. Again, \meta{insert} is always
%appended to the end of the link text and does not mark the entry as
@@ -2284,23 +2404,95 @@
%have to disable the
%\hyperlink{sanitize}{sanitization} of the \gloskey{description} key and protect fragile commands.
%
-%There are also analogous commands:\\[10pt]
-%\DescribeMacro{\Glsdesc}
-%\cs{Glsdesc}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
-%\DescribeMacro{\GLSdesc}
-%\cs{GLSdesc}\oarg{options}\marg{text}\oarg{insert}\\[10pt]
+%There are also analogous commands:
+%\begin{definition}[\DescribeMacro{\Glsdesc}]
+%\cs{Glsdesc}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSdesc}]
+%\cs{GLSdesc}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
%As before, these commands also have a starred version that disable
%the hyperlink.
%
+%The command:
+%\begin{definition}[\DescribeMacro{\glsuseri}]
+%\cs{glsuseri}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%is similar to \ics{glstext} except that it always uses the value
+%of the \gloskey{user1} key. Again, \meta{insert} is always
+%appended to the end of the link text and does not mark the entry as
+%having been used.
+%
+%There are also analogous commands:
+%\begin{definition}[\DescribeMacro{\Glsuseri}]
+%\cs{Glsuseri}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSuseri}]
+%\cs{GLSuseri}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%As before, these commands also have a starred version that disable
+%the hyperlink. Similarly for the other user keys:
+%\begin{definition}[\DescribeMacro{\glsuserii}]
+%\cs{glsuserii}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsuserii}]
+%\cs{Glsuserii}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSuserii}]
+%\cs{GLSuserii}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsuseriii}]
+%\cs{glsuseriii}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsuseriii}]
+%\cs{Glsuseriii}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSuseriii}]
+%\cs{GLSuseriii}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsuseriv}]
+%\cs{glsuseriv}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsuseriv}]
+%\cs{Glsuseriv}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSuseriv}]
+%\cs{GLSuseriv}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsuserv}]
+%\cs{glsuserv}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsuserv}]
+%\cs{Glsuserv}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSuserv}]
+%\cs{GLSuserv}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsuservi}]
+%\cs{glsuservi}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsuservi}]
+%\cs{Glsuservi}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\GLSuservi}]
+%\cs{GLSuservi}\oarg{options}\marg{text}\oarg{insert}
+%\end{definition}
+%
%
%\subsubsection{Changing the format of the link text}
%\label{sec:glsdisplay}
%
%The format of the \term{link text} for \ics{gls}, \ics{glspl}
%and their uppercase variants is governed by two commands:
-%\DescribeMacro{\glsdisplayfirst}\cs{glsdisplayfirst}, which is used the
+%\begin{definition}[\DescribeMacro{\glsdisplayfirst}]
+%\cs{glsdisplayfirst}
+%\end{definition}
+%which is used the
%first time a glossary entry is used\ifirstuse\ in the text and
-%\DescribeMacro{\glsdisplay}\cs{glsdisplay}, which is used subsequently.
+%\begin{definition}[\DescribeMacro{\glsdisplay}]
+%\cs{glsdisplay}
+%\end{definition}
+%which is used subsequently.
%Both commands take four arguments: the first is either the singular or
%plural form given by the \gloskey{text}, \gloskey{plural},
%\gloskey{first} or \gloskey{firstplural} keys (set when the term was
@@ -2359,10 +2551,14 @@
%glossaries appear when using the commands \ics{gls}, \ics{glspl}, their
%uppercase variants and \ics{glsdisp}. If you only
%want the change to affect entries for a given glossary, then you need
-%to use\\[10pt]
-%\DescribeMacro{\defglsdisplay}\cs{defglsdisplay}\oarg{type}\marg{definition}\\[10pt]
-%and\\[10pt]
-%\DescribeMacro{\defglsdisplayfirst}\cs{defglsdisplayfirst}\oarg{type}\marg{definition}\\[10pt]
+%to use
+%\begin{definition}[\DescribeMacro{\defglsdisplay}]
+%\cs{defglsdisplay}\oarg{type}\marg{definition}
+%\end{definition}
+%and
+%\begin{definition}[\DescribeMacro{\defglsdisplayfirst}]
+%\cs{defglsdisplayfirst}\oarg{type}\marg{definition}
+%\end{definition}
%instead of redefining \cs{glsdisplay} and \cs{glsdisplayfirst}.
%
%Both \cs{defglsdisplay} and \cs{defglsdisplayfirst} take two arguments:
@@ -2403,10 +2599,14 @@
%loading the \sty{glossaries} package, commands such as \ics{glslink}
%and \ics{gls}, described above, will automatically have hyperlinks
%to the relevant glossary entry, unless the \gloskey[glslink]{hyper}
-%option has been set to \texttt{false}. You can disable or enable links using:\\[10pt]
-%\DescribeMacro{\glsdisablehyper}\cs{glsdisablehyper}\\[10pt]
-%and\\[10pt]
-%\DescribeMacro{\glsenablehyper}\cs{glsenablehyper}\\[10pt]
+%option has been set to \texttt{false}. You can disable or enable links using:
+%\begin{definition}[\DescribeMacro{\glsdisablehyper}]
+%\cs{glsdisablehyper}
+%\end{definition}
+%and
+%\begin{definition}[\DescribeMacro{\glsenablehyper}]
+%\cs{glsenablehyper}
+%\end{definition}
%respectively. The effect can be localised by placing the commands
%within a group. Note that you should only use \cs{glsenablehyper}
%if the commands \ics{hyperlink} and \ics{hypertarget} have been
@@ -2420,10 +2620,11 @@
%\subsection{Adding an Entry to the Glossary Without Generating Text}
%\label{sec:glsadd}
%
-%\DescribeMacro{\glsadd}
%It is possible to add a line in the glossary file without
-%generating any text at that point in the document using:\\[10pt]
-%\cs{glsadd}\oarg{options}\marg{label}\\[10pt]
+%generating any text at that point in the document using:
+%\begin{definition}[\DescribeMacro{\glsadd}]
+%\cs{glsadd}\oarg{options}\marg{label}
+%\end{definition}
%This is similar to \ics{glslink}, only it doesn't produce
%any text (so therefore, there is no \gloskey[glslink]{hyper} key
%available in \meta{options} but all the other options that can
@@ -2436,9 +2637,10 @@
%\glsadd[format=)]{set}
%\end{verbatim}
%
-%\DescribeMacro{\glsaddall}
-%To add all entries that have been defined, use:\\[10pt]
-%\cs{glsaddall}\oarg{options}\\[10pt]
+%To add all entries that have been defined, use:
+%\begin{definition}[\DescribeMacro{\glsaddall}]
+%\cs{glsaddall}\oarg{options}
+%\end{definition}
%The optional argument is the same as for \cs{glsadd}, except
%there is also a key \gloskey[glsaddall]{types} which can be
%used to specify which glossaries to use. This should be a
@@ -2498,8 +2700,10 @@
%see=[see also]{TaylorsTheorem}}
%\end{verbatim}
%
-%\item After you have defined the entry, use\\[10pt]
-%\DescribeMacro{\glssee}\cs{glssee}\oarg{tag}\marg{label}\marg{xr label list}\\[10pt]
+%\item After you have defined the entry, use
+%\begin{definition}[\DescribeMacro{\glssee}]
+%\cs{glssee}\oarg{tag}\marg{label}\marg{xr label list}
+%\end{definition}
%where \meta{xr label list} is a comma-separated list of entry
%labels to be cross-referenced, \meta{label} is the label of the
%entry doing the cross-referencing and \meta{tag} is the \dq{see} tag.
@@ -2525,60 +2729,126 @@
%\cs{glstextformat}, they don't have any optional arguments,
%they don't affect the \firstuseflag\ and, apart from \ics{glshyperlink}, they don't produce
%hyperlinks.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentryname}\cs{glsentryname}\marg{label}\\
-%\DescribeMacro{\Glsentryname}\cs{Glsentryname}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentryname}]
+%\cs{glsentryname}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryname}]
+%\cs{Glsentryname}\marg{label}
+%\end{definition}
%These commands display the name of the glossary entry given by
%\meta{label}, as specified by the \gloskey{name} key.
%\cs{Glsentryname} makes the first letter uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentrytext}\cs{glsentrytext}\marg{label}\\
-%\DescribeMacro{\Glsentrytext}\cs{Glsentrytext}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentrytext}]
+%\cs{glsentrytext}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentrytext}]
+%\cs{Glsentrytext}\marg{label}
+%\end{definition}
%These commands display the subsequent use text for the glossary entry
%given by \meta{label}, as specified by the \gloskey{text} key.
%\cs{Glsentrytext} makes the first letter uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentryplural}\cs{glsentryplural}\marg{label}\\
-%\DescribeMacro{\Glsentryplural}\cs{Glsentryplural}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentryplural}]
+%\cs{glsentryplural}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryplural}]
+%\cs{Glsentryplural}\marg{label}
+%\end{definition}
%These commands display the subsequent use plural text for the glossary
%entry given by \meta{label}, as specified by the \gloskey{plural} key.
%\cs{Glsentryplural} makes the first letter uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentryfirst}\cs{glsentryfirst}\marg{label}\\
-%\DescribeMacro{\Glsentryfirst}\cs{Glsentryfirst}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentryfirst}]
+%\cs{glsentryfirst}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryfirst}]
+%\cs{Glsentryfirst}\marg{label}
+%\end{definition}
%These commands display the \firstusetext\ for the glossary entry
%given by \meta{label}, as specified by the \gloskey{first} key.
%\cs{Glsentryfirst} makes the first letter uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentryfirstplural}\cs{glsentryfirstplural}\marg{label}\\
-%\DescribeMacro{\Glsentryfirstplural}\cs{Glsentryfirstplural}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentryfirstplural}]
+%\cs{glsentryfirstplural}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryfirstplural}]
+%\cs{Glsentryfirstplural}\marg{label}
+%\end{definition}
%These commands display the plural form of the \firstusetext\ for the
%glossary entry given by \meta{label}, as specified by the
%\gloskey{firstplural} key. \cs{Glsentryfirstplural} makes the first
%letter uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentrydesc}\cs{glsentrydesc}\marg{label}\\
-%\DescribeMacro{\Glsentrydesc}\cs{Glsentrydesc}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentrydesc}]
+%\cs{glsentrydesc}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentrydesc}]
+%\cs{Glsentrydesc}\marg{label}
+%\end{definition}
%These commands display the description for the glossary entry given by
%\meta{label}. \cs{Glsentrydesc} makes the first letter uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentrydescplural}\cs{glsentrydescplural}\marg{label}\\
-%\DescribeMacro{\Glsentrydescplural}\cs{Glsentrydescplural}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentrydescplural}]
+%\cs{glsentrydescplural}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentrydescplural}]
+%\cs{Glsentrydescplural}\marg{label}
+%\end{definition}
%These commands display the plural description for the glossary entry
%given by \meta{label}. \cs{Glsentrydescplural} makes the first letter
%uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentrysymbol}\cs{glsentrysymbol}\marg{label}\\
-%\DescribeMacro{\Glsentrysymbol}\cs{Glsentrysymbol}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentrysymbol}]
+%\cs{glsentrysymbol}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentrysymbol}]
+%\cs{Glsentrysymbol}\marg{label}
+%\end{definition}
%These commands display the symbol for the glossary entry given by
%\meta{label}. \cs{Glsentrysymbol} makes the first letter uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glsentrysymbolplural}\cs{glsentrysymbolplural}\marg{label}\\
-%\DescribeMacro{\Glsentrysymbolplural}\cs{Glsentrysymbolplural}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentrysymbolplural}]
+%\cs{glsentrysymbolplural}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentrysymbolplural}]
+%\cs{Glsentrysymbolplural}\marg{label}
+%\end{definition}
%These commands display the plural symbol for the glossary entry given by
%\meta{label}. \cs{Glsentrysymbolplural} makes the first letter uppercase.
-%\par\vskip10pt\noindent
-%\DescribeMacro{\glshyperlink}\cs{glshyperlink}\oarg{link text}\marg{label}\par\vskip10pt\noindent
+%\begin{definition}[\DescribeMacro{\glsentryuseri}]
+%\cs{glsentryuseri}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryuseri}]
+%\cs{Glsentryuseri}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsentryuserii}]
+%\cs{glsentryuserii}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryuserii}]
+%\cs{Glsentryuserii}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsentryuseriii}]
+%\cs{glsentryuseriii}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryuseriii}]
+%\cs{Glsentryuseriii}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsentryuseriv}]
+%\cs{glsentryuseriv}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryuseriv}]
+%\cs{Glsentryuseriv}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsentryuserv}]
+%\cs{glsentryuserv}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryuserv}]
+%\cs{Glsentryuserv}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsentryuservi}]
+%\cs{glsentryuservi}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Glsentryuservi}]
+%\cs{Glsentryuservi}\marg{label}
+%\end{definition}
+%These commands display the value of the user keys for the glossary entry given by
+%\meta{label}.
+%\begin{definition}[\DescribeMacro{\glshyperlink}]
+%\cs{glshyperlink}\oarg{link text}\marg{label}
+%\end{definition}
%This command provides a hyperlink to the glossary entry given by
%\meta{label} \textbf{but does not add any information to the
%glossary file}. The link text is given by
@@ -2609,9 +2879,10 @@
%problem. Remember that you also need to use the command
%\ics{makeglossaries} in the preamble to enable the glossaries.
%
-%\DescribeMacro{\printglossary}
-%An individual glossary can be displayed using:\\[10pt]
-%\cs{printglossary}\oarg{options}\\[10pt]
+%An individual glossary can be displayed using:
+%\begin{definition}[\DescribeMacro{\printglossary}]
+%\cs{printglossary}\oarg{options}
+%\end{definition}
%where \meta{options} is a \meta{key}=\meta{value} list of options.
%The following keys are available:
%\begin{description}
@@ -2723,16 +2994,22 @@
%
%To assist writing information to the \appname{xindy} style
%file, the \sty{glossaries} package provides the following
-%commands:\\[10pt]
-%\DescribeMacro{\glsopenbrace}\cs{glsopenbrace}\\
-%\DescribeMacro{\glsclosebrace}\cs{glsclosebrace}\\[10pt]
+%commands:
+%\begin{definition}[\DescribeMacro{\glsopenbrace}]
+%\cs{glsopenbrace}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsclosebrace}]
+%\cs{glsclosebrace}
+%\end{definition}
%which produce an open and closing brace. (This is needed because
%\verb|\{| and \verb|\}| don't expand to a simple brace character
%when written to a file.)
%
%In addition, if you are using a package that makes the double
-%quote character active (e.g. \isty{ngerman}) you can use:\\[10pt]
-%\DescribeMacro{\glsquote}\cs{glsquote}\marg{text}\\[10pt]
+%quote character active (e.g. \isty{ngerman}) you can use:
+%\begin{definition}[\DescribeMacro{\glsquote}]
+%\cs{glsquote}\marg{text}
+%\end{definition}
%which will produce \verb|"|\meta{text}\verb|"|. Alternatively,
%you can use \verb|\string"| to write the double-quote character.
%This document assumes that the double quote character has not been
@@ -2755,9 +3032,10 @@
%(\filetype{.aux}) file. The \sty{glossaries} package attempts to
%find the root language, but in the event that it gets it wrong or if
%\appname{xindy} doesn't support that language, then you can
-%specify the language using:\\[10pt]
-%\DescribeMacro{\GlsSetXdyLanguage}
-%\cs{GlsSetXdyLanguage}\oarg{glossary type}\marg{language}\\[10pt]
+%specify the language using:
+%\begin{definition}[\DescribeMacro{\GlsSetXdyLanguage}]
+%\cs{GlsSetXdyLanguage}\oarg{glossary type}\marg{language}
+%\end{definition}
%where \meta{language} is the name of the language. The
%optional argument can be used if you have multiple glossaries
%in different languages. If \meta{glossary type} is omitted, it
@@ -2767,9 +3045,10 @@
%
%If the \isty{inputenc} package is used, the encoding will be
%obtained from the value of \ics{inputencodingname}.
-%Alternatively, you can specify the encoding using:\\[10pt]
-%\DescribeMacro{\GlsSetXdyCodePage}
-%\cs{GlsSetXdyCodePage}\marg{code}\\[10pt]
+%Alternatively, you can specify the encoding using:
+%\begin{definition}[\DescribeMacro{\GlsSetXdyCodePage}]
+%\cs{GlsSetXdyCodePage}\marg{code}
+%\end{definition}
%where \meta{code} is the name of the encoding. For example:
%\begin{verbatim}
%\GlsSetXdyCodePage{utf8}
@@ -2805,9 +3084,10 @@
%The most likely attributes used in the \gloskey[glslink]{format}
%key (\locfmt{textrm}, \locfmt{hyperrm} etc) are automatically added
%to the \appname{xindy} style file, but if you want to use another
-%attribute, you need to add it using:\\[10pt]
-%\DescribeMacro{\GlsAddXdyAttribute}
-%\cs{GlsAddXdyAttribute}\marg{name}\\[10pt]
+%attribute, you need to add it using:
+%\begin{definition}[\DescribeMacro{\GlsAddXdyAttribute}]
+%\cs{GlsAddXdyAttribute}\marg{name}
+%\end{definition}
%where \meta{name} is the name of the attribute, as used in
%the \gloskey[glslink]{format} key. For example, suppose I want a
%bold, italic, hyperlinked location. I first need to define a
@@ -2875,9 +3155,10 @@
%user defined location names (as specified by
%\ics{GlsAddXdyLocation} in the order in which they were defined),
%\texttt{see} (cross-referenced entries).
-%This ordering can be changed using:\\[10pt]
-%\DescribeMacro{\GlsSetXdyLocationClassOrder}
-%\cs{GlsSetXdyLocationClassOrder}\marg{location names}\\[10pt]
+%This ordering can be changed using:
+%\begin{definition}[\DescribeMacro{\GlsSetXdyLocationClassOrder}]
+%\cs{GlsSetXdyLocationClassOrder}\marg{location names}
+%\end{definition}
%where each location name is delimited by double quote marks and
%separated by white space.
%For example:
@@ -2905,9 +3186,10 @@
%If a \term{number list} consists of a sequence of consecutive
%numbers, the range will be concatenated. The
%number of consecutive locations that causes a range formation
-%defaults to 2, but can be changed using:\\[10pt]
-%\DescribeMacro{\GlsSetXdyMinRangeLength}
-%\cs{GlsSetXdyMinRangeLength}\marg{n}\\[10pt]
+%defaults to 2, but can be changed using:
+%\begin{definition}[\DescribeMacro{\GlsSetXdyMinRangeLength}]
+%\cs{GlsSetXdyMinRangeLength}\marg{n}
+%\end{definition}
%For example:
%\begin{verbatim}
%\GlsSetXdyMinRangeLength{3}
@@ -2953,9 +3235,10 @@
%\subsection{Defining New Glossaries}
%\label{sec:newglossary}
%
-%\DescribeMacro{\newglossary}
-%A new glossary can be defined using:\\[10pt]
-%\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}\marg{title}\oarg{counter}\\[10pt]
+%A new glossary can be defined using:
+%\begin{definition}[\DescribeMacro{\newglossary}]
+%\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}\marg{title}\oarg{counter}
+%\end{definition}
%where \meta{name} is the label to assign to this glossary. The arguments
%\meta{in-ext} and \meta{out-ext} specify the extensions to give to the
%input and output files for that glossary, \meta{title} is the default
@@ -2981,7 +3264,10 @@
%can identify the list of acronyms by the command
%\DescribeMacro{\acronymtype}\cs{acronymtype} which is set to
%\texttt{acronym}, if the \pkgopt{acronym} option has been used,
-%otherwise it is set to \texttt{main}.
+%otherwise it is set to \texttt{main}. Note that if you are using
+%the main glossary as your list of acronyms, you need to declare
+%it as a list of acronyms using the package option
+%\pkgopt{acronymlists}.
%
%\begin{important}
%All glossaries must be defined before \ics{makeglossaries} to
@@ -2991,12 +3277,13 @@
%\subsection{Acronyms}
%\label{sec:acronyms}
%
-%\DescribeMacro{\newacronym}
%You may have noticed in \autoref{sec:newglosentry} that when you specify a new entry, you can specify alternate text to use when
%the term is first used\ifirstuse\ in the document. This provides a useful
%means to define acronyms. For convenience, the \sty{glossaries} package
-%defines the command:\\[10pt]
-%\cs{newacronym}\oarg{key-val list}\marg{label}\marg{abbrv}\marg{long}\\[10pt]
+%defines the command:
+%\begin{definition}[\DescribeMacro{\newacronym}]
+%\cs{newacronym}\oarg{key-val list}\marg{label}\marg{abbrv}\marg{long}
+%\end{definition}
%By default, this is equivalent to:\vskip5pt
%\begin{ttfamily}\par\noindent
%\cs{newglossaryentry}\textrm{\marg{label}}\{type=\ics{acronymtype},\\
@@ -3015,7 +3302,10 @@
%the \pkgopt{acronym} package option has been used, this will be
%\texttt{acronym}, otherwise it will be \texttt{main}. The acronyms
%can then be used in exactly the same way as any other glossary
-%entry.
+%entry. If you want more than one list of acronyms, you must
+%identify the others using the package options \pkgopt{acronymlists}.
+%This ensures that options such as \pkgopt{footnote} and
+%\pkgopt{smallcaps} work for the additional lists of acronyms.
%
%\begin{important}%
%\textbf{Note:} since \cs{newacronym} sets \verb|type=\acronymtype|,
@@ -3057,10 +3347,14 @@
%If you use any of the package options \pkgopt{smallcaps},
%\pkgopt{smaller}, \pkgopt{description} or
%\pkgopt{footnote}, the acronyms will be displayed in the document
-%using:\\[10pt]
-%\DescribeMacro{\acronymfont}\cs{acronymfont}\marg{text}\\[10pt]
-%and\\[10pt]
-%\DescribeMacro{\firstacronymfont}\cs{firstacronymfont}\marg{text}\\[10pt]
+%using:
+%\begin{definition}[\DescribeMacro{\acronymfont}]
+%\cs{acronymfont}\marg{text}
+%\end{definition}
+%and
+%\begin{definition}[\DescribeMacro{\firstacronymfont}]
+%\cs{firstacronymfont}\marg{text}
+%\end{definition}
%where \cs{firstacronymfont} is applied on \firstuse\ and
%\cs{acronymfont} is applied on subsequent use. Note that if you
%don't use any of the above package options, changing the definition
@@ -3236,8 +3530,10 @@
%of \ics{newacronym}. When this option is used without
%the \pkgopt{footnote} or \pkgopt{dua} options, the name field
%is specified as
-%\DescribeMacro{\acrnameformat}\ics{acrnameformat}\marg{short}\marg{long}. This
-%defaults to \ics{acronymfont}\marg{short}, which means that the
+%\begin{definition}[\DescribeMacro{\acrnameformat}]
+%\cs{acrnameformat}\marg{short}\marg{long}
+%\end{definition}
+%This defaults to \ics{acronymfont}\marg{short}, which means that the
%long form will not appear in the list of acronyms by default.
%To change this, you need to redefine \ics{acrnameformat} as
%appropriate. For example, to display the long form followed
@@ -3342,35 +3638,41 @@
%the acronym style, so the \sty{glossaries} package provides
%commands that are set according to the package options. These are
%as follows:
-%\vspace{10pt}\par\noindent
-%\DescribeMacro{\acrshort}
-%\cs{acrshort}\oarg{options}\marg{label}\oarg{insert}\\
-%\DescribeMacro{\Acrshort}
-%\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert}\\
-%\DescribeMacro{\ACRshort}
-%\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%\begin{definition}[\DescribeMacro{\acrshort}]
+%\cs{acrshort}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Acrshort}]
+%\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\ACRshort}]
+%\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%Print the abbreviated version with (if required) a hyperlink to the
%relevant entry in the glossary. This is usually equivalent to
%\ics{glstext} (or its uppercase variants) but may additionally
%put the link text within the argument to \ics{acronymfont}.
-%\vspace{10pt}\par\noindent
-%\DescribeMacro{\acrlong}
-%\cs{acrlong}\oarg{options}\marg{label}\oarg{insert}\\
-%\DescribeMacro{\Acrlong}
-%\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert}\\
-%\DescribeMacro{\ACRlong}
-%\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%\begin{definition}[\DescribeMacro{\acrlong}]
+%\cs{acrlong}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Acrlong}]
+%\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\ACRlong}]
+%\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%Print the long version with (if required) a hyperlink to the
%relevant entry in the glossary. This is may be equivalent to
%\ics{glsdesc}, \ics{glssymbol} or \ics{glsfirst} (or their uppercase
%variants), depending on package options.
-%\vspace{10pt}\par\noindent
-%\DescribeMacro{\acrfull}
-%\cs{acrfull}\oarg{options}\marg{label}\oarg{insert}\\
-%\DescribeMacro{\Acrfull}
-%\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert}\\
-%\DescribeMacro{\ACRfull}
-%\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert}\\[10pt]
+%\begin{definition}[\DescribeMacro{\acrfull}]
+%\cs{acrfull}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\Acrfull}]
+%\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\ACRfull}]
+%\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert}
+%\end{definition}
%Print the long version followed by the abbreviation in brackets
%with (if required) a hyperlink to the
%relevant entry in the glossary.
@@ -3436,8 +3738,10 @@
%
%In order to facilitate migrating from the old package to the new
%one, the \sty{glossaries} package\footnote{as from version 1.18}
-%provides the command:\\[10pt]
-%\DescribeMacro{\oldacronym}\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list}\\[10pt]
+%provides the command:
+%\begin{definition}[\DescribeMacro{\oldacronym}]
+%\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list}
+%\end{definition}
%This uses the same syntax as the \isty{glossary} package's
%method of defining acronyms. It is equivalent to:\\[10pt]
%\ics{newacronym}\oarg{key-val list}\marg{label}\marg{abbrv}\marg{long}\\[10pt]
@@ -3509,19 +3813,34 @@
%\gloskey{first} key, even though you have already used the glossary
%entry\ifirstuse. Conversely, you may want to use the value given by the
%\gloskey{text} key, even though you haven't used the glossary entry.
-%The former can be achieved by one of the following commands:\\[10pt]
-%\DescribeMacro{\glsreset}\cs{glsreset}\marg{label}\\
-%\DescribeMacro{\glslocalreset}\cs{glslocalreset}\marg{label}\\[10pt]
-%while the latter can be achieved by one of the following commands:\\[10pt]
-%\DescribeMacro{\glsunset}\cs{glsunset}\marg{label}\\
-%\DescribeMacro{\glslocalunset}\cs{glslocalunset}\marg{label}
-%\\[10pt]
+%The former can be achieved by one of the following commands:
+%\begin{definition}[\DescribeMacro{\glsreset}]
+%\cs{glsreset}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glslocalreset}]
+%\cs{glslocalreset}\marg{label}
+%\end{definition}
+%while the latter can be achieved by one of the following commands:
+%\begin{definition}[\DescribeMacro{\glsunset}]
+%\cs{glsunset}\marg{label}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glslocalunset}]
+%\cs{glslocalunset}\marg{label}
+%\end{definition}
%You can also reset or unset all entries for a given glossary or list of
-%glossaries using:\\[10pt]
-%\DescribeMacro{\glsresetall}\cs{glsresetall}\oarg{glossary list}\\
-%\DescribeMacro{\glslocalresetall}\cs{glslocalresetall}\oarg{glossary list}\\
-%\DescribeMacro{\glsunsetall}\cs{glsunsetall}\oarg{glossary list}\\
-%\DescribeMacro{\glslocalunsetall}\cs{glslocalunsetall}\oarg{glossary list}\\[10pt]
+%glossaries using:
+%\begin{definition}[\DescribeMacro{\glsresetall}]
+%\cs{glsresetall}\oarg{glossary list}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glslocalresetall}]
+%\cs{glslocalresetall}\oarg{glossary list}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glsunsetall}]
+%\cs{glsunsetall}\oarg{glossary list}
+%\end{definition}
+%\begin{definition}[\DescribeMacro{\glslocalunsetall}]
+%\cs{glslocalunsetall}\oarg{glossary list}
+%\end{definition}
%where \meta{glossary list} is a comma-separated list of
%glossary labels. If omitted, all defined glossaries are assumed.
%For example, to reset all entries in the main glossary and the
@@ -3530,9 +3849,10 @@
%\glsresetall[main,acronym]
%\end{verbatim}
%
-%You can determine whether an entry's first use flag is set using:\\[10pt]
-%\DescribeMacro{\ifglsused}
-%\cs{ifglsused}\marg{label}\marg{true part}\marg{false part}\\[10pt]
+%You can determine whether an entry's first use flag is set using:
+%\begin{definition}[\DescribeMacro{\ifglsused}]
+%\cs{ifglsused}\marg{label}\marg{true part}\marg{false part}
+%\end{definition}
%where \meta{label} is the label of the required entry. If the
%entry has been used, \meta{true part} will be done, otherwise
%\meta{false part} will be done.
@@ -3589,8 +3909,10 @@
%\end{table}
%
%The glossary style can be set using the \gloskey[printglossary]{style} key in the optional
-%argument to \ics{printglossary} or using the command:\\[10pt]
-%\DescribeMacro{\glossarystyle}\cs{glossarystyle}\marg{style-name}\\[10pt]
+%argument to \ics{printglossary} or using the command:
+%\begin{definition}[\DescribeMacro{\glossarystyle}]
+%\cs{glossarystyle}\marg{style-name}
+%\end{definition}
%Some of the glossary styles may also be set using the \pkgopt{style}
%package option, it depends if the package in which they are defined
%is automatically loaded by the \sty{glossaries} package.
@@ -4151,8 +4473,10 @@
%
%\item[alttree] The \glostyle{alttree} style is similar to the
%\glostyle{tree} style except that the indentation for each level
-%is determined by the width of the text specified by\\[10pt]
-%\DescribeMacro{\glssetwidest}\cs{glssetwidest}\oarg{level}\marg{text}\\[10pt]
+%is determined by the width of the text specified by
+%\begin{definition}[\DescribeMacro{\glssetwidest}]
+%\cs{glssetwidest}\oarg{level}\marg{text}
+%\end{definition}
%The optional argument \meta{level} indicates the level, where
%0 indicates the top-most level, 1 indicates the first level
%sub-entries, etc. If \cs{glssetwidest} hasn't been used for a
@@ -4179,16 +4503,17 @@
%\label{sec:newglossarystyle}
%
%If the predefined styles don't fit your requirements, you can
-%define your own style using\DescribeMacro{\newglossarystyle}:\\[10pt]
-%\cs{newglossarystyle}\marg{name}\marg{definitions}\\[10pt]
+%define your own style using:
+%\begin{definition}[\DescribeMacro{\newglossarystyle}]
+%\cs{newglossarystyle}\marg{name}\marg{definitions}
+%\end{definition}
%where \meta{name} is the name of the new glossary style (to be
%used in \cs{glossarystyle}). The second argument \meta{definitions}
%needs to redefine all of the following:
%
-%\begin{description}
-%\item
-%\DescribeEnv{theglossary}
-%\envname{theglossary}\par\noindent
+%\begin{definition}[\DescribeEnv{theglossary}]
+%\envname{theglossary}
+%\end{definition}
%This environment defines how the main body of the glossary should
%be typeset. Note that this does not include the section heading,
%the glossary preamble (defined by \cs{glossarypreamble}) or the
@@ -4197,9 +4522,9 @@
%so the \envname{theglossary} environment is simply redefined to begin
%and end the \envname{description} environment.
%
-%\item
-%\DescribeMacro{\glossaryheader}
-%\cs{glossaryheader}\par\noindent
+%\begin{definition}[\DescribeMacro{\glossaryheader}]
+%\cs{glossaryheader}
+%\end{definition}
%This macro indicates what to do at the start of the main body
%of the glossary. Note that this is not the same as
%\cs{glossarypreamble}, which should not be affected by changes in
@@ -4207,9 +4532,10 @@
%\cs{glossaryheader} to do nothing, whereas the \glostyle{longheader}
%glossary style redefines \cs{glossaryheader} to do a header row.
%
-%\item
-%\DescribeMacro{\glsgroupheading}
-%\cs{glsgroupheading}\marg{label}\par\noindent This macro indicates
+%\begin{definition}[\DescribeMacro{\glsgroupheading}]
+%\cs{glsgroupheading}\marg{label}
+%\end{definition}
+%This macro indicates
%what to do at the start of each logical block within the main body
%of the glossary. If you use \appname{makeindex} the glossary is
%sub-divided into a maximum of twenty-eight logical blocks that are
@@ -4222,17 +4548,17 @@
%Note that the argument to \cs{glsgroupheading}
%is a label \emph{not} the group title. The group title can be obtained
%via
-%
-%\DescribeMacro{\glsgetgrouptitle}\cs{glsgetgrouptitle}\marg{label}
-%
+%\begin{definition}[\DescribeMacro{\glsgetgrouptitle}]
+%\cs{glsgetgrouptitle}\marg{label}
+%\end{definition}
%This obtains the title as follows: if
%\cs{}\meta{label}\texttt{groupname} exists, this is taken to be the
%title, otherwise the title is just \meta{label}.
%
%A navigation hypertarget can be created using
-%
-%\DescribeMacro{\glsnavhypertarget}\cs{glsnavhypertarget}\marg{label}\marg{text}
-%
+%\begin{definition}[\DescribeMacro{\glsnavhypertarget}]
+%\cs{glsnavhypertarget}\marg{label}\marg{text}
+%\end{definition}
%For further details about \cs{glsnavhypertarget}, see
%\autoref{sec:code:hypernav}.
%
@@ -4247,20 +4573,20 @@
%See also \cs{glsgroupskip} below. (Note that command definitions within
%\cs{newglossarystyle} must use \verb|##1| instead of \verb|#1| etc.)
%
-%\item
-%\DescribeMacro{\glsgroupskip}
-%\cs{glsgroupskip}\par\noindent
+%\begin{definition}[\DescribeMacro{\glsgroupskip}]
+%\cs{glsgroupskip}
+%\end{definition}
%This macro determines what to do after one logical group but before
%the header for the next logical group. The \glostyle{list} glossary
%style simply redefines \cs{glsgroupskip} to be \cs{indexspace},
%whereas the tabular-like styles redefine \cs{glsgroupskip} to
%produce a blank row.
%
-%\item
-%\DescribeMacro{\glossaryentryfield}
+%\begin{definition}[\DescribeMacro{\glossaryentryfield}]
%\cs{glossaryentryfield}\marg{label}\marg{formatted
%name}\marg{description}\marg{symbol}
-%\marg{number list}\par\noindent
+%\marg{number list}
+%\end{definition}
%This macro indicates what to do for a given glossary entry.
%Note that \meta{formatted name} will always be in the form
%\cs{glsnamefont}\marg{name}. This allows the user to set a given
@@ -4273,9 +4599,9 @@
%Your new glossary style must therefore redefine
%\cs{glossaryentryfield} to set the appropriate target. This
%is done using
-%
-%\DescribeMacro{\glstarget}\cs{glstarget}\marg{label}\marg{text}
-%
+%\begin{definition}[\DescribeMacro{\glstarget}]
+%\cs{glstarget}\marg{label}\marg{text}
+%\end{definition}
%where \meta{label} is the entry's label. Note that you
%don't need to worry about whether the \isty{hyperref} package has
%been loaded, as \cs{glstarget} won't create a target if
@@ -4307,17 +4633,16 @@
%to worry about whether the user has specified the
%\pkgopt{nonumberlist} package option.
%
-%\item
-%\DescribeMacro{\glossarysubentryfield}
+%\begin{definition}[\DescribeMacro{\glossarysubentryfield}]
%\cs{glossarysubentryfield}\marg{level}\marg{label}\marg{formatted
%name}\marg{description}\marg{symbol}
-%\marg{number list}\par\noindent
+%\marg{number list}
+%\end{definition}
%This is new to version 1.17, and is used to display sub-entries.
%The first argument, \meta{level}, indicates the sub-entry level.
%This must be an integer from 1 (first sub-level) onwards. The
%remaining arguments are analogous to those for
%\ics{glossaryentryfield} described above.
-%\end{description}
%
%For further details of these commands, see
%\autoref{sec:code:printglos}.
@@ -4367,7 +4692,7 @@
%existing style}
%
%\changes{1.11}{2008 March 1}{Fixed error in manual (glossary style
-%is set using 'glossarystyle not 'setglossarystyle)}%
+%is set using \cs{glossarystyle} not \cs{setglossarystyle})}%
%If you want to define a new style that is a slightly modified
%version of an existing style, you can use \cs{glossarystyle}
%within the second argument of \cs{newglossarystyle} followed by
@@ -4383,19 +4708,90 @@
%}
%\end{verbatim}
%
+%\subsubsection{Example: creating a glossary style that uses the
+%\gloskey{user1}, \ldots, \gloskey{user6} keys}
+%
+%Since \ics{glossaryentryfield} and \ics{glossarysubentryfield}
+%provide the label for the entry, it's also possible to access
+%the values of the generic user keys, such as \gloskey{user1}. For
+%example, suppose each entry not only has an associated symbol,
+%but also units (stored in \gloskey{user1}) and dimension
+%(stored in \gloskey{user2}). Then you can define a glossary style
+%that displays each entry in a \envname{longtable} as follows:
+%\begin{verbatim}
+%\newglossarystyle{long6col}{%
+% % put the glossary in a longtable environment:
+% \renewenvironment{theglossary}%
+% {\begin{longtable}{lp{\glsdescwidth}cccp{\glspagelistwidth}}}%
+% {\end{longtable}}%
+% % Set the table's header:
+% \renewcommand*{\glossaryheader}{%
+% \bfseries Term & \bfseries Description & \bfseries Symbol &
+% \bfseries Units & \bfseries Dimensions & \bfseries Page List
+% \\\endhead}%
+% % No heading between groups:
+% \renewcommand*{\glsgroupheading}[1]{}%
+% % Main (level 0) entries displayed in a row:
+% \renewcommand*{\glossaryentryfield}[5]{%
+% \glstarget{##1}{##2}% Name
+% & ##3% Description
+% & ##4% Symbol
+% & \glsentryuseri{##1}% Units
+% & \glsentryuserii{##1}% Dimensions
+% & ##5% Page list
+% \\% end of row
+% }%
+% % Sub entries treated the same as level 0 entries:
+% \renewcommand*{\glossarysubentryfield}[6]{%
+% \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}%
+% % Nothing between groups:
+% \renewcommand*{\glsgroupskip}{}%
+%}
+%\end{verbatim}
+%
%\subsection{Accessibility Support}\label{sec:accsupp}
%Limited accessibility support is provided by the accompanying
%\isty{glossaries-accsupp} package, but note that this package is
%experimental and it requires the \isty{accsupp} package
-%which is also listed as experimental. The \gloskey{symbol} key
-%is used to specify the replacement text. For example:
+%which is also listed as experimental. This package defines
+%additional keys that may be used when defining glossary entries.
+%The keys are as follows:
+%\begin{description}
+%\item[{\gloskey{access}}] The replacement text corresponding to
+%the \gloskey{name} key.
+%
+%\item[{\gloskey{textaccess}}] The replacement text corresponding
+%to the \gloskey{text} key.
+%
+%\item[{\gloskey{firstaccess}}] The replacement text corresponding
+%to the \gloskey{first} key.
+%
+%\item[{\gloskey{pluralaccess}}] The replacement text corresponding
+%to the \gloskey{plural} key.
+%
+%\item[{\gloskey{firstpluralaccess}}] The replacement text corresponding
+%to the \gloskey{firstplural} key.
+%
+%\item[{\gloskey{symbolaccess}}] The replacement text corresponding
+%to the \gloskey{symbol} key.
+%
+%\item[{\gloskey{symbolpluralaccess}}] The replacement text corresponding
+%to the \gloskey{symbolplural} key.
+%
+%\item[{\gloskey{descriptionaccess}}] The replacement text corresponding
+%to the \gloskey{description} key.
+%
+%\item[{\gloskey{descriptionpluralaccess}}] The replacement text corresponding
+%to the \gloskey{descriptionplural} key.
+%
+%\end{description}
+%
+%For example:
%\begin{verbatim}
%\newglossaryentry{tex}{name={\TeX},description={Document preparation
-%language},symbol={TeX}}
+%language},access={TeX}}
%\end{verbatim}
-%When you reference this entry using \ics{gls}, \ics{glspl} or
-%their uppercase variants, the symbol is used as the replacement
-%text. For example, \verb|\gls{tex}| would be equivalent to
+%Now \verb|\gls{tex}| will be equivalent to
%\begin{verbatim}
%\BeginAccSupp{ActualText=TeX}\TeX\EndAccSupp{}
%\end{verbatim}
@@ -4406,9 +4802,10 @@
%\label{sec:mfirstuc}
%
%The \sty{glossaries} bundle is supplied with the package
-%\isty{mfirstuc} which provides the command:\\[10pt]
-%\DescribeMacro{\makefirstuc}
-%\cs{makefirstuc}\marg{stuff}\\[10pt]
+%\isty{mfirstuc} which provides the command:
+%\begin{definition}[\DescribeMacro{\makefirstuc}]
+%\cs{makefirstuc}\marg{stuff}
+%\end{definition}
%which makes the first object of
%\meta{stuff} uppercase unless \meta{stuff} starts with a control
%sequence followed by a non-empty group, in which case the first
@@ -4453,8 +4850,9 @@
%\expandafter\makefirstuc\expandafter{\abc}
%\end{verbatim}
%produces: Abc. There is a short cut command which will do this:\\[10pt]
-%\DescribeMacro{\xmakefirstuc}
-%\cs{xmakefirstuc}\marg{stuff}\\[10pt]
+%\begin{definition}[\DescribeMacro{\xmakefirstuc}]
+%\cs{xmakefirstuc}\marg{stuff}
+%\end{definition}
%This is equivalent to \cs{expandafter}\cs{makefirstuc}\cs{expandafter}\marg{stuff}. So
%\begin{verbatim}
%\newcommand{\abc}{abc}
@@ -4490,7 +4888,7 @@
% This package requires \LaTeXe.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries}[2009/09/23 v2.03 (NLCT)]
+\ProvidesPackage{glossaries}[2009/11/01 v2.04 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -4535,7 +4933,7 @@
%\begin{macro}{\@@glossarysec}
% \begin{macrocode}
\@ifundefined{chapter}{\newcommand*{\@@glossarysec}{section}}{%
-\newcommand*{\@@glossarysec}{chapter}}
+ \newcommand*{\@@glossarysec}{chapter}}
% \end{macrocode}
%\end{macro}
%
@@ -4549,7 +4947,7 @@
% \begin{macrocode}
\define@choicekey{glossaries.sty}{section}{part,chapter,section,%
subsection,subsubsection,paragraph,subparagraph}[section]{%
-\renewcommand*{\@@glossarysec}{#1}}
+ \renewcommand*{\@@glossarysec}{#1}}
% \end{macrocode}
%\end{option}
%
@@ -4576,16 +4974,18 @@ subsection,subsubsection,paragraph,subparagraph}[section]{%
% \begin{macrocode}
\define@choicekey{glossaries.sty}{numberedsection}[\val\nr]{%
false,nolabel,autolabel}[nolabel]{%
-\ifcase\nr\relax
- \renewcommand*{\@@glossarysecstar}{*}%
- \renewcommand*{\@@glossaryseclabel}{}%
-\or
- \renewcommand*{\@@glossarysecstar}{}%
- \renewcommand*{\@@glossaryseclabel}{}%
-\or
- \renewcommand*{\@@glossarysecstar}{}%
- \renewcommand*{\@@glossaryseclabel}{\label{\glsautoprefix\@glo@type}}%
-\fi}
+ \ifcase\nr\relax
+ \renewcommand*{\@@glossarysecstar}{*}%
+ \renewcommand*{\@@glossaryseclabel}{}%
+ \or
+ \renewcommand*{\@@glossarysecstar}{}%
+ \renewcommand*{\@@glossaryseclabel}{}%
+ \or
+ \renewcommand*{\@@glossarysecstar}{}%
+ \renewcommand*{\@@glossaryseclabel}{%
+ \label{\glsautoprefix\@glo@type}}%
+ \fi
+}
% \end{macrocode}
%\end{option}
%
@@ -4777,7 +5177,108 @@ false,nolabel,autolabel}[nolabel]{%
% which is used in \autoref{sec:acronym} to determine whether
% or not to define a separate glossary for acronyms.
% \begin{macrocode}
-\define@boolkey{glossaries.sty}[gls]{acronym}[true]{}
+\define@boolkey{glossaries.sty}[gls]{acronym}[true]{%
+ \DeclareAcronymList{acronym}%
+}
+% \end{macrocode}
+%\end{option}
+%\begin{macro}{\@glsacronymlists}
+%\changes{2.04}{2009 November 10}{new}
+% Comma-separated list of glossary labels indicating which
+% glossaries contain acronyms. Note that \ics{SetAcronymStyle}
+% must be used after adding labels to this macro.
+% \begin{macrocode}
+\newcommand*{\@glsacronymlists}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@addtoacronynlists}
+% \begin{macrocode}
+\newcommand*{\@addtoacronymlists}[1]{%
+ \ifx\@glsacronymlists\@empty
+ \protected@xdef\@glsacronymlists{#1}%
+ \else
+ \protected@xdef\@glsacronymlists{\@glsacronymlists,#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DeclareAcronymList}
+%\changes{2.04}{2009 November 10}{new}%
+% Identifies the named glossary as a list of acronyms and adds
+% to the list. (Doesn't check if the glossary exists, but checks
+% if label already in list. Use \ics{SetAcronymStyle} after
+% identifying all the acronym lists.)
+% \begin{macrocode}
+\newcommand*{\DeclareAcronymList}[1]{%
+ \glsIfListOfAcronyms{#1}{}{\@addtoacronymlists{#1}}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsIfListOfAcronyms}
+%\cs{glsIfListOfAcronyms}\marg{label}\marg{true part}\marg{false part}\\[10pt]
+% Determines if the glossary with the given label has been identified
+% as being a list of acronyms.
+% \begin{macrocode}
+\newcommand{\glsIfListOfAcronyms}[1]{%
+ \edef\@do@gls@islistofacronyms{%
+ \noexpand\@gls@islistofacronyms{#1}{\@glsacronymlists}}%
+ \@do@gls@islistofacronyms
+}
+% \end{macrocode}
+% Internal command requires label and list to be expanded:
+% \begin{macrocode}
+\newcommand{\@gls@islistofacronyms}[4]{%
+ \def\gls@islistofacronyms##1,#1,##2\end@gls@islistofacronyms{%
+ \def\@before{##1}\def\@after{##2}}%
+ \gls@islistofacronyms,#2,#1,\@nil\end@gls@islistofacronyms
+ \ifx\@after\@nnil
+% \end{macrocode}
+% Not found
+% \begin{macrocode}
+ #4%
+ \else
+% \end{macrocode}
+% Found
+% \begin{macrocode}
+ #3%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\if@glsisacronymlist}
+% Convenient boolean.
+% \begin{macrocode}
+\newif\if@glsisacronymlist
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\gls@checkisacronymlist}
+% Sets the above boolean if argument is a label representing
+% a list of acronyms.
+% \begin{macrocode}
+\newcommand*{\gls@checkisacronymlist}[1]{%
+ \glsIfListOfAcronyms{#1}%
+ {\@glsisacronymlisttrue}{\@glsisacronymlistfalse}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\SetAcronymLists}
+%\changes{2.04}{2009 November 10}{new}%
+% Sets the ``list of acronyms'' list. Argument must be a
+% comma-separated list of glossary labels. (Doesn't check at this
+% point if the glossaries exists.)
+% \begin{macrocode}
+\newcommand*{\SetAcronymLists}[1]{%
+ \renewcommand*{\@glsacronymlists}{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{option}{acronymlists}
+%\changes{2.04}{2009 November 10}{new}%
+% \begin{macrocode}
+\define@key{glossaries.sty}{acronymlists}{%
+ \@addtoacronymlists{#1}%
+}
% \end{macrocode}
%\end{option}
%
@@ -4797,7 +5298,8 @@ false,nolabel,autolabel}[nolabel]{%
% just redefines \cs{glscounter}.)
% \begin{macrocode}
\define@key{glossaries.sty}{counter}{%
-\renewcommand*{\glscounter}{#1}}
+ \renewcommand*{\glscounter}{#1}%
+}
% \end{macrocode}
%\end{option}
%
@@ -4912,7 +5414,8 @@ name=true]{%
% \begin{macrocode}
\glstranslatefalse
\@ifpackageloaded{translator}{\glstranslatetrue}{%
-\@ifpackageloaded{babel}{\glstranslatetrue}{}}
+\@ifpackageloaded{babel}{\glstranslatetrue}{%
+\@ifpackageloaded{polyglossia}{\glstranslatetrue}{}}}
% \end{macrocode}
%
%\begin{option}{hyperfirst}
@@ -5254,6 +5757,24 @@ name=true]{%
% Add multi-lingual support\changes{1.08}{2007 Oct 13}{Added
% babel support}. Thanks to everyone who contributed to the
% translations from both comp.text.tex and via email.
+%\begin{macro}{\addglossarytocaptions}
+% If using \isty{translator}, \ics{glossaryname} should be defined
+% in terms of \ics{translate}, but if babel is also loaded, it will
+% redefine \cs{glossaryname} whenever the language is set, so
+% override it. (Don't use \ics{addto} as \isty{polyglossia} doesn't
+% define it.)
+% \begin{macrocode}
+\newcommand*{\addglossarytocaptions}[1]{%
+ \@ifundefined{captions#1}{}{%
+ \expandafter\let\expandafter\@gls@tmp\csname captions#1\endcsname
+ \expandafter\toks@\expandafter{\@gls@tmp
+ \renewcommand*{\glossaryname}{\translate{Glossary}}%
+ }%
+ \expandafter\edef\csname captions#1\endcsname{\the\toks@}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
% \begin{macrocode}
\ifglstranslate
% \end{macrocode}
@@ -5263,7 +5784,39 @@ name=true]{%
%\changes{1.1}{2008 Feb 22}{Added support for translator package}
%\changes{1.15}{2008 August 15}{Added 'glssettoctitle}
% \begin{macrocode}
- \@ifpackageloaded{translator}{\usedictionary{glossaries-dictionary}%
+ \@ifpackageloaded{translator}{%
+ \usedictionary{glossaries-dictionary}%
+ \addglossarytocaptions{portuges}%
+ \addglossarytocaptions{portuguese}%
+ \addglossarytocaptions{brazil}%
+ \addglossarytocaptions{brazilian}%
+ \addglossarytocaptions{danish}%
+ \addglossarytocaptions{dutch}%
+ \addglossarytocaptions{afrikaans}%
+ \addglossarytocaptions{english}%
+ \addglossarytocaptions{UKenglish}%
+ \addglossarytocaptions{USenglish}%
+ \addglossarytocaptions{american}%
+ \addglossarytocaptions{australian}%
+ \addglossarytocaptions{british}%
+ \addglossarytocaptions{canadian}%
+ \addglossarytocaptions{newzealand}%
+ \addglossarytocaptions{french}%
+ \addglossarytocaptions{frenchb}%
+ \addglossarytocaptions{francais}%
+ \addglossarytocaptions{acadian}%
+ \addglossarytocaptions{canadien}%
+ \addglossarytocaptions{german}%
+ \addglossarytocaptions{germanb}%
+ \addglossarytocaptions{austrian}%
+ \addglossarytocaptions{naustrian}%
+ \addglossarytocaptions{ngerman}%
+ \addglossarytocaptions{irish}%
+ \addglossarytocaptions{italian}%
+ \addglossarytocaptions{magyar}%
+ \addglossarytocaptions{hungarian}%
+ \addglossarytocaptions{polish}%
+ \addglossarytocaptions{spanish}%
\renewcommand*{\glssettoctitle}[1]{%
\ifthenelse{\equal{#1}{main}}{%
\translatelet{\glossarytoctitle}{Glossary}}{%
@@ -5283,7 +5836,12 @@ name=true]{%
\renewcommand*{\glsnumbersgroupname}{%
\translate{Numbers (glossaries)}}%
}{%
- \@ifpackageloaded{babel}{\RequirePackage{glossaries-babel}}{}}
+ \@ifpackageloaded{babel}%
+ {\RequirePackage{glossaries-babel}}%
+ {%
+ \@ifpackageloaded{polyglossia}{%
+ \RequirePackage{glossaries-polyglossia}}{}%
+ }}
\fi
% \end{macrocode}
%\begin{macro}{\glspostdescription}
@@ -6251,12 +6809,19 @@ name=true]{%
% 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})
-% \begin{macrocode}
- \expandafter\gdef\csname gls@#2@display\endcsname{%
- \glsdisplay}%
+% (see \ics{defglsdisplay} and \ics{defglsdisplayfirst}). These
+% 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
+% \cs{gls@\meta{type}@display} and \cs{gls@\meta{type}@displayfirst}
+% have been defined.}
+% \begin{macrocode}
+ \@ifundefined{gls@#2@display}{%
+ \expandafter\gdef\csname gls@#2@display\endcsname{%
+ \glsdisplay}}{}%
+ \@ifundefined{gls@#2@displayfirst}{%
\expandafter\gdef\csname gls@#2@displayfirst\endcsname{%
- \glsdisplayfirst}%
+ \glsdisplayfirst}}{}%
% \end{macrocode}
% Find out if the final optional argument has been specified, and
% use it to set the counter associated with this glossary. (Uses
@@ -6501,6 +7066,55 @@ counter as its value}}{%
% \end{macrocode}
%\end{key}
%
+% Define some generic user keys. (6 ought to be enough!)
+%\begin{key}{user1}
+% \begin{macrocode}
+\define@key{glossentry}{user1}{%
+ \def\@glo@useri{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%
+%\begin{key}{user2}
+% \begin{macrocode}
+\define@key{glossentry}{user2}{%
+ \def\@glo@userii{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%
+%\begin{key}{user3}
+% \begin{macrocode}
+\define@key{glossentry}{user3}{%
+ \def\@glo@useriii{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%
+%\begin{key}{user4}
+% \begin{macrocode}
+\define@key{glossentry}{user4}{%
+ \def\@glo@useriv{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%
+%\begin{key}{user5}
+% \begin{macrocode}
+\define@key{glossentry}{user5}{%
+ \def\@glo@userv{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%
+%\begin{key}{user6}
+% \begin{macrocode}
+\define@key{glossentry}{user6}{%
+ \def\@glo@uservi{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%
%\begin{macro}{\@glsnoname}
% \changes{1.17}{2008 December 26}{new}
% Define command to generate error if \gloskey{name} key is missing.
@@ -6534,12 +7148,12 @@ counter as its value}}{%
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\newglossaryentry}
% Define \cs{newglossaryentry}%
% \marg{label} \marg{key-val list}.
% There are two required fields in \meta{key-val list}:
-% \gloskey{name} and
+% \gloskey{name} (or \gloskey{parent}) and
% \gloskey{description}. (See above.)
-%\begin{macro}{\newglossaryentry}
% \begin{macrocode}
\DeclareRobustCommand{\newglossaryentry}[2]{%
% \end{macrocode}
@@ -6560,7 +7174,7 @@ counter as its value}}{%
%key'' rather than ``desc key''}
% \begin{macrocode}
\def\@glo@desc{\PackageError{glossaries}{description key required in
-\string\newglossaryentry}{You haven't specified the entry description}}%
+\string\newglossaryentry\space for entry `\@glo@label'}{You haven't specified the entry description}}%
% \end{macrocode}
% \changes{1.12}{2008 Mar 8}{descriptionplural support added}
% \begin{macrocode}
@@ -6618,6 +7232,19 @@ counter as its value}}{%
% \begin{macrocode}
\def\@glo@prefix{}%
% \end{macrocode}
+%\changes{2.04}{2009 November 10}{added user1-6 keys}
+% \begin{macrocode}
+\def\@glo@useri{}%
+\def\@glo@userii{}%
+\def\@glo@useriii{}%
+\def\@glo@useriv{}%
+\def\@glo@userv{}%
+\def\@glo@uservi{}%
+% \end{macrocode}
+% Add start hook in case another package wants to add extra keys.
+% \begin{macrocode}
+ \@newglossaryentryprehook
+% \end{macrocode}
% Extract key-val information from third parameter:
% \begin{macrocode}
\setkeys{glossentry}{#2}%
@@ -6723,12 +7350,30 @@ in it}}{%
% \end{macrocode}
% Define commands associated with this entry:
% \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@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}%
\@gls@sanitizename
\expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}%
% \end{macrocode}
@@ -6797,11 +7442,58 @@ in it}}{%
% is defined}%
% \begin{macrocode}
\@glo@storeentry{#1}%
+% \end{macrocode}
+% Add end hook in case another package wants to add extra keys.
+% \begin{macrocode}
+ \@newglossaryentryposthook
}
% \end{macrocode}
%\changes{1.13}{2008 May 10}{Removed restriction on only using
% 'newglossaryentry in the preamble}
%\end{macro}
+%\begin{macro}{\@newglossaryentryprehook}
+% Allow extra information to be added to glossary entries:
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\@newglossaryentryprehook}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@newglossaryentryposthook}
+% Allow extra information to be added to glossary entries:
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\@newglossaryentryposthook}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@glossaryentryfield}
+% Indicate what command should be used to display each entry in
+% the glossary. (This enables the \sty{glossaries-accsupp} package
+% to use \cs{accsuppglossaryentryfield} instead.)
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\ifglsxindy
+ \newcommand*{\@glossaryentryfield}{\string\\glossaryentryfield}
+\else
+ \newcommand*{\@glossaryentryfield}{\string\glossaryentryfield}
+\fi
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glossarysubentryfield}
+% Indicate what command should be used to display each subentry in
+% the glossary. (This enables the \sty{glossaries-accsupp} package
+% to use \cs{accsuppglossarysubentryfield} instead.)
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\ifglsxindy
+ \newcommand*{\@glossarysubentryfield}{%
+ \string\\glossarysubentryfield}
+\else
+ \newcommand*{\@glossarysubentryfield}{%
+ \string\glossarysubentryfield}
+\fi
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\@glo@storeentry}
%\changes{1.17}{2008 December 26}{new}
@@ -6863,7 +7555,7 @@ in it}}{%
% \begin{macrocode}
\expandafter\protected@xdef\csname glo@#1@index\endcsname{%
(\string"\@glo@sort\string" %
- \string"\@glo@prefix\string\\glossaryentryfield{#1}{\@glo@name
+ \string"\@glo@prefix\@glossaryentryfield{#1}{\@glo@name
}{\@glo@desc}{\@glo@symbol}\string") %
}%
\else
@@ -6873,7 +7565,7 @@ in it}}{%
\expandafter\protected@xdef\csname glo@#1@index\endcsname{%
\csname glo@\@glo@parent @index\endcsname
(\string"\@glo@sort\string" %
- \string"\@glo@prefix\string\\glossarysubentryfield%
+ \string"\@glo@prefix\@glossarysubentryfield%
{\csname glo@#1@level\endcsname}{#1}{\@glo@name
}{\@glo@desc}{\@glo@symbol}\string") %
}%
@@ -6892,7 +7584,7 @@ in it}}{%
% \begin{macrocode}
\expandafter\protected@xdef\csname glo@#1@index\endcsname{%
\@glo@sort\@gls@actualchar\@glo@prefix
- \string\glossaryentryfield{#1}{\@glo@name}{\@glo@desc
+ \@glossaryentryfield{#1}{\@glo@name}{\@glo@desc
}{\@glo@symbol}%
}%
\else
@@ -6902,7 +7594,7 @@ in it}}{%
\expandafter\protected@xdef\csname glo@#1@index\endcsname{%
\csname glo@\@glo@parent @index\endcsname\@gls@levelchar
\@glo@sort\@gls@actualchar\@glo@prefix
- \string\glossarysubentryfield
+ \@glossarysubentryfield
{\csname glo@#1@level\endcsname}{#1}{\@glo@name}{\@glo@desc
}{\@glo@symbol}%
}%
@@ -7745,12 +8437,17 @@ counter as its value}}{%
% Determine what the link text should be (this is stored in
% \cs{@glo@text})
% \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}}}%
+\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}}%
+}%
% \end{macrocode}
% Call \cs{@gls@link}.
% If \pkgopt{footnote} package option has been used and the glossary
@@ -7760,11 +8457,14 @@ counter as its value}}{%
%\changes{1.16}{2008 August 27}{Test glossary type is '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}
% \begin{macrocode}
\ifglsused{#2}{%
\@gls@link[#1]{#2}{\@glo@text}%
}{%
- \ifthenelse{\(\equal{\@glo@type}{\acronymtype}\AND
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
\boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{%
\@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}{%
@@ -7813,12 +8513,19 @@ counter as its value}}{%
% Determine what the link text should be (this is stored in
% \cs{@glo@text})
% \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}}}%
+\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}}%
+}%
% \end{macrocode}
% Call \cs{@gls@link}
% If \pkgopt{footnote} package option has been used and the glossary
@@ -7828,12 +8535,15 @@ counter as its value}}{%
%\changes{1.16}{2008 August 27}{Test glossary type is '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}
% \begin{macrocode}
\ifglsused{#2}{%
\@gls@link[#1]{#2}{%
\expandafter\makefirstuc\expandafter{\@glo@text}}%
}{%
- \ifthenelse{\(\equal{\@glo@type}{\acronymtype}\AND
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
\boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{%
\@gls@link[#1,hyper=false]{#2}{%
\expandafter\makefirstuc\expandafter{\@glo@text}}%
@@ -7881,10 +8591,10 @@ counter as its value}}{%
% Determine what the link text should be (this is stored in
% \cs{@glo@text}).
% \begin{macrocode}
-\ifglsused{#2}{\protected@edef\@glo@text{%
+\ifglsused{#2}{\def\@glo@text{%
\csname gls@\@glo@type @display\endcsname
{\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}}{%
-\protected@edef\@glo@text{%
+\def\@glo@text{%
\csname gls@\@glo@type @displayfirst\endcsname
{\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}}%
% \end{macrocode}
@@ -7896,11 +8606,14 @@ counter as its value}}{%
%\changes{1.16}{2008 August 27}{Test glossary type is '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}
% \begin{macrocode}
\ifglsused{#2}{%
\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
}{%
- \ifthenelse{\(\equal{\@glo@type}{\acronymtype}\AND
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
\boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{%
\@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}%
}{%
@@ -7948,14 +8661,19 @@ counter as its value}}{%
%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and
% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol}
% \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}}}%
+\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}}%
+}%
% \end{macrocode}
% Call \cs{@gls@link}.
% If \pkgopt{footnote} package option has been used and the glossary
@@ -7965,11 +8683,14 @@ counter as its value}}{%
%\changes{1.16}{2008 August 27}{Test glossary type is '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}
% \begin{macrocode}
\ifglsused{#2}{%
\@gls@link[#1]{#2}{\@glo@text}%
}{%
- \ifthenelse{\(\equal{\@glo@type}{\acronymtype}\AND
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
\boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{%
\@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}{%
@@ -8020,14 +8741,19 @@ counter as its value}}{%
%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and
% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol}
% \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}}}%
+\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}}%
+}%
% \end{macrocode}
% Call \cs{@gls@link}.
% If \pkgopt{footnote} package option has been used and the glossary
@@ -8037,12 +8763,15 @@ counter as its value}}{%
%\changes{1.16}{2008 August 27}{Test glossary type is '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}
% \begin{macrocode}
\ifglsused{#2}{%
\@gls@link[#1]{#2}{%
\expandafter\makefirstuc\expandafter{\@glo@text}}%
}{%
- \ifthenelse{\(\equal{\@glo@type}{\acronymtype}\AND
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
\boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{%
\@gls@link[#1,hyper=false]{#2}{%
\expandafter\makefirstuc\expandafter{\@glo@text}}%
@@ -8092,11 +8821,11 @@ counter as its value}}{%
%\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and
% 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol}
% \begin{macrocode}
-\ifglsused{#2}{\protected@edef\@glo@text{%
+\ifglsused{#2}{\def\@glo@text{%
\csname gls@\@glo@type @display\endcsname
{\glsentryplural{#2}}{\glsentrydescplural{#2}}{%
\glsentrysymbolplural{#2}}{#3}}}{%
-\protected@edef\@glo@text{%
+\def\@glo@text{%
\csname gls@\@glo@type @displayfirst\endcsname
{\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}{%
\glsentrysymbolplural{#2}}{#3}}}%
@@ -8109,11 +8838,14 @@ counter as its value}}{%
%\changes{1.16}{2008 August 27}{Test glossary type is '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}
% \begin{macrocode}
\ifglsused{#2}{%
\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
}{%
- \ifthenelse{\(\equal{\@glo@type}{\acronymtype}\AND
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
\boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{%
\@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}%
}{%
@@ -8182,13 +8914,16 @@ counter as its value}}{%
%\changes{1.16}{2008 August 27}{Test glossary type is '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}
% \begin{macrocode}
\ifglsused{#2}%
{%
\@gls@link[#1]{#2}{\@glo@text}%
}%
{%
- \ifthenelse{\(\equal{\@glo@type}{\acronymtype}\AND
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
\boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}%
{%
\@gls@link[#1,hyper=false]{#2}{\@glo@text}%
@@ -9213,6 +9948,630 @@ counter as its value}}{%
}
% \end{macrocode}
%
+% \cs{glsuseri} behaves like \ics{gls} except it always uses the value
+% given by the \gloskey{user1} key and it doesn't mark the entry
+% as used.
+%\begin{macro}{\glsuseri}
+% \begin{macrocode}
+\newcommand*{\glsuseri}{\@ifstar\@sglsuseri\@glsuseri}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sglsuseri}[1][]{\@glsuseri[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@glsuseri}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\@glo@text#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{Glsuseri} behaves like \ics{glsuseri} except that the
+% first letter is converted to uppercase.
+%\begin{macro}{\Glsuseri}
+% \begin{macrocode}
+\newcommand*{\Glsuseri}{\@ifstar\@sGlsuseri\@Glsuseri}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGlsuseri}[1][]{\@Glsuseri[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@Glsuseri}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{%
+ \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{GLSuseri} behaves like \ics{glsuseri} except that the
+% link text is converted to uppercase.
+%\begin{macro}{\GLSuseri}
+% \begin{macrocode}
+\newcommand*{\GLSuseri}{\@ifstar\@sGLSuseri\@GLSuseri}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGLSuseri}[1][]{\@GLSuseri[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@GLSuseri}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{glsuserii} behaves like \ics{gls} except it always uses the value
+% given by the \gloskey{user2} key and it doesn't mark the entry
+% as used.
+%\begin{macro}{\glsuserii}
+% \begin{macrocode}
+\newcommand*{\glsuserii}{\@ifstar\@sglsuserii\@glsuserii}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sglsuserii}[1][]{\@glsuserii[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@glsuserii}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\@glo@text#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{Glsuserii} behaves like \ics{glsuserii} except that the
+% first letter is converted to uppercase.
+%\begin{macro}{\Glsuserii}
+% \begin{macrocode}
+\newcommand*{\Glsuserii}{\@ifstar\@sGlsuserii\@Glsuserii}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGlsuserii}[1][]{\@Glsuserii[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@Glsuserii}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{%
+ \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{GLSuserii} behaves like \ics{glsuserii} except that the
+% link text is converted to uppercase.
+%\begin{macro}{\GLSuserii}
+% \begin{macrocode}
+\newcommand*{\GLSuserii}{\@ifstar\@sGLSuserii\@GLSuserii}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGLSuserii}[1][]{\@GLSuserii[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@GLSuserii}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{glsuseriii} behaves like \ics{gls} except it always uses the value
+% given by the \gloskey{user3} key and it doesn't mark the entry
+% as used.
+%\begin{macro}{\glsuseriii}
+% \begin{macrocode}
+\newcommand*{\glsuseriii}{\@ifstar\@sglsuseriii\@glsuseriii}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sglsuseriii}[1][]{\@glsuseriii[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@glsuseriii}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\@glo@text#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{Glsuseriii} behaves like \ics{glsuseriii} except that the
+% first letter is converted to uppercase.
+%\begin{macro}{\Glsuseriii}
+% \begin{macrocode}
+\newcommand*{\Glsuseriii}{\@ifstar\@sGlsuseriii\@Glsuseriii}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGlsuseriii}[1][]{\@Glsuseriii[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@Glsuseriii}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{%
+ \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{GLSuseriii} behaves like \ics{glsuseriii} except that the
+% link text is converted to uppercase.
+%\begin{macro}{\GLSuseriii}
+% \begin{macrocode}
+\newcommand*{\GLSuseriii}{\@ifstar\@sGLSuseriii\@GLSuseriii}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGLSuseriii}[1][]{\@GLSuseriii[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@GLSuseriii}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{glsuseriv} behaves like \ics{gls} except it always uses the value
+% given by the \gloskey{user4} key and it doesn't mark the entry
+% as used.
+%\begin{macro}{\glsuseriv}
+% \begin{macrocode}
+\newcommand*{\glsuseriv}{\@ifstar\@sglsuseriv\@glsuseriv}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sglsuseriv}[1][]{\@glsuseriv[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@glsuseriv}[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}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\@glo@text#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{Glsuseriv} behaves like \ics{glsuseriv} except that the
+% first letter is converted to uppercase.
+%\begin{macro}{\Glsuseriv}
+% \begin{macrocode}
+\newcommand*{\Glsuseriv}{\@ifstar\@sGlsuseriv\@Glsuseriv}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGlsuseriv}[1][]{\@Glsuseriv[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@Glsuseriv}[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}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{%
+ \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{GLSuseriv} behaves like \ics{glsuseriv} except that the
+% link text is converted to uppercase.
+%\begin{macro}{\GLSuseriv}
+% \begin{macrocode}
+\newcommand*{\GLSuseriv}{\@ifstar\@sGLSuseriv\@GLSuseriv}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGLSuseriv}[1][]{\@GLSuseriv[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@GLSuseriv}[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}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{glsuserv} behaves like \ics{gls} except it always uses the value
+% given by the \gloskey{user5} key and it doesn't mark the entry
+% as used.
+%\begin{macro}{\glsuserv}
+% \begin{macrocode}
+\newcommand*{\glsuserv}{\@ifstar\@sglsuserv\@glsuserv}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sglsuserv}[1][]{\@glsuserv[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@glsuserv}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\@glo@text#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{Glsuserv} behaves like \ics{glsuserv} except that the
+% first letter is converted to uppercase.
+%\begin{macro}{\Glsuserv}
+% \begin{macrocode}
+\newcommand*{\Glsuserv}{\@ifstar\@sGlsuserv\@Glsuserv}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGlsuserv}[1][]{\@Glsuserv[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@Glsuserv}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{%
+ \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{GLSuserv} behaves like \ics{glsuserv} except that the
+% link text is converted to uppercase.
+%\begin{macro}{\GLSuserv}
+% \begin{macrocode}
+\newcommand*{\GLSuserv}{\@ifstar\@sGLSuserv\@GLSuserv}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGLSuserv}[1][]{\@GLSuserv[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@GLSuserv}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{glsuservi} behaves like \ics{gls} except it always uses the value
+% given by the \gloskey{user6} key and it doesn't mark the entry
+% as used.
+%\begin{macro}{\glsuservi}
+% \begin{macrocode}
+\newcommand*{\glsuservi}{\@ifstar\@sglsuservi\@glsuservi}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sglsuservi}[1][]{\@glsuservi[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@glsuservi}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\@glo@text#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{Glsuservi} behaves like \ics{glsuservi} except that the
+% first letter is converted to uppercase.
+%\begin{macro}{\Glsuservi}
+% \begin{macrocode}
+\newcommand*{\Glsuservi}{\@ifstar\@sGlsuservi\@Glsuservi}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGlsuservi}[1][]{\@Glsuservi[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@Glsuservi}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{%
+ \expandafter\makefirstuc\expandafter{\@glo@text}#3}%
+}%
+}
+% \end{macrocode}
+%
+% \cs{GLSuservi} behaves like \ics{glsuservi} except that the
+% link text is converted to uppercase.
+%\begin{macro}{\GLSuservi}
+% \begin{macrocode}
+\newcommand*{\GLSuservi}{\@ifstar\@sGLSuservi\@GLSuservi}
+% \end{macrocode}
+%\end{macro}
+% Define the starred form:
+% \begin{macrocode}
+\newcommand*{\@sGLSuservi}[1][]{\@GLSuservi[hyper=false,#1]}
+% \end{macrocode}
+% Defined the un-starred form. Need to determine if there is
+% a final optional argument
+% \begin{macrocode}
+\newcommand*{\@GLSuservi}[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}}%
+% \end{macrocode}
+% Call \cs{@gls@link}
+% \begin{macrocode}
+\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}%
+}%
+}
+% \end{macrocode}
+%
% \subsubsection{Displaying entry details without adding
% information to the glossary}
%\label{sec:code:glsnolink}
@@ -9388,6 +10747,114 @@ counter as its value}}{%
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsentryuseri}
+% Get the first user key (as specified by the
+% \gloskey{user1} when the entry was defined). The argument
+% is the label associated with the entry.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\glsentryuseri}[1]{\csname glo@#1@useri\endcsname}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryuseri}
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\Glsentryuseri}[1]{%
+\protected@edef\@glo@text{\csname glo@#1@useri\endcsname}%
+\expandafter\makefirstuc\expandafter{\@glo@text}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsentryuserii}
+% Get the second user key (as specified by the
+% \gloskey{user2} when the entry was defined). The argument
+% is the label associated with the entry.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\glsentryuserii}[1]{\csname glo@#1@userii\endcsname}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryuserii}
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\Glsentryuserii}[1]{%
+\protected@edef\@glo@text{\csname glo@#1@userii\endcsname}%
+\expandafter\makefirstuc\expandafter{\@glo@text}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsentryuseriii}
+% Get the third user key (as specified by the
+% \gloskey{user3} when the entry was defined). The argument
+% is the label associated with the entry.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\glsentryuseriii}[1]{\csname glo@#1@useriii\endcsname}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryuseriii}
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\Glsentryuseriii}[1]{%
+\protected@edef\@glo@text{\csname glo@#1@useriii\endcsname}%
+\expandafter\makefirstuc\expandafter{\@glo@text}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsentryuseriv}
+% Get the fourth user key (as specified by the
+% \gloskey{user4} when the entry was defined). The argument
+% is the label associated with the entry.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\glsentryuseriv}[1]{\csname glo@#1@useriv\endcsname}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryuseriv}
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\Glsentryuseriv}[1]{%
+\protected@edef\@glo@text{\csname glo@#1@useriv\endcsname}%
+\expandafter\makefirstuc\expandafter{\@glo@text}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsentryuserv}
+% Get the fifth user key (as specified by the
+% \gloskey{user5} when the entry was defined). The argument
+% is the label associated with the entry.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\glsentryuserv}[1]{\csname glo@#1@userv\endcsname}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryuserv}
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\Glsentryuserv}[1]{%
+\protected@edef\@glo@text{\csname glo@#1@userv\endcsname}%
+\expandafter\makefirstuc\expandafter{\@glo@text}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsentryuservi}
+% Get the sixth user key (as specified by the
+% \gloskey{user6} when the entry was defined). The argument
+% is the label associated with the entry.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\glsentryuservi}[1]{\csname glo@#1@uservi\endcsname}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Glsentryuservi}
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\Glsentryuservi}[1]{%
+\protected@edef\@glo@text{\csname glo@#1@uservi\endcsname}%
+\expandafter\makefirstuc\expandafter{\@glo@text}}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\glshyperlink}
% Provide a hyperlink to a glossary entry without adding information
% to the glossary file. The entry needs to be added using a
@@ -9408,7 +10875,7 @@ counter as its value}}{%
% The following keys are provided for \cs{glsadd} and
% \cs{glsaddall}:
% \begin{macrocode}
-\define@key{glossadd}{counter}{\def\@glo@counter{#1}}
+\define@key{glossadd}{counter}{\def\@gls@counter{#1}}
\define@key{glossadd}{format}{\def\@glo@format{#1}}
% \end{macrocode}
% This key is only used by \cs{glsaddall}:
@@ -9424,6 +10891,7 @@ counter as its value}}{%
% only has two keys: \gloskey[glsadd]{counter} and \gloskey[glsadd]{format} (the \gloskey[glsaddall]{types} key will be ignored).
%\begin{macro}{\glsadd}
%\changes{1.07}{2007 Sep 13}{fixed bug caused by \cs{theglsentrycounter} setting the page number too soon}
+%\changes{2.04}{2009 November 10}{fixed bug that ignored counter}
% \begin{macrocode}
\newcommand*{\glsadd}[2][]{%
\glsdoifexists{#2}{%
@@ -10303,6 +11771,14 @@ using \string\makeglossary}}}
% \begin{macrocode}
\@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}%
% \end{macrocode}
+% If the glossary file doesn't exist, do \cs{null}. (This ensures
+% that the page is shipped out and all write commands are done.)
+% This might produce an empty page, but at this point the document
+% isn't complete, so it shouldn't matter.
+% \begin{macrocode}
+\IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}{}%
+{\null}%
+% \end{macrocode}
% If \appname{xindy} is being used, need to write the language
% dependent information to the \filetype{.aux} file for
% \appname{makeglossaries}.
@@ -10800,46 +12276,8 @@ style `#1' undefined}{}}{%
%and \ics{acronymtype} is set to the name of this new glossary.
% \begin{macrocode}
\renewcommand*{\acronymtype}{acronym}
-% \end{macrocode}
-% In the event that the user redefines \ics{glsdisplay}
-% and \ics{glsdisplayfirst}, the relevant commands for
-% the new acronym glossary are set to match the format
-% given by \ics{newacronym}. If you redefine
-% \ics{newacronym} you may need to set these to something
-% else.
-% \begin{macrocode}
- \defglsdisplay[acronym]{#1#4}
- \defglsdisplayfirst[acronym]{#1#4}
\fi
% \end{macrocode}
-%\vskip5pt
-% \cs{newacronym}\oarg{key-val list}\marg{label}\marg{abbrev}\marg{long}\\[10pt]
-% This is a quick way of defining acronyms, all it does
-% is call \ics{newglossaryentry} with the appropriate
-% values. It sets the
-% glossary type to \ics{acronymtype} which will be
-% "acronym" if the package option \pkgopt{acronym} has
-% been used, otherwise it will be the default glossary.
-% Since \cs{newacronym} merely calls \ics{newglossaryentry},
-% the acronym is treated like any other glossary entry.
-%
-% If you prefer a different format, you
-% can redefine \cs{newacronym} as required. The optional
-% argument can be used to override any of the settings.
-%\begin{macro}{\newacronym}
-% \begin{macrocode}
-\newcommand{\newacronym}[4][]{%
-\newglossaryentry{#2}{type=\acronymtype,%
-name={#3},description={#4},text={#3},%
-descriptionplural={#4\acrpluralsuffix},%
-first={#4 (#3)},plural={#3\acrpluralsuffix},%
-firstplural={\@glo@descplural\space (\@glo@plural)},%
-#1}}
-% \end{macrocode}
-%\changes{1.13}{2008 May 10}{Removed restriction on only using
-% 'newacronym in the preamble}
-%\end{macro}
-%
%\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
@@ -10880,7 +12318,30 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
}
% \end{macrocode}
%\end{macro}
+%\vskip5pt
+% \cs{newacronym}\oarg{key-val list}\marg{label}\marg{abbrev}\marg{long}\\[10pt]
+% This is a quick way of defining acronyms, all it does
+% is call \ics{newglossaryentry} with the appropriate
+% values. It sets the
+% glossary type to \ics{acronymtype} which will be
+% "acronym" if the package option \pkgopt{acronym} has
+% been used, otherwise it will be the default glossary.
+% Since \cs{newacronym} merely calls \ics{newglossaryentry},
+% the acronym is treated like any other glossary entry.
%
+% If you prefer a different format, you
+% can redefine \cs{newacronym} as required. The optional
+% argument can be used to override any of the settings.
+%
+% This is just a stub. It's redefined by commands like
+% \cs{SetDefaultAcronymStyle}.
+%\begin{macro}{\newacronym}
+% \begin{macrocode}
+ \newcommand{\newacronym}[4][]{}
+% \end{macrocode}
+%\changes{1.13}{2008 May 10}{Removed restriction on only using
+% '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
% is changed).
@@ -10928,24 +12389,21 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\begin{macro}{\acrshort}
% \begin{macrocode}
\newcommand*{\acrshort}[2][]{%
-\new@ifnextchar[{\@acrshort{#1}{#2}}{\@acrshort{#1}{#2}[]}}
-\def\@acrshort#1#2[#3]{\@glstext@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@acrshort{#1}{#2}}{\@acrshort{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Acrshort}
%\changes{1.13}{2008 May 10}{fixed bug that used all lower case version}
% \begin{macrocode}
\newcommand*{\Acrshort}[2][]{%
-\new@ifnextchar[{\@Acrshort{#1}{#2}}{\@Acrshort{#1}{#2}[]}}
-\def\@Acrshort#1#2[#3]{\@Glstext@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@Acrshort{#1}{#2}}{\@Acrshort{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ACRshort}
%\changes{1.13}{2008 May 10}{fixed bug that used all lower case version}
% \begin{macrocode}
\newcommand*{\ACRshort}[2][]{%
-\new@ifnextchar[{\@ACRshort{#1}{#2}}{\@ACRshort{#1}{#2}[]}}
-\def\@ACRshort#1#2[#3]{\@GLStext@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@ACRshort{#1}{#2}}{\@ACRshort{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
% Plural:
@@ -10953,24 +12411,21 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\acrshortpl}[2][]{%
-\new@ifnextchar[{\@acrshortpl{#1}{#2}}{\@acrshortpl{#1}{#2}[]}}
-\def\@acrshortpl#1#2[#3]{\@glsplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@acrshortpl{#1}{#2}}{\@acrshortpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Acrshortpl}
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\Acrshortpl}[2][]{%
-\new@ifnextchar[{\@Acrshortpl{#1}{#2}}{\@Acrshortpl{#1}{#2}[]}}
-\def\@Acrshortpl#1#2[#3]{\@Glsplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@Acrshortpl{#1}{#2}}{\@Acrshortpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ACRshortpl}
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\ACRshortpl}[2][]{%
-\new@ifnextchar[{\@ACRshortpl{#1}{#2}}{\@ACRshortpl{#1}{#2}[]}}
-\def\@ACRshortpl#1#2[#3]{\@GLSplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@ACRshortpl{#1}{#2}}{\@ACRshortpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%
@@ -10979,24 +12434,21 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\begin{macro}{\acrlong}
% \begin{macrocode}
\newcommand*{\acrlong}[2][]{%
-\new@ifnextchar[{\@acrlong{#1}{#2}}{\@acrlong{#1}{#2}[]}}
-\def\@acrlong#1#2[#3]{\@glsdesc@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@acrlong{#1}{#2}}{\@acrlong{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Acrlong}
%\changes{1.13}{2008 May 10}{fixed bug that used all lower case version}
% \begin{macrocode}
\newcommand*{\Acrlong}[2][]{%
-\new@ifnextchar[{\@Acrlong{#1}{#2}}{\@Acrlong{#1}{#2}[]}}
-\def\@Acrlong#1#2[#3]{\@Glsdesc@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@Acrlong{#1}{#2}}{\@Acrlong{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ACRlong}
%\changes{1.13}{2008 May 10}{fixed bug that used all lower case version}
% \begin{macrocode}
\newcommand*{\ACRlong}[2][]{%
-\new@ifnextchar[{\@ACRlong{#1}{#2}}{\@ACRlong{#1}{#2}[]}}
-\def\@ACRlong#1#2[#3]{\@GLSdesc@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@ACRlong{#1}{#2}}{\@ACRlong{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
% Plural:
@@ -11004,24 +12456,21 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\acrlongpl}[2][]{%
-\new@ifnextchar[{\@acrlongpl{#1}{#2}}{\@acrlongpl{#1}{#2}[]}}
-\def\@acrlongpl#1#2[#3]{\@glsdescplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@acrlongpl{#1}{#2}}{\@acrlongpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Acrlongpl}
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\Acrlongpl}[2][]{%
-\new@ifnextchar[{\@Acrlongpl{#1}{#2}}{\@Acrlongpl{#1}{#2}[]}}
-\def\@Acrlongpl#1#2[#3]{\@Glsdescplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@Acrlongpl{#1}{#2}}{\@Acrlongpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ACRlongpl}
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\ACRlongpl}[2][]{%
-\new@ifnextchar[{\@ACRlongpl{#1}{#2}}{\@ACRlongpl{#1}{#2}[]}}
-\def\@ACRlongpl#1#2[#3]{\@GLSdescplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@ACRlongpl{#1}{#2}}{\@ACRlongpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%
@@ -11031,22 +12480,19 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\begin{macro}{\acrfull}
% \begin{macrocode}
\newcommand*{\acrfull}[2][]{%
-\new@ifnextchar[{\@acrfull{#1}{#2}}{\@acrfull{#1}{#2}[]}}
-\def\@acrfull#1#2[#3]{\@glsfirst@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@acrfull{#1}{#2}}{\@acrfull{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Acrfull}
% \begin{macrocode}
\newcommand*{\Acrfull}[2][]{%
-\new@ifnextchar[{\@Acrfull{#1}{#2}}{\@Acrfull{#1}{#2}[]}}
-\def\@Acrfull#1#2[#3]{\@Glsfirst@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@Acrfull{#1}{#2}}{\@Acrfull{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ACRfull}
% \begin{macrocode}
\newcommand*{\ACRfull}[2][]{%
-\new@ifnextchar[{\@ACRfull{#1}{#2}}{\@ACRfull{#1}{#2}[]}}
-\def\@ACRfull#1#2[#3]{\@GLSfirst@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@ACRfull{#1}{#2}}{\@ACRfull{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
% Plural:
@@ -11054,28 +12500,25 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\acrfullpl}[2][]{%
-\new@ifnextchar[{\@acrfullpl{#1}{#2}}{\@acrfullpl{#1}{#2}[]}}
-\def\@acrfullpl#1#2[#3]{\@glsfirstplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@acrfullpl{#1}{#2}}{\@acrfullpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\Acrfullpl}
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\Acrfullpl}[2][]{%
-\new@ifnextchar[{\@Acrfullpl{#1}{#2}}{\@Acrfullpl{#1}{#2}[]}}
-\def\@Acrfullpl#1#2[#3]{\@Glsfirstplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@Acrfullpl{#1}{#2}}{\@Acrfullpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ACRfullpl}
%\changes{1.13}{2008 May 10}{new}
% \begin{macrocode}
\newcommand*{\ACRfullpl}[2][]{%
-\new@ifnextchar[{\@ACRfullpl{#1}{#2}}{\@ACRfullpl{#1}{#2}[]}}
-\def\@ACRfullpl#1#2[#3]{\@GLSfirstplural@{#1}{#2}[#3]}
+ \new@ifnextchar[{\@ACRfullpl{#1}{#2}}{\@ACRfullpl{#1}{#2}[]}}
% \end{macrocode}
%\end{macro}
%
-%\subsection{Additional predefined acronym styles}
+%\subsection{Predefined acronym styles}
%\begin{macro}{\acronymfont}
%This is only used with the additional acronym styles:
% \begin{macrocode}
@@ -11097,76 +12540,245 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\newcommand*{\acrnameformat}[2]{\acronymfont{#1}}
% \end{macrocode}
%\end{macro}
+%
+% Define some tokens used by \cs{newacronym}:
+%\begin{macro}{\glskeylisttok}
% \begin{macrocode}
-\ifglsacrdescription
+\newtoks\glskeylisttok
% \end{macrocode}
-%
+%\end{macro}
+%\begin{macro}{\glslabeltok}
+% \begin{macrocode}
+\newtoks\glslabeltok
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsshorttok}
+% \begin{macrocode}
+\newtoks\glsshorttok
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glslongtok}
+% \begin{macrocode}
+\newtoks\glslongtok
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\newacronymhook}
+% Provide a hook for \cs{newacronym}:
+% \begin{macrocode}
+\newcommand*{\newacronymhook}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SetDefaultAcronymDisplayStyle}
+% Sets the default acronym display style for given glossary.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\SetDefaultAcronymDisplayStyle}[1]{%
+ \defglsdisplay[#1]{##1##4}%
+ \defglsdisplayfirst[#1]{##1##4}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DefaultNewAcronymDef}
+% Sets up the acronym definition for the default style.
+% The information is provided by the tokens \cs{glslabeltok},
+% \cs{glsshorttok}, \cs{glslongtok} and \cs{glskeylisttok}.
+% \begin{macrocode}
+\newcommand*{\DefaultNewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\the\glsshorttok},%
+ description={\the\glslongtok},%
+ text={\the\glsshorttok},%
+ sort={\the\glsshorttok},%
+ descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ first={\the\glslongtok\space(\the\glsshorttok)},%
+ plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ firstplural={\noexpand\@glo@descplural\space
+ (\noexpand\@glo@plural)},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SetDefaultAcronymStyle}
+%\changes{2.04}{2009 November 10}{new}
+% Set up the default acronym style:
+% \begin{macrocode}
+\newcommand*{\SetDefaultAcronymStyle}{%
+% \end{macrocode}
+% Set the display style:
+% \begin{macrocode}
+ \@for\@gls@type:=\@glsacronymlists\do{%
+ \SetDefaultAcronymDisplayStyle{\@gls@type}%
+ }%
+% \end{macrocode}
+% Set up the definition of \cs{newacronym}:
+% \begin{macrocode}
+ \renewcommand{\newacronym}[4][]{%
+% \end{macrocode}
+% If user is just using the main glossary and hasn't identified it
+% as a list of acronyms, then update. (This is done to ensure
+% backwards compatibility with versions prior to 2.04).
+% \begin{macrocode}
+ \ifx\@glsacronymlists\@empty
+ \def\@glo@type{\acronymtype}%
+ \setkeys{glossentry}{##1}%
+ \DeclareAcronymList{\@glo@type}%
+ \SetDefaultAcronymDisplayStyle{\@glo@type}%
+ \fi
+ \glskeylisttok{##1}%
+ \glslabeltok{##2}%
+ \glsshorttok{##3}%
+ \glslongtok{##4}%
+ \newacronymhook
+ \DefaultNewAcronymDef
+ }%
+% \end{macrocode}
+% Define short cuts.
+% \begin{macrocode}
+ \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}%
+ \renewcommand*{\glsshortkey}{text}%
+ \renewcommand*{\glsshortpluralkey}{plural}%
+ \renewcommand*{\glslongkey}{description}%
+ \renewcommand*{\glslongpluralkey}{descriptionplural}%
+ \def\@acrshort##1##2[##3]{\@glstext@{##1}{##2}[##3]}%
+ \def\@Acrshort##1##2[##3]{\@Glstext@{##1}{##2}[##3]}%
+ \def\@ACRshort##1##2[##3]{\@GLStext@{##1}{##2}[##3]}%
+ \def\@acrshortpl##1##2[##3]{\@glsplural@{##1}{##2}[##3]}%
+ \def\@Acrshortpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3]}%
+ \def\@ACRshortpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3]}%
+ \def\@acrlong##1##2[##3]{\@glsdesc@{##1}{##2}[##3]}%
+ \def\@Acrlong##1##2[##3]{\@Glsdesc@{##1}{##2}[##3]}%
+ \def\@ACRlong##1##2[##3]{\@GLSdesc@{##1}{##2}[##3]}%
+ \def\@acrlongpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3]}%
+ \def\@Acrlongpl##1##2[##3]{\@Glsdescplural@{##1}{##2}[##3]}%
+ \def\@ACRlongpl##1##2[##3]{\@GLSdescplural@{##1}{##2}[##3]}%
+ \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}%
+ \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}%
+ \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}%
+ \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}%
+ \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}%
+ \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\SetDescriptionFootnoteAcronymDisplayStyle}
+% Sets the acronym display style for given glossary for the
+% description and footnote combination.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\SetDescriptionFootnoteAcronymDisplayStyle}[1]{%
+ \defglsdisplayfirst[#1]{%
+ \firstacronymfont{##1}##4%
+ \protect\footnote{%
+ \glslink[\@gls@link@opts]{\@gls@link@label}{##3}}}%
+ \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},%
+ symbol={\the\glslongtok},%
+ symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SetDescriptionFootnoteAcronymStyle}
% If a description and footnote are both required, store the long form
% in the \gloskey{symbol} key. Store the short form in \gloskey{text}
% key. Note that since the long form is stored in the symbol key,
% if you want the long form to appear in the list of acronyms, you
% need to use a glossary style that displays the symbol key.
% \begin{macrocode}
- \ifglsacrfootnote
- \renewcommand{\newacronym}[4][]{%
- \newglossaryentry{#2}{type=\acronymtype,%
- name={\acronymfont{#3}},%
- sort={#3},%
- text={#3},%
- plural={#3\acrpluralsuffix},%
- symbol={#4},%
- symbolplural={#4\acrpluralsuffix},%
- #1}}
+\newcommand*{\SetDescriptionFootnoteAcronymStyle}{%
+ \renewcommand{\newacronym}[4][]{%
+ \ifx\@glsacronymlists\@empty
+ \def\@glo@type{\acronymtype}%
+ \setkeys{glossentry}{##1}%
+ \DeclareAcronymList{\@glo@type}%
+ \SetDescriptionFootnoteAcronymDisplayStyle{\@glo@type}%
+ \fi
+ \glskeylisttok{##1}%
+ \glslabeltok{##2}%
+ \glsshorttok{##3}%
+ \glslongtok{##4}%
+ \newacronymhook
+ \DescriptionFootnoteNewAcronymDef
+ }%
% \end{macrocode}
% Set up the commands to make a note of the keys to store the long
% and short forms:
% \begin{macrocode}
- \def\glsshortkey{text}%
- \def\glsshortpluralkey{plural}%
- \def\glslongkey{symbol}%
- \def\glslongpluralkey{symbolplural}%
+ \def\glsshortkey{text}%
+ \def\glsshortpluralkey{plural}%
+ \def\glslongkey{symbol}%
+ \def\glslongpluralkey{symbolplural}%
% \end{macrocode}
% Set up short cuts. Short form:
% \begin{macrocode}
- \def\@acrshort#1#2[#3]{\acronymfont{\@glstext@{#1}{#2}[#3]}}
- \def\@Acrshort#1#2[#3]{\acronymfont{\@Glstext@{#1}{#2}[#3]}}
- \def\@ACRshort#1#2[#3]{\acronymfont{\@GLStext@{#1}{#2}[#3]}}
+ \def\@acrshort##1##2[##3]{%
+ \acronymfont{\@glstext@{##1}{##2}[##3]}}%
+ \def\@Acrshort##1##2[##3]{%
+ \acronymfont{\@Glstext@{##1}{##2}[##3]}}%
+ \def\@ACRshort##1##2[##3]{%
+ \acronymfont{\@GLStext@{##1}{##2}[##3]}}%
% \end{macrocode}
% Plural form:
% \begin{macrocode}
- \def\@acrshortpl#1#2[#3]{\acronymfont{\@glsplural@{#1}{#2}[#3]}}
- \def\@Acrshortpl#1#2[#3]{\acronymfont{\@Glsplural@{#1}{#2}[#3]}}
- \def\@ACRshortpl#1#2[#3]{\acronymfont{\@GLSplural@{#1}{#2}[#3]}}
+ \def\@acrshortpl##1##2[##3]{%
+ \acronymfont{\@glsplural@{##1}{##2}[##3]}}%
+ \def\@Acrshortpl##1##2[##3]{%
+ \acronymfont{\@Glsplural@{##1}{##2}[##3]}}%
+ \def\@ACRshortpl##1##2[##3]{%
+ \acronymfont{\@GLSplural@{##1}{##2}[##3]}}%
% \end{macrocode}
% Long form:
% \begin{macrocode}
- \def\@acrlong#1#2[#3]{\@glssymbol@{#1}{#2}[#3]}
- \def\@Acrlong#1#2[#3]{\@Glssymbol@{#1}{#2}[#3]}
- \def\@ACRlong#1#2[#3]{\@GLSsymbol@{#1}{#2}[#3]}
+ \def\@acrlong##1##2[##3]{\@glssymbol@{##1}{##2}[##3]}%
+ \def\@Acrlong##1##2[##3]{\@Glssymbol@{##1}{##2}[##3]}%
+ \def\@ACRlong##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3]}%
% \end{macrocode}
% Plural long form:
% \begin{macrocode}
- \def\@acrlongpl#1#2[#3]{\@glssymbolplural@{#1}{#2}[#3]}
- \def\@Acrlongpl#1#2[#3]{\@Glssymbolplural@{#1}{#2}[#3]}
- \def\@ACRlongpl#1#2[#3]{\@GLSsymbolplural@{#1}{#2}[#3]}
+ \def\@acrlongpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3]}%
+ \def\@Acrlongpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3]}%
+ \def\@ACRlongpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3]}%
% \end{macrocode}
% Full form:
% \begin{macrocode}
- \def\@acrfull#1#2[#3]{\@glssymbol@{#1}{#2}[#3]
- (\acronymfont{\@glstext@{#1}{#2}[#3]})}
- \def\@Acrfull#1#2[#3]{\@Glssymbol@{#1}{#2}[#3]
- (\acronymfont{\@glstext@{#1}{#2}[#3]})}
- \def\@ACRfull#1#2[#3]{\@GLSsymbol@{#1}{#2}[#3]
- (\acronymfont{\@GLStext@{#1}{#2}[#3]})}
+ \def\@acrfull##1##2[##3]{\@glssymbol@{##1}{##2}[##3]
+ (\acronymfont{\@glstext@{##1}{##2}[##3]})}%
+ \def\@Acrfull##1##2[##3]{\@Glssymbol@{##1}{##2}[##3]
+ (\acronymfont{\@glstext@{##1}{##2}[##3]})}%
+ \def\@ACRfull##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3]
+ (\acronymfont{\@GLStext@{##1}{##2}[##3]})}%
% \end{macrocode}
% Plural full form:
% \begin{macrocode}
- \def\@acrfullpl#1#2[#3]{\@glssymbolplural@{#1}{#2}[#3]
- (\acronymfont{\@glsplural@{#1}{#2}[#3]})}
- \def\@Acrfullpl#1#2[#3]{\@Glssymbolplural@{#1}{#2}[#3]
- (\acronymfont{\@glsplural@{#1}{#2}[#3]})}
- \def\@ACRfullpl#1#2[#3]{\@GLSsymbolplural@{#1}{#2}[#3]
- (\acronymfont{\@GLSplural@{#1}{#2}[#3]})}
+ \def\@acrfullpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3]
+ (\acronymfont{\@glsplural@{##1}{##2}[##3]})}%
+ \def\@Acrfullpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3]
+ (\acronymfont{\@glsplural@{##1}{##2}[##3]})}%
+ \def\@ACRfullpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3]
+ (\acronymfont{\@GLSplural@{##1}{##2}[##3]})}%
% \end{macrocode}
%
% If \pkgopt{footnote} package option is specified, set the first
@@ -11175,11 +12787,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\changes{1.12}{2008 Mar 8}{Added 'protect before 'footnote
% and 'glslink}
% \begin{macrocode}
- \defglsdisplayfirst[\acronymtype]{%
- \firstacronymfont{#1}#4\noexpand\protect\noexpand\footnote{%
- \noexpand\protect\noexpand\glslink
- [\@gls@link@opts]{\@gls@link@label}{#3}}}%
- \defglsdisplay[\acronymtype]{\acronymfont{#1}#4}%
+ \@for\@gls@type:=\@glsacronymlists\do{%
+ \SetDescriptionFootnoteAcronymDisplayStyle{\@gls@type}%
+ }%
% \end{macrocode}
% Redefine \ics{acronymfont} if small caps required. The plural suffix
% is set in an upright font so that it remains in normal lower case,
@@ -11187,108 +12797,188 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead
%of 'smaller}
% \begin{macrocode}
- \ifglsacrsmallcaps
- \renewcommand*{\acronymfont}[1]{\textsc{#1}}%
- \renewcommand*{\acrpluralsuffix}{%
- \textup{\glspluralsuffix}}%
- \else
- \ifglsacrsmaller
- \renewcommand*{\acronymfont}[1]{\textsmaller{#1}}%
- \fi
- \fi
+ \ifglsacrsmallcaps
+ \renewcommand*{\acronymfont}[1]{\textsc{##1}}%
+ \renewcommand*{\acrpluralsuffix}{%
+ \textup{\glspluralsuffix}}%
+ \else
+ \ifglsacrsmaller
+ \renewcommand*{\acronymfont}[1]{\textsmaller{##1}}%
+ \fi
+ \fi
% \end{macrocode}
% Check for package option clash
% \begin{macrocode}
- \ifglsacrdua
- \PackageError{glossaries}{Option clash: `footnote' and `dua'
- can't both be set}{}%
- \fi
- \else
+ \ifglsacrdua
+ \PackageError{glossaries}{Option clash: `footnote' and `dua'
+ can't both be set}{}%
+ \fi
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\SetDescriptionDUAAcronymDisplayStyle}
+% Sets the acronym display style for given glossary with
+% description and dua combination.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\SetDescriptionDUAAcronymDisplayStyle}[1]{%
+ \defglsdisplay[#1]{##1##4}%
+ \defglsdisplayfirst[#1]{##1##4}%
+}
% \end{macrocode}
-% Footnote not required. Should the acronym always be expanded?
+%\end{macro}
+%\begin{macro}{\DescriptionDUANewAcronymDef}
+% \begin{macrocode}
+\newcommand*{\DescriptionDUANewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\the\glslongtok},%
+ sort={\the\glslongtok},
+ text={\the\glslongtok},%
+ plural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ symbol={\the\glsshorttok},%
+ symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SetDescriptionDUAAcronymStyle}
+% Description, don't use acronym and no footnote.
% Note that the short form is stored in the \gloskey{symbol} key,
% so if the short form needs to be displayed in the glossary,
% use a style the displays the symbol.
% \begin{macrocode}
- \ifglsacrdua
- \ifglsacrsmallcaps
- \PackageError{glossaries}{Option clash: `smallcaps' and `dua'
- can't both be set}{}%
- \else
- \ifglsacrsmaller
- \PackageError{glossaries}{Option clash: `smaller' and `dua'
- can't both be set}{}%
- \fi
- \fi
- \renewcommand{\newacronym}[4][]{%
- \newglossaryentry{#2}{type=\acronymtype,%
- name={#4},%
- sort={#4},
- text={#4},%
- plural={#4\acrpluralsuffix},%
- symbol={#3},%
- symbolplural={#3\acrpluralsuffix},%
- #1}}
+\newcommand*{\SetDescriptionDUAAcronymStyle}{%
+ \ifglsacrsmallcaps
+ \PackageError{glossaries}{Option clash: `smallcaps' and `dua'
+ can't both be set}{}%
+ \else
+ \ifglsacrsmaller
+ \PackageError{glossaries}{Option clash: `smaller' and `dua'
+ can't both be set}{}%
+ \fi
+ \fi
+ \renewcommand{\newacronym}[4][]{%
+ \ifx\@glsacronymlists\@empty
+ \def\@glo@type{\acronymtype}%
+ \setkeys{glossentry}{##1}%
+ \DeclareAcronymList{\@glo@type}%
+ \SetDescriptionDUAAcronymDisplayStyle{\@glo@type}%
+ \fi
+ \glskeylisttok{##1}%
+ \glslabeltok{##2}%
+ \glsshorttok{##3}%
+ \glslongtok{##4}%
+ \newacronymhook
+ \DescriptionDUANewAcronymDef
+ }%
% \end{macrocode}
% Set up the commands to make a note of the keys to store the long
% and short forms:
% \begin{macrocode}
- \def\glsshortkey{symbol}%
- \def\glsshortpluralkey{symbolplural}%
- \def\glslongkey{first}%
- \def\glslongpluralkey{plural}%
+ \def\glsshortkey{symbol}%
+ \def\glsshortpluralkey{symbolplural}%
+ \def\glslongkey{first}%
+ \def\glslongpluralkey{plural}%
% \end{macrocode}
% Set up short cuts. Short form:
% \begin{macrocode}
- \def\@acrshort#1#2[#3]{\acronymfont{\@glssymbol@{#1}{#2}[#3]}}
- \def\@Acrshort#1#2[#3]{\acronymfont{\@Glssymbol@{#1}{#2}[#3]}}
- \def\@ACRshort#1#2[#3]{\acronymfont{\@GLSsymbol@{#1}{#2}[#3]}}
+ \def\@acrshort##1##2[##3]{%
+ \acronymfont{\@glssymbol@{##1}{##2}[##3]}}%
+ \def\@Acrshort##1##2[##3]{%
+ \acronymfont{\@Glssymbol@{##1}{##2}[##3]}}%
+ \def\@ACRshort##1##2[##3]{%
+ \acronymfont{\@GLSsymbol@{##1}{##2}[##3]}}%
% \end{macrocode}
% Plural short form:
% \begin{macrocode}
- \def\@acrshortpl#1#2[#3]{%
- \acronymfont{\@glssymbolplural@{#1}{#2}[#3]}}
- \def\@Acrshortpl#1#2[#3]{%
- \acronymfont{\@Glssymbolplural@{#1}{#2}[#3]}}
- \def\@ACRshortpl#1#2[#3]{%
- \acronymfont{\@GLSsymbolplural@{#1}{#2}[#3]}}
+ \def\@acrshortpl##1##2[##3]{%
+ \acronymfont{\@glssymbolplural@{##1}{##2}[##3]}}%
+ \def\@Acrshortpl##1##2[##3]{%
+ \acronymfont{\@Glssymbolplural@{##1}{##2}[##3]}}%
+ \def\@ACRshortpl##1##2[##3]{%
+ \acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]}}%
% \end{macrocode}
% Long form:
% \begin{macrocode}
- \def\@acrlong#1#2[#3]{\@glsfirst@{#1}{#2}[#3]}
- \def\@Acrlong#1#2[#3]{\@Glsfirst@{#1}{#2}[#3]}
- \def\@ACRlong#1#2[#3]{\@GLSfirst@{#1}{#2}[#3]}
+ \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}%
+ \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}%
+ \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}%
% \end{macrocode}
% Plural long form:
% \begin{macrocode}
- \def\@acrlongpl#1#2[#3]{\@glsfirstplural@{#1}{#2}[#3]}
- \def\@Acrlongpl#1#2[#3]{\@Glsfirstplural@{#1}{#2}[#3]}
- \def\@ACRlongpl#1#2[#3]{\@GLSfirstplural@{#1}{#2}[#3]}
+ \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}%
+ \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}%
+ \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}%
% \end{macrocode}
% Full form:
% \begin{macrocode}
- \def\@acrfull#1#2[#3]{\@glsfirst@{#1}{#2}[#3]
- (\acronymfont{\@glssymbol@{#1}{#2}[#3]})}
- \def\@Acrfull#1#2[#3]{\@Glsfirst@{#1}{#2}[#3]
- (\acronymfont{\@glssymbol@{#1}{#2}[#3]})}
- \def\@ACRfull#1#2[#3]{\@GLSfirst@{#1}{#2}[#3]
- (\acronymfont{\@GLSsymbol@{#1}{#2}[#3]})}
+ \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}%
+ \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}%
+ \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]
+ (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}%
% \end{macrocode}
% Plural full form:
% \begin{macrocode}
- \def\@acrfullpl#1#2[#3]{\@glsfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@glssymbolplural@{#1}{#2}[#3]})}
- \def\@Acrfullpl#1#2[#3]{\@Glsfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@glssymbolplural@{#1}{#2}[#3]})}
- \def\@ACRfullpl#1#2[#3]{\@GLSfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@GLSsymbolplural@{#1}{#2}[#3]})}
+ \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}%
+ \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}%
+ \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}%
% \end{macrocode}
% Set display.
% \begin{macrocode}
- \defglsdisplayfirst[\acronymtype]{#1#4}
- \defglsdisplay[\acronymtype]{#1#4}
- \else
+ \@for\@gls@type:=\@glsacronymlists\do{%
+ \SetDescriptionDUAAcronymDisplayStyle{\@gls@type}%
+ }%
+}%
% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\SetDescriptionAcronymDisplayStyle}
+% Sets the acronym display style for given glossary using
+% the description setting (but not footnote or dua).
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\SetDescriptionAcronymDisplayStyle}[1]{%
+ \defglsdisplayfirst[#1]{%
+ ##1##4 (\firstacronymfont{##3})}%
+ \defglsdisplay[#1]{\acronymfont{##1}##4}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DescriptionNewAcronymDef}
+% \begin{macrocode}
+\newcommand*{\DescriptionNewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\noexpand
+ \acrnameformat{\the\glsshorttok}{\the\glslongtok}},%
+ sort={\the\glsshorttok},%
+ first={\the\glslongtok},%
+ firstplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ text={\the\glsshorttok},%
+ plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ symbol={\noexpand\@glo@text},%
+ symbolplural={\noexpand\@glo@plural},%
+ \the\glskeylisttok}%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SetDescriptionAcronymStyle}
% Option \pkgopt{description} is used, but not \pkgopt{dua}
% or \pkgopt{footnote}.
% Store long form in \gloskey{first} key
@@ -11297,72 +12987,83 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
% user to override the way the name is displayed in the
% list of acronyms.
% \begin{macrocode}
- \renewcommand{\newacronym}[4][]{%
- \newglossaryentry{#2}{type=\acronymtype,%
- name={\acrnameformat{#3}{#4}},%
- sort={#3},%
- first={#4},%
- firstplural={#4\acrpluralsuffix},%
- text={#3},%
- plural={#3\acrpluralsuffix},%
- symbol={\@glo@text},%
- symbolplural={\@glo@plural},%
- #1}}
+\newcommand*{\SetDescriptionAcronymStyle}{%
+ \renewcommand{\newacronym}[4][]{%
+ \ifx\@glsacronymlists\@empty
+ \def\@glo@type{\acronymtype}%
+ \setkeys{glossentry}{##1}%
+ \DeclareAcronymList{\@glo@type}%
+ \SetDescriptionAcronymDisplayStyle{\@glo@type}%
+ \fi
+ \glskeylisttok{##1}%
+ \glslabeltok{##2}%
+ \glsshorttok{##3}%
+ \glslongtok{##4}%
+ \newacronymhook
+ \DescriptionNewAcronymDef
+ }%
% \end{macrocode}
% Set up the commands to make a note of the keys to store the long
% and short forms:
% \begin{macrocode}
- \def\glsshortkey{text}%
- \def\glsshortpluralkey{plural}%
- \def\glslongkey{first}%
- \def\glslongpluralkey{firstplural}%
+ \def\glsshortkey{text}%
+ \def\glsshortpluralkey{plural}%
+ \def\glslongkey{first}%
+ \def\glslongpluralkey{firstplural}%
% \end{macrocode}
% Set up short cuts. Short form:
% \begin{macrocode}
- \def\@acrshort#1#2[#3]{\acronymfont{\@glstext@{#1}{#2}[#3]}}
- \def\@Acrshort#1#2[#3]{\acronymfont{\@Glstext@{#1}{#2}[#3]}}
- \def\@ACRshort#1#2[#3]{\acronymfont{\@GLStext@{#1}{#2}[#3]}}
+ \def\@acrshort##1##2[##3]{%
+ \acronymfont{\@glstext@{##1}{##2}[##3]}}%
+ \def\@Acrshort##1##2[##3]{%
+ \acronymfont{\@Glstext@{##1}{##2}[##3]}}%
+ \def\@ACRshort##1##2[##3]{%
+ \acronymfont{\@GLStext@{##1}{##2}[##3]}}%
% \end{macrocode}
% Plural short form:
% \begin{macrocode}
- \def\@acrshortpl#1#2[#3]{\acronymfont{\@glsplural@{#1}{#2}[#3]}}
- \def\@Acrshortpl#1#2[#3]{\acronymfont{\@Glsplural@{#1}{#2}[#3]}}
- \def\@ACRshortpl#1#2[#3]{\acronymfont{\@GLSplural@{#1}{#2}[#3]}}
+ \def\@acrshortpl##1##2[##3]{%
+ \acronymfont{\@glsplural@{##1}{##2}[##3]}}%
+ \def\@Acrshortpl##1##2[##3]{%
+ \acronymfont{\@Glsplural@{##1}{##2}[##3]}}%
+ \def\@ACRshortpl##1##2[##3]{%
+ \acronymfont{\@GLSplural@{##1}{##2}[##3]}}%
% \end{macrocode}
% Long form:
% \begin{macrocode}
- \def\@acrlong#1#2[#3]{\@glsfirst@{#1}{#2}[#3]}
- \def\@Acrlong#1#2[#3]{\@Glsfirst@{#1}{#2}[#3]}
- \def\@ACRlong#1#2[#3]{\@GLSfirst@{#1}{#2}[#3]}
+ \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}%
+ \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}%
+ \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}%
% \end{macrocode}
% Plural long form:
% \begin{macrocode}
- \def\@acrlongpl#1#2[#3]{\@glsfirstplural@{#1}{#2}[#3]}
- \def\@Acrlongpl#1#2[#3]{\@Glsfirstplural@{#1}{#2}[#3]}
- \def\@ACRlongpl#1#2[#3]{\@GLSfirstplural@{#1}{#2}[#3]}
+ \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}%
+ \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}%
+ \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}%
% \end{macrocode}
% Full form:
% \begin{macrocode}
- \def\@acrfull#1#2[#3]{\@glsfirst@{#1}{#2}[#3]
- (\acronymfont{\@glssymbol@{#1}{#2}[#3]})}
- \def\@Acrfull#1#2[#3]{\@Glsfirst@{#1}{#2}[#3]
- (\acronymfont{\@glssymbol@{#1}{#2}[#3]})}
- \def\@ACRfull#1#2[#3]{\@GLSfirst@{#1}{#2}[#3]
- (\acronymfont{\@GLSsymbol@{#1}{#2}[#3]})}
+ \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}%
+ \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}%
+ \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]
+ (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}%
% \end{macrocode}
% Plural full form:
% \begin{macrocode}
- \def\@acrfullpl#1#2[#3]{\@glsfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@glssymbolplural@{#1}{#2}[#3]})}
- \def\@Acrfullpl#1#2[#3]{\@Glsfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@glssymbolplural@{#1}{#2}[#3]})}
- \def\@ACRfullpl#1#2[#3]{\@GLSfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@GLSsymbolplural@{#1}{#2}[#3]})}
+ \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}%
+ \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}%
+ \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}%
% \end{macrocode}
% Set display.
% \begin{macrocode}
- \defglsdisplayfirst[\acronymtype]{#1#4 (\firstacronymfont{#3})}
- \defglsdisplay[\acronymtype]{\acronymfont{#1}#4}
+ \@for\@gls@type:=\@glsacronymlists\do{%
+ \SetDescriptionAcronymDisplayStyle{\@gls@type}%
+ }%
% \end{macrocode}
% Redefine \ics{acronymfont} if small caps required. The plural suffix
% is set in an upright font so that it remains in normal lower case,
@@ -11370,98 +13071,135 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead
%of 'smaller}
% \begin{macrocode}
- \ifglsacrsmallcaps
- \renewcommand{\acronymfont}[1]{\textsc{#1}}
- \renewcommand*{\acrpluralsuffix}{%
- \textup{\glspluralsuffix}}%
- \else
- \ifglsacrsmaller
- \renewcommand*{\acronymfont}[1]{\textsmaller{#1}}%
- \fi
- \fi
+ \ifglsacrsmallcaps
+ \renewcommand{\acronymfont}[1]{\textsc{##1}}
+ \renewcommand*{\acrpluralsuffix}{%
+ \textup{\glspluralsuffix}}%
+ \else
+ \ifglsacrsmaller
+ \renewcommand*{\acronymfont}[1]{\textsmaller{##1}}%
\fi
\fi
-\else
+}%
% \end{macrocode}
-% If here, acronyms do not require additional description.
+%\end{macro}
+%
+%\begin{macro}{\SetFootnoteAcronymDisplayStyle}
+% Sets the acronym display style for given glossary with
+% footnote setting (but not description or dua).
+%\changes{2.04}{2009 November 10}{new}
% \begin{macrocode}
- \ifglsacrfootnote
+\newcommand*{\SetFootnoteAcronymDisplayStyle}[1]{%
+ \defglsdisplayfirst[#1]{%
+ \firstacronymfont{##1}##4\protect\footnote{%
+ \protect\glslink
+ [\@gls@link@opts]{\@gls@link@label}{##2}}}%
+ \defglsdisplay[#1]{\acronymfont{##1}##4}%
+}
% \end{macrocode}
-%
+%\end{macro}
+%\begin{macro}{\FootnoteNewAcronymDef}
+% \begin{macrocode}
+\newcommand*{\FootnoteNewAcronymDef}{%
+ \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},%
+ description={\the\glslongtok},%
+ descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SetFootnoteAcronymStyle}
% If \pkgopt{footnote} package option is specified, set the first
% use to append the long form (stored in \gloskey{description}) as a
% footnote.
% Use the \gloskey{description} key to store the long form.
% \begin{macrocode}
- \renewcommand{\newacronym}[4][]{%
- \newglossaryentry{#2}{type=\acronymtype,%
- name={\acronymfont{#3}},%
- sort={#3},%
- text={#3},%
- plural={#3\acrpluralsuffix},%
- description={#4},%
- descriptionplural={#4\acrpluralsuffix},%
- #1}}
+\newcommand*{\SetFootnoteAcronymStyle}{%
+ \renewcommand{\newacronym}[4][]{%
+ \ifx\@glsacronymlists\@empty
+ \def\@glo@type{\acronymtype}%
+ \setkeys{glossentry}{##1}%
+ \DeclareAcronymList{\@glo@type}%
+ \SetFootnoteAcronymDisplayStyle{\@glo@type}%
+ \fi
+ \glskeylisttok{##1}%
+ \glslabeltok{##2}%
+ \glsshorttok{##3}%
+ \glslongtok{##4}%
+ \newacronymhook
+ \FootnoteNewAcronymDef
+ }%
% \end{macrocode}
% Set up the commands to make a note of the keys to store the long
% and short forms:
% \begin{macrocode}
-\def\glsshortkey{text}%
-\def\glsshortpluralkey{plural}%
-\def\glslongkey{description}%
-\def\glslongpluralkey{descriptionplural}%
+ \def\glsshortkey{text}%
+ \def\glsshortpluralkey{plural}%
+ \def\glslongkey{description}%
+ \def\glslongpluralkey{descriptionplural}%
% \end{macrocode}
% Set display
%\changes{1.12}{2008 Mar 8}{Added 'protect before 'footnote and
% 'glslink}
% \begin{macrocode}
- \defglsdisplayfirst[\acronymtype]{%
- \firstacronymfont{#1}#4\noexpand\protect\noexpand\footnote{%
- \noexpand\protect\noexpand\glslink
- [\@gls@link@opts]{\@gls@link@label}{#2}}}%
- \defglsdisplay[\acronymtype]{\acronymfont{#1}#4}%
+ \@for\@gls@type:=\@glsacronymlists\do{%
+ \SetFootnoteAcronymDisplayStyle{\@gls@type}%
+ }%
% \end{macrocode}
% Set up short cuts. Short form:
% \begin{macrocode}
- \def\@acrshort#1#2[#3]{\acronymfont{\@glstext@{#1}{#2}[#3]}}
- \def\@Acrshort#1#2[#3]{\acronymfont{\@Glstext@{#1}{#2}[#3]}}
- \def\@ACRshort#1#2[#3]{\acronymfont{\@GLStext@{#1}{#2}[#3]}}
+ \def\@acrshort##1##2[##3]{\acronymfont{\@glstext@{##1}{##2}[##3]}}%
+ \def\@Acrshort##1##2[##3]{\acronymfont{\@Glstext@{##1}{##2}[##3]}}%
+ \def\@ACRshort##1##2[##3]{\acronymfont{\@GLStext@{##1}{##2}[##3]}}%
% \end{macrocode}
% Plural short form:
% \begin{macrocode}
- \def\@acrshortpl#1#2[#3]{\acronymfont{\@glsplural@{#1}{#2}[#3]}}
- \def\@Acrshortpl#1#2[#3]{\acronymfont{\@Glsplural@{#1}{#2}[#3]}}
- \def\@ACRshortpl#1#2[#3]{\acronymfont{\@GLSplural@{#1}{#2}[#3]}}
+ \def\@acrshortpl##1##2[##3]{%
+ \acronymfont{\@glsplural@{##1}{##2}[##3]}}%
+ \def\@Acrshortpl##1##2[##3]{%
+ \acronymfont{\@Glsplural@{##1}{##2}[##3]}}%
+ \def\@ACRshortpl##1##2[##3]{%
+ \acronymfont{\@GLSplural@{##1}{##2}[##3]}}%
% \end{macrocode}
% Long form:
% \begin{macrocode}
- \def\@acrlong#1#2[#3]{\@glsdesc@{#1}{#2}[#3]}
- \def\@Acrlong#1#2[#3]{\@Glsdesc@{#1}{#2}[#3]}
- \def\@ACRlong#1#2[#3]{\@GLSdesc@{#1}{#2}[#3]}
+ \def\@acrlong##1##2[##3]{\@glsdesc@{##1}{##2}[##3]}%
+ \def\@Acrlong##1##2[##3]{\@Glsdesc@{##1}{##2}[##3]}%
+ \def\@ACRlong##1##2[##3]{\@GLSdesc@{##1}{##2}[##3]}%
% \end{macrocode}
% Plural long form:
% \begin{macrocode}
- \def\@acrlongpl#1#2[#3]{\@glsdescplural@{#1}{#2}[#3]}
- \def\@Acrlongpl#1#2[#3]{\@Glsdescplural@{#1}{#2}[#3]}
- \def\@ACRlongpl#1#2[#3]{\@GLSdescplural@{#1}{#2}[#3]}
+ \def\@acrlongpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3]}%
+ \def\@Acrlongpl##1##2[##3]{\@Glsdescplural@{##1}{##2}[##3]}%
+ \def\@ACRlongpl##1##2[##3]{\@GLSdescplural@{##1}{##2}[##3]}%
% \end{macrocode}
% Full form:
% \begin{macrocode}
- \def\@acrfull#1#2[#3]{\@glsdesc@{#1}{#2}[#3]
- (\@glstext@{#1}{#2}[#3])}
- \def\@Acrfull#1#2[#3]{\@Glsdesc@{#1}{#2}[#3]
- (\@glstext@{#1}{#2}[#3])}
- \def\@ACRfull#1#2[#3]{\@GLSdesc@{#1}{#2}[#3]
- (\@GLStext@{#1}{#2}[#3])}
+ \def\@acrfull##1##2[##3]{\@glsdesc@{##1}{##2}[##3]
+ (\@glstext@{##1}{##2}[##3])}%
+ \def\@Acrfull##1##2[##3]{\@Glsdesc@{##1}{##2}[##3]
+ (\@glstext@{##1}{##2}[##3])}%
+ \def\@ACRfull##1##2[##3]{\@GLSdesc@{##1}{##2}[##3]
+ (\@GLStext@{##1}{##2}[##3])}%
% \end{macrocode}
% Plural full form:
% \begin{macrocode}
- \def\@acrfullpl#1#2[#3]{\@glsdescplural@{#1}{#2}[#3]
- (\@glsplural@{#1}{#2}[#3])}
- \def\@Acrfullpl#1#2[#3]{\@Glsdesctext@{#1}{#2}[#3]
- (\@glsplural@{#1}{#2}[#3])}
- \def\@ACRfullpl#1#2[#3]{\@GLSdesctext@{#1}{#2}[#3]
- (\@GLSplural@{#1}{#2}[#3])}
+ \def\@acrfullpl##1##2[##3]{\@glsdescplural@{##1}{##2}[##3]
+ (\@glsplural@{##1}{##2}[##3])}%
+ \def\@Acrfullpl##1##2[##3]{\@Glsdesctext@{##1}{##2}[##3]
+ (\@glsplural@{##1}{##2}[##3])}%
+ \def\@ACRfullpl##1##2[##3]{\@GLSdesctext@{##1}{##2}[##3]
+ (\@GLSplural@{##1}{##2}[##3])}%
% \end{macrocode}
% Redefine \ics{acronymfont} if small caps required. The plural suffix
% is set in an upright font so that it remains in normal lower case,
@@ -11469,59 +13207,97 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead
%of 'smaller}
% \begin{macrocode}
- \ifglsacrsmallcaps
- \renewcommand*{\acronymfont}[1]{\textsc{#1}}%
- \renewcommand*{\acrpluralsuffix}{%
- \textup{\glspluralsuffix}}%
- \else
- \ifglsacrsmaller
- \renewcommand*{\acronymfont}[1]{\textsmaller{#1}}%
- \fi
- \fi
+ \ifglsacrsmallcaps
+ \renewcommand*{\acronymfont}[1]{\textsc{##1}}%
+ \renewcommand*{\acrpluralsuffix}{%
+ \textup{\glspluralsuffix}}%
+ \else
+ \ifglsacrsmaller
+ \renewcommand*{\acronymfont}[1]{\textsmaller{##1}}%
+ \fi
+ \fi
% \end{macrocode}
% Check for option clash
% \begin{macrocode}
- \ifglsacrdua
- \PackageError{glossaries}{Option clash: `footnote' and `dua'
- can't both be set}{}%
- \fi
- \else
+ \ifglsacrdua
+ \PackageError{glossaries}{Option clash: `footnote' and `dua'
+ can't both be set}{}%
+ \fi
+}%
% \end{macrocode}
-% No footnotes required.
+%\end{macro}
+%
+%\begin{macro}{\SetSmallAcronymDisplayStyle}
+% Sets the acronym display style for given glossary where neither
+% footnote nor description is required, but smallcaps or smaller
+% specified.
+%\changes{2.04}{2009 November 10}{new}
% \begin{macrocode}
- \ifthenelse{\boolean{glsacrsmallcaps}\or\boolean{glsacrsmaller}}{%
+\newcommand*{\SetSmallAcronymDisplayStyle}[1]{%
+ \defglsdisplayfirst[#1]{##1##4 (\firstacronymfont{##3})}
+ \defglsdisplay[#1]{\acronymfont{##1}##4}%
+}
% \end{macrocode}
-%
-% Neither footnote nor description required.
+%\end{macro}
+%\begin{macro}{\SmallNewAcronymDef}
+% \begin{macrocode}
+\newcommand*{\SmallNewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\noexpand\acronymfont{\the\glsshorttok}},%
+ sort={\the\glsshorttok},%
+ text={\noexpand\@glo@symbol},%
+ plural={\noexpand\@glo@symbolplural},%
+ first={\the\glslongtok},%
+ firstplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ description={\noexpand\@glo@first},%
+ descriptionplural={\noexpand\@glo@firstplural},%
+ symbol={\the\glsshorttok},%
+ symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SetSmallAcronymStyle}
+% Neither footnote nor description required, but smallcaps or
+% smaller specified.
% Use the \gloskey{symbol} key to store the short form and
% \gloskey{first} to store the long form.
% \begin{macrocode}
- \renewcommand{\newacronym}[4][]{%
- \newglossaryentry{#2}{type=\acronymtype,%
- name={\acronymfont{#3}},%
- sort={#3},%
- text={\@glo@symbol},%
- plural={\@glo@symbolplural},%
- first={#4},%
- firstplural={#4\acrpluralsuffix},%
- description={\@glo@first},%
- descriptionplural={\@glo@firstplural},%
- symbol={#3},%
- symbolplural={#3\acrpluralsuffix},%
- #1}}
+\newcommand*{\SetSmallAcronymStyle}{%
+ \renewcommand{\newacronym}[4][]{%
+ \ifx\@glsacronymlists\@empty
+ \def\@glo@type{\acronymtype}%
+ \setkeys{glossentry}{##1}%
+ \DeclareAcronymList{\@glo@type}%
+ \SetSmallAcronymDisplayStyle{\@glo@type}%
+ \fi
+ \glskeylisttok{##1}%
+ \glslabeltok{##2}%
+ \glsshorttok{##3}%
+ \glslongtok{##4}%
+ \newacronymhook
+ \SmallNewAcronymDef
+ }%
% \end{macrocode}
% Set up the commands to make a note of the keys to store the long
% and short forms:
% \begin{macrocode}
- \def\glsshortkey{symbol}%
- \def\glsshortpluralkey{symbolplural}%
- \def\glslongkey{first}%
- \def\glslongpluralkey{firstplural}%
+ \def\glsshortkey{symbol}%
+ \def\glsshortpluralkey{symbolplural}%
+ \def\glslongkey{first}%
+ \def\glslongpluralkey{firstplural}%
% \end{macrocode}
% Change the display since \gloskey{first} only contains long form.
% \begin{macrocode}
- \defglsdisplayfirst[\acronymtype]{#1#4 (\firstacronymfont{#3})}
- \defglsdisplay[\acronymtype]{\acronymfont{#1}#4}
+ \@for\@gls@type:=\@glsacronymlists\do{%
+ \SetSmallAcronymDisplayStyle{\@gls@type}%
+ }%
% \end{macrocode}
% Redefine \ics{acronymfont} if small caps required. The plural suffix
% is set in an upright font so that it remains in normal lower case,
@@ -11529,146 +13305,230 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead
%of 'smaller}
% \begin{macrocode}
- \ifglsacrsmallcaps
- \renewcommand*{\acronymfont}[1]{\textsc{#1}}
- \renewcommand*{\acrpluralsuffix}{%
- \textup{\glspluralsuffix}}%
- \else
- \renewcommand*{\acronymfont}[1]{\textsmaller{#1}}
- \fi
+ \ifglsacrsmallcaps
+ \renewcommand*{\acronymfont}[1]{\textsc{##1}}
+ \renewcommand*{\acrpluralsuffix}{%
+ \textup{\glspluralsuffix}}%
+ \else
+ \renewcommand*{\acronymfont}[1]{\textsmaller{##1}}
+ \fi
% \end{macrocode}
% Set up short cuts. Short form:
% \begin{macrocode}
- \def\@acrshort#1#2[#3]{\acronymfont{\@glstext@{#1}{#2}[#3]}}
- \def\@Acrshort#1#2[#3]{\acronymfont{\@Glstext@{#1}{#2}[#3]}}
- \def\@ACRshort#1#2[#3]{\acronymfont{\@GLStext@{#1}{#2}[#3]}}
+ \def\@acrshort##1##2[##3]{%
+ \acronymfont{\@glstext@{##1}{##2}[##3]}}%
+ \def\@Acrshort##1##2[##3]{%
+ \acronymfont{\@Glstext@{##1}{##2}[##3]}}%
+ \def\@ACRshort##1##2[##3]{%
+ \acronymfont{\@GLStext@{##1}{##2}[##3]}}%
% \end{macrocode}
% Plural short form:
% \begin{macrocode}
- \def\@acrshortpl#1#2[#3]{\acronymfont{\@glsplural@{#1}{#2}[#3]}}
- \def\@Acrshortpl#1#2[#3]{\acronymfont{\@Glsplural@{#1}{#2}[#3]}}
- \def\@ACRshortpl#1#2[#3]{\acronymfont{\@GLSplural@{#1}{#2}[#3]}}
+ \def\@acrshortpl##1##2[##3]{%
+ \acronymfont{\@glsplural@{##1}{##2}[##3]}}%
+ \def\@Acrshortpl##1##2[##3]{%
+ \acronymfont{\@Glsplural@{##1}{##2}[##3]}}%
+ \def\@ACRshortpl##1##2[##3]{%
+ \acronymfont{\@GLSplural@{##1}{##2}[##3]}}%
% \end{macrocode}
% Long form:
% \begin{macrocode}
- \def\@acrlong#1#2[#3]{\@glsfirst@{#1}{#2}[#3]}
- \def\@Acrlong#1#2[#3]{\@Glsfirst@{#1}{#2}[#3]}
- \def\@ACRlong#1#2[#3]{\@GLSfirst@{#1}{#2}[#3]}
+ \def\@acrlong##1##2[##3]{\@glsfirst@{##1}{##2}[##3]}%
+ \def\@Acrlong##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]}%
+ \def\@ACRlong##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]}%
% \end{macrocode}
% Plural long form:
% \begin{macrocode}
- \def\@acrlongpl#1#2[#3]{\@glsfirstplural@{#1}{#2}[#3]}
- \def\@Acrlongpl#1#2[#3]{\@Glsfirstplural@{#1}{#2}[#3]}
- \def\@ACRlongpl#1#2[#3]{\@GLSfirstplural@{#1}{#2}[#3]}
+ \def\@acrlongpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]}%
+ \def\@Acrlongpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]}%
+ \def\@ACRlongpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]}%
% \end{macrocode}
% Full form:
% \begin{macrocode}
- \def\@acrfull#1#2[#3]{\@glsfirst@{#1}{#2}[#3]
- (\acronymfont{\@glstext@{#1}{#2}[#3]})}
- \def\@Acrfull#1#2[#3]{\@Glsfirst@{#1}{#2}[#3]
- (\acronymfont{\@glstext@{#1}{#2}[#3]})}
- \def\@ACRfull#1#2[#3]{\@GLSfirst@{#1}{#2}[#3]
- (\acronymfont{\@GLStext@{#1}{#2}[#3]})}
+ \def\@acrfull##1##2[##3]{\@glsfirst@{##1}{##2}[##3]
+ (\acronymfont{\@glstext@{##1}{##2}[##3]})}%
+ \def\@Acrfull##1##2[##3]{\@Glsfirst@{##1}{##2}[##3]
+ (\acronymfont{\@glstext@{##1}{##2}[##3]})}%
+ \def\@ACRfull##1##2[##3]{\@GLSfirst@{##1}{##2}[##3]
+ (\acronymfont{\@GLStext@{##1}{##2}[##3]})}%
% \end{macrocode}
% Plural full form:
% \begin{macrocode}
- \def\@acrfullpl#1#2[#3]{\@glsfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@glsplural@{#1}{#2}[#3]})}
- \def\@Acrfullpl#1#2[#3]{\@Glsfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@glsplural@{#1}{#2}[#3]})}
- \def\@ACRfullpl#1#2[#3]{\@GLSfirstplural@{#1}{#2}[#3]
- (\acronymfont{\@GLSplural@{#1}{#2}[#3]})}
+ \def\@acrfullpl##1##2[##3]{\@glsfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@glsplural@{##1}{##2}[##3]})}
+ \def\@Acrfullpl##1##2[##3]{\@Glsfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@glsplural@{##1}{##2}[##3]})}
+ \def\@ACRfullpl##1##2[##3]{\@GLSfirstplural@{##1}{##2}[##3]
+ (\acronymfont{\@GLSplural@{##1}{##2}[##3]})}
% \end{macrocode}
% check for option clash
% \begin{macrocode}
- \ifglsacrdua
- \ifglsacrsmallcaps
- \PackageError{glossaries}{Option clash: `smallcaps' and `dua'
- can't both be set}{}%
- \else
- \PackageError{glossaries}{Option clash: `smaller' and `dua'
- can't both be set}{}%
- \fi
- \fi
- }{%
+ \ifglsacrdua
+ \ifglsacrsmallcaps
+ \PackageError{glossaries}{Option clash: `smallcaps' and `dua'
+ can't both be set}{}%
+ \else
+ \PackageError{glossaries}{Option clash: `smaller' and `dua'
+ can't both be set}{}%
+ \fi
+ \fi
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\SetDUADisplayStyle}
+% Sets the acronym display style for given glossary with dua
+% setting.
+%\changes{2.04}{2009 November 10}{new}
+% \begin{macrocode}
+\newcommand*{\SetDUADisplayStyle}[1]{%
+ \defglsdisplay[#1]{##1##4}%
+ \defglsdisplayfirst[#1]{##1##4}%
+}
% \end{macrocode}
-% Should acronyms always be expanded?
+%\end{macro}
+%\begin{macro}{\DUANewAcronymDef}
% \begin{macrocode}
- \ifglsacrdua
- \renewcommand{\newacronym}[4][]{%
- \newglossaryentry{#2}{type=\acronymtype,%
- name={#3},%
- text={#4},%
- plural={#4\acrpluralsuffix},%
- description={#4},%
- symbol={#3},%
- symbolplural={#3\acrpluralsuffix},%
- #1}}
+\newcommand*{\DUANewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\the\glsshorttok},%
+ text={\the\glslongtok},%
+ plural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ description={\the\glslongtok},%
+ symbol={\the\glsshorttok},%
+ symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SetDUAStyle}
+% Always expand acronyms.
+% \begin{macrocode}
+\newcommand*{\SetDUAStyle}{%
+ \renewcommand{\newacronym}[4][]{%
+ \ifx\@glsacronymlists\@empty
+ \def\@glo@type{\acronymtype}%
+ \setkeys{glossentry}{##1}%
+ \DeclareAcronymList{\@glo@type}%
+ \SetDUADisplayStyle{\@glo@type}%
+ \fi
+ \glskeylisttok{##1}%
+ \glslabeltok{##2}%
+ \glsshorttok{##3}%
+ \glslongtok{##4}%
+ \newacronymhook
+ \DUANewAcronymDef
+ }%
% \end{macrocode}
% Set up the commands to make a note of the keys to store the long
% and short forms:
% \begin{macrocode}
- \def\glsshortkey{symbol}%
- \def\glsshortpluralkey{symbolplural}%
- \def\glslongkey{text}%
- \def\glslongpluralkey{plural}%
+ \def\glsshortkey{symbol}%
+ \def\glsshortpluralkey{symbolplural}%
+ \def\glslongkey{text}%
+ \def\glslongpluralkey{plural}%
% \end{macrocode}
% Set the display
% \begin{macrocode}
- \defglsdisplayfirst[\acronymtype]{#1#4}
- \defglsdisplay[\acronymtype]{#1#4}
+ \@for\@gls@type:=\@glsacronymlists\do{%
+ \SetDUADisplayStyle{\@gls@type}%
+ }%
% \end{macrocode}
% Set up short cuts. Short form:
% \begin{macrocode}
- \def\@acrshort#1#2[#3]{\@glssymbol@{#1}{#2}[#3]}
- \def\@Acrshort#1#2[#3]{\@Glssymbol@{#1}{#2}[#3]}
- \def\@ACRshort#1#2[#3]{\@GLSsymbol@{#1}{#2}[#3]}
+ \def\@acrshort##1##2[##3]{\@glssymbol@{##1}{##2}[##3]}%
+ \def\@Acrshort##1##2[##3]{\@Glssymbol@{##1}{##2}[##3]}%
+ \def\@ACRshort##1##2[##3]{\@GLSsymbol@{##1}{##2}[##3]}%
% \end{macrocode}
% Plural short form:
% \begin{macrocode}
- \def\@acrshortpl#1#2[#3]{\@glssymbolplural@{#1}{#2}[#3]}
- \def\@Acrshortpl#1#2[#3]{\@Glssymbolplural@{#1}{#2}[#3]}
- \def\@ACRshortpl#1#2[#3]{\@GLSsymbolplural@{#1}{#2}[#3]}
+ \def\@acrshortpl##1##2[##3]{\@glssymbolplural@{##1}{##2}[##3]}%
+ \def\@Acrshortpl##1##2[##3]{\@Glssymbolplural@{##1}{##2}[##3]}%
+ \def\@ACRshortpl##1##2[##3]{\@GLSsymbolplural@{##1}{##2}[##3]}%
% \end{macrocode}
% Long form:
% \begin{macrocode}
- \def\@acrlong#1#2[#3]{\@glstext@{#1}{#2}[#3]}
- \def\@Acrlong#1#2[#3]{\@Glstext@{#1}{#2}[#3]}
- \def\@ACRlong#1#2[#3]{\@GLStext@{#1}{#2}[#3]}
+ \def\@acrlong##1##2[##3]{\@glstext@{##1}{##2}[##3]}%
+ \def\@Acrlong##1##2[##3]{\@Glstext@{##1}{##2}[##3]}%
+ \def\@ACRlong##1##2[##3]{\@GLStext@{##1}{##2}[##3]}%
% \end{macrocode}
% Plural long form:
% \begin{macrocode}
- \def\@acrlongpl#1#2[#3]{\@glsplural@{#1}{#2}[#3]}
- \def\@Acrlongpl#1#2[#3]{\@Glsplural@{#1}{#2}[#3]}
- \def\@ACRlongpl#1#2[#3]{\@GLSplural@{#1}{#2}[#3]}
+ \def\@acrlongpl##1##2[##3]{\@glsplural@{##1}{##2}[##3]}%
+ \def\@Acrlongpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3]}%
+ \def\@ACRlongpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3]}%
% \end{macrocode}
% Full form:
% \begin{macrocode}
- \def\@acrfull#1#2[#3]{\@glstext@{#1}{#2}[#3]
- (\acronymfont{\@glssymbol@{#1}{#2}[#3]})}
- \def\@Acrfull#1#2[#3]{\@Glstext@{#1}{#2}[#3]
- (\acronymfont{\@glssymbol@{#1}{#2}[#3]})}
- \def\@ACRfull#1#2[#3]{\@GLStext@{#1}{#2}[#3]
- (\acronymfont{\@GLSsymbol@{#1}{#2}[#3]})}
+ \def\@acrfull##1##2[##3]{\@glstext@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}%
+ \def\@Acrfull##1##2[##3]{\@Glstext@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbol@{##1}{##2}[##3]})}%
+ \def\@ACRfull##1##2[##3]{\@GLStext@{##1}{##2}[##3]
+ (\acronymfont{\@GLSsymbol@{##1}{##2}[##3]})}%
% \end{macrocode}
% Plural full form:
% \begin{macrocode}
- \def\@acrfullpl#1#2[#3]{\@glsplural@{#1}{#2}[#3]
- (\acronymfont{\@glssymbolplural@{#1}{#2}[#3]})}
- \def\@Acrfullpl#1#2[#3]{\@Glsplural@{#1}{#2}[#3]
- (\acronymfont{\@glssymbolplural@{#1}{#2}[#3]})}
- \def\@ACRfullpl#1#2[#3]{\@GLSplural@{#1}{#2}[#3]
- (\acronymfont{\@GLSsymbolplural@{#1}{#2}[#3]})}
+ \def\@acrfullpl##1##2[##3]{\@glsplural@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}%
+ \def\@Acrfullpl##1##2[##3]{\@Glsplural@{##1}{##2}[##3]
+ (\acronymfont{\@glssymbolplural@{##1}{##2}[##3]})}%
+ \def\@ACRfullpl##1##2[##3]{\@GLSplural@{##1}{##2}[##3]
+ (\acronymfont{\@GLSsymbolplural@{##1}{##2}[##3]})}%
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\SetAcronymStyle}
+% \begin{macrocode}
+\newcommand*{\SetAcronymStyle}{%
+ \SetDefaultAcronymStyle
+ \ifglsacrdescription
+ \ifglsacrfootnote
+ \SetDescriptionFootnoteAcronymStyle
+ \else
+ \ifglsacrdua
+ \SetDescriptionDUAAcronymStyle
+ \else
+ \SetDescriptionAcronymStyle
\fi
- }%
+ \fi
+ \else
+ \ifglsacrfootnote
+ \SetFootnoteAcronymStyle
+ \else
+ \ifthenelse{\boolean{glsacrsmallcaps}\OR
+ \boolean{glsacrsmaller}}%
+ {%
+ \SetSmallAcronymStyle
+ }%
+ {%
+ \ifglsacrdua
+ \SetDUAStyle
+ \fi
+ }%
+ \fi
\fi
-\fi
+}
+% \end{macrocode}
+% Set the acronym style according to the package options
+% \begin{macrocode}
+\SetAcronymStyle
% \end{macrocode}
+%\end{macro}
%
-% Define synonyms if required
+%\begin{macro}{\DefineAcronymSynonyms}
+%\changes{2.04}{2009 November 10}{new}
% \begin{macrocode}
-\ifglsacrshortcuts
+\newcommand*{\DefineAcronymSynonyms}{%
% \end{macrocode}
+%\end{macro}
% Short form
%\begin{macro}{\acs}
% \begin{macrocode}
@@ -11766,6 +13626,12 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
% \end{macrocode}
%\end{macro}
% \begin{macrocode}
+}
+% \end{macrocode}
+% Define synonyms if required
+% \begin{macrocode}
+\ifglsacrshortcuts
+ \DefineAcronymSynonyms
\fi
% \end{macrocode}
%
@@ -11801,7 +13667,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
% \end{macrocode}
% The default glossary style is set according to the \pkgopt{style} package
% option, but can be overridden by \ics{glossarystyle}. The
-% style must be defined at this point.
+% required style must be defined at this point.
% \begin{macrocode}
\ifx\@glossary@default@style\relax
\else
@@ -11822,7 +13688,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\label{sec:code:mfirstuc}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mfirstuc}[2008/12/22 v1.03 (NLCT)]
+\ProvidesPackage{mfirstuc}[2009/11/03 v1.04 (NLCT)]
% \end{macrocode}
%\begin{macro}{\makefirstuc}
% Syntax:\\
@@ -11837,48 +13703,60 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
% This is required by \ics{Gls} and \ics{Glspl}.
% \begin{macrocode}
\newif\if@glscs
+\newtoks\@glsmfirst
+\newtoks\@glsmrest
\def\makefirstuc#1{%
-\def\gls@argi{#1}%
-\ifx\gls@argi\@empty
-\else
+ \def\gls@argi{#1}%
+ \ifx\gls@argi\@empty
+% \end{macrocode}
+% If the argument is empty, do nothing.
+% \begin{macrocode}
+ \else
% \end{macrocode}
%\changes{1.03}{2008/12/22}{changed 'protected@edef to 'def}
% \begin{macrocode}
- \def\@gls@tmp{\ #1}%
- \@onelevel@sanitize\@gls@tmp
- \expandafter\@gls@checkcs\@gls@tmp\relax\relax
- \if@glscs
- \@gls@getbody #1{}\@nil
- \ifx\@gls@rest\@empty
- \@gls@makefirstuc{#1}%
- \else
- \expandafter\@gls@split\@gls@rest\@nil
- \ifx\@gls@first\@empty
- \@gls@makefirstuc{#1}%
+ \def\@gls@tmp{\ #1}%
+ \@onelevel@sanitize\@gls@tmp
+ \expandafter\@gls@checkcs\@gls@tmp\relax\relax
+ \if@glscs
+ \@gls@getbody #1{}\@nil
+ \ifx\@gls@rest\@empty
+ \@gls@makefirstuc{#1}%
\else
- \@gls@body{\expandafter\@gls@makefirstuc\@gls@first}\@gls@rest%
+ \expandafter\@gls@split\@gls@rest\@nil
+ \ifx\@gls@first\@empty
+ \@gls@makefirstuc{#1}%
+ \else
+ \expandafter\@glsmfirst\expandafter{\@gls@first}%
+ \expandafter\@glsmrest\expandafter{\@gls@rest}%
+ \edef\@gls@domfirstuc{\noexpand\@gls@body
+ {\noexpand\@gls@makefirstuc\the\@glsmfirst}%
+ \the\@glsmrest}%
+ \@gls@domfirstuc
+ \fi
\fi
+ \else
+ \@gls@makefirstuc{#1}%
\fi
- \else
- \@gls@makefirstuc{#1}%
\fi
-\fi
}
% \end{macrocode}
%\end{macro}
% Put first argument in \cs{@gls@first} and second argument in
% \cs{@gls@rest}:
% \begin{macrocode}
-\def\@gls@split#1#2\@nil{\def\@gls@first{#1}\def\@gls@rest{#2}}
+\def\@gls@split#1#2\@nil{%
+ \def\@gls@first{#1}\def\@gls@rest{#2}%
+}
% \end{macrocode}
% \begin{macrocode}
\def\@gls@checkcs#1 #2#3\relax{%
-\def\@gls@argi{#1}\def\@gls@argii{#2}%
-\ifx\@gls@argi\@gls@argii
- \@glscstrue
-\else
- \@glscsfalse
-\fi
+ \def\@gls@argi{#1}\def\@gls@argii{#2}%
+ \ifx\@gls@argi\@gls@argii
+ \@glscstrue
+ \else
+ \@glscsfalse
+ \fi
}
% \end{macrocode}
% Make first thing upper case:
@@ -14546,22 +16424,254 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
% further details about accessibility support.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-accsupp}[2009/03/02 v0.1 (NLCT)]
+\ProvidesPackage{glossaries-accsupp}[2009/11/02 v0.2 (NLCT)]
+% \end{macrocode}
+% Pass all options to \sty{glossaries}:
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}}
+% \end{macrocode}
+% Process options:
+% \begin{macrocode}
+\ProcessOptions
% \end{macrocode}
% Required packages:
% \begin{macrocode}
\RequirePackage{glossaries}
\RequirePackage{accsupp}
% \end{macrocode}
-%
-% Store the replacement text in the \gloskey{symbol} key when
-% defining new glossary entries. For example:
+%
+%\subsection{Defining Replacement Text}
+% The version 0.1 stored the replacement text in the
+% \gloskey{symbol} key. This has been changed to use the
+% new keys defined here. Example of use:
%\begin{verbatim}
-%\newglossaryentry{dr}{name=Dr,description={},symbol={Doctor}}
+%\newglossaryentry{dr}{name=Dr,description={},access={Doctor}}
%\end{verbatim}
-% The accessibility support is only provided via the commands
-% \ics{gls}, \ics{glspl} and their uppercase variants,
-% e.g.\ \verb|\gls{dr}|.
+%\begin{key}{access}
+% The replacement text corresponding to the \gloskey{name} key:
+% \begin{macrocode}
+\define@key{glossentry}{access}{%
+ \def\@glo@access{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%\begin{key}{textaccess}
+% The replacement text corresponding to the \gloskey{text} key:
+% \begin{macrocode}
+\define@key{glossentry}{textaccess}{%
+ \def\@glo@textaccess{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%\begin{key}{firstaccess}
+% The replacement text corresponding to the \gloskey{first} key:
+% \begin{macrocode}
+\define@key{glossentry}{firstaccess}{%
+ \def\@glo@firstaccess{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%\begin{key}{pluralaccess}
+% The replacement text corresponding to the \gloskey{plural} key:
+% \begin{macrocode}
+\define@key{glossentry}{pluralaccess}{%
+ \def\@glo@pluralaccess{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%\begin{key}{firstpluralaccess}
+% The replacement text corresponding to the \gloskey{firstplural} key:
+% \begin{macrocode}
+\define@key{glossentry}{firstpluralaccess}{%
+ \def\@glo@firstpluralaccess{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%\begin{key}{symbolaccess}
+% The replacement text corresponding to the \gloskey{symbol} key:
+% \begin{macrocode}
+\define@key{glossentry}{symbolaccess}{%
+ \def\@glo@symbolaccess{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%\begin{key}{symbolpluralaccess}
+% The replacement text corresponding to the \gloskey{symbolplural} key:
+% \begin{macrocode}
+\define@key{glossentry}{symbolpluralaccess}{%
+ \def\@glo@symbolpluralaccess{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%\begin{key}{descriptionaccess}
+% The replacement text corresponding to the \gloskey{description} key:
+% \begin{macrocode}
+\define@key{glossentry}{descriptionaccess}{%
+ \def\@glo@descaccess{#1}%
+}
+% \end{macrocode}
+%\end{key}
+%\begin{key}{descriptionpluralaccess}
+% The replacement text corresponding to the \gloskey{descriptionplural} key:
+% \begin{macrocode}
+\define@key{glossentry}{descriptionpluralaccess}{%
+ \def\@glo@descpluralaccess{#1}%
+}
+% \end{macrocode}
+%\end{key}
+% There are no equivalent keys for the \gloskey{user1}\ldots
+%\gloskey{user6} keys. The replacement text would have to be
+% explicitly put in the value, e.g.,
+% "user1={\glsaccsupp{inches}{in}}".
+%
+%\begin{macro}{\@gls@noaccess}
+% Indicates that no replacement text has been provided.
+% \begin{macrocode}
+\def\@gls@noaccess{\relax}
+% \end{macrocode}
+%\end{macro}
+%
+% Add to the start hook (the \gloskey{access} key is initialised to
+% the value of the \gloskey{symbol} key at the start for backwards
+% compatibility):
+% \begin{macrocode}
+\let\@gls@oldnewglossaryentryprehook\@newglossaryentryprehook
+\renewcommand*{\@newglossaryentryprehook}{%
+ \@gls@oldnewglossaryentryprehook
+ \def\@glo@access{\@glo@symbol}%
+% \end{macrocode}
+% Initialise the other keys:
+% \begin{macrocode}
+ \def\@glo@textaccess{\@glo@access}%
+ \def\@glo@firstaccess{\@glo@access}%
+ \def\@glo@pluralaccess{\@glo@textaccess}%
+ \def\@glo@firstpluralaccess{\@glo@pluralaccess}%
+ \def\@glo@symbolaccess{\relax}%
+ \def\@glo@symbolpluralaccess{\@glo@symbolaccess}%
+ \def\@glo@descaccess{\relax}%
+ \def\@glo@descpluralaccess{\@glo@descaccess}%
+}
+% \end{macrocode}
+% Add to the end hook:
+% \begin{macrocode}
+\let\@gls@oldnewglossaryentryposthook\@newglossaryentryposthook
+\renewcommand*{\@newglossaryentryposthook}{%
+ \@gls@oldnewglossaryentryposthook
+% \end{macrocode}
+% Store the access information:
+% \begin{macrocode}
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @access\endcsname{%
+ \@glo@access}%
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @textaccess\endcsname{%
+ \@glo@textaccess}%
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @firstaccess\endcsname{%
+ \@glo@firstaccess}%
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @pluralaccess\endcsname{%
+ \@glo@pluralaccess}%
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @firstpluralaccess\endcsname{%
+ \@glo@firstpluralaccess}%
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @symbolaccess\endcsname{%
+ \@glo@symbolaccess}%
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @symbolpluralaccess\endcsname{%
+ \@glo@symbolpluralaccess}%
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @descaccess\endcsname{%
+ \@glo@descaccess}%
+ \expandafter
+ \protected@xdef\csname glo@\@glo@label @descpluralaccess\endcsname{%
+ \@glo@descpluralaccess}%
+}
+% \end{macrocode}
+%
+%\subsection{Accessing Replacement Text}
+%\begin{macro}{\glsentryaccess}
+% Get the value of the \gloskey{access} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentryaccess}[1]{%
+ \csname glo@#1@access\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentrytextaccess}
+% Get the value of the \gloskey{textaccess} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentrytextaccess}[1]{%
+ \csname glo@#1@textaccess\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentryfirstaccess}
+% Get the value of the \gloskey{firstaccess} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentryfirstaccess}[1]{%
+ \csname glo@#1@firstaccess\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentrypluralaccess}
+% Get the value of the \gloskey{pluralaccess} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentrypluralaccess}[1]{%
+ \csname glo@#1@pluralaccess\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentryfirstpluralaccess}
+% Get the value of the \gloskey{firstpluralaccess} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentryfirstpluralaccess}[1]{%
+ \csname glo@#1@firstpluralaccess\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentrysymbolaccess}
+% Get the value of the \gloskey{symbolaccess} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentrysymbolaccess}[1]{%
+ \csname glo@#1@symbolaccess\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentrysymbolpluralaccess}
+% Get the value of the \gloskey{symbolpluralaccess} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentrysymbolpluralaccess}[1]{%
+ \csname glo@#1@symbolpluralaccess\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentrydescaccess}
+% Get the value of the \gloskey{descriptionaccess} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentrydescaccess}[1]{%
+ \csname glo@#1@descaccess\endcsname
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsentrydescpluralaccess}
+% Get the value of the \gloskey{descriptionpluralaccess} key for the entry with
+% the given label:
+% \begin{macrocode}
+\newcommand*{\glsentrydescpluralaccess}[1]{%
+ \csname glo@#1@descaccess\endcsname
+}
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\glsaccsupp}
%\cs{glsaccsupp}\marg{replacement text}\marg{text}\\[10pt]
@@ -14574,33 +16684,148 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\xglsaccsupp}
+% Fully expands replacement text before calling \cs{glsaccsupp}
+% \begin{macrocode}
+\newcommand*{\xglsaccsupp}[2]{%
+ \protected@edef\@gls@replacementtext{#1}%
+ \expandafter\glsaccsupp\expandafter{\@gls@replacementtext}{#2}%
+}
+% \end{macrocode}
+%\end{macro}
%
-%\begin{macro}{\glsdisplay}
-% Redefine \cs{glsdisplay} to use symbol as replacement text
+%\begin{macro}{\glsnameaccessdisplay}
+% Displays the first argument with the accessibility text for
+% the entry with the label given by the second argument (if set).
% \begin{macrocode}
-\renewcommand{\glsdisplay}[4]{%
- \protected@edef\@glo@symbol{#3}%
- \ifx\@glo@symbol\relax
+\DeclareRobustCommand*{\glsnameaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentryaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
#1%
\else
- \expandafter\glsaccsupp\expandafter{\@glo@symbol}{#1}%
+ \xglsaccsupp{\@glo@access}{#1}%
\fi
- #4%
}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\glsdisplayfirst}
-% Redefine \cs{glsdisplayfirst} to use symbol as replacement text
-% on first use.
+%\begin{macro}{\glstextaccessdisplay}
+% As above but for the \gloskey{textaccess} replacement text.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glstextaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentrytextaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
+ #1%
+ \else
+ \xglsaccsupp{\@glo@access}{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glspluralaccessdisplay}
+% As above but for the \gloskey{pluralaccess} replacement text.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glspluralaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentrypluralaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
+ #1%
+ \else
+ \xglsaccsupp{\@glo@access}{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsfirstaccessdisplay}
+% As above but for the \gloskey{firstaccess} replacement text.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glsfirstaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentryfirstaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
+ #1%
+ \else
+ \xglsaccsupp{\@glo@access}{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsfirstpluralaccessdisplay}
+% As above but for the \gloskey{firstpluralaccess} replacement text.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glsfirstpluralaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentryfirstpluralaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
+ #1%
+ \else
+ \xglsaccsupp{\@glo@access}{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glssymbolaccessdisplay}
+% As above but for the \gloskey{symbolaccess} replacement text.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glssymbolaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentrysymbolaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
+ #1%
+ \else
+ \xglsaccsupp{\@glo@access}{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glssymbolpluralaccessdisplay}
+% As above but for the \gloskey{symbolpluralaccess} replacement text.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glssymbolpluralaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentrysymbolpluralaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
+ #1%
+ \else
+ \xglsaccsupp{\@glo@access}{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsdescriptionaccessdisplay}
+% As above but for the \gloskey{descriptionaccess} replacement text.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glsdescriptionaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentrydescaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
+ #1%
+ \else
+ \xglsaccsupp{\@glo@access}{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsdescriptionpluralaccessdisplay}
+% As above but for the \gloskey{descriptionpluralaccess} replacement text.
% \begin{macrocode}
-\renewcommand{\glsdisplayfirst}[4]{%
- \protected@edef\@glo@symbol{#3}%
- \ifx\@glo@symbol\relax
+\DeclareRobustCommand*{\glsdescriptionpluralaccessdisplay}[2]{%
+ \protected@edef\@glo@access{\glsentrydescpluralaccess{#2}}%
+ \ifx\@glo@access\@gls@noaccess
#1%
\else
- \expandafter\glsaccsupp\expandafter{\@glo@symbol}{#1}%
+ \xglsaccsupp{\@glo@access}{#1}%
\fi
- #4%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsaccessdisplay}
+% Gets the replacement text corresponding to the named key given
+% by the first argument and calls the appropriate command
+% defined above.
+% \begin{macrocode}
+\DeclareRobustCommand*{\glsaccessdisplay}[3]{%
+ \@ifundefined{gls#1accessdisplay}%
+ {%
+ \PackageError{glossaries-accsupp}{No accessibility support
+ for key `#1'}{}%
+ }%
+ {%
+ \csname gls#1accessdisplay\endcsname{#2}{#3}%
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -14624,12 +16849,16 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\ifglsused{#2}%
{%
\def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}%
+ {\glstextaccessdisplay{\glsentrytext{#2}}{#2}}%
+ {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
+ {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
{#3}}%
}%
{%
\def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}%
+ {\glsfirstaccessdisplay{\glsentryfirst{#2}}{#2}}%
+ {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
+ {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
{#3}}%
}%
% \end{macrocode}
@@ -14642,8 +16871,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\@gls@link[#1]{#2}{\@glo@text}%
}%
{%
- \ifthenelse{\equal{\@glo@type}{\acronymtype}\and
- \boolean{glsacrfootnote}}%
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
+ \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}%
{%
\@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}%
@@ -14681,12 +16911,16 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\ifglsused{#2}%
{%
\def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\Glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}%
+ {\glstextaccessdisplay{\Glsentrytext{#2}}{#2}}%
+ {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
+ {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
{#3}}%
}%
{%
\def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\Glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}%
+ {\glsfirstaccessdisplay{\Glsentryfirst{#2}}{#2}}%
+ {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
+ {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
{#3}}%
}%
% \end{macrocode}
@@ -14699,8 +16933,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\@gls@link[#1]{#2}{\@glo@text}%
}%
{%
- \ifthenelse{\equal{\@glo@type}{\acronymtype}\and
- \boolean{glsacrfootnote}}%
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
+ \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}%
{%
\@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}%
@@ -14734,12 +16969,16 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\ifglsused{#2}%
{%
\def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}%
+ {\glstextaccessdisplay{\glsentrytext{#2}}{#2}}%
+ {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
+ {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
{#3}}%
}%
{%
\edef\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}%
+ {\glsfirstaccessdisplay{\glsentryfirst{#2}}{#2}}%
+ {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}%
+ {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}%
{#3}}%
}%
% \end{macrocode}
@@ -14754,8 +16993,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
}%
{%
- \ifthenelse{\equal{\@glo@type}{\acronymtype}\and
- \boolean{glsacrfootnote}}{%
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
+ \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}{%
\@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}%
}%
{%
@@ -14789,13 +17029,17 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\ifglsused{#2}%
{%
\def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glsentryplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
+ {\glspluralaccessdisplay{\glsentryplural{#2}}{#2}}%
+ {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
+ {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
+ {#3}}%
}%
{%
\def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
+ {\glsfirstpluralaccessdisplay{\glsentryfirstplural{#2}}{#2}}%
+ {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
+ {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
+ {#3}}%
}%
% \end{macrocode}
% Call \cs{@gls@link}
@@ -14809,8 +17053,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\@gls@link[#1]{#2}{\@glo@text}%
}%
{%
- \ifthenelse{\equal{\@glo@type}{\acronymtype}\and
- \boolean{glsacrfootnote}}%
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
+ \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}%
{%
\@gls@link[#1,hyper=false]{#2}{\@glo@text}%
}%
@@ -14845,13 +17090,17 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\ifglsused{#2}%
{%
\def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\Glsentryplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
+ {\glspluralaccessdisplay{\Glsentryplural{#2}}{#2}}%
+ {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
+ {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
+ {#3}}%
}%
{%
\def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\Glsentryfirstplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
+ {\glsfirstpluralaccessdisplay{\Glsentryfirstplural{#2}}{#2}}%
+ {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
+ {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
+ {#3}}%
}%
% \end{macrocode}
% Call \cs{@gls@link}
@@ -14899,13 +17148,17 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\ifglsused{#2}%
{%
\def\@glo@text{\csname gls@\@glo@type @display\endcsname
- {\glsentryplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
+ {\glspluralaccessdisplay{\glsentryplural{#2}}{#2}}%
+ {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
+ {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
+ {#3}}%
}%
{%
\def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname
- {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}%
- {\glsentrysymbolplural{#2}}{#3}}%
+ {\glsfirstpluralaccessdisplay{\glsentryfirstplural{#2}}{#2}}%
+ {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}%
+ {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}%
+ {#3}}%
}%
% \end{macrocode}
% Call \cs{@gls@link}
@@ -14917,8 +17170,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}%
}%
{%
- \ifthenelse{\equal{\@glo@type}{\acronymtype}\and
- \boolean{glsacrfootnote}}%
+ \gls@checkisacronymlist\@glo@type
+ \ifthenelse{\(\boolean{@glsisacronymlist}\AND
+ \boolean{glsacrfootnote}\)\OR\NOT\boolean{glshyperfirst}}%
{%
\@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}%
}%
@@ -14935,6 +17189,216 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
% \end{macrocode}
%\end{macro}
%
+%\subsection{Displaying the Glossary}
+% Entries within the glossary or list of acronyms are now formatted
+% via \cs{accsuppglossaryentryfield} and
+% \cs{accsuppglossarysubentryfield}.
+%\begin{macro}{\@glossaryentryfield}
+% \begin{macrocode}
+\ifglsxindy
+ \renewcommand*{\@glossaryentryfield}{%
+ \string\\accsuppglossaryentryfield}
+\else
+ \renewcommand*{\@glossaryentryfield}{%
+ \string\accsuppglossaryentryfield}
+\fi
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@glossarysubentryfield}
+% \begin{macrocode}
+\ifglsxindy
+ \renewcommand*{\@glossarysubentryfield}{%
+ \string\\accsuppglossarysubentryfield}
+\else
+ \renewcommand*{\@glossarysubentryfield}{%
+ \string\accsuppglossarysubentryfield}
+\fi
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\accsuppglossaryentryfield}
+% \begin{macrocode}
+\newcommand*{\accsuppglossaryentryfield}[5]{%
+ \glossaryentryfield{#1}%
+ {\glsnameaccessdisplay{#2}{#1}}%
+ {\glsdescriptionaccessdisplay{#3}{#1}}%
+ {\glssymbolaccessdisplay{#4}{#1}}{#5}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\accsuppglossarysubentryfield}
+% \begin{macrocode}
+\newcommand*{\accsuppglossarysubentryfield}[6]{%
+ \glossaryentryfield{#1}{#2}%
+ {\glsnameaccessdisplay{#3}{#2}}%
+ {\glsdescriptionaccessdisplay{#4}{#2}}%
+ {\glssymbolaccessdisplay{#5}{#2}}{#6}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\subsection{Acronyms}
+% Use \cs{newacronymhook} to modify the key list to set
+% the access text to the long version by default.
+% \begin{macrocode}
+\renewcommand*{\newacronymhook}{%
+ \edef\@gls@keylist{\glsshortkey access=\the\glslongtok,%
+ \the\glskeylisttok}%
+ \expandafter\glskeylisttok\expandafter{\@gls@keylist}%
+}
+% \end{macrocode}
+%\begin{macro}{\DefaultNewAcronymDef}
+% Modify default style to use access text:
+% \begin{macrocode}
+\renewcommand*{\DefaultNewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\the\glsshorttok},%
+ description={\the\glslongtok},%
+ descriptionaccess=\relax,
+ text={\the\glsshorttok},%
+ textaccess={\the\glslongtok},%
+ access={\noexpand\@glo@textaccess},%
+ sort={\the\glsshorttok},%
+ descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ firstaccess=\relax,
+ first={\noexpand\glsdescriptionaccessdisplay
+ {\the\glslongtok}{\the\glslabeltok}\space
+ (\noexpand\glstextaccessdisplay
+ {\the\glsshorttok}{\the\glslabeltok})},%
+ plural={\the\glsshorttok\acrpluralsuffix},%
+ firstplural={\noexpand\glsdescriptionpluralaccessdisplay
+ {\noexpand\@glo@descplural}{\the\glslabeltok}\space
+ (\noexpand\glspluralaccessdisplay
+ {\noexpand\@glo@plural}{\the\glslabeltok})},%
+ firstpluralaccess=\relax,
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DescriptionFootnoteNewAcronymDef}
+% \begin{macrocode}
+\renewcommand*{\DescriptionFootnoteNewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\noexpand\acronymfont{\the\glsshorttok}},%
+ sort={\the\glsshorttok},%
+ text={\the\glsshorttok},%
+ textaccess={\the\glslongtok},%
+ access={\noexpand\@glo@textaccess},%
+ plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ symbol={\the\glslongtok},%
+ symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DescriptionNewAcronymDef}
+% \begin{macrocode}
+\renewcommand*{\DescriptionNewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\noexpand
+ \acrnameformat{\the\glsshorttok}{\the\glslongtok}},%
+ access={\noexpand\@glo@textaccess},%
+ sort={\the\glsshorttok},%
+ first={\the\glslongtok},%
+ firstaccess=\relax,
+ firstplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ text={\the\glsshorttok},%
+ textaccess={\the\glslongtok},%
+ plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ symbol={\noexpand\@glo@text},%
+ symbolaccess={\noexpand\@glo@textaccess},%
+ symbolplural={\noexpand\@glo@plural},%
+ \the\glskeylisttok}%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\FootnoteNewAcronymDef}
+% \begin{macrocode}
+\renewcommand*{\FootnoteNewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\noexpand\acronymfont{\the\glsshorttok}},%
+ access={\noexpand\@glo@textaccess},%
+ sort={\the\glsshorttok},%
+ text={\the\glsshorttok},%
+ textaccess={\the\glslongtok},%
+ plural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ description={\the\glslongtok},%
+ descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\SmallNewAcronymDef}
+% \begin{macrocode}
+\renewcommand*{\SmallNewAcronymDef}{%
+ \edef\@do@newglossaryentry{%
+ \noexpand\newglossaryentry{\the\glslabeltok}%
+ {%
+ type=\acronymtype,%
+ name={\noexpand\acronymfont{\the\glsshorttok}},%
+ access={\noexpand\@glo@symbolaccess},%
+ sort={\the\glsshorttok},%
+ text={\noexpand\@glo@symbol},%
+ textaccess={\noexpand\@glo@symbolaccess},%
+ plural={\noexpand\@glo@symbolplural},%
+ first={\the\glslongtok},%
+ firstaccess=\relax,
+ firstplural={\the\glslongtok\noexpand\acrpluralsuffix},%
+ description={\noexpand\@glo@first},%
+ descriptionplural={\noexpand\@glo@firstplural},%
+ symbol={\the\glsshorttok},%
+ symbolaccess={\the\glslongtok},%
+ symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
+ \the\glskeylisttok
+ }%
+ }%
+ \@do@newglossaryentry
+}
+% \end{macrocode}
+%\end{macro}
+% Add means of referencing accessibility support for acronyms:
+%\begin{macro}{\glsshortaccesskey}
+% \begin{macrocode}
+ \newcommand*{\glsshortaccesskey}{\glsshortkey access}%
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsshortpluralaccesskey}
+% \begin{macrocode}
+ \newcommand*{\glsshortpluralaccesskey}{\glsshortpluralkey access}%
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glslongaccesskey}
+% \begin{macrocode}
+ \newcommand*{\glslongaccesskey}{\glslongkey access}%
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glslongpluralaccesskey}
+% \begin{macrocode}
+ \newcommand*{\glslongpluralaccesskey}{\glslongpluralkey access}%
+% \end{macrocode}
+%\end{macro}
%\iffalse
% \begin{macrocode}
%</glossaries-accsupp.sty>
@@ -15262,6 +17726,198 @@ firstplural={\@glo@descplural\space (\@glo@plural)},%
%\fi
%\iffalse
% \begin{macrocode}
+%<*glossaries-polyglossia.sty>
+% \end{macrocode}
+%\fi
+%\subsection{Polyglossia Captions}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{glossaries-polyglossia}[2009/11/09 v1.0 (NLCT)]
+% \end{macrocode}
+% English:
+% \begin{macrocode}
+\@ifundefined{captionsenglish}{}{%
+ \expandafter\toks@\expandafter{\captionsenglish
+ \renewcommand*{\glossaryname}{\textenglish{Glossary}}%
+ \renewcommand*{\acronymname}{\textenglish{Acronyms}}%
+ \renewcommand*{\entryname}{\textenglish{Notation}}%
+ \renewcommand*{\descriptionname}{\textenglish{Description}}%
+ \renewcommand*{\symbolname}{\textenglish{Symbol}}%
+ \renewcommand*{\pagelistname}{\textenglish{Page List}}%
+ \renewcommand*{\glssymbolsgroupname}{\textenglish{Symbols}}%
+ \renewcommand*{\glsnumbersgroupname}{\textenglish{Numbers}}%
+ }%
+ \edef\captionsenglish{\the\toks@}%
+}
+% \end{macrocode}
+% German:
+% \begin{macrocode}
+\@ifundefined{captionsgerman}{}{%
+ \expandafter\toks@\expandafter{\captionsgerman
+ \renewcommand*{\glossaryname}{\textgerman{Glossar}}%
+ \renewcommand*{\acronymname}{\textgerman{Akronyme}}%
+ \renewcommand*{\entryname}{\textgerman{Bezeichnung}}%
+ \renewcommand*{\descriptionname}{\textgerman{Beschreibung}}%
+ \renewcommand*{\symbolname}{\textgerman{Symbol}}%
+ \renewcommand*{\pagelistname}{\textgerman{Seiten}}%
+ \renewcommand*{\glssymbolsgroupname}{\textgerman{Symbole}}%
+ \renewcommand*{\glsnumbersgroupname}{\textgerman{Zahlen}}%
+ }%
+ \edef\captionsgerman{\the\toks@}%
+}
+% \end{macrocode}
+% Italian:
+% \begin{macrocode}
+\@ifundefined{captionsitalian}{}{%
+ \expandafter\toks@\expandafter{\captionsitalian
+ \renewcommand*{\glossaryname}{\textitalian{Glossario}}%
+ \renewcommand*{\acronymname}{\textitalian{Acronimi}}%
+ \renewcommand*{\entryname}{\textitalian{Nomenclatura}}%
+ \renewcommand*{\descriptionname}{\textitalian{Descrizione}}%
+ \renewcommand*{\symbolname}{\textitalian{Simbolo}}%
+ \renewcommand*{\pagelistname}{\textitalian{Elenco delle pagine}}%
+ \renewcommand*{\glssymbolsgroupname}{\textitalian{Simboli}}%
+ \renewcommand*{\glsnumbersgroupname}{\textitalian{Numeri}}%
+ }%
+ \edef\captionsitalian{\the\toks@}%
+}
+% \end{macrocode}
+% Dutch:
+% \begin{macrocode}
+\@ifundefined{captionsdutch}{}{%
+ \expandafter\toks@\expandafter{\captionsdutch
+ \renewcommand*{\glossaryname}{\textdutch{Woordenlijst}}%
+ \renewcommand*{\acronymname}{\textdutch{Acroniemen}}%
+ \renewcommand*{\entryname}{\textdutch{Benaming}}%
+ \renewcommand*{\descriptionname}{\textdutch{Beschrijving}}%
+ \renewcommand*{\symbolname}{\textdutch{Symbool}}%
+ \renewcommand*{\pagelistname}{\textdutch{Pagina's}}%
+ \renewcommand*{\glssymbolsgroupname}{\textdutch{Symbolen}}%
+ \renewcommand*{\glsnumbersgroupname}{\textdutch{Cijfers}}%
+ }%
+ \edef\captionsdutch{\the\toks@}%
+}
+% \end{macrocode}
+% Spanish:
+% \begin{macrocode}
+\@ifundefined{captionsspanish}{}{%
+ \expandafter\toks@\expandafter{\captionsspanish
+ \renewcommand*{\glossaryname}{\textspanish{Glosario}}%
+ \renewcommand*{\acronymname}{\textspanish{Siglas}}%
+ \renewcommand*{\entryname}{\textspanish{Entrada}}%
+ \renewcommand*{\descriptionname}{\textspanish{Descripci\'on}}%
+ \renewcommand*{\symbolname}{\textspanish{S\'{\i}mbolo}}%
+ \renewcommand*{\pagelistname}{\textspanish{Lista de p\'aginas}}%
+ \renewcommand*{\glssymbolsgroupname}{\textspanish{S\'{\i}mbolos}}%
+ \renewcommand*{\glsnumbersgroupname}{\textspanish{N\'umeros}}%
+ }%
+ \edef\captionsspanish{\the\toks@}%
+}
+% \end{macrocode}
+% French:
+% \begin{macrocode}
+\@ifundefined{captionsfrench}{}{%
+ \expandafter\toks@\expandafter{\captionsfrench
+ \renewcommand*{\glossaryname}{\textfrench{Glossaire}}%
+ \renewcommand*{\acronymname}{\textfrench{Acronymes}}%
+ \renewcommand*{\entryname}{\textfrench{Terme}}%
+ \renewcommand*{\descriptionname}{\textfrench{Description}}%
+ \renewcommand*{\symbolname}{\textfrench{Symbole}}%
+ \renewcommand*{\pagelistname}{\textfrench{Pages}}%
+ \renewcommand*{\glssymbolsgroupname}{\textfrench{Symboles}}%
+ \renewcommand*{\glsnumbersgroupname}{\textfrench{Nombres}}%
+ }%
+ \edef\captionsfrench{\the\toks@}%
+}
+% \end{macrocode}
+% Danish:
+% \begin{macrocode}
+\@ifundefined{captionsdanish}{}{%
+ \expandafter\toks@\expandafter{\captionsdanish
+ \renewcommand*{\glossaryname}{\textdanish{Ordliste}}%
+ \renewcommand*{\acronymname}{\textdanish{Akronymer}}%
+ \renewcommand*{\entryname}{\textdanish{Symbolforklaring}}%
+ \renewcommand*{\descriptionname}{\textdanish{Beskrivelse}}%
+ \renewcommand*{\symbolname}{\textdanish{Symbol}}%
+ \renewcommand*{\pagelistname}{\textdanish{Side}}%
+ \renewcommand*{\glssymbolsgroupname}{\textdanish{Symboler}}%
+ \renewcommand*{\glsnumbersgroupname}{\textdanish{Tal}}%
+ }%
+ \edef\captionsdanish{\the\toks@}%
+}
+% \end{macrocode}
+% Irish:
+% \begin{macrocode}
+\@ifundefined{captionsirish}{}{%
+ \expandafter\toks@\expandafter{\captionsirish
+ \renewcommand*{\glossaryname}{\textirish{Gluais}}%
+ \renewcommand*{\acronymname}{\textirish{Acrainmneacha}}%
+ \renewcommand*{\entryname}{\textirish{Ciall}}%
+ \renewcommand*{\descriptionname}{\textirish{Tuairisc}}%
+ \renewcommand*{\symbolname}{\textirish{Comhartha}}%
+ \renewcommand*{\glssymbolsgroupname}{\textirish{Comhartha\'{\i}}}%
+ \renewcommand*{\pagelistname}{\textirish{Leathanaigh}}%
+ \renewcommand*{\glsnumbersgroupname}{\textirish{Uimhreacha}}%
+ }%
+ \edef\captionsirish{\the\toks@}%
+}
+% \end{macrocode}
+% Hungarian:
+% \begin{macrocode}
+\@ifundefined{captionsmagyar}{}{%
+ \expandafter\toks@\expandafter{\captionsmagyar
+ \renewcommand*{\glossaryname}{\textmagyar{Sz\'ojegyz\'ek}}%
+ \renewcommand*{\acronymname}{\textmagyar{Bet\H uszavak}}%
+ \renewcommand*{\entryname}{\textmagyar{Kifejez\'es}}%
+ \renewcommand*{\descriptionname}{\textmagyar{Magyar\'azat}}%
+ \renewcommand*{\symbolname}{\textmagyar{Jel\"ol\'es}}%
+ \renewcommand*{\pagelistname}{\textmagyar{Oldalsz\'am}}%
+ \renewcommand*{\glssymbolsgroupname}{\textmagyar{Jelek}}%
+ \renewcommand*{\glsnumbersgroupname}{\textmagyar{Sz\'amjegyek}}%
+ }%
+ \edef\captionsmagyar{\the\toks@}%
+}
+% \end{macrocode}
+% Polish
+% \changes{1.13}{2008 May 10}{Add Polish support}
+% \begin{macrocode}
+\@ifundefined{captionspolish}{}{%
+ \expandafter\toks@\expandafter{\captionspolish
+ \renewcommand*{\glossaryname}{\textpolish{S{\l}ownik termin\'ow}}%
+ \renewcommand*{\acronymname}{\textpolish{Skr\'ot}}%
+ \renewcommand*{\entryname}{\textpolish{Termin}}%
+ \renewcommand*{\descriptionname}{\textpolish{Opis}}%
+ \renewcommand*{\symbolname}{\textpolish{Symbol}}%
+ \renewcommand*{\pagelistname}{\textpolish{Strony}}%
+ \renewcommand*{\glssymbolsgroupname}{\textpolish{Symbole}}%
+ \renewcommand*{\glsnumbersgroupname}{\textpolish{Liczby}}%
+ }%
+ \edef\captionspolish{\the\toks@}%
+}
+% \end{macrocode}
+% Portugues
+% \begin{macrocode}
+\@ifundefined{captionsportuges}{}{%
+ \expandafter\toks@\expandafter{\captionsportuges
+ \renewcommand*{\glossaryname}{\textportuges{Gloss\'ario}}%
+ \renewcommand*{\acronymname}{\textportuges{Siglas}}%
+ \renewcommand*{\entryname}{\textportuges{Nota\c c\~ao}}%
+ \renewcommand*{\descriptionname}{\textportuges{Descri\c c\~ao}}%
+ \renewcommand*{\symbolname}{\textportuges{S\'imbolo}}%
+ \renewcommand*{\pagelistname}{\textportuges{Lista de P\'aginas}}%
+ \renewcommand*{\glssymbolsgroupname}{\textportuges{S\'imbolos}}%
+ \renewcommand*{\glsnumbersgroupname}{\textportuges{N\'umeros}}%
+ }%
+ \edef\captionsportuges{\the\toks@}%
+}
+% \end{macrocode}
+%\iffalse
+% \begin{macrocode}
+%</glossaries-polyglossia.sty>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*glossaries-dictionary-Brazilian.dict>
% \end{macrocode}
%\fi
@@ -15815,13 +18471,25 @@ measured in kilograms.
% \begin{macrocode}
\documentclass{article}
-\usepackage{glossaries-accsupp}
+\usepackage[acronym,smallcaps]{glossaries-accsupp}
+
+\makeglossaries
+
+\newglossaryentry{dr}{name=Dr,description={Doctor},access={Doctor}}
+
+\newacronym[\glsshortaccesskey=S V M]{svm}{svm}{support vector machine}
- % Replacement text is stored in symbol
-\newglossaryentry{dr}{name=Dr,description={},symbol={Doctor}}
+\newacronym{eg}{e.g.}{for example}
\begin{document}
\gls{dr}~Jones.
+\gls{dr}~Jones.
+
+\Gls{eg}, \gls{eg}
+
+\gls{svm}. \gls{svm}.
+
+\printglossaries
\end{document}
% \end{macrocode}
%\fi
@@ -15964,6 +18632,54 @@ one \gls[format=hyperbf]{svm}.
%\fi
%\iffalse
% \begin{macrocode}
+%<*sampleacronyms.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+\documentclass{article}
+
+\usepackage[acronym,footnote,acronymlists={main,acronym2}]{glossaries}
+
+\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms}
+
+\makeglossaries
+
+% Main glossary is a list of calculus acronyms
+
+\renewcommand{\glossaryname}{Calculus Acronyms}
+
+\newacronym[type=main]{vc}{VC}{Vector Calculus}
+\newacronym[type=main]{ftoc}{FTOC}{Fundamental Theorem of Calculus}
+
+% "acronym" glossary is a list of computer related acronyms
+
+\renewcommand{\acronymname}{Computer Acronyms}
+
+\newacronym{kb}{kb}{KiloBit}
+\newacronym{kB}{kB}{KiloByte}
+
+% "acronym2" glossary is a list of statistical acronyms
+
+\newacronym[type=acronym2]{svm}{SVM}{Support Vector Machine}
+
+\begin{document}
+\section{Sample Section}
+\gls{kb}. \gls{kB}. \gls{vc}. \gls{ftoc}. \gls{svm}.
+
+\gls{kb}. \gls{kB}. \gls{vc}. \gls{ftoc}. \gls{svm}.
+
+\printglossaries
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</sampleacronyms.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*sampleDB.tex>
% \end{macrocode}
%\fi
@@ -15983,7 +18699,7 @@ one \gls[format=hyperbf]{svm}.
\begin{document}
-Adding all entries\glsaddall.
+\glsaddall
\printglossaries
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins
index ec6ed3a5306..3700a3a9e16 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 2009/9/24 16:55
+% glossaries.ins generated using makedtx version 0.94b 2009/11/10 12:57
\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-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-accsupp.sty, glossaries-babel.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-Spanish.dict, minimalgls.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl.
+ This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.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-Spanish.dict, minimalgls.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.tex, samplexdy-mc.xdy, database1.tex, database2.tex, glossaries.perl.
\endpreamble
@@ -46,6 +46,8 @@
\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-accsupp.sty,package}}
\file{glossaries-babel.sty}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-babel.sty,package}}
+\file{glossaries-polyglossia.sty}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-polyglossia.sty,package}}
\file{glossaries-dictionary-Brazilian.dict}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-dictionary-Brazilian.dict,package}}
\file{glossaries-dictionary-Danish.dict}{\usepreamble\defaultpreamble
@@ -74,6 +76,7 @@
\file{sampleaccsupp.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleaccsupp.tex}}
\file{sampleAcr.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleAcr.tex}}
\file{sampleAcrDesc.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleAcrDesc.tex}}
+\file{sampleacronyms.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleacronyms.tex}}
\file{sampleDB.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleDB.tex}}
\file{sampleDesc.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleDesc.tex}}
\file{sampleEq.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleEq.tex}}