diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-21 23:39:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-21 23:39:22 +0000 |
commit | 18d3ed873290d987fea4820b83615c3f35c44770 (patch) | |
tree | e8bcd6aed2fe7e4915136f79f257a8c0abf94215 /Master/texmf-dist/source/latex/glossaries | |
parent | dcf30bb52ae0db1fc2f0bef28179723d65e23618 (diff) |
glossaries 3.02 (21may12)
git-svn-id: svn://tug.org/texlive/trunk@26547 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/glossaries')
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.dtx | 1572 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.ins | 14 |
2 files changed, 1362 insertions, 224 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index caa101c7e40..3c3f4e9abeb 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -27,7 +27,7 @@ % -author "Nicola Talbot" % -codetitle "Main Package Code" % glossaries -% Created on 2011/4/13 19:39 +% Created on 2012/5/21 14:06 %\fi %\iffalse %<*package> @@ -50,7 +50,7 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2011 Nicola Talbot, all rights reserved. +% Copyright (C) 2012 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> @@ -79,7 +79,7 @@ glossaries.dtx \setcounter{IndexColumns}{2} -\CheckSum{13130} +\CheckSum{13653} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{first use\ifirstuse} @@ -107,7 +107,7 @@ glossaries.dtx %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{Documented Code For glossaries v3.01} +% \title{Documented Code For glossaries v3.02} % \author{Nicola L.C. Talbot\\[10pt] %School of Computing Sciences\\ %University of East Anglia\\ @@ -115,7 +115,7 @@ glossaries.dtx %NR4 7TJ. United Kingdom.\\ %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % -% \date{2011-04-12} +% \date{2012-05-21} % \maketitle % %This is the documented code for the \styfmt{glossaries} package. @@ -131,7 +131,7 @@ glossaries.dtx %glossaries package}. % %\item[\url{glossaries-user.pdf}] -%For the main user guide, read \qt{glossaries.sty v3.01: +%For the main user guide, read \qt{glossaries.sty v3.02: %\LaTeX2e\ Package to Assist Generating Glossaries}. % %\item[\url{mfirstuc-manual.pdf}] @@ -172,7 +172,7 @@ glossaries.dtx % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2011/04/12 v3.01 (NLCT)] +\ProvidesPackage{glossaries}[2012/05/21 v3.02 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -313,7 +313,7 @@ false,nolabel,autolabel}[nolabel]{% % The default number list format displays the number list ``as is'': %\begin{macro}{\glossaryentrynumbers} % \begin{macrocode} -\newcommand*{\glossaryentrynumbers}[1]{#1} +\newcommand*{\glossaryentrynumbers}[1]{#1\gls@save@numberlist{#1}} % \end{macrocode} %\end{macro} %\begin{option}{nonumberlist} @@ -325,7 +325,17 @@ false,nolabel,autolabel}[nolabel]{% % \cs{glossaryentrynumbers} to ignores its argument). % \begin{macrocode} \DeclareOptionX{nonumberlist}{% -\renewcommand*{\glossaryentrynumbers}[1]{}} + \renewcommand*{\glossaryentrynumbers}[1]{\gls@save@numberlist{#1}}% +} +% \end{macrocode} +%\end{option} +% +%\begin{option}{savenumberlist} +%\changes{3.02}{2012/05/21}{new} +% Provide means to store the number list for entries. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{savenumberlist}[true]{} +\glssavenumberlistfalse % \end{macrocode} %\end{option} % @@ -437,6 +447,16 @@ false,nolabel,autolabel}[nolabel]{% % \end{macrocode} %\end{option} % +%\begin{option}{ucmark} +% Boolean option to determine whether or not to use +% \ics{MakeUppercase} in definition of \ics{glossarymark} +%\changes{3.02}{2012/05/21}{new} +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{ucmark}[true]{} +\glsucmarkfalse +% \end{macrocode} +%\end{option} +% %\begin{option}{entrycounter} % Defines a counter that can be used in the standard glossary styles % to number each (main) entry. If true, this will define a counter called @@ -919,11 +939,26 @@ name=true]{% % Set the default value: % \begin{macrocode} \glstranslatefalse -\@ifpackageloaded{translator}{\glstranslatetrue}{% -\@ifpackageloaded{babel}{\glstranslatetrue}{% -\@ifpackageloaded{polyglossia}{\glstranslatetrue}{}}} + \@ifpackageloaded{translator}% + {\glstranslatetrue}% + {% + \@ifpackageloaded{polyglossia}% + {\glstranslatetrue}% + {% + \@ifpackageloaded{babel}{\glstranslatetrue}{}% + }% +} % \end{macrocode} % +%\begin{option}{indexonlyfirst} +%\changes{3.02}{2012/05/21}{new} +% Set whether to only index on first use. +% \begin{macrocode} +\define@boolkey{glossaries.sty}[gls]{indexonlyfirst}[true]{} +\glsindexonlyfirstfalse +% \end{macrocode} +%\end{option} +% %\begin{option}{hyperfirst} %\changes{2.03}{2009 Sep 23}{new} % Set whether or not terms should have a hyperlink on first use. @@ -1135,8 +1170,25 @@ name=true]{% % automatic loading of translator package} % \begin{macrocode} \ifglstranslate - \@ifpackageloaded{babel}{\IfFileExists{translator.sty}{% - \RequirePackage{translator}}{}}{} + \@ifpackageloaded{polyglossia}% + {% +% \end{macrocode} +%\changes{3.02}{2012/05/21}{added check for polyglossia}% +% \sty{polyglossia} fakes \sty{babel} so need to check for +% \sty{polyglossia} first. +% \begin{macrocode} + }% + {% + \@ifpackageloaded{babel}% + {% + \IfFileExists{translator.sty}% + {% + \RequirePackage{translator}% + }% + {}% + }% + {} + } \fi % \end{macrocode} % @@ -1375,11 +1427,14 @@ name=true]{% \renewcommand*{\glsnumbersgroupname}{% \translate{Numbers (glossaries)}}% }{% - \@ifpackageloaded{babel}% - {\RequirePackage{glossaries-babel}}% +% \end{macrocode} +%\changes{3.02}{2012/05/21}{reversed order of package check} +% \begin{macrocode} + \@ifpackageloaded{polyglossia}% + {\RequirePackage{glossaries-polyglossia}}% {% - \@ifpackageloaded{polyglossia}{% - \RequirePackage{glossaries-polyglossia}}{}% + \@ifpackageloaded{babel}{% + \RequirePackage{glossaries-babel}}{}% }} \fi % \end{macrocode} @@ -1675,18 +1730,36 @@ name=true]{% % \begin{macrocode} \ifcsundef{glossarymark}% {% - \newcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} + \ifglsucmark + \newcommand{\glossarymark}[1]{% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}% + } + \else + \newcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} + \fi }% {% \GlossariesWarning{overriding \string\glossarymark}% \@ifclassloaded{memoir}% { - \renewcommand{\glossarymark}[1]{% - \markboth{\memUChead{#1}}{\memUChead{#1}}% - } + \ifglsucmark + \renewcommand{\glossarymark}[1]{% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}% + } + \else + \renewcommand{\glossarymark}[1]{% + \markboth{\memUChead{#1}}{\memUChead{#1}}% + } + \fi } { - \renewcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} + \ifglsucmark + \renewcommand{\glossarymark}[1]{% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}% + } + \else + \renewcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} + \fi } } % \end{macrocode} @@ -2565,6 +2638,44 @@ name=true]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\ifglshaschildren} +% \cs{ifglshaschildren}\marg{label}\marg{true part}\marg{false part} +%\changes{3.02}{2012/05/21}{new} +% \begin{macrocode} +\newcommand{\ifglshaschildren}[3]{% + \glsdoifexists{#1}% + {% + \def\do@glshaschildren{#3}% + \expandafter\forglsentries\expandafter[\csname glo@#1@type\endcsname] + {\glo@label}% + {% + \letcs\glo@parent{glo@\glo@label @parent}% + \ifthenelse{\equal{#1}{\glo@parent}}% + {% + \def\do@glshaschildren{#2}% + \@endfortrue + }% + {}% + }% + \do@glshaschildren + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\ifglshasparent} +% \cs{ifglshaschildren}\marg{label}\marg{true part}\marg{false part} +%\changes{3.02}{2012/05/21}{new} +% \begin{macrocode} +\newcommand{\ifglshasparent}[3]{% + \glsdoifexists{#1}% + {% + \ifcsempty{glo@#1@parent}{#3}{#2}% + }% +} +% \end{macrocode} +%\end{macro} +% %\subsection{Defining new glossaries}\label{sec:newglos} % A comma-separated list of glossary names is stored % in \cs{@glo@types}. When a new glossary type @@ -3043,6 +3154,27 @@ name=true]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@missingnumberlist} +%\changes{3.02}{2012/05/21}{new} +% Define a command to generate warning when numberlist not set. +% \begin{macrocode} +\newcommand*{\@gls@missingnumberlist}[1]{% + ??% + \ifglssavenumberlist + \GlossariesWarning{Missing number list for entry `#1'. + Maybe makeglossaries + rerun required.}% + \else + \PackageError{glossaries}% + {Package option `savenumberlist=true' required.}% + {% + You must use the `savenumberlist' package option + to reference location lists.% + }% + \fi +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsdefaultsort} % Define command to set default sort. % \changes{1.17}{2008 December 26}{new} @@ -3071,40 +3203,49 @@ name=true]{% % \end{macrocode} % Check to see if this glossary entry has already been defined: % \begin{macrocode} -\glsdoifnoexists{#1}{% + \glsdoifnoexists{#1}% + {% % \end{macrocode} % Store label % \begin{macrocode} -\def\@glo@label{#1}% + \def\@glo@label{#1}% % \end{macrocode} % Set up defaults. If the \gloskey{name} or \gloskey{description} % keys are omitted, an error will be generated. % \begin{macrocode} -\let\@glo@name\@glsnoname + \let\@glo@name\@glsnoname % \end{macrocode} %\changes{1.08}{2007 Oct 13}{Fixed error message to say ``description %key'' rather than ``desc key''} % \begin{macrocode} -\def\@glo@desc{\PackageError{glossaries}{description key required in -\string\newglossaryentry\space for entry `\@glo@label'}{You haven't specified the entry description}}% + \def\@glo@desc{% + \PackageError{glossaries} + {% + description key required in \string\newglossaryentry\space + for entry `\@glo@label'% + }% + {% + You haven't specified the entry description% + }% + }% % \end{macrocode} % \changes{1.12}{2008 Mar 8}{descriptionplural support added} % \begin{macrocode} -\def\@glo@descplural{\@glo@desc}% + \def\@glo@descplural{\@glo@desc}% % \end{macrocode} % \begin{macrocode} -\def\@glo@type{\glsdefaulttype}% -\def\@glo@symbol{\relax}% + \def\@glo@type{\glsdefaulttype}% + \def\@glo@symbol{\relax}% % \end{macrocode} % \changes{1.12}{2008 Mar 8}{symbolplural support added} % \begin{macrocode} -\def\@glo@symbolplural{\@glo@symbol}% + \def\@glo@symbolplural{\@glo@symbol}% % \end{macrocode} % \begin{macrocode} -\def\@glo@text{\@glo@name}% + \def\@glo@text{\@glo@name}% % \end{macrocode} % \begin{macrocode} -\let\@glo@plural\@glsdefaultplural + \let\@glo@plural\@glsdefaultplural % \end{macrocode} % \changes{1.13}{2008 May 10}{Changed default first value} % Using \cs{let} instead of \cs{def} to make later comparison @@ -3112,13 +3253,13 @@ name=true]{% % this.) % \changes{1.16}{2008 August 27}{Changed def to let} % \begin{macrocode} -\let\@glo@first\relax + \let\@glo@first\relax % \end{macrocode} % \changes{1.12}{2008 Mar 8}{Changed default first plural to be first % key with s appended (was text key with s appended)} % \changes{1.13}{2008 May 10}{Changed default firstplural value} % \begin{macrocode} -\let\@glo@firstplural\relax + \let\@glo@firstplural\relax % \end{macrocode} % Set the default sort: %\changes{1.05}{2007 Aug 10}{Changed the default value of the sort @@ -3126,130 +3267,139 @@ name=true]{% %\changes{1.18}{2009 January 14}{Changed default value of sort % to '@glsdefaultsort} % \begin{macrocode} -\let\@glo@sort\@glsdefaultsort + \let\@glo@sort\@glsdefaultsort % \end{macrocode} % Set the default counter: % \begin{macrocode} -\def\@glo@counter{\@gls@getcounter{\@glo@type}}% + \def\@glo@counter{\@gls@getcounter{\@glo@type}}% % \end{macrocode} %\changes{1.17}{2008 December 26}{added see key} % \begin{macrocode} -\def\@glo@see{}% + \def\@glo@see{}% % \end{macrocode} %\changes{1.17}{2008 December 26}{added parent key} % \begin{macrocode} -\def\@glo@parent{}% + \def\@glo@parent{}% % \end{macrocode} %\changes{1.17}{2008 December 26}{added nonumberlist key} % \begin{macrocode} -\def\@glo@prefix{}% + \def\@glo@prefix{}% % \end{macrocode} %\changes{2.04}{2009 November 10}{added user1-6 keys} % \begin{macrocode} -\def\@glo@useri{}% -\def\@glo@userii{}% -\def\@glo@useriii{}% -\def\@glo@useriv{}% -\def\@glo@userv{}% -\def\@glo@uservi{}% + \def\@glo@useri{}% + \def\@glo@userii{}% + \def\@glo@useriii{}% + \def\@glo@useriv{}% + \def\@glo@userv{}% + \def\@glo@uservi{}% % \end{macrocode} %\changes{3.0}{2011/04/02}{added short and long keys} % \begin{macrocode} -\def\@glo@short{}% -\def\@glo@shortpl{}% -\def\@glo@long{}% -\def\@glo@longpl{}% + \def\@glo@short{}% + \def\@glo@shortpl{}% + \def\@glo@long{}% + \def\@glo@longpl{}% % \end{macrocode} % Add start hook in case another package wants to add extra keys. % \begin{macrocode} - \@newglossaryentryprehook + \@newglossaryentryprehook % \end{macrocode} % Extract key-val information from third parameter: % \begin{macrocode} -\setkeys{glossentry}{#2}% + \setkeys{glossentry}{#2}% % \end{macrocode} % Check to see if this glossary type has been defined, if it has, % add this label to the relevant list, otherwise generate an error. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} -\ifcsundef{glolist@\@glo@type}% -{% - \PackageError{glossaries}% - {Glossary type '\@glo@type' has not been defined}% - {You need to define a new glossary type, before making entries - in it}% -}% -{% - \protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% - \expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% -}% + \ifcsundef{glolist@\@glo@type}% + {% + \PackageError{glossaries}% + {Glossary type '\@glo@type' has not been defined}% + {You need to define a new glossary type, before making entries + in it}% + }% + {% + \protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% + \expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% + }% % \end{macrocode} % Initialise level to 0. % \begin{macrocode} -\gls@level=0\relax + \gls@level=0\relax % \end{macrocode} % Has this entry been assigned a parent? % \begin{macrocode} -\ifx\@glo@parent\@empty + \ifx\@glo@parent\@empty % \end{macrocode} % Doesn't have a parent. Set \cs{glo@}\meta{label}"@parent" to % empty. % \begin{macrocode} - \expandafter\gdef\csname glo@#1@parent\endcsname{}% -\else + \expandafter\gdef\csname glo@#1@parent\endcsname{}% + \else % \end{macrocode} % Has a parent. Check to ensure this entry isn't its own parent. % \begin{macrocode} - \ifthenelse{\equal{#1}{\@glo@parent}}{% - \PackageError{glossaries}{Entry `#1' can't be its own parent}{}% - \def\@glo@parent{}% - \expandafter\gdef\csname glo@#1@parent\endcsname{}% - }{% + \ifthenelse{\equal{#1}{\@glo@parent}}% + {% + \PackageError{glossaries}{Entry `#1' can't be its own parent}{}% + \def\@glo@parent{}% + \expandafter\gdef\csname glo@#1@parent\endcsname{}% + }% + {% % \end{macrocode} % Check the parent exists: % \begin{macrocode} - \ifglsentryexists{\@glo@parent}{% + \ifglsentryexists{\@glo@parent}% + {% % \end{macrocode} % Parent exists. Set \cs{glo@}\meta{label}"@parent". % \begin{macrocode} - \expandafter\xdef\csname glo@#1@parent\endcsname{\@glo@parent}% + \expandafter\xdef\csname glo@#1@parent\endcsname{\@glo@parent}% % \end{macrocode} % Determine level. % \begin{macrocode} - \gls@level=\csname glo@\@glo@parent @level\endcsname\relax - \advance\gls@level by 1\relax + \gls@level=\csname glo@\@glo@parent @level\endcsname\relax + \advance\gls@level by 1\relax % \end{macrocode} % If name hasn't been specified, use same as the parent name % \begin{macrocode} - \ifx\@glo@name\@glsnoname - \expandafter\let\expandafter\@glo@name - \csname glo@\@glo@parent @name\endcsname + \ifx\@glo@name\@glsnoname + \expandafter\let\expandafter\@glo@name + \csname glo@\@glo@parent @name\endcsname % \end{macrocode} % If name and plural haven't been specified, use same as the parent % \begin{macrocode} - \ifx\@glo@plural\@glsdefaultplural - \expandafter\let\expandafter\@glo@plural - \csname glo@\@glo@parent @plural\endcsname - \fi - \fi - }{% + \ifx\@glo@plural\@glsdefaultplural + \expandafter\let\expandafter\@glo@plural + \csname glo@\@glo@parent @plural\endcsname + \fi + \fi + }% + {% % \end{macrocode} % Parent doesn't exist, so issue an error message and change this % entry to have no parent % \begin{macrocode} - \PackageError{glossaries}{Invalid parent `\@glo@parent' - for entry `#1' - parent doesn't exist}{Parent entries - must be defined before their children}% - \def\@glo@parent{}% - \expandafter\gdef\csname glo@#1@parent\endcsname{}% - }% - }% -\fi + \PackageError{glossaries}% + {% + Invalid parent `\@glo@parent' + for entry `#1' - parent doesn't exist% + }% + {% + Parent entries must be defined before their children% + }% + \def\@glo@parent{}% + \expandafter\gdef\csname glo@#1@parent\endcsname{}% + }% + }% + \fi % \end{macrocode} % Set the level for this entry % \begin{macrocode} -\expandafter\xdef\csname glo@#1@level\endcsname{\number\gls@level}% + \expandafter\xdef\csname glo@#1@level\endcsname{\number\gls@level}% % \end{macrocode} % Check if \gloskey{first} and \gloskey{firstplural} have been use. % If \gloskey{firstplural} hasn't been specified, but \gloskey{first} @@ -3260,108 +3410,119 @@ name=true]{% % This now uses \cs{ifx} instead of \cs{if} to avoid expansion % issues. (Thanks to Ulrich~Diez for suggesting this.) % \begin{macrocode} -\ifx\relax\@glo@firstplural - \ifx\relax\@glo@first - \def\@glo@firstplural{\@glo@plural}% - \def\@glo@first{\@glo@text}% - \else - \def\@glo@firstplural{\@glo@first\glspluralsuffix}% - \fi -\else - \ifx\relax\@glo@first - \def\@glo@first{\@glo@text}% - \fi -\fi + \ifx\relax\@glo@firstplural + \ifx\relax\@glo@first + \def\@glo@firstplural{\@glo@plural}% + \def\@glo@first{\@glo@text}% + \else + \def\@glo@firstplural{\@glo@first\glspluralsuffix}% + \fi + \else + \ifx\relax\@glo@first + \def\@glo@first{\@glo@text}% + \fi + \fi % \end{macrocode} % Define commands associated with this entry: % \begin{macrocode} -\expandafter - \protected@xdef\csname glo@#1@text\endcsname{\@glo@text}% -\expandafter - \protected@xdef\csname glo@#1@plural\endcsname{\@glo@plural}% -\expandafter - \protected@xdef\csname glo@#1@first\endcsname{\@glo@first}% -\expandafter - \protected@xdef\csname glo@#1@firstpl\endcsname{\@glo@firstplural}% -\expandafter - \protected@xdef\csname glo@#1@type\endcsname{\@glo@type}% -\expandafter - \protected@xdef\csname glo@#1@counter\endcsname{\@glo@counter}% -\expandafter - \protected@xdef\csname glo@#1@useri\endcsname{\@glo@useri}% -\expandafter - \protected@xdef\csname glo@#1@userii\endcsname{\@glo@userii}% -\expandafter - \protected@xdef\csname glo@#1@useriii\endcsname{\@glo@useriii}% -\expandafter - \protected@xdef\csname glo@#1@useriv\endcsname{\@glo@useriv}% -\expandafter - \protected@xdef\csname glo@#1@userv\endcsname{\@glo@userv}% -\expandafter - \protected@xdef\csname glo@#1@uservi\endcsname{\@glo@uservi}% -\expandafter - \protected@xdef\csname glo@#1@short\endcsname{\@glo@short}% -\expandafter - \protected@xdef\csname glo@#1@shortpl\endcsname{\@glo@shortpl}% -\expandafter - \protected@xdef\csname glo@#1@long\endcsname{\@glo@long}% -\expandafter - \protected@xdef\csname glo@#1@longpl\endcsname{\@glo@longpl}% -\@gls@sanitizename -\expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}% + \expandafter + \protected@xdef\csname glo@#1@text\endcsname{\@glo@text}% + \expandafter + \protected@xdef\csname glo@#1@plural\endcsname{\@glo@plural}% + \expandafter + \protected@xdef\csname glo@#1@first\endcsname{\@glo@first}% + \expandafter + \protected@xdef\csname glo@#1@firstpl\endcsname{\@glo@firstplural}% + \expandafter + \protected@xdef\csname glo@#1@type\endcsname{\@glo@type}% + \expandafter + \protected@xdef\csname glo@#1@counter\endcsname{\@glo@counter}% + \expandafter + \protected@xdef\csname glo@#1@useri\endcsname{\@glo@useri}% + \expandafter + \protected@xdef\csname glo@#1@userii\endcsname{\@glo@userii}% + \expandafter + \protected@xdef\csname glo@#1@useriii\endcsname{\@glo@useriii}% + \expandafter + \protected@xdef\csname glo@#1@useriv\endcsname{\@glo@useriv}% + \expandafter + \protected@xdef\csname glo@#1@userv\endcsname{\@glo@userv}% + \expandafter + \protected@xdef\csname glo@#1@uservi\endcsname{\@glo@uservi}% + \expandafter + \protected@xdef\csname glo@#1@short\endcsname{\@glo@short}% + \expandafter + \protected@xdef\csname glo@#1@shortpl\endcsname{\@glo@shortpl}% + \expandafter + \protected@xdef\csname glo@#1@long\endcsname{\@glo@long}% + \expandafter + \protected@xdef\csname glo@#1@longpl\endcsname{\@glo@longpl}% + \@gls@sanitizename + \expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}% +% \end{macrocode} +%\changes{3.02}{2012/05/21}{added numberlist element} +% Set default numberlist if not defined: +% \begin{macrocode} + \ifcsundef{glo@#1@numberlist}% + {% + \csxdef{glo@#1@numberlist}{\noexpand\@gls@missingnumberlist{\@glo@label}}% + }% + {}% % \end{macrocode} % The smaller and smallcaps options set the description to % \cs{@glo@first}. Need to check for this, otherwise it won't get % expanded if the description gets sanitized. %\changes{1.15}{2008 August 15}{check for '@glo@first in description}% % \begin{macrocode} -\def\@glo@@desc{\@glo@first}% -\ifx\@glo@desc\@glo@@desc - \let\@glo@desc\@glo@first -\fi -\@gls@sanitizedesc -\expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}% -\expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}% + \def\@glo@@desc{\@glo@first}% + \ifx\@glo@desc\@glo@@desc + \let\@glo@desc\@glo@first + \fi + \@gls@sanitizedesc + \expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}% + \expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}% % \end{macrocode} %\changes{1.18}{2009 January 14}{moved sort sanitization to % 'newglossaryentry} %\changes{3.0}{2011/04/02}{added \cs{@gls@defsort}} % Set the sort key for this entry: % \begin{macrocode} -\@gls@defsort{\@glo@type}{#1}% + \@gls@defsort{\@glo@type}{#1}% % \end{macrocode} %\changes{1.15}{2008 August 15}{check for '@glo@text in symbol}% % \begin{macrocode} -\def\@glo@@symbol{\@glo@text}% -\ifx\@glo@symbol\@glo@@symbol - \let\@glo@symbol\@glo@text -\fi -\@gls@sanitizesymbol -\expandafter\protected@xdef\csname glo@#1@symbol\endcsname{\@glo@symbol}% -\expandafter\protected@xdef\csname glo@#1@symbolplural\endcsname{\@glo@symbolplural}% + \def\@glo@@symbol{\@glo@text}% + \ifx\@glo@symbol\@glo@@symbol + \let\@glo@symbol\@glo@text + \fi + \@gls@sanitizesymbol + \expandafter\protected@xdef\csname glo@#1@symbol\endcsname{\@glo@symbol}% + \expandafter\protected@xdef\csname glo@#1@symbolplural\endcsname{\@glo@symbolplural}% % \end{macrocode} % Define an associated boolean variable to determine whether this % entry has been used yet (needs to be defined globally): % \begin{macrocode} -\expandafter\gdef\csname glo@#1@flagfalse\endcsname{% -\expandafter\global\expandafter -\let\csname ifglo@#1@flag\endcsname\iffalse}% -\expandafter\gdef\csname glo@#1@flagtrue\endcsname{% -\expandafter\global\expandafter -\let\csname ifglo@#1@flag\endcsname\iftrue}% -\csname glo@#1@flagfalse\endcsname + \expandafter\gdef\csname glo@#1@flagfalse\endcsname{% + \expandafter\global\expandafter + \let\csname ifglo@#1@flag\endcsname\iffalse + }% + \expandafter\gdef\csname glo@#1@flagtrue\endcsname{% + \expandafter\global\expandafter + \let\csname ifglo@#1@flag\endcsname\iftrue + }% + \csname glo@#1@flagfalse\endcsname % \end{macrocode} % Sort out any cross-referencing if required. % \begin{macrocode} -\ifx\@glo@see\@empty -\else - \protected@edef\@do@glssee{% - \noexpand\@gls@fixbraces\noexpand\@glo@list\@glo@see - \noexpand\@nil - \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{#1}}% - \@do@glssee -\fi -}% + \ifx\@glo@see\@empty + \else + \protected@edef\@do@glssee{% + \noexpand\@gls@fixbraces\noexpand\@glo@list\@glo@see + \noexpand\@nil + \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{#1}}% + \@do@glssee + \fi + }% % \end{macrocode} % Determine and store main part of the entry's index format. %\changes{1.17}{2008 December 26}{Stored main part of entry @@ -3392,6 +3553,25 @@ name=true]{% \newcommand*{\@newglossaryentryposthook}{} % \end{macrocode} %\end{macro} +% +%\begin{macro}{\glsmoveentry} +%\changes{3.02}{2012/05/21}{new} +% Moves entry whose label is given by first argument to the glossary +% named in the second argument. +% \begin{macrocode} +\newcommand*{\glsmoveentry}[2]{% + \edef\glo@type{\csname glo@#1@type\endcsname}% + \def\glo@list{,}% + \forglsentries[\glo@type]{\glo@label}% + {% + \ifthenelse{\equal{\glo@label}{#1}}{}{\eappto\glo@list{\glo@label,}}% + }% + \cslet{glolist@\glo@type}{\glo@list}% + \csdef{glo@#1@type}{#2}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glossaryentryfield} % Indicate what command should be used to display each entry in % the glossary. (This enables the \sty{glossaries-accsupp} package @@ -3864,7 +4044,7 @@ name=true]{% % \begin{macrocode} \@do@wrglossary{#2}% \ifKV@glslink@hyper - \@glslink{glo:#2}{\glstextformat{#3}}% + \@glslink{\glolinkprefix#2}{\glstextformat{#3}}% \else \glstextformat{#3}\relax \fi @@ -3872,6 +4052,20 @@ name=true]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glolinkprefix} +% \begin{macrocode} +\newcommand*{\glolinkprefix}{glo:} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsentrycounter} +% Set default value of entry counter +%\changes{3.02}{2012/05/21}{set default value} +% \begin{macrocode} +\def\glsentrycounter{\glscounter}% +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@gls@saveentrycounter} %\changes{3.0}{2011/04/02}{new} % Need to check if using \ctr{equation} counter in \env{align} @@ -7499,16 +7693,20 @@ name=true]{% % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryfull} +%\changes{3.02}{2012/05/21}{fixed bug (replaced \cs{glsentryshortpl} +%with \cs{glsentryshort})} % \begin{macrocode} \newcommand*{\Glsentryfull}[1]{% - \Glsentrylong{#1}\space(\glsentryshortpl{#1})% + \Glsentrylong{#1}\space(\glsentryshort{#1})% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryfullpl} +%\changes{3.02}{2012/05/21}{fixed bug (replaced \cs{glsentryshort} +%with \cs{glsentryshortpl})} % \begin{macrocode} \newcommand*{\glsentryfullpl}[1]{% - \glsentrylongpl{#1}\space(\glsentryshort{#1})% + \glsentrylongpl{#1}\space(\glsentryshortpl{#1})% } % \end{macrocode} %\end{macro} @@ -7520,6 +7718,86 @@ name=true]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsentrynumberlist} +%\changes{3.02}{2012/05/21}{new} +%Displays the number list as is. +% \begin{macrocode} +\newcommand*{\glsentrynumberlist}[1]{% + \glsdoifexists{#1}% + {% + \csname glo@#1@numberlist\endcsname + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsdisplaynumberlist} +%\changes{3.02}{2012/05/21}{new} +% Formats the number list for the given entry label. +% Doesn't work with hyperref. +% \begin{macrocode} +\@ifpackageloaded{hyperref} +{% + \newcommand*{\glsdisplaynumberlist}[1]{% + \GlossariesWarning + {% + \string\glsdisplaynumberlist\space + doesn't work with hyperref.^^JUsing + \string\glsentrynumberlist\space instead% + }% + \glsentrynumberlist{#1}% + }% +}% +{% + \newcommand*{\glsdisplaynumberlist}[1]{% + \glsdoifexists{#1}% + {% + \bgroup + \def\@glo@label{#1}% + \let\@org@glsnumberformat\glsnumberformat + \def\glsnumberformat##1{##1}% + \protected@edef\the@numberlist{\csname glo@\@glo@label @numberlist\endcsname}% + \def\@gls@numlist@sep{}% + \def\@gls@numlist@nextsep{}% + \def\@gls@numlist@lastsep{}% + \def\@gls@thislist{}% + \def\@gls@donext@def{}% + \renewcommand\do[1]{% + \protected@edef\@gls@thislist{% + \@gls@thislist + \noexpand\@gls@numlist@sep + ##1% + }% + \let\@gls@numlist@sep\@gls@numlist@nextsep + \def\@gls@numlist@nextsep{\glsnumlistsep}% + \@gls@donext@def + \def\@gls@donext@def{% + \def\@gls@numlist@lastsep{\glsnumlistlastsep}% + }% + }% + \expandafter \glsnumlistparser \expandafter{\the@numberlist}% + \let\@gls@numlist@sep\@gls@numlist@lastsep + \@gls@thislist + \egroup + }% + } +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsnumlistsep} +%\changes{3.02}{21012/05/19}{new} +% \begin{macrocode} +\newcommand*{\glsnumlistsep}{, } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsnumlistlastsep} +%\changes{3.02}{21012/05/19}{new} +% \begin{macrocode} +\newcommand*{\glsnumlistlastsep}{ \& } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glshyperlink} % Provide a hyperlink to a glossary entry without adding information % to the glossary file. The entry needs to be added using a @@ -7533,7 +7811,7 @@ name=true]{% % \begin{macrocode} \newcommand*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{% \def\@glo@label{#2}% -\@glslink{glo:#2}{#1}} +\@glslink{\glolinkprefix#2}{#1}} % \end{macrocode} %\end{macro} % @@ -8150,6 +8428,15 @@ name=true]{% % Suppress warning about no \cs{makeglossaries} % \begin{macrocode} \let\warn@nomakeglossaries\relax +% \end{macrocode} +% Declare list parser for \cs{glsdisplaynumberlist} +%\changes{3.02}{2012/05/21}{added list parser} +% \begin{macrocode} + \ifglssavenumberlist + \edef\@gls@dodeflistparser{\noexpand\DeclareListParser + {\noexpand\glsnumlistparser}{\delimN}}% + \@gls@dodeflistparser + \fi } % \end{macrocode} %\end{macro} @@ -8208,10 +8495,21 @@ name=true]{% % \end{macrocode} % Iterate through all the glossaries %\changes{3.01}{2011/04/12}{added check for empty glossaries} +%\changes{3.02}{2012/05/21}{added check for existence of token +% in case \cs{makeglossaries has been omitted}} % \begin{macrocode} \forallglossaries{\@glo@type}{% - \edef\gls@tmp{\expandafter\the\csname glo@\@glo@type -@filetok\endcsname}% +% \end{macrocode} +% Check for empty glossaries (patch provided by Patrick H\"acker) +% \begin{macrocode} + \ifcsundef{glo@\@glo@type @filetok}% + {% + \def\gls@tmp{}% + }% + {% + \edef\gls@tmp{\expandafter\the + \csname glo@\@glo@type @filetok\endcsname}% + }% \ifx\gls@tmp\@empty \ifx\@glo@type\glsdefaulttype \GlossariesWarningNoLine{Glossary `\@glo@type' has no @@ -8225,8 +8523,8 @@ you \else \@glsopenfile{\glswrite}{\@glo@type}% \immediate\write\glswrite{% - \expandafter\the\csname glo@\@glo@type -@filetok\endcsname}% + \expandafter\the + \csname glo@\@glo@type @filetok\endcsname}% \immediate\closeout\glswrite \fi }% @@ -8247,7 +8545,8 @@ you %\begin{macro}{\glossary} % \begin{macrocode} \renewcommand*{\glossary}[1][\glsdefaulttype]{% -\@glossary[#1]} + \@glossary[#1]% +} % \end{macrocode} %\end{macro} % @@ -8288,7 +8587,16 @@ you \expandafter\global\expandafter\csname glo@#1@filetok\endcsname \expandafter{\@gls@tmp^^J}% \else - \expandafter\protected@write\csname glo@#1@file\endcsname{}{#2}% +% \end{macrocode} +%\changes{3.02}{2012/05/21}{added check for glossary file defined}% +% \begin{macrocode} + \ifcsdef{glo@#1@file}% + {% + \expandafter\protected@write\csname glo@#1@file\endcsname{}{#2}% + }% + {% + \GlossariesWarning{No file defined for glossary `#1'}% + }% \fi \endgroup\@esphack } @@ -8296,13 +8604,25 @@ you %\end{macro} % %\begin{macro}{\@do@wrglossary} +%\changes{3.02}{2012/05/21}{changed \cs{@do@wr@glossary} to test for +%\pkgopt{indexonlyfirst} option; put old \cs{@do@wr@glossary} code +%into \cs{@@do@wrglossary}} +% \begin{macrocode} +\newcommand*{\@do@wrglossary}[1]{% + \ifglsindexonlyfirst + \ifglsused{#1}{}{\@@do@wrglossary{#1}}% + \else + \@@do@wrglossary{#1}% + \fi +} +% \end{macrocode} %\changes{1.17}{2008 December 26}{new} % Write the glossary entry in the appropriate format. % (Need to set \cs{@glsnumberformat} and \cs{@gls@counter} prior to use.) % The argument is the entry's label. %\changes{3.0}{2011/04/02}{modified to use new format} % \begin{macrocode} -\newcommand{\@do@wrglossary}[1]{% +\newcommand*{\@@do@wrglossary}[1]{% % \end{macrocode} % Get the location and escape any special characters % \begin{macrocode} @@ -8327,44 +8647,47 @@ you % Determine whether to use \app{xindy} or \app{makeindex} % syntax % \begin{macrocode} -\ifglsxindy + \ifglsxindy % \end{macrocode} % Need to determine if the formatting information starts with % a ( or ) indicating a range. % \begin{macrocode} - \expandafter\@glo@check@mkidxrangechar\@glsnumberformat\@nil - \def\@glo@range{}% - \expandafter\if\@glo@prefix(\relax - \def\@glo@range{:open-range}% - \else - \expandafter\if\@glo@prefix)\relax - \def\@glo@range{:close-range}% + \expandafter\@glo@check@mkidxrangechar\@glsnumberformat\@nil + \def\@glo@range{}% + \expandafter\if\@glo@prefix(\relax + \def\@glo@range{:open-range}% + \else + \expandafter\if\@glo@prefix)\relax + \def\@glo@range{:close-range}% + \fi \fi - \fi % \end{macrocode} % Write to the glossary file using \app{xindy} syntax. % \begin{macrocode} - \glossary[\csname glo@#1@type\endcsname]{% - (indexentry :tkey (\csname glo@#1@index\endcsname) - :locref \string"{\@glo@counterprefix}{\@glslocref}\string" % - :attr \string"\@gls@counter\@glo@suffix\string" - \@glo@range - ) - }% -\else + \glossary[\csname glo@#1@type\endcsname]{% + (indexentry :tkey (\csname glo@#1@index\endcsname) +% \end{macrocode} +%\changes{3.02}{2012/05/21}{changed \cs{@glslocref} to \cs{theglsentrycounter}} +% \begin{macrocode} + :locref \string"{\@glo@counterprefix}{\theglsentrycounter}\string" % + :attr \string"\@gls@counter\@glo@suffix\string" + \@glo@range + ) + }% + \else % \end{macrocode} % Convert the format information into the format required for % \app{makeindex} % \begin{macrocode} - \@set@glo@numformat{\@glo@numfmt}{\@gls@counter}{\@glsnumberformat}% - {\@glo@counterprefix}% + \@set@glo@numformat{\@glo@numfmt}{\@gls@counter}{\@glsnumberformat}% + {\@glo@counterprefix}% % \end{macrocode} % Write to the glossary file using \app{makeindex} syntax. % \begin{macrocode} - \glossary[\csname glo@#1@type\endcsname]{% - \string\glossaryentry{\csname glo@#1@index\endcsname - \@gls@encapchar\@glo@numfmt}{\theglsentrycounter}}% -\fi + \glossary[\csname glo@#1@type\endcsname]{% + \string\glossaryentry{\csname glo@#1@index\endcsname + \@gls@encapchar\@glo@numfmt}{\theglsentrycounter}}% + \fi } % \end{macrocode} %\end{macro} @@ -8540,6 +8863,23 @@ you % glossary, and can also be used to set the style, title and % entry in the table of contents. Available keys are defined below. % +%\begin{macro}{\gls@save@numberlist} +%\changes{3.02}{2012/05/21}{new} +% Provide command to store number list. +% \begin{macrocode} +\newcommand*{\gls@save@numberlist}[1]{% + \ifglssavenumberlist + \toks@{#1}% + \edef\@do@writeaux@info{% + \noexpand\csgdef{glo@\glscurrententrylabel @numberlist}{\the\toks@}% + }% + \@onelevel@sanitize\@do@writeaux@info + \protected@write\@auxout{}{\@do@writeaux@info}% + \fi +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\warn@noprintglossary} % Warn the user if they have forgotten \ics{printglossaries} % or \ics{printglossary}. (Will be suppressed if there is at @@ -8547,9 +8887,11 @@ you % to ensure that there is a \ics{printglossary} for each defined % glossary.) % \begin{macrocode} -\def\warn@noprintglossary{\GlossariesWarningNoLine{No - \string\printglossary\space or \string\printglossaries\space - found.^^JThis document will not have a glossary}} +\def\warn@noprintglossary{% + \GlossariesWarningNoLine{No \string\printglossary\space + or \string\printglossaries\space + found.^^JThis document will not have a glossary}% +} % \end{macrocode} %\end{macro} % @@ -8643,6 +8985,20 @@ you % \begin{macrocode} \@glossarystyle % \end{macrocode} +%\changes{3.02}{2012/05/21}{add a way to fetch current entry label} +% added a way to fetch the current entry label: +% \begin{macrocode} + \let\gls@org@glossaryentryfield\glossaryentryfield + \let\gls@org@glossarysubentryfield\glossarysubentryfield + \renewcommand{\glossaryentryfield}[1]{% + \gdef\glscurrententrylabel{##1}% + \gls@org@glossaryentryfield{##1}% + }% + \renewcommand{\glossarysubentryfield}[2]{% + \gdef\glscurrententrylabel{##2}% + \gls@org@glossarysubentryfield{##1}{##2}% + }% +% \end{macrocode} % Some macros may end up being expanded into internals in the % glossary, so need to make @ a letter. % \begin{macrocode} @@ -8657,8 +9013,9 @@ you % This might produce an empty page, but at this point the document % isn't complete, so it shouldn't matter. % \begin{macrocode} -\IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}{}% -{\null}% + \IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}% + {}% + {\null}% % \end{macrocode} % If \app{xindy} is being used, need to write the language % dependent information to the \filetype{.aux} file for @@ -8708,7 +9065,8 @@ you %\begin{macro}{\printglossaries} % \begin{macrocode} \newcommand*{\printglossaries}{% -\forallglossaries{\@@glo@type}{\printglossary[type=\@@glo@type]}} + \forallglossaries{\@@glo@type}{\printglossary[type=\@@glo@type]}% +} % \end{macrocode} %\end{macro} % The keys that can be used in the optional argument to @@ -8786,7 +9144,9 @@ false,nolabel,autolabel}[nolabel]{% % \begin{macrocode} \newcommand*{\@glsnonextpages}{% \gdef\glossaryentrynumbers##1{% - \glsresetentrylist}} + \glsresetentrylist + }% +} % \end{macrocode} %\end{macro} %\begin{macro}{\@glsnextpages} @@ -8873,6 +9233,20 @@ false,nolabel,autolabel}[nolabel]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsresetsubentrycounter} +%\changes{3.02}{2012/05/21}{new} +% Resets the \ctr{glossarentry} counter. +% \begin{macrocode} +\ifglsentrycounter + \newcommand*{\glsresetentrycounter}{% + \setcounter{glossaryentry}{0}% + } +\else + \newcommand*{\glsresetentrycounter}{} +\fi +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsstepentry} %\changes{3.0}{2011/04/02}{new} % Advance the \ctr{glossaryentry} counter if in use. The argument is @@ -9012,7 +9386,7 @@ false,nolabel,autolabel}[nolabel]{% % 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}} +\newcommand*{\glstarget}[2]{\@glstarget{\glolinkprefix#1}{#2}} % \end{macrocode} %\end{macro} % @@ -9183,6 +9557,22 @@ false,nolabel,autolabel}[nolabel]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\renewglossarystyle} +%\changes{3.02}{2012/05/21}{new} +%Code for this macro supplied by Marco Daniel. +% \begin{macrocode} +\newcommand{\renewglossarystyle}[2]{% + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries}{Glossary style `#1' isn't already defined}{}% + }% + {% + \csdef{@glsstyle@#1}{#2}% + }% +} +% \end{macrocode} +%\end{macro} +% % Glossary entries are encoded so that the second argument % to \ics{glossaryentryfield} is always specified as % \cs{glsnamefont}\marg{name}. This allows the @@ -9840,7 +10230,7 @@ false,nolabel,autolabel}[nolabel]{% \defglsdisplayfirst[#1]{% \firstacronymfont{##1}##4% \expandafter\protect\expandafter\acrfootnote\expandafter - {\@gls@link@opts}{\@gls@link@label}{##3} + {\@gls@link@opts}{\@gls@link@label}{##3}% }% \defglsdisplay[#1]{\acronymfont{##1}##4}% } @@ -10201,6 +10591,7 @@ false,nolabel,autolabel}[nolabel]{% % \end{macrocode} %\end{macro} %\begin{macro}{\SmallNewAcronymDef} +%\changes{3.02}{2012/05/21}{fixed broken short and long plural} % \begin{macrocode} \newcommand*{\SmallNewAcronymDef}{% \edef\@do@newglossaryentry{% @@ -10210,9 +10601,11 @@ false,nolabel,autolabel}[nolabel]{% name={\noexpand\acronymfont{\the\glsshorttok}},% sort={\the\glsshorttok},% text={\noexpand\@glo@symbol},% - plural={\noexpand\@glo@symbolplural},% + %plural={\noexpand\@glo@symbolplural},% + plural={\noexpand\@glo@shortpl},% first={\the\glslongtok},% - firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% + %firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% + firstplural={\noexpand\@glo@longpl},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% @@ -10220,7 +10613,8 @@ false,nolabel,autolabel}[nolabel]{% description={\noexpand\@glo@first},% descriptionplural={\noexpand\@glo@firstplural},% symbol={\the\glsshorttok},% - symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + %symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + symbolplural={\noexpand\@glo@shortpl},% \the\glskeylisttok }% }% @@ -10967,13 +11361,14 @@ false,nolabel,autolabel}[nolabel]{% % %\begin{macro}{\showglossaryentries} %\changes{3.0}{2011/04/02}{new} +%\changes{3.02}{2012/05/21}{fixed misspelt command} %\begin{definition} %\cs{showglossaryentries}\marg{glossary-label} %\end{definition} % Show the list of entry labels for the given glossary. % \begin{macrocode} \newcommand*{\showglossaryentries}[1]{% - \expandafter\show\csname @glolist@#1\endcsname + \expandafter\show\csname glolist@#1\endcsname } % \end{macrocode} %\end{macro} @@ -11015,7 +11410,12 @@ false,nolabel,autolabel}[nolabel]{% %\label{sec:code:mfirstuc} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mfirstuc}[2011/04/02 v1.05 (NLCT)] +\ProvidesPackage{mfirstuc}[2012/05/21 v1.06 (NLCT)] +% \end{macrocode} +% Requires \sty{etoolbox}:\changes{1.06}{2012/05/21}{now requires +% etoolbox} +% \begin{macrocode} +\RequirePackage{etoolbox} % \end{macrocode} %\begin{macro}{\makefirstuc} % Syntax:\\ @@ -11115,6 +11515,47 @@ false,nolabel,autolabel}[nolabel]{% \expandafter\makefirstuc\expandafter{#1}} % \end{macrocode} %\end{macro} +% +%\begin{macro}{\capitalisewords} +%\changes{1.06}{2012/05/21}{new} +% Capitalise each word in the argument. Words are considered to be +% separated by plain spaces (i.e.\ non-breakable spaces won't be +% considered a word break). +% \begin{macrocode} +\newcommand*{\capitalisewords}[1]{% + \def\gls@add@space{}% + \mfu@capitalisewords#1 \@nil\mfu@endcap + %\gls@add@space\makefirstuc{##1}\def\gls@add@space{ }% +} +% \end{macrocode} +%\end{macro} +% +% \begin{macrocode} +\def\mfu@capitalisewords#1 #2\mfu@endcap{% + \def\mfu@cap@first{#1}% + \def\mfu@cap@second{#2}% + \gls@add@space + \makefirstuc{#1}% + \def\gls@add@space{ }% + \ifx\mfu@cap@second\@nnil + \let\next@mfu@cap\mfu@noop + \else + \let\next@mfu@cap\mfu@capitalisewords + \fi + \next@mfu@cap#2\mfu@endcap +} +\def\mfu@noop#1\mfu@endcap{} +% \end{macrocode} +% +%\begin{macro}{\xcapitalisewords} +%\changes{1.06}{2012/05/21}{new} +% Short-cut command: +% \begin{macrocode} +\newcommand*{\xcapitalisewords}[1]{% + \expandafter\capitalisewords\expandafter{#1}% +} +% \end{macrocode} +%\end{macro} %\section{Glossary Styles} %\iffalse % \begin{macrocode} @@ -11286,6 +11727,110 @@ false,nolabel,autolabel}[nolabel]{% %\fi %\iffalse % \begin{macrocode} +%<*glossary-inline.sty> +% \end{macrocode} +%\fi +% \subsection{In-line Style (glossary-inline.sty)} +% This defines an in-line style where the entries are +% comma-separated with just the name and description displayed. +% \begin{macrocode} +\ProvidesPackage{glossary-inline}[2012/05/21 v1.0 (NLCT)] +% \end{macrocode} +% +%\begin{style}{inline} +% Define the inline style. +% \begin{macrocode} +\newglossarystyle{inline}{% +% \end{macrocode} +% Start of glossary sets up first empty separator between entries. +% (This is then changed by \cs{glossaryentryfield}) +% \begin{macrocode} + \renewenvironment{theglossary}% + {% + \def\gls@inlinesep{}% + \def\gls@inlinesubsep{}% + }% + {\glspostinline}% +% \end{macrocode} +% No header: +% \begin{macrocode} + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% No group headings: +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +% Just display separator followed by name and description: +% \begin{macrocode} + \renewcommand*{\glossaryentryfield}[5]{% + \gls@inlinesep + \glsentryitem{##1}\glstarget{##1}{##2}% + \def\glo@desc{##3}% + \def\@no@post@desc{\nopostdesc}% + \ifx\glo@desc\@no@post@desc + \else + \ifstrempty{##3}{}{\space##3}% + \fi + \ifglshaschildren{##1}% + {% + \glsresetsubentrycounter + \glsinlineparentchildseparator + \def\gls@inlinesubsep{}% + }% + {}% + \def\gls@inlinesep{\glsinlineseparator}% + }% +% \end{macrocode} +% Sub-entries display description but no name: +% \begin{macrocode} + \renewcommand*{\glossarysubentryfield}[6]{% + \gls@inlinesubsep% + \glstarget{##2}{}% + \glssubentryitem{##2}##4% + \def\gls@inlinesubsep{\glsinlinesubseparator}% + }% +% \end{macrocode} +% Nothing special between groups: +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{}% +} +% \end{macrocode} +%\end{style} +% +%\begin{macro}{\glsinlineseparator} +% Separator to use between entries. +% \begin{macrocode} +\newcommand*{\glsinlineseparator}{;\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsinlinesubseparator} +% Separator to use between sub-entries. +% \begin{macrocode} +\newcommand*{\glsinlinesubseparator}{,\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsinlineparentchildseparator} +% Separator to use between parent and children. +% \begin{macrocode} +\newcommand*{\glsinlineparentchildseparator}{:\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glspostinline} +% Terminator for inline glossary. +% \begin{macrocode} +\newcommand*{\glspostinline}{.\space} +% \end{macrocode} +%\end{macro} +%\iffalse +% \begin{macrocode} +%</glossary-inline.sty> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*glossary-list.sty> % \end{macrocode} %\fi @@ -12340,6 +12885,292 @@ false,nolabel,autolabel}[nolabel]{% %\fi %\iffalse % \begin{macrocode} +%<*glossary-mcols.sty> +% \end{macrocode} +%\fi +%\subsection{Glossary Styles using \styfmt{multicol} +%(glossary-mcols.sty)} +%The \isty{glossary-mcols} style file defines glossary styles that +%use the \sty{multicol} package. These use the tree-like glossary +%styles in a multicol environment. +% \begin{macrocode} +\ProvidesPackage{glossary-mcols}[2012/05/21 v1.0 (NLCT)] +% \end{macrocode} +% Required packages: +% \begin{macrocode} +\RequirePackage{multicol} +\RequirePackage{glossary-tree} +% \end{macrocode} +% +%\begin{macro}{\glsmcols} +% Define macro in which to store the number of columns. (Defaults to +% 2.) +% \begin{macrocode} +\newcommand*{\glsmcols}{2} +% \end{macrocode} +%\end{macro} +% +%\begin{style}{mcolindex} +% Multi-column index style. Same as the \glostyle{index}, but puts the +% glossary in multiple columns. (Ideally the glossary title should go in the +% optional argument of \env{multicols}, but the title isn't part of +% the glossary style.) +% \begin{macrocode} +\newglossarystyle{mcolindex}{% + \glossarystyle{index}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{2} + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\item\@idxitem}% + {\end{multicols}}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcolindexgroup} +% As \glostyle{mcolindex} but has headings: +% \begin{macrocode} +\newglossarystyle{mcolindexgroup}{% + \glossarystyle{mcolindex}% + \renewcommand*{\glsgroupheading}[1]{% + \item\textbf{\glsgetgrouptitle{##1}}\indexspace}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcolindexhypergroup} +% The \glostyle{mcolindexhypergroup} style is like the +% \glostyle{mcolindexgroup} style but has hyper navigation. +% \begin{macrocode} +\newglossarystyle{mcolindexhypergroup}{% +% \end{macrocode} +% Base it on the glostyle{mcolindex} style: +% \begin{macrocode} + \glossarystyle{mcolindex}% +% \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{style} +% +%\begin{style}{mcoltree} +% Multi-column index style. Same as the \glostyle{tree}, but puts the +% glossary in multiple columns. +% \begin{macrocode} +\newglossarystyle{mcoltree}{% + \glossarystyle{tree}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{2} + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + }% + {\end{multicols}}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcoltreegroup} +% Like the \glostyle{mcoltree} style but the glossary groups have +% headings. +% \begin{macrocode} +\newglossarystyle{mcoltreegroup}{% +% \end{macrocode} +% Base it on the glostyle{mcoltree} style: +% \begin{macrocode} + \glossarystyle{mcoltree}% +% \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{style} +% +%\begin{style}{mcoltreehypergroup} +% The \glostyle{mcoltreehypergroup} style is like the +% \glostyle{treegroup} +% style, but has a set of links to the groups at the +% start of the glossary. +% \begin{macrocode} +\newglossarystyle{mcoltreehypergroup}{% +% \end{macrocode} +% Base it on the glostyle{mcoltree} style: +% \begin{macrocode} + \glossarystyle{mcoltree}% +% \end{macrocode} +% Put navigation links to the groups at the start of the +% \env{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{style} +% +%\begin{style}{mcoltreenoname} +% Multi-column index style. Same as the \glostyle{treenoname}, but puts the +% glossary in multiple columns. +% \begin{macrocode} +\newglossarystyle{mcoltreenoname}{% + \glossarystyle{treenoname}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{2} + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + }% + {\end{multicols}}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcoltreenonamegroup} +% Like the \glostyle{mcoltreenoname} style but the glossary groups have +% headings. +% \begin{macrocode} +\newglossarystyle{mcoltreenonamegroup}{% +% \end{macrocode} +% Base it on the glostyle{mcoltreenoname} style: +% \begin{macrocode} + \glossarystyle{mcoltreenoname}% +% \end{macrocode} +% Give each group a heading: +% \begin{macrocode} + \renewcommand{\glsgroupheading}[1]{\par + \noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcoltreenonamehypergroup} +% The \glostyle{mcoltreenonamehypergroup} style is like the +% \glostyle{mcoltreenonamegroup} +% style, but has a set of links to the groups at the +% start of the glossary. +% \begin{macrocode} +\newglossarystyle{mcoltreenonamehypergroup}{% +% \end{macrocode} +% Base it on the glostyle{mcoltreenoname} style: +% \begin{macrocode} + \glossarystyle{mcoltreenoname}% +% \end{macrocode} +% Put navigation links to the groups at the start of the +% \env{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{style} +% +%\begin{style}{mcolalttree} +% Multi-column index style. Same as the \glostyle{alttree}, but puts the +% glossary in multiple columns. +% \begin{macrocode} +\newglossarystyle{mcolalttree}{% + \glossarystyle{alttree}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{2}% + \def\@gls@prevlevel{-1}% + \mbox{}\par + }% + {\par\end{multicols}}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcolalttreegroup} +% Like the \glostyle{mcolalttree} style but the glossary groups have +% headings. +% \begin{macrocode} +\newglossarystyle{mcolalttreegroup}{% +% \end{macrocode} +% Base it on the glostyle{mcolalttree} style: +% \begin{macrocode} + \glossarystyle{mcolalttree}% +% \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{style} +% +%\begin{style}{mcolalttreehypergroup} +% The \glostyle{mcolalttreehypergroup} style is like the +% \glostyle{mcolalttreegroup} style, but has a set of links to the +% groups at the start of the glossary. +% \begin{macrocode} +\newglossarystyle{mcolalttreehypergroup}{% +% \end{macrocode} +% Base it on the glostyle{mcolalttree} style: +% \begin{macrocode} + \glossarystyle{mcolalttree}% +% \end{macrocode} +% Put the navigation links in the header +% \begin{macrocode} + \renewcommand*{\glossaryheader}{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \textbf{\glsnavigation}\par\indexspace}% +% \end{macrocode} +% Put a hypertarget at the start of each group +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \indexspace}} +% \end{macrocode} +%\end{style} + + +%\iffalse +% \begin{macrocode} +%</glossary-mcols.sty> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*glossary-super.sty> % \end{macrocode} %\fi @@ -16625,6 +17456,303 @@ Sheet} %\fi %\iffalse % \begin{macrocode} +%<*sample-inline.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % This file is public domain +\documentclass[a4paper]{report} + +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage[toc,order=word,subentrycounter]{glossaries} + +\usepackage{glossary-inline} + +\renewcommand*{\glossarysection}[2][]{\textbf{#1}: } +\renewcommand{\glsnamefont}[1]{\textsc{#1}} +\glossarystyle{inline} + +\makeglossaries + +\newglossaryentry{Perl}{name=\texttt{Perl}, +sort=Perl, % need a sort key because name contains a command +description=A scripting language} + +\newglossaryentry{glossary}{name=glossary, +description={\nopostdesc}, +plural={glossaries}} + +\newglossaryentry{glossarycol}{ +description={collection of glosses}, +sort={2}, +parent={glossary}} + +\newglossaryentry{glossarylist}{ +description={list of technical words}, +sort={1}, +parent={glossary}} + +\newglossaryentry{pagelist}{name=page list, + % description value has to be enclosed in braces + % because it contains commas +description={a list of individual pages or page ranges +(e.g.\ 1,2,4,7-9)}} + +\newglossaryentry{mtrx}{name=matrix, +description={rectangular array of quantities}, + % plural is not simply obtained by appending an s, so specify +plural=matrices} + + % entry with a paragraph break in the description + +\newglossaryentry{par}{name=paragraph, +description={distinct section of piece of +writing. Beginning on new, usually indented, line}} + + % entry with two types of plural. Set the plural form to the + % form most likely to be used. If you want to use a different + % plural, you will need to explicity specify it in \glslink +\newglossaryentry{cow}{name=cow, + % this isn't necessary, as this form (appending an s) is + % the default +plural=cows, + % description: +description={(\emph{pl.}\ cows, \emph{archaic} kine) an adult +female of any bovine animal}} + +\newglossaryentry{bravo}{name={bravo}, +description={\nopostdesc}} + +\newglossaryentry{bravo1}{description={cry of approval (pl.\ bravos)}, +sort={1}, +plural={bravos}, +parent=bravo} + +\newglossaryentry{bravo2}{description={hired ruffian or killer (pl.\ bravoes)}, +sort={2}, +plural={bravoes}, +parent=bravo} + +\newglossaryentry{seal}{name=seal,description={sea mammal with +flippers that eats fish}} + +\newglossaryentry{sealion}{name={sea lion}, +description={large seal}} + +\begin{document} + +\title{Sample Document Using glossary Package} +\author{Nicola Talbot} +\pagenumbering{alph}% prevent duplicate page link names if using PDF +\maketitle + +\pagenumbering{roman} +\tableofcontents + +\chapter{Introduction} +\pagenumbering{arabic} + +This document has a glossary in a footnote\footnote{\printglossaries}. + +A \gls{glossarylist} (definition~\glsrefentry{glossarylist}) is a +very useful addition to any technical document, although a +\gls{glossarycol} (definition~\glsrefentry{glossarycol}) can also +simply be a collection of glosses, which is another thing entirely. +Some documents have multiple \glspl{glossarylist}. + +Once you have run your document through \LaTeX, you +will then need to run the \texttt{.glo} file through +\texttt{makeindex}. You will need to set the output +file so that it creates a \texttt{.gls} file instead +of an \texttt{.ind} file, and change the name of +the log file so that it doesn't overwrite the index +log file (if you have an index for your document). +Rather than having to remember all the command line +switches, you can call the \gls{Perl} script +\texttt{makeglossaries} which provides a convenient +wrapper. + +If a comma appears within the name or description, grouping +must be used, e.g.\ in the description of \gls{pagelist}. + +\chapter{Plurals and Paragraphs} + +Plurals are assumed to have the letter s appended, but if this is +not the case, as in \glspl{mtrx}, then you need to specify the +plural when you define the entry. If a term may have multiple +plurals (for example \glspl{cow}/\glslink{cow}{kine}) then +define the entry with the plural form most likely to be used and +explicitly specify the alternative form using \verb|\glslink|. +\Glspl{seal} and \glspl{sealion} have regular plural forms. + +\Gls{bravo} is a homograph, but the plural forms are spelt +differently. The plural of \gls{bravo1}, a cry of approval +(definition~\glsrefentry{bravo1}), is \glspl{bravo1}, whereas the +plural of \gls{bravo2}, a hired ruffian or killer +(definition~\glsrefentry{bravo2}), is \glspl{bravo2}. + +\Glspl{par} can cause a problem in commands, so care is needed +when having a paragraph break in a \gls{glossarylist} entry. + +\chapter{Ordering} + +There are two types of ordering: word ordering (which places +``\gls{sealion}'' before ``\gls{seal}'') and letter ordering +(which places ``\gls{seal}'' before ``\gls{sealion}''). + + + +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%</sample-inline.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*sample-langdict.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +\documentclass[english,french]{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{babel} +\usepackage[nomain]{glossaries} + +\newglossary[glg]{english}{gls}{glo}{English to French} +\newglossary[flg]{french}{fls}{flo}{French to English} + +\makeglossaries + + % \newword{label}{english}{determiner}{french} +\newcommand*{\newword}[4]{% + \newglossaryentry{en-#1}{type=english,name={#2},description={#3 #4}}% + \newglossaryentry{fr-#1}{type=french,name={#3 #4},text={#4},sort={#4},description={#2}}% +} + +\newword{cat}{cat}{le}{chat} +\newword{mat}{mat}{la}{natte} + +\begin{document} +\selectlanguage{english} +The \gls{en-cat} sat on the \gls{en-mat}. + +\selectlanguage{french} +Le \gls{fr-cat} s'est repos\'e sur la \gls{fr-mat}. + +\selectlanguage{english} +\printglossary[type=english] + +\selectlanguage{french} +\printglossary[type=french] +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%</sample-langdict.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*sample-mfirstuc.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +\documentclass{article} + +\usepackage{mfirstuc} + +\begin{document} + +\makefirstuc{abc}. + +\makefirstuc{{\em abc}}. + +\makefirstuc{\emph{abc}}. + +\makefirstuc{\ae bc}. + +\makefirstuc{{\ae}bc}. + +\newcommand{\abc}{abc}% +\xmakefirstuc{\abc}. + +\capitalisewords{a book of rhyme.} + +\capitalisewords{a book\space of rhyme.} + +\newcommand{\mytitle}{a book\space of rhyme.} +\capitalisewords{\mytitle} + +\xcapitalisewords{\mytitle} + + +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%</sample-mfirstuc.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*sample-numberlist.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[savenumberlist,counter=chapter]{glossaries} + +\makeglossaries + +\newglossaryentry{sample}{name=sample,description=an example} + +\begin{document} +\chapter{Introduction} + +This is a \glsentryname{sample} document. \Glsentryplural{sample} +are discussed in chapters~\glsdisplaynumberlist{sample}. + +\chapter{Sample Documents} + +\Gls{sample} documents are provided for testing and illustration +purposes. + +\chapter{More About Samples} + +Here's more information about \glspl{sample}. + +\chapter{Another chapter} + +A chapter about something else. + +\chapter{Another About Samples} + +Here's some more information about \glspl{sample}. + +\printglossaries +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%</sample-numberlist.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*sample.tex> % \end{macrocode} %\fi @@ -17206,13 +18334,15 @@ one \gls[format=hyperbf]{svm}. \usepackage{amsmath} \usepackage[colorlinks]{hyperref} -\usepackage[style=long3colheader,counter=equation]{glossaries} +\usepackage[toc,ucmark,style=long3colheader,counter=equation]{glossaries} \makeglossaries \newcommand{\erf}{\operatorname{erf}} \newcommand{\erfc}{\operatorname{erfc}} +\pagestyle{headings} + % redefine the way hyperref creates the target for equations % so that the glossary links to equation numbers work diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index 1fff61cf90b..91f62e20856 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 2011/4/13 19:39 +% glossaries.ins generated using makedtx version 0.94b 2012/5/21 14:06 \input docstrip \preamble glossaries.dtx - Copyright 2011 Nicola Talbot + Copyright 2012 Nicola Talbot This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -18,7 +18,7 @@ The Current Maintainer of this work is Nicola Talbot. - This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. + This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, mfirstuc.sty, glossary-hypernav.sty, glossary-inline.sty, glossary-list.sty, glossary-long.sty, glossary-longragged.sty, glossary-mcols.sty, glossary-super.sty, glossary-superragged.sty, glossary-tree.sty, glossaries-compatible-207.sty, glossaries-accsupp.sty, glossaries-babel.sty, glossaries-polyglossia.sty, glossaries-dictionary-Brazilian.dict, glossaries-dictionary-Danish.dict, glossaries-dictionary-Dutch.dict, glossaries-dictionary-English.dict, glossaries-dictionary-French.dict, glossaries-dictionary-German.dict, glossaries-dictionary-Irish.dict, glossaries-dictionary-Italian.dict, glossaries-dictionary-Magyar.dict, glossaries-dictionary-Polish.dict, glossaries-dictionary-Serbian.dict, glossaries-dictionary-Spanish.dict, minimalgls.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dual.tex, sample-inline.tex, sample-langdict.tex, sample-mfirstuc.tex, sample-numberlist.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleNtn.tex, sampleSec.tex, sampletree.tex, sampleutf8.tex, samplexdy-compatible207.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl. \endpreamble @@ -30,12 +30,16 @@ \usepostamble\defaultpostamble\from{glossaries.dtx}{mfirstuc.sty,package}} \file{glossary-hypernav.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-hypernav.sty,package}} +\file{glossary-inline.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-inline.sty,package}} \file{glossary-list.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-list.sty,package}} \file{glossary-long.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-long.sty,package}} \file{glossary-longragged.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-longragged.sty,package}} +\file{glossary-mcols.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-mcols.sty,package}} \file{glossary-super.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries.dtx}{glossary-super.sty,package}} \file{glossary-superragged.sty}{\usepreamble\defaultpreamble @@ -78,6 +82,10 @@ \file{sample-crossref.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-crossref.tex}} \file{sample-custom-acronym.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-custom-acronym.tex}} \file{sample-dual.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-dual.tex}} +\file{sample-inline.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-inline.tex}} +\file{sample-langdict.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-langdict.tex}} +\file{sample-mfirstuc.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-mfirstuc.tex}} +\file{sample-numberlist.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-numberlist.tex}} \file{sample.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample.tex}} \file{sample4col.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample4col.tex}} \file{sampleaccsupp.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleaccsupp.tex}} |