summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/glossaries-extra
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-03 21:38:07 +0000
committerKarl Berry <karl@freefriends.org>2017-11-03 21:38:07 +0000
commite4d8f7684792e7652b447e6ad94b82ca72886fe3 (patch)
tree293c6ba9077b051a071953ff264008a647d713fd /Master/texmf-dist/source/latex/glossaries-extra
parente9c70de7cb494496d1f0357ba7ae82c5c2b15447 (diff)
glossaries-extra (3nov17)
git-svn-id: svn://tug.org/texlive/trunk@45682 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.dtx3803
-rw-r--r--Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins6
2 files changed, 3403 insertions, 406 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 e5c743bed66..f43abcd99c1 100644
--- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
+++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
@@ -1,21 +1,22 @@
%\iffalse
% glossaries-extra.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -comment ".*\.tex"
-% -comment ".*\.bib"
-% -doc "glossaries-extra-codedoc.tex"
-% -macrocode ".*\.tex"
-% -macrocode ".*\.bib"
-% -section "chapter"
-% -setambles ".*\.bib=>\nopreamble\nopostamble"
% -author "Nicola Talbot"
% -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"
+% -section "chapter"
+% -macrocode ".*\.tex"
+% -macrocode ".*\.bib"
+% -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/9/11 14:10
+% Created on 2017/11/3 16:35
%\fi
%\iffalse
%<*package>
@@ -125,7 +126,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{17580}
+\CheckSum{19892}
\newcommand*{\ifirstuse}{\iterm{first use}}
\newcommand*{\firstuse}{\gls{firstuse}}
@@ -165,13 +166,13 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\raggedright
}
-\title{glossaries-extra.sty v1.20:
+\title{glossaries-extra.sty v1.21:
documented code}
\author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\url{http://www.dickimaw-books.com/}}
-\date{2017-09-11}
+\date{2017-11-03}
\begin{document}
\DocInput{glossaries-extra.dtx}
@@ -216,7 +217,7 @@ Dickimaw Books\\
%\section{Package Initialisation and Options}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra}[2017/09/11 v1.20 (NLCT)]
+\ProvidesPackage{glossaries-extra}[2017/11/03 v1.21 (NLCT)]
% \end{macrocode}
% Requires \sty{xkeyval} to define package options.
% \begin{macrocode}
@@ -409,82 +410,158 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%The \pkgopt{record} option is somewhat problematic. On the first
+%\LaTeX\ run the entries aren't defined. This isn't as
+%straight-forward as commands like \cs{cite} since attributes
+%associated with the entry's category may switch off the indexing
+%or the entry's glossary type might require a particular counter.
+%This kind of information can't be determined until the entry has
+%been defined. So there are two different commands here. One that's
+%used if the entry hasn't been defined, which tries to use sensible
+%defaults, and one which is used when the entry has been defined.
+%
+%\begin{macro}{\@glsxtr@do@record@wrglossary}
+%\changes{1.21}{2017-11-03}{new}
+%The \pkgopt[only]{record} option sets \cs{@@do@wrglossary} to this
+%command, which means it's done within \cs{glsadd} and
+%\cs{@gls@link}, and so is only done if the entry exists.
+% \begin{macrocode}
+\newcommand*{\@glsxtr@do@record@wrglossary}[1]{%
+ \begingroup
+ \ifKV@glslink@noindex
+ \else
+ \edef\@gls@label{\glsdetoklabel{#1}}%
+ \let\glslabel\@gls@label
+ \glswriteentry{#1}%
+ {%
+ \ifdefempty{\@glsxtr@thevalue}%
+ {%
+ \ifx\@glsxtr@org@theHvalue\@glsxtr@theHvalue
+ \else
+ \let\theHglsentrycounter\@glsxtr@theHvalue
+ \fi
+ \glsxtr@saveentrycounter
+ \let\@@do@@wrglossary\@glsxtr@dorecord
+ }%
+ {%
+ \let\theglsentrycounter\@glsxtr@thevalue
+ \let\theHglsentrycounter\@glsxtr@theHvalue
+ \let\@@do@@wrglossary\@glsxtr@dorecordnodefer
+ }%
+ \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
+ \glsxtr@@do@wrglossary{#1}%
+ \else
+ \@@glsxtrwrglossmark
+ \@@do@@wrglossary
+ \fi
+ }%
+ \fi
+ \endgroup
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtr@do@alsoindex@wrglossary}
+%\changes{1.21}{2017-11-03}{new}
+%The \pkgopt[alsoindex]{record} option needs to both record and
+%index.
+% \begin{macrocode}
+\newcommand*{\glsxtr@do@alsoindex@wrglossary}[1]{%
+ \glsxtr@@do@wrglossary{#1}%
+ \@glsxtr@do@record@wrglossary{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@@glsxtr@record}
%\changes{1.08}{2016-12-13}{new}
-%This is the actual code that does the recording
+%The \pkgopt[only]{record} option sets \cs{@glsxtr@record} to this.
+%This performs the recording if the entry doesn't exist and is done
+%at the start of \cs{@gls@field@link} and commands like \cs{@gls@}
+%(before the existence test). This means that it disregards the
+%\gloskey[glslink]{wrgloss} key.
+%
%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. The third argument is the key family
+%setting to be picked up. The second argument is the entry's label.
+% The third argument is the key family
%(\texttt{glslink} in most cases, \texttt{glossadd} for \cs{glsadd}).
% \begin{macrocode}
\newcommand*{\@@glsxtr@record}[3]{%
- \begingroup
- \let\@glsnumberformat\@glsxtr@defaultnumberformat
- \def\@glsxtr@thevalue{}%
- \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
- \let\@glsxtr@org@theHvalue\@glsxtr@theHvalue
- \ifcsdef{glo@#2@counter}%
- {%
- \edef\@gls@counter{\csname glo@#2@counter\endcsname}%
- }%
- {%
+ \ifglsentryexists{#2}{}%
+ {%
+ \@@glsxtrwrglossmark
+ \begingroup
+% \end{macrocode}
+%Save the label in case it's needed.
+% \begin{macrocode}
+ \edef\@gls@label{\glsdetoklabel{#2}}%
+ \let\glslabel\@gls@label
+ \let\@glsnumberformat\@glsxtr@defaultnumberformat
+ \def\@glsxtr@thevalue{}%
+ \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
+ \let\@glsxtr@org@theHvalue\@glsxtr@theHvalue
% \end{macrocode}
%Entry hasn't been defined, so we'll have to assume the page number by
%default.
% \begin{macrocode}
\def\@gls@counter{page}%
- }%
- \setkeys{#3}{#1}%
- \ifKV@glslink@noindex
- \else
- \glswriteentry{#2}%
- {%
% \end{macrocode}
-%Check if \gloskey[glsadd]{thevalue} has been set.
+%Check for default options (which may switch off indexing).
+%\changes{1.21}{2017-11-03}{added check for default options}
% \begin{macrocode}
- \ifdefempty{\@glsxtr@thevalue}%
+ \@gls@setdefault@glslink@opts
+ \setkeys{#3}{#1}%
+ \ifKV@glslink@noindex
+ \else
+ \glswriteentry{#2}%
{%
% \end{macrocode}
+%Check if \gloskey[glsadd]{thevalue} has been set.
+% \begin{macrocode}
+ \ifdefempty{\@glsxtr@thevalue}%
+ {%
+% \end{macrocode}
%Key \gloskey[glsadd]{thevalue} hasn't been set, but check if
%\gloskey[glsadd]{theHvalue} has been set. (Not particularly likely,
%but allow for it.)
% \begin{macrocode}
- \ifx\@glsxtr@org@theHvalue\@glsxtr@theHvalue
- \else
- \let\theHglsentrycounter\@glsxtr@theHvalue
- \fi
+ \ifx\@glsxtr@org@theHvalue\@glsxtr@theHvalue
+ \else
+ \let\theHglsentrycounter\@glsxtr@theHvalue
+ \fi
% \end{macrocode}
%Save the entry counter.
% \begin{macrocode}
- \glsxtr@saveentrycounter
+ \glsxtr@saveentrycounter
% \end{macrocode}
%Temporarily redefine \cs{@@do@@wrglossary} for use with
%\cs{glsxtr@@do@wrglossary}.
% \begin{macrocode}
- \let\@@do@@wrglossary\@glsxtr@dorecord
- }%
- {%
+ \let\@@do@@wrglossary\@glsxtr@dorecord
+ }%
+ {%
% \end{macrocode}
%\gloskey[glsadd]{thevalue} has been set, so there's no need to
%defer writing the location value. (If it's dependent on the page
%counter, the \gloskey[glslink]{counter} key should be set instead.)
% \begin{macrocode}
- \let\theglsentrycounter\@glsxtr@thevalue
- \let\theHglsentrycounter\@glsxtr@theHvalue
- \let\@@do@@wrglossary\@glsxtr@dorecordnodefer
- }%
- \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
- \glsxtr@@do@wrglossary{#2}%
- \else
+ \let\theglsentrycounter\@glsxtr@thevalue
+ \let\theHglsentrycounter\@glsxtr@theHvalue
+ \let\@@do@@wrglossary\@glsxtr@dorecordnodefer
+ }%
+ \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
+ \glsxtr@@do@wrglossary{#2}%
+ \else
% \end{macrocode}
-%No need to escape special characters, but need to save the label.
+%No need to escape special characters.
% \begin{macrocode}
- \edef\@gls@label{\glsdetoklabel{#2}}%
- \@@do@@wrglossary
- \fi
- }%
- \fi
- \endgroup
+ \@@do@@wrglossary
+ \fi
+ }%
+ \fi
+ \endgroup
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -577,6 +654,7 @@ Dickimaw Books\\
%Deal with \cs{glssee} in record mode.
% \begin{macrocode}
\newcommand*{\@glsxtr@recordsee}[2]{%
+ \@@glsxtrwrglossmark
\def\@gls@xref{#2}%
\@onelevel@sanitize\@gls@xref
\protected@write\@auxout{}{\string\glsxtr@recordsee{#1}{\@gls@xref}}%
@@ -597,7 +675,7 @@ Dickimaw Books\\
%\changes{1.08}{2016-12-13}{new}
%Initialise.
% \begin{macrocode}
-\newcommand*{\glsxtr@setup@record}{}
+\newcommand*{\glsxtr@setup@record}{\let\@@do@wrglossary\glsxtr@@do@wrglossary}
% \end{macrocode}
%\end{macro}
%
@@ -680,6 +758,20 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@glsxtr@record@setting@only}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@glsxtr@record@setting@only}{only}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtr@record@setting@off}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@glsxtr@record@setting@off}{off}
+% \end{macrocode}
+%\end{macro}
+%
%Now define the \pkgopt{record} package option.
%\changes{1.08}{2016-12-13}{added \pkgopt{record} package option}
% \begin{macrocode}
@@ -693,7 +785,7 @@ Dickimaw Books\\
%Don't record.
% \begin{macrocode}
\def\glsxtr@setup@record{%
- \renewcommand*{\@do@seeglossary}{\@glsxtr@org@doseeglossary}%
+ \renewcommand*{\@do@seeglossary}{\@glsxtr@doseeglossary}%
\renewcommand*{\@glsxtr@record}[3]{}%
\let\@@do@wrglossary\glsxtr@@do@wrglossary
\let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
@@ -711,7 +803,7 @@ Dickimaw Books\\
\@glsxtr@autoseeindexfalse
\let\@do@seeglossary\@glsxtr@recordsee
\let\@glsxtr@record\@@glsxtr@record
- \let\@@do@wrglossary\@gobble
+ \let\@@do@wrglossary\@glsxtr@do@record@wrglossary
\let\@gls@saveentrycounter\relax
\let\glsxtrundefaction\@glsxtr@warn@undefaction
\let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
@@ -738,9 +830,9 @@ Dickimaw Books\\
%Record and index.
% \begin{macrocode}
\def\glsxtr@setup@record{%
- \renewcommand*{\@do@seeglossary}{\@glsxtr@org@doseeglossary}%
+ \renewcommand*{\@do@seeglossary}{\@glsxtr@dosee@alsoindex@glossary}%
\let\@glsxtr@record\@@glsxtr@record
- \let\@@do@wrglossary\glsxtr@@do@wrglossary
+ \let\@@do@wrglossary\glsxtr@do@alsoindex@wrglossary
\let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
\let\glsxtrundefaction\@glsxtr@warn@undefaction
\let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
@@ -877,12 +969,78 @@ Dickimaw Books\\
}
% \end{macrocode}
%
+%\begin{macro}{\@glsxtr@defpostpunc}
+%Redefines \cs{glspostdescription}. The \pkgopt{postdot} and
+%\pkgopt{nopostdot} options will have to redefine this.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@glsxtr@defpostpunc}{}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{option}{postdot}
%Shortcut for \pkgopt[false]{nopostdot}
%\changes{1.12}{2017-02-03}{new}
% \begin{macrocode}
\@glsxtr@declareoption{postdot}{%
\glsxtr@dooption{nopostdot=false}%
+ \renewcommand*{\@glsxtr@defpostpunc}{%
+ \renewcommand*{\glspostdescription}{%
+ \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi}%
+ }%
+}
+% \end{macrocode}
+%\end{option}
+
+%\begin{option}{nopostdot}
+%Needs to redefine \cs{@glsxtr@defpostpunc}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\define@choicekey{glossaries-extra.sty}{nopostdot}{true,false}[true]{%
+ \glsxtr@dooption{nopostdot=#1}%
+ \renewcommand*{\@glsxtr@defpostpunc}{%
+ \renewcommand*{\glspostdescription}{%
+ \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi}%
+ }%
+}
+%
+%\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}.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\define@key{glossaries-extra.sty}{postpunc}{%
+ \glsxtr@dooption{nopostdot=false}%
+ \ifstrequal{#1}{dot}%
+ {%
+ \renewcommand*{\@glsxtr@defpostpunc}{%
+ \renewcommand*{\glspostdescription}{.\spacefactor\sfcode`\. }%
+ }%
+ }%
+ {%
+ \ifstrequal{#1}{comma}%
+ {%
+ \renewcommand*{\@glsxtr@defpostpunc}{%
+ \renewcommand*{\glspostdescription}{,}%
+ }%
+ }%
+ {%
+ \ifstrequal{#1}{none}%
+ {%
+ \glsxtr@dooption{nopostdot=true}%
+ \renewcommand*{\@glsxtr@defpostpunc}{%
+ \renewcommand*{\glspostdescription}{}%
+ }%
+ }%
+ {%
+ \renewcommand*{\@glsxtr@defpostpunc}{%
+ \renewcommand*{\glspostdescription}{#1}%
+ }%
+ }%
+ }%
+ }%
}
% \end{macrocode}
%\end{option}
@@ -1063,7 +1221,7 @@ Dickimaw Books\\
%\pkgopt[all]{shortcuts} as it conflicts with other shortcuts).
% \begin{macrocode}
\define@choicekey{glossaries-extra.sty}{shortcuts}[\val\nr]%
- {acronyms,acro,abbreviations,abbr,other,all,true,none,false,ac}[true]{%
+ {acronyms,acro,abbreviations,abbr,other,all,true,ac,none,false}[true]{%
\let\@glsxtr@shortcutsval\val
\ifcase\nr\relax % acronyms
\renewcommand*{\@glsxtr@setupshortcuts}{%
@@ -1090,24 +1248,38 @@ Dickimaw Books\\
\or % all
\renewcommand*{\@glsxtr@setupshortcuts}{%
\glsacrshortcutstrue
- \DefineAcronymSynonyms
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{changed true setting to use shortcuts=ac
+%instead of shortcuts=acronym}
+% \begin{macrocode}
+ \GlsXtrDefineAcShortcuts
\GlsXtrDefineAbbreviationShortcuts
\GlsXtrDefineOtherShortcuts
}%
\or % true
\renewcommand*{\@glsxtr@setupshortcuts}{%
\glsacrshortcutstrue
- \DefineAcronymSynonyms
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{changed true setting to use shortcuts=ac
+%instead of shortcuts=acronym}
+% \begin{macrocode}
+ \GlsXtrDefineAcShortcuts
\GlsXtrDefineAbbreviationShortcuts
\GlsXtrDefineOtherShortcuts
}%
- \or % none, false
- \renewcommand*{\@glsxtr@setupshortcuts}{}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{corrected shortcuts=ac}
+% \begin{macrocode}
\or % ac
\renewcommand*{\@glsxtr@setupshortcuts}{%
\glsacrshortcutstrue
\GlsXtrDefineAcShortcuts
}%
+% \end{macrocode}
+%Leave none and false as last option.
+% \begin{macrocode}
+ \else % none, false
+ \renewcommand*{\@glsxtr@setupshortcuts}{}%
\fi
}
% \end{macrocode}
@@ -1176,23 +1348,32 @@ Dickimaw Books\\
\RequirePackage{glossaries-extra-stylemods}}%
}%
{%
- \renewcommand*{\@glsxtr@redefstyles}{}%
- \@for\@glsxtr@tmp:=#1\do{%
- \IfFileExists{glossary-\@glsxtr@tmp.sty}%
- {%
- \eappto\@glsxtr@redefstyles{%
- \noexpand\RequirePackage{glossary-\@glsxtr@tmp}}%
- }%
- {%
- \PackageError{glossaries-extra}%
- {Glossaries style package `glossary-\@glsxtr@tmp.sty'
- doesn't exist (did you mean to use the `style' key?)}%
- {The list of values (#1) in the `stylemods' key should
- match the glossary-xxx.sty files provided with
- glossaries.sty}%
+ \ifstrequal{#1}{all}%
+ {%
+ \renewcommand*{\@glsxtr@redefstyles}{%
+ \PassOptionsToPackage{all}{glossaries-extra-stylemods}%
+ \RequirePackage{glossaries-extra-stylemods}%
}%
}%
- \appto\@glsxtr@redefstyles{\RequirePackage{glossaries-extra-stylemods}}%
+ {%
+ \renewcommand*{\@glsxtr@redefstyles}{}%
+ \@for\@glsxtr@tmp:=#1\do{%
+ \IfFileExists{glossary-\@glsxtr@tmp.sty}%
+ {%
+ \eappto\@glsxtr@redefstyles{%
+ \noexpand\RequirePackage{glossary-\@glsxtr@tmp}}%
+ }%
+ {%
+ \PackageError{glossaries-extra}%
+ {Glossaries style package `glossary-\@glsxtr@tmp.sty'
+ doesn't exist (did you mean to use the `style' key?)}%
+ {The list of values (#1) in the `stylemods' key should
+ match the glossary-xxx.sty files provided with
+ glossaries.sty}%
+ }%
+ }%
+ \appto\@glsxtr@redefstyles{\RequirePackage{glossaries-extra-stylemods}}%
+ }
}%
}
% \end{macrocode}
@@ -1229,6 +1410,58 @@ Dickimaw Books\\
% \end{macrocode}
%\end{option}
%
+%\begin{macro}{\@glsxtrwrglossmark}
+%\changes{1.21}{2017-11-03}{new}
+%Marks the place where indexing occurs.
+%Does nothing by default.
+% \begin{macrocode}
+\newcommand*{\@glsxtrwrglossmark}{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@@glsxtrwrglossmark}
+%\changes{1.21}{2017-11-03}{new}
+%Since \cs{glsadd} can be used in the preamble, this action needs to
+%be disabled until the start of the document.
+% \begin{macrocode}
+\newcommand*{\@@glsxtrwrglossmark}{}
+\AtBeginDocument{\renewcommand*{\@@glsxtrwrglossmark}{\@glsxtrwrglossmark}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrwrglossmark}
+%\changes{1.21}{2017-11-03}{new}
+%Does nothing by default.
+% \begin{macrocode}
+\newcommand*{\glsxtrwrglossmark}{\ensuremath{\cdot}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{option}{debug}
+%\changes{1.21}{2017-11-03}{new}
+% Provide extra debug options.
+% \begin{macrocode}
+\define@choicekey{glossaries-extra.sty}{debug}[\val\nr]%
+ {true,false,showtargets,showwrgloss,all}[true]{%
+ \ifcase\nr\relax % true
+ \glsxtr@dooption{debug=true}%
+ \renewcommand*{\@glsxtrwrglossmark}{}%
+ \or % false
+ \glsxtr@dooption{debug=false}%
+ \renewcommand*{\@glsxtrwrglossmark}{}%
+ \or % showtargets
+ \glsxtr@dooption{debug=showtargets}%
+ \or % showwrgloss
+ \glsxtr@dooption{debug=true}%
+ \renewcommand*{\@glsxtrwrglossmark}{\glsxtrwrglossmark}%
+ \or % all
+ \glsxtr@dooption{debug=showtargets}%
+ \renewcommand*{\@glsxtrwrglossmark}{\glsxtrwrglossmark}%
+ \fi
+ }
+% \end{macrocode}
+%\end{option}
+%
% Pass all other options to \styfmt{glossaries}.
% \begin{macrocode}
\DeclareOptionX*{%
@@ -1246,6 +1479,34 @@ Dickimaw Books\\
% \begin{macrocode}
\@glsxtr@doaccsupp
% \end{macrocode}
+% Redefine \cs{glspostdescription} if required.
+% \begin{macrocode}
+\@glsxtr@defpostpunc
+% \end{macrocode}
+%
+%\begin{macro}{\glsshowtarget}
+%This command was introduced to \sty{glossaries} v4.32 so it may not
+%be defined. Therefore it's defined here using \cs{def}.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\def\glsshowtarget#1{%
+ \glsxtrtitleorpdforheading
+ {%
+ \ifmmode
+ \texttt{\small [#1]}%
+ \else
+ \ifinner
+ \texttt{\small [#1]}%
+ \else
+ \marginpar{\texttt{\small #1}}%
+ \fi
+ \fi
+ }%
+ {[#1]}%
+ {\texttt{\small [#1]}}%
+}
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\@glsxtr@org@doseeglossary}
%Save original definition of \cs{@do@seeglossary}
@@ -1254,6 +1515,29 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@glsxtr@doseeglossary}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@glsxtr@doseeglossary}[2]{%
+ \glsdoifexists{#1}%
+ {%
+ \@@glsxtrwrglossmark
+ \@glsxtr@org@doseeglossary{#1}{#2}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtr@dosee@alsoindex@glossary}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@glsxtr@dosee@alsoindex@glossary}[2]{%
+ \@glsxtr@recordsee{#1}{#2}%
+ \@glsxtr@doseeglossary{#1}{#2}%
+}
+% \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}.
@@ -1342,11 +1626,22 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtr@org@@do@wrglossary}
+%\changes{1.21}{2017-11-03}{new}
+%Save original definition of \cs{@@do@wrglossary}.
+% \begin{macrocode}
+\let\glsxtr@org@@do@wrglossary\@@do@wrglossary
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\glsxtr@@do@wrglossary}
%\changes{1.08}{2016-12-13}{new}
-%Save original definition of \cs{@@do@wrglossary}.
+%The new version adds code that can show a marker for debugging.
% \begin{macrocode}
-\let\glsxtr@@do@wrglossary\@@do@wrglossary
+\newcommand*{\glsxtr@@do@wrglossary}[1]{%
+ \@@glsxtrwrglossmark
+ \glsxtr@org@@do@wrglossary{#1}%
+}
% \end{macrocode}
%\end{macro}
%
@@ -1670,15 +1965,16 @@ Dickimaw Books\\
%
%\begin{macro}{\s@glsxtrifhasfield}
%\changes{1.19}{2017-09-09}{new}
+%\changes{1.21}{2017-11-03}{switched from \cs{ifdef} to \cs{ifundef}}
% Starred version omits grouping.
% \begin{macrocode}
\newcommand{\s@glsxtrifhasfield}[4]{%
\letcs{\glscurrentfieldvalue}{glo@\glsdetoklabel{#2}@#1}%
- \ifdef\glscurrentfieldvalue
+ \ifundef\glscurrentfieldvalue
+ {#4}%
{%
\ifdefempty\glscurrentfieldvalue{#4}{#3}%
}%
- {#4}%
}
% \end{macrocode}
%\end{macro}
@@ -1808,6 +2104,19 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\GlsXtrIfFieldEqStr}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\GlsXtrIfFieldEqStr}[5]{%
+ \glsxtrifhasfield{#1}{#2}%
+ {%
+ \ifdefstring{\glscurrentfieldvalue}{#3}{#4}{#5}%
+ }%
+ {#5}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\glsxtrpageref}
% Like \cs{glsrefentry} but references the page number instead (if
% entry counting is on).
@@ -2304,6 +2613,22 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsseeitemformat}
+%\changes{1.21}{2017-11-03}{new}
+%\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.
+% \begin{macrocode}
+\renewcommand*{\glsseeitemformat}[1]{%
+ \glsifregular{#1}{\glsaccessname{#1}}{\glsaccesstext{#1}}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\glsxtruseseealso}
%\changes{1.16}{2017-06-15}{new}
%Apply \cs{glsseeformat} to the \gloskey{seealso} key if not empty.
@@ -2383,17 +2708,25 @@ Dickimaw Books\\
% \end{macrocode}
%This essentially works like \cs{@do@seeglossary} but uses the
%\texttt{seealso} class.
+%\changes{1.21}{2017-11-03}{added check that the entry exists}
% \begin{macrocode}
\newrobustcmd*{\glsxtrindexseealso}[2]{%
- \def\@gls@xref{#2}%
- \@onelevel@sanitize\@gls@xref
- \@gls@checkmkidxchars\@gls@xref
- \gls@glossary{\csname glo@#1@type\endcsname}{%
- (indexentry
- :tkey (\csname glo@#1@index\endcsname)
- :xref (\string"\@gls@xref\string")
- :attr \string"seealso\string"
- )
+ \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
+ \@glsxtr@recordsee{#1}{#2}%
+ \fi
+ \glsdoifexists{#1}%
+ {%
+ \@@glsxtrwrglossmark
+ \def\@gls@xref{#2}%
+ \@onelevel@sanitize\@gls@xref
+ \@gls@checkmkidxchars\@gls@xref
+ \gls@glossary{\csname glo@#1@type\endcsname}{%
+ (indexentry
+ :tkey (\csname glo@#1@index\endcsname)
+ :xref (\string"\@gls@xref\string")
+ :attr \string"seealso\string"
+ )
+ }%
}%
}
}
@@ -2633,32 +2966,61 @@ Dickimaw Books\\
%\begin{macro}{\makenoidxglossaries}
%Modify \cs{makenoidxglossaries} so that it automatically switches
%off (unless the restricted setting is on) and disables the \pkgopt{docdef} key.
+%This command isn't allow with the \pkgopt{record} option.
% \begin{macrocode}
\let\glsxtr@orgmakenoidxglossaries\makenoidxglossaries
\renewcommand{\makenoidxglossaries}{%
- \glsxtr@orgmakenoidxglossaries
- \if@glsxtrdocdefrestricted
+ \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off
+ {%
+ \glsxtr@orgmakenoidxglossaries
+% \end{macrocode}
+%Add marker to \cs{@do@seeglossary}
+% \begin{macrocode}
+ \renewcommand{\@do@seeglossary}[2]{%
+ \@@glsxtrwrglossmark
+ \edef\@gls@label{\glsdetoklabel{##1}}%
+ \protected@write\@auxout{}{%
+ \string\@gls@reference
+ {\csname glo@\@gls@label @type\endcsname}%
+ {\@gls@label}%
+ {%
+ \string\glsseeformat##2{}%
+ }%
+ }%
+ }%
+% \end{macrocode}
+%Check for \pkgopt[restricted]{docdefs}:
+% \begin{macrocode}
+ \if@glsxtrdocdefrestricted
% \end{macrocode}
%If restricted document definitions allowed, adjust
%\cs{@gls@reference} so that it doesn't test for existence.
% \begin{macrocode}
- \renewcommand*{\@gls@reference}[3]{%
- \ifcsundef{@glsref@##1}{\csgdef{@glsref@##1}{}}{}%
- \ifinlistcs{##2}{@glsref@##1}%
- {}%
- {\listcsgadd{@glsref@##1}{##2}}%
- \ifcsundef{glo@\glsdetoklabel{##2}@loclist}%
- {\csgdef{glo@\glsdetoklabel{##2}@loclist}{}}%
- {}%
- \listcsgadd{glo@\glsdetoklabel{##2}@loclist}{##3}%
- }%
- \else
+ \renewcommand*{\@gls@reference}[3]{%
+ \ifcsundef{@glsref@##1}{\csgdef{@glsref@##1}{}}{}%
+ \ifinlistcs{##2}{@glsref@##1}%
+ {}%
+ {\listcsgadd{@glsref@##1}{##2}}%
+ \ifcsundef{glo@\glsdetoklabel{##2}@loclist}%
+ {\csgdef{glo@\glsdetoklabel{##2}@loclist}{}}%
+ {}%
+ \listcsgadd{glo@\glsdetoklabel{##2}@loclist}{##3}%
+ }%
+ \else
% \end{macrocode}
%Disable document definitions.
% \begin{macrocode}
- \@glsxtrdocdeffalse
- \fi
- \disable@keys{glossaries-extra.sty}{docdef}%
+ \@glsxtrdocdeffalse
+ \fi
+ \disable@keys{glossaries-extra.sty}{docdef}%
+ }%
+ {%
+ \PackageError{glossaries-extra}{\string\makenoidxglossaries\space
+ not permitted\MessageBreak
+ with record=\@glsxtr@record@setting\space package option}%
+ {You may only use \string\makenoidxglossaries\ space with the
+ record=off option}%
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -3255,8 +3617,8 @@ Dickimaw Books\\
\renewcommand{\@gls@field@link}[4][]{%
% \end{macrocode}
%If the \pkgopt{record} option has been used, the information needs
-%to be written to the aux file regardless of whether the enter
-%exists.
+%to be written to the aux file regardless of whether the entry
+%exists (unless indexing has been switched off).
%\changes{1.08}{2016-12-13}{added \cs{@glsxtr@record}}
% \begin{macrocode}
\@glsxtr@record{#2}{#3}{glslink}%
@@ -3451,6 +3813,32 @@ Dickimaw Books\\
\define@key{glslink}{theHvalue}{\def\@glsxtr@theHvalue{#1}}
% \end{macrocode}
%
+%\begin{macro}{\ifglsxtr@hyperoutside}
+%\changes{1.21}{2017-11-03}{new}
+% Define a \gloskey[glslink]{hyperoutside} key to determine whether
+% \cs{hyperlink} should be outside \cs{glstextformat}.
+% \begin{macrocode}
+\define@boolkey{glslink}[glsxtr@]{hyperoutside}[true]{}
+\glsxtr@hyperoutsidetrue
+% \end{macrocode}
+%
+%\end{macro}
+%
+%\begin{macro}{\glsxtrinithyperoutside}
+%\changes{1.21}{2017-11-03}{new}
+%Set the default if the \gloskey[glslink]{hyperoutside} is omitted.
+% \begin{macrocode}
+\newcommand*{\glsxtrinithyperoutside}{%
+ \glsifattribute{\glslabel}{hyperoutside}{false}%
+ {%
+ \glsxtr@hyperoutsidefalse
+ }%
+ {%
+ \glsxtr@hyperoutsidetrue
+ }%
+}
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\@gls@link}
%\changes{1.14}{2017-04-18}{added redefinition}
@@ -3479,6 +3867,11 @@ Dickimaw Books\\
% \begin{macrocode}
\glsxtrinitwrgloss
% \end{macrocode}
+% Initialise whether \cs{hyperlink} should be outside \cs{glstextformat}
+% (new to v1.21).
+% \begin{macrocode}
+ \glsxtrinithyperoutside
+% \end{macrocode}
% As the original definition. Note that the default link options may
% override \cs{glsxtrinitwrgloss}.
% \begin{macrocode}
@@ -3501,6 +3894,26 @@ Dickimaw Books\\
}%
\@gls@setsort{\glslabel}%
% \end{macrocode}
+% Check \catattr{textformat} attribute (new to v1.21).
+% \begin{macrocode}
+ \glshasattribute{\glslabel}{textformat}%
+ {%
+ \edef\@glsxtr@attrval{\glsgetattribute{\glslabel}{textformat}}%
+ \ifcsdef{\@glsxtr@attrval}%
+ {%
+ \letcs{\@glsxtr@textformat}{\@glsxtr@attrval}%
+ }%
+ {%
+ \GlossariesExtraWarning{Unknown control sequence name
+ `\@glsxtr@attrval' supplied in textformat attribute
+ for entry `\glslabel'. Reverting to default \string\glstextformat}%
+ \let\@glsxtr@textformat\glstextformat
+ }%
+ }%
+ {%
+ \let\@glsxtr@textformat\glstextformat
+ }%
+% \end{macrocode}
% Do write if it should occur before the link text:
% \begin{macrocode}
\ifglsxtrinitwrglossbefore
@@ -3510,9 +3923,17 @@ Dickimaw Books\\
% Do the link text:
% \begin{macrocode}
\ifKV@glslink@hyper
- \@glslink{\glolinkprefix\glslabel}{\glstextformat{#3}}%
+ \ifglsxtr@hyperoutside
+ \@glslink{\glolinkprefix\glslabel}{\@glsxtr@textformat{#3}}%
+ \else
+ \@glsxtr@textformat{\@glslink{\glolinkprefix\glslabel}{#3}}%
+ \fi
\else
- \glsdonohyperlink{\glolinkprefix\glslabel}{\glstextformat{#3}}%
+ \ifglsxtr@hyperoutside
+ \glsdonohyperlink{\glolinkprefix\glslabel}{\@glsxtr@textformat{#3}}%
+ \else
+ \@glsxtr@textformat{\glsdonohyperlink{\glolinkprefix\glslabel}{#3}}%
+ \fi
\fi
% \end{macrocode}
% Do write if it should occur after the link text:
@@ -3541,27 +3962,31 @@ Dickimaw Books\\
%
%\begin{macro}{\glsadd}
%\changes{1.08}{2016-12-13}{added \cs{@glsxtr@record}}
-%Redefine to include \cs{@glsxtr@record}
+%Redefine to include \cs{@glsxtr@record} and suppress in headings
% \begin{macrocode}
\renewrobustcmd*{\glsadd}[2][]{%
- \@gls@adjustmode
- \@glsxtr@record{#1}{#2}{glossadd}%
- \glsdoifexists{#2}%
+ \glsxtrifinmark
+ {}%
{%
- \let\@glsnumberformat\@glsxtr@defaultnumberformat
- \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}%
- \def\@glsxtr@thevalue{}%
- \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
- \setkeys{glossadd}{#1}%
- \ifdefempty{\@glsxtr@thevalue}%
- {%
- \@gls@saveentrycounter
- }%
+ \@gls@adjustmode
+ \@glsxtr@record{#1}{#2}{glossadd}%
+ \glsdoifexists{#2}%
{%
- \let\theglsentrycounter\@glsxtr@thevalue
- \def\theHglsentrycounter{\@glsxtr@theHvalue}%
+ \let\@glsnumberformat\@glsxtr@defaultnumberformat
+ \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}%
+ \def\@glsxtr@thevalue{}%
+ \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
+ \setkeys{glossadd}{#1}%
+ \ifdefempty{\@glsxtr@thevalue}%
+ {%
+ \@gls@saveentrycounter
+ }%
+ {%
+ \let\theglsentrycounter\@glsxtr@thevalue
+ \def\theHglsentrycounter{\@glsxtr@theHvalue}%
+ }%
+ \@@do@wrglossary{#2}%
}%
- \@@do@wrglossary{#2}%
}%
}
% \end{macrocode}
@@ -4724,9 +5149,11 @@ Dickimaw Books\\
%
%\begin{macro}{\@glsxtrsetaliasnoindex}
%\changes{1.12}{2017-02-03}{new}
+%\changes{1.21}{2017-11-03}{changed to use \cs{glsxtrifhasfield} instead of
+%\cs{ifglshasfield}}
% \begin{macrocode}
\newcommand*{\@glsxtrsetaliasnoindex}{%
- \ifglshasfield{alias}{\glslabel}%
+ \glsxtrifhasfield{alias}{\glslabel}%
{%
\let\glsxtrindexaliased\@glsxtrindexaliased
\glsxtrsetaliasnoindex
@@ -4914,6 +5341,41 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtr@org@dohyperlink}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\let\glsxtr@org@dohyperlink\glsdohyperlink
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsnavhyperlink}
+%\changes{1.21}{2017-11-03}{patched}
+%Now that \cs{glsdohyperlink} (used by \cs{@glslink}) references
+%\cs{glslabel} it's necessary to patch \cs{glsnavhyperlink} to
+%avoid using it (since \cs{glslabel} won't be defined). This means
+%temporarily redefining \cs{glsdohyperlink} to its original
+%definition.
+%
+%This command is provided by \sty{glossary-hypernav} so it may not
+%exist.
+% \begin{macrocode}
+\ifdef\glsnavhyperlink
+{
+ \renewcommand*{\glsnavhyperlink}[3][\@glo@type]{%
+ \edef\gls@grplabel{#2}\protected@edef\@gls@grptitle{#3}%
+% \end{macrocode}
+%Scope:
+% \begin{macrocode}
+ {%
+ \let\glsdohyperlink\glsxtr@org@dohyperlink
+ \@glslink{\glsnavhyperlinkname{#1}{#2}}{#3}%
+ }%
+ }%
+}
+{}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\glsdohyperlink}
% Unpleasant complications can occur if the \gloskey{text} or
% \gloskey{first} key etc contains \cs{gls}, particularly if there
@@ -5000,34 +5462,50 @@ Dickimaw Books\\
% 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.
+%\changes{1.21}{2017-11-03}{added check for existence}
% \begin{macrocode}
\renewrobustcmd*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{%
- \def\@glo@label{#2}%
- {\edef\glslabel{#2}%
- \@glslink{\glolinkprefix\glslabel}{#1}}%
+ \glsdoifexists{#2}%
+ {%
+ \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}
+%\changes{1.21}{2017-11-03}{changed to use \cs{def} rather than \cs{let}}
% Redefine in case we have an old version of \styfmt{glossaries}.
+%This now uses \cs{def} rather than \cs{let} to allow for
+%redefinitions of \cs{glsdonohyperlink}.
% \begin{macrocode}
-\ifundef\glsdonohyperlink
-{%
- \renewcommand{\glsdisablehyper}{%
- \KV@glslink@hyperfalse
- \let\@glslink\glsdonohyperlink
- \let\@glstarget\@secondoftwo
- }
+\renewcommand{\glsdisablehyper}{%
+ \KV@glslink@hyperfalse
+ \def\@glslink{\glsdonohyperlink}%
+ \let\@glstarget\@secondoftwo
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsenablehyper}
+%\changes{1.21}{2017-11-03}{changed to use \cs{def} rather than \cs{let}}
+%This now uses \cs{def} rather than \cs{let} to allow for
+%redefinitions of \cs{glsdohypertarget} and \cs{glsdohyperlink}.
+% \begin{macrocode}
+\renewcommand{\glsenablehyper}{%
+ \KV@glslink@hypertrue
+ \def\@glslink{\glsdohyperlink}%
+ \def\@glstarget{\glsdohypertarget}%
}
-{}
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\glsdonohyperlink}
% This command was only introduced in \styfmt{glossaries} v4.20, so it may
-% not be defined. For older \styfmt{glossaries} versions, this won't be
+% not be defined (therefore use \cs{def}). For older \styfmt{glossaries} versions, this won't be
% used if \sty{hyperref} hasn't been loaded, which means the
% indexing will still take place. The generated text is scoped.
%\changes{0.5.4}{2015-12-15}{added}
@@ -5036,16 +5514,19 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@glslink}
% Reset \cs{@glslink} with patched versions:
+%\changes{1.21}{2017-11-03}{changed \cs{let} to \cs{def}}
% \begin{macrocode}
\ifcsundef{hyperlink}%
{%
- \let\@glslink\glsdonohyperlink
+ \def\@glslink{\glsdonohyperlink}
}%
{%
- \let\@glslink\glsdohyperlink
+ \def\@glslink{\glsdohyperlink}
}
% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\glsxtrprotectlinks}
%\changes{0.5.4}{2015-12-15}{new}
@@ -5930,7 +6411,7 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\@@cgls@}
+%\begin{macro}{\@@cglspl@}
% \begin{macrocode}
\def\@@cglspl@#1#2[#3]{%
\glsxtrifcounttrigger{#2}%
@@ -6709,189 +7190,209 @@ Dickimaw Books\\
% This should be empty for the usual behaviour (all glossaries
% need processing with an indexing application) or a comma-separated
% list of glossary labels indicating those glossaries that should be
-% processed with an indexing application.
+% processed with an indexing application. The optional argument
+% version shouldn't be used with \pkgopt{record}.
%\begin{macro}{\makeglossaries}
%\changes{1.0}{2016-01-24}{new}
% \begin{macrocode}
\renewcommand*{\makeglossaries}[1][]{%
- \ifblank{#1}%
- {\@glsxtr@org@makeglossaries}%
- {%
- \edef\@glsxtr@reg@glosslist{#1}%
- \ifundef{\glswrite}{\newwrite\glswrite}{}%
- \protected@write\@auxout{}{\string\providecommand
- \string\@glsorder[1]{}}
- \protected@write\@auxout{}{\string\providecommand
- \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]{}}%
+ \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only
+ \PackageError{glossaries-extra}{\string\makeglossaries\space
+ not permitted\MessageBreak with record=only package option}%
+ {You may only use \string\makeglossaries\space with
+ record=off or record=alsoindex options}%
+ \else
+ \ifblank{#1}%
+ {\@glsxtr@org@makeglossaries}%
+ {%
+ \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
+ \PackageError{glossaries-extra}{\string\makeglossaries[#1]\space
+ not permitted\MessageBreak with record=alsoindex package option}%
+ {You may only use the hybrid \string\makeglossaries[...]\space with
+ record=off option}%
+ \else
+ \edef\@glsxtr@reg@glosslist{#1}%
+ \ifundef{\glswrite}{\newwrite\glswrite}{}%
+ \protected@write\@auxout{}{\string\providecommand
+ \string\@glsorder[1]{}}
+ \protected@write\@auxout{}{\string\providecommand
+ \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.
% \begin{macrocode}
- \@for\@glo@type:=#1\do{%
- \ifdefempty{\@glo@type}{}{\@makeglossary{\@glo@type}}%
- }%
+ \@for\@glo@type:=#1\do{%
+ \ifdefempty{\@glo@type}{}{\@makeglossary{\@glo@type}}%
+ }%
% \end{macrocode}
% New glossaries must be created before \cs{makeglossaries}:
% \begin{macrocode}
- \renewcommand*\newglossary[4][]{%
- \PackageError{glossaries}{New glossaries
- must be created before \string\makeglossaries}{You need
- to move \string\makeglossaries\space after all your
- \string\newglossary\space commands}}%
+ \renewcommand*\newglossary[4][]{%
+ \PackageError{glossaries}{New glossaries
+ must be created before \string\makeglossaries}{You need
+ to move \string\makeglossaries\space after all your
+ \string\newglossary\space commands}}%
% \end{macrocode}
% Any subsequence instances of this command should have no effect
% \begin{macrocode}
- \let\@makeglossary\relax
- \let\makeglossary\relax
- \renewcommand\makeglossaries[1][]{}%
+ \let\@makeglossary\relax
+ \let\makeglossary\relax
+ \renewcommand\makeglossaries[1][]{}%
% \end{macrocode}
% Disable all commands that have no effect after \cs{makeglossaries}
% \begin{macrocode}
- \@disable@onlypremakeg
+ \@disable@onlypremakeg
% \end{macrocode}
% Allow \gloskey{see} key:
% \begin{macrocode}
- \let\gls@checkseeallowed\relax
+ \let\gls@checkseeallowed\relax
% \end{macrocode}
-%Adjust \cs{@do@seeglossary}
+%Adjust \cs{@do@seeglossary}. This needs to check for the entries
+%existence.
% \begin{macrocode}
- \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{}}%
+ \renewcommand*{\@do@seeglossary}[2]{%
+ \glsdoifexists{##1}%
+ {%
+ \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}}%
+ {%
+ \@@glsxtrwrglossmark
+ \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}%
- }%
+ \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
- \def\warn@noprintglossary{%
- \GlossariesWarningNoLine{No \string\printglossary\space
- or \string\printglossaries\space
- found.^^J(Remove \string\makeglossaries\space if you don't want
- any glossaries.)^^JThis document will not have a glossary}%
- }%
+ \let\warn@nomakeglossaries\relax
+ \def\warn@noprintglossary{%
+ \GlossariesWarningNoLine{No \string\printglossary\space
+ or \string\printglossaries\space
+ found.^^J(Remove \string\makeglossaries\space if you don't want
+ 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)}%
- }%
- }%
+ \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]{%
- \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
- {\@glsxtr@idx@displaynumberlist{##1}}%
- {\@glsxtr@noidx@displaynumberlist{##1}}%
- }%
+ \renewcommand*{\glsdisplaynumberlist}[1]{%
+ \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
+ {\@glsxtr@idx@displaynumberlist{##1}}%
+ {\@glsxtr@noidx@displaynumberlist{##1}}%
+ }%
% \end{macrocode}
% Adjust entry list:
% \begin{macrocode}
- \renewcommand*{\glsentrynumberlist}[1]{%
- \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
- {\@glsxtr@idx@entrynumberlist{##1}}%
- {\@glsxtr@noidx@entrynumberlist{##1}}%
- }%
+ \renewcommand*{\glsentrynumberlist}[1]{%
+ \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
+ {\@glsxtr@idx@entrynumberlist{##1}}%
+ {\@glsxtr@noidx@entrynumberlist{##1}}%
+ }%
% \end{macrocode}
% Adjust number list loop
% \begin{macrocode}
- \renewcommand*{\glsnumberlistloop}[2]{%
- \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
- {%
- \PackageError{glossaries-extra}{\string\glsnumberlistloop\space
- not available for glossary `##1'}{}%
- }%
- {\@glsxtr@noidx@numberlistloop{##1}{##2}}%
- }%
+ \renewcommand*{\glsnumberlistloop}[2]{%
+ \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
+ {%
+ \PackageError{glossaries-extra}{\string\glsnumberlistloop\space
+ not available for glossary `##1'}{}%
+ }%
+ {\@glsxtr@noidx@numberlistloop{##1}{##2}}%
+ }%
% \end{macrocode}
% Only sanitize sort for normal indexing glossaries.
% \begin{macrocode}
- \renewcommand*{\glsprestandardsort}[3]{%
- \expandafter\DTLifinlist\expandafter{##2}{\@glsxtr@reg@glosslist}%
- {%
- \glsdosanitizesort
- }%
- {%
- \ifglssanitizesort
- \@gls@noidx@sanitizesort
- \else
- \@gls@noidx@nosanitizesort
- \fi
- }%
- }%
+ \renewcommand*{\glsprestandardsort}[3]{%
+ \expandafter\DTLifinlist\expandafter{##2}{\@glsxtr@reg@glosslist}%
+ {%
+ \glsdosanitizesort
+ }%
+ {%
+ \ifglssanitizesort
+ \@gls@noidx@sanitizesort
+ \else
+ \@gls@noidx@nosanitizesort
+ \fi
+ }%
+ }%
% \end{macrocode}
% Unlike \cs{makenoidxglossaries} we can't automatically set
% sanitizesort=false. All entries must be defined in the preamble.
% \begin{macrocode}
- \renewcommand*\new@glossaryentry[2]{%
- \PackageError{glossaries-extra}{Glossary entries must be defined
- in the preamble\MessageBreak when you use the optional argument
- of \string\makeglossaries}{Either move your definitions to the
- preamble or don't use the optional argument of
- \string\makeglossaries}%
- }%
+ \renewcommand*\new@glossaryentry[2]{%
+ \PackageError{glossaries-extra}{Glossary entries must be defined
+ in the preamble\MessageBreak when you use the optional argument
+ of \string\makeglossaries}{Either move your definitions to the
+ preamble or don't use the optional argument of
+ \string\makeglossaries}%
+ }%
% \end{macrocode}
% Only activate sort key for glossaries that aren't listed in
% \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}{%
+ \let\@glo@assign@sortkey\@glsxtr@mixed@assign@sortkey
+ \renewcommand*{\@printgloss@setsort}{%
% \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}%
- }%
+ \expandafter\@glsxtr@gettype\expandafter,\@glsxtr@printglossopts,%
+ type=\glsdefaulttype,\@end@glsxtr@gettype
+ \def\@glo@sorttype{\@glo@default@sorttype}%
+ }%
% \end{macrocode}
% Check \pkgopt{automake} setting:
% \begin{macrocode}
- \ifglsautomake
- \renewcommand*{\@gls@doautomake}{%
- \@for\@gls@type:=\@glsxtr@reg@glosslist\do{%
- \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}%
- }%
- }%
- \fi
+ \ifglsautomake
+ \renewcommand*{\@gls@doautomake}{%
+ \@for\@gls@type:=\@glsxtr@reg@glosslist\do{%
+ \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}%
+ }%
+ }%
+ \fi
% \end{macrocode}
% Check the sort setting (\sty{glossaries} v4.30 onwards):
% \begin{macrocode}
- \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}%
- }%
+ \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}%
+ \fi
+ }%
+ \fi
}
% \end{macrocode}
%\end{macro}
@@ -7723,8 +8224,13 @@ Dickimaw Books\\
%enforces a .glstex extension to avoid conflict.
% \begin{macrocode}
\newcommand*{\glsxtrresourcefile}[2][]{%
+% \end{macrocode}
+%The \pkgopt{record} option can't be set after this command.
+%\changes{1.21}{2017-11-03}{now disables record key}
+% \begin{macrocode}
+ \disable@keys{glossaries-extra.sty}{record}%
\glsxtr@writefields
- \protected@write\@auxout{}{\string\glsxtr@resource{#1}{#2}}%
+ \protected@write\@auxout{\glsxtrresourceinit}{\string\glsxtr@resource{#1}{#2}}%
\let\@glsxtr@org@see@noindex\@gls@see@noindex
\let\@gls@see@noindex\relax
\IfFileExists{#2.glstex}%
@@ -7966,6 +8472,51 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrglossentry}
+%Users may prefer to have entries displayed throughout the document
+%rather than gathered together in a list. This command emulates
+%the way \cs{glossentry} behaves (without the style formatting
+%commands like \cs{item}). This needs to define \cs{currentglossary}
+%to the current glossary type (normally set at the start of
+%\cs{@printglossary}) and needs to define \cs{glscurrententrylabel}
+%to the entry's label (normally set before \cs{glossentry} and
+%\cs{subglossentry}). This needs some protection in case it's used
+%in a section heading.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrglossentry}[1]{%
+ \glsxtrtitleorpdforheading
+ {\@glsxtrglossentry{#1}}%
+ {\glsentryname{#1}}%
+ {\glsxtrheadname{#1}}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@glsxtrglossentry}
+%\changes{1.21}{2017-11-03}{new}
+%Another test is needed in case \cs{@glsxtrglossentry} has been
+%written to the table of contents.
+% \begin{macrocode}
+\newrobustcmd*{\@glsxtrglossentry}[1]{%
+ \glsxtrtitleorpdforheading
+ {%
+ \glsdoifexists{#1}%
+ {%
+ \begingroup
+ \edef\glscurrententrylabel{\glsdetoklabel{#1}}%
+ \edef\currentglossary{\glsentrytype{\glscurrententrylabel}}%
+ \ifglshasparent{#1}%
+ {\glssubentryitem{#1}}%
+ {\glsentryitem{#1}}%
+ \glstarget{#1}{\glossentryname{#1}}%
+ \endgroup
+ }%
+ }%
+ {\glsentryname{#1}}%
+ {\glsxtrheadname{#1}}%
+}
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\printunsrtglossary}
%\changes{1.08}{2016-12-13}{new}
@@ -8047,10 +8598,32 @@ Dickimaw Books\\
:\expandafter=\csname glolist@\@glo@type\endcsname\do{%
\ifdefempty{\glscurrententrylabel}
{}%
- {\eappto\@glsxtr@doglossary{%
- \noexpand\@printunsrt@glossary@handler{\glscurrententrylabel}}}%
+ {%
+% \end{macrocode}
+%Provide a hook (for example to measure width).
+% \begin{macrocode}
+ \let\glsxtr@process\@firstofone
+ \let\printunsrtglossaryskipentry
+ \@glsxtr@printunsrtglossaryskipentry
+ \printunsrtglossaryentryprocesshook{\glscurrententrylabel}%
+% \end{macrocode}
+%Don't check group for child entries.
+% \begin{macrocode}
+ \glsxtr@process
+ {%
+ \ifglshasparent{\glscurrententrylabel}{}%
+ {%
+ \@glsxtr@checkgroup\glscurrententrylabel
+ \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter
+ {\@glsxtr@groupheading}%
+ }%
+ \eappto\@glsxtr@doglossary{%
+ \noexpand\@printunsrt@glossary@handler{\glscurrententrylabel}}%
+ }%
+ }%
}%
\appto\@glsxtr@doglossary{\end{theglossary}}%
+ \printunsrtglossarypredoglossary
\@glsxtr@doglossary
}%
\glossarypostamble
@@ -8058,6 +8631,39 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\printunsrtglossaryentryprocesshook}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\printunsrtglossaryentryprocesshook}[1]{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\printunsrtglossaryentryprocesshook}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\printunsrtglossaryskipentry}{%
+ \PackageError{glossaries-extra}{\string\printunsrtglossaryskipentry\space
+can only be used within \string\printunsrtglossaryentryprocesshook}{}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\printunsrtglossaryentryprocesshook}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@glsxtr@printunsrtglossaryskipentry}{%
+ \let\glsxtr@process\@gobble
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\printunsrtglossarypredoglossary}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\printunsrtglossarypredoglossary}{}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@printunsrt@glossary@handler}
%\changes{1.16}{2017-06-15}{new}
% \begin{macrocode}
@@ -8077,6 +8683,20 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtriflabelinlist}
+%\changes{1.21}{2017-11-03}{new}
+%Might be useful for the handler to check if an entry label
+%or category label is contained in a list, so provide a user-level
+%version of \cs{@gls@ifinlist} which ensures the label and list are
+%fully expanded.
+% \begin{macrocode}
+\newrobustcmd*{\glsxtriflabelinlist}[4]{%
+ \protected@edef\@glsxtr@doiflabelinlist{\noexpand\@gls@ifinlist{#1}{#2}}%
+ \@glsxtr@doiflabelinlist{#3}{#4}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\print@op@unsrtglossaryunit}
%\changes{1.12}{2017-02-03}{new}
% \begin{macrocode}
@@ -8149,75 +8769,669 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrgroupfield}
+%\app{bib2gls} provides a supplementary field labelled
+%\texttt{secondarygroup} for secondary glossaries, so
+%provide a way of switching to that field. (The \gloskey{group}
+%key still needs checking. There's no associated key with the
+%internal field).
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrgroupfield}{group}
+% \end{macrocode}
+%\end{macro}
+%
+%The \env{tabular}-like glossary styles cause quite a problem
+%with the iterative approach. In particular for the group skip.
+%To compensate for this, the groups are now determined while
+%\cs{@glsxtr@doglossary} is being constructed rather than in the
+%handler.
+%\begin{macro}{\@glsxtr@checkgroup}
+%\changes{1.21}{2017-11-03}{new}
+%The argument is the entry's label. (This block of code was
+%formerly in \cs{@glsxtr@noidx@do}.) Now that this is no longer
+%within a tabular environment, the global definitions aren't needed.
+%The result is now stored in \cs{@glsxtr@groupheading}, which will
+%be empty if no heading is required.
+% \begin{macrocode}
+\newcommand*{\@glsxtr@checkgroup}[1]{%
+ \def\@glsxtr@groupheading{}%
+ \key@ifundefined{glossentry}{group}%
+ {%
+ \letcs{\@gls@sort}{glo@\glsdetoklabel{#1}@sort}%
+ \expandafter\glo@grabfirst\@gls@sort{}{}\@nil
+ }%
+ {%
+% \end{macrocode}
+%\changes{1.16}{2017-06-15}{use \cs{csuse} instead of \cs{csname}}
+% \begin{macrocode}
+ \protected@edef\@glo@thislettergrp{%
+ \csuse{glo@\glsdetoklabel{#1}@\glsxtrgroupfield}}%
+ }%
+ \ifdefequal{\@glo@thislettergrp}{\@gls@currentlettergroup}%
+ {}%
+ {%
+ \ifdefempty{\@gls@currentlettergroup}{}%
+ {\def\@glsxtr@groupheading{\glsgroupskip}}%
+ \eappto\@glsxtr@groupheading{%
+ \noexpand\glsgroupheading{\expandonce\@glo@thislettergrp}%
+ }%
+ }%
+ \let\@gls@currentlettergroup\@glo@thislettergrp
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@glsxtr@noidx@do}
%\changes{1.11}{2017-01-19}{new}
%Minor modification of \cs{@gls@noidx@do} to check for location
-%field if present.
+%field if present, but also need to check for the \gloskey{group}
+%field.
% \begin{macrocode}
\newcommand{\@glsxtr@noidx@do}[1]{%
- \global\letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}%
- \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@location}%
- \ifglshasparent{#1}%
+ \ifglsentryexists{#1}%
{%
- \gls@level=\csuse{glo@\glsdetoklabel{#1}@level}\relax
- \ifdefvoid{\@gls@location}%
+ \global\letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}%
+ \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@location}%
+ \ifglshasparent{#1}%
{%
- \ifdefvoid{\@gls@loclist}%
+ \gls@level=\csuse{glo@\glsdetoklabel{#1}@level}\relax
+ \ifdefvoid{\@gls@location}%
{%
- \subglossentry{\gls@level}{#1}{}%
- }%
- {%
- \subglossentry{\gls@level}{#1}%
+ \ifdefvoid{\@gls@loclist}%
+ {%
+ \subglossentry{\gls@level}{#1}{}%
+ }%
{%
- \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}%
+ \subglossentry{\gls@level}{#1}%
+ {%
+ \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}%
+ }%
}%
}%
- }%
- {%
- \subglossentry{\gls@level}{#1}{\glossaryentrynumbers{\@gls@location}}%
- }%
- }%
- {%
- \key@ifundefined{glossentry}{group}%
- {%
- \letcs{\@gls@sort}{glo@\glsdetoklabel{#1}@sort}%
- \expandafter\glo@grabfirst\@gls@sort{}{}\@nil
+ {%
+ \subglossentry{\gls@level}{#1}{\glossaryentrynumbers{\@gls@location}}%
+ }%
}%
{%
% \end{macrocode}
-%\changes{1.16}{2017-06-15}{use \cs{csuse} instead of \cs{csname}}
+%\changes{1.21}{2017-11-03}{removed code dealing with the group}
% \begin{macrocode}
- \protected@xdef\@glo@thislettergrp{%
- \csuse{glo@\glsdetoklabel{#1}@group}}%
- }%
- \ifdefequal{\@glo@thislettergrp}{\@gls@currentlettergroup}%
- {}%
- {%
- \ifdefempty{\@gls@currentlettergroup}{}{\glsgroupskip}%
- \expandafter\glsgroupheading\expandafter
- {\@glo@thislettergrp}%
- }%
- \global\let\@gls@currentlettergroup\@glo@thislettergrp
- \ifdefvoid{\@gls@location}%
- {%
- \ifdefvoid{\@gls@loclist}
+ \ifdefvoid{\@gls@location}%
{%
- \glossentry{#1}{}%
+ \ifdefvoid{\@gls@loclist}
+ {%
+ \glossentry{#1}{}%
+ }%
+ {%
+ \glossentry{#1}%
+ {%
+ \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}%
+ }%
+ }%
}%
{%
\glossentry{#1}%
{%
- \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}%
+ \glossaryentrynumbers{\@gls@location}%
}%
}%
}%
- {%
- \glossentry{#1}%
- {%
- \glossaryentrynumbers{\@gls@location}%
- }%
- }%
}%
+ {}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\subsection{Support for \app{bib2gls}}
+%Some useful commands for \app{bib2gls} users.
+%\begin{macro}{\glshex}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glshex}{\string\u}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrresourceinit}
+%\changes{1.21}{2017-11-03}{new}
+%Code used during the protected write operation.
+% \begin{macrocode}
+\newcommand*{\glsxtrresourceinit}{}
+% \end{macrocode}
+%\end{macro}
+%
+%Provide a way to conveniently define commands that behaves like
+%\cs{gls} with a label prefix.
+%
+%It's possible that the user might want minor variations
+%with the same prefix but different default options, so
+%use a counter to provide unique inner commands.
+%\begin{macro}{\glsxtrnewgls}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcount\@glsxtrnewgls@inner
+% \end{macrocode}
+%\end{macro}
+%(The default options supplied in \meta{options} below
+%could possibly be used to form the inner control sequence name to
+%help make it unique, but it might feasibly contain
+%\gloskey[glslink]{thevalue} where the value might contain commands.)
+%
+%\begin{macro}{\@glsxtrnewgls}
+%\changes{1.21}{2017-11-03}{new}
+%\begin{definition}
+%\cs{glsxtrnewgls}\oarg{options}\marg{prefix}\marg{cs}\marg{inner cs
+%name}
+%\end{definition}
+%
+% \begin{macrocode}
+\newcommand*{\@glsxtrnewgls}[4]{%
+ \ifdef{#3}%
+ {%
+ \PackageError{glossaries-extra}{Command \string#3\space already
+defined}{}%
+ }%
+ {%
+ \ifcsdef{@#4like@#2}%
+ {%
+ \advance\@glsxtrnewgls@inner by \@ne
+ \def\@glsxtrnewgls@innercsname{@#4like\number\@glsxtrnewgls@inner @#2}%
+ }%
+ {\def\@glsxtrnewgls@innercsname{@#4like@#2}}%
+ \expandafter\newrobustcmd\expandafter*\expandafter
+ #3\expandafter{\expandafter\@gls@hyp@opt\csname\@glsxtrnewgls@innercsname\endcsname}%
+ \ifstrempty{#1}%
+ {%
+ \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{%
+ \new@ifnextchar[%
+ {\csname @#4@\endcsname{##1}{#2##2}}%
+ {\csname @#4@\endcsname{##1}{#2##2}[]}%
+ }%
+ }%
+ {%
+ \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{%
+ \new@ifnextchar[%
+ {\csname @#4@\endcsname{#1,##1}{#2##2}}%
+ {\csname @#4@\endcsname{#1,##1}{#2##2}[]}%
+ }%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrnewgls}
+%\begin{definition}
+%\cs{glsxtrnewgls}\oarg{options}\marg{prefix}\marg{cs}
+%\end{definition}
+%The first argument prepends to the options and the second argument is the prefix.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsxtrnewgls}[3][]{%
+ \@glsxtrnewgls{#1}{#2}{#3}{gls}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrnewglslike}
+%Provide a way to conveniently define commands that behave like
+%\cs{gls}, \cs{glspl}, \cs{Gls} and \cs{Glspl} with a label prefix.
+%The first argument prepends to the options and the second argument is the prefix.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsxtrnewglslike}[6][]{%
+ \@glsxtrnewgls{#1}{#2}{#3}{gls}%
+ \@glsxtrnewgls{#1}{#2}{#4}{glspl}%
+ \@glsxtrnewgls{#1}{#2}{#5}{Gls}%
+ \@glsxtrnewgls{#1}{#2}{#6}{Glspl}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrnewGLSlike}
+%Provide a way to conveniently define commands that behave like
+%\cs{GLS}, \cs{GLSpl} with a label prefix.
+%The first argument prepends to the options and the second argument is the prefix.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsxtrnewGLSlike}[4][]{%
+ \@glsxtrnewgls{#1}{#2}{#3}{GLS}%
+ \@glsxtrnewgls{#1}{#2}{#4}{GLSpl}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrnewrgls}
+%As \cs{glsxtrnewgls} but for \cs{rgls}.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsxtrnewrgls}[3][]{%
+ \@glsxtrnewgls{#1}{#2}{#3}{rgls}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrnewrglslike}
+%As \cs{glsxtrnewglslike} but for \cs{rgls} etc.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsxtrnewrglslike}[6][]{%
+ \@glsxtrnewgls{#1}{#2}{#3}{rgls}%
+ \@glsxtrnewgls{#1}{#2}{#4}{rglspl}%
+ \@glsxtrnewgls{#1}{#2}{#5}{rGls}%
+ \@glsxtrnewgls{#1}{#2}{#6}{rGlspl}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrnewrGLSlike}
+%\changes{1.21}{2017-11-03}{new}
+%As \cs{glsxtrnewGLSlike} but for \cs{rGLS} etc.
+% \begin{macrocode}
+\newrobustcmd*{\glsxtrnewrGLSlike}[4][]{%
+ \@glsxtrnewgls{#1}{#2}{#3}{rGLS}%
+ \@glsxtrnewgls{#1}{#2}{#4}{rGLSpl}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%Provide easy access to record count fields.
+%\begin{macro}{\GlsXtrTotalRecordCount}
+%\changes{1.21}{2017-11-03}{new}
+%Access total record count. This is designed to
+%be expandable. The argument is the label.
+% \begin{macrocode}
+\newcommand*{\GlsXtrTotalRecordCount}[1]{%
+ \ifcsdef{glo@\glsdetoklabel{#1}@recordcount}%
+ {\csname glo@\glsdetoklabel{#1}@recordcount\endcsname}%
+ {0}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\GlsXtrRecordCount}
+%\changes{1.21}{2017-11-03}{new}
+%Access record count for a particular counter. The first argument is the label.
+%The second argument is the counter name.
+% \begin{macrocode}
+\newcommand*{\GlsXtrRecordCount}[2]{%
+ \ifcsdef{glo@\glsdetoklabel{#1}@recordcount.#2}%
+ {\csname glo@\glsdetoklabel{#1}@recordcount.#2\endcsname}%
+ {0}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\GlsXtrLocationRecordCount}
+%\changes{1.21}{2017-11-03}{new}
+%Access record count for a particular counter and location.
+%The first argument is the label.
+%The second argument is the counter name.
+%The third argument is the location.
+%This command shouldn't be used if the location doesn't fully
+%expand unless \cs{glsxtrdetoklocation} can be set to something
+%sensible.
+% \begin{macrocode}
+\newcommand*{\GlsXtrLocationRecordCount}[3]{%
+ \ifcsdef{glo@\glsdetoklabel{#1}@recordcount.#2.\glsxtrdetoklocation{#3}}%
+ {\csname glo@\glsdetoklabel{#1}@recordcount.#2.\glsxtrdetoklocation{#3}\endcsname}%
+ {0}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrdetoklocation}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrdetoklocation}[1]{#1}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrenablerecordcount}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrenablerecordcount}{%
+ \renewcommand*{\gls}{\rgls}%
+ \renewcommand*{\Gls}{\rGls}%
+ \renewcommand*{\glspl}{\rglspl}%
+ \renewcommand*{\Glspl}{\rGlspl}%
+ \renewcommand*{\GLS}{\rGLS}%
+ \renewcommand*{\GLSpl}{\rGLSpl}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrrecordtriggervalue}
+%\changes{1.21}{2017-11-03}{new}
+%The value used by the record trigger test.
+%The argument is the entry's label.
+% \begin{macrocode}
+\newcommand*{\glsxtrrecordtriggervalue}[1]{%
+ \GlsXtrTotalRecordCount{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\GlsXtrSetRecordCountAttribute}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\GlsXtrSetRecordCountAttribute}[2]{%
+ \@for\@glsxtr@cat:=#1\do
+ {%
+ \ifdefempty{\@glsxtr@cat}{}%
+ {%
+ \glssetcategoryattribute{\@glsxtr@cat}{recordcount}{#2}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrifrecordtrigger}
+%\begin{definition}
+%\cs{glsxtrifrecordtrigger}\marg{label}\marg{trigger format}\marg{normal}
+%\end{definition}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrifrecordtrigger}[3]{%
+ \glshasattribute{#1}{recordcount}%
+ {%
+ \ifnum\glsxtrrecordtriggervalue{#1}>\glsgetattribute{#1}{recordcount}\relax
+ #3%
+ \else
+ #2%
+ \fi
+ }%
+ {#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtr@rglstrigger@record}
+%\changes{1.21}{2017-11-03}{new}
+%Still need a record to ensure that \app{bib2gls} selects the entry.
+% \begin{macrocode}
+\newcommand*{\@glsxtr@rglstrigger@record}[3]{%
+ \edef\glslabel{\glsdetoklabel{#2}}%
+ \let\@gls@link@label\glslabel
+ \def\@glsxtr@thevalue{}%
+ \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
+ \def\@glsnumberformat{glstriggerrecordformat}%
+ \edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}%
+ \edef\glstype{\csname glo@\glslabel @type\endcsname}%
+ \def\@glsxtr@thevalue{}%
+ \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
+ \glsxtrinitwrgloss
+ \setkeys{glslink}{#1}%
+ \glslinkpostsetkeys
+ \ifdefempty{\@glsxtr@thevalue}%
+ {%
+ \@gls@saveentrycounter
+ }%
+ {%
+ \let\theglsentrycounter\@glsxtr@thevalue
+ \def\theHglsentrycounter{\@glsxtr@theHvalue}%
+ }%
+ \ifglsxtrinitwrglossbefore
+ \@do@wrglossary{#2}%
+ \fi
+ #3%
+ \ifglsxtrinitwrglossbefore
+ \else
+ \@do@wrglossary{#2}%
+ \fi
+ \ifKV@glslink@local
+ \glslocalunset{#2}%
+ \else
+ \glsunset{#2}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glstriggerrecordformat}
+%\changes{1.21}{2017-11-03}{new}
+%Typically won't be used as it should be recognised as a special
+%type of ignored location by \app{bib2gls}.
+% \begin{macrocode}
+\newcommand*{\glstriggerrecordformat}[1]{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rgls}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\rgls}{\@gls@hyp@opt\@rgls}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@rgls}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@rgls}[2][]{%
+ \new@ifnextchar[{\@rgls@{#1}{#2}}{\@rgls@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@rgls@}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\def\@rgls@#1#2[#3]{%
+ \glsxtrifrecordtrigger{#2}%
+ {%
+ \@glsxtr@rglstrigger@record{#1}{#2}{\rglsformat{#2}{#3}}%
+ }%
+ {%
+ \@gls@{#1}{#2}[#3]%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rglspl}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\rglspl}{\@gls@hyp@opt\@rglspl}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@rglspl}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@rglspl}[2][]{%
+ \new@ifnextchar[{\@rglspl@{#1}{#2}}{\@rglspl@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@rglspl@}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\def\@rglspl@#1#2[#3]{%
+ \glsxtrifrecordtrigger{#2}%
+ {%
+ \@glsxtr@rglstrigger@record{#1}{#2}{\rglsplformat{#2}{#3}}%
+ }%
+ {%
+ \@glspl@{#1}{#2}[#3]%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rGls}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\rGls}{\@gls@hyp@opt\@rGls}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@rGls}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@rGls}[2][]{%
+ \new@ifnextchar[{\@rGls@{#1}{#2}}{\@rGls@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@rGls@}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\def\@rGls@#1#2[#3]{%
+ \glsxtrifrecordtrigger{#2}%
+ {%
+ \@glsxtr@rglstrigger@record{#1}{#2}{\rGlsformat{#2}{#3}}%
+ }%
+ {%
+ \@Gls@{#1}{#2}[#3]%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rGlspl}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\rGlspl}{\@gls@hyp@opt\@rGlspl}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@rGlspl}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@rGlspl}[2][]{%
+ \new@ifnextchar[{\@rGlspl@{#1}{#2}}{\@rGlspl@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@rGlspl@}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\def\@rGlspl@#1#2[#3]{%
+ \glsxtrifrecordtrigger{#2}%
+ {%
+ \@glsxtr@rglstrigger@record{#1}{#2}{\rGlsplformat{#2}{#3}}%
+ }%
+ {%
+ \@Glspl@{#1}{#2}[#3]%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rGLS}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\rGLS}{\@gls@hyp@opt\@rGLS}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@rGLS}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@rGLS}[2][]{%
+ \new@ifnextchar[{\@rGLS@{#1}{#2}}{\@rGLS@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@rGLS@}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\def\@rGLS@#1#2[#3]{%
+ \glsxtrifrecordtrigger{#2}%
+ {%
+ \@glsxtr@rglstrigger@record{#1}{#2}{\rGLSformat{#2}{#3}}%
+ }%
+ {%
+ \@GLS@{#1}{#2}[#3]%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rGLSpl}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\rGLSpl}{\@gls@hyp@opt\@rGLSpl}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@rGLSpl}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\@rGLSpl}[2][]{%
+ \new@ifnextchar[{\@rGLSpl@{#1}{#2}}{\@rGLSpl@{#1}{#2}[]}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@rGLSpl@}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\def\@rGLSpl@#1#2[#3]{%
+ \glsxtrifrecordtrigger{#2}%
+ {%
+ \@glsxtr@rglstrigger@record{#1}{#2}{\rGLSplformat{#2}{#3}}%
+ }%
+ {%
+ \@GLSpl@{#1}{#2}[#3]%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rglsformat}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\rglsformat}[2]{%
+ \glsifregular{#1}
+ {\glsentryfirst{#1}}%
+ {\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}}#2%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rglsplformat}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\rglsplformat}[2]{%
+ \glsifregular{#1}
+ {\glsentryfirstplural{#1}}%
+ {\ifglshaslong{#1}{\glsentrylongplural{#1}}{\glsentryfirstplural{#1}}}#2%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rGlsformat}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\rGlsformat}[2]{%
+ \glsifregular{#1}
+ {\Glsentryfirst{#1}}%
+ {\ifglshaslong{#1}{\Glsentrylong{#1}}{\Glsentryfirst{#1}}}#2%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rGlsplformat}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\rGlsplformat}[2]{%
+ \glsifregular{#1}
+ {\Glsentryfirstplural{#1}}%
+ {\ifglshaslong{#1}{\Glsentrylongplural{#1}}{\Glsentryfirstplural{#1}}}#2%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rGLSformat}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\rGLSformat}[2]{%
+ \expandafter\mfirstucMakeUppercase\expandafter{\rglsformat{#1}{#2}}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rGLSplformat}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\rGLSplformat}[2]{%
+ \expandafter\mfirstucMakeUppercase\expandafter{\rglsplformat{#1}{#2}}%
}
% \end{macrocode}
%\end{macro}
@@ -11829,6 +13043,24 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsuseabbrvfont}
+% Provide a way to use the abbreviation font for a given category
+% for arbitrary text.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsuseabbrvfont}[2]{{\glssetabbrvfmt{#2}\glsabbrvfont{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsuselongfont}
+% Provide a way to use the long font for a given category
+% for arbitrary text.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsuselongfont}[2]{{\glssetabbrvfmt{#2}\glslongfont{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
%\changes{0.5.2}{2015-12-08}{removed \cs{glsxtrabbrvfmt}}
%\begin{macro}{\glsxtrgenabbrvfmt}
% Similar to \cs{glsgenacfmt}, but for abbreviations.
@@ -13003,6 +14235,73 @@ Dickimaw Books\\
% \end{macrocode}
%\end{abbrvstyle}
%
+%\begin{abbrvstyle}{nolong-short}
+% Similar to \abbrstyle{short-nolong} but the full form shows the
+% long form followed by the short form in parentheses.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newabbreviationstyle{nolong-short}%
+{%
+ \GlsXtrUseAbbrStyleSetup{short-nolong}%
+}%
+{%
+ \GlsXtrUseAbbrStyleFmts{short-nolong}%
+% \end{macrocode}
+% The inline full form displays the long form followed by the
+% short form in parentheses.
+% \begin{macrocode}
+ \renewcommand*{\glsxtrinlinefullformat}[2]{%
+ \protect\glsfirstlongfont{\glsaccesslong{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}%
+ }%
+ \renewcommand*{\glsxtrinlinefullplformat}[2]{%
+ \protect\glsfirstlongfont{\glsaccesslongpl{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}%
+ }%
+ \renewcommand*{\Glsxtrinlinefullformat}[2]{%
+ \protect\glsfirstlongfont{\glsaccesslong{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvfont{\Glsaccessshort{##1}}}%
+ }%
+ \renewcommand*{\Glsxtrinlinefullplformat}[2]{%
+ \protect\glsfirstlongfont{\glsaccesslongpl{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvfont{\Glsaccessshortpl{##1}}}%
+ }%
+}
+% \end{macrocode}
+%\end{abbrvstyle}
+%
+%\begin{abbrvstyle}{nolong-short-noreg}
+%\changes{1.21}{2017-11-03}{new}
+% Like \abbrstyle{nolong-short} but doesn't set the \catattr{regular} attribute.
+% \begin{macrocode}
+\newabbreviationstyle{nolong-short-noreg}%
+{%
+ \GlsXtrUseAbbrStyleSetup{nolong-short}%
+% \end{macrocode}
+% Unset the \catattr{regular} attribute if it has been set.
+% \begin{macrocode}
+ \renewcommand*{\GlsXtrPostNewAbbreviation}{%
+ \glshasattribute{\the\glslabeltok}{regular}%
+ {%
+ \glssetattribute{\the\glslabeltok}{regular}{false}%
+ }%
+ {}%
+ }%
+}%
+{%
+ \GlsXtrUseAbbrStyleFmts{nolong-short}%
+}
+% \end{macrocode}
+%\end{abbrvstyle}
+%
%\begin{abbrvstyle}{long-desc}
% Provide a style that only displays the long form,
% but the long and short form can be displayed with the \qt{full}
@@ -13469,17 +14768,20 @@ Dickimaw Books\\
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
\glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}%
}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{corrected first letter uppercasing}
+% \begin{macrocode}
\renewcommand*{\Glsxtrinlinefullformat}[2]{%
- \protect\glsfirstabbrvscfont{\glsaccessshort{##1}%
+ \protect\glsfirstabbrvscfont{\Glsaccessshort{##1}%
\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslong{##1}}}%
+ \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}%
}%
\renewcommand*{\Glsxtrinlinefullplformat}[2]{%
- \protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}%
+ \protect\glsfirstabbrvscfont{\Glsaccessshortpl{##1}%
\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}}}%
+ \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}%
}%
% \end{macrocode}
% The first use full form only displays the short form, but it
@@ -13590,6 +14892,47 @@ Dickimaw Books\\
% \end{macrocode}
%\end{abbrvstyle}
%
+%\begin{abbrvstyle}{nolong-short-sc}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newabbreviationstyle{nolong-short-sc}%
+{%
+ \GlsXtrUseAbbrStyleSetup{short-sc-nolong}%
+}%
+{%
+ \GlsXtrUseAbbrStyleFmts{short-sc-nolong}%
+% \end{macrocode}
+% The inline full form displays the long form followed by the
+% short form in parentheses.
+% \begin{macrocode}
+ \renewcommand*{\glsxtrinlinefullformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}%
+ }%
+ \renewcommand*{\glsxtrinlinefullplformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}%
+ }%
+ \renewcommand*{\Glsxtrinlinefullformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}%
+ }%
+ \renewcommand*{\Glsxtrinlinefullplformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}%
+ }%
+}
+% \end{macrocode}
+%\end{abbrvstyle}
+%
%\begin{abbrvstyle}{long-noshort-sc}
%\changes{1.04}{2016-05-02}{renamed from \qt{long-sc}}
% The smallcaps font will only be used if
@@ -14274,17 +15617,20 @@ Dickimaw Books\\
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
\glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}%
}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{corrected first letter uppercasing}
+% \begin{macrocode}
\renewcommand*{\Glsxtrinlinefullformat}[2]{%
- \protect\glsfirstabbrvsmfont{\glsaccessshort{##1}%
+ \protect\glsfirstabbrvsmfont{\Glsaccessshort{##1}%
\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslong{##1}}}%
+ \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}%
}%
\renewcommand*{\Glsxtrinlinefullplformat}[2]{%
- \protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}%
+ \protect\glsfirstabbrvsmfont{\Glsaccessshortpl{##1}%
\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}}}%
+ \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}%
}%
% \end{macrocode}
% The first use full form only displays the short form, but it
@@ -14309,6 +15655,7 @@ Dickimaw Books\\
}
% \end{macrocode}
%\end{abbrvstyle}
+%
%\begin{abbrvstyle}{short-sm-nolong}
%\changes{1.04}{2016-05-02}{new}
% \begin{macrocode}
@@ -14392,6 +15739,47 @@ Dickimaw Books\\
% \end{macrocode}
%\end{abbrvstyle}
%
+%\begin{abbrvstyle}{nolong-short-sm}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newabbreviationstyle{nolong-short-sm}%
+{%
+ \GlsXtrUseAbbrStyleSetup{short-sm-nolong}%
+}%
+{%
+ \GlsXtrUseAbbrStyleFmts{short-sm-nolong}%
+% \end{macrocode}
+% The inline full form displays the long form followed by the
+% short form in parentheses.
+% \begin{macrocode}
+ \renewcommand*{\glsxtrinlinefullformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}%
+ }%
+ \renewcommand*{\glsxtrinlinefullplformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}%
+ }%
+ \renewcommand*{\Glsxtrinlinefullformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}%
+ }%
+ \renewcommand*{\Glsxtrinlinefullplformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}%
+ }%
+}
+% \end{macrocode}
+%\end{abbrvstyle}
+%
%\begin{abbrvstyle}{long-noshort-sm}
%\changes{0.5}{2015-12-07}{new}
%\changes{1.04}{2016-05-02}{renamed from \qt{long-sm}}
@@ -15273,17 +16661,20 @@ Dickimaw Books\\
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
\glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}%
}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
\renewcommand*{\Glsxtrinlinefullformat}[2]{%
- \protect\glsfirstabbrvemfont{\glsaccessshort{##1}%
+ \protect\glsfirstabbrvemfont{\Glsaccessshort{##1}%
\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslong{##1}}}%
+ \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}%
}%
\renewcommand*{\Glsxtrinlinefullplformat}[2]{%
- \protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}%
+ \protect\glsfirstabbrvemfont{\Glsaccessshortpl{##1}%
\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- \glsxtrparen{\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}}}%
+ \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}%
}%
% \end{macrocode}
% The first use full form only displays the short form, but it
@@ -15308,6 +16699,7 @@ Dickimaw Books\\
}
% \end{macrocode}
%\end{abbrvstyle}
+%
%\begin{abbrvstyle}{short-em-nolong}
%\changes{1.04}{2016-05-02}{new}
% \begin{macrocode}
@@ -15391,6 +16783,47 @@ Dickimaw Books\\
% \end{macrocode}
%\end{abbrvstyle}
%
+%\begin{abbrvstyle}{nolong-short-em}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newabbreviationstyle{nolong-short-em}%
+{%
+ \GlsXtrUseAbbrStyleSetup{short-em-nolong}%
+}%
+{%
+ \GlsXtrUseAbbrStyleFmts{short-em-nolong}%
+% \end{macrocode}
+% The inline full form displays the long form followed by the
+% short form in parentheses.
+% \begin{macrocode}
+ \renewcommand*{\glsxtrinlinefullformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}%
+ }%
+ \renewcommand*{\glsxtrinlinefullplformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}%
+ }%
+ \renewcommand*{\Glsxtrinlinefullformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}%
+ }%
+ \renewcommand*{\Glsxtrinlinefullplformat}[2]{%
+ \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}%
+ \ifglsxtrinsertinside##2\fi}%
+ \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
+ \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}%
+ }%
+}
+% \end{macrocode}
+%\end{abbrvstyle}
+%
%\begin{abbrvstyle}{long-noshort-em}
%\changes{0.5}{2015-12-07}{new}
%\changes{1.04}{2016-05-02}{renamed from \qt{long-em}}
@@ -17665,6 +19098,24 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%Also do this for \cs{@starttoc}
+%\begin{macro}{\@starttoc}
+% Save original definition:
+% \begin{macrocode}
+\let\@glsxtr@org@@starttoc\@starttoc
+% \end{macrocode}
+% Redefine:
+% \begin{macrocode}
+\renewcommand*{\@starttoc}[1]{%
+ \glsxtrmarkhook
+ \@glsxtrinmark
+ \@glsxtr@org@@starttoc{#1}%
+ \@glsxtrnotinmark
+ \glsxtrrestoremarkhook
+}
+% \end{macrocode}
+%\end{macro}
+%
% If this causes a problem provide a simple way of switching back to
% the original definitions:
%\begin{macro}{\glsxtrRevertMarks}
@@ -17672,6 +19123,7 @@ Dickimaw Books\\
\newcommand*{\glsxtrRevertMarks}{%
\let\markright\@glsxtr@org@markright
\let\markboth\@glsxtr@org@markboth
+ \let\@starttoc\@glsxtr@org@@starttoc
}
% \end{macrocode}
%\end{macro}
@@ -17701,6 +19153,18 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrtitleorpdforheading}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\ifdef\texorpdfstring
+{
+ \newcommand*{\glsxtrtitleorpdforheading}[3]{\texorpdfstring{#1}{#2}}
+}
+{
+ \newcommand*{\glsxtrtitleorpdforheading}[3]{#1}
+}
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\glsxtrmarkhook}
% Hook used in new definition of \cs{markboth} and \cs{markright}
@@ -17711,10 +19175,13 @@ Dickimaw Books\\
% Save current definitions:
% \begin{macrocode}
\let\@glsxtr@org@MakeUppercase\MakeUppercase
+ \let\@glsxtr@org@glsxtrtitleorpdforheading\glsxtrtitleorpdforheading
\let\@glsxtr@org@glsxtrtitleshort\glsxtrtitleshort
\let\@glsxtr@org@glsxtrtitleshortpl\glsxtrtitleshortpl
\let\@glsxtr@org@Glsxtrtitleshort\Glsxtrtitleshort
\let\@glsxtr@org@Glsxtrtitleshortpl\Glsxtrtitleshortpl
+ \let\@glsxtr@org@glsxtrtitlename\glsxtrtitlename
+ \let\@glsxtr@org@Glsxtrtitlename\Glsxtrtitlename
\let\@glsxtr@org@glsxtrtitletext\glsxtrtitletext
\let\@glsxtr@org@Glsxtrtitletext\Glsxtrtitletext
\let\@glsxtr@org@glsxtrtitleplural\glsxtrtitleplural
@@ -17736,10 +19203,13 @@ Dickimaw Books\\
% \begin{macrocode}
\let\glsxtrifinmark\@firstoftwo
\let\MakeUppercase\MakeTextUppercase
+ \let\glsxtrtitleorpdforheading\@thirdofthree
\let\glsxtrtitleshort\glsxtrheadshort
\let\glsxtrtitleshortpl\glsxtrheadshortpl
\let\Glsxtrtitleshort\Glsxtrheadshort
\let\Glsxtrtitleshortpl\Glsxtrheadshortpl
+ \let\glsxtrtitlename\glsxtrheadname
+ \let\Glsxtrtitlename\Glsxtrheadname
\let\glsxtrtitletext\glsxtrheadtext
\let\Glsxtrtitletext\Glsxtrheadtext
\let\glsxtrtitleplural\glsxtrheadplural
@@ -17771,10 +19241,13 @@ Dickimaw Books\\
\newcommand*{\glsxtrrestoremarkhook}{%
\let\glsxtrifinmark\@secondoftwo
\let\MakeUppercase\@glsxtr@org@MakeUppercase
+ \let\glsxtrtitleorpdforheading\@glsxtr@org@glsxtrtitleorpdforheading
\let\glsxtrtitleshort\@glsxtr@org@glsxtrtitleshort
\let\glsxtrtitleshortpl\@glsxtr@org@glsxtrtitleshortpl
\let\Glsxtrtitleshort\@glsxtr@org@Glsxtrtitleshort
\let\Glsxtrtitleshortpl\@glsxtr@org@Glsxtrtitleshortpl
+ \let\glsxtrtitlename\@glsxtr@org@glsxtrtitlename
+ \let\Glsxtrtitlename\@glsxtr@org@Glsxtrtitlename
\let\glsxtrtitletext\@glsxtr@org@glsxtrtitletext
\let\Glsxtrtitletext\@glsxtr@org@Glsxtrtitletext
\let\glsxtrtitleplural\@glsxtr@org@glsxtrtitleplural
@@ -17923,6 +19396,66 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrheadname}
+% As above but for the \gloskey{name} value.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrheadname}[1]{%
+ \protect\NoCaseChange
+ {%
+ \glsifattribute{#1}{headuc}{true}%
+ {%
+ \GLSname[noindex,hyper=false]{#1}[]%
+ }%
+ {%
+ \glsname[noindex,hyper=false]{#1}[]%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrtitlename}
+% Command to display \gloskey{name} value in section title and
+% table of contents.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsxtrtitlename}[1]{%
+ \glsname[noindex,hyper=false]{#1}[]%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Glsxtrheadname}
+% First letter converted to upper case
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\Glsxtrheadname}[1]{%
+ \protect\NoCaseChange
+ {%
+ \glsifattribute{#1}{headuc}{true}%
+ {%
+ \GLSname[noindex,hyper=false]{#1}[]%
+ }%
+ {%
+ \Glsname[noindex,hyper=false]{#1}[]%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Glsxtrtitlename}
+% Command to display \gloskey{name} value in section title and
+% table of contents with the first letter changed to upper case.
+% \begin{macrocode}
+%\changes{1.21}{2017-11-03}{new}
+\newrobustcmd*{\Glsxtrtitlename}[1]{%
+ \Glsname[noindex,hyper=false]{#1}[]%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\glsxtrheadtext}
% As above but for the \gloskey{text} value.
%\changes{0.5.1}{2015-12-07}{now uses headuc attribute}
@@ -18497,6 +20030,45 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsfmtname}
+%As above but for the \gloskey{name} value.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\ifdef\texorpdfstring
+{
+ \newcommand*{\glsfmtname}[1]{%
+ \texorpdfstring
+ {\glsxtrtitlename{#1}}%
+ {\glsentryname{#1}}%
+ }
+}
+{
+ \newcommand*{\glsfmtname}[1]{%
+ \glsxtrtitlename{#1}}
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Glsfmtname}
+%First letter converted to upper case.
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\ifdef\texorpdfstring
+{
+ \newcommand*{\Glsfmtname}[1]{%
+ \texorpdfstring
+ {\Glsxtrtitlename{#1}}%
+ {\glsentryname{#1}}%
+ }
+}
+{
+ \newcommand*{\Glsfmtname}[1]{%
+ \Glsxtrtitlename{#1}}
+}
+% \end{macrocode}
+%\end{macro}
+%
+%
%\begin{macro}{\glsfmttext}
%As above but for the \gloskey{text} value.
%\changes{0.5}{2015-12-07}{new}
@@ -18874,7 +20446,7 @@ Dickimaw Books\\
% First identify package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra-stylemods}[2017/09/11 v1.20 (NLCT)]
+\ProvidesPackage{glossaries-extra-stylemods}[2017/11/03 v1.21 (NLCT)]
% \end{macrocode}
% Provide package options to automatically load required predefined
% styles. The simplest method is to just test for the existence of
@@ -18887,13 +20459,37 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{option}{all}
+%\changes{1.21}{2017-11-03}{new}
+%Provide all known styles.
+% \begin{macrocode}
+\DeclareOption{all}{%
+ \appto\@glsxtr@loadstyles{%
+ \RequirePackage{glossary-inline}%
+ \RequirePackage{glossary-list}%
+ \RequirePackage{glossary-tree}%
+ \RequirePackage{glossary-mcols}%
+ \RequirePackage{glossary-long}%
+ \RequirePackage{glossary-longragged}%
+ \RequirePackage{glossary-longbooktabs}%
+ \RequirePackage{glossary-super}%
+ \RequirePackage{glossary-superragged}%
+ \RequirePackage{glossary-bookindex}%
+ }
+}
+% \end{macrocode}
+%\end{option}
+%
% \begin{macrocode}
\DeclareOption*{%
\IfFileExists{glossary-\CurrentOption.sty}
{\eappto\@glsxtr@loadstyles{%
- \noexpand\RequirePackage{glossary-\CurrentOption}}}%
- {\PackageError{glossaries-extra-styles}%
- {Unknown option `\CurrentOption'}{}}
+ \noexpand\RequirePackage{glossary-\CurrentOption}}%
+ }%
+ {%
+ \PackageError{glossaries-extra-styles}%
+ {Unknown option `\CurrentOption'}{}%
+ }%
}
% \end{macrocode}
% Process the package options:
@@ -18905,11 +20501,17 @@ Dickimaw Books\\
% \begin{macrocode}
\@glsxtr@loadstyles
% \end{macrocode}
-% Adjust the styles that the post description hook added, but only
-% for styles that have already been defined. All the tree styles in
-% \sty{glossary-tree} include the post description hook, so they
-% don't require adjustment. Similarly for \sty{glossary-mcols} which
-% builds on the tree styles.
+% Adjust the styles so that they all have the post description hook.
+% Also, instead of having a hard-coded \cs{space} before the
+% location, use:
+%\begin{macro}{\glsxtrprelocation}
+%\changes{1.21}{2017-11-03}{new}
+%This uses \cs{providecommand} as the same command is also
+%provided by \sty{glossary-bookindex}.
+% \begin{macrocode}
+\providecommand*{\glsxtrprelocation}{\space}
+% \end{macrocode}
+%\end{macro}
%
%In case we have an old version of \sty{glossaries}:
%\begin{macro}{\renewglossarystyle}
@@ -18928,7 +20530,7 @@ Dickimaw Books\\
%
%\section{List-Like Styles}
% The list-like styles mostly already use the post description hook.
-% Only the \glostyle{listdotted} style need modifying.
+% Only the \glostyle{listdotted} style need modifying to add this.
% \begin{macrocode}
\ifdef{\@glsstyle@listdotted}
{%
@@ -18948,15 +20550,192 @@ Dickimaw Books\\
\glossentrydesc{##2}\glspostdescription}%
}
}
-{}
+{%
+% \end{macrocode}
+% Assume the style isn't required if it hasn't already been defined.
+% \begin{macrocode}
+}
% \end{macrocode}
% The \glostyle{sublistdotted} style doesn't display the description
% for top-level entries. Sub-level entries use the
% \glostyle{listdottedstyle}.
%
+%The other list styles would be easier to adapt if the space
+%before the number list wasn't hard coded.
+%\changes{1.21}{2017-11-03}{modified list to remove hard coded \cs{space}}
+% \begin{macrocode}
+\ifdef{\@glsstyle@list}
+{%
+% \end{macrocode}
+%\begin{macro}{\glslistprelocation}
+%\changes{1.21}{2017-11-03}{new}
+%Space before number list for top-level entries.
+% \begin{macrocode}
+ \newcommand{\glslistprelocation}{\glsxtrprelocation}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glslistchildprelocation}
+%\changes{1.21}{2017-11-03}{new}
+%Space before number list for child entries.
+% \begin{macrocode}
+ \newcommand{\glslistchildprelocation}{\glslistprelocation}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glslistchildpostlocation}
+%\changes{1.21}{2017-11-03}{new}
+%Full stop after number list.
+% \begin{macrocode}
+ \newcommand{\glslistchildpostlocation}{.}
+% \end{macrocode}
+%\end{macro}
+%Redefine \glostyle{list} to use these commands.
+% \begin{macrocode}
+ \renewglossarystyle{list}{%
+ \renewenvironment{theglossary}%
+ {\begin{description}}{\end{description}}%
+ \renewcommand*{\glossaryheader}{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand*{\glossentry}[2]{%
+ \item[\glsentryitem{##1}%
+ \glstarget{##1}{\glossentryname{##1}}]
+ \glossentrydesc{##1}\glspostdescription\glslistprelocation ##2}%
+ \renewcommand*{\subglossentry}[3]{%
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}\space
+ \glossentrydesc{##2}\glspostdescription
+ \glslistchildprelocation ##3\glslistchildpostlocation}%
+ \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}%
+ }
+}
+{}
+% \end{macrocode}
+%Similarly for \glostyle{altlist}. Since it requires \glostyle{list},
+%the new commands should have been defined above.
+% \begin{macrocode}
+\ifdef{\@glsstyle@altlist}
+{%
+ \renewglossarystyle{altlist}{%
+ \setglossarystyle{list}%
+ \renewcommand*{\glossentry}[2]{%
+ \item[\glsentryitem{##1}%
+ \glstarget{##1}{\glossentryname{##1}}]%
+ \mbox{}\par\nobreak\@afterheading
+ \glossentrydesc{##1}\glspostdescription\glslistprelocation ##2}%
+ \renewcommand{\subglossentry}[3]{%
+ \par
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription
+ \glslistchildprelocation ##3}%
+ }
+}
+{}
+% \end{macrocode}
+%Redefine \glostyle{listgroup} so that it discourages a break
+%after group headings.
+%\changes{1.21}{2017-11-03}{redefined \texttt{listgroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@listgroup}
+{%
+ \renewglossarystyle{listgroup}{%
+ \setglossarystyle{list}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item[\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}]%
+ \mbox{}\par\nobreak\@afterheading
+ }%
+ }
+}
+{}
+% \end{macrocode}
+%Similarly for \glostyle{listhypergroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{listhypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@listhypergroup}
+{%
+ \renewglossarystyle{listhypergroup}{%
+ \setglossarystyle{list}%
+ \renewcommand*{\glossaryheader}{%
+ \glslistnavigationitem{\glsnavigation}}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item[\glslistgroupheaderfmt
+ {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}]%
+ \mbox{}\par\nobreak\@afterheading
+ }%
+ }
+}
+{}
+% \end{macrocode}
+%Similarly for \glostyle{altlistgroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{altlistgroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@altlistgroup}
+{%
+ \renewglossarystyle{altlistgroup}{%
+ \setglossarystyle{altlist}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item[\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}]%
+ \mbox{}\par\nobreak\@afterheading
+ }%
+ }
+}
+{}
+% \end{macrocode}
+%Similarly for \glostyle{altlisthypergroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{altlisthypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@altlisthypergroup}
+{%
+ \renewglossarystyle{altlisthypergroup}{%
+ \setglossarystyle{altlist}%
+ \renewcommand*{\glossaryheader}{%
+ \glslistnavigationitem{\glsnavigation}}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item[\glslistgroupheaderfmt
+ {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}]%
+ \mbox{}\par\nobreak\@afterheading
+ }%
+ }
+}
+{}
+% \end{macrocode}
+%
%\section{Longtable Styles}
-% The three and four column styles require adjustment, but not the
-% two column styles.
+% The three and four column styles require adjustment to add the
+% post-description hook. The two column styles need the hard-coded
+% \cs{space} changed to \cs{glsxtrprelocation}.
+% \begin{macrocode}
+\ifcsdef{@glsstyle@long}
+{%
+ \renewglossarystyle{long}{%
+ \renewenvironment{theglossary}%
+ {\begin{longtable}{lp{\glsdescwidth}}}%
+ {\end{longtable}}%
+ \renewcommand*{\glossaryheader}{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription
+ \glsxtrprelocation ##2\tabularnewline
+ }%
+ \renewcommand{\subglossentry}[3]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription
+ \glsxtrprelocation ##3\tabularnewline
+ }%
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{ & \tabularnewline}%
+ \fi
+ }
+}
+{}
+% \end{macrocode}
+%Three column style:
% \begin{macrocode}
\ifcsdef{@glsstyle@long3col}
{%
@@ -18976,8 +20755,16 @@ Dickimaw Books\\
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription &
##3\tabularnewline
}%
- \renewcommand*{\glsgroupskip}{%
- \ifglsnogroupskip\else & &\tabularnewline\fi}%
+% \end{macrocode}
+%Conditional needs to be outside of \cs{glsgroupskip} otherwise it
+%can cause \qt{Incomplete \cs{iftrue}} errors.
+%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}}
+% \begin{macrocode}
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{& &\tabularnewline}%
+ \fi
}
}
{}
@@ -19004,8 +20791,14 @@ Dickimaw Books\\
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription &
\glossentrysymbol{##2} & ##3\tabularnewline
}%
- \renewcommand*{\glsgroupskip}{%
- \ifglsnogroupskip\else & & &\tabularnewline\fi}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}}
+% \begin{macrocode}
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{& & &\tabularnewline}%
+ \fi
}
}
{}
@@ -19016,8 +20809,42 @@ Dickimaw Books\\
%that package.
%
%\section{Long Ragged Styles}
-% The three and four column styles require adjustment, but not the
-% two column styles.
+% The three and four column styles require adjustment for the
+% post-description hook, but not the two column styles. However, the
+% two-column styles need to have \cs{space} replaced with
+% \cs{glsxtrprelocation}.
+% \begin{macrocode}
+\ifcsdef{@glsstyle@longragged}
+{%
+ \renewglossarystyle{longragged}{%
+ \renewenvironment{theglossary}%
+ {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}}}%
+ {\end{longtable}}%
+ \renewcommand*{\glossaryheader}{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2%
+ \tabularnewline
+ }%
+ \renewcommand{\subglossentry}[3]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2}%
+ \glspostdescription\glsxtrprelocation ##3%
+ \tabularnewline
+ }%
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{ & \tabularnewline}%
+ \fi
+ }
+}
+{}
+% \end{macrocode}
+%Three and four column styles don't use \cs{glsxtrprelocation} since the number
+%list is in its own column.
% \begin{macrocode}
\ifcsdef{@glsstyle@longragged3col}
{%
@@ -19038,8 +20865,14 @@ Dickimaw Books\\
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription &
##3\tabularnewline
}%
- \renewcommand*{\glsgroupskip}{%
- \ifglsnogroupskip\else & &\tabularnewline\fi}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}}
+% \begin{macrocode}
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{& &\tabularnewline}%
+ \fi
}
}
{}
@@ -19066,16 +20899,54 @@ Dickimaw Books\\
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription &
\glossentrysymbol{##2} & ##3\tabularnewline
}%
- \renewcommand*{\glsgroupskip}{%
- \ifglsnogroupskip\else & & &\tabularnewline\fi}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}}
+% \begin{macrocode}
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{& & &\tabularnewline}%
+ \fi
}
}
{}
% \end{macrocode}
%
%\section{Supertabular Styles}
-% The three and four column styles require adjustment, but not the
-% two column styles.
+% The three and four column styles require adjustment to add the
+% post-description hook. The two column styles need the hard-coded
+% \cs{space} changed to \cs{glsxtrprelocation}.
+% \begin{macrocode}
+\ifcsdef{@glsstyle@super}
+{%
+ \renewglossarystyle{super}{%
+ \renewenvironment{theglossary}%
+ {\tablehead{}\tabletail{}%
+ \begin{supertabular}{lp{\glsdescwidth}}}%
+ {\end{supertabular}}%
+ \renewcommand*{\glossaryheader}{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription
+ \glsxtrprelocation ##2\tabularnewline
+ }%
+ \renewcommand{\subglossentry}[3]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription
+ \glsxtrprelocation ##3\tabularnewline
+ }%
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{& \tabularnewline}%
+ \fi
+ }
+}
+{}
+% \end{macrocode}
+%Three column style:
% \begin{macrocode}
\ifcsdef{@glsstyle@super3col}
{%
@@ -19096,8 +20967,14 @@ Dickimaw Books\\
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription &
##3\tabularnewline
}%
- \renewcommand*{\glsgroupskip}{%
- \ifglsnogroupskip\else & &\tabularnewline\fi}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}}
+% \begin{macrocode}
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{ & &\tabularnewline}%
+ \fi
}
}
{}
@@ -19124,16 +21001,56 @@ Dickimaw Books\\
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription &
\glossentrysymbol{##2} & ##3\tabularnewline
}%
- \renewcommand*{\glsgroupskip}{%
- \ifglsnogroupskip\else & & &\tabularnewline\fi}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}}
+% \begin{macrocode}
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{& & &\tabularnewline}%
+ \fi
}
}
{}
% \end{macrocode}
%
%\section{Super Ragged Styles}
-% The three and four column styles require adjustment, but not the
-% two column styles.
+% The three and four column styles require adjustment for the
+% post-description hook, but not the two column styles. However, the
+% two-column styles need to have \cs{space} replaced with
+% \cs{glsxtrprelocation}.
+% \begin{macrocode}
+\ifcsdef{@glsstyle@superragged}
+{%
+ \renewglossarystyle{superragged}{%
+ \renewenvironment{theglossary}%
+ {\tablehead{}\tabletail{}%
+ \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}}%
+ {\end{supertabular}}%
+ \renewcommand*{\glossaryheader}{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2%
+ \tabularnewline
+ }%
+ \renewcommand{\subglossentry}[3]{%
+ &
+ \glssubentryitem{##2}%
+ \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription
+ \glsxtrprelocation ##3%
+ \tabularnewline
+ }%
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{& \tabularnewline}%
+ \fi
+ }
+}
+{}
+% \end{macrocode}
+%Three column style:
% \begin{macrocode}
\ifcsdef{@glsstyle@superragged3col}
{%
@@ -19156,8 +21073,14 @@ Dickimaw Books\\
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription &
##3\tabularnewline
}%
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else &
- &\tabularnewline\fi}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}}
+% \begin{macrocode}
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{ & &\tabularnewline}%
+ \fi
}
}
{}
@@ -19184,8 +21107,14 @@ Dickimaw Books\\
\glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription &
\glossentrysymbol{##2} & ##3\tabularnewline
}%
- \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else & &
- &\tabularnewline\fi}%
+% \end{macrocode}
+%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}}
+% \begin{macrocode}
+ \ifglsnogroupskip
+ \renewcommand*{\glsgroupskip}{}%
+ \else
+ \renewcommand*{\glsgroupskip}{& & &\tabularnewline}%
+ \fi
}
}
{}
@@ -19211,11 +21140,267 @@ Dickimaw Books\\
\space#1\glsxtrpostdescription}
\renewcommand*{\glsinlinesubdescformat}[3]{%
#1\glsxtrpostdescription}
+% \end{macrocode}
+% The default settings don't show the location lists, so there's no
+% adjustment for \cs{glsxtrprelocation}.
+% \begin{macrocode}
}
{}
% \end{macrocode}
%
%\section{Tree Styles}
+% The \glostyle{index} style is redefined so that the space before
+% the number list isn't hard coded.
+%\changes{1.21}{2017-11-03}{modified index to remove hard coded \cs{space}}
+% \begin{macrocode}
+\ifdef{\@glsstyle@index}
+{
+% \end{macrocode}
+%\begin{macro}{\glstreeprelocation}
+%\changes{1.21}{2017-11-03}{new}
+%The space before the number list for top-level entries. This is
+%shared by the other tree styles.
+% \begin{macrocode}
+ \newcommand*{\glstreeprelocation}{\glsxtrprelocation}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glstreechildprelocation}
+%\changes{1.21}{2017-11-03}{new}
+%The space before the number list for child entries. This is
+%shared by the other tree styles.
+% \begin{macrocode}
+ \newcommand*{\glstreechildprelocation}{\glstreeprelocation}
+% \end{macrocode}
+%\end{macro}
+% \begin{macrocode}
+ \renewglossarystyle{index}{%
+ \renewenvironment{theglossary}%
+ {\setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \let\item\glstreeitem
+ \let\subitem\glstreesubitem
+ \let\subsubitem\glstreesubsubitem
+ }%
+ {\par}%
+ \renewcommand*{\glossaryheader}{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand*{\glossentry}[2]{%
+ \item\glsentryitem{##1}%
+ \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}%
+ \ifglshassymbol{##1}{\space(\glossentrysymbol{##1})}{}%
+ \glstreepredesc \glossentrydesc{##1}\glspostdescription
+ \glstreeprelocation ##2%
+ }%
+ \renewcommand{\subglossentry}[3]{%
+ \ifcase##1\relax
+ \item
+ \or
+ \subitem
+ \glssubentryitem{##2}%
+ \else
+ \subsubitem
+ \fi
+ \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}%
+ \ifglshassymbol{##2}{\space(\glossentrysymbol{##2})}{}%
+ \glstreechildpredesc\glossentrydesc{##2}\glspostdescription
+ \glstreechildprelocation ##3%
+ }%
+ \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}%
+ }
+}
+{}
+% \end{macrocode}
+%
+% The \glostyle{indexgroup} style is redefined to discourage a page
+% break after the heading.
+%\changes{1.21}{2017-11-03}{redefined \texttt{indexgroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@indexgroup}
+{%
+ \renewglossarystyle{indexgroup}{%
+ \setglossarystyle{index}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}%
+ \nopagebreak\indexspace
+ \nobreak\@afterheading
+ }%
+ }
+}
+{}
+% \end{macrocode}
+%
+%Similarly for \glostyle{indexhypergroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{indexhypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@indexhypergroup}
+{%
+ \renewglossarystyle{indexhypergroup}{%
+ \setglossarystyle{index}%
+ \renewcommand*{\glossaryheader}{%
+ \item\glstreenavigationfmt{\glsnavigation}%
+ \nobreak\@afterheading\indexspace}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item\glstreegroupheaderfmt
+ {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace
+ \nobreak\@afterheading}%
+ }%
+}
+{}
+% \end{macrocode}
+%
+%Adjust \glostyle{tree} style to remove hard coded space before
+%number list.
+% \begin{macrocode}
+\ifdef{\@glsstyle@tree}
+{%
+ \renewglossarystyle{tree}{%
+ \renewenvironment{theglossary}%
+ {\setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}}%
+ {}%
+ \renewcommand*{\glossaryheader}{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand{\glossentry}[2]{%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}%
+ \ifglshassymbol{##1}{\space(\glossentrysymbol{##1})}{}%
+ \glstreepredesc\glossentrydesc{##1}\glspostdescription
+ \glstreeprelocation##2\par
+ }%
+ \renewcommand{\subglossentry}[3]{%
+ \hangindent##1\glstreeindent\relax
+ \parindent##1\glstreeindent\relax
+ \ifnum##1=1\relax
+ \glssubentryitem{##2}%
+ \fi
+ \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}%
+ \ifglshassymbol{##2}{\space(\glossentrysymbol{##2})}{}%
+ \glstreechildpredesc\glossentrydesc{##2}\glspostdescription
+ \glstreechildprelocation ##3\par
+ }%
+ \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}%
+ }%
+}
+{}
+% \end{macrocode}
+%
+% The \glostyle{treegroup} style is redefined to discourage a page
+% break after the heading.
+%\changes{1.21}{2017-11-03}{redefined \texttt{treegroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@treegroup}
+{%
+ \renewglossarystyle{treegroup}{%
+ \setglossarystyle{tree}%
+ \renewcommand{\glsgroupheading}[1]{\par
+ \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}\par
+ \nopagebreak\indexspace\nobreak\@afterheading}%
+ }
+}
+{}
+% \end{macrocode}
+%
+%Similarly for \glostyle{treehypergroup}
+%\changes{1.21}{2017-11-03}{redefined \texttt{treehypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@treehypergroup}
+{%
+ \renewglossarystyle{treehypergroup}{%
+ \setglossarystyle{tree}%
+ \renewcommand*{\glossaryheader}{%
+ \par\noindent\glstreenavigationfmt{\glsnavigation}\par
+ \nobreak\@afterheading\indexspace}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par\noindent
+ \glstreegroupheaderfmt
+ {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par
+ \nopagebreak\indexspace\nobreak\@afterheading}%
+ }
+}
+{}
+% \end{macrocode}
+%
+%Adjust \glostyle{treenoname} style to remove hard coded space before
+%number list.
+% \begin{macrocode}
+\ifdef{\@glsstyle@treenoname}
+{%
+ \renewglossarystyle{treenoname}{%
+ \renewenvironment{theglossary}%
+ {\setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}}%
+ {}%
+ \renewcommand*{\glossaryheader}{}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand{\glossentry}[2]{%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}%
+ \ifglshassymbol{##1}{\space(\glossentrysymbol{##1})}{}%
+ \glstreepredesc\glossentrydesc{##1}\glspostdescription
+ \glstreeprelocation##2\par
+ }%
+ \renewcommand{\subglossentry}[3]{%
+ \hangindent##1\glstreeindent\relax
+ \parindent##1\glstreeindent\relax
+ \ifnum##1=1\relax
+ \glssubentryitem{##2}%
+ \fi
+ \glstarget{##2}{\strut}%
+ \glossentrydesc{##2}\glspostdescription\glstreechildprelocation##3\par
+ }%
+ \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\indexspace\fi}%
+ }
+}
+{}
+% \end{macrocode}
+%
+% The \glostyle{treenonamegroup} style is redefined to discourage a page
+% break after the heading.
+%\changes{1.21}{2017-11-03}{redefined \texttt{treenonamegroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@treenonamegroup}
+{%
+ \renewglossarystyle{treenonamegroup}{%
+ \setglossarystyle{treenoname}%
+ \renewcommand{\glsgroupheading}[1]{\par
+ \noindent\glstreegroupheaderfmt
+ {\glsgetgrouptitle{##1}}%
+ \nopagebreak\indexspace\nobreak\@afterheading
+ }%
+ }
+}
+{}
+% \end{macrocode}
+%
+%Similarly for \glostyle{treenonamehypergroup}
+%\changes{1.21}{2017-11-03}{redefined \texttt{treenonamehypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@treenonamehypergroup}
+{%
+ \renewglossarystyle{treenonamehypergroup}{%
+ \setglossarystyle{treenoname}%
+ \renewcommand*{\glossaryheader}{%
+ \par\noindent\glstreenavigationfmt{\glsnavigation}\par
+ \nobreak\@afterheading\indexspace}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par\noindent
+ \glstreegroupheaderfmt
+ {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nobreak\@afterheading}%
+ }
+}
+{}
+% \end{macrocode}
+%
% The \glostyle{alttree} style is redefined to make it easier to
% made minor adjustments.
% \begin{macrocode}
@@ -19236,7 +21421,7 @@ Dickimaw Books\\
{%
\let\par\glsxtrAltTreePar
\ifglshassymbol{#1}{(\glossentrysymbol{#1})\space}{}%
- \glossentrydesc{#1}\glspostdescription \space #2\par
+ \glossentrydesc{#1}\glspostdescription\glstreeprelocation #2\par
}%
}
% \end{macrocode}
@@ -19299,6 +21484,17 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\gglssetwidest}
+%\changes{1.21}{2017-11-03}{new}
+% The original \cs{glssetwidest} only uses \cs{def}. This uses
+% \cs{gdef}.
+% \begin{macrocode}
+ \newcommand*{\gglssetwidest}[2][0]{%
+ \csgdef{@glswidestname\romannumeral#1}{#2}%
+ }
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\eglssetwidest}
%\changes{1.05}{2016-06-10}{new}
% The original \cs{glssetwidest} only uses \cs{def}. This uses
@@ -19794,7 +21990,7 @@ Dickimaw Books\\
%\changes{1.05}{2016-06-10}{new}
% Set \cs{hangindent} for top-level entries:
% \begin{macrocode}
-\newcommand*{\glsxtrAltTreeSetHangIndent}{\hangindent\glstreeindent}
+ \newcommand*{\glsxtrAltTreeSetHangIndent}{\hangindent\glstreeindent}
% \end{macrocode}
%\end{macro}
%
@@ -19802,7 +21998,7 @@ Dickimaw Books\\
%\changes{1.05}{2016-06-10}{new}
% Set \cs{hangindent} for sub-entries:
% \begin{macrocode}
-\newcommand*{\glsxtrAltTreeSetSubHangIndent}[1]{\hangindent\glstreeindent}
+ \newcommand*{\glsxtrAltTreeSetSubHangIndent}[1]{\hangindent\glstreeindent}
% \end{macrocode}
%\end{macro}
%
@@ -19866,9 +22062,350 @@ Dickimaw Books\\
}
}%
{%
+}
% \end{macrocode}
-% Assume the style isn't required if it hasn't already been defined.
+%Redefine \glostyle{alttreegroup} so that it discourages a break
+%after group headings.
+%\changes{1.21}{2017-11-03}{redefined \texttt{alttreegroup} to discourage
+%breaks after group headings}
+%Can't use \cs{@afterheading} here as it messes with the first item
+%of the group.
+% \begin{macrocode}
+\ifdef{\@glsstyle@alttreegroup}
+{%
+ \renewglossarystyle{alttreegroup}{%
+ \setglossarystyle{alttree}%
+ \renewcommand{\glsgroupheading}[1]{\par
+ \def\@gls@prevlevel{-1}%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glstreegroupheaderfmt{\glsgetgrouptitle{##1}}%
+ \nopagebreak\indexspace\nopagebreak
+ }%
+ }%
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{alttreehypergroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{alttreehypergroup} to discourage
+%breaks after group headings}
% \begin{macrocode}
+\ifdef{\@glsstyle@alttreehypergroup}
+{%
+ \renewglossarystyle{alttreehypergroup}{%
+ \setglossarystyle{alttree}%
+ \renewcommand*{\glossaryheader}{%
+ \par
+ \def\@gls@prevlevel{-1}%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glstreenavigationfmt{\glsnavigation}\par\indexspace
+ }%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par
+ \def\@gls@prevlevel{-1}%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glstreegroupheaderfmt
+ {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par
+ \nopagebreak\indexspace\nopagebreak
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%
+%\section{Multicolumn Styles}
+%Adjust \glostyle{mcolindexgroup} to discourage page breaks after
+%the group headings.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexgroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcolindexgroup}
+{%
+ \renewglossarystyle{mcolindexgroup}{%
+ \setglossarystyle{mcolindex}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}%
+ \nopagebreak\indexspace\nobreak\@afterheading
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcolindexhypergroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexhypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcolindexhypergroup}
+{%
+ \renewglossarystyle{mcolindexhypergroup}{%
+ \setglossarystyle{mcolindex}%
+ \renewcommand*{\glossaryheader}{%
+ \item\glstreenavigationfmt{\glsnavigation}%
+ \indexspace
+ }%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item\glstreegroupheaderfmt
+ {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nobreak\@afterheading
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcolindexspannav}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexspannav} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcolindexspannav}
+{%
+ \renewglossarystyle{mcolindexspannav}{%
+ \setglossarystyle{index}%
+ \renewenvironment{theglossary}%
+ {%
+ \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}]%
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \let\item\glstreeitem}%
+ {\end{multicols}}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \item\glstreegroupheaderfmt
+ {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nobreak\@afterheading
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcoltreegroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreegroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcoltreegroup}
+{%
+ \renewglossarystyle{mcoltreegroup}{%
+ \setglossarystyle{mcoltree}%
+ \renewcommand{\glsgroupheading}[1]{\par
+ \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}%
+ \nopagebreak\indexspace\nobreak\@afterheading
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcoltreehypergroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreehypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcoltreehypergroup}
+{%
+ \renewglossarystyle{mcoltreehypergroup}{%
+ \setglossarystyle{mcoltree}%
+ \renewcommand*{\glossaryheader}{%
+ \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace
+ }%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par\noindent
+ \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nobreak\@afterheading
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcoltreespannav}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreespannav} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcoltreespannav}
+{%
+ \renewglossarystyle{mcoltreespannav}{%
+ \setglossarystyle{tree}%
+ \renewenvironment{theglossary}%
+ {%
+ \begin{multicols}{\glsmcols}%
+ [\noindent\glstreenavigationfmt{\glsnavigation}]%
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ }%
+ {\end{multicols}}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par\noindent
+ \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nobreak\@afterheading
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcoltreenonamegroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamegroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcoltreenonamegroup}
+{%
+ \renewglossarystyle{mcoltreenonamegroup}{%
+ \setglossarystyle{mcoltreenoname}%
+ \renewcommand{\glsgroupheading}[1]{\par
+ \noindent\glstreegroupheaderfmt{\glsgetgrouptitle{##1}}%
+ \nopagebreak\indexspace\nobreak\@afterheading
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcoltreenonamehypergroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamehypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcoltreenonamehypergroup}
+{%
+ \renewglossarystyle{mcoltreenonamehypergroup}{%
+ \setglossarystyle{mcoltreenoname}%
+ \renewcommand*{\glossaryheader}{%
+ \par\noindent\glstreenavigationfmt{\glsnavigation}\par\indexspace}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par\noindent
+ \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nobreak\@afterheading}%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcoltreenonamespannav}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamespannav} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcoltreenonamespannav}
+{%
+ \renewglossarystyle{mcoltreenonamespannav}{%
+ \setglossarystyle{treenoname}%
+ \renewenvironment{theglossary}%
+ {%
+ \begin{multicols}{\glsmcols}%
+ [\noindent\glstreenavigationfmt{\glsnavigation}]%
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ }%
+ {\end{multicols}}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par\noindent
+ \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nobreak\@afterheading}%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%\glostyle{mcolalttree} needs adjusting so that it uses \cs{glsxtralttreeInit}
+%This doesn't use \verb|\mbox{}\par| which would unbalance the top
+%of the columns.
+%\changes{1.21}{2017-11-03}{adjusted mcolalttree}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcolalttree}
+{%
+ \renewglossarystyle{mcolalttree}{%
+ \setglossarystyle{alttree}%
+ \renewenvironment{theglossary}%
+ {%
+ \glsxtralttreeInit
+ \def\@gls@prevlevel{-1}%
+ \begin{multicols}{\glsmcols}%
+ }%
+ {\par\end{multicols}}%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Redefine \glostyle{mcolalttreegroup} to discourage page breaks
+%after the group headings.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreegroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcolalttreegroup}
+{%
+ \renewglossarystyle{mcolalttreegroup}{%
+ \setglossarystyle{mcolalttree}%
+ \renewcommand{\glsgroupheading}[1]{\par
+ \def\@gls@prevlevel{-1}%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glstreegroupheaderfmt{\glsgetgrouptitle{##1}}%
+ \nopagebreak\indexspace\nopagebreak
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcolalttreehypergroup}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreehypergroup} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcolalttreehypergroup}
+{%
+ \renewglossarystyle{mcolalttreehypergroup}{%
+ \setglossarystyle{mcolalttree}%
+ \renewcommand*{\glossaryheader}{%
+ \par
+ \def\@gls@prevlevel{-1}%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glstreenavigationfmt{\glsnavigation}%
+ \par\indexspace
+ }%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par
+ \def\@gls@prevlevel{-1}%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nopagebreak
+ }%
+ }
+}%
+{%
+}
+% \end{macrocode}
+%Similarly for \glostyle{mcolalttreespannav}.
+%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreespannav} to discourage
+%breaks after group headings}
+% \begin{macrocode}
+\ifdef{\@glsstyle@mcolalttreespannav}
+{%
+ \renewglossarystyle{mcolalttreespannav}{%
+ \setglossarystyle{alttree}%
+ \renewenvironment{theglossary}%
+ {%
+ \glsxtralttreeInit
+ \def\@gls@prevlevel{-1}%
+ \begin{multicols}{\glsmcols}%
+ [\noindent\glstreenavigationfmt{\glsnavigation}]%
+ }%
+ {\par\end{multicols}}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \par
+ \def\@gls@prevlevel{-1}%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}%
+ \nopagebreak\indexspace\nopagebreak
+ }%
+ }
+}%
+{%
}
% \end{macrocode}
%
@@ -19886,6 +22423,433 @@ Dickimaw Books\\
%\fi
%\iffalse
% \begin{macrocode}
+%<*glossary-bookindex.sty>
+% \end{macrocode}
+%\fi
+%\chapter{bookindex style (\styfmt{glossary-bookindex.sty})}
+%\changes{1.21}{2017-11-03}{new}
+%\section{Package Initialisation and Options}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{glossary-bookindex}[2017/11/03 v1.21 (NLCT)]
+% \end{macrocode}
+%Load required packages.
+% \begin{macrocode}
+\RequirePackage{multicol}
+\RequirePackage{glossary-tree}
+% \end{macrocode}
+%\begin{macro}{\glsxtrbookindexcols}
+%\changes{1.21}{2017-11-03}{new}
+% Number of columns.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexcols}{2}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexname}
+%\changes{1.21}{2017-11-03}{new}
+%Format used for top-level entries.
+% (Argument is the label.)
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexname}[1]{\glossentryname{#1}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexsubname}
+%\changes{1.21}{2017-11-03}{new}
+%Format used for sub entries.
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexsubname}[1]{\glsxtrbookindexname{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrprelocation}
+%\changes{1.21}{2017-11-03}{new}
+%Provide in case \sty{glossaries-stylemods} isn't loaded.
+% \begin{macrocode}
+\providecommand*{\glsxtrprelocation}{\space}
+% \end{macrocode}
+%\end{macro}
+
+%\begin{macro}{\glsxtrbookindexprelocation}
+%\changes{1.21}{2017-11-03}{new}
+%Separator used before location list for top-level entries.
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexprelocation}[1]{%
+ \glsxtrifhasfield{location}{#1}%
+ {\ifglsnopostdot,\fi\glsxtrprelocation}%
+ {\glsxtrprelocation}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexsubprelocation}
+%\changes{1.21}{2017-11-03}{new}
+%Separator used before location list for sub-entries.
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexsubprelocation}[1]{%
+ \glsxtrbookindexprelocation{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrbookindexparentchildsep}
+%\changes{1.21}{2017-11-03}{new}
+%Separator used between top-level parent and child entry.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexparentchildsep}{\nopagebreak}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexparentsubchildsep}
+%\changes{1.21}{2017-11-03}{new}
+%Separator used between sub-level parent and child entry.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexparentsubchildsep}{\glsxtrbookindexparentchildsep}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrbookindexbetween}
+%\changes{1.21}{2017-11-03}{new}
+%Between two top-level entries identified by the labels in the
+%arguments.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexbetween}[2]{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexsubbetween}
+%\changes{1.21}{2017-11-03}{new}
+%Between two level~1 entries identified by the labels in the
+%arguments.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexsubbetween}[2]{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexsubsubbetween}
+%\changes{1.21}{2017-11-03}{new}
+%Between two level~2 entries identified by the labels in the
+%arguments.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexsubsubbetween}[2]{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexatendgroup}
+%\changes{1.21}{2017-11-03}{new}
+%At the end of a letter group. The argument is the index of the last
+%top-level entry.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexatendgroup}[1]{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexsubatendgroup}
+%\changes{1.21}{2017-11-03}{new}
+%At the end of a letter group. The argument is the index of the last
+%level~1 entry.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexsubatendgroup}[1]{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexsubsubatendgroup}
+%\changes{1.21}{2017-11-03}{new}
+%At the end of a letter group. The argument is the index of the last
+%level~2 entry.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexsubsubatendgroup}[1]{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrbookindexgroupskip}
+%\changes{1.21}{2017-11-03}{new}
+%Group separator.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexgroupskip}{\ifglsnogroupskip\else\indexspace\fi}
+% \end{macrocode}
+%\end{macro}
+%
+%Format group title.
+%\begin{macro}{\glsxtrbookindexformatheader}
+%\changes{1.21}{2017-11-03}{new}
+%Group separator.
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexformatheader}[1]{%
+ \par{\centering\glstreegroupheaderfmt{#1}\par}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexbookmark}
+%\changes{1.21}{2017-11-03}{new}
+%Book mark group heading if supported.
+% \begin{macrocode}
+\ifdef\pdfbookmark
+{%
+ \newcommand*{\glsxtrbookindexbookmark}[2]{%
+ \ifdefstring{\@@glossarysec}{chapter}%
+ {\pdfbookmark[1]{#1}{#2}}%
+ {\pdfbookmark[2]{#1}{#2}}%
+ }
+}
+{%
+ \newcommand*{\glsxtrbookindexbookmark}[2]{}
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrbookindexcolspread}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexcolspread}{}
+% \end{macrocode}
+%\end{macro}
+%Define the style.
+% \begin{macrocode}
+\newglossarystyle{bookindex}{%
+ \setglossarystyle{index}%
+ \renewenvironment{theglossary}%
+ {%
+ \ifdefempty\glsxtrbookindexcolspread
+ {\begin{multicols}{\glsxtrbookindexcols}}%
+ {\begin{multicols}{\glsxtrbookindexcols}[\glsxtrbookindexcolspread]}%
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep
+ \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep
+ \let\@glsxtr@bookindex@between\@gobble
+ \let\@glsxtr@bookindex@subbetween\@gobble
+ \let\@glsxtr@bookindex@subsubbetween\@gobble
+ \let\@glsxtr@bookindex@atendgroup\relax
+ \let\@glsxtr@bookindex@subatendgroup\relax
+ \let\@glsxtr@bookindex@subsubatendgroup\relax
+ \let\@glsxtr@bookindexgroupskip\relax
+ }%
+ {%
+% \end{macrocode}
+% Do end group hooks.
+% \begin{macrocode}
+ \@glsxtr@bookindex@subsubatendgroup
+ \@glsxtr@bookindex@subatendgroup
+ \@glsxtr@bookindex@atendgroup
+% \end{macrocode}
+%End \env{multicols} environment.
+% \begin{macrocode}
+ \end{multicols}%
+ }%
+% \end{macrocode}
+%Use ragged right as columns are likely to be narrow and
+%indexes tend not to be fully justified.
+% \begin{macrocode}
+ \renewcommand*{\glossaryheader}{\raggedright}%
+% \end{macrocode}
+%Top level entry format.
+% \begin{macrocode}
+ \renewcommand*{\glossentry}[2]{%
+% \end{macrocode}
+%Do separator.
+% \begin{macrocode}
+ \@glsxtr@bookindex@between{##1}%
+% \end{macrocode}
+%Update separators.
+% \begin{macrocode}
+ \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep
+ \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep
+ \let\@glsxtr@bookindex@subbetween\@gobble
+ \let\@glsxtr@bookindex@subsubbetween\@gobble
+ \edef\@glsxtr@bookindex@between{%
+ \noexpand\glsxtrbookindexbetween{##1}%
+ }%
+ \edef\@glsxtr@bookindex@atendgroup{%
+ \noexpand\glsxtrbookindexatendgroup{##1}%
+ }%
+ \let\@glsxtr@bookindex@subatendgroup\relax
+ \let\@glsxtr@bookindex@subsubatendgroup\relax
+% \end{macrocode}
+%Format entry.
+% \begin{macrocode}
+ \glstreeitem
+ \glsentryitem{##1}%
+ \glstarget{##1}{\glsxtrbookindexname{##1}}%
+ \glsxtrbookindexprelocation{##1}##2%
+ }%
+ \renewcommand{\subglossentry}[3]{%
+ \ifcase##1\relax
+% \end{macrocode}
+% Level 0 (shouldn't happen as that's formatted with \cs{glossentry}).
+% \begin{macrocode}
+ \glstreeitem
+ \or
+% \end{macrocode}
+% Level 1.
+% \begin{macrocode}
+ \@glsxtr@bookindex@sep
+ \@glsxtr@bookindex@subbetween{##2}%
+ \let\@glsxtr@bookindex@sep\relax
+% \end{macrocode}
+% Update separators.
+% \begin{macrocode}
+ \let\@glsxtr@bookindex@subsubbetween\@gobble
+ \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep
+ \edef\@glsxtr@bookindex@subbetween{%
+ \noexpand\glsxtrbookindexsubbetween{##2}%
+ }%
+ \edef\@glsxtr@bookindex@atsubendgroup{%
+ \noexpand\glsxtrbookindexatsubendgroup{##1}%
+ }%
+% \end{macrocode}
+% Start sub-item.
+% \begin{macrocode}
+ \glstreesubitem
+ \glssubentryitem{##2}%
+ \else
+% \end{macrocode}
+% All other levels.
+% \begin{macrocode}
+ \@glsxtr@bookindex@subsep
+ \@glsxtr@bookindex@subsubbetween{##2}%
+% \end{macrocode}
+% Update separators.
+% \begin{macrocode}
+ \let\@glsxtr@bookindex@subsep\relax
+ \edef\@glsxtr@bookindex@subsubbetween{%
+ \noexpand\glsxtrbookindexsubsubbetween{##2}%
+ }%
+ \edef\@glsxtr@bookindex@atsubsubendgroup{%
+ \noexpand\glsxtrbookindexatsubsubendgroup{##1}%
+ }%
+% \end{macrocode}
+% Start sub-sub-item.
+% \begin{macrocode}
+ \glstreesubsubitem
+ \fi
+% \end{macrocode}
+% Format entry.
+% \begin{macrocode}
+ \glstarget{##2}{\glsxtrbookindexsubname{##2}}%
+ \glsxtrbookindexsubprelocation{##2}##3%
+ }%
+% \end{macrocode}
+% The group skip is moved to the group heading to avoid interfering
+% with the end letter group hooks.
+% \begin{macrocode}
+ \renewcommand*{\glsgroupskip}{}%
+% \end{macrocode}
+% Group heading format.
+% \begin{macrocode}
+ \renewcommand*{\glsgroupheading}[1]{%
+% \end{macrocode}
+% Do end group hooks.
+% \begin{macrocode}
+ \@glsxtr@bookindex@subsubatendgroup
+ \@glsxtr@bookindex@subatendgroup
+ \@glsxtr@bookindex@atendgroup
+ \@glsxtr@bookindexgroupskip
+% \end{macrocode}
+% Update separators.
+% \begin{macrocode}
+ \let\@glsxtr@bookindexgroupskip\glsxtrbookindexgroupskip
+ \let\@glsxtr@bookindex@between\@gobble
+ \let\@glsxtr@bookindex@atendgroup\relax
+ \let\@glsxtr@bookindex@subatendgroup\relax
+ \let\@glsxtr@bookindex@subsubatendgroup\relax
+% \end{macrocode}
+% Fetch the group title from the label supplied in \verb|#1|.
+% \begin{macrocode}
+ \glsxtrgetgrouptitle{##1}{\thisgrptitle}%
+% \end{macrocode}
+% Do the PDF bookmark if supported.
+% \begin{macrocode}
+ \glsxtrbookindexbookmark{\thisgrptitle}{index.##1}%
+% \end{macrocode}
+% Format the group title.
+% \begin{macrocode}
+ \glsxtrbookindexformatheader{\thisgrptitle}%
+ \nopagebreak\indexspace\nopagebreak\@afterheading
+ }%
+}
+% \end{macrocode}
+% Some supplementary commands that may be useful.
+% These store the entry label for the current page. Since the page
+% number is needed in the control sequence, this uses
+% \cs{glsxtrbookindexthepage} instead of \cs{thepage} in case
+% the page numbering has been set to something that contains
+% formatting commands.
+%\begin{macro}{\glsxtrbookindexthepage}
+%\changes{1.21}{2017-11-03}{new}
+%The \cs{@printglossary} sets \cs{currentglossary} to the current
+%glossary label. This is used as a prefix in case the page number is
+%reset.
+% \begin{macrocode}
+\newcommand{\glsxtrbookindexthepage}{%
+ \ifdef\currentglossary{\currentglossary.\arabic{page}}{\arabic{page}}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrbookindexmarkentry}
+%\changes{1.21}{2017-11-03}{new}
+%Writes entry information to the \texttt{.aux} file. The argument is
+%the entry label.
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexmarkentry}[1]{%
+ \protected@write\@auxout
+ {\let\glsxtrbookindexthepage\relax}%
+ {\string\glsxtr@setbookindexmark{\glsxtrbookindexthepage}{#1}}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtr@setbookindexmark}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtr@setbookindexmark}[2]{%
+ \ifcsundef{glsxtr@idxfirstmark@#1}%
+ {\csgdef{glsxtr@idxfirstmark@#1}{#2}}%
+ {}%
+ \csgdef{glsxtr@idxlastmark@#1}{#2}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrbookindexfirstmarkfmt}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexfirstmarkfmt}[1]{%
+ \glsentryname{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexfirstmark}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexfirstmark}{%
+ \letcs{\glsxtr@label}{glsxtr@idxfirstmark@\glsxtrbookindexthepage}%
+ \ifdef\glsxtr@label
+ {\glsxtrbookindexfirstmarkfmt{\glsxtr@label}}%
+ {}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrbookindexlastmarkfmt}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexlastmarkfmt}[1]{%
+ \glsentryname{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glsxtrbookindexlastmark}
+%\changes{1.21}{2017-11-03}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrbookindexlastmark}{%
+ \letcs{\glsxtr@label}{glsxtr@idxlastmark@\glsxtrbookindexthepage}%
+ \ifdef\glsxtr@label
+ {\glsxtrbookindexlastmarkfmt{\glsxtr@label}}%
+ {}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\iffalse
+% \begin{macrocode}
+%</glossary-bookindex.sty>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*example-glossaries-xr.tex>
% \end{macrocode}
%\fi
@@ -20042,7 +23006,9 @@ Dickimaw Books\\
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@acronym{ndl,
description = {fringilla a, euismod sodales,
sollicitudin vel, wisi},
@@ -20116,7 +23082,9 @@ turpis},
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@acronym{lid,
short = {LID},
long = {lorem ipsum dolor}
@@ -20346,7 +23314,9 @@ turpis},
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@acronym{li,
user1 = {love itself},
short = {LI},
@@ -20397,7 +23367,9 @@ risus ut urna}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{lorem,
name = {lorem},
description = {ipsum}
@@ -20677,7 +23649,9 @@ risus ut urna}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{scelerisque,
name = {scelerisque},
description = {at}
@@ -20886,7 +23860,9 @@ parturient montes}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{fusce,
user1 = {article-minimal},
name = {fusce},
@@ -21020,7 +23996,9 @@ parturient montes}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{sedfeugiat,
user1 = {example-image},
name = {sed feugiat},
@@ -21325,7 +24303,9 @@ aliquet. Pellentesque aliquet sodales urna.
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{loremipsum,
name = {lorem ipsum},
description = {dolor sit amet, consectetuer adipiscing elit. Ut purus
@@ -21430,7 +24410,9 @@ bibendum quam in tellus.}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{loremi-ii,
name = {lorem 1--2},
description = {Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
@@ -21574,12 +24556,44 @@ tortor, vel consectetuer odio sem sed wisi.}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{sedmattis,
name = {sed mattis},
description = {erat sit amet}
}
+@entry{nunc,
+ name = {nunc},
+ description = {nisl vitae}
+}
+
+@entry{nonconvallis,
+ name = {non
+convallis},
+ description = {lectus orci ut nibh}
+}
+
+@entry{condimentum,
+ name = {condimentum},
+ description = {at
+nisl}
+}
+
+@entry{aliquamet,
+ name = {aliquam et},
+ description = {augue}
+}
+
+@entry{rutrum,
+ name = {rutrum},
+ description = {id, enim}
+}
+
+% child entries:
+
+
@entry{gravida,
parent = {sedmattis},
name = {gravida},
@@ -21598,11 +24612,6 @@ tortor, vel consectetuer odio sem sed wisi.}
description = {scelerisque}
}
-@entry{nunc,
- name = {nunc},
- description = {nisl vitae}
-}
-
@entry{libero,
parent = {nunc},
name = {libero},
@@ -21629,12 +24638,6 @@ in eleifend}
description = {leo rutrum dui}
}
-@entry{nonconvallis,
- name = {non
-convallis},
- description = {lectus orci ut nibh}
-}
-
@entry{sedlorem,
parent = {nonconvallis},
name = {sedlorem},
@@ -21648,23 +24651,12 @@ quis},
description = {egestas id}
}
-@entry{condimentum,
- name = {condimentum},
- description = {at
-nisl}
-}
-
@entry{maecenas,
parent = {condimentum},
name = {maecenas},
description = {at nibh}
}
-@entry{aliquamet,
- name = {aliquam et},
- description = {augue}
-}
-
@entry{atnunc,
parent = {aliquamet},
name = {at nunc},
@@ -21672,6 +24664,20 @@ nisl}
ullamcorper}
}
+@entry{phasellus,
+ parent = {rutrum},
+ name = {phasellus},
+ description = {odio}
+}
+
+@entry{nullanulla,
+ parent = {rutrum},
+ name = {nulla nulla},
+ description = {elit, molestie non}
+}
+
+% level 2:
+
@entry{duisnisl,
parent = {atnunc},
name = {duisnisl},
@@ -21685,23 +24691,6 @@ suscipit}
description = {convallis ut}
}
-@entry{rutrum,
- name = {rutrum},
- description = {id, enim}
-}
-
-@entry{phasellus,
- parent = {rutrum},
- name = {phasellus},
- description = {odio}
-}
-
-@entry{nullanulla,
- parent = {rutrum},
- name = {nulla nulla},
- description = {elit, molestie non}
-}
-
% \end{macrocode}
%\fi
%\iffalse
@@ -21716,7 +24705,9 @@ suscipit}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{alpha,
symbol = {\ensuremath{\alpha}},
name = {alpha},
@@ -21874,7 +24865,9 @@ lectus sagittis dui, et vehicula libero dui cursus dui.}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{aenean-url,
user1 = {http://uk.tug.org/},
name = {aenean},
@@ -21950,7 +24943,9 @@ amet, libero}
%\fi
%\iffalse
% \begin{macrocode}
+%<<COMMENT
% Encoding: UTF-8
+%COMMENT
@entry{lorem,
name = {lorem},
description = {ipsum}
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 094b9017428..66479154057 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/9/11 14:10
+% glossaries-extra.ins generated using makedtx version 1.2 2017/11/3 16:35
\input docstrip
\preamble
@@ -18,7 +18,7 @@
The Current Maintainer of this work is Nicola Talbot.
- This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-stylemods.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib.
+ This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib.
\endpreamble
@@ -28,6 +28,8 @@
\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra.sty,package}}
\file{glossaries-extra-stylemods.sty}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra-stylemods.sty,package}}
+\file{glossary-bookindex.sty}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-bookindex.sty,package}}
\file{example-glossaries-xr.tex}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{example-glossaries-xr.tex,package}}
\file{example-glossaries-acronym-desc.bib}{\nopreamble\nopostamble\from{glossaries-extra.dtx}{example-glossaries-acronym-desc.bib}}