diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/glossaries/glossaries.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.dtx | 259 |
1 files changed, 135 insertions, 124 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index d063abc2371..5868f244d56 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -1,18 +1,16 @@ %\iffalse % glossaries.dtx generated using makedtx version 1.2 (c) Nicola Talbot % Command line args: -% -section "chapter" -% -comment ".*\.perl" -% -comment ".*\.tex" -% -comment ".*\.xdy" -% -setambles ".*\.perl=>\nopreamble\nopostamble" -% -setambles ".*\.tex=>\nopreamble\nopostamble" -% -setambles ".*\.xdy=>\nopreamble\nopostamble" % -macrocode ".*\.perl" % -macrocode ".*\.tex" % -macrocode ".*\.xdy" % -codetitle "Main Package Code" +% -doc "glossaries-manual.tex" +% -section "chapter" % -author "Nicola Talbot" +% -comment ".*\.perl" +% -comment ".*\.tex" +% -comment ".*\.xdy" % -src "glossaries\.sty\Z=>glossaries.sty" % -src "glossaries-prefix.sty\Z=>glossaries-prefix.sty" % -src "(glossary-.+)\.(sty)\Z=>\1.\2" @@ -29,9 +27,11 @@ % -src "(samplexdy-mc.*\.xdy)\Z=>\1" % -src "(database.*\.tex)\Z=>\1" % -src "(.*\.perl)\Z=>\1" -% -doc "glossaries-manual.tex" +% -setambles ".*\.perl=>\nopreamble\nopostamble" +% -setambles ".*\.tex=>\nopreamble\nopostamble" +% -setambles ".*\.xdy=>\nopreamble\nopostamble" % glossaries -% Created on 2018/5/23 15:06 +% Created on 2018/6/1 13:57 %\fi %\iffalse %<*package> @@ -145,7 +145,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{19427} +\CheckSum{19428} \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.39} +% \title{Documented Code For glossaries v4.40} % \author{Nicola L.C. Talbot\\[10pt] %Dickimaw Books\\ %\url{http://www.dickimaw-books.com/}} % -% \date{2018-05-23} +% \date{2018-06-01} % \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.39: +%For the main user guide, read \qt{glossaries.sty v4.40: %\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}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossaries}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} %\changes{4.18}{2015-09-09}{split mfirstuc into separate bundle} % Required packages: @@ -12984,10 +12984,15 @@ false,nolabel,autolabel,nameref}[nolabel]{% commands like \string\gls)}% }% % \end{macrocode} -% Don't escape makeindex/xindy characters +% Don't escape makeindex/xindy characters: % \begin{macrocode} \let\@gls@checkmkidxchars\@gobble % \end{macrocode} +% Don't escape locations: +%\changes{4.40}{2018-06-01}{added esclocations=false} +% \begin{macrocode} + \glsesclocationsfalse +% \end{macrocode} % Write glossary information to aux instead of glossary files % \begin{macrocode} \let\@@do@@wrglossary\gls@noidxglossary @@ -13192,8 +13197,12 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{macro} % +%\section{Writing information to associated files} +%\label{sec:wrgloss} +% %\begin{macro}{\gls@noidxglossary} -% Write the glossary information to the aux file: +% Write the glossary information to the aux file (for the `noidx' +% method): % \begin{macrocode} \newcommand*{\gls@noidxglossary}{% \protected@write\@auxout{}{% @@ -13211,14 +13220,12 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{macro} % -%\section{Writing information to associated files} -% -% %\begin{macro}{\istfile} %\changes{3.0}{2011-04-02}{deprecated} +%\changes{4.40}{2018-06-01}{changed \cs{def} to \cs{providecommand}} % Deprecated. % \begin{macrocode} -\def\istfile{\glswrite} +\providecommand\istfile{\glswrite} % \end{macrocode} %\end{macro} % @@ -13230,14 +13237,14 @@ false,nolabel,autolabel,nameref}[nolabel]{% } % \end{macrocode} %\begin{macro}{\@glswritefiles} -% Only write the files if \pkgopt[true]{savewrites} +% Only write the files if \pkgopt[true]{savewrites}. %\changes{3.14a}{2013-11-12}{renamed \cs{glswritefiles} to %\cs{@glswritefiles} and used ``savewrites'' option to set %\cs{glswritefiles}} % \begin{macrocode} \newcommand*{\@glswritefiles}{% % \end{macrocode} -% Iterate through all the glossaries +% Iterate through all the glossaries. %\changes{3.01}{2011-04-12}{added check for empty glossaries} %\changes{3.02}{2012-05-21}{added check for existence of token % in case \cs{makeglossaries has been omitted}} @@ -13276,7 +13283,7 @@ you % \end{macrocode} %\end{macro} % -% As from v4.10, the \cs{glossary} command is +% As from v4.10, the \cs{glossary} command isn't % used by the \styfmt{glossaries} package. Since the % user isn't expected to use this command (as \styfmt{glossaries} % takes care of the particular format required for @@ -13285,12 +13292,12 @@ you % with other packages (and with the \cs{mark} mechanism). % % In v4.10, the redefinition of \cs{glossary} was removed since it -% wasn't intended as a user level command, however it -% seems there are packages that have hacked the internal macros used -% by \styfmt{glossaries} and no longer work with this redefinition -% removed, so it's been restored in v4.11 but is not used at all by -% \styfmt{glossaries}. (This may be removed or moved to a -% compatibility mode in future.) +% was never intended as a user level command (and wasn't documented +% in the user manual), however it seems there are packages that have +% hacked the internal macros used by \styfmt{glossaries} and no longer +% work with this redefinition removed, so it's been restored in v4.11 +% but is not used at all by \styfmt{glossaries}. +% (This may be removed or moved to a compatibility mode in future.) %\begin{macro}{\glossary} % \begin{macrocode} \if@gls@docloaded @@ -13438,9 +13445,8 @@ you % List of page formats to be protected against expansion. %\changes{4.22}{2016-04-19}{added arabic to list} % \begin{macrocode} -\newcommand{\gls@protected@pagefmts}{% - \gls@numberpage,\gls@alphpage,\gls@Alphpage,\gls@romanpage,\gls@Romanpage,\gls@arabicpage% -} +\newcommand{\gls@protected@pagefmts}{\gls@numberpage,\gls@alphpage,% + \gls@Alphpage,\gls@romanpage,\gls@Romanpage,\gls@arabicpage} % \end{macrocode} %\end{macro} %\begin{macro}{\gls@disablepagerefexpansion} @@ -13578,7 +13584,7 @@ you \@do@gls@getcounterprefix \fi % \end{macrocode} -% De-tok label if required +% De-tok label if required. %\changes{4.03}{2014-01-20}{added \cs{glsdetoklabel}} % \begin{macrocode} \edef\@gls@label{\glsdetoklabel{#1}}% @@ -18927,7 +18933,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \cs{gls}\marg{label}} on subsequent use. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-prefix}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossaries-prefix}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Pass all options to \sty{glossaries}: % \begin{macrocode} @@ -19342,7 +19348,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\label{sec:code:hypernav} % Package Definition: % \begin{macrocode} -\ProvidesPackage{glossary-hypernav}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-hypernav}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % % The commands defined in this package are provided to @@ -19535,7 +19541,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}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-inline}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % %\begin{style}{inline} @@ -19726,7 +19732,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \ics{item} command, it will appear in a bold font by % default. % \begin{macrocode} -\ProvidesPackage{glossary-list}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-list}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} %\begin{macro}{\indexspace} %\changes{4.13}{2015-02-03}{new} @@ -20008,7 +20014,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}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-long}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Requires the \isty{longtable} package: % \begin{macrocode} @@ -20505,7 +20511,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \url{http://tex.stackexchange.com/a/56890} % % \begin{macrocode} -\ProvidesPackage{glossary-longbooktabs}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-longbooktabs}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Requires \sty{booktabs} package: % \begin{macrocode} @@ -20846,7 +20852,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}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-longragged}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -21279,7 +21285,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}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-mcols}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -21716,7 +21722,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}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-super}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Requires the \isty{supertabular} package: % \begin{macrocode} @@ -22248,7 +22254,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}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-superragged}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -22688,7 +22694,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % that have a tree-like structure. These are designed for % hierarchical glossaries. % \begin{macrocode} -\ProvidesPackage{glossary-tree}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossary-tree}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % %\begin{macro}{\indexspace} @@ -23409,7 +23415,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % hyperlinks may not work properly. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-207}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossaries-compatible-207}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} %\begin{macro}{\GlsAddXdyAttribute} % Adds an attribute in old format. @@ -23770,7 +23776,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\section{glossaries-compatible-307} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-307}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossaries-compatible-307}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % % Compatibility macros for predefined glossary styles: @@ -24578,7 +24584,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} % Package version number now in line with main glossaries package number. % \begin{macrocode} -\ProvidesPackage{glossaries-accsupp}[2018/05/23 v4.39 (NLCT) +\ProvidesPackage{glossaries-accsupp}[2018/06/01 v4.40 (NLCT) Experimental glossaries accessibility] % \end{macrocode} % Pass all options to \sty{glossaries}: @@ -27021,7 +27027,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % modules. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-babel}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossaries-babel}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Load \sty{tracklang} to obtain language settings. % \begin{macrocode} @@ -27065,7 +27071,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % modules. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-polyglossia}[2018/05/23 v4.39 (NLCT)] +\ProvidesPackage{glossaries-polyglossia}[2018/06/01 v4.40 (NLCT)] % \end{macrocode} % Load \sty{tracklang} to obtain language settings. % \begin{macrocode} @@ -33039,93 +33045,97 @@ brackets. %\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}[2017/09/16] +\usepackage{fmtcount} \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 so that they appear as a word: - \renewcommand*{\thepage}{\texorpdfstring{\Numberstring{page}}{\arabic{page}}} +\renewcommand*{\thepage}{\texorpdfstring{\customfmt{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) +\newcommand{\customfmt}[1]{\customfmtnum{\arabic{#1}}} +\newrobustcmd{\customfmtnum}[1]{\Numberstringnum{#1}} -\GlsAddXdyLocation{Numberstring}{:sep "\string\Numberstringnum\space\glsopenbrace" +% Need to add this to the list of location styles. +% \customfmt{page} gets expanded to +% \custommfmtnum {<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{customfmt}{:sep "\string\customfmtnum\space\glsopenbrace" "arabic-numbers" :sep "\glsclosebrace"} - % (Need to redefine \glsXpageXhyperbfit and - % \glsXpageXglsnumberformat after \makeglossaries to get the - % hyperlinks working correctly.) +% (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: +% To have Mc as a separate group uncomment the following three +% lines: - %\setStyleFile{samplexdy-mc} % note no extension - %\noist - %\GlsSetXdyLanguage{} +%\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. +% 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 +% 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: +% Each page location will be specified in the form: +% +% "\glsXpageXglsnumberformat{}{\customfmtnum "\marg{n}"}" +% or +% "\glsXpageXhyperbfit{}{\customfmtnum "\marg{n}"}" +% +% Redefine to allow hyperlinks: \renewcommand{\glsXpageXglsnumberformat}[2]{% \linkpagenumber#2% @@ -33135,18 +33145,18 @@ brackets. \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. +% The arguments of \linkpagenumber will be +% #1 -> \customfmtnum +% #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 +% 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}, @@ -33187,14 +33197,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}}} @@ -33305,6 +33315,7 @@ This page discusses \gls{mcnemar} who introduced \printglossaries \end{document} +%COMMENT % \end{macrocode} %\fi %\iffalse |