summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/glossaries-extra
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-09 23:44:57 +0000
committerKarl Berry <karl@freefriends.org>2017-11-09 23:44:57 +0000
commitb4ddb0e04d17bd28752d66b3fc94b5613d10335e (patch)
tree75ecde30e419937b22f59ae81593c376feced620 /Master/texmf-dist/source/latex/glossaries-extra
parentd58e09051eed105b7c4b93a513e0fd02ae2dfd4b (diff)
glossaries-extra (9nov17)
git-svn-id: svn://tug.org/texlive/trunk@45733 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/glossaries-extra')
-rw-r--r--Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx265
-rw-r--r--Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins2
2 files changed, 245 insertions, 22 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
index f43abcd99c1..24521881771 100644
--- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
+++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
@@ -1,22 +1,22 @@
%\iffalse
% glossaries-extra.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -author "Nicola Talbot"
+% -doc "glossaries-extra-codedoc.tex"
+% -macrocode ".*\.tex"
+% -macrocode ".*\.bib"
% -src "glossaries-extra.sty\Z=>glossaries-extra.sty"
% -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty"
% -src "glossary-bookindex.sty\Z=>glossary-bookindex.sty"
% -src "(example-glossaries-.+\.tex)\Z=>\1"
% -src "(example-glossaries-.+\.bib)\Z=>\1"
+% -setambles ".*\.bib=>\nopreamble\nopostamble"
% -section "chapter"
-% -macrocode ".*\.tex"
-% -macrocode ".*\.bib"
+% -author "Nicola Talbot"
+% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})"
% -comment ".*\.tex"
% -comment ".*\.bib"
-% -doc "glossaries-extra-codedoc.tex"
-% -setambles ".*\.bib=>\nopreamble\nopostamble"
-% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})"
% glossaries-extra
-% Created on 2017/11/3 16:35
+% Created on 2017/11/8 17:23
%\fi
%\iffalse
%<*package>
@@ -126,7 +126,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{19892}
+\CheckSum{20050}
\newcommand*{\ifirstuse}{\iterm{first use}}
\newcommand*{\firstuse}{\gls{firstuse}}
@@ -166,13 +166,13 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\raggedright
}
-\title{glossaries-extra.sty v1.21:
+\title{glossaries-extra.sty v1.22:
documented code}
\author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\url{http://www.dickimaw-books.com/}}
-\date{2017-11-03}
+\date{2017-11-08}
\begin{document}
\DocInput{glossaries-extra.dtx}
@@ -217,7 +217,7 @@ Dickimaw Books\\
%\section{Package Initialisation and Options}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra}[2017/11/03 v1.21 (NLCT)]
+\ProvidesPackage{glossaries-extra}[2017/11/08 v1.22 (NLCT)]
% \end{macrocode}
% Requires \sty{xkeyval} to define package options.
% \begin{macrocode}
@@ -1006,9 +1006,8 @@ Dickimaw Books\\
%
%\begin{option}{postpunc}
%Set the post-description punctuation. This also sets
-%the \cs{ifglsnopostdot} conditional for easier integration
-%with \cs{glsxtrbookindexprelocation} provided by
-%\sty{glossary-bookindex}.
+%the \cs{ifglsnopostdot} conditional, which now indicates if
+%the post-description punctuation has been suppressed.
%\changes{1.21}{2017-11-03}{new}
% \begin{macrocode}
\define@key{glossaries-extra.sty}{postpunc}{%
@@ -2615,16 +2614,18 @@ Dickimaw Books\\
%
%\begin{macro}{\glsseeitemformat}
%\changes{1.21}{2017-11-03}{new}
+%\changes{1.22}{2017-11-08}{switched check from regular to short}
%\styfmt{glossaries} originally defined \cs{glsseeitemformat}
%to use \cs{glsentryname} but in v3.0 this was switched to
%use \cs{glsentrytext} due to problems occurring with the
%\gloskey{name} field being sanitized. Since this is no longer a
%problem, \styfmt{glossaries-extra} restores the original
%definition as it makes more sense to use the \gloskey{name}
-%in the cross-reference list.
+%in the cross-reference list. This still uses \cs{glsaccesstext}
+%for abbreviations.
% \begin{macrocode}
\renewcommand*{\glsseeitemformat}[1]{%
- \glsifregular{#1}{\glsaccessname{#1}}{\glsaccesstext{#1}}%
+ \ifglshasshort{\glslabel}{\glsaccesstext{#1}}{\glsaccessname{#1}}%
}
% \end{macrocode}
%\end{macro}
@@ -7402,7 +7403,8 @@ Dickimaw Books\\
%to pick up the glossary type.
%
%\begin{macro}{\@glsxtr@orgprintglossary}
-%This no longer simply saves \cs{@printglossary} with \cs{let} is actually defined
+%This no longer simply saves \cs{@printglossary} with \cs{let}
+%but is actually defined
%to check for the existence of the title, since ignored
%glossaries don't have a title assigned. (bib2gls writes
%\cs{provideignoredglossary} to the glstex file for some settings,
@@ -7443,7 +7445,11 @@ Dickimaw Books\\
\let\org@glossaryentrynumbers\glossaryentrynumbers
\let\glsnonextpages\@glsnonextpages
\let\glsnextpages\@glsnextpages
- \let\nopostdesc\@nopostdesc
+% \end{macrocode}
+%\changes{1.22}{2017-11-08}{changed explicit \cs{let} for \cs{nopostdesc}
+%to \cs{glsxtractivatenopost}}
+% \begin{macrocode}
+ \glsxtractivatenopost
\gls@dotoctitle
\@glossarystyle
\let\gls@org@glossaryentryfield\glossentry
@@ -7465,6 +7471,48 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtractivatenopost}
+%\changes{1.22}{2017-11-08}{new}
+%Change \cs{nopostdesc} and \cs{glsxtrnopostpunc} to behave as they
+%do in the glossary.
+% \begin{macrocode}
+\newcommand*{\glsxtractivatenopost}{%
+ \let\nopostdesc\@nopostdesc
+ \let\glsxtrnopostpunc\@glsxtr@nopostpunc
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrnopostpunc}
+%\changes{1.22}{2017-11-08}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsxtrnopostpunc}{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtr@nopostpunc}
+%Provide a command that works like \cs{nopostdesc} but only
+%switches of the punctuation without suppressing the post-description
+%hook.
+%\changes{1.22}{2017-11-08}{new}
+% \begin{macrocode}
+\newcommand{\@glsxtr@nopostpunc}{%
+ \let\@@glsxtr@org@postdescription\glspostdescription
+ \ifglsnopostdot
+ \renewcommand{\glspostdescription}{%
+ \glsnopostdottrue
+ \let\glspostdescription\@@glsxtr@org@postdescription
+ \glsxtrpostdescription}%
+ \else
+ \renewcommand{\glspostdescription}{%
+ \let\glspostdescription\@@glsxtr@org@postdescription
+ \glsxtrpostdescription}%
+ \fi
+ \glsnopostdotfalse
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@printglossary}
%Redefine.
%\changes{1.09}{2016-12-16}{redefined to save options}
@@ -8347,6 +8395,11 @@ Dickimaw Books\\
{\string\providecommand*{\string\glsxtr@linkprefix}[1]{}}%
\protected@write\@auxout{}{\string\glsxtr@fields{\@gls@keymap}}%
% \end{macrocode}
+%\changes{1.22}{2017-11-08}{provide \cs{glsxtr@record} in aux file}
+% \begin{macrocode}
+ \protected@write\@auxout{}%
+ {\string\providecommand*{\string\glsxtr@record}[5]{}}%
+% \end{macrocode}
%If any languages have been loaded, the language tag will be
%available in \cs{CurrentTrackedLanguageTag} (provided by
%\sty{tracklang}). For multilingual
@@ -8518,6 +8571,65 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrglossentryother}
+%\changes{1.22}{2017-11-08}{new}
+%As \cs{glsxtrglossentry} but uses a different field.
+%First argument is command to use in the header. The second argument
+%is the entry's label. The third argument is the internal field
+%label. This needs to be expandable in case it occurs in a
+%sectioning command so it can't have an optional argument.
+% \begin{macrocode}
+\newcommand*{\glsxtrglossentryother}[3]{%
+ \ifstrempty{#1}%
+ {%
+ \ifcsdef{glsxtrhead#3}%
+ {%
+ \glsxtrtitleorpdforheading
+ {\@glsxtrglossentryother{#2}{#3}{#1}}%
+ {\@gls@entry@field{#2}{#3}}%
+ {\csuse{glsxtrhead#3}{#2}}%
+ }%
+ {%
+ \glsxtrtitleorpdforheading
+ {\@glsxtrglossentryother{#2}{#3}{#1}}%
+ {\@gls@entry@field{#2}{#3}}%
+ {\@gls@entry@field{\NoCaseChange{#2}}{#3}}%
+ }%
+ }%
+ {%
+ \glsxtrtitleorpdforheading
+ {\@glsxtrglossentryother{#2}{#3}{#1}}%
+ {\@gls@entry@field{#2}{#3}}%
+ {#1}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@glsxtrglossentryother}
+%\changes{1.22}{2017-11-08}{new}
+%As \cs{@glsxtrglossentry} but uses a different field.
+% \begin{macrocode}
+\newrobustcmd*{\@glsxtrglossentryother}[3]{%
+ \glsxtrtitleorpdforheading
+ {%
+ \glsdoifexists{#1}%
+ {%
+ \begingroup
+ \edef\glscurrententrylabel{\glsdetoklabel{#1}}%
+ \edef\currentglossary{\glsentrytype{\glscurrententrylabel}}%
+ \ifglshasparent{#1}%
+ {\glssubentryitem{#1}}%
+ {\glsentryitem{#1}}%
+ \glstarget{#1}{\glossentrynameother{#1}{#2}}%
+ \endgroup
+ }%
+ }%
+ {\@gls@entry@field{#1}{#2}}%
+ {#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\printunsrtglossary}
%\changes{1.08}{2016-12-13}{new}
%\changes{1.12}{2017-02-03}{added starred form}
@@ -11071,6 +11183,114 @@ defined}{}%
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtr@setaccessdisplay}
+%\changes{1.22}{2017-11-08}{new}
+% \begin{macrocode}
+\@ifpackageloaded{glossaries-accsupp}
+{
+ \newcommand*{\glsxtr@setaccessdisplay}[1]{%
+ \ifcsdef{gls#1accessdisplay}%
+ {\letcs\@glsxtr@accessdisplay{gls#1accessdisplay}}%
+ {%
+% \end{macrocode}
+%This is essentially the reverse of \cs{@gls@fetchfield}, since the
+%field supplied to \cs{glossentryname} has to be the internal label,
+%but the \cs{gls\meta{field}accessdisplay} commands use the key name.
+% \begin{macrocode}
+ \edef\@gls@thisval{#1}%
+ \@for\@gls@map:=\@gls@keymap\do{%
+ \edef\@this@key{\expandafter\@secondoftwo\@gls@map}%
+ \ifdefequal{\@this@key}{\@gls@thisval}%
+ {%
+ \edef\@gls@thisval{\expandafter\@firstoftwo\@gls@map}%
+ \@endfortrue
+ }%
+ {}%
+ }%
+ \ifcsdef{gls\@gls@thisval accessdisplay}%
+ {\letcs\@glsxtr@accessdisplay{gls\@gls@thisval accessdisplay}}%
+ {\let\@glsxtr@accessdisplay\@firstoftwo}%
+ }%
+ }
+}
+{%
+ \newcommand*{\glsxtr@setaccessdisplay}[1]{%
+ \let\@glsxtr@accessdisplay\@firstoftwo}
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glossentrynameother}
+% Provide a command that works like \cs{glossentryname}
+% but accesses a different field (which must be supplied using its
+% internal field label).
+%\changes{1.22}{2017-11-08}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glossentrynameother}[2]{%
+ \@glsdoifexistsorwarn{#1}%
+ {%
+% \end{macrocode}
+%Accessibility support:
+% \begin{macrocode}
+ \glsxtr@setaccessdisplay{#2}%
+% \end{macrocode}
+%Set the abbreviation format:
+% \begin{macrocode}
+ \glssetabbrvfmt{\glscategory{#1}}%
+ \glshasattribute{#1}{glossnamefont}%
+ {%
+ \edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}%
+ \ifcsdef{\@glsxtr@attrval}%
+ {%
+ \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}%
+ }%
+ {%
+ \GlossariesExtraWarning{Unknown control sequence name
+ `\@glsxtr@attrval' supplied in glossnamefont attribute
+ for entry `#1'. Reverting to default \string\glsnamefont}%
+ \let\@glsxtr@glossnamefont\glsnamefont
+ }%
+ }%
+ {\let\@glsxtr@glossnamefont\glsnamefont}%
+ \glsifattribute{#1}{glossname}{firstuc}%
+ {%
+ \@glsxtr@accessdisplay
+ {\@glsxtr@glossnamefont{\@Gls@entry@field{#1}{#2}}}%
+ {#1}%
+ }%
+ {%
+ \glsifattribute{#1}{glossname}{title}%
+ {%
+ \@glsxtr@do@titlecaps@warn
+ \@glsxtr@accessdisplay
+ {\@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{#2}}}%
+ {#1}%
+ }%
+ {%
+ \glsifattribute{#1}{glossname}{uc}%
+ {%
+ \letcs{\glo@name}{glo@\glsdetoklabel{#1}@#2}%
+ \@glsxtr@accessdisplay
+ {\@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}}%
+ {#1}%
+ }%
+ {%
+ \letcs{\glo@name}{glo@\glsdetoklabel{#1}@#2}%
+ \@glsxtr@accessdisplay
+ {\expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}}%
+ {#1}%
+ }%
+ }%
+ }%
+% \end{macrocode}
+% Do post-name hook.
+% \begin{macrocode}
+ \glsxtrpostnamehook{#1}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\if@glsxtr@format@override}
%\changes{0.5.3}{2015-12-09}{new}
% Determines if the \gloskey[glslink]{format} key should override
@@ -20446,7 +20666,7 @@ defined}{}%
% First identify package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra-stylemods}[2017/11/03 v1.21 (NLCT)]
+\ProvidesPackage{glossaries-extra-stylemods}[2017/11/08 v1.22 (NLCT)]
% \end{macrocode}
% Provide package options to automatically load required predefined
% styles. The simplest method is to just test for the existence of
@@ -22431,7 +22651,7 @@ defined}{}%
%\section{Package Initialisation and Options}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossary-bookindex}[2017/11/03 v1.21 (NLCT)]
+\ProvidesPackage{glossary-bookindex}[2017/11/08 v1.22 (NLCT)]
% \end{macrocode}
%Load required packages.
% \begin{macrocode}
@@ -22472,10 +22692,13 @@ defined}{}%
%\begin{macro}{\glsxtrbookindexprelocation}
%\changes{1.21}{2017-11-03}{new}
%Separator used before location list for top-level entries.
+%Version 1.22 has removed the \cs{ifglsnopostdot} check
+%since this style doesn't display the description.
+%\changes{1.22}{2017-11-08}{removed check for no post dot}
% \begin{macrocode}
\newcommand*{\glsxtrbookindexprelocation}[1]{%
\glsxtrifhasfield{location}{#1}%
- {\ifglsnopostdot,\fi\glsxtrprelocation}%
+ {,\glsxtrprelocation}%
{\glsxtrprelocation}%
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins
index 66479154057..e9c331cc9a1 100644
--- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins
+++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins
@@ -1,4 +1,4 @@
-% glossaries-extra.ins generated using makedtx version 1.2 2017/11/3 16:35
+% glossaries-extra.ins generated using makedtx version 1.2 2017/11/8 17:23
\input docstrip
\preamble