summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/glossaries-extra
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-18 21:31:32 +0000
committerKarl Berry <karl@freefriends.org>2017-04-18 21:31:32 +0000
commit8e743c86b6872f30b7a35c72aa944455157d4b3f (patch)
tree1d712f3824ef514604b4f626c4a5f53f290b7aa3 /Master/texmf-dist/source/latex/glossaries-extra
parent684bd5dd12c9a1f9dfdb2093e5250b7e5d8967c2 (diff)
glossaries-extra (18apr17)
git-svn-id: svn://tug.org/texlive/trunk@43913 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.dtx458
-rw-r--r--Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins4
2 files changed, 421 insertions, 41 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 13ee7144aca..2bf1059077f 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:
-% -src "glossaries-extra.sty\Z=>glossaries-extra.sty"
-% -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty"
% -author "Nicola Talbot"
% -section "chapter"
% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})"
+% -src "glossaries-extra.sty\Z=>glossaries-extra.sty"
+% -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty"
% -doc "glossaries-extra-codedoc.tex"
% glossaries-extra
-% Created on 2017/2/7 9:40
+% Created on 2017/4/18 11:44
%\fi
%\iffalse
%<*package>
@@ -118,7 +118,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{11419}
+\CheckSum{11746}
\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.13:
+\title{glossaries-extra.sty v1.14:
documented code}
\author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\url{http://www.dickimaw-books.com/}}
-\date{2017-02-07}
+\date{2017-04-18}
\begin{document}
\DocInput{glossaries-extra.dtx}
@@ -205,7 +205,7 @@ Dickimaw Books\\
%\section{Package Initialisation and Options}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra}[2017/02/07 v1.13 (NLCT)]
+\ProvidesPackage{glossaries-extra}[2017/04/18 v1.14 (NLCT)]
% \end{macrocode}
% Requires \sty{xkeyval} to define package options.
% \begin{macrocode}
@@ -362,16 +362,23 @@ Dickimaw Books\\
}
% \end{macrocode}
%
-%In the event that someone wants to develop a post-processor
-%that needs to know what entries have been used in the document,
-%v1.08 introduces the \pkgopt{record} option, which will write
+%To assist bib2gls, v1.08 introduces the \pkgopt{record} option, which will write
%information to the aux file whenever an entry needs to be indexed.
%
%\begin{macro}{\@glsxtr@record}
%\changes{1.08}{2016-12-13}{new}
+%\changes{1.14}{2017-04-18}{added third arg}
+%Does nothing by default.
+% \begin{macrocode}
+\newcommand*{\@glsxtr@record}[3]{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtr@recordsee}
+%\changes{1.14}{2017-04-18}{new}
%Does nothing by default.
% \begin{macrocode}
-\newcommand*{\@glsxtr@record}[2]{}
+\newcommand*{\glsxtr@recordsee}[2]{}
% \end{macrocode}
%\end{macro}
%
@@ -380,11 +387,14 @@ Dickimaw Books\\
%This is the actual code that does the recording
%The first argument is the option list (as passed in the first optional
%argument to commands like \cs{gls}). This allows the \gloskey[glslink]{noindex}
-%setting to be picked up.
+%setting to be picked up. The third argument is the key family
+%(\texttt{glslink} in most cases, \texttt{glossadd} for \cs{glsadd}).
% \begin{macrocode}
-\newcommand*{\@@glsxtr@record}[2]{%
+\newcommand*{\@@glsxtr@record}[3]{%
\begingroup
\def\@glsnumberformat{glsnumberformat}%
+ \def\@glsxtr@thevalue{}%
+ \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
\ifcsdef{glo@#2@counter}%
{%
\edef\@gls@counter{\csname glo@#2@counter\endcsname}%
@@ -396,7 +406,7 @@ Dickimaw Books\\
% \begin{macrocode}
\def\@gls@counter{page}%
}%
- \setkeys{glslink}{#1}%
+ \setkeys{#3}{#1}%
\ifKV@glslink@noindex
\else
\glswriteentry{#2}%
@@ -404,7 +414,14 @@ Dickimaw Books\\
% \end{macrocode}
%Save the entry counter.
% \begin{macrocode}
- \glsxtr@saveentrycounter
+ \ifdefempty{\@glsxtr@thevalue}%
+ {%
+ \glsxtr@saveentrycounter
+ }%
+ {%
+ \let\theglsentrycounter\@glsxtr@thevalue
+ \def\theHglsentrycounter{\@glsxtr@theHvalue}%
+ }%
% \end{macrocode}
%Temporarily redefine \cs{@@do@@wrglossary} so we can use
%\cs{glsxtr@@do@wrglossary}.
@@ -458,6 +475,18 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@glsxtr@recordsee}
+%\changes{1.14}{2017-04-18}{new}
+%Deal with \cs{glssee} in record mode.
+% \begin{macrocode}
+\newcommand*{\@glsxtr@recordsee}[2]{%
+ \def\@gls@xref{#2}%
+ \@onelevel@sanitize\@gls@xref
+ \protected@write\@auxout{}{\string\glsxtr@recordsee{#1}{\@gls@xref}}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\printunsrtglossaryunit}
%\changes{1.12}{2017-02-03}{new}
% \begin{macrocode}
@@ -551,7 +580,9 @@ Dickimaw Books\\
%Don't record.
% \begin{macrocode}
\def\glsxtr@setup@record{%
- \renewcommand*{\@glsxtr@record}[2]{}%
+ \let\@glo@autosee\@glsxtr@org@gloautosee
+ \renewcommand*{\@do@seeglossary}{\@glsxtr@org@doseeglossary}%
+ \renewcommand*{\@glsxtr@record}[3]{}%
\let\@@do@wrglossary\glsxtr@@do@wrglossary
\let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
\let\glsxtrundefaction\@glsxtr@err@undefaction
@@ -565,6 +596,8 @@ Dickimaw Books\\
%Only record (don't index).
% \begin{macrocode}
\def\glsxtr@setup@record{%
+ \ifdef\@glo@autosee{\let\@glo@autosee\relax}{}%
+ \let\@do@seeglossary\@glsxtr@recordsee
\let\@glsxtr@record\@@glsxtr@record
\let\@@do@wrglossary\@gobble
\let\@gls@saveentrycounter\relax
@@ -585,6 +618,8 @@ Dickimaw Books\\
%Record and index.
% \begin{macrocode}
\def\glsxtr@setup@record{%
+ \let\@glo@autosee\@glsxtr@org@gloautosee
+ \renewcommand*{\@do@seeglossary}{\@glsxtr@org@doseeglossary}%
\let\@glsxtr@record\@@glsxtr@record
\let\@@do@wrglossary\glsxtr@@do@wrglossary
\let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
@@ -1030,6 +1065,25 @@ Dickimaw Books\\
\@glsxtr@doaccsupp
% \end{macrocode}
%
+%\begin{macro}{\@glsxtr@org@doseeglossary}
+%Save original definition of \cs{@do@seeglossary}
+% \begin{macrocode}
+\let\@glsxtr@org@doseeglossary\@do@seeglossary
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtr@org@gloautosee}
+%\changes{1.14}{2017-04-18}{new}
+%Save and restore original definition of \cs{@glo@autosee}.
+%(That command may not be defined as it was only introduced
+%to \sty{glossaries} v4.30, in which case the synonym
+%won't be defined either.)
+% \begin{macrocode}
+\let\@glsxtr@org@gloautosee\@glo@autosee
+% \end{macrocode}
+%\end{macro}
+%
+%
% Define abbreviations glossaries if required.
% \begin{macrocode}
\@glsxtr@abbreviationsdef
@@ -2712,7 +2766,7 @@ Dickimaw Books\\
%exists.
%\changes{1.08}{2016-12-13}{added \cs{@glsxtr@record}}
% \begin{macrocode}
- \@glsxtr@record{#2}{#3}%
+ \@glsxtr@record{#2}{#3}{glslink}%
\glsdoifexists{#3}%
{%
% \end{macrocode}
@@ -2742,7 +2796,7 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@glsxtr@org@gls@\@gls@
\def\@gls@#1#2{%
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glslink}%
\@glsxtr@org@gls@{#1}{#2}%
}%
% \end{macrocode}
@@ -2754,7 +2808,7 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@glsxtr@org@glspl@\@glspl@
\def\@glspl@#1#2{%
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glslink}%
\@glsxtr@org@glspl@{#1}{#2}%
}%
% \end{macrocode}
@@ -2766,7 +2820,7 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@glsxtr@org@Gls@\@Gls@
\def\@Gls@#1#2{%
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glslink}%
\@glsxtr@org@Gls@{#1}{#2}%
}%
% \end{macrocode}
@@ -2778,7 +2832,7 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@glsxtr@org@Glspl@\@Glspl@
\def\@Glspl@#1#2{%
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glslink}%
\@glsxtr@org@Glspl@{#1}{#2}%
}%
% \end{macrocode}
@@ -2790,7 +2844,7 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@glsxtr@org@GLS@\@GLS@
\def\@GLS@#1#2{%
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glslink}%
\@glsxtr@org@GLS@{#1}{#2}%
}%
% \end{macrocode}
@@ -2803,7 +2857,7 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@glsxtr@org@GLSpl@\@GLSpl@
\def\@GLSpl@#1#2{%
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glslink}%
\@glsxtr@org@GLSpl@{#1}{#2}%
}%
% \end{macrocode}
@@ -2817,7 +2871,7 @@ Dickimaw Books\\
%argument.
% \begin{macrocode}
\renewcommand*{\@glsdisp}[3][]{%
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glslink}%
\glsdoifexists{#2}{%
\let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper
\let\glsifplural\@secondoftwo
@@ -2842,7 +2896,7 @@ Dickimaw Books\\
%Redefine to include \cs{@glsxtr@record}
% \begin{macrocode}
\renewcommand*{\@gls@@link}[3][]{%
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glslink}%
\glsdoifexistsordo{#2}%
{%
\let\do@gls@link@checkfirsthyper\relax
@@ -2856,19 +2910,138 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrinitwrgloss}
+%\changes{1.14}{2017-04-18}{new}
+%Set the default if the \gloskey[glslink]{wrgloss} is omitted.
+% \begin{macrocode}
+\newcommand*{\glsxtrinitwrgloss}{%
+ \glsifattribute{\glslabel}{wrgloss}{after}%
+ {%
+ \glsxtrinitwrglossbeforefalse
+ }%
+ {%
+ \glsxtrinitwrglossbeforetrue
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ifglsxtrwrglossbefore}
+%\changes{1.14}{2017-04-18}{new}
+%Conditional to determine if the indexing should be done before the
+%link text.
+% \begin{macrocode}
+\newif\ifglsxtrinitwrglossbefore
+\glsxtrinitwrglossbeforetrue
+% \end{macrocode}
+%\end{macro}
+%
+% Define a \gloskey[glslink]{wrgloss} key to determine whether to
+% write the glossary information before or after the link text.
+% \begin{macrocode}
+\define@choicekey{glslink}{wrgloss}[\val\nr]{before,after}%
+{%
+ \ifcase\nr\relax
+ \glsxtrinitwrglossbeforetrue
+ \or
+ \glsxtrinitwrglossbeforefalse
+ \fi
+}
+% \end{macrocode}
+%
+%\begin{macro}{\@gls@link}
+%\changes{1.14}{2017-04-18}{added redefinition}
+%Redefine to allow the indexing to be placed after the link text. By
+%default this is done before the link text to prevent problems that
+%can occur from the whatsit, but there may be times when the user
+%would like the indexing done afterwards even though it causes a
+%whatsit.
+% \begin{macrocode}
+\def\@gls@link[#1]#2#3{%
+ \leavevmode
+ \edef\glslabel{\glsdetoklabel{#2}}%
+ \def\@gls@link@opts{#1}%
+ \let\@gls@link@label\glslabel
+ \def\@glsnumberformat{glsnumberformat}%
+ \edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}%
+ \edef\glstype{\csname glo@\glslabel @type\endcsname}%
+ \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper
+% \end{macrocode}
+% Initialise when indexing should occur (new to v1.14).
+% \begin{macrocode}
+ \glsxtrinitwrgloss
+% \end{macrocode}
+% As the original definition. Note that the default link options may
+% override \cs{glsxtrinitwrgloss}.
+% \begin{macrocode}
+ \@gls@setdefault@glslink@opts
+ \do@glsdisablehyperinlist
+ \do@gls@link@checkfirsthyper
+ \setkeys{glslink}{#1}%
+ \glslinkpostsetkeys
+ \@gls@saveentrycounter
+ \@gls@setsort{\glslabel}%
+% \end{macrocode}
+% Do write if it should occur before the link text:
+% \begin{macrocode}
+ \ifglsxtrinitwrglossbefore
+ \@do@wrglossary{#2}%
+ \fi
+% \end{macrocode}
+% Do the link text:
+% \begin{macrocode}
+ \ifKV@glslink@hyper
+ \@glslink{\glolinkprefix\glslabel}{\glstextformat{#3}}%
+ \else
+ \glsdonohyperlink{\glolinkprefix\glslabel}{\glstextformat{#3}}%
+ \fi
+% \end{macrocode}
+% Do write if it should occur after the link text:
+% \begin{macrocode}
+ \ifglsxtrinitwrglossbefore
+ \else
+ \@do@wrglossary{#2}%
+ \fi
+% \end{macrocode}
+% As the original definition:
+% \begin{macrocode}
+ \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\changes{1.14}{2017-04-18}{added \cs{glsadd} option \texttt{thevalue}}
+% \begin{macrocode}
+\define@key{glossadd}{thevalue}{\def\@glsxtr@thevalue{#1}}
+% \end{macrocode}
+%
+%\changes{1.14}{2017-04-18}{added \cs{glsadd} option \texttt{theHvalue}}
+% \begin{macrocode}
+\define@key{glossadd}{theHvalue}{\def\@glsxtr@theHvalue{#1}}
+% \end{macrocode}
+%
%\begin{macro}{\glsadd}
%\changes{1.08}{2016-12-13}{added \cs{@glsxtr@record}}
%Redefine to include \cs{@glsxtr@record}
% \begin{macrocode}
\renewrobustcmd*{\glsadd}[2][]{%
\@gls@adjustmode
- \@glsxtr@record{#1}{#2}%
+ \@glsxtr@record{#1}{#2}{glossadd}%
\glsdoifexists{#2}%
{%
\def\@glsnumberformat{glsnumberformat}%
\edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}%
+ \def\@glsxtr@thevalue{}%
+ \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
\setkeys{glossadd}{#1}%
- \@gls@saveentrycounter
+ \ifdefempty{\@glsxtr@thevalue}%
+ {%
+ \@gls@saveentrycounter
+ }%
+ {%
+ \let\theglsentrycounter\@glsxtr@thevalue
+ \def\theHglsentrycounter{\@glsxtr@theHvalue}%
+ }%
\@@do@wrglossary{#2}%
}%
}
@@ -4284,6 +4457,22 @@ Dickimaw Books\\
%\end{macro}
%
%\begin{macro}{\glsdisablehyper}
+%\changes{1.14}{2017-04-18}{added redefinition}
+% Redefine to set \cs{glslabel} (to allow it to be picked up by
+% \cs{glsdohyperlink}). Also made it robust and added grouping to localise the
+% definition of \cs{glslabel}. The original internal command
+% {@glo@label} could probably be simply replaced with \cs{glslabel},
+% but it's retained in case its removal causes unexpected problems.
+% \begin{macrocode}
+\renewrobustcmd*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{%
+ \def\@glo@label{#2}%
+ {\edef\glslabel{#2}%
+ \@glslink{\glolinkprefix\glslabel}{#1}}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsdisablehyper}
%\changes{0.5.4}{2015-12-15}{added}
% Redefine in case we have an old version of \styfmt{glossaries}.
% \begin{macrocode}
@@ -5109,7 +5298,10 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@cgls@\@@cgls@
\let\@cglspl@\@@cglspl@
- \let\@cGLS@\@@cGLS@
+% \end{macrocode}
+%\changes{1.14}{2017-04-18}{fixed assignment of \cs{@cGls@}}
+% \begin{macrocode}
+ \let\@cGls@\@@cGls@
\let\@cGlspl@\@@cGlspl@
\let\@cGLS@\@@cGLS@
\let\@cGLSpl@\@@cGLSpl@
@@ -5657,7 +5849,10 @@ Dickimaw Books\\
% \begin{macrocode}
\let\@cgls@\@@cgls@
\let\@cglspl@\@@cglspl@
- \let\@cGLS@\@@cGLS@
+% \end{macrocode}
+%\changes{1.14}{2017-04-18}{fixed assignment of \cs{@cGls@}}
+% \begin{macrocode}
+ \let\@cGls@\@@cGls@
\let\@cGlspl@\@@cGlspl@
\let\@cGLS@\@@cGLS@
\let\@cGLSpl@\@@cGLSpl@
@@ -6026,7 +6221,6 @@ Dickimaw Books\\
% \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}%
@@ -6383,6 +6577,97 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@gls@noidx@getgrouptitle}
+%\changes{1.14}{2017-04-18}{new}
+%Patch.
+% \begin{macrocode}
+\renewcommand*{\@gls@noidx@getgrouptitle}[2]{%
+ \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}%
+ \@onelevel@sanitize\@glsxtr@titlelabel
+ \ifcsundef{\@glsxtr@titlelabel}%
+ {%
+ \DTLifint{#1}%
+ {%
+ \ifnum#1<256\relax
+ \edef#2{\char#1\relax}%
+ \else
+ \edef#2{#1}%
+ \fi
+ }%
+ {%
+ \ifcsundef{#1groupname}%
+ {\def#2{#1}}%
+ {\letcs#2{#1groupname}}%
+ }%
+ }%
+ {%
+ \letcs#2{\@glsxtr@titlelabel}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtr@org@getgrouptitle}
+%\changes{1.14}{2017-04-18}{new}
+%Save original definition of \cs{@gls@getgrouptitle}
+% \begin{macrocode}
+\let\glsxtr@org@getgrouptitle\@gls@getgrouptitle
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrgetgrouptitle}
+%\changes{1.14}{2017-04-18}{new}
+%Provide a user-level command to fetch the group title. The first
+%argument is the group label. The second argument is a control
+%sequence in which to store the title.
+% \begin{macrocode}
+\newrobustcmd{\glsxtrgetgrouptitle}[2]{%
+ \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}%
+ \@onelevel@sanitize\@glsxtr@titlelabel
+ \ifcsdef{\@glsxtr@titlelabel}
+ {\letcs{#2}{\@glsxtr@titlelabel}}%
+ {\glsxtr@org@getgrouptitle{#1}{#2}}%
+}
+\let\@gls@getgrouptitle\glsxtrgetgrouptitle
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrsetgrouptitle}
+%\changes{1.14}{2017-04-18}{new}
+%Sets the title for the given group label.
+% \begin{macrocode}
+\newcommand{\glsxtrsetgrouptitle}[2]{%
+ \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}%
+ \@onelevel@sanitize\@glsxtr@titlelabel
+ \csxdef{\@glsxtr@titlelabel}{#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsnavigation}
+%\changes{1.14}{2017-04-18}{new}
+%Redefine to use new user-level command.
+% \begin{macrocode}
+\renewcommand*{\glsnavigation}{%
+ \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
+ \glsxtrgetgrouptitle{\@gls@tmp}{\@gls@grptitle}%
+ \glsnavhyperlink{\@gls@tmp}{\@gls@grptitle}%
+ \let\@gls@between\glshypernavsep
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@print@noidx@glossary}
%\changes{1.11}{2017-01-19}{added redefinition}
% \begin{macrocode}
@@ -6485,14 +6770,18 @@ Dickimaw Books\\
%
%\begin{macro}{\glsxtrdisplayendloc}
%\changes{1.12}{2017-02-03}{new}
+%\changes{1.14}{2017-04-18}{added check for empty format}
%End of a location range.
% \begin{macrocode}
\newcommand*{\glsxtrdisplayendloc}[2]{%
- \ifdefstring{\glsxtrlocrangefmt}{#1}{}%
- {\GlossariesExtraWarning{Mismatched end location range
- (start=\glsxtrlocrangefmt, end=#1)}%
- }%
- \glsxtrdisplayendlochook{#1}{#2}%
+ \edef\@glsxtr@tmp{#1}%
+ \ifdefempty{\@glsxtr@tmp}{\def\@glsxtr@tmp{glsnumberformat}}{}%
+ \ifx\glsxtrlocrangefmt\@glsxtr@tmp
+ \else
+ \GlossariesExtraWarning{Mismatched end location range
+ (start=\glsxtrlocrangefmt, end=\@glsxtr@tmp)}%
+ \fi
+ \expandafter\glsxtrdisplayendlochook\expandafter{\@glsxtr@tmp}{#2}%
\expandafter\glsxtrdisplaysingleloc
\expandafter{\glsxtrlocrangefmt}{#2}%
\def\glsxtrlocrangefmt{}%
@@ -6515,6 +6804,61 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@gls@removespaces}
+%\changes{1.14}{2017-04-18}{new}
+%Redefine to allow adjustments to location hyperlink.
+% \begin{macrocode}
+\def\@gls@removespaces#1 #2\@nil{%
+ \toks@=\expandafter{\the\toks@#1}%
+ \ifx\\#2\\%
+ \edef\x{\the\toks@}%
+ \ifx\x\empty
+ \else
+ \glsxtrlocationhyperlink{\glsentrycounter}{\@glo@counterprefix}{\the\toks@}%
+ \fi
+ \else
+ \@gls@ReturnAfterFi{%
+ \@gls@removespaces#2\@nil
+ }%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrlocationhyperlink}
+%\changes{1.14}{2017-04-18}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrlocationhyperlink}[3]{%
+ \ifdefvoid\glsxtrsupplocationurl
+ {%
+ \hyperlink{#1#2#3}{#3}%
+ }%
+ {%
+ \hyperref{\glsxtrsupplocationurl}{}{#1#2#3}{#3}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrsupphypernumber}
+%\changes{1.14}{2017-04-18}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrsupphypernumber}[1]{%
+ {%
+ \glshasattribute{\glscurrententrylabel}{externallocation}%
+ {%
+ \def\glsxtrsupplocationurl{%
+ \glsgetattribute{\glscurrententrylabel}{externallocation}}%
+ }%
+ {%
+ \def\glsxtrsupplocationurl{}%
+ }%
+ \glshypernumber{#1}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
% Give a bit of assistance to new users who are confused and don't
% know how to read transcript messages.
%\begin{macro}{\@print@glossary}
@@ -6937,6 +7281,37 @@ Dickimaw Books\\
\AtBeginDocument
{\protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}}%
\let\glsxtr@writefields\relax
+% \end{macrocode}
+%If the \pkgopt{automake} option is on, try running bib2gls if
+%the aux file exists.
+%\changes{1.14}{2017-04-18}{added check for automake}
+% \begin{macrocode}
+ \ifglsautomake
+ \IfFileExists{\jobname.aux}%
+ {\immediate\write18{bib2gls "\jobname"}}{}%
+% \end{macrocode}
+%If \cs{makeglossaries} is also used, allow makeindex/xindy to
+%also be run, otherwise disable the error message about requiring
+%\cs{makeglossaries} with \pkgopt[true]{automake}.
+% \begin{macrocode}
+ \ifx\@gls@doautomake\@gls@doautomake@err
+ \let\@gls@doautomake\relax
+ \fi
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtr@do@automake@err}
+%\changes{1.14}{2017-04-18}{new}
+% \begin{macrocode}
+\newcommand*{\@gls@doautomake@err}{%
+ \PackageError{glossaries}{You must use
+ \string\makeglossaries\space with automake=true}
+ {%
+ Either remove the automake=true setting or
+ add \string\makeglossaries\space to your document preamble.%
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -7125,8 +7500,12 @@ Dickimaw Books\\
%\begin{macro}{\@glsxtr@unsrt@getgrouptitle}
%\changes{1.11}{2017-01-19}{new}
% \begin{macrocode}
-\newcommand*{\@glsxtr@unsrt@getgrouptitle}[2]{%
- \def#2{#1}%
+\newrobustcmd*{\@glsxtr@unsrt@getgrouptitle}[2]{%
+ \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}%
+ \@onelevel@sanitize\@glsxtr@titlelabel
+ \ifcsdef{\@glsxtr@titlelabel}
+ {\letcs{#2}{\@glsxtr@titlelabel}}%
+ {\def#2{#1}}%
}
% \end{macrocode}
%\end{macro}
@@ -7182,7 +7561,8 @@ Dickimaw Books\\
{}%
{%
\ifdefempty{\@gls@currentlettergroup}{}{\glsgroupskip}%
- \glsgroupheading{\@glo@thislettergrp}%
+ \expandafter\glsgroupheading\expandafter
+ {\csname glo@\glsdetoklabel{#1}@group\endcsname}%
}%
\let\@gls@currentlettergroup\@glo@thislettergrp
\ifdefvoid{\@gls@location}%
@@ -14569,7 +14949,7 @@ Dickimaw Books\\
% First identify package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra-stylemods}[2017/02/07 v1.13 (NLCT)]
+\ProvidesPackage{glossaries-extra-stylemods}[2017/04/18 v1.14 (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 98905986c4f..5cc3435e316 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 2017/2/7 9:40
+% glossaries-extra.ins generated using makedtx version 1.1 2017/4/18 11:44
\input docstrip
\preamble
@@ -8,7 +8,7 @@
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
+ of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX