summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-08-15 20:33:22 +0000
committerKarl Berry <karl@freefriends.org>2016-08-15 20:33:22 +0000
commit9f03d540e781cc9b40ca96a442b49c91d98d841e (patch)
tree8a9a1054005606820175b4275c8e939ecb431cf2 /Master/texmf-dist/source/latex
parent1850016c7aa713d8e5b7e6ac583199a938407287 (diff)
glossaries-extra (16aug16)
git-svn-id: svn://tug.org/texlive/trunk@41856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx540
-rw-r--r--Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins2
2 files changed, 501 insertions, 41 deletions
diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
index 0bab2f3672e..6da097fcf8f 100644
--- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
+++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx
@@ -3,12 +3,12 @@
% Command line args:
% -src "glossaries-extra.sty\Z=>glossaries-extra.sty"
% -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty"
+% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})"
% -section "chapter"
% -author "Nicola Talbot"
% -doc "glossaries-extra-codedoc.tex"
-% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})"
% glossaries-extra
-% Created on 2016/6/18 16:35
+% Created on 2016/8/15 14:38
%\fi
%\iffalse
%<*package>
@@ -118,7 +118,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of
\setcounter{IndexColumns}{2}
-\CheckSum{9433}
+\CheckSum{9639}
\newcommand*{\ifirstuse}{\iterm{first use}}
\newcommand*{\firstuse}{\gls{firstuse}}
@@ -154,13 +154,13 @@ styles (glossaries):>#1={\protect\ttfamily#1}|main}}
\raggedright
}
-\title{glossaries-extra.sty v1.06:
+\title{glossaries-extra.sty v1.07:
documented code}
\author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\url{http://www.dickimaw-books.com/}}
-\date{2016-06-18}
+\date{2016-08-15}
\begin{document}
\DocInput{glossaries-extra.dtx}
@@ -205,7 +205,7 @@ Dickimaw Books\\
%\section{Package Initialisation and Options}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra}[2016/06/18 v1.06 (NLCT)]
+\ProvidesPackage{glossaries-extra}[2016/08/15 v1.07 (NLCT)]
% \end{macrocode}
% Requires \sty{xkeyval} to define package options.
% \begin{macrocode}
@@ -1636,11 +1636,18 @@ Dickimaw Books\\
\renewcommand{\@gls@field@link}[4][]{%
\glsdoifexists{#3}%
{%
+% \end{macrocode}
+%Save and restore the hyper setting (\cs{@gls@link} also does this,
+%but that's too late if the optional argument of \cs{@gls@field@link}
+%modifies it).
+% \begin{macrocode}
+ \let\glsxtrorg@ifKV@glslink@hyper\ifKV@glslink@hyper
\let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
\def\glscustomtext{#4}%
\@glsxtr@field@linkdefs
#1%
\@gls@link[#2]{#3}{#4}%
+ \let\ifKV@glslink@hyper\glsxtrorg@ifKV@glslink@hyper
}%
\glspostlinkhook
}
@@ -1725,6 +1732,18 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%Version 1.07 ensures that \cs{glsfirst} etc honours the
+%\catattr{nohyperfirst} attribute. Allow a convenient way for the
+%user to revert to ignoring this attribute for these commands.
+%\begin{macro}{\glsxtrchecknohyperfirst}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrchecknohyperfirst}[1]{%
+ \glsifattribute{#1}{nohyperfirst}{true}{\KV@glslink@hyperfalse}{}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@glsfirst@}
% No case changing version.
%\changes{0.3}{2015-12-02}{added redefinition}
@@ -1734,8 +1753,15 @@ Dickimaw Books\\
% \begin{macrocode}
\def\@glsfirst@#1#2[#3]{%
\glsxtrassignfieldfont{#2}%
- \@gls@field@link[\let\glsxtrifwasfirstuse\@firstoftwo]{#1}{#2}%
- {\@gls@field@font{\glsaccessfirst{#2}#3}}%
+% \end{macrocode}
+% Ensure that \cs{glsfirst} honours the \catattr{nohyperfirst} attribute.
+%\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute}
+% \begin{macrocode}
+ \@gls@field@link
+ [\let\glsxtrifwasfirstuse\@firstoftwo
+ \glsxtrchecknohyperfirst{#2}%
+ ]{#1}{#2}%
+ {\@gls@field@font{\glsaccessfirst{#2}#3}}%
}
% \end{macrocode}
%\end{macro}
@@ -1749,9 +1775,14 @@ Dickimaw Books\\
% \begin{macrocode}
\def\@Glsfirst@#1#2[#3]{%
\glsxtrassignfieldfont{#2}%
+% \end{macrocode}
+% Ensure that \cs{Glsfirst} honours the \catattr{nohyperfirst} attribute.
+%\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute}
+% \begin{macrocode}
\@gls@field@link
[\let\glsxtrifwasfirstuse\@firstoftwo
\let\glscapscase\@secondofthree
+ \glsxtrchecknohyperfirst{#2}%
]%
{#1}{#2}{\@gls@field@font{\Glsaccessfirst{#2}#3}}%
}
@@ -1767,9 +1798,14 @@ Dickimaw Books\\
% \begin{macrocode}
\def\@GLSfirst@#1#2[#3]{%
\glsxtrassignfieldfont{#2}%
+% \end{macrocode}
+% Ensure that \cs{GLSfirst} honours the \catattr{nohyperfirst} attribute.
+%\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute}
+% \begin{macrocode}
\@gls@field@link
[\let\glsxtrifwasfirstuse\@firstoftwo
\let\glscapscase\@thirdofthree
+ \glsxtrchecknohyperfirst{#2}%
]%
{#1}{#2}{\@gls@field@font{\GLSaccessfirst{#2}\mfirstucMakeUppercase{#3}}}%
}
@@ -1842,9 +1878,14 @@ Dickimaw Books\\
% \begin{macrocode}
\def\@glsfirstplural@#1#2[#3]{%
\glsxtrassignfieldfont{#2}%
+% \end{macrocode}
+% Ensure that \cs{glsfirstplural} honours the \catattr{nohyperfirst} attribute.
+%\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute}
+% \begin{macrocode}
\@gls@field@link
[\let\glsxtrifwasfirstuse\@firstoftwo
\let\glsifplural\@firstoftwo
+ \glsxtrchecknohyperfirst{#2}%
]%
{#1}{#2}{\@gls@field@font{\glsaccessfirstplural{#2}#3}}%
}
@@ -1861,10 +1902,15 @@ Dickimaw Books\\
% \begin{macrocode}
\def\@Glsfirstplural@#1#2[#3]{%
\glsxtrassignfieldfont{#2}%
+% \end{macrocode}
+% Ensure that \cs{glsfirstplural} honours the \catattr{nohyperfirst} attribute.
+%\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute}
+% \begin{macrocode}
\@gls@field@link
[\let\glsxtrifwasfirstuse\@firstoftwo
\let\glsifplural\@firstoftwo
\let\glscapscase\@secondofthree
+ \glsxtrchecknohyperfirst{#2}%
]%
{#1}{#2}{\@gls@field@font{\Glsaccessfirstplural{#2}#3}}%
}
@@ -1881,10 +1927,15 @@ Dickimaw Books\\
% \begin{macrocode}
\def\@GLSfirstplural@#1#2[#3]{%
\glsxtrassignfieldfont{#2}%
+% \end{macrocode}
+% Ensure that \cs{glsfirstplural} honours the \catattr{nohyperfirst} attribute.
+%\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute}
+% \begin{macrocode}
\@gls@field@link
[\let\glsxtrifwasfirstuse\@firstoftwo
\let\glsifplural\@firstoftwo
\let\glscapscase\@thirdofthree
+ \glsxtrchecknohyperfirst{#2}%
]%
{#1}{#2}%
{\@gls@field@font{\GLSaccessfirstplural{#2}\mfirstucMakeUppercase{#3}}}%
@@ -3219,6 +3270,317 @@ Dickimaw Books\\
% \end{macrocode}
%\end{macro}
%
+%Commands to minimise conflict.
+%\begin{macro}{\@glsxtrp@opt}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newcommand*{\@glsxtrp@opt}{hyper=false,noindex}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrsetpopts}
+%\changes{1.07}{2016-08-15}{new}
+%Used in glossary to switch hyperlinks on for the \cs{glsxtrp} type
+%of commands.
+% \begin{macrocode}
+\newcommand*{\glsxtrsetpopts}[1]{%
+ \renewcommand*{\@glsxtrp@opt}{#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glossxtrsetpopts}
+%\changes{1.07}{2016-08-15}{new}
+%Used in glossary to switch hyperlinks on for the \cs{glsxtrp} type
+%of commands.
+% \begin{macrocode}
+\newcommand*{\glossxtrsetpopts}{%
+ \glsxtrsetpopts{noindex}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@@glsxtrp}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newrobustcmd*{\@@glsxtrp}[2]{%
+% \end{macrocode}
+%Add scope.
+% \begin{macrocode}
+ {%
+ \let\glspostlinkhook\relax
+ \csname#1\expandafter\endcsname\expandafter[\@glsxtrp@opt]{#2}[]%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtrp}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newrobustcmd*{\@glsxtrp}[2]{%
+ \ifcsdef{gls#1}%
+ {%
+ \@@glsxtrp{gls#1}{#2}%
+ }%
+ {%
+ \ifcsdef{glsxtr#1}%
+ {%
+ \@@glsxtrp{glsxtr#1}{#2}%
+ }%
+ {%
+ \PackageError{glossaries-extra}{`#1' not recognised by
+ \string\glsxtrp}{}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@Glsxtrp}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newrobustcmd*{\@Glsxtrp}[2]{%
+ \ifcsdef{Gls#1}%
+ {%
+ \@@glsxtrp{Gls#1}{#2}%
+ }%
+ {%
+ \ifcsdef{Glsxtr#1}%
+ {%
+ \@@glsxtrp{Glsxtr#1}{#2}%
+ }%
+ {%
+ \PackageError{glossaries-extra}{`#1' not recognised by
+ \string\Glsxtrp}{}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@GLSxtrp}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newrobustcmd*{\@GLSxtrp}[2]{%
+ \ifcsdef{GLS#1}%
+ {%
+ \@@glsxtrp{GLS#1}{#2}%
+ }%
+ {%
+ \ifcsdef{GLSxtr#1}%
+ {%
+ \@@glsxtrp{GLSxtr#1}{#2}%
+ }%
+ {%
+ \PackageError{glossaries-extra}{`#1' not recognised by
+ \string\GLSxtrp}{}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtr@entry@p}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newrobustcmd*{\glsxtr@headentry@p}[2]{%
+ \glsifattribute{#1}{headuc}{true}%
+ {%
+ \mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}%
+ }%
+ {%
+ \@gls@entry@field{#1}{#2}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\glsxtrp}
+%\changes{1.07}{2016-08-15}{new}
+%Not robust as it needs to expand somewhat.
+% \begin{macrocode}
+\ifdef\texorpdfstring
+{
+ \newcommand{\glsxtrp}[2]{%
+ \protect\NoCaseChange
+ {%
+ \protect\texorpdfstring
+ {%
+ \protect\glsxtrifinmark
+ {%
+ \ifcsdef{glsxtrhead#1}%
+ {%
+ {\protect\csuse{glsxtrhead#1}{#2}}%
+ }%
+ {%
+ \glsxtr@headentry@p{#2}{#1}%
+ }%
+ }%
+ {%
+ \@glsxtrp{#1}{#2}%
+ }%
+ }%
+ {%
+ \protect\@gls@entry@field{#2}{#1}%
+ }%
+ }%
+ }
+}
+{
+ \newcommand{\glsxtrp}[2]{%
+ \protect\NoCaseChange
+ {%
+ \protect\glsxtrifinmark
+ {%
+ \ifcsdef{glsxtrhead#1}%
+ {%
+ {\protect\csuse{glsxtrhead#1}}%
+ }%
+ {%
+ \glsxtr@headentry@p{#2}{#1}%
+ }%
+ }%
+ {%
+ \@glsxtrp{#1}{#2}%
+ }%
+ }%
+ }
+}
+% \end{macrocode}
+%\end{macro}
+%
+%Provide short synonyms for the most common option.
+%\begin{macro}{\glsps}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newcommand*{\glsps}{\glsxtrp{short}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\glspt}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newcommand*{\glspt}{\glsxtrp{text}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Glsxtrp}
+%\changes{1.07}{2016-08-15}{new}
+%As above but use first letter upper case (but not for the
+%bookmarks, which can't process \cs{uppercase}).
+% \begin{macrocode}
+\ifdef\texorpdfstring
+{
+ \newcommand{\Glsxtrp}[2]{%
+ \protect\NoCaseChange
+ {%
+ \protect\texorpdfstring
+ {%
+ \protect\glsxtrifinmark
+ {%
+ \ifcsdef{Glsxtrhead#1}%
+ {%
+ {\protect\csuse{Glsxtrhead#1}{#2}}%
+ }%
+ {%
+ \protect\@Gls@entry@field{#2}{#1}%
+ }%
+ }%
+ {%
+ \@Glsxtrp{#1}{#2}%
+ }%
+ }%
+ {%
+ \protect\@gls@entry@field{#2}{#1}%
+ }%
+ }%
+ }
+}
+{
+ \newcommand{\Glsxtrp}[2]{%
+ \protect\NoCaseChange
+ {%
+ \protect\glsxtrifinmark
+ {%
+ \ifcsdef{Glsxtrhead#1}%
+ {%
+ {\protect\csuse{Glsxtrhead#1}}%
+ }%
+ {%
+ \protect\@Gls@entry@field{#2}{#1}%
+ }%
+ }%
+ {%
+ \@Glsxtrp{#1}{#2}%
+ }%
+ }%
+ }
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\GLSxtrp}
+%\changes{1.07}{2016-08-15}{new}
+%As above but all upper case (but not for the
+%bookmarks, which can't process \cs{uppercase}).
+% \begin{macrocode}
+\ifdef\texorpdfstring
+{
+ \newcommand{\GLSxtrp}[2]{%
+ \protect\NoCaseChange
+ {%
+ \protect\texorpdfstring
+ {%
+ \protect\glsxtrifinmark
+ {%
+ \ifcsdef{GLSxtr#1}%
+ {%
+ {\protect\GLSxtrshort[noindex,hyper=false]{#1}[]}%
+ }%
+ {%
+ \protect\mfirstucMakeUppercase
+ {%
+ \protect\@gls@entry@field{#2}{#1}%
+ }%
+ }%
+ }%
+ {%
+ \@GLSxtrp{#1}{#2}%
+ }%
+ }%
+ {%
+ \protect\@gls@entry@field{#2}{#1}%
+ }%
+ }%
+ }
+}
+{
+ \newcommand{\GLSxtrp}[2]{%
+ \protect\NoCaseChange
+ {%
+ \protect\glsxtrifinmark
+ {%
+ \ifcsdef{GLSxtr#1}%
+ {%
+ {\protect\GLSxtrshort[noindex,hyper=false]{#1}[]}%
+ }%
+ {%
+ \protect\mfirstucMakeUppercase
+ {%
+ \protect\@gls@entry@field{#2}{#1}%
+ }%
+ }%
+ }%
+ {%
+ \@GLSxtrp{#1}{#2}%
+ }%
+ }%
+ }
+}
+% \end{macrocode}
+%\end{macro}
+%
+%
%\subsection{Entry Counting}
%
% The entry counting mechanism from \styfmt{glossaries} is adjusted
@@ -4212,7 +4574,19 @@ Dickimaw Books\\
\renewcommand{\acronymfont}[1]{##1}%
\let\setacronymstyle\@glsxtr@org@setacronymstyle
\let\newacronymstyle\@glsxtr@org@newacronymstyle
- \let\@gls@link@checkfirsthyper\@glsxtr@org@checkfirsthyper
+% \end{macrocode}
+%\changes{1.07}{2016-08-15}{modified \cs{@gls@link@checkfirsthyper} to set
+%\cs{glsxtrifwasfirstuse}}
+% Need to restore the original definition of \cs{@gls@link@checkfirsthyper}
+% but \cs{glsxtrifwasfirstuse} still needs setting for the benefit
+% of the post-link hook.
+% \begin{macrocode}
+ \renewcommand*\@gls@link@checkfirsthyper{%
+ \ifglsused{\glslabel}%
+ {\let\glsxtrifwasfirstuse\@secondoftwo}
+ {\let\glsxtrifwasfirstuse\@firstoftwo}%
+ \@glsxtr@org@checkfirsthyper
+ }
\glssetcategoryattribute{acronym}{regular}{false}%
\setacronymstyle{long-short}%
}
@@ -6059,12 +6433,22 @@ want
%\changes{0.5.2}{2015-12-08}{new}
% \begin{macrocode}
\newcommand*{\glsxtrfieldtitlecase}[2]{%
- \expandafter\xcapitalisewords\expandafter
+ \expandafter\glsxtrfieldtitlecasecs\expandafter
{\csname glo@\glsdetoklabel{#1}@#2\endcsname}%
}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrfieldtitlecasecs}
+%The command used by \cs{glsxtrfieldtitlecase}. May be
+%redefined to use a different command, for example,
+%\cs{xcapitalisefmtwords}.
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrfieldtitlecasecs}[1]{\xcapitalisewords{#1}}
+% \end{macrocode}
+%\end{macro}
+%
% Provide a convenient way to modify glossary styles without having
% to define a new style just to convert the first letter of fields
% to upper case.
@@ -6889,6 +7273,11 @@ want
\@glsxtr@org@postdescription
}{}%
}%
+% \end{macrocode}
+%\changes{1.07}{2016-08-15}{added \cs{glossxtrsetpopts}}
+%Enable the options used by \cs{@@glsxtrp}:
+% \begin{macrocode}
+ \glossxtrsetpopts
}%
}
{}
@@ -8647,7 +9036,16 @@ want
firstplural={\protect\glsfirstlongfont{\the\glslongpltok}%
\protect\glsxtrfullsep{\the\glslabeltok}%
(\protect\glsfirstabbrvfont{\the\glsshortpltok})},%
- plural={\protect\glsabbvfont{\the\glsshortpltok}}}%
+% \end{macrocode}
+%The \gloskey{text} key should only have the short form.
+%\changes{1.07}{2016-08-15}{added missing text key}
+% \begin{macrocode}
+ text={\protect\glsabbrvfont{\the\glsshorttok}},%
+% \end{macrocode}
+%\changes{1.07}{2016-08-15}{fixed misspelling of \cs{glsabbrvfont}}
+% \begin{macrocode}
+ plural={\protect\glsabbrvfont{\the\glsshortpltok}}%
+ }%
% \end{macrocode}
%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set}
% Unset the \catattr{regular} attribute if it has been set.
@@ -8749,7 +9147,16 @@ want
firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}%
\protect\glsxtrfullsep{\the\glslabeltok}%
(\protect\glsfirstlongfont{\the\glslongpltok})},%
- plural={\protect\glsabbvfont{\the\glsshortpltok}}}%
+% \end{macrocode}
+%\changes{1.07}{2016-08-15}{added text key}
+% \begin{macrocode}
+ text={\protect\glsabbrvfont{\the\glsshorttok}},%
+% \end{macrocode}
+%\changes{1.07}{2016-08-15}{fixed misspelling of \cs{glsabbrvfont} in plural
+%key}
+% \begin{macrocode}
+ plural={\protect\glsabbrvfont{\the\glsshortpltok}}%
+ }%
% \end{macrocode}
%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set}
% Unset the \catattr{regular} attribute if it has been set.
@@ -8784,12 +9191,23 @@ want
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrabbrvfootnote}
+%\begin{definition}
+%\cs{glsxtrabbrvfootnote}\marg{label}\marg{long}
+%\end{definition}
+%\changes{1.07}{2016-08-15}{new}
+%Command used by footnote abbreviation styles. The default
+%definition ignores the first argument. The second argument
+%\meta{long} includes the font changing command and may be the
+%singular or plural form, depending on the command that was used
+%(for example, \cs{gls} or \cs{glspl}).
+% \begin{macrocode}
+\newcommand*{\glsxtrabbrvfootnote}[2]{\footnote{#2}}
+% \end{macrocode}
+%\end{macro}
%
%\begin{abbrvstyle}{footnote}
% Short form followed by long form in footnote on first use.
-% Take care about using \cs{glsfirst} as this won't suppress the
-% hyperlink. (Perhaps modify \cs{glsfirst} to reflect
-% \catattr{nohyperfirst} attribute?)
% \begin{macrocode}
\newabbreviationstyle{footnote}%
{%
@@ -8797,10 +9215,16 @@ want
name={\protect\glsabbrvfont{\the\glsshorttok}},
sort={\the\glsshorttok},
description={\the\glslongtok},%
+% \end{macrocode}
+%\changes{1.07}{2016-08-15}{changed first forms to use
+%\cs{glsfirstlongfootnotefont}}
+% \begin{macrocode}
first={\protect\glsfirstabbrvfont{\the\glsshorttok}%
- \protect\footnote{\protect\glsfirstlongfont{\the\glslongtok}}},%
+ \protect\glsxtrabbrvfootnote{\the\glslabeltok}%
+ {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},%
firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}%
- \protect\footnote{\protect\glsfirstlongfont{\the\glslongpltok}}},%
+ \protect\glsxtrabbrvfootnote{\the\glslabeltok}%
+ {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},%
plural={\protect\glsabbvfont{\the\glsshortpltok}}}%
% \end{macrocode}
% Switch off hyperlinks on first use to prevent nested hyperlinks,
@@ -8833,22 +9257,26 @@ want
\renewcommand*{\glsxtrfullformat}[2]{%
\glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi
- \protect\footnote{\glsfirstlongfont{\glsaccesslong{##1}}}%
+ \protect\glsxtrabbrvfootnote{##1}%
+ {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}%
}%
\renewcommand*{\glsxtrfullplformat}[2]{%
\glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi
- \protect\footnote{\glsfirstlongfont{\glsaccesslongpl{##1}}}%
+ \protect\glsxtrabbrvfootnote{##1}%
+ {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}%
}%
\renewcommand*{\Glsxtrfullformat}[2]{%
\glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi
- \protect\footnote{\glsfirstlongfont{\glsaccesslong{##1}}}%
+ \protect\glsxtrabbrvfootnote{##1}%
+ {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}%
}%
\renewcommand*{\Glsxtrfullplformat}[2]{%
\glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi
- \protect\footnote{\glsfirstlongfont{\glsaccesslongpl{##1}}}%
+ \protect\glsxtrabbrvfootnote{##1}%
+ {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}%
}%
% \end{macrocode}
% The first use full form and the inline full form use the short
@@ -8857,22 +9285,22 @@ want
\renewcommand*{\glsxtrinlinefullformat}[2]{%
\glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- (\glsfirstlongfont{\glsaccesslong{##1}})%
+ (\glsfirstlongfootnotefont{\glsaccesslong{##1}})%
}%
\renewcommand*{\glsxtrinlinefullplformat}[2]{%
\glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- (\glsfirstlongfont{\glsaccesslongpl{##1}})%
+ (\glsfirstlongfootnotefont{\glsaccesslongpl{##1}})%
}%
\renewcommand*{\Glsxtrinlinefullformat}[2]{%
\glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- (\glsfirstlongfont{\glsaccesslong{##1}})%
+ (\glsfirstlongfootnotefont{\glsaccesslong{##1}})%
}%
\renewcommand*{\Glsxtrinlinefullplformat}[2]{%
\glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- (\glsfirstlongfont{\glsaccesslongpl{##1}})%
+ (\glsfirstlongfootnotefont{\glsaccesslongpl{##1}})%
}%
}
% \end{macrocode}
@@ -8888,7 +9316,9 @@ want
% Similar to the above but the footnote is placed afterwards,
% outside the link. This avoids nested links and can also move the
% footnote marker after any following punctuation mark.
-% This deferment won't occur with \cs{glsfirst}.
+% Pre v1.07 included \cs{footnote} in the first keys, which was
+% incorrect as it caused duplicate footnotes.
+%\changes{1.07}{2016-08-15}{removed \cs{footnote} from first keys}
% \begin{macrocode}
\newabbreviationstyle{postfootnote}%
{%
@@ -8896,10 +9326,8 @@ want
name={\protect\glsabbrvfont{\the\glsshorttok}},
sort={\the\glsshorttok},
description={\the\glslongtok},%
- first={\protect\glsfirstabbrvfont{\the\glsshorttok}%
- \protect\footnote{\protect\glsfirstlongfont{\the\glslongtok}}},%
- firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}%
- \protect\footnote{\protect\glsfirstlongfont{\the\glslongpltok}}},%
+ first={\protect\glsfirstabbrvfont{\the\glsshorttok}},%
+ firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}},%
plural={\protect\glsabbvfont{\the\glsshortpltok}}}%
% \end{macrocode}
% Make this category insert a footnote after the link if this was
@@ -8915,7 +9343,7 @@ want
% Needs the specific font command here as the style may have been
% lost by the time the footnote occurs.
% \begin{macrocode}
- \glsxtrdopostpunc{\protect\footnote
+ \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}%
{\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}%
}%
{}%
@@ -8968,26 +9396,28 @@ want
% \end{macrocode}
% The first use full form and the inline full form use the short
% (long) style.
+%\changes{1.07}{2016-08-15}{switched from \cs{glsfirstlongfont} to
+%\cs{glsfirstlongfootnotefont}}
% \begin{macrocode}
\renewcommand*{\glsxtrinlinefullformat}[2]{%
\glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- (\glsfirstlongfont{\glsaccesslong{##1}})%
+ (\glsfirstlongfootnotefont{\glsaccesslong{##1}})%
}%
\renewcommand*{\glsxtrinlinefullplformat}[2]{%
\glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- (\glsfirstlongfont{\glsaccesslongpl{##1}})%
+ (\glsfirstlongfootnotefont{\glsaccesslongpl{##1}})%
}%
\renewcommand*{\Glsxtrinlinefullformat}[2]{%
\glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- (\glsfirstlongfont{\glsaccesslong{##1}})%
+ (\glsfirstlongfootnotefont{\glsaccesslong{##1}})%
}%
\renewcommand*{\Glsxtrinlinefullplformat}[2]{%
\glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}%
\ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
- (\glsfirstlongfont{\glsaccesslongpl{##1}})%
+ (\glsfirstlongfootnotefont{\glsaccesslongpl{##1}})%
}%
}
% \end{macrocode}
@@ -10528,9 +10958,9 @@ want
% The PDF bookmark issue can easily be fixed with \sty{hyperref}'s
% \cs{texorpdfstring} which can simply use the expandable command
% in the PDF string case. The \TeX\ string case can now use
-% \cs{glsxtrshort} with the \gloskey{noindex} key set, which
+% \cs{glsxtrshort} with the \gloskey[glslink]{noindex} key set, which
% prevents the unwanted additions to the location list, and the
-% \gloskey{hyper} key set to false, which prevents the problem of
+% \gloskey[glslink]{hyper} key set to false, which prevents the problem of
% nested links. This just leaves one thing left that needs to be
% dealt with, and that's what to do if the heading style
% uses \cs{MakeUppercase}.
@@ -10557,7 +10987,7 @@ want
% \begin{macrocode}
\renewcommand*{\markright}[1]{%
\glsxtrmarkhook
- \@glsxtr@org@markright{#1}%
+ \@glsxtr@org@markright{\@glsxtrinmark#1\@glsxtrnotinmark}%
\glsxtrrestoremarkhook
}
% \end{macrocode}
@@ -10573,7 +11003,9 @@ want
% \begin{macrocode}
\renewcommand*{\markboth}[2]{%
\glsxtrmarkhook
- \@glsxtr@org@markboth{#1}{#2}%
+ \@glsxtr@org@markboth
+ {\@glsxtrinmark#1\@glsxtrnotinmark}%
+ {\@glsxtrinmark#2\@glsxtrnotinmark}%
\glsxtrrestoremarkhook
}
% \end{macrocode}
@@ -10590,6 +11022,32 @@ want
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\glsxtrifinmark}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newcommand*{\glsxtrifinmark}[2]{#2}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtrinmark}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newrobustcmd*{\@glsxtrinmark}{%
+ \let\glsxtrifinmark\@firstoftwo
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@glsxtrnotinmark}
+%\changes{1.07}{2016-08-15}{new}
+% \begin{macrocode}
+\newrobustcmd*{\@glsxtrnotinmark}{%
+ \let\glsxtrifinmark\@secondoftwo
+}
+% \end{macrocode}
+%\end{macro}
+%
+%
%\begin{macro}{\glsxtrmarkhook}
% Hook used in new definition of \cs{markboth} and \cs{markright}
% to make some changes to apply to the marks:
@@ -10622,6 +11080,7 @@ want
% \end{macrocode}
% New definitions
% \begin{macrocode}
+ \let\glsxtrifinmark\@firstoftwo
\let\MakeUppercase\MakeTextUppercase
\let\glsxtrtitleshort\glsxtrheadshort
\let\glsxtrtitleshortpl\glsxtrheadshortpl
@@ -10656,6 +11115,7 @@ want
% possibly there's a reason for it.)
% \begin{macrocode}
\newcommand*{\glsxtrrestoremarkhook}{%
+ \let\glsxtrifinmark\@secondoftwo
\let\MakeUppercase\@glsxtr@org@MakeUppercase
\let\glsxtrtitleshort\@glsxtr@org@glsxtrtitleshort
\let\glsxtrtitleshortpl\@glsxtr@org@glsxtrtitleshortpl
@@ -11760,7 +12220,7 @@ want
% First identify package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra-stylemods}[2016/06/18 v1.06 (NLCT)]
+\ProvidesPackage{glossaries-extra-stylemods}[2016/08/15 v1.07 (NLCT)]
% \end{macrocode}
% Provide package options to automatically load required predefined
% styles. The simplest method is to just test for the existence of
diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins
index 25d0bcecd52..7af1d451334 100644
--- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins
+++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins
@@ -1,4 +1,4 @@
-% glossaries-extra.ins generated using makedtx version 1.1 2016/6/18 16:35
+% glossaries-extra.ins generated using makedtx version 1.1 2016/8/15 14:38
\input docstrip
\preamble