summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/glossaries
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-09-21 21:04:31 +0000
committerKarl Berry <karl@freefriends.org>2017-09-21 21:04:31 +0000
commitf342995fd14216326b21b0f6542db9df58bc224d (patch)
tree690c424c4083ea1205eec2c790aae347ec4c785b /Master/texmf-dist/source/latex/glossaries
parentdea0a0ba1bb1f2ed8c60eb01add2c19c054a2c2f (diff)
glossaries (21sep17)
git-svn-id: svn://tug.org/texlive/trunk@45373 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/glossaries')
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.dtx959
-rw-r--r--Master/texmf-dist/source/latex/glossaries/glossaries.ins6
-rw-r--r--Master/texmf-dist/source/latex/glossaries/makeglossaries-lite.pod120
3 files changed, 929 insertions, 156 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
index edf6d6a795c..c017572d295 100644
--- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
+++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx
@@ -2,7 +2,11 @@
% glossaries.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
% -section "chapter"
+% -setambles ".*\.perl=>\nopreamble\nopostamble"
+% -setambles ".*\.tex=>\nopreamble\nopostamble"
+% -setambles ".*\.xdy=>\nopreamble\nopostamble"
% -codetitle "Main Package Code"
+% -author "Nicola Talbot"
% -src "glossaries\.sty\Z=>glossaries.sty"
% -src "glossaries-prefix.sty\Z=>glossaries-prefix.sty"
% -src "(glossary-.+)\.(sty)\Z=>\1.\2"
@@ -19,19 +23,15 @@
% -src "(samplexdy-mc.*\.xdy)\Z=>\1"
% -src "(database.*\.tex)\Z=>\1"
% -src "(.*\.perl)\Z=>\1"
-% -setambles ".*\.perl=>\nopreamble\nopostamble"
-% -setambles ".*\.tex=>\nopreamble\nopostamble"
-% -setambles ".*\.xdy=>\nopreamble\nopostamble"
-% -macrocode ".*\.perl"
-% -macrocode ".*\.tex"
-% -macrocode ".*\.xdy"
-% -author "Nicola Talbot"
% -comment ".*\.perl"
% -comment ".*\.tex"
% -comment ".*\.xdy"
+% -macrocode ".*\.perl"
+% -macrocode ".*\.tex"
+% -macrocode ".*\.xdy"
% -doc "glossaries-manual.tex"
% glossaries
-% Created on 2017/8/24 11:10
+% Created on 2017/9/21 0:28
%\fi
%\iffalse
%<*package>
@@ -145,7 +145,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{19355}
+\CheckSum{19469}
\newcommand*{\ifirstuse}{\iterm{first use}}
\newcommand*{\firstuse}{\gls{firstuse}}
@@ -172,12 +172,12 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
%\fi
%\MakeShortVerb{"}
%
-% \title{Documented Code For glossaries v4.32}
+% \title{Documented Code For glossaries v4.33}
% \author{Nicola L.C. Talbot\\[10pt]
%Dickimaw Books\\
%\url{http://www.dickimaw-books.com/}}
%
-% \date{2017-08-24}
+% \date{2017-09-20}
% \maketitle
%
%This is the documented code for the \styfmt{glossaries} package.
@@ -193,7 +193,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.32:
+%For the main user guide, read \qt{glossaries.sty v4.33:
%\LaTeX2e\ Package to Assist Generating Glossaries}.
%
%\item[\url{mfirstuc-manual.pdf}]
@@ -248,7 +248,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
% This package requires \LaTeXe.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossaries}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
%\changes{4.18}{2015-09-09}{split mfirstuc into separate bundle}
% Required packages:
@@ -402,10 +402,18 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\newcommand*{\@gls@see@noindex}{%
\PackageError{glossaries}%
{`\gls@xr@key' key may only be used after \string\makeglossaries\space
- or \string\makenoidxglossaries}%
+ or \string\makenoidxglossaries\space (or move
+ \string\newglossaryentry\space
+ definitions into the preamble)}%
{You must use \string\makeglossaries\space
or \string\makenoidxglossaries\space before defining
- any entries that have a `\gls@xr@key' key}%
+ any entries that have a `\gls@xr@key' key. It may
+ be that the `see' key has been written to the .glsdefs
+ file from the previous run, in which case you need to
+ move your definitions
+ to the preamble if you don't want to use
+ \string\makeglossaries\space
+ or \string\makenoidxglossaries}%
}
% \end{macrocode}
%\end{macro}
@@ -623,6 +631,23 @@ false,nolabel,autolabel,nameref}[nolabel]{%
}
% \end{macrocode}
%\end{option}
+%
+%\begin{option}{esclocations}
+% When using \gls{makeindex} or \gls{xindy}, the locations may need
+% to be adjusted to ensure they're in a format that's allowed by the
+% indexing application. This involves a bit of hackery and isn't
+% needed if the locations are all guaranteed to be in the correct
+% form (or if the user is prepared to post-process the glossary file before
+% calling the relevant indexing application) so \pkgopt[false]{esclocations}
+% will switch off this mechanism allowing for a faster and more
+% stable approach.
+%\changes{4.33}{2017-09-20}{new}
+% \begin{macrocode}
+\define@boolkey{glossaries.sty}[gls]{esclocations}[true]{}
+\glsesclocationstrue
+% \end{macrocode}
+%\end{option}
+%
%\begin{macro}{\@gls@loadlong}
%\changes{1.18}{2009-01-14}{new}
% \begin{macrocode}
@@ -1394,11 +1419,34 @@ false,nolabel,autolabel,nameref}[nolabel]{%
\renewcommand*{\GlossariesWarning}[1]{}%
\renewcommand*{\GlossariesWarningNoLine}[1]{}%
\renewcommand*{\glosortentrieswarning}{}%
+ \renewcommand*{\@gls@missinglang@warn}[2]{}%
\fi
}
% \end{macrocode}
%\end{option}
%
+%\begin{macro}{\@gls@missinglang@warn}
+%\changes{4.33}{2017-09-20}{new}
+%Missing language warning.
+% \begin{macrocode}
+\newcommand*{\@gls@missinglang@warn}[2]{%
+ \PackageWarningNoLine{glossaries}%
+ {No language module detected for `#1'.\MessageBreak
+ Language modules need to be installed separately.\MessageBreak
+ Please check on CTAN for a bundle called\MessageBreak
+ `glossaries-#2' or similar}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{option}{nolangwarn}
+% Suppress warning if language support not found.
+% \begin{macrocode}
+\@gls@declareoption{nolangwarn}{%
+ \renewcommand*{\@gls@missinglang@warn}[2]{}%
+}
+% \end{macrocode}
+%\end{option}
%
%\begin{macro}{\@gls@warnonglossdefined}
%\changes{4.04}{2014-03-06}{new}
@@ -2589,11 +2637,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
\RequireGlossariesLang{\CurrentTrackedTag}%
}%
{%
- \PackageWarningNoLine{glossaries}%
- {No language module detected for `\this@dialect'.\MessageBreak
- Language modules need to be installed separately.\MessageBreak
- Please check on CTAN for a bundle called\MessageBreak
- `glossaries-\CurrentTrackedLanguage' or similar}%
+ \@gls@missinglang@warn\this@dialect\CurrentTrackedLanguage
}%
}%
}%
@@ -3737,7 +3781,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
\string"2\string" \string"3\string" \string"4\string"
\string"5\string" \string"6\string" \string"7\string"
\string"8\string" \string"9\string")^^J\space\space\space
- :before \string"\@glsfirstletter\string")}
+ \@xdynumbergrouporder)}
\else
\def\@xdylettergroups{}
\fi
@@ -11890,18 +11934,64 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\GlsSetXdyFirstLetterAfterDigits}
+%\changes{4.33}{2017-09-20}{added starred version}
% Sets the first letter to come after the digits 0,\ldots,9.
+%The starred version sanitizes.
% \begin{macrocode}
+\newcommand*{\GlsSetXdyFirstLetterAfterDigits}{%
+ \@ifstar\s@GlsSetXdyFirstLetterAfterDigits\@GlsSetXdyFirstLetterAfterDigits}
\ifglsxindy
- \newcommand*{\GlsSetXdyFirstLetterAfterDigits}[1]{%
+ \newcommand*{\@GlsSetXdyFirstLetterAfterDigits}[1]{%
\renewcommand*{\@glsfirstletter}{#1}}
+ \newcommand*{\s@GlsSetXdyFirstLetterAfterDigits}[1]{%
+ \renewcommand*{\@glsfirstletter}{#1}%
+ \@onelevel@sanitize\@glsfirstletter
+ }
\else
- \newcommand*{\GlsSetXdyFirstLetterAfterDigits}[1]{%
+ \newcommand*{\@GlsSetXdyFirstLetterAfterDigits}[1]{%
\glsnoxindywarning\GlsSetXdyFirstLetterAfterDigits}
+ \newcommand*{\s@GlsSetXdyFirstLetterAfterDigits}{%
+ \@GlsSetXdyFirstLetterAfterDigits
+ }
+\fi
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@xdynumbergrouporder}
+% Specifies the order of the number group.
+% \begin{macrocode}
+\ifglsxindy
+ \newcommand*{\@xdynumbergrouporder}{:before \string"\@glsfirstletter\string"}
+\fi
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\GlsSetXdyNumberGroupOrder}
+%\changes{4.33}{2017-09-20}{new}
+% Sets the relative location of the number group.
+%The starred version sanitizes.
+% \begin{macrocode}
+\newcommand*{\GlsSetXdyNumberGroupOrder}[1]{%
+ \@ifstar\s@GlsSetXdyNumberGroupOrder\@GlsSetXdyNumberGroupOrder
+}
+\ifglsxindy
+ \newcommand*{\@GlsSetXdyNumberGroupOrder}[1]{%
+ \renewcommand*{\@xdynumbergrouporder}{#1}%
+ }
+ \newcommand*{\s@GlsSetXdyNumberGroupOrder}[1]{%
+ \renewcommand*{\@xdynumbergrouporder}{#1}%
+ \@onelevel@sanitize\@xdynumbergrouporder
+ }
+\else
+ \newcommand*{\@GlsSetXdyNumberGroupOrder}[1]{%
+ \glsnoxindywarning\GlsSetXdyNumberGroupOrder}
+ \newcommand*{\s@GlsSetXdyNumberGroupOrder}{%
+ \@GlsSetXdyNumberGroupOrder}
\fi
% \end{macrocode}
%\end{macro}
%
+%
%\begin{macro}{\@glsminrange}
% Define the minimum number of successive location references
% to merge into a range.
@@ -11989,7 +12079,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% \begin{macrocode}
\@for\@gls@classI:=\@gls@xdy@locationlist\do{%
% \end{macrocode}
-% Case were \meta{Hprefix} is empty:
+% Case where \meta{Hprefix} is empty:
% \begin{macrocode}
\protected@write\glswrite{}{(define-location-class
\string"\@gls@classI\string"^^J\space\space\space
@@ -13294,9 +13384,67 @@ you
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@@do@wrglossary}
+%\changes{4.33}{2017-09-20}{changed to check for \pkgopt{esclocations}}
+% Write the glossary entry in the appropriate format.
+% \begin{macrocode}
+\newcommand*{\@@do@wrglossary}[1]{%
+ \ifglsesclocations
+ \@@do@esc@wrglossary{#1}%
+ \else
+ \@@do@noesc@wrglossary{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@@do@noesc@wrglossary}
+%\changes{4.33}{2017-09-20}{new}
+% Write the glossary entry in the appropriate format.
+% The locations don't need to be pre-processed before writing the
+% information to the glossary file, but the prefix still needs to be
+% found.
+% \begin{macrocode}
+\newcommand*{\@@do@noesc@wrglossary}[1]{%
+% \end{macrocode}
+% Don't fully expand yet.
+% \begin{macrocode}
+ \expandafter\def\expandafter\@glslocref\expandafter{\theglsentrycounter}%
+ \expandafter\def\expandafter\@glsHlocref\expandafter{\theHglsentrycounter}%
+% \end{macrocode}
+% Find the prefix if \cs{@glsHlocref} and \cs{@glslocref} aren't the same.
+% \begin{macrocode}
+ \ifx\@glsHlocref\@glslocref
+ \def\@glo@counterprefix{}%
+ \else
+% \end{macrocode}
+% The value of the counter isn't important here as it's the prefix
+% that's of interest. (\cs{c@page} will have the same value in
+% both \cs{theglsentrycounter} and \cs{theHglsentrycounter} at this
+% point, even if it hasn't been updated yet. The page number is not
+% expected to occur in the prefix.)
+% \begin{macrocode}
+ \protected@edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix
+ {\@glslocref}{\@glsHlocref}%
+ }%
+ \@do@gls@getcounterprefix
+ \fi
+% \end{macrocode}
+% De-tok label if required
+%\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}}
+% \begin{macrocode}
+ \edef\@gls@label{\glsdetoklabel{#1}}%
+% \end{macrocode}
+% Write the information to file:
+% \begin{macrocode}
+ \@@do@@wrglossary
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\ifglswrallowprimitivemods}
%\changes{4.22}{2016-04-19}{new}
-% Conditional to determine whether or not \cs{@@do@wrglossary}
+% Conditional to determine whether or not \cs{@@do@esc@wrglossary}
% should be allowed to temporarily redefine \cs{the} and
% \cs{number}.
% \begin{macrocode}
@@ -13305,31 +13453,101 @@ you
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\@@do@wrglossary}
+%\begin{macro}{\@@do@esc@wrglossary}
+%\changes{4.33}{2017-09-20}{renamed from \cs{@@do@esc@wrglossary}}
%\changes{1.17}{2008-12-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]{%
+%This is far more complicated with \app{xindy} than with other
+%indexing methods. There are two necessary but
+%conflicting requirements with \app{xindy}:
+%\begin{enumerate}
+%\item all backslashes in the location must be escaped;
+%\item \cs{c@page} can't be prematurely expanded.
+%\end{enumerate}
+% (With \app{makeindex} there's the remote possibility that the page
+% compositor is a \app{makeindex} special character, so that would
+% also need to be escaped.)
+%
+%For example, suppose \cs{thepage} is defined as
+%\begin{verbatim}
+%\renewcommand{\thepage}{\tally{page}}
+%\newcommand{\tally}[1]{\tallynum{\expandafter\the\csname c@#1\endcsname}}
+%\end{verbatim}
+%where \cs{tallynum} is a robust command that takes a number as its
+%argument. With all indexing methods other than \app{xindy}, a
+%deferred write with \cs{thepage} as the location will expand to
+%\cs{tallynum}\marg{n} where \meta{n} is the page number. Since the
+%write is deferred, the page number is correct. (\app{makeindex}
+%won't accept this location format, but \cs{makenoidxglossaries}
+%and \app{bib2gls} are quite happy with it.) Unfortunately, this
+%fails with \app{xindy} because \app{xindy} interprets this location
+%as \texttt{tallynum}\marg{n} because \cs{t} represents a
+%the character \qt{t}. The location must be written as
+%\verb|\\tallynum|\marg{n}.
+%
+%This means that the location
+%\verb|\tally{page}| must be expanded and then the backslashes must
+%be doubled. Unfortunately \cs{c@page} mustn't be expanded until the
+%deferred write is performed, so the location actually needs to be
+%expanded to \verb|\tallynum{\the\c@page}| but the backslashes in
+%\verb|\the\c@page| mustn't be escaped. All other backslashes must be
+%escaped. (In this case, only the backslash in \cs{tallynum} but the
+%location format may include other control sequences.) The code
+%below works on the assumption that commands like \cs{tally} are
+%defined in the form
+%\begin{verbatim}
+%\newcommand{\tally}[1]{\tallynum{\expandafter\the\csname c@#1\endcsname}}
+%\end{verbatim}
+%(note the use of \cs{expandafter} and \cs{name})
+%or in the form
+%\begin{verbatim}
+%\newcommand{\tally}[1]{\tallynum{\arabic{#1}}}
+%\end{verbatim}
+%In the second case, \cs{arabic} is one of the known commands that's
+%temporarily adjusted to prevent \cs{c@page} from being prematurely
+%expanded. In the first case, \cs{the} is temporarily modified
+%(unless \cs{glswrallowprimitivemodsfalse}) to
+%check if it's followed by \cs{c@page}. The \cs{expandafter} ensures
+%that it is. If \cs{tally} is defined in another way that hides
+%\cs{c@page} for example using \verb|\the\value{#1}| then the
+%process fails.
+%
+%With \app{makeindex}, \cs{tallynum} needs to expand to just the
+%decimal number while writing the location to the glossary file,
+%otherwise \app{makeindex} will reject it. This can
+%be done by defining \cs{glstallypage} so that \cs{tally} can
+%locally be set to \cs{arabic} while expansion is occurring. Again, \cs{c@page}
+%must be protected from expansion until the deferred write occurs.
+%
+%The expansion before the write occurs also allows the hyper prefix
+%to be determined where \cs{theH}\meta{counter} is defined in the
+%form \meta{prefix}\verb|.|\cs{the}\meta{counter}. It's possible (although
+%again unlikely) that a \app{makeindex} character might occur in the
+%prefix, which therefore needs escaping. The prefix is passed as the
+%optional argument of \cs{setentrycounter} which is needed by commands like
+%\cs{glshypernumber} to create a hyperlink for a given counter (like
+%\cs{hyperpage} but for an arbitrary counter).
+%
+% \begin{macrocode}
+\newcommand*{\@@do@esc@wrglossary}[1]{% please read documented code!
\begingroup
% \end{macrocode}
% First a bit of hackery to prevent premature
-% expansion of \cs{c@page}. Store original definitions:
+% expansion of \cs{c@page}. Store original definitions (scoped):
%\changes{3.04}{2012-11-18}{modified to compensate for possible
%incorrect page number}
-% \begin{macrocode}
- \let\orgthe\the
- \let\orgnumber\number
-% \end{macrocode}
%\changes{4.22}{2016-04-19}{added check for \cs{@arabic}}
% \begin{macrocode}
- \let\orgarabic\@arabic
- \let\orgromannumeral\romannumeral
- \let\orgalph\@alph
- \let\orgAlph\@Alph
- \let\orgRoman\@Roman
+ \let\gls@orgthe\the
+ \let\gls@orgnumber\number
+ \let\gls@orgarabic\@arabic
+ \let\gls@orgromannumeral\romannumeral
+ \let\gls@orgalph\@alph
+ \let\gls@orgAlph\@Alph
+ \let\gls@orgRoman\@Roman
% \end{macrocode}
% Redefine:
%\changes{3.05}{2013-04-21}{add Roman case. Fixed bugs in the else statements}
@@ -13337,21 +13555,31 @@ you
%modifications and added arabic case}
% \begin{macrocode}
\ifglswrallowprimitivemods
- \def\the##1{%
- \ifx##1\c@page \gls@numberpage\else\orgthe##1\fi}%
- \def\number##1{%
- \ifx##1\c@page \gls@numberpage\else\orgnumber##1\fi}%
+% \end{macrocode}
+%The redefinition of \cs{the} to use \cs{expandafter} solves the
+%problem of \verb|\the\csname c@|\meta{counter}\verb|\endcsname| but
+%is only a partial solution to the problem of \verb|\the\value|.
+%With \cs{value}, \cs{c@page} is too deeply hidden and will be
+%expanded too soon, but at least there won't be an error.
+%\changes{4.33}{2017-09-20}{added \cs{gls@the} and \cs{gls@number}}
+% \begin{macrocode}
+ \def\gls@the##1{%
+ \ifx##1\c@page \gls@numberpage\else\gls@orgthe##1\fi}%
+ \def\the{\expandafter\gls@the}%
+ \def\gls@number##1{%
+ \ifx##1\c@page \gls@numberpage\else\gls@orgnumber##1\fi}%
+ \def\number{\expandafter\gls@number}%
\fi
\def\@arabic##1{%
- \ifx##1\c@page \gls@arabicpage\else\orgarabic##1\fi}%
+ \ifx##1\c@page \gls@arabicpage\else\gls@orgarabic##1\fi}%
\def\romannumeral##1{%
- \ifx##1\c@page \gls@romanpage\else\orgromannumeral##1\fi}%
+ \ifx##1\c@page \gls@romanpage\else\gls@orgromannumeral##1\fi}%
\def\@Roman##1{%
- \ifx##1\c@page \gls@Romanpage\else\orgRoman##1\fi}%
+ \ifx##1\c@page \gls@Romanpage\else\gls@orgRoman##1\fi}%
\def\@alph##1{%
- \ifx##1\c@page \gls@alphpage\else\orgalph##1\fi}%
+ \ifx##1\c@page \gls@alphpage\else\gls@orgalph##1\fi}%
\def\@Alph##1{%
- \ifx##1\c@page \gls@Alphpage\else\orgAlph##1\fi}%
+ \ifx##1\c@page \gls@Alphpage\else\gls@orgAlph##1\fi}%
% \end{macrocode}
% Add hook to allow for other number formats:
%\changes{4.11}{2014-09-01}{added hook}
@@ -13367,7 +13595,9 @@ you
\protected@xdef\@glslocref{\theglsentrycounter}%
\endgroup
% \end{macrocode}
-% Escape any special characters
+% Escape any special characters. It's possible that with
+% \app{makeindex} the separator might be a \app{makeindex} special character.
+% Although not likely, it still needs to be taken into account.
% \begin{macrocode}
\@gls@checkmkidxchars\@glslocref
% \end{macrocode}
@@ -13811,22 +14041,27 @@ you
% \end{macrocode}
% Activate or deactivate sort key:
% \begin{macrocode}
- \@printgloss@setsort
+ \@printgloss@setsort
% \end{macrocode}
% Determine settings specified in the optional argument.
% \begin{macrocode}
- \setkeys{printgloss}{#1}%
+ \setkeys{printgloss}{#1}%
+% \end{macrocode}
+% Does the glossary exist?
+% \begin{macrocode}
+ \ifglossaryexists{\@glo@type}%
+ {%
% \end{macrocode}
% If title has been set, but toctitle hasn't, make toctitle the same
% as given title (rather than the title used when the glossary was
% defined)
%\changes{3.0}{2011-04-02}{make toctitle default to title}
% \begin{macrocode}
- \ifx\glossarytitle\org@glossarytitle
- \else
- \expandafter\let\csname @glotype@\@glo@type @title\endcsname
+ \ifx\glossarytitle\org@glossarytitle
+ \else
+ \expandafter\let\csname @glotype@\@glo@type @title\endcsname
\glossarytitle
- \fi
+ \fi
% \end{macrocode}
% Allow a high-level user command to indicate the current glossary
%\changes{3.0}{2011-04-02}{added \cs{currentglossary}}
@@ -13879,6 +14114,8 @@ you
% Now do the handler macro that deals with the actual glossary:
% \begin{macrocode}
#2%
+ }%
+ {\GlossariesWarning{Glossary `\@glo@type' doesn't exist}}%
% \end{macrocode}
% End the current scope
% \begin{macrocode}
@@ -18602,7 +18839,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% \cs{gls}\marg{label}} on subsequent use.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-prefix}[2017/08/10 v4.31 (NLCT)]
+\ProvidesPackage{glossaries-prefix}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Pass all options to \sty{glossaries}:
% \begin{macrocode}
@@ -19017,7 +19254,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
%\label{sec:code:hypernav}
% Package Definition:
% \begin{macrocode}
-\ProvidesPackage{glossary-hypernav}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-hypernav}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
%
% The commands defined in this package are provided to
@@ -19210,7 +19447,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% This defines an in-line style where the entries are
% comma-separated with just the name and description displayed.
% \begin{macrocode}
-\ProvidesPackage{glossary-inline}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-inline}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
%
%\begin{style}{inline}
@@ -19401,7 +19638,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% \ics{item} command, it will appear in a bold font by
% default.
% \begin{macrocode}
-\ProvidesPackage{glossary-list}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-list}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
%\begin{macro}{\indexspace}
%\changes{4.13}{2015-02-03}{new}
@@ -19683,7 +19920,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% The glossary styles defined in the \isty{glossary-long} package
% used the \env{longtable} environment in the glossary.
% \begin{macrocode}
-\ProvidesPackage{glossary-long}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-long}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Requires the \isty{longtable} package:
% \begin{macrocode}
@@ -20180,7 +20417,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% \url{http://tex.stackexchange.com/a/56890}
%
% \begin{macrocode}
-\ProvidesPackage{glossary-longbooktabs}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-longbooktabs}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Requires \sty{booktabs} package:
% \begin{macrocode}
@@ -20521,7 +20758,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% used the \env{longtable} environment in the glossary and use
% ragged right formatting for the multiline columns.
% \begin{macrocode}
-\ProvidesPackage{glossary-longragged}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-longragged}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Requires the \isty{array} package:
% \begin{macrocode}
@@ -20954,7 +21191,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
%use the \sty{multicol} package. These use the tree-like glossary
%styles in a multicol environment.
% \begin{macrocode}
-\ProvidesPackage{glossary-mcols}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-mcols}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -21390,7 +21627,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% The glossary styles defined in the \isty{glossary-super} package
% use the \env{supertabular} environment.
% \begin{macrocode}
-\ProvidesPackage{glossary-super}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-super}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Requires the \isty{supertabular} package:
% \begin{macrocode}
@@ -21922,7 +22159,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% are like those provided by the \isty{glossary-super} package,
% except that the multiline columns have ragged right justification.
% \begin{macrocode}
-\ProvidesPackage{glossary-superragged}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-superragged}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Requires the \isty{array} package:
% \begin{macrocode}
@@ -22362,7 +22599,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% that have a tree-like structure. These are designed for
% hierarchical glossaries.
% \begin{macrocode}
-\ProvidesPackage{glossary-tree}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossary-tree}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
%
%\begin{macro}{\indexspace}
@@ -23083,7 +23320,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% hyperlinks may not work properly.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-compatible-207}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossaries-compatible-207}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
%\begin{macro}{\GlsAddXdyAttribute}
% Adds an attribute in old format.
@@ -23444,7 +23681,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
%\section{glossaries-compatible-307}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-compatible-307}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossaries-compatible-307}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
%
% Compatibility macros for predefined glossary styles:
@@ -24252,7 +24489,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% \end{macrocode}
% Package version number now in line with main glossaries package number.
% \begin{macrocode}
-\ProvidesPackage{glossaries-accsupp}[2017/08/24 v4.32 (NLCT)
+\ProvidesPackage{glossaries-accsupp}[2017/09/20 v4.33 (NLCT)
Experimental glossaries accessibility]
% \end{macrocode}
% Pass all options to \sty{glossaries}:
@@ -26691,7 +26928,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% modules.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-babel}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossaries-babel}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Load \sty{tracklang} to obtain language settings.
% \begin{macrocode}
@@ -26735,7 +26972,7 @@ false,nolabel,autolabel,nameref}[nolabel]{%
% modules.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-polyglossia}[2017/08/24 v4.32 (NLCT)]
+\ProvidesPackage{glossaries-polyglossia}[2017/09/20 v4.33 (NLCT)]
% \end{macrocode}
% Load \sty{tracklang} to obtain language settings.
% \begin{macrocode}
@@ -26892,17 +27129,17 @@ Title case a particular field:
\usepackage{glossary-mcols}
\usepackage{glossary-longragged}
-\newglossary[glg2]{long}{gls2}{glo2}{Long Descriptions}
-\newglossary[glg3]{multipar}{gls3}{glo3}{Multi-Paragraph Descriptions}
-\newglossary[glg4]{acronymdesc}{gls4}{glo4}{Acronyms with Descriptions}
-\newglossary[glg5]{images}{gls5}{glo5}{Descriptions with Images}
-\newglossary[glg6]{acronymslang}{gls6}{glo6}{Acronyms with
-Translations}
+\newglossary*{symbolname}{Entries with Symbols in the Name}
+\newglossary*{long}{Long Descriptions}
+\newglossary*{multipar}{Multi-Paragraph Descriptions}
+\newglossary*{acronymdesc}{Acronyms with Descriptions}
+\newglossary*{images}{Descriptions with Images}
+\newglossary*{acronymslang}{Acronyms with Translations}
-\newglossary[glg7]{parent}{gls7}{glo7}{Hierarchical Entries}
-\newglossary[glg8]{homographs}{gls8}{glo8}{Homographs}
-\newglossary[glg9]{cites}{gls9}{glo9}{Entries with Citations}
-\newglossary[glg10]{urls}{gls10}{glo10}{Entries with URLs}
+\newglossary*{parent}{Hierarchical Entries}
+\newglossary*{homographs}{Homographs}
+\newglossary*{cites}{Entries with Citations}
+\newglossary*{urls}{Entries with URLs}
\DeclareAcronymList{acronymdesc,acronymslang}
@@ -26912,6 +27149,7 @@ Translations}
\loadglsentries[long]{example-glossaries-long}
\loadglsentries[multipar]{example-glossaries-multipar}
\loadglsentries[symbols]{example-glossaries-symbols}
+\loadglsentries[symbolname]{example-glossaries-symbolnames}
\loadglsentries[images]{example-glossaries-images}
\loadglsentries[parent]{example-glossaries-parent}
\loadglsentries[homographs]{example-glossaries-childnoname}
@@ -27075,6 +27313,8 @@ Here are just the acronyms again:
\printglossary[type=symbols,style=altlongragged4col,nogroupskip]
+\printglossary[type=symbolname,style=list,nogroupskip]
+
\printglossary[type=acronym,style=long]
\printglossary[type=acronymdesc,style=altlist]
@@ -28197,6 +28437,96 @@ description={elit, molestie non}}
%\fi
%\iffalse
% \begin{macrocode}
+%<*example-glossaries-symbolnames.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is part of the glossaries bundle
+ % These are test glossary entries with associated symbols.
+
+\newglossaryentry{sym.alpha}{sort={alpha},name={\ensuremath{\alpha}},
+description={Quisque ullamcorper placerat ipsum.}}
+
+\newglossaryentry{sym.beta}{sort={beta},name={\ensuremath{\beta}},
+description={Cras nibh.}}
+
+\newglossaryentry{sym.gamma}{sort={gamma},name={\ensuremath{\gamma}},
+description={Morbi vel justo vitae lacus tincidunt ultrices.}}
+
+\newglossaryentry{sym.delta}{sort={delta},name={\ensuremath{\delta}},
+description={Lorem ipsum dolor sit amet, consectetuer adipiscing
+elit.}}
+
+\newglossaryentry{sym.epsilon}{sort={epsilon},name={\ensuremath{\epsilon}},
+description={In hac habitasse platea dictumst.}}
+
+\newglossaryentry{sym.zeta}{sort={zeta},name={\ensuremath{\zeta}},
+description={Integer tempus convallis augue.}}
+
+\newglossaryentry{sym.eta}{sort={eta},name={\ensuremath{\eta}},
+description={Etiam facilisis.}}
+
+\newglossaryentry{sym.theta}{sort={theta},name={\ensuremath{\theta}},
+description={Nunc elementum fermentum wisi.}}
+
+\newglossaryentry{sym.iota}{sort={iota},name={\ensuremath{i}},
+description={Aenean placerat.}}
+
+\newglossaryentry{sym.kappa}{sort={kappa},name={\ensuremath{\kappa}},
+description={Ut imperdiet, enim sed gravida sollicitudin, felis odio
+placerat quam, ac pulvinar elit purus eget enim.}}
+
+\newglossaryentry{sym.lambda}{sort={lambda},name={\ensuremath{\lambda}},
+description={Nunc vitae tortor.}}
+
+\newglossaryentry{sym.mu}{sort={mu},name={\ensuremath{\mu}},
+description={Proin tempus nibh sit amet nisl.}}
+
+\newglossaryentry{sym.nu}{sort={nu},name={\ensuremath{\nu}},
+description={Vivamus quis tortor vitae risus porta vehicula.}}
+
+\newglossaryentry{sym.xi}{sort={xi},name={\ensuremath{\xi}},
+description={Fusce mauris.}}
+
+\newglossaryentry{sym.pi}{sort={pi},name={\ensuremath{\pi}},
+description={Vestibulum luctus nibh at lectus.}}
+
+\newglossaryentry{sym.rho}{sort={rho},name={\ensuremath{\rho}},
+description={Sed bibendum, nulla a faucibus semper, leo velit
+ultricies tellus, ac venenatis arcu wisi vel nisl. Vestibulum diam.}}
+
+\newglossaryentry{sym.sigma}{sort={sigma},name={\ensuremath{\sigma}},
+description={Aliquam pellentesque, augue quis sagittis posuere,
+turpis lacus congue quam, in hendrerit risus eros eget felis.}}
+
+\newglossaryentry{sym.tau}{sort={tau},name={\ensuremath{\tau}},
+description={Maecenas eget erat in sapien mattis porttitor.}}
+
+\newglossaryentry{sym.upsilon}{sort={upsilon},name={\ensuremath{\upsilon}},
+description={Vestibulum porttitor.}}
+
+\newglossaryentry{sym.phi}{sort={phi},name={\ensuremath{\phi}},
+description={Nulla facilisi.}}
+
+\newglossaryentry{sym.chi}{sort={chi},name={\ensuremath{\chi}},
+description={Sed a turpis eu lacus commodo facilisis.}}
+
+\newglossaryentry{sym.psi}{sort={psi},name={\ensuremath{\psi}},
+description={Morbi fringilla, wisi in dignissim interdum, justo
+lectus sagittis dui, et vehicula libero dui cursus dui.}}
+
+\newglossaryentry{sym.omega}{sort={omega},name={\ensuremath{\omega}},
+description={Mauris tempor ligula sed lacus.}}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</example-glossaries-symbolnames.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*example-glossaries-symbols.tex>
% \end{macrocode}
%\fi
@@ -32213,96 +32543,133 @@ description=man-eating giant}
%\fi
%\iffalse
% \begin{macrocode}
- % This file is public domain.
- %
- % This is a sample document illustrating how to use the
- % glossaries package with xindy. To create the document:
- %
- % latex samplexdy
- % makeglossaries samplexdy
- % latex samplexdy
- %
- % If you don't have Perl installed, then use one of the
- % following instead of makeglossaries:
- %
- % If you want to have a separate "Mc" letter group do:
- %
- % xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo
- %
- % Otherwise do:
- %
- % xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo
- %
- % If you want to use arara, you need the following directives:
- % arara: pdflatex: { synctex: on }
- % arara: makeglossaries
- % arara: pdflatex: { synctex: on }
+%<<COMMENT
+% This file is public domain.
+%
+% This is a sample document illustrating how to use the
+% glossaries package with xindy. To create the document:
+%
+% latex samplexdy
+% makeglossaries samplexdy
+% latex samplexdy
+%
+% If you don't have Perl installed, then use one of the
+% following instead of makeglossaries:
+%
+% If you want to have a separate "Mc" letter group do:
+%
+% xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo
+%
+% Otherwise do:
+%
+% xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo
+%
+% If you want to use arara, you need the following directives:
+% arara: pdflatex: { synctex: on }
+% arara: makeglossaries
+% arara: pdflatex: { synctex: on }
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
-\usepackage{fmtcount}
+\usepackage[notext,notextcomp]{stix}
\usepackage[colorlinks,plainpages]{hyperref}
\usepackage[xindy,style=altlistgroup]{glossaries}
- % Define a new command to do bold italic:
+% Define a new command to do bold italic:
\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}}
- % Need to add this to the list of attributes in order
- % to use it with xindy:
- % (This command will have no effect if \noist is used)
+% Need to add this to the list of attributes in order
+% to use it with xindy:
+% (This command will have no effect if \noist is used)
\GlsAddXdyAttribute{hyperbfit}
- % Redefine the page numbers so that they appear as a word:
+% Redefine the page numbers to a custom format (requires stix
+% package for the dice commands):
- \renewcommand*{\thepage}{\texorpdfstring{\Numberstring{page}}{\arabic{page}}}
+% \tallynum{n} displays a die or dice where the dots add up to n
+\newrobustcmd{\tallynum}[1]{%
+ \ifnum\number#1<7
+ $\csname dice\romannumeral#1\endcsname$%
+ \else
+ $\dicevi$%
+ \expandafter\tallynum\expandafter{\numexpr#1-6}%
+ \fi
+}
- % Need to add this to the list of location styles.
- % \Numberstring{page} gets expanded to
- % \protect \Numberstringnum {<n>} (where <n> is the page number)
- % so need to define the location in that format:
- % (This command will have no effect if \noist is used)
+% \tally{counter} expands to \tallynum{n} where n is the counter
+% value. In order to work with glossaries and xindy this requires
+% a very specific format. (See the glossaries user manual for more
+% details.)
-\GlsAddXdyLocation{Numberstring}{:sep "\string\protect\space
- \string\Numberstringnum\space\glsopenbrace"
- "arabic-numbers" :sep "\glsclosebrace"}
+\newcommand{\tally}[1]{\tallynum{\arabic{page}}}
- % (Need to redefine \glsXpageXhyperbfit and
- % \glsXpageXglsnumberformat after \makeglossaries to get the
- % hyperlinks working correctly.)
+% Now redefine \thepage
+% (\texorpdfstring is used in case the page number ends up in a PDF
+% bookmark, although this is unlikely)
+\renewcommand*{\thepage}{\texorpdfstring{\tally{page}}{\arabic{page}}}
- % To have Mc as a separate group uncomment the following three
- % lines:
+% Need to add this to the list of location styles.
+% This requires knowing how \thepage expands when written to a file.
+% You can check by inspecting the ':locref' attributes in the .glo
+% file. In this case, \thepage expands to \tallynum {n}
+% (the space is significant) where n is an arabic number.
+% (This command will have no effect if \noist is used)
- %\setStyleFile{samplexdy-mc} % note no extension
- %\noist
- %\GlsSetXdyLanguage{}
+\GlsAddXdyLocation{tally}{% tally location format
+ :sep "\string\tallynum\space\glsopenbrace" % -> \tallynum {
+ "arabic-numbers" % -> arabic number (0, 1, 2, etc)
+ :sep "\glsclosebrace" % -> }
+}
- % The above three lines specify to use samplexdy-mc.xdy (supplied
- % with this file) and don't overwrite it. The language is
- % unset using \GlsSetXdyLanguage{} as all the language
- % dependent information is contained in samplexdy-mc.xdy
- % Note that using \noist means that commands like
- % \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have
- % an effect.
+% If the definition of \tally changes so that it expands to
+% something slightly different then the above will have to be
+% changed accordingly.
- % Write the style file (if \noist isn't used)
- % and activate glossary entries
+% (Need to redefine \glsXpageXhyperbfit and
+% \glsXpageXglsnumberformat after \makeglossaries to get the
+% hyperlinks working correctly.)
+
+% To have Mc as a separate group uncomment the following three
+% lines:
+
+%\setStyleFile{samplexdy-mc} % note no extension
+%\noist
+%\GlsSetXdyLanguage{}
+
+% The above three lines specify to use samplexdy-mc.xdy (supplied
+% with this file) and don't overwrite it. The language is
+% unset using \GlsSetXdyLanguage{} as all the language
+% dependent information is contained in samplexdy-mc.xdy
+% Note that using \noist means that commands like
+% \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have
+% an effect.
+
+% Write the style file (if \noist isn't used)
+% and activate glossary entries
\makeglossaries
- % Each page location will be specified in the form:
- %
- % "\glsXpageXglsnumberformat{}{\protect \Numberstringnum "\marg{n}"}"
- % or
- % "\glsXpageXhyperbfit{}{\protect \Numberstringnum "\marg{n}"}"
- %
- % Redefine to allow hyperlinks:
+% Each page location will be specified in the form:
+%
+% "\glsXpageXglsnumberformat{}{\tallynum {" number "}}"
+% or
+% "\glsXpageXhyperbfit{}{\tallynum {" number "}}"
+%
+% Knowing this, we can redefine \glsXpageXglsnumberformat
+% and \glsXpageXhyperbfit to grab the number part to work out the
+% location's numeric value. If the definition of \tally changes
+% so that it expands to something slightly different then this
+% code will no longer work.
+%
+% Redefine to allow hyperlinks:
\renewcommand{\glsXpageXglsnumberformat}[2]{%
+ % remember that #2 is in the form \tallynum {n}
+ % so this does \linkpagenumber\tallynum{n}
\linkpagenumber#2%
}
@@ -32310,13 +32677,15 @@ description=man-eating giant}
\textbf{\em\linkpagenumber#2}%
}
-\newcommand{\linkpagenumber}[3]{\hyperlink{page.#3}{#1#2{#3}}}
+% Syntax: \linkpagenumber\tallynum{page number}
+% This creates hyperlink to the given page.
+\newcommand{\linkpagenumber}[2]{\hyperlink{page.#2}{#1{#2}}}
- % Define glossary entries
- % \glshyperlink is used instead of \gls to prevent the glossary
- % page numbers also appear in the locations, however I need
- % to ensure that the referenced entries are added to the
- % glossary via commands that use \glslink, \glsadd or \glssee
+% Define glossary entries
+% \glshyperlink is used instead of \gls to prevent the glossary
+% page numbers also appear in the locations, however I need
+% to ensure that the referenced entries are added to the
+% glossary via commands that use \glslink, \glsadd or \glssee
\newglossaryentry{mcadam}{name={McAdam, John Loudon},
first={John Loudon McAdam},text={McAdam},
@@ -32357,14 +32726,14 @@ description={A nonparametric test introduced by
\newglossaryentry{mach}{name={Mach, Ernst},
first={Ernst Mach},text={Mach},
- % if using samplexdy-mc.xdy, the following line is needed
- % to prevent this entry being put in the "Mc" group
+% if using samplexdy-mc.xdy, the following line is needed
+% to prevent this entry being put in the "Mc" group
sort={mach, Ernst},
description={Czech/Austrian physicist and philosopher}}
\newglossaryentry{machnumber}{name={Mach number},
- % if using samplexdy-mc.xdy, the following line is needed
- % to prevent this entry being put in the "Mc" group
+% if using samplexdy-mc.xdy, the following line is needed
+% to prevent this entry being put in the "Mc" group
sort={mach number},
description={Ratio of the speed of a body in a fluid to the
speed of sound in that fluid named after \gls{mach}}}
@@ -32438,7 +32807,8 @@ several pages.
This paragraph has been shoved to the bottom of the page using a rule.
This paragraph spans a page break for testing purposes to ensure the
glossary entry in this paragraph has the correct location. Here's
-the glossary entry: \gls{gaussianfn}.
+the glossary entry: \gls{gaussianfn}. Check that the location is
+correct.
This page talks about \glspl[format=hyperbfit]{gaussianint}. Since
it's the principle definition, the user-defined hyperbfit format is
@@ -32474,6 +32844,7 @@ This page discusses \gls{mcnemar} who introduced
\printglossaries
\end{document}
+%COMMENT
% \end{macrocode}
%\fi
%\iffalse
@@ -32570,6 +32941,286 @@ brackets.
%\fi
%\iffalse
% \begin{macrocode}
+%<*samplexdy3.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+ % This file is public domain.
+ %
+ % This is a sample document illustrating how to use the
+ % glossaries package with xindy. To create the document:
+ %
+ % latex samplexdy
+ % makeglossaries samplexdy
+ % latex samplexdy
+ %
+ % If you don't have Perl installed, then use one of the
+ % following instead of makeglossaries:
+ %
+ % If you want to have a separate "Mc" letter group do:
+ %
+ % xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo
+ %
+ % Otherwise do:
+ %
+ % xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo
+ %
+ % If you want to use arara, you need the following directives:
+ % arara: pdflatex: { synctex: on }
+ % arara: makeglossaries
+ % arara: pdflatex: { synctex: on }
+ \documentclass{article}
+
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{fmtcount}[2017/09/16]
+
+\usepackage[colorlinks,plainpages]{hyperref}
+\usepackage[xindy,style=altlistgroup]{glossaries}
+
+ % Define a new command to do bold italic:
+
+\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}}
+
+ % Need to add this to the list of attributes in order
+ % to use it with xindy:
+ % (This command will have no effect if \noist is used)
+
+\GlsAddXdyAttribute{hyperbfit}
+
+ % Redefine the page numbers so that they appear as a word:
+
+ \renewcommand*{\thepage}{\texorpdfstring{\Numberstring{page}}{\arabic{page}}}
+
+ % Need to add this to the list of location styles.
+ % \Numberstring{page} (with fmtcount.sty v3.04) gets expanded to
+ % \Numberstringnum {<n>} (where <n> is the page number)
+ % so need to define the location in that format:
+ % (This command will have no effect if \noist is used)
+
+\GlsAddXdyLocation{Numberstring}{:sep "\string\Numberstringnum\space\glsopenbrace"
+ "arabic-numbers" :sep "\glsclosebrace"}
+
+ % (Need to redefine \glsXpageXhyperbfit and
+ % \glsXpageXglsnumberformat after \makeglossaries to get the
+ % hyperlinks working correctly.)
+
+ % To have Mc as a separate group uncomment the following three
+ % lines:
+
+ %\setStyleFile{samplexdy-mc} % note no extension
+ %\noist
+ %\GlsSetXdyLanguage{}
+
+ % The above three lines specify to use samplexdy-mc.xdy (supplied
+ % with this file) and don't overwrite it. The language is
+ % unset using \GlsSetXdyLanguage{} as all the language
+ % dependent information is contained in samplexdy-mc.xdy
+ % Note that using \noist means that commands like
+ % \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have
+ % an effect.
+
+ % Write the style file (if \noist isn't used)
+ % and activate glossary entries
+
+\makeglossaries
+
+ % Each page location will be specified in the form:
+ %
+ % "\glsXpageXglsnumberformat{}{\Numberstringnum "\marg{n}"}"
+ % or
+ % "\glsXpageXhyperbfit{}{\Numberstringnum "\marg{n}"}"
+ %
+ % Redefine to allow hyperlinks:
+
+\renewcommand{\glsXpageXglsnumberformat}[2]{%
+ \linkpagenumber#2%
+}
+
+\renewcommand{\glsXpageXhyperbfit}[2]{%
+ \textbf{\em\linkpagenumber#2}%
+}
+
+ % The arguments of \linkpagenumber will be
+ % #1 -> \Numberstringnum
+ % #2 -> n
+ % This means that the page number (n) can be used to
+ % form the hyperlink target.
+\newcommand{\linkpagenumber}[2]{\hyperlink{page.#2}{#1{#2}}}
+
+ % Define glossary entries
+ % \glshyperlink is used instead of \gls to prevent the glossary
+ % page numbers also appear in the locations, however I need
+ % to ensure that the referenced entries are added to the
+ % glossary via commands that use \glslink, \glsadd or \glssee
+
+\newglossaryentry{mcadam}{name={McAdam, John Loudon},
+first={John Loudon McAdam},text={McAdam},
+description={Scottish engineer}}
+
+\newglossaryentry{maclaurin}{name={Maclaurin, Colin},
+first={Colin Maclaurin},text={Maclaurin},
+description={Scottish mathematician best known for the
+\gls{maclaurinseries}}}
+
+\newglossaryentry{maclaurinseries}{name={Maclaurin series},
+description={Series expansion},see={taylorstheorem}}
+
+\newglossaryentry{taylorstheorem}{name={Taylor's theorem},
+description={Theorem expressing a function $f(x)$ as the sum of
+a polynomial and a remainder:
+\[f(x) = f(a)+f'(a)(x-a)+f''(a)(x-a^2)/2!+\cdots+R_n\]
+If $n\to\infty$ the expansion is a \glshyperlink{taylorseries}
+and if $a=0$, the series is called a
+\gls{maclaurinseries}}}
+
+\newglossaryentry{taylorseries}{name={Taylor series},
+description={Series expansion},see={taylorstheorem}}
+
+\newglossaryentry{taylor}{name={Taylor, Brook},
+first={Brook Taylor},text={Taylor},
+description={English mathematician}}
+
+\newglossaryentry{mcnemar}{name={McNemar, Quinn},
+first={Quinn McNemar},text={McNemar},
+description={Mathematician who introduced
+\gls{mcnemarstest}. This entry has the number list
+suppressed},nonumberlist}
+
+\newglossaryentry{mcnemarstest}{name={McNemar's test},
+description={A nonparametric test introduced by
+\gls{mcnemar} in 1947}}
+
+\newglossaryentry{mach}{name={Mach, Ernst},
+first={Ernst Mach},text={Mach},
+ % if using samplexdy-mc.xdy, the following line is needed
+ % to prevent this entry being put in the "Mc" group
+sort={mach, Ernst},
+description={Czech/Austrian physicist and philosopher}}
+
+\newglossaryentry{machnumber}{name={Mach number},
+ % if using samplexdy-mc.xdy, the following line is needed
+ % to prevent this entry being put in the "Mc" group
+sort={mach number},
+description={Ratio of the speed of a body in a fluid to the
+speed of sound in that fluid named after \gls{mach}}}
+
+\newglossaryentry{malthus}{name={Malthus, Thomas Robert},
+first={Thomas Robert Malthus},text={Malthus},
+description={English mathematician, sociologist and classicist}}
+
+\newglossaryentry{ampereandre}{name={Ampère, André-Marie},
+first={André-Marie Ampère},text={Ampère},
+description={French mathematician and physicist}}
+
+\newglossaryentry{ampere}{name={ampere},
+description={SI unit of electric current named after
+\gls{ampereandre}}}
+
+\newglossaryentry{archimedes}{name={Archimedes of Syracuse},
+first={Archimedes of Syracuse},text={Archimedes},
+description={Greek mathematician}}
+
+\newglossaryentry{archimedesprinciple}{name={Archimedes' principle},
+description={Principle that if a body is submerged in a fluid
+it experiences upthrust equal to the weight of the displaced
+fluid. Named after \gls{archimedes}}}
+
+\newglossaryentry{galton}{name={Galton, Sir Francis},
+first={Sir Francis Galton},text={Galton},
+description={English anthropologist}}
+
+\newglossaryentry{gauss}{name={Gauss, Karl Friedrich},
+first={Karl Friedrich Gauss},text={Gauss},
+description={German mathematician}}
+
+\newglossaryentry{gaussianint}{name={Gaussian integer},
+description={Complex number where both real and imaginary
+parts are integers}}
+
+\newglossaryentry{gaussianfn}{name={Gaussian function},
+ description={A function of the form:
+ \[f(x) = a \exp\left(-\frac{(x-b)^2}{2c^2}\right)\]
+ for some constants $a$, $b$ and $c$}}
+
+\newglossaryentry{peano}{name={Peano, Giuseppe},
+first={Giuseppe Peano},text={Peano},
+description={Italian mathematician}}
+
+\newglossaryentry{peanoscurve}{name={Peano's curve},
+description={A space-filling curve discovered by
+\gls{peano}}}
+
+\newglossaryentry{pearson}{name={Pearson, Karl},
+first={Karl Pearson},text={Pearson},
+description={English mathematician}}
+
+\newglossaryentry{pearspmcc}{name={Pearson's product moment
+correlation coefficient},description={Product moment correlation
+coefficient named after \gls{pearson}}}
+
+\begin{document}
+\title{Sample Document Using the Glossaries Package With Xindy}
+\author{Nicola Talbot}
+\maketitle
+
+\section{\glsentryfirst{gauss}}
+
+This is a section on
+\gls[format=(]{gauss}. This section spans
+several pages.
+
+\rule{1pt}{0.6\textheight}
+
+This paragraph has been shoved to the bottom of the page using a rule.
+This paragraph spans a page break for testing purposes to ensure the
+glossary entry in this paragraph has the correct location. Here's
+the glossary entry: \gls{gaussianfn}.
+
+This page talks about \glspl[format=hyperbfit]{gaussianint}. Since
+it's the principle definition, the user-defined hyperbfit format is
+used.
+
+\newpage
+
+The section on \gls[format=)]{gauss} ends here.
+
+\section{Series Expansions}
+
+This section is about series expansions. It mentions
+\gls{maclaurin} and \gls{taylor}. It also discusses
+\gls{taylorstheorem} which is related to the \gls{taylorseries}.
+The \gls{maclaurinseries} is a special case of the
+\gls{taylorseries}.
+
+\section{\glsentryname{archimedesprinciple}}
+
+This section discusses \gls{archimedesprinciple} which was
+introduced by \gls{archimedes}.
+
+\section{Another section}
+
+This section covers \gls{mach} who introduced the \gls{machnumber}.
+It also mentions \gls{ampereandre} after whom the
+SI unit \gls{ampere} is named. It then discusses \gls{galton}
+and \gls{malthus}. Finally it mentions \gls{mcadam}.
+
+\newpage
+This page discusses \gls{mcnemar} who introduced
+\gls{mcnemarstest} and \gls{peano} who discovered \gls{peanoscurve}.
+
+\printglossaries
+\end{document}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</samplexdy3.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*mwe-acr-desc.tex>
% \end{macrocode}
%\fi
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins
index d2e8cd8f533..de0351dc47f 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.2 2017/8/24 11:10
+% glossaries.ins generated using makedtx version 1.2 2017/9/21 0:28
\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, glossary-hypernav.sty, glossary-inline.sty, glossary-list.sty, glossary-long.sty, glossary-longbooktabs.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, minimalgls.tex, glossary-lipsum-examples.tex, example-glossaries-acronym-desc.tex, example-glossaries-acronym.tex, example-glossaries-acronyms-lang.tex, example-glossaries-brief.tex, example-glossaries-childnoname.tex, example-glossaries-cite.tex, example-glossaries-images.tex, example-glossaries-long.tex, example-glossaries-multipar.tex, example-glossaries-parent.tex, example-glossaries-symbols.tex, example-glossaries-url.tex, sample-chap-hyperfirst.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dot-abbr.tex, sample-dual.tex, sample-entrycount.tex, sample-entryfmt.tex, sample-FnDesc.tex, sample-font-abbr.tex, sample-ignored.tex, sample-index.tex, sample-inline.tex, sample-langdict.tex, sample-newkeys.tex, sample-noidxapp-utf8.tex, sample-noidxapp.tex, sample-nomathhyper.tex, sample-numberlist.tex, sample-prefix.tex, sample-si.tex, sample-storage-abbr-desc.tex, sample-storage-abbr.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, mwe-acr-desc.tex, mwe-acr.tex, mwe-gls.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, glossaries-prefix.sty, glossary-hypernav.sty, glossary-inline.sty, glossary-list.sty, glossary-long.sty, glossary-longbooktabs.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, minimalgls.tex, glossary-lipsum-examples.tex, example-glossaries-acronym-desc.tex, example-glossaries-acronym.tex, example-glossaries-acronyms-lang.tex, example-glossaries-brief.tex, example-glossaries-childnoname.tex, example-glossaries-cite.tex, example-glossaries-images.tex, example-glossaries-long.tex, example-glossaries-multipar.tex, example-glossaries-parent.tex, example-glossaries-symbolnames.tex, example-glossaries-symbols.tex, example-glossaries-url.tex, sample-chap-hyperfirst.tex, sample-crossref.tex, sample-custom-acronym.tex, sample-dot-abbr.tex, sample-dual.tex, sample-entrycount.tex, sample-entryfmt.tex, sample-FnDesc.tex, sample-font-abbr.tex, sample-ignored.tex, sample-index.tex, sample-inline.tex, sample-langdict.tex, sample-newkeys.tex, sample-noidxapp-utf8.tex, sample-noidxapp.tex, sample-nomathhyper.tex, sample-numberlist.tex, sample-prefix.tex, sample-si.tex, sample-storage-abbr-desc.tex, sample-storage-abbr.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, samplexdy3.tex, mwe-acr-desc.tex, mwe-acr.tex, mwe-gls.tex, samplexdy-mc.xdy, samplexdy-mc207.xdy, database1.tex, database2.tex, glossaries.perl.
\endpreamble
@@ -70,6 +70,7 @@
\file{example-glossaries-long.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{example-glossaries-long.tex}}
\file{example-glossaries-multipar.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{example-glossaries-multipar.tex}}
\file{example-glossaries-parent.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{example-glossaries-parent.tex}}
+\file{example-glossaries-symbolnames.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{example-glossaries-symbolnames.tex}}
\file{example-glossaries-symbols.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{example-glossaries-symbols.tex}}
\file{example-glossaries-url.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{example-glossaries-url.tex}}
\file{sample-chap-hyperfirst.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sample-chap-hyperfirst.tex}}
@@ -114,6 +115,7 @@
\file{sampleutf8.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{sampleutf8.tex}}
\file{samplexdy.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy.tex}}
\file{samplexdy2.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy2.tex}}
+\file{samplexdy3.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{samplexdy3.tex}}
\file{mwe-acr-desc.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{mwe-acr-desc.tex}}
\file{mwe-acr.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{mwe-acr.tex}}
\file{mwe-gls.tex}{\nopreamble\nopostamble\from{glossaries.dtx}{mwe-gls.tex}}
diff --git a/Master/texmf-dist/source/latex/glossaries/makeglossaries-lite.pod b/Master/texmf-dist/source/latex/glossaries/makeglossaries-lite.pod
new file mode 100644
index 00000000000..9d0bbe4d47e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/glossaries/makeglossaries-lite.pod
@@ -0,0 +1,120 @@
+=head1 NAME
+
+makeglossaries-lite - Calls makeindex/xindy for LaTeX documents using glossaries package
+
+=head1 SYNOPSIS
+
+B<makeglossaries> [B<-o> I<file>] [B<-q>] [B<-n>]
+[B<-s> I<file>] [B<-t> I<file>] [B<-L> I<language>] [B<-c>] [B<-g>]
+[B<-l>] [B<-p> I<num>] [B<-r>] [B<-m> I<file>] [B<-x> I<file>]
+[B<--version>] [B<--help>] I<basename>
+
+=head1 DESCRIPTION
+
+B<makeglossaries-lite> is cut-down Lua alternative to the
+B<makeglossaries> Perl script. It's designed for use with LaTeX documents that
+use the glossaries package. Some options that are available to
+B<makeglossaries> aren't available with B<makeglossaries-lite>.
+The mandatory argument I<basename> should
+be the name of the LaTeX document without the .tex extension.
+B<makeglossaries-lite> will read the auxiliary file to determine whether
+B<makeindex> or B<xindy> should be called. All the information
+required to be passed to the relevant indexing application should
+also be contained in the auxiliary file, but may be overridden by
+the option arguments to B<makeglossaries-lite>.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-q>
+
+Quiet mode. Reduces chatter to standard output.
+
+=item B<-n>
+
+Print the commands that would normally be executed but don't run
+them.
+
+=item B<-o> I<file>
+
+Use I<file> as the output file. (Only suitable for documents
+containing a single glossary, otherwise each glossary will be
+overridden.)
+
+=item B<-s> I<file>
+
+Use I<file> as the style file. Note that if you use this option,
+you need to know whether B<makeindex> or B<xindy> will be called, as
+they have different style files.
+
+=item B<-t> I<file>
+
+Use I<file> as the transcript file.
+
+=item B<-l>
+
+Letter ordering.
+
+=item B<-L> I<language>
+
+This option only has an effect if B<xindy> is called. Sets the
+language. See B<xindy> documentation for further details.
+
+=item B<-c>
+
+Compress intermediate blanks (B<makeindex> only).
+
+=item B<-g>
+
+Employ German word ordering (B<makeindex> only).
+
+=item B<-p> I<num>
+
+Sets the starting page number to be I<num> (B<makeindex> only).
+
+=item B<-r>
+
+Disable implicit page range formation (B<makeindex> only).
+
+=item B<-m> I<file>
+
+Specify the full path name for B<makeindex> to I<file> in the
+event that B<makeindex> isn't on the operating system's path.
+
+=item B<-x> I<file>
+
+Specify the full path name for B<xindy> to I<file> in the
+event that B<xindy> isn't on the operating system's path.
+
+=item B<--version>
+
+Prints version number and exits.
+
+=item B<--help>
+
+Prints help message and exits.
+
+=back
+
+=head1 REQUIRES
+
+texlua and makeindex or xindy (depending on glossaries package options).
+
+=head1 LICENSE
+
+This is free software distributed under the LaTeX Project Public
+License. There is NO WARRANTY.
+See L<http://www.latex-project.org/lppl.txt> for details.
+
+=head1 AUTHOR
+
+Nicola L. C. Talbot,
+L<http://www.dickimaw-books.com/>
+
+=head1 RECOMMENDED READING
+
+The glossaries manual:
+
+ texdoc glossaries
+=cut