summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty2
-rw-r--r--Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty241
2 files changed, 218 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty
index 2590bd73787..1473e5a9780 100644
--- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty
+++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra-stylemods.sty
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra-stylemods}[2016/08/15 v1.07 (NLCT)]
+\ProvidesPackage{glossaries-extra-stylemods}[2016/12/13 v1.08 (NLCT)]
\newcommand*{\@glsxtr@loadstyles}{}
\DeclareOption*{%
\IfFileExists{glossary-\CurrentOption.sty}
diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty
index f8f73786126..1982328daed 100644
--- a/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty
+++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossaries-extra.sty
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-extra}[2016/08/15 v1.07 (NLCT)]
+\ProvidesPackage{glossaries-extra}[2016/12/13 v1.08 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{etoolbox}
\@ifpackageloaded{glossaries}
@@ -72,25 +72,108 @@
\newcommand*{\glsxtr@warnonexistsordo}[1]{}
\newcommand*{\glsxtrundeftag}{??}
\newcommand*{\@glsxtrundeftag}{}
+\newcommand*{\@glsxtr@warn@undefaction}[2]{%
+ \@glsxtrundeftag\GlossariesExtraWarning{#1}%
+}
+\newcommand*{\@glsxtr@err@undefaction}[2]{%
+ \@glsxtrundeftag\PackageError{glossaries-extra}{#1}{#2}%
+}
+\newcommand*{\@glsxtr@warn@onexistsordo}[1]{%
+ \GlossariesExtraWarning{glossaries-extra}{%
+ \string#1\space hasn't been defined, so
+ some errors won't be converted to warnings.
+ (This most likely means your version of
+ glossaries.sty is below version 4.19.)}%
+}
\define@choicekey{glossaries-extra.sty}{undefaction}[\val\nr]%
{warn,error}%
{%
\ifcase\nr\relax
- \renewcommand*{\glsxtrundefaction}[2]{%
- \@glsxtrundeftag\GlossariesExtraWarning{##1}%
+ \let\glsxtrundefaction\@glsxtr@warn@undefaction
+ \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
+ \or
+ \let\glsxtrundefaction\@glsxtr@err@undefaction
+ \let\glsxtr@warnonexistsordo\@gobble
+ \fi
+ }
+\newcommand*{\@glsxtr@record}[2]{}
+\newcommand*{\@@glsxtr@record}[2]{%
+ \begingroup
+ \def\@glsnumberformat{glsnumberformat}%
+ \ifcsdef{glo@#2@counter}%
+ {%
+ \edef\@gls@counter{\csname glo@#2@counter\endcsname}%
+ }%
+ {%
+ \def\@gls@counter{page}%
+ }%
+ \setkeys{glslink}{#1}%
+ \ifKV@glslink@noindex
+ \else
+ \glswriteentry{#2}%
+ {%
+ \glsxtr@saveentrycounter
+ \let\@@do@@wrglossary\@glsxtr@dorecord
+ \glsxtr@@do@wrglossary{#2}%
}%
- \renewcommand*{\glsxtr@warnonexistsordo}[1]{%
- \GlossariesExtraWarning{glossaries-extra}{%
- \string##1\space hasn't been defined, so
- some errors won't be converted to warnings.
- (This most likely means your version of
- glossaries.sty is below version 4.19.)}%
+ \fi
+ \endgroup
+}
+\newcommand*\@glsxtr@dorecord{%
+ \protected@write\@auxout{}{\string\glsxtr@record
+ {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}%
+ {\@glslocref}}%
+}
+\newcommand*{\glsxtr@record}[5]{}
+\newcommand*{\glsxtr@setup@record}{}
+\newcommand*{\glsxtr@indexonly@saveentrycounter}{%
+ \ifKV@glslink@noindex
+ \else
+ \glsxtr@saveentrycounter
+ \fi
+}
+\newcommand*{\glsxtr@addloclistfield}{%
+ \key@ifundefined{glossentry}{loclist}%
+ {%
+ \define@key{glossentry}{loclist}{\def\@glo@loclist{##1}}%
+ \appto\@gls@keymap{,{loclist}{loclist}}%
+ \appto\@newglossaryentryprehook{\def\@glo@loclist{}}%
+ \appto\@newglossaryentryposthook{%
+ \gls@assign@field{}{\@glo@label}{loclist}{\@glo@loclist}%
+ }%
+ }%
+ {}%
+}
+\define@choicekey{glossaries-extra.sty}{record}[\val\nr]%
+ {off,only,alsoindex}%
+ [only]%
+ {%
+ \ifcase\nr\relax
+ \def\glsxtr@setup@record{%
+ \renewcommand*{\@glsxtr@record}[2]{}%
+ \let\@@do@wrglossary\glsxtr@@do@wrglossary
+ \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
+ \let\glsxtrundefaction\@glsxtr@err@undefaction
+ \let\glsxtr@warnonexistsordo\@gobble
+ }%
+ \or
+ \def\glsxtr@setup@record{%
+ \let\@glsxtr@record\@@glsxtr@record
+ \let\@@do@wrglossary\@gobble
+ \let\@gls@saveentrycounter\relax
+ \let\glsxtrundefaction\@glsxtr@warn@undefaction
+ \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
+ \glsxtr@addloclistfield
}%
\or
- \renewcommand*{\glsxtrundefaction}[2]{%
- \@glsxtrundeftag\PackageError{glossaries-extra}{##1}{##2}%
+ \def\glsxtr@setup@record{%
+ \let\@glsxtr@record\@@glsxtr@record
+ \let\@@do@wrglossary\glsxtr@@do@wrglossary
+ \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
+ \let\glsxtrundefaction\@glsxtr@warn@undefaction
+ \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
+ \glsxtr@addloclistfield
}%
- \renewcommand*{\glsxtr@warnonexistsordo}[1]{}%
\fi
}
\newcount\@glsxtr@docdefval
@@ -289,14 +372,20 @@
\@glsxtr@setupshortcuts
\renewcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}%
\newcommand*{\glossariesextrasetup}[1]{%
+ \let\glsxtr@setup@record\relax
\let\@glsxtr@setupshortcuts\relax
\setkeys{glossaries-extra.sty}{#1}%
\@glsxtr@abbreviationsdef
\let\@glsxtr@abbreviationsdef\relax
\@glsxtr@setupshortcuts
+ \glsxtr@setup@record
}
+\let\glsxtr@@do@wrglossary\@@do@wrglossary
+\let\glsxtr@saveentrycounter\@gls@saveentrycounter
+\let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
+\glsxtr@setup@record
\AtBeginDocument{%
- \disable@keys{glossaries-extra.sty}{abbreviations,docdef}%
+ \disable@keys{glossaries-extra.sty}{abbreviations,docdef,record}%
\def\@glsxtrundeftag{\glsxtrundeftag}%
}
\newcommand{\glsxtrifemptyglossary}[3]{%
@@ -312,7 +401,8 @@
\renewcommand{\glsdoifexists}[2]{%
\ifglsentryexists{#1}{#2}%
{%
- \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}'
+ \edef\glslabel{\glsdetoklabel{#1}}%
+ \glsxtrundefaction{Glossary entry `\glslabel'
has not been defined}{You need to define a glossary entry before
you can reference it.}%
}%
@@ -741,6 +831,7 @@
}
\newcommand*{\glsxtrregularfont}[1]{#1}
\renewcommand{\@gls@field@link}[4][]{%
+ \@glsxtr@record{#2}{#3}%
\glsdoifexists{#3}%
{%
\let\glsxtrorg@ifKV@glslink@hyper\ifKV@glslink@hyper
@@ -753,6 +844,65 @@
}%
\glspostlinkhook
}
+\let\@glsxtr@org@gls@\@gls@
+\def\@gls@#1#2{%
+ \@glsxtr@record{#1}{#2}%
+ \@glsxtr@org@gls@{#1}{#2}%
+}%
+\let\@glsxtr@org@glspl@\@glspl@
+\def\@glspl@#1#2{%
+ \@glsxtr@record{#1}{#2}%
+ \@glsxtr@org@glspl@{#1}{#2}%
+}%
+\let\@glsxtr@org@Gls@\@Gls@
+\def\@Gls@#1#2{%
+ \@glsxtr@record{#1}{#2}%
+ \@glsxtr@org@Gls@{#1}{#2}%
+}%
+\let\@glsxtr@org@Glspl@\@Glspl@
+\def\@Glspl@#1#2{%
+ \@glsxtr@record{#1}{#2}%
+ \@glsxtr@org@Glspl@{#1}{#2}%
+}%
+\let\@glsxtr@org@GLS@\@GLS@
+\def\@GLS@#1#2{%
+ \@glsxtr@record{#1}{#2}%
+ \@glsxtr@org@GLS@{#1}{#2}%
+}%
+\let\@glsxtr@org@GLSpl@\@GLSpl@
+\def\@GLS@#1#2{%
+ \@glsxtr@record{#1}{#2}%
+ \@glsxtr@org@GLSpl@{#1}{#2}%
+}%
+\let\@glsxtr@org@glsdisp\@glsdisp
+\renewcommand*{\@glsdisp}[3][]{%
+ \@glsxtr@record{#1}{#2}%
+ \@glsxtr@org@glsdisp[#1]{#2}{#3}%
+}
+\renewcommand*{\@gls@@link}[3][]{%
+ \@glsxtr@record{#1}{#2}%
+ \glsdoifexistsordo{#2}%
+ {%
+ \let\do@gls@link@checkfirsthyper\relax
+ \@gls@link[#1]{#2}{#3}%
+ }%
+ {%
+ \glstextformat{#3}%
+ }%
+ \glspostlinkhook
+}
+\renewrobustcmd*{\glsadd}[2][]{%
+ \@gls@adjustmode
+ \@glsxtr@record{#1}{#2}%
+ \glsdoifexists{#2}%
+ {%
+ \def\@glsnumberformat{glsnumberformat}%
+ \edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}%
+ \setkeys{glossadd}{#1}%
+ \@gls@saveentrycounter
+ \@@do@wrglossary{#2}%
+ }%
+}
\newcommand*{\@glsxtr@field@linkdefs}{%
\let\glsxtrifwasfirstuse\@secondoftwo
\let\glsifplural\@secondoftwo
@@ -760,17 +910,23 @@
\let\glsinsert\@empty
}
\newcommand*{\glsxtrassignfieldfont}[1]{%
- \ifglshasshort{#1}%
+ \ifglsentryexists{#1}%
{%
- \glssetabbrvfmt{\glscategory{#1}}%
- \glsifregular{#1}%
- {\let\@gls@field@font\glsxtrregularfont}%
- {\let\@gls@field@font\@firstofone}%
+ \ifglshasshort{#1}%
+ {%
+ \glssetabbrvfmt{\glscategory{#1}}%
+ \glsifregular{#1}%
+ {\let\@gls@field@font\glsxtrregularfont}%
+ {\let\@gls@field@font\@firstofone}%
+ }%
+ {%
+ \glsifnotregular{#1}%
+ {\let\@gls@field@font\@firstofone}%
+ {\let\@gls@field@font\glsxtrregularfont}%
+ }%
}%
{%
- \glsifnotregular{#1}%
- {\let\@gls@field@font\@firstofone}%
- {\let\@gls@field@font\glsxtrregularfont}%
+ \let\@gls@field@font\@gobble
}%
}
\def\@glstext@#1#2[#3]{%
@@ -2324,8 +2480,7 @@
\def\warn@noprintglossary{%
\GlossariesWarningNoLine{No \string\printglossary\space
or \string\printglossaries\space
- found.^^J(Remove \string\makeglossaries\space if you don't
-want
+ found.^^J(Remove \string\makeglossaries\space if you don't want
any glossaries.)^^JThis document will not have a glossary}%
}%
\renewcommand*{\glsdisplaynumberlist}[1]{%
@@ -2640,6 +2795,44 @@ want
\par
\GlsXtrNoGlsWarningTail
}
+\newcommand*{\glsxtrresourcefile}[2][]{%
+ \protected@write\@auxout{}{\string\glsxtr@resource{#1}{#2}}%
+ \InputIfFileExists{#2}{}%
+ {%
+ \GlossariesExtraWarning{No file `#2'}%
+ }%
+}
+\@onlypreamble\glsxtrresourcefile
+\newcommand*{\glsxtr@resource}[2]{}
+\newcommand*{\printunsrtglossary}[1][type=\glsdefaulttype]{%
+ \@printglossary{#1}{\@print@unsrt@glossary}%
+}
+\newcommand*{\printunsrtglossaries}{%
+ \forallglossaries{\@@glo@type}{\printunsrtglossary[type=\@@glo@type]}%
+}
+
+\newcommand*{\@print@unsrt@glossary}{%
+ \glossarysection[\glossarytoctitle]{\glossarytitle}%
+ \glossarypreamble
+ \ifcsempty{glolist@\@glo@type}
+ {%
+ \GlossariesExtraWarning{No entries defined in glossary `\@glo@type'}%
+ }%
+ {%
+ \begin{theglossary}%
+ \glossaryheader
+ \glsresetentrylist
+ \def\@gls@currentlettergroup{}%
+ \expandafter\@for\expandafter\glscurrententrylabel\expandafter
+ :\expandafter=\csname glolist@\@glo@type\endcsname\do{%
+ \ifdefempty{\glscurrententrylabel}
+ {}%
+ {\@gls@noidx@do\glscurrententrylabel}%
+ }%
+ \end{theglossary}%
+ }%
+ \glossarypostamble
+}
\@ifpackageloaded{glossaries-accsupp}
{
\newcommand*{\glsaccessname}[1]{%