diff options
author | Karl Berry <karl@freefriends.org> | 2009-01-17 01:07:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-01-17 01:07:22 +0000 |
commit | 4619c8309b673808e4d13a3202d2c8d9f6374f5e (patch) | |
tree | 5140a9eeec6a7f7c5523e90208f6c908998fffc2 /Master/texmf-dist/source | |
parent | e55e7bf0fee958f96ac89ec9c2cdfd3b1a91f99a (diff) |
glossaries 1.18
git-svn-id: svn://tug.org/texlive/trunk@11899 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.dtx | 2624 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.ins | 4 |
2 files changed, 1934 insertions, 694 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index 2dcfce07d7d..be27ab049ec 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -25,7 +25,7 @@ % -doc "glossaries-manual.tex" % -codetitle "Documented Code" % glossaries -% Created on 2008/12/26 16:49 +% Created on 2009/1/16 12:27 %\fi %\iffalse %<*package> @@ -48,13 +48,14 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2008 Nicola Talbot, all rights reserved. +% Copyright (C) 2009 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> \documentclass[a4paper]{ltxdoc} \usepackage{ifthen} \usepackage{alltt} +\usepackage{pifont} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[colorlinks, @@ -78,7 +79,7 @@ \makeatother \RecordChanges \PageIndex -\CheckSum{7758} +\CheckSum{7872} \CodelineNumbered \newcommand*{\termdef}[1]{\emph{#1}\iterm{#1}} \newcommand*{\term}[1]{#1\iterm{#1}} @@ -98,9 +99,16 @@ }{\end{minipage}\end{lrbox}% \par\vskip10pt\noindent \fcolorbox{red}{white}{\usebox{\importantbox}}\par\vskip10pt} +\newcommand*{\tick}{\ding{51}} +\newcommand*{\ifirstuse}{\iterm{first use}} +\newcommand*{\firstuse}{first use\ifirstuse} +\newcommand*{\firstuseflag}{first use flag\ifirstuseflag} +\newcommand*{\firstusetext}{first use text\ifirstusetext} +\newcommand*{\ifirstuseflag}{\iterm{first use>flag}} +\newcommand*{\ifirstusetext}{\iterm{first use>text}} \newcommand*{\istkey}[1]{\texttt{#1}\index{makeindex=\texttt{makeindex}>#1=\texttt{#1}|hyperpage}} \newcommand*{\locfmt}[1]{\texttt{#1}\SpecialMainIndex{#1}} \newcommand*{\ics}[1]{\texttt{\char`\\#1}\SpecialMainIndex{#1}} @@ -134,7 +142,7 @@ %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{glossaries.sty v 1.17: \LaTeXe\ Package to Assist Generating Glossaries} +% \title{glossaries.sty v 1.18: \LaTeXe\ Package to Assist Generating Glossaries} % \author{Nicola L.C. Talbot\\[10pt] %School of Computing Sciences\\ %University of East Anglia\\ @@ -142,7 +150,7 @@ %NR4 7TJ. United Kingdom.\\ %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % -% \date{26th December 2008} +% \date{14th January 2009} % \maketitle %\tableofcontents % @@ -154,8 +162,12 @@ %user to customize the format of the glossary and define multiple %glossaries. It also supports acronyms and glossary styles that %include symbols (in addition to a name and description) for glossary -%entries. There is provision for loading a database of glossary terms -%where only those terms used in the text are added to the glossary. +%entries. There is provision for loading a database of glossary terms. +%Only those terms used\footnote{that is, if the term has been +%referenced using any of the commands described in \autoref{sec:glslink}, +%\autoref{sec:glsadd} or +%via \ics{glssee} (or the \gloskey{see} key)} in the document will be +%added to the glossary. % %\textbf{This package replaces the \isty{glossary} package which is %now obsolete. Please see the file @@ -183,7 +195,7 @@ %pointers of how to get started creating a basic glossary, without %having to read through lengthy descriptions. % -%\item \autoref{sec:overview} gives an overview of available commands and their syntax. +%\item \autoref{sec:overview} gives an overview of the main user commands and their syntax. % %\item \autoref{sec:mfirstuc} describes the associated \sty{mfirstuc} package. % @@ -221,7 +233,7 @@ % %The sample documents are as follows: %\begin{description} -%\item[minimalgls.tex] This document is a minimal working example. +%\item[minimalgls.tex]\label{ex:minimalgls} This document is a minimal working example. %You can test your installation using this file. To create the %complete document you will need to do the following steps: % \begin{enumerate} @@ -236,6 +248,12 @@ % PDF\LaTeX\ you will also get warnings about non-existent % references. These warnings may be ignored on the first run. % +% If you get a \verb"Missing \begin{document}" error, then +% it's most likely that your version of \isty{xkeyval} is +% out of date. Check the log file for a warning of that nature. +% If this is the case, you will need to update the \sty{xkeyval} +% package. +% % \item Run \appname{makeglossaries} on the document. This can % be done on a terminal by either typing %\begin{verbatim} @@ -266,7 +284,7 @@ %each entry in the glossary is the location number. By default, this %is the page number where the entry was referenced. % -%\item[sample4col.tex] This document illustrates a four column +%\item[sample4col.tex]\label{ex:sample4col} This document illustrates a four column %glossary where the entries have a symbol in addition to the %name and description. To create the complete document, you need %to do: @@ -285,9 +303,9 @@ %\renewcommand*{\glsgroupskip}{} %\end{verbatim} % -%\item[sampleAcr.tex] This document has some sample acronyms. It +%\item[sampleAcr.tex]\label{ex:sampleAcr} This document has some sample acronyms. It %also adds the glossary to the table of contents, so an extra -%run through \LaTeX\ is required to ensure the document is up-to-date: +%run through \LaTeX\ is required to ensure the document is up to date: %\begin{verbatim} %latex sampleAcr %makeglossaries sampleAcr @@ -295,7 +313,7 @@ %latex sampleAcr %\end{verbatim} % -%\item[sampleAcrDesc.tex] This is similar to the previous example, +%\item[sampleAcrDesc.tex]\label{ex:sampleAcrDesc} This is similar to the previous example, %except that the acronyms have an associated description. As with %the previous example, the glossary is added to the table of %contents, so an extra run through \LaTeX\ is required: @@ -306,7 +324,7 @@ %latex sampleAcrDesc %\end{verbatim} % -%\item[sampleDesc.tex] This is similar to the previous example, +%\item[sampleDesc.tex]\label{ex:sampleDesc} This is similar to the previous example, %except that it defines the acronyms using \ics{newglossaryentry} %instead of \ics{newacronym}. As with %the previous example, the glossary is added to the table of @@ -318,8 +336,8 @@ %latex sampleDesc %\end{verbatim} % -%\item[sampleDB.tex] This document illustrates how to load -%an external files containing the glossary definitions. It also +%\item[sampleDB.tex]\label{ex:sampleDB} This document illustrates how to load +%external files containing the glossary definitions. It also %illustrates how to define a new glossary type. This document %has the \term{number list} suppressed and uses \ics{glsaddall} to add %all the entries to the glossaries without referencing each one @@ -329,10 +347,11 @@ %makeglossaries sampleDB %latex sampleDB %\end{verbatim} -%The glossary definitions are stored in the files +%The glossary definitions are stored in the accompanying files %\texttt{database1.tex} and \texttt{database2.tex}. Note that if %you don't have Perl installed, you will need to use -%\appname{makeindex} twice instead of using \appname{makeglossaries}: +%\appname{makeindex} twice instead of a single call to +%\appname{makeglossaries}: %\begin{enumerate} %\item Create the main glossary: %\begin{verbatim} @@ -344,7 +363,7 @@ %\end{verbatim} %\end{enumerate} % -%\item[sampleEq.tex] This document illustrates how to change the +%\item[sampleEq.tex]\label{ex:sampleEq} This document illustrates how to change the %location to something other than the page number. In this case, %the \texttt{equation} counter is used since all glossary entries %appear inside an \envname{equation} environment. To create the @@ -355,7 +374,7 @@ %latex sampleEq %\end{verbatim} % -%\item[sampleEqPg.tex] This is similar to the previous example, +%\item[sampleEqPg.tex]\label{ex:sampleEqPg} This is similar to the previous example, %but the number lists\iterm{number list} are a mixture of page %numbers and equation numbers. This example adds the glossary to the %table of contents, so an extra \LaTeX\ run is required: @@ -366,7 +385,7 @@ %latex sampleEqPg %\end{verbatim} % -%\item[sampleSec.tex] This document also illustrates how to change +%\item[sampleSec.tex]\label{ex:sampleSec} This document also illustrates how to change %the location to something other than the page number. In this case, %the \texttt{section} counter is used. This example adds the %glossary to the table of contents, so an extra \LaTeX\ run is @@ -378,7 +397,7 @@ %latex sampleSec %\end{verbatim} % -%\item[sampleNtn.tex] This document illustrates how to create +%\item[sampleNtn.tex]\label{ex:sampleNtn} This document illustrates how to create %an additional glossary type. This example adds the glossary to the %table of contents, so an extra \LaTeX\ run is required: %\begin{verbatim} @@ -388,7 +407,8 @@ %latex sampleNtn %\end{verbatim} %Note that if you don't have Perl installed, you will need to use -%\appname{makeindex} twice instead of using \appname{makeglossaries}: +%\appname{makeindex} twice instead of a single call to +%\appname{makeglossaries}: %\begin{enumerate} %\item Create the main glossary: %\begin{verbatim} @@ -400,7 +420,7 @@ %\end{verbatim} %\end{enumerate} % -%\item[sample.tex] This document illustrates some of the basics, +%\item[sample.tex]\label{ex:sample} This document illustrates some of the basics, %including how to create child entries that use the same name as the %parent entry. This example adds the glossary to the table of %contents, so an extra \LaTeX\ run is required: @@ -417,7 +437,7 @@ %\appname{makeindex} explicitly, you will need to use the %\texttt{-l} switch to indicate letter ordering.) % -%\item[sampletree.tex] This document illustrates a hierarchical +%\item[sampletree.tex]\label{ex:sampletree} This document illustrates a hierarchical %glossary structure where child entries have different names %to their corresponding parent entry. To create the document do: %\begin{verbatim} @@ -426,7 +446,7 @@ %latex sampletree %\end{verbatim} % -%\item[samplexdy.tex] This document illustrates how to use the +%\item[samplexdy.tex]\label{ex:samplexdy} This document illustrates how to use the %\sty{glossaries} package with \appname{xindy} instead of %\appname{makeindex}. The document uses UTF8 encoding (with the %\isty{inputenc} package). The encoding is picked up by @@ -469,7 +489,7 @@ %samplexdy.glo %\end{verbatim} % -%\item[sampleutf8.tex] This is another example that uses +%\item[sampleutf8.tex]\label{ex:sampleutf8} This is another example that uses %\appname{xindy}. Unlike \appname{makeindex}, \appname{xindy} can %cope with accented or non-Latin characters. This document uses %UTF8 encoding. To create the document do: @@ -486,7 +506,8 @@ %-o sampleutf8.gls sampleutf8.glo %\end{verbatim} % -%If you remove the \pkgopt{xindy} option and do: +%If you remove the \pkgopt{xindy} option from \texttt{sampleutf8.tex} +%and do: %\begin{verbatim} %latex sampleutf8 %makeglossaries sampleutf8 @@ -604,8 +625,8 @@ %\label{tab:predefinednames} %\begin{center} %\begin{tabular}{@{}llp{0.4\linewidth}@{}} -%\bfseries Command Name & \bfseries Translator key word & -%\bfseries What it's for\\ +%\bfseries Command Name & \bfseries Translator Key Word & +%\bfseries Purpose\\ %\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}).\\ @@ -687,7 +708,7 @@ %\autoref{sec:makeindexapp}). Note that some commands and %package options have no effect if you don't use %\appname{makeglossaries}. These are listed in -%Table~\ref{tab:makeglossariesCmds}. +%\tableref{tab:makeglossariesCmds}. % %Note that if any of your entries use an entry %that is not referenced outside the glossary, you will need to @@ -795,7 +816,8 @@ %\usepackage[xindy]{glossaries} %\end{verbatim} %This is required regardless of whether you use \appname{xindy} -%explicitly or via \appname{makeglossaries}. This causes the glossary +%explicitly or whether it's called implicitly via +%\appname{makeglossaries}. This causes the glossary %entries to be written in raw \appname{xindy} format, so you need to %use \texttt{-I xindy} \emph{not} \texttt{-I tex}. % @@ -807,14 +829,15 @@ %-o \textrm{\meta{base}}.gls \textrm{\meta{base}}.glo %\end{ttfamily} %\\[10pt] -%where \meta{language} is required language name, \meta{encoding} is -%the encoding, \meta{base} is the name of the document without -%the \filetype{.tex} extension and \meta{style} is the name of the -%\appname{xindy} style file without the \filetype{.xdy} extension. The -%default name for this style file is \meta{base}\filetype{.xdy} but -%can be changed via \ics{setStyleFile}\marg{style}. You may need to -%specify the full path name. If any of the file names contain spaces, -%you must delimit them using double-quotes. +%where \meta{language} is the required language name, \meta{encoding} +%is the encoding, \meta{base} is the name of the document without the +%\filetype{.tex} extension and \meta{style} is the name of the +%\appname{xindy} style file without the \filetype{.xdy} extension. +%The default name for this style file is \meta{base}\filetype{.xdy} +%but can be changed via \ics{setStyleFile}\marg{style}. You may need +%to specify the full path name depending on the current working +%directory. If any of the file names contain spaces, you must delimit +%them using double-quotes. % %For example, if your document is called \texttt{myDoc.tex} and %you are using UTF8 encoding in English, then type the @@ -845,7 +868,7 @@ %Note also that some commands and package options have no effect if %you use \appname{xindy} explicitly instead of using %\appname{makeglossaries}. These are listed in -%Table~\ref{tab:makeglossariesCmds}. +%\tableref{tab:makeglossariesCmds}. % %\subsubsection{Using makeindex explicitly} %\label{sec:makeindexapp} @@ -895,7 +918,7 @@ %Note also that some commands and package options have no effect if %you use \appname{makeindex} explicitly instead of using %\appname{makeglossaries}. These are listed in -%Table~\ref{tab:makeglossariesCmds}. +%\tableref{tab:makeglossariesCmds}. % %\subsection{Troubleshooting} %\label{sec:trouble} @@ -915,17 +938,25 @@ %\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 +%\item \textbf{Q.} I get the error message: +%\begin{verbatim} +%Missing \begin{document} +%\end{verbatim} +% +%\textbf{A.} Check you are using an up to date version of the \isty{xkeyval} +%package. +% +%\item \textbf{Q.} 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 +%\textbf{A.} 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? +%\item \textbf{Q.} 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 +%\textbf{A.} 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: @@ -934,40 +965,43 @@ %\renewcommand*{\acronymfont}[1]{\textsf{#1}} %\end{verbatim} % -%\item How do I change the font that the acronyms are displayed in -%on first use? +%\item \textbf{Q.} How do I change the font that the acronyms are displayed in +%on \firstuse? % -%The easiest way to do this is to specify the \pkgopt{smaller} package +%\textbf{A.} 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: +%as above. For example to make the acronym emphasized on +%\firstuse, 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 +%\item \textbf{Q.} I don't have Perl installed, do I have to use %\appname{makeglossaries}? % -%Read \autoref{sec:xindyapp} or +%\textbf{A.} Although it is strongly recommended that you use +%\appname{makeglossaries}, you don't have to use it. +%For further details, read +%\autoref{sec:xindyapp} or %\autoref{sec:makeindexapp}, depending on %whether you want to use \appname{xindy} or \appname{makeindex}. % % -%\item I'm used to using the \sty{glossary} package: are there any +%\item \textbf{Q.} 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 +%\textbf{A.} 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 +%\item \textbf{Q.} I'm using \isty{babel} but the fixed names haven't been %translated. % -%The \sty{glossaries} package currently only supports the following +%\textbf{A.} The \sty{glossaries} package currently only supports the following %languages: Brazilian Portuguese, 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 @@ -986,9 +1020,9 @@ %to the class file. Check the \sty{translator} package documentation %for further details. % -%\item My glossaries haven't appeared. +%\item \textbf{Q.} My glossaries haven't appeared. % -%Remember to do the following: +%\textbf{A.} Remember to do the following: %\begin{itemize} %\item Add \ics{makeglossaries} to the document preamble. % @@ -998,7 +1032,7 @@ %\item Use the commands listed in %\autoref{sec:glslink}, %\autoref{sec:glsadd} or -%\autoref{sec:glssee} for each entry +%\autoref{sec:crossref} for each entry %that you want to appear in the glossary. % %\item Run \LaTeX\ on your document, then run \appname{makeglossaries}, @@ -1307,7 +1341,7 @@ %In this example, the entry name appears as \dq{Matrix} in the %glossary, and either \dq{matrix} or \dq{matrices} in the text. % -%\item The way the term appears on first use can be different +%\item The way the term appears on \firstuse\ can be different %to the way it appears subsequently: %\begin{verbatim} %\newglossaryentry{singmtx}{name=Singular Matrix, @@ -1519,7 +1553,7 @@ %\end{verbatim} % %\end{enumerate} -%\section{Overview}\label{sec:overview} +%\section{Overview of User Commands}\label{sec:overview} % \changes{1.02}{2007 May 25}{added overview section} % %\subsection{Package Options} @@ -1539,7 +1573,7 @@ %the section numbers rather than the section titles. % %\item[\pkgopt{acronym}] This creates a new glossary with the -%label \texttt{acronym}: +%label \texttt{acronym}. This is equivalent to: %\begin{verbatim} %\newglossary[alg]{acronym}{acr}{acn}{\acronymname} %\end{verbatim} @@ -1548,9 +1582,10 @@ %\texttt{main}.\footnote{Actually it sets \ics{acronymtype} to %\ics{glsdefaulttype} if the \pkgopt{acronym} package option is %not used, but \ics{glsdefaulttype} usually has the value -%\texttt{main}.} +%\texttt{main}.} %Entries that are defined using \ics{newacronym} are placed in -%the glossary whose label is given by \ics{acronymtype}. +%the glossary whose label is given by \ics{acronymtype}, unless +%another glossary is explicitly specified. % %\item[\pkgopt{section}] This is a \meta{key}=\meta{value} option. Its %value should be the name of a sectional unit (e.g.\ chapter). @@ -1627,6 +1662,44 @@ %\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}. +%\item[\pkgopt{nolong}] This prevents the \sty{glossaries} package +%from automatically loading \isty{glossary-long} (which means that +%the \isty{longtable} package also won't be loaded). This reduces +%overhead by not defining unwanted styles and commands. Not that if +%you use this option, you won't be able to use any of the +%glossary styles defined in the \sty{glossary-long} package. +% +%\item[\pkgopt{nosuper}] This prevents the \sty{glossaries} package +%from automatically loading \isty{glossary-super} (which means that +%the \isty{supertabular} package also won't be loaded). This reduces +%overhead by not defining unwanted styles and commands. Not that if +%you use this option, you won't be able to use any of the +%glossary styles defined in the \sty{glossary-super} package. +% +%\item[\pkgopt{nolist}] This prevents the \sty{glossaries} package +%from automatically loading \isty{glossary-list}. This reduces +%overhead by not defining unwanted styles. Not that if +%you use this option, you won't be able to use any of the +%glossary styles defined in the \sty{glossary-list} package. +%Note that since the default style is \glostyle{list}, you will +%also need to use the \pkgopt{style} option to set the style to +%something else. +% +%\item[\pkgopt{notree}] This prevents the \sty{glossaries} package +%from automatically loading \isty{glossary-tree}. This reduces +%overhead by not defining unwanted styles. Not that if +%you use this option, you won't be able to use any of the +%glossary styles defined in the \sty{glossary-tree} package. +% +%\item[\pkgopt{nostyles}] This prevents all the predefined styles +%from being loaded. This option is provided in the event that the +%user has custom styles that are not dependent on the styles +%provided by the \sty{glossaries} package. Note that if you use +%this option, you can't use the \pkgopt{style} package option. Instead +%you must either use \ics{glossarystyle}\marg{style} or +%the \gloskey[printglossary]{style} key in the +%optional argument to \ics{printglossary}. +% %\item[\pkgopt{nonumberlist}] This option will suppress the %associated number lists\iterm{number list} in the glossaries (see also %\autoref{sec:numberlists}). @@ -1696,7 +1769,7 @@ %The indexing style file will been given a \filetype{.xdy} extension. % %The \pkgopt{xindy} package option may additionally have a -%value that is a key=value comma-separated list to override +%value that is a \meta{key}=\meta{value} comma-separated list to override %the language and codepage. For example: %\begin{verbatim} %\usepackage[xindy={language=english,codepage=utf8}]{glossaries} @@ -1725,7 +1798,8 @@ %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 file +%(using any of the commands described in \autoref{sec:glslink}, \autoref{sec:glsadd} or \autoref{sec:crossref}) will appear in the glossary. Each time an entry +%is used in this way, a line is added to an associated glossary file %(\filetype{.glo}), which then needs to be converted into a %corresponding \filetype{.gls} file which contains the typeset %glossary which is input by \ics{printglossary} or @@ -1821,7 +1895,9 @@ %can do \verb|description={\nopostdesc}|. If you want a paragraph %break in the description use \DescribeMacro{\glspar}\cs{glspar}. %However, note that not all glossary styles support multi-line -%descriptions. +%descriptions. If you are using one of the tabular-like glossary +%styles that permit multi-line descriptions, use \ics{newline} +%not \verb"\\" if you want to force a line break. % %\item[{\gloskey{parent}}] The label of the parent entry. Note that %the parent entry must be defined before its sub-entries. @@ -1837,7 +1913,7 @@ %field is omitted, the value of the \gloskey{name} key is used. % %\item[{\gloskey{first}}] How the entry will appear in the document text -%the first time it is used with \ics{gls} (or one of its uppercase +%the first time it is used with \ics{gls}\ifirstusetext\ (or one of its uppercase %variants). If this field is omitted, the value of the \gloskey{text} %key is used. % @@ -1845,9 +1921,11 @@ %when using \ics{glspl} (or one of its uppercase variants). %If this field is omitted, the value is obtained by appending %\ics{glspluralsuffix} to the value of the \gloskey{text} field. +%The default value of \cs{glspluralsuffix} is the letter +%\dq{s}. % %\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 +%document text the first time it is used with \ics{glspl}\ifirstusetext\ (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 @@ -1918,7 +1996,8 @@ %when you define a term. If you omit this, the plural will be %obtained by appending %\DescribeMacro{\glspluralsuffix}\cs{glspluralsuffix} to -%the singular form. This command defaults to \dq{s}. For example: +%the singular form. This command defaults to the letter \dq{s}. +%For example: %\begin{verbatim} %\newglossaryentry{cow}{name=cow,description={a fully grown %female of any bovine animal}} @@ -1985,11 +2064,9 @@ %define the categories as follows: %\begin{verbatim} %\newglossaryentry{greekletter}{name={Greek letters}, -%text={Greek letter}, %description={\nopostdesc}} % %\newglossaryentry{romanletter}{name={Roman letters}, -%text={Roman letter}, %description={\nopostdesc}} %\end{verbatim} % @@ -2066,7 +2143,7 @@ % %\DescribeMacro{\loadglsentries} %You can store all your glossary entry definitions in another -%file, and use:\\[10pt] +%file and use:\\[10pt] %\cs{loadglsentries}\oarg{type}\marg{filename}\\[10pt] %where \meta{filename} is the name of the file containing all the %\cs{newglossaryentry} commands. The optional argument @@ -2155,7 +2232,7 @@ %\end{important} % %With both \appname{makeindex} and \appname{xindy}, you can replace -%separator and the closing number in the range using:\\[10pt] +%the separator and the closing number in the range using:\\[10pt] %\DescribeMacro{\glsSetSuffixF}\cs{glsSetSuffixF}\marg{suffix}\\ %\DescribeMacro{\glsSetSuffixFF}\cs{glsSetSuffixFF}\marg{suffix}\\[10pt] %where the former command specifies the suffix to use for a 2 page @@ -2227,6 +2304,13 @@ %\renewcommand*{\glstextformat}[1]{\textsf{#1}} %\end{verbatim} % +%Each entry has an associated conditional referred to as the +%\firstuseflag. This determines whether \ics{gls}, +%\ics{glspl} (and their uppercase variants) should use the +%value of the \gloskey{first} or \gloskey{text} keys. Note that an +%entry can be used without affecting the \firstuseflag\ (for example, +%when used with \cs{glslink}). See \autoref{sec:glsunset} for commands that unset or reset this conditional. +% %\DescribeMacro{\glslink} %The command:\\[10pt] %\cs{glslink}\oarg{options}\marg{label}\marg{text}\\[10pt] @@ -2260,13 +2344,14 @@ % %In this document, the standard formats refer to the standard text %block commands such as \ics{textbf} or \ics{emph} or any of the -%commands listed in Table~\ref{tab:hyperxx}. +%commands listed in \tableref{tab:hyperxx}. % %\begin{important} %If you use \appname{xindy} instead of \appname{makeindex}, you %must specify any non-standard formats that you want to use %with the \gloskey[glslink]{format} key using -%\ics{GlsAddXdyAttribute}\marg{name}. For example +%\ics{GlsAddXdyAttribute}\marg{name}. So if you use +%\appname{xindy} with the above example, you would need to add: %\begin{verbatim} %\GlsAddXdyAttribute{textbfem} %\end{verbatim} @@ -2282,7 +2367,7 @@ %hyperlinked location, don't use \ics{hyperpage} (provided by the %\isty{hyperref} package) as the locations may not refer to a page %number. Instead, the \sty{glossaries} package provides number -%formats listed in Table~\ref{tab:hyperxx}. +%formats listed in \tableref{tab:hyperxx}. % %\begin{table}[htbp] %\caption{Predefined Hyperlinked Location Formats} @@ -2316,7 +2401,7 @@ %\newcommand{\hyperbsf}[1]{\textbf{\hypersf{#1}}} %\end{verbatim} %and then use \texttt{hyperbsf} as the value for the \gloskey{format} -%key. (See also \autoref{sec:printglos}.) Remember that if you use \appname{xindy}, you will need to add +%key. (See also \autoref{sec:code:printglos}.) Remember that if you use \appname{xindy}, you will need to add %this to the list of location attributes: %\begin{verbatim} %\GlsAddXdyAttribute{hyperbsf} @@ -2346,9 +2431,9 @@ %is determined from the values of the \gloskey{text} and %\gloskey{first} keys supplied when the entry was defined using %\ics{newglossaryentry}. If the entry has been marked as having -%been used, the value of the \gloskey{text} key will be used, otherwise +%been used\ifirstuseflag, 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 +%On completion, \cs{gls} will mark the entry's first use flag\ifirstuseflag\ as %used. % %There are two uppercase variants:\\[10pt] @@ -2357,7 +2442,7 @@ %and\\[10pt] %\DescribeMacro{\GLS} %\cs{GLS}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%which make the first letter of the link or all the link text +%which make the first letter of the link text or all the link text %uppercase, respectively. % %The final optional argument \meta{insert}, allows you to insert @@ -2385,8 +2470,9 @@ %\DescribeMacro{\glstext}The command:\\[10pt] %\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. Unlike \cs{gls}, the inserted text \meta{insert} +%of the \gloskey{text} key and does not affect the +%\firstuseflag. +%Unlike \cs{gls}, the inserted text \meta{insert} %is always appended to the link text. % %There are also analogous commands:\\[10pt] @@ -2401,8 +2487,8 @@ %\cs{glsfirst}\oarg{options}\marg{label}\oarg{insert}\\[10pt] %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. +%to the end of the link text and does not affect the +%\firstuseflag. % %There are also analogous commands:\\[10pt] %\DescribeMacro{\Glsfirst} @@ -2501,15 +2587,16 @@ %The format of the \term{link text} for \ics{gls}, \ics{glspl} %and their uppercase variants is governed by two commands: %\DescribeMacro{\glsdisplayfirst}\cs{glsdisplayfirst}, which is used the -%first time a glossary entry is used in the text and +%first time a glossary entry is used\ifirstuse\ in the text and %\DescribeMacro{\glsdisplay}\cs{glsdisplay}, which is used subsequently. %Both commands take four arguments: the first is either the singular or %plural form given by the \gloskey{text}, \gloskey{plural}, -%\gloskey{first} or \gloskey{firstplural} keys (used when the term was +%\gloskey{first} or \gloskey{firstplural} keys (set when the term was %defined) depending on context; the second argument is the term's -%description (as supplied by the \gloskey{description} key); the third +%description (as supplied by the \gloskey{description} or +%\gloskey{descriptionplural} keys); the third %argument is the symbol associated with the term (as supplied by the -%\gloskey{symbol} key) and the fourth argument is the additional text +%\gloskey{symbol} or \gloskey{symbolplural} keys) and the fourth argument is the additional text %supplied in the final optional argument to \cs{gls} or %\cs{glspl} (or their uppercase variants). The default definitions %of \cs{glsdisplay} and \cs{glsdisplayfirst} simply @@ -2533,7 +2620,7 @@ %symbol={km}} %\end{verbatim} %and now suppose you want \verb|\gls{distance}| to produce -%\dq{distance (km)} on first use, then you can redefine +%\dq{distance (km)} on \firstuse, then you can redefine %\cs{glsdisplayfirst} as follows: %\begin{verbatim} %\renewcommand{\glsdisplayfirst}[4]{#1#4 (#3)} @@ -2542,7 +2629,7 @@ %\verb|\gls{distance}['s]| will produce \dq{distance's (km)} %rather than \dq{distance (km)'s} which looks a bit odd (even though %it may be in the context of \dq{the distance (km) is measured between -%the two points} --- but in this instance it may be better not to +%the two points} --- but in this instance it would be better not to %use a contraction). % %Note also that all of the \term{link text} will be formatted according @@ -2558,9 +2645,11 @@ %glossaries appear when using the commands \cs{gls}, \cs{glspl} and their %uppercase variants. If you only %want the change to affect entries for a given glossary, then you need -%to use \DescribeMacro{\defglsdisplay}\cs{defglsdisplay} and -%\DescribeMacro{\defglsdisplayfirst}\cs{defglsdisplayfirst} instead -%of redefining \cs{glsdisplay} and \cs{glsdisplayfirst}. +%to use\\[10pt] +%\DescribeMacro{\defglsdisplay}\cs{defglsdisplay}\oarg{type}\marg{definition}\\[10pt] +%and\\[10pt] +%\DescribeMacro{\defglsdisplayfirst}\cs{defglsdisplayfirst}\oarg{type}\marg{definition}\\[10pt] +%instead of redefining \cs{glsdisplay} and \cs{glsdisplayfirst}. % %Both \cs{defglsdisplay} and \cs{defglsdisplayfirst} take two arguments: %the first (which is optional) is the glossary's label\footnote{\texttt{main} for the main @@ -2573,7 +2662,7 @@ % %For example, suppose you have created a new glossary called %\texttt{notation} and you want to change the way the entry is -%displayed on first use so that it includes the symbol, you can +%displayed on \firstuse\ so that it includes the symbol, you can %do: %\begin{verbatim} %\defglsdisplayfirst[notation]{#1#4 (denoted #3)} @@ -2714,8 +2803,7 @@ %The commands described in this section display entry details without %adding any information to the glossary. They don't use %\cs{glstextformat}, they don't have any optional arguments, -%they don't affect the flag that determines if the term has been -%used and, apart from \ics{glshyperlink}, they don't produce +%they don't affect the \firstuseflag\ and, apart from \ics{glshyperlink}, they don't produce %hyperlinks. %\par\vskip10pt\noindent %\DescribeMacro{\glsentryname}\cs{glsentryname}\marg{label}\\ @@ -2738,13 +2826,13 @@ %\par\vskip10pt\noindent %\DescribeMacro{\glsentryfirst}\cs{glsentryfirst}\marg{label}\\ %\DescribeMacro{\Glsentryfirst}\cs{Glsentryfirst}\marg{label}\par\vskip10pt\noindent -%These commands display the first use text for the glossary entry +%These commands display the \firstusetext\ for the glossary entry %given by \meta{label}, as specified by the \gloskey{first} key. %\cs{Glsentryfirst} makes the first letter uppercase. %\par\vskip10pt\noindent %\DescribeMacro{\glsentryfirstplural}\cs{glsentryfirstplural}\marg{label}\\ %\DescribeMacro{\Glsentryfirstplural}\cs{Glsentryfirstplural}\marg{label}\par\vskip10pt\noindent -%These commands display the plural form of the first use text for the +%These commands display the plural form of the \firstusetext\ for the %glossary entry given by \meta{label}, as specified by the %\gloskey{firstplural} key. \cs{Glsentryfirstplural} makes the first %letter uppercase. @@ -3029,7 +3117,7 @@ %\renewcommand*{\thepage}{\Numberstring{page}} %\end{verbatim} %This gets expanded to \verb|\protect \Numberstringnum |\marg{n} -%where \meta{n} is the page number. This means that you need to +%where \meta{n} is the Arabic page number. This means that you need to %define a new location that has that form: %\begin{verbatim} %\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space @@ -3067,8 +3155,9 @@ %\texttt{see} (cross-referenced entries). %This ordering can be changed using:\\[10pt] %\DescribeMacro{\GlsSetXdyLocationClassOrder} -%\cs{GlsSetXdyLocationClassOrder}\\[10pt] -%where each location name is delimited by double quote marks. +%\cs{GlsSetXdyLocationClassOrder}\marg{location names}\\[10pt] +%where each location name is delimited by double quote marks and +%separated by white space. %For example: %\begin{verbatim} %\GlsSetXdyLocationClassOrder{ @@ -3170,12 +3259,17 @@ %\texttt{acronym}, if the \pkgopt{acronym} option has been used, %otherwise it is set to \texttt{main}. % +%\begin{important} +%All glossaries must be defined before \ics{makeglossaries} to +%ensure that the relevant output files are opened. +%\end{important} +% %\subsection{Acronyms} %\label{sec:acronyms} % %\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 +%You may have noticed in \autoref{sec:newglosentry} that when you specify a new entry, you can specify alternate text to use when +%the term is first used\ifirstuse\ in the document. This provides a useful %means to define acronyms. For convenience, the \sty{glossaries} package %defines the command:\\[10pt] %\cs{newacronym}\oarg{key-val list}\marg{label}\marg{abbrv}\marg{long}\\[10pt] @@ -3222,7 +3316,7 @@ %firstplural={identification numbers (IDNs)}} %\end{verbatim} %so \verb|\gls{idn}| will produce \dq{identification number (IDN)} on -%first use and \dq{IDN} on subsequent uses. +%\firstuse\ and \dq{IDN} on subsequent uses. % %This section describes acronyms that have been defined using %\cs{newacronym}. If you prefer to define all your acronyms using @@ -3234,37 +3328,44 @@ %\autoref{sec:glsdisplay}). Likewise you should ignore the package option \pkgopt{shortcuts} %and 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 -%\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: +%\ics{newacronym}. +% +%If you use any of the package options \pkgopt{smallcaps}, +%\pkgopt{smaller}, \pkgopt{description} or +%\pkgopt{footnote}, the acronyms will be displayed in the document +%using:\\[10pt] +%\DescribeMacro{\acronymfont}\cs{acronymfont}\marg{text}\\[10pt] +%and\\[10pt] +%\DescribeMacro{\firstacronymfont}\cs{firstacronymfont}\marg{text}\\[10pt] +%where \cs{firstacronymfont} is applied on \firstuse\ and +%\cs{acronymfont} is applied on subsequent use. Note that if you +%don't use any of the above package options, changing the +%definition of \cs{acronymfont} or \cs{firstacronymfont} will have +%no effect. In this case, the recommended route is to use +%the \pkgopt{smaller} package option and redefine \cs{acronymfont} +%and \cs{firstacronymfont} as required. For example, if you want +%acronyms in a normal font on first use and emphasized on +%subsequent use, do: %\begin{verbatim} %\usepackage[smaller]{glossaries} +%\renewcommand*{\firstacronymfont}[1]{#1} %\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. +%(Note that it is for this reason that the \isty{relsize} package +%is not automatically loaded when selecting the +%\pkgopt{smaller} package option.) +% +%\Tableref{tab:acronymsettings} lists the package options that govern +%the acronym styles 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 +%\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. % %\begin{table}[htbp] %\caption{Package options governing \cs{newacronym} and how the @@ -3339,7 +3440,7 @@ %\newacronym[\glslongpluralkey={diagonal matrices}]{dm}{DM}{diagonal %matrix} %\end{verbatim} -%If the first use uses the plural form, \verb|\glspl{dm}| will +%If the \firstuse\ uses the plural form, \verb|\glspl{dm}| will %display: diagonal matrices (DMs). % %Each of the package options \pkgopt{smallcaps}, \pkgopt{smaller}, @@ -3353,7 +3454,7 @@ %glossary type. % %\begin{description} -%\item[\pkgopt{description},\pkgopt{footnote}]\mbox{}\par When these two package options are used together, the first use displays +%\item[\pkgopt{description},\pkgopt{footnote}]\mbox{}\par When these two package options are used together, the \firstuse\ displays %the entry as:\\[10pt] %\cs{firstacronymfont}\marg{abbrv}\meta{insert}\cs{footnote}\marg{long} %\\[10pt] @@ -3377,7 +3478,7 @@ % %\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 +%\pkgopt{smallcaps}. Both \firstuse\ and subsequent use displays the %entry in the form:\\[10pt] %\meta{long}\meta{insert}\\[10pt] %If the \pkgopt{description} package option is also used, the @@ -3394,7 +3495,7 @@ %short form (unless overridden by the \gloskey{sort} key in %the optional argument of \ics{newacronym}). % -%\item[\pkgopt{description}]\mbox{}\par This package option displays the entry on first use as:\\[10pt] +%\item[\pkgopt{description}]\mbox{}\par This package option displays the entry on \firstuse\ as:\\[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] @@ -3422,7 +3523,7 @@ %override this using the \gloskey{sort} key in the optional %argument to \ics{newacronym}. % -%\item[\pkgopt{footnote}]\mbox{}\par This package option displays the entry on first use as:\\[10pt] +%\item[\pkgopt{footnote}]\mbox{}\par This package option displays the entry on \firstuse\ as:\\[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}\\[10pt] @@ -3433,15 +3534,15 @@ %\ipkgopt[description]{sanitize}\verb|sanitize={description=false}|, so %remember to protect fragile commands when defining acronyms. % -%Note that on first use, it is the long form in the footnote that +%Note that on \firstuse, it is the long form in the footnote that %links to the relevant glossary entry (where hyperlinks are enabled), %whereas on subsequent use, the acronym links to the relevant %glossary entry. It is possible to change this to make the acronym -%on first use have the hyperlink instead of the footnote, but +%on \firstuse\ have the hyperlink instead of the footnote, but %since the footnote marker will also be a hyperlink, you will %have two hyperlinks in immediate succession. This can be %ambiguous where the hyperlinks are coloured rather than boxed. -%The code required to change the first use to make the +%The code required to change the \firstuse\ to make the %acronym a hyperlink is as follows: %\begin{verbatim} % \defglsdisplayfirst[\acronymtype]{% @@ -3453,11 +3554,10 @@ %(i.e.\ commands whose name contains an \verb|@| character), so %if this code is place in a \texttt{.tex} file it needs to be %placed within a \cs{makeatletter} \ldots\ \cs{makeatother} pair. -%(See \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=atsigns} -%for further details.) +%(See \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=atsigns} for further details.) % %\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] +%have been set, this option displays the entry on \firstuse\ as:\\[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] @@ -3475,7 +3575,7 @@ %remember to protect fragile commands when defining acronyms. % %\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] +%have been set, this option displays the entry on \firstuse\ as:\\[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] @@ -3495,7 +3595,7 @@ % %\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] +%then on \firstuse\ the entry is displayed as:\\[10pt] %\meta{long} (\meta{abbrv})\meta{insert}\\[10pt] %while subsequent use displays the entry as:\\[10pt] %\meta{abbrv}\meta{insert}\\[10pt] @@ -3517,7 +3617,7 @@ %\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert}\\ %\DescribeMacro{\ACRshort} %\cs{ACRshort}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%Print the abbreviated version with a hyperlink (if necessary) to the +%Print the abbreviated version with (if required) a hyperlink to the %relevant entry in the glossary. This is usually equivalent to %\ics{glstext} (or its uppercase variants) but may additionally %put the link text within the argument to \ics{acronymfont}. @@ -3528,7 +3628,7 @@ %\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert}\\ %\DescribeMacro{\ACRlong} %\cs{ACRlong}\oarg{options}\marg{label}\oarg{insert}\\[10pt] -%Print the long version with a hyperlink (if necessary) to the +%Print the long version with (if required) a hyperlink to the %relevant entry in the glossary. This is may be equivalent to %\ics{glsdesc}, \ics{glssymbol} or \ics{glsfirst} (or their uppercase %variants), depending on package options. @@ -3540,7 +3640,7 @@ %\DescribeMacro{\ACRfull} %\cs{ACRfull}\oarg{options}\marg{label}\oarg{insert}\\[10pt] %Print the long version followed by the abbreviation in brackets -%with a hyperlink (if necessary) to the +%with (if required) a hyperlink to the %relevant entry in the glossary. % %Note that if you change the definition of \ics{newacronym}, you @@ -3582,12 +3682,87 @@ %\end{table} % % +%\subsubsection{Upgrading From the glossary Package} +%Users of the obsolete \isty{glossary} package may recall that +%the syntax used to define new acronyms has changed with the +%replacement \sty{glossaries} package. In addition, the old +%\isty{glossary} package created the command +%\cs{}\meta{acr-name} when defining the acronym \meta{acr-name}. +% +%In order to facilitate migrating from the old package to the new +%one, the \isty{glossaries} package\footnote{as from version 1.18} +%provides the command:\\[10pt] +%\DescribeMacro{\oldacronym}\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list}\\[10pt] +%This uses the same syntax as the \isty{glossary} package's +%method of defining acronyms. It is equivalent to:\\[10pt] +%\ics{newacronym}\oarg{key-val list}\marg{label}\marg{abbrv}\marg{long}\\[10pt] +%In addition, \ics{oldacronym} also defines the commands +%\cs{}\meta{label}, which is equivalent to \ics{gls}\marg{label}, +%and \cs{}\meta{label}\texttt{*}, which is equivalent to +%\ics{Gls}\marg{label}. If \meta{label} is omitted, \meta{abbrv} +%is used. Since commands names must consist only of alphabetical +%characters, \meta{label} must also only consist of alphabetical +%characters. Note that \cs{}\meta{label} doesn't allow you to use +%the first optional argument of \ics{gls} or \ics{Gls} --- you will +%need to explicitly use \ics{gls} or \ics{Gls} to change the +%settings. +% +%\begin{important} +%Recall that, in general, \LaTeX\ ignores spaces following command +%names consisting of alphabetical characters. This is also true for +%\cs{}\meta{label} unless you additionally load the +%\isty{xspace} package. +%\end{important} +% +%The \isty{glossaries} package doesn't load the \isty{xspace} package +%since there are both advantages and disadvantages to using +%\ics{xspace} in \cs{}\meta{label}. If you don't use the +%\isty{xspace} package you need to explicitly force a space using +%\verb*"\ " (backslash space) however you can follow \cs{}\meta{label} +%with additional text in square brackets (the final optional +%argument to \ics{gls}). If you use the \isty{xspace} package +%you don't need to escape the spaces but you can't use +%the optional argument to insert text (you will have to explicitly +%use \ics{gls}). +% +%To illustrate this, suppose I define the acronym \dq{abc} as +%follows: +%\begin{verbatim} +%\oldacronym{abc}{example acronym}{} +%\end{verbatim} +%This will create the command \cs{abc} and its starred version +%\cs{abc*}. \Tableref{tab:xspace} illustrates the effect of +%\cs{abc} (on subsequent use) according to whether or not the +%\isty{xspace} package has been loaded. As can be seen from the +%final row in the table, the \isty{xspace} package prevents the +%optional argument from being recognised. +% +%\begin{table}[htbp] +%\caption[The effect of using xspace]{The effect of using +%\sty{xspace} with \cs{oldacronym}} +%\label{tab:xspace} +%\vskip\baselineskip +%\centering +%\begin{tabular}{lll} +%\bfseries Code & \bfseries With \sty{xspace} & +%\bfseries Without \sty{xspace}\\ +%\verb|\abc.| & abc. & abc.\\ +%\verb|\abc xyz| & abc xyz & abcxyz\\ +%\verb|\abc\ xyz| & abc xyz & abc xyz\\ +%\verb|\abc* xyz| & Abc xyz & Abc xyz\\ +%\verb|\abc['s] xyz| & abc ['s] xyz & abc's xyz +%\end{tabular} +%\par +%\end{table} +% +% %\subsection{Unsetting and Resetting Entry Flags} +%\label{sec:glsunset} % %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 +%entry\ifirstuse. Conversely, you may want to use the value given by the %\gloskey{text} key, even though you haven't used the glossary entry. %The former can be achieved by one of the following commands:\\[10pt] %\DescribeMacro{\glsreset}\cs{glsreset}\marg{label}\\ @@ -3596,7 +3771,21 @@ %\DescribeMacro{\glsunset}\cs{glsunset}\marg{label}\\ %\DescribeMacro{\glslocalunset}\cs{glslocalunset}\marg{label} %\\[10pt] -%You can determine whether an entry has been used using:\\[10pt] +%You can also reset or unset all entries for a given glossary or list of +%glossaries using:\\[10pt] +%\DescribeMacro{\glsresetall}\cs{glsresetall}\oarg{glossary list}\\ +%\DescribeMacro{\glslocalresetall}\cs{glslocalresetall}\oarg{glossary list}\\ +%\DescribeMacro{\glsunsetall}\cs{glsunsetall}\oarg{glossary list}\\ +%\DescribeMacro{\glslocalunsetall}\cs{glslocalunsetall}\oarg{glossary list}\\[10pt] +%where \meta{glossary list} is a comma-separated list of +%glossary labels. If omitted, all defined glossaries are assumed. +%For example, to reset all entries in the main glossary and the +%list of acronyms: +%\begin{verbatim} +%\glsresetall[main,acronym] +%\end{verbatim} +% +%You can determine whether an entry's first use flag is set using:\\[10pt] %\DescribeMacro{\ifglsused} %\cs{ifglsused}\marg{label}\marg{true part}\marg{false part}\\[10pt] %where \meta{label} is the label of the required entry. If the @@ -3612,8 +3801,114 @@ %so they display sub-entries in the same way as they display top %level entries; some styles are designed for homographs, so they %ignore the name for sub-entries. You should therefore pick a style -%that suits your type of glossary. -%The predefined styles are as follows: +%that suits your type of glossary. See \tableref{tab:styles} for +%a summary of the available styles. +% +%\begin{table}[htbp] +%\caption[Glossary Styles]{Glossary Styles. An asterisk in the style +%name indicates anything that matches that doesn't match any +%previously listed style (e.g.\ \texttt{long3col*} +%matches \glostyle{long3col}, \glostyle{long3colheader}, +%\glostyle{long3colborder} and \glostyle{long3colheaderborder}). +%A maximum level of 0 indicates a flat glossary (sub-entries +%are displayed in the same way as main entries). Where the maximum +%level is given as --- there is no limit, but note that +%\appname{makeindex} imposes a limit of 2 sub-levels. If the +%homograph column is checked, then the name is not displayed for +%sub-entries. If the symbol column is checked, then the symbol will +%be displayed if it has been defined.} +%\label{tab:styles} +%\vskip\baselineskip +%\centering +%\begin{tabular}{lccc} +%\bfseries Style & \bfseries Maximum Level & +%\bfseries Homograph & \bfseries Symbol\\ +%\ttfamily listdotted & 0 & & \\ +%\ttfamily sublistdotted & 1 & & \\ +%\ttfamily list* & 1 & \tick & \\ +%\ttfamily altlist* & 1 & \tick & \\ +%\ttfamily long3col* & 1 & \tick & \\ +%\ttfamily long4col* & 1 & \tick & \tick \\ +%\ttfamily altlong4col* & 1 & \tick & \tick \\ +%\ttfamily long* & 1 & \tick & \\ +%\ttfamily super3col* & 1 & \tick & \\ +%\ttfamily super4col* & 1 & \tick & \tick \\ +%\ttfamily altsuper4col* & 1 & \tick & \tick \\ +%\ttfamily super* & 1 & \tick & \\ +%\ttfamily index* & 2 & & \tick\\ +%\ttfamily treenoname* & --- & \tick & \tick\\ +%\ttfamily tree* & --- & & \tick\\ +%\ttfamily alttree* & --- & & \tick +%\end{tabular} +%\par +%\end{table} +% +%The glossary style can be set using the \pkgopt{style} package option +%or using the \gloskey[printglossary]{style} key in the optional +%argument to \ics{printglossary} or using the command:\\[10pt] +%\DescribeMacro{\glossarystyle}\cs{glossarystyle}\marg{style-name}\\[10pt] +%The tabular-like styles that allow multi-line descriptions and page +%lists use the length \DescribeMacro{\glsdescwidth}\cs{glsdescwidth} +%to set the width of the description column and the length +%\DescribeMacro{\glspagelistwidth}\cs{glspagelistwidth} to set the +%width of the page list column.\footnote{these lengths will not be +%available if you use both the \pkgopt{nolong} and \pkgopt{nosuper} +%package options or if you use the \pkgopt{nostyles} package option.} +%These will need to be changed using \cs{setlength} if the glossary +%is too wide. Note that the \glostyle{long4col} and +%\glostyle{super4col} styles (and their header and border variations) +%don't use these lengths as they are designed for single line +%entries. Instead you should use the analogous \glostyle{altlong4col} +%and \glostyle{altsuper4col} styles. If you want to +%explicitly create a line-break within a multi-line description in +%a tabular-like style you should use \ics{newline} instead of +%\verb|\\|. +% +%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} +%then 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 (\glostyle{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}, e.g.: +%\begin{verbatim} +%\glossarystyle{long} +%\renewcommand*{\glsgroupskip}{} +%\end{verbatim} +% +% \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 +%\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 +%will need to redefine \cs{glspostdescription} before the glossary is +%displayed. Alternatively, you can suppress it for a given entry +%by placing \ics{nopostdesc} in the entry's description. +% +%\subsubsection{List Styles} +%\label{sec:liststyles} +% +%The styles described in this section are all defined in the package +%\isty{glossary-list}. Since they all use the \envname{description} +%environment, they are governed by the same parameters as that +%environment. These styles all ignore the entry's symbol. Note that +%these styles will not be available if you use either the +%\pkgopt{nolist} or \pkgopt{nostyles} package options. % %\begin{description} %\item[list] The \glostyle{list} style uses the \envname{description} @@ -3631,7 +3926,7 @@ %\glostyle{listgroup} but has a navigation line at the start of %the glossary with links 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 line, each +%the group information is up to date. In the navigation line, each %group is separated %by \DescribeMacro{\glshypernavsep}\cs{glshypernavsep} which %defaults to a vertical bar with a space on either side. For example, @@ -3661,14 +3956,30 @@ %\glostyle{listhypergroup}, described above. % %\item[listdotted] This style uses the \envname{description} -%environment. Each entry starts with \verb|\item[]|, followed by the -%name followed by a dotted line, followed by the description. Note that -%this style ignores both the \term{number list} and the symbol. The -%length \DescribeMacro{\glslistdottedwidth}\cs{glslistdottedwidth} -%governs where the description should start.\footnote{This style was -%supplied by Axel~Menzel.} This is a flat style, so child +%environment.\footnote{This style was supplied by Axel~Menzel.} Each +%entry starts with \verb|\item[]|, followed by the name followed by a +%dotted line, followed by the description. Note that this style +%ignores both the \term{number list} and the symbol. The length +%\DescribeMacro{\glslistdottedwidth}\cs{glslistdottedwidth} governs +%where the description should start. This is a flat style, so child %entries are formatted in the same way as the parent entries. % +%\item[sublistdotted] This is a variation on the \glostyle{listdotted} +%style designed for hierarchical glossaries. The main entries +%have just the name displayed. The sub entries are displayed in +%the same manner as \glostyle{listdotted}. +%\end{description} +% +%\subsubsection{Longtable Styles} +%\label{sec:longstyles} +% +%The styles described in this section are all defined in the package +%\isty{glossary-long}. Since they all use the \envname{longtable} +%environment, they are governed by the same parameters as that +%environment. Note that these styles will not be available if you +%use either the \pkgopt{nolong} or \pkgopt{nostyles} package options. +% +%\begin{description} %\item[long] The \glostyle{long} style uses the \envname{longtable} %environment (defined by the \isty{longtable} package). It has two %columns: the first column contains the entry's name and the second @@ -3748,7 +4059,22 @@ %\item[altlong4colheaderborder] The \glostyle{altlong4colheaderborder} %style is like \glostyle{long4colheaderborder} but allows multi-line %descriptions and page lists. +%\end{description} +% +%\subsubsection{Supertabular Styles} +%\label{sec:superstyles} % +%The styles described in this section are all defined in the package +%\isty{glossary-super}. Since they all use the \envname{supertabular} +%environment, they are governed by the same parameters as that +%environment. Note that these styles will not be available if you +%use either the \pkgopt{nosuper} or \pkgopt{nostyles} package options. +%In general, the \envname{longtable} environment is better, but there +%are some circumstances where it is better to use +%\envname{supertabular}.\footnote{e.g.\ with the \isty{flowfram} +%package.} +% +%\begin{description} %\item[super] The \glostyle{super} style uses the \envname{supertabular} %environment (defined by the \isty{supertabular} package). It has two %columns: the first column contains the entry's name and the second @@ -3829,14 +4155,27 @@ %\item[altsuper4colheaderborder] The \glostyle{altsuper4colheaderborder} %style is like \glostyle{super4colheaderborder} but allows multi-line %descriptions and page lists. +%\end{description} % -%\item[index] The \glostyle{index} style is similar to the -%way indices are usually formatted in that it has a -%hierarchical structure up to three levels. The name is typeset in -%bold, and if the symbol is present it is set in parentheses after -%the name and before the description. Sub-entries are indented and -%also include the name, the symbol (if present) and the description. -%Groups are separated using \ics{indexspace}. +%\subsubsection{Tree-Like Styles} +%\label{sec:treestyles} +% +%The styles described in this section are all defined in the package +%\isty{glossary-tree}. These styles are designed for hierarchical +%glossaries but can also be used with glossaries that don't have +%sub-entries. These styles will display the entry's symbol if it +%exists. Note that these styles will not be available if you +%use either the \pkgopt{notree} or \pkgopt{nostyles} package options. +% +%\begin{description} +%\item[index] The \glostyle{index} style is similar to the way +%indices are usually formatted in that it has a hierarchical +%structure up to three levels (the main level plus two sub-levels). +%The name is typeset in bold, and if the symbol is present it is set +%in parentheses after the name and before the description. +%Sub-entries are indented and also include the name, the symbol +%in brackets (if present) and the description. Groups are separated +%using \ics{indexspace}. % %\item[indexgroup] The \glostyle{indexgroup} style is similar to %the \glostyle{index} style except that each group has a heading. @@ -3902,60 +4241,6 @@ % %\end{description} % -%The glossary style can be set using the \pkgopt{style} package option -%or using the \gloskey[printglossary]{style} key in the optional -%argument to \ics{printglossary} or using the command:\\[10pt] -%\DescribeMacro{\glossarystyle}\cs{glossarystyle}\marg{style-name}\\[10pt] -%The tabular-like styles that allow multi-line descriptions and page -%lists use the length \DescribeMacro{\glsdescwidth}\cs{glsdescwidth} to -%set the width of the description column and the length -%\DescribeMacro{\glspagelistwidth}\cs{glspagelistwidth} to set the -%width of the page list column. These will need to be changed using -%\cs{setlength} if the glossary is too wide. Note that the -%\glostyle{long4col} and \glostyle{super4col} styles (and their header and border -%variations) don't use these lengths as they are designed for single -%line entries. Instead you should use the analogous -%\glostyle{altlong4col} and \glostyle{altsuper4col} styles. -%Note that if you want to explicitly create a line-break within -%a multi-line description you should use \ics{newline} instead -%of \verb|\\|. -% -%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 (\glostyle{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}, e.g.: -%\begin{verbatim} -%\glossarystyle{long} -%\renewcommand*{\glsgroupskip}{} -%\end{verbatim} -% -% \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 -%\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 -%will need to redefine \cs{glspostdescription} before the glossary is -%displayed. Alternatively, you can suppress it for a given entry -%by placing \ics{nopostdesc} in the entry's description. -% % %\subsection{Defining your own glossary style} %\label{sec:newglossarystyle} @@ -3991,20 +4276,37 @@ % %\item %\DescribeMacro{\glsgroupheading} -%\cs{glsgroupheading}\marg{label}\par\noindent -%This macro indicates what to do at the start of each logical block -%within the main body of the glossary. The glossary is sub-divided into -%twenty-eight logical blocks that are determined by the first character -%of the \gloskey{sort} key (or \gloskey{name} key if the \gloskey{sort} -%key is omitted). The sub-divisions are in the following order: symbols, -%numbers, A, \ldots, Z\@. (This may be different if you use -%\appname{xindy}.) Note that the argument to \cs{glsgroupheading} +%\cs{glsgroupheading}\marg{label}\par\noindent This macro indicates +%what to do at the start of each logical block within the main body +%of the glossary. If you use \appname{makeindex} the glossary is +%sub-divided into a maximum of twenty-eight logical blocks that are +%determined by the first character of the \gloskey{sort} key (or +%\gloskey{name} key if the \gloskey{sort} key is omitted). The +%sub-divisions are in the following order: symbols, numbers, A, +%\ldots, Z\@. If you use \appname{xindy}, the sub-divisions depend on +%the language settings. +% +%Note that the argument to \cs{glsgroupheading} %is a label \emph{not} the group title. The group title can be obtained -%via \cs{glsgetgrouptitle}\marg{label}, and a navigation hypertarget can -%be created using \cs{glsnavhypertarget}\marg{label}. Most of the -%predefined glossary styles redefine \cs{glsgroupheading} to simply -%ignore its argument. The \glostyle{listhypergroup} style redefines -%\cs{glsgroupheading} as follows: +%via +% +%\DescribeMacro{\glsgetgrouptitle}\cs{glsgetgrouptitle}\marg{label} +% +%This obtains the title as follows: if +%\cs{}\meta{label}\texttt{groupname} exists, this is taken to be the +%title, otherwise the title is just \meta{label}. +% +%A navigation hypertarget can be created using +% +%\DescribeMacro{\glsnavhypertarget}\cs{glsnavhypertarget}\marg{label}\marg{text} +% +%For further details about \cs{glsnavhypertarget}, see +%\autoref{sec:code:hypernav}. +% +% +%Most of the predefined glossary styles redefine \cs{glsgroupheading} +%to simply ignore its argument. The \glostyle{listhypergroup} style +%redefines \cs{glsgroupheading} as follows: %\begin{verbatim} %\renewcommand*{\glsgroupheading}[1]{% %\item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]} @@ -4032,20 +4334,25 @@ %font for the entry name, regardless of the glossary style used. %Note that \meta{label} is the label used when the glossary entry %was defined via either \cs{newglossaryentry} or \cs{newacronym}. -%Each time you use a glossary entry it creates a -%link\footnote{if the document doesn't have hyperlinks enabled -%\cs{@glslink} ignores the label and simply typesets the text.} -%using \cs{@glslink}\marg{label}\marg{text} with the label -%\texttt{glo:}\meta{label}. Your -%new glossary style must therefore redefine \cs{glossaryentryfield} -%so that it uses \cs{@glstarget}\verb|{|\texttt{glo:}\meta{label}\verb|}|\marg{text} -%to ensure the hyperlinks function correctly.\footnote{again, if the -%document doesn't support hyperlinks, \cs{@glstarget} will ignore -%the label, and just typeset the text.} For example, the +% +%Each time you use a glossary entry it creates a hyperlink (if +%hyperlinks are enabled) to the relevant line in the glossary. +%Your new glossary style must therefore redefine +%\cs{glossaryentryfield} to set the appropriate target. This +%is done using +% +%\DescribeMacro{\glstarget}\cs{glstarget}\marg{label}\marg{text} +% +%where \meta{label} is the entry's label. Note that you +%don't need to worry about whether the \isty{hyperref} package has +%been loaded, as \cs{glstarget} won't create a target if +%\cs{hypertarget} hasn't been defined. +% +%For example, the %\glostyle{list} style defines \cs{glossaryentryfield} as follows: %\begin{verbatim} %\renewcommand*{\glossaryentryfield}[5]{% -%\item[\@glstarget{glo:##1}{##2}] ##3\glspostdescription\space ##5} +%\item[\glstarget{##1}{##2}] ##3\glspostdescription\space ##5} %\end{verbatim} % %Note also that \meta{number list} will always be of the form\\[10pt] @@ -4078,21 +4385,21 @@ %remaining arguments are analogous to those for %\ics{glossaryentryfield} described above. %\end{description} +% +%For further details of these commands, see +%\autoref{sec:code:printglos}. %\subsubsection{Example: creating a completely new style} % %If you want a completely new style, you will need to redefine all -%of the commands and environment listed above. You also need to -%take care when using internal commands (commands whose name -%contain the @ symbol). These should either be used in a \texttt{.sty} -%file or must be placed within \cs{makeatletter} and \cs{makeatother}. +%of the commands and the environment listed above. % %For example, suppose you want each entry to start with a bullet point. %This means that the glossary should be placed in the \envname{itemize} %environment, so \envname{theglossary} should start and end that %environment. Let's also suppose that you don't want anything between -%the glossary groups (so \cs{glsgroupheading} and \cs{glsgroupskip} +%the glossary groups (so \ics{glsgroupheading} and \ics{glsgroupskip} %should do nothing) and suppose you don't want anything to appear -%immediately after \verb|\begin{theglossary}| (so \cs{glossaryheader} +%immediately after \verb|\begin{theglossary}| (so \ics{glossaryheader} %should do nothing). In addition, let's suppose the symbol should %appear in brackets after the name, followed by the description and %last of all the \term{number list} should appear within square brackets @@ -4110,14 +4417,14 @@ % % set how each entry should appear: % \renewcommand*{\glossaryentryfield}[5]{% % \item % bullet point -% \@glstarget{glo:##1}{##2}% the entry name +% \glstarget{##1}{##2}% the entry name % \space (##4)% the symbol in brackets % \space ##3% the description % \space [##5]% the number list in square brackets % }% % % set how sub-entries appear: % \renewcommand*{\glossarysubentryfield}[6]{% -% \glossaryentryfield{#2}{#3}{#4}{#5}{#6}}% +% \glossaryentryfield{##2}{##3}{##4}{##5}{##6}}% % } %\end{verbatim} %Note that this style creates a flat glossary, where sub-entries @@ -4210,7 +4517,7 @@ %\end{verbatim} %(Remember that command names that contain the @ character must %either be placed in packages or be placed between \cs{makeatletter} -%\cs{makeatother}.) +%and \cs{makeatother}.) % % % \StopEventually{\clearpage\phantomsection\addcontentsline{toc}{section}{Index}\PrintIndex} @@ -4229,7 +4536,7 @@ % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2008/12/26 v1.17 (NLCT)] +\ProvidesPackage{glossaries}[2009/01/14 v1.18 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -4381,6 +4688,96 @@ false,nolabel,autolabel}[nolabel]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@loadlong} +%\changes{1.18}{2009 January 14}{new} +% \begin{macrocode} +\newcommand*{\@gls@loadlong}{\RequirePackage{glossary-long}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{nolong} +%\changes{1.18}{2009 January 14}{new} +% This option prevents \isty{glossary-long} from being loaded. +% This means that the glossary styles that use the +% \envname{longtable} environment will not be available. This option +% is provided to reduce overhead caused by loading unrequired +% packages. +% \begin{macrocode} +\DeclareOptionX{nolong}{\renewcommand*{\@gls@loadlong}{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@loadsuper} +%\changes{1.18}{2009 January 14}{new} +% The \isty{glossary-super} package isn't loaded if +% \isty{supertabular} isn't installed. +% \begin{macrocode} +\IfFileExists{supertabular.sty}{% + \newcommand*{\@gls@loadsuper}{\RequirePackage{glossary-super}}}{% + \newcommand*{\@gls@loadsuper}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{nosuper} +%\changes{1.18}{2009 January 14}{new} +% This option prevents \isty{glossary-super} from being loaded. +% This means that the glossary styles that use the +% \envname{supertabular} environment will not be available. This option +% is provided to reduce overhead caused by loading unrequired +% packages. +% \begin{macrocode} +\DeclareOptionX{nosuper}{\renewcommand*{\@gls@loadsuper}{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@loadlist} +%\changes{1.18}{2009 January 14}{new} +% \begin{macrocode} +\newcommand*{\@gls@loadlist}{\RequirePackage{glossary-list}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{nolist} +%\changes{1.18}{2009 January 14}{new} +% This option prevents \isty{glossary-list} from being loaded +% (to reduce overheads if required). Naturally, the styles defined +% in \isty{glossary-list} will not be available if this option +% is used. +% \begin{macrocode} +\DeclareOptionX{nolist}{\renewcommand*{\@gls@loadlist}{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@loadtree} +%\changes{1.18}{2009 January 14}{new} +% \begin{macrocode} +\newcommand*{\@gls@loadtree}{\RequirePackage{glossary-tree}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{notree} +%\changes{1.18}{2009 January 14}{new} +% This option prevents \isty{glossary-tree} from being loaded +% (to reduce overheads if required). Naturally, the styles defined +% in \isty{glossary-tree} will not be available if this option +% is used. +% \begin{macrocode} +\DeclareOptionX{notree}{\renewcommand*{\@gls@loadtree}{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{nostyles} +%\changes{1.18}{2009 January 14}{new} +% Provide an option to suppress all the predefined styles (in the +% event that the user has custom styles that are not dependent +% on the predefined styles). +% \begin{macrocode} +\DeclareOptionX{nostyles}{% + \renewcommand*{\@gls@loadlong}{}% + \renewcommand*{\@gls@loadsuper}{}% + \renewcommand*{\@gls@loadlist}{}% + \renewcommand*{\@gls@loadtree}{}% + \let\@glossary@default@style\relax +} +% \end{macrocode} +%\end{macro} +% % Keep track of the default glossary. This is initialised to % the main glossary, but can be changed if for some reason % you want to make a secondary glossary the main glossary. This @@ -5863,6 +6260,7 @@ exists}% % and \gloskey{description} key before they are sanitized). % % +%\begin{macro}{name} %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 @@ -5872,7 +6270,9 @@ exists}% \def\@glo@name{#1}% } % \end{macrocode} +%\end{macro} % +%\begin{macro}{description} % The \gloskey{description} key is usually only used in % the glossary, but can be made to appear in the text by redefining % \ics{glsdisplay} and \ics{glsdisplayfirst} (or @@ -5894,24 +6294,30 @@ exists}% \def\@glo@desc{#1}% } % \end{macrocode} -% \changes{1.12}{2008 Mar 8}{descriptionplural key added} +%\end{macro} +%\begin{macro}{descriptionplural} +% \changes{1.12}{2008 Mar 8}{new} % \begin{macrocode} \define@key{glossentry}{descriptionplural}{% \def\@glo@descplural{#1}% } % \end{macrocode} +%\end{macro} % +%\begin{macro}{sort} % The \gloskey{sort} key needs to be sanitized here % (the sort key is provided for \appname{makeindex}'s benefit, % not for use in the document). The \gloskey{sort} key is optional % when defining a new glossary entry. If omitted, the value % is given by \meta{name} \meta{description}. +%\changes{1.18}{2009 January 14}{moved sanitization to 'newglossaryentry} % \begin{macrocode} \define@key{glossentry}{sort}{% -\def\@glo@sort{#1}% -\@onelevel@sanitize\@glo@sort} +\def\@glo@sort{#1}} % \end{macrocode} +%\end{macro} % +%\begin{macro}{text} % The \gloskey{text} key determines how the term should appear when % used in the document (i.e.\ outside of the glossary). If omitted, % the value of the \gloskey{name} key is used instead. @@ -5920,7 +6326,9 @@ exists}% \def\@glo@text{#1}% } % \end{macrocode} +%\end{macro} % +%\begin{macro}{plural} % 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 \ics{glspluralsuffix} to the value of the @@ -5930,7 +6338,9 @@ exists}% \def\@glo@plural{#1}% } % \end{macrocode} +%\end{macro} % +%\begin{macro}{first} % The \gloskey{first} key determines how the entry should be displayed % in the document when it is first used. If omitted, it is taken % to be the same as the value of the \gloskey{text} key. @@ -5939,7 +6349,9 @@ exists}% \def\@glo@first{#1}% } % \end{macrocode} +%\end{macro} % +%\begin{macro}{firstplural} % 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 @@ -5949,7 +6361,9 @@ exists}% \def\@glo@firstplural{#1}% } % \end{macrocode} +%\end{macro} % +%\begin{macro}{symbol} % The \gloskey{symbol} key is ignored by most of the predefined % glossary styles, and defaults to \cs{relax} if omitted. % It is provided for glossary styles that require an associated @@ -5966,20 +6380,26 @@ exists}% \def\@glo@symbol{#1}% } % \end{macrocode} -% \changes{1.12}{2008 Mar 8}{symbolplural key added} +%\end{macro} +%\begin{macro}{symbolplural} +% \changes{1.12}{2008 Mar 8}{new} % \begin{macrocode} \define@key{glossentry}{symbolplural}{% \def\@glo@symbolplural{#1}% } % \end{macrocode} +%\end{macro} % +%\begin{macro}{type} % The \gloskey{type} key specifies to which glossary this % entry belongs. If omitted, the default glossary is used. % \begin{macrocode} \define@key{glossentry}{type}{% \def\@glo@type{#1}} % \end{macrocode} +%\end{macro} % +%\begin{macro}{counter} % The \gloskey{counter} key specifies the name of the counter % associated with this glossary entry: % \begin{macrocode} @@ -5989,23 +6409,36 @@ called `#1'}{The counter key should have the name of a valid counter as its value}}{% \def\@glo@counter{#1}}} % \end{macrocode} +%\end{macro} +% +%\begin{macro}{see} % The \gloskey{see} key specifies a list of cross-references +% \changes{1.17}{2008 December 26}{new} % \begin{macrocode} \define@key{glossentry}{see}{% \def\@glo@see{#1}} % \end{macrocode} +%\end{macro} +% +%\begin{macro}{parent} % The \gloskey{parent} key specifies the parent entry, if % required. +% \changes{1.17}{2008 December 26}{new} % \begin{macrocode} \define@key{glossentry}{parent}{% \def\@glo@parent{#1}} % \end{macrocode} +%\end{macro} +% +%\begin{macro}{nonumberlist} % The \gloskey{nonumberlist} key suppresses the number list % for the given entry. +% \changes{1.17}{2008 December 26}{new} % \begin{macrocode} \define@key{glossentry}{nonumberlist}[none]{% \def\@glo@prefix{\glsnonextpages}} % \end{macrocode} +%\end{macro} % %\begin{macro}{\@glsnoname} % \changes{1.17}{2008 December 26}{new} @@ -6025,6 +6458,14 @@ counter as its value}}{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsdefaultsort} +% Define command to set default sort. +% \changes{1.17}{2008 December 26}{new} +% \begin{macrocode} +\newcommand*{\@glsdefaultsort}{\@glo@name} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\gls@level} % Register to increment entry levels. % \begin{macrocode} @@ -6092,10 +6533,16 @@ counter as its value}}{% % \begin{macrocode} \let\@glo@firstplural\relax % \end{macrocode} +% Set the default sort: %\changes{1.05}{2007 Aug 10}{Changed the default value of the sort % key to just the value of the name key}% +%\changes{1.18}{2009 January 14}{Changed default value of sort +% to '@glsdefaultsort} +% \begin{macrocode} +\let\@glo@sort\@glsdefaultsort +% \end{macrocode} +% Set the default counter: % \begin{macrocode} -\def\@glo@sort{\@glo@name}% \def\@glo@counter{\@gls@getcounter{\@glo@type}}% % \end{macrocode} %\changes{1.17}{2008 December 26}{added see key} @@ -6236,6 +6683,18 @@ in it}}{% \@gls@sanitizedesc \expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}% \expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}% +% \end{macrocode} +% Sanitize sort value: +%\changes{1.18}{2009 January 14}{moved sort sanitization to +% 'newglossaryentry} +% \begin{macrocode} +\ifx\@glo@sort\@glsdefaultsort + \let\@glo@sort\@glo@name +\fi +\@onelevel@sanitize\@glo@sort +% \end{macrocode} +% Set the sort key for this entry: +% \begin{macrocode} \expandafter\protected@xdef\csname glo@#1@sort\endcsname{\@glo@sort}% % \end{macrocode} %\changes{1.15}{2008 August 15}{check for '@glo@text in symbol}% @@ -9533,7 +9992,7 @@ using \string\makeglossary}}} % \end{macrocode} %\end{macro} % -% \subsection{Displaying the glossary}\label{sec:printglos} +% \subsection{Displaying the glossary}\label{sec:code:printglos} % An individual glossary is displayed in the text using % \cs{printglossary}\oarg{key-val list}. If the % \gloskey[printglossary]{type} key is omitted, the default glossary is displayed. @@ -9782,7 +10241,17 @@ false,nolabel,autolabel}[nolabel]{% \newcommand*{\glossaryheader}{} % \end{macrocode} %\end{macro} -%\vskip5pt +% +%\begin{macro}{\glstarget} +%\changes{1.18}{2009 January 14}{new} +%\cs{glstarget}\marg{label}\marg{name}\\[10pt] +% Provide user interface to \cs{@glstarget} to make it easier to +% modify the glossary style in the document. +% \begin{macrocode} +\newcommand*{\glstarget}[2]{\@glstarget{glo:#1}{#2}} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glossaryentryfield} % \cs{glossaryentryfield}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list}\\[10pt] % This command governs how each entry row should be formatted @@ -9790,7 +10259,7 @@ false,nolabel,autolabel}[nolabel]{% % Most of the predefined styles ignore \meta{symbol}. % \begin{macrocode} \newcommand*{\glossaryentryfield}[5]{% -\@glstarget{glo:#1}{#2} #4 #3. #5\par} +\noindent\textbf{\glstarget{#1}{#2}} #4 #3. #5\par} % \end{macrocode} %\end{macro} %\begin{macro}{\glossaryentryfield} @@ -9802,14 +10271,17 @@ false,nolabel,autolabel}[nolabel]{% % be greater than or equal to 1.) % \begin{macrocode} \newcommand*{\glossarysubentryfield}[6]{% -\@glstarget{glo:#2}{}#4. #6\par} +\glstarget{#2}{\strut}#4. #6\par} % \end{macrocode} %\end{macro} % -% Within each glossary, the entries form 28 distinct groups +% Within each glossary, the entries form distinct groups % which are determined by the first character of the \gloskey{sort} -% key. There will be a maximum of 28 groups: symbols, numbers, -% and the 26 alphabetical groups A, \ldots, Z\@. +% key. When using \appname{makeindex}, there will be a maximum of 28 groups: symbols, numbers, +% and the 26 alphabetical groups A, \ldots, Z\@. If you use +% \appname{xindy} the groups will depend on whatever alphabet +% is used. This is determined by the language or custom +% alphabets can be created in the \appname{xindy} style file. % The command \cs{glsgroupskip} % specifies what to do between glossary groups. Glossary styles % must redefine this command. (Note that \cs{glsgroupskip} @@ -10148,6 +10620,47 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % 'newacronym in the preamble} %\end{macro} % +%\begin{macro}{\oldacronym} +%\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list}\\[10pt] +% This emulates the way the old \isty{glossary} package defined +% acronyms. It is equivalent to \ics{newacronym}\oarg{key-val +% list}\marg{label}\marg{abbrv}\marg{long} and it additionally +% defines the command \cs{}\meta{label} which is equivalent to +% \cs{gls}\marg{label} (thus \meta{label} must only contain +% alphabetical characters). If \meta{label} is omitted, \meta{abbrv} +% is used. This only emulates the syntax of the old \isty{glossary} +% package. The way the acronyms appear in the list of acronyms is +% determined by the definition of \ics{newacronym} and the +% glossary style. +% +% Note that \cs{}\meta{label} can't have an optional +% argument if the \isty{xspace} package is loaded. If +% \isty{xspace} hasn't been loaded then you can do +% \cs{}\meta{label}\oarg{insert} but you can't do +% \cs{}\meta{label}\oarg{key-val list}. For example if you define the +% acronym svm, then you can do "\svm['s]" but you can't do +% "\svm[format=textbf]". If the \isty{xspace} package is loaded, +% "\svm['s]" will appear as "svm ['s]" which is unlikely to be +% the desired result. In this case, you will need to use +% \cs{gls} explicitly, e.g.\ "\gls{svm}['s]". Note that it is +% up to the user to load \isty{xspace} if desired. +%\changes{1.18}{2009 January 14}{new} +% \begin{macrocode} +\newcommand{\oldacronym}[4][\gls@label]{% + \def\gls@label{#2}% + \newacronym[#4]{#1}{#2}{#3}% + \@ifundefined{xspace}{% + \expandafter\edef\csname#1\endcsname{% + \noexpand\@ifstar{\noexpand\Gls{#1}}{\noexpand\gls{#1}}}% + }{% + \expandafter\edef\csname#1\endcsname{% + \noexpand\@ifstar{\noexpand\Gls{#1}\noexpand\xspace}{% + \noexpand\gls{#1}\noexpand\xspace}}% + }% +} +% \end{macrocode} +%\end{macro} +% % Set up some convenient short cuts. These need to be changed if % \cs{newacronym} is changed (or if the \gloskey{description} key % is changed). @@ -11029,19 +11542,43 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \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: +% The \sty{glossaries} bundle comes with some predefined glossary +% styles. These need to be loaded now for the \pkgopt{style} option +% to use them. +% +% First, the glossary hyper-navigation commands need to be loaded. % \begin{macrocode} \RequirePackage{glossary-hypernav} -\RequirePackage{glossary-list} -\RequirePackage{glossary-long} -\RequirePackage{glossary-super} -\RequirePackage{glossary-tree} +% \end{macrocode} +% The styles that use list-like environments. These are not loaded +% if the \pkgopt{nolist} option is used: +% \begin{macrocode} +\@gls@loadlist +% \end{macrocode} +% The styles that use the \envname{longtable} environment. These are +% not loaded if the \pkgopt{nolong} package option is used. +% \begin{macrocode} +\@gls@loadlong +% \end{macrocode} +% The styles that use the \envname{supertabular} environment. These are +% not loaded if the \pkgopt{nosuper} package option is used or if +% the \isty{supertabular} package isn't installed. +% \begin{macrocode} +\@gls@loadsuper +% \end{macrocode} +% The tree-like styles. These are not loaded if the \pkgopt{notree} +% package option is used. +% \begin{macrocode} +\@gls@loadtree % \end{macrocode} % The default glossary style is set according to the \pkgopt{style} package -% option, but can be overridden by \ics{glossarystyle}. +% option, but can be overridden by \ics{glossarystyle}. The +% style must be defined at this point. % \begin{macrocode} -\glossarystyle{\@glossary@default@style} +\ifx\@glossary@default@style\relax +\else + \glossarystyle{\@glossary@default@style} +\fi % \end{macrocode} %\iffalse % \begin{macrocode} @@ -11150,6 +11687,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \end{macrocode} %\fi % \subsection{Glossary hyper-navigation definitions (glossary-hypernav package)} +%\label{sec:code:hypernav} % Package Definition: % \begin{macrocode} \ProvidesPackage{glossary-hypernav}[2007/07/04 v1.01 (NLCT)] @@ -11157,7 +11695,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % % The commands defined in this package are provided to % help navigate around the groups within a glossary -% (see \autoref{sec:printglos}.) +% (see \autoref{sec:code:printglos}.) % \ics{printglossary} (and \ics{printglossaries}) % set \cs{@glo@type} to the label of the current % glossary. This is used to create a unique hypertarget in @@ -11180,7 +11718,9 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \cs{glsnavhypertarget}\oarg{type}\marg{label}\marg{text}\\[10pt] % This command makes \meta{text} a hypertarget for the glossary group % whose label is given by \meta{label} in the glossary given -% by \meta{type}. +% by \meta{type}. If \meta{type} is omitted, \cs{@glo@type} is +% used which is set by \ics{printglossary} to the current +% glossary label. %\begin{macro}{\glsnavhypertarget} %\changes{1.14}{2008 June 17}{added write to aux file} %\changes{1.15}{2008 August 15}{added check if rerun required} @@ -11316,7 +11856,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \ics{item} command, it will appear in a bold font by % default. % \begin{macrocode} -\ProvidesPackage{glossary-list}[2008/12/11 v1.04 (NLCT)] +\ProvidesPackage{glossary-list}[2009/01/14 v1.05 (NLCT)] % \end{macrocode} %\begin{macro}{list} % The \glostyle{list} glossary style @@ -11329,14 +11869,34 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % style for the \sty{glossaries} package. % \begin{macrocode} \newglossarystyle{list}{% -\renewenvironment{theglossary}{\begin{description}}{\end{description}}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% -\renewcommand*{\glossaryentryfield}[5]{% -\item[\@glstarget{glo:##1}{##2}] ##3\glspostdescription\space ##5}% -\renewcommand*{\glossarysubentryfield}[6]{% -\@glstarget{glo:##2}{\strut}##4\glspostdescription\space ##6.}% -\renewcommand*{\glsgroupskip}{\indexspace}} +% \end{macrocode} +% Use \envname{description} environment: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{description}}{\end{description}}% +% \end{macrocode} +% No header at the start of the environment: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headings: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entries start a new item in the list: +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \item[\glstarget{##1}{##2}] ##3\glspostdescription\space ##5}% +% \end{macrocode} +% Sub-entries continue on the same line: +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + \glstarget{##2}{\strut}##4\glspostdescription\space ##6.}% +% \end{macrocode} +% Add vertical space between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{\indexspace}% +} % \end{macrocode} %\end{macro} % @@ -11346,8 +11906,14 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %\changes{1.08}{2007 Oct 13}{changed listgroup style to use \cs{glsgetgrouptitle}} % \begin{macrocode} \newglossarystyle{listgroup}{% -\glossarystyle{list}% -\renewcommand*{\glsgroupheading}[1]{\item[\glsgetgrouptitle{##1}]}} +% \end{macrocode} +% Base it on the \glostyle{list} style: +% \begin{macrocode} + \glossarystyle{list}% +% \end{macrocode} +% Each group has a heading: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{\item[\glsgetgrouptitle{##1}]}} % \end{macrocode} %\end{macro} % @@ -11357,11 +11923,20 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % start of the glossary. % \begin{macrocode} \newglossarystyle{listhypergroup}{% -\glossarystyle{list}% -\renewcommand*{\glossaryheader}{% -\item[\glsnavigation]}% -\renewcommand*{\glsgroupheading}[1]{% -\item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} +% \end{macrocode} +% Base it on the \glostyle{list} style: +% \begin{macrocode} + \glossarystyle{list}% +% \end{macrocode} +% Add navigation links at the start of the environment: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \item[\glsnavigation]}% +% \end{macrocode} +% Each group has a heading with a hypertarget: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} % \end{macrocode} %\end{macro} % @@ -11372,11 +11947,22 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % style does not use the entry's symbol. % \begin{macrocode} \newglossarystyle{altlist}{% -\glossarystyle{list}% -\renewcommand*{\glossaryentryfield}[5]{% -\item[\@glstarget{glo:##1}{##2}]\mbox{}\newline ##3\glspostdescription\space ##5}% -\renewcommand{\glossarysubentryfield}[6]{% -\par\@glstarget{glo:##2}{\strut}##4\glspostdescription\space ##6}% +% \end{macrocode} +% Base it on the \glostyle{list} style: +% \begin{macrocode} + \glossarystyle{list}% +% \end{macrocode} +% Main (level 0) entries start a new item in the list with a +% line break after the entry name: +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \item[\glstarget{##1}{##2}]\mbox{}\newline + ##3\glspostdescription\space ##5}% +% \end{macrocode} +% Sub-entries start a new paragraph: +% \begin{macrocode} + \renewcommand{\glossarysubentryfield}[6]{% + \par\glstarget{##2}{\strut}##4\glspostdescription\space ##6}% } % \end{macrocode} %\end{macro} @@ -11386,8 +11972,14 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% %\changes{1.08}{2007 Oct 13}{changed altlistgroup style to use \cs{glsgetgrouptitle}} % \begin{macrocode} \newglossarystyle{altlistgroup}{% -\glossarystyle{altlist}% -\renewcommand*{\glsgroupheading}[1]{\item[\glsgetgrouptitle{##1}]}} +% \end{macrocode} +% Base it on the \glostyle{altlist} style: +% \begin{macrocode} + \glossarystyle{altlist}% +% \end{macrocode} +% Each group has a heading: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{\item[\glsgetgrouptitle{##1}]}} % \end{macrocode} %\end{macro} % @@ -11397,11 +11989,20 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % set of links to the groups at the start of the glossary. % \begin{macrocode} \newglossarystyle{altlisthypergroup}{% -\glossarystyle{altlist}% -\renewcommand*{\glossaryheader}{% -\item[\glsnavigation]}% -\renewcommand*{\glsgroupheading}[1]{% -\item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} +% \end{macrocode} +% Base it on the \glostyle{altlist} style: +% \begin{macrocode} + \glossarystyle{altlist}% +% \end{macrocode} +% Add navigation links at the start of the environment: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \item[\glsnavigation]}% +% \end{macrocode} +% Each group has a heading with a hypertarget: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} % \end{macrocode} %\end{macro} % @@ -11415,13 +12016,22 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % entries. % \begin{macrocode} \newglossarystyle{listdotted}{% -\glossarystyle{list}% -\renewcommand*{\glossaryentryfield}[5]{% -\item[]\makebox[\glslistdottedwidth][l]{\@glstarget{glo:##1}{##2}% -\unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}% -\renewcommand*{\glossarysubentryfield}[6]{% -\item[]\makebox[\glslistdottedwidth][l]{\@glstarget{glo:##2}{##3}% -\unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##4}% +% \end{macrocode} +% Base it on the \glostyle{list} style: +% \begin{macrocode} + \glossarystyle{list}% +% \end{macrocode} +% Each main (level 0) entry starts a new item: +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \item[]\makebox[\glslistdottedwidth][l]{\glstarget{##1}{##2}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}% +% \end{macrocode} +% Sub entries have the same format as main entries: +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + \item[]\makebox[\glslistdottedwidth][l]{\glstarget{##2}{##3}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##4}% } % \end{macrocode} %\end{macro} @@ -11432,6 +12042,23 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \end{macrocode} %\end{macro} % +%\begin{macro}{sublistdotted} +% This style is similar to the glostyle{listdotted} style, except +% that the main entries just have the name displayed. +% \begin{macrocode} +\newglossarystyle{sublistdotted}{% +% \end{macrocode} +% Base it on the \glostyle{listdotted} style: +% \begin{macrocode} + \glossarystyle{listdotted}% +% \end{macrocode} +% Main (level 0) entries just display the name: +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \item[\glstarget{##1}{##2}]}% +} +% \end{macrocode} +%\end{macro} %\iffalse % \begin{macrocode} %</glossary-list.sty> @@ -11447,204 +12074,424 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % The glossary styles defined in the \isty{glossary-long} package % used the \envname{longtable} environment in the glossary. % \begin{macrocode} -\ProvidesPackage{glossary-long}[2008/12/11 v1.02 (NLCT)] +\ProvidesPackage{glossary-long}[2009/01/14 v1.03 (NLCT)] % \end{macrocode} % Requires the \isty{longtable} package: % \begin{macrocode} \RequirePackage{longtable} % \end{macrocode} -% This is a length that governs the width of the description column. %\begin{macro}{\glsdescwidth} +% This is a length that governs the width of the description column. +% (There's a chance that the user may specify \pkgopt{nolong} +% and then load \isty{glossary-long} later, in which case +% \cs{glsdescwidth} may have already been defined by +% \isty{glossary-super}. The same goes for \cs{glspagelistwidth}.) % \begin{macrocode} -\newlength\glsdescwidth +\@ifundefined{glsdescwidth}{% + \newlength\glsdescwidth + \setlength{\glsdescwidth}{0.6\linewidth} +}{} % \end{macrocode} %\end{macro} -% This is a length that governs the width of the page list column. +% %\begin{macro}{\glspagelistwidth} +% This is a length that governs the width of the page list column. % \begin{macrocode} -\newlength\glspagelistwidth +\@ifundefined{glspagelistwidth}{% + \newlength\glspagelistwidth + \setlength{\glspagelistwidth}{0.1\linewidth} +}{} % \end{macrocode} %\end{macro} -% Default values: -% \begin{macrocode} -\setlength{\glsdescwidth}{0.6\linewidth} -\setlength{\glspagelistwidth}{0.1\linewidth} -% \end{macrocode} % +%\begin{macro}{long} % The \glostyle{long} glossary style command which % uses the \envname{longtable} environment: % \begin{macrocode} \newglossarystyle{long}{% -\renewenvironment{theglossary}{\begin{longtable}{lp{\glsdescwidth}}}{% -\end{longtable}}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% -\renewcommand*{\glossaryentryfield}[5]{% -\@glstarget{glo:##1}{##2} & ##3\glspostdescription\space ##5\\}% -\renewcommand*{\glossarysubentryfield}[6]{% - & \@glstarget{glo:##2}{\strut}##4\glspostdescription\space ##6\\}% -\renewcommand*{\glsgroupskip}{ & \\}} % \end{macrocode} +% Use \envname{longtable} with two columns: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}}}% + {\end{longtable}}% +% \end{macrocode} +% Do nothing at the start of the environment: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No heading between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entries displayed in a row: +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% +% \end{macrocode} +% Sub entries displayed on the following row without the name: +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% +% \end{macrocode} +% Blank row between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{ & \\}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{longborder} % The \glostyle{longborder} style is like the above, but with horizontal and % vertical lines: % \begin{macrocode} \newglossarystyle{longborder}{% -\glossarystyle{long}% -\renewenvironment{theglossary}{% -\begin{longtable}{|l|p{\glsdescwidth}|}}{\end{longtable}}% -\renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% +% \end{macrocode} +% Base it on the glostyle{long} style: +% \begin{macrocode} + \glossarystyle{long}% +% \end{macrocode} +% Use \envname{longtable} with two columns with vertical lines +% between each column: +% \begin{macrocode} + \renewenvironment{theglossary}{% + \begin{longtable}{|l|p{\glsdescwidth}|}}{\end{longtable}}% +% \end{macrocode} +% Place horizontal lines at the head and foot of the table: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{longheader} % The \glostyle{longheader} style is like the % \glostyle{long} style but with a header: % \begin{macrocode} \newglossarystyle{longheader}{% -\glossarystyle{long}% -\renewcommand*{\glossaryheader}{% -\bfseries \entryname & \bfseries \descriptionname\\ -\endhead}} % \end{macrocode} +% Base it on the glostyle{long} style: +% \begin{macrocode} + \glossarystyle{long}% +% \end{macrocode} +% Set the table's header: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \bfseries \entryname & \bfseries \descriptionname\\\endhead}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{longheaderborder} % The \glostyle{longheaderborder} style is % like the \glostyle{long} style but with a header and border: % \begin{macrocode} \newglossarystyle{longheaderborder}{% -\glossarystyle{longborder}% -\renewcommand*{\glossaryheader}{% -\hline\bfseries \entryname & \bfseries \descriptionname\\\hline -\endhead -\hline\endfoot}} % \end{macrocode} +% Base it on the glostyle{longborder} style: +% \begin{macrocode} + \glossarystyle{longborder}% +% \end{macrocode} +% Set the table's header and add horizontal line to table's foot: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \hline\bfseries \entryname & \bfseries \descriptionname\\\hline + \endhead + \hline\endfoot}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{long3col} % The \glostyle{long3col} style is like \glostyle{long} but with 3 columns % \begin{macrocode} \newglossarystyle{long3col}{% -\renewenvironment{theglossary}{\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}{% -\end{longtable}}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% -\renewcommand*{\glossaryentryfield}[5]{% -\@glstarget{glo:##1}{##2} & ##3 & ##5\\}% -\renewcommand*{\glossarysubentryfield}[6]{% - & \@glstarget{glo:##2}{\strut}##4 & ##6\\}% -\renewcommand*{\glsgroupskip}{ & &\\}} % \end{macrocode} +% Use a \envname{longtable} with 3 columns: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{longtable}}% +% \end{macrocode} +% No table header: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No headings between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entries on a row (name in first column, +% description in second column, page list in last column): +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \glstarget{##1}{##2} & ##3 & ##5\\}% +% \end{macrocode} +% Sub-entries on a separate row (no name, description in +% second column, page list in third column): +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + & \glstarget{##2}{\strut}##4 & ##6\\}% +% \end{macrocode} +% Blank row between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{ & &\\}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{long3colborder} % The \glostyle{long3colborder} style is like the % \glostyle{long3col} style but with a border: % \begin{macrocode} \newglossarystyle{long3colborder}{% -\glossarystyle{long3col}% -\renewenvironment{theglossary}{% -\begin{longtable}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}{% -\end{longtable}}% -\renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% +% \end{macrocode} +% Base it on the glostyle{long3col} style: +% \begin{macrocode} + \glossarystyle{long3col}% +% \end{macrocode} +% Use a \envname{longtable} with 3 columns with vertical lines +% around them: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}% + {\end{longtable}}% +% \end{macrocode} +% Place horizontal lines at the head and foot of the table: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{long3colheader} % The \glostyle{long3colheader} style is like \glostyle{long3col} but with a header row: % \begin{macrocode} \newglossarystyle{long3colheader}{% -\glossarystyle{long3col}% -\renewcommand*{\glossaryheader}{% -\bfseries\entryname&\bfseries\descriptionname& -\bfseries\pagelistname\\\endhead}% +% \end{macrocode} +% Base it on the glostyle{long3col} style: +% \begin{macrocode} + \glossarystyle{long3col}% +% \end{macrocode} +% Set the table's header: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \bfseries\entryname&\bfseries\descriptionname& + \bfseries\pagelistname\\\endhead}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{long3colheaderborder} % The \glostyle{long3colheaderborder} style is like the above but with a border % \begin{macrocode} \newglossarystyle{long3colheaderborder}{% -\glossarystyle{long3colborder}% -\renewcommand*{\glossaryheader}{% -\hline -\bfseries\entryname&\bfseries\descriptionname& -\bfseries\pagelistname\\\hline\endhead -\hline\endfoot}% +% \end{macrocode} +% Base it on the glostyle{long3colborder} style: +% \begin{macrocode} + \glossarystyle{long3colborder}% +% \end{macrocode} +% Set the table's header and add horizontal line at table's foot: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \hline + \bfseries\entryname&\bfseries\descriptionname& + \bfseries\pagelistname\\\hline\endhead + \hline\endfoot}% } % \end{macrocode} -% The \glostyle{long4col} style has four columns where the third column contains the value of the associated \gloskey{symbol} key. +%\end{macro} +% +%\begin{macro}{long4col} +% The \glostyle{long4col} style has four columns where the third +% column contains the value of the associated \gloskey{symbol} key. % \begin{macrocode} \newglossarystyle{long4col}{% -\renewenvironment{theglossary}{% -\begin{longtable}{llll}}{% -\end{longtable}}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% -\renewcommand*{\glossaryentryfield}[5]{% -\@glstarget{glo:##1}{##2} & ##3 & ##4 & ##5\\}% -\renewcommand*{\glossarysubentryfield}[6]{% - & \@glstarget{glo:##2}{\strut}##4 & ##5 & ##6\\}% -\renewcommand*{\glsgroupskip}{ & & &\\}} % \end{macrocode} -% The \glostyle{long4colheader} style is like \glostyle{long4col} but with a header row. +% Use a \envname{longtable} with 4 columns: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{llll}}% + {\end{longtable}}% +% \end{macrocode} +% No table header: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headings: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entries on a single row (name in first column, +% description in second column, symbol in third column, page list +% in last column): +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% +% \end{macrocode} +% Sub entries on a single row with no name (description in second +% column, symbol in third column, page list in last column): +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + & \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% +% \end{macrocode} +% Blank row between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{ & & &\\}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{long4colheader} +% The \glostyle{long4colheader} style is like \glostyle{long4col} +% but with a header row. % \begin{macrocode} \newglossarystyle{long4colheader}{% -\glossarystyle{long4col}% -\renewcommand*{\glossaryheader}{% -\bfseries\entryname&\bfseries\descriptionname& -\bfseries \symbolname& -\bfseries\pagelistname\\\endhead}% +% \end{macrocode} +% Base it on the glostyle{long4col} style: +% \begin{macrocode} + \glossarystyle{long4col}% +% \end{macrocode} +% Table has a header: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \bfseries\entryname&\bfseries\descriptionname& + \bfseries \symbolname& + \bfseries\pagelistname\\\endhead}% } % \end{macrocode} -% The \glostyle{long4colborder} style is like \glostyle{long4col} but with a border. +%\end{macro} +% +%\begin{macro}{long4colborder} +% The \glostyle{long4colborder} style is like \glostyle{long4col} +% but with a border. % \begin{macrocode} \newglossarystyle{long4colborder}{% -\glossarystyle{long4col}% -\renewenvironment{theglossary}{% -\begin{longtable}{|l|l|l|l|}}{% -\end{longtable}}% -\renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% +% \end{macrocode} +% Base it on the glostyle{long4col} style: +% \begin{macrocode} + \glossarystyle{long4col}% +% \end{macrocode} +% Use a \envname{longtable} with 4 columns surrounded by vertical +% lines: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{|l|l|l|l|}}% + {\end{longtable}}% +% \end{macrocode} +% Add horizontal lines to the head and foot of the table: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} -% The \glostyle{long4colheaderborder} style is like the above but with a border. +%\end{macro} +% +%\begin{macro}{long4colheaderborder} +% The \glostyle{long4colheaderborder} style is like the above but +% with a border. % \begin{macrocode} \newglossarystyle{long4colheaderborder}{% -\glossarystyle{long4col}% -\renewenvironment{theglossary}{% -\begin{longtable}{|l|l|l|l|}}{% -\end{longtable}}% -\renewcommand*{\glossaryheader}{% -\hline\bfseries\entryname&\bfseries\descriptionname& -\bfseries \symbolname& -\bfseries\pagelistname\\\hline\endhead\hline\endfoot}% +% \end{macrocode} +% Base it on the glostyle{long4col} style: +% \begin{macrocode} + \glossarystyle{long4col}% +% \end{macrocode} +% Use a \envname{longtable} with 4 columns surrounded by vertical +% lines: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{|l|l|l|l|}}% + {\end{longtable}}% +% \end{macrocode} +% Add table header and horizontal line at the table's foot: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \hline\bfseries\entryname&\bfseries\descriptionname& + \bfseries \symbolname& + \bfseries\pagelistname\\\hline\endhead\hline\endfoot}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{altlong4col} % The \glostyle{altlong4col} style is like the \glostyle{long4col} % style but can have multiline descriptions and page lists. % \begin{macrocode} \newglossarystyle{altlong4col}{% -\glossarystyle{long4col}% -\renewenvironment{theglossary}{% -\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}}{% -\end{longtable}}% +% \end{macrocode} +% Base it on the glostyle{long4col} style: +% \begin{macrocode} + \glossarystyle{long4col}% +% \end{macrocode} +% Use a \envname{longtable} with 4 columns where the second and +% last columns may have multiple lines in each row: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}}% + {\end{longtable}}% } % \end{macrocode} -% The \glostyle{altlong4colheader} style is like \glostyle{altlong4col} -% but with a header row. +%\end{macro} +% +%\begin{macro}{altlong4colheader} +% The \glostyle{altlong4colheader} style is like +% \glostyle{altlong4col} but with a header row. % \begin{macrocode} \newglossarystyle{altlong4colheader}{% -\glossarystyle{long4colheader}% -\renewenvironment{theglossary}{% -\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}}{% -\end{longtable}}% +% \end{macrocode} +% Base it on the glostyle{long4colheader} style: +% \begin{macrocode} + \glossarystyle{long4colheader}% +% \end{macrocode} +% Use a \envname{longtable} with 4 columns where the second and +% last columns may have multiple lines in each row: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}}% + {\end{longtable}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{altlong4colborder} % The \glostyle{altlong4colborder} style is like % \glostyle{altlong4col} but with a border. % \begin{macrocode} \newglossarystyle{altlong4colborder}{% -\glossarystyle{long4colborder}% -\renewenvironment{theglossary}{% -\begin{longtable}{|l|p{\glsdescwidth}|l|p{\glspagewidthlist}|}}{% -\end{longtable}}% +% \end{macrocode} +% Base it on the glostyle{long4colborder} style: +% \begin{macrocode} + \glossarystyle{long4colborder}% +% \end{macrocode} +% Use a \envname{longtable} with 4 columns where the second and +% last columns may have multiple lines in each row: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}% + {\end{longtable}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{altlong4colheaderborder} % The \glostyle{altlong4colheaderborder} style is like the above but % with a header as well as a border. % \begin{macrocode} \newglossarystyle{altlong4colheaderborder}{% -\glossarystyle{long4colheaderborder}% -\renewenvironment{theglossary}{% -\begin{longtable}{|l|p{\glsdescwidth}|l|p{\glspagewidthlist}|}}{% -\end{longtable}}% +% \end{macrocode} +% Base it on the glostyle{long4colheaderborder} style: +% \begin{macrocode} + \glossarystyle{long4colheaderborder}% +% \end{macrocode} +% Use a \envname{longtable} with 4 columns where the second and +% last columns may have multiple lines in each row: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\begin{longtable}{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}% + {\end{longtable}}% } % \end{macrocode} +%\end{macro} %\iffalse % \begin{macrocode} %</glossary-long.sty> @@ -11659,216 +12506,460 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % The glossary styles defined in the \isty{glossary-super} package % use the \envname{supertabular} environment. % \begin{macrocode} -\ProvidesPackage{glossary-super}[2008/12/11 v1.02 (NLCT)] +\ProvidesPackage{glossary-super}[2009/01/14 v1.03 (NLCT)] % \end{macrocode} % Requires the \isty{supertabular} package: % \begin{macrocode} \RequirePackage{supertabular} % \end{macrocode} +%\begin{macro}{\glsdescwidth} +% This is a length that governs the width of the description column. +% This may already have been defined if \isty{glossary-long} +% has been loaded. +% \begin{macrocode} +\@ifundefined{glsdescwidth}{% + \newlength\glsdescwidth + \setlength{\glsdescwidth}{0.6\linewidth} +}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glspagelistwidth} +% This is a length that governs the width of the page list column. +% This may already have been defined if \isty{glossary-long} +% has been loaded. +% \begin{macrocode} +\@ifundefined{glspagelistwidth}{% + \newlength\glspagelistwidth + \setlength{\glspagelistwidth}{0.1\linewidth} +}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{super} % The \glostyle{super} glossary style uses the % \envname{supertabular} environment % (it uses lengths defined in the \isty{glossary-long} package.) % \begin{macrocode} \newglossarystyle{super}{% -\renewenvironment{theglossary}{% -\tablehead{}\tabletail{}% -\begin{supertabular}{lp{\glsdescwidth}}}{% -\end{supertabular}}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% -\renewcommand*{\glossaryentryfield}[5]{% -\@glstarget{glo:##1}{##2} & ##3\glspostdescription\space ##5\\}% -\renewcommand*{\glossarysubentryfield}[6]{% - & \@glstarget{glo:##2}{\strut}##4\glspostdescription\space ##6\\}% -\renewcommand*{\glsgroupskip}{ & \\}} % \end{macrocode} -% The \glostyle{superborder} style is like the above, but with horizontal and -% vertical lines: +% Put the glossary in a \envname{supertabular} environment with +% two columns and no head or tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}}}% + {\end{supertabular}}% +% \end{macrocode} +% Do nothing at the start of the table: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headings: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entries put in a row (name in first column, +% description and page list in second column): +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% +% \end{macrocode} +% Sub entries put in a row (no name, description and page list +% in second column): +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% +% \end{macrocode} +% Blank row between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{ & \\}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{superborder} +% The \glostyle{superborder} style is like the above, but with +% horizontal and vertical lines: % \begin{macrocode} \newglossarystyle{superborder}{% -\glossarystyle{super}% -\renewenvironment{theglossary}{% -\tablehead{\hline}\tabletail{\hline}% -\begin{supertabular}{|l|p{\glsdescwidth}|}}{\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super} style: +% \begin{macrocode} + \glossarystyle{super}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% two columns and a horizontal line in the head and tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\hline}\tabletail{\hline}% + \begin{supertabular}{|l|p{\glsdescwidth}|}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{superheader} % The \glostyle{superheader} style is like the % \glostyle{super} style, but with a header: % \begin{macrocode} \newglossarystyle{superheader}{% -\glossarystyle{super}% -\renewenvironment{theglossary}{% -\tablehead{\bfseries \entryname & \bfseries \descriptionname\\}% -\tabletail{}% -\begin{supertabular}{lp{\glsdescwidth}}}{\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super} style: +% \begin{macrocode} + \glossarystyle{super}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% two columns, a header and no tail: +% \begin{macrocode} +\renewenvironment{theglossary}% + {\tablehead{\bfseries \entryname & \bfseries \descriptionname\\}% + \tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{superheaderborder} % The \glostyle{superheaderborder} style is like % the \glostyle{super} style but with a header and border: % \begin{macrocode} \newglossarystyle{superheaderborder}{% -\glossarystyle{super}% -\renewenvironment{theglossary}{% -\tablehead{\hline\bfseries \entryname & \bfseries \descriptionname\\\hline}% -\tabletail{\hline} -\begin{supertabular}{|l|p{\glsdescwidth}|}}{\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super} style: +% \begin{macrocode} + \glossarystyle{super}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% two columns, a header and horizontal lines above and below the +% table: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\hline\bfseries \entryname & + \bfseries \descriptionname\\\hline}% + \tabletail{\hline} + \begin{supertabular}{|l|p{\glsdescwidth}|}}% + {\end{supertabular}}% } % \end{macrocode} -% The \glostyle{super3col} style is like the \glostyle{super} style, but with 3 columns: +%\end{macro} +% +%\begin{macro}{super3col} +% The \glostyle{super3col} style is like the \glostyle{super} +% style, but with 3 columns: % \begin{macrocode} \newglossarystyle{super3col}{% -\renewenvironment{theglossary}{% -\tablehead{}\tabletail{}% -\begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}{% -\end{supertabular}}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% -\renewcommand*{\glossaryentryfield}[5]{% -\@glstarget{glo:##1}{##2} & ##3 & ##5\\}% -\renewcommand*{\glossarysubentryfield}[6]{% - & \@glstarget{glo:##2}{\strut}##4 & ##6\\}% -\renewcommand*{\glsgroupskip}{ & &\\}} % \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% three columns and no head or tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{supertabular}}% +% \end{macrocode} +% Do nothing at the start of the table: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headings: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entries on a row (name in first column, +% description in second column, page list in last column): +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \glstarget{##1}{##2} & ##3 & ##5\\}% +% \end{macrocode} +% Sub entries on a row (no name, description in second column, +% page list in last column): +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + & \glstarget{##2}{\strut}##4 & ##6\\}% +% \end{macrocode} +% Blank row between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{ & &\\}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{super3colborder} % The \glostyle{super3colborder} style is like the % \glostyle{super3col} style, but with a border: % \begin{macrocode} \newglossarystyle{super3colborder}{% -\glossarystyle{super3col}% -\renewenvironment{theglossary}{% -\tablehead{\hline}\tabletail{\hline}% -\begin{supertabular}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super3col} style: +% \begin{macrocode} + \glossarystyle{super3col}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% three columns and a horizontal line in the head and tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\hline}\tabletail{\hline}% + \begin{supertabular}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{super3colheader} % The \glostyle{super3colheader} style is like % the \glostyle{super3col} style but with a header row: % \begin{macrocode} \newglossarystyle{super3colheader}{% -\glossarystyle{super3col}% -\renewenvironment{theglossary}{% -\tablehead{\bfseries\entryname&\bfseries\descriptionname& -\bfseries\pagelistname\\}\tabletail{}% -\begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super3col} style: +% \begin{macrocode} + \glossarystyle{super3col}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% three columns, a header and no tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\bfseries\entryname&\bfseries\descriptionname& + \bfseries\pagelistname\\}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{super3colheaderborder} % The \glostyle{super3colheaderborder} style is like % the \glostyle{super3col} style but with a header and border: % \begin{macrocode} \newglossarystyle{super3colheaderborder}{% -\glossarystyle{super3colborder}% -\renewenvironment{theglossary}{% -\tablehead{\hline -\bfseries\entryname&\bfseries\descriptionname& -\bfseries\pagelistname\\\hline}% -\tabletail{\hline}% -\begin{supertabular}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super3colborder} style: +% \begin{macrocode} + \glossarystyle{super3colborder}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% three columns, a header with horizontal lines and a horizontal +% line in the tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\hline + \bfseries\entryname&\bfseries\descriptionname& + \bfseries\pagelistname\\\hline}% + \tabletail{\hline}% + \begin{supertabular}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{super4col} % The \glostyle{super4col} glossary style has four columns, % where the third column contains the value of the % corresponding \gloskey{symbol} key used when that entry % was defined. % \begin{macrocode} \newglossarystyle{super4col}{% -\renewenvironment{theglossary}{% -\tablehead{}\tabletail{}% -\begin{supertabular}{llll}}{% -\end{supertabular}}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% -\renewcommand*{\glossaryentryfield}[5]{% -\@glstarget{glo:##1}{##2} & ##3 & ##4 & ##5\\}% -\renewcommand*{\glossarysubentryfield}[6]{% - & \@glstarget{glo:##2}{\strut}##4 & ##5 & ##6\\}% -\renewcommand*{\glsgroupskip}{ & & &\\}} % \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% four columns and no head or tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{llll}}{% + \end{supertabular}}% +% \end{macrocode} +% Do nothing at the start of the table: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headings: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entries on a row with the name in the first +% column, description in second column, symbol in third column +% and page list in last column: +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% +% \end{macrocode} +% Sub entries on a row with no name, the description in the second +% column, symbol in third column and page list in last column: +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + & \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% +% \end{macrocode} +% Blank row between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{ & & &\\}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{super4colheader} % The \glostyle{super4colheader} style is like % the \glostyle{super4col} but with a header row. % \begin{macrocode} \newglossarystyle{super4colheader}{% -\glossarystyle{super4col}% -\renewenvironment{theglossary}{% -\tablehead{\bfseries\entryname&\bfseries\descriptionname& -\bfseries\symbolname & -\bfseries\pagelistname\\}\tabletail{}% -\begin{supertabular}{llll}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super4col} style: +% \begin{macrocode} + \glossarystyle{super4col}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% four columns, a header and no tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\bfseries\entryname&\bfseries\descriptionname& + \bfseries\symbolname & + \bfseries\pagelistname\\}% + \tabletail{}% + \begin{supertabular}{llll}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{super4colborder} % The \glostyle{super4colborder} style is like % the \glostyle{super4col} but with a border. % \begin{macrocode} \newglossarystyle{super4colborder}{% -\glossarystyle{super4col}% -\renewenvironment{theglossary}{% -\tablehead{\hline}\tabletail{\hline}% -\begin{supertabular}{|l|l|l|l|}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super4col} style: +% \begin{macrocode} + \glossarystyle{super4col}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% four columns and a horizontal line in the head and tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\hline}\tabletail{\hline}% + \begin{supertabular}{|l|l|l|l|}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{super4colheaderborder} % The \glostyle{super4colheaderborder} style is like % the \glostyle{super4col} but with a header and border. % \begin{macrocode} \newglossarystyle{super4colheaderborder}{% -\glossarystyle{super4col}% -\renewenvironment{theglossary}{% -\tablehead{\hline\bfseries\entryname&\bfseries\descriptionname& -\bfseries\symbolname & -\bfseries\pagelistname\\}\tabletail{\hline}% -\begin{supertabular}{|l|l|l|l|}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super4col} style: +% \begin{macrocode} + \glossarystyle{super4col}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% four columns and a header bordered by horizontal lines and +% a horizontal line in the tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\hline\bfseries\entryname&\bfseries\descriptionname& + \bfseries\symbolname & + \bfseries\pagelistname\\\hline}\tabletail{\hline}% + \begin{supertabular}{|l|l|l|l|}}% + {\end{supertabular}}% } % \end{macrocode} -% The \glostyle{altsuper4col} glossary style is like \glostyle{super4col} -% but has provision for multiline descriptions. +%\end{macro} +% +%\begin{macro}{altsuper4col} +% The \glostyle{altsuper4col} glossary style is like +% \glostyle{super4col} but has provision for multiline descriptions. % \begin{macrocode} \newglossarystyle{altsuper4col}{% -\glossarystyle{super4col}% -\renewenvironment{theglossary}{% -\tablehead{}\tabletail{}% -\begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super4col} style: +% \begin{macrocode} + \glossarystyle{super4col}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% four columns and no head or tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{altsuper4colheader} % The \glostyle{altsuper4colheader} style is like % the \glostyle{altsuper4col} but with a header row. % \begin{macrocode} \newglossarystyle{altsuper4colheader}{% -\glossarystyle{super4colheader}% -\renewenvironment{theglossary}{% -\tablehead{\bfseries\entryname&\bfseries\descriptionname& -\bfseries\symbolname & -\bfseries\pagelistname\\}\tabletail{}% -\begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super4colheader} style: +% \begin{macrocode} + \glossarystyle{super4colheader}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% four columns, a header and no tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\bfseries\entryname&\bfseries\descriptionname& + \bfseries\symbolname & + \bfseries\pagelistname\\}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{altsuper4colborder} % The \glostyle{altsuper4colborder} style is like % the \glostyle{altsuper4col} but with a border. % \begin{macrocode} \newglossarystyle{altsuper4colborder}{% -\glossarystyle{super4colborder}% -\renewenvironment{theglossary}{% -\tablehead{\hline}\tabletail{\hline}% -\begin{supertabular}{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super4colborder} style: +% \begin{macrocode} + \glossarystyle{super4colborder}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% four columns and a horizontal line in the head and tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\hline}\tabletail{\hline}% + \begin{supertabular}% + {|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} +% +%\begin{macro}{altsuper4colheaderborder} % The \glostyle{altsuper4colheaderborder} style is like % the \glostyle{altsuper4col} but with a header and border. % \begin{macrocode} \newglossarystyle{altsuper4colheaderborder}{% -\glossarystyle{super4colheaderborder}% -\renewenvironment{theglossary}{% -\tablehead{\hline\bfseries\entryname&\bfseries\descriptionname& -\bfseries\symbolname & -\bfseries\pagelistname\\}\tabletail{\hline}% -\begin{supertabular}{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}{% -\end{supertabular}}% +% \end{macrocode} +% Base it on the glostyle{super4colheaderborder} style: +% \begin{macrocode} + \glossarystyle{super4colheaderborder}% +% \end{macrocode} +% Put the glossary in a \envname{supertabular} environment with +% four columns and a header bordered by horizontal lines and +% a horizontal line in the tail: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\tablehead{\hline + \bfseries\entryname & + \bfseries\descriptionname & + \bfseries\symbolname & + \bfseries\pagelistname\\\hline}% + \tabletail{\hline}% + \begin{supertabular}% + {|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}% + {\end{supertabular}}% } % \end{macrocode} +%\end{macro} %\iffalse % \begin{macrocode} %</glossary-super.sty> @@ -11884,7 +12975,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % that have a tree-like structure. These are designed for % hierarchical glossaries. % \begin{macrocode} -\ProvidesPackage{glossary-tree}[2008/12/11 v1.0 (NLCT)] +\ProvidesPackage{glossary-tree}[2009/01/14 v1.01 (NLCT)] % \end{macrocode} % %\begin{macro}{index} @@ -11898,34 +12989,64 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % levels. % \begin{macrocode} \newglossarystyle{index}{% -\renewenvironment{theglossary}{% -\setlength{\parindent}{0pt}% -\setlength{\parskip}{0pt plus 0.3pt}% -\let\item\@idxitem}{}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Set the paragraph indentation and skip and define \ics{item} +% to be the same as that used by \envname{theindex}: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\item\@idxitem}% + {}% +% \end{macrocode} +% Do nothing at the start of the environment: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headers: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entry starts a new item with the name in bold +% followed by the symbol in brackets (if it exists), the description +% and the page list. +% \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% -\item\textbf{\@glstarget{glo:##1}{##2}}% +\item\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% \fi \space ##3\glspostdescription \space ##5}% -\renewcommand*{\glossarysubentryfield}[6]{% - \ifcase##1\relax - \item - \or - \subitem - \else - \subsubitem - \fi - \textbf{\@glstarget{glo:##2}{##3}}% - \ifx\relax##5\relax - \else - \space(##5)% - \fi - \space##4\glspostdescription\space ##6}% -\renewcommand*{\glsgroupskip}{\indexspace}} +% \end{macrocode} +% Sub entries: level 1 entries use \ics{subitem}, levels greater +% than~1 use \ics{subsubitem}. The level ("##1") shouldn't be 0, +% as that's catered by \cs{glossaryentryfield}, but for completeness, +% if the level is 0, \ics{item} is used. The name is put in bold, +% followed by the symbol in brackets (if it exists), the description +% and the page list. +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + \ifcase##1\relax + % level 0 + \item + \or + % level 1 + \subitem + \else + % all other levels + \subsubitem + \fi + \textbf{\glstarget{##2}{##3}}% + \ifx\relax##5\relax + \else + \space(##5)% + \fi + \space##4\glspostdescription\space ##6}% +% \end{macrocode} +% Vertical gap between groups is the same as that used by indices: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{\indexspace}} % \end{macrocode} %\end{macro} % @@ -11934,9 +13055,17 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % style but has headings. % \begin{macrocode} \newglossarystyle{indexgroup}{% -\glossarystyle{index}% -\renewcommand*{\glsgroupheading}[1]{% - \item\textbf{\glsgetgrouptitle{##1}}\indexspace}} +% \end{macrocode} +% Base it on the glostyle{index} style: +% \begin{macrocode} + \glossarystyle{index}% +% \end{macrocode} +% Add a heading for each group. This puts the group's title in +% bold followed by a vertical gap. +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \item\textbf{\glsgetgrouptitle{##1}}\indexspace}% +} % \end{macrocode} %\end{macro} % @@ -11945,12 +13074,23 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \glostyle{indexgroup} style but has hyper navigation. % \begin{macrocode} \newglossarystyle{indexhypergroup}{% -\glossarystyle{index}% -\renewcommand*{\glossaryheader}{% -\item\textbf{\glsnavigation}\indexspace}% -\renewcommand*{\glsgroupheading}[1]{% -\item\textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% -\indexspace}} +% \end{macrocode} +% Base it on the glostyle{index} style: +% \begin{macrocode} + \glossarystyle{index}% +% \end{macrocode} +% Put navigation links to the groups at the start of the glossary: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \item\textbf{\glsnavigation}\indexspace}% +% \end{macrocode} +% Add a heading for each group (with a target). The group's title is +% in bold followed by a vertical gap. +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \item\textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \indexspace}% +} % \end{macrocode} %\end{macro} % @@ -11960,31 +13100,54 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % can have arbitrary levels. % \begin{macrocode} \newglossarystyle{tree}{% -\renewenvironment{theglossary}{% -\setlength{\parindent}{0pt}% -\setlength{\parskip}{0pt plus 0.3pt}% -}{}% -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% -\renewcommand{\glossaryentryfield}[5]{% - \hangindent0pt\relax - \parindent0pt\relax - \textbf{\@glstarget{glo:##1}{##2}}% - \ifx\relax##4\relax - \else - \space(##4)% - \fi - \space ##3\glspostdescription \space ##5\par}% -\renewcommand{\glossarysubentryfield}[6]{% - \hangindent##1\glstreeindent\relax - \parindent##1\glstreeindent\relax - \textbf{\@glstarget{glo:##2}{##3}}% - \ifx\relax##5\relax - \else - \space(##5)% - \fi - \space##4\glspostdescription\space ##6\par}% -\renewcommand*{\glsgroupskip}{\indexspace}} +% \end{macrocode} +% Set the paragraph indentation and skip: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}}% + {}% +% \end{macrocode} +% Do nothing at the start of the \envname{theglossary} environment: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headings: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Main (level 0) entries: name in bold, followed by symbol in +% brackets (if it exists), the description and the page list: +% \begin{macrocode} + \renewcommand{\glossaryentryfield}[5]{% + \hangindent0pt\relax + \parindent0pt\relax + \textbf{\glstarget{##1}{##2}}% + \ifx\relax##4\relax + \else + \space(##4)% + \fi + \space ##3\glspostdescription \space ##5\par}% +% \end{macrocode} +% Sub entries: level \meta{n} is indented by \meta{n} times +% \ics{glstreeindent}. The name is in bold, followed by the +% symbol in brackets (if it exists), the description and the +% page list. +% \begin{macrocode} + \renewcommand{\glossarysubentryfield}[6]{% + \hangindent##1\glstreeindent\relax + \parindent##1\glstreeindent\relax + \textbf{\glstarget{##2}{##3}}% + \ifx\relax##5\relax + \else + \space(##5)% + \fi + \space##4\glspostdescription\space ##6\par}% +% \end{macrocode} +% Vertical gap between groups is the same as that used by +% indices: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{\indexspace}} % \end{macrocode} %\end{macro} % @@ -11993,9 +13156,16 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % headings. % \begin{macrocode} \newglossarystyle{treegroup}{% -\glossarystyle{tree}% -\renewcommand{\glsgroupheading}[1]{\par -\noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}} +% \end{macrocode} +% Base it on the glostyle{tree} style: +% \begin{macrocode} + \glossarystyle{tree}% +% \end{macrocode} +% Each group has a heading (in bold) followed by a vertical gap): +% \begin{macrocode} + \renewcommand{\glsgroupheading}[1]{\par + \noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}% +} % \end{macrocode} %\end{macro} % @@ -12005,13 +13175,25 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % start of the glossary. % \begin{macrocode} \newglossarystyle{treehypergroup}{% -\glossarystyle{tree}% -\renewcommand*{\glossaryheader}{% -\par\noindent\textbf{\glsnavigation}\par\indexspace}% -\renewcommand*{\glsgroupheading}[1]{% -\par\noindent -\textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par -\indexspace}} +% \end{macrocode} +% Base it on the glostyle{tree} style: +% \begin{macrocode} + \glossarystyle{tree}% +% \end{macrocode} +% Put navigation links to the groups at the start of the +% \envname{theglossary} environment: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \par\noindent\textbf{\glsnavigation}\par\indexspace}% +% \end{macrocode} +% Each group has a heading (in bold with a target) followed by a +% vertical gap): +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \indexspace}% +} % \end{macrocode} %\end{macro} % @@ -12030,27 +13212,50 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % doesn't print the name or symbol for sub-levels. % \begin{macrocode} \newglossarystyle{treenoname}{% -\renewenvironment{theglossary}{% -\setlength{\parindent}{0pt}% -\setlength{\parskip}{0pt plus 0.3pt}% -}{}% -\renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% Set the paragraph indentation and skip: +% \begin{macrocode} + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}}% + {}% +% \end{macrocode} +% No header: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headings: +% \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% -\renewcommand{\glossaryentryfield}[5]{% - \hangindent0pt\relax - \parindent0pt\relax - \textbf{\@glstarget{glo:##1}{##2}}% - \ifx\relax##4\relax - \else - \space(##4)% - \fi - \space ##3\glspostdescription \space ##5\par}% -\renewcommand{\glossarysubentryfield}[6]{% - \hangindent##1\glstreeindent\relax - \parindent##1\glstreeindent\relax - \textbf{\@glstarget{glo:##2}{\strut}}% - ##4\glspostdescription\space ##6\par}% -\renewcommand*{\glsgroupskip}{\indexspace}} +% \end{macrocode} +% Main (level 0) entries: the name is in bold, followed by the +% symbol in brackets (if it exists), the description and the +% page list. +% \begin{macrocode} + \renewcommand{\glossaryentryfield}[5]{% + \hangindent0pt\relax + \parindent0pt\relax + \textbf{\glstarget{##1}{##2}}% + \ifx\relax##4\relax + \else + \space(##4)% + \fi + \space ##3\glspostdescription \space ##5\par}% +% \end{macrocode} +% Sub entries: level \meta{n} is indented by \meta{n} times +% \ics{glstreeindent}. The name and symbol are omitted. The +% description followed by the page list are displayed. +% \begin{macrocode} + \renewcommand{\glossarysubentryfield}[6]{% + \hangindent##1\glstreeindent\relax + \parindent##1\glstreeindent\relax + \glstarget{##2}{\strut}% + ##4\glspostdescription\space ##6\par}% +% \end{macrocode} +% Vertical gap between groups is the same as that used by indices: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{\indexspace}% +} % \end{macrocode} %\end{macro} % @@ -12059,9 +13264,16 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % headings. % \begin{macrocode} \newglossarystyle{treenonamegroup}{% -\glossarystyle{treenoname}% -\renewcommand{\glsgroupheading}[1]{\par -\noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}} +% \end{macrocode} +% Base it on the glostyle{treenoname} style: +% \begin{macrocode} + \glossarystyle{treenoname}% +% \end{macrocode} +% Give each group a heading: +% \begin{macrocode} + \renewcommand{\glsgroupheading}[1]{\par + \noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}% +} % \end{macrocode} %\end{macro} % @@ -12071,13 +13283,25 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % start of the glossary. % \begin{macrocode} \newglossarystyle{treenonamehypergroup}{% -\glossarystyle{treenoname}% -\renewcommand*{\glossaryheader}{% -\par\noindent\textbf{\glsnavigation}\par\indexspace}% -\renewcommand*{\glsgroupheading}[1]{% -\par\noindent -\textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par -\indexspace}} +% \end{macrocode} +% Base it on the glostyle{treenoname} style: +% \begin{macrocode} + \glossarystyle{treenoname}% +% \end{macrocode} +% Put navigation links to the groups at the start of the +% \envname{theglossary} environment: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \par\noindent\textbf{\glsnavigation}\par\indexspace}% +% \end{macrocode} +% Each group has a heading (in bold with a target) followed by a +% vertical gap): +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \indexspace}% +} % \end{macrocode} %\end{macro} % @@ -12110,135 +13334,141 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % \end{macrocode} % Redefine \envname{theglossary} environment. % \begin{macrocode} -\renewenvironment{theglossary}{% -\def\@gls@prevlevel{-1}% -\mbox{}\par}{\par}% + \renewenvironment{theglossary}% + {\def\@gls@prevlevel{-1}% + \mbox{}\par}% + {\par}% % \end{macrocode} % Set the header and group headers to nothing. % \begin{macrocode} -\renewcommand*{\glossaryheader}{}% -\renewcommand*{\glsgroupheading}[1]{}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Redefine the way that the level~0 entries are displayed. % \begin{macrocode} -\renewcommand{\glossaryentryfield}[5]{% + \renewcommand{\glossaryentryfield}[5]{% % \end{macrocode} % If the level hasn't changed, keep the same settings, otherwise % change \cs{glstreeindent} accordingly. % \begin{macrocode} - \ifnum\@gls@prevlevel=0\relax - \else + \ifnum\@gls@prevlevel=0\relax + \else % \end{macrocode} % Find out how big the indentation should be by measuring the % widest entry. % \begin{macrocode} - \settowidth{\glstreeindent}{\textbf{\@glswidestname\space}}% + \settowidth{\glstreeindent}{\textbf{\@glswidestname\space}}% % \end{macrocode} % Set the hangindent and paragraph indent. % \begin{macrocode} - \hangindent\glstreeindent - \parindent\glstreeindent - \fi + \hangindent\glstreeindent + \parindent\glstreeindent + \fi % \end{macrocode} % Put the name to the left of the paragraph block. % \begin{macrocode} - \makebox[0pt][r]{\makebox[\glstreeindent][l]{% - \textbf{\@glstarget{glo:##1}{##2}}}}% + \makebox[0pt][r]{\makebox[\glstreeindent][l]{% + \textbf{\glstarget{##1}{##2}}}}% % \end{macrocode} % If the symbol is missing, ignore it, otherwise put it in % brackets. % \begin{macrocode} - \ifx\relax##4\relax - \else - (##4)\space - \fi + \ifx\relax##4\relax + \else + (##4)\space + \fi % \end{macrocode} % Do the description followed by the description terminator and % location list. % \begin{macrocode} - ##3\glspostdescription \space ##5\par + ##3\glspostdescription \space ##5\par % \end{macrocode} % Set the previous level to 0. % \begin{macrocode} - \def\@gls@prevlevel{0}% -}% + \def\@gls@prevlevel{0}% + }% % \end{macrocode} % Redefine the way sub-entries are displayed. % \begin{macrocode} -\renewcommand{\glossarysubentryfield}[6]{% + \renewcommand{\glossarysubentryfield}[6]{% % \end{macrocode} % If the level hasn't changed, keep the same settings, otherwise % adjust \cs{glstreeindent} accordingly. % \begin{macrocode} - \ifnum\@gls@prevlevel=##1\relax - \else + \ifnum\@gls@prevlevel=##1\relax + \else % \end{macrocode} % Compute the widest entry for this level, or for level~0 if not % defined for this level. Store in \cs{gls@tmplen} % \begin{macrocode} - \@ifundefined{@glswidestname\romannumeral##1}{% - \settowidth{\gls@tmplen}{\textbf{\@glswidestname\space}}}{% - \settowidth{\gls@tmplen}{\textbf{% - \csname @glswidestname\romannumeral##1\endcsname\space}}}% + \@ifundefined{@glswidestname\romannumeral##1}{% + \settowidth{\gls@tmplen}{\textbf{\@glswidestname\space}}}{% + \settowidth{\gls@tmplen}{\textbf{% + \csname @glswidestname\romannumeral##1\endcsname\space}}}% % \end{macrocode} % Determine if going up or down a level % \begin{macrocode} - \ifnum\@gls@prevlevel<##1\relax + \ifnum\@gls@prevlevel<##1\relax % \end{macrocode} % Depth has increased, so add the width of the widest entry to % \cs{glstreeindent}. % \begin{macrocode} - \setlength\glstreeindent\gls@tmplen - \addtolength\glstreeindent\parindent - \parindent\glstreeindent - \else + \setlength\glstreeindent\gls@tmplen + \addtolength\glstreeindent\parindent + \parindent\glstreeindent + \else % \end{macrocode} % Depth has decreased, so subtract width of the widest entry % from the previous level to \cs{glstreeindent}. First % determine the width of the widest entry for the previous level % and store in \cs{glstreeindent}. % \begin{macrocode} - \@ifundefined{@glswidestname\romannumeral\@gls@prevlevel}{% - \settowidth{\glstreeindent}{\textbf{% - \@glswidestname\space}}}{% - \settowidth{\glstreeindent}{\textbf{% - \csname @glswidestname\romannumeral\@gls@prevlevel - \endcsname\space}}}% + \@ifundefined{@glswidestname\romannumeral\@gls@prevlevel}{% + \settowidth{\glstreeindent}{\textbf{% + \@glswidestname\space}}}{% + \settowidth{\glstreeindent}{\textbf{% + \csname @glswidestname\romannumeral\@gls@prevlevel + \endcsname\space}}}% % \end{macrocode} % Subtract this length from the previous level's paragraph indent % and set to \cs{glstreeindent}. % \begin{macrocode} - \addtolength\parindent{-\glstreeindent}% - \setlength\glstreeindent\parindent + \addtolength\parindent{-\glstreeindent}% + \setlength\glstreeindent\parindent + \fi \fi - \fi % \end{macrocode} % Set the hanging indentation. % \begin{macrocode} - \hangindent\glstreeindent + \hangindent\glstreeindent % \end{macrocode} % Put the name to the left of the paragraph block % \begin{macrocode} - \makebox[0pt][r]{\makebox[\gls@tmplen][l]{% - \textbf{\@glstarget{glo:##2}{##3}}}}% + \makebox[0pt][r]{\makebox[\gls@tmplen][l]{% + \textbf{\glstarget{##2}{##3}}}}% % \end{macrocode} % If the symbol is missing, ignore it, otherwise put it in % brackets. % \begin{macrocode} - \ifx##5\relax\relax - \else - (##5)\space - \fi + \ifx##5\relax\relax + \else + (##5)\space + \fi % \end{macrocode} % Do the description followed by the description terminator and % location list. % \begin{macrocode} - ##4\glspostdescription\space ##6\par + ##4\glspostdescription\space ##6\par % \end{macrocode} % Set the previous level macro to the current level. % \begin{macrocode} - \def\@gls@prevlevel{##1}}% -\renewcommand*{\glsgroupskip}{\indexspace}} + \def\@gls@prevlevel{##1}% + }% +% \end{macrocode} +% Vertical gap between groups is the same as that used by indices: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{\indexspace}% +} % \end{macrocode} %\end{macro} % @@ -12247,12 +13477,19 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % headings. % \begin{macrocode} \newglossarystyle{alttreegroup}{% -\glossarystyle{alttree}% -\renewcommand{\glsgroupheading}[1]{\par -\def\@gls@prevlevel{-1}% -\hangindent0pt\relax -\parindent0pt\relax -\textbf{\glsgetgrouptitle{##1}}\par\indexspace}} +% \end{macrocode} +% Base it on the glostyle{alttree} style: +% \begin{macrocode} + \glossarystyle{alttree}% +% \end{macrocode} +% Give each group a heading. +% \begin{macrocode} + \renewcommand{\glsgroupheading}[1]{\par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \textbf{\glsgetgrouptitle{##1}}\par\indexspace}% +} % \end{macrocode} %\end{macro} % @@ -12262,7 +13499,10 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % groups at the start of the glossary. % \begin{macrocode} \newglossarystyle{alttreehypergroup}{% -\glossarystyle{alttree}% +% \end{macrocode} +% Base it on the glostyle{alttree} style: +% \begin{macrocode} + \glossarystyle{alttree}% % \end{macrocode} % Put the navigation links in the header % \begin{macrocode} @@ -12303,7 +13543,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% % support is required, but the \isty{translator} package is not loaded. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-babel}[2008/12/11 v1.01 (NLCT)] +\ProvidesPackage{glossaries-babel}[2009/01/14 v1.02 (NLCT)] % \end{macrocode} % English: % \begin{macrocode} @@ -12353,7 +13593,7 @@ firstplural={\@glo@descplural\space (\@glo@plural)},% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% -}% +}}% \@ifundefined{captionscanadian}{}{% \addto\captionscanadian{% \renewcommand*{\glossaryname}{Glossary}% @@ -14127,7 +15367,7 @@ Another \gls{ident} entry. \documentclass{report} \usepackage[colorlinks]{hyperref} -\usepackage[style=alttreehypergroup]{glossaries} +\usepackage[style=alttreehypergroup,nolong,nosuper]{glossaries} % The alttree type of glossary styles need to know the % widest entry name for each level diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index 681c7730697..1c40b7f2a26 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.ins +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.ins @@ -1,10 +1,10 @@ -% glossaries.ins generated using makedtx version 0.94b 2008/12/26 16:49 +% glossaries.ins generated using makedtx version 0.94b 2009/1/16 12:27 \input docstrip \preamble glossaries.dtx - Copyright 2008 Nicola Talbot + Copyright 2009 Nicola Talbot This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 |