From 840f20ebce0d764284d183b23976a92095eb662a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 19 Jan 2017 22:07:44 +0000 Subject: glossaries (19jan17) git-svn-id: svn://tug.org/texlive/trunk@42995 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/glossaries/glossaries.dtx | 136 +++++++++++++-------- .../source/latex/glossaries/glossaries.ins | 2 +- 2 files changed, 88 insertions(+), 50 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx index 92ffabe225c..9a965aa9d6d 100644 --- a/Master/texmf-dist/source/latex/glossaries/glossaries.dtx +++ b/Master/texmf-dist/source/latex/glossaries/glossaries.dtx @@ -1,8 +1,14 @@ %\iffalse % glossaries.dtx generated using makedtx version 1.1 (c) Nicola Talbot % Command line args: +% -doc "glossaries-manual.tex" +% -setambles ".*\.perl=>\nopreamble\nopostamble" +% -setambles ".*\.tex=>\nopreamble\nopostamble" +% -setambles ".*\.xdy=>\nopreamble\nopostamble" % -codetitle "Main Package Code" -% -section "chapter" +% -macrocode ".*\.perl" +% -macrocode ".*\.tex" +% -macrocode ".*\.xdy" % -src "glossaries\.sty\Z=>glossaries.sty" % -src "glossaries-prefix.sty\Z=>glossaries-prefix.sty" % -src "(glossary-.+)\.(sty)\Z=>\1.\2" @@ -19,19 +25,13 @@ % -src "(samplexdy-mc.*\.xdy)\Z=>\1" % -src "(database.*\.tex)\Z=>\1" % -src "(.*\.perl)\Z=>\1" +% -author "Nicola Talbot" +% -section "chapter" % -comment ".*\.perl" % -comment ".*\.tex" % -comment ".*\.xdy" -% -author "Nicola Talbot" -% -doc "glossaries-manual.tex" -% -macrocode ".*\.perl" -% -macrocode ".*\.tex" -% -macrocode ".*\.xdy" -% -setambles ".*\.perl=>\nopreamble\nopostamble" -% -setambles ".*\.tex=>\nopreamble\nopostamble" -% -setambles ".*\.xdy=>\nopreamble\nopostamble" % glossaries -% Created on 2017/1/7 15:23 +% Created on 2017/1/19 12:05 %\fi %\iffalse %<*package> @@ -145,7 +145,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{19235} +\CheckSum{19231} \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.28} +% \title{Documented Code For glossaries v4.29} % \author{Nicola L.C. Talbot\\[10pt] %Dickimaw Books\\ %\url{http://www.dickimaw-books.com/}} % -% \date{2017-01-07} +% \date{2017-01-19} % \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.28: +%For the main user guide, read \qt{glossaries.sty v4.29: %\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/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossaries}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} %\changes{4.18}{2015-09-09}{split mfirstuc into separate bundle} % Required packages: @@ -7658,9 +7658,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % %\begin{macro}{\glspostlinkhook} %\changes{4.16}{2015-07-08}{new} -% \begin{macrocode} +% \begin{macrocode} \newcommand*{\glspostlinkhook}{} -% \end{macrocode} +% \end{macrocode} %\end{macro} % % @@ -8374,7 +8374,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\begin{macro}{\glsdohyperlink} %\changes{4.08}{2014-07-30}{new} % \begin{macrocode} -\newcommand*{\glsdohyperlink}[2]{\hyperlink{#1}{#2}} +\newcommand*{\glsdohyperlink}[2]{% + \hyperlink{#1}{#2}% +} % \end{macrocode} %\end{macro} % @@ -12328,11 +12330,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% % %\begin{macro}{\@closegls} %\changes{4.08}{2014-07-30}{new} -% \begin{macrocode} +% \begin{macrocode} \newcommand*{\@closegls}[1]{% \closeout\csname glo@#1@file\endcsname } -% \end{macrocode} +% \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@automake} @@ -14156,10 +14158,20 @@ you % \begin{macrocode} \glossarysection[\glossarytoctitle]{\glossarytitle}% \glossarypreamble +% \end{macrocode} +% \changes{4.29}{2017-01-19}{moved definition of +% \cs{@gls@currentlettergroup} outside of \envfmt{theglossary} environment} +%The glossary style might use a tabular-like environment, which may +%cause scoping problems when setting the current letter group. +%The predefined tabular-like styles don't support letter group +%headings, but there's nothing to stop the user from defining their +%own custom style that might, so any redefinition of this command +%within \env{theglossary} will have to be done globally. +% \begin{macrocode} + \def\@gls@currentlettergroup{}% \begin{theglossary}% \glossaryheader \glsresetentrylist - \def\@gls@currentlettergroup{}% % \end{macrocode} % Iterate through the entries. % \begin{macrocode} @@ -14277,7 +14289,11 @@ you \ifdefempty{\@gls@currentlettergroup}{}{\glsgroupskip}% \glsgroupheading{\@glo@thislettergrp}% }% - \let\@gls@currentlettergroup\@glo@thislettergrp +% \end{macrocode} +%\changes{4.29}{2017-01-19}{current letter group assignment made +%global} +% \begin{macrocode} + \global\let\@gls@currentlettergroup\@glo@thislettergrp % \end{macrocode} % Do this entry: % \begin{macrocode} @@ -18375,7 +18391,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \cs{gls}\marg{label}} on subsequent use. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-prefix}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossaries-prefix}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Pass all options to \sty{glossaries}: % \begin{macrocode} @@ -18790,7 +18806,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\label{sec:code:hypernav} % Package Definition: % \begin{macrocode} -\ProvidesPackage{glossary-hypernav}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-hypernav}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % % The commands defined in this package are provided to @@ -18812,7 +18828,15 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \begin{macrocode} \newcommand*{\glsnavhyperlink}[3][\@glo@type]{% \edef\gls@grplabel{#2}\protected@edef\@gls@grptitle{#3}% - \@glslink{glsn:#1@#2}{#3}} + \@glslink{\glsnavhyperlinkname{#1}{#2}}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsnavhyperlinkname} +%\changes{4.29}{2017-01-19}{new} +%Expands to the hypertarget name. The first argument is the glossary +%type. The second argument is the group label. +% \begin{macrocode} +\newcommand*{\glsnavhyperlinkname}[2]{glsn:#1@#2} % \end{macrocode} %\end{macro} %\vskip5pt @@ -18836,9 +18860,9 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \end{macrocode} % Add the target. % \begin{macrocode} - \@glstarget{glsn:#1@#2}{#3}% + \@glstarget{\glsnavhyperlinkname{#1}{#2}}{#3}% % \end{macrocode} -% Check list of know groups to determine if a re-run is required. +% Check list of known groups to determine if a re-run is required. % \begin{macrocode} \expandafter\let \expandafter\@gls@list\csname @gls@hypergrouplist@#1\endcsname @@ -18962,7 +18986,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/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-inline}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % %\begin{style}{inline} @@ -19153,7 +19177,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \ics{item} command, it will appear in a bold font by % default. % \begin{macrocode} -\ProvidesPackage{glossary-list}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-list}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} %\begin{macro}{\indexspace} %\changes{4.13}{2015-02-03}{new} @@ -19229,10 +19253,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% \glssubentryitem{##2}% \glstarget{##2}{\strut}\space \glossentrydesc{##2}\glspostdescription\space ##3.}% -% \end{macrocode} +% \end{macrocode} % Add vertical space between groups: %\changes{3.03}{2012/09/21}{added check for glsnogroupskip} -% \begin{macrocode} +% \begin{macrocode} \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}% } % \end{macrocode} @@ -19435,7 +19459,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/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-long}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Requires the \isty{longtable} package: % \begin{macrocode} @@ -19932,7 +19956,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \url{http://tex.stackexchange.com/a/56890} % % \begin{macrocode} -\ProvidesPackage{glossary-longbooktabs}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-longbooktabs}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Requires \sty{booktabs} package: % \begin{macrocode} @@ -20273,7 +20297,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/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-longragged}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -20706,7 +20730,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/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-mcols}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -21142,7 +21166,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/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-super}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Requires the \isty{supertabular} package: % \begin{macrocode} @@ -21674,7 +21698,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/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-superragged}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} @@ -22114,7 +22138,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % that have a tree-like structure. These are designed for % hierarchical glossaries. % \begin{macrocode} -\ProvidesPackage{glossary-tree}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossary-tree}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % %\begin{macro}{\indexspace} @@ -22835,7 +22859,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % hyperlinks may not work properly. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-207}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossaries-compatible-207}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} %\begin{macro}{\GlsAddXdyAttribute} % Adds an attribute in old format. @@ -23196,7 +23220,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% %\section{glossaries-compatible-307} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-307}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossaries-compatible-307}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % % Compatibility macros for predefined glossary styles: @@ -24004,7 +24028,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/01/07 v4.28 (NLCT) +\ProvidesPackage{glossaries-accsupp}[2017/01/19 v4.29 (NLCT) Experimental glossaries accessibility] % \end{macrocode} % Pass all options to \sty{glossaries}: @@ -24020,12 +24044,20 @@ false,nolabel,autolabel,nameref}[nolabel]{% % \begin{macrocode} \@ifpackageloaded{glossaries-extra} {% - \PackageWarning{glossaries-accsupp}{The `glossaries-accsupp' - package has been loaded after the `glossaries-extra' - package. This can cause a failure to integrate both - packages. Either use the `accsupp' option when you - load `glossaries-extra' or load `glossaries-accsupp' - before loading `glossaries-extra'}% +% \end{macrocode} +%If the \pkgoptfmt{accsupp} option was used, \cs{@glsxtr@doaccsupp} +%will have been set, otherwise it will be empty. +%\changes{4.29}{2017-01-19}{added check for \cs{@glsxtr@doaccsupp}} +% \begin{macrocode} + \ifx\@glsxtr@doaccsupp\empty + \GlossariesWarning{The `glossaries-accsupp' + package has been loaded\MessageBreak + after the `glossaries-extra' package. This\MessageBreak + can cause a failure to integrate both packages. \MessageBreak + Either use the `accsupp' option when you load\MessageBreak + `glossaries-extra' or load `glossaries-accsupp'\MessageBreak + before loading `glossaries-extra'}% + \fi } {} % \end{macrocode} @@ -26435,7 +26467,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % modules. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-babel}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossaries-babel}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Load \sty{tracklang} to obtain language settings. % \begin{macrocode} @@ -26479,7 +26511,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% % modules. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-polyglossia}[2017/01/07 v4.28 (NLCT)] +\ProvidesPackage{glossaries-polyglossia}[2017/01/19 v4.29 (NLCT)] % \end{macrocode} % Load \sty{tracklang} to obtain language settings. % \begin{macrocode} @@ -28423,6 +28455,9 @@ Linking with insert: \acrfullpl{html}['s], \Acrfullpl{html}['s], \newacronym{laser}{laser}{light amplification by stimulated emission of radiation} + % See the sample-initialisms.tex example file provided with + % glossaries-extra.sty for a better way of doing this. + \makeatletter \renewcommand{\glspostlinkhook}{% \ifglsfieldeq{\glslabel}{abbrtype}{initials}% @@ -28440,6 +28475,9 @@ full stops (periods) and abbreviations that are words (i.e.\ acronyms). The examples switch to a typewriter font to make it easier to see the inter-word and inter-sentence spaces. +The extension package glossaries-extra.sty provides a better way of +doing this. + First use: \gls{laser} \gls{eg} \gls{ie} \gls{bsc} \gls{ba} \gls{agm} end of sentence. diff --git a/Master/texmf-dist/source/latex/glossaries/glossaries.ins b/Master/texmf-dist/source/latex/glossaries/glossaries.ins index 422d00d1d61..8aa8e2d3eaf 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 2017/1/7 15:23 +% glossaries.ins generated using makedtx version 1.1 2017/1/19 12:05 \input docstrip \preamble -- cgit v1.2.3