diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-20 21:52:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-20 21:52:18 +0000 |
commit | e155df94bcae899bce238a8b1bc2d6b7e7303cbb (patch) | |
tree | e300096ee2baf91633ad81125e449d3376fbd7c2 /Master/texmf-dist/source/latex/glossaries | |
parent | 55d513e3d3a10cd226794281bae3af49a4766f9d (diff) |
glossaries (20apr16)
git-svn-id: svn://tug.org/texlive/trunk@40635 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 | 437 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/glossaries/glossaries.ins | 2 |
2 files changed, 349 insertions, 90 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index bd11571370f..766158b01a3 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -1,11 +1,6 @@ %\iffalse % glossaries.dtx generated using makedtx version 1.1 (c) Nicola Talbot % Command line args: -% -codetitle "Main Package Code" -% -setambles ".*\.perl=>\nopreamble\nopostamble" -% -setambles ".*\.tex=>\nopreamble\nopostamble" -% -setambles ".*\.xdy=>\nopreamble\nopostamble" -% -author "Nicola Talbot" % -src "glossaries\.sty\Z=>glossaries.sty" % -src "glossaries-prefix.sty\Z=>glossaries-prefix.sty" % -src "(glossary-.+)\.(sty)\Z=>\1.\2" @@ -22,16 +17,21 @@ % -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" +% -author "Nicola Talbot" % -macrocode ".*\.perl" % -macrocode ".*\.tex" % -macrocode ".*\.xdy" -% -doc "glossaries-manual.tex" % -section "chapter" % -comment ".*\.perl" % -comment ".*\.tex" % -comment ".*\.xdy" +% -doc "glossaries-manual.tex" +% -codetitle "Main Package Code" % glossaries -% Created on 2016/1/24 16:29 +% Created on 2016/4/19 23:14 %\fi %\iffalse %<*package> @@ -143,7 +143,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{18368} +\CheckSum{18545} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -171,12 +171,12 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{Documented Code For glossaries v4.21} +% \title{Documented Code For glossaries v4.22} % \author{Nicola L.C. Talbot\\[10pt] %Dickimaw Books\\ %\url{http://www.dickimaw-books.com/}} % -% \date{2016-01-24} +% \date{2016-04-19} % \maketitle % %This is the documented code for the \styfmt{glossaries} package. @@ -192,7 +192,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.21: +%For the main user guide, read \qt{glossaries.sty v4.22: %\LaTeX2e\ Package to Assist Generating Glossaries}. % %\item[\url{mfirstuc-manual.pdf}] @@ -247,7 +247,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossaries}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} %\changes{4.18}{2015-09-09}{split mfirstuc into separate bundle} % Required packages: @@ -10911,6 +10911,27 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsentrytitlecase} +%\changes{4.22}{2016-04-19}{new} +% \begin{macrocode} +\newrobustcmd*{\@glsentrytitlecase}[2]{% + \glsfieldfetch{#1}{#2}{\@gls@value}% + \xcapitalisewords{\@gls@value}% +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsentrytitlecase}[2]{% + \texorpdfstring + {\@glsentrytitlecase{#1}{#2}}% + {\@gls@entry@field{#1}{#2}}% + } +} +{ + \newcommand*{\glsentrytitlecase}[2]{\@glsentrytitlecase{#1}{#2}} +} +% \end{macrocode} +%\end{macro} +% % Display the glossary type with which this entry is associated % (as specified by the \gloskey{type} key used when the entry was % defined) @@ -12568,9 +12589,10 @@ you %\changes{3.04}{2012-11-18}{new} %\changes{3.05}{2013-04-21}{added Roman to list} % 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@numberpage,\gls@alphpage,\gls@Alphpage,\gls@romanpage,\gls@Romanpage,\gls@arabicpage% } % \end{macrocode} %\end{macro} @@ -12603,6 +12625,12 @@ you \newcommand*{\gls@numberpage}{\number\c@page} % \end{macrocode} %\end{macro} +%\begin{macro}{\gls@arabicpage} +%\changes{4.22}{2016-04-19}{new} +% \begin{macrocode} +\newcommand*{\gls@arabicpage}{\@arabic\c@page} +% \end{macrocode} +%\end{macro} %\begin{macro}{\gls@romanpage} %\changes{3.04}{2012-11-18}{new} % \begin{macrocode} @@ -12657,6 +12685,17 @@ you % \end{macrocode} %\end{macro} % +%\begin{macro}{\ifglswrallowprimitivemods} +%\changes{4.22}{2016-04-19}{new} +% Conditional to determine whether or not \cs{@@do@wrglossary} +% should be allowed to temporarily redefine \cs{the} and +% \cs{number}. +% \begin{macrocode} +\newif\ifglswrallowprimitivemods +\glswrallowprimitivemodstrue +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@@do@wrglossary} %\changes{1.17}{2008-12-26}{new} % Write the glossary entry in the appropriate format. @@ -12674,6 +12713,10 @@ you % \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 @@ -12681,11 +12724,17 @@ you % \end{macrocode} % Redefine: %\changes{3.05}{2013-04-21}{add Roman case. Fixed bugs in the else statements} -% \begin{macrocode} - \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}% +%\changes{4.22}{2016-04-19}{added test to allow temporary primitive +%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}% + \fi + \def\@arabic##1{% + \ifx##1\c@page \gls@arabicpage\else\orgarabic##1\fi}% \def\romannumeral##1{% \ifx##1\c@page \gls@romanpage\else\orgromannumeral##1\fi}% \def\@Roman##1{% @@ -17922,7 +17971,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \cs{gls}\marg{label}} on subsequent use. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-prefix}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossaries-prefix}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Pass all options to \sty{glossaries}: % \begin{macrocode} @@ -18337,7 +18386,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\label{sec:code:hypernav} % Package Definition: % \begin{macrocode} -\ProvidesPackage{glossary-hypernav}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-hypernav}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % % The commands defined in this package are provided to @@ -18454,23 +18503,25 @@ false,nolabel,autolabel,nameref}[nolabel]{% % groups that are present} % \begin{macrocode} \newcommand*{\glsnavigation}{% -\def\@gls@between{}% -\@ifundefined{@gls@hypergrouplist@\@glo@type}{% - \def\@gls@list{}% -}{% - \expandafter\let\expandafter\@gls@list + \def\@gls@between{}% + \ifcsundef{@gls@hypergrouplist@\@glo@type}% + {% + \def\@gls@list{}% + }% + {% + \expandafter\let\expandafter\@gls@list \csname @gls@hypergrouplist@\@glo@type\endcsname -}% -\@for\@gls@tmp:=\@gls@list\do{% - \@gls@between + }% + \@for\@gls@tmp:=\@gls@list\do{% + \@gls@between % \end{macrocode} %\changes{3.11a}{2013-10-15}{switched to using %\cs{@gls@getgrouptitle}} % \begin{macrocode} - \@gls@getgrouptitle{\@gls@tmp}{\@gls@grptitle}% - \glsnavhyperlink{\@gls@tmp}{\@gls@grptitle}% - \let\@gls@between\glshypernavsep% -}% + \@gls@getgrouptitle{\@gls@tmp}{\@gls@grptitle}% + \glsnavhyperlink{\@gls@tmp}{\@gls@grptitle}% + \let\@gls@between\glshypernavsep + }% } % \end{macrocode} %\end{macro} @@ -18486,10 +18537,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{macro}{\glssymbolnav} % \begin{macrocode} \newcommand*{\glssymbolnav}{% -\glsnavhyperlink{glssymbols}{\glsgetgrouptitle{glssymbols}}% -\glshypernavsep -\glsnavhyperlink{glsnumbers}{\glsgetgrouptitle{glsnumbers}}% -\glshypernavsep + \glsnavhyperlink{glssymbols}{\glsgetgrouptitle{glssymbols}}% + \glshypernavsep + \glsnavhyperlink{glsnumbers}{\glsgetgrouptitle{glsnumbers}}% + \glshypernavsep } % \end{macrocode} %\end{macro} @@ -18507,7 +18558,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}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-inline}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % %\begin{style}{inline} @@ -18698,7 +18749,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \ics{item} command, it will appear in a bold font by % default. % \begin{macrocode} -\ProvidesPackage{glossary-list}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-list}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} %\begin{macro}{\indexspace} %\changes{4.13}{2015-02-03}{new} @@ -18710,6 +18761,29 @@ false,nolabel,autolabel,nameref}[nolabel]{% } % \end{macrocode} %\end{macro} +% +%\begin{macro}{\glslistgroupheaderfmt} +%\changes{4.22}{2016-04-19}{new} +% Provide a way of adjusting the format of the group headings. +% \begin{macrocode} +\newcommand*{\glslistgroupheaderfmt}[1]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslistnavigationitem} +%\changes{4.22}{2016-04-19}{new} +% Provide a way of adjusting the format of the navigation header. +% This puts the navigation line inside the optional argument +% of item to prevent unwanted space occurring at the start, but +% this can cause a problem if the navigation line is too long. +% With this command, it makes it easier for the user to customise +% the style without having to remember to modify \cs{glossaryheader} +% after the style has been set. +% \begin{macrocode} +\newcommand*{\glslistnavigationitem}[1]{\item[#1]} +% \end{macrocode} +%\end{macro} +% %\begin{style}{list} % The \glostyle{list} glossary style % uses the \env{description} environment. The group separator @@ -18745,10 +18819,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% \glossentrydesc{##1}\glspostdescription\space ##2}% % \end{macrocode} % Sub-entries continue on the same line: +%\changes{4.22}{2016-04-19}{fixed missing space before description} % \begin{macrocode} \renewcommand*{\subglossentry}[3]{% \glssubentryitem{##2}% - \glstarget{##2}{\strut}% + \glstarget{##2}{\strut}\space \glossentrydesc{##2}\glspostdescription\space ##3.}% % \end{macrocode} % Add vertical space between groups: @@ -18772,7 +18847,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} % Each group has a heading: % \begin{macrocode} - \renewcommand*{\glsgroupheading}[1]{\item[\glsgetgrouptitle{##1}]}} + \renewcommand*{\glsgroupheading}[1]{% + \item[\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}]}} % \end{macrocode} %\end{style} % @@ -18787,15 +18863,16 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \begin{macrocode} \setglossarystyle{list}% % \end{macrocode} -% Add navigation links at the start of the environment: +% Add navigation links at the start of the environment. % \begin{macrocode} \renewcommand*{\glossaryheader}{% - \item[\glsnavigation]}% + \glslistnavigationitem{\glsnavigation}}% % \end{macrocode} % Each group has a heading with a hypertarget: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% - \item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} + \item[\glslistgroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}]}} % \end{macrocode} %\end{style} % @@ -18850,7 +18927,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} % Each group has a heading: % \begin{macrocode} - \renewcommand*{\glsgroupheading}[1]{\item[\glsgetgrouptitle{##1}]}} + \renewcommand*{\glsgroupheading}[1]{% + \item[\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}]}} % \end{macrocode} %\end{style} % @@ -18865,15 +18943,16 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \begin{macrocode} \setglossarystyle{altlist}% % \end{macrocode} -% Add navigation links at the start of the environment: +% Add navigation links at the start of the environment. % \begin{macrocode} \renewcommand*{\glossaryheader}{% - \item[\glsnavigation]}% + \glslistnavigationitem{\glsnavigation}}% % \end{macrocode} % Each group has a heading with a hypertarget: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% - \item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} + \item[\glslistgroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}]}} % \end{macrocode} %\end{style} % @@ -18952,7 +19031,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}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-long}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Requires the \isty{longtable} package: % \begin{macrocode} @@ -19015,11 +19094,12 @@ false,nolabel,autolabel,nameref}[nolabel]{% }% % \end{macrocode} % Sub entries displayed on the following row without the name: +%\changes{4.22}{2016-04-19}{fixed typo in \cs{glossentrydesc}} % \begin{macrocode} \renewcommand{\subglossentry}[3]{% & \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glosentrydesc{##2}\glspostdescription\space + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription\space ##3\tabularnewline }% % \end{macrocode} @@ -19427,7 +19507,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \url{http://tex.stackexchange.com/a/56890} % % \begin{macrocode} -\ProvidesPackage{glossary-longbooktabs}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-longbooktabs}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Requires \sty{booktabs} package: % \begin{macrocode} @@ -19750,7 +19830,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}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-longragged}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -20161,7 +20241,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}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-mcols}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -20216,7 +20296,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newglossarystyle{mcolindexgroup}{% \setglossarystyle{mcolindex}% \renewcommand*{\glsgroupheading}[1]{% - \item\textbf{\glsgetgrouptitle{##1}}\indexspace}% + \item\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}\indexspace}% } % \end{macrocode} %\end{style} @@ -20234,13 +20314,44 @@ false,nolabel,autolabel,nameref}[nolabel]{% % Put navigation links to the groups at the start of the glossary: % \begin{macrocode} \renewcommand*{\glossaryheader}{% - \item\textbf{\glsnavigation}\indexspace}% + \item\glstreenavigationfmt{\glsnavigation}\indexspace}% +% \end{macrocode} +% Add a heading for each group (with a target). The group's title is +% in bold followed by a vertical gap. +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \indexspace}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcolindexspannav} +%\changes{4.22}{2016-04-19}{new} +% Similar to \glostyle{mcolindexhypergroup}, but puts the navigation +% line +% in the optional argument of \env{multicols}. +% \begin{macrocode} +\newglossarystyle{mcolindexspannav}{% + \setglossarystyle{index}% + \renewenvironment{theglossary}% + {% +% \end{macrocode} +%\changes{3.05}{2013-04-21}{replaced `2' with \cs{glsmcols}} +% \begin{macrocode} + \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}] + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\item\@idxitem}% + {\end{multicols}}% % \end{macrocode} % Add a heading for each group (with a target). The group's title is % in bold followed by a vertical gap. % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% - \item\textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% \indexspace}% } % \end{macrocode} @@ -20279,7 +20390,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % Each group has a heading (in bold) followed by a vertical gap): % \begin{macrocode} \renewcommand{\glsgroupheading}[1]{\par - \noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}% + \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}\par\indexspace}% } % \end{macrocode} %\end{style} @@ -20300,14 +20411,44 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \env{theglossary} environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{% - \par\noindent\textbf{\glsnavigation}\par\indexspace}% + \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace}% +% \end{macrocode} +% Each group has a heading (in bold with a target) followed by a +% vertical gap): +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \indexspace}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcoltreespannav} +%\changes{4.22}{2016-04-19}{new} +% Similar to the \glostyle{mcoltreehypergroup} style but the +% navigation line is put in the optional argument of the +% \env{multicols} environment. +% \begin{macrocode} +\newglossarystyle{mcoltreespannav}{% + \setglossarystyle{tree}% + \renewenvironment{theglossary}% + {% +% \end{macrocode} +%\changes{3.05}{2013-04-21}{replaced `2' with \cs{glsmcols}} +% \begin{macrocode} + \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}] + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + }% + {\end{multicols}}% % \end{macrocode} % Each group has a heading (in bold with a target) followed by a % vertical gap): % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \par\noindent - \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par \indexspace}% } % \end{macrocode} @@ -20346,7 +20487,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % Give each group a heading: % \begin{macrocode} \renewcommand{\glsgroupheading}[1]{\par - \noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}% + \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}\par\indexspace}% } % \end{macrocode} %\end{style} @@ -20367,14 +20508,41 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \env{theglossary} environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{% - \par\noindent\textbf{\glsnavigation}\par\indexspace}% + \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace}% +% \end{macrocode} +% Each group has a heading (in bold with a target) followed by a +% vertical gap): +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \indexspace}% +} +% \end{macrocode} +%\end{style} +% +%\begin{style}{mcoltreenonamespannav} +%\changes{4.22}{2016-04-19}{new} +% Similar to the \glostyle{mcoltreenonamehypergroup} style but the +% navigation line is put in the optional argument of the +% \env{multicols} environment. +% \begin{macrocode} +\newglossarystyle{mcoltreenonamespannav}{% + \setglossarystyle{treenoname}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}] + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + }% + {\end{multicols}}% % \end{macrocode} % Each group has a heading (in bold with a target) followed by a % vertical gap): % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \par\noindent - \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par \indexspace}% } % \end{macrocode} @@ -20416,7 +20584,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax - \textbf{\glsgetgrouptitle{##1}}\par\indexspace}% + \glstreegroupheaderfmt{\glsgetgrouptitle{##1}}\par\indexspace}% } % \end{macrocode} %\end{style} @@ -20439,7 +20607,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax - \textbf{\glsnavigation}\par\indexspace}% + \glstreenavigationfmt{\glsnavigation}\par\indexspace}% % \end{macrocode} % Put a hypertarget at the start of each group % \begin{macrocode} @@ -20448,11 +20616,41 @@ false,nolabel,autolabel,nameref}[nolabel]{% \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax - \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par - \indexspace}} + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \indexspace}% +} % \end{macrocode} %\end{style} - +% +%\begin{style}{mcolalttreespannav} +%\changes{4.22}{2016-04-19}{new} +% Similar to the \glostyle{mcolalttreehypergroup} style but the +% navigation line is put in the optional argument of the +% \env{multicols} environment. +% \begin{macrocode} +\newglossarystyle{mcolalttreespannav}{% + \setglossarystyle{alttree}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}] + \def\@gls@prevlevel{-1}% + \mbox{}\par + }% + {\par\end{multicols}}% +% \end{macrocode} +% Put a hypertarget at the start of each group +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \indexspace} +} +% \end{macrocode} +%\end{style} +% %\iffalse % \begin{macrocode} @@ -20468,7 +20666,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}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-super}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Requires the \isty{supertabular} package: % \begin{macrocode} @@ -20769,11 +20967,12 @@ false,nolabel,autolabel,nameref}[nolabel]{% % column, description in second column, symbol in third column % and page list in last column: %\changes{3.13a}{2013-11-05}{switched to \cs{tabularnewline}} +%\changes{4.22}{2016-04-19}{fixed bug in \cs{glossentry}} % \begin{macrocode} \renewcommand{\glossentry}[2]{% \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & \glossentrydesc{##1} & - \glossentrysymbol{##1} & ##3\tabularnewline + \glossentrysymbol{##1} & ##2\tabularnewline }% % \end{macrocode} % Sub entries on a row with no name, the description in the second @@ -20978,7 +21177,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}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-superragged}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -21394,12 +21593,12 @@ false,nolabel,autolabel,nameref}[nolabel]{% % that have a tree-like structure. These are designed for % hierarchical glossaries. % \begin{macrocode} -\ProvidesPackage{glossary-tree}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossary-tree}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % %\begin{macro}{\indexspace} %\changes{4.13}{2015-02-03}{new} -% The are a few classes that don't define \cs{indexspace}, so +% There are a few classes that don't define \cs{indexspace}, so % provide a definition if it hasn't been defined. % \begin{macrocode} \providecommand{\indexspace}{% @@ -21410,13 +21609,33 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{macro}{\glstreenamefmt} %\changes{4.08}{2014-07-30}{new} % Format used to display the name in the tree styles. (This may be -% counteracted by \ics{glsnamefont}.) This command is also used to +% counteracted by \ics{glsnamefont}.) This command was previously also used to % format the group headings. % \begin{macrocode} \newcommand*{\glstreenamefmt}[1]{\textbf{#1}} % \end{macrocode} %\end{macro} % +%\begin{macro}{\glstreegroupheaderfmt} +%\changes{4.22}{2016-04-19}{new} +% Format used to display the group header in the tree styles. +% Before v4.22, \cs{glstreenamefmt} was used for the group header, +% so the default definition uses that to help maintain +% backward-compatibility, since in previous versions redefining +% \cs{glstreenamefmt} would've also affected the group headings. +% \begin{macrocode} +\newcommand*{\glstreegroupheaderfmt}[1]{\glstreenamefmt{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstreenavigationfmt} +%\changes{4.22}{2016-04-19}{new} +% Format used to display the navigation header in the tree styles. +% \begin{macrocode} +\newcommand*{\glstreenavigationfmt}[1]{\glstreenamefmt{#1}} +% \end{macrocode} +%\end{macro} +% %\begin{style}{index} % The \glostyle{index} glossary style % is similar in style to the way indices are usually typeset @@ -21506,7 +21725,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % bold followed by a vertical gap. % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% - \item\glstreenamefmt{\glsgetgrouptitle{##1}}\indexspace}% + \item\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% + \indexspace + }% } % \end{macrocode} %\end{style} @@ -21524,13 +21745,14 @@ false,nolabel,autolabel,nameref}[nolabel]{% % Put navigation links to the groups at the start of the glossary: % \begin{macrocode} \renewcommand*{\glossaryheader}{% - \item\glstreenamefmt{\glsnavigation}\indexspace}% + \item\glstreenavigationfmt{\glsnavigation}\indexspace}% % \end{macrocode} % Add a heading for each group (with a target). The group's title is % in bold followed by a vertical gap. % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% - \item\glstreenamefmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% \indexspace}% } % \end{macrocode} @@ -21608,7 +21830,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% % Each group has a heading (in bold) followed by a vertical gap): % \begin{macrocode} \renewcommand{\glsgroupheading}[1]{\par - \noindent\glstreenamefmt{\glsgetgrouptitle{##1}}\par\indexspace}% + \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}\par + \indexspace}% } % \end{macrocode} %\end{style} @@ -21628,14 +21851,15 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \env{theglossary} environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{% - \par\noindent\glstreenamefmt{\glsnavigation}\par\indexspace}% + \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace}% % \end{macrocode} % Each group has a heading (in bold with a target) followed by a % vertical gap): % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \par\noindent - \glstreenamefmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par \indexspace}% } % \end{macrocode} @@ -21719,7 +21943,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% % Give each group a heading: % \begin{macrocode} \renewcommand{\glsgroupheading}[1]{\par - \noindent\glstreenamefmt{\glsgetgrouptitle{##1}}\par\indexspace}% + \noindent\glstreegroupheaderfmt + {\glsgetgrouptitle{##1}}\par\indexspace}% } % \end{macrocode} %\end{style} @@ -21739,19 +21964,48 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \env{theglossary} environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{% - \par\noindent\glstreenamefmt{\glsnavigation}\par\indexspace}% + \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace}% % \end{macrocode} % Each group has a heading (in bold with a target) followed by a % vertical gap): % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \par\noindent - \glstreenamefmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par \indexspace}% } % \end{macrocode} %\end{style} % +%\begin{macro}{\glsfindwidesttoplevelname} +%\changes{4.22}{2016-04-19}{new} +% Find the widest name over all parentless entries in the +% given glossary or glossaries. +% \begin{macrocode} +\newrobustcmd*{\glsfindwidesttoplevelname}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \letcs{\@glswidestname}{glo@\glsdetoklabel{\@glo@label}@name}% + \fi + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glssetwidest} % \cs{glssetwidest}\oarg{level}\marg{text} sets the widest % text for the given level. It is used by the @@ -21950,7 +22204,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax - \glstreenamefmt{\glsgetgrouptitle{##1}}\par\indexspace}% + \glstreegroupheaderfmt{\glsgetgrouptitle{##1}}% + \par\indexspace}% } % \end{macrocode} %\end{style} @@ -21973,7 +22228,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax - \glstreenamefmt{\glsnavigation}\par\indexspace}% + \glstreenavigationfmt{\glsnavigation}\par\indexspace}% % \end{macrocode} % Put a hypertarget at the start of each group % \begin{macrocode} @@ -21982,7 +22237,8 @@ false,nolabel,autolabel,nameref}[nolabel]{% \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax - \glstreenamefmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par + \glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par \indexspace}} % \end{macrocode} %\end{style} @@ -22005,7 +22261,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % hyperlinks may not work properly. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-207}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossaries-compatible-207}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} %\begin{macro}{\GlsAddXdyAttribute} % Adds an attribute in old format. @@ -22366,7 +22622,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\section{glossaries-compatible-307} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-307}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossaries-compatible-307}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % % Compatibility macros for predefined glossary styles: @@ -23174,7 +23430,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} % Package version number now in line with main glossaries package number. % \begin{macrocode} -\ProvidesPackage{glossaries-accsupp}[2016/01/24 v4.21 (NLCT) +\ProvidesPackage{glossaries-accsupp}[2016/04/19 v4.22 (NLCT) Experimental glossaries accessibility] % \end{macrocode} % Pass all options to \sty{glossaries}: @@ -25605,7 +25861,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % modules. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-babel}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossaries-babel}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Load \sty{tracklang} to obtain language settings. % \begin{macrocode} @@ -25649,7 +25905,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % modules. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-polyglossia}[2016/01/24 v4.21 (NLCT)] +\ProvidesPackage{glossaries-polyglossia}[2016/04/19 v4.22 (NLCT)] % \end{macrocode} % Load \sty{tracklang} to obtain language settings. % \begin{macrocode} @@ -25772,6 +26028,9 @@ Plurals: \Glspl{sample}. First use: \Glspl{aca}. Next: \Glspl{aca}. If you want paragraph breaks in the description use \verb|\longnewglossaryentry|, as with entry \gls{par}. +Title case a particular field: +\glslink{sample}{\glsentrytitlecase{sample}{desc}}. + \printglossaries \end{document} % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index 8985ea23874..27298acf6f8 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 2016/1/24 16:29 +% glossaries.ins generated using makedtx version 1.1 2016/4/19 23:14 \input docstrip \preamble |