From 2591d5bab21119052bb58e82db7fd9fab8e97a7c Mon Sep 17 00:00:00 2001 From: Manuel Pégourié-Gonnard Date: Sat, 21 Jun 2008 16:05:24 +0000 Subject: glossaries update 21jun08 git-svn-id: svn://tug.org/texlive/trunk@8904 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/glossaries/glossaries.dtx | 546 ++++++++++++++++----- .../source/latex/glossaries/glossaries.ins | 41 +- 2 files changed, 427 insertions(+), 160 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index 53444736371..4422a782e6f 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -15,12 +15,13 @@ % -author "Nicola Talbot" % -dir "source" % -setambles "glossaries\.perl=>\nopreamble\nopostamble" +% -setambles ".*\.tex=>\nopreamble\nopostamble" % -comment "glossaries\.perl" % -comment ".*\.tex" % -doc "glossaries-manual.tex" % -codetitle "Documented Code" % glossaries -% Created on 2008/5/13 11:33 +% Created on 2008/6/18 16:44 %\fi %\iffalse %<*package> @@ -71,7 +72,7 @@ \makeatother \RecordChanges \PageIndex -\CheckSum{5110} +\CheckSum{5121} \CodelineNumbered \newcommand*{\termdef}[1]{\emph{#1}\iterm{#1}} \newcommand*{\term}[1]{#1\iterm{#1}} @@ -79,6 +80,18 @@ \newcommand{\dq}[1]{``#1''} \newcommand*{\tableref}[1]{\hyperref[#1]{table~\ref*{#1}}} \newcommand*{\Tableref}[1]{\hyperref[#1]{Table~\ref*{#1}}} +\newlength\boxlength +\newsavebox\importantbox +\newenvironment{important}{% +\setlength{\fboxrule}{4pt}% +\setlength\boxlength{\linewidth}% +\addtolength\boxlength{-2\fboxsep}% +\addtolength\boxlength{-2\fboxrule}% +\begin{lrbox}{\importantbox}% +\begin{minipage}{\boxlength}% +}{\end{minipage}\end{lrbox}% +\par\vskip10pt\noindent +\fcolorbox{red}{white}{\usebox{\importantbox}}\par\vskip10pt} @@ -111,7 +124,7 @@ %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{glossaries.sty v 1.13: \LaTeXe\ Package to Assist Generating Glossaries} +% \title{glossaries.sty v 1.14: \LaTeXe\ Package to Assist Generating Glossaries} % \author{Nicola L.C. Talbot\\[10pt] %School of Computing Sciences\\ %University of East Anglia\\ @@ -119,7 +132,7 @@ %NR4 7TJ. United Kingdom.\\ %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % -% \date{12th May 2008} +% \date{18th June 2008} % \maketitle %\tableofcontents % @@ -145,6 +158,7 @@ %code for the \sty{mfirstuc} package. % %\subsection{Multi-Lingual Support} +%\label{sec:languages} % %As from version 1.08, the \sty{glossaries} package now has %limited multi-lingual support, thanks to all the people who have sent @@ -153,7 +167,15 @@ %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. +%\isty{translator} package will be loaded automatically, however, +%it may not pick up on the required languages, so if the predefined +%text is not translated, you may need to explicitly load the +%\isty{translator} package with the required languages. For example: +%\begin{verbatim} +%\usepackage[spanish]{babel} +%\usepackage[spanish]{translator} +%\usepackage{glossaries} +%\end{verbatim} % %If you want to use \isty{ngerman} or \isty{german} instead %of \isty{babel}, you will need to include the \isty{translator} package @@ -277,13 +299,103 @@ % %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 +%should be located in \texttt{texmf/doc/latex/glossaries/samples/}. +%Further information on debugging \LaTeX\ code is available at %\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/}. % -%There is a list of frequently asked questions for the -%\sty{glossaries} package available at -%\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html}. +%Below is a list of the most frequently asked questions. For +%other queries, consult the \sty{glossaries} FAQ at +%\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html}. +% +%\begin{enumerate} +%\item I've used the \pkgopt{smallcaps} option, but the acronyms +%are displayed in normal sized upper case letters. +% +%The \pkgopt{smallcaps} package option uses \cs{textsc} to typeset +%the acronyms. This command converts lower case letters to small +%capitals, while upper case letters remain their usual size. Therefore +%you need to specify the acronym in lower case letters. +% +%\item How do I change the font that the acronyms are displayed in? +% +%The easiest way to do this is to specify the \pkgopt{smaller} package +%option and redefine \cs{acronymfont} to use the required typesetting +%command. For example, suppose you would like the acronyms displayed in +%a sans-serif font, then you can do: +%\begin{verbatim} +%\usepackage[smaller]{glossaries} +%\renewcommand*{\acronymfont}[1]{\textsf{#1}} +%\end{verbatim} +% +%\item How do I change the font that the acronyms are displayed in +%on first use? +% +%The easiest way to do this is to specify the \pkgopt{smaller} package +%option and redefine \cs{firstacronymfont} to use the required +%command. Note that if you don't want the acronym on subsequent use +%to use \cs{smaller}, you will also need to redefine \cs{acronymfont}, +%as above. For example to make the acronym emphasized on first use, +%but use the surrounding font for subsequent use, you can do: +%\begin{verbatim} +%\usepackage[smaller]{glossaries} +%\renewcommand*{\firstacronymfont}[1]{\emph{#1}} +%\renewcommand*{\acronymfont}[1]{#1} +%\end{verbatim} +% +%\item I don't have Perl installed, do I have to use +%\appname{makeglossaries}? +% +%Read \autoref{sec:makeglossaries}. +% +% +%\item I'm used to using the \sty{glossary} package: are there any +%instructions on migrating from the \isty{glossary} package to the +%\sty{glossaries} package? +% +%Read the file \texttt{glossary2glossaries.pdf} which should be available from the +%same location as this document. +% +%\item I'm using \isty{babel} but the fixed names haven't been +%translated. +% +%The \sty{glossaries} package currently only supports the following +%languages: Danish, Dutch, English, French, German, Irish, Italian, +%Hungarian, Polish and Spanish. If you want to add another language, +%send me the translations, and I'll add them to the next version. +% +%If you are using one of the above languages, but the text hasn't been +%translated, try adding the \isty{translator} package with the +%required languages explicitly (before you load the \sty{glossaries} +%package). For example: +%\begin{verbatim} +%\usepackage[ngerman]{babel} +%\usepackage[ngerman]{translator} +%\usepackage{glossaries} +%\end{verbatim} +%Alternatively, you may be able to add the language as a global option +%to the class file. Check the \sty{translator} package documentation for +%further details. +% +%\item My glossaries haven't appeared. +% +%Remember to do the following: +%\begin{itemize} +%\item Add \ics{makeglossaries} to the document preamble. +% +%\item Use either \ics{printglossary} for each glossary that has +%been defined or \ics{printglossaries}. +% +%\item Use \ics{gls}, \ics{Gls}, \ics{GLS}, \ics{glspl}, \ics{Glspl}, +%\ics{GLSpl}, \ics{glslink}, \ics{glsadd} or \ics{glsaddall} in the +%document. +% +%\item Run \LaTeX\ on your document, then run \appname{makeglossaries}, +%then run \LaTeX\ on your document again. If you want the glossaries +%to appear in the table of contents, you will need an extra \LaTeX\ +%run. +%\end{itemize} +%\end{enumerate} +% %\section{A Quick Guide For The Impatient} %\label{sec:quick} % @@ -568,7 +680,7 @@ % %\item Entries can be added to the glossary without producing %any text using \ics{glsadd}\marg{label} or -%\ics{glsaddall}. These commands also taken an optional +%\ics{glsaddall}. These commands also take an optional %argument where you can specify the format. For example %\begin{verbatim} %\glsadd[format=hyperbf]{singmtx} @@ -682,6 +794,7 @@ % \changes{1.02}{2007 May 25}{added overview section} % %\subsection{Package Options} +%\label{sec:pkgopts} % %The \sty{glossaries} package options are as follows: %\begin{description} @@ -751,6 +864,23 @@ %The list of acronyms is in section~\ref{\acronymtype}. %\end{verbatim} % +%As from version 1.14, you can add a prefix to the label by +%redefining \DescribeMacro{\glsautoprefix}\cs{glsautoprefix}. +%For example: +%\begin{verbatim} +%\renewcommand*{\glsautoprefix}{glo:} +%\end{verbatim} +%will add \texttt{glo:} to the automatically generated label, so +%you can then, for example, refer to the list of acronyms as follows: +%\begin{verbatim} +%The list of acronyms is in section~\ref{glo:\acronymtype}. +%\end{verbatim} +%Or, if you are undecided on a prefix: +%\begin{verbatim} +%The list of acronyms is in section~\ref{\glsautoprefix\acronymtype}. +%\end{verbatim} +% +% %\item[\pkgopt{style}] This is a \meta{key}=\meta{value} option. Its %value should be the name of the glossary style to use. Predefined %glossary styles are listed in \autoref{sec:styles}. @@ -776,6 +906,7 @@ %symbol=true}]{glossaries} %\end{verbatim} % +%\begin{important}% %\textbf{Note}: this sanitization only applies to the \gloskey{name}, %\gloskey{description} and \gloskey{symbol} keys. It doesn't apply %to any of the other keys (except the \gloskey{sort} key which is @@ -784,6 +915,7 @@ %Since the value of the \gloskey{text} key is obtained from the %\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. +%\end{important} % %\item[\pkgopt{description}] This option changes the definition of %\ics{newacronym} to allow a description. See \autoref{sec:acronyms} for further details. @@ -880,6 +1012,7 @@ %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 @@ -916,22 +1049,7 @@ %\newglossaryentry{elite}{name={{\'e}lite}, %description={select group or class}} %\end{verbatim} -%Similarly, commands such as \cs{ae} and \cs{oe} should either be placed -%inside a group or followed by a space. For example: -%\begin{verbatim} -%\newglossaryentry{oesophagus}{% -%name={{\oe}sophagus}, -%description={canal from mouth to stomach}} -%\end{verbatim} -%The following is also fine: -%\begin{verbatim} -%\newglossaryentry{oesophagus}{% -%name={\oe sophagus}, -%description={canal from mouth to stomach}} -%\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. +% % %\subsubsection{Plurals} %You may have noticed from above that you can specify the plural form @@ -1485,7 +1603,19 @@ % %\item[{\gloskey[printglossary]{style}}] This specifies which %glossary style to use for this glossary, overriding the effect -%of the \pkgopt{style} option or \ics{glossarystyle}. +%of the \pkgopt{style} package option or \ics{glossarystyle}. +% +%\item[{\gloskey[printglossary]{numberedsection}}] This specifies +%whether to use a numbered section for this glossary, overriding +%the effect of the \pkgopt{numberedsection} package option. This +%key has the same syntax as the \pkgopt{numberedsection} package +%option, described in \autoref{sec:pkgopts}. +%\item[{\gloskey[printglossary]{nonumberlist}}] Unlike the package option +%of the same name, this key is a boolean key. If true (\verb|nonumberlist=true|) the numberlist +%is suppressed for this glossary. If false (\verb|nonumberlist=false|) the numberlist is +%displayed for this glossary. If no value is supplied, true is +%assumed. +% %\end{description} % %\DescribeMacro{\glossarypreamble} @@ -1598,11 +1728,12 @@ %\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|, +%\begin{important}% +%\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}.) +%type as \verb|type=\glsdefaulttype|. See \autoref{sec:loadglsentries}.\end{important} % %For example, the following defines the acronym IDN: %\begin{verbatim} @@ -1635,18 +1766,33 @@ % % %\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. +%\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 +%\DescribeMacro{\acronymfont}\cs{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{you will need to load a +%package, such as \sty{relsize}, that defines \cs{smaller} if you use +%this option.} 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. +% +%If you want to display the acronym in another font, for example, +%emphasized, then use the \pkgopt{smaller} package option and +%redefine \ics{acronymfont} to use the required font. For example: +%\begin{verbatim} +%\usepackage[smaller]{glossaries} +%\renewcommand*{\acronymfont}[1]{\emph{#1}} +%\end{verbatim} +%Where \cs{acronymfont} is available, +%\DescribeMacro{\firstacronymfont}\cs{firstacronymfont} is also +%available. By default, this simply uses \cs{acronymfont}, but it +%can be redefined to change the way the acronym is displayed on +%first use. % %\begin{table}[htbp] %\caption{Package options governing \cs{newacronym} and how the @@ -1733,7 +1879,7 @@ %\begin{description} %\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} +%\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} %\\[10pt] %while subsequent use displays the entry as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert}\\[10pt] @@ -1747,7 +1893,7 @@ %\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 +%\item[\pkgopt{dua}]\mbox{}\par The \pkgopt{dua} package option always displays the expanded %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] @@ -1758,7 +1904,7 @@ %\gloskey{description} key is set to the long form. % %\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] +%\meta{long}\meta{insert} (\cs{firstacronymfont}\marg{abbrv})\\[10pt] %while subsequent use displays the entry as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert}\\[10pt] %Note also that if this package option is used, the \sty{glossaries} @@ -1767,7 +1913,7 @@ %remember to protect fragile commands when defining acronyms. % %\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] +%\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long}\\[10pt] %while subsequent use displays the entry as:\\[10pt] %\cs{acronymfont}\marg{abbrv}\meta{insert} % @@ -1778,7 +1924,7 @@ % %\item[\pkgopt{smallcaps}]\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] +%\meta{long}\meta{insert} (\cs{firstacronymfont}\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|\textsc{#1}|, so \meta{abbrv} @@ -1791,11 +1937,14 @@ % %\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] +%\meta{long}\meta{insert} (\cs{firstacronymfont}\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}|. % +%Remember to load a package that defines \ics{smaller} (such as +%\isty{relsize}) if you want to use this option. +% %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 @@ -1806,7 +1955,6 @@ %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] %\meta{abbrv}\meta{insert} %\end{description} % @@ -1927,7 +2075,22 @@ % %\item[listhypergroup] The \glostyle{listhypergroup} style is like %\glostyle{listgroup} but has a set of links to the glossary -%groups. +%groups. The start of the glossary has a navigation panel to +%each group that is present in the glossary. This requires an +%additional run through \LaTeX\ to ensure the group information +%is up-to-date. In the navigation panel, each group is separated +%by \DescribeMacro{\glshypernavsep}\cs{glshypernavsep} which +%defaults to a vertical bar with a space on either side. For example, +%to simply have a space separating each group, do: +%\begin{verbatim} +%\renewcommand*{\glshypernavsep}{\space} +%\end{verbatim} +% +%Note that the hyper-navigation panel is now (as from version 1.14) +%set inside the optional argument to \cs{item} instead of after it +%to prevent a spurious space at the start. This can be changed +%by redefining \ics{glossaryheader}, but note that this needs to +%be done \emph{after} the glossary style has been set. % %\item[altlist] The \glostyle{altlist} style is like \glostyle{list} %but the description is placed on the following line. @@ -1937,7 +2100,8 @@ % %\item[altlisthypergroup] The \glostyle{altlisthypergroup} style is like %\glostyle{altlistgroup} but has a set of links to the glossary -%groups. +%groups. The navigation panel is the same as that for +%\glostyle{listhypergroup}, described above. % %\item[listdotted] This style uses the \envname{description} %environment. Each entry starts with \verb|\item[]|, followed by the @@ -2048,6 +2212,28 @@ %argument to \ics{printglossary} or using the command:\\[10pt] %\DescribeMacro{\glossarystyle}\cs{glossarystyle}\marg{style-name}\\[10pt] % +%Note that if you use the \gloskey[printglossary]{style} key in the +%optional argument to \ics{printglossary}, it will override any +%previous style settings for the given glossary, so if, for example, +%you do: +%\begin{verbatim} +%\renewcommand*{\glsgroupskip}{} +%\printglossary[style=long] +%\end{verbatim} +%The new definition of \ics{glsgroupskip} will not have an affect +%for this glossary, as \cs{glsgroupskip} is redefined by +%\verb|style=long|. Likewise, \ics{glossarystyle} will also +%override any previous style definitions, so, again: +%\begin{verbatim} +%\renewcommand*{\glsgroupskip}{} +%\glossarystyle{long} +%\end{verbatim} +%will reset \cs{glsgroupskip} back to its default definition for the +%named glossary style (\dq{long} in this case). If you want to +%modify the styles, either use \ics{newglossarystyle} (described +%in the next section) or make the modifications after +%\ics{glossarystyle}. +% % \changes{1.03}{2007 July 4}{'glspostdescription added} %All the styles except for the three- and four-column styles and the %\glostyle{listdotted} style use the command @@ -2231,7 +2417,7 @@ %\cs{makefirstuc}\marg{stuff}\\[10pt] %which makes the first object of %\meta{stuff} uppercase unless \meta{stuff} starts with a control -%sequence followed by a group, in which case the first +%sequence followed by a non-empty group, in which case the first %object in the group is converted to uppercase. Examples: %\begin{itemize} %\item \verb|\makefirstuc{abc}| produces Abc @@ -2247,9 +2433,13 @@ %\item \verb|\makefirstuc{{\ae}bc}| produces {\AE}bc %\end{itemize} % -%Note however that \verb|\makefirstuc{\ae{}bc}| produces \ae Bc since -%the empty group following \cs{ae} is considered to be the argument -%of \cs{ae} which is in fact not the case. +%\begin{important} +%In version 1.02 of \sty{mfirstuc}, a bug fix resulted in a change +%in output if the first object is a control sequence followed by +%an empty group. Prior to version 1.02, \verb|\makefirstuc{\ae{}bc}| +%produced \ae Bc. However as from version 1.02, it now produces +%\AE bc. +%\end{important} % %Note also that %\begin{verbatim} @@ -2273,6 +2463,17 @@ %\end{verbatim} %produces: Abc. % +%If you want to use an alternative command to convert to uppercase, +%for example \cs{MakeTextUppercase}\footnote{defined in the +%\sty{textcase} package}, you can redefine the internal +%command \cs{@gls@makefirstuc}. For example: +%\begin{verbatim} +%\renewcommand{\@gls@makefirstuc}[1]{\MakeTextUppercase #1} +%\end{verbatim} +%(Remember that command names that contain the @ character must +%either be placed in packages or be placed between \cs{makeatletter} +%\cs{makeatother}.) +% % % \StopEventually{\clearpage\phantomsection\addcontentsline{toc}{section}{Index}\PrintIndex} % @@ -2290,7 +2491,7 @@ % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2008/05/10 v1.13 (NLCT)] +\ProvidesPackage{glossaries}[2008/06/17 v1.14 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -2307,7 +2508,8 @@ % Need to use \cs{new@ifnextchar} instead of \cs{@ifnextchar} in % commands that have a final optional argument (such as \ics{gls}) % so require \isty{amsgen}. -% Thanks to Morten~H{\o}gholm for suggesting this. +% Thanks to Morten~H{\o}gholm for suggesting this. (This has +% replaced using the \sty{xspace} package.) % \begin{macrocode} \RequirePackage{amsgen} % \end{macrocode} @@ -2360,6 +2562,13 @@ subsection,subsubsection,paragraph,subparagraph}[section]{% \newcommand*{\@@glossaryseclabel}{} % \end{macrocode} %\end{macro} +%\begin{macro}{\glsautoprefix} +% Prefix to add before label if automatically generated: +%\changes{1.14}{2008 June 17}{new} +% \begin{macrocode} +\newcommand*{\glsautoprefix}{} +% \end{macrocode} +%\end{macro} % \begin{macrocode} \define@choicekey{glossaries.sty}{numberedsection}[\val\nr]{% false,nolabel,autolabel}[nolabel]{% @@ -2371,7 +2580,7 @@ false,nolabel,autolabel}[nolabel]{% \renewcommand*{\@@glossaryseclabel}{}% \or \renewcommand*{\@@glossarysecstar}{}% - \renewcommand*{\@@glossaryseclabel}{\label{\@glo@type}}% + \renewcommand*{\@@glossaryseclabel}{\label{\glsautoprefix\@glo@type}}% \fi} % \end{macrocode} % @@ -5900,8 +6109,8 @@ to move \string\makeglossaries\space after all your \def\glossarytitle{\csname @glotype@\@glo@type @title\endcsname}% \def\glossarytoctitle{\glossarytitle}% \def\@glossarystyle{}% -\setkeys{printgloss}{#1}% \bgroup +\setkeys{printgloss}{#1}% \@glossarystyle \makeatletter \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% @@ -5951,6 +6160,34 @@ to move \string\makeglossaries\space after all your style `#1' undefined}{}}{% \def\@glossarystyle{\csname @glsstyle@#1\endcsname}}} % \end{macrocode} +% \changes{1.14}{2008 June 17}{added numberedsection key to 'printglossary} +% The \gloskey[printglossary]{numberedsection} key determines if this +% glossary should be in a numbered section. +% \begin{macrocode} +\define@choicekey{printgloss}{numberedsection}[\val\nr]{% +false,nolabel,autolabel}[nolabel]{% +\ifcase\nr\relax + \renewcommand*{\@@glossarysecstar}{*}% + \renewcommand*{\@@glossaryseclabel}{}% +\or + \renewcommand*{\@@glossarysecstar}{}% + \renewcommand*{\@@glossaryseclabel}{}% +\or + \renewcommand*{\@@glossarysecstar}{}% + \renewcommand*{\@@glossaryseclabel}{\label{\glsautoprefix\@glo@type}}% +\fi} +% \end{macrocode} +% \changes{1.14}{2008 June 17}{added nonumberlist key to 'printglossary} +% The \gloskey[printglossary]{nonumberlist} key determines if this +% glossary should have a number list. +% \begin{macrocode} +\define@boolkey{printgloss}[gls]{nonumberlist}[true]{% +\ifglsnonumberlist + \def\glossaryentrynumbers##1{}% +\else + \def\glossaryentrynumbers##1{##1}% +\fi} +% \end{macrocode} % %\DescribeEnv{theglossary} % If the \envname{theglossary} environment has @@ -6504,6 +6741,13 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \newcommand{\acronymfont}[1]{#1} % \end{macrocode} %\end{macro} +%\begin{macro}{\firstacronymfont} +%This is only used with the additional acronym styles: +%\changes{1.14}{2008 June 17}{new} +% \begin{macrocode} +\newcommand{\firstacronymfont}[1]{\acronymfont{#1}} +% \end{macrocode} +%\end{macro} % \begin{macrocode} \ifglsacrdescription % \end{macrocode} @@ -6581,7 +6825,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % and 'glslink} % \begin{macrocode} \defglsdisplayfirst[\acronymtype]{% - \acronymfont{#1}#4\noexpand\protect\noexpand\footnote{% + \firstacronymfont{#1}#4\noexpand\protect\noexpand\footnote{% \noexpand\protect\noexpand\glslink [\@gls@link@opts]{\@gls@link@label}{#3}}}% \defglsdisplay[\acronymtype]{\acronymfont{#1}#4}% @@ -6624,8 +6868,6 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \newglossaryentry{#2}{type=\acronymtype,% name={\acronymfont#4},% sort={#4}, - first={#4},% - firstplural={#4\acrpluralsuffix},% text={#4},% plural={#4\acrpluralsuffix},% symbol={#3},% @@ -6691,6 +6933,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \defglsdisplay[\acronymtype]{#1#4} \else % \end{macrocode} +% (dua is not set.) % Store long form in \gloskey{first} key % and short form in \gloskey{text} and \gloskey{symbol} key. % \begin{macrocode} @@ -6702,8 +6945,8 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% firstplural={#4\acrpluralsuffix},% text={#3},% plural={#3\acrpluralsuffix},% - symbol={#3},% - symbolplural={#3\acrpluralsuffix},% + symbol={\@glo@text},% + symbolplural={\@glo@plural},% #1}} % \end{macrocode} % Set up the commands to make a note of the keys to store the long @@ -6758,7 +7001,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \end{macrocode} % Set display. % \begin{macrocode} - \defglsdisplayfirst[\acronymtype]{#1#4 (\acronymfont{#3})} + \defglsdisplayfirst[\acronymtype]{#1#4 (\firstacronymfont{#3})} \defglsdisplay[\acronymtype]{\acronymfont{#1}#4} % \end{macrocode} % Redefine \ics{acronymfont} if small caps required. The plural suffix @@ -6811,7 +7054,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % 'glslink} % \begin{macrocode} \defglsdisplayfirst[\acronymtype]{% - \acronymfont{#1}#4\noexpand\protect\noexpand\footnote{% + \firstacronymfont{#1}#4\noexpand\protect\noexpand\footnote{% \noexpand\protect\noexpand\glslink [\@gls@link@opts]{\@gls@link@label}{#2}}}% \defglsdisplay[\acronymtype]{\acronymfont{#1}#4}% @@ -6893,12 +7136,12 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \newglossaryentry{#2}{type=\acronymtype,% name={\acronymfont{#3}},% sort={#3},% - text={#3},% - plural={#3\acrpluralsuffix},% + text={\@glo@symbol},% + plural={\@glo@symbolplural},% first={#4},% firstplural={#4\acrpluralsuffix},% - description={#4},% - descriptionplural={#4\acrpluralsuffix},% + description={\@glo@first},% + descriptionplural={\@glo@firstplural},% symbol={#3},% symbolplural={#3\acrpluralsuffix},% #1}} @@ -6913,7 +7156,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \end{macrocode} % Change the display since \gloskey{first} only contains long form. % \begin{macrocode} - \defglsdisplayfirst[\acronymtype]{#1#4 (\acronymfont{#3})} + \defglsdisplayfirst[\acronymtype]{#1#4 (\firstacronymfont{#3})} \defglsdisplay[\acronymtype]{\acronymfont{#1}#4} % \end{macrocode} % Redefine \ics{acronymfont} if small caps required. The plural suffix @@ -6989,10 +7232,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \renewcommand{\newacronym}[4][]{% \newglossaryentry{#2}{type=\acronymtype,% name={#3},% - description={#4},% - descriptionplural={#4\acrpluralsuffix},% text={#4},% plural={#4\acrpluralsuffix},% + description={#4},% symbol={#3},% symbolplural={#3\acrpluralsuffix},% #1}} @@ -7189,14 +7431,15 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %\label{sec:code:mfirstuc} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mfirstuc}[2008/05/13 v1.01 (NLCT)] +\ProvidesPackage{mfirstuc}[2008/06/18 v1.02 (NLCT)] % \end{macrocode} %\begin{macro}{\makefirstuc} % Syntax:\\ % \cs{makefirstuc}\marg{text}\\ % Makes the first letter uppercase, but will % skip initial control sequences if they are followed by a group -% and make the first thing in the group uppercase. +% and make the first thing in the group uppercase, unless the group +% is empty. % Thus \verb|\makefirstuc{abc}| will produce: Abc, % \verb|\makefirstuc{\ae bc}| will produce: \AE bc, but % \verb|\makefirstuc{\emph{abc}}| will produce \emph{Abc}. @@ -7213,17 +7456,27 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \if@glscs \@gls@getbody #1{}\@nil \ifx\@gls@rest\@empty - \MakeUppercase #1% + \@gls@makefirstuc{#1}% \else - \@gls@body{\expandafter\@gls@makefirstuc\@gls@rest}% + \expandafter\@gls@split\@gls@rest\@nil + \ifx\@gls@first\@empty + \@gls@makefirstuc{#1}% + \else + \@gls@body{\expandafter\@gls@makefirstuc\@gls@first}\@gls@rest% + \fi \fi \else - \MakeUppercase #1% + \@gls@makefirstuc{#1}% \fi \fi } % \end{macrocode} %\end{macro} +% Put first argument in \cs{@gls@first} and second argument in +% \cs{@gls@rest}: +% \begin{macrocode} +\def\@gls@split#1#2\@nil{\def\@gls@first{#1}\def\@gls@rest{#2}} +% \end{macrocode} % \begin{macrocode} \def\@gls@checkcs#1 #2#3\relax{% \def\@gls@argi{#1}\def\@gls@argii{#2}% @@ -7256,6 +7509,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \expandafter\makefirstuc\expandafter{#1}} % \end{macrocode} %\end{macro} +%\section{Glossary Styles} %\iffalse % \begin{macrocode} % @@ -7266,7 +7520,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossary-hypernav.sty> % \end{macrocode} %\fi -% \subsubsection{Glossary hyper-navigation definitions (glossary-hypernav package)} +% \subsection{Glossary hyper-navigation definitions (glossary-hypernav package)} % Package Definition: % \begin{macrocode} \ProvidesPackage{glossary-hypernav}[2007/07/04 v1.01 (NLCT)] @@ -7285,11 +7539,12 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % whose label is given by \meta{label} for the glossary given % by \meta{type}. %\begin{macro}{\glsnavhyperlink} +%\changes{1.14}{2008 June 17}{changed 'edef to 'protected@edef} % \begin{macrocode} \@ifundefined{hyperlink}{% \newcommand*{\glsnavhyperlink}[3][]{#3}}{% \newcommand*{\glsnavhyperlink}[3][\@glo@type]{% -\edef\gls@grplabel{#2}\edef\@gls@grptitle{#3}% +\edef\gls@grplabel{#2}\protected@edef\@gls@grptitle{#3}% \hyperlink{glsn:#1@#2}{#3}}} % \end{macrocode} %\end{macro} @@ -7299,14 +7554,39 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % whose label is given by \meta{label} in the glossary given % by \meta{type}. %\begin{macro}{\glsnavhypertarget} +%\changes{1.14}{2008 June 17}{added write to aux file} % \begin{macrocode} \@ifundefined{hypertarget}{% -\newcommand*{\glsnavhypertarget}[3][]{#3}}{% \newcommand*{\glsnavhypertarget}[3][\@glo@type]{% +\protected@write\@auxout{}{\string\@gls@hypergroup{#1}{#2}}% +#3}}{% +\newcommand*{\glsnavhypertarget}[3][\@glo@type]{% +\protected@write\@auxout{}{\string\@gls@hypergroup{#1}{#2}}% \hypertarget{glsn:#1@#2}{#3}}} % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@hypergroup} +% This adds to (or creates) the command \cs{@gls@hypergrouplist@}\meta{glossary type} +% which lists all groups for a given glossary, so that +% the navigation bar only contains those groups that are present. +% However it requires at least 2 runs to ensure the information is +% up-to-date. +%\changes{1.14}{2008 June 17}{new} +% \begin{macrocode} +\newcommand*{\@gls@hypergroup}[2]{% +\@ifundefined{@gls@hypergrouplist@#1}{% + \expandafter\xdef\csname @gls@hypergrouplist@#1\endcsname{#2}% +}{% + \expandafter\let\expandafter\@gls@tmp + \csname @gls@hypergrouplist@#1\endcsname + \expandafter\xdef\csname @gls@hypergrouplist@#1\endcsname{% + \@gls@tmp,#2}% +}% +} +% \end{macrocode} +%\end{macro} +% % The \cs{glsnavigation} command displays a simple glossary % group navigation. % The symbol and number elements are defined separately, @@ -7316,42 +7596,34 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % terms, in which case you will get an undefined hyperlink warning. % Now for the whole navigation bit: %\begin{macro}{\glsnavigation} +% \changes{1.14}{2008 June 2008}{changed to only use labels for +% groups that are present} % \begin{macrocode} \newcommand*{\glsnavigation}{% -\glssymbolnav -\glsnavhyperlink{A}{\glsgetgrouptitle{A}} \textbar\ -\glsnavhyperlink{B}{\glsgetgrouptitle{B}} \textbar\ -\glsnavhyperlink{C}{\glsgetgrouptitle{C}} \textbar\ -\glsnavhyperlink{D}{\glsgetgrouptitle{D}} \textbar\ -\glsnavhyperlink{E}{\glsgetgrouptitle{E}} \textbar\ -\glsnavhyperlink{F}{\glsgetgrouptitle{F}} \textbar\ -\glsnavhyperlink{G}{\glsgetgrouptitle{G}} \textbar\ -\glsnavhyperlink{H}{\glsgetgrouptitle{H}} \textbar\ -\glsnavhyperlink{I}{\glsgetgrouptitle{I}} \textbar\ -\glsnavhyperlink{J}{\glsgetgrouptitle{J}} \textbar\ -\glsnavhyperlink{K}{\glsgetgrouptitle{K}} \textbar\ -\glsnavhyperlink{L}{\glsgetgrouptitle{L}} \textbar\ -\glsnavhyperlink{M}{\glsgetgrouptitle{M}} \textbar\ -\glsnavhyperlink{N}{\glsgetgrouptitle{N}} \textbar\ -\glsnavhyperlink{O}{\glsgetgrouptitle{O}} \textbar\ -\glsnavhyperlink{P}{\glsgetgrouptitle{P}} \textbar\ -\glsnavhyperlink{Q}{\glsgetgrouptitle{Q}} \textbar\ -\glsnavhyperlink{R}{\glsgetgrouptitle{R}} \textbar\ -\glsnavhyperlink{S}{\glsgetgrouptitle{S}} \textbar\ -\glsnavhyperlink{T}{\glsgetgrouptitle{T}} \textbar\ -\glsnavhyperlink{U}{\glsgetgrouptitle{U}} \textbar\ -\glsnavhyperlink{V}{\glsgetgrouptitle{V}} \textbar\ -\glsnavhyperlink{W}{\glsgetgrouptitle{W}} \textbar\ -\glsnavhyperlink{X}{\glsgetgrouptitle{X}} \textbar\ -\glsnavhyperlink{Y}{\glsgetgrouptitle{Y}} \textbar\ -\glsnavhyperlink{Z}{\glsgetgrouptitle{Z}}} +\def\@gls@between{}% +\@ifundefined{@gls@hypergrouplist@\@glo@type}{% + \def\@gls@list{}% +}{% + \expandafter\let\expandafter\@gls@list + \csname @gls@hypergrouplist@\@glo@type\endcsname +}% +\@for\@gls@tmp:=\@gls@list\do{% + \@gls@between + \glsnavhyperlink{\@gls@tmp}{\glsgetgrouptitle{\@gls@tmp}}% + \let\@gls@between\glshypernavsep% +}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glshypernavsep} +% Separator for the hyper navigation bar. +% \begin{macrocode} +\newcommand*{\glshypernavsep}{\space\textbar\space} % \end{macrocode} %\end{macro} % The \cs{glssymbolnav} produces a simple navigation set of -% links for just the symbol and number groups. This is used at -% the start of \cs{glsnavigation}. If your glossary doesn't -% contain any symbol or navigation groups, you can redefine this -% command to do nothing. +% links for just the symbol and number groups. This used to be used at +% the start of \cs{glsnavigation}. This command is no longer needed. %\begin{macro}{\glssymbolnav} % \begin{macrocode} \newcommand*{\glssymbolnav}{% @@ -7370,7 +7642,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossary-list.sty> % \end{macrocode} %\fi -% \subsubsection{List Style (glossary-list package)} +% \subsection{List Style (glossary-list package)} % The \isty{glossary-list} package defines glossary styles % that use the \envname{description} environment. Note that since % the entry name is placed in the optional argument to the @@ -7409,7 +7681,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \newglossarystyle{listhypergroup}{% \glossarystyle{list}% \renewcommand*{\glossaryheader}{% -\item[]\glsnavigation}% +\item[\glsnavigation]}% \renewcommand*{\glsgroupheading}[1]{% \item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} % \end{macrocode} @@ -7437,7 +7709,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \newglossarystyle{altlisthypergroup}{% \glossarystyle{altlist}% \renewcommand*{\glossaryheader}{% -\item[]\glsnavigation}% +\item[\glsnavigation]}% \renewcommand*{\glsgroupheading}[1]{% \item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} % \end{macrocode} @@ -7470,7 +7742,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossary-long.sty> % \end{macrocode} %\fi -% \subsubsection{Glossary Styles using longtable (the glossary-long +% \subsection{Glossary Styles using longtable (the glossary-long % package)} % The glossary styles defined in the \isty{glossary-long} package % used the \envname{longtable} environment in the glossary. @@ -7637,7 +7909,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossary-super.sty> % \end{macrocode} %\fi -% \subsubsection{Glossary Styles using supertabular environment (glossary-super package)} +% \subsection{Glossary Styles using supertabular environment (glossary-super package)} % The glossary styles defined in the \isty{glossary-super} package % use the \envname{supertabular} environment. % \begin{macrocode} @@ -7807,10 +8079,10 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-babel.sty> % \end{macrocode} %\fi -%\subsection{Multi-Lingual Support} +%\section{Multi-Lingual Support} % Many thanks to everyone who contributed to the translations both % via email and on comp.text.tex. -%\subsubsection{Babel Captions} +%\subsection{Babel Captions} % Define \isty{babel} captions if multi-lingual % support is required, but the \isty{translator} package is not loaded. % \begin{macrocode} @@ -7971,7 +8243,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-Danish.dict> % \end{macrocode} %\fi -%\subsubsection{Danish Dictionary} +%\subsection{Danish Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -7998,7 +8270,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-Dutch.dict> % \end{macrocode} %\fi -%\subsubsection{Dutch Dictionary} +%\subsection{Dutch Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8025,7 +8297,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-English.dict> % \end{macrocode} %\fi -%\subsubsection{English Dictionary} +%\subsection{English Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8052,7 +8324,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-French.dict> % \end{macrocode} %\fi -%\subsubsection{French Dictionary} +%\subsection{French Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8079,7 +8351,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-German.dict> % \end{macrocode} %\fi -%\subsubsection{German Dictionary} +%\subsection{German Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8107,7 +8379,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-Irish.dict> % \end{macrocode} %\fi -%\subsubsection{Irish Dictionary} +%\subsection{Irish Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8134,7 +8406,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-Italian.dict> % \end{macrocode} %\fi -%\subsubsection{Italian Dictionary} +%\subsection{Italian Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8161,7 +8433,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-Magyar.dict> % \end{macrocode} %\fi -%\subsubsection{Magyar Dictionary} +%\subsection{Magyar Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8188,7 +8460,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-Polish.dict> % \end{macrocode} %\fi -%\subsubsection{Polish Dictionary} +%\subsection{Polish Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8215,7 +8487,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %<*glossaries-dictionary-Spanish.dict> % \end{macrocode} %\fi -%\subsubsection{Spanish Dictionary} +%\subsection{Spanish Dictionary} % This is a dictonary file provided for use with the \isty{translator} % package. % \begin{macrocode} @@ -8249,7 +8521,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % desired, and add the relevant package options to % both the class file and the glossaries package. % Change the sample glossary entry and acronym if - % required. + % required. If the problem occurs with an additional + % glossary, add in the relevant \newglossary command + % and a sample entry. % % Only add extra packages or commands if they % contribute to whatever problem you are trying to @@ -8268,17 +8542,23 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \listfiles %\usepackage{glossaries} % acronym will go in main glossary -\usepackage[acronym]{glossaries} % make a separate list of acronyms + \usepackage[acronym]{glossaries} % make a separate list of acronyms \makeglossaries \newglossaryentry{sample}{name={sample}, description={a sample entry}} -\newacronym{aca}{aca}{a contrived acronym} +% This contrived acronym has non-standard plural forms. +% These are specified in the optional argument. +\newacronym[\glsshortpluralkey=cas,\glslongpluralkey=contrived +acronyms]{aca}{aca}{a contrived acronym} \begin{document} -A \gls{sample} entry and \gls{aca}. +A \gls{sample} entry and \gls{aca}. Second use: \gls{aca}. + +Plurals: \glspl{sample}. Reset acronym\glsreset{aca}. +First use: \glspl{aca}. Second use: \glspl{aca}. \printglossaries \end{document} diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index 2c36cc2ea3c..7996164767c 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/5/13 11:33 +% glossaries.ins generated using makedtx version 0.94b 2008/6/18 16:44 \input docstrip \preamble @@ -58,32 +58,19 @@ \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 -\usepostamble\defaultpostamble\from{glossaries.dtx}{minimalgls.tex,package}} -\file{sample.tex}{\usepreamble\defaultpreamble -\usepostamble\defaultpostamble\from{glossaries.dtx}{sample.tex,package}} -\file{sample4col.tex}{\usepreamble\defaultpreamble -\usepostamble\defaultpostamble\from{glossaries.dtx}{sample4col.tex,package}} -\file{sampleAcr.tex}{\usepreamble\defaultpreamble -\usepostamble\defaultpostamble\from{glossaries.dtx}{sampleAcr.tex,package}} -\file{sampleAcrDesc.tex}{\usepreamble\defaultpreamble -\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 -\usepostamble\defaultpostamble\from{glossaries.dtx}{sampleEqPg.tex,package}} -\file{sampleNtn.tex}{\usepreamble\defaultpreamble -\usepostamble\defaultpostamble\from{glossaries.dtx}{sampleNtn.tex,package}} -\file{sampleSec.tex}{\usepreamble\defaultpreamble -\usepostamble\defaultpostamble\from{glossaries.dtx}{sampleSec.tex,package}} -\file{database1.tex}{\usepreamble\defaultpreamble -\usepostamble\defaultpostamble\from{glossaries.dtx}{database1.tex,package}} -\file{database2.tex}{\usepreamble\defaultpreamble -\usepostamble\defaultpostamble\from{glossaries.dtx}{database2.tex,package}} +\file{minimalgls.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{minimalgls.tex}} +\file{sample.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample.tex}} +\file{sample4col.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample4col.tex}} +\file{sampleAcr.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleAcr.tex}} +\file{sampleAcrDesc.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleAcrDesc.tex}} +\file{sampleDB.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleDB.tex}} +\file{sampleDesc.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleDesc.tex}} +\file{sampleEq.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleEq.tex}} +\file{sampleEqPg.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleEqPg.tex}} +\file{sampleNtn.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleNtn.tex}} +\file{sampleSec.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleSec.tex}} +\file{database1.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{database1.tex}} +\file{database2.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{database2.tex}} \file{glossaries.perl}{\nopreamble\nopostamble\from{glossaries.dtx}{glossaries.perl}} } -- cgit v1.2.3