diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex | 1004 |
1 files changed, 702 insertions, 302 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex b/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex index 8356d8f8b09..0da31deee59 100644 --- a/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex +++ b/Master/texmf-dist/doc/latex/glossaries/glossaries-manual.tex @@ -19,6 +19,7 @@ \usepackage{creatdtx} \ifmakedtx{ +\usepackage{xcolor} \usepackage{dox} \doxitem{Option}{option}{package options} \doxitem{GlsKey}{key}{glossary keys} @@ -32,7 +33,7 @@ \makeatother \RecordChanges \PageIndex -\CheckSum{8767} +\CheckSum{10923} \CodelineNumbered \newcommand*{\termdef}[1]{\emph{#1}\iterm{#1}} \newcommand*{\term}[1]{#1\iterm{#1}} @@ -53,6 +54,29 @@ \par\vskip10pt\noindent \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 +} } { \usepackage{html} @@ -71,6 +95,8 @@ \newcommand{\DescribeOption}[1]{} \newcommand{\DescribeGlsKey}[1]{} \newcommand{\DescribeStyle}[1]{} + +\newenvironment{definition}[1][]{\par}{\par} } \makeatletter @@ -146,7 +172,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\\ @@ -154,7 +180,7 @@ Norwich. Norfolk\\ NR4 7TJ. United Kingdom.\\ \url{http://theoval.cmp.uea.ac.uk/~nlct/}} - \date{23rd September 2009} + \date{10 November 2009} \maketitle \tableofcontents @@ -616,10 +642,10 @@ As from version 1.08, the \sty{glossaries} package now has 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: @@ -705,14 +731,20 @@ the \isty{babel} package and do not have the \isty{translator} package installed, you need to be familiar with the \ifmakedtx{ advice given in \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords}}{advice on \htmladdnormallink{changing the words babel uses}{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} @@ -739,6 +771,10 @@ or: } \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 @@ -1269,6 +1305,22 @@ Entries that are defined using \ics{newacronym} are placed in 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, @@ -1286,12 +1338,16 @@ is equivalent to \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} @@ -1302,11 +1358,10 @@ or to prevent it from changing the headers: \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} @@ -1346,7 +1401,10 @@ The list of acronyms is in section~\ref{\acronymtype}. \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:} @@ -1510,22 +1568,27 @@ is word ordering. Note that this option has no effect if you 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 @@ -1586,9 +1649,10 @@ command must be used before \cs{makeglossaries}. 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}. @@ -1599,8 +1663,10 @@ the location refers to the page number but this may be overridden 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{-} @@ -1609,8 +1675,10 @@ Note that this command must be used before \cs{makeglossaries}. 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 @@ -1623,9 +1691,11 @@ See \ifmakedtx{\autoref{sec:numberlists}}{\htmlref{Number lists}{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 @@ -1711,6 +1781,11 @@ assumed. The list of acronyms type is given by \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. @@ -1768,18 +1843,21 @@ description={a fully grown female of any bovine animal}} 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} -and use \verb|\glspl{cow}| to produce \dq{cows} and use -\verb|\glslink{cow}{kine}| to produce \dq{kine}. +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} +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 @@ -1900,10 +1978,11 @@ parent=bravo} \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 @@ -1995,9 +2074,13 @@ Note that \cs{GlsSetXdyMinRangeLength} must be used before \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: @@ -2063,7 +2146,10 @@ Examples: \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} @@ -2078,9 +2164,10 @@ entry can be used without affecting the \firstuseflag\ (for example, when used with \cs{glslink}). See \ifmakedtx{\autoref{sec:glsunset}}{\htmlref{later}{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, @@ -2189,17 +2276,19 @@ effect if \cs{hyperlink} has not been defined.) The default 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 @@ -2209,12 +2298,14 @@ the value of the \gloskey{first} key will be used. 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. @@ -2229,13 +2320,16 @@ The first optional argument \meta{options} is the same as the optional 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 @@ -2244,17 +2338,20 @@ a starred version that disable the hyperlink. Note that \cs{glslink} doesn't use or affect the \firstuseflag, nor does it use \ics{glsdisplay} or \ics{glsdisplayfirst} (see \ifmakedtx{\autoref{sec:glsdisplay}}{\htmlref{later}{sec:glsdisplay}}). -Instead, you can use:\\[10pt] -\DescribeMacro{\glsdisp} -\cs{glsdisp}\oarg{options}\marg{label}\marg{link text}\\[10pt] +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. @@ -2263,61 +2360,77 @@ is always appended to the link text since \cs{glstext} doesn't 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 @@ -2326,16 +2439,20 @@ been used. Note: if you want to use this command and the \ifmakedtx{\hyperlink{sanitize}{sanitization}}{\htmlref{sanitization}{sanitize}} 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 @@ -2344,16 +2461,20 @@ been used. Note: if you want to use this command and the \ifmakedtx{\hyperlink{sanitize}{sanitization}}{\htmlref{sanitization}{sanitize}} 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 @@ -2363,14 +2484,80 @@ have to disable the \ifmakedtx{\hyperlink{sanitize}{sanitization}}{\htmlref{sanitization}{sanitize}} 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} + \ifmakedtx{}{\toTop} \subsubsection{Changing the format of the link text} @@ -2378,9 +2565,15 @@ the hyperlink. 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 @@ -2440,10 +2633,14 @@ If you have multiple glossaries, changing \cs{glsdisplayfirst} and 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: @@ -2487,10 +2684,14 @@ If you load the \isty{hyperref} or \isty{html} packages prior to 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 @@ -2505,10 +2706,11 @@ affects commands that recognise the \firstuse\ flag, for example \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 @@ -2521,9 +2723,10 @@ Lots of text about sets spanning many pages. \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 @@ -2587,8 +2790,10 @@ description={Series expansion}, 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. @@ -2615,60 +2820,126 @@ adding any information to the glossary. They don't use \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 @@ -2705,9 +2976,10 @@ still does not appear after you re-\LaTeX\ your document, check the 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} @@ -2824,16 +3096,22 @@ by the \sty{glossaries} package that allow you to adjust the 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 @@ -2857,9 +3135,10 @@ this information is obtained from the document's auxiliary (\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 @@ -2869,9 +3148,10 @@ setting will only be applied to the glossary given by 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} @@ -2908,9 +3188,10 @@ need to remember to set the language and encoding using the 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 @@ -2980,9 +3261,10 @@ Entries}{sec:newglosentry}}}), 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: @@ -3010,9 +3292,10 @@ Note that \cs{GlsSetXdyLocationClassOrder} has no effect if 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} @@ -3061,9 +3344,10 @@ Note that \cs{GlsSetXdyFirstLetterAfterDigits} has no effect if \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 @@ -3090,7 +3374,10 @@ not sure whether the \pkgopt{acronym} option has been used, you 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 @@ -3101,13 +3388,14 @@ ensure that the relevant output files are opened. \subsection{Acronyms} \label{sec:acronyms} -\DescribeMacro{\newacronym} You may have noticed in \ifmakedtx{\autoref{sec:newglosentry}}{\htmlref{Defining Glossary Entries}{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},\\ @@ -3126,7 +3414,10 @@ is the name of the glossary in which the acronyms should appear. If 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|, @@ -3170,10 +3461,14 @@ such as \cs{acrshort}, as they vary according to the definition of 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 @@ -3353,8 +3648,10 @@ using the \gloskey{description} key in the optional argument 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 @@ -3466,35 +3763,41 @@ the keys that store the long and short form vary depending on 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. @@ -3561,8 +3864,10 @@ replacement \sty{glossaries} package. In addition, the old 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] @@ -3635,19 +3940,34 @@ possible that you may want to use the value given by the \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 @@ -3656,9 +3976,10 @@ list of acronyms: \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. @@ -3716,8 +4037,10 @@ be displayed if it has been defined.} \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. @@ -4286,8 +4609,10 @@ the glossary groups. The navigation line is the same as that for \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 @@ -4315,16 +4640,17 @@ groups. The navigation line is the same as that for \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 @@ -4333,9 +4659,9 @@ the \glostyle{list} style uses the \envname{description} environment, 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 @@ -4343,9 +4669,10 @@ the glossary style. The \glostyle{list} glossary style redefines \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 @@ -4358,17 +4685,17 @@ the language settings. 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 \ifmakedtx{\autoref{sec:code:hypernav}}{the documented code of \isty{glossary-hypernav} in \texttt{glossaries.pdf}}. @@ -4384,20 +4711,20 @@ redefines \cs{glsgroupheading} as follows: 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 @@ -4410,9 +4737,9 @@ hyperlinks are enabled) to the relevant line in the glossary. 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 @@ -4444,17 +4771,16 @@ Therefore, when you define a new glossary style, you don't need 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 \ifmakedtx{\autoref{sec:code:printglos}}{the documented code in \texttt{glossaries.pdf}}. @@ -4507,7 +4833,7 @@ are displayed in exactly the same way as the top level entries. 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 @@ -4524,19 +4850,91 @@ follows: \end{verbatim} \ifmakedtx{}{\toTop} +\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} +\ifmakedtx{}{\toTop} + \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} @@ -4550,9 +4948,10 @@ recommended that you also read the \isty{accsupp} documentation. \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 @@ -4600,8 +4999,9 @@ Whereas: \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} |