diff options
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.dtx | 1466 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.ins | 8 |
2 files changed, 1192 insertions, 282 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index b4c707a604c..53444736371 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -20,7 +20,7 @@ % -doc "glossaries-manual.tex" % -codetitle "Documented Code" % glossaries -% Created on 2008/3/8 23:00 +% Created on 2008/5/13 11:33 %\fi %\iffalse %<*package> @@ -71,12 +71,14 @@ \makeatother \RecordChanges \PageIndex -\CheckSum{4630} +\CheckSum{5110} \CodelineNumbered \newcommand*{\termdef}[1]{\emph{#1}\iterm{#1}} \newcommand*{\term}[1]{#1\iterm{#1}} \newcommand*{\iterm}[1]{\index{#1|main}} \newcommand{\dq}[1]{``#1''} +\newcommand*{\tableref}[1]{\hyperref[#1]{table~\ref*{#1}}} +\newcommand*{\Tableref}[1]{\hyperref[#1]{Table~\ref*{#1}}} @@ -109,7 +111,7 @@ %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{glossaries.sty v 1.12: \LaTeXe\ Package to Assist Generating Glossaries} +% \title{glossaries.sty v 1.13: \LaTeXe\ Package to Assist Generating Glossaries} % \author{Nicola L.C. Talbot\\[10pt] %School of Computing Sciences\\ %University of East Anglia\\ @@ -117,7 +119,7 @@ %NR4 7TJ. United Kingdom.\\ %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % -% \date{8th March 2008} +% \date{12th May 2008} % \maketitle %\tableofcontents % @@ -134,25 +136,99 @@ %This package replaces the \isty{glossary} package which is now %obsolete. % -%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 comp.text.tex. -%However you must load \isty{babel} \emph{before} -%\sty{glossaries} to enable this. (See \autoref{sec:predefinednames} for the predefined names used by the \sty{glossaries} package.) -%As from version 1.1, the \sty{glossaries} package also supports -%Till~Tantau's \isty{translator} package provided it is loaded -%before the \sty{glossaries} package. This makes it easier to change -%the default translations or add new dictionaries. -%If you don't want to use the predefined translations, you can use the -%package option \pkgopt[false]{translate} and supply your own translations. -% %This documentation is structured as follows: \autoref{sec:quick} is for people who want a few quick pointers of how to get started, %without having to read through lengthy descriptions, %\autoref{sec:overview} gives an overview of available commands and their syntax, \autoref{sec:mfirstuc} describes the associated %\sty{mfirstuc} %package, \autoref{sec:code} contains the documented source code for those who want to know more about how the -%package works and how to do more complicated things, such as -%changing the way glossary entries appear. +%package works and \autoref{sec:code:mfirstuc} contains the documented +%code for the \sty{mfirstuc} package. +% +%\subsection{Multi-Lingual Support} +% +%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} +%\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. +% +%If you want to use \isty{ngerman} or \isty{german} instead +%of \isty{babel}, you will need to include the \isty{translator} package +%to provide the translations. For example: +%\begin{verbatim} +%\documentclass[ngerman]{article} +%\usepackage{ngerman} +%\usepackage{translator} +%\usepackage{glossaries} +%\end{verbatim} +% +%The following languages are currently supported: +%\begin{center} +%\begin{tabular}{lc} +%\bfseries Language & \bfseries As from version\\ +%Danish & 1.08\\ +%Dutch & 1.08\\ +%English & 1.08\\ +%French & 1.08\\ +%German & 1.08\\ +%Irish & 1.08\\ +%Italian & 1.08\\ +%Hungarian & 1.08\\ +%Polish & 1.13\\ +%Spanish & 1.08 +%\end{tabular} +%\end{center} +%The language dependent commands and \isty{translator} keys used by the +%glossaries package are listed in \tableref{tab:predefinednames}. +% +%\begin{table}[htbp] +%\caption{Customised Text} +%\label{tab:predefinednames} +%\begin{center} +%\begin{tabular}{@{}llp{0.4\linewidth}@{}} +%\bfseries Command Name & \bfseries Translator key word & +%\bfseries What it's for\\ +%\ics{glossaryname} & \texttt{Glossary} & Title of the main glossary.\\ +%\ics{acronymname} & \texttt{Acronyms} & Title of the list of acronyms +%(when used with package option \pkgopt{acronym}).\\ +%\ics{entryname} & \texttt{Notation (glossaries)} & +%Header for first column in glossary (for 2, 3 or 4 column glossaries +%that support headers).\\ +%\ics{descriptionname} & \texttt{Description (glossaries)} & +%Header for second column in glossary (for 2, 3 or 4 column glossaries +%that support headers).\\ +%\ics{symbolname} & \texttt{Symbol (glossaries)} & Header for symbol +%column in glossary for glossary styles that support this option.\\ +%\ics{pagelistname} & \texttt{Page List (glossaries)} & +%Header for page list column in glossary for glossaries that support +%this option.\\ +%\ics{glssymbolsgroupname} & \texttt{Symbols (glossaries)} & +%Header for symbols section of the glossary for glossary styles that +%support this option.\\ +%\ics{glsnumbersgroupname} & \texttt{Numbers (glossaries)} & Header for +%numbers section of the glossary for glossary styles that support +%this option. +%\end{tabular} +%\end{center} +%\end{table} +% +%Due to the varied nature of glossaries, it's likely that the +%predefined translations may not be appropriate. If you are using +%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 it becomes +%much easier to change the default translations. For example, if you +%are writing in Irish and you want \cs{symbolname} to produce +%\dq{Siombail} instead of \dq{Comhartha}, then you can put the following +%in your document preamble: +%\begin{verbatim} +%\deftranslation[to=Irish]{Symbol (glossaries)}{Siombail} +%\end{verbatim} % %\subsection{Generating the associated glossary files} %\label{sec:makeglossaries} @@ -176,7 +252,8 @@ %perl makeglossaries myfile %\end{verbatim} %There is a batch file called \texttt{makeglossaries.bat} which -%does this for Windows users. +%does this for Windows users, but you must have Perl installed to +%be able to use it. % %If you don't have Perl installed, you will have to run %\appname{makeindex} for each glossary type you have defined. @@ -198,7 +275,7 @@ %(e.g.\ \filetype{.glg} or \filetype{.alg}) for messages. %\subsection{Troubleshooting} % -%The glossaries package comes with a minimal file called +%The \sty{glossaries} package comes with a minimal file called %\texttt{minimalgls.tex} which can be used for testing. This %should be located in \texttt{texmf/doc/latex/glossaries/samples/}. Further %information on debugging \LaTeX\ code is available at @@ -211,8 +288,8 @@ %\label{sec:quick} % %This section is for people who want a few quick pointers -%of how to get started, without having to read through -%lengthy descriptions. +%of how to get started. However it is recommended that you read +%\autoref{sec:overview} for additional commands and advice not listed here. % %\begin{enumerate} %\item Load \sty{glossaries} \emph{after} \isty{hyperref}: @@ -708,14 +785,6 @@ %\gloskey{name} key, you will still need to protect fragile commands %in the \gloskey{name} key if you don't use the \gloskey{text} key. % -%\item[\pkgopt{babel}] This is a boolean key and is for use when -%the \sty{glossaries} package is used in conjunction with the -%\isty{babel} package. The default is \pkgopt[true]{babel}, which -%adds the glossary translations to \isty{babel}'s captions. If -%you don't like the translations provided by the \sty{glossaries} -%package, you can set \pkgopt[false]{babel} and provide your own -%translations. -% %\item[\pkgopt{description}] This option changes the definition of %\ics{newacronym} to allow a description. See \autoref{sec:acronyms} for further details. % @@ -725,16 +794,27 @@ %\item[\pkgopt{smallcaps}] This option changes the definition of %\ics{newacronym} and the way that acronyms are displayed. See \autoref{sec:acronyms} for further details. % +%\item[\pkgopt{smaller}] This option changes the definition of +%\ics{newacronym} and the way that acronyms are displayed. See \autoref{sec:acronyms} for further details. +% %\item[\pkgopt{dua}] This option changes the definition of %\ics{newacronym} so that acronyms are always expanded. %See \autoref{sec:acronyms} for further details. % +%\item[\pkgopt{shortcuts}] This option provides shortcut commands +%for acronyms. +%See \autoref{sec:acronyms} for further details. +% %\end{description} %\subsection{Defining Glossary Entries} %\label{sec:newglosentry} % -%All glossary entries that are used in a document must be defined in -%the preamble. Only those entries that occur in the document +%All glossary entries must be defined before they are used, so it +%is better to define them in the preamble to ensure this.\footnote{The +%only preamble restriction on \cs{newglossaryentry} and \cs{newacronym} +%was removed in version 1.13, but the restriction remains for +%\cs{loadglsentries}.} However +%only those entries that occur in the document %(using any of the commands described in \autoref{sec:glslink} and \autoref{sec:glsadd}) will appear in the glossary. Each time an entry is used in this way, a line is added to an associated glossary %(\filetype{.glo}) file, which then needs to be converted into a %corresponding \filetype{.gls} file which contains the typeset glossary @@ -791,14 +871,20 @@ % %\item[{\gloskey{plural}}] How the entry will appear in the document text %when using \ics{glspl} (or one of its uppercase variants). -%If this field is omitted, the value is obtained by appending an -%\dq{s} to the value of the \gloskey{text} field. -% -%\item[{\gloskey{firstplural}}] How the entry will appear in the document -%text the first time it is used with \ics{glspl} (or one of -%its uppercase variants). If this field is omitted, the value is -%obtained by appending an \dq{s} to the value of the \gloskey{first} -%field. +%If this field is omitted, the value is obtained by appending +%\ics{glspluralsuffix} to the value of the \gloskey{text} field. +% +%\item[{\gloskey{firstplural}}] How the entry will appear in the +%document text the first time it is used with \ics{glspl} (or one of its +%uppercase variants). If this field is omitted, the value is obtained +%from the \gloskey{plural} key, if the \gloskey{first} key is omitted, +%or by appending \ics{glspluralsuffix} to the value of the +%\gloskey{first} field, if the \gloskey{first} field is present. +%\textbf{Note:} prior to version 1.13, the default value of +%\gloskey{firstplural} was always taken by appending \dq{s} to the +%\gloskey{first} key, which meant that you had to specify both +%\gloskey{plural} and \gloskey{firstplural}, even if you hadn't +%used the \gloskey{first} key. % %\item[{\gloskey{symbol}}] This field is provided to allow the user to %specify an associated symbol, but most glossary styles ignore @@ -817,15 +903,15 @@ %symbol). % %\item[{\gloskey{type}}] This is the glossary type to which this entry -%belongs. If omitted, the default glossary is assumed -%(\texttt{type=main}). The list of acronyms type is given by +%belongs. If omitted, the default glossary is assumed. +%The list of acronyms type is given by %\ics{acronymtype} which will either be \texttt{main} or %\texttt{acronym}, depending on whether the \pkgopt{acronym} package %option was used. %\end{description} %Note that if the key starts with an accented letter, %you must group the accented letter, otherwise it will cause a -%problem for \cs{Gls} and \cs{Glspl}. For example: +%problem for commands like \cs{Gls} and \cs{Glspl}. For example: %\begin{verbatim} %\newglossaryentry{elite}{name={{\'e}lite}, %description={select group or class}} @@ -845,7 +931,52 @@ %\end{verbatim} %but don't do \verb|\oe{}sophagus| as it will confuse %\ics{makefirstuc} (described -%in \autoref{sec:mfirstuc}) and will produce \oe{}Sophagus instead of {\OE}sophagus. +%in \autoref{sec:mfirstuc}) and will produce \oe{}Sophagus instead of {\OE}sophagus. +% +%\subsubsection{Plurals} +%You may have noticed from above that you can specify the plural form +%when you define a term. If you omit this, the plural will be obtained +%\DescribeMacro{\glspluralsuffix}by appending \cs{glspluralsuffix} to +%the singular form. This command defaults to \texttt{s}. For example: +%\begin{verbatim} +%\newglossaryentry{cow}{name=cow,description={a fully grown +%female of any bovine animal}} +%\end{verbatim} +%defines a new entry whose singular form is \dq{cow} and plural form +%is \dq{cows}. However, if you are writing in archaic English, you +%may want to use \dq{kine} as the plural form, in which case you would +%have to do: +%\begin{verbatim} +%\newglossaryentry{cow}{name=cow,plural=kine, +%description={a fully grown female of any bovine animal}} +%\end{verbatim} +% +%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 +%\cs{glslink} 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 +%\begin{verbatim} +%\newglossaryentry{cow}{name=cow,description={a fully grown +%female of any bovine animal (plural cows, archaic plural kine)}} +%\end{verbatim} +%and use \verb|\glspl{cow}| to produce \dq{cows} and use +%\verb|\glslink{cow}{kine}| to produce \dq{kine}. +% +%If you are using a language that usually forms plurals +%by appending a different letter, or sequence of letters, you can +%redefine \cs{glspluralsuffix} as required. However, this must be +%done \emph{before} the entries are defined. For languages that don't +%form plurals by simply appending a suffix, all the plural forms must be +%specified using the \gloskey{plural} key (and the \gloskey{firstplural} +%key where necessary). +% +% +%\subsubsection{Loading Entries From a File} +%\label{sec:loadglsentries} % %\DescribeMacro{\loadglsentries} %You can store all your glossary entry definitions in another @@ -855,8 +986,63 @@ %\cs{newglossaryentry} commands. The optional argument %\meta{type} is the name of the glossary to which those entries %should belong, for those entries where the \gloskey{type} key has -%been omitted. Note that only those entries that have been used +%been omitted (or, more specifically, for those entries whose +%type has been specified by \cs{glsdefaulttype}, which is what +%\cs{newglossaryentry} uses by default). For example, suppose I have +%a file called \texttt{myentries.tex} which contains: +%\begin{verbatim} +%\newglossaryentry{perl}{type=main, +%name={Perl}, +%description={A scripting language}} +% +%\newglossaryentry{tex}{name={\TeX}, +%description={A typesetting language}} +% +%\newglossaryentry{html}{type=\glsdefaulttype, +%name={html}, +%description={A mark up language}} +%\end{verbatim} +%and suppose in my document preamble I use the command: +%\begin{verbatim} +%\loadglsentries[languages]{myentries} +%\end{verbatim} +%then this will add the entries \texttt{tex} and \texttt{html} +%to the glossary whose type is given by \texttt{languages}, but +%the entry \texttt{perl} will be added to the main glossary, since +%it explicitly sets the type to \texttt{main}. +% +%\textbf{Note:} if you +%use \cs{newacronym} (see \autoref{sec:acronyms}) the type is set as \verb|type=\acronymtype| +%unless you explicitly override it. For example, if my file +%\texttt{myacronyms.tex} contains: +%\begin{verbatim} +%\newacronym{aca}{aca}{a contrived acronym} +%\end{verbatim} +%then (supposing I have defined a new glossary type called +%\texttt{altacronym}) +%\begin{verbatim} +%\loadglsentries[altacronym]{myacronyms} +%\end{verbatim} +%will add \texttt{aca} to the glossary type \texttt{acronym}, if the +%package option \pkgopt{acronym} has been specified, or will add +%\texttt{aca} to the glossary type \texttt{altacronym}, if the +%package option \pkgopt{acronym} is not specified. In this instance, +%it is better to change \texttt{myacronyms.tex} to: +%\begin{verbatim} +%\newacronym[type=\glsdefaulttype]{aca}{aca}{a contrived acronym} +%\end{verbatim} +%and now +%\begin{verbatim} +%\loadglsentries[altacronym]{myacronyms} +%\end{verbatim} +%will add \texttt{aca} to the glossary type \texttt{altacronym}, +%regardless of whether or not the package option \pkgopt{acronym} is +%used. +% +%Note that only those entries that have been used %in the text will appear in the relevant glossaries. +%Note also that \cs{loadglsentries} may only be used in the +%preamble. %\subsection{Number lists} %\label{sec:numberlists} % @@ -886,12 +1072,12 @@ %\DescribeMacro{\glslink} %The command:\\[10pt] %\cs{glslink}\oarg{options}\marg{label}\marg{text}\\[10pt] -%will place \meta{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, \meta{text} -%will be a hyperlink to the relevant line in the glossary. The -%optional argument \meta{options} must be a \meta{key}=\meta{value} -%list which can take any of the following keys: +%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, \meta{text} will be +%a hyperlink to the relevant line in the glossary. The optional argument +%\meta{options} must be a \meta{key}=\meta{value} list which can take +%any of the following keys: % %\begin{description} %\item[{\gloskey[glslink]{format}}] This specifies how to format the @@ -974,7 +1160,13 @@ %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 -%\ics{newglossaryentry}. There are two uppercase variants:\\[10pt] +%\ics{newglossaryentry}. If the entry has been marked as having +%been used, the value of the \gloskey{text} key will be used, otherwise +%the value of the \gloskey{first} key will be used. +%On completion, \cs{gls} will mark the entry given by \meta{label} as +%used. +% +%There are two uppercase variants:\\[10pt] %\DescribeMacro{\Gls} %\cs{Gls}\oarg{options}\marg{label}\oarg{insert}\\[10pt] %and\\[10pt] @@ -985,10 +1177,13 @@ % %The final optional argument \meta{insert}, allows you to insert %some additional text into the link text. By default, this will -%append \meta{insert} at the end of the link text. 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. +%append \meta{insert} at the end of the link text, but this +%can be changed (see +%\autoref{sec:glsdisplay}). +% +%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} @@ -1006,7 +1201,8 @@ %\cs{glstext}\oarg{options}\marg{label}\oarg{insert}\\[10pt] %is similar to \ics{gls} except that it always uses the value %of the \gloskey{text} key and does not mark the entry as -%having been used. +%having been used. Unlike \cs{gls}, the inserted text \meta{insert} +%is always appended to the link text. % %There are also analogous commands:\\[10pt] %\DescribeMacro{\Glstext} @@ -1018,9 +1214,10 @@ % %\DescribeMacro{\glsfirst}The command:\\[10pt] %\cs{glsfirst}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%is similar to \ics{gls} except that it always uses the value -%of the \gloskey{first} key and does not mark the entry as -%having been used. +%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 mark the entry as having +%been used. % %There are also analogous commands:\\[10pt] %\DescribeMacro{\Glsfirst} @@ -1032,9 +1229,10 @@ % %\DescribeMacro{\glsplural}The command:\\[10pt] %\cs{glsplural}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%is similar to \ics{gls} except that it always uses the value -%of the \gloskey{plural} key and does not mark the entry as -%having been used. +%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} @@ -1046,8 +1244,9 @@ % %\DescribeMacro{\glsfirstplural}The command:\\[10pt] %\cs{glsfirstplural}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%is similar to \ics{gls} except that it always uses the value -%of the \gloskey{firstplural} key and does not mark the entry as +%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] @@ -1060,9 +1259,10 @@ % %\DescribeMacro{\glsname}The command:\\[10pt] %\cs{glsname}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%is similar to \ics{gls} except that it always uses the value -%of the \gloskey{name} key and does not mark the entry as -%having been used. Note: if you want to use this command and the +%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 +%been used. Note: if you want to use this command and the %\gloskey{name} key contains commands, you will have to disable the %\hyperlink{sanitize}{sanitization} of the \gloskey{name} key and protect fragile commands. % @@ -1076,9 +1276,10 @@ % %\DescribeMacro{\glssymbol}The command:\\[10pt] %\cs{glssymbol}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%is similar to \ics{gls} except that it always uses the value -%of the \gloskey{symbol} key and does not mark the entry as -%having been used. Note: if you want to use this command and the +%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 +%been used. Note: if you want to use this command and the %\gloskey{symbol} key contains commands, you will have to disable the %\hyperlink{sanitize}{sanitization} of the \gloskey{symbol} key and protect fragile commands. % @@ -1092,10 +1293,12 @@ % %\DescribeMacro{\glsdesc}The command:\\[10pt] %\cs{glsdesc}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%is similar to \ics{gls} except that it always uses the value -%of the \gloskey{description} key and does not mark the entry as -%having been used. Note: if you want to use this command and the -%\gloskey{description} key contains commands, you will have to disable the +%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 +%having been used. Note: if you want to use this +%command and the \gloskey{description} key contains commands, you will +%have to disable the %\hyperlink{sanitize}{sanitization} of the \gloskey{description} key and protect fragile commands. % %There are also analogous commands:\\[10pt] @@ -1166,7 +1369,7 @@ %of redefining \cs{glsdisplay} and \cs{glsdisplayfirst}. % %Both \cs{defglsdisplay} and \cs{defglsdisplayfirst} take two arguments: -%the first (which is optional) is the glossary name\footnote{\texttt{main} for the main +%the first (which is optional) is the glossary's label\footnote{\texttt{main} for the main %(default) glossary, \cs{acronymtype} for the list of acronyms, or the %name supplied in the first mandatory argument to \cs{newglossary} for %additional glossaries.} and the second is how the term should be @@ -1186,7 +1389,7 @@ %\newglossaryentry{set}{type=notation, %name=set, %description={A collection of objects}, -%symbol={$S$}, +%symbol={$S$} %} %\end{verbatim} %The first time you reference this entry using \cs{gls} it @@ -1223,24 +1426,35 @@ %any text (so therefore, there is no \gloskey[glslink]{hyper} key %available in \meta{options} but all the other options that can %be used with \cs{glslink} can be passed to \cs{glsadd}). +%For example, to add a page range to the glossary number list for the +%entry whose label is given by \texttt{set}: +%\begin{verbatim} +%\glsadd[format=(]{set} +%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{glossary list}\\[10pt] -%If there are multiple glossaries, you can specify to add only -%those entries which belong to the glossaries listed in -%\meta{glossary list} (which must be a comma separated list of -%glossary names). For example: +%\cs{glsaddall}\oarg{options}\\[10pt] +%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 +%comma separated list. For example, if you only want to add +%all the entries belonging to the list of acronyms (specified by +%the glossary type \cs{acronymtype}) and a list of +%notation (specified by the glossary type \texttt{notation}) then you can +%do: %\begin{verbatim} -%\glsaddall[notation] +%\glsaddall[types={\acronymtype,notation}] %\end{verbatim} -%will add all the entries that have been defined for the glossary -%labelled \dq{notation}. +% %\subsection{Displaying a glossary} % %\DescribeMacro{\printglossaries} %The command \cs{printglossaries} will display all the -%defined glossaries. Note that no glossaries will appear until +%glossaries in the order in which they were defined. +%Note that no glossaries will appear until %you have either used the Perl script \appname{makeglossaries} %or have directly used \appname{makeindex} (as described in %\autoref{sec:makeglossaries}). If the glossary still does not appear after you re-\LaTeX\ your document, check @@ -1249,7 +1463,7 @@ %the preamble to enable the glossaries. % %\DescribeMacro{\printglossary} -%An individual glossary is displayed using:\\[10pt] +%An individual glossary can be displayed using:\\[10pt] %\cs{printglossary}\oarg{options}\\[10pt] %where \meta{options} is a \meta{key}=\meta{value} list of options. %The following keys are available: @@ -1331,15 +1545,15 @@ %\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] -%where \meta{name} is label to assign to this glossary. The arguments +%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 %title for this new glossary and the final optional argument %\meta{counter} specifies which counter to use for the associated number -%lists\iterm{number list} (see also \autoref{sec:numberlists}.) The first optional argument specifies the extension for the +%lists\iterm{number list} (see also \autoref{sec:numberlists}). The first optional argument specifies the extension for the %\appname{makeindex} transcript file (this information is only used by %\appname{makeglossaries} which picks up the information from the -%auxiliary file.) +%auxiliary file). % %Note that the main (default) glossary is automatically created as: %\begin{verbatim} @@ -1362,18 +1576,19 @@ %\DescribeMacro{\newacronym} %As you may have noticed in \autoref{sec:newglosentry}, when you specify a new entry, you can specify alternate text to use when %the term is first used in the document. This provides a useful -%means to define acronyms. The \sty{glossaries} package defines -%the command:\\[10pt] +%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] -%This is equivalent to:\vskip5pt +%By default, this is equivalent to:\vskip5pt %\begin{ttfamily}\par\noindent %\cs{newglossaryentry}\textrm{\marg{label}}\{type=\cs{acronymtype},\\ %name=\textrm{\marg{abbrv}},\\ %description=\textrm{\marg{long}},\\ %text=\textrm{\marg{abbrv}},\\ %first=\{\textrm{\meta{long}} (\textrm{\meta{abbrv}})\},\\ -%plural=\{\textrm{\meta{abbrv}}s\},\\ -%firstplural=\{\textrm{\meta{long}}s (\textrm{\meta{abbrv}}s)\},\\ +%plural=\{\textrm{\meta{abbrv}}\cs{glspluralsuffix}\},\\ +%firstplural=\{\textrm{\meta{long}}\cs{glspluralsuffix}\cs{space} +%(\textrm{\meta{abbrv}}\cs{glspluralsuffix})\},\\ %\textrm{\meta{key-val list}}\}\par %\end{ttfamily} %\vskip5pt @@ -1382,6 +1597,13 @@ %\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. +% +%(\textbf{Note:} since \cs{newacronym} sets \verb|type=\acronymtype|, +%if you want to load a file containing acronym definitions using +%\cs{loadglsentries}\oarg{type}\marg{filename}, the optional argument +%\meta{type} will not have an effect unless you explicitly set the +%type as \verb|type=\glsdefaulttype|. See \autoref{sec:loadglsentries}.) +% %For example, the following defines the acronym IDN: %\begin{verbatim} %\newacronym{idn}{IDN}{identification number} @@ -1399,33 +1621,44 @@ %so \verb|\gls{idn}| will produce \dq{identification number (IDN)} on %first use and \dq{IDN} on subsequent uses. % -%The \sty{glossaries} package has options that change the -%definition of \ics{newacronym} for common acronym formats. These -%options also change the way the link text is displayed for the -%acronyms. -% -%Table~\ref{tab:acronymsettings} lists the package options and -%how the keys are used to store \meta{long} (the long form) and -%\meta{abbrv} (the short form). Note that the \pkgopt{smallcaps} -%option redefines \ics{acronymfont} so that it sets its argument -%in small captials otherwise \cs{acronymfont} simply displays its -%argument in the surrounding font. Note also that if none of -%the package options \pkgopt{smallcaps}, \pkgopt{description} -%or \pkgopt{footnote} are used, \cs{acronymfont} is not used, so -%changing the definition of \cs{acronymfont} will have no effect -%under such circumstances. +%This section describes acronyms that have been defined using +%\cs{newacronym}. If you prefer to define all your acronyms using +%\cs{newglossaryentry} explicitly, then you should skip this section +%and ignore the package options: \pkgopt{smallcaps}, \pkgopt{smaller}, +%\pkgopt{description}, \pkgopt{dua}, \pkgopt{footnote} and +%\pkgopt{shortcuts}, as these options change the +%definition of \ics{newacronym} for common acronym formats +%as well as the way that the link text is displayed (see +%\autoref{sec:glsdisplay}). Likewise you should ignore the new commands described in this section, +%such as \cs{acrshort}, as they vary according to the definition of +%\cs{newacronym}. +% +% +%\Tableref{tab:acronymsettings} lists the package options and how the +%\ics{newglossaryentry} keys are used to store \meta{long} (the long +%form) and \meta{abbrv} (the short form). Note that the +%\pkgopt{smallcaps} option redefines \ics{acronymfont} so that it sets +%its argument using \cs{textsc} (so you should use lower case characters +%in \meta{abbrv}) and the \pkgopt{smaller} option redefines +%\cs{acronymfont} to use \cs{smaller}\footnote{\cs{smaller} is defined +%in the \sty{relsize} package.}, otherwise \cs{acronymfont} simply +%displays its argument in the surrounding font. Note also that if none +%of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, +%\pkgopt{dua}, \pkgopt{description} or \pkgopt{footnote} are used, +%\cs{acronymfont} is not used, so changing the definition of +%\cs{acronymfont} will have no effect under such circumstances. % %\begin{table}[htbp] -%\caption{Package options governing acronyms and how the information -%is stored in the glossary keys} +%\caption{Package options governing \cs{newacronym} and how the +%information is stored in the keys for \cs{newglossaryentry}} %\label{tab:acronymsettings} %\begin{center} %\begin{tabular}{lllll} %\bfseries Package Option & -%\gloskey{first} & -%\gloskey{text} & -%\gloskey{description} & -%\gloskey{symbol}\\ +%\gloskey{first} key & +%\gloskey{text} key & +%\gloskey{description} key & +%\gloskey{symbol} key\\ %\pkgopt{description},\pkgopt{footnote} & %\meta{abbrv} & %\meta{abbrv} & @@ -1451,6 +1684,11 @@ %\meta{abbrv} & %\meta{long} & %\meta{abbrv}\\ +%\pkgopt{smaller} & +%\meta{long} & +%\meta{abbrv} & +%\meta{long} & +%\meta{abbrv}\\ %\pkgopt{dua} & %\meta{long} & %\meta{long} & @@ -1486,13 +1724,14 @@ %If the first use uses the plural form, \verb|\glspl{dm}| will %display: diagonal matrices (DMs). % -%Each of the package options \pkgopt{smallcaps}, \pkgopt{footnote} +%Each of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, +%\pkgopt{footnote}, \pkgopt{dua} %and \pkgopt{description} use \ics{defglsdisplay} and %\ics{defglsdisplayfirst} (described in \autoref{sec:glsdisplay}) %to change the way the link text is displayed. % %\begin{description} -%\item[\pkgopt{description},\pkgopt{footnote}]\mbox{}\par When these two options are used together, the first use displays +%\item[\pkgopt{description},\pkgopt{footnote}]\mbox{}\par When these two package options are used together, the first use displays %the entry as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} %\\[10pt] @@ -1505,20 +1744,20 @@ %Note also that when these two package options are used (in the %given order), the \sty{glossaries} package additionally implements the %\pkgopt{sanitize} option using -%\ipkgopt[description]{sanitize}\ipkgopt[symbol]{sanitize}\verb|sanitize={description=false,symbol=false}|, so +%\ipkgopt[description]{sanitize}\ipkgopt[symbol]{sanitize}\verb|sanitize={description=false,symbol=false}|, so %remember to protect fragile commands when defining acronyms. % %\item[dua]\mbox{}\par The \pkgopt{dua} package option always displays the expanded -%form and so may not be used with \pkgopt{footnote} or +%form and so may not be used with \pkgopt{footnote}, \pkgopt{smaller} or %\pkgopt{smallcaps}. Both first use and subsequent use displays the %entry in the form:\\[10pt] %\meta{long}\meta{insert}\\[10pt] -%If the \pkgopt{description} option is also used, the \gloskey{name} -%key is set to the long form, otherwise the \gloskey{name} key is -%set to the short form and the \gloskey{description} key is set to -%the long form. +%If the \pkgopt{description} package option is also used, the +%\gloskey{name} key is set to the long form, otherwise the +%\gloskey{name} key is set to the short form and the +%\gloskey{description} key is set to the long form. % -%\item[\pkgopt{description}]\mbox{}\par This option displays the entry on first use as:\\[10pt] +%\item[\pkgopt{description}]\mbox{}\par This package option displays the entry on first use as:\\[10pt] %\meta{long}\meta{insert} (\cs{acronymfont}\marg{abbrv})\\[10pt] %while subsequent use displays the entry as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert}\\[10pt] @@ -1527,7 +1766,7 @@ %\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so %remember to protect fragile commands when defining acronyms. % -%\item[\pkgopt{footnote}]\mbox{}\par This option displays the entry on first use as:\\[10pt] +%\item[\pkgopt{footnote}]\mbox{}\par This package option displays the entry on first use as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long}\\[10pt] %while subsequent use displays the entry as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert} @@ -1542,16 +1781,29 @@ %\meta{long}\meta{insert} (\cs{acronymfont}\marg{abbrv})\\[10pt] %while subsequent use displays the entry as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert}\\[10pt] -%where \cs{acronymfont} is set to \cs{textsc}. +%where \cs{acronymfont} is set to \verb|\textsc{#1}|, so \meta{abbrv} +%should be specified in lower case. % %Note also that if this package option is used, the \sty{glossaries} %package additionally implements the option %\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so %remember to protect fragile commands when defining acronyms. % -%\item[None of the above]\mbox{}\par If none of the package options \pkgopt{smallcaps}, \pkgopt{footnote} -%or \pkgopt{description} are used, then on first use the entry is -%displayed as:\\[10pt] +%\item[\pkgopt{smaller}]\mbox{}\par If neither the \pkgopt{footnote} nor \pkgopt{description} options +%have been set, this option displays the entry on first use as:\\[10pt] +%\meta{long}\meta{insert} (\cs{acronymfont}\marg{abbrv})\\[10pt] +%while subsequent use displays the entry as:\\[10pt] +%\cs{acronymfont}\marg{abbrv}\meta{insert}\\[10pt] +%where \cs{acronymfont} is set to \verb|{\smaller #1}|. +% +%Note also that if this package option is used, the \sty{glossaries} +%package additionally implements the option +%\ipkgopt[symbol]{sanitize}\verb|sanitize={symbol=false}|, so +%remember to protect fragile commands when defining acronyms. +% +%\item[None of the above]\mbox{}\par If none of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, +%\pkgopt{footnote}, \pkgopt{dua} or \pkgopt{description} are used, +%then on first use the entry is displayed as:\\[10pt] %\meta{long} (\meta{abbrv})\meta{insert}\\[10pt] %while subsequent use displays the entry as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert}\\[10pt] @@ -1604,15 +1856,48 @@ %the changing way the text is displayed using \ics{defglsdisplay} %and \ics{defglsdisplayfirst}. % +%The package option \pkgopt{shortcuts} provides the synonyms listed +%in \tableref{tab:shortcuts}. If any of those commands generate +%an \dq{undefined control sequence} error message, check that you +%have enabled the shortcuts using the \pkgopt{shortcuts} package +%option. Note that there are no shortcuts for the commands that +%produce all upper case text. +% +%\begin{table}[htbp] +%\caption{Synonyms provided by the package option \pkgopt{shortcuts}} +%\label{tab:shortcuts} +%\begin{center} +%\begin{tabular}{ll} +%\bfseries Shortcut Command & \bfseries Equivalent Command\\ +%\ics{acs} & \ics{acrshort}\\ +%\ics{Acs} & \ics{Acrshort}\\ +%\ics{acsp} & \ics{acrshortpl}\\ +%\ics{Acsp} & \ics{Acrshortpl}\\ +%\ics{acl} & \ics{acrlong}\\ +%\ics{Acl} & \ics{Acrlong}\\ +%\ics{aclp} & \ics{acrlongpl}\\ +%\ics{Aclp} & \ics{Acrlongpl}\\ +%\ics{acf} & \ics{acrfull}\\ +%\ics{Acf} & \ics{Acrfull}\\ +%\ics{acfp} & \ics{acrfullpl}\\ +%\ics{Acfp} & \ics{Acrfullpl}\\ +%\ics{ac} & \ics{gls}\\ +%\ics{Ac} & \ics{Gls}\\ +%\ics{acp} & \ics{glspl}\\ +%\ics{Acp} & \ics{Glspl} +%\end{tabular} +%\end{center} +%\end{table} +% % %\subsection{Unsetting and resetting entry flags} % -%When using commands such as \ics{gls} it is possible that you may want -%to use the value given by the \gloskey{first} key, even though you have -%already used the glossary entry. 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] +%When using \ics{gls}, \ics{glspl} and their uppercase variants it is +%possible that you may want to use the value given by the +%\gloskey{first} key, even though you have already used the glossary +%entry. 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] @@ -1635,7 +1920,7 @@ %environment. The entry name is placed in the optional argument %of the \cs{item} command (so it will appear in bold by %default). The description follows, and then the associated number -%list for that entry. +%list for that entry. Sub groups are separated using \cs{indexspace}. % %\item[listgroup] The \glostyle{listgroup} style is like %\glostyle{list} but the glossary groups have headings. @@ -1666,6 +1951,7 @@ %environment (defined by the \isty{longtable} package). It has two %columns: the first column contains the entry's name and the second %column contains the description followed by the \term{number list}. +%Sub groups are separated with a blank row. % %\item[longborder] The \glostyle{longborder} style is like %\glostyle{long} but has horizontal and vertical lines around it. @@ -1712,6 +1998,7 @@ %environment (defined by the \isty{supertabular} package). It has two %columns: the first column contains the entry's name and the second %column contains the description followed by the \term{number list}. +%Sub groups are separated with a blank row. % %\item[superborder] The \glostyle{superborder} style is like %\glostyle{super} but has horizontal and vertical lines around it. @@ -1766,7 +2053,7 @@ %\glostyle{listdotted} style use the command %\DescribeMacro{\glspostdescription}\cs{glspostdescription} after the %description. This simply displays a full stop by default. To eliminate -%this full stop (or replace it with something else, say a comma), you +%this full stop (or replace it with something else, say a comma) you %will need to redefine \cs{glspostdescription} before the glossary is %displayed. %\subsection{Defining your own glossary style} @@ -1964,6 +2251,29 @@ %the empty group following \cs{ae} is considered to be the argument %of \cs{ae} which is in fact not the case. % +%Note also that +%\begin{verbatim} +%\newcommand{\abc}{abc} +%\makefirstuc{\abc} +%\end{verbatim} +%produces: ABC. This is because the first object in the argument of +%\cs{makefirstuc} is \cs{abc}, so it does \verb|\MakeUppercase{\abc}|. +%Whereas: +%\begin{verbatim} +%\newcommand{\abc}{abc} +%\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] +%This is equivalent to \cs{expandafter}\cs{makefirstuc}\cs{expandafter}\marg{stuff}. So +%\begin{verbatim} +%\newcommand{\abc}{abc} +%\xmakefirstuc{\abc} +%\end{verbatim} +%produces: Abc. +% +% % \StopEventually{\clearpage\phantomsection\addcontentsline{toc}{section}{Index}\PrintIndex} % % @@ -1980,7 +2290,7 @@ % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2008/03/08 v1.12 (NLCT)] +\ProvidesPackage{glossaries}[2008/05/10 v1.13 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -1988,6 +2298,11 @@ \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} % \end{macrocode} +% If \isty{babel} package is loaded, check to see if \isty{translator} is installed. +% \begin{macrocode} +\@ifpackageloaded{babel}{\IfFileExists{translator.sty}{% + \RequirePackage{translator}}{}}{} +% \end{macrocode} %\changes{1.1}{2008 Feb 22}{amsgen now loaded (\cs{new@ifnextchar} needed)} % Need to use \cs{new@ifnextchar} instead of \cs{@ifnextchar} in % commands that have a final optional argument (such as \ics{gls}) @@ -2280,6 +2595,14 @@ name=true]{% \renewcommand*{\@gls@sanitizesymbol}{}% } % \end{macrocode} +% Define \ics{newacronym} to set the short form using \cs{smaller} +% which obviously needs to be defined by loading the appropriate +% package. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[glsacr]{smaller}[true]{% + \renewcommand*{\@gls@sanitizesymbol}{}% +} +% \end{macrocode} % Define \ics{newacronym} to always use the long forms % (i.e.\ don't use acronyms) % \begin{macrocode} @@ -2287,6 +2610,10 @@ name=true]{% \renewcommand*{\@gls@sanitizesymbol}{}% } % \end{macrocode} +% Define acronym shortcuts. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[glsacr]{shortcuts}[true]{} +% \end{macrocode} % % % Process package options: @@ -2371,6 +2698,13 @@ name=true]{% \providecommand*{\glsnumbersgroupname}{Numbers} % \end{macrocode} %\end{macro} +%\begin{macro}{\glspluralsuffix} +% The default plural is formed by appending \cs{glspluralsuffix} to +% the singular form. +% \begin{macrocode} +\newcommand*{\glspluralsuffix}{s} +% \end{macrocode} +%\end{macro} % 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. @@ -2382,17 +2716,21 @@ name=true]{% % dictionary. %\changes{1.1}{2008 Feb 22}{Added support for translator package} % \begin{macrocode} -\@ifpackageloaded{translator}{\usedictionary{glossaries-dictionary}% -\renewcommand*{\glossaryname}{\translate{Glossary}}% -\renewcommand*{\acronymname}{\translate{Acronyms}}% -\renewcommand*{\entryname}{\translate{Notation (glossaries)}}% -\renewcommand*{\descriptionname}{\translate{Description (glossaries)}}% -\renewcommand*{\symbolname}{\translate{Symbol (glossaries)}}% -\renewcommand*{\pagelistname}{\translate{Page List (glossaries)}}% -\renewcommand*{\glssymbolsgroupname}{\translate{Symbols (glossaries)}}% -\renewcommand*{\glsnumbersgroupname}{\translate{Numbers (glossaries)}}% -}{% -\@ifpackageloaded{babel}{\RequirePackage{glossaries-babel}}{}} + \@ifpackageloaded{translator}{\usedictionary{glossaries-dictionary}% + \renewcommand*{\glossaryname}{\translate{Glossary}}% + \renewcommand*{\acronymname}{\translate{Acronyms}}% + \renewcommand*{\entryname}{\translate{Notation (glossaries)}}% + \renewcommand*{\descriptionname}{% + \translate{Description (glossaries)}}% + \renewcommand*{\symbolname}{\translate{Symbol (glossaries)}}% + \renewcommand*{\pagelistname}{% + \translate{Page List (glossaries)}}% + \renewcommand*{\glssymbolsgroupname}{% + \translate{Symbols (glossaries)}}% + \renewcommand*{\glsnumbersgroupname}{% + \translate{Numbers (glossaries)}}% + }{% + \@ifpackageloaded{babel}{\RequirePackage{glossaries-babel}}{}} \fi % \end{macrocode} % The description terminator is given by \cs{glspostdescription} @@ -2830,6 +3168,7 @@ exists}% % been defined, they can be constructed from the \gloskey{name} % and \gloskey{description} key before they are sanitized). % +% %The \gloskey{name} key indicates the name % of the term being defined. This is how the term will appear in % the glossary. The \gloskey{name} key is required when defining @@ -2890,8 +3229,8 @@ exists}% % % The \gloskey{plural} key determines how the plural form of the term % should be displayed in the document. If omitted, the plural is -% constructed by appending an ``s'' to the value of the \gloskey{text} -% key. +% constructed by appending \ics{glspluralsuffix} to the value of the +% \gloskey{text} key. % \begin{macrocode} \define@key{glossentry}{plural}{% \def\@glo@plural{#1}% @@ -2910,7 +3249,7 @@ exists}% % The \gloskey{firstplural} key is used to set the plural form for % first use, in the event that the plural is required the first % time the term is used. If omitted, it is constructed by -% appending an ``s'' to the value of the \gloskey{first} key. +% appending \ics{glspluralsuffix} to the value of the \gloskey{first} key. % \begin{macrocode} \define@key{glossentry}{firstplural}{% \def\@glo@firstplural{#1}% @@ -2996,13 +3335,17 @@ counter as its value}}{% % \end{macrocode} % \begin{macrocode} \def\@glo@text{\@glo@name}% -\def\@glo@plural{\@glo@text s}% -\def\@glo@first{\@glo@text}% +\def\@glo@plural{\@glo@text\glspluralsuffix}% +% \end{macrocode} +% \changes{1.13}{2008 May 10}{Changed default first value} +% \begin{macrocode} +\def\@glo@first{\relax}% % \end{macrocode} % \changes{1.12}{2008 Mar 8}{Changed default first plural to be first % key with s appended (was text key with s appended)} +% \changes{1.13}{2008 May 10}{Changed default firstplural value} % \begin{macrocode} -\def\@glo@firstplural{\@glo@first s}% +\def\@glo@firstplural{\relax}% % \end{macrocode} % \begin{macrocode} \def\@glo@sort{\@glo@name}% @@ -3023,6 +3366,25 @@ in it}}{% \expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% }% % \end{macrocode} +% Check if \gloskey{first} and \gloskey{firstplural} have been use. +% If \gloskey{firstplural} hasn't been specified, but \gloskey{first} +% has been specified, then form \gloskey{firstplural} by appending +% \cs{glspluralsuffix} to value of \gloskey{first} key, otherwise +% obtain the value from the \gloskey{plural} key. +% \begin{macrocode} +\if\relax\@glo@firstplural\relax% + \if\relax\@glo@first\relax% + \def\@glo@firstplural{\@glo@plural}% + \def\@glo@first{\@glo@text}% + \else + \def\@glo@firstplural{\@glo@first\glspluralsuffix}% + \fi +\else + \if\relax\@glo@first\relax% + \def\@glo@first{\@glo@text}% + \fi +\fi +% \end{macrocode} % Define commands associated with this entry: % \begin{macrocode} \expandafter\protected@xdef\csname glo@#1@text\endcsname{\@glo@text}% @@ -3054,10 +3416,8 @@ in it}}{% }} % \end{macrocode} %\end{macro} -% Only defined new glossary entries in the preamble: -% \begin{macrocode} -\@onlypreamble{\newglossaryentry} -% \end{macrocode} +%\changes{1.13}{2008 May 10}{Removed restriction on only using +% 'newglossaryentry in the preamble} % %\subsection{Resetting and unsetting entry flags} % Each glossary entry is assigned a conditional of the form @@ -4120,8 +4480,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrytext{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -4156,8 +4517,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrytext{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -4192,9 +4554,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrytext{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -4230,8 +4593,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryfirst{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -4266,9 +4630,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryfirst{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -4303,8 +4668,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryfirst{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -4340,8 +4706,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -4376,9 +4743,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -4413,8 +4781,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -4450,8 +4819,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryfirstplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -4486,9 +4856,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryfirstplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -4523,8 +4894,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryfirstplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -4560,8 +4932,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -4596,9 +4969,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -4633,8 +5007,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -4670,8 +5045,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -4706,9 +5082,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -4743,8 +5120,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -4778,8 +5156,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -4812,9 +5191,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -4847,8 +5227,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -4884,8 +5265,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -4920,9 +5302,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -4957,8 +5340,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -4994,8 +5378,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\@glo@text}% +\@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} @@ -5028,9 +5413,10 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% - \expandafter\makefirstuc\expandafter{\@glo@text}}% + \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} @@ -5063,8 +5449,9 @@ counter as its value}}{% \protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} +% \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} -\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% +\@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} @@ -5907,20 +6294,34 @@ style `#1' undefined}{}}{% % \begin{macrocode} \newcommand{\newacronym}[4][]{% \newglossaryentry{#2}{type=\acronymtype,% -name={#3},description={#4},text={#3},descriptionplural={#4s},% -first={#4 (#3)},plural={#3s},% +name={#3},description={#4},text={#3},% +descriptionplural={#4\acrpluralsuffix},% +first={#4 (#3)},plural={#3\acrpluralsuffix},% firstplural={\@glo@descplural\space (\@glo@plural)},% #1}} % \end{macrocode} %\end{macro} -% New acronyms can only be defined in the preamble: -% \begin{macrocode} -\@onlypreamble{\newacronym} -% \end{macrocode} +%\changes{1.13}{2008 May 10}{Removed restriction on only using +% 'newacronym in the preamble} % Set up some convenient short cuts. These need to be changed if % \cs{newacronym} is changed (or if the \gloskey{description} key % is changed). % +%\begin{macro}{\acrpluralsuffix} +%\changes{1.13}{2008 May 10}{New} +% Plural suffix used by \cs{newacronym}. This just defaults to +% \cs{glspluralsuffix} but is changed to include \cs{textup} +% if the smallcaps option is used, so that the suffix doesn't appear +% in small caps as it doesn't look right. For example, +% \textsc{abcs} looks as though the ``s'' is part of the acronym, but +% \textsc{abc}s looks as though the ``s'' is a plural suffix. Since +% the entire text \texttt{abcs} is set in \cs{textsc}, \cs{textup} +% is need to cancel it out. +% \begin{macrocode} +\newcommand*{\acrpluralsuffix}{\glspluralsuffix} +% \end{macrocode} +%\end{macro} +% % Make a note of the keys that are used to store the long and % short forms: %\begin{macro}{\glsshortkey} @@ -5954,19 +6355,47 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \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]} +\def\@Acrshort#1#2[#3]{\@Glstext@{#1}{#2}[#3]} % \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]} +\def\@ACRshort#1#2[#3]{\@GLStext@{#1}{#2}[#3]} +% \end{macrocode} +%\end{macro} +% Plural: +%\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]} +% \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]} +% \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]} % \end{macrocode} %\end{macro} +% % \ics{acrlong} is set to \ics{glsdesc}, so it will print the long % form, unless the description key has been set to something else. %\begin{macro}{\acrlong} @@ -5977,19 +6406,47 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \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]} +\def\@Acrlong#1#2[#3]{\@Glsdesc@{#1}{#2}[#3]} % \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]} +\def\@ACRlong#1#2[#3]{\@GLSdesc@{#1}{#2}[#3]} +% \end{macrocode} +%\end{macro} +% Plural: +%\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]} % \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]} +% \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]} +% \end{macrocode} +%\end{macro} +% % % \ics{acrfull} is set to \ics{glsfirst}, so it should display the % full form. @@ -6014,6 +6471,31 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \def\@ACRfull#1#2[#3]{\@GLSfirst@{#1}{#2}[#3]} % \end{macrocode} %\end{macro} +% Plural: +%\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]} +% \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]} +% \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]} +% \end{macrocode} +%\end{macro} % %\subsection{Additional predefined acronym styles} %\begin{macro}{\acronymfont} @@ -6033,38 +6515,63 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \ifglsacrfootnote \renewcommand{\newacronym}[4][]{% \newglossaryentry{#2}{type=\acronymtype,% - name={#3},% + name={\acronymfont{#3}},% + sort={#3},% + text={#3},% + plural={#3\acrpluralsuffix},% symbol={#4},% + symbolplural={#4\acrpluralsuffix},% #1}} % \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]}} % \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]} % \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]})} % \end{macrocode} % % If \pkgopt{footnote} package option is specified, set the first @@ -6073,14 +6580,25 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %\changes{1.12}{2008 Mar 8}{Added 'protect before 'footnote % and 'glslink} % \begin{macrocode} - \defglsdisplayfirst[\acronymtype]{% - \acronymfont{#1}#4\noexpand\protect\noexpand\footnote{% - \noexpand\protect\noexpand\glslink - [\@gls@link@opts]{\@gls@link@label}{#3}}}% - \defglsdisplay[\acronymtype]{\acronymfont{#1}#4}% - \ifglsacrsmallcaps - \renewcommand*{\acronymfont}[1]{\textsc{#1}} - \fi + \defglsdisplayfirst[\acronymtype]{% + \acronymfont{#1}#4\noexpand\protect\noexpand\footnote{% + \noexpand\protect\noexpand\glslink + [\@gls@link@opts]{\@gls@link@label}{#3}}}% + \defglsdisplay[\acronymtype]{\acronymfont{#1}#4}% +% \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, +% otherwise it looks as though it's part of the acronym. +% \begin{macrocode} + \ifglsacrsmallcaps + \renewcommand*{\acronymfont}[1]{\textsc{#1}}% + \renewcommand*{\acrpluralsuffix}{% + \textup{\glspluralsuffix}}% + \else + \ifglsacrsmaller + \renewcommand*{\acronymfont}[1]{{\smaller #1}}% + \fi + \fi % \end{macrocode} % Check for package option clash % \begin{macrocode} @@ -6096,21 +6614,31 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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},% + name={\acronymfont#4},% + sort={#4}, first={#4},% + firstplural={#4\acrpluralsuffix},% + text={#4},% + plural={#4\acrpluralsuffix},% symbol={#3},% + symbolplural={#3\acrpluralsuffix},% #1}} % \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} @@ -6118,12 +6646,27 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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]}} +% \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]} % \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]} +% \end{macrocode} % Full form: % \begin{macrocode} \def\@acrfull#1#2[#3]{\@glsfirst@{#1}{#2}[#3] @@ -6133,6 +6676,15 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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]})} +% \end{macrocode} % Set display. % \begin{macrocode} \defglsdisplayfirst[\acronymtype]{#1#4} @@ -6144,18 +6696,23 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \begin{macrocode} \renewcommand{\newacronym}[4][]{% \newglossaryentry{#2}{type=\acronymtype,% - name={#3},% + name={\acronymfont{#3}},% + sort={#3},% first={#4},% + firstplural={#4\acrpluralsuffix},% + text={#3},% + plural={#3\acrpluralsuffix},% symbol={#3},% + symbolplural={#3\acrpluralsuffix},% #1}} % \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} @@ -6163,12 +6720,24 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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]}} +% \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]} % \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]} +% \end{macrocode} % Full form: % \begin{macrocode} \def\@acrfull#1#2[#3]{\@glsfirst@{#1}{#2}[#3] @@ -6178,15 +6747,32 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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]})} +% \end{macrocode} % Set display. % \begin{macrocode} \defglsdisplayfirst[\acronymtype]{#1#4 (\acronymfont{#3})} \defglsdisplay[\acronymtype]{\acronymfont{#1}#4} % \end{macrocode} -% Set small caps and check for option clash +% Redefine \ics{acronymfont} if small caps required. The plural suffix +% is set in an upright font so that it remains in normal lower case, +% otherwise it looks as though it's part of the acronym. % \begin{macrocode} \ifglsacrsmallcaps \renewcommand{\acronymfont}[1]{\textsc{#1}} + \renewcommand*{\acrpluralsuffix}{% + \textup{\glspluralsuffix}}% + \else + \ifglsacrsmaller + \renewcommand*{\acronymfont}[1]{{\smaller #1}}% + \fi \fi \fi \fi @@ -6204,8 +6790,12 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \begin{macrocode} \renewcommand{\newacronym}[4][]{% \newglossaryentry{#2}{type=\acronymtype,% - name={#3},% + name={\acronymfont{#3}},% + sort={#3},% + text={#3},% + plural={#3\acrpluralsuffix},% description={#4},% + descriptionplural={#4\acrpluralsuffix},% #1}} % \end{macrocode} % Set up the commands to make a note of the keys to store the long @@ -6232,12 +6822,24 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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]}} +% \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]} % \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]} +% \end{macrocode} % Full form: % \begin{macrocode} \def\@acrfull#1#2[#3]{\@glsdesc@{#1}{#2}[#3] @@ -6247,10 +6849,27 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \def\@ACRfull#1#2[#3]{\@GLSdesc@{#1}{#2}[#3] (\@GLStext@{#1}{#2}[#3])} % \end{macrocode} -% Redefine \ics{acronymfont} is small caps required +% 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])} +% \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, +% otherwise it looks as though it's part of the acronym. % \begin{macrocode} \ifglsacrsmallcaps \renewcommand*{\acronymfont}[1]{\textsc{#1}}% + \renewcommand*{\acrpluralsuffix}{% + \textup{\glspluralsuffix}}% + \else + \ifglsacrsmaller + \renewcommand*{\acronymfont}[1]{{\smaller #1}}% + \fi \fi % \end{macrocode} % Check for option clash @@ -6263,7 +6882,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \end{macrocode} % No footnotes required. % \begin{macrocode} - \ifglsacrsmallcaps + \ifthenelse{\boolean{glsacrsmallcaps}\or\boolean{glsacrsmaller}}{% % \end{macrocode} % % Neither footnote nor description required. @@ -6272,28 +6891,42 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \begin{macrocode} \renewcommand{\newacronym}[4][]{% \newglossaryentry{#2}{type=\acronymtype,% - name={#3},% + name={\acronymfont{#3}},% + sort={#3},% + text={#3},% + plural={#3\acrpluralsuffix},% first={#4},% + firstplural={#4\acrpluralsuffix},% description={#4},% + descriptionplural={#4\acrpluralsuffix},% symbol={#3},% + symbolplural={#3\acrpluralsuffix},% #1}} % \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 (\acronymfont{#3})} \defglsdisplay[\acronymtype]{\acronymfont{#1}#4} % \end{macrocode} -% Change \ics{acronymfont} to small caps: +% Redefine \ics{acronymfont} if small caps required. The plural suffix +% is set in an upright font so that it remains in normal lower case, +% otherwise it looks as though it's part of the acronym. % \begin{macrocode} - \renewcommand*{\acronymfont}[1]{\textsc{#1}} + \ifglsacrsmallcaps + \renewcommand*{\acronymfont}[1]{\textsc{#1}} + \renewcommand*{\acrpluralsuffix}{% + \textup{\glspluralsuffix}}% + \else + \renewcommand*{\acronymfont}[1]{{\smaller #1}} + \fi % \end{macrocode} % Set up short cuts. Short form: % \begin{macrocode} @@ -6301,12 +6934,24 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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]}} +% \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]} % \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]} +% \end{macrocode} % Full form: % \begin{macrocode} \def\@acrfull#1#2[#3]{\@glsfirst@{#1}{#2}[#3] @@ -6316,13 +6961,27 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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]})} +% \end{macrocode} % check for option clash % \begin{macrocode} \ifglsacrdua - \PackageError{glossaries}{Option clash: `smallcaps' and `dua' - can't both be set}{}% + \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 - \else + }{% % \end{macrocode} % Should acronyms always be expanded? % \begin{macrocode} @@ -6331,17 +6990,20 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \newglossaryentry{#2}{type=\acronymtype,% name={#3},% description={#4},% + descriptionplural={#4\acrpluralsuffix},% text={#4},% + plural={#4\acrpluralsuffix},% symbol={#3},% + symbolplural={#3\acrpluralsuffix},% #1}} % \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} @@ -6354,12 +7016,24 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \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]} +% \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]} % \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]} +% \end{macrocode} % Full form: % \begin{macrocode} \def\@acrfull#1#2[#3]{\@glstext@{#1}{#2}[#3] @@ -6368,12 +7042,125 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% (\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]})} \fi - \fi + }% \fi \fi % \end{macrocode} % +% Define synonyms if required +% \begin{macrocode} +\ifglsacrshortcuts +% \end{macrocode} +% Short form +%\begin{macro}{\acs} +% \begin{macrocode} + \let\acs\acrshort +% \end{macrocode} +%\end{macro} +% First letter uppercase short form +%\begin{macro}{\Acs} +% \begin{macrocode} + \let\Acs\Acrshort +% \end{macrocode} +%\end{macro} +% Plural short form +%\begin{macro}{\acsp} +% \begin{macrocode} + \let\acsp\acrshortpl +% \end{macrocode} +%\end{macro} +% First letter uppercase plural short form +%\begin{macro}{\Acsp} +% \begin{macrocode} + \let\Acsp\Acrshortpl +% \end{macrocode} +%\end{macro} +% Long form +%\begin{macro}{\acl} +% \begin{macrocode} + \let\acl\acrlong +% \end{macrocode} +%\end{macro} +% Plural long form +%\begin{macro}{\aclp} +% \begin{macrocode} + \let\aclp\acrlongpl +% \end{macrocode} +%\end{macro} +% First letter upper case long form +%\begin{macro}{\Acl} +% \begin{macrocode} + \let\Acl\Acrlong +% \end{macrocode} +%\end{macro} +% First letter upper case plural long form +%\begin{macro}{\Aclp} +% \begin{macrocode} + \let\Aclp\Acrlongpl +% \end{macrocode} +%\end{macro} +% Full form +%\begin{macro}{\acf} +% \begin{macrocode} + \let\acf\acrfull +% \end{macrocode} +%\end{macro} +% Plural full form +%\begin{macro}{\acfp} +% \begin{macrocode} + \let\acfp\acrfullpl +% \end{macrocode} +%\end{macro} +% First letter upper case full form +%\begin{macro}{\Acf} +% \begin{macrocode} + \let\Acf\Acrfull +% \end{macrocode} +%\end{macro} +% First letter upper case plural full form +%\begin{macro}{\Acfp} +% \begin{macrocode} + \let\Acfp\Acrfullpl +% \end{macrocode} +%\end{macro} +% Standard form +%\begin{macro}{\ac} +% \begin{macrocode} + \let\ac\gls +% \end{macrocode} +%\end{macro} +% First upper case standard form +%\begin{macro}{\Ac} +% \begin{macrocode} + \let\Ac\Gls +% \end{macrocode} +%\end{macro} +% Standard plural form +%\begin{macro}{\acp} +% \begin{macrocode} + \let\acp\glspl +% \end{macrocode} +%\end{macro} +% Standard first letter upper case plural form +%\begin{macro}{\Acp} +% \begin{macrocode} + \let\Acp\Glspl +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\fi +% \end{macrocode} +% % \subsection{Predefined Glossary Styles}\label{sec:code:styles} % The \sty{glossaries} bundle comes with some predefined glossary styles which % are defined in the following packages: @@ -6398,10 +7185,11 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*mfirstuc.sty> % \end{macrocode} %\fi -%\section{Mfirstuc package} +%\section{Mfirstuc Documented Code} +%\label{sec:code:mfirstuc} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mfirstuc}[2008/03/08 v1.0 (NLCT)] +\ProvidesPackage{mfirstuc}[2008/05/13 v1.01 (NLCT)] % \end{macrocode} %\begin{macro}{\makefirstuc} % Syntax:\\ @@ -6460,6 +7248,14 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \def\@gls@gobbletonil#1\@nil{\def\@gls@rest{#1}} % \end{macrocode} % +%\begin{macro}{\xmakefirstuc} +% Expand argument once before applying \cs{makefirstuc} +% (added v1.01). +% \begin{macrocode} +\newcommand*{\xmakefirstuc}[1]{% +\expandafter\makefirstuc\expandafter{#1}} +% \end{macrocode} +%\end{macro} %\iffalse % \begin{macrocode} %</mfirstuc.sty> @@ -6828,7 +7624,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \renewcommand*{\glossaryheader}{% \hline\bfseries\entryname&\bfseries\descriptionname& \bfseries \symbolname& -\bfseries\pagelistname\\\hline\endhead\hline\\\endfoot}% +\bfseries\pagelistname\\\hline\endhead\hline\endfoot}% } % \end{macrocode} %\iffalse @@ -7012,6 +7808,8 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \end{macrocode} %\fi %\subsection{Multi-Lingual Support} +% Many thanks to everyone who contributed to the translations both +% via email and on comp.text.tex. %\subsubsection{Babel Captions} % Define \isty{babel} captions if multi-lingual % support is required, but the \isty{translator} package is not loaded. @@ -7150,6 +7948,19 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \renewcommand*{\glsnumbersgroupname}{Sz\'amjegyek}% } % \end{macrocode} +% Polish +% \changes{1.13}{2008 May 10}{Add Polish support} +% \begin{macrocode} +\addto\captionspolish{% +\renewcommand*{\glossaryname}{S{\l}ownik termin\'ow}% +\renewcommand*{\acronymname}{Skr\'ot}% +\renewcommand*{\entryname}{Termin}% +\renewcommand*{\descriptionname}{Opis}% +\renewcommand*{\symbolname}{Symbol}% +\renewcommand*{\pagelistname}{Strony}% +\renewcommand*{\glssymbolsgroupname}{Symbole}% +\renewcommand*{\glsnumbersgroupname}{Liczby}} +% \end{macrocode} %\iffalse % \begin{macrocode} %</glossaries-babel.sty> @@ -7374,6 +8185,33 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %\fi %\iffalse % \begin{macrocode} +%<*glossaries-dictionary-Polish.dict> +% \end{macrocode} +%\fi +%\subsubsection{Polish Dictionary} +% This is a dictonary file provided for use with the \isty{translator} +% package. +% \begin{macrocode} +\ProvidesDictionary{glossaries-dictionary}{Polish} +% \end{macrocode} +% Provide Polish translations: +% \begin{macrocode} +\providetranslation{Glossary}{S{\l}ownik termin\'ow} +\providetranslation{Acronyms}{Skr\'ot} +\providetranslation{Notation (glossaries)}{Termin} +\providetranslation{Description (glossaries)}{Opis} +\providetranslation{Symbol (glossaries)}{Symbol} +\providetranslation{Page List (glossaries)}{Strony} +\providetranslation{Symbols (glossaries)}{Symbole} +\providetranslation{Numbers (glossaries)}{Liczby} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +%</glossaries-dictionary-Polish.dict> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*glossaries-dictionary-Spanish.dict> % \end{macrocode} %\fi @@ -7440,7 +8278,6 @@ description={a sample entry}} \newacronym{aca}{aca}{a contrived acronym} \begin{document} - A \gls{sample} entry and \gls{aca}. \printglossaries @@ -7550,7 +8387,7 @@ to specify the plural when you define the entry. % \begin{macrocode} \documentclass[a4paper]{article} -\usepackage[style=long4colheader]{glossaries} +\usepackage[style=long4colheaderborder]{glossaries} \makeglossaries @@ -7562,7 +8399,7 @@ symbol=m} \newglossaryentry{M}{name={$M$}, sort=M, description={mass}, -symbol={kg}} +symbol=kg} \begin{document} @@ -7593,8 +8430,6 @@ measured in kilograms. \makeglossaries -\renewcommand*{\glstextformat}[1]{\textsf{#1}} - \newacronym{svm}% label {svm}% abbreviation {support vector machine}% long form @@ -7655,31 +8490,22 @@ You don't need to worry about makeindex's special characters: \usepackage[style=altlist, % use altlist style toc, % add the glossary to the table of contents - sanitize={description=false}% don't sanitize description + sanitize={description=false},% want to use description in main document + description% acronyms have a user-supplied description ]{glossaries} \makeglossaries -\newglossaryentry{svm}{ - % how the entry name should appear in the glossary -name={Support vector machine (SVM)}, - % how the description should appear in the glossary - % since I have used sanitize={description=false} - % I have to protect fragile commands -description={Statistical pattern recognition -technique~\protect\cite{svm}}, - % how the entry should appear in the document text -text={svm}, - % how the entry should appear the first time it is - % used in the document text -first={support vector machine (svm)}} +\newacronym[description={Statistical pattern recognition +technique~\protect\cite{svm}}, % acronym's description +name={Support vector machine (svm)}% change the default way of displaying the entry name in the list of acronyms +]{svm}{svm}{support vector machine} -\newglossaryentry{ksvm}{ -name={Kernel support vector machine (KSVM)}, -description={Statistical pattern recognition technique -using the ``kernel trick'' (see also SVM)}, -text={ksvm}, -first={kernel support vector machine}} +\newacronym[description={Statistical pattern recognition technique +using the ``kernel trick'' (see also SVM)},% acronym's description +name={Kernel support vector machine (ksvm)}% change the default way of displaying the entry name in the list of acronyms +]{ksvm}{ksvm}{kernel +support vector machine} \begin{document} \tableofcontents @@ -7711,7 +8537,7 @@ one \gls[format=hyperbf]{svm}. \bibitem{svm} \ldots \end{thebibliography} -\printglossary[title={Acronyms}] +\printglossary \end{document} % \end{macrocode} @@ -7756,6 +8582,86 @@ Adding all entries\glsaddall. %\fi %\iffalse % \begin{macrocode} +%<*sampleDesc.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% See also sampleAcrDesc.tex +\documentclass[a4paper]{report} + +\usepackage[colorlinks,plainpages=false]{hyperref} + +\usepackage[style=altlist, % use altlist style + toc, % add the glossary to the table of contents + sanitize={description=false}% don't sanitize description + ]{glossaries} + +\makeglossaries + +\newglossaryentry{svm}{ + % how the entry name should appear in the glossary +name={Support vector machine (SVM)}, + % how the description should appear in the glossary + % since I have used sanitize={description=false} + % I have to protect fragile commands +description={Statistical pattern recognition +technique~\protect\cite{svm}}, + % how the entry should appear in the document text +text={svm}, + % how the entry should appear the first time it is + % used in the document text +first={support vector machine (svm)}} + +\newglossaryentry{ksvm}{ +name={Kernel support vector machine (KSVM)}, +description={Statistical pattern recognition technique +using the ``kernel trick'' (see also SVM)}, +text={ksvm}, +first={kernel support vector machine}} + +\begin{document} +\tableofcontents + +\chapter{Support Vector Machines} + +The \gls{svm} is used widely in the area of pattern recognition. + % plural form with initial letter in uppercase: +\Glspl{svm} are \ldots + +This is the text produced without a link: \glsentrytext{svm}. +This is the text produced on first use without a link: +\glsentryfirst{svm}. This is the entry's description without +a link: \glsentrydesc{svm}. + +This is the entry in uppercase: \GLS{svm}. + +\chapter{Kernel Support Vector Machines} + +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. + +\glsresetall +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{svm}. + +\begin{thebibliography}{1} +\bibitem{svm} \ldots +\end{thebibliography} + +\printglossary[title={Acronyms}] + +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%</sampleDesc.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*sampleEq.tex> % \end{macrocode} %\fi diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index 37cd7cde61e..2c36cc2ea3c 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 2008/3/8 23:00 +% glossaries.ins generated using makedtx version 0.94b 2008/5/13 11:33 \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-super.sty, glossaries-babel.sty, 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-Spanish.dict, minimalgls.tex, sample.tex, sample4col.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleDB.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, 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-super.sty, glossaries-babel.sty, 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, sampleAcr.tex, sampleAcrDesc.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, database1.tex, database2.tex, glossaries.perl. \endpreamble @@ -54,6 +54,8 @@ \usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-dictionary-Italian.dict,package}} \file{glossaries-dictionary-Magyar.dict}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-dictionary-Magyar.dict,package}} +\file{glossaries-dictionary-Polish.dict}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-dictionary-Polish.dict,package}} \file{glossaries-dictionary-Spanish.dict}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossaries-dictionary-Spanish.dict,package}} \file{minimalgls.tex}{\usepreamble\defaultpreamble @@ -68,6 +70,8 @@ \usepostamble\defaultpostamble\from{glossaries.dtx}{sampleAcrDesc.tex,package}} \file{sampleDB.tex}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{sampleDB.tex,package}} +\file{sampleDesc.tex}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries.dtx}{sampleDesc.tex,package}} \file{sampleEq.tex}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{sampleEq.tex,package}} \file{sampleEqPg.tex}{\usepreamble\defaultpreamble |