diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-08 00:35:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-08 00:35:57 +0000 |
commit | 288b7a34a38e9ddb9e922faa48c3efddbde0a944 (patch) | |
tree | bd3dd9c94d8634bbb6a7f9a135bc743b29f493d1 /Master/texmf-dist/source/latex/glossaries | |
parent | 74c86512e4cc5779dba32690fc8d90644d988696 (diff) |
glossaries (7mar14)
git-svn-id: svn://tug.org/texlive/trunk@33119 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 | 1744 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.ins | 6 |
2 files changed, 1643 insertions, 107 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index ea52d610f09..b924ebf41da 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -28,7 +28,7 @@ % -author "Nicola Talbot" % -codetitle "Main Package Code" % glossaries -% Created on 2014/1/20 17:22 +% Created on 2014/3/7 17:43 %\fi %\iffalse %<*package> @@ -138,7 +138,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{17824} +\CheckSum{18645} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -166,12 +166,12 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{Documented Code For glossaries v4.03} +% \title{Documented Code For glossaries v4.04} % \author{Nicola L.C. Talbot\\[10pt] %Dickimaw Books\\ %\url{http://www.dickimaw-books.com/}} % -% \date{2014-01-20} +% \date{2014-03-06} % \maketitle % %This is the documented code for the \styfmt{glossaries} package. @@ -187,7 +187,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of %glossaries package}. % %\item[\url{glossaries-user.pdf}] -%For the main user guide, read \qt{glossaries.sty v4.03: +%For the main user guide, read \qt{glossaries.sty v4.04: %\LaTeX2e\ Package to Assist Generating Glossaries}. % %\item[\url{mfirstuc-manual.pdf}] @@ -231,7 +231,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2014/01/20 v4.03 (NLCT)] +\ProvidesPackage{glossaries}[2014/03/06 v4.04 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -727,6 +727,13 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{option} % +%\begin{macro}{\@glo@default@sorttype} +% Initialise default sort for \cs{printnoidxglossary} +% \begin{macrocode} +\newcommand*{\@glo@default@sorttype}{standard} +% \end{macrocode} +%\end{macro} +% %\begin{option}{sort} %\changes{3.0}{2011/04/02}{new} % Define the sort method: \pkgopt[standard]{sort} (default), @@ -734,6 +741,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \pkgopt[use]{sort} (order of use). % \begin{macrocode} \define@choicekey{glossaries.sty}{sort}{standard,def,use}{% + \renewcommand*{\@glo@default@sorttype}{#1}% \csname @gls@setupsort@#1\endcsname } % \end{macrocode} @@ -1199,6 +1207,37 @@ false,nolabel,autolabel,nameref}[nolabel]{% } % \end{macrocode} %\end{option} +% +% +%\begin{macro}{\@gls@warnonglossdefined} +%\changes{4.04}{2014-03-06}{new} +% Issue a warning if overriding \cs{printglossary} +% \begin{macrocode} +\newcommand*{\@gls@warnonglossdefined}{% + \GlossariesWarning{Overriding \string\printglossary}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@gls@warnontheglossdefined} +%\changes{4.04}{2014-03-06}{new} +% Issue a warning if overriding \env{theglossary} +% \begin{macrocode} +\newcommand*{\@gls@warnontheglossdefined}{% + \GlossariesWarning{Overriding `theglossary' environment}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{option}{noredefwarn} +% Suppress warning on redefinition of \cs{printglossary} +% \begin{macrocode} +\@gls@declareoption{noredefwarn}{% + \renewcommand*{\@gls@warnonglossdefined}{}% + \renewcommand*{\@gls@warnontheglossdefined}{}% +} +% \end{macrocode} +%\end{option} +% % As from version 3.08a, the only information written to the external % glossary files are the label and sort values. Therefore, now, the % only sanitize option that makes sense is the one for the sort key. @@ -1303,13 +1342,106 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \begin{macrocode} \newcommand*{\@gls@sanitizesort}{% \ifglssanitizesort - \@onelevel@sanitize\@glo@sort + \@@gls@sanitizesort \else + \@@gls@nosanitizesort \fi } % \end{macrocode} %\end{macro} % +%\begin{macro}{\@@gls@sanitizesort} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*\@@gls@sanitizesort{% + \@onelevel@sanitize\@glo@sort +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@gls@nosanitizesort} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*{\@@gls@nosanitizesort}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@gls@noidx@sanitizesort} +%\changes{4.04}{2014-03-06}{new} +% Remove braces around first character (if present) before +% sanitizing. +% \begin{macrocode} +\newcommand*\@gls@noidx@sanitizesort{% + \ifdefvoid\@glo@sort + {}% + {% + \expandafter\@@gls@noidx@sanitizesort\@glo@sort\gls@end@sanitizesort + }% +} +\def\@@gls@noidx@sanitizesort#1#2\gls@end@sanitizesort{% + \def\@glo@sort{#1#2}% + \@onelevel@sanitize\@glo@sort +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@gls@noidx@nosanitizesort} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*{\@@gls@noidx@nosanitizesort}{% + \ifdefvoid\@glo@sort + {}% + {% + \expandafter\@@gls@noidx@no@sanitizesort\@glo@sort\gls@end@sanitizesort + }% +} +\def\@@gls@noidx@no@sanitizesort#1#2\gls@end@sanitizesort{% + \bgroup + \glsnoidxstripaccents + \protected@xdef\@@glo@sort{#1#2}% + \egroup + \let\@glo@sort\@@glo@sort +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsnoidxstripaccents} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*\glsnoidxstripaccents{% + \let\IeC\@firstofone + \let\'\@firstofone + \let\`\@firstofone + \let\^\@firstofone + \let\"\@firstofone + \let\u\@firstofone + \let\t\@firstofone + \let\d\@firstofone + \let\r\@firstofone + \let\=\@firstofone + \let\.\@firstofone + \let\~\@firstofone + \let\v\@firstofone + \let\H\@firstofone + \let\c\@firstofone + \let\b\@firstofone + \def\AE{AE}% + \def\ae{ae}% + \def\OE{OE}% + \def\oe{oe}% + \def\AA{AA}% + \def\aa{aa}% + \def\L{L}% + \def\l{l}% + \def\O{O}% + \def\o{o}% + \def\SS{SS}% + \def\ss{ss}% + \def\th{th}% +} +% \end{macrocode} +%\end{macro} +% % Before defining the \pkgopt{sanitize} package option, The % key-value list for the \pkgopt{sanitize} value needs to be defined. % These are all boolean keys. If they are not given a value, assume @@ -1355,8 +1487,16 @@ false,nolabel,autolabel,nameref}[nolabel]{% \define@boolkey{glossaries.sty}[gls]{sanitizesort}[true]{% \ifglssanitizesort \glssetnoexpandfield{sortvalue}% + \renewcommand*{\@gls@noidx@setsanitizesort}{% + \glssanitizesorttrue + \glssetnoexpandfield{sortvalue}% + }% \else \glssetexpandfield{sortvalue}% + \renewcommand*{\@gls@noidx@setsanitizesort}{% + \glssanitizesortfalse + \glssetexpandfield{sortvalue}% + }% \fi } % \end{macrocode} @@ -1367,6 +1507,17 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{option} % +%\begin{macro}{\@gls@noidx@setsanitizesort} +% Default behaviour for \ics{makenoidxglossaries} is +% sanitizesort=false. +% \begin{macrocode} +\newcommand*{\@gls@noidx@setsanitizesort}{% + \glssanitizesortfalse + \glssetexpandfield{sortvalue}% +} +% \end{macrocode} +%\end{macro} +% % \begin{macrocode} \define@choicekey[gls]{sanitize}{sort}{true,false}[true]{% \setbool{glssanitizesort}{#1}% @@ -3420,7 +3571,9 @@ name=true]{% %\end{macro} % %\begin{macro}{\ifglshasparent} -% \cs{ifglshaschildren}\marg{label}\marg{true part}\marg{false part} +%\begin{definition} +% \cs{ifglshasparent}\marg{label}\marg{true part}\marg{false part} +%\end{definition} %\changes{3.02}{2012/05/21}{new} %\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} @@ -3994,8 +4147,10 @@ name=true]{% % \begin{macrocode} \newcommand*{\gls@checkseeallowed}{% \PackageError{glossaries}% - {`see' key may only be used after \string\makeglossaries}% - {You must use \string\makeglossaries\space before defining + {`see' key may only be used after \string\makeglossaries\space + or \string\makenoidxglossaries}% + {You must use \string\makeglossaries\space + or \string\makenoidxglossaries\space before defining any entries that have a `see' key}% } % \end{macrocode} @@ -4377,7 +4532,7 @@ name=true]{% \let\newglossaryentry\new@glossaryentry } \AtEndDocument{\ifdef\@gls@deffile{\closeout\@gls@deffile}{}} -% \end{macrocode} +% \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@writedef} @@ -5024,15 +5179,17 @@ name=true]{% \csname glo@\@glo@label @flagfalse\endcsname % \end{macrocode} % Sort out any cross-referencing if required. +%\changes{4.04}{2014-03-06}{replaced \cs{ifx} with \cs{ifdefvoid}} % \begin{macrocode} - \ifx\@glo@see\@empty - \else + \ifdefvoid\@glo@see + {}% + {% \protected@edef\@do@glssee{% \noexpand\@gls@fixbraces\noexpand\@glo@list\@glo@see \noexpand\@nil \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{\@glo@label}}% \@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 @@ -5995,12 +6152,12 @@ name=true]{% \noexpand\ifcsdef{gls@#1@displayfirst}% {% \noexpand\@@gls@default@entryfmt - {\noexpand\csuse{gls@#1@displayfirst}} + {\noexpand\csuse{gls@#1@displayfirst}}% {\noexpand\csuse{gls@#1@display}}% }% {% \noexpand\@@gls@default@entryfmt - {\noexpand\glsdisplayfirst} + {\noexpand\glsdisplayfirst}% {\noexpand\csuse{gls@#1@display}}% }% }% @@ -6023,13 +6180,16 @@ name=true]{% \noexpand\ifcsdef{gls@#1@display}% {% \noexpand\@@gls@default@entryfmt - {\noexpand\csuse{gls@#1@displayfirst}} + {\noexpand\csuse{gls@#1@displayfirst}}% {\noexpand\csuse{gls@#1@display}}% }% {% +% \end{macrocode} +%\changes{4.04}{2014-03-06}{fixed unwanted space} +% \begin{macrocode} \noexpand\@@gls@default@entryfmt {\noexpand\csuse{gls@#1@displayfirst}}% - {\noexpand\glsdisplay} + {\noexpand\glsdisplay}% }% }% }% @@ -6252,7 +6412,7 @@ name=true]{% \ifthenelse{\equal{\@gls@counter}{equation}}% { % \end{macrocode} -% If we in \env{align} environment, \cs{xatlevel@} will be defined. +% If we're in \env{align} environment, \cs{xatlevel@} will be defined. % (Can't test for \cs{@currenvir} as may be inside an inner % environment.) % \begin{macrocode} @@ -10028,6 +10188,11 @@ name=true]{% % \begin{macrocode} \def\writeist{% % \end{macrocode} +% Define write register if not already defined +%\changes{4.04}{2014-03-06}{checked for definition of \cs{glswrite}} +% \begin{macrocode} + \ifundef{\glswrite}{\newwrite\glswrite}{}% +% \end{macrocode} % Update attributes list % \begin{macrocode} \@gls@addpredefinedattributes @@ -10277,12 +10442,14 @@ name=true]{% % \end{macrocode} % Code to use if \app{makeindex} is required. %\changes{2.01}{2009 May 30}{removed item\_02 - no such makeindex key} +%\changes{4.04}{2014-03-06}{checked for definition of \cs{glswrite}} % \begin{macrocode} \edef\@gls@actualchar{\string?} \edef\@gls@encapchar{\string|} \edef\@gls@levelchar{\string!} \edef\@gls@quotechar{\string"} \def\writeist{\relax + \ifundef{\glswrite}{\newwrite\glswrite}{}\relax \openout\glswrite=\istfilename \write\glswrite{\expandafter\@gobble\string\% makeindex style file created by the glossaries package} @@ -10424,10 +10591,12 @@ name=true]{% %\begin{macro}{\warn@nomakeglossaries} % Issue warning that \cs{makeglossaries} hasn't been used. % \begin{macrocode} -\newcommand*{\warn@nomakeglossaries}{% - \GlossariesWarningNoLine{\string\makeglossaries\space - hasn't been used,^^Jthe glossaries will not be updated}% -} +\newcommand*{\@warn@nomakeglossaries}{} +% \end{macrocode} +% Only use this if warning if \cs{printglossary} has been used +% without \cs{makeglossaries} +% \begin{macrocode} +\newcommand*{\warn@nomakeglossaries}{\@warn@nomakeglossaries} % \end{macrocode} %\end{macro} % @@ -10440,6 +10609,13 @@ name=true]{% % \begin{macrocode} \newcommand*{\makeglossaries}{% % \end{macrocode} +% Define the write used for style file also used for all other output files +% if \pkgopt[true]{savewrites}. +%\changes{4.04}{2014-03-06}{Moved definition of \cs{glswrite} to +%\cs{makeglossaries}} +% \begin{macrocode} + \ifundef{\glswrite}{\newwrite\glswrite}{}% +% \end{macrocode} %\changes{3.10a}{2013-10-13}{Added providecommand code to aux file} % If the user removes the glossary package from their document, % ensure the next run doesn't throw a load of undefined control @@ -10487,6 +10663,15 @@ name=true]{% % \begin{macrocode} \let\warn@nomakeglossaries\relax % \end{macrocode} +% Activate warning about missing \cs{printglossary} +% \begin{macrocode} + \def\warn@noprintglossary{% + \GlossariesWarningNoLine{No \string\printglossary\space + or \string\printglossaries\space + found.^^J(Remove \string\makeglossaries\space if you don't want + any glossaries.)^^JThis document will not have a glossary}% + }% +% \end{macrocode} % Declare list parser for \cs{glsdisplaynumberlist} %\changes{3.02}{2012/05/21}{added list parser} % \begin{macrocode} @@ -10495,6 +10680,16 @@ name=true]{% {\noexpand\glsnumlistparser}{\delimN}}% \@gls@dodeflistparser \fi +% \end{macrocode} +% Prevent user from also using \cs{makenoidxglossaries} +% \begin{macrocode} + \let\makenoidxglossaries\@no@makeglossaries +% \end{macrocode} +% Prohibit sort key in printgloss family: +% \begin{macrocode} + \renewcommand*{\@printgloss@setsort}{% + \let\@glo@assign@sortkey\@glo@no@assign@sortkey + }% } % \end{macrocode} %\changes{4.02}{2013-13-05}{made preamble only} @@ -10503,6 +10698,10 @@ name=true]{% \@onlypreamble{\makeglossaries} % \end{macrocode} %\end{macro} +%\begin{macro}{\glswrite} +% The definition of \cs{glswrite} has now been moved to +% \cs{makeglossaries} so that it's only defined if needed. +%\end{macro} % % The \cs{makeglossary} command is redefined to be % identical to \cs{makeglossaries}. (This is done to @@ -10525,16 +10724,260 @@ name=true]{% } % \end{macrocode} % -%\subsection{Writing information to associated files} +%\begin{macro}{\makenoidxglossaries} +%\changes{4.04}{2014-03-06}{new} +% Analogous to \cs{makeglossaries} this activates the commands +% needed for \cs{printnoidxglossary} +% \begin{macrocode} +\newcommand*{\makenoidxglossaries}{% +% \end{macrocode} +% Redefine empty glossary warning: +% \begin{macrocode} + \renewcommand{\@gls@noref@warn}[1]{% + \GlossariesWarning{Empty glossary for + \string\printnoidxglossary[type={##1}]. + Rerun may be required (or you may have forgotten to use + commands like \string\gls).}% + }% +% \end{macrocode} +% Don't escape makeindex/xindy characters +% \begin{macrocode} + \let\@gls@checkmkidxchars\@gobble +% \end{macrocode} +% Write glossary information to aux instead of glossary files +% \begin{macrocode} + \let\@@do@@wrglossary\gls@noidxglossary +% \end{macrocode} +% Switch on group headings that use the character code: +% \begin{macrocode} + \let\@gls@getgrouptitle\@gls@noidx@getgrouptitle +% \end{macrocode} +% Allow \gloskey{see} key: +% \begin{macrocode} + \let\gls@checkseeallowed\relax +% \end{macrocode} +% Redefine cross-referencing macro: +% \begin{macrocode} + \renewcommand{\@do@seeglossary}[2]{% + \edef\@gls@label{\glsdetoklabel{##1}}% + \protected@write\@auxout{}{% + \string\@gls@reference + {\csname glo@\@gls@label @type\endcsname}% + {\@gls@label}% + {% + \string\glsseeformat##2{}% + }% + }% + }% +% \end{macrocode} +% If user removes the glossaries package from their document, ensure +% the next run doesn't throw a load of undefined control sequence +% errors when the aux file is parsed. +% \begin{macrocode} + \AtBeginDocument + {% + \write\@auxout{\string\providecommand\string\@gls@reference[3]{}}% + }% +% \end{macrocode} +% Change warning about no glossares +% \begin{macrocode} + \def\warn@noprintglossary{% + \GlossariesWarningNoLine{No \string\printnoidxglossary\space + or \string\printnoidxglossaries ^^J + found. (Remove \string\makenoidxglossaries\space if you + don't want any glossaries.)^^JThis document will not have a glossary}% + }% +% \end{macrocode} +% Suppress warning about no \cs{makeglossaries} +% \begin{macrocode} + \let\warn@nomakeglossaries\relax +% \end{macrocode} +% Prevent user from also using \cs{makeglossaries} +% \begin{macrocode} + \let\makeglossaries\@no@makeglossaries +% \end{macrocode} +% Allow sort key in printgloss family: +% \begin{macrocode} + \renewcommand*{\@printgloss@setsort}{% + \let\@glo@assign@sortkey\@@glo@assign@sortkey +% \end{macrocode} +% Initialise default sort order: +% \begin{macrocode} + \def\@glo@sorttype{\@glo@default@sorttype}% + }% +% \end{macrocode} +% All entries must be defined in the preamble: +% \begin{macrocode} + \renewcommand*\new@glossaryentry[2]{% + \PackageError{glossaries}{Glossary entries must be + defined in the preamble^^Jwhen you use + \string\makenoidxglossaries}% + {Either move your definitions to the preamble or use + \string\makeglossaries}% + }% +% \end{macrocode} +% Redefine \ics{glsentrynumberlist} +% \begin{macrocode} + \renewcommand*{\glsentrynumberlist}[1]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{##1}@loclist}% + \ifdef\@gls@loclist + {% + \glsnoidxloclist{\@gls@loclist}% + }% + {% + \ifglsentryexists{##1}% + {% + \GlossariesWarning{Missing location list for `##1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + {% + \PackageError{glossaries}{Glossary entry `##1' has not been + defined.}{}% + }% + }% + }% +% \end{macrocode} +% Redefine \ics{glsdisplaynumberlist} +% \begin{macrocode} + \renewcommand*{\glsdisplaynumberlist}[1]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{##1}@loclist}% + \ifdef\@gls@loclist + {% + \def\@gls@noidxloclist@sep{% + \def\@gls@noidxloclist@sep{% + \def\@gls@noidxloclist@sep{% + \glsnumlistsep + }% + \def\@gls@noidxloclist@finalsep{\glsnumlistlastsep}% + }% + }% + \def\@gls@noidxloclist@finalsep{}% + \def\@gls@noidxloclist@prev{}% + \forlistloop{\glsnoidxdisplayloclisthandler}{\@gls@loclist}% + \@gls@noidxloclist@finalsep + \@gls@noidxloclist@prev + }% + {% + ??\ifglsentryexists{##1}% + {% + \GlossariesWarning{Missing location list for `##1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + {% + \PackageError{glossaries}{Glossary entry `##1' has not been + defined.}{}% + }% + }% + }% +% \end{macrocode} +% Provide a generic way of iterating through the number list: +% \begin{macrocode} + \renewcommand*{\glsnumberlistloop}[3]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{##1}@loclist}% + \let\@gls@org@glsnoidxdisplayloc\glsnoidxdisplayloc + \let\@gls@org@glsseeformat\glsseeformat + \let\glsnoidxdisplayloc##2\relax + \let\glsseeformat##3\relax + \ifdef\@gls@loclist + {% + \forlistloop{\glsnoidxnumberlistloophandler}{\@gls@loclist}% + }% + {% + \ifglsentryexists{##1}% + {% + \GlossariesWarning{Missing location list for `##1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + {% + \PackageError{glossaries}{Glossary entry `##1' has not been + defined.}{}% + }% + }% + \let\glsnoidxdisplayloc\@gls@org@glsnoidxdisplayloc + \let\glsseeformat\@gls@org@glsseeformat + }% +% \end{macrocode} +% Modify sanitize sort function +% \begin{macrocode} + \let\@@gls@sanitizesort\@gls@noidx@sanitizesort + \let\@@gls@nosanitizesort\@@gls@noidx@nosanitizesort + \@gls@noidx@setsanitizesort +} +% \end{macrocode} +% Preamble-only command: +% \begin{macrocode} +\@onlypreamble{\makenoidxglossaries} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsnumberlistloop} +%\begin{definition} +%\cs{glsnumberlistloop}\marg{label}\marg{handler} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glsnumberlistloop}[2]{% + \PackageError{glossaries}{\string\glsnumberlistloop\space + only works with \string\makenoidxglossaries}{}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsnoidxnumberlistloophandler} +% Handler macro for \cs{glsnumberlistloop}. +% (The argument should be in the form +% \cs{glsnoidxdisplayloc}\marg{prefix}\marg{counter}\marg{format}\marg{n}) +% \begin{macrocode} +\newcommand*{\glsnoidxnumberlistloophandler}[1]{% + #1% +} +% \end{macrocode} +%\end{macro} % +%\begin{macro}{\@no@makeglossaries} +%\changes{4.04}{2014-03-06}{new} +% Can't use both \cs{makeglossaries} and \cs{makenoidxglossaries} +% \begin{macrocode} +\newcommand*{\@no@makeglossaries}{% + \PackageError{glossaries}{You can't use both + \string\makeglossaries\space and \string\makenoidxglossaries}% + {Either use one or other (or none) of those commands but not both + together.}% +} +% \end{macrocode} +%\end{macro} % -%\begin{macro}{\glswrite} -% The write used for style file also used for all other output files -% if \pkgopt[true]{savewrites}. +%\begin{macro}{\@gls@noref@warn} +%\changes{4.04}{2014-03-06}{new} +% Warning when no instances of \cs{@gls@reference} found. % \begin{macrocode} -\newwrite\glswrite +\newcommand{\@gls@noref@warn}[1]{% + \GlossariesWarning{\string\makenoidxglossaries\space + is required to make \string\printnoidxglossary[type={#1}] work}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\gls@noidxglossary} +% Write the glossary information to the aux file: +% \begin{macrocode} +\newcommand*{\gls@noidxglossary}{% + \protected@write\@auxout{}{% + \string\@gls@reference + {\csname glo@\@gls@label @type\endcsname}% + {\@gls@label}% + {\string\glsnoidxdisplayloc + {\@glo@counterprefix}% + {\@gls@counter}% + {\@glsnumberformat}% + {\@glslocref}% + }% + }% +} % \end{macrocode} %\end{macro} +% +%\subsection{Writing information to associated files} +% +% %\begin{macro}{\istfile} %\changes{3.0}{2011/04/02}{deprecated} % Deprecated. @@ -10787,7 +11230,7 @@ you % the hyper prefix. %\changes{3.0}{2011/04/02}{added check for hyper location prefix} % \begin{macrocode} - \expandafter\ifx\theHglsentrycounter\theglsentrycounter + \expandafter\ifx\theHglsentrycounter\theglsentrycounter\relax \def\@glo@counterprefix{}% \else \protected@edef\@glsHlocref{\theHglsentrycounter}% @@ -10803,6 +11246,17 @@ you % \begin{macrocode} \edef\@gls@label{\glsdetoklabel{#1}}% % \end{macrocode} +% Write the information to file: +% \begin{macrocode} + \@@do@@wrglossary +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@do@@wrglossary} +% \begin{macrocode} +\newcommand*{\@@do@@wrglossary}{% +% \end{macrocode} % Determine whether to use \app{xindy} or \app{makeindex} % syntax % \begin{macrocode} @@ -10875,6 +11329,17 @@ you \fi }% \@gls@get@counterprefix#2.#1\end@getprefix +% \end{macrocode} +% Warn if no prefix can be formed. +%\changes{4.04}{2014-0304}{added warning if no prefix can be formed} +% \begin{macrocode} + \ifx\@glo@counterprefix\@empty + \GlossariesWarning{Hyper target `#2' can't be formed by + prefixing^^Jlocation `#1'. You need to modify the + definition of \string\theH\@gls@counter^^Jotherwise you + will get the warning: "`name{\@gls@counter.#1}' has been^^J + referenced but does not exist"}% + \fi \fi } % \end{macrocode} @@ -10917,13 +11382,21 @@ you % \begin{macrocode} \def\@gls@fixbraces#1#2#3\@nil{% \ifx#2[\relax - \def#1{#2#3}% + \@@gls@fixbraces#1#2#3\@end@fixbraces \else \def#1{{#2#3}}% \fi } % \end{macrocode} %\end{macro} +%\begin{macro}{\@@gls@fixbraces} +% \begin{macrocode} +\def\@@gls@fixbraces#1[#2]#3\@end@fixbraces{% + \def#1{[#2]{#3}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glssee} %\cs{glssee}\marg{label}\marg{cross-ref list} %\changes{1.17}{2008 December 26}{new} @@ -11051,15 +11524,12 @@ you %\begin{macro}{\warn@noprintglossary} % Warn the user if they have forgotten \ics{printglossaries} % or \ics{printglossary}. (Will be suppressed if there is at -% least one occurance of \ics{printglossary}. There is no check +% least one occurrence of \ics{printglossary}. There is no check % to ensure that there is a \ics{printglossary} for each defined % glossary.) +%\changes{4.04}{2014-03-06}{Activate warning in \cs{makeglossaries}} % \begin{macrocode} -\def\warn@noprintglossary{% - \GlossariesWarningNoLine{No \string\printglossary\space - or \string\printglossaries\space - found.^^JThis document will not have a glossary}% -} +\newcommand*{\warn@noprintglossary}{}% % \end{macrocode} %\end{macro} % @@ -11081,14 +11551,79 @@ you % If \cs{printglossary} is already defined, issue a warning % and undefine it. % \begin{macrocode} - \GlossariesWarning{Overriding \string\printglossary}% + \@gls@warnonglossdefined \undef\printglossary } % \end{macrocode} % \cs{printglossary} has an optional argument. The default % value is to set the glossary type to the main glossary. +%\changes{4.04}{2014-03-06}{changed to use new \cs{@printglossary}} % \begin{macrocode} \newcommand*{\printglossary}[1][type=\glsdefaulttype]{% + \@printglossary{#1}{\@print@glossary}% +} +% \end{macrocode} +%\end{macro} +% +% The \cs{printglossaries} command will do \cs{printglossary} +% for each glossary type that has been defined. It is better +% to use \cs{printglossaries} rather than individual +% \cs{printglossary} commands to ensure that you don't forget +% any new glossaries you may have created. It also makes it easier to +% chop and change the value of the \pkgopt{acronym} package option. +% However, if you want to list the glossaries in a different order, +% or if you want to set the title or table of contents entry, or +% if you want to use different glossary styles for each glossary, you +% will need to use \cs{printglossary} explicitly for each +% glossary type. +%\begin{macro}{\printglossaries} +% \begin{macrocode} +\newcommand*{\printglossaries}{% + \forallglossaries{\@@glo@type}{\printglossary[type=\@@glo@type]}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\printnoidxglossary} +%\changes{4.04}{2014-03-06}{new} +% Provide an alternative to \cs{printglossary} that doesn't require +% an external indexing application. Entries won't be sorted and the +% location list will be empty. +% \begin{macrocode} +\newcommand*{\printnoidxglossary}[1][type=\glsdefaulttype]{% + \@printglossary{#1}{\@print@noidx@glossary}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\printnoidxglossaries} +% Analogous to \cs{printglossaries} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*{\printnoidxglossaries}{% + \forallglossaries{\@@glo@type}{\printnoidxglossary[type=\@@glo@type]}% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\@printgloss@setsort} +% Initialise to do nothing. +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*{\@printgloss@setsort}{} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\@printglossary} +%\changes{4.04}{2014-03-06}{new} +% Sets up the glossary for either \cs{printglossary} or +% \cs{printnoidxglossary}. The first argument is the options list, +% the second argument is the handler macro that +% deals with the actual glossary. +% \begin{macrocode} +\newcommand{\@printglossary}[2]{% % \end{macrocode} % Set up defaults. % \begin{macrocode} @@ -11111,6 +11646,10 @@ you % \begin{macrocode} \bgroup % \end{macrocode} +% Activate or deactivate sort key: +% \begin{macrocode} + \@printgloss@setsort +% \end{macrocode} % Determine settings specified in the optional argument. % \begin{macrocode} \setkeys{printgloss}{#1}% @@ -11170,15 +11709,42 @@ you \gls@org@glossarysubentryfield{##1}{##2}% }% % \end{macrocode} +% Now do the handler macro that deals with the actual glossary: +% \begin{macrocode} + #2% +% \end{macrocode} +% End the current scope +% \begin{macrocode} + \egroup +% \end{macrocode} +% Reset \ics{glossaryentrynumbers} +% \begin{macrocode} + \global\let\glossaryentrynumbers\@org@glossaryentrynumbers +% \end{macrocode} +% Suppress warning about no \ics{printglossary} +%\changes{2.02}{2007 July 13}{suppressed warning globally rather than locally} +% \begin{macrocode} + \global\let\warn@noprintglossary\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@print@glossary} +%\changes{4.04}{2014-03-06}{new} +% Internal workings of \cs{printglossary} dealing with reading the +% external file. +% \begin{macrocode} +\newcommand{\@print@glossary}{% +% \end{macrocode} % Some macros may end up being expanded into internals in the % glossary, so need to make @ a letter. (Unlikely to be a problem % since v3.08a but kept for backward compatibility.) % \begin{macrocode} - \makeatletter + \makeatletter % \end{macrocode} % Input the glossary file, if it exists. % \begin{macrocode} - \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% + \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% % \end{macrocode} % If the glossary file doesn't exist, do \cs{null}. (This ensures % that the page is shipped out and all write commands are done.) @@ -11197,86 +11763,677 @@ you %\changes{3.04}{2012-11-18}{Moved aux write to end of document to %prevent unwanted whatsit occurring here.} % \begin{macrocode} - \ifglsxindy - \ifcsundef{@xdy@\@glo@type @language}% - {% - \edef\@do@auxoutstuff{% - \noexpand\AtEndDocument{% + \ifglsxindy + \ifcsundef{@xdy@\@glo@type @language}% + {% + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% % \end{macrocode} %\changes{3.10a}{2013-10-13}{Added providecommand code to aux file} % If the user removes the glossary package from their document, % ensure the next run doesn't throw a load of undefined control % sequence errors when the aux file is parsed. % \begin{macrocode} - \noexpand\immediate\noexpand\write\@auxout{% - \string\providecommand\string\@xdylanguage[2]{}}% - \noexpand\immediate\noexpand\write\@auxout{% - \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}% - }% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@xdylanguage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}% }% }% - {% - \edef\@do@auxoutstuff{% - \noexpand\AtEndDocument{% - \noexpand\immediate\noexpand\write\@auxout{% - \string\providecommand\string\@xdylanguage[2]{}}% - \noexpand\immediate\noexpand\write\@auxout{% - \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type - @language\endcsname}}% - }% - }% - }% - \@do@auxoutstuff + }% + {% \edef\@do@auxoutstuff{% \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@xdylanguage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type + @language\endcsname}}% + }% + }% + }% + \@do@auxoutstuff + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% % \end{macrocode} %\changes{3.10a}{2013-10-13}{Added providecommand code to aux file} -% If the user removes the glossary package from their document, +% If the user removes the glossaries package from their document, % ensure the next run doesn't throw a load of undefined control % sequence errors when the aux file is parsed. % \begin{macrocode} - \noexpand\immediate\noexpand\write\@auxout{% - \string\providecommand\string\@gls@codepage[2]{}}% - \noexpand\immediate\noexpand\write\@auxout{% - \string\@gls@codepage{\@glo@type}{\gls@codepage}}% - }% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@gls@codepage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@gls@codepage{\@glo@type}{\gls@codepage}}% }% - \@do@auxoutstuff - \fi + }% + \@do@auxoutstuff + \fi +% \end{macrocode} +% Activate warning if \cs{makeglossaries} hasn't been used. +% \begin{macrocode} + \renewcommand*{\@warn@nomakeglossaries}{% + \GlossariesWarningNoLine{\string\makeglossaries\space + hasn't been used,^^Jthe glossaries will not be updated}% + }% +} +% \end{macrocode} +%\end{macro} +% +% The sort macros all have the syntax: +%\begin{definition} +%\cs{@glo@sortmacro@\meta{order}}\marg{type} +%\end{definition} +% where \meta{order} is the sort order as specified by the sort key +% and \meta{type} is the glossary type. (The referenced entry list +% is stored in \cs{@glsref@\meta{type}.} The actual sorting is done +% by \cs{@glo@sortentries}\marg{handler}\marg{type}. +% +%\begin{macro}{\@glo@sortentries} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*{\@glo@sortentries}[2]{% + \def\@glo@sortinglist{}% + \def\@glo@sortinghandler{#1}% + \edef\@glo@type{#2}% + \forlistcsloop{\@glo@do@sortentries}{@glsref@#2}% + \csdef{@glsref@#2}{}% + \@for\@this@label:=\@glo@sortinglist\do{% +% \end{macrocode} +% Has this entry already been added? +% \begin{macrocode} + \xifinlistcs{\@this@label}{@glsref@#2}% + {}% + {% + \listcsxadd{@glsref@#2}{\@this@label}% + }% + \ifcsdef{@glo@sortingchildren@\@this@label}% + {% + \@glo@addchildren{#2}{\@this@label}% + }% + {}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@addchildren} +%\changes{4.04}{2014-03-06}{new} +%\begin{definition} +%\cs{@glo@addchildren}\marg{type}\marg{parent} +%\end{definition} +% \begin{macrocode} +\newcommand*{\@glo@addchildren}[2]{% +% \end{macrocode} +% Scope to allow nesting. +% \begin{macrocode} + \bgroup + \letcs{\@glo@childlist}{@glo@sortingchildren@#2}% + \@for\@this@childlabel:=\@glo@childlist\do + {% +% \end{macrocode} +% Check this label hasn't already been added. +% \begin{macrocode} + \xifinlistcs{\@this@childlabel}{@glsref@#1}% + {}% + {% + \listcsxadd{@glsref@#1}{\@this@childlabel}% + }% +% \end{macrocode} +% Does this child have children? +% \begin{macrocode} + \ifcsdef{@glo@sortingchildren@\@this@childlabel}% + {% + \@glo@addchildren{#1}{\@this@childlabel}% + }% + {% + }% + }% \egroup +} % \end{macrocode} -% Reset \ics{glossaryentrynumbers} +%\end{macro} +% +%\begin{macro}{\@glo@do@sortentries} +%\changes{4.04}{2014-03-06}{new} % \begin{macrocode} - \global\let\glossaryentrynumbers\@org@glossaryentrynumbers +\newcommand*{\@glo@do@sortentries}[1]{% + \ifglshasparent{#1}% + {% % \end{macrocode} -% Suppress warning about no \ics{printglossary} -%\changes{2.02}{2007 July 13}{suppressed warning globally rather than locally} +% This entry has a parent, so add it to the child list % \begin{macrocode} - \global\let\warn@noprintglossary\relax + \edef\@glo@parent{\csuse{glo@\glsdetoklabel{#1}@parent}}% + \ifcsundef{@glo@sortingchildren@\@glo@parent}% + {% + \csdef{@glo@sortingchildren@\@glo@parent}{}% + }% + {}% + \expandafter\@glo@sortedinsert + \csname @glo@sortingchildren@\@glo@parent\endcsname{#1}% +% \end{macrocode} +% Has the parent been added? +% \begin{macrocode} + \xifinlistcs{\@glo@parent}{@glsref@\@glo@type}% + {% +% \end{macrocode} +% Yes, it has so do nothing. +% \begin{macrocode} + }% + {% +% \end{macrocode} +% No, it hasn't so add it now. +% \begin{macrocode} + \expandafter\@glo@do@sortentries\expandafter{\@glo@parent}% + }% + }% + {% + \@glo@sortedinsert{\@glo@sortinglist}{#1}% + }% } % \end{macrocode} %\end{macro} % -% The \cs{printglossaries} command will do \cs{printglossary} -% for each glossary type that has been defined. It is better -% to use \cs{printglossaries} rather than individual -% \cs{printglossary} commands to ensure that you don't forget -% any new glossaries you may have created. It also makes it easier to -% chop and change the value of the \pkgopt{acronym} package option. -% However, if you want to list the glossaries in a different order, -% or if you want to set the title or table of contents entry, or -% if you want to use different glossary styles for each glossary, you -% will need to use \cs{printglossary} explicitly for each -% glossary type. -%\begin{macro}{\printglossaries} +%\begin{macro}{\@glo@sortedinsert} +%\changes{4.04}{2014-03-06}{new} +%\begin{definition} +%\cs{@glo@sortedinsert}\marg{list}\marg{entry label} +%\end{definition} +% Insert into list. % \begin{macrocode} -\newcommand*{\printglossaries}{% - \forallglossaries{\@@glo@type}{\printglossary[type=\@@glo@type]}% +\newcommand*{\@glo@sortedinsert}[2]{% + \dtl@insertinto{#2}{#1}{\@glo@sortinghandler}% +}% +% \end{macrocode} +%\end{macro} +% +% The sort handlers need to be in the form required by +% \sty{datatool}'s \cs{dtl@sortlist} macro. These must set the count +% register \cs{dtl@sortresult} to either $-1$ (\#1 less than \#2), 0 +% (\#1 = \#2) or $+1$ (\#1 greater than \#2). +%\begin{macro}{\@glo@sorthandler@word} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*{\@glo@sorthandler@word}[2]{% + \letcs\@gls@sort@A{glo@\glsdetoklabel{#1}@sort}% + \letcs\@gls@sort@B{glo@\glsdetoklabel{#2}@sort}% + \edef\glo@do@compare{% + \noexpand\dtlwordindexcompare{\noexpand\dtl@sortresult}% + {\expandonce\@gls@sort@B}% + {\expandonce\@gls@sort@A}% + }% + \glo@do@compare +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sorthandler@letter} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\newcommand*{\@glo@sorthandler@letter}[2]{% + \letcs\@gls@sort@A{glo@\glsdetoklabel{#1}@sort}% + \letcs\@gls@sort@B{glo@\glsdetoklabel{#2}@sort}% + \edef\glo@do@compare{% + \noexpand\dtlletterindexcompare{\noexpand\dtl@sortresult}% + {\expandonce\@gls@sort@B}% + {\expandonce\@gls@sort@A}% + }% + \glo@do@compare +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sorthandler@case} +%\changes{4.04}{2014-03-06}{new} +% Case-sensitive sort. +% \begin{macrocode} +\newcommand*{\@glo@sorthandler@case}[2]{% + \letcs\@gls@sort@A{glo@\glsdetoklabel{#1}@sort}% + \letcs\@gls@sort@B{glo@\glsdetoklabel{#2}@sort}% + \edef\glo@do@compare{% + \noexpand\dtlcompare{\noexpand\dtl@sortresult}% + {\expandonce\@gls@sort@B}% + {\expandonce\@gls@sort@A}% + }% + \glo@do@compare } % \end{macrocode} %\end{macro} +% +%\begin{macro}{\@glo@sorthandler@nocase} +%\changes{4.04}{2014-03-06}{new} +% Case-insensitive sort. +% \begin{macrocode} +\newcommand*{\@glo@sorthandler@nocase}[2]{% + \letcs\@gls@sort@A{glo@\glsdetoklabel{#1}@sort}% + \letcs\@gls@sort@B{glo@\glsdetoklabel{#2}@sort}% + \edef\glo@do@compare{% + \noexpand\dtlicompare{\noexpand\dtl@sortresult}% + {\expandonce\@gls@sort@B}% + {\expandonce\@gls@sort@A}% + }% + \glo@do@compare +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sortmacro@word} +%\changes{4.04}{2014-03-06}{new} +% Sort macro for `word' +% \begin{macrocode} +\newcommand*{\@glo@sortmacro@word}[1]{% + \ifdefstring{\@glo@default@sorttype}{standard}% + {% + \@glo@sortentries{\@glo@sorthandler@word}{#1}% + }% + {% + \PackageError{glossaries}{Conflicting sort options:^^J + \string\usepackage[sort=\@glo@default@sorttype]{glossaries}^^J + \string\printnoidxglossary[sort=word]}{}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sortmacro@letter} +%\changes{4.04}{2014-03-06}{new} +% Sort macro for `letter' +% \begin{macrocode} +\newcommand*{\@glo@sortmacro@letter}[1]{% + \ifdefstring{\@glo@default@sorttype}{standard}% + {% + \@glo@sortentries{\@glo@sorthandler@letter}{#1}% + }% + {% + \PackageError{glossaries}{Conflicting sort options:^^J + \string\usepackage[sort=\@glo@default@sorttype]{glossaries}^^J + \string\printnoidxglossary[sort=letter]}{}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sortmacro@standard} +%\changes{4.04}{2014-03-06}{new} +% Sort macro for `standard'. (Use either `word' or `letter' order.) +% \begin{macrocode} +\newcommand*{\@glo@sortmacro@standard}[1]{% + \ifdefstring{\@glo@default@sorttype}{standard}% + {% + \ifcsdef{@glo@sorthandler@\glsorder}% + {% + \@glo@sortentries{\csuse{@glo@sorthandler@\glsorder}}{#1}% + }% + {% + \PackageError{glossaries}{Unknown sort handler `\glsorder'}{}% + }% + }% + {% + \PackageError{glossaries}{Conflicting sort options:^^J + \string\usepackage[sort=\@glo@default@sorttype]{glossaries}^^J + \string\printnoidxglossary[sort=standard]}{}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sortmacro@case} +%\changes{4.04}{2014-03-06}{new} +% Sort macro for `case' +% \begin{macrocode} +\newcommand*{\@glo@sortmacro@case}[1]{% + \ifdefstring{\@glo@default@sorttype}{standard}% + {% + \@glo@sortentries{\@glo@sorthandler@case}{#1}% + }% + {% + \PackageError{glossaries}{Conflicting sort options:^^J + \string\usepackage[sort=\@glo@default@sorttype]{glossaries}^^J + \string\printnoidxglossary[sort=case]}{}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sortmacro@nocase} +%\changes{4.04}{2014-03-06}{new} +% Sort macro for `nocase' +% \begin{macrocode} +\newcommand*{\@glo@sortmacro@nocase}[1]{% + \ifdefstring{\@glo@default@sorttype}{standard}% + {% + \@glo@sortentries{\@glo@sorthandler@nocase}{#1}% + }% + {% + \PackageError{glossaries}{Conflicting sort options:^^J + \string\usepackage[sort=\@glo@default@sorttype]{glossaries}^^J + \string\printnoidxglossary[sort=nocase]}{}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sortmacro@def} +%\changes{4.04}{2014-03-06}{new} +% Sort macro for `def'. The order of definition is given in +% \cs{glolist@\meta{type}}. +% \begin{macrocode} +\newcommand*{\@glo@sortmacro@def}[1]{% + \def\@glo@sortinglist{}% + \forglsentries[#1]{\@gls@thislabel}% + {% + \xifinlistcs{\@gls@thislabel}{@glsref@#1}% + {% + \listeadd{\@glo@sortinglist}{\@gls@thislabel}% + }% + {% +% \end{macrocode} +% Hasn't been referenced. +% \begin{macrocode} + }% + }% + \cslet{@glsref@#1}{\@glo@sortinglist}% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\@glo@sortmacro@def@do} +%\changes{4.04}{2014-03-06}{new} +% This won't include parent entries that haven't been referenced. +% \begin{macrocode} +\newcommand*{\@glo@sortmacro@def@do}[1]{% + \ifinlistcs{#1}{@glsref@\@glo@type}% + {}% + {% + \listcsadd{@glsref@\@glo@type}{#1}% + }% + \ifcsdef{@glo@sortingchildren@#1}% + {% + \@glo@addchildren{\@glo@type}{#1}% + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@sortmacro@use} +%\changes{4.04}{2014-03-06}{new} +% Sort macro for `use'. (No sorting is required, as the entries are +% already in order of use, so do nothing.) +% \begin{macrocode} +\newcommand*{\@glo@sortmacro@use}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@print@noidx@glossary} +%\changes{4.04}{2014-03-06}{new} +% Glossary handler for \cs{printnoidxglossary} which doesn't use an +% indexing application. Since \cs{printnoidxglossary} may occur at +% the start of the document, we can't just check if an entry has +% been used. Instead, the first pass needs to write information to +% the aux file every time an entry is referenced. This needs to be +% read in on the second run and stored in a~list corresponding to +% the appropriate glossary. +% \begin{macrocode} +\newcommand*{\@print@noidx@glossary}{% + \ifcsdef{@glsref@\@glo@type}% + {% +% \end{macrocode} +% Sort the entries: +% \begin{macrocode} + \ifcsdef{@glo@sortmacro@\@glo@sorttype}% + {% + \csuse{@glo@sortmacro@\@glo@sorttype}{\@glo@type}% + }% + {% + \PackageError{glossaries}{Unknown sort handler `\@glo@sorttype'}{}% + }% +% \end{macrocode} +% Do the glossary heading and preamble +% \begin{macrocode} + \glossarysection[\glossarytoctitle]{\glossarytitle}% + \glossarypreamble + \begin{theglossary}% + \glossaryheader + \glsresetentrylist + \def\@gls@currentlettergroup{}% +% \end{macrocode} +% Iterate through the entries. +% \begin{macrocode} + \forlistcsloop{\@gls@noidx@do}{@glsref@\@glo@type}% +% \end{macrocode} +% Finally end the glossary and do the postamble: +% \begin{macrocode} + \end{theglossary}% + \glossarypostamble + }% + {% + \@gls@noref@warn{\@glo@type}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glo@grabfirst} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\def\glo@grabfirst#1#2\@nil{% + \def\@gls@firsttok{#1}% + \ifdefempty\@gls@firsttok + {% + \def\@glo@thislettergrp{0}% + }% + {% +% Sanitize it: +% \begin{macrocode} + \@onelevel@sanitize\@gls@firsttok +% \end{macrocode} +% Fetch the first letter: +% \begin{macrocode} + \expandafter\@glo@grabfirst\@gls@firsttok{}{}\@nil + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glo@grabfirst} +%\changes{4.04}{2014-03-06}{new} +% \begin{macrocode} +\def\@glo@grabfirst#1#2\@nil{% + \ifdefempty\@glo@thislettergrp + {% + \def\@glo@thislettergrp{glssymbols}% + }% + {% + \count@=\uccode`#1\relax + \ifnum\count@=0\relax + \def\@glo@thislettergrp{glssymbols}% + \else + \ifdefstring\@glo@sorttype{case}% + {% + \count@=`#1\relax + }% + {% + }% + \edef\@glo@thislettergrp{\the\count@}% + \fi + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@noidx@do} +%\changes{4.04}{2014-03-06}{new} +% Handler for list iteration used by \cs{@print@noidx@glossary}. +% The argument is the entry label. This only allows one sublevel. +% \begin{macrocode} +\newcommand{\@gls@noidx@do}[1]{% +% \end{macrocode} +% Get this entry's location list +% \begin{macrocode} + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% +% \end{macrocode} +% Does this entry have a~parent? +% \begin{macrocode} + \ifglshasparent{#1}% + {% +% \end{macrocode} +% Has a~parent. +% \begin{macrocode} + \gls@level=\csuse{glo@\glsdetoklabel{#1}@level}\relax + \ifdefvoid{\@gls@loclist} + {% + \subglossentry{\gls@level}{#1}{}% + }% + {% + \subglossentry{\gls@level}{#1}% + {% + \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}% + }% + }% + }% + {% +% \end{macrocode} +% Doesn't have a parent +% Get this entry's sort key +% \begin{macrocode} + \letcs{\@gls@sort}{glo@\glsdetoklabel{#1}@sort}% +% \end{macrocode} +% Fetch the first letter: +% \begin{macrocode} + \expandafter\glo@grabfirst\@gls@sort{}{}\@nil + \ifdefequal{\@glo@thislettergrp}{\@gls@currentlettergroup}% + {}% + {% +% \end{macrocode} +% Do the group header: +% \begin{macrocode} + \ifdefempty{\@gls@currentlettergroup}{}{\glsgroupskip}% + \glsgroupheading{\@glo@thislettergrp}% + }% + \let\@gls@currentlettergroup\@glo@thislettergrp +% \end{macrocode} +% Do this entry: +% \begin{macrocode} + \ifdefvoid{\@gls@loclist} + {% + \glossentry{#1}{}% + }% + {% + \glossentry{#1}% + {% + \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}% + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsnoidxloclist} +%\changes{4.04}{2014-03-06}{new} +%\begin{definition} +%\cs{glsnoidxloclist}\marg{list cs} +%\end{definition} +% Display location list. +% \begin{macrocode} +\newcommand*{\glsnoidxloclist}[1]{% + \def\@gls@noidxloclist@sep{}% + \def\@gls@noidxloclist@prev{}% + \forlistloop{\glsnoidxloclisthandler}{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsnoidxloclisthandler} +%\changes{4.04}{2014-03-06}{new} +% Handler for location list iterator. +% \begin{macrocode} +\newcommand*{\glsnoidxloclisthandler}[1]{% + \ifdefstring{\@gls@noidxloclist@prev}{#1}% + {% +% \end{macrocode} +% Same as previous location so skip. +% \begin{macrocode} + }% + {% + \@gls@noidxloclist@sep + #1% + \def\@gls@noidxloclist@sep{\delimN}% + \def\@gls@noidxloclist@prev{#1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsnoidxdisplayloclisthandler} +%\changes{4.04}{2014-03-06}{new} +% Handler for location list iterator when used with +% \ics{glsdisplaynumberlist}. +% \begin{macrocode} +\newcommand*{\glsnoidxdisplayloclisthandler}[1]{% + \ifdefstring{\@gls@noidxloclist@prev}{#1}% + {% +% \end{macrocode} +% Same as previous location so skip. +% \begin{macrocode} + }% + {% + \@gls@noidxloclist@sep + \@gls@noidxloclist@prev + \def\@gls@noidxloclist@prev{#1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsnoidxdisplayloc} +%\changes{4.04}{2014-03-06}{new} +%\begin{definition} +%\cs{glsnoidxdisplayloc}\marg{prefix}\marg{counter}\marg{format}\marg{location} +%\end{definition} +% Display a location in the location list. +% \begin{macrocode} +\newcommand*\glsnoidxdisplayloc[4]{% + \setentrycounter[#1]{#2}% + \csuse{#3}{#4}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@reference} +%\changes{4.04}{2014-03-06}{new} +%\begin{definition} +%\cs{@gls@reference}\marg{type}\marg{label}\marg{loc} +%\end{definition} +% Identifies that a reference has been used (for use in the aux file). +% All entries must be defined in the preamble. +% \begin{macrocode} +\newcommand*{\@gls@reference}[3]{% +% \end{macrocode} +% Add to label list +% \begin{macrocode} + \glsdoifexistsorwarn{#2}% + {% + \ifcsundef{@glsref@#1}{\csgdef{@glsref@#1}{}}{}% + \ifinlistcs{#2}{@glsref@#1}% + {}% + {\listcsgadd{@glsref@#1}{#2}}% +% \end{macrocode} +% Add to location list +% \begin{macrocode} + \ifcsundef{glo@\glsdetoklabel{#2}@loclist}% + {\csgdef{glo@\glsdetoklabel{#2}@loclist}{}}% + {}% + \listcsgadd{glo@\glsdetoklabel{#2}@loclist}{#3}% + }% +} +% \end{macrocode} +%\end{macro} +% % The keys that can be used in the optional argument to -% \ics{printglossary} are as follows: +% \ics{printglossary} or \ics{printnoidxglossary} are as follows: % The \gloskey[printglossary]{type} key sets the glossary type. % \begin{macrocode} \define@key{printgloss}{type}{\def\@glo@type{#1}} @@ -11361,6 +12518,34 @@ false,nolabel,autolabel,nameref}[nolabel]{% \fi} % \end{macrocode} % +%\changes{4.04}{2014-03-06}{added sort key to printgloss group} +% The \gloskey[printnoidxglossary]{sort} key sets the glossary sort +% handler (\cs{printnoidxglossary} only). +% \begin{macrocode} +\define@key{printgloss}{sort}{\@glo@assign@sortkey{#1}} +% \end{macrocode} +% +%\begin{macro}{\@glo@no@assign@sortkey} +% Issue error if used with \cs{printglossary} +% \begin{macrocode} +\newcommand*{\@glo@no@assign@sortkey}[1]{% + \PackageError{glossaries}{`sort' key not permitted with + \string\printglossary}% + {The `sort' key may only be used with \string\printnoidxglossary}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@glo@assign@sortkey} +% For use with \cs{printnoidxglossary} +% \begin{macrocode} +\newcommand*{\@@glo@assign@sortkey}[1]{% + \def\@glo@sorttype{#1}% +} +% \end{macrocode} +%\end{macro} +% +% %\begin{macro}{\@glsnonextpages} %\changes{1.17}{2008 December 26}{new}% % Suppresses the next number list only. Global assignments required @@ -11593,7 +12778,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newenvironment{theglossary}{}{}% }% {% - \GlossariesWarning{overriding `theglossary' environment}% + \@gls@warnontheglossdefined \renewenvironment{theglossary}{}{}% } % \end{macrocode} @@ -11890,6 +13075,19 @@ false,nolabel,autolabel,nameref}[nolabel]{% } % \end{macrocode} %\end{macro} +%\begin{macro}{\@gls@getothergrouptitle} +%\changes{4.04}{2014-03-06}{new} +% Version for the no-indexing app option: +% \begin{macrocode} +\newcommand*{\@gls@noidx@getgrouptitle}[2]{% + \DTLifint{#1}% + {\edef#2{\char#1\relax}}% + {% + \ifcsundef{#1groupname}{\def#2{#1}}{\letcs#2{#1groupname}}% + }% +} +% \end{macrocode} +%\end{macro} % %\begin{definition} %\cs{glsgetgrouplabel}\marg{title} @@ -14891,6 +16089,18 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\showgloloclist} +%\changes{4.04}{2014-03-06}{new} +%\begin{definition} +%\cs{showgloloclist}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\showgloloclist}[1]{% + \expandafter\show\csname glo@\glsdetoklabel{#1}@loclist\endcsname +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\showacronymlists} %\changes{3.0}{2011/04/02}{new} %\begin{definition} @@ -18345,7 +19555,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % that have a tree-like structure. These are designed for % hierarchical glossaries. % \begin{macrocode} -\ProvidesPackage{glossary-tree}[2013/11/14 v4.0 (NLCT)] +\ProvidesPackage{glossary-tree}[2014/03/06 v4.04 (NLCT)] % \end{macrocode} % %\begin{style}{index} @@ -18727,10 +19937,6 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\cs{subglossentry}} % \begin{macrocode} \renewcommand{\glossentry}[2]{% -% \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 % \end{macrocode} @@ -18738,12 +19944,14 @@ false,nolabel,autolabel,nameref}[nolabel]{% % widest entry. % \begin{macrocode} \settowidth{\glstreeindent}{\textbf{\@glswidestname\space}}% + \fi % \end{macrocode} % Set the hangindent and paragraph indent. +%\changes{4.04}{2014-03-06}{moved hangindent and parindent assignments +%outside level test} % \begin{macrocode} \hangindent\glstreeindent \parindent\glstreeindent - \fi % \end{macrocode} % Put the name to the left of the paragraph block. % \begin{macrocode} @@ -20095,7 +21303,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % but will only be updated when \texttt{glossaries-accsupp.sty} is % modified. % \begin{macrocode} -\ProvidesPackage{glossaries-accsupp}[2014/01/20 v4.03 (NLCT) +\ProvidesPackage{glossaries-accsupp}[2014/03/06 v4.04 (NLCT) Experimental glossaries accessibility] % \end{macrocode} % Pass all options to \sty{glossaries}: @@ -20109,8 +21317,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{macro}{\compatibleglossentry} % Override style compatibility macros: %\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} +%\changes{4.04}{2014-03-06}{changed \cs{newcommand} to \cs{def} as is may or +%may not be defined} % \begin{macrocode} -\newcommand*{\compatibleglossentry}[2]{% +\def\compatibleglossentry#1#2{% \toks@{#2}% \protected@edef\@do@glossentry{% \noexpand\accsuppglossaryentryfield{#1}% @@ -20127,8 +21337,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% % %\begin{macro}{\compatiblesubglossentry} %\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} +%\changes{4.04}{2014-03-06}{changed \cs{newcommand} to \cs{def} as is may or +%may not be defined} % \begin{macrocode} -\newcommand*{\compatiblesubglossentry}[3]{% +\def\compatiblesubglossentry#1#2#3{% \toks@{#3}% \protected@edef\@do@subglossentry{% \noexpand\accsuppglossarysubentryfield{\number#1}% @@ -24142,6 +25354,323 @@ The dog \glsed{run} away from the duck. %\fi %\iffalse % \begin{macrocode} +%<*sample-noidxapp-utf8.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % arara: pdflatex + % arara: pdflatex +\documentclass{report} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + +\usepackage[colorlinks]{hyperref} +\usepackage[index,symbols,nohypertypes={index}]{glossaries} +\usepackage{glossary-mcols} + +\makenoidxglossaries + +\renewcommand{\theHequation}{\theequation} + + % main entries + +\newglossaryentry{elite}{% + name={{é}lite}, + description={select group of people} +} + +\newglossaryentry{elephant}{% + name={elephant}, + description={very large mammal with tusks} +} + +\newglossaryentry{elk}{% + name={elk}, + description={large northern deer} +} + +\newglossaryentry{emigre}{% + name={{é}migré}, + description={person who has emigrated to another country, + especially for political reasons} +} + + % Symbols + +\newglossaryentry{set}{% + type=symbols, + name={$\mathcal{S}$}, + text={\mathcal{S}}, + sort={S}, + description={A set}} + +\newglossaryentry{U}{% + type=symbols, + name={$\mathcal{U}$}, + text={\mathcal{U}}, + sort={U}, + description={The universal set}} + +\newglossaryentry{card}{% + type=symbols, + name={$|\glsentrytext{set}|$}, + text={|\glsentrytext{set}|}, + sort={|}, + description={cardinality of $\gls{set}$}} + +\newglossaryentry{factorial}{% + type=symbols, + name={$!$}, + text={!}, + sort={!}, + description={factorial}} + + % index entries + +\newterm{seal} + +\newterm{dinosaur} + +\newterm[parent=dinosaur]{ceratopsidae} + +\newterm[parent=dinosaur,plural={stegosauruses}]{stegosaurus} +\newterm[parent=ceratopsidae,plural={triceratopses}]{triceratops} +\newterm[parent=ceratopsidae,plural={styracosauruses}]{styracosaurus} +\newterm[parent=dinosaur,plural={apatosauruses}]{apatosaurus} + +\newterm{Triassic} + +\newterm{Devonian} + +\newterm[see={[see also]seal}]{sea lion} + +\begin{document} + +\chapter{Mathematical Notation} + +The cardinality of a set $\gls{set}$ is denoted $\gls{card}$ +The $\gls{factorial}$ symbol indicates factorial. +$\gls{U}$ is the universal set. + +\glsaddall[types=main] + +\chapter{Dinosaurs} + +\Glspl{dinosaur} are now extinct. They first appeared during the +\gls{Triassic} period. Examples of \glspl{dinosaur} include the +\gls{triceratops}, the \gls{styracosaurus}, the \gls{apatosaurus} and the \gls{stegosaurus}. + +\Glspl{seal} and \glspl{sea lion} are marine mammals. +The \gls{Devonian} period was the age of fish. + +\glsaddall[types=main] + +\chapter{Location Lists} + +Dinosaur: \glsdisplaynumberlist{dinosaur}. + +Set: \glsdisplaynumberlist{set}. + +\Gls{elite}: \glsdisplaynumberlist{elite}. + +\begin{equation} +3\gls[counter=equation]{factorial} = 3 \times 2 \times 1 +\end{equation} + +\newcommand{\myhandler}[4]{% + Prefix: #1. + Counter: #2. + Format: #3. + Value: #4. + Link: \setentrycounter[#1]{#2}% + \csuse{#3}{#4}. + \par +} +\newcommand{\myxrhandler}[2][]{XR (#1): #2. } + +Factorial locations: +\glsnumberlistloop{factorial}{\myhandler}{\myxrhandler} + +Sea lion locations: +\glsnumberlistloop{sea lion}{\myhandler}{\myxrhandler} + +\printnoidxglossary[type=main,sort=word] + +\printnoidxglossary[type=symbols,sort=use] + +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} + +\printnoidxglossary[type=index,style=mcolindexgroup,sort=word] + +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%</sample-noidxapp-utf8.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*sample-noidxapp.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % arara: pdflatex + % arara: pdflatex +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[index,symbols,nohypertypes={index}]{glossaries} +\usepackage{glossary-mcols} + +\makenoidxglossaries + +\renewcommand{\theHequation}{\theequation} + + % main entries + +\newglossaryentry{elite}{% + name={{\'e}lite}, + description={select group of people} +} + +\newglossaryentry{elephant}{% + name={elephant}, + description={very large mammal with tusks} +} + +\newglossaryentry{elk}{% + name={elk}, + description={large northern deer} +} + +\newglossaryentry{emigre}{% + name={{\'e}migr\'e}, + description={person who has emigrated to another country, + especially for political reasons} +} + + % Symbols + +\newglossaryentry{set}{% + type=symbols, + name={$\mathcal{S}$}, + text={\mathcal{S}}, + sort={S}, + description={A set}} + +\newglossaryentry{U}{% + type=symbols, + name={$\mathcal{U}$}, + text={\mathcal{U}}, + sort={U}, + description={The universal set}} + +\newglossaryentry{card}{% + type=symbols, + name={$|\glsentrytext{set}|$}, + text={|\glsentrytext{set}|}, + sort={|}, + description={cardinality of $\gls{set}$}} + +\newglossaryentry{factorial}{% + type=symbols, + name={$!$}, + text={!}, + sort={!}, + description={factorial}} + + % index entries + +\newterm{seal} + +\newterm{dinosaur} + +\newterm[parent=dinosaur]{ceratopsidae} + +\newterm[parent=dinosaur,plural={stegosauruses}]{stegosaurus} +\newterm[parent=ceratopsidae,plural={triceratopses}]{triceratops} +\newterm[parent=ceratopsidae,plural={styracosauruses}]{styracosaurus} +\newterm[parent=dinosaur,plural={apatosauruses}]{apatosaurus} + +\newterm{Triassic} + +\newterm{Devonian} + +\newterm[see={[see also]seal}]{sea lion} + +\begin{document} + +\chapter{Mathematical Notation} + +The cardinality of a set $\gls{set}$ is denoted $\gls{card}$ +The $\gls{factorial}$ symbol indicates factorial. +$\gls{U}$ is the universal set. + +\glsaddall[types=main] + +\chapter{Dinosaurs} + +\Glspl{dinosaur} are now extinct. They first appeared during the +\gls{Triassic} period. Examples of \glspl{dinosaur} include the +\gls{triceratops}, the \gls{styracosaurus}, the \gls{apatosaurus} and the \gls{stegosaurus}. + +\Glspl{seal} and \glspl{sea lion} are marine mammals. +The \gls{Devonian} period was the age of fish. + +\glsaddall[types=main] + +\chapter{Location Lists} + +Dinosaur: \glsdisplaynumberlist{dinosaur}. + +Set: \glsdisplaynumberlist{set}. + +\Gls{elite}: \glsdisplaynumberlist{elite}. + +\begin{equation} +3\gls[counter=equation]{factorial} = 3 \times 2 \times 1 +\end{equation} + +\newcommand{\myhandler}[4]{% + Prefix: #1. + Counter: #2. + Format: #3. + Value: #4. + Link: \setentrycounter[#1]{#2}% + \csuse{#3}{#4}. + \par +} +\newcommand{\myxrhandler}[2][]{XR (#1): #2. } + +Factorial locations: +\glsnumberlistloop{factorial}{\myhandler}{\myxrhandler} + +Sea lion locations: +\glsnumberlistloop{sea lion}{\myhandler}{\myxrhandler} + +\printnoidxglossary[type=main,sort=word] + +\printnoidxglossary[type=symbols,sort=use] + +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} + +\printnoidxglossary[type=index,style=mcolindexgroup,sort=letter] + +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%</sample-noidxapp.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*sample-nomathhyper.tex> % \end{macrocode} %\fi @@ -24456,11 +25985,15 @@ sort={2}, plural={bravoes}, parent=bravo} -\newglossaryentry{seal}{name=seal,description={sea mammal with -flippers that eats fish}} +\newglossaryentry{seal}{% + name=seal,% + description={sea mammal with flippers that eats fish} +} -\newglossaryentry{sealion}{name={sea lion}, -description={large seal}} +\newglossaryentry{sealion}{% + name={sea lion},% + description={large seal}% +} \begin{document} @@ -25158,11 +26691,11 @@ sort=Gamma} \newglossaryentry{gamma}{name={\ensuremath{\gamma(\alpha,x)}}, description=Incomplete gamma function, -sort=gamma} +sort=gamma1} \newglossaryentry{iGamma}{name={\ensuremath{\Gamma(\alpha,x)}}, description=Incomplete gamma function, -sort=Gamma} +sort=Gamma2} \newglossaryentry{psi}{name=\ensuremath{\psi(x)}, description=Psi function,sort=psi} @@ -26267,6 +27800,7 @@ description=instrument for measuring distance travelled by a wheeled vehicle} \newglossaryentry{oesophagus}{name={{œ}sophagus}, +plural={{œ}sophagi}, description={canal from mouth to stomach}} \newglossaryentry{ogre}{name=ogre, diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index 778b4622d47..45f2aa64784 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.ins +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.ins @@ -1,4 +1,4 @@ -% glossaries.ins generated using makedtx version 1.1 2014/1/20 17:22 +% glossaries.ins generated using makedtx version 1.1 2014/3/7 17:43 \input docstrip \preamble @@ -18,7 +18,7 @@ The Current Maintainer of this work is Nicola Talbot. - This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, glossaries-prefix.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-compatible-307.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-entryfmt.tex, sample-FnDesc.tex, sample-index.tex, sample-inline.tex, sample-langdict.tex, sample-mfirstuc.tex, sample-newkeys.tex, sample-nomathhyper.tex, sample-numberlist.tex, sample-prefix.tex, sample-si.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleCustomAcr.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleFnAcrDesc.tex, sampleNtn.tex, samplePeople.tex, sampleSec.tex, sampleSort.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl, mfirstuc.perl. + This work consists of the files glossaries.dtx and glossaries.ins and the derived files glossaries.sty, glossaries-prefix.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-compatible-307.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-entryfmt.tex, sample-FnDesc.tex, sample-index.tex, sample-inline.tex, sample-langdict.tex, sample-mfirstuc.tex, sample-newkeys.tex, sample-noidxapp-utf8.tex, sample-noidxapp.tex, sample-nomathhyper.tex, sample-numberlist.tex, sample-prefix.tex, sample-si.tex, sample.tex, sample4col.tex, sampleaccsupp.tex, sampleAcr.tex, sampleAcrDesc.tex, sampleacronyms.tex, sampleCustomAcr.tex, sampleDB.tex, sampleDesc.tex, sampleEq.tex, sampleEqPg.tex, sampleFnAcrDesc.tex, sampleNtn.tex, samplePeople.tex, sampleSec.tex, sampleSort.tex, sampletree.tex, sampleutf8.tex, samplexdy.tex, samplexdy2.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl, mfirstuc.perl. \endpreamble @@ -93,6 +93,8 @@ \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-newkeys.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-newkeys.tex}} +\file{sample-noidxapp-utf8.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-noidxapp-utf8.tex}} +\file{sample-noidxapp.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-noidxapp.tex}} \file{sample-nomathhyper.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-nomathhyper.tex}} \file{sample-numberlist.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-numberlist.tex}} \file{sample-prefix.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-prefix.tex}} |