summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/glossaries-extra
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-12-16 22:54:42 +0000
committerKarl Berry <karl@freefriends.org>2016-12-16 22:54:42 +0000
commit8ea673e9cfeb30456e238a5f138bea79990c46dd (patch)
tree00dafaf3f57d2475e6038328d4609bcb763bc942 /Master/texmf-dist/source/latex/glossaries-extra
parent0751ef0ea3c6b74aa979ef539047923778544790 (diff)
glossaries-extra (16dec16)
git-svn-id: svn://tug.org/texlive/trunk@42725 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.dtx138
-rw-r--r--Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins2
2 files changed, 119 insertions, 21 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 1457cb7202d..9fe44497574 100644
--- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
+++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
@@ -1,14 +1,14 @@
%\iffalse
% glossaries-extra.dtx generated using makedtx version 1.1 (c) Nicola Talbot
% Command line args:
-% -section "chapter"
% -src "glossaries-extra.sty\Z=>glossaries-extra.sty"
% -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty"
-% -doc "glossaries-extra-codedoc.tex"
% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})"
% -author "Nicola Talbot"
+% -section "chapter"
+% -doc "glossaries-extra-codedoc.tex"
% glossaries-extra
-% Created on 2016/12/13 13:52
+% Created on 2016/12/16 14:42
%\fi
%\iffalse
%<*package>
@@ -118,7 +118,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{9923}
+\CheckSum{10014}
\newcommand*{\ifirstuse}{\iterm{first use}}
\newcommand*{\firstuse}{\gls{firstuse}}
@@ -154,13 +154,13 @@ styles (glossaries):>#1={\protect\ttfamily#1}|main}}
\raggedright
}
-\title{glossaries-extra.sty v1.08:
+\title{glossaries-extra.sty v1.09:
documented code}
\author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\url{http://www.dickimaw-books.com/}}
-\date{2016-12-13}
+\date{2016-12-16}
\begin{document}
\DocInput{glossaries-extra.dtx}
@@ -205,7 +205,7 @@ Dickimaw Books\\
%\section{Package Initialisation and Options}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra}[2016/12/13 v1.08 (NLCT)]
+\ProvidesPackage{glossaries-extra}[2016/12/16 v1.09 (NLCT)]
% \end{macrocode}
% Requires \sty{xkeyval} to define package options.
% \begin{macrocode}
@@ -1500,8 +1500,8 @@ Dickimaw Books\\
%\end{macro}
% Disable commands after the glossary:
% \begin{macrocode}
- \let\@glsxtr@orgprintglossary\@printglossary
\renewcommand\@printglossary[2]{%
+ \def\@glsxtr@printglossopts{##1}%
\@glsxtr@orgprintglossary{##1}{##2}%
\def\@glsxtr{\@glsxtr@disabledflycommand\glsxtr}%
\def\@glsxtrpl{\@glsxtr@disabledflycommand\glsxtrpl}%
@@ -5015,6 +5015,7 @@ Dickimaw Books\\
\string\@istfilename[1]{}}
\protected@write\@auxout{}{\string\@istfilename{\istfilename}}%
\protected@write\@auxout{}{\string\@glsorder{\glsorder}}
+ \protected@write\@auxout{}{\string\glsxtr@makeglossaries{#1}}
\write\@auxout{\string\providecommand\string\@gls@reference[3]{}}%
% \end{macrocode}
% Iterate through each supplied glossary type and activate it.
@@ -5035,7 +5036,7 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@makeglossary\relax
\let\makeglossary\relax
- \let\makeglossaries\relax
+ \renewcommand\makeglossaries[1][]{}%
% \end{macrocode}
% Disable all commands that have no effect after \cs{makeglossaries}
% \begin{macrocode}
@@ -5045,6 +5046,32 @@ Dickimaw Books\\
% \begin{macrocode}
\let\gls@checkseeallowed\relax
% \end{macrocode}
+%Adjust \cs{@do@seeglossary}
+% \begin{macrocode}
+ \let\@glsxtr@org@doseeglossary\@do@seeglossary
+ \renewcommand*{\@do@seeglossary}[2]{%
+ \edef\@gls@label{\glsdetoklabel{##1}}%
+ \edef\@gls@type{\csname glo@\@gls@label @type\endcsname}%
+ \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}%
+ {\@glsxtr@org@doseeglossary{##1}{##2}}%
+ {%
+ \protected@write\@auxout{}{%
+ \string\@gls@reference
+ {\gls@type}{\@gls@label}{\string\glsseeformat##2{}}%
+ }%
+ }%
+ }%
+% \end{macrocode}
+% Adjust \cs{@@do@@wrglossary}
+% \begin{macrocode}
+ \let\@glsxtr@@do@@wrglossary\@@do@@wrglossary
+ \def\@@do@@wrglossary{%
+ \edef\@gls@type{\csname glo@\@gls@label @type\endcsname}%
+ \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}%
+ {\@glsxtr@@do@@wrglossary}%
+ {\gls@noidxglossary}%
+ }%
+% \end{macrocode}
% Suppress warning about no \cs{makeglossaries}
% \begin{macrocode}
\let\warn@nomakeglossaries\relax
@@ -5055,6 +5082,25 @@ Dickimaw Books\\
any glossaries.)^^JThis document will not have a glossary}%
}%
% \end{macrocode}
+% Only warn for glossaries not listed.
+% \begin{macrocode}
+ \renewcommand{\@gls@noref@warn}[1]{%
+ \edef\@gls@type{##1}%
+ \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}%
+ {%
+ \GlossariesExtraWarning{Can't use
+ \string\printnoidxglossary[type={\@gls@type}]
+ when `\@gls@type' is listed in the optional argument of
+ \string\makeglossaries}%
+ }%
+ {%
+ \GlossariesWarning{Empty glossary for
+ \string\printnoidxglossary[type={##1}].
+ Rerun may be required (or you may have forgotten to use
+ commands like \string\gls)}%
+ }%
+ }%
+% \end{macrocode}
% Adjust display number list to check for type:
% \begin{macrocode}
\renewcommand*{\glsdisplaynumberlist}[1]{%
@@ -5113,17 +5159,13 @@ Dickimaw Books\\
% \verb|#1| (glossary label is stored in \cs{@glo@type} but this
% defaults to \cs{glsdefaulttype} so some expansion is required).
% \begin{macrocode}
+ \let\@glo@assign@sortkey\@glsxtr@mixed@assign@sortkey
\renewcommand*{\@printgloss@setsort}{%
- \renewcommand*{\@glo@assign@sortkey}{%
- \edef\@glo@type{\@glo@type}%
- \expandafter\DTLifinlist\expandafter{\@glo@type}{\@glsxtr@reg@glosslist}%
- {%
- \@@glo@no@assign@sortkey
- }%
- {%
- \@@glo@assign@sortkey
- }%
- }%
+% \end{macrocode}
+% Need to extract just the \gloskey[printglossary]{type} value.
+% \begin{macrocode}
+ \expandafter\@glsxtr@gettype\expandafter,\@glsxtr@printglossopts,%
+ type=\glsdefaulttype,\@end@glsxtr@gettype
\def\@glo@sorttype{\@glo@default@sorttype}%
}%
% \end{macrocode}
@@ -5141,6 +5183,62 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%The optional argument version of \cs{makeglossaries} needs an
+%adjustment to \cs{@printglossary} to allow \cs{@glo@assign@sortkey}
+%to pick up the glossary type.
+%
+%\begin{macro}{\@glsxtr@orgprintglossary}
+%Save original definition (also needed for the on-the-fly macro).
+% \begin{macrocode}
+\let\@glsxtr@orgprintglossary\@printglossary
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@printglossary}
+%Redefine.
+%\changes{1.09}{2016-12-16}{redefined to save options}
+% \begin{macrocode}
+\renewcommand{\@printglossary}[2]{%
+ \def\@glsxtr@printglossopts{#1}%
+ \@glsxtr@orgprintglossary{#1}{#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtr@makeglossaries}
+%For the benefit of \app{makeglossaries}
+%\changes{1.09}{2016-12-16}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtr@makeglossaries}[1]{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtr@gettype}
+%Get just the type.
+%\changes{1.09}{2016-12-16}{new}
+% \begin{macrocode}
+\def\@glsxtr@gettype#1,type=#2,#3\@end@glsxtr@gettype{%
+ \def\@glo@type{#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtr@mixed@assign@sortkey}
+%Assign the sort key.
+%\changes{1.09}{2016-12-16}{new}
+% \begin{macrocode}
+\newcommand\@glsxtr@mixed@assign@sortkey[1]{%
+ \edef\@glo@type{\@glo@type}%
+ \expandafter\DTLifinlist\expandafter{\@glo@type}{\@glsxtr@reg@glosslist}%
+ {%
+ \@glo@no@assign@sortkey{#1}%
+ }%
+ {%
+ \@@glo@assign@sortkey{#1}%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
% Display number list for the regular version:
%\begin{macro}{\@glsxtr@idx@displaynumberlist}
%\changes{1.0}{2016-01-24}{new}
@@ -12661,7 +12759,7 @@ Dickimaw Books\\
% First identify package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra-stylemods}[2016/12/13 v1.08 (NLCT)]
+\ProvidesPackage{glossaries-extra-stylemods}[2016/12/16 v1.09 (NLCT)]
% \end{macrocode}
% Provide package options to automatically load required predefined
% styles. The simplest method is to just test for the existence of
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 293c09c34c3..e033af42b11 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.1 2016/12/13 13:52
+% glossaries-extra.ins generated using makedtx version 1.1 2016/12/16 14:42
\input docstrip
\preamble